/* The watch page on the village HUD vocabulary (js/pixelkit/hud.css loads first). One accent: the signal red from brand.json. */
:root {
  --accent: #d6232a; --accent-dim: #7a1e22; --num: #f4f1e8; --on-accent: #f4f1e8;
  --green: #0b5d3b;
}
html { height: auto; }
body.landing { overflow: auto; height: auto; }
body.watch, body.watch html { overflow: hidden; }
a { color: var(--accent); }
.hide-m { }

/* ---- the hero: the world canvas is fixed behind everything; the stage holds the HUD over it ---- */
#game { position: fixed; inset: 0; image-rendering: pixelated; touch-action: none; }
.hero { position: relative; height: 100svh; min-height: 560px; z-index: 5; pointer-events: none; }
.hero .panel { pointer-events: auto; }
.stage { position: absolute; inset: 0; pointer-events: none; }
.stage > * { pointer-events: auto; }
.below { position: relative; z-index: 6; background: var(--bg); border-top: 1px solid var(--line); box-shadow: 0 -8px 30px #0000008c; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 26px 16px 10px; }
.wrap.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.box-p { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px; min-width: 0; }
.sec-h { display: flex; align-items: baseline; gap: 10px; margin: 0 0 10px; flex-wrap: wrap; }
.sec-h h2 { font: 700 22px var(--pix); margin: 0; color: var(--text); letter-spacing: .3px; }
.sec-h .muted { font-size: 12.5px; }
.sec-h .btn { margin-left: auto; }

/* ---- brand + chips ---- */
.logo { text-shadow: 0 2px #3a0d0f; }
.mark { width: 30px; height: 30px; border-radius: 7px; border: 1px solid var(--line); background: var(--panel); display: block; }
.mark[hidden] { display: none; }
.chip.nav-chip { color: #cfc8b4; font: 600 14px var(--pix); letter-spacing: .4px; }
.chip.nav-chip:hover { color: var(--text); border-color: var(--accent); }
.chip.xlink svg { width: 14px; height: 14px; fill: currentColor; }
.chip.dim { opacity: .45; cursor: default; }
.chip.ca .k { font: 700 11px var(--pix); color: var(--muted2); letter-spacing: .5px; }
.chip.ca { font: 600 12.5px var(--mono); }
.chip.livepill.stale { border-color: #6a2e24; color: #ff9d8a; }
.chip.livepill.stale > b { color: #ff9d8a; }
.chip.th b { color: var(--num); }
.tr .btn.primary { height: 30px; font-size: 15px; padding: 0 12px; }
.tr { flex-wrap: wrap; justify-content: flex-end; }
.tl { right: 980px; }
.leftcol button.hl#follow-btn { border-color: var(--up); color: var(--up); }
.leftcol button#follow-btn:not(.hl) { opacity: .8; }

/* accent text sits on red, so the text goes paper */
.tabs button.on { color: var(--on-accent); }
.tabs button.on .live-dot { background: var(--on-accent); }
.btn.primary { color: var(--on-accent); }
.btn.big { box-shadow: 0 3px #7a1e22; }
.btn.big:active { box-shadow: 0 1px #7a1e22; }
.lv-how i { color: var(--on-accent); }
.lv-hero { background: var(--card); }
.lv-hero h2 em { text-shadow: 2px 2px #3a0d0f; }
.lv-hide { font-family: var(--mono); font-size: 11px; }
.kpi b { font-family: var(--mono); font-size: 15px; font-weight: 600; }
.kpi b.up { color: var(--up); }
.lv-stats .kpi b { font-size: 15px; }
.lv-d .tag + .tag { margin-left: 2px; }
.lv-pt { background: var(--panel2); color: var(--muted2); font: 700 10px var(--pix); }
.lv-pt canvas { image-rendering: pixelated; width: 22px; height: 20px; }
.lv-empty { line-height: 1.4; }

/* tags */
.tag.house { color: var(--muted2); border-color: #4a443c; }
.tag.ok { color: var(--up); border-color: #35513f; }
.tag.warn { color: var(--warn); border-color: #6a4a1e; }
.tag.bad { color: var(--bad); border-color: #6a2e24; }
.tag.live { color: var(--accent); border-color: var(--accent-dim); }

/* ---- timing tower table ---- */
.tower { overflow-x: auto; }
.led { width: 100%; border-collapse: collapse; font: 500 12.5px var(--mono); font-variant-numeric: tabular-nums; }
.led th { font: 600 12.5px var(--pix); color: var(--muted2); text-align: right; padding: 6px 6px; border-bottom: 1px solid var(--line); letter-spacing: .5px; white-space: nowrap; }
.led td { text-align: right; padding: 6px 6px; border-bottom: 1px solid #38322d80; color: var(--text); white-space: nowrap; vertical-align: top; }
.led .l { text-align: left; }
.led td.name { font: 700 13.5px var(--pix); }
.led td.pos { color: var(--accent); font: 700 13.5px var(--pix); }
.led td.no { color: var(--muted2); }
.led td.best { color: var(--up); }
.led td.miss { color: var(--down); }
.led tr.me td { background: #d6232a14; }
.led tr.pick { cursor: pointer; }
.led tr.pick:hover td { background: #ffffff08; }
.led tr.in td { animation: fresh 1.4s; }
.led tr.empty td { text-align: left; color: var(--muted2); padding: 14px 8px; white-space: normal; }
.led th.s1 { color: #4dd5cc; } .led th.s2 { color: #e3a24a; } .led th.s3 { color: #e86a5c; }
.led td.stmt { white-space: normal; max-width: 520px; }
.led td.stmt pre { margin: 4px 0; max-height: 90px; overflow: auto; font-size: 11.5px; }
.led td.stmt .ans { color: var(--up); font-size: 12px; }
.tower-foot { display: flex; justify-content: space-between; gap: 12px; padding: 8px 2px 0; font-size: 12px; color: var(--muted2); flex-wrap: wrap; }
.tower-foot a { font: 600 13px var(--pix); color: var(--accent); }

/* course list */
.course { margin: 0; padding: 0; list-style: none; }
.course li { display: flex; gap: 8px; align-items: baseline; padding: 4px 0; border-bottom: 1px solid #38322d80; font-size: 13px; }
.course li b { font: 700 13px var(--pix); color: var(--num); width: 24px; flex: none; }
.course li .t { flex: 1; }
.course li small { color: var(--muted); }
.course li.s1 b { color: #4dd5cc; } .course li.s2 b { color: #e3a24a; } .course li.s3 b { color: #e86a5c; }

/* key/value table */
.kvt { width: 100%; border-collapse: collapse; font-size: 13px; }
.kvt td { padding: 5px 0; border-bottom: 1px solid #38322d80; vertical-align: top; }
.kvt td:first-child { font: 600 12.5px var(--pix); color: var(--muted2); padding-right: 12px; white-space: nowrap; width: 1%; letter-spacing: .3px; }
.lb li small { display: block; color: var(--muted2); font-size: 12px; }
.lb li b { color: var(--num); font: 700 14px var(--pix); }

/* prompts, forms, modal */
.prompt { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 10px; font: 12.5px/1.45 var(--mono); white-space: pre-wrap; word-break: break-word; color: #cfc8b4; margin: 0; }
.label { font: 600 12px var(--pix); color: var(--muted2); letter-spacing: .4px; margin: 0; }
.fine { font-size: 12px; color: var(--muted2); line-height: 1.4; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.mt { margin-top: 10px; } .mt2 { margin-top: 18px; }
.sample h3 { font: 600 15px var(--sans); margin: 4px 0 6px; }
.field { display: block; margin-top: 10px; }
.field span { display: block; font: 600 12px var(--pix); color: var(--muted2); margin-bottom: 4px; letter-spacing: .3px; }
.field input { width: 100%; box-sizing: border-box; background: var(--card); border: 1px solid var(--line); border-radius: 7px; padding: 9px 10px; font: 14px var(--mono); color: var(--text); }
.field input::placeholder { color: #5a544a; }
.field input:focus { outline: 1px solid var(--accent); }
.err { color: var(--down); font: 12.5px var(--mono); margin-top: 8px; }
.saved { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.saved button { border: 1px solid var(--line); background: var(--card); color: var(--text); border-radius: 7px; padding: 4px 9px; font: 600 13px var(--pix); cursor: pointer; }
.saved button:hover { border-color: var(--accent); }
.modal { position: fixed; inset: 0; background: #0b0a09c4; display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 50; }
.modal[hidden] { display: none; }
.modal .box { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; width: 100%; max-width: 560px; max-height: calc(100vh - 32px); overflow: auto; padding: 18px; box-shadow: 0 10px 30px #00000080; color: var(--text); }
.modal .box.wide { max-width: 980px; }
.modal h2 { font: 700 22px var(--pix); margin: 0 0 4px; }
.modal .close { float: right; border: 0; background: none; font-size: 26px; line-height: 1; color: var(--muted); cursor: pointer; padding: 0 4px; }
.modal .close:hover { color: var(--text); }
.lp-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.lp-head .lp-t { font: 600 18px var(--mono); color: var(--num); }

/* the selected agent's card */
.ag-card { background: var(--card); border: 1px solid var(--accent-dim); border-radius: 12px; padding: 10px; margin-bottom: 10px; animation: fadein .3s; }
.ag-head { display: flex; gap: 10px; align-items: center; }
.ag-pt { width: 48px; height: 69px; flex: none; background: var(--panel2); border-radius: 8px; overflow: hidden; display: flex; align-items: flex-end; justify-content: center; }
.ag-pt canvas { image-rendering: pixelated; width: 48px; height: 69px; }
.ag-n { min-width: 0; }
.ag-n b { font: 700 17px var(--pix); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-n small { display: block; color: var(--muted); font-size: 11.5px; }
.ag-close { margin-left: auto; flex: none; width: 28px; padding: 0; font-size: 18px; }
.ag-stats { margin: 8px 0; }
.ag-foot { display: flex; gap: 8px; align-items: center; }
.yday .kpi { margin-top: 4px; }

/* footer */
.foot { position: relative; z-index: 6; background: var(--bg); border-top: 1px solid var(--line); padding: 16px; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; font-size: 12.5px; color: var(--muted2); }
.foot .name { font: 700 18px var(--pix); color: var(--accent); }
.foot a { color: var(--text); text-decoration: none; font: 600 13px var(--pix); }
.foot .mono { margin-left: auto; font-size: 11px; word-break: break-all; }
.watchfoot { position: fixed; left: 12px; bottom: 0; z-index: 4; background: none; border: 0; padding: 4px 0; pointer-events: none; }
.watchfoot .mono { margin: 0; color: #85806e99; }

/* ---- breakpoints ---- */
@media (width <= 1320px) { .tl { right: 760px; } }
@media (width <= 1100px) { .chip.nav-chip { display: none; } .tl { right: 620px; } }
@media (width <= 900px) { .wrap.two { grid-template-columns: 1fr; } }
@media (width <= 760px) {
  .hide-m { display: none; }
  body.landing .hero { height: auto; min-height: 0; }
  body.landing .stage { position: relative; height: 55svh; min-height: 360px; }
  body.landing .leftcol { display: none; }
  body.landing .panel { position: static; width: auto; height: auto; max-height: none; border-radius: 0; border-left: 0; border-right: 0; box-shadow: none; background: var(--panel); }
  body.landing .pbody { overflow: visible; }
  body.landing .tabs { position: sticky; top: 0; z-index: 2; }
  body.watch .panel { height: 45dvh; max-height: 45dvh; }
  body.watch .leftcol { display: none; }
  .tr { top: 70px; left: 8px; right: 8px; justify-content: flex-start; }
  .tr .btn.primary { display: none; }
  .tl { right: 8px; }
  .chip.explain { display: none; }
  .wrap { padding: 18px 16px 6px; }
  .foot .mono { margin-left: 0; }
}

/* round 2 */
a.brand { text-decoration: none; }
.logo { color: #f4f1e8; text-shadow: 0 3px var(--accent), 0 5px #3a0d0f; font-size: 34px; text-transform: uppercase; }
.tl { right: auto; }
.chip.explain { display: none; }
@media (width >= 1700px) { .chip.explain { display: inline-flex; } }
.chip.dim { opacity: 1; color: var(--muted); }
.chip.dim svg { opacity: .6; }
.lv-d > .lv-pt { flex: none; }
.lv-d p { flex-wrap: wrap; row-gap: 3px; }
.wrap.two { align-items: start; }
#s-data { max-height: 190px; overflow: auto; }
.lv-hero h2 em { color: var(--accent); }

/* round 4: the practice-demo chip, the phone header as two clean rows, Follow on the phone */
.chip.demo { position: absolute; left: 12px; bottom: 14px; height: 28px; gap: 8px; padding: 0 10px; pointer-events: auto; cursor: default; }
.chip.demo[hidden] { display: none; }
.chip.demo i { width: 7px; height: 7px; background: #ffb070; display: block; flex: none; animation: blink 1.6s steps(2) infinite; }
.chip.demo b { font: 700 13px var(--pix); color: #ffcf8a; letter-spacing: 1px; }
.chip.demo span { color: #cfc8b4; font: 500 12px var(--sans); letter-spacing: 0; }
body.watch .chip.demo { bottom: 26px; }
@media (width <= 760px) {
  .tl { top: 33px; left: 8px; right: 8px; }
  .brand { flex-wrap: nowrap; }
  .logo { font-size: 26px; line-height: 26px; }
  .mark { width: 26px; height: 26px; border-radius: 6px; }
  .tr { top: 67px; left: 8px; right: 8px; gap: 5px; flex-wrap: nowrap; justify-content: flex-start; }
  .tr .chip { flex: none; height: 26px; padding: 0 7px; }
  .tr .chip.ca { flex: 0 1 auto; min-width: 0; overflow: hidden; font-size: 11.5px; }
  .tr .chip.ca span:last-child { overflow: hidden; text-overflow: ellipsis; }
  .tr .chip.livepill .lp-t { display: none; }
  .tr .chip.th { margin-left: auto; }
  body.landing .leftcol, body.watch .leftcol { display: flex; top: auto; left: auto; right: 8px; bottom: 8px; transform: none; }
  .leftcol button[data-tab] { display: none; }
  .leftcol button#follow-btn { width: 40px; height: 40px; }
  .chip.demo { left: 8px; bottom: 8px; height: 26px; max-width: calc(100% - 64px); overflow: hidden; }
  .chip.demo b { font-size: 12px; }
  .chip.demo span { font-size: 11px; overflow: hidden; text-overflow: ellipsis; }
  body.watch .leftcol { bottom: calc(45dvh + 8px); }
  body.watch .chip.demo { bottom: calc(45dvh + 8px); }
}
@media (width <= 760px) { .tr .chip { box-sizing: border-box; } }

/* round 5: the CA chip copies and says so; the phone shows the short form */
.chip.ca { cursor: pointer; gap: 6px; }
.chip.ca .short, .chip.ca .c { display: none; }
.chip.ca.done .v { display: none; }
.chip.ca.done .c { display: inline; color: var(--up); }
.chip.nav-chip { text-decoration: none; }
@media (width <= 760px) { .chip.ca .full { display: none; } .chip.ca .short { display: inline; } .chip.ca.done .short { display: none; } }
