/* Security Lab — light editorial theme. Terminal pane is the only dark surface. */
:root {
  --paper: #f4eee2;
  --paper-2: #fdf9f1;
  --paper-3: #efe6d6;
  --ink: #221d15;
  --ink-soft: #5f564897;
  --ink-mute: #6b6252;
  --line: #e0d5c1;
  --line-strong: #cdbfa5;
  --teal: #0e6f67;
  --teal-deep: #0a524c;
  --teal-wash: #dcebe8;
  --terra: #c05a37;
  --terra-deep: #a4492b;
  --terra-wash: #f3ddd1;
  --gold: #b07d1e;
  --gold-wash: #f1e4c4;
  --rose: #b14a63;
  --indigo: #4f5bb0;
  --violet: #76509e;
  --sky: #2f7fae;
  --blue: #2f66b0;
  --emerald: #2f8f63;
  --cyan: #157d87;
  --amber: #b07d1e;
  --orange: #c06a2a;
  --red: #b23b32;
  --lime: #6e8c1e;
  --ok: #0e6f67;
  --bad: #b23b32;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(60,45,20,.06), 0 10px 30px -18px rgba(60,45,20,.35);
  --shadow-lg: 0 2px 6px rgba(60,45,20,.08), 0 24px 60px -30px rgba(60,45,20,.5);
  --maxw: 1160px;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  /* terminal palette */
  --term-bg: #0f1419;
  --term-bg-2: #161c24;
  --term-fg: #d7dee8;
  --term-dim: #7c8798;
  --term-green: #7fd98c;
  --term-cyan: #5fc9d8;
  --term-blue: #7aa2f7;
  --term-yellow: #e5c07b;
  --term-magenta: #c9a0e9;
  --term-red: #f07178;
  --term-accent: #43d6c4;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--teal-deep); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 560; line-height: 1.12; letter-spacing: -.01em; margin: 0 0 .4em; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); }
code, kbd, samp { font-family: var(--mono); font-size: .88em; }
:not(pre) > code { background: var(--paper-3); border: 1px solid var(--line); border-radius: 6px; padding: .08em .4em; color: var(--terra-deep); word-break: break-word; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.mono { font-family: var(--mono); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.sprite { position: absolute; width: 0; height: 0; }

/* ── decorative background ── */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg .paper-grain { position: absolute; inset: 0; opacity: .5;
  background-image: radial-gradient(var(--line-strong) .5px, transparent .5px);
  background-size: 22px 22px; mask-image: radial-gradient(circle at 50% 0, #000, transparent 75%); }
.bg .wash { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; }
.bg .w1 { width: 46vw; height: 46vw; top: -14vw; right: -10vw; background: radial-gradient(circle, var(--teal-wash), transparent 70%); }
.bg .w2 { width: 40vw; height: 40vw; bottom: -16vw; left: -12vw; background: radial-gradient(circle, var(--terra-wash), transparent 70%); }

/* ── nav ── */
.nav { position: sticky; top: 0; z-index: 50; backdrop-filter: saturate(140%) blur(10px);
  background: color-mix(in srgb, var(--paper) 82%, transparent); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; gap: 18px; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 9px; flex-shrink: 0; }
.logo:hover { text-decoration: none; }
.sig-logo { width: auto; height: 42px; aspect-ratio: 4871 / 1134; color: var(--ink); overflow: visible; }
.sig-logo use { fill: var(--ink); }
@media (max-width: 720px) { .sig-logo { height: 36px; } }
.lab-badge { font-family: var(--mono); font-size: .62rem; font-weight: 600; letter-spacing: .14em;
  color: var(--teal-deep); background: var(--teal-wash); border: 1px solid color-mix(in srgb, var(--teal) 30%, transparent);
  padding: .18em .5em; border-radius: 6px; text-transform: uppercase; }
.links { display: flex; gap: 2px; margin-left: 8px; }
.links a { font-size: .92rem; font-weight: 500; color: var(--ink-mute); padding: .5em .8em; border-radius: 8px; }
.links a:hover { color: var(--ink); background: var(--paper-3); text-decoration: none; }
.links a.active { color: var(--teal-deep); background: var(--teal-wash); }
.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.score { font-family: var(--mono); font-size: .8rem; font-weight: 600; color: var(--ink);
  background: var(--paper-2); border: 1px solid var(--line-strong); border-radius: 999px; padding: .34em .8em; white-space: nowrap; }
.score b { color: var(--terra-deep); }
.score .streak { color: var(--gold); }
.icon-btn { display: none; align-items: center; justify-content: center; width: 40px; height: 40px;
  border: 1px solid var(--line-strong); background: var(--paper-2); color: var(--ink); border-radius: 10px; cursor: pointer; }
.menu-btn { display: none; }

/* ── buttons ── */
.btn { display: inline-flex; align-items: center; gap: .5em; font: inherit; font-weight: 550; font-size: .9rem;
  padding: .62em 1.1em; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--paper-2);
  color: var(--ink); cursor: pointer; transition: transform .12s, box-shadow .2s, background .2s; }
.btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); }
.btn-primary { background: linear-gradient(135deg, var(--teal), var(--teal-deep)); color: #fff; border-color: transparent; }
.btn-primary:hover { box-shadow: 0 10px 24px -10px var(--teal); }
.btn-terra { background: linear-gradient(135deg, var(--terra), var(--terra-deep)); color: #fff; border-color: transparent; }
.btn-sm { padding: .42em .8em; font-size: .82rem; border-radius: 8px; }
.btn[disabled] { opacity: .5; cursor: default; transform: none; box-shadow: none; }

main { display: block; min-height: 70vh; padding: 40px 0 72px; }
main:focus { outline: none; }

/* ── hero ── */
.hero { display: grid; grid-template-columns: 1.3fr .9fr; gap: 36px; align-items: center; padding: 20px 0 10px; }
.hero .eyebrow { font-family: var(--mono); font-size: .76rem; letter-spacing: .16em; text-transform: uppercase; color: var(--teal-deep); }
.hero h1 { margin: .3em 0 .25em; }
.hero h1 em { font-style: italic; color: var(--terra-deep); }
.hero p.lede { font-size: 1.12rem; color: var(--ink-mute); max-width: 44ch; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.hero-stats { display: flex; gap: 26px; margin-top: 28px; flex-wrap: wrap; }
.hero-stats .stat { line-height: 1.1; }
.hero-stats .num { font-family: var(--serif); font-size: 1.7rem; color: var(--ink); }
.hero-stats .lbl { font-size: .76rem; color: var(--ink-mute); text-transform: uppercase; letter-spacing: .08em; }
.hero-art { position: relative; aspect-ratio: 1; max-width: 340px; justify-self: center; width: 100%; }
.hero-art canvas { width: 100%; height: 100%; }

/* ── section heads ── */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 54px 0 20px; }
.section-head h2 { font-size: 1.5rem; margin: 0; }
.section-head .count { font-family: var(--mono); font-size: .8rem; color: var(--ink-mute); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 26px; }
.chip { font: inherit; font-size: .82rem; font-weight: 500; padding: .4em .8em; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--paper-2); color: var(--ink-mute); cursor: pointer; }
.chip:hover { color: var(--ink); }
.chip.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ── track blocks & room cards ── */
.track { margin-bottom: 46px; }
.track-head { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.track-head h2 { font-size: 1.35rem; margin: 0; }
.track-dot { width: 12px; height: 12px; border-radius: 4px; background: var(--accent, var(--teal)); flex-shrink: 0; transform: rotate(45deg); }
.track-blurb { color: var(--ink-mute); font-size: .96rem; margin: 0 0 18px; max-width: 72ch; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }

.room-card { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 20px;
  background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  transition: transform .15s, box-shadow .25s, border-color .2s; overflow: hidden; }
.room-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--accent, var(--teal)); }
.room-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--line-strong); text-decoration: none; }
.room-card .rc-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.room-card .badge-art { width: 46px; height: 46px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 14%, var(--paper-2));
  display: grid; place-items: center; color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 24%, transparent); }
