/* nerofish app + admin. Tokens first: light on :root, dark via media query and data-theme. */
:root {
  --bg: #f5f6fb;
  --surface: #ffffff;
  --surface-2: #f0f2f8;
  --text: #151729;
  --muted: #5d6580;
  --border: #e1e4ee;
  --accent: #6446f5;
  --accent-2: #0891b2;
  --accent-soft: rgba(100, 70, 245, 0.1);
  --accent-text: #ffffff;
  --good: #16803c;
  --warn: #b25e09;
  --bad: #c42b36;
  --band: rgba(100, 70, 245, 0.16);
  --history: #7a8199;
  --shadow: 0 1px 2px rgba(20, 23, 41, 0.05), 0 8px 24px rgba(20, 23, 41, 0.06);
  /* crowd map */
  --sea-top: #dfe9fb; --sea-bottom: #cadbf5; --land: #f1f2f6; --land-hi: #ece6ff; --land-border: #b6bdd0;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0b12; --surface: #13151f; --surface-2: #1a1d2b; --text: #eceef6; --muted: #979fb8;
    --border: #262a3b; --accent: #8b74ff; --accent-2: #22c3e6; --accent-soft: rgba(139, 116, 255, 0.14);
    --accent-text: #0a0b12; --good: #3fbf6b; --warn: #e3a341; --bad: #f0616b; --band: rgba(139, 116, 255, 0.22);
    --history: #8e96ad; --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 30px rgba(0, 0, 0, 0.35);
    --sea-top: #0d1426; --sea-bottom: #080c18; --land: #1b2030; --land-hi: #2d2656; --land-border: #323a52;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a0b12; --surface: #13151f; --surface-2: #1a1d2b; --text: #eceef6; --muted: #979fb8;
  --border: #262a3b; --accent: #8b74ff; --accent-2: #22c3e6; --accent-soft: rgba(139, 116, 255, 0.14);
  --accent-text: #0a0b12; --good: #3fbf6b; --warn: #e3a341; --bad: #f0616b; --band: rgba(139, 116, 255, 0.22);
  --history: #8e96ad; --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 30px rgba(0, 0, 0, 0.35);
  --sea-top: #0d1426; --sea-bottom: #080c18; --land: #1b2030; --land-hi: #2d2656; --land-border: #323a52;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.55 Inter, system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: "Space Grotesk", Inter, system-ui, sans-serif; letter-spacing: -0.02em; text-wrap: balance; margin: 0; }
h3 { font-size: 16px; }
a { color: var(--accent); }
a.brand { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 10px max(16px, calc((100vw - 1240px) / 2)); background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 9px; font: 700 19px "Space Grotesk", sans-serif; letter-spacing: -0.02em; }
.logo-mark {
  width: 20px; height: 20px; border-radius: 50%;
  background: conic-gradient(from 200deg, #7c5cff, #22d3ee, #f472b6, #7c5cff);
}
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.seg button {
  font: inherit; font-size: 14px; font-weight: 500; color: var(--muted); background: none; border: 0; border-radius: 9px;
  padding: 7px 14px; cursor: pointer; display: inline-flex; align-items: center; gap: 7px;
}
.seg button svg { width: 16px; height: 16px; }
.seg button[aria-selected="true"] { color: var(--text); background: var(--surface); box-shadow: var(--shadow); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 999px; font-size: 13px;
  background: var(--surface); border: 1px solid var(--border); color: var(--muted); white-space: nowrap;
}
.chip b { color: var(--text); font-weight: 600; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.dot.ok { background: var(--good); box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 20%, transparent); }
.dot.off { background: var(--warn); }
.icon-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 10px; font-size: 13px;
  color: var(--text); text-decoration: none; border: 1px solid var(--border); background: var(--surface);
}
.icon-btn svg { width: 15px; height: 15px; }
.icon-btn:hover { border-color: var(--accent); }

/* ---------- Layout ---------- */
.wrap { max-width: 1240px; margin: 0 auto; padding: 24px 16px 40px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); }
.ev-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.ev-main { display: grid; gap: 20px; min-width: 0; }
.side { padding: 18px; position: sticky; top: 76px; }
.side h2 { font-size: 15px; margin-bottom: 10px; }
.view-head { display: grid; gap: 4px; margin-bottom: 16px; }
.view-head h1 { font-size: 26px; }
.view-head p { margin: 0; color: var(--muted); max-width: 70ch; }

