/* ==========================================================
   Cookieaps — design system
   Nordic editorial · deep navy · warm cream · butter yellow
   ========================================================== */

:root {
  /* colour — brand palette
     Deep Navy #121824 · Warm Cream #F5EEDC · Butter Yellow #F4CE62
     Sand #E9DFC8 · Sage #D9E0D5 · Pure White #FFFFFF · Slate Grey #737B83 */
  --navy:   #121824;
  --cream:  #F5EEDC;
  --yellow: #F4CE62;
  --sand:   #E9DFC8;
  --sage:   #D9E0D5;
  --white:  #FFFFFF;
  --slate:  #737B83;

  /* derived shades (hover, tracks, small text that must pass AA) */
  --yellow-2: #EBBF43;
  --sand-2:   #DCCFB1;
  --sage-d:   #7F9479;
  --slate-d:  #5C636B;
  --navy-2:   #1F2734;
  --navy-3:   #0B1018;

  --paper:   var(--cream);
  --paper-2: var(--sand);
  --paper-3: var(--sand-2);
  --ink:     var(--navy);
  --ink-2:   #2E3542;
  --ink-3:   var(--slate-d);
  --ink-4:   var(--slate);
  --night:   var(--navy);
  --night-2: var(--navy-2);
  --on-night:   var(--cream);
  --on-night-2: #A8AEB5;

  --line:    rgb(18 24 36 / .12);
  --line-n:  rgb(245 238 220 / .1);

  --c-nec: var(--navy);
  --c-fun: var(--sage-d);
  --c-sta: var(--yellow);
  --c-mar: var(--slate);

  /* type */
  --f-sans:  "Inter Tight", ui-sans-serif, system-ui, sans-serif;
  --f-serif: "Instrument Serif", ui-serif, Georgia, serif;
  --f-mono:  "JetBrains Mono", ui-monospace, Menlo, monospace;

  --t-display: clamp(3.5rem, 12.5vw, 13.5rem);
  --t-display-2: clamp(2.75rem, 7.5vw, 8rem);
  --t-h2: clamp(2.25rem, 4.6vw + .5rem, 5rem);
  --t-h3: clamp(1.75rem, 2.4vw + .5rem, 2.75rem);
  --t-lead: clamp(1.125rem, .6vw + .9rem, 1.4rem);
  --t-body: clamp(1rem, .3vw + .9rem, 1.125rem);
  --t-sm: .9375rem;
  --t-label: .75rem;

  /* space */
  --gutter: clamp(1rem, 4vw, 3.5rem);
  --s-1: .5rem; --s-2: 1rem; --s-3: 1.5rem; --s-4: 2.5rem;
  --s-5: 4rem; --s-6: 6rem; --s-7: clamp(6rem, 12vw, 11rem);

  /* motion */
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-io:  cubic-bezier(.76, 0, .24, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --d-micro: 150ms; --d-sm: 250ms; --d-md: 400ms; --d-lg: 700ms;

  color-scheme: light;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--t-body)/1.55 var(--f-sans);
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
h1, h2, h3, p, dl, dd, ul, ol, figure, fieldset { margin: 0; padding: 0; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }
em { font-family: var(--f-serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }
::selection { background: var(--yellow); color: var(--navy); }
:focus-visible { outline: 2px solid var(--focus, var(--navy)); outline-offset: 3px; border-radius: 4px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 1rem; top: -4rem; z-index: 100; background: var(--ink); color: var(--paper); padding: .6rem 1rem; border-radius: 8px; transition: top var(--d-sm) var(--ease-out); }
.skip:focus { top: 1rem; }

/* ---------- type primitives ---------- */
.label {
  font: 500 var(--t-label)/1.3 var(--f-mono);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.label--light { color: var(--on-night-2); }
.h2 { font-size: var(--t-h2); font-weight: 500; line-height: .98; letter-spacing: -0.035em; }
.h2 em { letter-spacing: -0.02em; }
.h3 { font-size: var(--t-h3); font-weight: 500; line-height: 1.05; letter-spacing: -0.03em; }
.lead { font-size: var(--t-lead); line-height: 1.45; letter-spacing: -0.015em; color: var(--ink-2); max-width: 34ch; }
.muted { color: var(--ink-3); }
.sm { font-size: var(--t-sm); }
.fine { font-size: .8125rem; color: var(--ink-3); margin-top: var(--s-2); }
.fine--light { color: var(--on-night-2); }

/* ---------- buttons ---------- */
.btn {
  --bg: var(--ink); --fg: var(--paper);
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: 0 1.35rem;
  border: 1px solid transparent; border-radius: 999px;
  background: var(--bg); color: var(--fg);
  font-weight: 500; letter-spacing: -0.01em; white-space: nowrap;
  cursor: pointer;
  transition: transform var(--d-sm) var(--ease-out), background-color var(--d-sm), color var(--d-sm), border-color var(--d-sm);
}
.btn:active { transform: scale(.97); }
.btn--sm { min-height: 40px; padding: 0 1rem; font-size: .9375rem; }
.btn--lg { min-height: 60px; padding: 0 2rem; font-size: 1.125rem; }
.btn--ink { --bg: var(--ink); --fg: var(--paper); }
.btn--brand { --bg: var(--yellow); --fg: var(--navy); }
.btn--paper { --bg: var(--paper); --fg: var(--ink); }
.btn--line { --bg: transparent; --fg: var(--ink); border-color: rgb(18 24 36 / .25); }
@media (hover: hover) {
  .btn--ink:hover { --bg: var(--ink-2); }
  .btn--brand:hover { --bg: var(--yellow-2); }
  .btn--line:hover { --bg: var(--ink); --fg: var(--paper); }
  .btn--paper:hover { --bg: var(--paper-3); }
  .btn:hover span { transform: translateX(3px); }
}
.btn span { transition: transform var(--d-sm) var(--ease-out); }

.link { background: linear-gradient(currentColor 0 0) 0 100% / 100% 1px no-repeat; padding-bottom: 2px; transition: background-size var(--d-md) var(--ease-out); }
@media (hover: hover) { .link:hover { background-size: 0 1px; background-position: 100% 100%; } }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-2);
  padding: .85rem var(--gutter);
  transition: background-color var(--d-md), transform var(--d-md) var(--ease-out), border-color var(--d-md);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled { background: rgb(245 238 220 / .86); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); border-color: var(--line); }
.nav.is-hidden { transform: translateY(-100%); }
.logo { display: inline-flex; align-items: center; gap: .5rem; font-weight: 600; font-size: 1.2rem; letter-spacing: -0.03em; white-space: nowrap; }
.logo b { font-weight: 600; }
.logo__mark { width: 26px; height: 26px; color: var(--navy); transition: transform var(--d-lg) var(--ease-spring); }
@media (hover: hover) { .logo:hover .logo__mark { transform: rotate(-35deg); } }
.nav__links { display: flex; gap: clamp(1rem, 2vw, 2rem); font-size: .9375rem; }
.nav__links a { position: relative; color: var(--ink-2); padding: .25rem 0; }
.nav__links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform var(--d-md) var(--ease-out); }
@media (hover: hover) { .nav__links a:hover { color: var(--ink); } .nav__links a:hover::after { transform: scaleX(1); transform-origin: left; } }
.nav__end { display: flex; align-items: center; gap: .75rem; }
.lang { display: inline-flex; padding: 3px; border-radius: 999px; border: 1px solid var(--line); }
.lang button { min-height: 32px; min-width: 40px; background: none; border: 0; border-radius: 999px; font: 500 .75rem var(--f-mono); color: var(--ink-3); cursor: pointer; padding: 0 .6rem; letter-spacing: .04em; transition: background-color var(--d-sm), color var(--d-sm); }
.lang button[aria-pressed="true"] { background: var(--yellow); color: var(--navy); cursor: default; }
@media (hover: hover) { .lang button[aria-pressed="false"]:hover { color: var(--navy); } }
.nav__login { font-size: .9375rem; font-weight: 500; color: var(--ink); padding: .5rem .25rem; }
@media (hover: hover) { .nav__login:hover { color: var(--slate-d); } }
@media (max-width: 1100px) { .nav__links { display: none; } }
@media (max-width: 640px) { .logo span { display: none; } .nav__end { gap: .4rem; } .nav__end .btn { padding: 0 .8rem; font-size: .8125rem; min-height: 38px; } .nav__login { font-size: .8125rem; } .lang button { min-width: 34px; padding: 0 .4rem; } }
@media (max-width: 340px) { .lang { display: none; } }

