/* Fonts: Geist + Geist Mono (OFL), self-hosted. Palette and sharp 2px corners follow skalaconsult.com. */
@font-face { font-family: "Geist"; src: url(fonts/geist-latin-wght-normal.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url(fonts/geist-mono-latin-wght-normal.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }

/* Shape rule: everything is 2px, like the main site. The receipt has a torn zigzag edge. */
:root {
  --bg: #f5f7fa; --surface: #ffffff; --ink: #081927; --muted: #4b5d6e; --line: #dbe3ea;
  --accent: #2563a0; --accent-ink: #ffffff; --accent-soft: #e4edf6; --glow: #dfeaf5;
  --r: 2px; --ease: cubic-bezier(.32,.72,0,1);
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #07131f; --surface: #0f2133; --ink: #eaf1f7; --muted: #9fb2c4; --line: #1e3348;
    --accent: #5da2e0; --accent-ink: #04101a; --accent-soft: #12304a; --glow: #0e2740;
  }
  .logo img { filter: brightness(0) invert(1); }
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); font: 400 18px/1.55 var(--sans); -webkit-font-smoothing: antialiased;
  background: radial-gradient(900px 520px at 88% -8%, var(--glow), transparent 62%), var(--bg); min-height: 100dvh; }
svg { display: block; }
button { font: inherit; color: inherit; cursor: pointer; }

.top { display: flex; align-items: center; justify-content: space-between; max-width: 1120px; margin: 0 auto; padding: 22px 24px 0; }
.logo img { display: block; height: 34px; width: auto; }
.prod { font: 500 .78rem var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }

#app { max-width: 1120px; margin: 0 auto; padding: 8px 24px 64px; }
.screen[hidden] { display: none !important; }
.screen.active { animation: rise .7s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }

/* Intro */
#intro { display: grid; gap: 36px; padding-top: 28px; }
h1 { font: 700 clamp(1.9rem, 5.2vw, 3.1rem)/1.08 var(--sans); letter-spacing: -.035em; margin: 0 0 16px; text-wrap: balance; }
.lede { color: var(--muted); font-size: 1.12rem; margin: 0; max-width: 28rem; }
.intro-art { position: relative; padding-bottom: 54px; }
.hero-img { display: block; width: 100%; height: auto; border-radius: var(--r); aspect-ratio: 3 / 2; object-fit: cover; }
.hero-shadow { position: absolute; right: 10px; bottom: 0; width: 208px; }
.hero-shadow .receipt { font-size: .72rem; padding: 14px 14px 26px; white-space: nowrap; }
.hero-img { aspect-ratio: 4 / 3; }
@media (min-width: 900px) {
  #intro { grid-template-columns: .9fr 1.1fr; align-items: center; gap: 56px; min-height: calc(100dvh - 130px); padding-top: 0; }
  .intro-art { padding-bottom: 0; }
  .hero-img { aspect-ratio: 3 / 2; }
  .hero-shadow { right: auto; left: -44px; bottom: -34px; width: 250px; transform: rotate(-2.5deg); }
  .hero-shadow .receipt { font-size: .8rem; padding: 18px 18px 30px; }
}

/* Buttons: square, brand blue, trailing arrow in its own box */
.primary { display: inline-flex; align-items: center; justify-content: space-between; gap: 18px; border: 0; text-decoration: none;
  background: var(--accent); color: var(--accent-ink); border-radius: var(--r); padding: 9px 9px 9px 24px;
  font: 600 1.02rem var(--sans); margin-top: 30px; min-height: 54px;
  transition: transform .5s var(--ease), background-color .3s var(--ease); }
.primary .arr { display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--r);
  background: rgba(255,255,255,.16); transition: transform .5s var(--ease); }
