:root {
  --bg0: #070d18;
  --bg1: #101c2e;
  --ink: #eef3fb;
  --muted: #93a7c0;
  --accent: #3dd6c6;
  --accent-dim: rgba(61, 214, 198, 0.14);
  --warn: #f0a35e;
  --bad: #e86a6a;
  --line: #24364f;
  --surface: rgba(16, 28, 46, 0.72);
  --surface-solid: #121e30;
  --field: rgba(255, 255, 255, 0.04);
  --field-focus: rgba(61, 214, 198, 0.08);
  --radius: 0.75rem;
  --radius-sm: 0.5rem;
  --shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", serif;
  --font-body: "Source Sans 3", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html {
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
}
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  background:
    radial-gradient(1100px 560px at 12% -12%, #1a3a58 0%, transparent 58%),
    radial-gradient(900px 520px at 92% 0%, #12362f 0%, transparent 52%),
    linear-gradient(165deg, var(--bg0), var(--bg1) 55%, #0c1626 100%);
}
button, input, select, textarea {
  font: inherit;
  color: inherit;
}
button {
  appearance: none;
  -webkit-appearance: none;
}

#site-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(11, 18, 32, 0.9);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}
.nav-brand {
  font-family: var(--font-display);
  color: var(--ink);
  text-decoration: none;
  font-size: 1.25rem;
}
.nav-burger {
  display: none;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 0.45rem 0.7rem;
  font: inherit;
  cursor: pointer;
}
.nav-links { display: flex; flex-wrap: wrap; gap: 0.85rem; align-items: center; }
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}
.nav-links a.active, .nav-links a:hover { color: var(--accent); }

.hero {
  padding: 2rem 1.5rem 1rem;
  max-width: 1100px; /* same content width as .panel */
  margin: 0 auto;
}
.hero-compact { min-height: auto; }
.hero-value { padding-bottom: 1.5rem; }
.brand-mark {
  font-family: var(--font-display);
  color: var(--accent);
  letter-spacing: 0.04em;
  margin: 0 0 0.75rem;
  animation: rise 0.6s ease both;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3.6vw, 2.35rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 0.85rem;
  max-width: none;
  animation: rise 0.75s ease both;
}
.hero-sub {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: none;
  margin: 0;
  line-height: 1.45;
  animation: rise 0.85s 0.05s ease both;
}
.hero-mech {
  font-size: 0.9rem;
  max-width: none;
  margin: 0.75rem 0 0;
  line-height: 1.4;
}
.wow-line {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.8vw, 1.75rem);
  color: var(--accent);
  margin: 1.5rem 0 0.35rem;
  max-width: none;
  line-height: 1.25;
  animation: rise 0.9s 0.08s ease both;
}
.wow-link { margin: 0 0 1.25rem; }
.wow-link a { color: var(--muted); font-size: 0.9rem; }
.integ-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 0.25rem;
}
.integ-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.65rem;
  border: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  font-size: 0.85rem;
  transition: border-color 0.2s ease;
}
.integ-chip:hover { border-color: var(--accent); }
.integ-chip.soon { opacity: 0.75; }
.badge {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.12rem 0.35rem;
  border: 1px solid var(--line);
  color: var(--muted);
}
.badge.ok { border-color: var(--accent); color: var(--accent); }
.badge.soon { border-color: var(--warn); color: var(--warn); }
.integ-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}
.integ-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem;
  background: var(--surface);
}
.integ-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin: 0 0 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}
.integ-card ol { margin: 0.5rem 0 0.75rem; padding-left: 1.2rem; color: var(--muted); }
.integ-card.soon { opacity: 0.85; }

.plain-lead {
  margin: 1rem 0 1.25rem;
  padding: 1.15rem 1.35rem;
  background: linear-gradient(135deg, rgba(61, 214, 198, 0.14), rgba(28, 59, 90, 0.4));
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  max-width: none;
}
.plain-lead p {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.5;
  color: var(--ink);
}
.plain-lead-label {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.45rem;
}
.term {
  border-bottom: 1px dashed var(--accent);
  cursor: help;
  color: inherit;
}
.term-tip {
  position: absolute;
  z-index: 40;
  max-width: 22rem;
  padding: 0.55rem 0.75rem;
  background: #0e1a2b;
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 0.88rem;
  line-height: 1.35;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}