/* ---------- hero ---------- */
.hero { padding: clamp(6.5rem, 14vh, 9rem) var(--gutter) var(--s-6); }
.hero__meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem 2rem; padding-bottom: var(--s-3); border-bottom: 1px solid var(--line); }
.hero__meta span { display: inline-flex; align-items: center; gap: .5rem; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--sage-d); display: inline-block; }
.dot--live { animation: pulse 2s var(--ease-out) infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgb(127 148 121 / .55); } 70%, 100% { box-shadow: 0 0 0 9px rgb(127 148 121 / 0); } }

.hero__title {
  font-size: var(--t-display); font-weight: 500; line-height: .88; letter-spacing: -0.055em;
  margin: clamp(1.5rem, 4vw, 3rem) 0 clamp(2rem, 5vw, 4rem) -0.04em;
}
.hero__title em { letter-spacing: -0.035em; padding-right: .04em; }
.hero__title .line { display: block; overflow: hidden; padding-bottom: .2em; margin-bottom: -.2em; }
.hero__title .line > span { display: inline-block; transform: translateY(105%); animation: rise 1.1s var(--ease-out) forwards; }
.hero__title .line:nth-child(2) > span { animation-delay: .12s; padding-left: clamp(0rem, 14vw, 16rem); }
@keyframes rise { to { transform: none; } }

