/* RTP Guide. A dark game lobby: one grotesk, sentence case, pills for actions,
   38 for the phone, 18 for panels, 10 for inputs. Dark only, by design. */
:root {
  --paper: #141416; --soft: #1e1e22; --ink: #f3f1ec; --muted: #a7a39b; --line: #2e2e35;
  --accent: #f5b942; --accent-soft: rgba(245,185,66,.14);
  --buy: #5cb8ff; --buy-soft: rgba(92,184,255,.16);
  --third: #ff7a9a; --third-soft: rgba(255,122,154,.16);
  --app: #0c0c0e; --app-2: #222227; --ink-on-accent: #1d1404;
  --body: "Familjen Grotesk", "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--paper); color: var(--ink); font: 17px/1.55 var(--body); font-variant-numeric: tabular-nums; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { margin: 0; text-wrap: balance; letter-spacing: -.025em; font-weight: 700; }
h1 { font-size: clamp(34px, 5vw, 60px); line-height: 1.04; }
h2 { font-size: clamp(24px, 3vw, 34px); line-height: 1.1; }
h3, h2.h3 { font-size: 20px; line-height: 1.2; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.lede { color: var(--muted); max-width: 70ch; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--ink-on-accent); padding: 8px 14px; border-radius: 999px; z-index: 50; }
.skip:focus { left: 16px; }

/* header */
header.top { background: rgba(20,20,22,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.top-in { max-width: 1200px; margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; gap: 24px; }
.logo { font-weight: 700; font-size: 22px; letter-spacing: -.03em; color: var(--ink); display: flex; align-items: center; gap: 9px; white-space: nowrap; }
.logo:hover { text-decoration: none; }
.logo i { width: 22px; height: 22px; border-radius: 7px; background: var(--accent); display: inline-grid; place-items: center; }
.logo i::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--paper); }
nav.main { display: flex; gap: 2px; flex-wrap: wrap; flex: 1; }
nav.main a { color: var(--ink); font-size: 16px; padding: 7px 12px; border-radius: 999px; }
nav.main a:hover { background: var(--soft); text-decoration: none; }
nav.main a.on { background: var(--accent-soft); color: var(--accent); }
.navtoggle { display: none; background: var(--soft); color: var(--ink); padding: 8px 14px; }
.search { position: relative; }
.search input { width: 220px; }
.sugg { position: absolute; top: 46px; right: 0; width: 340px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 40px rgba(0,0,0,.4); display: none; z-index: 20; overflow: hidden; }
.sugg a { display: flex; justify-content: space-between; gap: 10px; padding: 10px 14px; color: var(--ink); }
.sugg a:hover, .sugg a.sel { background: var(--line); text-decoration: none; }
@media (max-width: 1020px) {
  .top-in { flex-wrap: wrap; gap: 12px; }
  .navtoggle { display: inline-block; margin-left: auto; }
  nav.main { display: none; order: 4; flex-basis: 100%; }
  nav.main.open { display: flex; }
  .search { order: 3; flex-basis: 100%; }
  .search input { width: 100%; }
  .sugg { width: 100%; }
}

/* controls */
input, select, button, textarea { font: inherit; color: var(--ink); }
input[type=text], input[type=number], input[type=email], input[type=search], select { background: var(--paper); border: 1.5px solid var(--line); border-radius: 10px; padding: 9px 12px; font-size: 16px; }
input:focus, select:focus { border-color: var(--accent); outline: none; }
button, .btn { background: var(--accent); color: var(--ink-on-accent); border: 0; border-radius: 999px; padding: 11px 20px; font-weight: 600; font-size: 16px; cursor: pointer; display: inline-block; }
.btn.ghost, button.ghost { background: var(--soft); color: var(--ink); }
button:hover, .btn:hover { filter: brightness(1.06); text-decoration: none; }
button:disabled { opacity: .5; cursor: default; }

main { max-width: 1200px; margin: 0 auto; padding: 32px 24px 80px; display: grid; gap: 52px; }
main > * { min-width: 0; }
.crumbs { font-size: 14px; color: var(--muted); }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line); }
.panel { background: var(--soft); border-radius: 18px; padding: 22px; }
.grid { display: grid; gap: 28px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); }
.stack { display: grid; gap: 14px; align-content: start; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.sechead { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.sechead a { font-size: 16px; font-weight: 600; }
.intro { display: grid; gap: 12px; }

/* key figures */
.g4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); gap: 12px; }
.tile { background: var(--soft); border-radius: 18px; padding: 16px 18px; }
.tile .k { font-size: 14px; color: var(--muted); }
.tile .v { font-size: 30px; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; margin-top: 4px; overflow-wrap: anywhere; }
.tile .s { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* hero: the product in a phone */
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 48px; align-items: center; padding-top: 8px; }
.hero h1 { max-width: 13ch; }
.hero p { font-size: 19px; color: var(--muted); max-width: 46ch; margin: 18px 0 26px; }
.hero form { display: flex; gap: 8px; max-width: 460px; }
.hero form input { flex: 1; min-width: 0; border-radius: 999px; padding: 12px 18px; }
.hero .facts { margin-top: 22px; font-size: 15px; color: var(--muted); max-width: 52ch; }
.hero .facts b { color: var(--ink); font-weight: 600; }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; } }
.phone { justify-self: center; width: min(360px, 100%); background: #08080a; border: 1px solid #34343c; border-radius: 38px; padding: 12px; box-shadow: 0 40px 90px rgba(245,185,66,.10), 0 30px 60px rgba(0,0,0,.5); }
.screen { background: var(--app); border-radius: 28px; padding: 22px 18px 18px; display: grid; gap: 14px; }
.screen .status { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.screen .ghead { display: flex; gap: 12px; align-items: center; }
.screen .ghead .cover { width: 48px; height: 64px; border-radius: 10px; }
.screen .gname { font-size: 24px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.screen .gstudio { font-size: 14px; color: var(--muted); }
.screen .odds { background: var(--app-2); border-radius: 18px; padding: 14px 16px; }
.screen .odds .k, .screen .modes .k { font-size: 13px; color: var(--muted); }
.screen .odds .v { font-size: 34px; font-weight: 700; letter-spacing: -.03em; color: #fff; line-height: 1.1; }
.screen .odds .v span { color: var(--accent); }
.screen .modes { display: grid; gap: 8px; }
.screen .mode { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; font-size: 14px; }
.screen .mode b { font-weight: 600; }
.screen .mode .r { color: var(--muted); }
.screen .mode .track { grid-column: 1 / -1; height: 6px; border-radius: 999px; background: var(--app-2); overflow: hidden; }
.screen .mode .track i { display: block; height: 100%; border-radius: 999px; background: var(--accent); width: 0; transition: width .9s cubic-bezier(.2,.8,.2,1); }
.screen .mode.buy .track i { background: var(--buy); }
.screen .appbtn { background: var(--accent); color: var(--ink-on-accent); border-radius: 999px; text-align: center; padding: 12px; font-weight: 600; }
.screen .appbtn:hover { text-decoration: none; filter: brightness(1.06); }
@media (prefers-reduced-motion: reduce) { .screen .mode .track i { transition: none; } .tilegame .cover { transition: none; } }

/* covers: real art (3:4) or the generated math cover */
.cover { display: block; flex: none; width: 46px; height: 61px; border-radius: 10px; object-fit: cover; background: var(--soft); }
svg.cover { height: auto; aspect-ratio: 3 / 4; }

/* game rows */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(480px, 100%), 1fr)); column-gap: 28px; }
.list { display: grid; }
.card { display: grid; grid-template-columns: 46px minmax(0, 1fr) 72px 92px 46px; gap: 12px; align-items: center; padding: 10px 8px; border-bottom: 1px solid var(--line); color: var(--ink); border-radius: 12px; }
.card:hover { background: var(--soft); text-decoration: none; }
.card .t { font-weight: 600; line-height: 1.2; }
.card .p { font-size: 14px; color: var(--muted); }
.card .f { text-align: right; font-size: 15px; }
.card .f i { display: block; font-style: normal; font-size: 12px; color: var(--muted); }
@media (max-width: 600px) { .card { grid-template-columns: 40px minmax(0,1fr) 64px 80px; } .card .vcol { display: none; } .card .cover { width: 40px; height: 53px; } }

/* lobby grid */
.lobby { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px 16px; }
.tilegame { display: grid; gap: 8px; color: var(--ink); align-content: start; }
.tilegame:hover { text-decoration: none; }
.tilegame .cover { width: 100%; height: auto; aspect-ratio: 3 / 4; border-radius: 18px; transition: transform .15s ease; }
.tilegame:hover .cover { transform: translateY(-3px); }
.tilegame .t { font-weight: 600; line-height: 1.2; }
.tilegame .p { font-size: 14px; color: var(--muted); }
.tilegame .badge { font-size: 13px; color: var(--accent); font-weight: 600; }
@media (max-width: 480px) { .lobby { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.gamehead { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.gamehead .cover { width: 120px; height: 160px; border-radius: 22px; }
.gamehead .follow { margin-left: auto; }

/* volatility gauge */
.vol { display: inline-flex; gap: 3px; align-items: flex-end; height: 16px; vertical-align: middle; }
.vol i { width: 6px; border-radius: 3px; background: var(--line); }
.vol i:nth-child(1) { height: 7px; } .vol i:nth-child(2) { height: 11px; } .vol i:nth-child(3) { height: 16px; }
.vol i.on { background: var(--accent); }
.vol.v3 i.on { background: var(--buy); }
.vlabel { font-size: 14px; margin-left: 8px; vertical-align: middle; }

.chip { display: inline-block; font-size: 13px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--paper); color: var(--muted); white-space: nowrap; border: 1px solid var(--line); }
.chip.warn { background: var(--buy-soft); color: var(--buy); border-color: transparent; }
.chip.good { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.chip.info { background: var(--third-soft); color: var(--third); border-color: transparent; }

/* tables */
.tbl { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th { text-align: left; font-size: 13px; font-weight: 600; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--soft); }
th.sort { cursor: pointer; user-select: none; } th.sort:hover { color: var(--accent); }
th[aria-sort=ascending]::after { content: " ▲"; font-size: 10px; } th[aria-sort=descending]::after { content: " ▼"; font-size: 10px; }
td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.n, th.n { text-align: right; white-space: nowrap; }
tbody tr:hover td { background: var(--soft); }
td .row { flex-wrap: nowrap; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: center; flex-wrap: wrap; }

.filters { display: flex; gap: 14px; flex-wrap: wrap; align-items: end; }
.filters label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--muted); }
.filters label input, .filters label select { min-width: 0; max-width: 100%; }
.bar { height: 8px; border-radius: 999px; background: var(--line); min-width: 60px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pills a { background: var(--soft); color: var(--ink); padding: 8px 14px; border-radius: 999px; font-size: 15px; }
.pills a:hover { background: var(--line); text-decoration: none; }

/* newsletter */
.cta { background: linear-gradient(120deg, #26231c, #18181b 60%); border: 1px solid var(--line); border-radius: 28px; padding: 34px; display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.1fr); gap: 28px; align-items: center; }
@media (max-width: 800px) { .cta { grid-template-columns: 1fr; padding: 24px; } }
.cta h3, .cta .h3 { font-size: 28px; letter-spacing: -.02em; }
.cta .small { color: var(--muted); margin-top: 10px; font-size: 15px; }
.nl { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.nl input[type=email] { flex: 1; min-width: 200px; border-radius: 999px; background: var(--app-2); border-color: transparent; padding: 12px 18px; }
.nl label { font-size: 14px; display: flex; gap: 8px; align-items: flex-start; color: var(--muted); width: 100%; order: 3; }
.nl label input { margin-top: 4px; accent-color: var(--accent); }
.nl .hp { position: absolute; left: -5000px; }
.msg { font-size: 14px; color: var(--accent); min-height: 1em; }
.msg.err { color: var(--buy); }

/* prose */
.prose { max-width: 70ch; }
.prose p, .prose li { font-size: 18px; line-height: 1.65; }
.prose p { margin: 0 0 16px; }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 22px; }
.prose h1 { margin-bottom: 18px; }
.prose h2 { margin: 30px 0 12px; }
.prose h3 { margin: 22px 0 8px; }
.prose .tbl, .prose .note, .prose figure { margin: 0 0 18px; }
.prose code { background: var(--soft); padding: 1px 6px; border-radius: 6px; font-size: .92em; }
.toc { font-size: 15px; }
details { border-bottom: 1px solid var(--line); padding: 14px 0; }
details summary { cursor: pointer; font-weight: 600; }
details p { margin-top: 8px; color: var(--muted); }
canvas { width: 100%; display: block; }
.note { background: var(--soft); border-radius: 14px; padding: 14px 18px; font-size: 15px; color: var(--muted); max-width: 100ch; }
.note.warn { border-left: 4px solid var(--buy); }
.note b { color: var(--ink); }

footer { background: var(--soft); }
footer .in { max-width: 1200px; margin: 0 auto; padding: 32px 24px 44px; font-size: 14px; color: var(--muted); display: grid; gap: 18px; }
footer .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 18px; }
footer .cols b { color: var(--ink); display: block; margin-bottom: 6px; }
footer .cols a { color: var(--muted); display: block; padding: 2px 0; }
footer .cols a:hover { color: var(--ink); }
footer .legal { display: grid; gap: 6px; border-top: 1px solid var(--line); padding-top: 18px; }
footer .age { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--muted); font-weight: 700; font-size: 12px; color: var(--ink); margin-right: 8px; vertical-align: middle; }

/* consent banner */
.consent { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 40; max-width: 640px; margin: 0 auto; background: var(--soft); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; box-shadow: 0 18px 40px rgba(0,0,0,.45); display: flex; gap: 16px; align-items: center; flex-wrap: wrap; font-size: 15px; }
.consent[hidden] { display: none; }
.consent p { flex: 1 1 280px; color: var(--muted); }
.consent-btns { display: flex; gap: 8px; }
.consent .btn { padding: 9px 18px; font-size: 15px; }
.linkbtn { background: none; color: var(--muted); padding: 2px 0; display: block; border-radius: 0; font: inherit; font-weight: 400; text-align: left; }
.linkbtn:hover { color: var(--ink); text-decoration: underline; }

/* thumbnails in game tables */
.tgame { display: inline-flex; align-items: center; gap: 10px; }
.tcover { flex: none; width: 32px; height: 43px; border-radius: 6px; object-fit: cover; background: var(--soft); display: block; }

/* tools hub and glossary */
.toolgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 12px; }
.toolcard { display: grid; gap: 6px; color: var(--ink); }
.toolcard:hover { text-decoration: none; border-color: var(--accent); }
.glossary dt { font-weight: 700; font-size: 19px; margin-top: 22px; scroll-margin-top: 90px; }
.glossary dd { margin: 6px 0 0; color: var(--muted); max-width: 72ch; }
tr.hl td { background: var(--accent-soft); }
.linkbtn.inline { display: inline; padding: 0; font-size: inherit; }
