:root {
  --paper: #fff;
  --ink: #1b3029;
  --muted: #4b6057;
  --mint: #e9f3ee;
  --ivory: #f8f3e8;
  --slate: #eef2f5;
  --section-space: clamp(3.75rem, 7vw, 7rem);
  font-family: "Apple SD Gothic Neo", "맑은 고딕", "Malgun Gothic", "Noto Sans CJK KR", system-ui, sans-serif;
}

body {
  font-size: 1rem;
  line-height: 1.75;
}

h1, h2, h3 {
  letter-spacing: -.035em;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

h2, .story-step h3, .routine-panel h3 {
  line-height: 1.3;
}

.header {
  background: #fff;
}

.header nav, .header-link, .button {
  font-size: .9375rem;
}

.hero {
  background: var(--deep);
}

.hero h1 {
  font-size: clamp(2.5rem, 4.15vw, 4.5rem);
  line-height: 1.18;
}

.hero-screen, .floating-note {
  transform: none;
}

.hero-art {
  margin-top: 0;
}

.eyebrow, .hero .eyebrow {
  font-size: .875rem;
  line-height: 1.4;
  letter-spacing: .05em;
  margin-bottom: 1rem;
}

.hero-desc, .section-desc, .story-step > p:not(.chapter-label), .section-top > p,
.course-card p, .routine-panel p, .final-section .wrap > p:not(.login-note) {
  font-size: clamp(1rem, .9rem + .35vw, 1.125rem);
  line-height: 1.75;
}

.section-desc, .story-step > p:not(.chapter-label), .section-top > p,
.course-card p, .routine-panel p {
  color: var(--muted);
}

.bridge, .connection, .courses, .routine, .final-section {
  padding-block: var(--section-space);
}

.bridge, .connection {
  background: var(--paper);
}

.journey {
  background: var(--mint);
  padding-top: var(--section-space);
  border-block: 1px solid #cddfd4;
}

.journey-heading {
  gap: 1rem;
  border-bottom: 1px solid #bdcfc5;
  padding-bottom: 1.75rem;
}

.story-step + .story-step {
  border-top: 1px solid #bdcfc5;
}

.chapter-label {
  flex-wrap: wrap;
  gap: .5rem 1rem;
  margin-bottom: 1rem;
}

.chapter-label span, .flow-line span, .motion-toggle, .stage-controls button,
.stage-nav a, .course-card ul, .routine-panel span, .mobile-tools button {
  font-size: .875rem;
}

.chapter-label span, .stage-nav a:not([aria-current]), .course-card ul {
  color: var(--muted);
}

.stage-nav {
  flex-wrap: wrap;
}

.stage-nav a {
  line-height: 1.4;
}

.courses {
  background: var(--ivory);
  border-color: #e0d8c5;
}

.course-card {
  display: flex;
  flex-direction: column;
  border-color: #e0d8c5;
}

.course-card .image-open {
  margin-top: auto;
}

.routine {
  background: var(--slate);
}

.audience-tabs, .routine-panel > div {
  background: #fff;
  border: 1px solid #d4dfe6;
}

.routine-panel > div {
  padding: clamp(1.25rem, 2.5vw, 2rem);
  border-radius: .75rem;
}

.final-section {
  background: var(--deep);
}

@media (max-width: 760px) {
  .hero h1 {
    font-size: clamp(2rem, 7.5vw, 3.25rem);
  }

  .hero-actions .button, .final-actions .button {
    font-size: .875rem;
  }

  .flow-line {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr));
    gap: .5rem;
    text-align: left;
  }

  .flow-line li::before, .flow-line a::before {
    display: none;
  }

  .flow-line a {
    height: 100%;
    padding: .625rem .75rem;
    border: 1px solid var(--line);
    border-radius: .5rem;
    background: var(--mint);
  }

  .flow-line strong {
    font-size: .9375rem;
  }

  .flow-line span {
    margin-bottom: .125rem;
  }

  .story-step:first-child {
    border-top: 0;
  }

  .course-grid, .routine-panel {
    gap: 1rem;
  }
}