.hero__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(2rem, 6vw, 7rem); align-items: end; }
.hero__copy { opacity: 0; animation: fade .9s var(--ease-out) .5s forwards; }
@keyframes fade { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.hero__copy .lead { margin-bottom: var(--s-4); }
@media (max-width: 860px) { .hero__grid { grid-template-columns: 1fr; } }

/* scan form */
.scanform {
  display: flex; align-items: center;
  background: var(--white); border: 1px solid rgb(18 24 36 / .16); border-radius: 999px;
  padding: 5px 5px 5px 1.25rem; max-width: 30rem;
  transition: border-color var(--d-sm), box-shadow var(--d-sm);
}
.scanform:focus-within { border-color: var(--ink); box-shadow: 0 0 0 4px rgb(244 206 98 / .45); }
.scanform__pre { font: 400 .9375rem var(--f-mono); color: var(--ink-4); }
.scanform input { flex: 1; min-width: 0; border: 0; background: none; outline: none; padding: .75rem .25rem; font-family: var(--f-mono); font-size: .9375rem; }
.scanform input::placeholder { color: var(--ink-4); }
.scanform--dark { background: var(--night-2); border-color: var(--line-n); }
.scanform--dark:focus-within { border-color: var(--on-night-2); box-shadow: 0 0 0 4px rgb(244 206 98 / .18); }
.scanform--dark .scanform__pre, .scanform--dark input::placeholder { color: var(--on-night-2); }
.scanform--dark input { color: var(--on-night); }
@media (max-width: 420px) { .scanform__pre { display: none; } .scanform { padding-left: 1rem; } }

/* crumbs visual */
.crumbs { opacity: 0; animation: fade 1s var(--ease-out) .7s forwards; }
.crumbs__head { display: flex; justify-content: space-between; margin-bottom: var(--s-2); }
.crumbs__grid {
  position: relative;
  display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(6px, 1vw, 12px);
  padding: clamp(1rem, 2vw, 1.75rem);
  background: var(--paper-2); border-radius: 20px; overflow: hidden;
}
.crumbs__grid::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 22%; left: -22%;
  background: linear-gradient(90deg, transparent, rgb(244 206 98 / .2) 70%, rgb(244 206 98 / .85) 99%, transparent);
  animation: sweep 4.8s var(--ease-io) .7s infinite;
  pointer-events: none;
}
@keyframes sweep { 0% { left: -22%; } 60%, 100% { left: 100%; } }
.crumb {
  aspect-ratio: 1; border-radius: 50%;
  background: var(--sand-2);
  opacity: 1;
  transition: opacity .5s, background-color .5s var(--ease-out), transform .6s var(--ease-spring), border-radius .6s var(--ease-out);
}
.crumb[data-c] { transform: scale(.82); opacity: 1; }
.crumb[data-c="nec"] { background: var(--c-nec); }
.crumb[data-c="fun"] { background: var(--c-fun); border-radius: 30%; }
.crumb[data-c="sta"] { background: var(--c-sta); border-radius: 50% 50% 50% 8%; }
.crumb[data-c="mar"] { background: var(--c-mar); border-radius: 8%; transform: scale(.72) rotate(45deg); }
.crumbs__legend { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin-top: var(--s-2); }
.crumbs__legend li { display: inline-flex; align-items: center; gap: .45rem; }
.sw { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.sw--nec { background: var(--c-nec); } .sw--fun { background: var(--c-fun); border-radius: 30%; }
.sw--sta { background: var(--c-sta); border-radius: 50% 50% 50% 2px; } .sw--mar { background: var(--c-mar); border-radius: 2px; transform: rotate(45deg) scale(.85); }

/* ---------- ticker ---------- */
.ticker { border-block: 1px solid var(--line); overflow: hidden; padding: 1.1rem 0; }
.ticker__track { display: flex; gap: 2.5rem; width: max-content; animation: marquee 40s linear infinite; font-size: clamp(1rem, 1.4vw, 1.25rem); letter-spacing: -0.02em; color: var(--ink-2); }
.ticker__track span:nth-child(even) { color: var(--slate); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- statement ---------- */
.statement { padding: var(--s-7) var(--gutter); }
.statement__text {
  font-size: clamp(1.75rem, 3.6vw + .3rem, 4rem); line-height: 1.08; letter-spacing: -0.035em; font-weight: 500;
  max-width: 22ch; margin-left: auto; margin-right: clamp(0rem, 8vw, 10rem);
  text-indent: clamp(2rem, 14vw, 14rem);
}
.statement__text strong { font-weight: 500; background: linear-gradient(transparent 58%, var(--yellow) 58% 92%, transparent 92%); padding: 0 .08em; }
.statement__text em { color: var(--ink-3); }
.reveal-words .w { opacity: .14; transition: opacity .5s var(--ease-out); }
.reveal-words .w.on { opacity: 1; }

/* ---------- pillars ---------- */
.pillars {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s-5);
  padding: 0 var(--gutter) var(--s-7);
}
.pillars__aside { position: sticky; top: 7rem; align-self: start; }
.pillars__aside .h2 { margin: var(--s-2) 0 var(--s-5); }
.pillars__index { display: grid; gap: .75rem; }
.pillars__index li { display: flex; align-items: center; gap: .75rem; transition: color var(--d-md); }
.pillars__index li::before { content: ""; width: 0; height: 2px; background: var(--navy); transition: width var(--d-md) var(--ease-out); }
.pillars__index li.is-active { color: var(--ink); }
.pillars__index li.is-active::before { width: 2.5rem; }
.pillars__list { display: grid; gap: var(--s-2); }
.pillar {
  position: relative; padding: clamp(1.75rem, 3.5vw, 3rem); border-radius: 24px;
  background: var(--paper-2); min-height: 60vh; display: flex; flex-direction: column; justify-content: flex-end; gap: var(--s-2);
}
.pillar:nth-child(2) { background: var(--yellow); }
.pillar:nth-child(3) { background: var(--ink); color: var(--on-night); }
.pillar:nth-child(3) .ticks li::before { background: var(--yellow); }
.pillar:nth-child(4) { background: var(--sage); }
.pillar__num { position: absolute; top: clamp(1rem, 2.5vw, 2rem); right: clamp(1.25rem, 3vw, 2.5rem); font: italic 400 clamp(5rem, 12vw, 10rem)/1 var(--f-serif); opacity: .16; }
.pillar p { max-width: 46ch; }
.ticks { display: grid; gap: .5rem; margin-top: var(--s-1); font-size: var(--t-sm); }
.ticks li { display: flex; gap: .7rem; align-items: baseline; }
.ticks li::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--navy); transform: translateY(-2px); }
@media (max-width: 860px) {
  .pillars { grid-template-columns: 1fr; gap: var(--s-4); }
  .pillars__aside { position: static; }
  .pillars__index { display: none; }
  .pillars__aside .h2 { margin-bottom: 0; }
  .pillar { min-height: 0; padding-top: 6rem; }
}

