/* TOWER v0.3 "Ops Deck" components — light = championships patterns, dark = terminal. */
.container { max-width: 1180px; margin: 0 auto; padding: 0 16px; }

/* utility bar */
.utility { background: var(--brand); color: #fff; font-size: .85rem; }
:root[data-theme="dark"] .utility { background: #0d1117; border-bottom: 1px solid var(--line); }
html[data-contrast="hc"] .utility { background: #000; }
.utility .container { display: flex; gap: 14px; align-items: center; min-height: 42px; flex-wrap: wrap; }
.utility a, .utility button { color: inherit; background: none; border: 0; font: inherit; cursor: pointer; padding: 4px 9px; border-radius: var(--radius-sm); }
.utility button.on { background: var(--accent); color: var(--ink); font-weight: 700; }
.utility .right { margin-left: auto; display: flex; gap: 4px; align-items: center; }

/* masthead */
.masthead { background: var(--panel); border-bottom: 1px solid var(--line); }
.masthead .container { display: flex; align-items: center; gap: 22px; padding: 16px; }
.logo { font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; color: var(--ink); letter-spacing: .12em; }
.logo small { display: block; font-weight: 400; font-size: .78rem; color: var(--muted); letter-spacing: 0; }
.masthead-search { flex: 1; border: 2px solid var(--line); display: flex; align-items: center; padding: 8px 12px; gap: 8px; border-radius: var(--radius); background: var(--panel); }
.masthead-search input { border: 0; outline: 0; flex: 1; font: inherit; background: transparent; color: var(--text); }
:root[data-theme="dark"] .masthead-search { border-style: solid; border-color: var(--line); }

/* pillar switcher (championships nav pattern) */
.pillars { background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.pillars .container { display: flex; gap: 6px; overflow-x: auto; padding: 10px 16px; }
.pillar { border: 0; background: none; font-family: var(--font-display); font-weight: 700; font-size: .95rem; letter-spacing: .04em; color: var(--muted); padding: 9px 16px; cursor: pointer; border-radius: 999px; white-space: nowrap; }
.pillar:hover { color: var(--ink); background: var(--wash); text-decoration: none; }
.pillar.active { background: var(--accent); color: #221300; }
:root[data-theme="dark"] .pillar.active { background: var(--ink); color: #06170b; border-radius: 2px; }
:root[data-theme="dark"] .pillar.active::before { content: "▸ "; }
html[data-contrast="hc"] .pillar.active { background: #000; color: #ff0; }

/* hero: countdown + verdict + timeline */
.hero2 { background: var(--brand); color: #fff; padding: 26px 0 20px; }
:root[data-theme="dark"] .hero2 { background: #0d1117; border-bottom: 1px solid var(--line); }
.hero2 .row { display: flex; gap: 26px; align-items: center; flex-wrap: wrap; }
.cd { font-family: var(--font-display); }
.cd .label { font-size: .75rem; text-transform: uppercase; letter-spacing: .14em; opacity: .75; }
.cd .big { font-size: 2rem; font-weight: 800; }
.verdictbox { margin-left: auto; text-align: right; }
.verdictbox h1 { margin: 0; font-size: 2.2rem; }
.verdictbox .sub { opacity: .9; font-size: .95rem; }
.verdictbtn { background: none; border: 2px solid #ffffff66; color: #fff; font: inherit; padding: 5px 12px; margin-top: 8px; cursor: pointer; border-radius: var(--radius-sm); }
.verdictbtn:hover { background: #ffffff22; }
.hero2.go .verdictbox h1 { color: var(--ok); } .hero2.review .verdictbox h1 { color: var(--accent); }
.hero2.nogo .verdictbox h1 { color: #ff6b52; } .hero2.unknown .verdictbox h1 { color: #cfd8e3; }
:root[data-theme="light"] .hero2.review .verdictbox h1 { color: #221300; }
.timeline { display: flex; gap: 6px; margin-top: 16px; flex-wrap: wrap; }
.timeline .step { font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; padding: 6px 12px; border: 1px solid #ffffff40; border-radius: 999px; opacity: .7; }
:root[data-theme="dark"] .timeline .step { border-radius: 2px; border-color: var(--line); }
.timeline .step.here { background: var(--accent); color: #221300; border-color: var(--accent); font-weight: 800; opacity: 1; }
:root[data-theme="dark"] .timeline .step.here { color: #06170b; }
.timeline .step.done { opacity: .45; text-decoration: line-through; }
.hero2 .dtg { font-size: .78rem; opacity: .65; margin-top: 12px; }

/* map */
#map { height: 460px; border: 1px solid var(--line); background: var(--map-quiet); border-radius: var(--radius); overflow: hidden; }
:root[data-theme="dark"] #map { border-radius: 2px; }
#mapLegend { margin-top: 6px; }
@media (max-width: 900px) { #map { height: 320px; } }

/* cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; margin: 22px 0; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
:root[data-theme="dark"] .card { border-left: 3px solid var(--ink); }
.card h3 { margin: 0 0 8px; font-size: .95rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.card .big { font-size: 1.9rem; font-weight: 800; color: var(--ink); font-family: var(--font-display); }

/* segment cards (corridor pillar) */
.seggrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 14px; margin: 18px 0; }
.segcard { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; cursor: pointer; transition: transform .12s; }
.segcard:hover { transform: translateY(-2px); }
:root[data-theme="dark"] .segcard { border-radius: 2px; box-shadow: none; }
:root[data-theme="dark"] .segcard:hover { border-color: var(--ink); }
.segcard .segname { font-family: var(--font-display); font-weight: 700; color: var(--ink); font-size: 1.05rem; }
.segcard .segstate { margin: 8px 0; }
.segcard .segfoot { font-size: .78rem; color: var(--muted); }

/* list rows (shared, clickable) */
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { padding: 11px 8px; border-bottom: 1px solid var(--line); display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; border-radius: var(--radius-sm); }
.rows .clickable:hover, tr.clickable:hover { background: var(--wash); }
.clickable { cursor: pointer; }
.rows .place { font-weight: 700; color: var(--ink); }
.rows .meta { color: var(--muted); font-size: .88rem; }

/* chips */
.chip { display: inline-block; padding: 2px 10px; font-size: .75rem; font-weight: 800; letter-spacing: .04em; border-radius: 999px; }
:root[data-theme="dark"] .chip { border-radius: 2px; }
.chip.red { background: var(--red); color: var(--red-ink); }
.chip.yellow { background: var(--warn); color: var(--warn-ink); }
.chip.ok { background: var(--ok); color: var(--ok-ink); }
.chip.down { background: var(--muted); color: var(--bg); }
.chip.agree { border: 1.5px solid var(--ok); color: var(--ok); background: transparent; }
.chip.single { border: 1.5px solid var(--muted); color: var(--muted); background: transparent; }
.chip.new { background: var(--accent); color: #221300; animation: newblink 1.6s ease-out 3; }
:root[data-theme="dark"] .chip.new { background: var(--ink); color: #06170b; }
@keyframes newblink { 50% { opacity: .35; } }
.pulse { animation: ringpulse 1.4s ease-out infinite; }
@keyframes ringpulse { 0% { stroke-opacity: 1; } 100% { stroke-opacity: .1; } }

/* tables */
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 700; text-transform: uppercase; font-size: .75rem; letter-spacing: .06em; }
:root[data-theme="dark"] tbody tr:nth-child(even) { background: #0d1319; }

/* buttons */
.btn { display: inline-block; background: var(--accent); color: #221300; border: 0; padding: 10px 18px; font-family: var(--font-display); font-weight: 800; cursor: pointer; border-radius: var(--radius-sm); text-decoration: none !important; box-shadow: var(--shadow); }
:root[data-theme="dark"] .btn { background: var(--ink); color: #06170b; box-shadow: none; }
.btn:hover { filter: brightness(1.08); }
.btn.outline { background: transparent; color: var(--ink); border: 2px solid var(--ink); box-shadow: none; }

/* stale bar / deferrals / legend */
.stalebar { background: var(--warn); color: var(--warn-ink); padding: 8px 0; font-weight: 700; }
.stalebar.dark { background: var(--red); color: var(--red-ink); }
.deferrals { border-left: 4px solid var(--accent); background: var(--wash); padding: 10px 14px; font-size: .86rem; margin: 16px 0; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.legend { font-size: .83rem; color: var(--muted); }

/* drawer + modal */
.drawer { position: fixed; top: 0; right: 0; width: min(440px, 94vw); height: 100vh; background: var(--panel); box-shadow: -6px 0 24px rgba(0,0,0,.25); padding: 18px 20px; overflow-y: auto; z-index: 1200; border-left: 3px solid var(--accent); }
:root[data-theme="dark"] .drawer { border-left: 3px solid var(--ink); border-radius: 0; }
.drawer[hidden], .modalmask[hidden] { display: none !important; }
.dhead { display: flex; justify-content: space-between; align-items: center; gap: 10px; border-bottom: 2px solid var(--ink); padding-bottom: 8px; margin-bottom: 12px; }
.xbtn { background: none; border: 0; font-size: 1.2rem; cursor: pointer; color: var(--ink); }
.modalmask { position: fixed; inset: 0; background: rgba(4, 10, 20, .55); display: flex; align-items: center; justify-content: center; z-index: 1300; }
.modalbox { background: var(--panel); color: var(--text); width: min(620px, 92vw); max-height: 84vh; overflow: auto; padding: 18px 22px; border-radius: var(--radius); border: 1px solid var(--line); }
.tracerow { padding: 8px 0; border-bottom: 1px solid var(--line); }

/* pillars show/hide */
[data-pillar] { display: none; }
[data-pillar].on { display: block; }

/* terminal flourishes (dark only) */
:root[data-theme="dark"] .hero2 .cd .big::before { content: "⏱ "; }
:root[data-theme="dark"] .verdictbox h1::before { content: "$ "; opacity: .5; }
:root[data-theme="dark"] footer .logo, :root[data-theme="dark"] .footer { font-family: ui-monospace, monospace; }

/* footer */
.footer { background: var(--brand); color: #fff; padding: 26px 0 32px; margin-top: 40px; font-size: .86rem; }
:root[data-theme="dark"] .footer { background: #0d1117; border-top: 1px solid var(--line); }
.footer a { color: var(--sky); }
.footer .disc { margin-top: 12px; padding-top: 12px; border-top: 1px solid #ffffff33; opacity: .85; }
section { margin: 30px 0; }

/* ---------- v0.4 fun: faithful championships component language ---------- */
:root[data-theme="fun"] .utility { background: #ffcd00; color: #0c203f; font-weight: 600; }
:root[data-theme="fun"] .utility button, :root[data-theme="fun"] .utility a { color: #0c203f; }
:root[data-theme="fun"] .utility .lang-btn, :root[data-theme="fun"] .utility #contrastBtn { background: #0c203f; color: #ffcd00; border-radius: 8px; padding: 4px 10px; }  /* their navy icon-chips */
:root[data-theme="fun"] .masthead { background: #fff; border-bottom: 3px solid #ffcd00; }
:root[data-theme="fun"] .masthead-search { border-color: #0c203f; border-radius: 999px; }
:root[data-theme="fun"] .pillars { background: #fff; border-bottom: 1px solid var(--line); }
:root[data-theme="fun"] .pillar { color: #0c203f; border-radius: 999px; }
:root[data-theme="fun"] .pillar:hover { background: #fff3b0; color: #0c203f; }
:root[data-theme="fun"] .pillar.active { background: #ffcd00; color: #0c203f; box-shadow: -2px 2px 0 rgba(12,32,63,.25); }
:root[data-theme="fun"] .hero2 { background: #0c203f; border-bottom: 12px solid #ffcd00; }
:root[data-theme="fun"] .hero2.go .verdictbox h1 { color: #4ade80; }
:root[data-theme="fun"] .hero2.review .verdictbox h1 { color: #ffcd00; }
:root[data-theme="fun"] .hero2.nogo .verdictbox h1 { color: #ff6b5a; }
:root[data-theme="fun"] .hero2.unknown .verdictbox h1 { color: #cfd8e3; }
:root[data-theme="fun"] .cd .label { color: #ffcd00; }
:root[data-theme="fun"] .cd .big { font-family: "Exo 2", "Oxanium", sans-serif; font-weight: 800; }
:root[data-theme="fun"] .timeline .step, :root[data-theme="fun"] .timeline .step.here { border-radius: 999px; }
:root[data-theme="fun"] [data-pillar] > section > h2, :root[data-theme="fun"] .mapsec h2 { border-left: 8px solid #ffcd00; padding-left: 12px; }
:root[data-theme="fun"] .card, :root[data-theme="fun"] .segcard, :root[data-theme="fun"] .modalbox { position: relative; overflow: hidden; }
/* their cursor-gloss (card-detail_perspectiveHighlight) — static approximation on hover */
:root[data-theme="fun"] .card::after, :root[data-theme="fun"] .segcard::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(circle at 70% 12%, rgba(255,255,255,.95), rgba(255,255,255,0) 55%);
  transition: opacity .25s;
}
:root[data-theme="fun"] .card:hover::after, :root[data-theme="fun"] .segcard:hover::after { opacity: .7; }
:root[data-theme="fun"] .btn { background: #fff; color: #0c203f; border: 2px solid #0c203f; box-shadow: var(--shadow); border-radius: 8px; }
:root[data-theme="fun"] .btn:hover { background: #0c203f; color: #fff; filter: none; }
:root[data-theme="fun"] .btn.outline { background: #fff; }
:root[data-theme="fun"] .chip { border-radius: 8px; }
:root[data-theme="fun"] .drawer { border-left: 6px solid #ffcd00; border-radius: 24px 0 0 24px; }
:root[data-theme="fun"] .footer { background: #0b215a; border-top: 26px solid #ffcd00; }   /* the signature */
:root[data-theme="fun"] .verdictbtn { border-color: #ffcd0066; }
:root[data-theme="fun"] .verdictbtn:hover { background: #ffcd0022; }

/* ---------- v0.4 theme switch (segmented radiogroup, all themes) ---------- */
.themeswitch { display: inline-flex; gap: 3px; background: var(--wash); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 3px; }
.themeswitch button { display: inline-flex; align-items: center; gap: 5px; border: 0; background: none; color: var(--muted); font: inherit; font-size: .8rem; padding: 4px 11px; border-radius: calc(var(--radius-sm) - 2px); cursor: pointer; }
.themeswitch button[aria-checked="true"] { background: var(--panel); color: var(--ink); font-weight: 700; box-shadow: 0 1px 3px rgba(0,0,0,.18); }
:root[data-theme="dark"] .themeswitch button[aria-checked="true"] { background: var(--ink); color: #06170b; box-shadow: none; }
:root[data-theme="fun"] .themeswitch { background: #fff; box-shadow: -2px 2px 0 rgba(12,32,63,.18); border-color: #0c203f; }
:root[data-theme="fun"] .themeswitch button[aria-checked="true"] { background: #0c203f; color: #ffcd00; box-shadow: none; }
.themeswitch svg { display: block; }
