/* Riso x Night: the Lockdin look, shared by the site and every course (the player injects this file into course bundles).
   Day = two-ink risograph on paper (blue + fluo pink, halftone, misprint). Night = terminal with paper scraps (phosphor = live).
   Rules: misprint offset = raised; halftone = quantity; data colour = live only; torn scrap + tape = the learner's own things;
   mono = numbers and labels. Type (2026-11-24): Dela Gothic One headlines, Onest interface, Gelasio course titles and reading,
   Martian Mono (narrowed to 87.5% width) numbers and labels. */
:root {
  font-stretch: 87.5%;
  --f-head: "Dela Gothic One", "Arial Black", system-ui, sans-serif;
  --f-ui: "Onest", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --f-display: "Onest", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --f-cut: "Gelasio", "Iowan Old Style", Georgia, serif;
  --f-mono: "Martian Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --f-body: "Gelasio", "Iowan Old Style", Georgia, serif;
  --r: 6px; --r-sm: 4px;
  --bg: #f4f1ea; --surface: #fffdf8; --surface-2: #ece7dc; --surface-3: #e3dccd; --ink: #1c1b22; --ink-2: #55525e; --ink-3: #625d6b;
  --line: #d9d2c3; --line-2: #c6bda9; --accent: #0078bf; --accent-2: #005e96; --accent-ink: #ffffff; --accent-soft: #dcebf6;
  --brass: #c2187e; --brass-soft: #ffe1f1; --good: #1f7a4d; --good-soft: #dcefe2; --bad: #c8321f; --bad-soft: #fbe0dc;
  --warn: #8a6a00; --warn-soft: #fff4a3; --info: #3d2c8d; --info-soft: #e6e1f7;
  --rail: #0078bf; --rail-ink: #ffffff; --rail-ink-2: #cfe6f5; --rail-hi: #0a68a6;
  --c0: #0078bf; --c1: #ff48b0; --c2: #3d2c8d; --c3: #00a95c; --c4: #ff6c2f; --c5: #1f7a4d; --c6: #b8860b;
  --plate: #ff48b0; --data: #0078bf; --hi: #ffe800; --scrap: #fffdf8; --scrap-ink: #1c1b22; --tape: rgba(246, 232, 184, .85);
  --grain-op: .09; --grain-blend: multiply; --scan: transparent;
  --shadow: none; color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
  --bg: #0e1412; --surface: #131d1a; --surface-2: #18241f; --surface-3: #1f2e28; --ink: #e9f3ec; --ink-2: #a9bcb3; --ink-3: #8fa39a;
  --line: #24332d; --line-2: #31443c; --accent: #7cffb2; --accent-2: #a6ffcb; --accent-ink: #0e1412; --accent-soft: #16362a;
  --brass: #ff5dba; --brass-soft: #3a1530; --good: #7cffb2; --good-soft: #143327; --bad: #ff8a7a; --bad-soft: #3d1d1a;
  --warn: #ffb547; --warn-soft: #3a2b12; --info: #b48cff; --info-soft: #241b3d;
  --rail: #0a0f0d; --rail-ink: #e9f3ec; --rail-ink-2: #8fa39a; --rail-hi: #16241f;
  --c0: #7cffb2; --c1: #ff5dba; --c2: #b48cff; --c3: #ffb547; --c4: #5cc8ff; --c5: #e9f3ec; --c6: #ffe800;
  --plate: #ff5dba; --data: #7cffb2; --hi: #ffb547; --scrap: #ede6d6; --scrap-ink: #1b1a17; --tape: rgba(246, 232, 184, .7);
  --grain-op: .07; --grain-blend: screen; --scan: rgba(124, 255, 178, .025);
  --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1412; --surface: #131d1a; --surface-2: #18241f; --surface-3: #1f2e28; --ink: #e9f3ec; --ink-2: #a9bcb3; --ink-3: #8fa39a;
  --line: #24332d; --line-2: #31443c; --accent: #7cffb2; --accent-2: #a6ffcb; --accent-ink: #0e1412; --accent-soft: #16362a;
  --brass: #ff5dba; --brass-soft: #3a1530; --good: #7cffb2; --good-soft: #143327; --bad: #ff8a7a; --bad-soft: #3d1d1a;
  --warn: #ffb547; --warn-soft: #3a2b12; --info: #b48cff; --info-soft: #241b3d;
  --rail: #0a0f0d; --rail-ink: #e9f3ec; --rail-ink-2: #8fa39a; --rail-hi: #16241f;
  --c0: #7cffb2; --c1: #ff5dba; --c2: #b48cff; --c3: #ffb547; --c4: #5cc8ff; --c5: #e9f3ec; --c6: #ffe800;
  --plate: #ff5dba; --data: #7cffb2; --hi: #ffb547; --scrap: #ede6d6; --scrap-ink: #1b1a17; --tape: rgba(246, 232, 184, .7);
  --grain-op: .07; --grain-blend: screen; --scan: rgba(124, 255, 178, .025);
  --shadow: none; color-scheme: dark;
}

