/* English programs site (name pending: see brand.json), in the class's own look. Shared by every
   page; a page's own rules go in assets/css/<page>.css (README, "Page stylesheets").
   The site looks like the class does: the class illustration (a calm clinic corridor, flat shapes,
   teal and cream) is the home's first screen; every section opens like a class slide (the
   sliced-bubble mark, a mono label, a hairline, the slide count "02 / 05", whose total build.py
   writes into <main> as --secs); the cards are the deck's cards (white for staff, soft teal for
   patients); a run of steps is set like the deck's run of show (.sec-teal, .run).
   Brand kit: ink #13242A, teal #0D6B70, soft teal #DAECEA, ground #ECF2F1, muted #56686D, coral
   #E0613E (wrong answers only), the corridor's cream #F7F2E8. Pretendard and IBM Plex Mono.
   Mobile first; 600 px: the corridor whole; 1100 px and landscape: the corridor fills the first
   screen with the line in its ceiling (proved at every desk window by tools/hero_check.py).
   Motion: the window light on the corridor floor drifts (transform and opacity, 46 to 61 s, paused by
   a button, still under reduced motion). Everything else moves only when tapped. */

@font-face {
  font-family: "SL Fallback";
  src: local("Malgun Gothic"), local("MalgunGothic"), local("Apple SD Gothic Neo");
  size-adjust: 96%;
}

:root {
  --ground: #ECF2F1;
  --cream: #F7F2E8;
  --soft: #DAECEA;
  --paper: #FFFFFF;
  --foot: #E1EAE8;
  --ink: #13242A;
  --text: #26383D;
  --body2: #3A4C51;
  --muted: #56686D;
  --rule: #CFDCDA;
  --rule-soft: #DDE7E5;
  --rule-strong: #B4C7C4;
  --field-line: #7F9195;
  --teal: #0D6B70;
  --teal-down: #0A585C;
  --teal-wash: #E3F1EF;
  --on-teal: #CFE7E5;
  --coral: #E0613E;
  --coral-ink: #B23F22;
  --coral-wash: #FCEDE8;
  --shadow-paper: 0 1px 2px rgba(19, 36, 42, 0.08), 0 24px 48px -28px rgba(19, 36, 42, 0.38);
  --font: "SL Sans", "SL Fallback", "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif;
  --mono: "SL Mono", "SL Sans", "SL Fallback", ui-monospace, "SF Mono", Menlo, Consolas, monospace; /* Hangul in a label falls to SL Sans */
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; color-scheme: light; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.8;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html[lang="en"] body { line-height: 1.65; word-break: normal; }
[lang="en"] { word-break: normal; }
[lang="ko"] { word-break: keep-all; }

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
p, li, dd, figcaption { text-wrap: pretty; }
.lede, .sec-lede, .card-line { text-wrap: balance; }
ul, ol { list-style: none; padding: 0; }
img { display: block; max-width: 100%; height: auto; }
picture { display: block; }
button, input, textarea, select { font: inherit; color: inherit; }
strong { font-weight: 800; }
.nw { white-space: nowrap; }
/* A name kept on one line from 600 px; on phones it is wider than the column and may break */
@media (min-width: 600px) { .nw-d { white-space: nowrap; } }

a { color: var(--ink); }
a:hover { color: var(--teal-down); }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.wrap { max-width: 1248px; margin: 0 auto; padding: 0 24px; }

/* Buttons and links */
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  background: var(--teal);
  color: #FFFFFF;
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.cta:hover { background: var(--teal-down); color: #FFFFFF; }
.cta-lg { min-height: 54px; padding: 0 28px; font-size: 16.5px; }

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid var(--field-line);
  border-radius: 999px;
  background: transparent;
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
}
.pill:hover { background: var(--paper); color: var(--ink); }
.pill svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pill-lg { min-height: 54px; padding: 0 26px; font-size: 16.5px; background: rgba(255, 255, 255, 0.55); }
.pill-sm { min-height: 44px; padding: 0 16px 0 20px; font-size: 15px; }
.pill-dark { border-color: var(--ink); }

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--rule-strong);
  text-underline-offset: 6px;
}
/* A link to another page under a section's text or at the end of a section */
.sec-link { margin-top: 18px; }

.panel { border-radius: 22px; padding: 32px 22px; background: var(--paper); }

/* Labels, as on the class slides: IBM Plex Mono, spaced capitals, teal */
.tag {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
}
/* Hangul in a label: the page face (the mono font's wide space would gap the words) */
.tag[lang="ko"], html[lang="ko"] .card-front .card-tag, html[lang="ko"] .ways dt, html[lang="ko"] .run-time { font-family: var(--font); letter-spacing: 0.04em; font-weight: 600; font-variant-numeric: tabular-nums; }
.mark { flex: 0 0 auto; fill: var(--teal); }

