/* siep.academy: style F ("marker on paper"). Sage paper ground, ink-outlined
   paper cards with solid offset shadows, a tomato pen, a mustard highlighter,
   handwritten notes and the magpie. Shared by the server-rendered pages
   (homepage + /app) and the static legal pages. Tokens mirror the scene
   library's theme "f" (apps/academy/scenes/library.json) so the lesson
   player and the page around it are one surface. */

:root {
  --bg: #E4ECE3; --paper: #FFFFFF; --ink: #1E2721; --shadow: #1E2721;
  --tomato: #E9542F; --mustard: #F2B33D; --teal: #2A8C82; --muted: #5E6B63;
  --bubble: #EEF2EC; --on-tomato: #FFFFFF; --swipe: rgba(242, 179, 61, .55);
  --line: rgba(30, 39, 33, .16); --bird-rim: transparent; --grain: .07;
  /* Scene player chrome tokens (player/scene-player.css reads these). */
  --surface: var(--paper); --accent: var(--tomato); --on-accent: var(--on-tomato);
  --accent-soft: #FCEBD0; --good: var(--teal); --good-soft: #DDEFEC;
  --bad: var(--tomato); --bad-soft: #FBE2DA;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #161D18; --paper: #243029; --ink: #E6EEE7; --shadow: #050806;
    --tomato: #FF7552; --mustard: #F5C15A; --teal: #4DB5A9; --muted: #9DAAA1;
    --bubble: #2F3D34; --on-tomato: #161D18; --swipe: rgba(245, 193, 90, .40);
    --line: rgba(230, 238, 231, .14); --bird-rim: rgba(230, 238, 231, .45); --grain: .05;
    --accent-soft: #3A3524; --good-soft: #1E3834; --bad-soft: #3E2620;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #161D18; --paper: #243029; --ink: #E6EEE7; --shadow: #050806;
  --tomato: #FF7552; --mustard: #F5C15A; --teal: #4DB5A9; --muted: #9DAAA1;
  --bubble: #2F3D34; --on-tomato: #161D18; --swipe: rgba(245, 193, 90, .40);
  --line: rgba(230, 238, 231, .14); --bird-rim: rgba(230, 238, 231, .45); --grain: .05;
  --accent-soft: #3A3524; --good-soft: #1E3834; --bad-soft: #3E2620;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.55 'Instrument Sans', system-ui, -apple-system, sans-serif;
  min-height: 100dvh; overflow-x: hidden;
}
/* Paper grain: a fixed turbulence tile over everything, never catching taps. */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100;
  opacity: var(--grain); mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
:root[data-theme="dark"] body::after { mix-blend-mode: screen; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body::after { mix-blend-mode: screen; } }

a { color: inherit; }
img, svg { max-width: 100%; }
h1, h2, h3 { font-family: 'Bricolage Grotesque', system-ui, sans-serif; letter-spacing: -.02em; margin: 0; text-wrap: balance; }
p { margin: 0; }
.wrap { max-width: 1120px; margin: 0 auto; padding-inline: 16px; }
@media (min-width: 720px) { .wrap { padding-inline: 28px; } }

