/* Brass theme (the first clockwork look, 12 Oct 2026): loaded after style.css when UI_THEME=brass (or the visitor picks
   it in the header). It only restyles: every page works the same in the classic look. */

:root {
  --bg: #15110c;
  --surface: #1f1912;
  --surface-2: #261f15;
  --text: #eee2c6;
  --muted: #b3a27f;
  --border: #4a3b22;
  --accent: #d6ab47;
  --accent-text: #1a1307;
  --pos: #8fd19e;
  --neg: #ee8a6f;
  --warn-bg: #3a2c0e;
  --warn-text: #f0c766;
  --err-bg: #3c1d14;
  --ok-bg: #1b2e1d;
  --info-bg: #2a2416;
  --radius: 6px;
  --brass-hi: #f3d98b;
  --brass: #c99a3b;
  --brass-lo: #7a5520;
  --rivet: #8a6a2f;
  --display: "Cinzel", "Trajan Pro", Georgia, "Times New Roman", serif;
  color-scheme: dark;
}

body {
  background:
    radial-gradient(1200px 700px at 50% -10%, #2a2015 0%, transparent 60%),
    radial-gradient(900px 600px at 100% 100%, #1c160e 0%, transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
a { color: var(--accent); }
a:hover { color: var(--brass-hi); }
h1, h2, h3, .brand { font-family: var(--display); letter-spacing: 0.04em; }
h1 { color: var(--brass-hi); font-weight: 700; }
h2 { color: var(--accent); font-weight: 700; font-size: 1.05rem; text-transform: uppercase; }
h3 { color: var(--brass-hi); font-weight: 500; }
code { background: #0f0c08; color: var(--brass-hi); border: 1px solid var(--border); }

/* top bar: dark walnut with a double brass rule */
.topbar {
  background: linear-gradient(#211a11, #18130c);
  border-bottom: 1px solid var(--brass-lo);
  box-shadow: 0 2px 0 #0d0a06, 0 3px 0 var(--brass-lo);
}
.brand { color: var(--brass-hi); font-size: 1.1rem; font-weight: 700; }
.brand-mark { width: 28px; height: 28px; color: var(--accent); }
nav a, .linklike { color: var(--text); }
nav a:hover, .linklike:hover { color: var(--brass-hi); }
nav a[aria-current=page] { color: var(--brass-hi); text-decoration: underline; text-decoration-color: var(--brass); text-underline-offset: 6px; }

/* panels: brass-edged plates with a rivet in each corner */
.card {
  background:
    radial-gradient(circle at 9px 9px, var(--rivet) 2px, #3a2c15 2.6px, transparent 3.2px),
    radial-gradient(circle at calc(100% - 9px) 9px, var(--rivet) 2px, #3a2c15 2.6px, transparent 3.2px),
    radial-gradient(circle at 9px calc(100% - 9px), var(--rivet) 2px, #3a2c15 2.6px, transparent 3.2px),
    radial-gradient(circle at calc(100% - 9px) calc(100% - 9px), var(--rivet) 2px, #3a2c15 2.6px, transparent 3.2px),
    linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 rgba(255, 220, 150, 0.07), inset 0 0 0 3px #17120b, inset 0 0 0 4px #3a2e19, 0 8px 24px rgba(0, 0, 0, 0.35);
}

/* buttons: polished brass */
.btn {
  background: linear-gradient(180deg, var(--brass-hi), var(--brass) 55%, #a87a2c);
  color: var(--accent-text);
  border: 1px solid #5c4319;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 1px 2px rgba(0, 0, 0, 0.5);
  font-family: var(--display);
  letter-spacing: 0.05em;
  border-radius: 4px;
}
.btn:hover { filter: brightness(1.07); color: var(--accent-text); }
.btn.ghost { background: transparent; color: var(--accent); border-color: var(--brass-lo); box-shadow: none; }
.btn.ghost:hover { color: var(--brass-hi); border-color: var(--brass); }
.btn.danger { background: linear-gradient(180deg, #e2856b, #b84a33 60%, #8e3221); border-color: #5c2014; color: #fff3ea; }

tr.current td { background: rgba(214, 171, 71, 0.1); }
input[type=email], input[type=password], input[type=text], input[type=number], select {
  background: #120e09; border-color: var(--border); color: var(--text);
}
input:focus-visible, button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
fieldset.choice { border-color: var(--border); }

.pill { border: 1px solid rgba(214, 171, 71, 0.25); background: #2a2216; color: var(--brass-hi); }
.pill.ok { background: var(--ok-bg); color: var(--pos); border-color: #2f5a36; }
.pill.warn { background: var(--warn-bg); color: var(--warn-text); border-color: #6b5419; }
.pill.live, .pill.neg-pill { background: var(--err-bg); color: var(--neg); border-color: #6e2e20; }
.pill.practice { background: #1d2430; color: #a9c4ec; border-color: #33435c; }
.pill.ai { background: #2b2140; color: #cdb8ff; border-color: #4a3b6b; }

.status { font-family: var(--display); letter-spacing: 0.04em; }
.stats .label { text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.7rem; }
.stats .value { color: var(--brass-hi); }
.stats .value.pos, .stats .value .pos { color: var(--pos); }
.stats .value.neg, .stats .value .neg { color: var(--neg); }
th { color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.7rem; }
th, td { padding: 6px 7px; }
td { font-size: 0.92rem; }
.grid.desk-row { grid-template-columns: minmax(300px, 1fr) minmax(380px, 1.3fr); }
@media (max-width: 860px) { .grid.desk-row { grid-template-columns: 1fr; } }
th, td { border-bottom-color: #33291a; }
.events li { border-bottom-color: #33291a; }
.flash { border: 1px solid var(--border); }
.footer { color: #8f805f; }

/* --- dashboard: the chronograph panel --- */
.chrono-panel { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, 1fr); gap: 28px; align-items: start; padding: 24px; }
@media (max-width: 860px) { .chrono-panel { grid-template-columns: 1fr; padding: 16px; } }
.chrono { max-width: 600px; margin: 0 auto; }
.chrono svg { width: 100%; height: auto; display: block; overflow: visible; }
.control-col h2.spaced { margin-top: 22px; }
.control-col .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.chrono-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; margin-top: 10px; color: var(--muted); }
.chrono-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chrono-legend .dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.chrono-legend .dot.win { background: #2f8f5b; }
.chrono-legend .dot.loss { background: #c0472f; }
.chrono-legend .dot.open { background: #e0a419; }
.chrono-legend .dot.veto { border: 2px solid #b9a277; width: 8px; height: 8px; }
.chrono-legend .bar { width: 16px; height: 6px; border-radius: 3px; display: inline-block; }
.chrono-legend .muted { flex-basis: 100%; text-align: center; }

/* dial */
.chrono .brass-hi { stop-color: #f6e19c; }
.chrono .brass-mid { stop-color: #c99a3b; }
.chrono .brass-lo { stop-color: #6e4c1b; }
.chrono .face-hi { stop-color: #fbf4e2; }
.chrono .face-lo { stop-color: #e4d2a6; }
.chrono .bezel { stroke: #4a3412; stroke-width: 1.5; }
.chrono .bezel-groove { fill: none; stroke: #5c4319; stroke-width: 2; opacity: 0.8; }
.chrono .face { stroke: #8a6a2f; stroke-width: 1; }
.chrono .track { fill: none; stroke: #c9b27d; stroke-width: 1; stroke-dasharray: 2 4; }
.chrono .tick-minor { stroke: #7d6a4a; stroke-width: 1; }
.chrono .tick-hour { stroke: #4a3a22; stroke-width: 1.6; }
.chrono .tick-major { stroke: #2b2114; stroke-width: 3; stroke-linecap: round; }
.chrono .numeral { font-family: var(--display); font-size: 17px; font-weight: 700; fill: #3b2c16; text-anchor: middle; dominant-baseline: central; }

.chrono .session { opacity: 0.62; stroke: rgba(43, 33, 20, 0.25); stroke-width: 0.6; }
.chrono .session:hover { opacity: 0.95; }
.s-sydney { fill: #7f9cc4; background: #7f9cc4; }
.s-tokyo { fill: #c78aa3; background: #c78aa3; }
.s-london { fill: #87b384; background: #87b384; }
.s-newyork { fill: #d7a24f; background: #d7a24f; }

.chrono .sub-face { fill: #f3e6c4; stroke: #9c7a3c; stroke-width: 1.4; }
.chrono .sub-sweep { fill: none; stroke: #b39457; stroke-width: 1.4; }
.chrono .sub-zone { fill: none; stroke: #c0472f; stroke-width: 4; stroke-linecap: round; }
.chrono .sub-tick { stroke: #6b5530; stroke-width: 1.1; }
.chrono .sub-needle { stroke: #7a1f12; stroke-width: 2.2; stroke-linecap: round; }
.chrono .sub-hub { fill: #3b2c16; }
.chrono .sub-value { font-size: 13px; font-weight: 700; fill: #2b2114; text-anchor: middle; font-variant-numeric: tabular-nums; }
.chrono .sub-label { font-family: var(--display); font-size: 8.5px; letter-spacing: 0.12em; text-transform: uppercase; fill: #6b5530; text-anchor: middle; }
.chrono .subdial.pos .sub-value { fill: #22774a; }
.chrono .subdial.neg .sub-value { fill: #a33a25; }

.chrono .readout-frame { fill: url(#brass); stroke: #4a3412; stroke-width: 1; }
.chrono .readout-glass { fill: #fbf6e8; stroke: #8a6a2f; stroke-width: 0.8; filter: drop-shadow(0 1px 1.5px rgba(60, 40, 10, 0.35)); }
.chrono .centre-label { font-family: var(--display); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; fill: #6b5530; text-anchor: middle; }
.chrono .centre-value { font-size: 31px; font-weight: 800; fill: #2b2114; text-anchor: middle; font-variant-numeric: tabular-nums; }
.chrono .centre-value.pos { fill: #22774a; }
.chrono .centre-value.neg { fill: #a33a25; }
.chrono .centre-sub { font-size: 12px; fill: #5a4728; text-anchor: middle; }

.chrono .marker { stroke: #fbf4e2; stroke-width: 1.6; cursor: help; }
.chrono .marker.win { fill: #2f8f5b; }
.chrono .marker.loss { fill: #c0472f; }
.chrono .marker.flat { fill: #8a7a5a; }
.chrono .marker.open { fill: #e0a419; animation: cw-pulse 2.4s ease-in-out infinite; }
.chrono .marker.veto circle { fill: #fbf4e2; stroke: #7d6a4a; stroke-width: 1.6; }
.chrono .marker.veto line { stroke: #7d6a4a; stroke-width: 1.6; stroke-linecap: round; }
.chrono .marker:focus { outline: none; stroke: #1f6feb; stroke-width: 3; }

.chrono .hand-shaft { stroke: #1d140a; stroke-width: 3.4; stroke-linecap: round; }
.chrono .hand-tail { stroke: #1d140a; stroke-width: 6; stroke-linecap: round; }
.chrono .hand-tip { fill: #a8321f; stroke: #5a1709; stroke-width: 0.8; }
.chrono .hand { transition: transform 0.6s ease; }
.chrono .hub { fill: url(#brass); stroke: #4a3412; stroke-width: 1.2; }
.chrono .hub-pin { fill: #2b2114; }

.chrono .halo, .chrono .copper-ring, .chrono .studs { display: none; }  /* time-machine parts */

.chrono .gear { fill: #3a2e1b; stroke: #6b5427; stroke-width: 1.4; transform-box: fill-box; transform-origin: center; }
.chrono .g1 { animation: cw-spin 90s linear infinite; }
.chrono .g2 { animation: cw-spin 64s linear infinite reverse; }
.chrono .g3 { animation: cw-spin 110s linear infinite reverse; }
.chrono .g4 { animation: cw-spin 52s linear infinite; }

@keyframes cw-spin { to { transform: rotate(360deg); } }
@keyframes cw-pulse { 0%, 100% { stroke-opacity: 1; stroke-width: 1.6; } 50% { stroke-opacity: 0.4; stroke-width: 5; } }
@media (prefers-reduced-motion: reduce) {
  .chrono .gear, .chrono .marker.open { animation: none; }
  .chrono .hand { transition: none; }
}

/* scenarios in brass */
.fan svg { background: rgba(0, 0, 0, 0.18); border: 1px solid var(--border); border-radius: 4px; }
.fan .band-outer, .fan .band-inner { fill: #d6ab47; }
.fan .median { stroke: #f3d98b; }
.sc-label { color: var(--accent); font-family: var(--display); }
.scenario-group h3 { color: var(--brass-hi); }

/* AI desk & checklist in brass */
.briefs .who { color: var(--accent); font-family: var(--display); }
.op { border-color: var(--border); background: rgba(0, 0, 0, 0.18); }
.scan { border-left-color: var(--brass-lo); }
.check-mark { border: 1px solid var(--border); font-family: var(--display); }
details.review summary:hover { background: rgba(214, 171, 71, 0.05); }