/* 1. Header. On the home page it lies on the corridor's ceiling. */
.site-head { position: relative; z-index: 4; background: var(--ground); }
.home .site-head { position: absolute; top: 0; left: 0; right: 0; background: transparent; }
.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 5;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: #FFFFFF;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}
.skip:focus { left: 16px; color: #FFFFFF; }

.head-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 10px;
  min-height: 76px;
  padding: 12px 0;
}
/* The real lockup (outlines from the brand kit) and, under it on phones, the working-name note */
.brand {
  justify-self: start;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 5px;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
}
.lockup { display: block; height: 22px; width: auto; aspect-ratio: 722.68 / 102; }
.brand-note {
  padding: 2px 8px;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--muted);
  white-space: nowrap;
}
.nav { display: none; }
.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 2px;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}
.nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--teal); text-decoration-thickness: 2px; text-underline-offset: 8px; }
.head-tools { display: flex; align-items: center; gap: 8px; }
.lang { display: flex; align-items: center; gap: 6px; font-size: 14.5px; }
.lang a, .lang-now { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; }
.lang a { min-width: 44px; padding: 0 4px; margin: 0 -4px; color: var(--muted); text-decoration: none; }
.lang-now { min-width: 26px; color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 5px; }
.lang-sep { color: #9AABA8; }
.menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--field-line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.menu-btn svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }

@media (max-width: 720px) {
  .nav.is-open {
    grid-column: 1 / -1;
    grid-row: 2;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    margin-top: 8px;
    padding: 6px 18px;
    border-radius: 18px;
    background: var(--paper);
    box-shadow: var(--shadow-paper);
  }
}
/* No JavaScript: the menu button cannot open anything, so it goes and the links stand under the
   name, wrapped. With JavaScript on (html.js) none of this applies. */
html:not(.js) .menu-btn { display: none; }
@media (max-width: 720px) {
  html:not(.js) .nav { grid-column: 1 / -1; grid-row: 2; display: flex; flex-wrap: wrap; gap: 0 18px; margin-top: 2px; }
}
/* On the home page the header lies over the first screen: there the wrapped links (one row in Korean,
   two in English, ending at 107 and 151 px) need the headline moved down to clear them. */
@media (max-width: 599px) {
  html:not(.js) .hero-text { padding-top: 124px; }
  html[lang="en"]:not(.js) .hero-text { padding-top: 168px; }
}

/* 2. First screen: the corridor. Phones: the line on the ceiling's cream, then the corridor cut
   around the figure. 600 px: the whole corridor under the line. 1100 px and landscape: the corridor
   fills the screen and the line sits in its ceiling, above the far end of the corridor. */
.hero { position: relative; overflow: hidden; display: flex; flex-direction: column; background: var(--cream); }
.hero-text { order: 1; position: relative; z-index: 2; padding: 112px 24px 0; }
.hero-art { order: 2; position: relative; z-index: 1; margin-top: -84px; aspect-ratio: 900 / 1536; }
.hero-art picture, .hero-art img { width: 100%; height: 100%; }
.hero-foot { order: 3; }

.hero h1 {
  font-size: clamp(29px, 8vw, 40px);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.035em;
  color: var(--ink);
}
html[lang="en"] .hero h1 { line-height: 1.16; letter-spacing: -0.03em; }
/* Phones: the English line is too long to break by hand; let it balance itself */
@media (max-width: 599px) { html[lang="en"] .hero h1 br { display: none; } }
.lede { margin-top: 16px; max-width: 34em; font-size: 17px; line-height: 1.75; color: var(--body2); }
.hero-actions { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 10px 12px; }

/* The window light: three soft patches on the floor, placed in the whole picture's coordinates
   (on phones the box reaches past the cut so the patches stay on the same floor tiles). */
.hero-light { position: absolute; top: 0; height: 100%; left: -52.22%; width: 305.78%; overflow: hidden; pointer-events: none; }
.hero-light span {
  position: absolute;
  display: block;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 249, 232, 1), rgba(255, 249, 232, 0.55) 55%, rgba(255, 249, 232, 0));
  opacity: 0.6;
  will-change: transform, opacity;
  animation: light-drift 52s ease-in-out infinite alternate;
}
.hero-light span:nth-child(1) { left: 41%; top: 77%; width: 24%; height: 5%; animation-duration: 46s; animation-delay: -14s; }
.hero-light span:nth-child(2) { left: 47%; top: 84.5%; width: 32%; height: 6%; animation-duration: 53s; animation-delay: -31s; }
.hero-light span:nth-child(3) { left: 44%; top: 92%; width: 42%; height: 6.5%; animation-duration: 61s; animation-delay: -6s; }
@keyframes light-drift {
  from { transform: translateX(-7%); opacity: 0.25; }
  to { transform: translateX(8%); opacity: 1; }
}
.hero.is-still .hero-light span, html:not(.js) .hero-light span { animation-play-state: paused; }

