/* ============================================================================
   THE FRAME — what every page shares around its content (roadmap 31 F2).

   One sheet for the chrome frame.js draws and the app's Frame renders:

     the bare bar      the mark and the name, the language, and whatever the
                       page puts at the end (sign-in, consent, the errors)
     the visitor bar   the bare bar with the three public tabs and the two
                       ways in (the landing, a library a visitor browses)
     the student bar   the mark, the four tabs, the language, the account
     the sidebar       the student bar as a rail, when a page asks for it
                       (<body data-frame="side">), and a drawer on a phone
     the footer        the legal block Korean law requires, with the
                       statutory values as slots

   Load order on a page:  tokens → fonts → base → frame → <page>
   on a product page:     shell → semantic → scale → fonts → product → frame → <page>

   The sheet stands alone: a product page does not load base.css, so every
   element drawn here has its rule here. Sections 4 of base.css and the
   landing's header and footer rules moved in on 2 October 2026; the values
   are theirs, on the scales. The current tab is marked by weight and an
   underline (or a tint and an edge, in the sidebar), never by colour alone.
   ========================================================================= */

/* ---- 0 · what a bar's controls stand on, without base.css ------------- */
/* The product pages' measure, which product.css sets on .pr; named on :root
   here too so a study page, which never loads product.css, resolves it. */
:root{--pr-measure:1080px; --ground:var(--card);}
.topbar button, .top button, .side button, .phonebar button{font:inherit; color:inherit; background:none;
  border:0; padding:0; cursor:pointer; text-align:left;}
.topbar a, .top a, .side a, .phonebar a, .site-foot a{text-decoration:none;}


/* ---- 1 · the student bar and the bare bar (4 October: the Lessons
   design's bar). White, a hairline under it, both running the width of the
   window; inside, the page's 1120px column: the mark and the name, the
   tabs with a 2px rule under the current one, the other language as a
   blue word, and a round account button. The bare bar is the same bar
   without the tabs and the account. The white and the hairline are a
   border-image pushed out to the window's edges, so the bar needs no
   wrapper and makes no sideways scroll. */
:root{--fr-measure:1120px;}
.topbar{display:flex; align-items:center; gap:32px; min-height:64px; margin:0 0 var(--sp-4); padding:0;
  border-image:linear-gradient(to top, var(--border) 1px, var(--card) 1px) 0 fill / 0 / 0 100vmax;}
/* A study page's .shell pads its top; the bar sits on the window's top edge. */
.shell > .topbar{margin-top:calc(-1 * var(--sp-6)); padding-inline:max(0px, calc((100% - var(--fr-measure)) / 2));}
/* A product page has no .shell: the bar takes the window and the column. */
.pr > .topbar{width:100%; max-width:none; margin:0; padding-inline:max(var(--gutter), calc((100% - var(--fr-measure)) / 2));}
.topbar :focus:not(:focus-visible){outline:none;}
.topbar :focus-visible{outline:2px solid var(--blue); outline-offset:2px; border-radius:var(--r-2);}
.logo{flex:none; display:flex; align-items:center; gap:10px; color:var(--ink);}
.logo-mark{width:28px; height:28px; flex:0 0 auto; border-radius:8px; background:var(--blue);
  display:inline-flex; align-items:center; justify-content:center;}
.logo-mark svg{width:28px; height:28px; display:block;}
.logo-arc{fill:none; stroke:var(--on-fill); stroke-width:2.2; stroke-linecap:round;}
.logo-dot{fill:var(--sun);}
.logo-word{font-family:var(--font-head); font-weight:var(--fw-semibold); font-size:19px;
  letter-spacing:-0.02em; line-height:1; white-space:nowrap;}
.topnav{display:flex; align-self:stretch; gap:4px;}
.topnav a{display:flex; align-items:center; padding:0 12px; font-size:15px; font-weight:var(--fw-medium);
  color:var(--ink-soft); white-space:nowrap;}
.topnav a:hover{color:var(--ink);}
.topnav a[aria-current="page"]{color:var(--ink); font-weight:var(--fw-semibold); box-shadow:inset 0 -2px 0 var(--blue);}
.topnav a:focus-visible{outline-offset:-2px;}
.top-spacer{flex:1; min-width:0;}
.top-end{display:flex; align-items:center; gap:16px;}
.avatar-chip{width:36px; height:36px; flex:0 0 auto; display:grid; place-items:center;
  border-radius:var(--r-round); border:1px solid var(--border); background:var(--neutral-tint); color:var(--ink-soft);}
.avatar-chip:hover{border-color:var(--border-strong); color:var(--ink);}
.avatar-chip svg{display:block;}
.avatar-chip:focus-visible{border-radius:var(--r-round);}

/* THE LANGUAGE: the other language, named in its own script, as a blue
   word. In the app it is a button in a form; it looks the same. */
.topbar .lang{display:inline-flex; align-items:center; min-height:36px; padding:0 2px;
  font-size:15px; font-weight:var(--fw-semibold); color:var(--blue); white-space:nowrap;}
.topbar .lang:hover{color:var(--blue-deep); text-decoration:underline; text-underline-offset:3px;}
/* What a page puts at the bar's end (a sign-out, a way back) is a quiet
   word beside the language, not a second boxed button. */
.topbar .top-end .pr-btn{min-height:36px; margin:0; padding:0 2px; border:0; border-radius:0; background:none; box-shadow:none;
  font-size:15px; font-weight:var(--fw-medium); color:var(--muted);}
.topbar .top-end .pr-btn:hover{color:var(--ink); background:none; text-decoration:underline; text-underline-offset:3px;}
.topbar .top-end form{display:contents;}

/* A phone: the mark, the language and the account on a 56px row; the tabs
   on a 44px row under it, sliding sideways if they must. */
@media (max-width:700px){
  .topbar{flex-wrap:wrap; gap:0 12px; min-height:0;}
  .logo, .top-spacer, .top-end, .avatar-chip{min-height:56px;}
  .logo{gap:8px; order:1;}
  .logo-mark, .logo-mark svg{width:26px; height:26px;}
  .logo-word{font-size:17px;}
  .top-spacer{order:2;}
  .top-end{order:3; gap:12px;}
  .avatar-chip{order:3; min-height:36px;}
  .topnav{order:4; flex:1 0 100%; height:44px; margin:0 -10px; gap:4px; overflow-x:auto; scrollbar-width:none;}
  .topnav::-webkit-scrollbar{display:none;}
  .topnav a{flex:none; padding:0 10px;}
}
@media (max-width:360px){
  .logo-word{font-size:16px;}
}


