/* thunderkick-demo.com — "berry arcade": cream paper sheets with ink outlines and hard wine shadows on a wine backdrop,
   a vertical rail on desktop, a bottom tab bar on phones. Palette from Thunderkick's own colours (wine, pink, lilac, violet,
   aqua, cream, a touch of lime). Fonts: Bricolage Grotesque (display), Figtree (text), Space Mono (figures and labels). */
@layer reset, base, shell, blocks, demo, pages, motion;

@layer reset {
  *, *::before, *::after { box-sizing: border-box }
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100% }
  body, h1, h2, h3, p, figure, blockquote, dl, dd, ol, ul { margin: 0 }
  ol[class], ul[class] { list-style: none; padding: 0 }
  img, svg, video, iframe, picture { display: block; max-width: 100% }
  img { height: auto }
  button, input { font: inherit; color: inherit }
  button { cursor: pointer }
  table { border-collapse: collapse }
}

@layer base {
  :root {
    --wine: #760032; --wine-2: #5c0027; --wine-3: #3d0017; --night: #23000f;
    --cream: #fffdee; --cream-2: #f6efd8; --cream-3: #ece2c3;
    --ink: #1b0710; --ink-2: #3e2732; --ink-3: #6f5763;
    --pink: #fe6eab; --pink-2: #ffb3d3; --rasp: #ad0e51; --lilac: #c883fd; --lilac-2: #ead4ff; --violet: #9300ff;
    --plum: #654280; --aqua: #9ce6f0; --aqua-2: #d8f6fa; --lime: #d6fe85;
    --r: 26px; --r-md: 18px; --r-sm: 12px;
    --edge: 2px solid var(--ink);
    --pop: 5px 5px 0 var(--wine-3);
    --pop-ink: 4px 4px 0 var(--ink);
    --f-display: 'Bricolage Grotesque', 'Arial Narrow', Arial, sans-serif;
    --f-text: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    --f-mono: 'Space Mono', ui-monospace, Consolas, Menlo, monospace;
    --rail: 248px;
    --gap: 28px;
    color-scheme: light;
  }
  html { background: var(--wine); scroll-padding-top: 20px }
  body {
    min-height: 100vh; font-family: var(--f-text); font-size: 17.5px; line-height: 1.66; color: var(--cream);
    background:
      radial-gradient(640px 520px at 92% -6%, rgba(254, 110, 171, .38), transparent 70%),
      radial-gradient(560px 520px at 8% 104%, rgba(147, 0, 255, .30), transparent 70%),
      radial-gradient(900px 600px at 55% 40%, rgba(173, 14, 81, .35), transparent 70%),
      var(--wine);
    background-attachment: fixed;
  }
  a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 3px }
  :focus-visible { outline: 3px solid var(--aqua); outline-offset: 3px; border-radius: 6px }
  h1, h2, h3 { font-family: var(--f-display); font-weight: 800; line-height: 1.02; letter-spacing: -.01em; font-variation-settings: "wdth" 80, "opsz" 96 }
  h1 { font-size: clamp(40px, 5.6vw, 72px); font-variation-settings: "wdth" 75, "opsz" 96 }
  h2 { font-size: clamp(30px, 3.4vw, 42px); margin: 0 0 .45em }
  h3 { font-size: 23px; margin: 1.4em 0 .4em; font-variation-settings: "wdth" 88, "opsz" 40 }
  p + p { margin-top: 1em }
  strong, b { font-weight: 750 }
  .sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0 }
  .mono { font-family: var(--f-mono) }
  .skip { position: absolute; left: 12px; top: -80px; z-index: 90; padding: 10px 16px; border: var(--edge); border-radius: var(--r-sm); background: var(--lime); color: var(--ink); font-weight: 800 }
  .skip:focus { top: 12px }
}