/* ---------- scanner (dark) ---------- */
.scan {
  background: var(--night); color: var(--on-night);
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: var(--s-5); align-items: center;
  padding: var(--s-7) var(--gutter);
  border-radius: 32px 32px 0 0;
}
.scan .h2 { margin: var(--s-2) 0 var(--s-3); font-size: clamp(2.25rem, 3.6vw + .5rem, 4.25rem); }
.scan .h2 em { color: var(--yellow); }
.scan, .builder, .foot { --focus: var(--yellow); }
.scan .muted { color: var(--on-night-2); margin-bottom: var(--s-4); max-width: 38ch; }
.term {
  background: var(--navy-3); border: 1px solid var(--line-n); border-radius: 18px;
  font: 400 .8125rem/1.7 var(--f-mono); overflow: hidden;
  box-shadow: 0 40px 80px -30px oklch(0% 0 0 / .6);
}
.term__bar { display: flex; align-items: center; gap: 6px; padding: .8rem 1rem; border-bottom: 1px solid var(--line-n); }
.term__bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--night-2); }
.term__bar b { margin-left: auto; font-weight: 400; color: var(--on-night-2); font-size: .75rem; }
.term__body { height: 22rem; overflow-y: auto; padding: 1rem 1.25rem; scrollbar-width: thin; scrollbar-color: var(--night-2) transparent; }
.term__body p { display: grid; grid-template-columns: 1fr auto auto; gap: 1rem; animation: termIn .35s var(--ease-out) both; }
.term__body p.plain { display: block; }
@keyframes termIn { from { opacity: 0; transform: translateY(6px); } }
.term__muted { color: var(--on-night-2); }
.term__body .ok { color: var(--sage); }
.term__body .dom { color: var(--on-night-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag { font-size: .6875rem; padding: 0 .5rem; border-radius: 4px; text-transform: uppercase; letter-spacing: .05em; align-self: center; }
.tag--nec { background: rgb(245 238 220 / .12); }
.tag--fun { background: rgb(217 224 213 / .16); color: var(--sage); }
.tag--sta { background: rgb(244 206 98 / .16); color: var(--yellow); }
.tag--mar { background: rgb(115 123 131 / .3); color: #C9CDD2; }
.tag--nec { color: var(--cream); }
.tag--unk { background: transparent; color: var(--on-night-2); box-shadow: inset 0 0 0 1px var(--line-n); }
.term__body .term__err { color: var(--yellow); }
.term__wait { animation: none; }
.btn:disabled { opacity: .55; cursor: progress; }
.term__summary { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line-n); }
.term__summary[hidden] { display: none; }
.term__summary div { padding: 1rem 1.25rem; border-left: 1px solid var(--line-n); }
.term__summary div:first-child { border-left: 0; }
.term__summary b { display: block; font: 500 1.75rem/1 var(--f-sans); letter-spacing: -0.03em; margin-bottom: .35rem; }
.term__summary span { color: var(--on-night-2); font-size: .6875rem; text-transform: uppercase; letter-spacing: .06em; }
@media (max-width: 960px) { .scan { grid-template-columns: 1fr; } }
@media (max-width: 520px) {
  .term__summary { grid-template-columns: repeat(2, 1fr); }
  .term__summary div:nth-child(odd) { border-left: 0; }
  .term__summary div:nth-child(n+3) { border-top: 1px solid var(--line-n); }
  .term__summary div:last-child { grid-column: 1 / -1; }
  .term__body p { grid-template-columns: 1fr auto; }
  .term__body .dom { display: none; }
}

/* ---------- builder ---------- */
.builder { background: var(--night); color: var(--on-night); padding: 0 var(--gutter) var(--s-7); }
.builder__head { display: flex; flex-direction: column; align-items: flex-end; text-align: right; padding: var(--s-5) 0; border-top: 1px solid var(--line-n); }
.builder__head .label { color: var(--on-night-2); }
.builder__head .h2 { margin-top: var(--s-2); }
.builder__wrap { display: grid; grid-template-columns: minmax(16rem, 4fr) minmax(0, 8fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: start; }
.controls { display: grid; gap: var(--s-4); position: sticky; top: 6rem; }
.controls legend { color: var(--on-night-2); margin-bottom: .85rem; display: flex; justify-content: space-between; width: 100%; }
.controls output { color: var(--on-night); }
.seg { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--night-2); }
.seg input, .swatches input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { padding: .55rem 1.1rem; border-radius: 999px; cursor: pointer; font-size: .9375rem; color: var(--on-night-2); transition: background-color var(--d-sm), color var(--d-sm); }
.seg input:checked + label { background: var(--yellow); color: var(--navy); }
.seg input:focus-visible + label { outline: 2px solid var(--yellow); outline-offset: 2px; }
.seg--wrap { flex-wrap: wrap; border-radius: 22px; }
.controls .fine { margin-top: .75rem; max-width: 34ch; }
.swatches { display: flex; gap: .75rem; }
.swatches label { width: 36px; height: 36px; border-radius: 50%; background: var(--c); cursor: pointer; box-shadow: 0 0 0 2px var(--night), 0 0 0 3px var(--line-n); transition: transform var(--d-sm) var(--ease-spring), box-shadow var(--d-sm); }
.swatches input:checked + label { box-shadow: 0 0 0 3px var(--night), 0 0 0 5px var(--on-night); transform: scale(1.06); }
.swatches input:focus-visible + label { outline: 2px solid var(--yellow); outline-offset: 6px; }
input[type="range"] { width: 100%; appearance: none; height: 2px; background: var(--night-2); border-radius: 2px; cursor: pointer; }
input[type="range"]::-webkit-slider-thumb { appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--on-night); border: 4px solid var(--night); box-shadow: 0 0 0 1px var(--on-night-2); }
input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--on-night); border: 4px solid var(--night); }