/* ---- 2 · the visitor bar (the landing's header) ------------------------
   The landing session's bar, moved here from its sheet on 2 October (the
   frame draws it: scripts/frame.js, VISITOR). Three parts on one line: the mark on the left, the four tabs centred on
   the PAGE (so they sit over the centred question below, not wherever the
   mark leaves room), and the way in on the right. The outer columns are
   equal (1fr each), which is what centres the middle one.

   The tabs are the showcase's entries in small: Boo in the same pose, on a
   disc of the same colour. Pointed at, a tab fills with its colour and
   takes the solid offset in its accent, the way the selected entry does.

   It stays on screen (asked for), but not as a strip cut out of the page
   (asked for too: it was sticky, translucent, with a line that came in on
   scroll). At the top it is the page: the question's ground (--ground,
   below), no band, no line. Scrolled (frame.js, is-floating), the
   strip goes and its first row floats as a capsule of paper over the
   page, inset from the edges, lifted by a soft shadow, with the page
   passing round it and under it. Its height never changes, so nothing
   below moves when it floats: what is not the capsule is see-through and
   lets presses through. Under 1000px the tabs' row hides while it floats,
   so the capsule stays one row.

   Sign up is the logo's blue with an arrow that steps forward when
   pointed at (it was the note's yellow; asked for another colour).

   What it stands on is the page's: --ground, paper unless the page says
   otherwise (the landing sets Boo's night on its body), and a page whose
   ground is dark marks its placeholder `top-night` so the words go light.
   Its measure is base.css's .wrap, repeated here so the bar stands without
   that sheet (the product pages never load it). */
.top{position:sticky; top:0; z-index:60; background:var(--ground);}
/* standing on the dark sky: its words in light, its hover a wash of light */
.top-night:not(.is-floating) .brand{color:var(--card);}
.top-night:not(.is-floating) :is(.top-tab, .top-login, .top-lang){color:var(--boo-mist);}
.top-night:not(.is-floating) :is(.top-login, .top-lang):hover{background:rgba(255,255,255,.12); color:var(--card);}
.top-night:not(.is-floating) .top-tab:is(:hover, :focus-visible){color:var(--ink);}
.top.is-floating{background:transparent; pointer-events:none;}
.top.is-floating :is(.brand, .top-nav, .top-acts){pointer-events:auto;}
/* the capsule: a grid item laid over the first row, the whole width; the
   bar's parts are placed in their cells by hand, so it lies under them
   instead of taking the row for itself */
.brand{grid-area:1 / 1;}
.top-nav{grid-area:1 / 2;}
.top-acts{grid-area:1 / 3;}
.top.is-floating .top-in::before{content:''; grid-row:1; grid-column:1 / -1; align-self:stretch; z-index:-1;
  margin:calc(-1 * var(--sp-3)) calc(-1 * var(--sp-5)); border-radius:var(--r-pill); background:var(--card);
  box-shadow:0 1px 2px rgba(11,22,51,.06), 0 8px 24px rgba(11,22,51,.12);}
.top-in{display:grid; grid-template-columns:minmax(0, 1fr) auto minmax(0, 1fr); align-items:center;
  gap:var(--sp-6); max-width:1200px; margin:0 auto; padding:var(--sp-5) var(--gutter);}
.brand{justify-self:start; display:flex; align-items:center; gap:var(--sp-4); font-family:var(--font-head);
  font-weight:var(--fw-semibold); font-size:var(--ty-8); letter-spacing:var(--ls-tight); color:var(--ink); white-space:nowrap;}
.brand-mark{width:32px; height:32px; flex:0 0 auto; border-radius:var(--r-3); background:var(--blue);
  display:inline-flex; align-items:center; justify-content:center;}
.top-nav{display:flex; align-items:center; gap:var(--sp-6);}
.top-tab{display:inline-flex; align-items:center; gap:var(--sp-3); flex:0 0 auto;
  padding:var(--sp-1) var(--sp-6) var(--sp-1) var(--sp-1); border:2px solid transparent; border-radius:var(--r-pill);
  font-size:var(--ty-6); font-weight:var(--fw-medium); letter-spacing:var(--ls-tight); white-space:nowrap; color:var(--ink-soft);}
.top-tab img{width:34px; height:34px; padding:var(--sp-1); border-radius:var(--r-round); background:var(--tab-f); object-fit:contain;}
.top-tab:hover, .top-tab:focus-visible{background:var(--tab-f); border-color:var(--tab-a); box-shadow:3px 3px 0 var(--tab-a); color:var(--ink);}
/* the disc would vanish into the fill; paper instead, as on the rail */
.top-tab:hover img, .top-tab:focus-visible img{background:var(--card);}
.top-acts{justify-self:end; display:flex; align-items:center; gap:var(--sp-3);}
.top-login{display:inline-flex; align-items:center; min-height:40px; padding:var(--sp-3) var(--sp-5); border-radius:var(--r-pill);
  font-size:var(--ty-6); font-weight:var(--fw-medium); color:var(--ink-soft); white-space:nowrap;}
.top-login:hover{background:var(--neutral-tint); color:var(--ink);}
/* the same page in the other language, named in that language, with a globe.
   On a phone the first line has no room for it beside the name, so there
   it is a fourth cell on the tabs' line, a globe over the word (the same
   link twice in the markup, one of them shown at any width). */