/* ---------- Ask box ---------- */
.ask { padding: 26px; display: grid; gap: 16px; position: relative; overflow: hidden; }
.ask::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, #7c5cff, #22d3ee, #f472b6);
}
.ask h1 { font-size: clamp(24px, 3vw, 32px); }
.ask-sub { margin: -8px 0 0; color: var(--muted); max-width: 70ch; }
.ask-row { display: flex; gap: 10px; flex-wrap: wrap; }
.ask-row input {
  flex: 1 1 320px; min-width: 0; font: inherit; font-size: 17px; padding: 14px 16px; border-radius: 12px;
  border: 1.5px solid var(--border); background: var(--bg); color: var(--text); transition: border-color 0.2s, box-shadow 0.2s;
}
.ask-row input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ask-extra { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: -4px; }
.date-label { flex-direction: row; font-size: 13.5px; color: var(--text); font-weight: 600; }
.ask-extra input[type="date"] { padding: 7px 10px; }
.ask-extra .meta { flex: 1 1 260px; }
.method-note { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.timeline { width: 100%; height: auto; }
.tl-grid { stroke: var(--border); stroke-width: 1; }
.tl-line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.tl-dot { stroke: var(--surface); stroke-width: 2; }
.tl-tick { fill: var(--muted); font-size: 11px; }
.chips button {
  font: inherit; font-size: 13px; color: var(--text); background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 999px; padding: 6px 12px; cursor: pointer; transition: border-color 0.15s, background 0.15s;
}
.chips button:hover { border-color: var(--accent); background: var(--accent-soft); }
.chips-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }

.preview {
  display: grid; gap: 10px; padding: 14px 16px; border-radius: 12px; background: var(--surface-2);
  border: 1px dashed var(--border); font-size: 14px;
}
.preview-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.preview-head svg { width: 16px; height: 16px; color: var(--accent); flex: none; }
.preview-head b { font-weight: 600; }
.preview-head .muted { font-size: 13px; }
.mix-bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--border); }
.mix-bar span { height: 100%; transition: width 0.5s ease; }
.mix-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--muted); }
.mix-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; }

details.adv { border-top: 1px solid var(--border); padding-top: 12px; }
details.adv summary { cursor: pointer; color: var(--muted); font-size: 14px; font-weight: 500; }
.adv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-top: 14px; }
.adv-grid .wide { grid-column: 1 / -1; }
.range-row { display: flex; align-items: center; gap: 10px; }
.range-row input { flex: 1; accent-color: var(--accent); }
.range-row output { min-width: 34px; font-variant-numeric: tabular-nums; color: var(--text); font-weight: 600; }

/* ---------- Generic controls (shared with admin) ---------- */
label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--muted); font-weight: 500; }
label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--text); }
label.check input { accent-color: var(--accent); width: 16px; height: 16px; }
input, select, textarea {
  font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
  padding: 9px 11px; min-width: 0;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[type="range"] { padding: 0; border: 0; background: none; box-shadow: none; }
textarea { width: 100%; resize: vertical; }
select { min-width: 150px; }
button { font: inherit; }
button.primary, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, var(--accent-2)));
  color: #fff; border: 0; border-radius: 12px; padding: 10px 20px; font-weight: 600; cursor: pointer;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 35%, transparent); transition: transform 0.15s, box-shadow 0.15s;
  text-decoration: none;
}
button.primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 10px 24px color-mix(in srgb, var(--accent) 45%, transparent); }
button.primary:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; }
button.primary.big { padding: 14px 26px; font-size: 16px; }
button.ghost, .stack button:not(.primary), .input-row button, .row > button:not(.primary):not(.link) {
  display: inline-flex; align-items: center; gap: 7px; background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: 10px; padding: 8px 14px; cursor: pointer; font-size: 14px;
}
button.ghost:hover { border-color: var(--accent); }
button.ghost svg { width: 15px; height: 15px; }
button.link { background: none; border: 0; color: var(--accent); cursor: pointer; padding: 6px 0; font-weight: 500; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.muted { color: var(--muted); font-weight: normal; }
.meta { color: var(--muted); font-size: 13px; margin: 0; }
.out:empty { display: none; }
.error {
  color: var(--bad); background: color-mix(in srgb, var(--bad) 8%, transparent); border: 1px solid color-mix(in srgb, var(--bad) 30%, transparent);
  border-radius: 10px; padding: 10px 14px; margin: 0;
}
.error a { color: inherit; font-weight: 600; }
.success { color: var(--good); margin: 0; }
.spinner { color: var(--muted); display: flex; align-items: center; gap: 10px; margin: 0; }
.spinner::before {
  content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--border); border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
code { font: 12.5px ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--surface-2); border: 1px solid var(--border); border-radius: 5px; padding: 1px 5px; }