.browser { border-radius: 16px; overflow: hidden; background: var(--paper); box-shadow: 0 50px 100px -40px oklch(0% 0 0 / .7); }
.browser__bar { display: flex; align-items: center; gap: 6px; padding: .7rem 1rem; background: var(--paper-2); border-bottom: 1px solid var(--line); }
.browser__bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--paper-3); }
.browser__bar i { margin: 0 auto; font: normal .75rem var(--f-mono); color: var(--ink-3); background: var(--paper); padding: .25rem 1.25rem; border-radius: 6px; }
.browser__page { position: relative; height: clamp(26rem, 46vw, 36rem); padding: 1.5rem; display: flex; flex-direction: column; gap: .85rem; overflow: hidden; }
.ghost { background: var(--paper-2); border-radius: 6px; }
.ghost--nav { height: 14px; width: 100%; margin-bottom: 1.5rem; }
.ghost--h { height: clamp(22px, 3vw, 34px); width: 68%; }
.ghost--short { width: 42%; }
.ghost--p { height: 12px; width: 52%; margin: .5rem 0 1rem; }
.ghost-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: .85rem; flex: 1; }
.ghost--card { height: 100%; border-radius: 10px; }

/* demo banner */
.cb {
  --acc: var(--navy); --r: 14px; --cbg: var(--white); --cfg: var(--ink); --cfg2: var(--ink-3);
  position: absolute; z-index: 1; background: var(--cbg); color: var(--cfg); border-radius: var(--r);
  padding: 1.25rem; box-shadow: 0 20px 50px -12px rgb(18 24 36 / .35), 0 0 0 1px rgb(18 24 36 / .06);
  transition: all var(--d-lg) var(--ease-out);
  left: 1.25rem; bottom: 1.25rem; width: min(22rem, calc(100% - 2.5rem));
}
.cb__title { font-weight: 600; letter-spacing: -0.02em; margin-bottom: .35rem; }
.cb__text { font-size: .8125rem; line-height: 1.5; color: var(--cfg2); margin-bottom: 1rem; }
.cb__actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.cb__btn { flex: 1 1 auto; text-align: center; font-size: .8125rem; font-weight: 500; padding: .6rem .9rem; border-radius: calc(var(--r) * .6); transition: all var(--d-md) var(--ease-out); }
.cb__btn--solid { background: var(--acc); color: var(--acc-fg, var(--white)); }
.cb__btn--ghost { color: var(--cfg); box-shadow: inset 0 0 0 1px color-mix(in oklch, var(--cfg) 25%, transparent); }
.cb.is-bar { left: 0; bottom: 0; width: 100%; border-radius: var(--r) var(--r) 0 0; display: grid; grid-template-columns: 1fr auto; column-gap: 1.5rem; align-items: center; }
.cb.is-bar .cb__text { margin-bottom: 0; }
.cb.is-bar .cb__title { grid-column: 1; }
.cb.is-bar .cb__actions { grid-column: 2; grid-row: 1 / span 2; flex-wrap: nowrap; }
.cb.is-center { left: 50%; bottom: 50%; transform: translate(-50%, 50%); width: min(26rem, calc(100% - 2.5rem)); }
.browser__page::after { content: ""; position: absolute; inset: 0; background: rgb(18 24 36 / .3); opacity: 0; transition: opacity var(--d-md); pointer-events: none; }
.browser__page:has(.cb.is-center)::after { opacity: 1; }
.cb.is-dark { --cbg: var(--night-2); --cfg: var(--on-night); --cfg2: var(--on-night-2); }
@media (max-width: 960px) { .builder__wrap { grid-template-columns: 1fr; } .controls { position: static; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); } }
@media (max-width: 620px) {
  .cb.is-bar { grid-template-columns: 1fr; }
  .cb.is-bar .cb__actions { grid-column: 1; grid-row: auto; margin-top: .85rem; flex-wrap: wrap; }
  .builder__head { align-items: flex-start; text-align: left; }
}

