/* TURF. One token sheet, one accent, one radius family. The live map is the picture: panels are dark, flat and few. */
:root {
  --bg: #080b09; --s1: #0d1310; --s2: #131a16; --s3: #1b241e; --s4: #26322a;
  --ink: #eef2e8; --ink2: #aab5a6; --ink3: #6f7b6e;
  --line: rgba(238, 242, 232, .09); --line2: rgba(238, 242, 232, .17);
  --acc: #c8f560; --acc-ink: #111606; --down: #ff6b5e;
  --panel: rgba(11, 16, 13, .88);
  --r1: 8px; --r2: 12px; --r3: 16px;
  --f-d: 'Archivo', 'Arial Narrow', system-ui, sans-serif; --f-t: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif; --f-m: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --pad: 40px;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/1.5 var(--f-t); overflow: hidden; -webkit-font-smoothing: antialiased; overscroll-behavior: none; }
::selection { background: var(--acc); color: var(--acc-ink); }
:where(a) { color: inherit; text-decoration: none; }
:where(button, input) { font: inherit; color: inherit; }
:where(button) { background: none; border: 0; padding: 0; cursor: pointer; }
:where(ol, ul) { list-style: none; margin: 0; padding: 0; }
:where(h1, h2, p) { margin: 0; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
#game { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; touch-action: none; }

.lab { font: 600 11px/1 var(--f-m); letter-spacing: .1em; text-transform: uppercase; color: var(--ink3); white-space: nowrap; }
.lab i { font-style: normal; letter-spacing: .02em; text-transform: none; color: var(--ink3); opacity: .8; margin-left: 6px; font-family: var(--f-t); font-weight: 400; }
.num, .mono { font-family: var(--f-m); font-variant-numeric: tabular-nums; font-feature-settings: 'zero' 0; }
kbd { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 6px; background: rgba(238, 242, 232, .1); border: 1px solid var(--line2); font: 600 11px/1 var(--f-m); color: var(--ink2); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 0 0 rgba(200, 245, 96, .6); animation: pulse 1.8s var(--ease) infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(200, 245, 96, .55); } 100% { box-shadow: 0 0 0 9px rgba(200, 245, 96, 0); } }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r3); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .045), 0 30px 60px -34px #000; }
.card-head { display: flex; justify-content: space-between; align-items: center; height: 38px; padding: 0 14px; border-bottom: 1px solid var(--line); }
.is-hidden { visibility: hidden; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; height: 52px; padding: 0 22px; border-radius: var(--r2); font: 800 16px/1 var(--f-d); font-stretch: 112%; letter-spacing: .05em; text-transform: uppercase; transition: transform .14s var(--ease), background .14s, border-color .14s; }
.btn-primary { background: var(--acc); color: var(--acc-ink); }
.btn-primary:hover { background: #d8ff7a; transform: translateY(-2px); }
.btn-primary:active { transform: translateY(0); }
.btn-primary kbd { background: rgba(17, 22, 6, .14); border-color: rgba(17, 22, 6, .25); color: var(--acc-ink); }
.btn-ghost { border: 1px solid var(--line2); color: var(--ink2); }
.btn-ghost:hover { border-color: var(--ink2); color: var(--ink); }
.field { display: grid; gap: 8px; }
.field input:not([type=range]) { width: 100%; height: 46px; padding: 0 14px; border-radius: var(--r1); background: var(--s2); border: 1px solid var(--line2); color: var(--ink); font-size: 15px; outline: 0; transition: border-color .14s, background .14s; }
.field input.mono { font-size: 13px; }
.field input::placeholder { color: var(--ink3); }
.field input:not([type=range]):focus { border-color: var(--acc); background: var(--s3); }
.field input.is-bad { border-color: var(--down); }
.field input[type=range] { width: 100%; accent-color: var(--acc); }
.hint { font-size: 12.5px; line-height: 1.4; color: var(--ink3); min-height: 18px; }
.hint.is-bad { color: var(--down); }
.acct { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; min-height: 20px; font-size: 13px; color: var(--ink3); }
.acct b { color: var(--ink); font-weight: 600; }
.link { color: var(--acc); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.link:hover { color: #d8ff7a; }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink2); }
.check input { width: 16px; height: 16px; accent-color: var(--acc); }

/* top bar */
.nav { position: fixed; z-index: 30; top: 0; left: 0; right: 0; height: 64px; display: flex; align-items: center; gap: 28px; padding: 0 var(--pad); background: linear-gradient(rgba(8, 11, 9, .9), rgba(8, 11, 9, 0)); pointer-events: none; }
.nav > * { pointer-events: auto; }
.brand { display: flex; flex: none; align-items: center; gap: 10px; font: 900 22px/1 var(--f-d); font-stretch: 125%; letter-spacing: .02em; text-transform: uppercase; }
.mark { width: 30px; height: 30px; border-radius: 8px; }
.nav-links { display: flex; flex: none; gap: 22px; font-size: 14px; color: var(--ink2); white-space: nowrap; }
.nav-links a, .nav-links .link { color: var(--ink2); font-size: 14px; text-decoration: none; transition: color .14s; }
.nav-links a:hover, .nav-links .link:hover { color: var(--ink); }
.nav-side { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.live { display: inline-flex; align-items: center; gap: 9px; height: 34px; padding: 0 14px; border-radius: 99px; background: var(--panel); border: 1px solid var(--line); font-size: 13px; color: var(--ink2); white-space: nowrap; }
.live b { color: var(--ink); font-family: var(--f-m); font-variant-numeric: tabular-nums; min-width: 2ch; text-align: right; }
.chip { display: inline-flex; align-items: center; gap: 9px; height: 34px; padding: 0 14px; border-radius: 99px; background: var(--panel); border: 1px solid var(--line); font: 600 12px/1 var(--f-m); color: var(--ink); }
.chip:hover { border-color: var(--acc); }
body.is-playing .nav-links, body.is-playing .nav-side { display: none; }
body.is-playing .nav { background: none; }

/* title: the live map is the picture, the words sit on its left */
.title { position: fixed; inset: 0; z-index: 10; display: grid; grid-template-rows: minmax(0, 1fr) 76px; pointer-events: none; }
.title::before { content: ''; position: absolute; z-index: 0; inset: 0; background: linear-gradient(90deg, rgba(8, 11, 9, .94) 0, rgba(8, 11, 9, .8) 30%, rgba(8, 11, 9, 0) 60%); }
.title > * { position: relative; z-index: 1; pointer-events: auto; }
.hero { align-self: center; width: min(500px, calc(100vw - 2 * var(--pad))); margin-left: var(--pad); padding-top: 40px; animation: rise .7s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.eyebrow { display: flex; align-items: center; gap: 10px; font: 600 12px/1 var(--f-m); letter-spacing: .14em; text-transform: uppercase; color: var(--acc); margin-bottom: 18px; }
.eyebrow.is-down { color: var(--down); }
.h1 { font: 900 clamp(40px, min(5.4vw, 8.6vh), 82px)/.92 var(--f-d); font-stretch: 125%; letter-spacing: -.02em; text-transform: uppercase; }
.h1 em { font-style: normal; color: transparent; -webkit-text-stroke: 1.5px var(--acc); }
.lead { margin: 20px 0 26px; max-width: 54ch; font-size: 16px; line-height: 1.55; color: var(--ink2); }
.play { display: grid; gap: 14px; padding: 20px; }
.play .btn { width: 100%; }
.board { position: absolute; right: var(--pad); bottom: calc(76px + 28px); width: 320px; animation: rise .7s .12s var(--ease) both; }
.rows { padding: 6px 0; }
.rows li { display: grid; grid-template-columns: 22px 12px minmax(0, 1fr) 48px 62px; align-items: center; gap: 8px; height: 28px; padding: 0 14px; font-size: 13px; }
.rows li.is-me { background: rgba(200, 245, 96, .09); }
.rows li.is-gap { border-top: 1px dashed var(--line); }
.rows .rk { font: 500 11px/1 var(--f-m); color: var(--ink3); text-align: right; }
.rows .sw { width: 12px; height: 12px; border-radius: 4px; }
.rows .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font-weight: 500; }
.rows .pc { font: 500 12px/1 var(--f-m); font-variant-numeric: tabular-nums; text-align: right; color: var(--ink2); }
.rows .cy { font: 500 12px/1 var(--f-m); font-variant-numeric: tabular-nums; text-align: right; color: var(--acc); }
.strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; background: var(--line); border-top: 1px solid var(--line); }
.strip .cell { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; align-items: center; column-gap: 12px; row-gap: 7px; align-content: center; padding: 0 28px; background: rgba(8, 11, 9, .93); min-width: 0; }
.strip .cell .lab { grid-column: 1 / -1; }
.strip .cell b { font: 600 19px/1 var(--f-m); font-variant-numeric: tabular-nums; white-space: nowrap; }
.strip .cell b:not(.num) { font: 700 16px/1.15 var(--f-t); }
.strip .cell i { font-style: normal; font-size: 12px; color: var(--ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* in game: fixed slots, nothing moves */
.hud { position: fixed; inset: 0; z-index: 20; pointer-events: none; }
.hud > * { pointer-events: auto; position: absolute; }
.hud-top { top: 14px; left: 50%; transform: translateX(-50%); display: grid; grid-template-columns: 178px 284px 178px; width: 642px; height: 70px; overflow: hidden; }
.stat { display: grid; grid-template-columns: 1fr auto; grid-template-rows: 14px 1fr; align-items: center; padding: 11px 16px 9px; min-width: 0; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat i { font-style: normal; font-size: 11px; color: var(--ink3); white-space: nowrap; text-align: right; }
.stat b { grid-column: 1 / -1; font-size: 19px; font-weight: 600; line-height: 1; white-space: nowrap; align-self: end; }
.stat-hero { background: rgba(200, 245, 96, .06); }
.stat-hero b { font-size: 25px; color: var(--acc); }
.stat-hero i { color: var(--ink2); }
.lb { top: 14px; right: 16px; width: 310px; }
.lb .rows li { grid-template-columns: 20px 12px minmax(0, 1fr) 48px 62px; height: 26px; }
.feed { left: 16px; bottom: 100px; width: 330px; height: 132px; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; pointer-events: none; }
.feed li { align-self: flex-start; max-width: 100%; height: 24px; padding: 0 10px; border-radius: 7px; background: var(--panel); border: 1px solid var(--line); font-size: 12.5px; line-height: 22px; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: slidein .3s var(--ease) both; }
.feed li b { color: var(--ink); font-weight: 600; }
.feed li em { font-style: normal; color: var(--acc); font-family: var(--f-m); font-size: 12px; }
@keyframes slidein { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }
.mini { right: 16px; bottom: 16px; width: 184px; height: 184px; padding: 7px; }
.mini canvas { display: block; width: 168px; height: 168px; border-radius: 9px; image-rendering: pixelated; }
.cash { left: 50%; bottom: 22px; transform: translateX(-50%); width: min(500px, calc(100vw - 32px)); height: 62px; padding: 12px 16px 0; }
.cash-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; height: 24px; font-size: 13.5px; color: var(--ink2); white-space: nowrap; }
.cash-row span { overflow: hidden; text-overflow: ellipsis; }
.cash-row b { color: var(--acc); font-weight: 600; font-size: 14px; }
.cash-bar { margin-top: 9px; height: 6px; border-radius: 3px; background: var(--s3); overflow: hidden; }
.cash-bar i { display: block; height: 100%; width: 0; background: var(--acc); border-radius: 3px; }
.cash.is-on { border-color: rgba(200, 245, 96, .6); box-shadow: 0 0 0 4px rgba(200, 245, 96, .1), 0 30px 60px -34px #000; }
.cash.is-on .cash-row { color: var(--ink); }
.cash.is-wait .cash-row { color: var(--down); }
.touch-cash { display: none; right: 16px; bottom: 214px; height: 46px; font-size: 13px; background: var(--acc); color: var(--acc-ink); }
.hud-menu { left: 16px; top: 66px; display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 10px; border-radius: var(--r1); background: var(--panel); border: 1px solid var(--line); font-size: 12px; color: var(--ink2); }
.hud-menu:hover { color: var(--ink); border-color: var(--line2); }

.toast { position: fixed; z-index: 60; top: 98px; left: 50%; transform: translateX(-50%); max-width: min(560px, calc(100vw - 32px)); padding: 11px 16px; border-radius: var(--r2); background: var(--panel); border: 1px solid var(--line2); font-size: 14px; color: var(--ink); text-align: center; pointer-events: none; transition: opacity .2s, transform .2s var(--ease); }
.toast.is-hidden { opacity: 0; transform: translate(-50%, -6px); }
.toast.is-bad { border-color: rgba(255, 107, 94, .6); }
.toast.is-good { border-color: rgba(200, 245, 96, .6); }
.toast em { font-style: normal; color: var(--acc); font-family: var(--f-m); }

/* sheets */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(5, 7, 6, .62); animation: fade .2s both; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.sheet { width: min(460px, 100%); padding: 28px; display: grid; gap: 16px; animation: rise .35s var(--ease) both; }
.sheet-wide { width: min(560px, 100%); }
.sheet .eyebrow { margin: 0; }
.h2 { font: 900 34px/1 var(--f-d); font-stretch: 118%; letter-spacing: -.01em; text-transform: uppercase; }
.h2.num { font: 600 38px/1 var(--f-m); color: var(--acc); text-transform: none; }
.sub { font-size: 14.5px; line-height: 1.5; color: var(--ink2); min-height: 22px; }
.sub b { color: var(--ink); font-weight: 600; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r2); overflow: hidden; }
.grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid4 .cell { display: grid; gap: 9px; padding: 13px 12px; background: var(--s1); min-width: 0; }
.grid4 .cell b { font-size: 16px; font-weight: 600; white-space: nowrap; }
.row-btns { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 10px; margin-top: 4px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.step { height: 34px; display: grid; place-items: center; border-radius: var(--r1); background: var(--s2); border: 1px solid var(--line); font: 600 11px/1 var(--f-m); letter-spacing: .08em; text-transform: uppercase; color: var(--ink3); }
.step.is-on { color: var(--acc-ink); background: var(--acc); border-color: var(--acc); }
.step.is-bad { color: #fff; background: var(--down); border-color: var(--down); }
.txlink { font-size: 13px; color: var(--acc); text-decoration: underline; text-underline-offset: 3px; height: 20px; }
.how { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r2); overflow: hidden; counter-reset: how; }
.how li { display: grid; grid-template-columns: 34px 96px minmax(0, 1fr); align-items: baseline; gap: 6px; padding: 14px 16px; background: var(--s1); counter-increment: how; font-size: 14px; line-height: 1.5; color: var(--ink2); }
.how li::before { content: '0' counter(how); font: 600 11px/1 var(--f-m); color: var(--acc); }
.how li b { font: 800 14px/1.2 var(--f-d); font-stretch: 112%; text-transform: uppercase; letter-spacing: .04em; color: var(--ink); }
.how kbd { margin: 0 2px; }

/* docs and ledger pages */
body.is-page { overflow: auto; }
.page { position: relative; z-index: 5; width: min(880px, calc(100vw - 2 * var(--pad))); margin: 0 auto; padding: 112px 0 80px; display: grid; gap: 56px; }
.page-head .h1 { font-size: clamp(40px, 5vw, 68px); }
.page-head .lead { margin-bottom: 0; }
.sec { display: grid; gap: 18px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.sec-head h2 { font: 900 24px/1 var(--f-d); font-stretch: 115%; text-transform: uppercase; letter-spacing: -.005em; margin: 0; }
.sec p { color: var(--ink2); max-width: 70ch; }
.sec p b { color: var(--ink); font-weight: 600; }
.tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r3); overflow: hidden; }
.tiles .cell { display: grid; gap: 10px; padding: 18px; background: var(--s1); min-width: 0; }
.tiles .cell b { font: 600 20px/1 var(--f-m); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tiles .cell i { font-style: normal; font-size: 12px; color: var(--ink3); }
.rules { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r3); overflow: hidden; }
.rules li { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 16px; padding: 15px 18px; background: var(--s1); font-size: 14.5px; color: var(--ink2); }
.rules li b { color: var(--ink); font-weight: 600; }
.table { border: 1px solid var(--line); border-radius: var(--r3); overflow: hidden; }
.table .tr { display: grid; grid-template-columns: 96px 150px minmax(0, 1fr) 130px 110px; align-items: center; gap: 12px; height: 40px; padding: 0 18px; font-size: 13.5px; background: var(--s1); border-top: 1px solid var(--line); }
.table .tr:first-child { border-top: 0; background: var(--s2); height: 36px; }
.table .tr4 { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); }
#worth { margin-top: 4px; }
.table .tr span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink2); }
.table .tr .amt { text-align: right; color: var(--ink); }
.table .tr .amt.is-in { color: var(--acc); }
.table .tr a { color: var(--acc); font-family: var(--f-m); font-size: 12px; text-align: right; }
.table .empty { padding: 26px 18px; background: var(--s1); color: var(--ink3); font-size: 14px; }
.foot { display: flex; justify-content: space-between; gap: 16px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--ink3); }
body.is-page .nav { background: rgba(8, 11, 9, .92); border-bottom: 1px solid var(--line); }

.btn-small { height: 36px; padding: 0 16px; font-size: 13px; }

@media (max-width: 1100px) { .board { display: none; } .lb { display: none; } }
@media (max-width: 820px) {
  :root { --pad: 18px; }
  .nav-links { display: none; }
  .title { grid-template-rows: minmax(0, 1fr) 64px; overflow-y: auto; }
  .title::before { background: rgba(8, 11, 9, .78); }
  .hero { padding-top: 76px; padding-bottom: 20px; }
  .lead { font-size: 15px; margin: 14px 0 18px; }
  .strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .strip .cell:nth-child(n + 3) { display: none; }
  .strip .cell b { font-size: 16px; }
  .hud-top { grid-template-columns: 104px 172px 104px; width: 382px; height: 62px; top: 8px; }
  .stat { padding: 9px 10px 8px; } .stat b { font-size: 14px; } .stat-hero b { font-size: 18px; } .stat i { display: none; }
  .feed { display: none; }
  .mini { width: 112px; height: 112px; padding: 5px; right: 8px; bottom: 96px; } .mini canvas { width: 100px; height: 100px; }
  .cash { bottom: 12px; }
  .hud-menu { top: 76px; left: 8px; }
  .grid4, .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rules li, .how li { grid-template-columns: 1fr; }
  .how li::before { display: none; }
  .table .tr { grid-template-columns: 70px minmax(0, 1fr) 96px; } .table .tr span:nth-child(2), .table .tr :nth-child(5) { display: none; }
}
@media (max-height: 760px) { .hero { padding-top: 52px; } .lead { margin: 12px 0 16px; font-size: 14.5px; } .play { gap: 10px; padding: 16px; } .eyebrow { margin-bottom: 12px; } }
@media (pointer: coarse) { .touch-cash { display: inline-flex; right: 8px; bottom: 216px; } .hud-menu kbd { display: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