.hero-video-toggle {
  top: 3rem;
  bottom: auto;
}

/* Use the same company signature at both ends of the page. */
.brand {
  width: fit-content;
  gap: .7rem;
  letter-spacing: normal;
}

.company-logo {
  width: 4.4rem;
  height: auto;
  flex: none;
}

.company-name {
  font-size: clamp(1rem, 1.45vw, 1.375rem);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -.025em;
  color: #26332e;
  white-space: nowrap;
}

.footer {
  align-items: center;
}

.footer .brand + p {
  margin-top: .75rem;
}

/* Each explanation begins at the same level as its accompanying screen. */
.story-step, .story-step + .story-step {
  min-height: max(76svh, 38rem);
  justify-content: flex-start;
  padding: 0 0 clamp(2.5rem, 6vw, 5.5rem);
  border: 0;
}

.step-card {
  background: #fff;
  border: 1px solid #cadbd1;
  border-radius: 1rem;
  padding: clamp(1.25rem, 2.4vw, 2.25rem);
  color: var(--ink);
}

.step-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding-bottom: .9rem;
  margin-bottom: 1.35rem;
  border-bottom: 1px solid var(--line);
  color: #4e6359;
  font-size: .875rem;
}

.step-progress b, .chapter-label strong {
  color: var(--green);
}

.chapter-label {
  align-items: baseline;
  margin-bottom: .55rem;
  gap: .5rem .7rem;
  font-size: 1.0625rem;
}

.chapter-label span {
  border: 0;
  padding-left: 0;
  color: #53665c;
}

.step-card h3 {
  font-size: clamp(1.65rem, 2.45vw, 2.55rem);
  line-height: 1.32;
  margin-bottom: .85rem;
}

.step-card > p:not([class]) {
  color: #374a40;
  line-height: 1.75;
  font-size: 1.0625rem;
}

.step-card .learning-prompt {
  margin-top: 1.25rem;
  padding: 1rem 1.125rem;
  border: 0;
  border-left: 3px solid #34634e;
  border-radius: 0 .5rem .5rem 0;
  background: #f0f6f1;
  max-width: none;
}

.step-card .learning-prompt > span, .parent-note b {
  color: #335a47;
  font-size: .875rem;
  margin-bottom: .25rem;
}

.step-card .learning-prompt p, .step-card .parent-note {
  font-size: 1rem;
  line-height: 1.65;
  color: #45584d;
}

.step-card .parent-note {
  margin-top: 1.1rem;
}

.story-step .sentence-diagram > span {
  background: #f4f6f4;
}

.stage-sticky {
  padding-top: 0;
}

@media (min-width: 761px) {
  #stage-host {
    max-height: max(16rem, calc(100svh - var(--header) - 12rem));
  }
}

@media (max-width: 760px) {
  .brand { gap: .45rem; }
  .company-logo { width: 3.4rem; }
  .header { gap: .75rem; padding-inline: 1rem; }
  .header-link { font-size: .8125rem; white-space: nowrap; }
  .journey-heading { margin-bottom: 1.25rem; }
  .story-step, .story-step + .story-step { min-height: 0; padding-bottom: 2.5rem; }
  .step-card { padding: 1.125rem; }
  .step-card > p:not([class]) { font-size: 1rem; }
  .mobile-media { margin-top: .875rem; }
}