.top{--arrow:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 10'%3E%3Cpath d='M1 5h13M10.2 1.4L14 5l-3.8 3.6' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --globe:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cg fill='none' stroke='black' stroke-width='1.3'%3E%3Ccircle cx='8' cy='8' r='6.5'/%3E%3Cpath d='M1.5 8h13M8 1.5c-2.2 2-2.2 11 0 13M8 1.5c2.2 2 2.2 11 0 13'/%3E%3C/g%3E%3C/svg%3E");}
.top-lang{display:inline-flex; align-items:center; gap:var(--sp-2); min-height:40px; padding:var(--sp-3) var(--sp-4); border-radius:var(--r-pill);
  font-size:var(--ty-5); font-weight:var(--fw-medium); color:var(--ink-soft); white-space:nowrap;}
.top-lang::before{content:''; flex:0 0 auto; width:16px; height:16px; background:currentColor; mask:var(--globe) center / contain no-repeat;}
.top-lang:hover{background:var(--neutral-tint); color:var(--ink);}
/* its disc is Boo's own field, as the other tabs' discs are their fields,
   with the globe in ink on it: on the dark sky it was a pale grey disc
   with a pale globe, and read as another kind of control */
.top-tab-lang{display:none; --tab-a:var(--boo-blue-deep); --tab-f:var(--boo-blue-field);}
.top-globe{position:relative; flex:0 0 auto; width:30px; height:30px; border-radius:var(--r-round); background:var(--tab-f);}
.top-globe::before{content:''; position:absolute; inset:var(--sp-2); background:var(--ink-soft); mask:var(--globe) center / contain no-repeat;}
.top-tab-lang:hover .top-globe, .top-tab-lang:focus-visible .top-globe{background:var(--card);}
.top-join{display:inline-flex; align-items:center; gap:var(--sp-4); min-height:40px; padding:var(--sp-3) var(--sp-6) var(--sp-3) var(--sp-7);
  border-radius:var(--r-pill); background:var(--blue); color:var(--card);
  font-size:var(--ty-6); font-weight:var(--fw-semibold); white-space:nowrap;}
.top-join::after{content:''; flex:0 0 auto; width:15px; height:10px; background:currentColor; mask:var(--arrow) center / contain no-repeat;}
.top-join:hover{background:var(--blue-deep);}

/* ?tabs=2 (homeopts.js), to compare: each tab carries its showcase
   entry's drawing on a square tile of its colour instead of Boo on a disc,
   and pointed at, the tile takes the accent's offset and the word its
   underline, instead of the whole tab filling. */
.top-tab{--accent-ent:var(--tab-a);}
.top-draw{display:none;}
[data-tabs="2"] .top-tab img{display:none;}
[data-tabs="2"] .top-draw{display:block; flex:0 0 auto; width:34px; height:34px; padding:var(--sp-1);
  border-radius:var(--r-3); background:var(--tab-f); overflow:visible;}
[data-tabs="2"] .top-tab:hover, [data-tabs="2"] .top-tab:focus-visible{background:none; border-color:transparent; box-shadow:none;
  text-decoration:underline 2px var(--tab-a); text-underline-offset:var(--sp-3);}
[data-tabs="2"] .top-tab:hover .top-draw, [data-tabs="2"] .top-tab:focus-visible .top-draw{box-shadow:2px 2px 0 var(--tab-a);}

/* Not enough room for three on a line: the mark and the way in on the
   first, the tabs centred on their own line under them. */
@media (max-width:1000px){
  .top-in{grid-template-columns:minmax(0, 1fr) auto; row-gap:var(--sp-3);}
  .top-acts{grid-area:1 / 2;}
  .top-nav{grid-column:1 / -1; grid-row:2; justify-content:center;}
  .top.is-floating .top-nav{visibility:hidden;}
}
/* A phone: the three tabs share the width evenly, Boo over the word, the
   way an app's tab bar does. All three are always in reach, nothing
   scrolls sideways, and the bar stays two short rows. */
@media (max-width:640px){
  .top-in{gap:var(--sp-3) var(--sp-4); padding-top:var(--sp-4); padding-bottom:var(--sp-3);}
  .brand{gap:var(--sp-3); font-size:var(--ty-7);}
  .brand-mark{width:28px; height:28px;}
  .top-acts{gap:var(--sp-2);}
  .top-login{padding:var(--sp-3) var(--sp-4);}
  .top-join{gap:var(--sp-3); padding:var(--sp-3) var(--sp-5);}
  .top-lang{display:none;}
  .top-tab-lang{display:flex;}
  .top-nav{display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:var(--sp-4);}
  .top-tab{flex-direction:column; justify-content:center; gap:var(--sp-1); min-width:0;
    padding:var(--sp-2) var(--sp-1) var(--sp-3); border-radius:var(--r-4); font-size:var(--ty-3);}
  .top-tab img, [data-tabs="2"] .top-draw{width:30px; height:30px;}
}
/* The narrowest phones have no room for the name beside the way in: the
   mark stands for it, and the name stays for a screen reader. */
@media (max-width:370px){
  .brand-word{position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap;}
}
@media (prefers-reduced-motion: no-preference){
  .top-tab{transition:background-color .15s ease, border-color .15s ease, box-shadow .15s ease, color .15s ease;}
  .top-tab img{transition:transform .2s cubic-bezier(.3, 1.6, .5, 1), background-color .15s ease;}
  .top-tab:hover img{transform:rotate(-10deg) scale(1.1);}
  .top-join{transition:background-color .15s ease;}
  .top.is-floating .top-in::before{animation:top-float .2s ease-out;}
  @keyframes top-float{from{opacity:0; transform:translateY(-4px);}}
  .top-join::after{transition:translate .15s ease;}
  .top-join:hover::after{translate:3px 0;}
}


/* THE DRAWINGS' PAINT — the tabs' and the showcase's index entries' (the
   landing's own drawings, one family on one grid: ui/CLAUDE.md, "the
   rail"). Every part carries one of these, or it paints in the default
   black; the accent is the entry's, --accent-ent, which a tab sets from
   its --tab-a above. */
.show-i-w{fill:var(--card);}
.show-i-h{fill-opacity:.7;}
.show-i-a{fill:var(--accent-ent);}
.show-i-l{fill:var(--accent-ent); fill-opacity:.3;}
.show-i-n{fill:var(--ink);}
.show-i-m{fill:var(--ink); fill-opacity:.28;}
.show-i-g{fill:var(--sun);}
.show-i-o{fill:none;}
.show-i-s{stroke:var(--ink); stroke-width:1.5; stroke-linecap:round; stroke-linejoin:round;}
.show-i-q{stroke:var(--ink); stroke-opacity:.45; stroke-width:1.1;}
.show-i-c{fill:none; stroke:var(--accent-ent); stroke-width:1.8; stroke-linecap:round;}
.show-i-k{fill:none; stroke:var(--ink); stroke-width:1.3; stroke-linecap:round; stroke-linejoin:round;}
.show-i-t{fill:none; stroke:var(--card); stroke-width:1.3; stroke-linecap:round;}
.show-i-d{fill:none; stroke:var(--ink); stroke-opacity:.4; stroke-width:1; stroke-dasharray:1.5 1.5;}
/* the language control in the app is a form round a button: the button is
   the bar's part, the form is not there */
.lang-form{display:contents;}

/* ---- 3 · the sidebar — the frame a page opts into with <body data-frame="side">.

   frame.js builds it; this draws it. Three states, each set on <html> so
   the page's own padding can follow it:
     data-side="open"   240px, icons and words             (a wide screen)
     data-side="rail"   64px, icons, each named on hover and on focus
     data-drawer="open" below 600px: a drawer over the page, from the
                        menu button in the slim phone bar
   The page reserves the sidebar's width as padding on <body>, so nothing
   sits under it, and the sidebar is fixed, so it stays while the page
   scrolls. The current page is marked by weight, a tint AND a rule on its
   left edge, not by colour alone. */
:root{--side-w:240px; --side-rail:64px;}
body[data-frame="side"]{padding-left:var(--side-w);}
.side{position:fixed; z-index:60; left:0; top:0; bottom:0; width:var(--side-w);
  display:flex; flex-direction:column; gap:var(--sp-1);
  padding:var(--sp-6) var(--sp-5); background:var(--card); border-right:1px solid var(--border); overflow-y:auto;}
.side-head{display:flex; align-items:center; gap:var(--sp-4); margin-bottom:var(--sp-6); min-height:36px;}
.side-logo{flex:1; min-width:0; display:flex; align-items:center; gap:var(--sp-4); color:var(--ink); padding:var(--sp-1) var(--sp-2);}
.side-word{font-family:var(--font-head); font-weight:var(--fw-semibold); font-size:var(--ty-6); letter-spacing:var(--ls-tight); white-space:nowrap;}
.side-fold, .side-close{width:32px; height:32px; flex:0 0 auto; display:inline-flex; align-items:center; justify-content:center;
  border-radius:var(--r-2); color:var(--muted);}
.side-fold:hover, .side-close:hover{background:var(--neutral-tint); color:var(--ink);}
.side-close{display:none;}
.side-list{list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:var(--sp-1);}
.side-item{position:relative; width:100%; min-height:40px; display:flex; align-items:center; gap:var(--sp-5);
  padding:var(--sp-3) var(--sp-5); border-radius:var(--r-3);
  font-size:var(--ty-5); font-weight:var(--fw-medium); color:var(--ink-soft); line-height:var(--lh-2);}
.side-item:hover{background:var(--neutral-tint); color:var(--ink);}
.side-item[aria-current="page"]{background:var(--blue-tint); color:var(--blue-deep); font-weight:var(--fw-semibold);}
.side-item[aria-current="page"]::before{content:''; position:absolute; left:calc(-1 * var(--sp-5)); top:var(--sp-3); bottom:var(--sp-3);
  width:3px; border-radius:0 var(--r-1) var(--r-1) 0; background:var(--blue);}
.side-ico{width:20px; height:20px; flex:0 0 auto; display:block;}
.side-label{flex:1; min-width:0; display:flex; flex-direction:column; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.side-label small{font-size:var(--ty-2); font-weight:var(--fw-regular); color:var(--muted);}
/* The theme switch (round 9): a track and a knob, the knob to the right
   when dark. In the rail it is the moon alone, lit when dark. */
.side-switch{flex:0 0 auto; position:relative; width:30px; height:18px; border-radius:var(--r-pill);
  border:1.5px solid var(--border-strong); background:var(--card);}
.side-switch::after{content:''; position:absolute; top:2px; left:2px; width:11px; height:11px; border-radius:var(--r-round); background:var(--border-strong);}
.side-theme[aria-pressed="true"] .side-switch{background:var(--blue); border-color:var(--blue);}
.side-theme[aria-pressed="true"] .side-switch::after{left:14px; background:var(--on-fill);}
.side-theme[aria-pressed="true"] .side-ico{color:var(--blue-deep);}
/* The one number in the sidebar: what the 오답노트 has due. Amber, the
   colour of "due", on its tint. */
.side-count{margin-left:auto; flex:0 0 auto; padding:var(--sp-1) var(--sp-3); border-radius:var(--r-pill);
  background:var(--amber-tint); color:var(--amber-deep); font-family:var(--font-mono); font-size:var(--ty-2); line-height:var(--lh-1);}
.side-sr{position:absolute; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0;}
.side-k{margin:var(--sp-7) 0 var(--sp-2); padding:0 var(--sp-5); font-family:var(--font-mono); font-size:var(--ty-1);
  letter-spacing:var(--ls-caps-xl); text-transform:uppercase; color:var(--muted);}
.side-foot{margin-top:auto; padding-top:var(--sp-5); border-top:1px solid var(--border-soft); display:flex; flex-direction:column; gap:var(--sp-1);}
/* the app's way out (side.js): a form only so it can POST; its button is the foot's item */
.side-out{display:contents;}
.side-face{width:28px; height:28px; flex:0 0 auto; margin-left:calc(-1 * var(--sp-2)); display:flex; align-items:center; justify-content:center;
  border-radius:var(--r-round); background:var(--blue-tint); border:1px solid var(--blue-pale); overflow:hidden;}
[data-side-boo] .side-ico{color:var(--boo-blue);}
.side-scrim[hidden]{display:none;}
/* The phone's bar: only below 600px, where the sidebar is a drawer. */
.phonebar{display:none;}

/* THE RAIL — above the phone only. The words stay in the accessibility
   tree (clipped, not removed), so every icon keeps its name; a sighted
   pointer or keyboard gets the same name as a label beside the icon. */
@media (min-width:37.51em){
  html[data-side="rail"] body[data-frame="side"]{padding-left:var(--side-rail);}
  html[data-side="rail"] .side{width:var(--side-rail); padding-inline:var(--sp-4); overflow:visible;}
  html[data-side="rail"] .side-head{flex-direction:column; gap:var(--sp-4);}
  html[data-side="rail"] .side-fold svg{transform:scaleX(-1);}
  html[data-side="rail"] :is(.side-word, .side-label, .side-k){position:absolute; width:1px; height:1px; margin:-1px;
    padding:0; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0;}
  html[data-side="rail"] .side-item{justify-content:center; gap:0; padding-inline:0;}
  html[data-side="rail"] .side-item[aria-current="page"]::before{left:calc(-1 * var(--sp-4));}
  html[data-side="rail"] .side-face{margin-left:0;}
  /* the "Subjects" label is clipped, so a rule divides the two lists */
  html[data-side="rail"] .side-k + .side-list{margin-top:var(--sp-4); padding-top:var(--sp-4); border-top:1px solid var(--border-soft);}
  /* the count rides on the icon's corner */
  html[data-side="rail"] .side-count{position:absolute; top:var(--sp-1); right:var(--sp-1); margin:0;}
  html[data-side="rail"] .side-switch{display:none;}
  /* the name, beside the icon, on hover and on keyboard focus */
  html[data-side="rail"] :is(.side-item, .side-logo, .side-fold)::after{content:attr(data-label); position:absolute; z-index:61;
    left:calc(100% + var(--sp-4)); top:50%; transform:translateY(-50%);
    padding:var(--sp-2) var(--sp-4); border-radius:var(--r-2); background:var(--ink); color:var(--card);
    font-size:var(--ty-3); font-weight:var(--fw-medium); white-space:nowrap; pointer-events:none; opacity:0;}
  html[data-side="rail"] :is(.side-item, .side-logo, .side-fold):is(:hover, :focus-visible)::after{opacity:1;}
  html[data-side="rail"] :is(.side-logo, .side-fold){position:relative;}
}

/* THE DRAWER — below 600px. Off-screen and hidden (so it is out of the
   tab order) until the menu button opens it. */
@media (max-width:37.5em){
  body[data-frame="side"]{padding-left:0;}
  .side{width:min(280px, 86vw); visibility:hidden; transform:translateX(-100%); box-shadow:var(--lift-2); z-index:80;}
  html[data-drawer="open"] .side{visibility:visible; transform:none;}
  .side-fold{display:none;}
  .side-close{display:inline-flex;}
  .side-scrim{position:fixed; inset:0; z-index:79; background:color-mix(in srgb, var(--ink) 40%, transparent);}
  .phonebar{display:flex; align-items:center; gap:var(--sp-5); padding:var(--sp-2) 0 var(--sp-4);}
  .phonebar-menu{width:40px; height:40px; flex:0 0 auto; display:inline-flex; align-items:center; justify-content:center;
    margin-left:calc(-1 * var(--sp-3)); border-radius:var(--r-2); color:var(--ink);}
  .phonebar-menu svg{width:22px; height:22px;}
  .phonebar-menu:hover{background:var(--neutral-tint);}
}
/* Motion only for a reader who has not asked for less of it; everything
   above is the finished state with or without it. */
@media (prefers-reduced-motion:no-preference){
  /* Visibility flips at once on the way in, so the drawer can take focus
     the moment it opens; on the way out it waits for the slide to finish. */
  .side{transition:width .18s ease, transform .22s ease, visibility 0s linear .22s;}
  html[data-drawer="open"] .side{transition:width .18s ease, transform .22s ease, visibility 0s;}
  body[data-frame="side"]{transition:padding-left .18s ease;}
}


/* ---- 4 · the shared footer. Two quiet rows when the window is wide:
   policies, copyright and the disclosure; then the Korean business record
   and contact links. The extra UK record opens inline on request. */
.site-foot{width:calc(100vw - 2 * var(--gutter)); max-width:none; margin:var(--sp-6) calc(50% - 50vw + var(--gutter)) 0;
  padding:var(--sp-4) 0; display:block; text-align:center;
  background:none; border:0; border-radius:0; font-size:var(--ty-3); line-height:var(--lh-4); color:var(--muted2);
  border-image:linear-gradient(var(--border) 1px, transparent 1px) 0 fill / 0 / 0 100vmax;}
.shell > .site-foot{margin-bottom:calc(-1 * var(--sp-13) + var(--sp-4));}
.site-foot :focus:not(:focus-visible){outline:none;}
.site-foot :focus-visible{outline:2px solid var(--blue); outline-offset:2px; border-radius:var(--r-1);}
.foot-top{display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:0 var(--sp-6);}
.foot-links{display:flex; flex-wrap:wrap; justify-content:center; gap:0 var(--sp-5); margin:0;}
/* Links in a list, not in a sentence, so each needs the 24px target WCAG
   2.5.8 asks for; keep that target as the surrounding spacing shrinks. */
.foot-links a{display:inline-flex; align-items:center; min-height:24px; color:inherit; font-size:inherit; padding:0;}
.foot-links a:hover{color:var(--ink); text-decoration:underline; text-underline-offset:3px;}
.foot-links a.foot-strong{color:var(--ink-soft); font-weight:var(--fw-semibold);}
.foot-bottom{min-height:24px;}
.foot-info{display:inline; margin:0;}
.foot-info > div{display:inline; white-space:nowrap;}
.foot-info > div:not(:last-child)::after{content:"·"; margin:0 .2em 0 .45em; white-space:normal;}
.foot-info dt, .foot-info dd{display:inline; margin:0; color:inherit; font-size:inherit; letter-spacing:normal;}
.foot-info dt{margin-right:.3em;}
/* a value longer than the line wraps; the pair stays one unit, its label on the value's first word
   (the UK address, 6 Oct, ran 26px past a 390px phone and the whole page scrolled sideways) */
.foot-info dd{white-space:normal;}

.tbd{border:0;}
.foot-contact{display:inline; padding:0; border:0;}
.foot-bottom > .foot-contact::before{content:"·"; margin:0 .45em;}
.foot-ch{display:inline;}
.foot-ch + .foot-ch::before{content:"·"; margin:0 .45em 0 .2em;}
/* The company name, phone number and email explain themselves visually;
   keep their full labels in the reading order without repeating them. */
.foot-bottom > .foot-info > div:first-child dt, .foot-ch-label{position:absolute;
  width:1px; height:1px; padding:0; margin:-1px; overflow:hidden;
  clip-path:inset(50%); white-space:nowrap;}
.foot-ch a{display:inline-flex; align-items:center; min-height:24px; color:inherit; font-size:inherit; font-weight:var(--fw-regular); padding:0;}
.foot-ch a:hover{color:var(--blue-deep); text-decoration:underline; text-underline-offset:3px;}
.foot-hours{color:inherit; font-size:inherit;}
.foot-hours::before{content:"·"; margin:0 .45em 0 .2em;}
.foot-copy{display:inline; margin:0; font-size:inherit; color:inherit;}
.foot-details{display:block; max-width:100%;}
.foot-details summary{display:inline-flex; align-items:center; gap:var(--sp-2); min-height:24px; cursor:pointer; list-style:none;}
.foot-details summary::-webkit-details-marker{display:none;}
.foot-details summary::after{content:""; width:5px; height:5px; border-right:1px solid currentColor; border-bottom:1px solid currentColor; transform:rotate(45deg); margin:0 var(--sp-2) var(--sp-2);}
.foot-details summary:hover{color:var(--ink);}
.foot-details[open]{flex-basis:100%;}
.foot-details[open] summary::after{transform:rotate(225deg); margin-bottom:0;}
.foot-details-body{padding:var(--sp-4) 0;}
.foot-details-body .foot-info{display:block;}
.foot-details-body .foot-note{display:block; margin:var(--sp-2) 0 0;}
.foot-note a{color:var(--muted); text-decoration:underline; text-underline-offset:2px;}
.foot-note a:hover{color:var(--ink);}
.foot-mono{font-family:inherit; font-variant-numeric:tabular-nums;}


/* ---- 5 · the example strip — what a page says when it shows the sample
   student, Boo, instead of the reader's own work (roadmap 31, decision 23:
   SJ, 2 October 2026). The app puts it at the top of the page's content
   (app/lib/sample.ts) wherever the reader has nothing of their own to show
   yet; its words are copy (sample.line), and a visitor's ends with the way
   in. Amber, like a note stuck on the page: it says "this is an example",
   not "something is wrong". */
.sample-strip{display:flex; flex-wrap:wrap; align-items:center; gap:var(--sp-3) var(--sp-6);
  margin:0 0 var(--sp-6); padding:var(--sp-4) var(--sp-6); border-radius:var(--r-3);
  border-left:4px solid var(--amber-gold); background:var(--amber-tint); color:var(--amber-deep);
  font-size:var(--ty-5); line-height:var(--lh-4);}
.sample-strip a{color:var(--amber-deep); font-weight:var(--fw-semibold); text-decoration:underline;
  text-underline-offset:3px; padding:var(--sp-1) 0;}
.sample-strip a:hover{color:var(--ink);}

/* ── THE BAR IS THE LANDING'S (4 October): the wordmark with the stream
   under it, the tabs as plain words centred, the way in a soft blue button.
   No discs, no drawings, no offset edges. ── */
.wordmark{display:inline-flex; align-items:center; gap:9px; white-space:nowrap; line-height:1; color:var(--ink);}
.wm-name{display:inline-flex; align-items:baseline; gap:5px;}
.wm-stream{position:relative; isolation:isolate; font-family:var(--font-head); font-weight:600; font-size:28px; letter-spacing:-.04em;}
.wm-school{font-family:var(--font-body); font-weight:600; font-size:24px; letter-spacing:-.04em; color:var(--boo-blue-deep);}
/* the logo's paper boat on its stream (6 October; drawn by
   tools/cast/draw.mjs into frame.js), centred on the words */
.wm-boat{flex:0 0 auto; align-self:center; width:52px; height:42px; overflow:visible;}
.topbar{min-height:72px;}
.topnav{gap:24px;}
.topnav a{padding:0 2px; font-weight:550;}
.top-nav{gap:40px;}
.top-tab{gap:0; padding:var(--sp-2) 0; border:0; border-radius:0; font-weight:550; color:var(--ink);}
.top-tab:hover, .top-tab:focus-visible{background:none; border-color:transparent; box-shadow:none; color:var(--blue);}
.top-join{gap:0; min-height:44px; padding:0 var(--sp-6); border-radius:12px; box-shadow:0 1px 2px #1d2b3a26;}
.top-join::after{display:none;}
@media (min-width:701px){
  .topbar .top-spacer{display:none;}
  .topnav{margin:0 auto;}
  .topbar:not(:has(.topnav)) .top-end{margin-left:auto;}
}
.topbar .wordmark{flex-wrap:wrap; align-content:center;}
@media (max-width:700px){
  .wordmark{gap:6px;}
  .wm-stream{font-size:22px;}
  .wm-school{font-size:19px;}
  .wm-boat{width:40px; height:34px;}
}

/* ---- the stream: the landing's sky behind the top of every page, fading to the page,
   drifting slowly and differently on each (frame.js picks the drift) ---- */
.sl-sky{position:absolute;z-index:-1;top:0;left:0;right:0;height:min(560px,75vh);overflow:hidden;pointer-events:none;-webkit-mask-image:linear-gradient(#000 30%,transparent);mask-image:linear-gradient(#000 30%,transparent)}
.sl-sky::before{content:'';position:absolute;inset:-8% -12%;background:var(--sl-sky) center top/cover no-repeat;transform-origin:var(--sky-o,50% 0);animation:sl-sky var(--sky-t,80s) ease-in-out calc(var(--sky-t,80s) * -.35) infinite alternate}
.sl-sky[data-v="1"]{--sky-t:44s;--sky-x:8%;--sky-y:2%;--sky-s0:1.04;--sky-s1:1.18;height:min(640px,82vh)}
.sl-sky[data-v="2"]{--sky-t:90s;--sky-x:-4%;--sky-y:2%}
.sl-sky[data-v="3"]{--sky-t:60s;--sky-x:3%;--sky-y:-2%;--sky-o:0 0}
.sl-sky[data-v="4"]{--sky-t:100s;--sky-x:-6%;--sky-y:1%;--sky-o:100% 0}
.sl-sky[data-v="5"]{--sky-t:75s;--sky-x:2%;--sky-y:3%}
.sl-sky[data-v="6"]{--sky-t:85s;--sky-x:-3%;--sky-y:-1%}
@keyframes sl-sky{from{transform:translate3d(calc(var(--sky-x,4%) * -1),0,0) scale(var(--sky-s0,1.02))}to{transform:translate3d(var(--sky-x,4%),var(--sky-y,0%),0) scale(var(--sky-s1,1.1))}}
@media (prefers-reduced-motion:reduce){.sl-sky::before{animation:none}}

/* ---- THE ONE BAR (frame.js BAR, Frame.tsx Bar, the landing's header) ---- */
/* the band under an open subnav: frame.js sets both from the open panel; shut, the band is nothing and the shade starts under the bar */
.sb{--sb-band-height:0px;--sb-band-bottom:72px;position:sticky;top:0;z-index:60;display:block;margin:0;padding:0 36px;background:var(--card);color:var(--ink)}
html:has(.sb){overflow-x:clip}
/* a product page's own ground would hide the sky behind it */
.pr:has(> .sl-sky),body:has(> .sl-sky) > .pr{background:transparent}
/* the setup bar: no tabs until setup ends, so the language stays in the bar on a phone */
.sb-setup .sb-menu{display:none}
.sb::before{content:'';position:absolute;z-index:-1;inset:0 calc(50% - 50vw);background:var(--card);box-shadow:0 1px 0 var(--border)}
.sb-in{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:var(--sp-6);max-width:1296px;height:72px;margin:0 auto}
.sb-logo{justify-self:start;display:inline-flex;align-items:center;min-height:44px;text-decoration:none;color:var(--ink)}
.sb .wm-name,.sb .wm-stream,.sb .wm-school{letter-spacing:0}
.sb-tabs{display:flex;align-items:center;justify-content:center;gap:22px}
/* a tab with a subnav is wrapped only to keep the two together: it takes no box, so every tab is the same flex item and the subnav still sits against the bar */
.sb-nav-item{display:contents}
.sb-tabs .sb-tab{position:relative;display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:4px 16px 6px;border-radius:var(--r-pill);color:var(--ink);font-size:var(--ty-7);font-weight:var(--fw-regular);line-height:27px;text-decoration:none;white-space:nowrap}
.sb-tabs .sb-tab:is(:hover,:focus-visible,[aria-expanded=true]){background:#f3f3f3;color:var(--ink)}
.sb-tabs .sb-tab[aria-current=page],.sb-tabs .sb-tab[aria-current=page]:is(:hover,:focus-visible,[aria-expanded=true]){background:#000;color:#fff}
.sb-band{position:absolute;inset:100% calc(50% - 50vw) auto;z-index:-1;height:var(--sb-band-height);background:var(--card);border-block:1px solid var(--border)}
.sb-subnav{position:absolute;top:100%;z-index:2;display:flex;flex-direction:column;align-items:flex-start;min-width:180px;max-width:calc(100vw - 40px);padding:16px 0;color:var(--ink)}
.sb-tabs .sb-subnav a{display:flex;align-items:center;min-height:44px;padding:8px 0;color:var(--ink);font-size:var(--ty-6);font-weight:var(--fw-regular);line-height:28px;text-decoration:none;white-space:nowrap}
.sb-tabs .sb-subnav a:hover,.sb-tabs .sb-subnav a[aria-current=page]{text-decoration:underline;text-underline-offset:4px}
.sb-nav-shade{position:fixed;inset:var(--sb-band-bottom) 0 0;z-index:-2;background:rgba(0,0,0,.5)}
.sb-band[hidden],.sb-nav-shade[hidden],.sb-subnav[hidden],.sb-sheet-sub[hidden]{display:none}
.sb-acts{justify-self:end;display:flex;align-items:center;gap:var(--sp-4)}
.sb-acts .lang-form,.sb-sheet .lang-form,.sb-out form{margin:0}
.sb-out:not(:empty){margin-top:var(--sp-1);padding-top:var(--sp-1);border-top:1px solid var(--border)}
.sb-lang,.sb-login{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;padding:var(--sp-2) var(--sp-3);border:0;border-radius:var(--r-pill);background:none;color:var(--ink-soft);font:inherit;font-size:var(--ty-6);font-weight:var(--fw-medium);text-decoration:none;white-space:nowrap;cursor:pointer}
.sb-lang{display:grid;place-items:center;flex:none;width:44px;height:44px;padding:0;border-radius:var(--r-round);color:var(--ink)}
.sb-lang-label{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.sb-lang:hover,.sb-login:hover{background:var(--neutral-tint);color:var(--ink)}
.sb-join{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:0 var(--sp-6);border-radius:var(--r-pill);background:#000;color:#fff;font-size:var(--ty-6);font-weight:var(--fw-medium);text-decoration:none;white-space:nowrap}
.sb-join:hover{background:#333}
.sb details{position:relative}
.sb summary{list-style:none;cursor:pointer}
.sb summary::-webkit-details-marker{display:none}
.sb-me summary{display:grid;place-items:center;width:44px;height:44px;border:0;border-radius:var(--r-round);background:none;color:var(--ink)}
.sb-me summary:hover{background:var(--neutral-tint)}
.sb-pop{position:absolute;right:0;top:calc(100% + 8px);z-index:61;display:flex;flex-direction:column;min-width:200px;padding:var(--sp-2);background:var(--card);border:1px solid var(--border);border-radius:var(--r-3);box-shadow:var(--lift-2)}
.sb-pop a,.sb-pop button{display:flex;align-items:center;justify-content:flex-start;min-height:44px;width:100%;padding:var(--sp-3) var(--sp-4);border:0;border-radius:var(--r-2);background:none;color:var(--ink);font:inherit;font-size:var(--ty-6);font-weight:var(--fw-medium);text-align:left;text-decoration:none;cursor:pointer}
.sb-pop a:hover,.sb-pop button:hover{background:var(--neutral-tint)}
.sb-menu{display:none}
.sb-menu summary,.sb-close{display:grid;place-items:center;flex:none;width:44px;height:44px;padding:0;border:0;border-radius:var(--r-round);background:none;color:var(--ink);cursor:pointer}
.sb-menu summary:hover,.sb-close:hover{background:var(--neutral-tint)}
.sb-sheet{position:fixed;inset:0;z-index:62;display:flex;flex-direction:column;min-width:0;height:100dvh;padding:0 28px max(28px,env(safe-area-inset-bottom));overflow-y:auto;overscroll-behavior:contain;background:var(--card);color:var(--ink)}
.sb-sheet-head{display:flex;align-items:center;justify-content:space-between;flex:none;height:72px;gap:var(--sp-4)}
.sb-sheet-tools{display:flex;align-items:center;gap:var(--sp-1)}
.sb-sheet-nav{display:flex;flex-direction:column;gap:var(--sp-1);padding:var(--sp-9) 0}
.sb-sheet-nav a{display:flex;align-items:center;min-height:52px;padding:var(--sp-3) 0;color:var(--ink);font-size:var(--ty-8);font-weight:var(--fw-semibold);line-height:var(--lh-3);text-decoration:none}
.sb-sheet-nav a:hover{color:var(--ink);text-decoration:underline;text-underline-offset:6px}
.sb-sheet-nav a[aria-current=page]{color:var(--ink);text-decoration:underline;text-underline-offset:8px;text-decoration-thickness:2px}
.sb-sheet-item{display:grid;grid-template-columns:minmax(0,1fr) 44px;align-items:start}
.sb-fold{display:grid;place-items:center;width:44px;height:52px;padding:0;border:0;background:none;color:var(--ink);cursor:pointer}
.sb-fold:hover{background:#f3f3f3;border-radius:var(--r-pill)}
.sb-fold svg{transform:rotate(90deg)}
.sb-fold[aria-expanded=true] svg{transform:rotate(-90deg)}
.sb-sheet-sub{grid-column:1/-1;display:flex;flex-direction:column;padding:0 0 16px 16px}
.sb-sheet-sub a{min-height:44px;padding:8px 0;font-size:var(--ty-6);font-weight:var(--fw-regular);line-height:28px}
.sb-sheet-account{display:flex;flex-direction:column;align-items:stretch;gap:var(--sp-2);margin-top:auto;padding-top:var(--sp-6);border-top:1px solid var(--border)}
.sb-sheet-account a:not(.sb-join),.sb-sheet-account button{display:flex;align-items:center;min-height:44px;width:100%;padding:var(--sp-3) 0;border:0;border-radius:0;background:none;box-shadow:none;color:var(--ink);font:inherit;font-size:var(--ty-7);font-weight:var(--fw-medium);text-align:left;text-decoration:none;cursor:pointer}
.sb-sheet-account a:not(.sb-join):hover,.sb-sheet-account button:hover{color:var(--blue-deep)}
.sb-sheet-account .sb-join{align-self:flex-start;min-width:120px;margin-top:var(--sp-2)}
.sb-sheet-account form{margin:0}
.sb :focus-visible{outline:2px solid var(--blue);outline-offset:3px;border-radius:var(--r-2)}
.sb summary:focus-visible,.sb-close:focus-visible,.sb-join:focus-visible{border-radius:var(--r-pill)}
/* Outrank the landing's historical transparent-header overrides, in this sheet only. */
.landing .sb.sb-light:not(.is-floating) :is(.wordmark,.sb-login,.sb-tabs a,.sb-acts>.lang-form .sb-lang),
.landing .sb.sb-light:not(.is-floating) :is(.wordmark,.sb-login,.sb-tabs a,.sb-acts>.lang-form .sb-lang):is(:hover,:focus-visible){color:var(--ink)}
.landing .sb.sb-light:not(.is-floating) .sb-tabs .sb-tab[aria-current=page],
.landing .sb.sb-light:not(.is-floating) .sb-tabs .sb-tab[aria-current=page]:is(:hover,:focus-visible,[aria-expanded=true]){color:#fff}
.landing .sb.sb-light:not(.is-floating) .wm-school{color:var(--boo-blue-deep)}
.landing .sb.sb-light:not(.is-floating) :is(.sb-logo,.sb-join):focus-visible{outline-color:var(--blue)}
@media (min-width:1440px){.sb{padding-inline:72px}}
@media (min-width:1024px) and (max-width:1199px){.sb{padding-inline:28px}.sb-in{gap:var(--sp-4)}.sb-tabs{gap:var(--sp-1)}.sb-tabs .sb-tab{padding-inline:var(--sp-3)}.sb-acts{gap:var(--sp-2)}}
@media (max-width:1023px), (hover:none) and (pointer:coarse){
  .sb{padding:0 28px}
  .sb-in{grid-template-columns:minmax(0,1fr) auto;gap:var(--sp-2)}
  .sb-tabs,.sb-acts>.sb-lang,.sb-acts>.lang-form,.sb-acts>.sb-login,.sb-acts>.sb-join,.sb-acts>.sb-me{display:none}
  .sb-acts{gap:var(--sp-2)}
  .sb-menu{display:block}
  .sb-setup .sb-menu{display:none}
  .sb-setup .sb-acts>.sb-me{display:block}
  .sb-setup .sb-acts>.sb-lang,.sb-setup .sb-acts>.lang-form{display:block}
}
@media (max-width:767px){.sb{padding-inline:20px}.sb-in,.sb-sheet-head{height:58px}.sb-sheet{padding-inline:20px}.sb-sheet-nav{padding-top:var(--sp-9)}.sb .wm-stream{font-size:var(--ty-8)}.sb .wm-school{font-size:var(--ty-7)}.sb .wm-boat{width:40px;height:34px}}
@media (max-width:359px){.sb,.sb-sheet{padding-inline:var(--sp-4)}.sb-sheet-head .wm-boat{width:32px;height:28px}.sb-sheet-head .wordmark{gap:var(--sp-1)}.sb-sheet-tools{gap:0}}
@media (prefers-reduced-motion:no-preference){.sb-tabs .sb-tab,.sb-lang,.sb-login,.sb-close,.sb-menu summary{transition:background-color .16s ease-out,color .16s ease-out}.sb-subnav{animation:sb-sub-enter .2s ease-out}.sb-fold svg{transition:transform .16s ease-out}}
@keyframes sb-sub-enter{from{opacity:0}to{opacity:1}}
