/* ─── Reset & Base ───────────────────────────────────────── */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-body: #0a0a0f;
  --bg-surface: #12121a;
  --bg-elevated: #16161e;
  --border: #1e1e2e;
  --border-hover: #2a2a3a;
  --text-primary: #f0f0f8;
  --text-secondary: #e0e0e8;
  --text-muted: #888;
  --text-dim: #666;
  --text-faint: #555;
  --primary: #4a6cf7;
  --primary-hover: #3a5ce7;
  --green: #4ade80;
  --green-dark: #2a8a4a;
  --green-bg: #0a2a1a;
  --yellow: #facc15;
  --yellow-bg: #2a2000;
  --red: #f87171;
  --red-dark: #c44;
  --red-bg: #2a0a0a;
  --blue: #60a5fa;
  --font-mono: "SF Mono", "Roboto Mono", "JetBrains Mono", Menlo, monospace;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
  background: var(--bg-body);
  color: var(--text-secondary);
  min-height: 100vh;
  line-height: 1.6;
  transition: background 0.3s ease, color 0.3s ease;
}

body[data-mode="detailed"] {
  padding-bottom: 80px;
}

/* ─── Simple Mode: Light Theme Override ──────────────────── */

body[data-mode="simple"] {
  --bg-body: #ffffff;
  --bg-surface: #f8f9fb;
  --bg-elevated: #f1f3f5;
  --border: #e2e5ea;
  --border-hover: #d0d4db;
  --text-primary: #111827;
  --text-secondary: #1f2937;
  --text-muted: #6b7280;
  --text-dim: #9ca3af;
  --text-faint: #d1d5db;
  --green: #16a34a;
  --green-dark: #15803d;
  --green-bg: #f0fdf4;
  --yellow: #ca8a04;
  --yellow-bg: #fefce8;
  --red: #dc2626;
  --red-dark: #b91c1c;
  --red-bg: #fef2f2;
  --blue: #2563eb;
}

/* ─── Container ──────────────────────────────────────────── */

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 20px;
  transition: max-width 0.3s ease;
}

body[data-mode="detailed"] .container {
  max-width: 1600px;
}

/* ─── Navigation Bar ─────────────────────────────────────── */

.nav-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 20px;
  background: #0e0e16;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background 0.3s ease, border-color 0.3s ease;
}