@layer shell {
  /* desktop: the rail is fixed on the left; content sits to its right */
  .rail {
    position: fixed; inset: 0 auto 0 0; z-index: 30; width: var(--rail); display: flex; flex-direction: column; gap: 22px;
    padding: 26px 18px 18px; border-right: 2px solid rgba(27, 7, 16, .55); overflow-y: auto; scrollbar-width: thin;
    background: linear-gradient(180deg, rgba(61, 0, 23, .92), rgba(35, 0, 15, .95));
  }
  .rail-brand { display: block; padding: 4px 6px }
  .rail-brand img { width: 206px; height: 44px }
  .nav { display: flex; flex-direction: column; gap: 6px }
  .nav a {
    display: flex; align-items: center; gap: 12px; padding: 11px 14px; border: 2px solid transparent; border-radius: var(--r-md);
    color: var(--cream); font-family: var(--f-display); font-size: 18px; font-weight: 700; line-height: 1.15; letter-spacing: .005em;
    text-decoration: none; font-variation-settings: "wdth" 90, "opsz" 24; transition: background .15s, border-color .15s, color .15s, transform .15s;
  }
  .nav svg { flex: none; width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round }
  /* hover and current are one family: the cream chip; current adds the ink edge and the hard shadow */
  .nav a:hover { background: rgba(255, 253, 238, .1); border-color: rgba(255, 253, 238, .28) }
  .nav a[aria-current] { background: var(--cream); color: var(--ink); border-color: var(--ink); box-shadow: 4px 4px 0 var(--pink) }
  .rail-note { margin-top: auto; padding: 14px 14px 13px; border: 2px dashed rgba(255, 253, 238, .32); border-radius: var(--r-md); font-size: 13.5px; line-height: 1.5; color: rgba(255, 253, 238, .82) }
  .rail-note b { display: inline-grid; place-items: center; width: 34px; height: 34px; margin: 0 0 8px; border: var(--edge); border-radius: 50%; background: var(--pink); color: var(--ink); font-family: var(--f-mono); font-size: 12px }
  .rail-top {
    position: relative; display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: var(--edge); border-radius: var(--r-md);
    background: var(--lilac); color: var(--ink); font-family: var(--f-mono); font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
    box-shadow: var(--pop-ink); opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .2s, transform .2s, visibility 0s linear .2s;
  }
  .rail-top.is-on { opacity: 1; visibility: visible; transform: none; transition: opacity .2s, transform .2s, visibility 0s }
  .rail-top:hover { background: var(--pink) }
  .rail-top:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink) }
  .rail-top svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round }
  .rail-top span { margin-left: auto; font-variant-numeric: tabular-nums }
  /* reading progress: a pink bar that fills down the rail's right edge */
  .rail-meter { position: absolute; top: 0; right: -2px; width: 4px; height: 100%; background: transparent; pointer-events: none }
  .rail-meter i { display: block; width: 100%; height: 100%; background: linear-gradient(var(--aqua), var(--pink) 60%, var(--lime)); transform-origin: top; transform: scaleY(var(--read, 0)) }

  .app { margin-left: var(--rail); min-height: 100vh; padding: 26px var(--gap) 0 }
  .page { max-width: 1060px; margin: 0 auto }
  .topbar { display: none }

  /* footer: three tiles and a closing line on the wine backdrop */
  .colophon { max-width: 1060px; margin: 64px auto 0; padding: 0 0 34px }
  .colophon-tiles { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 18px }
  .tile { padding: 20px 22px 18px; border: var(--edge); border-radius: var(--r-md); background: var(--wine-3); box-shadow: 5px 5px 0 var(--ink) }
  .tile h2 { margin: 0 0 8px; font-size: 22px; font-variation-settings: "wdth" 85, "opsz" 32 }
  .tile p, .tile li { font-size: 14.5px; line-height: 1.55; color: rgba(255, 253, 238, .86) }
  .tile ul { display: grid; gap: 6px }
  .tile a { color: var(--cream) }
  .tile--age { background: var(--pink); color: var(--ink) }
  .tile--age p, .tile--age a { color: var(--ink) }
  .tile--age .age { display: inline-grid; place-items: center; width: 46px; height: 46px; margin: 0 0 10px; border: var(--edge); border-radius: 50%; background: var(--cream); font-family: var(--f-mono); font-weight: 700 }
  .colophon-line { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 18px; margin: 24px 2px 0; font-family: var(--f-mono); font-size: 12.5px; color: rgba(255, 253, 238, .66) }
}