.room-card .badge-art svg { width: 26px; height: 26px; }
.room-card h3 { font-size: 1.12rem; margin: 2px 0 0; color: var(--ink); }
.room-card .rc-sum { font-size: .9rem; color: var(--ink-mute); flex: 1; }
.room-card .rc-meta { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; font-size: .76rem; color: var(--ink-mute); margin-top: 2px; }
.room-card .rc-meta .sep { opacity: .4; }
.pill { font-family: var(--mono); font-size: .68rem; font-weight: 600; letter-spacing: .03em; padding: .2em .55em; border-radius: 6px; text-transform: uppercase; }
.pill.easy { color: var(--teal-deep); background: var(--teal-wash); }
.pill.medium { color: var(--gold); background: var(--gold-wash); }
.pill.hard { color: var(--terra-deep); background: var(--terra-wash); }
.pill.insane { color: #fff; background: var(--red); }
.rc-progress { height: 6px; border-radius: 4px; background: var(--paper-3); overflow: hidden; margin-top: 6px; }
.rc-progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #fff)); transition: width .6s ease; }
.rc-done { position: absolute; top: 14px; right: 14px; color: var(--teal); }
.room-card.solved { border-color: color-mix(in srgb, var(--teal) 40%, var(--line)); }

/* ── room page ── */
.crumb { font-size: .85rem; color: var(--ink-mute); display: inline-flex; gap: .4em; align-items: center; margin-bottom: 14px; }
.room-head { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 8px; }
.room-head .badge-art { width: 60px; height: 60px; flex-shrink: 0; }
.room-head h1 { font-size: clamp(1.6rem, 4vw, 2.3rem); }
.room-head .rc-meta { margin-top: 8px; }
.room-intro { color: var(--ink-mute); max-width: 70ch; margin-bottom: 20px; }
.room-intro p { margin: 0 0 .7em; }

.mobile-tabs { display: none; }
.room-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 22px; align-items: start; }
.room-tasks { min-width: 0; }
.room-term-wrap { position: sticky; top: 82px; min-width: 0; }

