:root {
  color-scheme: light;
  --paper: #f6f8fb;
  --white: #fff;
  --ink: #192436;
  --muted: #475467;
  --rule: #d7e0eb;
  --accent: #214f98;
  --accent-deep: #193c74;
  --accent-wash: #eaf1fc;
  --blue-wash: #eef3f9;
  --dark: #1b2a42;
  --body: system-ui, -apple-system, "Hiragino Sans", "Yu Gothic UI", Meiryo, sans-serif;
  --editorial: var(--body);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.75;
}

h1, h2, h3, p, figure, dl, dd { margin: 0; }
h1, h2 { font-family: var(--editorial); line-height: 1.34; font-weight: 750; }
h2 { font-size: clamp(2rem, 3.6vw, 3.25rem); }
h3 { font-size: clamp(1.125rem, 1.9vw, 1.4rem); line-height: 1.5; }
a { color: inherit; }
img { display: block; width: 100%; height: auto; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
:target { scroll-margin-top: 18px; }

.wrap { width: min(100% - 88px, 1240px); margin-inline: auto; }
.section { padding-block: clamp(58px, 7.2vw, 108px); }

.skip-link {
  position: absolute;
  z-index: 2;
  inset: 10px auto auto 10px;
  padding: 8px 12px;
  translate: 0 -160%;
  background: var(--white);
}
.skip-link:focus { translate: 0; }

.site-header { background: var(--paper); }
.header-inner, .footer-inner {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: system-ui, sans-serif;
  font-size: 1.44rem;
  font-weight: 750;
  letter-spacing: -.045em;
  text-decoration: none;
  white-space: nowrap;
}
.brand img { width: 38px; height: 38px; }
.header-nav { display: flex; align-items: center; gap: clamp(20px, 3.6vw, 52px); }
.header-nav a {
  padding-block: 12px;
  font-size: .88rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.header-nav a:hover { text-decoration: underline; text-underline-offset: .35em; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: fit-content;
  min-height: 56px;
  padding: 12px 21px;
  border: 1px solid var(--accent);
  border-radius: 3px;
  color: var(--white);
  background: var(--accent);
  font-weight: 750;
  font-size: 1rem;
  line-height: 1.4;
  text-decoration: none;
}
.button:hover { border-color: var(--accent-deep); background: var(--accent-deep); }
.button-small { min-height: 42px; padding: 7px 13px; gap: 14px; font-size: .85rem; }
.button-outline { color: var(--accent); background: transparent; }
.button-outline:hover { color: var(--white); }
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  min-height: 44px;
  font-size: .9rem;
  font-weight: 750;
  text-underline-offset: .33em;
  text-decoration-thickness: 1px;
}
.text-link:hover { color: var(--accent); }

.hero { padding-block: clamp(36px, 4.7vw, 68px) clamp(36px, 4.3vw, 62px); }
.hero-inner {
  display: grid;
  grid-template-areas: "copy visual" "actions visual";
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 24px clamp(24px, 4.5vw, 68px);
}
.hero-copy { grid-area: copy; align-self: end; }
.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--accent);
  font-size: .875rem;
  font-weight: 800;
  line-height: 1.5;
}
.eyebrow > span { display: block; width: 21px; height: 2px; flex: 0 0 auto; background: currentColor; }
.hero h1 {
  margin-block: 17px 22px;
  font-size: clamp(2rem, 4.1vw, 3.3rem);
  letter-spacing: -.04em;
}
.hero h1 span { display: block; }
.hero h1 .hero-promise {
  margin-bottom: .3em;
  color: var(--accent-deep);
  font-size: .68em;
  letter-spacing: -.04em;
}
.hero-summary { max-width: 34em; color: var(--muted); line-height: 1.9; }
.hero-actions {
  grid-area: actions;
  align-self: start;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}
