@font-face { font-family: "Public Sans"; font-weight: 400; font-display: swap; src: url("fonts/public-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Public Sans"; font-weight: 600; font-display: swap; src: url("fonts/public-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Schibsted Grotesk"; font-weight: 700; font-display: swap; src: url("fonts/schibsted-grotesk-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); }

:root {
  --paper: #F6F7F9;
  --surface: #FFFFFF;
  --ink: #1B2430;
  --slate: #5B6776;
  --rule: #CFDAEA;
  --rule-soft: #E6ECF4;
  --action: #2A4B7C;
  --action-deep: #1F3A62;
  --good: #2E7A57;
  --warn: #A86B14;
  --bad: #B0443A;
  --display: "Schibsted Grotesk", "Public Sans", system-ui, sans-serif;
  --body: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --radius: 8px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #12161C; --surface: #1A2028; --ink: #E7ECF2; --slate: #9AA6B4; --rule: #2C3542; --rule-soft: #232B36;
    --action: #7FA6DE; --action-deep: #9CBBE8; --good: #4FB585; --warn: #D9A04A; --bad: #E07A70;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.55 var(--body); }
a { color: var(--action); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--action); outline-offset: 2px; border-radius: 3px; }
h1, h2 { font-family: var(--display); margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(26px, 6vw, 34px); line-height: 1.15; font-weight: 700; }
h2 { font-size: 18px; font-weight: 700; }
p { margin: 0; }
.mono { font-family: var(--mono); }
.muted { color: var(--slate); }
.small { font-size: 14px; }

.bar { border-bottom: 1px solid var(--rule); background: var(--surface); }
.mark { display: flex; align-items: baseline; gap: 8px; max-width: 600px; margin: 0 auto; padding: 16px; color: var(--ink); text-decoration: none; }
.mark b { font: 700 19px/1 var(--display); letter-spacing: -0.02em; }
.mark span { font: 500 11px/1 var(--mono); color: var(--slate); text-transform: uppercase; letter-spacing: 0.08em; }

.wrap { max-width: 600px; margin: 0 auto; padding: 28px 16px 48px; display: grid; gap: 20px; }
.eyebrow { font: 500 12px/1 var(--mono); color: var(--slate); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: -10px; }
.lede { color: var(--slate); font-size: 17px; }
.count { color: var(--slate); text-align: center; }
.count b { color: var(--ink); font-family: var(--mono); }

.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 10px; }
.steps li { counter-increment: s; display: flex; gap: 12px; align-items: baseline; }
.steps li::before { content: counter(s); flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--rule-soft); font: 500 13px/1 var(--mono); }
.steps b { font-weight: 600; }

.card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 18px; display: grid; gap: 10px; }
.plain { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.prose { display: grid; gap: 12px; }
.prose h2 { margin-top: 12px; }
.prose ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }

.btn { display: block; width: 100%; padding: 14px 18px; border: 0; border-radius: var(--radius); background: var(--action); color: #fff; font: 600 17px/1.2 var(--body); text-align: center; text-decoration: none; cursor: pointer; }
@media (prefers-color-scheme: dark) { .btn { color: #0E1520; } }
.btn:hover { background: var(--action-deep); }
.btn.danger { background: var(--bad); }

.form { display: grid; gap: 16px; }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: 15px; }
.form input:not([type=checkbox]) { width: 100%; padding: 12px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); color: var(--ink); font: 400 17px/1.3 var(--body); }
.form input:focus { outline: 2px solid var(--action); outline-offset: 0; border-color: transparent; }
.form .check { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; color: var(--slate); }
.form .check input { width: 22px; height: 22px; margin: 2px 0 0; flex: none; accent-color: var(--action); }
.error { padding: 12px 14px; border-radius: var(--radius); background: color-mix(in srgb, var(--bad) 12%, transparent); color: var(--bad); font-weight: 600; }

.pane { display: grid; gap: 16px; }
.pane[hidden] { display: none; }
.stage { position: relative; border-radius: 14px; overflow: hidden; background: #000; }
.stage video { display: block; width: 100%; height: auto; transform: scaleX(-1); }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; transform: scaleX(-1); pointer-events: none; }
.flash { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: #3FBF7F; color: #fff; font-size: 22px; font-weight: 700; }
.flash[hidden] { display: none; }
.prompt { font: 700 20px/1.3 var(--display); text-align: center; }
.message { color: var(--warn); text-align: center; font-weight: 600; min-height: 1.5em; margin-top: -8px; }

.segments { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.segments li { position: relative; display: grid; gap: 6px; }
.segments li::before { content: ""; height: 8px; border-radius: 4px; background: var(--rule-soft); grid-area: 1 / 1; }
.segments .bar-fill { height: 8px; width: 0; border-radius: 4px; background: var(--warn); grid-area: 1 / 1; transition: width .25s; }
.segments li.full .bar-fill { background: var(--good); }
.segments li.now .seg-label { color: var(--ink); font-weight: 600; }
.seg-label { font-size: 11px; line-height: 1.2; color: var(--slate); text-align: center; }

.code { font-size: clamp(26px, 8vw, 36px); text-align: center; letter-spacing: 0.06em; padding: 18px; border: 2px dashed var(--rule); border-radius: var(--radius); background: var(--surface); user-select: all; }

.foot { max-width: 600px; margin: 0 auto; padding: 0 16px 32px; display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 14px; }
.foot a { color: var(--slate); }