.room-progress { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--paper-2);
  border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 18px; }
.room-progress .bar { flex: 1; height: 8px; background: var(--paper-3); border-radius: 5px; overflow: hidden; }
.room-progress .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), var(--terra)); width: 0; transition: width .6s; }
.room-progress .lbl { font-family: var(--mono); font-size: .8rem; color: var(--ink-mute); white-space: nowrap; }

.task { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 18px; box-shadow: var(--shadow); }
.task > h3 { font-size: 1.16rem; display: flex; align-items: center; gap: .5em; }
.task > h3 .tnum { font-family: var(--mono); font-size: .8rem; color: #fff; background: var(--ink); width: 1.7em; height: 1.7em; border-radius: 7px; display: inline-grid; place-items: center; flex-shrink: 0; }
.task-body { color: var(--ink-mute); font-size: .95rem; }
.task-body p { margin: 0 0 .6em; }

.q { border-top: 1px dashed var(--line-strong); padding-top: 16px; margin-top: 16px; }
.q-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.q-head .qno { font-family: var(--mono); font-size: .78rem; color: var(--ink-mute); }
.q-head .pts { margin-left: auto; font-family: var(--mono); font-size: .76rem; font-weight: 600; color: var(--gold); }
.q-prompt { font-weight: 550; margin-bottom: 8px; }
.q-fmt { font-family: var(--mono); font-size: .76rem; color: var(--ink-mute); margin-bottom: 10px; }
.q-fmt code { background: none; border: none; padding: 0; color: var(--teal-deep); }
.answer-row { display: flex; gap: 8px; flex-wrap: wrap; }
.answer-row .input { flex: 1; min-width: 180px; }
.input { font: inherit; font-family: var(--mono); font-size: .9rem; padding: .62em .8em; border: 1.5px solid var(--line-strong);
  border-radius: 9px; background: var(--paper); color: var(--ink); width: 100%; }
.input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-wash); }
.q.solved .input { border-color: var(--teal); background: var(--teal-wash); color: var(--teal-deep); }
.q.shake { animation: shake .4s; }
@keyframes shake { 10%,90%{transform:translateX(-1px)} 30%,70%{transform:translateX(3px)} 50%{transform:translateX(-5px)} }
@media (prefers-reduced-motion: reduce){ .q.shake{animation:none} }
.hint-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.hint-row .hint-btn { font-size: .8rem; }
.hints { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.hint { font-size: .88rem; color: var(--ink-mute); background: var(--gold-wash); border-left: 3px solid var(--gold);
  padding: .5em .7em; border-radius: 0 8px 8px 0; }
.hint code { background: color-mix(in srgb, var(--gold) 14%, #fff); }
.debrief { margin-top: 12px; border: 1px solid color-mix(in srgb, var(--teal) 28%, var(--line)); background: var(--teal-wash);
  border-radius: var(--radius-sm); padding: 14px 16px; font-size: .92rem; }
.debrief .d-tag { font-family: var(--mono); font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--teal-deep); display: flex; align-items: center; gap: .4em; margin-bottom: 6px; }
.debrief p { margin: 0 0 .6em; }
.debrief p:last-child { margin-bottom: 0; }
.debrief b { color: var(--teal-deep); }

/* ── terminal ── */
.term { display: flex; flex-direction: column; height: min(72vh, 620px); background: var(--term-bg);
  border: 1px solid #000; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); }
.term-bar { display: flex; align-items: center; gap: 8px; padding: 9px 14px; background: var(--term-bg-2); border-bottom: 1px solid #000; flex-shrink: 0; }
.term-bar .dots { display: flex; gap: 6px; }
.term-bar .dots i { width: 11px; height: 11px; border-radius: 50%; display: block; }
.term-bar .dots i:nth-child(1){ background:#ff5f56 } .term-bar .dots i:nth-child(2){ background:#ffbd2e } .term-bar .dots i:nth-child(3){ background:#27c93f }
.term-bar .title { font-family: var(--mono); font-size: .76rem; color: var(--term-dim); margin-left: 4px; }
.term-bar .term-hint { margin-left: auto; font-family: var(--mono); font-size: .68rem; color: var(--term-dim); }
.term-out { flex: 1; overflow-y: auto; padding: 12px 14px; font-family: var(--mono); font-size: 13px; line-height: 1.5;
  color: var(--term-fg); white-space: pre-wrap; word-break: break-word; -webkit-overflow-scrolling: touch; }
.term-out::-webkit-scrollbar { width: 10px; } .term-out::-webkit-scrollbar-thumb { background: #2a333f; border-radius: 6px; }
.term-line { white-space: pre-wrap; }
.term-prompt { color: var(--term-green); }
.term-prompt .at { color: var(--term-dim); } .term-prompt .path { color: var(--term-blue); } .term-prompt .pg { color: var(--term-magenta); }
.ansi-red{color:var(--term-red)} .ansi-green{color:var(--term-green)} .ansi-yellow{color:var(--term-yellow)}
.ansi-blue{color:var(--term-blue)} .ansi-magenta{color:var(--term-magenta)} .ansi-cyan{color:var(--term-cyan)}
.ansi-b{font-weight:700;color:#fff} .ansi-dim{color:var(--term-dim)} .ansi-match{font-weight:700;color:#ffd080;background:rgba(255,120,60,.18);border-radius:3px}
.term-inrow { display: flex; align-items: center; padding: 6px 14px 12px; gap: 8px; flex-shrink: 0; }
.term-inrow .term-prompt { font-family: var(--mono); font-size: 13px; white-space: nowrap; }
.term-input { flex: 1; background: none; border: none; outline: none; color: var(--term-fg); font-family: var(--mono); font-size: 13px; caret-color: var(--term-accent); min-width: 40px; }
.term-mini { font-size: .76rem; color: var(--ink-mute); margin-top: 8px; font-family: var(--mono); }

/* ── toolkit ── */
.page-head { margin-bottom: 26px; }
.page-head .eyebrow { font-family: var(--mono); font-size: .76rem; letter-spacing: .16em; text-transform: uppercase; color: var(--teal-deep); }
.page-head p { color: var(--ink-mute); max-width: 62ch; }
.toolkit { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.tk-ops { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.tk-key { margin-bottom: 12px; display: none; } .tk-key.show { display: block; }
.tk-key label { font-size: .78rem; color: var(--ink-mute); display: block; margin-bottom: 4px; }
.tk-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tk-area { font-family: var(--mono); font-size: .86rem; min-height: 150px; resize: vertical; padding: 12px; border: 1.5px solid var(--line-strong); border-radius: 10px; background: var(--paper); color: var(--ink); width: 100%; }
.tk-area:focus { outline: none; border-color: var(--teal); }
.tk-area[readonly] { background: var(--paper-3); }
.tk-err { color: var(--bad); font-size: .84rem; min-height: 1.2em; margin: 8px 0; font-family: var(--mono); }
.next-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }

/* ── notebook & about ── */
.post-list { display: flex; flex-direction: column; gap: 4px; }
.post-link { display: flex; align-items: center; gap: 16px; padding: 18px; border-radius: var(--radius); border: 1px solid transparent; }
.post-link:hover { background: var(--paper-2); border-color: var(--line); text-decoration: none; }
.post-link .post-date { font-family: var(--mono); font-size: .76rem; color: var(--ink-mute); width: 92px; flex-shrink: 0; }
.post-link h3 { margin: 0 0 3px; font-size: 1.1rem; color: var(--ink); }
.post-link p { margin: 0; color: var(--ink-mute); font-size: .9rem; }
.post-link .arrow { margin-left: auto; color: var(--teal); opacity: 0; transition: opacity .2s, transform .2s; }
.post-link:hover .arrow { opacity: 1; transform: translateX(3px); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tag { font-size: .72rem; color: var(--ink-mute); background: var(--paper-3); border: 1px solid var(--line); border-radius: 999px; padding: .2em .7em; }
.article { max-width: 720px; margin: 0 auto; }
.article-head { margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.prose { font-size: 1.04rem; color: #322c22; }
.prose h2 { font-size: 1.4rem; margin: 1.5em 0 .5em; }
.prose p, .prose li { line-height: 1.75; }
.prose table { width: 100%; border-collapse: collapse; margin: 1em 0; font-size: .92rem; }
.prose th, .prose td { text-align: left; padding: .5em .7em; border-bottom: 1px solid var(--line); }
.prose th { font-family: var(--mono); font-size: .8rem; color: var(--ink-mute); }
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: 22px 0; }
.panel { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.panel h3 { font-size: 1.08rem; }
.panel .cat-ico { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 11px; background: var(--teal-wash); color: var(--teal-deep); margin-bottom: 10px; }
.panel .cat-ico svg { width: 22px; height: 22px; }

/* ── footer ── */
.footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 26px 0; }
.footer-inner { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: .85rem; color: var(--ink-mute); }

/* ── toast ── */
.toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: var(--paper); padding: .7em 1.2em; border-radius: 10px; font-size: .9rem; font-weight: 500;
  box-shadow: var(--shadow-lg); z-index: 100; transition: opacity .25s, transform .25s; max-width: 90vw; }
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast.win { background: var(--teal-deep); }

.fade { opacity: 0; transform: translateY(14px); }
.fade.in { opacity: 1; transform: none; transition: opacity .5s, transform .5s; }
@media (prefers-reduced-motion: reduce) { .fade { opacity: 1 !important; transform: none !important; } }

.empty { text-align: center; color: var(--ink-mute); padding: 60px 0; }
.loading { display: grid; place-items: center; padding: 80px 0; color: var(--ink-mute); font-family: var(--mono); font-size: .9rem; }
.spin { width: 30px; height: 30px; border: 3px solid var(--line-strong); border-top-color: var(--teal); border-radius: 50%; animation: spin 1s linear infinite; margin-bottom: 14px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce){ .spin{animation:none} }

/* ── responsive ── */
@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; }
  .hero-art { grid-row: 2; max-width: 200px; }
  .room-split { grid-template-columns: 1fr; }
  .room-term-wrap { position: static; }
  .mobile-tabs { display: flex; gap: 6px; margin-bottom: 16px; position: sticky; top: 64px; z-index: 20;
    background: var(--paper); padding: 10px 0; }
  .mobile-tabs .chip { flex: 1; text-align: center; }
  .room-tasks[data-hidden="1"], .room-term-wrap[data-hidden="1"] { display: none; }
  .term { height: min(66vh, 560px); }
}
@media (max-width: 720px) {
  .links { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; gap: 0;
    background: var(--paper-2); border-bottom: 1px solid var(--line); padding: 8px; box-shadow: var(--shadow); }
  .links.open { display: flex; }
  .links a { padding: .8em 1em; border-radius: 8px; }
  .menu-btn { display: inline-flex; }
  .container { padding: 0 18px; }
  .section-head { margin-top: 40px; }
  .tk-row { grid-template-columns: 1fr; }
  .score { font-size: .72rem; padding: .3em .6em; }
  .hero-stats { gap: 18px; }
}