@layer blocks {
  /* sheets: the cream paper every block is printed on */
  .sheet { position: relative; padding: 34px 38px; border: var(--edge); border-radius: var(--r); background: var(--cream); color: var(--ink-2); box-shadow: var(--pop) }
  .sheet h1, .sheet h2, .sheet h3 { color: var(--ink) }
  .sheet a { color: var(--ink); text-decoration-color: var(--pink) }
  .sheet a:hover { text-decoration-color: var(--violet) }
  .block { margin: 26px 0 0 }
  .sheet ul:not([class]), .sheet ol:not([class]) { padding-left: 1.2em; margin: .6em 0 1em }
  .sheet ul:not([class]) li, .sheet ol:not([class]) li { margin: .3em 0 }
  .sheet li::marker { color: var(--rasp) }
  .block > h2:first-child { margin-top: 0 }
  .lead { font-size: 19.5px; line-height: 1.6; color: var(--ink-2) }

  /* buttons */
  .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 11px 20px; border: var(--edge); border-radius: 999px;
    background: var(--cream); color: var(--ink); font-family: var(--f-display); font-size: 17px; font-weight: 800; line-height: 1; letter-spacing: .01em;
    text-decoration: none; box-shadow: var(--pop-ink); font-variation-settings: "wdth" 90, "opsz" 24; transition: transform .12s, box-shadow .12s, background .15s;
  }
  .btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink) }
  .btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink) }
  .btn svg { width: 22px; height: 22px; flex: none }
  .btn--pink { background: var(--pink) }
  .btn--lime { background: var(--lime) }
  .btn--lilac { background: var(--lilac) }
  .btn--ghost { background: transparent; box-shadow: none }
  .btn--ghost:hover { background: rgba(27, 7, 16, .06); box-shadow: none; transform: none }

  /* chips with a figure on top */
  .chips { display: flex; flex-wrap: wrap; gap: 10px }
  .chip { display: inline-flex; flex-direction: column; gap: 2px; padding: 9px 14px 8px; border: var(--edge); border-radius: var(--r-sm); background: var(--cream-2); line-height: 1.2 }
  .chip b { font-family: var(--f-mono); font-size: 17px; color: var(--ink) }
  .chip span { font-size: 12.5px; font-weight: 700; color: var(--ink-3) }
  .chip:nth-child(4n+1) { background: var(--aqua-2) }
  .chip:nth-child(4n+2) { background: var(--pink-2) }
  .chip:nth-child(4n+3) { background: var(--lilac-2) }
  .chip:nth-child(4n) { background: var(--lime) }

  /* volatility meter: four steps, Low → Very high */
  .vol { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap }
  .vol i { display: inline-flex; gap: 3px }
  .vol i::before, .vol i::after { content: none }
  .vol s { display: block; width: 12px; height: 14px; border: 1.5px solid var(--ink); border-radius: 3px; background: transparent; text-decoration: none }
  .vol s.on:nth-child(1) { background: var(--aqua) }
  .vol s.on:nth-child(2) { background: var(--lilac) }
  .vol s.on:nth-child(3) { background: var(--pink) }
  .vol s.on:nth-child(4) { background: var(--rasp) }
  .vol em { font-style: normal; font-size: 13.5px; font-weight: 700; color: var(--ink-2) }

  /* breadcrumbs */
  .crumbs { margin: 0 0 14px; font-family: var(--f-mono); font-size: 13px; color: rgba(255, 253, 238, .8) }
  .crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 0 }
  .crumbs li + li::before { content: "/"; margin: 0 10px; color: var(--pink) }
  .crumbs a { color: var(--cream); text-decoration-color: rgba(254, 110, 171, .7) }

  /* tables */
  .table-wrap { margin: 18px 0 24px; overflow-x: auto; border: var(--edge); border-radius: var(--r-md); background: #fff; box-shadow: var(--pop-ink) }
  .table { width: 100%; font-size: 15.5px; line-height: 1.45; color: var(--ink-2) }
  .table caption { caption-side: top; padding: 13px 18px 12px; border-bottom: var(--edge); background: var(--lilac-2); color: var(--ink); text-align: left; font-family: var(--f-display); font-size: 18px; font-weight: 800; font-variation-settings: "wdth" 88, "opsz" 24 }
  .table th, .table td { padding: 11px 16px; text-align: left; vertical-align: top; border-bottom: 1.5px solid var(--cream-3) }
  .table thead th { background: var(--cream-2); color: var(--ink); font-family: var(--f-mono); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; border-bottom: var(--edge) }
  .table tbody th { color: var(--ink); font-weight: 750 }
  .table tbody tr:last-child > * { border-bottom: 0 }
  .table tfoot th, .table tfoot td { border-top: var(--edge); background: var(--aqua-2); color: var(--ink); font-weight: 800 }
  .table .num { font-family: var(--f-mono); font-size: 14.5px; white-space: nowrap }
  .table small { display: block; font-size: 13px; color: var(--ink-3) }

  /* answer: the one-paragraph reply, a speech bubble */
  .answer { position: relative; margin: 6px 0 30px; padding: 22px 24px 20px; border: var(--edge); border-radius: var(--r-md) var(--r-md) var(--r-md) 4px; background: var(--aqua-2); box-shadow: var(--pop-ink) }
  .answer h2 { margin: 0 0 8px; font-size: 25px; font-variation-settings: "wdth" 88, "opsz" 32 }
  .answer p { margin: 0; font-size: 17px; color: var(--ink-2) }

  /* figures: photo-corner frame with a mono caption */
  .shot { margin: 24px 0 28px }
  .shot-pic { overflow: hidden; border: var(--edge); border-radius: var(--r-md); background: var(--ink); box-shadow: var(--pop-ink) }
  .shot-pic img, .shot-pic video, .shot-pic svg { width: 100%; height: auto }
  .shot figcaption { display: flex; gap: 10px; margin: 10px 4px 0; font-size: 14px; line-height: 1.5; color: var(--ink-3) }
  .shot figcaption::before { content: ""; flex: none; width: 14px; height: 14px; margin-top: 4px; border: 1.5px solid var(--ink); border-radius: 4px; background: var(--pink) }

  /* FAQ */
  .faq { display: grid; gap: 10px; margin: 16px 0 6px }
  .faq details { border: var(--edge); border-radius: var(--r-md); background: #fff; transition: box-shadow .15s }
  .faq details[open] { box-shadow: var(--pop-ink); background: var(--cream) }
  .faq summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 15px 18px; list-style: none; cursor: pointer; color: var(--ink); font-weight: 750; font-size: 17px; line-height: 1.4 }
  .faq summary::-webkit-details-marker { display: none }
  .faq summary::after { content: "+"; flex: none; display: grid; place-items: center; width: 30px; height: 30px; border: var(--edge); border-radius: 50%; background: var(--lime); font-family: var(--f-mono); font-weight: 700; transition: transform .2s }
  .faq details[open] summary::after { content: "−"; background: var(--pink) }
  .faq .faq-a { padding: 0 18px 16px; font-size: 16.5px; color: var(--ink-2) }

  /* plain-English glossary */
  .terms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 18px 0 8px }
  .terms div { padding: 15px 17px 14px; border: var(--edge); border-radius: var(--r-md); background: #fff }
  .terms dt { margin: 0 0 4px; color: var(--ink); font-family: var(--f-display); font-size: 19px; font-weight: 800; font-variation-settings: "wdth" 88, "opsz" 24 }
  .terms dd { margin: 0; font-size: 15.5px; line-height: 1.55 }
}