/* The art note and the pause button: under the picture (on phones and tablets the figure reaches the
   picture's foot, so no words sit on it); on wide screens at the bottom right, over the floor. */
.hero-foot {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 16px 16px;
  background: var(--cream);
}
.hero-link { margin-left: 6px; }
.hero-note { font-size: 12.5px; line-height: 1.5; color: #4C5E62; }
.motion-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px 0 14px;
  border: 1px solid rgba(19, 36, 42, 0.16);
  border-radius: 999px;
  background: rgba(247, 242, 232, 0.86);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}
.motion-btn svg path { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.motion-btn .i-play { display: none; }
.motion-btn[aria-pressed="true"] .i-pause { display: none; }
.motion-btn[aria-pressed="true"] .i-play { display: inline; }
html:not(.js) .motion-btn { display: none; }

/* Sections open like a class slide: mark, label, hairline, and the count on the right. */
main { counter-reset: sec; }
.sec { counter-increment: sec; padding-top: 88px; }
.sec-last { padding-bottom: 96px; }
.kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
}
.kicker .mark { width: 16px; height: 16px; }
.kicker::after { content: counter(sec, decimal-leading-zero) " / " var(--secs, "01"); margin-left: auto; letter-spacing: 0.12em; color: var(--muted); }
.h2 {
  margin-top: 26px;
  max-width: 22em;
  font-size: clamp(29px, 3.3vw, 46px);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.035em;
  color: var(--ink);
}
html[lang="en"] .h2 { line-height: 1.2; letter-spacing: -0.03em; }
.sec-lede { margin-top: 16px; max-width: 40em; font-size: 17.5px; line-height: 1.8; color: var(--body2); }

