/* klinter trainers. Tokens: DESIGN.md (klinter.be family, direction A2, round shapes). */
@font-face { font-family: "Schibsted Grotesk"; src: url(fonts/schibsted-grotesk-latin.woff2) format("woff2"); font-weight: 400 800; font-display: swap; }
@font-face { font-family: "Spline Sans Mono"; src: url(fonts/spline-sans-mono-latin.woff2) format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --sky: #CDE6F7; --sky-g: linear-gradient(#A6D1F2, #E6F3FC);
  --card: #FFFFFF; --ink: #1D2329; --mute: #4E5862; --line: #D9E1E7;
  --bad: #B7342A; --bad-ink: #FFFFFF; --best: #0B7A67; --best-ink: #FFFFFF;
  --best-tint: #E7F3F1; --arrow-bad: #E0503D; --arrow-best: #0B7A67;
  --lt: #F6F1E7; --dk: #DCCCB0; --sq-ink: #1D2329;
  --ring: #1D2329; --ring-halo: #FFFFFF; --dot: rgba(29, 35, 41, .28);
  --f: "Schibsted Grotesk", system-ui, sans-serif; --m: "Spline Sans Mono", ui-monospace, monospace;
  --r: 22px; --r-s: 14px; --shadow: 0 10px 30px rgba(29, 35, 41, .12);
  --ease: cubic-bezier(.25, .8, .25, 1); --t: 250ms;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --sky: #121A2B; --sky-g: linear-gradient(#0B1322, #1C2942);
    --card: #1A2232; --ink: #EEF2F5; --mute: #B3BDC7; --line: #2C374A;
    --bad: #FF6B57; --bad-ink: #1D2329; --best: #3CC4AA; --best-ink: #1D2329;
    --best-tint: #1F3A3A; --arrow-bad: #FF6B57; --arrow-best: #3CC4AA;
    --lt: #D9CDB4; --dk: #A08C6A;
    --ring: #EEF2F5; --ring-halo: #121A2B; --dot: rgba(18, 26, 43, .55);
    --shadow: 0 0 0 1px #2C374A;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100svh; background: var(--sky-g) fixed var(--sky); color: var(--ink);
  font: 400 1.0625rem/1.5 var(--f); -webkit-font-smoothing: antialiased;
  padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
h1, h2, h3, p, ol, ul { margin: 0; }
h1, h2 { text-wrap: balance; }
p { text-wrap: pretty; }
a { color: inherit; text-underline-offset: 4px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--ring); outline-offset: 3px; box-shadow: 0 0 0 6px var(--ring-halo); }
.skip { position: absolute; left: 16px; top: -80px; background: var(--card); padding: 10px 14px; border-radius: var(--r-s); z-index: 9; }
.skip:focus { top: 12px; }

/* header and footer */
.top { display: flex; align-items: center; gap: 12px; padding: 14px 18px 10px; max-width: 1100px; margin: 0 auto; }
.word { font: 800 1.25rem/1 var(--f); letter-spacing: -.02em; text-decoration: none; padding: 6px 0; }
.word i { font-style: normal; color: var(--bad); }
.app { font: 600 .95rem/1 var(--f); }
.nav { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; border-radius: 99px; text-decoration: none; font-weight: 600; font-size: .95rem; }
.nav a:hover { background: var(--card); }
.nav .lang { font: 600 .9rem/1 var(--f); }
@media (max-width: 360px) {
  .top { gap: 8px; padding-inline: 12px; }
  .nav { gap: 0; }
  .nav a { padding: 0 8px; }
  .app { font-size: .88rem; }
}
.foot { max-width: 1100px; margin: 24px auto 0; padding: 0 18px; color: var(--mute); font-size: .88rem; }
.foot nav { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 8px; }
.foot a { display: inline-block; padding: 6px 0; }

/* cards */
main { max-width: 1100px; margin: 0 auto; padding: 0 10px; display: grid; gap: 12px; }
.card { background: var(--card); border-radius: var(--r); padding: 18px 16px; box-shadow: var(--shadow); }
.card > * + * { margin-top: 12px; }
.narrow { max-width: 560px; width: 100%; margin-inline: auto; }
.card h1 { font: 800 1.6rem/1.15 var(--f); letter-spacing: -.02em; }
.card h2 { font: 800 1.25rem/1.2 var(--f); letter-spacing: -.01em; }
.hero h1 { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.6rem); }
.lead { font-size: 1.125rem; max-width: 65ch; }
.how { max-width: 65ch; }
.meta { color: var(--mute); font-size: .88rem; }
.center { text-align: center; }
.price { font-weight: 800; font-size: 1.25rem; }
.prose { max-width: 720px; width: 100%; margin-inline: auto; }
.prose h2 { margin-top: 20px; }
.prose ul { padding-left: 20px; }
.prose li + li { margin-top: 6px; }

/* buttons and forms */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 22px;
  border-radius: 99px; border: 2px solid var(--ink); background: none; color: var(--ink);
  font: 700 1.02rem/1.15 var(--f); text-decoration: none; cursor: pointer; text-align: center; }
.btn.main { background: var(--ink); color: var(--card); }
.btn:hover { text-decoration: underline; }
.btn[disabled] { opacity: .55; cursor: not-allowed; text-decoration: none; }
.btn.google { width: 100%; }
.row { display: flex; flex-wrap: wrap; gap: 10px; }
.row form { margin: 0; }
.link { background: none; border: 0; padding: 10px 0; min-height: 44px; text-decoration: underline; cursor: pointer; }
.or { text-align: center; color: var(--mute); }
label { display: block; font-weight: 600; margin-bottom: 6px; }
input[type=email], input:not([type]) { width: 100%; min-height: 48px; padding: 0 14px; border-radius: var(--r-s);
  border: 2px solid var(--mute); background: var(--card); color: var(--ink); font: inherit; }
