/* effboki AI product page */

.ai-page {
  --ai-ink: #102042;
  --ai-navy: #0a1734;
  --ai-navy-2: #132b59;
  --ai-blue: #2f64e9;
  --ai-blue-dark: #204cb9;
  --ai-sky: #eaf1ff;
  --ai-mint: #b9f3e0;
  --ai-paper: #f7f5ef;
  --ai-soft: #f4f7fc;
  --ai-muted: #5d6780;
  --ai-line: #dce3ef;
  color: var(--ai-ink);
  background: #fff;
}

.ai-page h1,
.ai-page h2,
.ai-page h3,
.ai-page p {
  margin-top: 0;
}

.ai-page .section-label,
.ai-eyebrow {
  margin: 0 0 18px;
  color: var(--ai-blue);
  font-family: "Inter", "Noto Sans JP", sans-serif;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: none;
}

.ai-page .button-primary {
  color: #fff;
}

.ai-section-head {
  max-width: 820px;
  margin-bottom: clamp(42px, 6vw, 70px);
}

.ai-section-head-wide {
  max-width: 1020px;
}

.ai-section-head h2,
.ai-final-card h2 {
  margin: 0;
  color: var(--ai-ink);
  font-size: clamp(2.15rem, 4.7vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 1.25;
  text-wrap: balance;
}

.ai-section-head h2 span,
.ai-final-card h2 span {
  color: var(--ai-blue);
}

.ai-section-head > p:last-child {
  max-width: 800px;
  margin: 24px 0 0;
  color: var(--ai-muted);
  font-size: clamp(1rem, 1.4vw, 1.12rem);
  line-height: 1.95;
}

/* Hero */
.ai-hero {
  position: relative;
  min-height: calc(100svh - 68px);
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
  padding: 0 0 31px;
  isolation: isolate;
  background: #020817;
}

.ai-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 8, 23, 0.14) 0%, rgba(2, 8, 23, 0.03) 43%, transparent 62%),
    linear-gradient(180deg, transparent 68%, rgba(2, 8, 23, 0.2) 100%);
  pointer-events: none;
}

.ai-hero-grid {
  width: min(1448px, calc(100% - 88px));
  min-height: 0;
  display: block;
  padding: 66px 0 38px;
}

.ai-hero-copy {
  position: relative;
  z-index: 2;
  max-width: 620px;
}

.ai-hero .ai-eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 620px;
  gap: 14px;
  margin: 0 0 35px;
  color: #2180ff;
  font-size: clamp(1rem, 1.35vw, 1.22rem);
  font-weight: 500;
  letter-spacing: 0;
}

.ai-hero .ai-eyebrow::before,
.ai-hero .ai-eyebrow::after {
  content: "";
  width: 30px;
  height: 1px;
  background: #2385ff;
}

.ai-hero h1 {
  width: 620px;
  max-width: calc(100vw - 88px);
  margin: 0;
  color: #fff;
  font-size: clamp(3rem, 3.75vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.42;
  white-space: nowrap;
}

.ai-hero h1 .ai-hero-title-accent {
  color: #1e69ed;
}

.ai-hero .ai-hero-lead {
  margin: 28px 0 0;
  color: #fff;
  font-size: clamp(1.3rem, 1.8vw, 1.65rem);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.ai-hero .ai-hero-lead span {
  position: relative;
  display: inline-block;
  margin-left: 0.18em;
}

.ai-hero .ai-hero-lead span::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -3px;
  left: 0;
  height: 2px;
  background: #277cee;
}

.ai-hero .ai-hero-body {
  max-width: 590px;
  margin: 30px 0 0;
  color: #9ba5b8;
  font-size: clamp(0.95rem, 1.2vw, 1.08rem);
  line-height: 2.05;
}

.ai-hero-actions,
.ai-final-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.ai-hero-actions {
  gap: 20px;
  margin-top: 43px;
}

.ai-hero-actions .button {
  min-height: 62px;
  padding-inline: 30px;
  font-size: 1rem;
}

.ai-hero-actions .button-primary {
  min-width: 278px;
  border-color: rgba(55, 112, 255, 0.82);
  background: linear-gradient(135deg, #1760f2 0%, #1250e9 100%);
  box-shadow: 0 15px 30px rgba(8, 69, 224, 0.36);
}

.ai-hero-actions .button-secondary {
  min-width: 248px;
  color: #fff;
  border-color: rgba(77, 138, 255, 0.62);
  background: rgba(3, 10, 25, 0.36);
  backdrop-filter: blur(10px);
}

.ai-hero-note,
.ai-final-note {
  margin: 14px 0 0;
  color: #788399;
  font-size: 0.78rem;
  font-weight: 700;
}

.ai-hero .ai-hero-note {
  margin-top: 22px;
  color: #a8b0c2;
  font-size: 0.92rem;
  font-weight: 500;
}

.ai-hero-visual {
  position: absolute;
  z-index: -2;
  inset: -88px 0 0;
  min-height: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background-image: url("../img/service/ai-hero-background-v3.jpg");
  background-position: right center;
  background-size: auto 74%;
  background-repeat: no-repeat;
  background-color: #000914;
  box-shadow: none;
}

.ai-hero-visual::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 260px;
  background: linear-gradient(90deg, #000914 0%, #000914 40%, rgba(0, 9, 20, 0) 100%);
}

.ai-hero-mobile-device,
.ai-hero-mobile-feature-title,
.ai-hero-mobile-actions {
  display: none;
}

.ai-hero-value {
  position: relative;
  z-index: 2;
  width: calc(100% - 72px);
  min-height: 180px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: center;
  gap: 0;
  margin: 0 auto;
  padding: 32px 18px;
  border: 1px solid rgba(79, 111, 180, 0.28);
  border-radius: 16px;
  background: linear-gradient(90deg, rgba(3, 15, 38, 0.8), rgba(5, 17, 41, 0.74));
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(14px);
}

.ai-hero-value-item {
  position: relative;
  min-width: 0;
  min-height: 112px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
}

.ai-hero-value-item:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 1px;
  height: 100%;
  background: rgba(111, 136, 185, 0.26);
}

.ai-hero-value p {
  min-width: 0;
  margin: 0;
  color: #d8deea;
  text-align: left;
}

.ai-hero-value p strong {
  display: block;
  margin-bottom: 8px;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  white-space: normal;
}

.ai-hero-value p span {
  display: block;
  color: #a7b0c2;
  font-size: 0.75rem;
  line-height: 1.7;
  overflow-wrap: anywhere;
  white-space: normal;
}

.ai-hero-value-icon {
  width: 70px;
  height: 70px;
  flex: 0 0 70px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(135, 174, 255, 0.72);
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(31, 80, 205, 0.68), rgba(69, 96, 157, 0.42));
  box-shadow: inset 0 0 26px rgba(49, 104, 238, 0.18);
}