@layer pages {
  /* ---------- home: the board ---------- */
  .board { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr); gap: 34px; align-items: center }
  .board h1 { margin: 0 0 .3em }
  .board .lead { margin: 0 0 22px }
  .wall { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px }
  .wall a { position: relative; display: block; aspect-ratio: 1; overflow: hidden; border: var(--edge); border-radius: var(--r-md); background: var(--ink); box-shadow: var(--pop-ink); transition: transform .15s, box-shadow .15s }
  .wall img { width: 100%; height: 100%; object-fit: cover }
  .wall a:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink) }
  .wall span { position: absolute; inset: auto 6px 6px; padding: 3px 7px; border-radius: 7px; background: var(--cream); color: var(--ink); font-family: var(--f-mono); font-size: 10.5px; font-weight: 700; line-height: 1.3; opacity: 0; transform: translateY(4px); transition: opacity .15s, transform .15s }
  .wall a:hover span, .wall a:focus-visible span { opacity: 1; transform: none }

  /* ---------- home: the slot index ---------- */
  .dex-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 16px 0 14px }
  .dex-tools > span { margin-right: 4px; font-family: var(--f-mono); font-size: 12.5px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em }
  .dex-tools button { padding: 7px 13px; border: var(--edge); border-radius: 999px; background: #fff; color: var(--ink); font-size: 14px; font-weight: 750; line-height: 1.2; transition: background .15s, box-shadow .15s }
  .dex-tools button:hover { background: var(--lilac-2) }
  .dex-tools button[aria-pressed="true"] { background: var(--ink); color: var(--cream); box-shadow: 3px 3px 0 var(--pink) }
  .dex-tools button[aria-pressed="true"]::after { content: " ↓"; font-family: var(--f-mono) }
  .dex { border: var(--edge); border-radius: var(--r-md); background: #fff; overflow: hidden; box-shadow: var(--pop-ink) }
  .dex-head, .dex-row { display: grid; grid-template-columns: 76px minmax(0, 1fr) 92px 104px 150px 86px 30px; align-items: center; gap: 16px; padding: 12px 18px }
  .dex-head { padding-top: 10px; padding-bottom: 10px; border-bottom: var(--edge); background: var(--cream-2); font-family: var(--f-mono); font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3) }
  .dex-head span:first-child { grid-column: 1 / 3 }
  .dex-row { position: relative; border-bottom: 1.5px solid var(--cream-3); transition: background .15s }
  .dex-row:last-child { border-bottom: 0 }
  .dex-row:hover { background: #fff4f9 }
  .dex-pic { width: 76px; height: 76px; border: var(--edge); border-radius: 14px; object-fit: cover; background: var(--ink) }
  .dex-name { min-width: 0 }
  .dex-name a { display: block; color: var(--ink); font-family: var(--f-display); font-size: 21px; font-weight: 800; line-height: 1.08; text-decoration: none; font-variation-settings: "wdth" 82, "opsz" 32 }
  .dex-name a::after { content: ""; position: absolute; inset: 0 }
  .dex-name small { display: block; margin-top: 4px; font-size: 14px; line-height: 1.4; color: var(--ink-3) }
  .dex-cell { font-family: var(--f-mono); font-size: 15px; font-weight: 700; color: var(--ink); white-space: nowrap }
  .dex-cell small { display: none }
  .dex-cell .na { font-family: var(--f-text); font-size: 13px; font-weight: 600; color: var(--ink-3) }
  .dex-go { display: grid; place-items: center; width: 30px; height: 30px; border: var(--edge); border-radius: 50%; background: var(--lime); transition: background .15s, transform .15s }
  .dex-go svg { width: 15px; height: 15px; fill: none; stroke: var(--ink); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round }
  .dex-row:hover .dex-go { background: var(--pink); transform: translateX(2px) }

  /* ---------- home: catalogue charts ---------- */
  .bars { display: grid; gap: 8px; margin: 18px 0 8px }
  .bar { display: grid; grid-template-columns: 150px minmax(0, 1fr) 54px; align-items: center; gap: 14px; font-size: 14.5px }
  .bar b { color: var(--ink); font-weight: 750 }
  .bar span { display: block; height: 22px; border: var(--edge); border-radius: 7px; background: var(--cream-2); overflow: hidden }
  .bar span i { display: block; height: 100%; background: var(--pink); border-right: 2px solid var(--ink) }
  .bar:nth-child(4n+2) span i { background: var(--lilac) }
  .bar:nth-child(4n+3) span i { background: var(--aqua) }
  .bar:nth-child(4n) span i { background: var(--lime) }
  .bar em { font-family: var(--f-mono); font-style: normal; font-weight: 700; color: var(--ink); text-align: right }
  .split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin: 8px 0 0 }
  .panel { padding: 18px 20px 14px; border: var(--edge); border-radius: var(--r-md); background: #fff }
  .panel h3 { margin: 0 0 6px; font-size: 21px }
  .panel p { font-size: 15px }

  /* ---------- home: demo guide steps ---------- */
  .steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 20px 0 26px; counter-reset: step }
  .steps li { position: relative; padding: 46px 16px 16px; border: var(--edge); border-radius: var(--r-md); background: #fff; font-size: 15px; line-height: 1.5; counter-increment: step }
  .steps li::before { content: counter(step); position: absolute; top: 12px; left: 14px; display: grid; place-items: center; width: 26px; height: 26px; border: var(--edge); border-radius: 8px; background: var(--lime); color: var(--ink); font-family: var(--f-mono); font-size: 13px; font-weight: 700 }
  .steps li:nth-child(2)::before { background: var(--aqua) }
  .steps li:nth-child(3)::before { background: var(--pink) }
  .steps li:nth-child(4)::before { background: var(--lilac) }
  .steps b { display: block; margin-bottom: 4px; color: var(--ink); font-family: var(--f-display); font-size: 18px; line-height: 1.15; font-variation-settings: "wdth" 88, "opsz" 24 }

  /* ---------- home: studio dossier ---------- */
  .dossier { display: grid; grid-template-columns: 210px minmax(0, 1fr); margin: 18px 0 20px; border: var(--edge); border-radius: var(--r-md); background: #fff; overflow: hidden }
  .dossier dt, .dossier dd { padding: 12px 16px; border-bottom: 1.5px solid var(--cream-3) }
  .dossier dt { background: var(--cream-2); color: var(--ink); font-family: var(--f-mono); font-size: 12.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase }
  .dossier dd { font-size: 15.5px; line-height: 1.5 }
  .dossier dd small { display: block; margin-top: 3px; font-size: 12.5px; color: var(--ink-3) }
  .dossier dt:last-of-type, .dossier dd:last-of-type { border-bottom: 0 }

  /* ---------- review: title board, reading grid, fact file ---------- */
  .title-board { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 30px; align-items: center }
  .title-board h1 { margin: 0 0 .28em; font-size: clamp(38px, 4.6vw, 62px) }
  .title-board .lead { margin: 0 0 18px; font-size: 18.5px }
  .title-art { overflow: hidden; border: var(--edge); border-radius: var(--r-md); background: var(--ink); box-shadow: var(--pop-ink) }
  .title-art img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover }
  .meta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 16px 0 0; font-family: var(--f-mono); font-size: 12.5px; color: var(--ink-3) }
  .meta b { color: var(--ink) }
  .read { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 26px; align-items: start; margin: 26px 0 0 }
  .read-main { min-width: 0 }
  .read-main > h2 { margin-top: 1.5em }
  .read-main > h2:first-child { margin-top: 0 }
  .read-main ul, .read-main ol { padding-left: 1.2em; margin: .6em 0 1em }
  .read-main li { margin: .3em 0 }
  .read-main li::marker { color: var(--rasp) }
  .read-side { position: sticky; top: 22px; display: grid; gap: 16px }
  .factfile { padding: 20px 20px 16px; border: var(--edge); border-radius: var(--r-md); background: var(--cream); color: var(--ink-2); box-shadow: var(--pop) }
  .factfile-head { display: flex; align-items: center; gap: 12px; margin: 0 0 12px }
  .factfile-head img { width: 54px; height: 54px; border: var(--edge); border-radius: 12px; object-fit: cover }
  .factfile-head b { display: block; color: var(--ink); font-family: var(--f-display); font-size: 18px; line-height: 1.1; font-variation-settings: "wdth" 85, "opsz" 24 }
  .factfile-head span { font-family: var(--f-mono); font-size: 11.5px; color: var(--ink-3) }
  .factfile dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0; border-top: var(--edge) }
  .factfile dt, .factfile dd { padding: 8px 0; border-bottom: 1.5px dashed var(--cream-3); font-size: 13.5px; line-height: 1.35 }
  .factfile dt { padding-right: 12px; font-family: var(--f-mono); font-size: 11.5px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .03em }
  .factfile dd { color: var(--ink); font-weight: 650; text-align: right }
  .factfile-src { margin: 12px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--ink-3) }
  .toc { padding: 16px 18px; border: 2px dashed rgba(255, 253, 238, .4); border-radius: var(--r-md); color: var(--cream) }
  .toc b { display: block; margin: 0 0 6px; font-family: var(--f-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--pink-2) }
  .toc ol { counter-reset: toc; display: grid; gap: 4px }
  .toc li { counter-increment: toc; font-size: 14.5px; line-height: 1.35 }
  .toc li::before { content: counter(toc, decimal-leading-zero) " "; font-family: var(--f-mono); font-size: 11.5px; color: var(--aqua) }
  .toc a { color: var(--cream); text-decoration: none }
  .toc a:hover { text-decoration: underline; text-decoration-color: var(--pink) }

  /* our session: tiles and the balance chart */
  .tally { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 16px 0 20px }
  .tally li { padding: 14px 14px 12px; border: var(--edge); border-radius: var(--r-md); background: #fff }
  .tally b { display: block; color: var(--ink); font-family: var(--f-mono); font-size: 22px; line-height: 1.15 }
  .tally span { display: block; margin-top: 4px; font-size: 13px; line-height: 1.35; color: var(--ink-3) }
  .tally li:nth-child(1) { background: var(--aqua-2) }
  .tally li:nth-child(2) { background: var(--lilac-2) }
  .tally li:nth-child(3) { background: var(--pink-2) }
  .tally li:nth-child(4) { background: var(--lime) }
  .shot--chart .shot-pic { background: #fff }

  /* related slots */
  .next { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 16px 0 26px }
  .next a { display: flex; align-items: center; gap: 12px; padding: 10px; border: var(--edge); border-radius: var(--r-md); background: #fff; color: var(--ink); font-weight: 750; font-size: 15px; line-height: 1.25; text-decoration: none; transition: background .15s, box-shadow .15s }
  .next a:hover { background: var(--lilac-2); box-shadow: var(--pop-ink) }
  .next img { flex: none; width: 52px; height: 52px; border: var(--edge); border-radius: 11px; object-fit: cover }

  /* about page */
  .about-head h1 { margin: 0 0 .3em }
  .note { margin: 20px 0; padding: 16px 18px; border: 2px dashed var(--ink); border-radius: var(--r-md); background: var(--cream-2); font-size: 15.5px }
}

/* ---------- tablet: a narrower rail; the fact file joins the column ---------- */
@media (max-width: 1180px) {
  :root { --rail: 212px; --gap: 22px }
  .rail { padding: 22px 14px 16px }
  .rail-brand img { width: 176px; height: 38px }
  .nav a { font-size: 16.5px; padding: 10px 12px }
  .read { grid-template-columns: minmax(0, 1fr) }
  .read-side { position: static; grid-row: 1; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) }
  .title-board { grid-template-columns: minmax(0, 1fr) 300px }
  .dex-head, .dex-row { grid-template-columns: 64px minmax(0, 1fr) 84px 96px 132px 30px }
  .dex-head span:nth-child(5), .dex-row > .dex-cell--buy { display: none }
  .dex-pic { width: 64px; height: 64px }
}
@media (max-width: 960px) {
  .board { grid-template-columns: minmax(0, 1fr) }
  .wall { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)) }
  .colophon-tiles { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) }
  .colophon-tiles .tile:first-child { grid-column: 1 / -1 }
  .title-board { grid-template-columns: minmax(0, 1fr) }
  .title-art { order: -1 }
}

