:root {
  --paper: #F3F4F1;
  --surface: #FFFFFF;
  --ink: #191C22;
  --muted: #5B616C;
  --line: #D9DCD5;
  --pulse: #D1294B;
  --flow: #13867F;
  --form: #4A50C8;
  --method: #191C22;
  --good: #1D7A4C;
  --bad: #B3261E;
  --good-bg: #E3F2E9;
  --bad-bg: #FBE7E5;
  --display: "Bricolage Grotesque", "Arial Narrow", system-ui, sans-serif;
  --body: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #14161A; --surface: #1D2026; --ink: #EEF0EC; --muted: #A3A9B3; --line: #30343C;
    --pulse: #F0597A; --flow: #3DBDB4; --form: #8D92F2; --method: #EEF0EC;
    --good: #5CCB8E; --bad: #FF8A80; --good-bg: #17301F; --bad-bg: #3A1D1B;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.55 var(--body); }
button, input, select { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--form); outline-offset: 2px; border-radius: 6px; }

.wrap { max-width: 720px; margin: 0 auto; padding: 20px 16px 64px; }
.wide { max-width: 1180px; }

/* top bar */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 28px; }
.mark { font-family: var(--display); font-weight: 800; font-size: 22px; letter-spacing: -0.02em; display: flex; align-items: center; gap: 10px; text-decoration: none; }
.mark svg { width: 28px; height: 28px; }
.lang { display: inline-flex; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; }
.lang button { border: 0; background: none; padding: 6px 12px; cursor: pointer; font-weight: 700; font-size: 14px; color: var(--muted); }
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.bar-right { display: flex; gap: 10px; align-items: center; }
.link-btn { background: none; border: 0; padding: 6px 2px; cursor: pointer; color: var(--muted); font-size: 15px; text-decoration: underline; text-underline-offset: 3px; }

h1, h2, h3 { font-family: var(--display); letter-spacing: -0.02em; line-height: 1.08; margin: 0; }
h1 { font-size: clamp(34px, 8vw, 56px); font-weight: 800; }
h2 { font-size: clamp(26px, 5vw, 34px); font-weight: 700; }
h3 { font-size: 20px; font-weight: 700; }
p { margin: 0 0 14px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

/* login */
.login { min-height: 100svh; display: grid; align-content: center; }
.login h1 { font-size: clamp(64px, 20vw, 140px); line-height: .86; margin: 8px 0 18px; }
.login h1 span { display: block; }
.login .lede { font-size: 19px; max-width: 30ch; margin-bottom: 28px; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 700; font-size: 15px; }
.field input { border: 1.5px solid var(--line); background: var(--surface); border-radius: 12px; padding: 13px 14px; font-size: 18px; width: 100%; }
.field input:focus { border-color: var(--ink); outline: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 12px; padding: 14px 20px; font-weight: 700; cursor: pointer; background: var(--ink); color: var(--paper); font-size: 17px; text-decoration: none; }
.btn.block { width: 100%; }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn:disabled { opacity: .45; cursor: default; }
.err { color: var(--bad); font-weight: 700; margin: 6px 0 12px; min-height: 1.4em; }
.login-foot { margin-top: 26px; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* equalizer: the signature element */
.eq-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 6px 0 10px; }
.eq-head strong { font-family: var(--display); font-size: 44px; font-weight: 800; line-height: 1; }
.eq { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 5px; align-items: end; height: 150px; padding: 12px 0 0; border-bottom: 2px solid var(--ink); margin-bottom: 8px; }
.eq a { position: relative; display: block; height: 100%; border-radius: 6px 6px 0 0; background: var(--line); overflow: hidden; }
.eq a span { position: absolute; left: 0; right: 0; bottom: 0; background: var(--c, var(--ink)); transition: height .6s cubic-bezier(.2,.8,.2,1); }
.eq-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-bottom: 30px; }
.eq-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
@media (prefers-reduced-motion: reduce) { .eq a span { transition: none; } }