input[aria-invalid=true] { border-color: var(--bad); }
form > * + * { margin-top: 12px; }
.check { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; }
.check input { width: 24px; height: 24px; margin: 2px 0 0; accent-color: var(--ink); }
.check label { font-weight: 400; margin: 0; }
.err { color: var(--bad); font-weight: 600; }
.ok, .note { padding: 12px 14px; border-radius: var(--r-s); background: var(--best-tint); }

/* lists */
.sc-list, .themes, .how { padding: 0; list-style: none; display: grid; gap: 8px; }
.how { list-style: decimal; padding-left: 22px; }
.sc a { display: flex; justify-content: space-between; gap: 12px; align-items: center; min-height: 52px; padding: 8px 16px;
  border-radius: var(--r-s); background: var(--sky); text-decoration: none; font-weight: 600; }
.sc a:hover { text-decoration: underline; }
.sc-m { font-weight: 400; font-size: .9rem; color: var(--mute); }
.lock { font-weight: 600; color: var(--ink); }
.themes { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.themes a { display: inline-block; padding: 6px 0; font-weight: 600; }

/* play screen */
.play { display: grid; gap: 12px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 0 8px; }
.step i { display: block; height: 8px; border-radius: 99px; background: var(--card); opacity: .75; }
.step span { display: block; font-size: .85rem; color: var(--mute); margin-top: 4px; min-height: 1.2em; }
.step.bad i { background: var(--bad); opacity: 1; }
.step.best i, .step.good i { background: var(--best); opacity: 1; }
.step.inaccuracy i { background: var(--ink); opacity: 1; }
.step.now i { outline: 2px solid var(--ink); outline-offset: 1px; }
.board-card { padding: 14px 10px 10px; }
.head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 0 6px 4px; }
.head h1 { font: 800 1.3rem/1.15 var(--f); }
.bwrap { position: relative; border-radius: var(--r-s); overflow: hidden; max-width: 520px; margin-inline: auto; touch-action: manipulation; }
.board { display: grid; grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(8, 1fr); aspect-ratio: 1; width: 100%; touch-action: none; user-select: none; -webkit-user-select: none; }
.sq { position: relative; display: block; border: 0; padding: 0; margin: 0; cursor: pointer; background: var(--lt); }
.sq.dk { background: var(--dk); }
.sq:focus-visible { outline: 3px solid var(--ring); outline-offset: -3px; box-shadow: inset 0 0 0 6px var(--ring-halo); z-index: 2; }
.sq img { position: absolute; inset: 4%; width: 92%; height: 92%; pointer-events: none; }
.sq.sel { box-shadow: inset 0 0 0 4px var(--ink); }
.sq.last { background-image: linear-gradient(rgba(255, 197, 49, .38), rgba(255, 197, 49, .38)); }
.sq.target::after { content: ""; position: absolute; left: 36%; top: 36%; width: 28%; height: 28%; border-radius: 50%; background: var(--dot); }
.rk, .fl { position: absolute; z-index: 1; font: 500 .7rem/1 var(--m); color: var(--sq-ink); pointer-events: none; }
.rk { left: 4px; top: 3px; } .fl { right: 4px; bottom: 3px; }
.arrows { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.arrows .out { stroke: #1D2329; }
.tagsq { position: absolute; transform: translate(-50%, -110%); background: var(--card); color: var(--ink); border-radius: 99px;
  padding: 2px 8px; font: 700 .85rem/1.3 var(--f); pointer-events: none; box-shadow: 0 0 0 1px var(--line); white-space: nowrap; }
.legend { display: flex; gap: 8px; padding: 10px 4px 2px; flex-wrap: wrap; min-height: 46px; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px 0 10px; border-radius: 99px;
  border: 2px solid var(--line); background: var(--line); color: var(--ink); font: 600 .92rem/1 var(--f); cursor: pointer; }
.chip i { width: 20px; height: 0; border-top: 4px solid; border-radius: 2px; }
.chip.you i { border-color: var(--arrow-bad); border-top-style: dashed; }
.chip.best i { border-color: var(--arrow-best); }
.chip[aria-pressed=false] { background: none; }
.fb { min-height: 120px; }
.verdict { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.verdict b { font: 800 1.75rem/1.15 var(--f); letter-spacing: -.02em; }
.tag { font: 700 .85rem/1 var(--f); padding: 7px 12px; border-radius: 99px; }
.tag.bad, .tag.mistake { background: var(--bad); color: var(--bad-ink); }
.tag.best, .tag.good { background: var(--best); color: var(--best-ink); }
.tag.inaccuracy { box-shadow: inset 0 0 0 2px var(--ink); }
.better { padding: 10px 12px; border-radius: var(--r-s); background: var(--best-tint); }
.better b { color: var(--best); }
.acts { display: grid; gap: 10px; }
.acts .btn { width: 100%; }
.src { font-size: .85rem; color: var(--mute); text-align: center; padding: 0 16px; }
.wait { font-weight: 600; }
.summary { padding: 0; list-style: none; display: grid; gap: 6px; }

@media (min-width: 900px) {
  .play { grid-template-columns: minmax(0, 560px) minmax(0, 1fr); align-items: start; }
  .play .steps { grid-column: 1 / -1; }
  .play .board-card { grid-row: 2 / 4; }
  .play .src, .play .center { grid-column: 2; text-align: left; }
}
@media (prefers-reduced-motion: no-preference) {
  .btn, .chip, .sc a { transition: background var(--t) var(--ease), color var(--t) var(--ease); }
}