/* 3. Who it's for: clinic teams first, said plainly; adults; schools and academies */
.strands { margin-top: 40px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.strand { min-width: 0; padding: 28px 24px 30px; border: 1px solid var(--rule-soft); border-radius: 22px; background: var(--paper); }
.strand h3 { margin-top: 10px; font-size: 24px; font-weight: 800; line-height: 1.35; letter-spacing: -0.025em; color: var(--ink); }
.strand p { margin-top: 10px; font-size: 17px; line-height: 1.75; color: var(--body2); }
html[lang="en"] .strand p { line-height: 1.65; }
.strand-clinic { border: 0; background: var(--teal); color: #FFFFFF; }
.strand-clinic .tag { color: var(--on-teal); }
.strand-clinic h3 { font-size: clamp(28px, 3vw, 36px); color: #FFFFFF; }
.strand-clinic p { color: rgba(255, 255, 255, 0.88); }
.strand-clinic .scenes-lead { margin-top: 24px; font-weight: 600; color: #FFFFFF; }
.chips { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 5px 14px; border: 1px solid rgba(255, 255, 255, 0.36); border-radius: 999px; font-size: 15px; line-height: 1.5; color: #FFFFFF; }
.text-link-light { margin-top: 18px; color: #FFFFFF; text-decoration-color: rgba(255, 255, 255, 0.5); }
.text-link-light:hover { color: #FFFFFF; text-decoration-color: #FFFFFF; }
.board { margin-top: 22px; }
.board img { width: 100%; border-radius: 14px; }
.board figcaption { margin-top: 8px; font-size: 14px; line-height: 1.6; color: var(--muted); }

/* 4. The material, each piece on a soft teal desk with a slide label under it */
.mats { margin-top: 44px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 44px 24px; }
.mat { min-width: 0; display: flex; flex-direction: column; }
.desk {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 28px 20px;
  border-radius: 24px;
  background: var(--soft);
}
/* A picture on a desk takes the desk's width, so its image's own width (a share of the desk, capped) holds
   before the file arrives: a lazy picture keeps its height and nothing under it moves when it loads. */
.desk > picture { display: flex; justify-content: center; width: 100%; }
.mat figcaption, .mat-cap { margin-top: 14px; font-size: 15.5px; line-height: 1.7; color: var(--body2); }
.mat figcaption .tag, .mat-cap .tag { display: block; margin-bottom: 2px; }
.tablet { width: 100%; padding: 9px; border-radius: 22px; background: var(--ink); box-shadow: var(--shadow-paper); }
.tablet img { width: 100%; border-radius: 13px; }
.paper { width: 100%; max-width: 380px; border-radius: 3px; background: var(--paper); box-shadow: var(--shadow-paper); }
.book { width: 64%; max-width: 250px; border-radius: 2px 8px 8px 2px; background: var(--paper); box-shadow: var(--shadow-paper); }
.book-page { width: 100%; max-width: 330px; border-radius: 3px; background: var(--paper); box-shadow: var(--shadow-paper); }

/* The phrase card turns only when tapped (site.js sets data-turned). Without JS both sides show. */
.phrase { width: 100%; max-width: 400px; }
.card {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 22px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  perspective: 1400px;
  -webkit-tap-highlight-color: transparent;
}
.card:focus-visible { outline-offset: 5px; }
.card-face {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 22px 26px;
  border-radius: 22px;
}
.card-front { border: 1px solid var(--rule-soft); background: var(--paper); box-shadow: var(--shadow-paper); }
.card-back { margin-top: 12px; background: var(--teal); color: #FFFFFF; }
.card-tag {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
}
.card-back .card-tag { color: var(--on-teal); }
.card-line { font-size: clamp(26px, 7vw, 32px); font-weight: 800; line-height: 1.3; letter-spacing: -0.03em; color: var(--ink); }
.card-back .card-line { color: #FFFFFF; letter-spacing: -0.02em; line-height: 1.2; }

/* Both faces share one grid cell, so the card is as tall as its taller face: 4:3 is only the
   minimum, and large phone text or zoom never spills out. */
.js .card-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  aspect-ratio: 4 / 3;
  transform-style: preserve-3d;
  transition: transform 420ms cubic-bezier(0.22, 0.61, 0.36, 1);
}
.js .card-face {
  grid-area: 1 / 1;
  min-width: 0;
  margin: 0;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
.js .card-back { transform: rotateY(180deg); }
.js .card[data-turned="true"] .card-inner { transform: rotateY(180deg); }

.phrase-bar { margin-top: 14px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.card-hint { font-size: 15px; line-height: 1.6; color: var(--body2); }
.phrase-next { display: none; background: rgba(255, 255, 255, 0.6); }
.js .phrase-next { display: inline-flex; }
html:not(.js) .card-hint { display: none; }

/* Homework on a phone: the class app's own look (teal head, five dots, answers marked on tap) */
.hw-frame { width: 100%; max-width: 340px; padding: 9px; border-radius: 40px; background: var(--ink); box-shadow: var(--shadow-paper); }
.hw {
  min-height: 500px;
  padding: 0 20px 24px;
  overflow: hidden;
  border-radius: 32px;
  background: var(--paper);
  display: flex;
  flex-direction: column;
}
.hw-head {
  margin: 0 -20px;
  padding: 18px 20px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: var(--teal);
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: #FFFFFF;
}
.hw-dots { display: flex; gap: 6px; }
.hw-dots span { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, 0.32); }
.hw-dots span.is-done { background: var(--on-teal); }
.hw-dots span.is-now { background: #FFFFFF; }
.hw-items { margin-top: 20px; }
.hw-tag { margin-bottom: 12px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.hw-said { margin-bottom: 10px; font-size: 17px; line-height: 1.5; color: var(--body2); }
.hw-who { display: inline-block; min-width: 3.2em; margin-right: 4px; font-size: 14px; font-weight: 600; color: var(--muted); }
.hw-q { font-size: clamp(23px, 6vw, 26px); font-weight: 600; line-height: 1.4; letter-spacing: -0.015em; color: var(--ink); }
.hw-blank { display: inline-block; min-width: 3.4em; border-bottom: 2px solid var(--ink); line-height: 1.1; text-align: center; color: var(--teal); }
.hw-choices { margin-top: 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hw-choices-3 { grid-template-columns: 1fr 1fr 1fr; }
.hw-choices-lines { grid-template-columns: minmax(0, 1fr); }
.hw-choices button {
  min-height: 52px;
  padding: 0 12px;
  border: 1.5px solid var(--field-line);
  border-radius: 14px;
  background: var(--paper);
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}
.hw-choices-lines button { min-height: 48px; padding: 0 16px; text-align: left; }
.hw-choices button:hover:not(:disabled) { background: var(--ground); }
.hw-choices button:disabled { cursor: default; }
.hw-choices button.is-right { border-color: var(--teal); background: var(--teal-wash); color: var(--teal-down); }
.hw-choices button.is-wrong { border-color: var(--coral); background: var(--coral-wash); color: var(--coral-ink); text-decoration: line-through; }
.hw-choices button.is-dim { color: var(--muted); border-color: var(--rule); }
.hw-ko { display: block; margin-top: 4px; color: var(--muted); }
.hw-mark { margin-top: 16px; font-size: 17px; font-weight: 800; line-height: 1.5; color: var(--ink); }
.hw-mark:empty { margin: 0; }
.hw-mark.is-ok { color: var(--teal-down); }
.hw-mark.is-no { color: var(--coral-ink); }
/* after the verdict, as the class app shows it: the completed sentence, labelled when the choice was wrong */
.hw-ans { display: block; margin-top: 4px; font-size: 17px; font-weight: 600; line-height: 1.5; color: var(--ink); }
.hw-ans-k { display: inline-block; margin-right: 8px; padding: 1px 8px; border-radius: 6px; background: var(--ground); font-size: 14px; font-weight: 700; line-height: 1.5; color: var(--muted); vertical-align: 1px; }
.hw-bar { margin-top: auto; padding-top: 18px; }
.hw-done { padding-top: 18px; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.hw-done[hidden], .hw-item[hidden], [data-hw-next][hidden] { display: none; }
.hw-done p { font-size: 16px; line-height: 1.7; color: var(--ink); }
.hw-nojs { margin-top: 18px; font-size: 14px; color: var(--muted); }
.js .hw-nojs { display: none; }

/* 5. How a clinic course runs: a teal band, set like the deck's run of show */
.sec-teal { margin-top: 112px; padding-bottom: 96px; background: var(--teal); color: #FFFFFF; }
.sec-teal .kicker { color: var(--on-teal); border-color: rgba(255, 255, 255, 0.24); }
.sec-teal .kicker::after { color: rgba(255, 255, 255, 0.66); }
.sec-teal .kicker .mark { fill: var(--on-teal); }
.sec-teal .h2 { color: #FFFFFF; }
.owner-line { margin-top: 16px; font-size: 18px; line-height: 1.7; color: rgba(255, 255, 255, 0.88); }
.run { margin-top: 36px; counter-reset: run; border-bottom: 1px dashed rgba(255, 255, 255, 0.3); }
.run li {
  counter-increment: run;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  column-gap: 14px;
  padding: 22px 0 24px;
  border-top: 1px dashed rgba(255, 255, 255, 0.3);
}
.run li::before {
  content: counter(run, decimal-leading-zero);
  grid-row: 1 / 3;
  padding-top: 5px;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--on-teal);
}
.run h3 { font-size: 21px; font-weight: 600; line-height: 1.45; color: #FFFFFF; }
.run-main p { margin-top: 4px; font-size: 16.5px; line-height: 1.75; color: rgba(255, 255, 255, 0.86); }
.run-time {
  grid-column: 2;
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--on-teal);
}

/* 6. Fees: a sentence, not a table */
.fees-text { margin-top: 24px; max-width: 42em; }
.fees-text p { font-size: 18px; line-height: 1.8; color: var(--body2); }
.fees-text p + p { margin-top: 10px; color: var(--muted); font-size: 17px; }

/* 7. Contact (preview only: site.js stops the form from sending) */
.contact { margin-top: 40px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; align-items: start; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 24px 24px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field-wide { margin-top: 24px; }
.field label { display: flex; align-items: baseline; gap: 8px; font-size: 15.5px; font-weight: 600; color: var(--ink); }
.req { font-size: 13.5px; font-weight: 400; color: var(--muted); }
/* Typed text uses the system face: the page font is a subset of the page's own characters.
   Placeholders and the dropdown show page text, so they use the page font like the labels. */
.field input, .field textarea, .field select {
  width: 100%;
  border: 1px solid var(--field-line);
  border-radius: 12px;
  background: var(--paper);
  font-family: "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: var(--ink);
}
.field input, .field select { height: 52px; padding: 0 16px; }
.field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 44px;
  background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 20 20'%3E%3Cpath d='M4 7.5l6 6 6-6' fill='none' stroke='%2313242A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 16px center / 14px no-repeat;
}
.field textarea { min-height: 128px; padding: 14px 16px; line-height: 1.7; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { font-family: var(--font); color: var(--muted); opacity: 1; }
.field select { font-family: var(--font); }
.form-note { margin-bottom: 28px; padding: 14px 18px; border-radius: 14px; background: var(--ground); font-size: 15.5px; line-height: 1.7; color: var(--ink); }
.form-note a { overflow-wrap: anywhere; }
.consent { margin-top: 30px; padding-top: 26px; border-top: 1px solid var(--rule-strong); }
.consent-row { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; }
.consent-row input { flex: 0 0 auto; width: 22px; height: 22px; margin: 3px 0 0; accent-color: var(--teal); }
.consent-row label { font-size: 16px; font-weight: 600; line-height: 1.7; color: var(--ink); cursor: pointer; }
.consent-notes { margin-top: 10px; padding-left: 34px; font-size: 14px; line-height: 1.75; color: var(--muted); }
.consent-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-left: 34px;
  font-size: 14px;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--rule-strong);
}
.submit { margin-top: 22px; }
.form-msg { margin-top: 20px; padding: 16px 20px; border-radius: 14px; background: var(--ground); font-size: 15.5px; line-height: 1.7; color: var(--ink); }
.form-msg:empty { margin: 0; padding: 0; }
.ways dl > div { padding: 20px 0; border-top: 1px solid var(--rule); display: flex; flex-direction: column; gap: 2px; }
.ways dl > div:last-child { border-bottom: 1px solid var(--rule); }
.ways dt { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--teal); }
.ways a { display: inline-flex; align-items: center; min-height: 44px; font-size: 20px; font-weight: 600; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.ways a.u { text-decoration: underline; text-underline-offset: 6px; text-decoration-color: var(--rule-strong); }

/* 8. Footer */
.foot { padding: 52px 0 48px; background: var(--foot); }
.foot-inner { display: flex; flex-direction: column; gap: 12px; font-size: 13.5px; line-height: 1.85; color: #4C5E62; }
.foot a { color: var(--ink); }
.foot-run { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; color: var(--ink); }
.foot-run .mark { width: 20px; height: 20px; }
.foot-line a { display: inline-block; padding: 10px 0; margin: -10px 0; }
.foot-privacy a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.foot-notice { max-width: 820px; }
.foot-copy { margin-top: 4px; }
/* The Frame Labs family strip (framelabs-home/family), in this site's colours */
.fl-family { display: flex; flex-wrap: wrap; align-items: center; gap: 0 1.6em; margin-top: 8px; padding-top: 6px; border-top: 1px solid var(--rule-strong); font-size: 14px; line-height: 1.4; color: var(--ink); }
.fl-family ul { display: flex; flex-wrap: wrap; gap: 0 1.2em; margin: 0; padding: 0; list-style: none; }
.fl-family a { display: inline-flex; align-items: center; min-height: 44px; color: inherit; text-decoration: none; }
.fl-family a:hover, .fl-family a:focus-visible { text-decoration: underline; text-underline-offset: 0.25em; }
.fl-family .fl-home { font-weight: 600; }
.fl-family a[aria-current] { color: var(--teal-down); }

/* Privacy page */
.doc { padding: 40px 0 96px; }
.doc-wrap { max-width: 808px; }
.doc-flag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--coral-wash);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--coral-ink);
}
.doc-h1 { margin-top: 18px; font-size: clamp(32px, 6vw, 52px); font-weight: 800; line-height: 1.2; letter-spacing: -0.035em; color: var(--ink); }
.doc-lede { margin-top: 18px; font-size: clamp(17.5px, 1.6vw, 20px); line-height: 1.8; color: var(--body2); }
.doc-sec { margin-top: 36px; padding-top: 26px; border-top: 1px solid var(--rule); }
.doc-sec h2 { font-size: 20px; font-weight: 600; line-height: 1.45; color: var(--ink); }
.doc-sec p, .doc-sec li { font-size: 16.5px; line-height: 1.8; color: var(--body2); }
.doc-sec p { margin-top: 10px; }
.doc-sec ul { margin-top: 10px; }
.doc-sec li { position: relative; padding-left: 18px; }
.doc-sec li + li { margin-top: 6px; }
.doc-sec li::before { content: ""; position: absolute; left: 2px; top: 0.8em; width: 6px; height: 6px; border-radius: 50%; background: var(--teal); }
.link-sm {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--rule-strong);
  text-underline-offset: 5px;
}
.doc .link-sm { margin-top: 40px; }

/* 600 px and up: the whole corridor under the line; the note beside the lockup */
@media (min-width: 600px) {
  .brand { flex-direction: row; align-items: center; gap: 10px; }
  .lockup { height: 26px; }
  .hero-text { padding: 148px 40px 0; text-align: center; }
  .hero-text > * { margin-left: auto; margin-right: auto; }
  .lede { max-width: 30em; }
  .hero-actions { justify-content: center; }
  .hero-art { margin-top: -24px; aspect-ratio: 2752 / 1536; }
  /* the right wall reaches the picture's top edge: fade the edge into the ceiling's cream */
  .hero-art img { -webkit-mask-image: linear-gradient(to bottom, transparent, #000 9%); mask-image: linear-gradient(to bottom, transparent, #000 9%); }
  .hero-light { left: 0; width: 100%; }
  .hero-foot { padding: 14px 24px 18px; }
}

/* Desk header */
@media (min-width: 721px) {
  .head-row { display: flex; flex-wrap: wrap; gap: 8px 24px; min-height: 88px; }
  .brand { margin-right: auto; }
  .head-tools { gap: 14px; }
  .nav { display: flex; flex: 1 1 auto; justify-content: center; flex-wrap: wrap; gap: 0 22px; }
  .nav a { padding: 0 8px; margin: 0 -8px; }
  .menu-btn { display: none; }
  .panel { border-radius: 24px; }
  .form { padding: 48px 48px 52px; }
  .strand { padding: 34px 34px 36px; }
  .desk { padding: 40px 32px; }
}

/* Tablets and small laptops: the menu takes its own row under the name, so the language switch
   and the button never drop to a stray second line. */
@media (min-width: 721px) and (max-width: 1099px) {
  .nav { order: 3; flex-basis: 100%; justify-content: flex-start; margin-top: -8px; }
}

@media (min-width: 960px) {
  .sec { padding-top: 136px; }
  .sec-last { padding-bottom: 136px; }
  .sec-teal { margin-top: 136px; padding-bottom: 128px; }
  .lockup { height: 28px; }

  .strands { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 20px; }
  .strand { grid-column: 8 / 13; }
  /* The clinic card is as tall as the two beside it: its six scenes sit at the foot, and the
     sliced-bubble mark stands large and faint in the space, as on the deck's chapter slides. */
  .strand-clinic {
    grid-column: 1 / 8;
    grid-row: 1 / 3;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 48px 48px 44px;
    background: var(--teal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg fill='%23ffffff' fill-opacity='.08'%3E%3Cpath d='M0 50A50 50 0 0 1 28.468 4.874L28.468 100L0 100Z'/%3E%3Cpath d='M35.468 2.158A50 50 0 0 1 56.82 0.467L56.82 99.533A50 50 0 0 1 50 100L35.468 100Z'/%3E%3Cpath d='M63.82 1.948A50 50 0 0 1 80.189 10.143L80.189 89.857A50 50 0 0 1 63.82 98.052Z'/%3E%3Cpath d='M87.189 16.579A50 50 0 0 1 100 50L100 50A50 50 0 0 1 87.189 83.421Z'/%3E%3C/g%3E%3C/svg%3E") right -40px top 46% / 280px no-repeat;
  }
  .strand-clinic > p:not(.tag):not(.scenes-lead) { max-width: 23em; }
  .strand-clinic .scenes-lead { margin-top: auto; padding-top: 32px; }

  .mats { grid-template-columns: repeat(12, minmax(0, 1fr)); row-gap: 56px; }
  .mat-screen { grid-column: 1 / 9; }
  .mat-card { grid-column: 9 / 13; }
  .mat-level { grid-column: 1 / 5; }
  .mat-book { grid-column: 5 / 9; }
  .mat-phone { grid-column: 9 / 13; }

  .how { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: 72px; align-items: start; }
  .run { margin-top: 0; }
  .run li { grid-template-columns: 52px minmax(0, 1fr) auto; column-gap: 20px; }
  .run-time { grid-column: 3; grid-row: 1; margin-top: 4px; text-align: right; white-space: nowrap; }

  .contact { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 64px; }
}

/* 1100 px and landscape: the corridor covers the first screen and the line sits in its ceiling,
   centred straight above the far end of the corridor, its buttons just above the back wall's top
   line: the approved composition (the pilot's 1440 x 900 view). Below 1100 px the header takes two
   rows and the ceiling has no room, so 600 to 1099 px keep the line above the whole corridor.
   Every size and position comes from the picture's rendered height (--ph), so the block keeps its
   place on the picture at every window; the picture moves down (never past its own top edge) only
   as far as the block needs to clear the header. Measured on the picture (tools/hero_check.py
   measures it again on every run): the back wall's top line at 0.509 of its height, the figure's
   hair from 0.373, its head's right edge 0.166 of the picture's width left of the centre.
   tools/hero_check.py reads the constants below and evaluates these very expressions with real
   font metrics at every desk window; it fails if one is missing. */
@media (min-width: 1100px) and (min-aspect-ratio: 5/4) {
  .hero {
    --pic-ratio: 1.7917;   /* the corridor, 2752 x 1536 */
    --head: 88px;          /* the header's height (.head-row's min-height on desks) */
    --head-gap: 24px;      /* room kept under the header while the picture can move down */
    --anchor: 0.49;        /* the block's bottom on the picture (the back wall's top line: 0.509) */
    --h1-k: 0.0622;
    --h1-max: 58px;
    --h1-min: 28px;
    --h1-lh: 1.22;
    --lede-k: 0.02;
    --lede-min: 16px;
    --lede-max: 18px;
    --lede-lh: 1.7;
    --lede-w: 0.3;         /* the lede's width, at most this share of the picture's width */
    --lede-lines: 2;
    --btn-k: 0.06;
    --btn-min: 48px;
    --btn-max: 54px;
    --gap1-k: 0.02;        /* headline to lede */
    --gap1-max: 19px;
    --gap2-k: 0.0289;      /* lede to buttons */
    --gap2-max: 27px;
    /* the picture covers the hero and keeps its shape */
    --hh: clamp(600px, 100svh, 1000px);
    --pw: max(100vw, calc(var(--hh) * var(--pic-ratio)));
    --ph: calc(var(--pw) / var(--pic-ratio));
    /* the sizes, from the picture's height */
    --lede: clamp(var(--lede-min), calc(var(--ph) * var(--lede-k)), var(--lede-max));
    --btn: clamp(var(--btn-min), calc(var(--ph) * var(--btn-k)), var(--btn-max));
    --gap1: min(var(--gap1-max), calc(var(--ph) * var(--gap1-k)));
    --gap2: min(var(--gap2-max), calc(var(--ph) * var(--gap2-k)));
    --rest: calc(var(--gap1) + var(--lede) * var(--lede-lh) * var(--lede-lines) + var(--gap2) + var(--btn));
    --bottom: calc(var(--ph) * var(--anchor));
    /* the smallest desks: the headline shrinks to what fits under the header with the picture at its top */
    --h1-fit: calc((var(--bottom) - var(--head) - var(--head-gap) - var(--rest)) / (2 * var(--h1-lh)));
    --h1: max(var(--h1-min), min(var(--h1-max), calc(var(--ph) * var(--h1-k)), var(--h1-fit)));
    --block: calc(var(--h1) * 2 * var(--h1-lh) + var(--rest));
    /* the picture's top edge: centred, or lower when the block needs the room, never below the hero's top */
    --t: min(0px, max(calc((var(--hh) - var(--ph)) / 2), calc(var(--head) + var(--head-gap) + var(--block) - var(--bottom))));
    display: block;
    height: var(--hh);
  }
  html[lang="en"] .hero { --h1-k: 0.0576; --h1-max: 54px; --h1-lh: 1.12; }
  /* exactly --pw wide (a page scrollbar makes it a few px wider than the hero, which hides the overflow) */
  .hero-art { position: absolute; left: calc(50% - var(--pw) / 2); top: var(--t); width: var(--pw); height: var(--ph); margin: 0; }
  .hero-art img { -webkit-mask-image: none; mask-image: none; }
  /* the block: centred, anchored by its bottom at --anchor of the picture */
  .hero-text { position: absolute; left: 0; right: 0; bottom: calc(var(--hh) - var(--t) - var(--bottom)); padding: 0 24px; text-align: center; }
  .hero h1, html[lang="en"] .hero h1 { font-size: var(--h1); line-height: var(--h1-lh); white-space: nowrap; }
  .hero .lede { margin-top: var(--gap1); max-width: min(calc(var(--pw) * var(--lede-w)), 28em); font-size: var(--lede); line-height: var(--lede-lh); }
  html[lang="en"] .hero .lede { max-width: min(calc(var(--pw) * var(--lede-w)), 31em); }
  .hero-actions { margin-top: var(--gap2); align-items: center; }
  .hero .cta-lg, .hero .hero-link { min-height: var(--btn); }
  /* bottom: the window's foot when the hero (600 px at least) is taller than a short window */
  .hero-foot { position: absolute; left: auto; right: 0; bottom: max(0px, calc(var(--hh) - 100svh)); justify-content: flex-end; padding: 0 32px 24px; background: none; }
}

/* Inner pages: the page head (the page's label, its h1 and first paragraph) */
.page-head { padding: 40px 0 8px; }
.page-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
}
.page-label .mark { width: 16px; height: 16px; }
.page-h1 {
  margin-top: 22px;
  max-width: 20em;
  font-size: clamp(32px, 4.6vw, 60px);
  font-weight: 800;
  line-height: 1.24;
  letter-spacing: -0.035em;
  color: var(--ink);
}
html[lang="en"] .page-h1 { line-height: 1.12; letter-spacing: -0.03em; }
.page-lede { margin-top: 20px; max-width: 38em; font-size: clamp(17px, 1.5vw, 19.5px); line-height: 1.8; color: var(--body2); }
html[lang="en"] .page-lede { line-height: 1.65; }
@media (min-width: 960px) {
  .page-head { padding: 72px 0 16px; }
}

@media (min-width: 1100px) {
  .head-row { column-gap: 32px; }
  .nav { gap: 0 30px; }
}

/* Phones: no type under 14 px (the labels, notes and the footer are 11.5 to 13.5 px on wider screens) */
@media (max-width: 599px) {
  .brand-note, .hero-note, .tag, .kicker, .page-label, .card-tag, .hw-head, .run-time, .req, .ways dt, .foot-inner, .doc-flag { font-size: 14px; }
}

@media (hover: hover) {
  .card { transition: transform 200ms cubic-bezier(0.22, 0.61, 0.36, 1); }
  .card:hover { transform: translateY(-2px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .card:hover { transform: none; }
  .motion-btn { display: none; }
}

@media print {
  .site-head, .form, .phrase-bar, .hw-frame, .hero-foot { display: none; }
  body { background: #FFFFFF; }
}
