/* Viridis dark mode — palette: #440154 → #31688e → #35b779 → #fde725 */

:root {
  --bg:           #0d0d1a;
  --surface:      #1a1a2e;
  --border:       #2a2a4a;
  --text:         #e8e8f0;
  --text-muted:   #8888aa;
  --link:         #35b779;
  --link-hover:   #fde725;

  /* status badge colors — viridis scale: green=published, yellow=partial, purple=none */
  --badge-report:      #35b779;
  --badge-report-text: #0d0d1a;
  --badge-process:     #fde725;
  --badge-process-text:#0d0d1a;
  --badge-none:        #440154;
  --badge-none-text:   #e8e8f0;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }

/* ── Layout ── */

.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

/* ── Header ── */

header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
}

header h1 {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.subtitle {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 0.6rem;
}

.subtitle a { color: var(--text-muted); text-decoration: underline; }
.subtitle a:hover { color: var(--link-hover); }

.context {
  font-size: 0.92rem;
  color: var(--text);
  line-height: 1.65;
}

.context a { color: var(--link); }
.context a:hover { color: var(--link-hover); }

/* ── Summary stat ── */

.summary {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--badge-report);
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
}

.summary-count {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--badge-report);
  line-height: 1;
}

.summary-label {
  font-size: 1rem;
  color: var(--text);
}


.summary-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-left: auto;
}

/* ── Legend ── */

.legend {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem 1.5rem;
  margin-bottom: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.75rem 1rem;
}

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

/* ── Category filters ── */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.filter-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 4px;
  padding: 0.25rem 0.7rem;
  font-size: 0.78rem;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.filter-btn:hover {
  border-color: var(--badge-report);
  color: var(--text);
}

.filter-btn.active {
  background: var(--badge-report);
  border-color: var(--badge-report);
  color: var(--badge-report-text);
  font-weight: 600;
}

/* ── Table ── */

.table-wrap {
  overflow-x: auto;
  border-radius: 6px;
  border: 1px solid var(--border);
}

table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  background: var(--surface);
}

/* Column widths — notes gets remaining space */
col.col-company    { width: 14%; }
col.col-category   { width: 17%; }
col.col-status     { width: 14%; }
col.col-juris      { width: 5%; }
col.col-checked    { width: 9%; }
col.col-notes      { width: auto; }
col.col-link       { width: 11%; }

thead th {
  background: #12122a;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 0.5rem 0.65rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}

tbody tr:last-child { border-bottom: none; }

tbody tr:hover { background: #20203a; }

td {
  padding: 0.45rem 0.65rem;
  vertical-align: middle;
  font-size: 0.85rem;
}

td.company-name {
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

td.category {
  color: var(--text-muted);
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Badges ── */

.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.badge-report   { background: var(--badge-report);  color: var(--badge-report-text); }
.badge-process  { background: var(--badge-process); color: var(--badge-process-text); }
.badge-none     { background: var(--badge-none);    color: var(--badge-none-text); }

/* ── Jurisdiction flag ── */

.jurisdiction {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: monospace;
  white-space: nowrap;
}


/* ── Notes ── */

.notes-cell {
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.4;
  white-space: normal;
  overflow: visible;
}

/* ── Date / link cells ── */

.date-cell {
  font-size: 0.82rem;
  color: var(--text-muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.link-cell {
  white-space: nowrap;
}

.link-cell a {
  font-size: 0.82rem;
}

/* ── Footer ── */

footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.7;
}

footer p + p { margin-top: 0.5rem; }

footer a { color: var(--text-muted); text-decoration: underline; }
footer a:hover { color: var(--link-hover); }

/* ── Responsive ── */

@media (max-width: 700px) {
  html, body { overflow-x: hidden; }

  .page {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 1.5rem 1rem 3rem;
    overflow-x: hidden;
  }

  header h1 { font-size: 0.9rem; overflow-wrap: anywhere; }
  .summary-count { font-size: 1.6rem; }
  .summary-label { font-size: 0.9rem; word-break: break-word; }
  .context { display: none; }

  .summary { flex-wrap: wrap; gap: 0.5rem; padding: 1rem; }
  .summary-count { font-size: 1.8rem; }
  .summary-sub { display: none; }
  .summary-label { min-width: 0; }

  .table-wrap { min-width: 0; }

  /* Switch to auto layout so remaining columns size to content */
  table { table-layout: auto; width: 100%; }
  td, th { padding: 0.4rem 0.5rem; }
  td.company-name { white-space: normal; }

  /* Show only: Company (1), Status (3), Link (7) */
  thead th:nth-child(2),
  thead th:nth-child(4),
  thead th:nth-child(5),
  thead th:nth-child(6),
  td.category,
  td.jurisdiction,
  td.date-cell,
  td.notes-cell { display: none; }
}