/* ---------- Live stage (map) ---------- */
.stage { padding: 18px; display: grid; gap: 12px; }
.stage-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: 14px; }
.where { font-weight: 600; }
.live { color: var(--muted); font-variant-numeric: tabular-nums; }
.live b { color: var(--text); }
.progress { height: 4px; border-radius: 999px; background: var(--border); overflow: hidden; }
.progress > div { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width 0.4s ease; }
.map-box { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); }
.map-box canvas { display: block; width: 100%; }
.map-tip {
  position: absolute; max-width: 240px; padding: 8px 10px; font-size: 12px; line-height: 1.4; pointer-events: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow); color: var(--text);
}
.legend {
  position: absolute; right: 10px; bottom: 10px; display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600;
  color: var(--muted); background: var(--surface); padding: 4px 8px; border-radius: 6px; opacity: 0.92;
}
.legend i { width: 70px; height: 6px; border-radius: 3px; background: linear-gradient(90deg, rgb(207,34,46), rgb(219,150,30), rgb(26,150,65)); }
.feed { list-style: none; padding: 0; margin: 0; max-height: 170px; overflow-y: auto; font-size: 13px; }
.feed li { display: flex; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border); animation: slide-in 0.35s ease-out; }
.feed .pct { font-weight: 700; min-width: 40px; font-variant-numeric: tabular-nums; }
.feed .who { color: var(--muted); white-space: nowrap; }
@keyframes slide-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---------- Loader ---------- */
.loader { padding: 20px 22px; display: grid; gap: 16px; }
.loader-head { display: flex; align-items: center; gap: 12px; }
.loader-head b { font-size: 15.5px; }
.loader-time { margin-left: auto; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.loader-orb {
  width: 18px; height: 18px; border-radius: 50%; flex: none;
  background: conic-gradient(from 0deg, var(--accent), var(--accent-2), #f472b6, var(--accent));
  box-shadow: 0 0 16px color-mix(in srgb, var(--accent) 55%, transparent); animation: spin 1.4s linear infinite;
}
.loader-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.loader-steps li { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 10px; align-items: center;
  font-size: 14px; color: var(--muted); transition: color 0.3s; }
.ld-icon { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--border); position: relative; }
.loader-steps li.active { color: var(--text); font-weight: 600; }
.loader-steps li.active .ld-icon { border-color: var(--border); border-top-color: var(--accent); animation: spin 0.8s linear infinite; }
.loader-steps li.done { color: var(--text); }
.loader-steps li.done .ld-icon { border-color: var(--good); background: var(--good); animation: pop-in 0.25s ease-out; }
.loader-steps li.done .ld-icon::after { content: ""; position: absolute; left: 4.5px; top: 1.5px; width: 4px; height: 8px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
@keyframes pop-in { from { transform: scale(0.6); } }
.ld-detail { font-size: 12.5px; color: var(--muted); font-weight: 400; font-variant-numeric: tabular-nums; text-align: right; }
.skeleton { display: grid; gap: 12px; }
.sk { height: 72px; border-radius: 12px; background: linear-gradient(90deg, var(--surface-2) 25%, var(--border) 50%, var(--surface-2) 75%);
  background-size: 200% 100%; animation: sk-shimmer 1.4s ease-in-out infinite; }
.sk-big { height: 96px; }
.sk-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@keyframes sk-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* ---------- Event result ---------- */
.result { display: grid; gap: 20px; animation: rise 0.5s ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.verdict { padding: 24px; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; }
.verdict-q { font-size: 14px; color: var(--muted); margin: 0 0 6px; }
.reused { font-size: 12.5px; margin: -2px 0 8px; color: var(--accent); }
.share-btn { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)) !important; }
.shared-note { padding: 12px 16px; border-radius: 12px; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); font-size: 14px; }
.verdict-num { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.verdict-num .pct { font: 700 64px/1 "Space Grotesk", sans-serif; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.verdict-num .word { font: 600 22px "Space Grotesk", sans-serif; }
.scale { position: relative; height: 12px; border-radius: 999px; margin: 18px 0 6px;
  background: linear-gradient(90deg, rgb(207,34,46), rgb(219,150,30) 50%, rgb(26,150,65)); }
.scale .mark { position: absolute; top: -5px; width: 4px; height: 22px; border-radius: 2px; background: var(--text);
  box-shadow: 0 0 0 3px var(--surface); transform: translateX(-2px); transition: left 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); }
.scale .mark.alt { background: var(--muted); height: 14px; top: -1px; }
.scale-labels { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.verdict-side { display: grid; gap: 12px; align-content: start; }
.compare-row { display: grid; grid-template-columns: 90px 1fr 48px; align-items: center; gap: 10px; font-size: 14px; }
.compare-row .bar { height: 8px; background: var(--border); border-radius: 999px; overflow: hidden; }
.compare-row .bar div { height: 100%; border-radius: inherit; }
.compare-row b { text-align: right; font-variant-numeric: tabular-nums; }
.agree { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; font-size: 13.5px; }
.agree svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.agree.good { background: color-mix(in srgb, var(--good) 10%, transparent); color: var(--good); }
.agree.warn { background: color-mix(in srgb, var(--warn) 12%, transparent); color: var(--warn); }
.agree span { color: var(--text); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.panel-card { padding: 20px; display: grid; gap: 14px; align-content: start; }
.panel-card h3 { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.panel-card h3 small { font: 400 12.5px Inter, sans-serif; color: var(--muted); }
.hist { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; align-items: end; height: 120px; }
.hist div { border-radius: 4px 4px 0 0; min-height: 2px; position: relative; transition: height 0.6s ease; }
.hist div span { position: absolute; top: -17px; left: 0; right: 0; text-align: center; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.hist-axis { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.quotes { display: grid; gap: 10px; }
.quote { padding: 10px 12px; border-radius: 10px; background: var(--surface-2); font-size: 14px; border-left: 3px solid var(--q); }
.quote .who { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; }
.quote-head { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--q); }
.groups { display: grid; gap: 8px; }
.group-row { display: grid; grid-template-columns: minmax(0, 1.3fr) 36px minmax(0, 2fr) 42px; gap: 10px; align-items: center; font-size: 13.5px; }
.group-row .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.group-row .n { color: var(--muted); font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; }
.group-row .track { height: 8px; background: var(--border); border-radius: 999px; position: relative; }
.group-row .track div { position: absolute; inset: 0 auto 0 0; border-radius: inherit; }
.group-row b { text-align: right; font-variant-numeric: tabular-nums; }
.tabs-mini { display: inline-flex; gap: 2px; padding: 2px; border-radius: 8px; background: var(--surface-2); }
.tabs-mini button { font-size: 12.5px; border: 0; background: none; color: var(--muted); padding: 4px 10px; border-radius: 6px; cursor: pointer; }
.tabs-mini button[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.reasoning p { margin: 0; }
.reasoning ul { margin: 0; padding-left: 18px; }
.news li { margin-bottom: 4px; }
.fineprint { font-size: 12.5px; color: var(--muted); margin: 0; }

/* ---------- History ---------- */
.history { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.history button {
  width: 100%; text-align: left; display: grid; grid-template-columns: 44px 1fr; gap: 10px; align-items: center;
  background: none; border: 1px solid transparent; border-radius: 10px; padding: 8px; cursor: pointer; color: var(--text);
}
.history button:hover { background: var(--surface-2); border-color: var(--border); }
.history .h-pct { font: 700 16px "Space Grotesk", sans-serif; text-align: center; font-variant-numeric: tabular-nums; }
.history .h-q { font-size: 13px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.history .h-meta { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.side-empty { font-size: 13px; color: var(--muted); margin: 0; }
.side-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }

/* ---------- Data views (time series, tabular) ---------- */
.data-card { padding: 22px; display: grid; gap: 16px; }
.drop {
  display: grid; place-items: center; gap: 6px; text-align: center; padding: 26px 16px; border-radius: 14px; cursor: pointer;
  border: 2px dashed var(--border); background: var(--surface-2); color: var(--muted); transition: border-color 0.2s, background 0.2s;
}
.drop svg { width: 28px; height: 28px; color: var(--accent); }
.drop b { color: var(--text); font-size: 15px; }
.drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop .file-name { color: var(--accent); font-weight: 600; }
.controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.stat { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; background: var(--surface); }
.stat .k { font-size: 12.5px; color: var(--muted); }
.stat .v { font: 600 24px "Space Grotesk", sans-serif; font-variant-numeric: tabular-nums; margin-top: 2px; }
.stat .s { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.up { color: var(--good); } .down { color: var(--bad); }
.chart-box { position: relative; height: 360px; }
.chart-box:not(.on) { display: none; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; }
table { border-collapse: collapse; width: 100%; font-size: 13.5px; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
th { color: var(--muted); font-weight: 600; background: var(--surface-2); font-size: 12.5px; }
td.target, th.target { background: var(--accent-soft); }
.bar { height: 8px; background: var(--accent); border-radius: 4px; }
details.plain summary { cursor: pointer; font-weight: 500; font-size: 14px; }
details.plain[open] summary { margin-bottom: 10px; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

footer { max-width: 1240px; margin: 0 auto; color: var(--muted); font-size: 12.5px; padding: 8px 16px 40px; }
.site-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 20px;
  border-top: 1px solid var(--border); padding-top: 18px; margin-top: 10px; }
.site-foot nav, .doc-nav { display: flex; gap: 16px; }
.site-foot a, .doc-nav a { color: var(--muted); text-decoration: none; }
.site-foot a:hover, .doc-nav a:hover { color: var(--accent); }
.doc-nav { font-size: 14px; }
.doc { max-width: 760px; }
.doc.doc-wide { max-width: 1080px; }
.doc .kpis { margin: 18px 0 20px; }
.tr-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tr-warn { padding: 10px 14px; border-radius: 10px; font-size: 14.5px !important;
  background: color-mix(in srgb, var(--warn) 12%, transparent); color: var(--text); }
.cal { width: 100%; height: auto; max-width: 460px; }
.cal-grid { stroke: var(--border); stroke-width: 1; }
.cal-ideal { stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 5 5; }
.cal-dot { fill: var(--accent); fill-opacity: 0.75; stroke: var(--surface); stroke-width: 2; }
.cal-tick { fill: var(--muted); font-size: 11px; }
.cal-label { fill: var(--muted); font-size: 12px; font-weight: 600; }
td.num { font-variant-numeric: tabular-nums; font-weight: 600; }
td { white-space: normal; }
.doc h1 { font-size: 34px; margin-bottom: 12px; }
.doc h2 { font-size: 20px; margin: 30px 0 8px; }
.doc p, .doc li { font-size: 15.5px; line-height: 1.7; }
.doc ul, .doc ol { padding-left: 22px; display: grid; gap: 6px; }
.doc-lead { font-size: 18px !important; color: var(--muted); }
.doc-badge { display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft); padding: 4px 10px; border-radius: 999px; margin: 0 0 16px; }

/* ---------- Admin dashboard ---------- */
.badge { font: 600 11px Inter, sans-serif; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent);
  background: var(--accent-soft); padding: 3px 7px; border-radius: 6px; margin-left: 4px; }
.dash-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.live-toggle { font-size: 13px; }
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; display: grid; gap: 2px; box-shadow: var(--shadow); }
.kpi .k { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.kpi .v { font: 700 30px/1.1 "Space Grotesk", sans-serif; font-variant-numeric: tabular-nums; }
.kpi .s { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.kpi.hot .v { color: var(--accent); }
.kpi.bad .v { color: var(--bad); }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--good); animation: live 1.4s ease-in-out infinite; }
@keyframes live { 50% { opacity: 0.3; } }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; margin-bottom: 20px; }
.days { display: grid; grid-template-columns: repeat(14, 1fr); gap: 5px; align-items: end; height: 130px; }
.days div { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 3px; }
.days span { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; min-height: 14px; }
.days i { width: 100%; min-height: 2px; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 55%, var(--accent-2))); }
.days div:last-child i { background: var(--accent-2); }
.runs { list-style: none; margin: 0; padding: 0; display: grid; }
.run { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 12px 4px; border-bottom: 1px solid var(--border); }
.run:last-child { border-bottom: 0; }
.run.st-running { background: linear-gradient(90deg, var(--accent-soft), transparent 60%); border-radius: 10px; }
.run.st-error { background: linear-gradient(90deg, color-mix(in srgb, var(--bad) 7%, transparent), transparent 70%); border-radius: 10px; }
.tabs-mini { flex-wrap: wrap; }
.run .empty, .runs .empty { padding: 18px 4px; color: var(--muted); font-size: 14px; list-style: none; }
.pill { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; font-weight: 600;
  padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.pill.done { color: var(--good); background: color-mix(in srgb, var(--good) 10%, transparent); border-color: color-mix(in srgb, var(--good) 30%, transparent); }
.pill.error { color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, transparent); border-color: color-mix(in srgb, var(--bad) 30%, transparent); }
.pill.running { color: var(--accent); background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.run-main { min-width: 0; display: grid; gap: 3px; }
.run-q { font-weight: 600; font-size: 14.5px; overflow-wrap: anywhere; }
.run-q a { color: var(--text); text-decoration: none; }
.run-q a:hover { color: var(--accent); text-decoration: underline; }
.run-sum { font-size: 13.5px; }
.run-err { font-size: 13px; color: var(--bad); overflow-wrap: anywhere; }
.run-meta { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.run-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-size: 13px; }
.run-actions .link { padding: 0; font-size: 13px; }
.pill.reused { color: var(--accent-2); background: color-mix(in srgb, var(--accent-2) 10%, transparent); border-color: color-mix(in srgb, var(--accent-2) 30%, transparent); }
.panel-title { font-size: 18px; margin-bottom: 6px; }
.local-panel { border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); }
.lsteps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.lstep { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; align-items: start; }
.lnum { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); }
.lstep.done .lnum { background: color-mix(in srgb, var(--good) 14%, transparent); border-color: color-mix(in srgb, var(--good) 40%, transparent); color: var(--good); }
.lstep > div > b { display: block; margin-top: 4px; }
.lbody { font-size: 14px; color: var(--muted); margin-top: 4px; line-height: 1.55; }
.lrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.lrow select { min-width: 0; max-width: 100%; }
.site-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; align-items: end; }
.site-grid .wide { grid-column: 1 / -1; }
.site-grid input[type="number"] { width: 100%; }
.run-pct { font: 700 22px "Space Grotesk", sans-serif; font-variant-numeric: tabular-nums; }
#acc-open .run { grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; }
.resolve { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.res { font: 600 13px Inter, sans-serif; border-radius: 8px; padding: 6px 12px; cursor: pointer; border: 1px solid; background: none; }
.res.yes { color: var(--good); border-color: color-mix(in srgb, var(--good) 45%, transparent); }
.res.no { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, transparent); }
.res:hover { background: var(--surface-2); }
.res:disabled { opacity: 0.5; }
.method-rows .group-row { grid-template-columns: minmax(0, 1.6fr) 26px minmax(0, 1.2fr) 48px; }
.method-rows .group-row .name { white-space: normal; overflow: visible; }
.batch-bar { height: 8px; border-radius: 999px; background: var(--border); overflow: hidden; margin-top: 12px; }
.batch-bar div { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width 0.4s; }
#acc-done .run { grid-template-columns: 70px minmax(0, 1fr) auto; align-items: center; }

/* ---------- Admin page (plain header + panel) ---------- */
body > header:not(.topbar), body > main:not(.wrap) { max-width: 760px; margin: 0 auto; padding: 0 16px; }
body > header:not(.topbar) { padding-top: 32px; }
body > header:not(.topbar) h1 { font-size: 28px; }
.tagline { margin: 6px 0 16px; color: var(--muted); }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); padding: 22px; margin-top: 12px; }
.hint { margin-top: 0; color: var(--muted); }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack .row { margin-bottom: 0; }
.stack input[type="url"], .stack input[type="password"] { width: 100%; }
.input-row { display: flex; gap: 8px; }
.model-pick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: -4px; }
.model-pick button {
  font: 12.5px ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--text); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 999px; padding: 5px 10px; cursor: pointer;
}
.model-pick button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.model-pick .rec { font: 600 10.5px Inter, sans-serif; color: var(--good); margin-left: 4px; text-transform: uppercase; letter-spacing: 0.04em; }
.input-row input { flex: 1; min-width: 0; }
.tip { font-size: 13px; line-height: 1.55; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); }
.panel .row { margin-bottom: 14px; }