.hero-actions .button { gap: 12px; }
.hero-action-label > span { display: block; margin-bottom: 2px; font-size: .75rem; font-weight: 650; }
.hero-visual { grid-area: visual; }
.hero-student {
  aspect-ratio: 1.95;
  object-fit: cover;
  object-position: 56% center;
  background: #e8eef5;
}
.hero-conversation {
  position: relative;
  display: block;
  width: min(100% - 20px, 416px);
  margin: -32px 20px 0 auto;
  border: 1px solid var(--rule);
  background: var(--white);
  text-decoration: none;
}
.hero-conversation-label {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0 8px;
  padding: 7px 10px;
  border-bottom: 1px solid var(--rule);
  font-size: .8rem;
  font-weight: 750;
}
.hero-conversation-label > span:last-child {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: .25em;
}
.hero-conversation:hover .hero-conversation-label > span:last-child { color: var(--accent-deep); }
.hero-conversation-crop {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 414 / 239;
  background: var(--white);
}
.hero-conversation-crop img {
  /* Show the question and reply from (861, 222) of the 1275px-wide capture. */
  position: absolute;
  width: calc(100% * 1275 / 414);
  max-width: none;
  inset: calc(-100% * 222 / 239) auto auto calc(-100% * 861 / 414);
}
figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: .75rem;
  text-align: right;
}

.trial-lesson { background: var(--blue-wash); }
.lesson-intro { max-width: 59rem; margin-inline: auto; }
.lesson-intro h2, .section-heading h2 { margin-top: 10px; }
.lesson-intro > p:last-child { margin-top: 10px; color: var(--muted); }
.lesson-demo {
  display: grid;
  grid-template-columns: 1.18fr 1fr;
  max-width: 59rem;
  margin: 28px auto 0;
  border: 1px solid var(--rule);
  background: var(--paper);
}
.demo-exercise, .demo-tutor { min-width: 0; padding: clamp(20px, 3.1vw, 42px); }
.demo-translation { margin-top: 5px; color: var(--muted); font-size: .88rem; }
.demo-question {
  margin-block: 17px;
  font: 600 clamp(1.13rem, 2.55vw, 2rem)/1.5 var(--body);
}
.demo-blank-group { white-space: nowrap; }
.demo-blank {
  display: inline-block;
  min-width: 2.8em;
  padding-inline: .15em;
  border-bottom: 1px solid var(--accent);
  color: var(--accent);
  text-align: center;
}
.demo-options, .demo-help { display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px; }
.demo-options button, .demo-help button {
  min-height: 44px;
  padding: 6px 12px;
  border: 1px solid #8e9caf;
  border-radius: 3px;
  color: var(--ink);
  background: var(--white);
  font-size: .88rem;
  font-weight: 700;
  cursor: pointer;
}
.demo-options button { min-width: 77px; font-family: system-ui, sans-serif; }
.demo-options button:hover, .demo-help button:hover { border-color: var(--accent); }
.demo-options button[aria-pressed="true"], .demo-help button[aria-pressed="true"] {
  border-color: var(--accent);
  color: var(--accent-deep);
  background: var(--accent-wash);
}
.demo-feedback { min-height: 3em; margin-top: 9px; font-size: .85rem; }
.demo-feedback[data-result="retry"] { color: var(--accent-deep); }
.demo-feedback[data-result="correct"] { color: #28543b; font-weight: 700; }
.demo-tutor { border-left: 1px solid var(--rule); background: var(--blue-wash); }
.tutor-heading { display: flex; align-items: center; gap: 10px; }
.tutor-heading img { width: 44px; height: 44px; object-fit: cover; object-position: center 25%; border-radius: 50%; background: var(--white); }
.tutor-heading h3 { font-size: .82rem; line-height: 1.25; }
.tutor-heading h3 span { display: block; margin-top: 4px; font-size: 1.06rem; }
.demo-reply { min-height: 3.6em; margin-block: 14px; font-size: .94rem; }
.demo-caption { max-width: 59rem; margin: 10px auto 0; color: var(--muted); font-size: .78rem; }

.support { padding-block: clamp(52px, 5vw, 78px); background: var(--white); }
.support-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  align-items: end;
  gap: 22px clamp(26px, 5vw, 72px);
  margin-bottom: clamp(22px, 3.5vw, 45px);
}
.support-kicker { color: var(--accent-deep); font-size: .88rem; font-weight: 750; }
.support-heading h2 { margin-top: 9px; font-size: clamp(1.8rem, 3.3vw, 2.95rem); }
.support-heading > p { color: var(--muted); }
.support-diagram { max-width: 1120px; margin-inline: auto; }
.support-next {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 24px;
  max-width: 1120px;
  margin: 16px auto 0;
  color: var(--muted);
  font-size: .94rem;
}
.support-next .text-link { color: var(--accent-deep); }

.future {
  padding-block: clamp(38px, 5.5vw, 80px);
  background: var(--paper);
}

