/* GR8 Circuit — GR8 brand: charcoal, gold, red. Anton for display, Space Grotesk for everything else.
   One loud thing per screen (the Anton headline); everything around it stays quiet. */
:root {
  --bg: #0b0b0d; --bg2: #141417; --bg3: #1b1b1f; --line: #26262b; --line2: #34343a;
  --fg: #f2efe8; --muted: #a39f95; --faint: #6f6b63;
  --gold: #d4a017; --gold2: #f0c75e; --gold-ink: #120e02; --gold-tint: rgba(212, 160, 23, .12);
  --red: #d7262c; --red-tint: rgba(215, 38, 44, .14);
  --green: #7cc495; --green-tint: rgba(124, 196, 149, .12);
  --display: 'Anton', 'Impact', 'Arial Narrow', sans-serif;
  --body: 'Space Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --rail: 236px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--body); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--gold2); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--gold2); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; text-transform: uppercase; letter-spacing: .01em; line-height: .95; margin: 0; text-wrap: balance; }
p { margin: 0; }
[hidden] { display: none !important; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: var(--rail) 1fr; min-height: 100vh; min-height: 100dvh; }
.rail { position: sticky; top: 0; height: 100vh; height: 100dvh; background: var(--bg2); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 18px 12px 14px; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 18px; }
.brand img { width: 92px; height: auto; display: block; }
.brand .word { font-family: var(--display); font-size: 1.7rem; line-height: .9; letter-spacing: .03em; }
.brand .word small { display: block; font-family: var(--body); font-size: .68rem; letter-spacing: .02em; color: var(--muted); text-transform: none; margin-top: 4px; }
.nav { display: grid; gap: 2px; }
.nav button { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; text-align: left; background: transparent; border: 0; border-radius: 8px; padding: 9px 10px; color: var(--muted); font-weight: 500; font-size: .93rem; }
.nav button:hover { background: var(--bg3); color: var(--fg); }
.nav button.on { background: var(--bg3); color: var(--fg); box-shadow: inset 3px 0 0 var(--gold); }
.nav .count { font-size: .78rem; color: var(--faint); font-variant-numeric: tabular-nums; }
.nav .count.hot { color: var(--gold); font-weight: 700; }
.nav .sep { height: 1px; background: var(--line); margin: 10px 8px; }
.rail-foot { margin-top: auto; padding: 12px 8px 0; border-top: 1px solid var(--line); font-size: .8rem; color: var(--muted); display: grid; gap: 4px; }
.rail-foot strong { color: var(--fg); font-weight: 600; }
.sync { display: inline-flex; align-items: center; gap: 6px; }
.sync i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.sync.saving i { background: var(--gold); }
.sync.off i { background: var(--red); }

main { min-width: 0; padding: 30px 36px 80px; max-width: 1240px; }
.topbar, .tabbar { display: none; }

/* ---------- page head ---------- */
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
.head h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); }
.head .sub { color: var(--muted); margin-top: 8px; max-width: 62ch; }
.head .tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Today's big number — the one loud thing */
.today-hero { display: grid; grid-template-columns: auto 1fr; gap: 6px 22px; align-items: end; margin-bottom: 26px; }
.today-hero .num { font-family: var(--display); font-size: clamp(5.5rem, 13vw, 9.5rem); line-height: .78; color: var(--gold); grid-row: span 2; }
.today-hero h1 { font-size: clamp(2rem, 4.2vw, 3.2rem); }
.today-hero .sub { color: var(--muted); max-width: 60ch; }
.today-hero .date { color: var(--muted); font-size: .9rem; margin-bottom: 6px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border-radius: 8px; padding: 9px 15px; font-weight: 600; font-size: .9rem; border: 1px solid var(--line2); background: var(--bg3); color: var(--fg); white-space: nowrap; }
.btn:hover { border-color: var(--faint); }
.btn.gold { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.btn.gold:hover { background: var(--gold2); border-color: var(--gold2); }
.btn.ghost { background: transparent; }
.btn.quiet { background: transparent; border-color: transparent; color: var(--muted); padding-inline: 8px; }
.btn.quiet:hover { color: var(--fg); }
.btn.red { background: var(--red-tint); border-color: transparent; color: #ff8a8d; }
.btn.sm { padding: 6px 11px; font-size: .82rem; border-radius: 7px; }
.btn[disabled] { opacity: .5; cursor: progress; }
.ai-mark { color: var(--gold2); }
.btn.gold .ai-mark { color: inherit; }

.pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pill { border: 1px solid var(--line2); background: transparent; color: var(--muted); border-radius: 999px; padding: 5px 12px; font-size: .84rem; font-weight: 500; }
.pill:hover { color: var(--fg); }
.pill.on { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.seg { display: inline-flex; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; color: var(--muted); padding: 6px 13px; border-radius: 7px; font-weight: 500; font-size: .88rem; }
.seg button.on { background: var(--bg3); color: var(--fg); box-shadow: inset 0 -2px 0 var(--gold); }

.tag { display: inline-flex; align-items: center; border-radius: 5px; padding: 2px 7px; font-size: .72rem; font-weight: 700; letter-spacing: .06em; white-space: nowrap; }
.tone-gold { background: var(--gold-tint); color: var(--gold2); }
.tone-red { background: var(--red-tint); color: #ff8a8d; }
.tone-green { background: var(--green-tint); color: var(--green); }
.tone-muted { background: var(--bg3); color: var(--muted); }
.chip { display: inline-block; border-radius: 999px; padding: 2px 9px; font-size: .74rem; border: 1px solid var(--line2); color: var(--muted); }
.chip.match { border-color: rgba(212, 160, 23, .45); color: var(--gold2); }
.chips { display: flex; gap: 5px; flex-wrap: wrap; }

/* ---------- inputs ---------- */
.field { display: grid; gap: 5px; }
.field > span { font-size: .8rem; color: var(--muted); font-weight: 500; }
.input, select.input, textarea.input { width: 100%; background: var(--bg); border: 1px solid var(--line2); border-radius: 8px; padding: 9px 11px; color: var(--fg); }
.input:focus { outline: none; border-color: var(--gold); }
textarea.input { resize: vertical; line-height: 1.55; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hint { font-size: .8rem; color: var(--faint); }
.music-row { display: grid; grid-template-columns: 1fr 1.4fr minmax(130px, .9fr) auto; gap: 8px; align-items: center; }
@media (max-width: 820px) { .music-row { grid-template-columns: 1fr auto; } .music-row input[data-bind$='.url'], .music-row select { grid-column: 1; } }
.hint.warn { color: #ff8a8d; }
.hint.ok { color: var(--green); }

/* ---------- Today: moves ---------- */
.moves { border-top: 1px solid var(--line); }
.move { border-bottom: 1px solid var(--line); }
.move-head { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; padding: 16px 4px; cursor: pointer; }
.move-head:hover .move-title { color: var(--gold2); }
.move-title { font-size: 1.12rem; font-weight: 600; margin: 6px 0 3px; }
.move-why { color: var(--muted); font-size: .9rem; }
.move-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.move-meta .ready { font-size: .78rem; color: var(--green); }
.move-body { padding: 4px 4px 22px; display: grid; gap: 10px; }
.move.open .move-head { padding-bottom: 8px; }
.to-line { font-size: .85rem; color: var(--muted); }
.to-line b { color: var(--fg); font-weight: 600; }
.empty { border: 1px dashed var(--line2); border-radius: 12px; padding: 28px; color: var(--muted); display: grid; gap: 12px; justify-items: start; }
.empty h3 { color: var(--fg); font-size: 1.6rem; }

.stats { display: grid; grid-template-columns: repeat(5, 1fr); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-top: 34px; }
.stat { padding: 14px 16px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat .v { font-family: var(--display); font-size: 2rem; line-height: 1; }
.stat .l { font-size: .8rem; color: var(--muted); margin-top: 4px; }
.robot { margin-top: 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.robot h3 { font-size: 1.3rem; margin-bottom: 10px; }
.log { display: grid; gap: 6px; font-size: .86rem; color: var(--muted); }
.log div { display: flex; gap: 10px; }
.log time { color: var(--faint); min-width: 64px; font-variant-numeric: tabular-nums; }

/* ---------- lists / split ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 420px); gap: 22px; align-items: start; }
.list { display: grid; gap: 8px; }
.item { display: grid; grid-template-columns: 50px 1fr; gap: 14px; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 13px 15px; text-align: left; width: 100%; color: inherit; }
.item:hover { border-color: var(--line2); }
.item.sel { border-color: var(--gold); }
.score { width: 50px; height: 50px; border-radius: 10px; display: grid; place-items: center; font-family: var(--display); font-size: 1.45rem; background: var(--bg3); color: var(--muted); }
.score.hi { background: var(--gold); color: var(--gold-ink); }
.score.mid { background: var(--gold-tint); color: var(--gold2); }
.item-name { font-weight: 600; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.item-meta { font-size: .84rem; color: var(--muted); margin: 2px 0 7px; }
.panel { position: sticky; top: 22px; background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; padding: 22px; display: grid; gap: 16px; max-height: calc(100vh - 44px); overflow: auto; }
.panel h2 { font-size: 1.9rem; }
.panel .close { display: none; }
.panel-sec { display: grid; gap: 5px; }
.panel-sec > b { font-size: .8rem; color: var(--muted); font-weight: 500; }
.panel-sec p { font-size: .9rem; color: #d9d5cc; }
.bars { display: grid; gap: 7px; }
.bar { display: grid; grid-template-columns: 92px 1fr 40px; gap: 10px; align-items: center; font-size: .8rem; color: var(--muted); }
.bar .t { height: 6px; background: var(--bg3); border-radius: 3px; overflow: hidden; }
.bar .t i { display: block; height: 100%; background: var(--gold); }
.bar .p { text-align: right; font-variant-numeric: tabular-nums; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar .input { width: auto; flex: 1 1 200px; }
.scout { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 13px 15px; display: grid; gap: 10px; margin-bottom: 14px; }
.scout .row .input { flex: 1 1 200px; }
.city { display: inline-flex; align-items: center; gap: 6px; background: var(--bg3); border-radius: 999px; padding: 3px 6px 3px 11px; font-size: .84rem; }
.city button { border: 0; background: transparent; color: var(--faint); padding: 0 4px; }

/* ---------- pipeline ---------- */
.board { display: grid; grid-template-columns: repeat(4, minmax(220px, 1fr)); gap: 12px; align-items: start; overflow-x: auto; }
.col { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; gap: 8px; }
.col-head { display: flex; justify-content: space-between; font-weight: 600; font-size: .9rem; padding: 2px 4px 6px; }
.col-head span { color: var(--faint); font-variant-numeric: tabular-nums; }
.card { background: var(--bg3); border-radius: 9px; padding: 11px 12px; display: grid; gap: 7px; }
.card .n { font-weight: 600; font-size: .93rem; }
.card .s { font-size: .8rem; color: var(--muted); }
.card .row { gap: 6px; }

/* ---------- shows ---------- */
.totals { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-bottom: 18px; }
.totals div { padding: 14px 16px; border-right: 1px solid var(--line); }
.totals div:last-child { border-right: 0; }
.totals b { display: block; font-family: var(--display); font-size: 1.9rem; font-weight: 400; line-height: 1; }
.totals span { font-size: .8rem; color: var(--muted); }
.show { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 15px 17px; display: grid; gap: 9px; }
.show .top { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* ---------- EPK ---------- */
.epk { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 400px); gap: 22px; align-items: start; }
.form { background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; padding: 20px; display: grid; gap: 14px; }
.form h3 { font-size: 1.35rem; margin-top: 6px; }
.preview { position: sticky; top: 22px; background: #000; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.preview .art { aspect-ratio: 16/10; background: var(--bg2) center/contain no-repeat; border-bottom: 1px solid var(--line); }
.preview .in { padding: 20px; display: grid; gap: 12px; }
.preview h2 { font-size: 2.6rem; }
.preview .tl { color: var(--gold2); }
.preview .bio { color: #d9d5cc; font-size: .92rem; }
.preview .draw { border-left: 3px solid var(--gold); padding: 4px 0 4px 12px; font-size: .9rem; }

/* ---------- calendar ---------- */
.months { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.month { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.month h3 { font-size: 1.25rem; margin-bottom: 10px; }
.days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.days .dh { font-size: .72rem; color: var(--faint); text-align: center; padding-bottom: 2px; }
.day { aspect-ratio: 1; border: 0; border-radius: 7px; background: var(--bg3); color: var(--muted); font-size: .82rem; font-variant-numeric: tabular-nums; }
.day.past { opacity: .35; }
.day.open { background: var(--green-tint); color: var(--green); font-weight: 700; }
.day.hold { background: var(--gold-tint); color: var(--gold2); font-weight: 700; }
.day.booked { background: var(--gold); color: var(--gold-ink); font-weight: 700; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .82rem; color: var(--muted); margin-bottom: 14px; }
.legend i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* ---------- more grid, settings ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.tile { text-align: left; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: grid; gap: 4px; }
.tile b { font-size: 1.05rem; }
.tile span { color: var(--muted); font-size: .86rem; }
.toggle { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.toggle input { margin-top: 4px; accent-color: var(--gold); width: 17px; height: 17px; }
.toggle b { display: block; font-weight: 600; }
.toggle span { color: var(--muted); font-size: .86rem; }
.box { background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; padding: 20px; display: grid; gap: 12px; }

/* ---------- modal ---------- */
.scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .66); display: grid; place-items: center; padding: 20px; z-index: 50; }
.modal { width: min(660px, 100%); max-height: calc(100dvh - 40px); overflow: auto; background: var(--bg2); border: 1px solid var(--line2); border-radius: 16px; padding: 22px; display: grid; gap: 14px; }
.modal.wide { width: min(780px, 100%); }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.modal-head h2 { font-size: 1.8rem; }
.x { border: 0; background: transparent; color: var(--muted); font-size: 1.4rem; line-height: 1; padding: 2px 6px; }
.review { border: 1px solid var(--line2); border-radius: 10px; padding: 12px 14px; display: grid; gap: 6px; font-size: .88rem; }
.review ul { margin: 0; padding-left: 18px; color: #d9d5cc; }

.toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 12px); opacity: 0; background: var(--fg); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-weight: 600; font-size: .9rem; transition: opacity .2s, transform .2s; z-index: 80; pointer-events: none; max-width: calc(100vw - 32px); text-align: center; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- login ---------- */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.login form { width: min(380px, 100%); display: grid; gap: 14px; }
.login img { width: 220px; margin-bottom: 8px; }
.login h1 { font-size: 3.2rem; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .split, .epk { grid-template-columns: 1fr; }
  .panel, .preview { position: static; max-height: none; }
  .split .panel { position: fixed; inset: auto 0 0 0; max-height: 86dvh; border-radius: 18px 18px 0 0; z-index: 40; box-shadow: 0 -20px 60px rgba(0, 0, 0, .6); }
  .split .panel .close { display: inline-block; }
  .robot { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .rail { display: none; }
  .topbar { display: flex; position: sticky; top: 0; z-index: 30; align-items: center; justify-content: space-between; padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: rgba(11, 11, 13, .9); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
  .topbar img { height: 30px; width: auto; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: rgba(20, 20, 23, .96); backdrop-filter: blur(12px); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar button { border: 0; background: transparent; color: var(--muted); font-size: .74rem; font-weight: 600; padding: 7px 2px; display: grid; justify-items: center; gap: 3px; }
  .tabbar button.on { color: var(--gold2); }
  .tabbar svg { width: 21px; height: 21px; }
  main { padding: 18px 16px calc(100px + env(safe-area-inset-bottom)); }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .stats .stat:nth-child(3) { border-right: 0; }
  .stats .stat:nth-child(n+4) { border-top: 1px solid var(--line); }
  .totals { grid-template-columns: 1fr 1fr; }
  .totals div:nth-child(2) { border-right: 0; }
  .totals div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .board { grid-template-columns: repeat(4, 82vw); scroll-snap-type: x mandatory; }
  .col { scroll-snap-align: start; }
  .grid2 { grid-template-columns: 1fr; }
  .today-hero { gap: 4px 14px; }
  .today-hero .num { font-size: 5.2rem; }
  .scrim { padding: 0; place-items: end center; }
  .modal { border-radius: 18px 18px 0 0; max-height: 94dvh; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