/* ---------- find fejlen (spot the dark pattern) ---------- */
.spot { padding: var(--s-7) var(--gutter); }
.spot__head { display: grid; gap: var(--s-3); justify-items: start; margin-bottom: var(--s-5); }
.spot__head .h2 { margin-top: var(--s-2); }
.spot__intro { display: grid; gap: var(--s-3); justify-items: start; }
.spot__intro .muted { max-width: 40ch; }
.spot__score { display: inline-flex; align-items: baseline; gap: .4em; padding: .55rem 1rem; border-radius: 999px; background: var(--white); color: var(--ink-3); }
.spot__score b { font: 500 1rem var(--f-mono); color: var(--navy); }

.spot__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-2); }
@media (max-width: 860px) { .spot__grid { grid-template-columns: 1fr; } .mini { min-height: 0; } }
.spot-card { background: var(--sand); border-radius: 24px; padding: clamp(1rem, 2.5vw, 1.75rem); display: flex; flex-direction: column; gap: var(--s-2); transition: background-color var(--d-md); }
.spot-card__top { display: flex; justify-content: space-between; align-items: center; color: var(--ink-3); }
.spot-card__state { padding: .3rem .7rem; border-radius: 999px; background: rgb(18 24 36 / .06); transition: background-color var(--d-sm), color var(--d-sm); }
.spot-card[data-state="miss"] .spot-card__state { background: var(--navy); color: var(--cream); }
.spot-card[data-state="found"] .spot-card__state,
.spot-card[data-state="shown"] .spot-card__state { background: var(--sage); color: var(--navy); }
.spot-card[data-state="found"] .spot-card__state::before { content: "✓ "; }