.future-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 34px clamp(26px, 4vw, 58px);
  margin-top: clamp(22px, 3vw, 38px);
}

.future-feature { display: flex; flex-direction: column; gap: 8px; }
.future-status { color: var(--accent-deep); font-weight: 800; font-size: .85rem; }
.future-feature > p:not(.future-status) { color: var(--muted); font-size: .95rem; }
.future-feature figure { padding-top: 8px; }
.future-feature .preview-image > span { color: var(--accent-deep); }
.future-feature .preview-image:hover > span { text-decoration: underline; }
.future-feature figcaption { margin-top: 4px; color: var(--muted); font-size: .8rem; }

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, .8fr);
  align-items: end;
  gap: 14px 32px;
  margin-bottom: 32px;
}
.section-heading > p { max-width: 35em; color: var(--muted); }
.preview {
  padding: 0 clamp(16px, 2.8vw, 40px) clamp(16px, 2.8vw, 40px);
  border: 1px solid var(--rule);
  background: var(--white);
}
.preview-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid var(--rule);
}
.preview-tabs button {
  min-height: 50px;
  padding: 8px 4px;
  border: 0;
  border-bottom: 3px solid transparent;
  color: var(--muted);
  background: transparent;
  font-size: clamp(.76rem, 1.45vw, 1rem);
  font-weight: 750;
  line-height: 1.45;
  cursor: pointer;
}
.preview-tabs button[aria-selected="true"] { border-bottom-color: var(--accent); color: var(--accent); }
.preview-tabs button:hover { color: var(--accent); }
.preview-panel {
  display: grid;
  grid-template-columns: minmax(175px, .65fr) minmax(0, 1.65fr);
  gap: clamp(16px, 3.3vw, 46px);
  align-items: center;
  padding-top: 30px;
}
.preview-panel + .preview-panel:not([hidden]) { margin-top: 20px; border-top: 1px solid var(--rule); }
.preview-copy p { margin-top: 9px; color: var(--muted); font-size: .94rem; }
.preview-image { display: block; min-width: 0; text-decoration: none; }
.preview-image:hover { color: var(--accent); }
.preview-image img { border: 1px solid var(--rule); }
.preview-image > span {
  display: block;
  margin-top: 8px;
  font-size: .86rem;
  font-weight: 750;
  text-underline-offset: .32em;
  text-decoration: underline;
  text-align: right;
}
.screen-note { margin-top: 10px; color: var(--muted); font-size: .78rem; }

.plans { background: var(--blue-wash); }
.plans-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px clamp(20px, 3.3vw, 44px);
}
.plan {
  padding: clamp(20px, 3vw, 35px);
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--white);
}
.plan h3 { margin-top: 4px; }
.plan-frequency { margin-block: 14px 16px; color: var(--accent-deep); font-size: 2rem; font-weight: 750; line-height: 1.25; }
.plan-frequency span { font-size: 1.1rem; }
.plan dl { display: grid; gap: 12px; }
.plan dl div { display: grid; grid-template-columns: 3em minmax(0, 1fr); gap: 12px; }
.plan dt { font-weight: 750; }
.plan dd { color: var(--muted); font-size: .94rem; }