/* ---------- phones: top bar with the logo, bottom tab bar, one column ---------- */
@media (max-width: 760px) {
  :root { --r: 22px; --gap: 14px }
  html { scroll-padding-top: 72px }
  body { font-size: 17px; background-attachment: scroll }
  .rail { position: static; inset: auto; width: auto; padding: 0; border: 0; background: none; display: contents }
  .rail-brand, .rail-note, .rail-top { display: none }
  .topbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 2px solid var(--ink); background: rgba(61, 0, 23, .94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px) }
  .topbar img { width: 174px; height: 38px }
  .topbar b { display: inline-grid; place-items: center; height: 30px; padding: 0 10px; border: var(--edge); border-radius: 999px; background: var(--pink); color: var(--ink); font-family: var(--f-mono); font-size: 12px }
  .rail-meter { position: fixed; top: auto; bottom: calc(66px + env(safe-area-inset-bottom, 0px)); left: 0; right: 0; width: auto; height: 3px; z-index: 46 }
  .rail-meter i { transform-origin: left; transform: scaleX(var(--read, 0)) }
  .nav {
    position: fixed; inset: auto 0 0 0; z-index: 45; flex-direction: row; gap: 0; padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
    border-top: 2px solid var(--ink); background: var(--cream);
  }
  .nav a { flex: 1 1 0; flex-direction: column; gap: 3px; min-width: 0; padding: 7px 2px 6px; border-radius: 14px; color: var(--ink-2); font-family: var(--f-text); font-size: 11px; font-weight: 750; text-align: center }
  .nav a span { display: block; width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
  .nav svg { width: 23px; height: 23px }
  .nav a[data-wide] { display: none }
  .nav a:hover { background: var(--cream-2); border-color: transparent }
  .nav a[aria-current] { background: var(--pink); color: var(--ink); border-color: var(--ink); box-shadow: none }
  .app { margin-left: 0; padding: 14px var(--gap) calc(92px + env(safe-area-inset-bottom, 0px)) }
  .sheet { padding: 22px 18px; box-shadow: 4px 4px 0 var(--wine-3) }
  h1 { font-size: clamp(36px, 11vw, 48px) }
  h2 { font-size: 29px }
  .lead { font-size: 18px }
  .wall { grid-template-columns: repeat(4, minmax(0, 1fr)) }
  .wall span { display: none }
  .dex-head { display: none }
  .dex-row { grid-template-columns: 62px minmax(0, 1fr) 26px; grid-template-areas: "pic name go" "stats stats stats"; gap: 10px 12px; padding: 14px }
  .dex-row > .dex-pic { grid-area: pic; width: 62px; height: 62px }
  .dex-row > .dex-name { grid-area: name }
  .dex-row > .dex-go { grid-area: go; width: 26px; height: 26px }
  .dex-row > .dex-cell { display: none }
  .dex-mini { grid-area: stats; display: flex; flex-wrap: wrap; gap: 6px }
  .dex-name a { font-size: 19px }
  .bar { grid-template-columns: 104px minmax(0, 1fr) 44px; gap: 10px; font-size: 13.5px }
  .split, .terms, .steps, .next, .colophon-tiles { grid-template-columns: minmax(0, 1fr) }
  .colophon-tiles .tile:first-child { grid-column: auto }
  .dossier { grid-template-columns: minmax(0, 1fr) }
  .dossier dt { border-bottom: 0; padding-bottom: 2px }
  .dossier dd { padding-top: 2px }
  .read-side { grid-template-columns: minmax(0, 1fr) }
  .toc { display: none }
  .tally { grid-template-columns: repeat(2, minmax(0, 1fr)) }
  .table { font-size: 14.5px }
  .table th, .table td { padding: 9px 12px }
  .colophon { margin-top: 44px }
}
@media (min-width: 761px) {
  .dex-mini { display: none }
}
.dex-mini span { display: inline-flex; align-items: baseline; gap: 5px; padding: 4px 9px; border: 1.5px solid var(--ink); border-radius: 8px; background: var(--cream-2); font-family: var(--f-mono); font-size: 12.5px; font-weight: 700; color: var(--ink) }
.dex-mini span small { font-family: var(--f-text); font-size: 11px; font-weight: 700; color: var(--ink-3) }

