/* Design Quest design system.
   Layout idea: calm off-white page, one bold display face, violet marks the next move, one hue per skill.
   Every size below comes from a token: spacing (4-based), type scale, radius, control height. */
:root {
  color-scheme: light;
  /* colour */
  --bg: #F8F8F6; --surface: #FFFFFF; --ink: #171717; --ink-2: #3D3D3D; --muted: #636363;
  --accent: #7357F6; --accent-ink: #5B3FE0; --accent-deep: #4B32C8; --accent-soft: #EFEBFE;
  --line: #E7E5EE; --line-strong: #C9C7D4; --field: #85839A;
  --good: #1A6B4A; --good-soft: #E3F5EC; --warn: #8A5300; --warn-soft: #FDF0D9; --bad: #B4372F; --bad-soft: #FBEAE8;
  --h: var(--accent); --h-ink: var(--accent-ink); --h-soft: var(--accent-soft);
  /* type */
  --display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: var(--display); /* alias used by content specimens */
  --t-xs: 12px; --t-sm: 14px; --t-md: 16px; --t-lg: 18px; --t-xl: 20px; --t-2xl: 24px; --t-3xl: 32px; --t-4xl: 44px;
  /* space: 4 8 12 16 24 32 48 64 */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px;
  /* shape and size */
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-pill: 999px;
  --ctl: 44px; --ctl-sm: 36px; --ctl-lg: 52px;
}
.hue-violet { --h: #7357F6; --h-ink: #5B3FE0; --h-soft: #EFEBFE; } .hue-coral { --h: #F0553C; --h-ink: #B5301A; --h-soft: #FDECE8; }
.hue-orange { --h: #F2801E; --h-ink: #9A4706; --h-soft: #FDEDDC; } .hue-blue { --h: #2F7FF0; --h-ink: #1B5FC4; --h-soft: #E6F0FE; }
.hue-green { --h: #1FA971; --h-ink: #1A6B4A; --h-soft: #E3F5EC; } .hue-pink { --h: #E64C9B; --h-ink: #A82A6E; --h-soft: #FCE8F2; }
.hue-teal { --h: #12A5B5; --h-ink: #0B6B76; --h-soft: #DFF4F6; } .hue-gold { --h: #E0A100; --h-ink: #7D5300; --h-soft: #FBF1D3; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 var(--t-md)/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote, fieldset { margin: 0; padding: 0; }
ul, ol { list-style: none; } fieldset { border: 0; min-width: 0; } legend { padding: 0; }
h1 { font: 700 clamp(var(--t-3xl), 4.6vw, var(--t-4xl))/1.08 var(--display); letter-spacing: -.025em; text-wrap: balance; }
h2 { font: 700 var(--t-2xl)/1.2 var(--display); letter-spacing: -.02em; text-wrap: balance; }
h3 { font: 600 var(--t-md)/1.4 var(--sans); }
a { color: var(--accent-ink); text-underline-offset: 3px; } b { font-weight: 600; } em { font-style: normal; }
img, svg { max-width: 100%; } .ic { flex: none; vertical-align: -3px; }
:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; border-radius: var(--s1); }
main:focus, section:focus { outline: none; }
table { border-collapse: collapse; width: 100%; }
thead th { font-size: var(--t-xs); text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 600; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: var(--s3); top: -80px; z-index: 50; background: var(--ink); color: #fff; border: 0; min-height: var(--ctl); padding: 0 var(--s4); border-radius: var(--r-md); font: 600 var(--t-md) var(--sans); }
.skip:focus { top: var(--s3); }
.eyebrow { font-size: var(--t-xs); font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.lede { font-size: var(--t-lg); line-height: 1.55; color: var(--ink-2); max-width: 66ch; margin-top: var(--s3); }
.muted { color: var(--muted); } .small { font-size: var(--t-sm); } .good-text { color: var(--good); } .center { text-align: center; }
.row { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; } .row.end { justify-content: flex-end; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s5); margin: var(--s4) 0 var(--s3); }
.plain li { display: flex; gap: var(--s2); align-items: flex-start; padding: var(--s1) 0; } .plain li .ic { margin-top: var(--s1); }
.plain.rule li { padding: var(--s3) 0; border-bottom: 1px solid var(--line); }
.error { color: var(--bad); font-size: var(--t-sm); font-weight: 500; min-height: var(--s5); margin-top: var(--s2); }
/* Text links inside UI rows get a 24px-tall hit area (WCAG 2.5.8) */
.block-head a, .up-list a, .rec-rows a:not(.btn), .back, .link, .side-link { display: inline-flex; align-items: center; gap: var(--s1); min-height: var(--s5); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); min-height: var(--ctl); padding: 0 var(--s5); border-radius: var(--r-md); border: 1.5px solid var(--accent); background: var(--accent); color: #fff; font: 600 var(--t-md)/1 var(--sans); text-decoration: none; cursor: pointer; box-shadow: 0 3px 0 var(--accent-deep); transition: background .15s, transform .1s, box-shadow .1s, border-color .15s; }
.btn:hover { background: #6548EE; border-color: #6548EE; } .btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--accent-deep); }
.btn.sm { min-height: var(--ctl-sm); padding: 0 var(--s4); font-size: var(--t-sm); border-radius: var(--r-sm); box-shadow: 0 2px 0 var(--accent-deep); }
.btn.lg { min-height: var(--ctl-lg); padding: 0 var(--s6); font-size: var(--t-lg); }
.btn.ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); box-shadow: 0 3px 0 #DAD8E3; } .btn.ghost.sm { box-shadow: 0 2px 0 #DAD8E3; }
.btn.ghost:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); } .btn.ghost:active { box-shadow: 0 1px 0 #DAD8E3; }
.btn.on-dark { background: #fff; border-color: #fff; color: var(--ink); box-shadow: 0 3px 0 rgba(0,0,0,.28); } .btn.on-dark:hover { background: #fff; border-color: #fff; color: var(--accent-ink); }
.btn.danger { color: var(--bad); } .btn.danger:hover { background: var(--bad-soft); border-color: var(--bad); color: var(--bad); }
.btn.danger-fill { background: var(--bad); border-color: var(--bad); box-shadow: 0 3px 0 #7F231D; } .btn.danger-fill:hover { background: #A23029; border-color: #A23029; }
.btn[disabled], .btn[disabled]:hover { background: #E9E7F1; border: 1.5px dashed #A9A6BB; color: #5E5C6E; box-shadow: none; transform: none; cursor: not-allowed; }
.link { background: none; border: 0; padding: 0; font: 600 var(--t-md) var(--sans); color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.tag { display: inline-flex; align-items: center; gap: var(--s1); font-size: var(--t-xs); font-weight: 600; line-height: 1.5; padding: 2px var(--s2); border-radius: var(--r-pill); border: 1px solid var(--line-strong); color: var(--ink-2); white-space: nowrap; background: var(--surface); }
.tag.good { border-color: transparent; background: var(--good-soft); color: var(--good); } .tag.bad { border-color: transparent; background: var(--bad-soft); color: var(--bad); } .tag.accent { border-color: transparent; background: var(--accent-soft); color: var(--accent-ink); }
.chips { display: flex; flex-wrap: wrap; gap: var(--s2); }
.chip { font: 600 var(--t-sm) var(--sans); padding: 0 var(--s4); min-height: var(--ctl-sm); border-radius: var(--r-pill); border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--ink-2); cursor: pointer; }
.chip:hover { border-color: var(--accent); color: var(--accent-ink); } .chip[aria-pressed=true] { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip[aria-pressed=true]::before { content: "✓ "; }

/* ---------- Form controls ---------- */
input[type=text], input[type=search], input[type=email], input[type=password], select { font: 500 var(--t-md) var(--sans); color: var(--ink); height: var(--ctl); padding: 0 var(--s3); border: 1.5px solid var(--field); border-radius: var(--r-md); background: var(--surface); width: 100%; }
select { appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235B3FE0' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center; }
select:hover, input[type=text]:hover { border-color: var(--accent); }
input[type=range] { -webkit-appearance: none; appearance: none; background: transparent; height: var(--s6); width: 100%; cursor: pointer; }
input[type=range]::-webkit-slider-runnable-track { height: 8px; border-radius: var(--r-pill); background: #DCD8EE; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -8px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); box-shadow: 0 2px 4px rgba(75,50,200,.25); }
input[type=range]::-moz-range-track { height: 8px; border-radius: var(--r-pill); background: #DCD8EE; }
input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); }
input[type=radio], input[type=checkbox] { appearance: none; -webkit-appearance: none; width: 24px; height: 24px; margin: 0; flex: none; border: 1.5px solid var(--field); background: #fff; border-radius: 50%; display: inline-grid; place-content: center; cursor: pointer; }
input[type=checkbox] { border-radius: var(--r-sm); }
input[type=radio]:checked, input[type=checkbox]:checked { background: var(--accent); border-color: var(--accent); }
input[type=radio]:checked::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; }
input[type=checkbox]:checked::before { content: ""; width: 12px; height: 7px; border-left: 2.5px solid #fff; border-bottom: 2.5px solid #fff; transform: rotate(-45deg) translate(1px, -1px); }
input[type=radio]:disabled, input[type=checkbox]:disabled { cursor: default; }
.field { display: grid; gap: var(--s1); margin: var(--s6) 0 var(--s5); font-weight: 600; } .field em { font-weight: 400; color: var(--muted); }
.ctl-row { display: flex; flex-wrap: wrap; gap: var(--s4) var(--s5); align-items: end; }
.ctl { display: grid; grid-template-columns: 1fr auto; gap: var(--s1) var(--s3); font-size: var(--t-sm); font-weight: 600; min-width: 184px; align-items: center; }
.ctl > span { grid-column: 1; } .ctl output { grid-column: 2; grid-row: 1; color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.ctl input[type=range], .ctl select, .ctl input[type=text], .ctl input[type=color] { grid-column: 1 / -1; }
.ctl input[type=color] { -webkit-appearance: none; appearance: none; width: 100%; height: var(--ctl); padding: var(--s1); border: 1.5px solid var(--field); border-radius: var(--r-md); background: #fff; cursor: pointer; }
.ctl input[type=color]::-webkit-color-swatch-wrapper { padding: 0; } .ctl input[type=color]::-webkit-color-swatch { border: 1px solid var(--line-strong); border-radius: var(--r-sm); } .ctl input[type=color]::-moz-color-swatch { border: 1px solid var(--line-strong); border-radius: var(--r-sm); }
.ctl.check { display: flex; align-items: center; gap: var(--s2); min-width: 0; min-height: var(--ctl); cursor: pointer; }
.seg { display: flex; align-items: center; flex-wrap: wrap; } .seg legend { font-size: var(--t-sm); font-weight: 600; margin-bottom: var(--s1); float: left; width: 100%; }
.seg label { position: relative; } .seg input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; border-radius: 0; }
.seg span { display: grid; place-items: center; min-width: var(--s7); height: var(--ctl); border: 1.5px solid var(--field); margin-right: -1.5px; font-weight: 600; cursor: pointer; background: #fff; }
.seg label:first-of-type span { border-radius: var(--r-md) 0 0 var(--r-md); } .seg label:last-of-type span { border-radius: 0 var(--r-md) var(--r-md) 0; }
.seg input:checked + span { background: var(--accent); color: #fff; border-color: var(--accent); } .seg input:focus-visible + span { outline: 2px solid var(--accent-ink); outline-offset: 2px; }
.search { display: flex; align-items: center; gap: var(--s3); border: 1.5px solid var(--field); border-radius: var(--r-md); padding: 0 var(--s4); background: var(--surface); max-width: 520px; }
.search:focus-within { outline: 2px solid var(--accent-ink); outline-offset: 2px; } .search input { border: 0; outline: 0; height: var(--ctl); padding: 0; background: transparent; }

/* ---------- Shared pieces ---------- */
.meter { display: inline-block; width: 100%; height: 8px; border-radius: var(--r-pill); background: var(--line); overflow: hidden; vertical-align: middle; }
.meter i { display: block; height: 100%; background: var(--h); border-radius: var(--r-pill); transition: width .5s cubic-bezier(.2,.7,.2,1); }
.meter.big { height: 12px; display: block; margin: var(--s3) 0 var(--s2); }
.notice { display: flex; gap: var(--s3); padding: var(--s4); border-radius: var(--r-md); font-size: var(--t-sm); margin: var(--s4) 0; } .notice .ic { margin-top: 2px; }
.notice.good { background: var(--good-soft); color: #174F38; } .notice.warn { background: var(--warn-soft); color: #5F3A00; } .notice.info { background: var(--accent-soft); color: #2C2260; } .page-notice { margin: 0 clamp(16px, 4vw, 48px); }
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--s3); padding: var(--s7) var(--s5); border: 1.5px dashed #B9B6C9; border-radius: var(--r-lg); margin-top: var(--s5); color: var(--muted); background: #FBFAFD; }
.empty h1, .empty h2 { color: var(--ink); font-size: var(--t-2xl); } .empty p { max-width: 46ch; } .empty .btn { margin-top: var(--s2); } .empty.small { padding: var(--s5) var(--s4); margin-top: var(--s3); font-size: var(--t-sm); }
.checks { display: grid; gap: var(--s2); font-size: var(--t-sm); } .checks li { display: flex; gap: var(--s2); align-items: flex-start; } .checks .ic { margin-top: 3px; } .checks .no { color: var(--ink-2); }
.checks .ok .ic, .feedback .ok .ic, .why.ok .ic, .cs-report .ok .verdict .ic, .rubric .ok .ic { color: var(--good); } .checks .no .ic, .feedback .no .ic, .why.no .ic, .cs-report .no .verdict .ic { color: var(--bad); } .rubric .no .ic { color: var(--warn); }

/* ---------- Shell ---------- */
.shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; padding: var(--s5) var(--s4); border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: var(--s6); }
.brand { display: inline-flex; align-items: center; gap: var(--s3); font: 700 var(--t-xl)/1 var(--display); letter-spacing: -.02em; color: var(--ink); text-decoration: none; padding: 0 var(--s2); min-height: var(--s6); } .brand.mobile { display: none; }
.side ul { display: flex; flex-direction: column; gap: var(--s1); }
.side li a { display: flex; align-items: center; gap: var(--s3); min-height: var(--ctl); padding: 0 var(--s3); border-radius: var(--r-md); color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: var(--t-sm); transition: background .15s; }
.side li a:hover { background: #F0EEF7; color: var(--ink); } .side li a[aria-current] { background: var(--accent-soft); color: var(--accent-ink); box-shadow: inset 3px 0 0 var(--accent); }
#side-foot { margin-top: auto; padding: 0 var(--s3); display: grid; gap: var(--s1); }
.main-col { min-width: 0; }
.top { display: flex; justify-content: flex-end; align-items: center; padding: var(--s4) clamp(16px, 4vw, 48px) 0; min-height: var(--s8); }
.status { display: flex; align-items: center; gap: var(--s4); text-decoration: none; color: var(--ink); padding: var(--s2) var(--s3); border-radius: var(--r-md); min-height: var(--ctl); } .status:hover { background: #F0EEF7; }
.st-streak { display: flex; align-items: center; gap: var(--s1); padding: var(--s1) var(--s3); border-radius: var(--r-pill); background: #EFEDEA; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; } .st-streak.on { background: #FDEDDC; color: #9A4706; }
.st-level { display: grid; gap: var(--s1); min-width: 192px; } .st-line { display: flex; justify-content: space-between; gap: var(--s3); font-size: var(--t-sm); } .st-line span { color: var(--muted); font-variant-numeric: tabular-nums; }
.tabs { display: none; }
.page { max-width: 1080px; padding: var(--s5) clamp(16px, 4vw, 48px) 96px; animation: rise .28s ease-out; }
.page.narrow { max-width: 720px; } .page.wide { max-width: 1320px; } .page.still { animation: none; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.back { font-size: var(--t-sm); font-weight: 500; color: var(--muted); text-decoration: none; margin-bottom: var(--s4); } .back .ic { transform: rotate(180deg); } .back:hover { color: var(--accent-ink); }
.block { padding: var(--s6) 0; border-top: 1px solid var(--line); } .block h2 { margin-bottom: var(--s2); }
.block-head { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); margin-bottom: var(--s2); } .block-head h2 { margin: 0; } .block-head a { font-size: var(--t-sm); font-weight: 600; white-space: nowrap; }

/* ---------- Toasts and dialog ---------- */
#toasts { position: fixed; right: var(--s5); top: var(--s4); z-index: 60; display: flex; flex-direction: column; gap: var(--s2); align-items: flex-end; pointer-events: none; }
.toast { background: var(--ink); color: #fff; padding: var(--s3) var(--s4); border-radius: var(--r-md); font-size: var(--t-sm); font-weight: 500; box-shadow: 0 8px 24px rgba(0,0,0,.16); animation: toast-in .3s cubic-bezier(.2,.8,.2,1); max-width: 340px; transition: opacity .3s, transform .3s; }
.toast.xp { background: var(--accent-deep); } .toast.xp b { color: #FFE08A; margin-right: var(--s1); } .toast.ach { background: #7D5300; } .toast.warn { background: #5F3A00; } .toast.out { opacity: 0; transform: translateY(-8px); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-12px) scale(.97); } }
dialog { border: 0; border-radius: var(--r-lg); padding: 0; max-width: min(440px, calc(100vw - 32px)); box-shadow: 0 24px 64px rgba(0,0,0,.22); color: var(--ink); }
dialog::backdrop { background: rgba(23,23,23,.45); }
.modal-body { padding: var(--s6); display: grid; gap: var(--s3); } .modal-body.center { justify-items: center; text-align: center; } .modal-body textarea { width: 100%; font: 12px/1.5 ui-monospace, monospace; border: 1.5px solid var(--field); border-radius: var(--r-md); padding: var(--s3); }
.lvl-badge { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font: 700 var(--t-3xl)/1 var(--display); background: var(--accent); color: #fff; box-shadow: 0 0 0 8px var(--accent-soft); flex: none; }
dialog[open] .lvl-badge { animation: pop .5s cubic-bezier(.2,1.4,.4,1); } @keyframes pop { from { transform: scale(.5); opacity: 0; } }

/* ---------- Landing and onboarding ---------- */
.landing, .onboard { max-width: 1120px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px) var(--s8); }
.land-top { display: flex; justify-content: space-between; align-items: center; padding: var(--s5) 0; } .land-top .brand { padding: 0; }
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: var(--s7); align-items: center; padding: var(--s6) 0 var(--s8); }
.hero h1 { font-size: clamp(40px, 6vw, 64px); line-height: 1.02; letter-spacing: -.035em; margin-top: var(--s4); } .hero h1 em { color: var(--accent); background: linear-gradient(transparent 68%, #FDEDDC 68%); padding: 0 .06em; }
.hero .row { margin: var(--s6) 0 var(--s4); } .hero-art { width: 100%; height: auto; }
.land-sec { padding: var(--s8) 0; border-top: 1px solid var(--line); } .land-sec h2, .land-end h2 { font-size: clamp(var(--t-2xl), 3.4vw, var(--t-3xl)); }
.loop { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s6); margin-top: var(--s6); } .loop li { border-top: 4px solid var(--h); padding-top: var(--s4); }
.loop-n { font: 700 var(--t-2xl)/1 var(--display); color: var(--h-ink); } .loop h3 { margin: var(--s3) 0 var(--s1); font-size: var(--t-lg); } .loop p, .three p, .land-worlds p { color: var(--muted); font-size: var(--t-sm); }
.land-worlds { display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--s7); margin-top: var(--s5); } .land-worlds li { display: flex; gap: var(--s4); padding: var(--s4) 0; border-top: 1px solid var(--line); }
.num { font: 700 var(--t-2xl)/1 var(--display); color: var(--h-ink); width: var(--s5); flex: none; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s5); margin-top: var(--s5); } .three > div { background: #fff; border: 1.5px solid var(--line); border-radius: var(--r-lg); padding: var(--s5); } .three .ic { color: var(--accent-ink); } .three h3 { margin: var(--s3) 0 var(--s1); font-size: var(--t-lg); }
.land-end { padding: var(--s8) 0 var(--s5); border-top: 1px solid var(--line); display: grid; gap: var(--s5); justify-items: start; }
.onboard-body { max-width: 640px; margin: var(--s5) auto 0; animation: rise .28s ease-out; } .onboard-body h2 { margin: var(--s6) 0 var(--s3); }
.profile { margin: var(--s5) 0; } .profile li { display: grid; grid-template-columns: 168px 1fr 112px; gap: var(--s4); align-items: center; padding: var(--s3) 0; border-bottom: 1px solid var(--line); font-weight: 500; } .profile .tag { justify-self: start; }
.rec-list { counter-reset: r; } .rec-list li { counter-increment: r; padding: var(--s3) 0; border-bottom: 1px solid var(--line); } .rec-list li::before { content: counter(r) ". "; color: var(--muted); }

/* ---------- Dashboard ---------- */
.dash-head { margin-bottom: var(--s6); }
.howto { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s5); background: var(--accent-soft); border-radius: var(--r-lg); padding: var(--s5); margin-bottom: var(--s5); counter-reset: h; }
.howto li { counter-increment: h; display: grid; grid-template-columns: var(--s6) 1fr; gap: var(--s3); font-size: var(--t-sm); color: #2C2260; } .howto li::before { content: counter(h); width: var(--s6); height: var(--s6); border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; } .howto b { display: block; font-size: var(--t-md); color: var(--ink); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s3); margin-bottom: var(--s5); }
.stats li { background: var(--h-soft); border-radius: var(--r-lg); padding: var(--s4); display: grid; gap: var(--s1); color: var(--h-ink); } .stats b { font: 700 var(--t-3xl)/1.1 var(--display); letter-spacing: -.03em; color: var(--ink); margin-top: var(--s2); } .stats small { font-size: var(--t-md); color: var(--muted); letter-spacing: 0; } .stats span { font-size: var(--t-sm); font-weight: 600; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: var(--s7); }
.continue { background: var(--accent-deep); color: #fff; border-radius: var(--r-lg); padding: var(--s6); display: grid; gap: var(--s5); margin-bottom: var(--s5); position: relative; overflow: hidden; }
.continue::after { content: ""; position: absolute; right: -64px; top: -80px; width: 240px; height: 240px; border-radius: 50%; border: 36px solid rgba(255,255,255,.09); pointer-events: none; } .continue > * { position: relative; z-index: 1; }
.continue .eyebrow, .continue .meta { color: rgba(255,255,255,.85); } .continue h2 { font-size: var(--t-3xl); margin: var(--s2) 0 var(--s1); letter-spacing: -.03em; } .continue .meta { font-size: var(--t-sm); }
.outcomes { display: grid; gap: var(--s1); margin-top: var(--s4); font-size: var(--t-sm); } .outcomes li { display: flex; gap: var(--s2); align-items: flex-start; } .outcomes .ic { margin-top: 4px; color: var(--h-ink); } .continue .outcomes .ic { color: #fff; }
.continue-foot { display: flex; justify-content: space-between; align-items: center; gap: var(--s4); flex-wrap: wrap; }
.mini-steps { display: flex; gap: var(--s2); flex-wrap: wrap; } .mini-steps li { font-size: var(--t-xs); font-weight: 600; padding: var(--s1) var(--s3); border-radius: var(--r-pill); border: 1.5px solid rgba(255,255,255,.55); color: #fff; } .mini-steps li.done { background: #fff; border-color: #fff; color: var(--accent-deep); } .mini-steps li.done::before { content: "✓ "; }
.block.daily { background: var(--h-soft); border: 0; border-radius: var(--r-lg); padding: var(--s5); } .block.daily .meter { background: #fff; } .block.daily .muted { color: #5C3A12; } .block.daily + .block { border-top: 0; }
.map-rows li { display: grid; grid-template-columns: var(--s5) 1fr auto 56px; gap: var(--s3); align-items: center; padding: var(--s3) 0; border-bottom: 1px solid var(--line); } .map-name { font-weight: 600; }
.ticks { display: flex; gap: var(--s1); } .ticks i { width: 16px; height: 8px; border-radius: var(--s1); background: var(--line); } .ticks i.open { background: var(--h-soft); box-shadow: inset 0 0 0 1px var(--h); } .ticks i.done { background: var(--h); }
.dash-side .block:first-child { border-top: 0; padding-top: 0; }
.week { display: flex; gap: var(--s2); margin: var(--s3) 0; } .week li { display: grid; justify-items: center; gap: var(--s1); font-size: var(--t-xs); color: var(--muted); } .week i { width: var(--s6); height: var(--s6); border-radius: 50%; border: 1.5px solid var(--line-strong); display: grid; place-items: center; font-style: normal; color: #fff; font-weight: 700; font-size: var(--t-sm); }
.week li.on i { background: #F2801E; border-color: #F2801E; } .week li.on i::before { content: "✓"; } .week li.today i { box-shadow: 0 0 0 4px #FDEDDC; } .week li.today span { color: var(--ink); font-weight: 700; }
.skills li { display: grid; grid-template-columns: 1fr auto; gap: var(--s2) var(--s3); align-items: center; padding: var(--s3) 0; } .skills .meter { grid-column: 1 / -1; } .sk-name { font-weight: 600; font-size: var(--t-sm); }
.ach-mini li, .up-list li { display: flex; gap: var(--s3); padding: var(--s2) 0; align-items: flex-start; } .up-list .ic { margin-top: 4px; color: var(--muted); } .ach-mini div, .up-list div { display: grid; } .up-list a { font-weight: 600; }
.ach-mini .ic, .ach-grid .ic { width: var(--s6); height: var(--s6); padding: 6px; border-radius: 50%; flex: none; background: #EEECF2; } .ach-mini .ic, .ach-grid li.got .ic { color: #7D5300; background: #FBF1D3; }

/* ---------- Worlds ---------- */
.legend { display: flex; flex-wrap: wrap; gap: var(--s4); margin: var(--s5) 0 var(--s2); font-size: var(--t-sm); color: var(--muted); } .legend li { display: flex; align-items: center; gap: var(--s2); }
.lgd { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--accent); background: var(--surface); } .lgd.done { background: var(--accent); } .lgd.current { box-shadow: 0 0 0 3px var(--accent-soft); } .lgd.locked { background: #F0EEF4; border: 2px dashed #B9B6C9; } .lgd.diamond { border-radius: 2px; transform: rotate(45deg); }
.world { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: var(--s7); padding: var(--s7) 0; border-top: 1px solid var(--line); margin-top: var(--s4); }
.world-head { position: sticky; top: var(--s5); align-self: start; display: grid; gap: var(--s2); } .world-n { font-size: var(--t-xs); font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--h-ink); margin-top: var(--s3); } .world-head h2 { font-size: var(--t-3xl); letter-spacing: -.03em; }
.world-prog { display: flex; align-items: center; gap: var(--s3); font-size: var(--t-sm); font-weight: 500; margin-top: var(--s2); } .world-prog .meter { width: 96px; flex: none; }
.glyph { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; background: var(--h-soft); border-radius: var(--r-lg); padding: var(--s3); width: 80px; height: 80px; } .glyph .f { fill: #fff; stroke: var(--h-ink); } .glyph .a { stroke: var(--h-ink); } .world.cleared .glyph .f { fill: var(--h); }
.trail { position: relative; } .trail::before { content: ""; position: absolute; left: 19px; top: var(--s5); bottom: var(--s5); border-left: 2px dotted var(--h); opacity: .55; }
.node > * { position: relative; display: grid; grid-template-columns: 40px 1fr auto; gap: var(--s4); align-items: start; padding: var(--s4) var(--s3) var(--s4) 0; border-radius: var(--r-md); text-decoration: none; color: var(--ink); transition: background .15s; }
.node a:hover { background: var(--h-soft); } .node a:hover .node-title { color: var(--h-ink); } .node > * > .ic { align-self: center; color: var(--muted); }
.node-mark { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 2px solid var(--h); color: var(--h-ink); font-weight: 700; font-size: var(--t-sm); z-index: 1; }
.node-mark.diamond { border-radius: var(--r-sm); transform: rotate(45deg) scale(.86); } .node-mark.diamond .ic { transform: rotate(-45deg); }
.node.done .node-mark { background: var(--h-ink); border-color: var(--h-ink); color: #fff; } .node.current .node-mark { box-shadow: 0 0 0 4px var(--h-soft); } .node.locked .node-mark { border: 2px dashed #B9B6C9; background: #F0EEF4; color: var(--muted); }
.node-body { display: grid; gap: 2px; } .node-title { font-weight: 700; font-size: var(--t-lg); display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; } .node-meta, .node-out, .node-status { font-size: var(--t-sm); color: var(--muted); } .node-status { color: var(--ink-2); font-weight: 600; }
.node.locked .node-title { color: var(--muted); } .node.done .node-status { color: var(--good); } .node.current .node-status { color: var(--h-ink); }

/* ---------- Lesson ---------- */
.lesson { max-width: 880px; } .lesson-head .eyebrow { margin-bottom: var(--s2); color: var(--h-ink); } .lesson-head .outcomes { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--s2) var(--s5); color: var(--ink-2); }
.stepper { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s2); margin: var(--s6) 0 0; border-bottom: 1px solid var(--line); scroll-margin-top: var(--s4); }
.stepper button { width: 100%; display: flex; align-items: center; gap: var(--s2); min-height: var(--ctl-lg); padding: 0 var(--s1); background: none; border: 0; border-bottom: 4px solid transparent; margin-bottom: -1px; font: 600 var(--t-sm) var(--sans); color: var(--ink); cursor: pointer; }
.stepper button[aria-disabled=true] { color: var(--muted); } .stepper button[aria-current] { border-bottom-color: var(--h); color: var(--h-ink); }
.step-n { width: var(--s5); height: var(--s5); border-radius: 50%; border: 1.5px solid currentColor; display: grid; place-items: center; font-size: var(--t-xs); flex: none; } .stepper .done .step-n { background: var(--h-ink); border-color: var(--h-ink); color: #fff; }
#step-hint:empty { display: none; } #step-hint { margin-top: var(--s3); }
.stage { padding-top: var(--s6); display: grid; gap: var(--s4); animation: rise .25s ease-out; } .stage > h2 { margin-top: var(--s4); }
.prose { display: grid; gap: var(--s3); max-width: 66ch; } .prose p { line-height: 1.65; }
.real { border-left: 4px solid var(--h); padding: var(--s1) 0 var(--s1) var(--s5); max-width: 62ch; } .real p { font: 500 var(--t-xl)/1.45 var(--display); letter-spacing: -.01em; margin-top: var(--s1); }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s5); } .compare figcaption { display: flex; gap: var(--s2); align-items: center; font-weight: 700; font-size: var(--t-sm); margin-bottom: var(--s2); } .compare .good figcaption { color: var(--good); } .compare .bad figcaption { color: var(--bad); } .compare p { font-size: var(--t-sm); color: var(--muted); margin-top: var(--s2); }
.sp { display: block; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); padding: var(--s4); font-size: 13px; line-height: 1.45; color: var(--ink); text-align: left; overflow-wrap: anywhere; }
.sp-col { display: flex; flex-direction: column; gap: var(--s2); } .sp-row { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; } .sp-h { font-weight: 600; font-size: 15px; } .sp-m { color: var(--muted); }
.sp-btn { display: inline-flex; align-items: center; min-height: 32px; padding: 0 14px; border-radius: 8px; background: var(--accent); color: #fff; font-weight: 600; font-size: 13px; border: 1px solid transparent; white-space: nowrap; }
.sp-btn.sec { background: transparent; color: var(--ink); border-color: var(--line-strong); } .sp-btn.txt { background: transparent; color: var(--accent-ink); }
.sp-in { display: block; min-height: 32px; border: 1px solid var(--line-strong); border-radius: 8px; padding: 0 10px; line-height: 30px; color: var(--muted); background: #fff; }
.demo { border: 1.5px solid #D9D6E6; border-radius: var(--r-lg); background: var(--surface); padding: var(--s5); display: grid; gap: var(--s4); box-shadow: 0 4px 0 #ECEAF3; scroll-margin-top: var(--s5); } .demo-lead { color: var(--ink-2); max-width: 64ch; }
.demo.nudge { animation: nudge .9s ease-out; } @keyframes nudge { 0%, 60% { box-shadow: 0 0 0 4px var(--accent); } }
.stage-foot { display: flex; justify-content: space-between; align-items: center; gap: var(--s4); flex-wrap: wrap; padding-top: var(--s5); border-top: 1px solid var(--line); margin-top: var(--s3); }
.readout { font-size: var(--t-sm); padding: var(--s3) var(--s4); background: var(--accent-soft); color: #2C2260; border-radius: var(--r-md); min-height: var(--s7); }
.hick-stage { min-height: 152px; border: 1.5px dashed var(--line-strong); border-radius: var(--r-md); padding: var(--s4); display: grid; gap: var(--s4); align-content: center; } .prompt { font-size: var(--t-lg); }
.hick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: var(--s2); } .hick-grid button { height: var(--ctl); border: 1.5px solid var(--field); border-radius: var(--r-md); background: #fff; font: 600 var(--t-sm) var(--sans); cursor: pointer; } .hick-grid button:hover { border-color: var(--accent); background: var(--accent-soft); } .hick-grid .miss { background: var(--bad-soft); border-color: var(--bad); }
.bars { display: grid; gap: var(--s2); } .bar { display: grid; grid-template-columns: 88px minmax(0, 1fr) 72px 64px; gap: var(--s3); align-items: center; font-size: var(--t-sm); } .bar i { height: 12px; border-radius: var(--r-pill); background: var(--accent); min-width: 8px; justify-self: start; transition: width .4s; } .bar em { color: var(--muted); } .bar b { font-variant-numeric: tabular-nums; }
.fitts-stage { position: relative; height: 152px; border: 1.5px dashed var(--line-strong); border-radius: var(--r-md); overflow: hidden; }
.f-start { position: absolute; left: var(--s3); top: 50%; transform: translateY(-50%); width: 56px; height: 56px; border-radius: 50%; border: 1.5px solid var(--accent); color: var(--accent-ink); background: #fff; font: 600 var(--t-sm) var(--sans); cursor: pointer; }
.f-target { position: absolute; top: 50%; transform: translateY(-50%); border-radius: 50%; border: 2px dashed var(--field); background: #C9C6D9; cursor: pointer; padding: 0; } .f-target.armed { border: 0; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.plot { width: 100%; max-width: 460px; height: auto; } .plot text { font: 9px var(--sans); fill: var(--muted); }
.gestalt-stage, .vh-stage, .m3-stage, .space-stage, .wcag-stage { display: flex; justify-content: center; align-items: center; gap: var(--s5); min-height: 184px; padding: var(--s5); background: var(--bg); border-radius: var(--r-md); overflow: auto; }
.g-grid { display: flex; } .g-half { display: grid; grid-template-columns: repeat(3, 12px); border: 1.5px solid transparent; border-radius: var(--r-md); padding: var(--s2); transition: gap .2s; } .g-half.boxed { border-color: var(--ink); background: #fff; } .g-half i { width: 12px; height: 12px; border-radius: 50%; background: var(--ink); } .g-half i.alt { background: var(--accent); }
.vh-card { display: flex; flex-direction: column; gap: var(--s2); width: min(340px, 100%); transition: filter .3s; }
.type-stage { display: grid; gap: var(--s4); padding: var(--s5); background: var(--bg); border-radius: var(--r-md); overflow: hidden; } .type-row { display: grid; grid-template-columns: 136px minmax(0, 1fr); gap: var(--s4); align-items: baseline; } .type-row .tag { justify-self: start; }
.contrast-stage { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s5); align-items: center; } .c-sample { border-radius: var(--r-md); padding: var(--s5); display: grid; gap: var(--s3); border: 1px solid var(--line); } .c-ctl { border: 2px solid; border-radius: var(--r-sm); padding: var(--s1) var(--s3); justify-self: start; font-size: var(--t-sm); }
.ratio { font: 700 var(--t-4xl)/1 var(--display); letter-spacing: -.03em; margin-bottom: var(--s3); font-variant-numeric: tabular-nums; }
.space-stage.grid { background-image: linear-gradient(to right, rgba(115,87,246,.14) 1px, transparent 1px), linear-gradient(to bottom, rgba(115,87,246,.14) 1px, transparent 1px); background-size: 8px 8px; }
.m3 { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 24px; border-radius: 20px; font: 500 14px var(--sans); border: 1px solid transparent; position: relative; white-space: nowrap; }
.m3-filled { background: var(--accent); color: #fff; } .m3-tonal { background: #E4DEFD; color: #2A1A7A; } .m3-elevated { background: #F6F3FF; color: var(--accent-ink); box-shadow: 0 1px 3px rgba(0,0,0,.25); } .m3-outlined { border-color: #79747E; color: var(--accent-ink); } .m3-text { color: var(--accent-ink); padding: 0 12px; }
.m3.is-hovered::after, .m3.is-focused::after, .m3.is-pressed::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; background: currentColor; opacity: .08; } .m3.is-focused::after, .m3.is-pressed::after { opacity: .13; }
.m3.is-focused { outline: 2px solid var(--ink); outline-offset: 2px; } .m3.is-disabled { background: rgba(23,23,23,.1); color: rgba(23,23,23,.4); border-color: transparent; box-shadow: none; } .m3-outlined.is-disabled, .m3-text.is-disabled { background: transparent; } .m3-outlined.is-disabled { border-color: rgba(23,23,23,.14); }
.w-bar { display: flex; gap: var(--s2); padding: var(--s3); background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); } .w-bar button { display: grid; place-items: center; border: 1.5px solid var(--field); border-radius: 6px; background: #fff; padding: 0; cursor: pointer; }
.w-bar.noring button:focus, .w-bar.noring button:focus-visible { outline: none; } .w-bar.ring button:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; }
.w-ref { width: 24px; height: 24px; border: 1.5px dashed var(--accent-ink); display: grid; place-items: center; font-size: 8px; color: var(--accent-ink); line-height: 1; text-align: center; }
.prac-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: var(--s6); align-items: start; } .assign { display: grid; gap: var(--s4); align-content: start; } .prac-grid .eyebrow { margin-bottom: var(--s2); }
.phone { width: 240px; min-height: 360px; border: 1.5px solid var(--ink); border-radius: 28px; padding: var(--s5) var(--s4); background: #fff; display: flex; flex-direction: column; gap: var(--s4); font-size: 13px; margin: 0 auto; box-shadow: 0 6px 0 #E4E1EE; } .phone.tall { width: 290px; min-height: 520px; }
.cp-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 96px; gap: var(--s4); align-items: center; padding: var(--s3) 0; border-bottom: 1px solid var(--line); } .cp-sample { padding: var(--s3) var(--s4); border-radius: var(--r-sm); border: 1px solid var(--line); font-size: var(--t-sm); } .cp-sample.as-btn { text-align: center; font-weight: 600; border-color: transparent; }
.cp-ratio { font-variant-numeric: tabular-nums; text-align: right; font-size: var(--t-sm); } .cp-ratio.ok { color: var(--good); } .cp-ratio.no { color: var(--bad); } .cp-ratio.ok::before { content: "✓ "; } .cp-ratio.no::before { content: "✕ "; }
.match { display: grid; } .match-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: var(--s5); align-items: center; padding: var(--s3) 0; border-bottom: 1px solid var(--line); } .match-row .ctl > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.quiz { margin-top: var(--s2); } .quiz legend { font: 600 var(--t-xl)/1.35 var(--display); letter-spacing: -.01em; margin-bottom: var(--s4); max-width: 60ch; } .quiz + .quiz { margin-top: var(--s5); }
.choices { display: grid; gap: var(--s3); } .choices.visual { grid-template-columns: 1fr 1fr; align-items: start; }
.choice { display: flex; gap: var(--s3); align-items: flex-start; padding: var(--s3) var(--s4); min-height: var(--ctl-lg); border: 1.5px solid var(--line-strong); border-radius: var(--r-md); background: var(--surface); cursor: pointer; transition: border-color .15s, background .15s; }
.choice:hover { border-color: var(--accent); background: #FBFAFF; } .choice-body { flex: 1; min-width: 0; align-self: center; } .choice .sp { border: 0; padding: 0; }
.choice:has(input:checked) { border-color: var(--accent-ink); box-shadow: 0 0 0 1.5px var(--accent-ink); }
.choice.right { border-color: var(--good); background: var(--good-soft); box-shadow: none; } .choice.wrong { border-color: var(--bad); background: var(--bad-soft); box-shadow: none; }
.choice.right::after, .choice.wrong::after { font-size: var(--t-xs); font-weight: 700; white-space: nowrap; align-self: center; } .choice.right::after { content: "✓ Correct"; color: var(--good); } .choice.wrong::after { content: "✕ Not this"; color: var(--bad); }
.choice.right .sp, .choice.wrong .sp { background: transparent; } .choice:has(input:disabled) { cursor: default; }
.feedback { display: grid; gap: var(--s2); } .feedback:empty { display: none; } .feedback p, .why { display: flex; gap: var(--s2); align-items: flex-start; } .feedback .ic, .why .ic { margin-top: 4px; } .why { margin-top: var(--s3); font-size: var(--t-sm); color: var(--ink-2); } .feedback h3 { font: 700 var(--t-xl) var(--display); }
.complete { background: var(--h-soft); border-radius: var(--r-lg); padding: var(--s6); display: grid; gap: var(--s3); } .complete .eyebrow { color: var(--h-ink); } .complete h2 { font-size: var(--t-3xl); letter-spacing: -.03em; } .complete .muted { color: var(--ink-2); } .complete .row { margin-top: var(--s3); }

/* ---------- Arena ---------- */
.arena-list { margin-top: var(--s5); } .arena-list li { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: var(--s5); align-items: center; padding: var(--s5) 0; border-top: 1px solid var(--line); }
.arena-n { font: 700 var(--t-2xl)/1 var(--display); color: var(--h-ink); background: var(--h-soft); width: 64px; height: 64px; border-radius: var(--r-lg); display: grid; place-items: center; } .arena-list li.locked .arena-n { background: #EEECF2; color: var(--muted); } .arena-list li.locked h2 { color: var(--muted); }
.arena-list p { max-width: 62ch; margin-top: var(--s1); } .arena-list .meta { font-size: var(--t-sm); color: var(--muted); margin-top: var(--s2); } .arena-list .lock { color: var(--ink-2); font-weight: 600; } .arena-list + .small { margin-top: var(--s5); padding-top: var(--s5); border-top: 1px solid var(--line); }
.crime-layout, .rescue-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s7); margin-top: var(--s6); align-items: start; }
.cs-ui { background: #fff; border: 1.5px solid var(--ink); border-radius: var(--r-lg); padding: var(--s4); display: grid; gap: var(--s1); max-width: 420px; box-shadow: 0 6px 0 #E4E1EE; }
.clue { position: relative; display: block; width: 100%; text-align: left; background: none; border: 1.5px dashed transparent; border-radius: var(--r-md); padding: var(--s2); font: inherit; color: inherit; cursor: pointer; transition: border-color .15s, background .15s; }
.clue:hover { border-color: var(--field); } .clue[aria-pressed=true] { border-color: var(--accent); border-style: solid; background: var(--accent-soft); }
.clue[data-flag]::after { content: attr(data-flag); position: absolute; right: var(--s1); top: -10px; font: 700 11px/1.6 var(--sans); padding: 0 var(--s2); border-radius: var(--r-pill); background: var(--accent); color: #fff; z-index: 1; white-space: nowrap; }
.clue.hit { border-color: var(--good); border-style: solid; background: var(--good-soft); } .clue.hit::after { background: var(--good); } .clue.missed { border-color: var(--warn); border-style: solid; background: var(--warn-soft); } .clue.missed::after { background: var(--warn); } .clue.false { border-color: var(--bad); border-style: solid; background: var(--bad-soft); } .clue.false::after { background: var(--bad); } .clue[disabled] { cursor: default; }
.clue > span { display: block; } .cs-split { display: flex; align-items: center; } .clue.grow { flex: 1; } .clue.tiny { width: auto; min-width: 32px; min-height: 32px; display: grid; place-items: center; }
.cs-banner { background: #F5A524; color: #fff; font-weight: 800; font-size: 19px; line-height: 1.15; padding: 12px; border-radius: 6px; } .cs-total { font-size: 11px; color: #9a9a9a; margin-top: 6px; }
.cs-line { display: flex !important; justify-content: space-between; font-size: 14px; padding: 2px 0; } .cs-x { font-size: 12px; line-height: 1; width: 12px; height: 12px; text-align: center; color: #666; }
.cs-link { color: var(--ink); text-decoration: underline; font-size: 14px; } .cs-in { border: 1px solid #c9c9c9; border-radius: 6px; height: 38px; line-height: 36px; padding: 0 10px; color: #b5b5b5; font-size: 14px; } .cs-in.dark { color: var(--ink); } .cs-in.err { border: 2px solid #E5484D; line-height: 34px; }
.cs-help { color: #BDBDBD; font-size: 12px; } .cs-lab { font-size: 12px; font-weight: 600; } .cs-secure { display: flex !important; gap: 6px; align-items: center; font-size: 13px; color: #444; } .cs-btns { display: flex !important; } .cs-btns .sp-btn { flex: 1; justify-content: center; height: 40px; border-radius: 0; }
.cs-side { display: grid; gap: var(--s3); align-content: start; } .cs-side .btn { justify-self: start; } .cs-count { font-size: var(--t-sm); }
.cs-report { display: grid; } .cs-report li { padding: var(--s3) 0; border-top: 1px solid var(--line); font-size: var(--t-sm); display: grid; gap: var(--s1); } .verdict { font-weight: 700; display: flex; gap: var(--s2); align-items: center; } .ref { font-size: var(--t-xs); color: var(--muted); }
.context { font: 500 var(--t-xl)/1.45 var(--display); letter-spacing: -.01em; border-left: 4px solid var(--accent); padding-left: var(--s4); margin: var(--s5) 0 var(--s2); max-width: 62ch; } .context .eyebrow { display: block; font-family: var(--sans); margin-bottom: var(--s1); }
.battle-tag { display: block; font-size: var(--t-xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: var(--s3); } .choice table td, .choice table th { padding: 4px 2px; border-bottom: 1px solid var(--line); }
.rs-panel { display: grid; gap: var(--s4); } .rs-panel h2 { margin-top: var(--s2); } .rs-kbd { border-top: 1px solid var(--line); padding-top: var(--s4); display: grid; gap: var(--s2); font-size: var(--t-sm); justify-items: start; }
.rs-form { background: #fff; border: 1.5px solid var(--ink); border-radius: var(--r-lg); padding: var(--s5); display: grid; gap: var(--s4); max-width: 400px; margin: var(--s3) 0 var(--s4); box-shadow: 0 6px 0 #E4E1EE; } .rs-form h3 { font: 700 var(--t-2xl) var(--display); letter-spacing: -.02em; } .rs-copy { color: var(--rs-text); }
.rs-field { display: grid; gap: var(--s1); } .rs-field label { font-size: var(--t-sm); font-weight: 600; } .rs-field.err input { border: 2px solid #D93036; } .rs-pass { display: grid; grid-template-columns: 1fr auto; gap: var(--s1) var(--s2); align-items: center; } .rs-pass label { grid-column: 1 / -1; }
.rs-pass button { display: grid; place-items: center; padding: 0; background: #fff; border: 1px solid var(--field); border-radius: 6px; cursor: pointer; } .rs-err { display: flex; gap: var(--s2); align-items: center; color: var(--bad); font-size: var(--t-sm); }
.rs-form button[type=submit] { height: var(--ctl); border: 0; border-radius: var(--r-md); background: var(--rs-btn); color: #fff; font: 600 var(--t-md) var(--sans); cursor: pointer; }
.rs-form.focus-none :focus, .rs-form.focus-none :focus-visible { outline: none; } .rs-form.focus-faint :focus-visible { outline: 1px solid var(--rs-focus); outline-offset: 0; } .rs-form.focus-ring :focus-visible { outline: 2px solid var(--rs-focus); outline-offset: 2px; }
.brief { display: grid; grid-template-columns: 1.3fr 1fr; gap: var(--s7); padding: var(--s5) 0; margin: var(--s5) 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); } .brief p + p { margin-top: var(--s2); }
.boss-layout { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s7); align-items: start; } .boss-layout .assign { grid-template-columns: 1fr 1fr; gap: var(--s4) var(--s5); } .boss-layout .eyebrow { margin-bottom: var(--s3); text-align: center; }
.boss-rows { display: grid; grid-template-columns: auto 1fr; gap: var(--s2) var(--s4); } .boss-rows dt { font-weight: 600; color: var(--ink); } .boss-link { color: var(--accent-ink); text-decoration: underline; }
.rubric { margin-top: var(--s6); border-top: 2px solid var(--ink); padding-top: var(--s5); } .rubric h2 { font-size: var(--t-3xl); letter-spacing: -.03em; margin: var(--s2) 0 var(--s4); }
.rubric th, .rubric td, .skill-table th, .skill-table td, .sys-table th, .sys-table td { text-align: left; padding: var(--s3) var(--s3) var(--s3) 0; border-bottom: 1px solid var(--line); vertical-align: top; font-size: var(--t-sm); }
.rubric td:nth-child(2) { white-space: nowrap; font-variant-numeric: tabular-nums; } .rubric .small { margin-top: var(--s4); }
.pips { display: inline-flex; gap: var(--s1); margin-right: var(--s2); } .pips i { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--ink); } .pips i.on { background: var(--ink); }

/* ---------- Lab ---------- */
.lab-layout { display: grid; grid-template-columns: 256px minmax(0, 1fr) 272px; gap: var(--s6); margin-top: var(--s6); align-items: start; }
.lab-controls { display: grid; gap: var(--s5); } .lab-controls fieldset { display: grid; gap: var(--s3); } .lab-controls legend { font: 700 var(--t-lg) var(--display); margin-bottom: var(--s3); } .lab-controls .ctl { min-width: 0; }
.lab-main { display: grid; gap: var(--s4); position: sticky; top: var(--s4); }
.lab-canvas { border: 1.5px solid #D9D6E6; border-radius: var(--r-lg); padding: clamp(16px, 4vw, 48px); display: grid; place-items: center; min-height: 384px; transition: background .2s; background-image: radial-gradient(rgba(23,23,23,.07) 1px, transparent 1px); background-size: 16px 16px; }
.lab-card { display: flex; flex-direction: column; width: min(440px, 100%); box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 12px 32px rgba(0,0,0,.07); transition: padding .2s, gap .2s, border-radius .2s; }
.lab-input { border: 1px solid; height: 40px; display: flex; align-items: center; padding: 0 12px; } .lab-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; align-self: flex-start; padding: 0 18px; font-weight: 600; transition: all .15s; }
.spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } }
.read-row { display: grid; grid-template-columns: 1fr auto auto; gap: var(--s3); align-items: center; padding: var(--s2) 0; border-bottom: 1px solid var(--line); font-size: var(--t-sm); } .read-row b { font-variant-numeric: tabular-nums; } .lab-read .small { margin-top: var(--s3); }
.lab-missions { display: grid; gap: var(--s1); } .mission { padding: var(--s4) 0; border-top: 1px solid var(--line); display: grid; gap: var(--s2); justify-items: start; } .mission p { font-size: var(--t-sm); color: var(--muted); } .mission h3 { display: flex; gap: var(--s2); align-items: center; flex-wrap: wrap; } .mission.active { border-top: 4px solid var(--accent); }

/* ---------- Library and system page ---------- */
.kinds { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--s5); margin: var(--s6) 0; padding: var(--s5) 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); } .kinds dd { font-size: var(--t-sm); color: var(--muted); margin-top: var(--s2); }
.kind { font-size: var(--t-xs); font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 2px var(--s2); border-radius: var(--s1); white-space: nowrap; }
.k-Law { background: #E6F0FE; color: #1B5FC4; } .k-Principle { background: #EFEBFE; color: #5B3FE0; } .k-Heuristic { background: #FDEDDC; color: #9A4706; } .k-Standard { background: #E3F5EC; color: #1A6B4A; } .k-Guideline { background: #FCE8F2; color: #A82A6E; }
.lib-tools { display: grid; gap: var(--s3); margin-bottom: var(--s4); }
.entry { border-top: 1px solid var(--line); } .entry:last-child { border-bottom: 1px solid var(--line); }
.entry summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s1) var(--s4); padding: var(--s4) var(--s1); cursor: pointer; list-style: none; align-items: center; border-radius: var(--r-sm); } .entry summary::-webkit-details-marker { display: none; } .entry summary:hover .entry-title { color: var(--accent-ink); }
.entry-title { font: 700 var(--t-xl)/1.25 var(--display); letter-spacing: -.01em; grid-column: 1; } .entry-tags { grid-column: 1; display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; } .entry-def { grid-column: 1; color: var(--ink-2); max-width: 75ch; margin-top: 2px; }
.entry summary > .ic { grid-column: 2; grid-row: 1 / span 3; transition: transform .2s; color: var(--muted); } .entry[open] summary > .ic { transform: rotate(90deg); }
.entry-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4) var(--s7); padding: var(--s1) var(--s1) var(--s5); } .entry-body dt, .sys h3 { font-size: var(--t-xs); font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-bottom: var(--s1); }
.sys h3 { margin: var(--s5) 0 var(--s3); } .swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--s3); }
.swatches li { display: grid; grid-template-columns: var(--s7) 1fr; gap: var(--s3); align-items: center; font-size: var(--t-sm); } .swatches i { width: var(--s7); height: var(--s7); border-radius: var(--r-md); border: 1px solid var(--line-strong); } .swatches code, .sys code { font: 500 var(--t-xs) ui-monospace, monospace; color: var(--muted); display: block; }
.scale-row { display: flex; flex-wrap: wrap; gap: var(--s4); align-items: flex-end; } .scale-row li { display: grid; gap: var(--s1); justify-items: start; font-size: var(--t-xs); color: var(--muted); } .scale-row i { display: block; background: var(--accent); border-radius: 2px; height: var(--s4); } .scale-row .rad { width: var(--s8); height: var(--s7); background: var(--accent-soft); border: 1.5px solid var(--accent); }
.type-spec li { display: grid; grid-template-columns: 96px 1fr; gap: var(--s4); align-items: baseline; padding: var(--s2) 0; border-bottom: 1px solid var(--line); } .type-spec code { display: inline; }
.sys-table th[scope=row] { font-weight: 600; width: 30%; }

/* ---------- Mastery ---------- */
.mast-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s7); margin: var(--s6) 0; align-items: center; } .mast-level { display: flex; gap: var(--s5); align-items: center; } .mast-level > div:last-child { flex: 1; } .mast-level h2 { font-size: var(--t-3xl); letter-spacing: -.03em; }
.ladder { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s2) var(--s4); font-size: var(--t-sm); color: var(--muted); } .ladder li { display: flex; gap: var(--s2); align-items: baseline; padding: var(--s2) 0; border-top: 4px solid var(--line); } .ladder span { font-weight: 700; } .ladder em { margin-left: auto; font-size: var(--t-xs); font-variant-numeric: tabular-nums; }
.ladder .past { border-color: var(--accent); color: var(--ink); } .ladder .now { border-color: var(--accent); color: var(--accent-ink); font-weight: 700; } .ladder .now::after { content: "← you"; font-size: var(--t-xs); }
.mast-skills { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s7); align-items: center; } .radar { width: 100%; height: auto; max-width: 440px; } .radar text { font: 600 10.5px var(--sans); fill: var(--ink-2); }
.skill-table .meter { width: 96px; margin-right: var(--s2); } .skill-table td { font-variant-numeric: tabular-nums; white-space: nowrap; } .skill-table th[scope=row] { font-weight: 600; }
.rec-rows li { display: flex; justify-content: space-between; gap: var(--s4); align-items: center; padding: var(--s3) 0; border-bottom: 1px solid var(--line); } .rec-rows div { display: grid; } .rec-rows a:not(.btn) { font-weight: 600; }
.history li { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: var(--s4); align-items: center; padding: var(--s3) 0; border-bottom: 1px solid var(--line); font-size: var(--t-sm); } .history b { color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0 var(--s7); } .ach-grid li { display: flex; gap: var(--s4); padding: var(--s4) 0; border-bottom: 1px solid var(--line); color: var(--muted); } .ach-grid div { display: grid; } .ach-grid li.got { color: var(--ink); } .ach-grid li:not(.got) b { font-weight: 500; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) { .lab-layout { grid-template-columns: 240px minmax(0, 1fr); } .lab-missions { grid-column: 1 / -1; grid-template-columns: repeat(3, 1fr); gap: var(--s5); } .lab-missions h2, .lab-missions > .small { grid-column: 1 / -1; } }
@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; } .side { display: none; } .brand.mobile { display: inline-flex; padding: 0; } .top { justify-content: space-between; }
  .tabs { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: rgba(248,248,246,.97); backdrop-filter: blur(8px); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .tabs ul { display: grid; grid-template-columns: repeat(6, 1fr); } .tabs a { display: grid; justify-items: center; align-content: center; gap: 2px; min-height: 56px; font: 600 var(--t-xs) var(--sans); color: var(--muted); text-decoration: none; } .tabs a[aria-current] { color: var(--accent-ink); box-shadow: inset 0 3px 0 var(--accent); }
  #toasts { top: var(--s8); right: var(--s3); left: var(--s3); align-items: stretch; } .toast { max-width: none; }
  .dash-grid { grid-template-columns: 1fr; gap: 0; } .dash-side .block:first-child { border-top: 1px solid var(--line); padding-top: var(--s6); }
  .world { grid-template-columns: 1fr; gap: var(--s5); } .world-head { position: static; }
  .crime-layout, .rescue-layout, .mast-top, .mast-skills, .brief, .boss-layout { grid-template-columns: 1fr; gap: var(--s6); } .cs-ui { margin: 0 auto; }
  .kinds { grid-template-columns: repeat(2, 1fr); } .hero { grid-template-columns: 1fr; padding-top: var(--s4); } .hero-art { max-width: 460px; margin: 0 auto; }
  .loop { grid-template-columns: 1fr 1fr; } .lab-layout { grid-template-columns: 1fr; } .lab-main { position: static; order: -1; } .lab-missions { grid-template-columns: 1fr; gap: 0; }
}
@media (max-width: 640px) {
  .st-level { min-width: 120px; } .st-line span { display: none; } .brand.mobile span { display: none; }
  .compare, .choices.visual, .prac-grid, .contrast-stage, .two, .three, .land-worlds, .entry-body, .match-row, .boss-layout .assign, .howto, .loop, .kinds { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; } .cp-row { grid-template-columns: 1fr 96px; } .cp-row .assign { grid-column: 1 / -1; }
  .stepper button { flex-direction: column; justify-content: center; gap: var(--s1); font-size: var(--t-xs); } .type-row { grid-template-columns: 1fr; gap: var(--s1); }
  .arena-list li { grid-template-columns: 1fr; gap: var(--s3); } .arena-list .btn { justify-self: start; } .profile li { grid-template-columns: 1fr 96px; } .profile .meter { grid-column: 1 / -1; grid-row: 2; }
  .map-rows li { grid-template-columns: var(--s5) 1fr 56px; } .map-rows .ticks { display: none; } .ladder { grid-template-columns: 1fr 1fr; } .continue, .complete { padding: var(--s5); } .continue h2 { font-size: var(--t-2xl); }
  .demo { padding: var(--s4); } .ctl { min-width: 100%; } .bar { grid-template-columns: 72px minmax(0, 1fr) 64px; } .bar em { display: none; }
  .rubric thead { display: none; } .rubric tr { display: grid; padding: var(--s3) 0; border-bottom: 1px solid var(--line); } .rubric th, .rubric td { border: 0; padding: var(--s1) 0; }
  .stage-foot .btn { width: 100%; } .history li { grid-template-columns: 56px minmax(0, 1fr) auto; } .type-spec li { grid-template-columns: 1fr; gap: 0; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; } }

/* Wide screens: content is centred in the space beside the sidebar, and the top bar shares its edges. */
.page, .page.narrow, .page.wide { margin-inline: auto; }
.page { max-width: 1280px; } .page.lesson { max-width: 960px; } .page.wide { max-width: 1440px; }
.top { max-width: 1280px; margin-inline: auto; width: 100%; } .page-notice { max-width: 1184px; margin-inline: auto; }
@media (min-width: 1500px) { .dash-grid { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: var(--s8); } }