:root {
  --gold: #ffb338;
  --mint: #dfefe5;
  --ivory: #fae8cb;
  --slate: #e0ebe7;
}
.hero h1 em { color: #ffbb4e; }
.journey {
  --rail-height: 4.75rem;
  --rail-forest: #123c31;
}
.journey-heading { border-bottom: 0; padding-bottom: 0; margin-bottom: 2rem; }
.journey-rail {
  --position: 0;
  position: sticky;
  top: var(--header);
  z-index: 9;
  background: var(--rail-forest);
  box-shadow: 0 3px 10px #0c38241c;
}
.rail-route {
  position: relative;
  height: var(--rail-height);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: stretch;
  isolation: isolate;
  --node: 2rem;
  --node-top: .45rem;
}
.rail-path {
  position: absolute;
  inset-inline: 10%;
  top: calc(var(--node-top) + var(--node) / 2 - 1px);
  height: 2px;
  background: #638275;
}
.rail-path::after {
  content: '';
  display: block;
  height: 100%;
  background: var(--gold);
  transform-origin: left;
  transform: scaleX(calc(var(--position) / 4));
  transition: transform .38s ease-out;
}
.rail-cursor {
  position: absolute;
  left: 0;
  top: var(--node-top);
  width: 20%;
  height: var(--node);
  display: grid;
  place-items: center;
  transform: translateX(calc(var(--position) * 100%));
  transition: transform .38s cubic-bezier(.2,.8,.2,1);
  z-index: 1;
  pointer-events: none;
}
.rail-cursor::before {
  content: '';
  width: var(--node);
  height: var(--node);
  background: var(--gold);
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--rail-forest), 0 0 0 4px #eeb559;
}
.rail-route a {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: var(--node-top);
  gap: .2rem;
  color: #ecf4ef;
  font-size: .9375rem;
  line-height: 1.5;
  font-weight: 600;
}
.rail-route a:focus-visible { outline-offset: -3px; border-radius: .4rem; }
.rail-number {
  position: relative;
  display: grid;
  place-items: center;
  isolation: isolate;
  height: var(--node);
  width: var(--node);
  font-size: .875rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.rail-number::before {
  content: '';
  position: absolute;
  inset: .28rem;
  z-index: -1;
  border: 1px solid #90ada0;
  background: #234c40;
  border-radius: 50%;
}
.rail-route a[aria-current] { color: #ffc66a; font-weight: 800; }
.rail-route a[aria-current] .rail-number { z-index: 2; color: #182c21; }
.rail-route a[aria-current] .rail-number::before { opacity: 0; }
.rail-route a:hover > span:last-child { text-decoration: underline; text-underline-offset: .22em; }
.journey-grid { padding-top: clamp(1.25rem, 3vw, 2.5rem); }
.story-step, .story-step + .story-step {
  scroll-margin-top: calc(var(--header) + var(--rail-height) + 1rem);
}
html:has(.story-step:target) { scroll-padding-top: 0; }
.story-step {
  --step-ink: #19553d;
  --step-fill: #e1f2e6;
}
.story-step[data-step="word"] { --step-ink: #88500d; --step-fill: #fff0d2; }
.story-step[data-step="reading"] { --step-ink: #096462; --step-fill: #d9f1ea; }
.story-step[data-step="writing"] { --step-ink: #864128; --step-fill: #ffeadc; }
.story-step[data-step="speaking"] { --step-ink: #75384b; --step-fill: #f7e5ec; }
.step-card {
  border-top: .35rem solid var(--step-ink);
  transition: box-shadow .3s ease;
}
.story-step[data-current] .step-card { box-shadow: 0 6px 22px #1437291a; }
.chapter-label strong, .step-progress b, .step-card .learning-prompt > span { color: var(--step-ink); }
.step-card .learning-prompt { background: var(--step-fill); border-left-color: var(--step-ink); }
.course-card.newpre { border-top: .3rem solid #247157; }
.course-card.note { border-top: .3rem solid #b26919; }
.newpre .course-tag { color: #275e48; }
.note .course-tag { color: #874b0d; }
@media (min-width: 761px) {
  .stage-sticky { top: calc(var(--header) + var(--rail-height) + 1rem); }
  #stage-host { max-height: max(12rem, calc(100svh - var(--header) - var(--rail-height) - 9.5rem)); }
}
@media (max-width: 760px) {
  .journey { --rail-height: 4.25rem; }
  .rail-route { --node: 1.8rem; width: calc(100% - 1rem); }
  .rail-route a { font-size: .875rem; }
  .journey-heading { margin-bottom: 1.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  .rail-cursor, .rail-path::after, .step-card { transition: none; }
}