/* the mini banner: every part is a button you can click */
.mini {
  background: var(--white); color: var(--navy); border-radius: 16px; padding: 1.1rem;
  display: grid; gap: .6rem; justify-items: start; align-content: start;
  box-shadow: 0 18px 40px -22px rgb(18 24 36 / .35), 0 0 0 1px rgb(18 24 36 / .06);
  min-height: 13.5rem;
}
.mini button {
  font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; text-align: left;
  cursor: crosshair; border-radius: 6px;
  transition: box-shadow var(--d-sm), background-color var(--d-sm), opacity var(--d-md);
}
@media (hover: hover) { .mini button:not([aria-disabled]):hover { box-shadow: 0 0 0 2px var(--white), 0 0 0 4px var(--yellow); } }
.mini button:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.mini .mini__title { font-weight: 600; letter-spacing: -0.02em; font-size: 1rem; }
.mini .mini__text { font-size: .8125rem; line-height: 1.5; color: var(--ink-3); }
.mini__row { display: flex; flex-wrap: wrap; gap: .5rem; width: 100%; margin-top: .25rem; }
.mini .mini__btn { font-size: .8125rem; font-weight: 500; padding: .55rem .95rem; border-radius: 10px; text-align: center; }
.mini .mini__btn--solid { background: var(--navy); color: var(--white); }
.mini .mini__btn--line { box-shadow: inset 0 0 0 1px rgb(18 24 36 / .22); }
.mini .mini__btn--wide { flex: 1; padding-block: .75rem; }
.mini .mini__faint { justify-self: center; font-size: .6875rem; color: #B9BEC4; }
.mini .mini__small { font-size: .6875rem; line-height: 1.45; color: var(--slate); }
.mini__checks { display: grid; gap: .35rem; width: 100%; }
.mini .mini__check { display: flex; align-items: center; gap: .6rem; width: 100%; font-size: .8125rem; padding: .35rem .25rem; }
.mini .mini__check i { flex: none; width: 16px; height: 16px; border-radius: 4px; box-shadow: inset 0 0 0 1.5px rgb(18 24 36 / .35); display: grid; place-items: center; }
.mini .mini__check.is-on i { background: var(--navy); box-shadow: none; }
.mini .mini__check.is-on i::after { content: ""; width: 8px; height: 4px; border: 2px solid var(--white); border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); }
.mini .mini__check.is-locked { opacity: .6; }

/* feedback */
.mini button.is-miss { animation: miss .45s var(--ease-out); }
@keyframes miss { 20%, 60% { translate: -4px 0; } 40%, 80% { translate: 4px 0; } }
.spot-card[data-state="found"] .mini button,
.spot-card[data-state="shown"] .mini button { cursor: default; opacity: .4; }
.spot-card[data-state="found"] .mini button[data-trick],
.spot-card[data-state="shown"] .mini button[data-trick] { opacity: 1; background-color: rgb(244 206 98 / .45); box-shadow: 0 0 0 2px var(--yellow); }
.spot-card__show { align-self: flex-start; background: none; border: 0; padding: .25rem 0; font: 500 .8125rem var(--f-sans); color: var(--ink-3); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.spot-card__show[hidden] { display: none; }
.spot-card__why { display: grid; gap: .5rem; padding-top: var(--s-2); border-top: 1px solid rgb(18 24 36 / .14); font-size: var(--t-sm); color: var(--ink-2); animation: termIn .45s var(--ease-out); outline: none; }
.spot-card__why[hidden] { display: none; }
.spot-card__name { font-weight: 600; font-size: 1.0625rem; letter-spacing: -0.02em; color: var(--navy); }
.spot-card__why .link { justify-self: start; color: var(--navy); }

.spot__done { margin-top: var(--s-2); padding: clamp(1.5rem, 3vw, 2.5rem); border-radius: 24px; background: var(--yellow); display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-4); animation: termIn .5s var(--ease-out); }
.spot__done[hidden] { display: none; }
.spot__done .muted { color: var(--navy); flex: 1 1 22rem; }
.spot__done .btn--brand { --bg: var(--navy); --fg: var(--cream); }
@media (hover: hover) { .spot__done .btn--brand:hover { --bg: var(--ink-2); } }
.spot > .fine { margin-top: var(--s-3); }