.money-equiv {
  display: block;
  margin-top: 0.35rem;
  color: var(--accent);
  font-size: 0.95rem;
}
.acc-insight {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--accent);
  margin: 0.5rem 0 1.25rem;
}
.tech-details {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.tech-details summary {
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}
.tech-details[open] summary { color: var(--ink); }

.dash-first { padding-top: 1rem; }
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
/* Two-card rows must span the same total width as the 4-card metrics row. */
#schedule-grid,
#radar-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.metric-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  backdrop-filter: blur(8px);
  padding: 0.95rem 1rem;
  min-height: 6.5rem;
  animation: rise 0.7s ease both;
}
.metric-card span {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
}
.metric-card b {
  display: block;
  font-size: clamp(1.15rem, 2.4vw, 1.55rem);
  color: var(--accent);
  word-break: break-word;
}
.metric-card small { display: block; margin-top: 0.35rem; font-size: 0.78rem; }

.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1rem; }
.cta, button.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.85rem 1.35rem;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  color: #06201c;
  background: var(--accent);
  text-decoration: none;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.cta:hover, button.cta:hover {
  background: #63e4d6;
  border-color: #63e4d6;
  color: #06201c;
}
.cta:active, button.cta:active { transform: translateY(1px); }
.cta.secondary, button.cta.secondary {
  border-color: var(--line);
  color: var(--ink);
  background: transparent;
}
.cta.secondary:hover, button.cta.secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.panel {
  padding: 1.5rem;
  max-width: 1100px;
  margin: 0 auto 2.5rem;
}
.panel h2 {
  font-family: var(--font-display);
  font-weight: 500;
  margin: 1.5rem 0 0.75rem;
}
.panel h2:first-of-type { margin-top: 0.5rem; }
.meta { color: var(--muted); margin: 0.35rem 0 0; font-size: 0.95rem; }
.muted { color: var(--muted); }
.about-steps {
  margin: 0.75rem 0 1.25rem;
  padding-left: 1.25rem;
  line-height: 1.55;
}
.about-steps li { margin: 0.45rem 0; }
.verdict-ok { color: #3dd6a5; font-weight: 700; }
.verdict-bad { color: #e86a6a; font-weight: 700; }
.verdict-partial { color: #f0a35e; font-weight: 700; }
.verdict-na { color: var(--muted); }
.verdict-pill {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 0.25rem;
  font-weight: 700;
  font-size: 0.88rem;
  border: 1px solid transparent;
}
.verdict-pill.verdict-ok {
  color: #06201c;
  background: #3dd6a5;
  border-color: #3dd6a5;
}
.verdict-pill.verdict-bad {
  color: #fff;
  background: #c94b4b;
  border-color: #c94b4b;
}
.verdict-pill.verdict-partial {
  color: #2a1a08;
  background: #f0a35e;
  border-color: #f0a35e;
}
.verdict-pill.verdict-na {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--line);
}
.price-move {
  display: inline-block;
  margin-top: 0.2rem;
  color: var(--accent);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
tr.verdict-ok-row td.col-result { box-shadow: inset 3px 0 0 #3dd6a5; }
tr.verdict-bad-row td.col-result { box-shadow: inset 3px 0 0 #c94b4b; }
tr.verdict-partial-row td.col-result { box-shadow: inset 3px 0 0 #f0a35e; }

.conf-bar {
  margin-top: 0.75rem;
  height: 0.45rem;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 2px;
  overflow: hidden;
}
.conf-bar i {
  display: block;
  height: 100%;
  width: 0;
  background: #1e5a46;
  transition: width 0.3s ease;
}
#radar-chart { max-width: 100%; margin-top: 0.5rem; }

.badge-testing {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.1rem 0.4rem;
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  color: #5a4030;
  background: #f0e6d8;
  border-radius: 2px;
}
#error-status,
#load-status.error { color: #b42318; }
.toolbar { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 0.75rem 0 1rem; align-items: center; }
select,
input[type="email"],
input[type="password"],
input[type="text"],
input[type="number"],
input[type="search"],
input[type="url"],
textarea {
  width: 100%;
  max-width: 100%;
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  padding: 0.7rem 0.85rem;
  font: inherit;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
select { width: auto; }
select:focus,
input:focus,
textarea:focus {
  border-color: var(--accent);
  background: var(--field-focus);
  box-shadow: 0 0 0 3px rgba(61, 214, 198, 0.16);
}
input::placeholder,
textarea::placeholder { color: #6f849e; }
/* Kill browser autofill white boxes on dark UI */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ink);
  caret-color: var(--ink);
  box-shadow: 0 0 0 1000px #152338 inset;
  border-color: var(--line);
  transition: background-color 99999s ease-out 0s;
}

.table-scroll { overflow: auto; max-width: 100%; }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { text-align: left; padding: 0.5rem 0.4rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th {
  color: var(--muted);
  font-weight: 600;
  position: sticky;
  top: 0;
  background: var(--bg0);
  z-index: 2;
  box-shadow: 0 1px 0 var(--line);
}
th.col-fact,
th.col-result,
td.col-fact,
td.col-result {
  background: rgba(61, 214, 165, 0.06);
}
th.col-fact,
th.col-result {
  color: var(--accent);
}
tr:hover td { background: rgba(255,255,255,0.02); }
tr:hover td.col-fact,
tr:hover td.col-result { background: rgba(61, 214, 165, 0.1); }
.badge {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border: 1px solid var(--line);
  font-size: 0.75rem;
  color: var(--muted);
}
.badge.shadow { border-color: var(--warn); color: var(--warn); }

.how-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.how-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem;
  background: var(--surface);
}
.how-card h3 {
  font-family: var(--font-display);
  font-weight: 500;
  margin: 0 0 0.5rem;
}
.how-card p { margin: 0; color: var(--muted); line-height: 1.45; }
.how-card p + p { margin-top: 0.75rem; font-size: 0.95rem; }
.tv-personas { margin: 1.25rem 0 2rem; }
.tv-code {
  white-space: pre-wrap;
  font-size: 0.8rem;
  max-height: 16rem;
  overflow: auto;
  background: rgba(0, 0, 0, 0.04);
  padding: 1rem;
  border-radius: 6px;
  margin: 0.75rem 0 1.25rem;
}
.tv-limit { margin: 2rem 0 1.5rem; }
.votes-table {
  width: 100%;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  border-collapse: collapse;
}
.votes-table th,
.votes-table td {
  text-align: left;
  padding: 0.25rem 0.35rem;
  border-bottom: 1px solid var(--line);
}
.votes-table th { color: var(--muted); font-weight: 600; }
#forecast-card { grid-column: span 1; }
@media (min-width: 900px) {
  #forecast-card { grid-column: span 2; }
}
@media (max-width: 800px) {
  .tv-personas { grid-template-columns: 1fr; }
}

.setup-preview .setup-steps {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.5;
  max-width: 60ch;
}

.price-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.price-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.2rem;
  background: var(--surface);
}
.price-card h3 { margin: 0 0 0.35rem; font-family: var(--font-display); font-weight: 500; }
.price { font-size: 1.8rem; margin: 0.4rem 0; }
.price-card.featured { border-color: var(--accent); }

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
}
.stat {
  padding: 0.9rem;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.02);
}
.stat b { display: block; font-size: 1.35rem; margin-top: 0.35rem; }
.login-box { max-width: 420px; display: grid; gap: 0.6rem; }

.flow {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin: 1rem 0 1.5rem;
}
.flow-step {
  border: 1px solid var(--line);
  padding: 0.55rem 0.75rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.flow-arrow { color: var(--accent); }

.setup-step {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1.25rem;
  margin: 0 0 2rem;
  align-items: start;
}
.setup-step h3 {
  font-family: var(--font-display);
  font-weight: 500;
  margin: 0 0 0.5rem;
}
.setup-shot {
  border: 1px dashed var(--line);
  min-height: 140px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.02);
  color: var(--muted);
  font-size: 0.85rem;
  overflow: hidden;
}
.setup-shot img {
  max-width: 100%;
  display: block;
  opacity: 0.85;
}

.prose { max-width: 720px; line-height: 1.55; color: var(--muted); }
.prose strong { color: var(--ink); }

/* Hero consensus % after filters */
.acc-hero {
  margin: 1.25rem 0 0.75rem;
  text-align: center;
}
.acc-hero-label {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.acc-hero-value {
  margin: 0.15rem 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(3.2rem, 8vw, 4.75rem);
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.acc-hero-meta {
  margin: 0.35rem 0 0;
  font-size: 0.95rem;
  color: var(--muted);
}

/* Dual accuracy boards */
.acc-dual-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin: 1rem 0;
}
.acc-dual-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem 1.1rem;
  background: rgba(255,255,255,0.02);
}
.acc-dual-card h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.15rem;
  margin: 0 0 0.4rem;
}
.acc-dual-insight {
  color: var(--accent);
  font-weight: 600;
  margin: 0.5rem 0 0.25rem;
}
@media (max-width: 900px) {
  .acc-dual-grid { grid-template-columns: 1fr; }
}

/* R2 drill-down */
.acc-pct-btn,
.acc-pct-link,
.sc-pct-btn {
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--accent);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: 0;
}
.acc-pct-btn:hover,
.acc-pct-link:hover,
.sc-pct-btn:hover { color: var(--ink); }
.drilldown-panel {
  margin-top: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  animation: rise 0.35s ease-out;
}
.drilldown-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.drilldown-title {
  font-family: var(--font-display);
  font-weight: 500;
  margin: 0;
  font-size: 1.25rem;
}
.drilldown-formula {
  font-size: 1.05rem;
  color: var(--accent);
  margin: 0.75rem 0 0.25rem;
}
.table-scroll { overflow-x: auto; }
.drilldown-table { width: 100%; }
.drilldown-table code {
  font-size: 0.85em;
  white-space: nowrap;
}
.drilldown-filters { margin-bottom: 0.5rem; }
.grade-correct { color: var(--accent); }
.grade-partial { color: var(--warn); }
.grade-wrong { color: var(--bad); }

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 900px) {
  .metrics-grid,
  #schedule-grid,
  #radar-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .how-grid { grid-template-columns: 1fr; }
  .setup-step { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav-burger { display: inline-block; }
  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    padding: 0.5rem 0 0.75rem;
  }
  .nav-links.open { display: flex; }
  .metrics-grid,
  #schedule-grid,
  #radar-grid { grid-template-columns: 1fr 1fr; }
  table { font-size: 0.8rem; }
}