@media (max-width: 980px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dash-grid { grid-template-columns: minmax(0, 1fr); }
  .ev-layout { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; }
  .verdict { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .topbar { gap: 10px; position: static; }
  .seg button svg { display: none; }
  .seg button { white-space: nowrap; }
  .chips button:nth-of-type(n+4) { display: none; }
  .chips button { text-align: left; }
  .top-right { margin-left: 0; width: 100%; justify-content: space-between; }
  .seg { order: 3; width: 100%; }
  .seg button { flex: 1; justify-content: center; padding: 7px 8px; }
  .verdict-num .pct { font-size: 52px; }
  .ask { padding: 20px 16px; }
  .ask-row .primary { width: 100%; }
  .group-row { grid-template-columns: minmax(0, 1fr) 30px minmax(0, 1fr) 40px; }
  .kpis, .tr-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .run { grid-template-columns: minmax(0, 1fr) auto; }
  .run .pill { grid-column: 1 / -1; justify-self: start; }
  #status-chip .long { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
@media (max-width: 560px) {
  .loader-steps li { grid-template-columns: 20px minmax(0, 1fr); row-gap: 2px; }
  .ld-detail { grid-column: 2; text-align: left; }
}

/* Public list of past predictions (/predictions) */
.pp-tools { display: flex; gap: 8px; margin: 22px 0 12px; }
.pp-tools input { flex: 1; min-width: 0; font: inherit; font-size: 15px; padding: 11px 14px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.pp-tools input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.pp-filters { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.pp-tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 3px; border: 1px solid var(--border); border-radius: 11px;
  background: var(--surface); }
.pp-tabs a { font-size: 13.5px; font-weight: 500; color: var(--muted); text-decoration: none; padding: 6px 11px; border-radius: 8px; }
.pp-tabs a:hover { color: var(--text); }
.pp-tabs a.on { background: var(--accent-soft); color: var(--accent); }
.pp-count { font-size: 13px !important; color: var(--muted); margin: 0 0 10px; }
.doc .pp-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.pp-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto 1fr auto; gap: 8px 16px;
  padding: 16px 18px; height: 100%; color: var(--text); text-decoration: none; transition: border-color 0.2s, transform 0.2s; }
.pp-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.pp-q { font-weight: 600; font-size: 15.5px; line-height: 1.4; grid-column: 1; }
.pp-meta { grid-column: 1; font-size: 12.5px; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; align-self: end; }
.pp-meta .pill { font-size: 11.5px; }
.pp-num { grid-column: 2; grid-row: 1 / 3; display: grid; justify-items: end; align-content: start; text-align: right; }
.pp-num b { font-family: "Space Grotesk", Inter, sans-serif; font-size: 30px; line-height: 1; color: var(--c); font-variant-numeric: tabular-nums; }
.pp-num small { font-size: 12px; color: var(--muted); margin-top: 4px; white-space: nowrap; }
.pp-was { font-size: 11.5px; color: var(--muted); margin-top: 2px; white-space: nowrap; }
.pp-bar { grid-column: 1 / -1; height: 5px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.pp-bar i { display: block; height: 100%; border-radius: 3px; }
.pp-pager { display: flex; justify-content: space-between; align-items: center; margin: 20px 0 6px; font-size: 14px; color: var(--muted); }
.pp-pager a { text-decoration: none; font-weight: 500; }
@media (max-width: 560px) {
  .pp-filters { flex-direction: column; }
  .doc .pp-list { grid-template-columns: 1fr; }
}
.pill.warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, transparent); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.pp-list + .fineprint, .pp-pager + .fineprint { margin-top: 20px; }

/* Admin: publishing predictions */
.dash-tools { display: flex; gap: 8px; margin: 14px 0 4px; }
.dash-tools input { flex: 1; min-width: 0; }
.dash-tools button { white-space: nowrap; }
.dash-more { display: flex; justify-content: center; margin-top: 12px; }
.run-actions button.small { font-size: 12.5px; padding: 4px 11px; border-radius: 8px; }
.pill.pub { color: var(--good); background: color-mix(in srgb, var(--good) 10%, transparent); border-color: color-mix(in srgb, var(--good) 30%, transparent); }
.pill.unpub { color: var(--muted); background: var(--surface-2); border-color: var(--border); }
.count-badge { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 3px; border-radius: 9px; font-size: 11px;
  font-weight: 700; line-height: 18px; text-align: center; background: var(--accent); color: var(--accent-text); }
@media (max-width: 560px) { .dash-tools { flex-direction: column; } }
.field-hint { display: block; font-size: 12.5px; font-weight: 400; color: var(--muted); margin-top: 4px; }

/* Image tests */
.img-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.img-slot { display: grid; gap: 8px; align-content: start; }
.img-drop { position: relative; display: grid; place-items: center; align-content: center; gap: 4px; aspect-ratio: 1;
  padding: 12px; border-radius: 14px; border: 2px dashed var(--border); background: var(--surface-2); color: var(--muted);
  text-align: center; font-size: 12.5px; cursor: pointer; overflow: hidden; transition: border-color 0.2s, background 0.2s; }
.img-drop:hover, .img-drop.over { border-color: var(--c); background: color-mix(in srgb, var(--c) 8%, var(--surface-2)); }
.img-drop svg { width: 28px; height: 28px; color: var(--c); }
.img-drop b { color: var(--text); font-size: 14px; }
.img-drop.has { border-style: solid; border-color: var(--c); padding: 0; background: var(--surface); }
.img-drop img { width: 100%; height: 100%; object-fit: contain; }
.img-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.img-letter { position: absolute; top: 8px; left: 8px; width: 24px; height: 24px; border-radius: 50%; display: grid;
  place-items: center; font-size: 12px; font-weight: 700; color: #fff; background: var(--c); box-shadow: 0 2px 6px rgba(0,0,0,0.25); }
.img-name-row { display: flex; gap: 6px; align-items: center; }
.img-name-row input { flex: 1; min-width: 0; }
.img-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.img-grid .wide { grid-column: 1 / -1; }
.img-grid label { display: grid; gap: 6px; font-size: 13.5px; font-weight: 500; }
.img-grid label[hidden] { display: none; }
.controls .meta { font-size: 12.5px; max-width: 52ch; align-self: center; }

.vote-bars { display: grid; gap: 6px; margin-bottom: 12px; }
.vote-row { display: grid; grid-template-columns: minmax(0, 160px) minmax(0, 1fr) 34px; gap: 10px; align-items: center; font-size: 13px; }
.vote-name { display: flex; align-items: center; gap: 6px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.vote-name i, .img-legend i { width: 10px !important; height: 10px !important; border-radius: 50% !important; flex: none; }
.vote-track { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.vote-track span { display: block; height: 100%; border-radius: inherit; transition: width 0.5s ease; }
.vote-row b { text-align: right; font-variant-numeric: tabular-nums; }
.img-legend { flex-wrap: wrap; gap: 4px 12px; max-width: calc(100% - 20px); }
.img-legend span { display: inline-flex; align-items: center; gap: 5px; }
.img-result > .img-legend { position: static; background: none; padding: 0; margin: -8px 0 0; }
.feed .pick { flex: none; align-self: start; font-size: 11px; font-weight: 700; color: #fff; padding: 2px 8px; border-radius: 999px;
  max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.img-hero { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 22px; align-items: center; padding: 22px; }
.img-hero:not(:has(img)) { grid-template-columns: 1fr; }
.img-hero-thumb { width: 150px; height: 150px; object-fit: contain; border-radius: 14px; border: 3px solid var(--c);
  background: var(--surface-2); }
.img-hero h2 { font-size: 26px; margin: 4px 0 8px; }
.img-hero p { margin: 0; color: var(--muted); }
.img-hero .eyebrow { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent); }
.img-verdict { margin-top: 10px !important; color: var(--text) !important; font-size: 14.5px; line-height: 1.55; }
.img-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.img-card { padding: 0; overflow: hidden; border-top: 4px solid var(--c); }
.img-card.lead { box-shadow: 0 0 0 2px var(--c), var(--shadow); }
.img-card-top { position: relative; background: var(--surface-2); aspect-ratio: 4 / 3; }
.img-card-top img { width: 100%; height: 100%; object-fit: contain; display: block; }
.img-card-body { padding: 14px 16px 16px; display: grid; gap: 6px; }
.img-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.img-card-head b { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.img-share { font-family: "Space Grotesk", Inter, sans-serif; font-size: 30px; font-weight: 700; color: var(--c); line-height: 1; }
.img-card .meta { margin: 0; font-size: 12.5px; }
.img-card h4 { margin: 8px 0 0; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.img-card ul { margin: 0; padding-left: 18px; font-size: 13.5px; line-height: 1.5; display: grid; gap: 3px; }
.img-card ul.quotes { list-style: none; padding: 0; font-style: italic; }
.img-card ul.good-list li::marker { color: var(--good); }
.img-card ul.bad-list li::marker { color: var(--bad); }
.img-card ul.fix-list li::marker { color: var(--accent); }
.ci-bar { position: relative; height: 8px; border-radius: 999px; background: var(--surface-2); margin: 4px 0 2px; }
.ci-range { position: absolute; top: 0; bottom: 0; border-radius: 999px; background: color-mix(in srgb, var(--c) 35%, transparent); }
.ci-dot { position: absolute; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--c);
  border: 2px solid var(--surface); }
.section-h { margin: 6px 0 0; font-size: 18px; }
.img-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.img-groups h3 { margin: 0 0 12px; font-size: 15px; }
.stack-row { grid-template-columns: minmax(0, 1.6fr) 26px minmax(0, 2fr); }
.share-stack { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--surface-2); }
.share-stack i { display: block; height: 100%; }
@media (max-width: 560px) {
  .img-slots { grid-template-columns: 1fr 1fr; gap: 10px; }
  .img-drop span { display: none; }
  .img-hero { grid-template-columns: 1fr; }
  .img-hero-thumb { width: 100%; height: 180px; }
  .vote-row { grid-template-columns: minmax(0, 100px) minmax(0, 1fr) 28px; }
}
#img-form > *, .img-slot, .img-drop, .img-grid > * { min-width: 0; }
.img-drop img { max-width: 100%; }
@media (max-width: 560px) { .img-slots { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.img-drop img { position: absolute; inset: 0; width: 100%; height: 100%; }
#img-feed li > span:last-child { min-width: 0; }
#img-feed .who { white-space: normal; }
.img-slot { grid-template-columns: minmax(0, 1fr); }
.alt-note { margin: 0; font-size: 14px; }
.alt-note a { font-weight: 500; }
.img-partial { margin-top: 8px !important; font-size: 13.5px; color: var(--warn) !important; }
.subsection { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px 16px; margin: 6px 0 0;
  display: grid; gap: 12px; min-width: 0; }
.subsection legend { padding: 0 6px; font-weight: 600; font-size: 14px; }
.subsection .field-hint { margin: 0; }
.img-pick-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.img-pick-row button { display: inline-flex; align-items: center; gap: 8px; }
.img-pick-row svg { width: 17px; height: 17px; }
.img-pick-row .meta { font-size: 13px; }
.img-slot { position: relative; }
.img-clear { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 50%; border: 0;
  background: rgba(0, 0, 0, 0.6); color: #fff; font-size: 17px; line-height: 1; cursor: pointer; z-index: 2; }
.img-clear:hover { background: var(--bad); }
@media (min-width: 561px) { .img-slots { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* The "AI prediction, not advice" note on every result */
.disclaimer { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px;
  background: color-mix(in srgb, var(--warn) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); }
.disclaimer svg { width: 18px; height: 18px; flex: none; color: var(--warn); margin-top: 2px; }
.disclaimer p { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--text); }
.doc .disclaimer { margin: 18px 0 4px; } .doc .disclaimer p { font-size: 14px; line-height: 1.6; }
.foot-ai { flex-basis: 100%; margin: 0; font-size: 13px; color: var(--text); }
.foot-ai::before { content: "⚠ "; color: var(--warn); }
.ai-note { margin: 0; font-size: 13px; color: var(--muted); }
.ai-note::before { content: "⚠ "; color: var(--warn); }
.site-foot nav, .doc-nav { flex-wrap: wrap; row-gap: 6px; }
.chips .chip-surprise { font-weight: 600; border-color: var(--accent); color: var(--accent); }
.in-short { margin: 2px 0 10px; font-size: 14.5px; line-height: 1.5; color: var(--text); }
.in-short b { color: var(--accent); }

/* Live "crowd so far" meter during a forecast */
.gauge { display: flex; align-items: center; gap: 10px; margin: 10px 0 4px; font-size: 12px; font-weight: 700; color: var(--muted); }
.gauge-track { position: relative; flex: 1; height: 10px; border-radius: 999px;
  background: linear-gradient(90deg, rgb(207,34,46), rgb(219,150,30), rgb(26,150,65)); opacity: 0.9; }
.gauge-track i { position: absolute; top: 50%; left: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%;
  border: 3px solid var(--surface); box-shadow: 0 2px 8px rgba(0,0,0,0.35); transition: left 0.7s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.4s; }
.gauge b { min-width: 46px; text-align: right; font-size: 18px; font-family: "Space Grotesk", Inter, sans-serif; font-variant-numeric: tabular-nums; transition: color 0.4s; }
.gauge.bump b { animation: gauge-bump 0.45s ease-out; }
@keyframes gauge-bump { 40% { transform: scale(1.18); } }
@media (prefers-reduced-motion: reduce) { .gauge-track i { transition: none; } .gauge.bump b { animation: none; } }