.ai-hero-value-icon i {
  position: relative;
  width: 32px;
  height: 30px;
  display: block;
}

.ai-value-book::before,
.ai-value-book::after {
  content: "";
  position: absolute;
  top: 2px;
  bottom: 3px;
  width: 17px;
  border: 2px solid #fff;
  background: rgba(255, 255, 255, 0.04);
}

.ai-value-book::before {
  left: 1px;
  border-right: 0;
  border-radius: 5px 0 0 3px;
  transform: skewY(7deg);
}

.ai-value-book::after {
  right: 1px;
  border-left: 0;
  border-radius: 0 5px 3px 0;
  transform: skewY(-7deg);
}

.ai-value-chat {
  width: 34px !important;
  height: 27px !important;
  border: 2px solid #fff;
  border-radius: 5px;
}

.ai-value-chat::before {
  content: "";
  position: absolute;
  left: 5px;
  bottom: -7px;
  width: 9px;
  height: 9px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  background: #18366f;
  transform: skewY(-38deg);
}

.ai-value-chat::after {
  content: "•••";
  position: absolute;
  inset: 0;
  color: #fff;
  font-size: 15px;
  letter-spacing: 2px;
  line-height: 18px;
  text-align: center;
}

.ai-value-light {
  width: 24px !important;
  height: 27px !important;
  border: 2px solid #fff;
  border-radius: 50% 50% 44% 44%;
}

.ai-value-light::before {
  content: "";
  position: absolute;
  left: 5px;
  right: 5px;
  bottom: -7px;
  height: 4px;
  border-top: 2px solid #fff;
  border-bottom: 2px solid #fff;
}