/* R5 history chips */
.hist-chip {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  border: 1px solid var(--line);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  line-height: 1.3;
}
.hist-chip.out-long { color: var(--accent); border-color: var(--accent); }
.hist-chip.out-short { color: var(--bad); border-color: var(--bad); }
.hist-chip.out-flat { color: var(--warn); border-color: var(--warn); }
.hist-chip.out-off, .hist-chip.vote-missing { color: var(--muted); }
.hist-chip.verdict-ok { color: var(--accent); border-color: var(--accent); }
.hist-chip.verdict-bad { color: var(--bad); border-color: var(--bad); }
.hist-chip.verdict-partial { color: var(--warn); border-color: var(--warn); }
.hist-chip.verdict-wait { color: var(--muted); background: rgba(255,255,255,0.04); }
.hist-chip.fact-chip { color: var(--ink); }
.hist-chip.hist-strength { color: var(--ink); font-variant-numeric: tabular-nums; }
.hist-votes {
  line-height: 1.75;
  min-width: 11rem;
}
.hist-votes .hist-chip { display: block; width: fit-content; margin: 0.12rem 0; }
.hist-model-col { white-space: nowrap; }
.hist-version code {
  font-size: 0.8em;
  white-space: nowrap;
}
.hist-symbol { white-space: nowrap; font-weight: 600; font-size: 0.85rem; }
.hist-verify { color: var(--accent); font-size: 0.85rem; }
.hist-date { white-space: nowrap; font-size: 0.85rem; }
.hist-actions { width: 2.5rem; text-align: right; position: relative; }
.hist-actions-col { width: 2.5rem; }
.row-menu { position: relative; display: inline-block; }
.row-menu-btn {
  appearance: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  border-radius: 6px;
  width: 2rem;
  height: 2rem;
  line-height: 1;
  font-size: 1.15rem;
  cursor: pointer;
  padding: 0;
}
.row-menu-btn:hover,
.row-menu.is-open .row-menu-btn {
  border-color: var(--accent);
  color: var(--accent);
}
.row-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.25rem);
  min-width: 12rem;
  background: var(--panel, #121820);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  padding: 0.35rem;
  z-index: 30;
}
.row-menu-panel a {
  display: block;
  padding: 0.45rem 0.65rem;
  color: var(--ink);
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.85rem;
  white-space: nowrap;
}
.row-menu-panel a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--accent);
}
.hist-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  margin: 0.75rem 0 0.5rem;
}
.hist-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  align-items: flex-end;
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
}
.hist-filters label.hist-field {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  font-size: 0.9rem;
  color: var(--muted);
}
.hist-filters label.hist-check {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.2;
  min-height: 2.1rem;
  margin: 0;
  cursor: pointer;
}
.hist-filters label.hist-check input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  margin: 0;
  flex: 0 0 auto;
  align-self: center;
}
.hist-filters label.hist-check span {
  line-height: 1.2;
}
.hist-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-left: auto;
  flex: 0 0 auto;
}
.hist-csv-btn,
button.cta.hist-csv-btn {
  padding: 0.4rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}
.hist-summary {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1.25rem;
  margin: 0 0 0.75rem;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm, 8px);
  background: rgba(255, 255, 255, 0.03);
}
.hist-summary[hidden] { display: none !important; }
.hist-summary-item {
  display: inline-flex;
  flex-direction: row;
  align-items: baseline;
  gap: 0.35rem;
  min-width: 0;
  flex: 0 0 auto;
}
.hist-summary-value {
  font-size: 1rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  line-height: 1.2;
}
.hist-summary-label {
  font-size: 0.8rem;
  color: var(--muted);
}
.hist-sum-ok { color: var(--accent); }
.hist-sum-partial { color: var(--warn); }
.hist-sum-bad { color: var(--bad); }
@media (max-width: 720px) {
  .hist-chip { font-size: 0.7rem; padding: 0.12rem 0.35rem; }
  .hist-date { font-size: 0.75rem; }
  .hist-toolbar { align-items: stretch; }
  .hist-toolbar-actions { width: 100%; justify-content: flex-end; margin-left: 0; }
}