.faq-inner {
  display: grid;
  grid-template-columns: .65fr 1.35fr;
  align-items: start;
  gap: 24px 66px;
}
.faq-list { border-top: 1px solid var(--rule); }
.faq-list details { border-bottom: 1px solid var(--rule); }
.faq-list summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding-block: 15px;
  font-size: .98rem;
  font-weight: 750;
  cursor: pointer;
}
.faq-list summary::marker { content: ""; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { padding-inline: 6px; color: var(--accent); content: "+" / ""; }
.faq-list details[open] summary::after { content: "−" / ""; }
.faq-list details p { padding-inline-end: 22px; padding-bottom: 16px; color: var(--muted); font-size: .9rem; }
.evidence-links { display: flex; flex-wrap: wrap; gap: 6px 14px; text-underline-offset: .28em; }

.trial { padding-block: clamp(42px, 6vw, 80px); background: var(--dark); color: var(--white); }
.trial-inner { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px clamp(28px, 5vw, 72px); }
.audience-option { display: flex; flex-direction: column; align-items: flex-start; }
.audience-option h2 { font-size: clamp(1.75rem, 3vw, 2.6rem); }
.audience-option p { flex: 1; max-width: 33em; margin-block: 10px 18px; color: #d9e4f4; }
.audience-option:focus-visible { outline-color: #d5e5fd; }
.contact-address { margin-top: 24px; color: #d9e4f4; font-size: .88rem; }
.button-light { background: var(--white); color: var(--dark); border-color: var(--white); }
.button-light:hover { border-color: var(--accent-wash); background: var(--accent-wash); }
.button-light:focus-visible { outline-color: var(--white); }
.footer-inner { min-height: 88px; }
.footer-inner p { color: var(--muted); font-size: .84rem; }

.preview-dialog {
  width: min(calc(100% - 26px), 1200px);
  max-height: calc(100% - 26px);
  padding: clamp(12px, 2vw, 24px);
  border: 1px solid var(--rule);
  color: var(--ink);
  background: var(--white);
}
.preview-dialog::backdrop { background: rgb(23 25 24 / .74); }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.dialog-heading h2 { font: 750 1.1rem/1.35 var(--body); }
.dialog-heading button {
  min-height: 44px;
  padding: 5px 9px;
  border: 1px solid var(--rule);
  border-radius: 3px;
  background: var(--paper);
  color: var(--ink);
  font-size: .85rem;
  white-space: nowrap;
  cursor: pointer;
}
.dialog-image-viewport img { max-height: calc(100dvh - 115px); object-fit: contain; border: 1px solid var(--rule); }
.dialog-scroll-hint { display: none; }

@media (max-width: 1050px) {
  .wrap { width: min(100% - 56px, 1240px); }
  .hero h1 { font-size: clamp(1.95rem, 4.05vw, 3.4rem); }
}

@media (max-width: 760px) {
  .wrap { width: min(100% - 40px, 1240px); }
  .header-inner { min-height: 60px; }
  .header-nav { display: none; }
  .hero-inner, .section-heading, .support-heading, .plans-grid, .faq-inner { grid-template-columns: minmax(0, 1fr); }
  .hero { padding-block: 22px 30px; }
  .hero-inner { grid-template-areas: "copy" "actions" "visual"; gap: 14px; }
  .hero h1 { margin-block: 8px; font-size: clamp(1.8rem, 7.75vw, 3.35rem); }
  .hero-summary { font-size: .9rem; line-height: 1.6; }
  .hero-visual { max-width: 520px; }
  .hero-student { aspect-ratio: 2.3; }
  .hero-conversation { width: 100%; margin: 0; }
  .hero-visual figcaption { margin-top: 4px; }
  .future-grid { grid-template-columns: minmax(0, 1fr); }
  .support-diagram { max-width: 440px; }
  .preview-dialog[data-pan-preview] .dialog-scroll-hint {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: .8rem;
  }
  .preview-dialog[data-pan-preview] .dialog-image-viewport { overflow: auto; }
  .preview-dialog[data-pan-preview] .dialog-image-viewport img { width: max(100%, 520px); max-height: none; }
  .section-heading { margin-bottom: 19px; }
  .preview-panel { grid-template-columns: minmax(0, 1fr); gap: 14px; padding-top: 17px; }
  .faq-inner { gap: 17px; }
}

@media (max-width: 540px) {
  .wrap { width: calc(100% - 36px); }
  .button { min-height: 48px; padding-inline: 15px; }
  .button-small { min-height: 44px; padding-inline: 9px; gap: 9px; }
  .hero-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .hero-actions .button { width: 100%; gap: 6px; padding-inline: 10px; font-size: .9rem; }
  .brand { font-size: 1.27rem; gap: 7px; }
  .brand img { width: 32px; height: 32px; }
  .lesson-demo { grid-template-columns: minmax(0, 1fr); margin-top: 20px; }
  .demo-tutor { border-left: 0; border-top: 1px solid var(--rule); }
  .demo-feedback { min-height: 1.6em; }
  .demo-reply { min-height: 0; }
  .trial-inner { grid-template-columns: minmax(0, 1fr); }
  .footer-inner { min-height: 68px; flex-wrap: wrap; gap: 0 12px; padding-block: 10px; }
}

@media (max-width: 360px) {
  .hero { padding-top: 16px; }
  .hero-inner { gap: 10px; }
  .hero-student { aspect-ratio: 2.65; }
  .hero-conversation-label { padding-block: 5px; }
}