/* module list */
.group { margin: 34px 0 10px; display: flex; align-items: baseline; gap: 10px; }
.group h3 { font-size: 22px; }
.mods { list-style: none; margin: 0; padding: 0; border-top: 1.5px solid var(--line); }
.mods li { border-bottom: 1.5px solid var(--line); }
.mod { display: grid; grid-template-columns: 6px 1fr auto; gap: 14px; align-items: center; padding: 15px 2px; text-decoration: none; }
.mod .sw { width: 6px; align-self: stretch; border-radius: 3px; background: var(--c, var(--ink)); }
.mod .t { font-weight: 700; font-size: 18px; }
.mod .m { color: var(--muted); font-size: 14px; }
.mod .st { font-size: 14px; color: var(--muted); text-align: right; white-space: nowrap; }
.mod .st.done { color: var(--good); font-weight: 700; }
.yours { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; border: 1.5px solid var(--c); color: var(--c); margin-left: 6px; vertical-align: 2px; }

.dates { list-style: none; padding: 0; margin: 0; border-top: 1.5px solid var(--line); }
.dates li { display: grid; grid-template-columns: 150px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1.5px solid var(--line); font-size: 15px; }
.dates b { font-weight: 700; }
@media (max-width: 480px) { .dates li { grid-template-columns: 1fr; gap: 0; } }

/* lesson */
.crumb { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; font-size: 15px; color: var(--muted); }
.crumb a { text-decoration: none; color: var(--muted); }
.dots { display: flex; gap: 5px; margin: 0 0 22px; }
.dots span { flex: 1; height: 5px; border-radius: 3px; background: var(--line); }
.dots span.on { background: var(--c, var(--ink)); }
.lesson { background: var(--surface); border-radius: var(--radius); padding: 26px 22px; border: 1.5px solid var(--line); }
.lesson h2 { margin-bottom: 16px; }
.lesson ul, .lesson ol { padding-left: 22px; margin: 0 0 14px; }
.lesson li { margin-bottom: 8px; }
.lesson .say { font-family: var(--display); font-size: 26px; font-weight: 700; line-height: 1.2; border-left: 5px solid var(--c, var(--ink)); padding: 4px 0 4px 16px; margin: 18px 0; }
.lesson p:last-child, .lesson ul:last-child, .lesson ol:last-child { margin-bottom: 0; }
.nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; }
.nav .btn { flex: 1; }

/* checks */
.q { font-family: var(--display); font-size: 25px; font-weight: 700; line-height: 1.2; margin-bottom: 18px; }
.opts { display: grid; gap: 10px; }
.opt { text-align: left; border: 1.5px solid var(--line); background: var(--surface); border-radius: 12px; padding: 14px 16px; cursor: pointer; font-size: 17px; }
.opt:hover:not(:disabled) { border-color: var(--ink); }
.opt.right { border-color: var(--good); background: var(--good-bg); }
.opt.wrong { border-color: var(--bad); background: var(--bad-bg); }
.opt:disabled { cursor: default; }
.why { margin-top: 16px; padding: 14px 16px; border-radius: 12px; background: var(--surface); border: 1.5px solid var(--line); }
.why b { display: block; margin-bottom: 4px; }
.result { text-align: center; padding: 30px 10px; }
.result .big { font-family: var(--display); font-size: 88px; font-weight: 800; line-height: 1; }

/* admin */
.notice { padding: 14px 16px; border-radius: 12px; border: 1.5px solid var(--bad); background: var(--bad-bg); margin-bottom: 20px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 18px 0 24px; }
.stat { background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px; padding: 14px; }
.stat b { display: block; font-family: var(--display); font-size: 34px; line-height: 1; margin-bottom: 4px; }
.tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.tools select { border: 1.5px solid var(--line); background: var(--surface); border-radius: 10px; padding: 9px 10px; }
.table-wrap { overflow-x: auto; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); }
table.grid { border-collapse: collapse; width: 100%; font-size: 14px; }
table.grid th, table.grid td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
table.grid th { position: sticky; top: 0; background: var(--surface); font-size: 12px; color: var(--muted); font-weight: 700; }
table.grid th.mh { writing-mode: vertical-rl; transform: rotate(180deg); height: 180px; text-align: left; padding: 8px 4px; }
table.grid td.c { text-align: center; padding: 6px 4px; }
.cell { display: inline-block; width: 22px; height: 22px; border-radius: 5px; background: var(--line); position: relative; }
.cell.part { background: linear-gradient(to top, var(--c) var(--p), var(--line) var(--p)); }
.cell.full { background: var(--c); }
.cell.ck::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--surface); }
.bar-mini { display: inline-block; width: 80px; height: 8px; border-radius: 4px; background: var(--line); vertical-align: middle; margin-right: 8px; overflow: hidden; }
.bar-mini i { display: block; height: 100%; background: var(--ink); }
.room-tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 4px; color: #fff; margin-right: 3px; }