/* --- bits ------------------------------------------------------------- */
.hand { font-family: 'Shantell Sans', 'Comic Neue', cursive; font-weight: 600; letter-spacing: 0; }
.note { font-family: 'Shantell Sans', cursive; font-weight: 600; color: var(--tomato); font-size: 17px; line-height: 1.2; display: inline-block; transform: rotate(-4deg); }
.hl { background: linear-gradient(100deg, transparent .2em, var(--swipe) .25em, var(--swipe) calc(100% - .25em), transparent calc(100% - .2em)) 0 62% / 100% 70% no-repeat; padding: 0 .1em; margin: 0 -.1em; white-space: nowrap; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.ringed { position: relative; white-space: nowrap; }
.ringed::after {
  content: ""; position: absolute; inset: -.18em -.32em -.12em -.3em; pointer-events: none;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 80' preserveAspectRatio='none'><path d='M 150 9 C 95 -2 18 6 8 36 C 0 62 64 76 118 72 C 176 68 200 50 190 28 C 182 12 150 6 112 8' fill='none' stroke='%23E9542F' stroke-width='4.5' stroke-linecap='round' vector-effect='non-scaling-stroke'/></svg>") center / 100% 100% no-repeat;
}
.eyebrow { font: 700 12.5px/1 'Instrument Sans', sans-serif; letter-spacing: .1em; text-transform: uppercase; color: var(--teal); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 12.5px; color: var(--muted); }

.card {
  background: var(--paper); border: 2px solid var(--ink); border-radius: 18px;
  box-shadow: 6px 6px 0 var(--shadow); padding: 20px;
}
.card.flat { box-shadow: 3px 3px 0 var(--shadow); }
.tilt-l { transform: rotate(-1.2deg); }
.tilt-r { transform: rotate(1deg); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 24px; border-radius: 999px; border: 2px solid var(--ink);
  font: 700 17px/1 'Bricolage Grotesque', system-ui, sans-serif; letter-spacing: -.01em;
  text-decoration: none; cursor: pointer; background: var(--paper); color: var(--ink);
  box-shadow: 4px 4px 0 var(--shadow); transition: transform .12s ease, box-shadow .12s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--shadow); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--shadow); }
.btn:focus-visible { outline: 3px solid var(--mustard); outline-offset: 3px; }
.btn:disabled { opacity: .55; cursor: default; transform: none; }
.btn-tomato { background: var(--tomato); color: var(--on-tomato); }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 15px; box-shadow: 3px 3px 0 var(--shadow); }
.btn-block { display: flex; width: 100%; }
.link { font-weight: 600; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; text-decoration-color: var(--tomato); }

.badge-store { display: inline-block; line-height: 0; }
.badge-store img { height: 48px; width: auto; }
.badge-store.soon { display: inline-flex; align-items: center; gap: 8px; line-height: 1.2; }
.badge-store.soon img { filter: grayscale(1); opacity: .55; }
.badge-store.soon .note { white-space: nowrap; font-size: 15px; }

