/* Invigilator marketing site.
   Look: a printed exam booklet that someone made cozy. Plex type, ruled paper, examiner red,
   hard print shadows and rubber stamps. No gradients, no glass. */

/* ------------------------------------------------------------------ fonts (bundled, OFL) */
@font-face { font-family: "Plex Sans"; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Plex Sans"; font-weight: 500; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Plex Sans"; font-weight: 600; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Plex Sans"; font-weight: 700; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Plex Condensed"; font-weight: 600; font-display: swap; src: url("../fonts/ibm-plex-sans-condensed-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Plex Condensed"; font-weight: 700; font-display: swap; src: url("../fonts/ibm-plex-sans-condensed-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Plex Mono"; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Plex Mono"; font-weight: 500; font-display: swap; src: url("../fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Plex Mono"; font-weight: 600; font-display: swap; src: url("../fonts/ibm-plex-mono-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Plex Serif"; font-weight: 400; font-style: italic; font-display: swap; src: url("../fonts/ibm-plex-serif-latin-400-italic.woff2") format("woff2"); }

/* ------------------------------------------------------------------ tokens */
:root {
  --paper: #f6f4ee;
  --paper-2: #ece8dd;
  --card: #fcfbf7;
  --ink: #141312;
  --ink-2: #3b3a36;
  --ink-3: #66645d;
  --rule: #d8d2c4;
  --rule-strong: #141312;
  --red: #c8102e;
  --red-ink: #ffffff;
  --red-soft: #f6dde1;
  --gold: #a86a12;
  --ok: #1f6b42;
  --lines: rgba(20, 19, 18, 0.055);
  --shadow: 4px 4px 0 var(--ink);
  --night: #1b1720;
  --night-2: #241f2a;
  --night-ink: #f3ece0;
  --night-ink-2: #c9bfb0;
  --night-rule: #3a3340;
  --f-body: "Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --f-display: "Plex Condensed", "Arial Narrow", "Helvetica Neue", sans-serif;
  --f-mono: "Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --f-hand: "Plex Serif", Georgia, serif;
  --radius: 6px;
  --wrap: 1160px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #151412; --paper-2: #1e1c19; --card: #1b1a17;
    --ink: #efe8da; --ink-2: #d2cabb; --ink-3: #a0988a;
    --rule: #34312b; --rule-strong: #efe8da;
    --red: #ef4a5a; --red-ink: #160608; --red-soft: #3a1a1f; --gold: #e0a43c; --ok: #5bc48a;
    --lines: rgba(239, 232, 218, 0.045);
    --shadow: 4px 4px 0 #000;
    --night: #100e14; --night-2: #19151f;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #151412; --paper-2: #1e1c19; --card: #1b1a17;
  --ink: #efe8da; --ink-2: #d2cabb; --ink-3: #a0988a;
  --rule: #34312b; --rule-strong: #efe8da;
  --red: #ef4a5a; --red-ink: #160608; --red-soft: #3a1a1f; --gold: #e0a43c; --ok: #5bc48a;
  --lines: rgba(239, 232, 218, 0.045);
  --shadow: 4px 4px 0 #000;
  --night: #100e14; --night-2: #19151f;
  color-scheme: dark;
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 17px/1.6 var(--f-body); overflow-x: hidden;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, canvas, svg { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; }
button, select { font: inherit; color: inherit; }
::selection { background: var(--red); color: var(--red-ink); }
:focus-visible { outline: 2.5px solid var(--red); outline-offset: 3px; border-radius: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; padding: 10px 14px; background: var(--ink); color: var(--paper); text-decoration: none; font-weight: 600; }
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }
.mono { font-family: var(--f-mono); }
.red { color: var(--red); }
.kicker { font: 500 12px/1.4 var(--f-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 12px; }
.kicker.red { color: var(--red); }
.display {
  font-family: var(--f-display); font-weight: 700; text-transform: uppercase;
  letter-spacing: -0.005em; line-height: 0.95; font-size: clamp(36px, 6.4vw, 64px);
}
.display.h3 { font-size: clamp(28px, 4vw, 38px); line-height: 1; margin-bottom: 14px; }

/* ------------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border: 2px solid var(--ink); border-radius: var(--radius);
  font: 600 15px/1 var(--f-body); text-decoration: none; cursor: pointer; white-space: nowrap;
  background: var(--card); color: var(--ink);
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow); }
.btn:active { transform: translate(0, 0); box-shadow: none; }
.btn-red { background: var(--red); border-color: var(--red); color: var(--red-ink); }
.btn-red:hover { box-shadow: 4px 4px 0 var(--ink); }
.btn-ink { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn-line { background: transparent; }
.btn-lg { min-height: 52px; padding: 0 26px; font-size: 16px; }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 14px; }

/* ------------------------------------------------------------------ header */
.site-head {
  position: sticky; top: 0; z-index: 50; background: var(--paper);
  border-bottom: 1px solid var(--rule); transition: border-color 160ms ease;
}
.site-head.is-scrolled { border-bottom-color: var(--rule-strong); }
.head-row { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { border-radius: 6px; }
.brand-word { font: 700 20px/1 var(--f-display); text-transform: uppercase; letter-spacing: 0.02em; }
.nav { margin-left: auto; }
.nav-list { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-list a { display: block; padding: 8px 12px; text-decoration: none; font-size: 15px; font-weight: 500; color: var(--ink-2); border-radius: 4px; }
.nav-list a:hover { color: var(--ink); background: var(--paper-2); }
.head-actions { display: flex; align-items: center; gap: 8px; }
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  border: 1px solid var(--rule); border-radius: var(--radius); background: transparent; cursor: pointer; color: var(--ink-2);
}
.theme-toggle:hover { border-color: var(--ink); color: var(--ink); }
.nav-toggle { display: none; }
@media (max-width: 860px) {
  .nav { margin-left: auto; order: 3; }
  .head-actions { margin-left: 0; }
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
    border: 1px solid var(--rule); border-radius: var(--radius); background: transparent; cursor: pointer;
  }
  .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
    display: block; width: 18px; height: 2px; background: var(--ink); position: relative; transition: transform 180ms ease, opacity 180ms ease;
  }
  .nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
  .nav-toggle-bars::before { top: -6px; }
  .nav-toggle-bars::after { top: 6px; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }
  .nav-list {
    position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; gap: 0;
    background: var(--paper); border-bottom: 2px solid var(--ink); padding: 8px 16px 16px;
    display: none;
  }
  .nav-list.is-open { display: flex; animation: drop 180ms ease both; }
  .nav-list a { padding: 14px 4px; font-size: 18px; border-bottom: 1px solid var(--rule); border-radius: 0; }
  .head-actions .btn { display: none; }
}
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------------ hero */
.hero {
  padding: 28px 0 64px;
  background-image: repeating-linear-gradient(to bottom, transparent 0 31px, var(--lines) 31px 32px);
  border-bottom: 2px solid var(--ink);
}
.paper-strip {
  display: flex; flex-wrap: wrap; gap: 6px 22px; padding: 10px 0 12px; margin-bottom: 36px;
  border-top: 2px solid var(--ink); border-bottom: 1px solid var(--ink);
  font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3);
}
.paper-strip b { color: var(--ink); font-weight: 600; }
.ps-cand { margin-left: auto; }
@media (max-width: 640px) { .paper-strip span:nth-child(2), .paper-strip span:nth-child(3) { display: none; } }
.hero-grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 980px) { .hero-grid { grid-template-columns: 1.08fr 0.92fr; gap: 56px; } }
.hero-title { font-size: clamp(52px, 10vw, 104px); line-height: 0.9; margin-bottom: 30px; }
.hero-title .hl { color: var(--red); position: relative; white-space: nowrap; }
.hero-title .hl::after {
  content: ""; position: absolute; left: 0; right: 0.12em; bottom: 0.02em; height: 0.09em;
  background: no-repeat center / 100% 100% url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 10' preserveAspectRatio='none'%3E%3Cpath d='M2 7 C 60 2, 120 9, 180 5 S 270 3, 298 6' fill='none' stroke='%23c8102e' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E");
}
.lede { font-size: clamp(18px, 2vw, 20px); line-height: 1.55; color: var(--ink-2); max-width: 36em; margin-bottom: 28px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }
.meta-row { display: flex; flex-wrap: wrap; gap: 8px 18px; list-style: none; padding: 0; margin: 0; font-size: 13px; color: var(--ink-3); }
.meta-row li { display: inline-flex; align-items: center; gap: 7px; }
.meta-row li::before { content: ""; width: 7px; height: 7px; border: 1.5px solid var(--red); transform: rotate(45deg); }

.hero-demo { position: relative; display: grid; gap: 18px; max-width: 520px; width: 100%; justify-self: center; }
.demo-timer {
  position: relative; background: var(--ink); color: var(--paper); border-radius: 10px; padding: 16px 20px 18px;
  box-shadow: 6px 6px 0 var(--red); margin-top: 52px;
}
:root[data-theme="dark"] .demo-timer { background: #262420; color: #efe8da; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .demo-timer { background: #262420; color: #efe8da; } }
.dt-top, .dt-bottom { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.75; }
.dt-live { display: inline-flex; align-items: center; gap: 7px; }
.dt-live i { width: 8px; height: 8px; border-radius: 50%; background: var(--red); animation: blink 1.6s steps(2, start) infinite; }
@keyframes blink { to { visibility: hidden; } }
.dt-time { font-size: clamp(56px, 9vw, 84px); font-weight: 500; line-height: 1; letter-spacing: -0.03em; margin: 12px 0 10px; font-variant-numeric: tabular-nums; }
.dt-pet { position: absolute; right: 18px; top: -94px; width: 108px; height: 96px; image-rendering: pixelated; }

.stamp-card {
  background: var(--card); border: 2px solid var(--ink); border-radius: 10px; padding: 18px 18px 14px;
  box-shadow: var(--shadow); position: relative;
}
.stamp-card.is-shake { animation: shake 260ms ease; }
@keyframes shake { 0%, 100% { transform: none; } 25% { transform: translate(1px, 2px) rotate(0.3deg); } 60% { transform: translate(-1px, -1px); } }
.sc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.sc-head .kicker { margin-bottom: 4px; }
.sc-serial { font-size: 14px; font-weight: 600; }
.sc-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
@media (max-width: 420px) { .sc-grid { grid-template-columns: repeat(4, 1fr); } }
.sc-slot {
  position: relative; aspect-ratio: 1; border: 1.5px dashed var(--rule); border-radius: 50%;
  display: grid; place-items: center; font: 500 12px var(--f-mono); color: var(--ink-3);
}
.sc-slot.is-done { border-style: solid; border-color: transparent; color: transparent; }
.sc-slot svg { position: absolute; inset: -6%; width: 112%; height: 112%; color: var(--red); }
.sc-slot.is-new svg { animation: slam 420ms cubic-bezier(0.2, 1.4, 0.4, 1) both; }
@keyframes slam { 0% { opacity: 0; transform: scale(1.9) rotate(var(--r, -8deg)); } 55% { opacity: 1; transform: scale(0.94) rotate(var(--r, -8deg)); } 100% { opacity: 1; transform: scale(1) rotate(var(--r, -8deg)); } }
.sc-slot.is-reward { border-color: var(--gold); border-style: solid; color: var(--gold); }
.sc-foot { font-size: 14px; color: var(--ink-3); margin: 14px 0 0; }
.sc-done-msg { position: absolute; inset: 0; display: grid; place-items: center; background: color-mix(in srgb, var(--card) 86%, transparent); border-radius: 8px; font: 700 28px var(--f-display); text-transform: uppercase; color: var(--red); animation: drop 200ms ease both; }
.margin-note {
  position: absolute; right: -6px; bottom: -38px; margin: 0; transform: rotate(-4deg);
  font: italic 400 18px var(--f-hand); color: var(--red);
}
.margin-note::before { content: "↖ "; }
@media (max-width: 979px) { .margin-note { right: 8px; } }

/* ------------------------------------------------------------------ levels strip */
.levels { border-bottom: 1px solid var(--rule); background: var(--paper-2); }
.levels-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding-top: 16px; padding-bottom: 16px; }
.levels-label { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.levels-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.levels-list li { padding: 4px 12px; border: 1px solid var(--ink); border-radius: 999px; font-size: 14px; font-weight: 500; background: var(--card); }
.levels-list li:last-child { border-style: dashed; color: var(--ink-3); border-color: var(--ink-3); }

/* ------------------------------------------------------------------ sections */
.section { padding: 88px 0; }
@media (max-width: 720px) { .section { padding: 64px 0; } }
.sec-head { max-width: 760px; margin-bottom: 48px; }
.sec-head .display { margin-bottom: 18px; }
.sec-sub { font-size: 18px; color: var(--ink-2); max-width: 40em; }

/* questions, exam-paper style with a red margin rule */
.questions { list-style: none; margin: 0; padding: 0 0 0 0; border-left: 3px double var(--red); }
.q { display: grid; grid-template-columns: 56px 1fr; gap: 0 12px; padding: 30px 0 30px 20px; border-bottom: 1px solid var(--rule); }
@media (min-width: 720px) { .q { grid-template-columns: 64px 1fr 72px; gap: 0 24px; padding-left: 28px; } }
.q:last-child { border-bottom: 0; }
.q-num { width: 44px; height: 44px; display: grid; place-items: center; border: 2px solid var(--ink); font-size: 20px; font-weight: 600; background: var(--card); }
.q-body h3 { font: 600 clamp(21px, 2.4vw, 26px)/1.25 var(--f-body); margin-bottom: 10px; letter-spacing: -0.01em; }
.q-body p { color: var(--ink-2); max-width: 40em; }
.q-marks { font-size: 18px; font-weight: 600; text-align: right; color: var(--ink-3); grid-column: 2; justify-self: end; }
@media (min-width: 720px) { .q-marks { grid-column: 3; grid-row: 1; } }
.total { text-align: right; font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); margin: 18px 0 0; padding-top: 12px; border-top: 2px solid var(--ink); }

.q-art { margin-top: 16px; }
.chip, .chips button {
  display: inline-flex; align-items: center; min-height: 34px; padding: 0 14px; border: 1.5px solid var(--ink-3);
  border-radius: 999px; font: 500 14px var(--f-body); background: var(--card); color: var(--ink-2);
}
.art-modes { display: flex; flex-wrap: wrap; gap: 8px; }
.chip.is-on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip-add { border-style: dashed; }
.art-confiscated { display: flex; flex-wrap: wrap; gap: 8px; position: relative; padding-right: 8px; }
.art-confiscated span {
  position: relative; padding: 6px 12px; border: 1px solid var(--rule); background: var(--card); font-size: 14px; color: var(--ink-3);
}
.art-confiscated span::after { content: ""; position: absolute; left: 6px; right: 6px; top: 50%; height: 2px; background: var(--red); transform: rotate(-4deg); }
.art-confiscated::after {
  content: "Confiscated"; position: absolute; right: 0; top: -14px; transform: rotate(-7deg);
  padding: 2px 10px; border: 2.5px solid var(--red); border-radius: 4px; color: var(--red);
  font: 700 15px var(--f-display); letter-spacing: 0.08em; text-transform: uppercase; background: var(--paper);
}
.art-phone { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.phone-desk { width: 150px; height: 74px; border-bottom: 3px solid var(--ink); display: grid; place-items: end center; perspective: 300px; }
.phone {
  width: 96px; height: 18px; border-radius: 6px 6px 3px 3px; background: var(--ink); margin-bottom: 1px;
  transform-origin: 20% 100%; transition: transform 380ms cubic-bezier(0.3, 1.3, 0.5, 1);
}
.phone.is-lifted { transform: translateY(-26px) rotate(-14deg); }
.phone-log { font-size: 14px; padding: 8px 12px; border: 1.5px solid var(--ok); color: var(--ok); border-radius: 4px; background: var(--card); transition: color 200ms ease, border-color 200ms ease; }
.phone-log.is-bad { color: var(--red); border-color: var(--red); }
.art-scan { display: flex; align-items: flex-end; gap: 22px; flex-wrap: wrap; }
.scan-page {
  position: relative; width: 150px; height: 190px; background: var(--card); border: 1.5px solid var(--ink);
  padding: 30px 14px 0; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow); transform: rotate(-2deg);
}
.scan-page i { display: block; height: 3px; border-radius: 2px; background: var(--ink-3); opacity: 0.55; width: 100%; }
.scan-page i:nth-child(odd) { width: 86%; }
.scan-page i.short { width: 46%; }
.scan-code { position: absolute; top: 8px; right: 10px; font-size: 11px; color: var(--red); }
.scan-check { position: absolute; bottom: 10px; left: 14px; font-size: 11px; color: var(--ok); }
.seal {
  display: grid; place-items: center; text-align: center; width: 116px; height: 116px; border-radius: 50%;
  border: 3px double var(--red); color: var(--red); transform: rotate(8deg); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em;
}
.seal b { display: block; font: 700 22px var(--f-display); letter-spacing: 0.04em; }
.art-mark { display: grid; gap: 0; max-width: 460px; border: 1.5px solid var(--ink); background: var(--card); }
.mark-row { display: grid; grid-template-columns: 70px 56px 1fr; gap: 10px; padding: 9px 12px; font-size: 14px; border-bottom: 1px solid var(--rule); }
.mark-row:last-child { border-bottom: 0; }
.mark-row .why { font-family: var(--f-hand); font-style: italic; color: var(--red); font-size: 15px; }
.mark-row .why.ok { color: var(--ok); font-style: normal; }

/* ------------------------------------------------------------------ cozy (always night) */
.cozy { background: var(--night); color: var(--night-ink); --ink-2: var(--night-ink-2); --ink-3: #a59a8b; --rule: var(--night-rule); }
.cozy .kicker { color: #c9a35a; }
.cozy-grid { display: grid; gap: 40px; }

.room { margin: 0; }
.room-frame {
  position: relative; aspect-ratio: 16 / 9; max-height: 640px; width: 100%; overflow: hidden; background: #f3ece0;
  border: 3px solid #0b0a0d; border-radius: 10px; box-shadow: 6px 6px 0 #000;
}
.room-scene, .room-pet { position: absolute; image-rendering: pixelated; }
.room-scene { inset: 0; width: 100%; height: 100%; }
.room-pet { left: 0; bottom: 0; cursor: pointer; }
.room-bubble {
  position: absolute; left: 0; bottom: 0; font-size: 13px; color: #1b1720; background: #fff9ee; padding: 1px 6px; border-radius: 4px;
  opacity: 0; transition: opacity 200ms ease; pointer-events: none; white-space: nowrap;
}
.room-controls { display: flex; flex-wrap: wrap; gap: 12px 40px; margin-top: 18px; }
.ctrl { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.ctrl-label { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: #a59a8b; width: 76px; flex: none; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { background: transparent; color: var(--night-ink); border-color: #4b4352; cursor: pointer; transition: background 120ms ease, border-color 120ms ease, color 120ms ease; }
.chips button:hover { border-color: var(--night-ink); }
.chips button[aria-checked="true"] { background: var(--night-ink); color: var(--night); border-color: var(--night-ink); }
.cozy-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px; }
@media (min-width: 640px) { .cozy-list { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .cozy-list { grid-template-columns: repeat(4, 1fr); } }
.cozy-list li { padding-top: 16px; border-top: 2px solid var(--night-rule); }
.cozy-list h3 { font: 600 19px/1.3 var(--f-body); margin-bottom: 6px; color: var(--night-ink); }
.cozy-list p { margin: 0; color: var(--night-ink-2); font-size: 16px; }

/* ------------------------------------------------------------------ rewards: receipts */
.receipts { display: grid; gap: 28px; }
@media (min-width: 900px) { .receipts { grid-template-columns: repeat(3, 1fr); align-items: start; } }
.receipt {
  position: relative; background: var(--card); border: 1.5px solid var(--ink); padding: 20px 20px 34px;
  --zig: 10px;
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / var(--zig) 100%;
  mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / var(--zig) 100%;
}
.receipt:nth-child(2) { transform: rotate(0.8deg); }
.receipt:nth-child(3) { transform: rotate(-0.6deg); }
.receipt p { font-size: 15px; color: var(--ink-2); margin: 16px 0 0; }
.r-head { display: flex; justify-content: space-between; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); padding-bottom: 10px; border-bottom: 1.5px dashed var(--rule); margin-bottom: 14px; }
.r-big { display: flex; align-items: center; gap: 10px; font-size: 44px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 12px; }
.coin { width: 36px; height: 36px; fill: none; stroke: #e39a0b; stroke-width: 1.9; stroke-linejoin: round; }
.r-lines { width: 100%; border-collapse: collapse; font-size: 13px; }
.r-lines td { padding: 6px 0; border-bottom: 1px dotted var(--rule); color: var(--ink-2); }
.r-lines td:last-child { text-align: right; color: var(--ink); font-weight: 600; }
.r-rewards { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; font-size: 15px; color: var(--ink-2); }
.r-rewards b { color: var(--ink); }
.envelope {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 10; border: 1.5px solid var(--ink); border-radius: 4px;
  background: #e8dcc0; cursor: pointer; overflow: hidden; padding: 0;
}
:root[data-theme="dark"] .envelope { background: #3a3326; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .envelope { background: #3a3326; } }
.env-flap {
  position: absolute; left: 0; right: 0; top: 0; height: 58%; background: inherit; filter: brightness(0.94);
  clip-path: polygon(0 0, 100% 0, 50% 100%); transform-origin: top; transition: transform 380ms cubic-bezier(0.3, 1.2, 0.5, 1);
  border-bottom: 0; z-index: 2;
}
.env-seal {
  position: absolute; left: 50%; top: 50%; z-index: 3; width: 54px; height: 54px; margin: -34px 0 0 -27px; border-radius: 50%;
  background: var(--red); color: var(--red-ink); display: grid; place-items: center; font-size: 13px; font-weight: 600;
  transition: transform 300ms ease, opacity 300ms ease;
}
.env-tier { position: absolute; left: 0; right: 0; bottom: 14px; text-align: center; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); z-index: 1; }
.envelope.is-open .env-flap { transform: rotateX(180deg) translateY(2px); }
.envelope.is-open .env-seal { transform: translateY(-50px) scale(0.6) rotate(30deg); opacity: 0; }
.envelope.is-open .env-tier { font: 700 26px var(--f-display); bottom: 38%; color: var(--tier, var(--ink)); animation: drop 300ms 120ms ease both; }

/* ------------------------------------------------------------------ parents + privacy */
.split { background: var(--paper-2); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.split-grid { display: grid; gap: 28px; }
@media (min-width: 860px) { .split-grid { grid-template-columns: 1fr 1fr; } }
.note-card {
  position: relative; background: var(--card); border: 1.5px solid var(--ink); padding: 34px 28px 26px; box-shadow: var(--shadow);
  background-image: repeating-linear-gradient(to bottom, transparent 0 29px, var(--lines) 29px 30px);
}
.note-card::before {
  content: ""; position: absolute; top: -12px; left: 50%; width: 96px; height: 24px; margin-left: -48px;
  background: color-mix(in srgb, var(--gold) 30%, transparent); transform: rotate(-3deg); border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent);
}
.note-card p { color: var(--ink-2); }
.note-card .aside { font-family: var(--f-hand); font-style: italic; color: var(--red); margin: 0; }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 26px; color: var(--ink-2); }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 0.45em; width: 11px; height: 6px; border-left: 2px solid var(--ok); border-bottom: 2px solid var(--ok); transform: rotate(-45deg); }
.privacy .ticks { font-size: 15px; }

/* ------------------------------------------------------------------ pricing */
.currency { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-3); }
.currency select { padding: 8px 10px; border: 1.5px solid var(--ink); border-radius: var(--radius); background: var(--card); font-size: 14px; }
.plans { display: grid; gap: 24px; }
@media (min-width: 940px) { .plans { grid-template-columns: repeat(3, 1fr); align-items: stretch; } }
.plan { position: relative; display: flex; flex-direction: column; background: var(--card); border: 1.5px solid var(--ink); border-radius: 10px; padding: 26px 24px 24px; }
.plan .ticks { margin: 4px 0 24px; flex: 1; font-size: 15px; align-content: start; }
.plan .btn { width: 100%; }
.plan.is-featured { border: 3px solid var(--red); box-shadow: 6px 6px 0 var(--red); }
.plan-stamp {
  position: absolute; top: 18px; right: 16px; transform: rotate(8deg); padding: 3px 9px; border: 2px solid var(--red); border-radius: 4px;
  color: var(--red); font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
}
.price { display: flex; align-items: baseline; gap: 10px; font-size: 44px; font-weight: 600; letter-spacing: -0.03em; margin: 0 0 6px; }
.price small { font-size: 14px; font-weight: 400; letter-spacing: 0; color: var(--ink-3); }
.plan-sub { color: var(--ink-2); font-size: 15px; min-height: 2.8em; }
.earn { margin: 26px 0 0; padding: 14px 18px; border: 1.5px dashed var(--ink-3); border-radius: var(--radius); color: var(--ink-2); }

/* ------------------------------------------------------------------ faq */
.faq-wrap { display: grid; gap: 0 56px; }
@media (min-width: 940px) { .faq-wrap { grid-template-columns: 0.8fr 1.2fr; } }
.faq details { border-bottom: 1px solid var(--rule); }
.faq details:first-child { border-top: 2px solid var(--ink); }
.faq summary {
  list-style: none; cursor: pointer; padding: 20px 44px 20px 0; position: relative;
  font: 600 18px/1.4 var(--f-body);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 14px; height: 14px; margin-top: -7px;
  background: linear-gradient(var(--ink), var(--ink)) center / 14px 2px no-repeat, linear-gradient(var(--ink), var(--ink)) center / 2px 14px no-repeat;
  transition: transform 220ms ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { color: var(--red); }
.faq details p { color: var(--ink-2); margin: 0; padding: 0 0 22px; max-width: 40em; }
.faq details[open] p { animation: drop 200ms ease both; }

/* ------------------------------------------------------------------ download */
.download { padding-top: 40px; }
.end-paper { border: 2px solid var(--ink); padding: clamp(28px, 6vw, 64px); background: var(--card); text-align: left; position: relative; }
.end-paper::before { content: ""; position: absolute; inset: 8px; border: 1px solid var(--rule); pointer-events: none; }
.end-paper .display { font-size: clamp(44px, 8vw, 88px); margin-bottom: 18px; }
.dl-grid { display: grid; gap: 12px; margin: 30px 0 18px; }
@media (min-width: 760px) { .dl-grid { grid-template-columns: repeat(3, 1fr); } }
.dl {
  position: relative; display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; border: 2px solid var(--ink); border-radius: var(--radius);
  text-decoration: none; background: var(--paper); transition: transform 120ms ease, box-shadow 120ms ease;
}
.dl:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow); }
.dl-os { font: 700 26px var(--f-display); text-transform: uppercase; }
.dl-meta { font-size: 13px; color: var(--ink-3); }
.dl.is-yours { background: var(--red); border-color: var(--red); color: var(--red-ink); }
.dl.is-yours .dl-meta { color: inherit; opacity: 0.85; }
.dl.is-yours::after { content: "Your system"; position: absolute; top: 12px; right: 14px; font: 600 11px var(--f-mono); letter-spacing: 0.1em; text-transform: uppercase; }
.fine { font-size: 13px; color: var(--ink-3); margin: 0; }

/* ------------------------------------------------------------------ footer */
.site-foot { border-top: 2px solid var(--ink); padding: 28px 0 40px; }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }
.foot-brand .brand-word { font-size: 17px; }
.foot-note { font-size: 13px; color: var(--ink-3); margin: 0; flex: 1 1 260px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; margin: 0; padding: 0; font-size: 15px; }
.foot-links a { color: var(--ink-2); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.foot-links a:hover { color: var(--red); }

/* ------------------------------------------------------------------ reveal on scroll */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 500ms ease, transform 500ms ease; }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .dt-live i, .stamp-card.is-shake, .sc-slot.is-new svg { animation: none; }
  .phone, .env-flap, .env-seal { transition: none; }
}

/* theme toggle: moon <-> sun with a little turn */
.theme-toggle { overflow: hidden; }
.tt-icons { position: relative; width: 18px; height: 18px; display: block; }
.tt-icons svg { position: absolute; inset: 0; transition: transform 420ms cubic-bezier(0.3, 1.4, 0.5, 1), opacity 260ms ease; }
.tt-sun { opacity: 0; transform: rotate(-90deg) scale(0.4); }
.theme-toggle.is-dark .tt-moon { opacity: 0; transform: rotate(90deg) scale(0.4); }
.theme-toggle.is-dark .tt-sun { opacity: 1; transform: none; }
.theme-toggle.is-turning { animation: tt-pop 420ms ease; }
@keyframes tt-pop { 40% { transform: scale(0.88); } 100% { transform: none; } }
body { transition: background-color 300ms ease, color 300ms ease; }
.pro-tag { display: inline-block; vertical-align: 3px; margin-left: 6px; padding: 1px 7px; border: 1.5px solid var(--red); border-radius: 4px; color: var(--red); font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.fine a { color: inherit; text-underline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .tt-icons svg, body { transition: none; } .theme-toggle.is-turning { animation: none; } }