@layer demo {
  /* the demo window: screen + side column with the partner offer; dims and a right-hand drawer for the reminder */
  .demo { margin: 22px 0 0 }
  .demo-grid { display: grid; grid-template-columns: minmax(0, 1fr) 254px; grid-template-areas: "screen offer" "bar offer"; gap: 14px 16px; padding: 16px; border: var(--edge); border-radius: var(--r); background: var(--ink); box-shadow: var(--pop) }
  .demo-screen { grid-area: screen; position: relative; aspect-ratio: 16 / 9; overflow: hidden; border: 2px solid var(--cream); border-radius: var(--r-md); background: #000; isolation: isolate }
  .demo-screen:fullscreen { aspect-ratio: auto; border: 0; border-radius: 0 }
  .demo-screen picture, .demo-poster { position: absolute; inset: 0; width: 100%; height: 100% }
  .demo-poster { object-fit: cover }
  .demo-screen::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(27, 7, 16, .05), rgba(27, 7, 16, .55)); pointer-events: none }
  .demo-start { position: absolute; left: 50%; top: 50%; z-index: 3; display: flex; align-items: center; gap: 14px; padding: 10px 22px 10px 10px; border: var(--edge); border-radius: 999px; background: var(--cream); color: var(--ink); box-shadow: 5px 5px 0 var(--ink); transform: translate(-50%, -50%); transition: transform .15s, box-shadow .15s }
  .demo-start:hover { transform: translate(-50%, -50%) rotate(-2deg) scale(1.03); box-shadow: 7px 7px 0 var(--ink) }
  .demo-start-disc { display: grid; place-items: center; width: 64px; height: 64px; border: var(--edge); border-radius: 50%; background: var(--pink) }
  .demo-start-disc svg { width: 28px; height: 28px; margin-left: 4px; fill: var(--ink) }
  .demo-start-text { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left }
  .demo-start-text b { font-family: var(--f-display); font-size: 22px; line-height: 1.05; font-variation-settings: "wdth" 82, "opsz" 32 }
  .demo-start-text small { font-family: var(--f-mono); font-size: 11.5px; color: var(--ink-3) }
  .demo-frame { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; border: 0; background: #000 }
  .demo.is-live .demo-screen picture, .demo.is-live .demo-start, .demo.is-live .demo-screen::before { display: none }
  .demo-screen.is-dim::after { content: ""; position: absolute; inset: 0; z-index: 4; background: rgba(35, 0, 15, .62) }

  /* gift sticker in the corner of the screen; the card slides out on hover */
  .demo-gift { position: absolute; top: 14px; right: 14px; z-index: 5; display: flex; flex-direction: row-reverse; align-items: center; gap: 10px; color: var(--ink); text-decoration: none }
  .demo-gift:popover-open { inset: 14px 14px auto auto; margin: 0; padding: 0; border: 0; background: none; overflow: visible }
  .demo-gift-face { display: grid; place-items: center; width: 74px; height: 74px; border: var(--edge); border-radius: 22px; background: var(--cream); box-shadow: 4px 4px 0 var(--ink); animation: gift-wiggle 6s ease-in-out infinite }
  .demo-gift-face svg { width: 52px; height: 52px }
  .demo-gift-card { display: flex; flex-direction: column; max-width: 210px; padding: 9px 13px; border: var(--edge); border-radius: 14px; background: var(--lime); box-shadow: 4px 4px 0 var(--ink); opacity: 0; transform: translateX(12px); pointer-events: none; transition: opacity .18s, transform .18s }
  .demo-gift-card b { font-family: var(--f-mono); font-size: 11px; letter-spacing: .05em; text-transform: uppercase }
  .demo-gift-card span { font-family: var(--f-display); font-size: 16px; font-weight: 800; line-height: 1.15; font-variation-settings: "wdth" 85, "opsz" 24 }
  .demo-gift:hover .demo-gift-card, .demo-gift:focus-visible .demo-gift-card { opacity: 1; transform: none }
  .demo-gift:hover .demo-gift-face { animation: none; transform: rotate(-8deg) scale(1.05) }
  .demo-full-mini { display: none }

  /* reminder drawer: slides in from the right edge of the screen, the gift lands in its corner */
  .demo-drawer { position: absolute; inset: 0; z-index: 6; pointer-events: none }
  .demo-drawer[hidden] { display: none }
  .demo-panel { position: absolute; top: 0; right: 0; bottom: 0; display: flex; flex-direction: column; justify-content: center; gap: 10px; width: min(430px, 88%); padding: 26px 26px 22px; border-left: var(--edge); background: var(--cream); color: var(--ink-2); outline: none; pointer-events: auto; transform: translateX(104%); transition: transform .45s cubic-bezier(.2, .9, .25, 1.05) }
  .demo-drawer.is-open .demo-panel { transform: none }
  .demo-flyer { position: absolute; top: 22px; right: 24px; z-index: 2; display: grid; place-items: center; width: 70px; height: 70px; border: var(--edge); border-radius: 20px; background: var(--lime); box-shadow: 4px 4px 0 var(--ink); transition: transform .85s cubic-bezier(.34, 1.3, .5, 1) }
  .demo-flyer svg { width: 50px; height: 50px }
  .demo-drawer.is-landed .demo-flyer { animation: gift-wiggle 2.4s ease-in-out 1 }
  .demo-tag { align-self: flex-start; padding: 4px 10px; border: 1.5px solid var(--ink); border-radius: 999px; background: var(--lilac-2); font-family: var(--f-mono); font-size: 11px; font-weight: 700; color: var(--ink) }
  .demo-panel-title { margin: 4px 0 0; color: var(--ink); font-family: var(--f-display); font-size: 30px; font-weight: 800; line-height: 1.02; font-variation-settings: "wdth" 78, "opsz" 48 }
  .demo-panel-text { font-size: 15.5px; line-height: 1.5 }
  .demo-panel-bonus { padding: 10px 14px; border: 2px dashed var(--ink); border-radius: 14px; background: var(--pink-2); color: var(--ink); font-family: var(--f-display); font-size: 21px; font-weight: 800; line-height: 1.2; font-variation-settings: "wdth" 85, "opsz" 32 }
  .demo-panel-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px }
  .demo-panel-actions .btn { flex: 1 1 170px }
  .demo-small { font-family: var(--f-mono); font-size: 11px; line-height: 1.5; color: var(--ink-3) }

  /* bar under the screen */
  .demo-bar { grid-area: bar; display: flex; align-items: center; justify-content: space-between; gap: 14px; color: var(--cream) }
  .demo-bar-name { display: flex; flex-direction: column; gap: 1px; min-width: 0 }
  .demo-bar-name b { font-family: var(--f-display); font-size: 20px; line-height: 1.1; font-variation-settings: "wdth" 85, "opsz" 24 }
  .demo-bar-name span { font-family: var(--f-mono); font-size: 11.5px; color: rgba(255, 253, 238, .7) }
  .demo-full { min-height: 42px; padding: 8px 16px; font-size: 15px; background: var(--aqua) }
  .demo-full:disabled { opacity: .45; cursor: default; transform: none; box-shadow: var(--pop-ink) }

  /* offer column */
  .demo-offer { grid-area: offer; display: flex; flex-direction: column; gap: 12px; padding: 16px; border: 2px solid var(--cream); border-radius: var(--r-md); background: var(--cream); color: var(--ink-2) }
  .demo-geo { display: flex; align-items: center; gap: 8px; font-family: var(--f-mono); font-size: 12px; font-weight: 700; color: var(--ink) }
  .demo-geo img { width: 24px; height: 16px; border: 1.5px solid var(--ink); border-radius: 3px; object-fit: cover }
  .demo-brand { display: grid; place-items: center; width: 86px; height: 86px; border: var(--edge); border-radius: 20px; background: #fff; box-shadow: 4px 4px 0 var(--pink); overflow: hidden }
  .demo-brand img { width: 100%; height: 100%; object-fit: cover }
  .demo-brand svg { width: 60px; height: 60px }
  .demo-casino { font-size: 15px; line-height: 1.35 }
  .demo-casino b { color: var(--ink) }
  .demo-bonus { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 2px dashed var(--ink); border-radius: 14px; background: var(--aqua-2) }
  .demo-bonus span { font-family: var(--f-mono); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3) }
  .demo-bonus b { color: var(--ink); font-family: var(--f-display); font-size: 19px; line-height: 1.2; font-variation-settings: "wdth" 85, "opsz" 24 }
  .demo-real, .demo-take { width: 100% }
  .demo-take svg { width: 28px; height: 28px; margin: -6px 0 -6px -6px }
  .demo-offer .demo-small { margin-top: auto }

  @keyframes gift-wiggle { 0%, 84%, 100% { transform: none } 88% { transform: rotate(-9deg) scale(1.06) } 92% { transform: rotate(6deg) } 96% { transform: rotate(-3deg) } }

  @media (max-width: 960px) {
    .demo-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "screen" "bar" "offer" }
    .demo-offer { display: grid; grid-template-columns: 86px minmax(0, 1fr); grid-template-areas: "geo geo" "brand casino" "brand bonus" "real real" "take take" "small small"; gap: 10px 14px; align-items: center }
    .demo-geo { grid-area: geo }
    .demo-brand { grid-area: brand }
    .demo-casino { grid-area: casino }
    .demo-bonus { grid-area: bonus }
    .demo-real { grid-area: real }
    .demo-take { grid-area: take }
    .demo-offer .demo-small { grid-area: small }
  }
  @media (max-width: 760px) {
    .demo-grid { padding: 10px; gap: 10px; box-shadow: 4px 4px 0 var(--wine-3) }
    .demo-screen { aspect-ratio: 3 / 4 }
    .demo.is-live .demo-screen { aspect-ratio: 9 / 16 }
    .demo-screen:fullscreen { aspect-ratio: auto }
    .demo-start { padding: 8px 18px 8px 8px; gap: 10px }
    .demo-start-disc { width: 54px; height: 54px }
    .demo-start-text b { font-size: 19px }
    .demo-gift { top: 10px; right: 10px }
    .demo-gift-face { width: 58px; height: 58px; border-radius: 18px }
    .demo-gift-face svg { width: 40px; height: 40px }
    .demo-gift-card { display: none }
    .demo-gift:popover-open { inset: 10px 10px auto auto }
    .demo.is-live .demo-full-mini { position: absolute; top: 10px; left: 10px; z-index: 5; display: grid; place-items: center; width: 44px; height: 44px; border: var(--edge); border-radius: 14px; background: var(--cream); color: var(--ink) }
    .demo-full-mini svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round }
    .demo-screen:fullscreen .demo-full-mini { display: none }
    .demo-bar .demo-full { display: none }
    .demo-panel { width: 100%; padding: 70px 18px 18px; justify-content: flex-end; border-left: 0 }
    .demo-panel-title { font-size: 26px }
    .demo-panel-actions .btn { flex: 1 1 100% }
    .demo-offer { grid-template-columns: 72px minmax(0, 1fr) }
    .demo-brand { width: 72px; height: 72px; border-radius: 16px }
  }
}

@layer motion {
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important }
  }
}