/* The magpie (inline SVG, see pages/layout.py magpie()). */
.magpie { display: block; overflow: visible; }
.magpie .mp-bird { fill: #15181B; }
.magpie .mp-white { fill: #FFFFFF; }
.magpie .mp-tail { fill: #1F5B57; }
.magpie .mp-legs { stroke: #15181B; stroke-width: 2.2; fill: none; stroke-linecap: round; }
.magpie .mp-rim { stroke: var(--bird-rim); stroke-width: 1.4; }
.magpie .mp-marker { fill: var(--tomato); }
@media (prefers-reduced-motion: no-preference) {
  .magpie.bob .mp-head { animation: mp-peck 5.5s ease-in-out infinite; transform-box: fill-box; transform-origin: 60% 60%; }
}
@keyframes mp-peck { 0%, 70%, 100% { transform: rotate(0); } 76% { transform: rotate(-12deg); } 84% { transform: rotate(4deg); } 90% { transform: rotate(-3deg); } }

/* --- site header / footer ---------------------------------------------- */
.site-head { display: flex; align-items: center; gap: 14px; padding-block: 18px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.logo .magpie { width: 58px; }
.logo .word { font: 800 27px/1 'Bricolage Grotesque', sans-serif; letter-spacing: -.03em; }
.site-head nav { margin-left: auto; display: flex; align-items: center; gap: 20px; }
.site-head nav a.plain { text-decoration: none; font-weight: 600; color: var(--muted); }
.site-head nav a.plain:hover { color: var(--ink); }
@media (max-width: 640px) { .site-head nav a.plain { display: none; } .logo .magpie { width: 48px; } .logo .word { font-size: 24px; } }

.site-foot { margin-top: 72px; border-top: 2px solid var(--ink); padding: 26px 0 40px; }
.site-foot .row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; }
.site-foot a { text-decoration: none; font-weight: 600; }
.site-foot a:hover { text-decoration: underline; }
.site-foot .spacer { flex: 1; }
.site-foot .magpie { width: 44px; }

/* --- homepage ---------------------------------------------------------- */
.hero { display: grid; gap: 40px; align-items: start; padding-block: 28px 24px; }
@media (min-width: 940px) { .hero { grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: 56px; padding-block-start: 44px; } }
.hero h1 { font-size: clamp(40px, 7.4vw, 72px); line-height: .98; font-weight: 800; letter-spacing: -.035em; margin-top: 14px; }
.hero .lede { font-size: clamp(17px, 2.1vw, 19.5px); margin-top: 22px; max-width: 34em; }
.hero .lede b { font-weight: 700; }
.hero .ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 18px; margin-top: 30px; }
.hero .fine { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.hero .fine span { display: inline-flex; align-items: center; gap: 6px; font-size: 14.5px; color: var(--muted); font-weight: 600; }
.hero .fine svg { width: 18px; height: 18px; color: var(--teal); }
.expand { font-family: 'Shantell Sans', cursive; font-weight: 600; font-size: 18px; color: var(--muted); }
.expand b { color: var(--tomato); font-weight: 700; }

.demo { position: relative; padding-top: 54px; max-width: 460px; width: 100%; justify-self: center; }
.demo .perch { position: absolute; right: 26px; top: 12px; width: 92px; z-index: 3; }
.demo .demo-note { position: absolute; left: 6px; top: 6px; z-index: 3; font-size: 18px; }
.demo .demo-note svg { position: absolute; left: 100%; top: 14px; width: 64px; height: 30px; margin-left: 2px; overflow: visible; }
.demo .demo-note svg path { fill: none; stroke: var(--tomato); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.demo .after { margin-top: 18px; display: flex; align-items: center; gap: 14px; }
.player-slot { min-height: 560px; position: relative; }
.player-slot .loading { position: absolute; inset: 0; display: grid; place-items: center; background: var(--paper); border: 2px solid var(--ink); border-radius: 20px; box-shadow: 6px 6px 0 var(--shadow); font-family: 'Shantell Sans', cursive; color: var(--muted); }

/* The lesson player, dressed as a paper card. */
.siep-player { border: 2px solid var(--ink) !important; border-radius: 20px !important; box-shadow: 6px 6px 0 var(--shadow); position: relative; z-index: 2; }
.siep-player .sp-canvas { border: 1.5px solid var(--line); }
.siep-player .sp-dots button.on { background: var(--tomato); }
.siep-player .sp-btn { border: 2px solid var(--ink); font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 15px; box-shadow: 3px 3px 0 var(--shadow); }
.siep-player .sp-btn:active:not(:disabled) { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--shadow); }
.siep-player .sp-btn:disabled { box-shadow: none; }
.siep-player .sp-choices button { border: 2px solid var(--ink); box-shadow: 2px 2px 0 var(--shadow); }
.siep-player .sp-choices button.wrong { box-shadow: none; }
.siep-player .sp-prompt { color: var(--ink); background: var(--accent-soft); border: 1.5px dashed var(--mustard); }

.strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 44px 0 0; }
.strip .card { padding: 16px 14px; text-align: center; }
.strip .num { font: 800 clamp(30px, 6vw, 46px)/1 'Bricolage Grotesque', sans-serif; letter-spacing: -.03em; }
.strip .lbl { font-size: 14px; color: var(--muted); font-weight: 600; margin-top: 6px; }
.strip .card:nth-child(1) { transform: rotate(-1.5deg); }
.strip .card:nth-child(3) { transform: rotate(1.2deg); }
.strip .card:nth-child(2) .num { color: var(--tomato); }

.section { padding-top: 88px; }
.section-head { max-width: 40em; margin-bottom: 30px; }
.section-head h2 { font-size: clamp(30px, 4.6vw, 46px); line-height: 1.02; font-weight: 800; margin-top: 10px; }
.section-head p { margin-top: 14px; font-size: 17.5px; color: var(--muted); }

.angles { display: grid; gap: 22px; }
@media (min-width: 820px) { .angles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.angle { position: relative; padding-top: 30px; }
.angle .tab { position: absolute; top: -16px; left: 18px; border: 2px solid var(--ink); border-radius: 10px; padding: 6px 12px; font: 800 17px/1 'Bricolage Grotesque', sans-serif; box-shadow: 3px 3px 0 var(--shadow); color: #1E2721; }
.angle.use .tab { background: var(--mustard); transform: rotate(-3deg); }
.angle.share .tab { background: var(--teal); color: #FFFFFF; transform: rotate(2deg); }
.angle.handle .tab { background: var(--tomato); color: #FFFFFF; transform: rotate(-2deg); }
.angle h3 { font-size: 22px; line-height: 1.15; }
.angle p { margin-top: 10px; color: var(--muted); }
.angle ul { list-style: none; margin: 16px 0 0; padding: 14px 0 0; border-top: 1.5px dashed var(--line); display: grid; gap: 8px; }
.angle li { font-weight: 600; font-size: 15px; display: flex; gap: 8px; align-items: baseline; }
.angle li::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; border: 2px solid var(--ink); transform: translateY(-1px); }

.how { display: grid; gap: 22px; counter-reset: how; }
@media (min-width: 820px) { .how { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.how .card { display: grid; gap: 12px; align-content: start; }
.how .n { width: 46px; height: 46px; display: grid; place-items: center; font: 800 22px/1 'Bricolage Grotesque', sans-serif; position: relative; }
.how .n::before { content: ""; position: absolute; inset: -4px; background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 50 50'><path d='M 34 5 C 16 0 3 12 5 27 C 7 43 30 49 42 38 C 51 29 47 10 30 6' fill='none' stroke='%23E9542F' stroke-width='3' stroke-linecap='round'/></svg>") center / contain no-repeat; }
.how h3 { font-size: 21px; }
.how p { color: var(--muted); font-size: 15.5px; }
.how .vis { background: var(--bubble); border-radius: 12px; padding: 14px; min-height: 92px; display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.chip { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper); padding: 6px 12px; font-weight: 600; font-size: 14px; box-shadow: 2px 2px 0 var(--shadow); }
.chip.right { background: var(--good-soft); border-color: var(--teal); }
.chip.wrong { color: var(--muted); text-decoration: line-through; box-shadow: none; border-color: var(--line); }
.days { display: flex; gap: 6px; align-items: flex-end; }
.days i { display: block; width: 18px; border-radius: 5px 5px 2px 2px; border: 2px solid var(--ink); background: var(--paper); }
.days i.on { background: var(--mustard); }
.ringdots { display: flex; gap: 10px; align-items: center; }
.ringdots span { width: 30px; height: 30px; border-radius: 50%; border: 5px solid var(--line); }
.ringdots span.on { border-color: var(--tomato); }
.ringdots em { font-style: normal; font-size: 13px; color: var(--muted); font-weight: 600; }

.topics-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
@media (min-width: 720px) { .topics-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; } }
.topic {
  position: relative; display: block; text-decoration: none; background: var(--paper); border: 2px solid var(--ink);
  border-radius: 14px; padding: 14px 14px 12px 20px; box-shadow: 3px 3px 0 var(--shadow);
  transition: transform .12s ease, box-shadow .12s ease; overflow: hidden; min-height: 88px;
}
.topic::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 8px; background: var(--c, var(--mustard)); border-right: 2px solid var(--ink); }
.topic:hover { transform: translate(-2px, -2px) rotate(-.6deg); box-shadow: 5px 5px 0 var(--shadow); }
.topic:focus-visible { outline: 3px solid var(--mustard); outline-offset: 3px; }
.topic .name { font: 700 17.5px/1.15 'Bricolage Grotesque', sans-serif; letter-spacing: -.01em; }
.topic .meta { font-size: 13px; color: var(--muted); margin-top: 4px; font-weight: 600; }
.topic .teaser { font-size: 13.5px; margin-top: 8px; line-height: 1.35; color: var(--ink); opacity: .85; }
.topic:nth-child(3n+1) { --c: var(--mustard); }
.topic:nth-child(3n+2) { --c: var(--teal); }
.topic:nth-child(3n) { --c: var(--tomato); }
.topic .bar { margin-top: 10px; }
/* Cover cards: the topic's lesson scene on top, the colour strip becomes a
   band under it (same order as the app's home grid). */
.topic.has-cover { padding: 0; min-height: 0; }
.topic.has-cover::before { display: none; }
.topic .topic-cover { display: block; width: 100%; height: auto; aspect-ratio: 1; background: #E4ECE3; }
.topic .band { height: 8px; background: var(--c, var(--mustard)); border-block: 2px solid var(--ink); }
.topic.has-cover .body { padding: 12px 14px 14px; }

.magpie-sec { display: grid; gap: 26px; align-items: center; }
@media (min-width: 820px) { .magpie-sec { grid-template-columns: 300px minmax(0, 1fr); gap: 48px; } }
.magpie-stage { position: relative; padding-top: 86px; max-width: 340px; width: 100%; }
.magpie-stage .big { position: absolute; width: 190px; right: 40px; top: 0; z-index: 2; }
.magpie-stage .note { position: absolute; left: 0; top: 12px; }
.magpie-stage .card { padding: 22px 20px; transform: rotate(-2deg); font: 800 21px/1.2 'Bricolage Grotesque', sans-serif; text-align: center; }
.magpie-stage .card .hand { display: block; font-size: 14px; color: var(--muted); margin-bottom: 8px; font-weight: 600; }
.magpie-sec h2 { font-size: clamp(28px, 4.2vw, 42px); line-height: 1.05; }
.magpie-sec p { margin-top: 14px; font-size: 17.5px; color: var(--muted); max-width: 34em; }

.final { margin-top: 96px; position: relative; text-align: center; padding: 44px 22px 40px; }
.final h2 { font-size: clamp(30px, 5vw, 50px); line-height: 1.02; font-weight: 800; }
.final p { margin: 14px auto 0; max-width: 32em; color: var(--muted); font-size: 17.5px; }
.final .ctas { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 16px 22px; margin-top: 28px; }
.final .perch { position: absolute; width: 90px; right: 36px; top: -41px; }
@media (max-width: 640px) { .final .perch { right: 18px; width: 76px; top: -34px; } }

/* --- web app ----------------------------------------------------------- */
.app-main { max-width: 760px; margin: 0 auto; padding: 4px 16px 60px; }
@media (min-width: 720px) { .app-main { padding-inline: 28px; } }
.app-main.wide { max-width: 1040px; }
.crumb { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-weight: 700; color: var(--muted); margin: 6px 0 14px; }
.crumb:hover { color: var(--ink); }
.crumb svg { width: 18px; height: 18px; }
.hello h1 { font-size: clamp(30px, 5vw, 42px); line-height: 1.05; font-weight: 800; }
.hello p { margin-top: 8px; color: var(--muted); }
.panel-row { display: grid; gap: 18px; margin-top: 24px; }
@media (min-width: 720px) { .panel-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.slots { display: flex; gap: 10px; margin-top: 14px; }
.slot { flex: 1; min-width: 0; border: 2px dashed var(--ink); border-radius: 12px; padding: 10px; min-height: 74px; display: flex; flex-direction: column; justify-content: space-between; gap: 6px; font-size: 13px; }
.slot.used { border-style: solid; background: var(--bubble); text-decoration: none; }
.slot.used:hover { background: var(--accent-soft); }
.slot b { font: 800 20px/1 'Bricolage Grotesque', sans-serif; }
.slot .t { font-weight: 600; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.slot.free { color: var(--muted); align-items: flex-start; }
.bar { height: 12px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--teal); border-right: 2px solid var(--ink); }
.bar.thin { height: 8px; border-width: 1.5px; }
.bar.thin > i { border-right-width: 1.5px; }
.bar > i[style*="width:0%"] { border-right: 0; }
.bignum { font: 800 40px/1 'Bricolage Grotesque', sans-serif; letter-spacing: -.03em; }
.continue { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.continue .grow { flex: 1; min-width: 0; }
.continue h3 { font-size: 20px; line-height: 1.15; }
.play-dot { flex: none; width: 52px; height: 52px; border-radius: 50%; background: var(--tomato); border: 2px solid var(--ink); display: grid; place-items: center; box-shadow: 3px 3px 0 var(--shadow); color: var(--on-tomato); }
.play-dot svg { width: 22px; height: 22px; margin-left: 3px; }
.h-sec { font: 800 24px/1.1 'Bricolage Grotesque', sans-serif; margin: 40px 0 16px; display: flex; align-items: baseline; gap: 12px; }
.h-sec .note { font-size: 15px; }

.lesson-list { display: grid; gap: 12px; margin-top: 18px; }
.lrow { display: flex; align-items: center; gap: 14px; text-decoration: none; background: var(--paper); border: 2px solid var(--ink); border-radius: 14px; padding: 14px 16px; box-shadow: 3px 3px 0 var(--shadow); transition: transform .12s ease, box-shadow .12s ease; }
a.lrow:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--shadow); }
.lrow.locked { box-shadow: none; border-style: dashed; opacity: .85; }
.lrow .idx { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--ink); display: grid; place-items: center; font: 800 15px/1 'Bricolage Grotesque', sans-serif; }
.lrow.done .idx { background: var(--teal); color: #FFFFFF; }
.lrow .idx svg { width: 17px; height: 17px; }
.lrow .grow { flex: 1; min-width: 0; }
.lrow .t { font: 700 17px/1.2 'Bricolage Grotesque', sans-serif; }
.lrow .m { font-size: 13px; color: var(--muted); margin-top: 3px; font-weight: 600; }
.lrow .m .tag { margin-right: 6px; }
.tag { flex: none; display: inline-block; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; border: 1.5px solid var(--ink); white-space: nowrap; }
.tag.use { background: var(--mustard); color: #1E2721; }
.tag.share { background: var(--teal); color: #FFFFFF; }
.tag.handle { background: var(--tomato); color: #FFFFFF; }
.tag.plain { background: var(--bubble); }
.lock { width: 18px; height: 18px; color: var(--muted); flex: none; }

.lesson-wrap { max-width: 480px; margin: 0 auto; }
.lesson-wrap .player-slot { min-height: 600px; }
.done-card { margin-top: 22px; display: grid; gap: 12px; }
.done-card h3 { font-size: 22px; }
.cover { text-align: center; padding: 28px 22px; margin-top: 60px; position: relative; }
.cover .perch { position: absolute; width: 86px; left: 50%; top: -39px; transform: translateX(-50%); }
.cover h1 { font-size: 30px; line-height: 1.08; margin-top: 10px; }
.cover .uses { margin: 18px auto 0; max-width: 24em; }

.wall { text-align: center; padding: 34px 22px 30px; margin-top: 64px; position: relative; }
.wall h1 { font-size: clamp(28px, 5vw, 38px); line-height: 1.05; font-weight: 800; }
.wall p { margin: 14px auto 0; max-width: 30em; color: var(--muted); font-size: 17px; }
.wall .perch { position: absolute; width: 96px; left: 50%; top: -43px; transform: translateX(-50%); }
.wall .plans { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.wall .store { margin-top: 24px; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 16px; }

.login { max-width: 440px; margin: 0 auto; padding-top: 28px; }
.login .card { position: relative; padding: 30px 22px 22px; margin-top: 64px; }
.login .perch { position: absolute; width: 96px; right: 28px; top: -43px; }
.login h1 { font-size: 32px; line-height: 1.05; font-weight: 800; }
.login .sub { margin-top: 10px; color: var(--muted); }
.login .btns { display: grid; gap: 12px; margin-top: 22px; }
.err { color: var(--tomato); font-weight: 600; font-size: 14.5px; min-height: 20px; margin-top: 12px; }

.legal { max-width: 720px; }
.legal h1 { font-size: clamp(32px, 5vw, 44px); line-height: 1.05; margin-top: 18px; }
.legal h2 { font-size: 21px; margin-top: 30px; }
.legal p, .legal li { color: var(--ink); }
.legal p { margin-top: 10px; }
.legal ul { padding-left: 20px; }
.legal li { margin-top: 6px; }
.legal .card { margin-top: 26px; }

/* --- the nest (daily practice) ------------------------------------------ */
.how .vis img { width: 180px; height: auto; }
.shine-mini { display: grid; justify-items: center; gap: 6px; }
.shine-mini b { font: 800 30px/1 'Bricolage Grotesque', sans-serif; }
.shine-mini .bar { width: 150px; height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.shine-mini .bar i { display: block; height: 100%; background: var(--mustard); border-radius: 4px; }
.shine-mini em { font-style: normal; font-size: 13px; color: var(--muted); font-weight: 600; }
.nest-sec { display: grid; gap: 34px; align-items: center; }
@media (min-width: 940px) { .nest-sec { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; } }
.nest-sec h2 { font-size: clamp(30px, 4.6vw, 46px); line-height: 1.02; font-weight: 800; margin-top: 10px; }
.nest-sec > div > p { margin-top: 14px; font-size: 17.5px; color: var(--muted); max-width: 34em; }
.nest-points { margin: 18px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; max-width: 34em; }
.nest-points li { padding-left: 28px; position: relative; font-size: 16.5px; }
.nest-points li::before { content: ""; position: absolute; left: 0; top: .28em; width: 16px; height: 16px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path d='M10 1 Q12 8 19 10 Q12 12 10 19 Q8 12 1 10 Q8 8 10 1 Z' fill='%23F2B33D' stroke='%231E2721' stroke-width='1.6' stroke-linejoin='round'/></svg>") center / contain no-repeat; }
.nest-stage { display: grid; gap: 22px; }
.nest-states { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.nest-states figure { margin: 0; display: grid; justify-items: center; gap: 6px; text-align: center; }
.nest-states img { width: 100%; height: auto; }
.nest-states figcaption { font-size: 13px; color: var(--muted); line-height: 1.3; }
.nest-states figcaption b { display: block; color: var(--ink); font-size: 14.5px; }
.practice-mock { position: relative; display: grid; gap: 10px; }
.practice-mock .pm-head { display: flex; justify-content: space-between; align-items: center; }
.practice-mock .tab { font-weight: 700; font-size: 13px; background: var(--accent-soft); padding: 3px 10px; border-radius: 8px; }
.practice-mock .pm-count { font-size: 13px; color: var(--muted); font-weight: 600; }
.practice-mock h3 { font-size: 21px; line-height: 1.15; }
.practice-mock .pm-opt { border: 2px solid var(--ink); border-radius: 14px; padding: 11px 14px; font-weight: 600; box-shadow: 2px 2px 0 var(--shadow); background: var(--paper); display: flex; gap: 8px; align-items: center; }
.practice-mock .pm-opt.right { border-color: var(--teal); background: var(--good-soft); }
.practice-mock .pm-opt svg { width: 18px; height: 18px; color: var(--teal); }
.practice-mock .pm-note { position: absolute; right: 16px; bottom: -14px; background: var(--bg); padding: 0 6px; }
