/* contractfights theme.
   Public pages: black, unbranded, dominated by a giant ominous deadline clock
   (red monospace digits — deliberately not the union palette). The union colors
   (navy PMS 294 / gold PMS 122) survive only as small accents and in the admin. */
:root {
  --navy: #002f6c;
  --gold: #fed141;
  --gold-2: #e8b100;
  --paper: #f5f6f8;
  --ink: #111111;
  --muted: #5b6470;
  --alert: #c8102e;
  --black: #050506;
  --white: #f4f6fa;
  --dim: #8b8f99;
  --clock-red: #ff2b2b;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "SF Mono", "SFMono-Regular", ui-monospace, "Roboto Mono", "Consolas", "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--black); }
body { font-family: var(--font); color: var(--white); line-height: 1.4; -webkit-text-size-adjust: 100%; }
a { color: var(--gold); }

.kicker { text-transform: uppercase; letter-spacing: .14em; font-weight: 800; font-size: .8rem; color: var(--gold-2); }
.muted { color: var(--muted); }
.err { color: var(--alert); font-weight: 700; }
.ok { color: #0a7d33; font-weight: 700; }

/* ---------- buttons (admin / auth) ---------- */
.btn {
  display: inline-block;
  background: var(--navy);
  color: var(--white);
  border: 2px solid var(--navy);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: .7rem 1.3rem;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  font-size: 1rem;
}
.btn:hover { background: #001f47; }
.btn.ghost { background: transparent; color: var(--navy); }
.btn.ghost:hover { background: var(--navy); color: var(--white); }
.btn.small { padding: .35rem .8rem; font-size: .82rem; }

/* ---------- public station / bare-domain page (dark, ominous) ---------- */
.fight {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(120% 85% at 50% 42%, rgba(200,16,46,.16) 0%, rgba(200,16,46,0) 55%),
    var(--black);
}
.fight.expired {
  background:
    radial-gradient(120% 90% at 50% 42%, rgba(200,16,46,.36) 0%, rgba(200,16,46,0) 60%),
    #0a0405;
}
.stationno {
  position: absolute;
  top: 1rem;
  right: 1.1rem;
  font-family: var(--mono);
  color: #4a4d57;
  font-size: .85rem;
  letter-spacing: .15em;
}
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 1.4rem;
  padding: 2rem 1.1rem;
}
.saying {
  color: var(--white);
  font-size: clamp(1.4rem, 5.6vw, 2.4rem);
  line-height: 1.08;
  text-transform: uppercase;
  letter-spacing: .01em;
  font-weight: 800;
  margin: 0;
  max-width: 16ch;
  text-wrap: balance;
}
.subhead { color: var(--dim); font-size: clamp(.95rem, 3vw, 1.2rem); font-weight: 600; margin: -.7rem 0 0; max-width: 30ch; }

/* the giant clock */
.bigclock { display: flex; flex-wrap: wrap; justify-content: center; gap: .1rem 1rem; }
.cd-unit { min-width: 112px; text-align: center; }
.cd-num {
  font-family: var(--mono);
  font-weight: 800;
  line-height: .92;
  font-size: clamp(3.2rem, 22vw, 8.5rem);
  color: var(--clock-red);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 18px rgba(255,43,43,.6), 0 0 55px rgba(255,43,43,.3);
}
.cd-label { text-transform: uppercase; font-size: .62rem; letter-spacing: .28em; font-weight: 700; color: #7a7d87; margin-top: .35rem; }
.dl-note { color: var(--dim); text-transform: uppercase; letter-spacing: .16em; font-size: .7rem; font-weight: 700; margin: .2rem 0 0; }

/* deadline flip */
.bigclock.expired { flex-direction: column; align-items: center; gap: .5rem; }
.cd-expired-msg {
  color: #fff;
  background: var(--alert);
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(1.5rem, 6vw, 2.8rem);
  padding: .7rem 1.3rem;
  border-radius: 8px;
  text-align: center;
  letter-spacing: .02em;
  box-shadow: 0 0 40px rgba(200,16,46,.5);
}
.cd-elapsed { font-family: var(--mono); color: #ff8a8a; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .85rem; }

/* 2-day rotation micro-bar */
.rot { width: min(300px, 72vw); margin-top: .3rem; }
.rot-track { height: 5px; background: rgba(255,255,255,.12); border-radius: 99px; overflow: hidden; }
.rot-bar { height: 100%; width: 0; background: var(--gold); transition: width 1s linear; }
.rot-next { margin-top: .5rem; font-size: .62rem; text-transform: uppercase; letter-spacing: .14em; font-weight: 700; color: #6d707a; }

/* ---------- auth (light card on the dark ground) ---------- */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; }
.auth-card {
  background: #fff;
  color: var(--ink);
  border-top: 6px solid var(--gold);
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0,0,0,.5);
  padding: 2.2rem;
  width: 100%;
  max-width: 420px;
}
.auth-card a, .admin-wrap a { color: var(--navy); }
.auth-card h1 { color: var(--navy); margin: .4rem 0 .8rem; }
.auth-card label, .edit-form label { display: block; font-weight: 700; margin: 1rem 0 .3rem; color: var(--navy); }
.auth-card input, .edit-form input[type=text], .edit-form input[type=password], .edit-form textarea {
  width: 100%; padding: .7rem; border: 1px solid #c7cdd6; border-radius: 5px; font-size: 1rem; font-family: inherit;
}
.auth-card .btn { width: 100%; margin-top: 1.4rem; }

/* ---------- admin (light sheet on the dark ground) ---------- */
.admin-wrap {
  background: var(--paper);
  color: var(--ink);
  max-width: 1000px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 2rem 1.5rem 4rem;
  box-shadow: 0 0 80px rgba(0,0,0,.6);
}
.admin-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.head-actions { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.admin-head h1 { color: var(--navy); margin: .3rem 0; }
.asset-btns { display: flex; gap: .5rem; flex-wrap: wrap; }
.admin-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 6px; overflow: hidden; }
.admin-table th, .admin-table td { text-align: left; padding: .7rem .8rem; border-bottom: 1px solid #e5e8ec; }
.admin-table th { background: var(--navy); color: var(--white); text-transform: uppercase; font-size: .75rem; letter-spacing: .08em; }
.admin-table .num { font-weight: 900; color: var(--gold-2); }
.admin-table .hl { font-weight: 700; color: var(--navy); }
.admin-table .assets a { margin-right: .8rem; font-weight: 700; }
.pill { font-size: .72rem; font-weight: 800; text-transform: uppercase; padding: .2rem .6rem; border-radius: 20px; letter-spacing: .05em; }
.pill.live { background: #0a7d33; color: #fff; }
.pill.draft { background: #e5e8ec; color: var(--muted); }
.edit-form { background: #fff; padding: 1.6rem; border-radius: 8px; border-top: 4px solid var(--gold); max-width: 720px; }
.edit-form .check { display: flex; align-items: center; gap: .5rem; font-weight: 700; }
.edit-form .check input { width: auto; }
.edit-form .btn { margin-top: 1.4rem; }
.settings-bar { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; background: #fff; border: 1px solid #e5e8ec; border-left: 4px solid var(--gold); border-radius: 8px; padding: .9rem 1.1rem; margin-bottom: 1.4rem; }
.settings-bar label { font-weight: 700; color: var(--navy); display: flex; align-items: center; gap: .6rem; }
.settings-input { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; color: var(--ink); }
.settings-bar input[type=number] { width: 5rem; padding: .45rem .5rem; border: 1px solid #c7cdd6; border-radius: 5px; font-size: 1rem; }
.settings-hint { color: var(--muted); font-size: .82rem; flex: 1 1 14rem; }

/* ---------- stats dashboard ---------- */
.empty-note { background: #fff; border: 1px solid #e5e8ec; border-left: 4px solid var(--gold); border-radius: 8px; padding: 1rem 1.2rem; color: var(--muted); margin-bottom: 1.4rem; }
.small { font-size: .85rem; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; margin-bottom: 1.6rem; }
.kpi { background: #fff; border: 1px solid #e5e8ec; border-top: 3px solid var(--navy); border-radius: 8px; padding: 1.1rem 1.2rem; }
.kpi-val { font-size: 2.1rem; font-weight: 900; color: var(--navy); line-height: 1; font-variant-numeric: tabular-nums; }
.kpi-lbl { margin-top: .4rem; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: var(--muted); }

.card-block { background: #fff; border: 1px solid #e5e8ec; border-radius: 8px; padding: 1.2rem 1.3rem; margin-bottom: 1.4rem; }
.card-block h2 { color: var(--navy); font-size: 1.05rem; margin: 0 0 1rem; }
.card-block h2 .muted { font-weight: 500; font-size: .85rem; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
@media (max-width: 640px) { .two-col { grid-template-columns: 1fr; } }

/* area trend */
.trend { width: 100%; height: auto; display: block; overflow: visible; }
.trend-area { fill: rgba(0,47,108,.12); stroke: none; }
.trend-line { fill: none; stroke: var(--navy); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.trend-dot { fill: var(--navy); }
.trend-dot:last-of-type { fill: var(--gold-2); }
.trend-hit { fill: transparent; }
.trend-hit:hover { fill: rgba(0,47,108,.06); }
.trend-xlabel { fill: var(--muted); font-size: 10px; text-anchor: middle; font-family: var(--mono); }

/* horizontal bars (single-hue magnitude; identity carried by the text label) */
.bars { display: flex; flex-direction: column; gap: .45rem; }
.bar-row { display: grid; grid-template-columns: 3.2rem 1fr 2.6rem; align-items: center; gap: .7rem; }
.bar-row.wide { grid-template-columns: 14rem 1fr 2.6rem; }
@media (max-width: 560px) { .bar-row.wide { grid-template-columns: 8rem 1fr 2.4rem; } }
.bar-label { font-size: .82rem; color: var(--ink); font-weight: 600; }
.bar-label.mono { font-family: var(--mono); color: var(--gold-2); font-weight: 800; }
.bar-label.cap { text-transform: capitalize; }
.bar-label.ell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { background: #eef1f5; border-radius: 5px; height: 16px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--navy); border-radius: 5px; min-width: 2px; }
.bar-val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 800; color: var(--navy); font-size: .9rem; }

/* ---------- footer (admin) ---------- */
.site-foot { background: var(--navy); color: var(--gold); text-align: center; padding: 1rem; font-weight: 700; letter-spacing: .04em; margin-top: 2rem; }
.site-foot .foot-dot { margin: 0 .5rem; color: var(--white); }
