/* baseline-view.css - Warm dark background #100d0a, orange #f18a33, offwhite text, restrained panels */
:root {
  --bg-base: #100d0a;
  --bg-surface: #181410;
  --bg-card: #201a14;
  --bg-card-hover: #262019;
  --bg-input: #1a1612;
  --border-subtle: #332a22;
  --border-focus: #f18a33;
  --text-main: #f0ebe4;
  --text-muted: #a69c91;
  --text-subtle: #7a7065;
  --accent-orange: #f18a33;
  --accent-orange-dim: rgba(241, 138, 51, 0.15);
  --accent-orange-border: rgba(241, 138, 51, 0.4);
  --font-base: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
}

/* Base resets & typography */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  background-color: var(--bg-base);
  color: var(--text-main);
  font-family: var(--font-base);
  font-size: 16px;
  line-height: 1.6;
  scroll-behavior: smooth;
  margin: 0;
  padding: 0;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-base);
  color: var(--text-main);
  font-size: 1rem; /* 16px */
  overflow-x: hidden;
}

.container {
  width: 100%;
  max-width: 1140px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* Header & Nav */
.site-header {
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(16, 13, 10, 0.95);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand-link {
  color: var(--accent-orange);
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.05em;
}

.brand-link:hover, .brand-link:focus-visible {
  color: #ff9d4d;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 24px;
  margin: 0;
  padding: 0;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-link:hover, .nav-link:focus-visible {
  color: var(--text-main);
}

/* Hero Section */
.hero-section {
  padding: 60px 0 40px;
  border-bottom: 1px solid var(--border-subtle);
}

.hero-title {
  font-size: 2rem;
  line-height: 1.3;
  margin: 0 0 16px;
  color: var(--text-main);
  font-weight: 700;
}

.hero-prose {
  font-size: 1.0625rem;
  color: var(--text-muted);
  max-width: 820px;
  margin-bottom: 24px;
  line-height: 1.7;
}

.hero-prose p {
  margin: 0 0 12px;
}

.status-banner {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background-color: var(--accent-orange-dim);
  border: 1px solid var(--accent-orange-border);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 0.875rem; /* 14px */
  color: var(--text-main);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-orange);
  flex-shrink: 0;
}

/* Intro Cards */
.intro-cards-section {
  padding: 40px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.info-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
}

.card-title {
  font-size: 1.125rem;
  color: var(--accent-orange);
  margin: 0 0 12px;
  font-weight: 600;
}

.card-text {
  font-size: 0.875rem; /* 14px */
  color: var(--text-muted);
  margin: 0;
  line-height: 1.6;
}

/* Observations section */
.observations-section {
  padding: 48px 0 60px;
}

.section-header {
  margin-bottom: 32px;
}

.section-title {
  font-size: 1.625rem;
  color: var(--text-main);
  margin: 0 0 8px;
}

.section-subtitle {
  font-size: 0.875rem; /* 14px */
  color: var(--text-muted);
  margin: 0;
}

/* Filter toolbar */
.filter-toolbar {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.toolbar-label {
  font-size: 0.875rem; /* 14px */
  color: var(--text-muted);
  margin-right: 8px;
  font-weight: 500;
}

.lane-switch-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.button-lane-container {
  display: inline-flex;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 3px;
  gap: 4px;
}

.lane-btn {
  background: transparent;
  color: var(--text-muted);
  border: none;
  padding: 6px 16px;
  font-size: 0.875rem; /* 14px */
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.lane-btn:hover {
  color: var(--text-main);
}

.lane-btn[aria-pressed="true"] {
  background: var(--accent-orange);
  color: #100d0a;
  font-weight: 600;
}

.selectors-group {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.filter-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-label {
  font-size: 0.875rem; /* 14px */
  color: var(--text-muted);
}

.filter-select {
  background: var(--bg-input);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 0.875rem; /* 14px */
  cursor: pointer;
  min-width: 140px;
}

.filter-select:focus-visible {
  outline: none;
  border-color: var(--border-focus);
}

/* Audit banner */
.audit-banner-container {
  margin-bottom: 24px;
}

.audit-banner {
  background: var(--bg-card);
  border-left: 3px solid var(--accent-orange);
  padding: 12px 18px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: 0.875rem; /* 14px */
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.audit-item {
  display: inline-flex;
  gap: 6px;
}

.audit-k {
  color: var(--text-subtle);
}

.audit-v {
  color: var(--text-main);
}

.audit-note {
  flex-basis: 100%;
  color: var(--text-muted);
  font-style: normal;
  border-top: 1px dashed var(--border-subtle);
  padding-top: 8px;
  margin-top: 4px;
}

/* Coverage Grid */
.coverage-section {
  margin-bottom: 36px;
}

.subsection-title {
  font-size: 1.125rem;
  color: var(--text-main);
  margin: 0 0 6px;
}

.coverage-tip {
  font-size: 0.8125rem;
  color: var(--text-subtle);
  margin: 0 0 16px;
}

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

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

.coverage-card.active-metric {
  border-color: var(--accent-orange);
  background: rgba(241, 138, 51, 0.08);
}

.coverage-metric-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  display: block;
}

.coverage-count-val {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-orange);
}

.coverage-count-val.empty {
  color: var(--text-subtle);
}

.coverage-unit-label {
  font-size: 0.75rem;
  color: var(--text-subtle);
  display: block;
  margin-top: 2px;
}

/* Table */
.records-section {
  margin-bottom: 36px;
}

.table-container {
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
}

.records-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem; /* 14px */
}

.records-table th, .records-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: top;
}

.records-table th {
  background: var(--bg-card);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.8125rem;
  white-space: nowrap;
}

.th-source { width: 16%; }
.th-measurements { width: 34%; }
.th-qualitative { width: 18%; }
.th-evidence { width: 18%; }
.th-notes { width: 14%; }

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

.records-table tbody tr:hover {
  background: var(--bg-card-hover);
}

.cell-source {
  font-weight: 500;
}

.badge-specimen {
  display: inline-block;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 2px 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.badge-species {
  display: block;
  font-size: 0.75rem;
  color: var(--text-subtle);
  margin-top: 4px;
}

/* Measurement details inside cells */
.measurement-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.measurement-item {
  border-bottom: 1px dashed var(--border-subtle);
  padding-bottom: 6px;
}

.measurement-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.measurement-highlight {
  background: rgba(241, 138, 51, 0.12);
  padding: 4px 6px;
  border-radius: var(--radius-sm);
}

.m-label {
  font-weight: 600;
  color: var(--text-main);
  margin-right: 6px;
}

.m-value {
  color: var(--accent-orange);
  font-weight: 700;
}

.m-meta {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.m-reported {
  display: block;
  font-size: 0.75rem;
  color: var(--text-subtle);
  margin-top: 2px;
  font-style: italic;
}

/* Qualitative items */
.qual-block {
  margin-bottom: 6px;
}

.qual-block:last-child {
  margin-bottom: 0;
}

.qual-title {
  font-size: 0.75rem;
  color: var(--text-subtle);
  margin-right: 4px;
}

.qual-content {
  color: var(--text-main);
}

.evidence-label {
  display: block;
  margin-bottom: 4px;
  word-break: break-all;
}

.evidence-link {
  color: var(--accent-orange);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.evidence-link:hover {
  color: #ff9d4d;
}

.status-badge {
  display: inline-block;
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  margin-top: 4px;
}

.missing-placeholder {
  color: var(--text-subtle);
}

/* Empty State */
.empty-state-message {
  padding: 48px 24px;
  text-align: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 0.9375rem;
}

/* Method notice */
.method-notice-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-top: 36px;
}

.notice-title {
  font-size: 0.9375rem;
  color: var(--accent-orange);
  margin: 0 0 8px;
  font-weight: 600;
}

.notice-content {
  font-size: 0.875rem; /* 14px */
  color: var(--text-muted);
  margin: 0;
  line-height: 1.6;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 40px 0 32px;
  background: var(--bg-surface);
}

.footer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
  align-items: center;
}

.footer-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem; /* 14px */
}

.footer-link:hover, .footer-link:focus-visible {
  color: var(--accent-orange);
}

.footer-qr-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.footer-qr {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 4px;
  display: block;
}

.qr-caption {
  font-size: 0.75rem;
  color: var(--text-subtle);
}

.footer-copy {
  font-size: 0.8125rem;
  color: var(--text-subtle);
  margin-top: 8px;
}

.footer-copy p {
  margin: 0;
}

/* Responsive adjustments */
.records-pagination {display:flex;gap:16px;align-items:center;justify-content:center;flex-wrap:wrap;padding-top:20px;font-size:14px;}
.records-pagination button {padding:10px 18px;border:1px solid var(--border-subtle);background:var(--bg-card);color:var(--text-main);border-radius:6px;font:inherit;cursor:pointer;}
.records-pagination button:disabled {opacity:.4;cursor:default;}
.reported-details {margin-top:12px;font-size:14px;overflow-wrap:anywhere;}
.reported-details summary,.m-reported summary {cursor:pointer;color:var(--accent-orange);}
.m-meta,.m-reported,.qual-content,.record-notes-text,.evidence-link,.status-badge {font-size:14px;}
.header-inner nav {position:static;padding:0;border:0;background:none;backdrop-filter:none;height:auto;}
.header-inner {flex-wrap:wrap;min-height:64px;height:auto;gap:12px;padding-top:12px;padding-bottom:12px;}
.coverage-grid {grid-template-columns:repeat(3,minmax(0,1fr));}
.coverage-count-val.empty {font-size:18px;}
@media (max-width: 768px) {
  .hero-title {
    font-size: 1.5rem;
  }
  
  .card-grid {
    grid-template-columns: 1fr;
  }

  .filter-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .selectors-group {
    width: 100%;
    flex-direction: column;
    gap: 12px;
  }

  .filter-item {
    width: 100%;
    justify-content: space-between;
  }

  .filter-select {
    flex: 1;
    max-width: 200px;
  }
  .container {padding-left:16px;padding-right:16px;}
  .header-inner {align-items:flex-start;}
  .site-nav .nav-list {gap:14px;flex-wrap:wrap;}
  .coverage-grid {grid-template-columns:repeat(2,minmax(0,1fr));}
  .records-table,.records-table tbody,.records-table tr,.records-table td {display:block;width:100%;min-width:0;}
  .records-table thead {display:none;}
  .records-table tr {border-bottom:2px solid var(--accent-orange-border);margin-bottom:20px;}
  .records-table td {border:0;padding:14px;overflow-wrap:anywhere;}
  .records-table .cell-notes {padding-top:0;}
  .table-container {overflow:visible;border:0;}
}