body[data-mode="simple"] .nav-bar {
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

body[data-mode="simple"] .nav-brand {
  color: #111827;
}

body[data-mode="simple"] .nav-link {
  color: #6b7280;
  opacity: 1;
}

body[data-mode="simple"] .nav-link:hover {
  color: #111827;
  background: #f3f4f6;
}

body[data-mode="simple"] .nav-link.active {
  color: #ffffff;
  background: var(--primary);
}

.nav-brand {
  font-weight: 600;
  color: var(--text-primary);
  margin-right: auto;
  font-size: 0.95rem;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s, background 0.2s, opacity 0.2s;
  opacity: 0.7;
}

.nav-link:hover {
  color: var(--text-secondary);
  background: var(--border);
  opacity: 1;
}

.nav-link.active {
  color: var(--text-primary);
  background: var(--primary);
  opacity: 1;
}

/* ─── Mode Toggle ────────────────────────────────────────── */

.mode-toggle {
  margin-left: 12px;
  padding: 6px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid var(--border-hover);
  border-radius: 6px;
  background: var(--bg-elevated);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.02em;
}

.mode-toggle:hover {
  border-color: var(--primary);
  color: var(--text-primary);
  background: rgba(74, 108, 247, 0.1);
}

body[data-mode="detailed"] .mode-toggle {
  border-color: var(--primary);
  background: rgba(74, 108, 247, 0.15);
  color: var(--primary);
}

body[data-mode="simple"] .mode-toggle {
  background: #f3f4f6;
  border-color: #d1d5db;
  color: #374151;
}

body[data-mode="simple"] .mode-toggle:hover {
  background: #e5e7eb;
  border-color: var(--primary);
  color: var(--primary);
}

/* ─── Headers ────────────────────────────────────────────── */

header {
  text-align: center;
  margin-bottom: 32px;
}

h1 {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ─── Hidden ─────────────────────────────────────────────── */

.hidden {
  display: none;
}

.muted {
  color: var(--text-dim);
  font-size: 0.9rem;
}

/* ─── Card Surface (Tailwind reference) ──────────────────── */

.card-surface {
  background: var(--bg-surface);
  border-radius: 12px;
  border: 1px solid transparent;
  transition: border-color 0.2s;
}

.card-surface:hover {
  border-color: var(--border);
}

/* ─── Glow Badges ────────────────────────────────────────── */

.bg-green-glow {
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.3);
  color: var(--green);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.bg-yellow-glow {
  background: rgba(250, 204, 21, 0.1);
  border: 1px solid rgba(250, 204, 21, 0.3);
  color: var(--yellow);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.bg-red-glow {
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.3);
  color: var(--red);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* ─── Hover Lift ─────────────────────────────────────────── */

.hover-lift {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.hover-lift:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* ─── Tile Colors (coverage) ─────────────────────────────── */

.tile-today { background: var(--green) !important; color: #000 !important; }
.tile-week { background: #15803d !important; color: #e0e0e8 !important; }
.tile-month { background: #a16207 !important; color: #e0e0e8 !important; }
.tile-older { background: #52525b !important; color: #a1a1aa !important; }
.tile-never { background: #27272a !important; color: #52525b !important; }

/* ─── Progress Tracks (slim history bars) ────────────────── */

.progress-track {
  height: 6px;
  background: #27272a;
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}

/* ─── Live Indicator ─────────────────────────────────────── */

@keyframes pulse-live {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse-live 2s ease-in-out infinite;
  margin-right: 6px;
}

/* ================================================================
   SIMPLE MODE STYLES
   ================================================================ */

/* ─── Simple: Hero Section ───────────────────────────────── */

.simple-hero {
  text-align: center;
  padding: 60px 20px 40px;
}

.simple-hero-rate {
  font-size: 6rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 8px;
  font-family: var(--font-mono);
  letter-spacing: -0.04em;
}

.simple-hero-message {
  font-size: 1.2rem;
  font-weight: 500;
  margin-top: 8px;
}

.simple-hero-message.trust-green {
  color: var(--green);
}

.simple-hero-message.trust-yellow {
  color: var(--yellow);
}

.simple-hero-message.trust-red {
  color: var(--red);
}

/* Light-mode hero colors tuned for white background readability */
body[data-mode="simple"] .simple-hero-message.trust-green { color: #15803d; }
body[data-mode="simple"] .simple-hero-message.trust-yellow { color: #b45309; }
body[data-mode="simple"] .simple-hero-message.trust-red { color: #b91c1c; }

/* ─── Simple: Category Pills ─────────────────────────────── */

.simple-pills {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 32px 0;
}

.simple-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.simple-pill-icon {
  font-size: 1rem;
}

.simple-pill-icon.pass { color: var(--green); }
.simple-pill-icon.warn { color: var(--yellow); }
.simple-pill-icon.fail { color: var(--red); }

/* ─── Simple: Freshness Badge ────────────────────────────── */

.simple-freshness {
  text-align: center;
  margin: 16px 0;
}

.simple-freshness-pill {
  display: inline-block;
  padding: 6px 18px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.simple-freshness-pill.fresh {
  background: var(--green-bg);
  color: var(--green);
  border: 1px solid var(--green-dark);
}

.simple-freshness-pill.degraded {
  background: var(--yellow-bg);
  color: var(--yellow);
  border: 1px solid var(--yellow);
}

.simple-freshness-pill.stale {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid var(--red-dark);
}

/* Simple pill light overrides — pills and button look professional on white */
body[data-mode="simple"] .simple-pill {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  color: #374151;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

body[data-mode="simple"] .simple-pill-icon.pass { color: #16a34a; }
body[data-mode="simple"] .simple-pill-icon.warn { color: #d97706; }
body[data-mode="simple"] .simple-pill-icon.fail { color: #dc2626; }

body[data-mode="simple"] .btn-primary {
  background: #111827;
  color: #ffffff;
}

body[data-mode="simple"] .btn-primary:hover {
  background: #1f2937;
}

body[data-mode="simple"] .btn-primary:disabled {
  background: #d1d5db;
  color: #9ca3af;
}

body[data-mode="simple"] .simple-exceptions-hint a {
  color: #2563eb;
}

/* ─── Simple: Last Run & Actions ─────────────────────────── */

.simple-last-run {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 16px 0;
}

.simple-actions {
  text-align: center;
  margin: 24px 0;
}

.simple-exceptions-hint {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-top: 24px;
}

.simple-exceptions-hint a {
  color: var(--blue);
  text-decoration: none;
  cursor: pointer;
}

.simple-exceptions-hint a:hover {
  text-decoration: underline;
}

.simple-empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}

.simple-empty p {
  margin-bottom: 8px;
}

/* ================================================================
   DETAILED MODE STYLES
   ================================================================ */

/* ─── Detailed: Summary Cards ────────────────────────────── */

.detailed-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.detailed-summary-card {
  background: var(--bg-surface);
  border-radius: 12px;
  border: 1px solid transparent;
  border-left: 4px solid var(--border);
  padding: 20px;
  transition: border-color 0.2s;
}

.detailed-summary-card:hover {
  border-color: var(--border-hover);
}

.detailed-summary-card .card-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  font-family: var(--font-mono);
}

.detailed-summary-card .card-label {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ─── Detailed: Category Cards ───────────────────────────── */

.detailed-categories {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}

.detailed-cat-card {
  background: var(--bg-surface);
  border-radius: 12px;
  border: 1px solid transparent;
  padding: 16px 14px;
  text-align: center;
  transition: border-color 0.2s;
}

.detailed-cat-card:hover {
  border-color: var(--border);
}

.detailed-cat-rate {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.2;
  font-family: var(--font-mono);
}

.detailed-cat-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-top: 4px;
}

.detailed-cat-count {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 2px;
  font-family: var(--font-mono);
}

.detailed-cat-explain {
  font-size: 0.7rem;
  color: var(--text-faint);
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  line-height: 1.3;
}

/* ─── Detailed: 12-Column Grid ───────────────────────────── */

.detailed-grid {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 20px;
  margin-bottom: 28px;
}

/* ─── Detailed: Exceptions Table ─────────────────────────── */

.exceptions-table {
  background: var(--bg-surface);
  border-radius: 12px;
  border: 1px solid transparent;
  overflow: hidden;
}

.exceptions-table-header {
  padding: 14px 18px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
}

.exceptions-table table {
  width: 100%;
  border-collapse: collapse;
}

.exceptions-table th {
  text-align: left;
  padding: 10px 14px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
}

.exceptions-table td {
  padding: 10px 14px;
  font-size: 0.85rem;
  border-bottom: 1px solid #141420;
  color: var(--text-secondary);
}

.exceptions-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.exceptions-table tr:last-child td {
  border-bottom: none;
}

.exceptions-table .ticker-link {
  color: var(--blue);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.exceptions-table .ticker-link:hover {
  text-decoration: underline;
}

.exceptions-table .detail-cell {
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-muted);
}

/* ─── Detailed: Right Column (Coverage + History) ────────── */

.detailed-right-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ─── Detailed: Coverage Grid ────────────────────────────── */

.detailed-coverage {
  background: var(--bg-surface);
  border-radius: 12px;
  border: 1px solid transparent;
  padding: 16px;
}

.detailed-coverage-header {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.detailed-coverage-stats {
  display: flex;
  gap: 14px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.detailed-coverage-stats strong {
  color: var(--text-secondary);
}

.detailed-coverage-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 3px;
}

.detailed-coverage-tile {
  aspect-ratio: 1;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.55rem;
  font-weight: 600;
  font-family: var(--font-mono);
  text-decoration: none;
  cursor: pointer;
}

.detailed-coverage-rest {
  opacity: 0.35;
}

.detailed-coverage-legend {
  display: flex;
  gap: 12px;
  margin-top: 10px;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.detailed-coverage-legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.detailed-coverage-legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

/* ─── Detailed: History Bars ─────────────────────────────── */

.detailed-history {
  background: var(--bg-surface);
  border-radius: 12px;
  border: 1px solid transparent;
  padding: 16px;
}

.detailed-history-header {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.detailed-history-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.detailed-history-row:last-child {
  margin-bottom: 0;
}

.detailed-history-date {
  width: 120px;
  font-size: 0.72rem;
  color: var(--text-muted);
  flex-shrink: 0;
  text-align: right;
  font-family: var(--font-mono);
}

.detailed-history-pct {
  width: 40px;
  font-size: 0.78rem;
  font-weight: 600;
  text-align: right;
  flex-shrink: 0;
  font-family: var(--font-mono);
}

/* ─── Fixed Bottom Bar ───────────────────────────────────── */

.bottom-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #0e0e16;
  border-top: 1px solid var(--border);
  z-index: 100;
  padding: 0 20px;
}

body[data-mode="detailed"] .bottom-bar {
  display: block;
}

.bottom-bar-inner {
  max-width: 1600px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.bottom-bar-status {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.bottom-bar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* In simple mode, hide bottom bar benchmark elements since we have inline ones */
body[data-mode="simple"] .bottom-bar {
  display: none;
}

/* ================================================================
   SHARED / LEGACY STYLES (Single Ticker + Company Views)
   ================================================================ */

/* ─── Search Box ─────────────────────────────────────────── */

.search-box {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.search-box input {
  flex: 1;
  padding: 12px 16px;
  font-size: 1.1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-hover);
  border-radius: 8px;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s;
}

.search-box input:focus {
  border-color: var(--primary);
}

.search-box button {
  padding: 12px 28px;
  font-size: 1.05rem;
  font-weight: 600;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}

.search-box button:hover {
  background: var(--primary-hover);
}

.search-box button:disabled {
  background: #333;
  cursor: not-allowed;
}

/* ─── Config Row ─────────────────────────────────────────── */

.config-row {
  margin-bottom: 24px;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.url-input {
  padding: 4px 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-hover);
  border-radius: 4px;
  color: var(--text-muted);
  font-size: 0.85rem;
  width: 240px;
  outline: none;
}

/* ─── Results / Steps ────────────────────────────────────── */

.results {
  margin-top: 16px;
}

.step {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 8px;
  overflow: hidden;
}

.step-header {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  gap: 12px;
}

.step-num {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--border);
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  flex-shrink: 0;
}

.step-title {
  flex: none;
  font-weight: 500;
}

.step-explain {
  font-size: 0.75rem;
  color: var(--text-dim);
  flex: 1;
  font-weight: 400;
}

.step-status {
  font-size: 0.9rem;
  font-weight: 600;
}

.step-detail {
  padding: 0 16px 12px 52px;
  font-size: 0.9rem;
  color: #999;
}

.step-detail:empty {
  display: none;
}

.step.running { border-color: var(--primary); }
.step.running .step-num { background: var(--primary); color: white; }
.step.passed { border-color: var(--green-dark); }
.step.passed .step-num { background: var(--green-dark); color: white; }
.step.failed { border-color: var(--red-dark); }
.step.failed .step-num { background: var(--red-dark); color: white; }
.step.skipped { opacity: 0.5; }

.status-pass { color: var(--green); }
.status-fail { color: var(--red); }
.status-running { color: var(--blue); }
.status-skip { color: var(--text-dim); }

/* ─── Overall Result ─────────────────────────────────────── */

.overall {
  margin-top: 16px;
  padding: 16px;
  border-radius: 8px;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 600;
}

.overall.pass {
  background: var(--green-bg);
  border: 1px solid var(--green-dark);
  color: var(--green);
}

.overall.fail {
  background: var(--red-bg);
  border: 1px solid var(--red-dark);
  color: var(--red);
}

/* ─── Detail Lines ───────────────────────────────────────── */

.detail-line { margin: 2px 0; }
.detail-line.match { color: var(--green); }
.detail-line.mismatch { color: var(--red); }
.detail-line.info { color: #999; }

/* ─── Methodology ────────────────────────────────────────── */

.methodology {
  margin-top: 32px;
  font-size: 0.9rem;
}

.methodology summary {
  cursor: pointer;
  color: var(--text-muted);
  padding: 8px 0;
}

.methodology summary:hover {
  color: #bbb;
}

.methodology-content {
  padding: 16px;
  background: var(--bg-surface);
  border-radius: 8px;
  margin-top: 8px;
  color: #999;
}

.methodology-content p { margin-bottom: 12px; }
.methodology-content ul { padding-left: 20px; margin-bottom: 12px; }
.methodology-content li { margin-bottom: 8px; }
.methodology-content code {
  background: var(--border);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.85em;
}

/* ─── Spinner ────────────────────────────────────────────── */

@keyframes spin {
  to { transform: rotate(360deg); }
}

.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid #333;
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ─── Buttons ────────────────────────────────────────────── */

.btn-primary {
  padding: 10px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-primary:disabled {
  background: #333;
  cursor: not-allowed;
}

.benchmark-status {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ─── Filing Info ────────────────────────────────────────── */

.filing-info {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 16px;
}

.filing-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.filing-info-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.filing-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.filing-value {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-family: monospace;
}

.filing-value a { color: var(--blue); text-decoration: none; }
.filing-value a:hover { text-decoration: underline; }

/* ─── Freshness Badges ───────────────────────────────────── */

.freshness-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.freshness-fresh {
  background: var(--green-bg);
  color: var(--green);
  border: 1px solid var(--green-dark);
}

.freshness-degraded {
  background: var(--yellow-bg);
  color: var(--yellow);
  border: 1px solid #a08a00;
}

.freshness-stale {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid var(--red-dark);
}

.freshness-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.freshness-card .freshness-label {
  font-size: 0.8rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ─── Company View ───────────────────────────────────────── */

.company-info {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.company-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.company-info-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.company-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.company-value {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-family: monospace;
}

.company-value a { color: var(--blue); text-decoration: none; }
.company-value a:hover { text-decoration: underline; }

.company-checks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.check-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 12px;
  text-align: center;
}

.check-card.check-pass { border-color: var(--green-dark); }
.check-card.check-fail { border-color: var(--red-dark); }
.check-card.check-error { border-color: #a06000; }
.check-card.check-skip { opacity: 0.5; }

.check-status { font-size: 1.1rem; font-weight: 700; margin-bottom: 4px; }
.check-pass .check-status { color: var(--green); }
.check-fail .check-status { color: var(--red); }
.check-error .check-status { color: var(--yellow); }
.check-skip .check-status { color: var(--text-dim); }

.check-name { font-size: 0.85rem; font-weight: 500; color: var(--text-secondary); margin-bottom: 2px; }
.check-explain { font-size: 0.7rem; color: var(--text-dim); line-height: 1.3; }

/* ─── Verification History Timeline (Company View) ───────── */

.history-timeline {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
}

.history-entry {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #1a1a28;
  font-size: 0.85rem;
}

.history-entry:last-child { border-bottom: none; }

.history-date {
  width: 140px;
  flex-shrink: 0;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.history-checks {
  display: flex;
  gap: 6px;
  flex: 1;
}

.history-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.history-dot.dot-pass { background: var(--green); }
.history-dot.dot-fail { background: var(--red); }
.history-dot.dot-error { background: var(--yellow); }
.history-dot.dot-skip { background: #333; }

/* ─── Back Link ──────────────────────────────────────────── */

.back-link { margin-top: 24px; text-align: center; }
.back-link a { color: var(--blue); text-decoration: none; font-size: 0.9rem; }
.back-link a:hover { text-decoration: underline; }

/* ─── Dashboard Section (used in company view) ───────────── */

.dash-section { margin-bottom: 24px; }
.dash-section-header { margin-bottom: 12px; }
.dash-section-header h2 { font-size: 1.1rem; font-weight: 600; color: var(--text-secondary); }

/* ─── Responsive ─────────────────────────────────────────── */

@media (max-width: 1200px) {
  .detailed-grid {
    grid-template-columns: 1fr;
  }

  .detailed-categories {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 700px) {
  .detailed-summary {
    grid-template-columns: repeat(2, 1fr);
  }

  .detailed-categories {
    grid-template-columns: repeat(2, 1fr);
  }

  .detailed-coverage-grid {
    grid-template-columns: repeat(6, 1fr);
  }

  .simple-pills {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 480px) {
  .nav-brand {
    display: none;
  }

  .simple-hero-rate {
    font-size: 4rem;
  }
}