@media (prefers-color-scheme: dark) { .primary .arr { background: rgba(0,0,0,.16); } }
.primary .arr svg { width: 18px; height: 18px; }
.primary:hover .arr { transform: translateX(3px); }
.primary:active { transform: scale(.985); }
.primary.disabled { opacity: .45; pointer-events: none; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* Quiz */
#quiz { max-width: 600px; margin: 0 auto; padding-top: 28px; }
.qmeta { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; min-height: 40px; }
.back { width: 40px; height: 40px; border-radius: var(--r); border: 0; background: var(--surface); display: grid; place-items: center;
  box-shadow: 0 1px 2px rgba(8,25,39,.08); transition: transform .4s var(--ease); }
.back:hover { transform: translateX(-2px); }
.back[hidden] { display: grid; visibility: hidden; }
.back svg { width: 20px; height: 20px; }
.count { margin: 0 0 0 auto; font-family: var(--mono); color: var(--muted); font-size: .95rem; font-variant-numeric: tabular-nums; }
.count .of { margin-left: 4px; }
.count .n { color: var(--ink); font-weight: 600; font-size: 1.15rem; }
.progress { height: 3px; background: var(--line); border-radius: var(--r); overflow: hidden; }
#bar { height: 100%; width: 0; background: var(--accent); transition: width .6s var(--ease); }
#qwrap { padding-top: 34px; }
.qicon { width: 48px; height: 48px; border-radius: var(--r); background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 22px; }
.qicon svg { width: 28px; height: 28px; }
h2 { font: 650 clamp(1.5rem, 5.4vw, 1.95rem)/1.18 var(--sans); letter-spacing: -.028em; margin: 0 0 26px; text-wrap: balance; }
#qwrap.fwd { animation: infwd .55s var(--ease) both; }
#qwrap.bwd { animation: inbwd .55s var(--ease) both; }
@keyframes infwd { from { opacity: 0; transform: translateX(34px); } to { opacity: 1; transform: none; } }
@keyframes inbwd { from { opacity: 0; transform: translateX(-34px); } to { opacity: 1; transform: none; } }

.options { display: grid; gap: 10px; }
.opt { display: flex; align-items: center; gap: 16px; text-align: left; min-height: 60px; background: var(--surface); border: 0;
  border-radius: var(--r); padding: 12px 18px 12px 12px; line-height: 1.35; box-shadow: 0 1px 2px rgba(8,25,39,.07), 0 6px 16px -10px rgba(8,25,39,.2);
  transition: transform .45s var(--ease), background-color .25s var(--ease), color .25s var(--ease); }
.opt .key { flex: none; width: 32px; height: 32px; display: grid; place-items: center; border-radius: var(--r);
  background: var(--accent-soft); color: var(--accent); font: 600 .85rem var(--mono); transition: background-color .25s var(--ease), color .25s var(--ease); }
.opt:hover { transform: translateX(5px); }
.opt:hover .key { background: var(--accent); color: var(--accent-ink); }
.opt:active { transform: scale(.985); }
.opt.picked { background: var(--accent); color: var(--accent-ink); }
.opt.picked .key { background: rgba(255,255,255,.2); color: var(--accent-ink); }
.busy .opt { pointer-events: none; opacity: .55; }
.err { margin-top: 20px; color: var(--accent); }
.link { background: none; border: 0; padding: 0; text-decoration: underline; color: inherit; font-weight: 600; }

/* Receipt (hero example + result) */
.shadow { filter: drop-shadow(0 18px 22px rgba(8,25,39,.2)); }
.receipt { position: relative; background: #fbfbfc; color: #081927; font: 500 .8rem/1.5 var(--mono); padding: 18px 18px 30px; --t: 14px;
  mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / var(--t) 100% repeat-x;
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / var(--t) 100% repeat-x; }
.receipt p { margin: 0; }
.r-title { text-align: center; text-transform: uppercase; letter-spacing: .16em; font-weight: 600; font-size: .72rem; }
.rule { border-top: 1px dashed #8fa0b0; margin: 10px 0; }
.row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 2px 0;
  opacity: 0; animation: print .6s var(--ease) forwards; animation-delay: calc(.5s + var(--i) * .32s); }
.row span:last-child { font-variant-numeric: tabular-nums; text-align: right; }
@keyframes print { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.row.total { font-weight: 700; font-size: 1.05rem; }
.stamp { display: block; width: max-content; margin: 12px 4px 0 auto; padding: 3px 9px; border: 2px solid #2563a0; color: #2563a0; border-radius: 2px;
  font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: .82rem; transform: rotate(-10deg);
  opacity: 0; animation: thump .5s var(--ease) 1.9s forwards; }
@keyframes thump { from { opacity: 0; transform: rotate(-10deg) scale(1.7); } to { opacity: .9; transform: rotate(-10deg) scale(1); } }

#result { max-width: 460px; margin: 0 auto; padding-top: 28px; }
.receipt.big { font-size: .9rem; padding: 24px 22px 34px; }
.receipt.big .r-date { text-align: center; color: #5b6b7a; font-size: .74rem; margin-top: 2px; }
.score-row { display: flex; justify-content: space-between; align-items: baseline; padding: 6px 0 2px; }
.score-row .lbl { text-transform: uppercase; letter-spacing: .1em; font-size: .72rem; }
.score-row .val { font: 700 3.2rem/1 var(--sans); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.score-row .val small { font: 500 1rem var(--mono); color: #5b6b7a; letter-spacing: 0; }
.band { margin: 2px 0 4px !important; color: #3d4f60; font-family: var(--sans); font-weight: 500; }
.redact { display: inline-block; height: .95em; background: #081927; border-radius: 1px; vertical-align: -1px; }
.loss-lbl { text-transform: uppercase; letter-spacing: .1em; font-size: .72rem; margin-top: 4px !important; }
.loss-num { font: 800 clamp(2rem, 10vw, 3rem)/1.05 var(--sans) !important; white-space: nowrap; letter-spacing: -.045em; color: #2563a0; font-variant-numeric: tabular-nums; margin-top: 2px !important; }
.loss-num small { font: 500 .9rem var(--mono); color: #5b6b7a; letter-spacing: 0; }
.barcode { height: 34px; margin-top: 18px; background: repeating-linear-gradient(90deg, #081927 0 2px, transparent 2px 4px, #081927 4px 5px, transparent 5px 9px, #081927 9px 12px, transparent 12px 14px); opacity: .85; }
#result .primary { display: flex; margin-top: 34px; }
.fine { color: var(--muted); font-size: .9rem; margin: 14px 0 0; }

/* Example report gallery */
.sample { margin-top: 30px; }
.sample .inside { margin-top: 0; }
.sample-note { margin: 0 0 12px; }
.pages { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 4px 14px; margin: 0 -4px; align-items: flex-start; }
.pg { flex: none; scroll-snap-align: start; background: none; border: 0; padding: 0; text-align: left; cursor: zoom-in; }
.pg img { display: block; width: auto; border-radius: var(--r); background: #fff;
  box-shadow: 0 1px 2px rgba(8,25,39,.12), 0 10px 22px -12px rgba(8,25,39,.35); transition: transform .5s var(--ease); }
.pg:hover img { transform: translateY(-3px); }
.pg span { display: block; margin-top: 8px; color: var(--muted); font-size: .85rem; line-height: 1.3; max-width: 11rem; }
dialog#lightbox { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 96vh; overflow: visible; }
dialog#lightbox::backdrop { background: rgba(8,25,39,.8); }
#lbImg { display: block; max-width: 94vw; max-height: 82vh; width: auto; height: auto; border-radius: var(--r); background: #fff; margin: 0 auto; }
.lb-cap { color: #fff; text-align: center; margin: 10px 0 0; font-size: .95rem; }
.lb-close { position: absolute; top: -46px; right: 0; width: 40px; height: 40px; border: 0; border-radius: var(--r); background: var(--surface); color: var(--ink); display: grid; place-items: center; }
.lb-close svg { width: 20px; height: 20px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .row, .stamp { opacity: 1; }
  .stamp { opacity: .9; }
}

/* The sample pages scroll sideways with a slim, quiet scrollbar instead of the system one */
.pages { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--accent) 60%, transparent) transparent; scroll-padding-inline: 4px; }
.pages::-webkit-scrollbar { height: 6px; }
.pages::-webkit-scrollbar-track { background: transparent; }
.pages::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--accent) 60%, transparent); border-radius: 3px; }
.pages::-webkit-scrollbar-thumb:hover { background: var(--accent); }
.pages::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
.pages > * { scroll-snap-align: start; }

/* Which part of the check this question belongs to */
.qsec { margin: 12px 0 4px; }
.qsec .segs { display: flex; gap: 4px; margin-bottom: 10px; }
.qsec .segs i { flex: 1; height: 4px; background: var(--line); border-radius: 2px; transition: background-color .3s ease; }
.qsec .segs i.done { background: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.qsec .segs i.on { background: var(--accent); }
.qsec p { margin: 0; }
.qsec b { font-weight: 600; }
.qsec #qsecPart { color: var(--muted); font-family: var(--mono); font-size: .85rem; }
.qsec .fine { margin-top: 2px; }

/* Language picker: flags pop in one after another, the chosen one is ringed, picking one swaps the words */
.langpick { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 26px; }
.lp { display: inline-flex; align-items: center; gap: 9px; padding: 6px 12px 6px 7px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--ink);
  font: 500 .82rem/1 var(--sans); opacity: 0; transform: translateY(10px) scale(.9); animation: lp-in .5s var(--ease) forwards; animation-delay: calc(var(--i) * 70ms + 120ms);
  transition: border-color .2s, box-shadow .2s, transform .2s var(--ease), background-color .2s; }
.lp .fl { display: block; width: 30px; height: 20px; border-radius: 4px; overflow: hidden; box-shadow: 0 0 0 1px rgba(8,25,39,.18); flex: none; }
.lp .fl svg { width: 100%; height: 100%; }
.lp:hover { transform: translateY(-2px); border-color: var(--accent); }
.lp:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lp.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); background: var(--accent-soft); }
.lp.on .fl { animation: lp-pop .5s var(--ease); }
@keyframes lp-in { to { opacity: 1; transform: none; } }
@keyframes lp-pop { 0% { transform: scale(1); } 40% { transform: scale(1.16) rotate(-3deg); } 100% { transform: scale(1); } }
.swap.in { animation: swap-in .38s var(--ease); }
@keyframes swap-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (max-width: 520px) { .lp .nm { display: none; } .lp { padding: 6px; } .lp.on .nm { display: inline; padding-right: 6px; } }
@media (prefers-reduced-motion: reduce) { .lp { animation: none; opacity: 1; transform: none; } .swap.in, .lp.on .fl { animation: none; } }

/* the buy button follows the screen: it sits under the receipt and stays at the bottom edge while the result is read */
#result #buy { position: sticky; bottom: 14px; z-index: 6; margin-top: 22px; box-shadow: 0 12px 30px rgba(37,99,160,.38); }
#result .buynote { margin-top: 14px; }
.receipt .fine { margin: 6px 0 0; line-height: 1.4; }

/* one calm row of languages: flag and code, the full name on hover */
.langpick { gap: 6px; margin-bottom: 22px; }
.lp { padding: 5px 9px 5px 6px; gap: 7px; font-size: .78rem; letter-spacing: .04em; }
.lp .fl { width: 26px; height: 17px; }
@media (max-width: 520px) { .lp .nm { display: inline; } .lp { padding: 5px 7px 5px 5px; gap: 5px; } .lp .fl { width: 22px; height: 15px; } }

/* Language picker in the header, 14 October 2026. */
.top .prod{margin-left:auto}
.top .langpick{margin:0 0 0 16px;flex:none}
.top #langpick .hos-language-options{left:auto;right:0}
@media(max-width:600px){.top .prod{display:none}.top .langpick{margin-left:auto}}