/* ---------- compliance ---------- */
.comply {
  background: var(--sage); color: var(--navy);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-5);
  padding: var(--s-7) var(--gutter); margin: 0 clamp(.5rem, 1.5vw, 1.25rem); border-radius: 32px;
}
.display-2 { font-size: var(--t-display-2); font-weight: 500; line-height: 1; letter-spacing: -0.05em; margin-top: var(--s-3); }
.display-2 em { color: var(--slate-d); }
.comply .label--light { color: var(--ink-3); }
.comply__big { position: sticky; top: 7rem; align-self: start; }
.comply__list > div { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: var(--s-3); padding: var(--s-3) 0; border-top: 1px solid rgb(18 24 36 / .14); }
.comply__list > div:last-child { border-bottom: 1px solid rgb(18 24 36 / .14); }
.comply__list dt { font-weight: 500; font-size: 1.125rem; letter-spacing: -0.02em; }
.comply__list dd { color: var(--ink-3); font-size: var(--t-sm); }
@media (max-width: 900px) { .comply { grid-template-columns: 1fr; } .comply__big { position: static; } }
@media (max-width: 520px) { .comply__list > div { grid-template-columns: 1fr; gap: .4rem; } }

/* ---------- cta + footer ---------- */
.cta { padding: var(--s-6) var(--gutter) var(--s-7); border-top: 1px solid var(--line); }
.cta__title { font-size: var(--t-display-2); font-weight: 500; line-height: 1; letter-spacing: -0.05em; margin: var(--s-3) 0 var(--s-4); }
.cta__title em { color: var(--slate-d); }
.cta__row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4); font-size: 1.125rem; }

.foot { background: var(--night); color: var(--on-night); padding: var(--s-6) var(--gutter) var(--s-3); overflow: hidden; }
.foot__cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-4); }
.foot__cols > div { display: grid; gap: .6rem; align-content: start; font-size: var(--t-sm); }
.foot__cols .label { color: var(--on-night-2); margin-bottom: .4rem; }
.foot__cols a { color: var(--on-night-2); transition: color var(--d-micro); justify-self: start; }
@media (hover: hover) { .foot__cols a:hover { color: var(--on-night); } }
.foot__word { font-size: clamp(3.5rem, 17vw, 19rem); font-weight: 600; letter-spacing: -0.075em; line-height: .95; margin: var(--s-6) 0 var(--s-3) -0.05em; color: var(--night-2); white-space: nowrap; user-select: none; }
.foot__base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; color: var(--on-night-2); padding-top: var(--s-3); border-top: 1px solid var(--line-n); }
@media (max-width: 720px) { .foot__cols { grid-template-columns: repeat(2, 1fr); } }

/* ---------- our own banner ---------- */
.own {
  position: fixed; z-index: 60; left: var(--gutter); bottom: 1rem; width: min(24rem, calc(100% - 2 * var(--gutter)));
  background: var(--white); border-radius: 18px; padding: 1.25rem;
  box-shadow: 0 30px 60px -20px rgb(18 24 36 / .4), 0 0 0 1px var(--line);
  animation: ownIn .8s var(--ease-out) both;
}
.own[hidden] { display: none; }
.own.is-leaving { animation: ownOut .45s var(--ease-io) forwards; }
@keyframes ownIn { from { opacity: 0; transform: translateY(24px) scale(.98); } }
@keyframes ownOut { to { opacity: 0; transform: translateY(24px) scale(.98); } }
.own__title { font-weight: 600; letter-spacing: -0.02em; margin-bottom: .3rem; }
.own__text { font-size: .875rem; color: var(--ink-3); line-height: 1.5; margin-bottom: 1rem; }
.own__actions { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }

/* ---------- scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); transition-delay: calc(var(--i, 0) * 70ms); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0ms !important; }
  .hero__title .line > span { transform: none; }
  .crumbs__grid::after { display: none; }
  .ticker__track { animation: none; }
  .reveal { opacity: 1; transform: none; }
  .reveal-words .w { opacity: 1; }
}