.ai-value-light::after {
  content: "";
  position: absolute;
  inset: -9px;
  background:
    linear-gradient(#fff, #fff) center top / 2px 5px no-repeat,
    linear-gradient(45deg, transparent 44%, #fff 45% 55%, transparent 56%) left top / 8px 8px no-repeat,
    linear-gradient(-45deg, transparent 44%, #fff 45% 55%, transparent 56%) right top / 8px 8px no-repeat;
}

.ai-value-cycle {
  width: 30px !important;
  height: 30px !important;
  border: 2px solid #fff;
  border-left-color: transparent;
  border-radius: 50%;
}

.ai-value-cycle::before {
  content: "";
  position: absolute;
  left: -4px;
  top: -2px;
  width: 8px;
  height: 8px;
  border-left: 2px solid #fff;
  border-top: 2px solid #fff;
  transform: rotate(-32deg);
}

.ai-value-chart {
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
}

.ai-value-chart::before {
  content: "";
  position: absolute;
  left: 5px;
  bottom: 3px;
  width: 5px;
  height: 9px;
  border: 2px solid #fff;
  box-shadow: 8px -5px 0 -2px #18366f, 8px -5px 0 0 #fff, 16px -13px 0 -2px #18366f, 16px -13px 0 0 #fff;
}

.ai-value-chart::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 4px;
  width: 21px;
  height: 12px;
  border-top: 2px solid #fff;
  transform: rotate(-27deg);
  transform-origin: left top;
}

/* Recognition */
.ai-recognition {
  background: #f4f7fb;
}

.ai-recognition-heading {
  max-width: 1120px;
  margin-bottom: clamp(36px, 5vw, 54px);
}

.ai-recognition-heading h2 {
  font-size: clamp(2.15rem, 3.6vw, 3.15rem);
  letter-spacing: -0.06em;
  line-height: 1.28;
}

.ai-recognition-heading h2 span {
  white-space: nowrap;
}

.ai-recognition-heading h2 span,
.ai-recognition-contrast .contrast-card-after h3 span {
  color: var(--ai-blue);
}

.ai-recognition-heading > p:last-child {
  max-width: 720px;
}

.ai-recognition-contrast .contrast-card {
  min-height: 460px;
}

.ai-recognition-contrast .contrast-card-before {
  border-color: #e6d8d2;
  background: #fff9f7;
}

.ai-recognition-contrast .contrast-card-after {
  border-color: #aec9fa;
  background:
    radial-gradient(circle at 100% 0%, rgba(185, 243, 224, 0.38), transparent 27%),
    linear-gradient(145deg, #edf4ff, #f8fbff);
  box-shadow: 0 22px 54px rgba(47, 100, 233, 0.13);
}

.ai-recognition-contrast .contrast-card h3 {
  font-size: clamp(1.45rem, 2.5vw, 2rem);
  letter-spacing: -0.045em;
}

.ai-recognition-contrast .contrast-path {
  margin-top: 24px;
}

.ai-recognition-contrast .contrast-path li {
  grid-template-columns: 88px minmax(0, 1fr);
  padding-block: 14px;
}

.ai-recognition-contrast .contrast-note strong {
  color: var(--ai-blue-dark);
}

/* Five AI supports */
.ai-feature-section {
  background:
    radial-gradient(circle at 100% 0%, rgba(47, 100, 233, 0.08), transparent 26%),
    #fff;
}

.ai-feature-heading {
  max-width: 900px;
}

.ai-feature-heading h2 {
  font-size: clamp(2.15rem, 4.7vw, 4rem);
  letter-spacing: -0.06em;
  line-height: 1.25;
}

.ai-feature-shell .strength-panel {
  min-height: 650px;
}

.ai-feature-screen .ipad-screen img {
  width: 100%;
  display: block;
  margin-top: -5.4422%;
}

.ai-feature-screen .ipad-screen {
  aspect-ratio: 2940 / 1752;
  overflow: hidden;
}

.ai-context-switcher-buttons {
  margin-bottom: 18px;
}

.ai-context-switcher-buttons .switcher-button {
  flex: 1 1 0;
  min-width: 0;
  padding-inline: 10px;
}

.ai-context-screen .ipad-screen {
  aspect-ratio: 1555 / 1012;
}

.ai-context-screen .ipad-screen img {
  width: 100%;
  display: block;
  margin: 0;
}

.ai-rephrase-result-screen .ipad-screen {
  aspect-ratio: 1555 / 1011;
}

.ai-reason-switcher-buttons .switcher-button {
  flex: 1 1 110px;
}

.ai-reason-screen .ipad-screen {
  aspect-ratio: 1555 / 1011;
}

.ai-reason-overview-screen .ipad-screen {
  aspect-ratio: 1554 / 1012;
}

.ai-hint-switcher-buttons .switcher-button {
  flex: 1 1 110px;
}

.ai-hint-screen .ipad-screen {
  aspect-ratio: 1555 / 1012;
}

.ai-hint-understanding-screen .ipad-screen {
  aspect-ratio: 1555 / 1011;
}

.ai-review-switcher-buttons .switcher-button {
  flex: 1 1 105px;
}

.ai-review-screen .ipad-screen {
  aspect-ratio: 1555 / 1011;
}

.ai-review-generated-screen .ipad-screen {
  aspect-ratio: 1555 / 1012;
}

.ai-review-solve-screen .ipad-screen {
  aspect-ratio: 1553 / 1013;
}

.ai-review-explanation-screen .ipad-screen {
  aspect-ratio: 1554 / 1012;
}

.ai-page .image-lightbox-stage img[src*="ai-interface-full"] {
  margin-top: -5.4422%;
}

/* Study time value */
.ai-study-time {
  background: #edf3ff;
}

.ai-study-time-intro .section-label {
  color: var(--ai-blue);
}

.ai-study-impact {
  overflow: hidden;
  border: 1px solid #cfdcf2;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 24px 64px rgba(27, 59, 118, 0.1);
}

.ai-study-impact-head {
  padding: clamp(30px, 4vw, 48px) clamp(24px, 4vw, 48px) 0;
}

.ai-study-impact-label {
  margin: 0;
  color: var(--ai-blue-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.ai-study-impact-head h3 {
  margin: 12px 0 0;
  color: var(--ai-ink);
  font-size: clamp(1.45rem, 2.8vw, 2.2rem);
  letter-spacing: -0.05em;
  line-height: 1.4;
}

.ai-study-impact-head h3 span,
.ai-study-impact-result h3 span {
  color: var(--ai-blue);
}

.ai-study-impact-chain {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 1.8vw, 22px);
  margin-top: clamp(28px, 4vw, 44px);
  padding: 0 clamp(18px, 2.6vw, 32px) clamp(12px, 1.7vw, 20px);
}

.ai-study-impact-chain article {
  position: relative;
  isolation: isolate;
  min-height: 236px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: clamp(30px, 3.2vw, 42px) clamp(24px, 3.2vw, 38px);
  border: 1px solid #dbe5f5;
  border-radius: 18px;
  background: #fff;
}

.ai-study-impact-chain article:nth-child(even) {
  background: #f5f8ff;
}

.ai-study-impact-chain article:nth-child(3) {
  background: #eef4ff;
}

.ai-study-impact-chain article::before {
  position: absolute;
  z-index: 0;
  top: 0.06em;
  left: 0.1em;
  color: rgba(47, 100, 233, 0.12);
  content: attr(data-step);
  font-family: "Inter", sans-serif;
  font-size: clamp(6.8rem, 9vw, 8.8rem);
  font-weight: 800;
  letter-spacing: -0.1em;
  line-height: 1;
}

.ai-study-impact-chain article:nth-child(2)::before {
  color: rgba(48, 171, 147, 0.13);
}

.ai-study-impact-chain article:nth-child(3)::before {
  color: rgba(128, 105, 226, 0.13);
}

.ai-study-impact-chain h3 {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--ai-ink);
  font-size: clamp(1.38rem, 2.35vw, 1.76rem);
  letter-spacing: -0.045em;
  line-height: 1.45;
  text-align: center;
}

@media (min-width: 761px) {
  .ai-study-impact-chain h3 {
    white-space: nowrap;
  }
}

.ai-study-impact-chain p {
  position: relative;
  z-index: 1;
  margin: 24px 0 0;
  padding-top: 18px;
  border-top: 1px solid rgba(75, 104, 154, 0.16);
  color: var(--ai-muted);
  font-size: 0.84rem;
  line-height: 1.8;
}

.ai-study-impact-result {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
  margin-top: clamp(18px, 2.6vw, 30px);
  padding: clamp(30px, 4.5vw, 54px) clamp(24px, 4vw, 48px);
  border-radius: 24px;
  color: #fff;
  background:
    radial-gradient(circle at 100% 0%, rgba(185, 243, 224, 0.2), transparent 40%),
    linear-gradient(130deg, #112f65, #0a1c3d);
  box-shadow: 0 22px 48px rgba(17, 45, 96, 0.16);
}

.ai-study-impact-result p {
  margin: 0;
}

.ai-study-impact-result > div > p {
  margin-bottom: 8px;
  color: var(--ai-mint);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.ai-study-impact-result h3 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.45rem, 2.8vw, 2.2rem);
  letter-spacing: -0.05em;
  line-height: 1.36;
}

@media (min-width: 821px) {
  .ai-study-impact-result h3 {
    white-space: nowrap;
  }
}

.ai-study-impact-result > p {
  max-width: 760px;
  color: #c7d5ee;
  font-size: 0.9rem;
  line-height: 1.85;
}

.ai-study-impact-result > p strong {
  display: block;
  margin-top: 10px;
  color: #fff;
}

/* Fit */
.ai-fit {
  background: var(--ai-paper);
}

.ai-fit .fit-panel {
  overflow: hidden;
  padding: 0;
  border-color: #cbdcf7;
  border-radius: 26px;
  background: linear-gradient(145deg, #f8fbff, #eef5ff);
  box-shadow: 0 24px 58px rgba(29, 65, 127, 0.1);
}

.ai-fit .fit-panel > h3 {
  margin: 0;
  padding: clamp(28px, 3.4vw, 40px) clamp(24px, 4vw, 42px) 24px;
  border-bottom: 1px solid #d8e5f8;
  color: var(--ai-ink);
  font-size: clamp(1.3rem, 2.3vw, 1.65rem);
  line-height: 1.45;
}

.ai-fit .fit-panel > h3::before {
  display: block;
  margin-bottom: 9px;
  color: var(--ai-blue);
  content: "こんな独学に";
  font-family: "Inter", sans-serif;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.ai-fit .check-grid {
  gap: 0;
  margin: clamp(18px, 2.5vw, 28px);
  border: 1px solid #d7e3f5;
  border-radius: 18px;
  overflow: hidden;
  background: #d7e3f5;
}

.ai-fit .fit-panel .check-grid li {
  min-height: 88px;
  padding: 20px 58px 20px 60px;
  border: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ai-ink);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.65;
}

.ai-fit .fit-panel .check-grid li:nth-child(odd) {
  border-right: 1px solid #d7e3f5;
}

.ai-fit .fit-panel .check-grid li:nth-child(-n + 4) {
  border-bottom: 1px solid #d7e3f5;
}

.ai-fit .fit-panel .check-grid li::before {
  left: 20px;
  width: 28px;
  height: 28px;
  color: #fff;
  background: var(--ai-blue);
  font-size: 0.76rem;
}

.ai-fit .fit-conclusion {
  position: relative;
  margin: 0 clamp(18px, 2.5vw, 28px) clamp(18px, 2.5vw, 28px);
  padding: 22px 24px 22px 30px;
  border: 1px solid #d5e4fa;
  border-radius: 16px;
  background: linear-gradient(110deg, #edf4ff, #f4fbf8);
  line-height: 1.85;
}

.ai-fit .fit-conclusion::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  border-radius: 4px 0 0 4px;
  background: var(--ai-blue);
  content: "";
}

.ai-fit .fit-conclusion strong {
  color: var(--ai-ink);
  font-size: 0.96rem;
}

/* Final CTA */
.ai-final {
  background: #fff;
}

.ai-final-card {
  position: relative;
  overflow: hidden;
  padding: clamp(54px, 9vw, 108px);
  border-radius: 36px;
  color: #fff;
  background:
    radial-gradient(circle at 100% 0%, rgba(185, 243, 224, 0.25), transparent 29%),
    radial-gradient(circle at 0% 100%, rgba(71, 121, 245, 0.34), transparent 35%),
    linear-gradient(145deg, #091630, #18366e);
  box-shadow: 0 38px 100px rgba(17, 28, 54, 0.2);
  text-align: left;
}

.ai-final-card .section-label {
  color: var(--ai-mint);
}

.ai-final-card h2,
.ai-final-card h2 span {
  color: #fff;
}

.ai-final-card h2 {
  font-size: clamp(2.25rem, 3.4vw, 3.1rem);
  line-height: 1.32;
}

.ai-final-card > p:not(.section-label):not(.ai-final-note) {
  max-width: 850px;
  margin: 28px 0 0;
  color: #c3cfe3;
  line-height: 1.95;
}

.ai-final-actions {
  justify-content: flex-start;
}

.ai-final-card .button-secondary {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.06);
}

.ai-final-card .button-secondary:hover {
  background: rgba(255, 255, 255, 0.13);
}

.ai-final-note {
  color: #94a6c7;
}

/* Responsive */
@media (max-width: 1040px) {
  .ai-hero-grid {
    grid-template-columns: 1fr;
  }

  .ai-hero-grid {
    min-height: auto;
  }

  .ai-hero-copy {
    max-width: 560px;
  }

  .ai-hero-visual {
    min-height: 0;
    background-position: 58% center;
  }

  .ai-recognition-contrast .contrast-card,
  .ai-feature-shell .strength-panel {
    min-height: 0;
  }

}

@media (max-width: 820px) {
  .ai-page .section-pad {
    padding-block: 82px;
  }

  .ai-section-head {
    margin-bottom: 40px;
  }

  .ai-section-head h2,
  .ai-recognition-heading h2,
  .ai-final-card h2 {
    font-size: clamp(1.9rem, 8.7vw, 2.7rem);
    letter-spacing: -0.055em;
  }

  .ai-section-head h2 br,
  .ai-recognition-heading h2 br,
  .ai-final-card h2 br {
    display: none;
  }

  .ai-recognition-heading h2 span {
    white-space: normal;
  }

  .ai-hero {
    padding-top: 82px;
  }

  .ai-hero h1 {
    font-size: clamp(2.5rem, 10vw, 3.5rem);
  }

  .ai-hero h1 br {
    display: none;
  }

  .ai-hero-visual {
    min-height: 0;
    border-radius: 0;
    background-position: 60% center;
  }

  .ai-hero-actions,
  .ai-final-actions {
    flex-direction: column;
  }

  .ai-hero-actions .button,
  .ai-final-actions .button {
    width: 100%;
  }

  .ai-hero-value {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 14px 0;
  }

  .ai-study-impact-chain {
    grid-template-columns: 1fr;
  }

  .ai-study-impact-chain article {
    min-height: 0;
  }

  .ai-study-impact-result {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .ai-fit .fit-panel > h3 {
    padding: 26px 22px 20px;
  }

  .ai-fit .check-grid {
    margin: 16px;
  }

  .ai-fit .fit-panel .check-grid li:nth-child(odd) {
    border-right: 0;
  }

  .ai-fit .fit-panel .check-grid li:nth-child(-n + 5) {
    border-bottom: 1px solid #d7e3f5;
  }

  .ai-fit .fit-conclusion {
    margin: 0 16px 16px;
    padding: 20px 20px 20px 26px;
  }

}

@media (max-width: 560px) {
  .ai-hero-visual {
    min-height: 0;
    border-radius: 0;
    background-position: 61% center;
    background-size: cover;
  }

  .ai-final-card {
    padding: 42px 22px;
    border-radius: 25px;
  }

  .ai-recognition-contrast .contrast-path li {
    grid-template-columns: 78px minmax(0, 1fr);
  }

  .ai-feature-screen.ipad-frame {
    padding: 5px;
    border-radius: 14px;
  }

  .ai-feature-screen img {
    border-radius: 9px;
  }

  .ai-study-impact {
    border-radius: 22px;
  }

}

@media (max-width: 1400px) {
  .ai-hero-value {
    padding-inline: 10px;
  }

  .ai-hero-value-item {
    gap: 10px;
    padding-inline: 8px;
  }

  .ai-hero-value-icon {
    width: 52px;
    height: 52px;
    flex-basis: 52px;
  }

  .ai-hero-value p strong {
    font-size: 0.86rem;
  }

  .ai-hero-value p span {
    font-size: 0.64rem;
    line-height: 1.6;
  }
}

@media (max-width: 1200px) {
  .ai-hero-value {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
    padding-inline: 8px;
  }

  .ai-hero-value-item {
    gap: 8px;
    padding-inline: 6px;
  }

  .ai-hero-value-icon {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
  }

  .ai-hero-value p strong {
    font-size: 0.88rem;
  }

  .ai-hero-value p span {
    font-size: 0.68rem;
    line-height: 1.8;
  }
}

@media (min-width: 701px) and (max-width: 1200px) {
  .ai-hero-copy {
    max-width: clamp(410px, calc(55vw - 42px), 620px);
  }

  .ai-hero .ai-eyebrow {
    margin-bottom: clamp(20px, 3vw, 35px);
    font-size: clamp(0.75rem, calc(0.21rem + 1.05vw), 1rem);
  }

  .ai-hero h1 {
    width: 100%;
    max-width: 100%;
    font-size: clamp(2.2rem, calc(0.43rem + 3.43vw), 3rem);
  }

  .ai-hero .ai-hero-lead {
    margin-top: clamp(20px, 2.35vw, 28px);
    font-size: clamp(1rem, calc(0.35rem + 1.27vw), 1.3rem);
  }

  .ai-hero .ai-hero-body {
    max-width: clamp(360px, calc(60vw - 140px), 590px);
    margin-top: clamp(20px, 2.5vw, 30px);
    font-size: clamp(0.78rem, calc(0.42rem + 0.7vw), 0.95rem);
  }

  .ai-hero-copy > .ai-hero-actions {
    gap: clamp(12px, 1.67vw, 20px);
    margin-top: clamp(30px, calc(1.8px + 3.43vw), 43px);
  }

  .ai-hero-copy > .ai-hero-actions .button {
    min-height: clamp(50px, calc(24px + 3.17vw), 62px);
    padding-inline: clamp(12px, calc(4.75vw - 27px), 30px);
    font-size: clamp(0.75rem, calc(0.21rem + 1.05vw), 1rem);
  }

  .ai-hero-copy > .ai-hero-actions .button-primary {
    min-width: clamp(176px, calc(26.9vw - 45px), 278px);
  }

  .ai-hero-copy > .ai-hero-actions .button-secondary {
    min-width: clamp(165px, calc(21.9vw - 15px), 248px);
  }

  .ai-hero-value {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    row-gap: 18px;
  }

  .ai-hero-value-item {
    grid-column: span 2;
  }

  .ai-hero-value-item:nth-child(3)::after {
    content: none;
  }

  .ai-hero-value-item:nth-child(4) {
    grid-column: 2 / span 2;
  }
}

@media (max-width: 1080px) {
  .ai-hero {
    min-height: calc(100svh - 64px);
  }

  .ai-hero-visual {
    inset: -64px 0 0;
  }
}

@media (max-width: 820px) {
  .ai-hero {
    min-height: auto;
    display: block;
    padding: 0 0 24px;
  }

  .ai-hero::before {
    background: linear-gradient(180deg, rgba(2, 8, 23, 0.9), rgba(2, 8, 23, 0.78));
  }

  .ai-hero-grid {
    width: calc(100% - 48px);
    padding: 20px 0 4px;
  }

  .ai-hero .ai-eyebrow {
    gap: 8px;
    margin-bottom: 10px;
    font-size: 0.78rem;
  }

  .ai-hero .ai-eyebrow::before,
  .ai-hero .ai-eyebrow::after {
    width: 16px;
  }

  .ai-hero h1 {
    width: auto;
    max-width: none;
    font-size: clamp(1.62rem, 6.8vw, 2.25rem);
    letter-spacing: -0.045em;
    line-height: 1.34;
    white-space: nowrap;
  }

  .ai-hero h1 br {
    display: block;
  }

  .ai-hero h1 .ai-hero-title-first {
    display: inline;
    font-size: 1em;
  }

  .ai-hero h1 .ai-hero-title-prefix,
  .ai-hero h1 .ai-hero-title-accent {
    display: inline;
  }

  .ai-hero .ai-hero-lead {
    margin-top: 14px;
    font-size: 0.9rem;
  }

  .ai-hero .ai-hero-body {
    max-width: 100%;
    margin-top: 7px;
    color: #d7ddea;
    font-size: 0.82rem;
    letter-spacing: -0.01em;
    line-height: 1.75;
  }

  .ai-hero-body-break {
    display: none;
  }

  .ai-hero-actions {
    gap: 12px;
    margin-top: 18px;
  }

  .ai-hero-copy > .ai-hero-actions {
    display: none;
  }

  .ai-hero-actions .button,
  .ai-hero-actions .button-primary,
  .ai-hero-actions .button-secondary {
    width: 100%;
    min-width: 0;
    min-height: 52px;
    padding-inline: 24px;
    font-size: 0.96rem;
  }

  .ai-hero .ai-hero-note {
    margin-top: 16px;
    font-size: 0.8rem;
  }

  .ai-hero-visual {
    inset: -64px 0 0;
    min-height: 0;
    border-radius: 0;
    background-image: none;
  }

  .ai-hero-mobile-device {
    position: relative;
    width: calc(100% - 44px);
    aspect-ratio: 4 / 3;
    display: block;
    overflow: hidden;
    margin: 16px auto 0;
    border: 0;
    border-radius: 18px;
    background: #000914;
    box-shadow: 0 20px 42px rgba(0, 0, 0, 0.36);
    transform: rotate(-0.8deg);
  }

  .ai-hero-mobile-device::after {
    content: "";
    position: absolute;
    z-index: 1;
    inset: 0;
    border: 1px solid rgba(211, 219, 232, 0.72);
    border-radius: inherit;
    box-shadow: inset 0 0 0 9px rgba(5, 8, 15, 0.94);
    pointer-events: none;
  }

  .ai-hero-mobile-device img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: 50% 50%;
    transform: scale(1.34);
  }

  .ai-hero-mobile-feature-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0 auto;
    padding: 42px 0 28px;
    color: #fff;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: -0.02em;
    text-align: center;
  }

  .ai-hero-mobile-feature-title::before,
  .ai-hero-mobile-feature-title::after {
    content: "";
    width: 30px;
    height: 1px;
    background: rgba(65, 134, 255, 0.82);
  }

  .ai-hero-value {
    width: calc(100% - 48px);
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 8px;
    margin: 0 auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }

  .ai-hero-value-item {
    min-height: 78px;
    gap: 12px;
    padding: 12px;
    border: 1px solid rgba(73, 111, 181, 0.3);
    border-radius: 12px;
    background: linear-gradient(100deg, rgba(7, 25, 57, 0.86), rgba(5, 17, 41, 0.74));
  }

  .ai-hero-value-item:not(:last-child)::after {
    content: none;
  }

  .ai-hero-value p strong {
    margin-bottom: 4px;
    font-size: 0.95rem;
    line-height: 1.3;
  }

  .ai-hero-value p span {
    color: #d7ddea;
    font-size: 0.76rem;
    line-height: 1.55;
    white-space: normal;
  }

  .ai-hero-value p span br {
    display: none;
  }

  .ai-hero-value-icon {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
  }

  .ai-hero-value-icon i {
    transform: scale(0.88);
  }

  .ai-hero-mobile-actions {
    width: calc(100% - 48px);
    display: flex;
    margin: 18px auto 0;
  }
}

@media (max-width: 560px) {
  .ai-hero-grid,
  .ai-hero-value,
  .ai-hero-mobile-actions {
    width: calc(100% - 48px);
  }

  .ai-hero-visual {
    min-height: 0;
    border-radius: 0;
  }
}

/* Keep portrait tablets on the desktop hero composition. The navigation
   remains compact, but the hero scales its copy and device instead of
   switching to the stacked phone layout. */
@media (min-width: 701px) and (max-width: 820px) {
  .ai-hero {
    min-height: calc(100svh - 64px);
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    padding: 0 0 31px;
  }

  .ai-hero::before {
    background:
      linear-gradient(90deg, rgba(2, 8, 23, 0.14) 0%, rgba(2, 8, 23, 0.03) 43%, transparent 62%),
      linear-gradient(180deg, transparent 68%, rgba(2, 8, 23, 0.2) 100%);
  }

  .ai-hero-grid {
    width: min(1448px, calc(100% - 88px));
    min-height: 0;
    padding: clamp(50px, 6vw, 66px) 0 38px;
  }

  .ai-hero-copy {
    max-width: clamp(340px, calc(40vw + 40px), 380px);
  }

  .ai-hero .ai-eyebrow {
    gap: 10px;
    margin-bottom: 20px;
    font-size: 0.75rem;
  }

  .ai-hero .ai-eyebrow::before,
  .ai-hero .ai-eyebrow::after {
    width: 20px;
  }

  .ai-hero h1 {
    width: 100%;
    max-width: 100%;
    font-size: clamp(1.85rem, 4vw, 2.15rem);
    line-height: 1.38;
    white-space: nowrap;
  }

  .ai-hero .ai-hero-lead {
    margin-top: 20px;
    font-size: 0.95rem;
  }

  .ai-hero .ai-hero-body {
    max-width: 340px;
    margin-top: 20px;
    color: #aeb8ca;
    font-size: clamp(0.7rem, 1.5vw, 0.78rem);
    letter-spacing: 0;
    line-height: 1.78;
  }

  .ai-hero-copy > .ai-hero-actions {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 10px;
    margin-top: 30px;
  }

  .ai-hero-copy > .ai-hero-actions .button {
    width: auto;
    min-height: 48px;
    padding-inline: 12px;
    font-size: clamp(0.7rem, 1.5vw, 0.78rem);
    white-space: nowrap;
  }

  .ai-hero-copy > .ai-hero-actions .button-primary {
    min-width: 165px;
  }

  .ai-hero-copy > .ai-hero-actions .button-secondary {
    min-width: 155px;
  }

  .ai-hero-visual {
    inset: -64px 0 0;
    min-height: 0;
    border-radius: 0;
    background-image: url("../img/service/ai-hero-background-v3.jpg");
  }

  .ai-hero-mobile-device,
  .ai-hero-mobile-feature-title,
  .ai-hero-mobile-actions {
    display: none;
  }

  .ai-hero-value {
    width: calc(100% - 72px);
    min-height: 180px;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0;
    margin: 0 auto;
    padding: 24px 8px;
    border: 1px solid rgba(79, 111, 180, 0.28);
    border-radius: 16px;
    background: linear-gradient(90deg, rgba(3, 15, 38, 0.8), rgba(5, 17, 41, 0.74));
    box-shadow: 0 22px 58px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(14px);
  }

  .ai-hero-value-item {
    min-height: 96px;
    grid-column: span 2;
    gap: 8px;
    padding: 0 8px;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .ai-hero-value-item:nth-child(3)::after {
    content: none;
  }

  .ai-hero-value-item:nth-child(4) {
    grid-column: 2 / span 2;
  }

  .ai-hero-value-item:not(:last-child)::after {
    content: "";
    top: 0;
    right: 0;
    width: 1px;
    height: 100%;
    background: rgba(111, 136, 185, 0.26);
  }

  .ai-hero-value-icon {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
  }

  .ai-hero-value-icon i {
    transform: scale(0.88);
  }

  .ai-hero-value p strong {
    margin-bottom: 4px;
    font-size: 0.82rem;
    line-height: 1.3;
  }

  .ai-hero-value p span {
    color: #a7b0c2;
    font-size: 0.62rem;
    line-height: 1.55;
  }

}

/* Keep the before/after comparison readable side-by-side on tablets. */
@media (min-width: 701px) and (max-width: 1000px) {
  .ai-recognition-contrast {
    grid-template-columns: minmax(0, 1fr) 34px minmax(0, 1fr);
    gap: 12px;
  }

  .ai-recognition-contrast .contrast-card {
    min-height: 0;
    padding: clamp(16px, 2.5vw, 22px);
    border-radius: 18px;
  }

  .ai-recognition-contrast .contrast-card h3 {
    font-size: clamp(1.15rem, 2.8vw, 1.45rem);
    line-height: 1.36;
  }

  .ai-recognition-contrast .contrast-path {
    margin-top: 16px;
  }

  .ai-recognition-contrast .contrast-path li {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 8px;
    padding-block: 8px;
    font-size: 0.74rem;
    line-height: 1.45;
  }

  .ai-recognition-contrast .contrast-path b {
    font-size: 0.62rem;
  }

  .ai-recognition-contrast .contrast-note {
    margin-top: 16px;
    padding-top: 12px;
    font-size: 0.68rem;
    line-height: 1.55;
  }

  .ai-recognition-contrast .contrast-connector {
    gap: 0;
    padding: 0;
  }

  .ai-recognition-contrast .contrast-connector b {
    width: 34px;
    height: 34px;
    transform: none;
    font-size: 0.92rem;
  }
}

/* Keep the desktop device clear of the copy while scaling it smoothly with
   the available viewport width. */
@media (min-width: 701px) {
  .ai-hero-visual {
    background-position: right center;
    background-size: min(max(540px, 72vw), calc(60vw + 40svh - 32px)) auto;
  }
}

/* Align the before/after comparison so each learning step begins on the
   same baseline even when one card has a longer headline or explanation. */
@media (min-width: 1001px) {
  .ai-recognition-contrast .contrast-card h3 {
    min-height: 4.26em;
  }

  .ai-recognition-contrast .contrast-path {
    grid-template-rows: repeat(3, minmax(68px, auto));
  }

  .ai-recognition-contrast .contrast-path li {
    min-height: 0;
    align-items: center;
  }
}

@media (min-width: 701px) and (max-width: 1000px) {
  .ai-recognition-contrast .contrast-card h3 {
    min-height: 4.08em;
  }

  .ai-recognition-contrast .contrast-path {
    grid-template-rows: repeat(3, minmax(54px, auto));
  }

  .ai-recognition-contrast .contrast-path li {
    min-height: 0;
    align-items: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ai-page *,
  .ai-page *::before,
  .ai-page *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* Clear section zebra shared with the service overview page. */
#main-content.ai-page > .ai-recognition,
#main-content.ai-page > .ai-study-time,
#main-content.ai-page > .ai-final {
  background: #fff;
}

#main-content.ai-page > .ai-feature-section,
#main-content.ai-page > .ai-fit {
  border-top: 1px solid #cfdeed;
  border-bottom: 1px solid #cfdeed;
  background:
    radial-gradient(circle at 100% 0%, rgba(47, 100, 233, 0.1), transparent 27%),
    radial-gradient(circle at 0% 100%, rgba(67, 188, 153, 0.05), transparent 25%),
    #eaf2fc;
}