/* texture: paper grain by day, grain + faint scanlines by night */
body { font-family: var(--f-ui); background-image: repeating-linear-gradient(0deg, var(--scan) 0 1px, transparent 1px 4px); }
body::after { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 2147483000; opacity: var(--grain-op); mix-blend-mode: var(--grain-blend); background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 1.4 -.2'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E"); }
body.player::after { display: none; }
::selection { background: var(--plate); color: #1c1b22; }

/* type */
h1 { font-family: var(--f-head); font-weight: 400; letter-spacing: -.015em; }
.hero h1, .onb-head h1 { text-shadow: 3px 2px 0 color-mix(in srgb, var(--plate) 55%, transparent); }
.hero h1 em, h1 em { font-family: var(--f-cut); font-style: italic; font-weight: 400; color: var(--brass); text-shadow: none; letter-spacing: 0; }
h2.eyebrow, .onb-head .eyebrow, .kpi .l, .pl-row .k, .dots li span, .lv > span, .pill, .rank-chip { font-family: var(--f-mono); }
h2.eyebrow, .onb-head .eyebrow { font-size: 11.5px; letter-spacing: .14em; }
.kpi .v, .steps .num, .timer, .brk-time, .faint b { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.prose, .lede, .steps .card p { font-family: var(--f-body); }

/* the mark: blue square with a pink plate printed off-register */
.mark { border-radius: 4px; box-shadow: 3px 3px 0 var(--plate); }

/* misprint = raised: primary buttons and the main mark carry a pink plate 3-4 px off */
.btn { border-radius: 4px; font-family: var(--f-ui); }
.btn.primary { box-shadow: 3px 3px 0 var(--plate); transition: transform .08s, box-shadow .08s; }
@media (hover: hover) and (pointer: fine) { .btn.primary:hover { filter: none; transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--plate); } }
.btn.primary:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--plate); }
.btn.primary[disabled] { box-shadow: none; transform: none; }
.btn.brass { color: #fff; }
.in, .seg, .tile, .quiz, .slot, .lcard, .lv, .msg { border-radius: 4px; }
.seg button[aria-pressed="true"] { box-shadow: inset 0 -3px 0 var(--plate); }
.pick { border-radius: 999px; }
.pick[aria-pressed="true"] { background: var(--info); border-color: var(--info); color: #fff; }
:root[data-theme="dark"] .pick[aria-pressed="true"] { color: #0e1412; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pick[aria-pressed="true"] { color: #0e1412; } }
.tile[aria-checked="true"] { box-shadow: 3px 3px 0 var(--plate); border-color: var(--accent); background: var(--surface); }

/* cards: flat print, no soft shadows */
.card, .plan { border-radius: 6px; box-shadow: none; }
.pill { border-radius: 2px; font-size: 10.5px; letter-spacing: .1em; }
.pill.school { background: var(--brass-soft); color: var(--brass); }

/* halftone = quantity: progress tracks are dot screens, the fill is solid ink with the pink plate peeking out */
.bar, .stack-art .bar { border-radius: 0; height: 10px; background: radial-gradient(circle, var(--line-2) 1.1px, transparent 1.4px) 0 0 / 5px 5px; }
.bar > i, .stack-art .bar i { border-radius: 0; background: var(--accent); box-shadow: 2px -2px 0 color-mix(in srgb, var(--plate) 70%, transparent); }
.dots li::before { border-radius: 0; height: 6px; background: radial-gradient(circle, var(--line-2) 1px, transparent 1.3px) 0 0 / 4px 4px; }
.dots li.done::before { background: var(--accent); }
.dots li.on::before { background: linear-gradient(90deg, var(--accent) 50%, transparent 50%), radial-gradient(circle, var(--line-2) 1px, transparent 1.3px) 0 0 / 4px 4px; }
.range { accent-color: var(--accent); }

/* torn scrap + tape = yours: course cards on the shelf, the learner plan card */
a.course, .stack-art .sheet { position: relative; isolation: isolate; background: none; border: 0; border-radius: 0; box-shadow: none; }
a.course::before, .stack-art .sheet::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--scrap); clip-path: polygon(0.0% 2px, 4.7% 3px, 8.6% 0px, 12.9% 0px, 16.0% 0px, 20.6% 1px, 22.9% 3px, 26.2% 1px, 28.6% 3px, 31.0% 4px, 33.5% 1px, 37.3% 4px, 42.0% 4px, 45.7% 0px, 50.5% 0px, 54.1% 1px, 57.1% 1px, 60.7% 4px, 63.7% 5px, 66.3% 4px, 70.0% 1px, 73.2% 4px, 77.3% 4px, 79.6% 1px, 83.1% 4px, 86.4% 2px, 89.8% 3px, 93.0% 1px, 97.2% 5px, 100% 2px, 100.0% calc(100% - 0px), 96.3% calc(100% - 4px), 92.8% calc(100% - 2px), 88.7% calc(100% - 2px), 84.9% calc(100% - 0px), 82.4% calc(100% - 3px), 79.8% calc(100% - 2px), 77.2% calc(100% - 3px), 73.9% calc(100% - 5px), 71.5% calc(100% - 4px), 67.8% calc(100% - 6px), 64.8% calc(100% - 5px), 61.7% calc(100% - 3px), 58.0% calc(100% - 3px), 55.6% calc(100% - 0px), 51.0% calc(100% - 3px), 46.9% calc(100% - 0px), 44.6% calc(100% - 5px), 41.6% calc(100% - 4px), 36.8% calc(100% - 6px), 33.4% calc(100% - 5px), 30.2% calc(100% - 5px), 27.1% calc(100% - 3px), 24.0% calc(100% - 4px), 21.5% calc(100% - 0px), 18.7% calc(100% - 2px), 16.2% calc(100% - 1px), 13.0% calc(100% - 6px), 9.5% calc(100% - 1px), 6.1% calc(100% - 4px), 3.2% calc(100% - 1px), 0% calc(100% - 3px));
  filter: drop-shadow(1px 2px 0 rgba(0, 0, 0, .18)); }
a.course::after { content: ""; position: absolute; top: -8px; left: calc(50% - 32px); width: 64px; height: 18px; background: var(--tape); transform: rotate(-4deg); }
a.course:nth-child(odd) { transform: rotate(-.5deg); }
a.course:nth-child(even) { transform: rotate(.6deg); }
a.course:nth-child(3n)::after { transform: rotate(5deg); left: 24px; }
@media (hover: hover) and (pointer: fine) { a.course:hover { transform: rotate(0) translateY(-2px); } }
a.course, a.course .s, a.course .goal { color: var(--scrap-ink); }
a.course .s, a.course .goal { opacity: .72; }
.course .t { font: 400 26px/1.1 var(--f-cut); font-style: italic; letter-spacing: 0; }
a.course .pill { background: rgba(0, 0, 0, .07); color: var(--scrap-ink); }
a.course .pill.school { background: rgba(255, 72, 176, .16); color: #a3126a; }
a.course .faint { color: var(--scrap-ink); opacity: .6; }
.steps .num { border-radius: 3px; box-shadow: 2px 2px 0 var(--plate); font-family: var(--f-mono); }
a.course .bar { background: radial-gradient(circle, rgba(0, 0, 0, .22) 1.1px, transparent 1.4px) 0 0 / 5px 5px; }
.plan { background-image: none; }
.pl-top { border-bottom-style: dotted; }
.ava { border-radius: 4px; box-shadow: 3px 3px 0 var(--plate); font-family: var(--f-head); font-weight: 400; }
.empty { border-radius: 4px; border-style: dashed; }

/* landing art: the drawn scene replaces the stacked sheets */
.hero-art { display: block; width: 100%; height: auto; border-radius: 6px; background: #0e1412; box-shadow: 5px 5px 0 var(--plate); }

/* course engine: rail and topbar */
.rail { background-image: radial-gradient(circle, rgba(255, 255, 255, .08) 1px, transparent 1.3px); background-size: 6px 6px; }
.brand { font-family: var(--f-ui); }

/* breaks and focus always open in Night, whatever the mode */
.brk { background: #0e1412; border: 1px solid rgba(124, 255, 178, .35); border-radius: 6px; box-shadow: 6px 6px 0 #ff5dba;
  background-image: repeating-linear-gradient(0deg, rgba(124, 255, 178, .03) 0 1px, transparent 1px 4px); }
.brk-h { font: 400 28px/1.05 var(--f-head); letter-spacing: -.01em; text-shadow: 2px 2px 0 rgba(255, 93, 186, .6); }
.brk .btn.primary { background: #7cffb2; border-color: #7cffb2; color: #0e1412; box-shadow: 3px 3px 0 #ff5dba; }
.brk-time, .brk-tag { color: #7cffb2; font-family: var(--f-mono); }
.brk-bar b { background: #7cffb2 !important; }

@media (prefers-reduced-motion: reduce) { .btn.primary, a.course { transition: none; } }

/* Day / night switch: bottom-right corner of every page */
.theme-fab { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 60;
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: var(--surface, #fff); color: var(--ink); border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--accent); }
@media (hover: hover) and (pointer: fine) { .theme-fab:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--accent); } }
.theme-fab:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
@media print { .theme-fab { display: none; } }

/* Feedback button (bottom-left of signed-in pages) and dialog: lockdin.js L.feedback */
.fb-fab { position: fixed; left: max(16px, env(safe-area-inset-left)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 60;
  font: 700 13px var(--f-ui, system-ui); letter-spacing: .02em; padding: 10px 14px; border-radius: 999px; cursor: pointer;
  background: var(--surface, #fff); color: var(--ink); border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--plate, var(--accent)); }
@media (hover: hover) and (pointer: fine) { .fb-fab:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--plate, var(--accent)); } }
.fb-fab:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.fb-back { position: fixed; inset: 0; z-index: 2147483001; display: grid; place-items: center; padding: 16px; background: color-mix(in srgb, #14131a 55%, transparent); }
.fb-card { width: min(480px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--surface, #fff); color: var(--ink);
  border: 2px solid var(--ink); border-radius: 8px; box-shadow: 6px 6px 0 var(--plate, var(--accent)); padding: 18px 20px; font: 500 15px/1.45 var(--f-ui, system-ui); }
.fb-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fb-head b { font: 800 19px/1.2 var(--f-ui, system-ui); }
.fb-x { border: 0; background: none; color: var(--ink); font: 400 26px/1 var(--f-ui, system-ui); cursor: pointer; padding: 0 4px; }
.fb-sub { margin: 6px 0 12px; color: var(--ink-2); font-size: 14px; }
.fb-kinds, .fb-mood { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; align-items: center; }
.fb-mood > span { font: 700 11px var(--f-mono, monospace); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-right: 4px; }
.fb-kinds label, .fb-mood label { position: relative; }
.fb-kinds input, .fb-mood input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.fb-kinds span, .fb-mood label span { display: inline-block; padding: 6px 10px; border: 1.5px solid var(--line, #ccc); border-radius: 999px; font-size: 13.5px; }
.fb-kinds input:checked + span, .fb-mood input:checked + span { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.fb-kinds input:focus-visible + span, .fb-mood input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.fb-l { display: block; font-weight: 700; margin-bottom: 6px; }
.fb-card textarea { width: 100%; box-sizing: border-box; min-height: 110px; resize: vertical; margin-bottom: 12px; font: 400 15px/1.45 var(--f-body, system-ui);
  color: var(--ink); background: var(--bg); border: 1.5px solid var(--line, #ccc); border-radius: 4px; padding: 10px; }
.fb-err { color: #c62828; font-size: 13.5px; margin: 0 0 8px; }
.fb-err:empty { display: none; }
.fb-acts { display: flex; gap: 8px; flex-wrap: wrap; }
@media print { .fb-fab { display: none; } }

/* press = pushed into the plate (misprint world: a translate, not a scale); hover lifts are for a real pointer only;
   small buttons reach 44 px where the pointer is a finger */
.btn:not(.primary), .seg button, a.course { transition: transform 120ms cubic-bezier(.23, 1, .32, 1), border-color .15s, background-color .15s; }
.btn:not(.primary):not([disabled]):active, .seg button:active, a.course:active { transform: translate(1px, 1px); }
@media (pointer: coarse) { .btn.small { min-height: 44px; } }
@media (prefers-reduced-motion: reduce) { .btn:not(.primary), .seg button, a.course { transition: border-color .15s, background-color .15s; } }

/* headings balance; reading text avoids a lone last word */
h1, h2, h3, .lede { text-wrap: balance; }
.prose p, .steps .card p, .hint, .faint { text-wrap: pretty; }
input, textarea { caret-color: var(--plate); }

/* section headings read as headings (they were 11.5px grey caps labels); the onboarding step count sits under the dots */
h2.eyebrow { font: 700 18px/1.25 var(--f-ui); letter-spacing: -.005em; text-transform: none; color: var(--ink); margin: 30px 0 12px; }
.onb-count { font: 600 12px var(--f-mono); letter-spacing: .06em; color: var(--ink-2); margin: 10px 0 0; font-variant-numeric: tabular-nums; }