/* presenter */
.pres { min-height: 100svh; display: grid; grid-template-rows: auto 1fr auto; background: var(--paper); }
.pres-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 28px; gap: 14px; border-bottom: 3px solid var(--c); }
.pres-top .clock { font-family: var(--display); font-weight: 700; font-size: 20px; font-variant-numeric: tabular-nums; }
.pres-top .clock.over { color: var(--bad); }
.pres-main { padding: 5vh 7vw; display: grid; align-content: center; }
.pres-main h1 { font-size: clamp(40px, 5.4vw, 82px); margin-bottom: 4vh; max-width: 22ch; }
.pres-body { font-size: clamp(20px, 2.1vw, 32px); line-height: 1.45; max-width: 46ch; }
.pres-body ul, .pres-body ol { padding-left: 1.2em; margin: 0; }
.pres-body li { margin-bottom: .5em; }
.pres-body table { border-collapse: collapse; font-size: .9em; }
.pres-body td, .pres-body th { padding: .35em .9em .35em 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.pres-body th { color: var(--muted); font-size: .8em; }
.pres-body td:first-child { font-weight: 700; white-space: nowrap; }
.arcline { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 3vh; font-size: clamp(14px, 1.3vw, 20px); font-weight: 700; }
.arcline span { padding: 6px 12px; border-radius: 999px; border: 2px solid var(--ink); }
.arcline span.hot { background: var(--c); border-color: var(--c); color: #fff; }
.moments { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2vw; margin-top: 3vh; }
.moments div { border: 3px solid var(--c); border-radius: 18px; padding: 3vh 1.5vw; font-family: var(--display); font-weight: 800; font-size: clamp(22px, 2.6vw, 42px); text-align: center; }
.trivia-o { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6vw; max-width: 1100px; }
.trivia-o button { text-align: left; font-size: clamp(20px, 2vw, 32px); padding: 2.4vh 1.6vw; border-radius: 16px; border: 3px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 700; }
.trivia-o button .k { display: inline-block; width: 1.5em; color: var(--muted); }
.trivia-o.revealed button { opacity: .35; }
.trivia-o.revealed button.right { opacity: 1; border-color: var(--good); background: var(--good-bg); }
.pres-foot { display: flex; justify-content: space-between; align-items: center; padding: 12px 28px; gap: 12px; color: var(--muted); font-size: 15px; }
.prog { flex: 1; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; max-width: 50vw; }
.prog i { display: block; height: 100%; background: var(--c); }
.pres-foot .btn { padding: 10px 16px; }
@media (max-width: 700px) { .trivia-o, .moments { grid-template-columns: 1fr; } .pres-top, .pres-foot { padding: 10px 16px; } }

.pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 22px 0; }
.pick button { border: 0; border-radius: 16px; padding: 26px 12px; color: #fff; font-family: var(--display); font-size: 28px; font-weight: 800; cursor: pointer; text-align: left; }
.pick button small { display: block; font-family: var(--body); font-size: 14px; font-weight: 400; opacity: .9; margin-top: 4px; }
@media (max-width: 520px) { .pick { grid-template-columns: 1fr; } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.preview-note { padding: 12px 14px; border-radius: 12px; border: 1.5px dashed var(--form); margin-bottom: 18px; font-size: 15px; }
.preview-note .link-btn { color: var(--ink); }

/* start tiles */
.start { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 26px 0 8px; }
.tile-big { display: flex; flex-direction: column; gap: 4px; padding: 18px; border-radius: var(--radius); text-decoration: none; color: #fff; min-height: 150px; }
.tile-big .k { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; opacity: .85; }
.tile-big b { font-family: var(--display); font-size: 24px; line-height: 1.05; letter-spacing: -0.02em; }
.tile-big span { font-size: 15px; }
.tile-big .s { margin-top: auto; font-weight: 700; }
.tile-big.ip { background: var(--pulse); } .tile-big.fm { background: var(--flow); } .tile-big.bd { background: var(--form); }
.meter { display: block; height: 8px; border-radius: 4px; background: rgba(255,255,255,.3); overflow: hidden; margin-top: 10px; }
.meter i { display: block; height: 100%; background: #fff; border-radius: 4px; }
.ipmeter { display: flex; align-items: center; gap: 12px; margin: 18px 0 8px; }
.meter.big { flex: 1; height: 12px; background: var(--line); margin: 0; }
.meter.big i { background: var(--pulse); }
.ipsec { margin-top: 26px; }
.ipsec h2 { font-size: 24px; margin-bottom: 10px; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ck { display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; }
.ck input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ck .box { width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--ink); display: grid; place-items: center; }
.ck.on { border-color: var(--good); background: var(--good-bg); }
.ck.on .box { background: var(--good); border-color: var(--good); }
.ck.on .box::after { content: ""; width: 8px; height: 14px; border: solid #fff; border-width: 0 3px 3px 0; transform: rotate(45deg) translate(-1px, -1px); }
.ck input:focus-visible + .box { outline: 3px solid var(--form); outline-offset: 2px; }
.ck b { display: block; }
.sub { display: block; color: var(--muted); font-size: 15px; margin-top: 2px; }
.sub.reg { font-style: italic; }
/* formats */
.froom { margin-top: 28px; }
.froom h2 { font-size: 34px; }
.fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-top: 10px; }
.fcard { display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: 14px; background: var(--surface); border: 1.5px solid var(--line); border-top: 6px solid var(--c); text-decoration: none; }
.fcard:hover { border-color: var(--c); }
.fcard b { font-family: var(--display); font-size: 22px; }
.fcard span { color: var(--muted); font-size: 15px; }
.fcard.soon { border-style: dashed; border-top-style: solid; opacity: .8; }
.pbar { display: flex; gap: 3px; height: 26px; border-radius: 8px; overflow: hidden; margin-top: 8px; }
.pbar span { color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.fh { margin: 22px 0 8px; font-size: 20px; }
.parts { padding-left: 20px; display: grid; gap: 6px; }
.plain { padding-left: 20px; margin: 0; display: grid; gap: 4px; }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-top: 22px; }
.box-safe, .box-mist { border-radius: 12px; padding: 14px 16px; }
.box-safe { background: var(--good-bg); } .box-mist { background: var(--bad-bg); }
.box-safe h3, .box-mist h3 { font-size: 18px; margin-bottom: 6px; }
/* builder */
.btools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 18px 0 8px; }
.btools select { border: 1.5px solid var(--line); border-radius: 999px; padding: 9px 14px; background: var(--surface); font-weight: 700; }
.bblock { background: var(--surface); border: 1.5px solid var(--line); border-left: 6px solid var(--c, var(--line)); border-radius: 0 12px 12px 0; padding: 14px 16px; margin-top: 12px; }
.bblock.warm { border-left-color: var(--method); }
.bblock h3 { font-size: 19px; margin-bottom: 4px; }
.bblock p { margin: 4px 0 0; }
.exl { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 10px; }
.ex b { font-size: 16px; }
.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--line); color: var(--ink); }
.rules { margin-top: 24px; padding: 16px; border-radius: 12px; background: var(--good-bg); }
.rules h3 { font-size: 18px; margin-bottom: 6px; }
.rules ul { list-style: none; padding: 0; }
table.att .c { text-align: center; }
table.att input { width: 20px; height: 20px; }
.stars { border: 0; padding: 0; margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.stars legend { font-weight: 700; margin-bottom: 8px; padding: 0; }
.stars label { cursor: pointer; }
.stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.stars span:not(.muted) { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; border: 2px solid var(--line); font-weight: 700; background: var(--surface); }
.stars input:checked + span { background: var(--pulse); border-color: var(--pulse); color: #fff; }
.stars input:focus-visible + span { outline: 3px solid var(--form); outline-offset: 2px; }
.fbform textarea { width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; font: inherit; background: var(--surface); color: var(--ink); }
.fblist { display: grid; gap: 10px; }
.fbitem { background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.fbitem p { margin: 6px 0 0; }
