:root {
  --ink: #e8eef5;
  --muted: #8d9bb0;
  --dim: #596b82;
  --navy: #0d1728;
  --panel: #142239;
  --panel-hi: #192b46;
  --line: rgba(185, 207, 232, .14);
  --lime: #c5f36a;
  --amber: #ffc871;
  --blue: #76b7ff;
  --red: #ff8f81;
  --shadow: 0 24px 60px rgba(0, 0, 0, .22);
}

* { box-sizing: border-box; }
html {
  min-width: 320px;
  background: var(--navy);
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  touch-action: manipulation;
}
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% -10%, rgba(118, 183, 255, .16), transparent 33rem),
    radial-gradient(circle at 92% 4%, rgba(197, 243, 106, .10), transparent 26rem),
    var(--navy);
  font: 14px/1.6 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: 12px;
  z-index: 20;
  padding: 8px 12px;
  background: var(--lime);
  color: var(--navy);
  text-decoration: none;
  font-weight: 700;
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }

.masthead, .shell, footer {
  width: min(1440px, calc(100% - 64px));
  margin: auto;
}
.masthead {
  display: flex; justify-content: space-between; align-items: flex-end;
  padding: 56px 0 38px; border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}
.logo {
  width: 52px;
  height: 52px;
  flex: none;
  display: block;
  background: var(--navy);
}
.brand-copy { min-width: 0; }
.eyebrow, .section-kicker { color: var(--lime); letter-spacing: .16em; font-size: 10px; font-weight: 800; }
h1, h2, h3, h4, p { margin: 0; }
h1 { margin-top: 6px; font-size: clamp(26px, 4vw, 56px); letter-spacing: -.055em; line-height: 1.05; text-wrap: balance; }
.brand p { color: var(--muted); margin-top: 10px; }
.header-note { color: var(--muted); display: flex; gap: 9px; align-items: center; font-size: 12px; flex: none; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 5px rgba(197,243,106,.1); }
.shell { padding: 34px 0 80px; }
.intro-grid { display: grid; grid-template-columns: minmax(280px, 2fr) repeat(3, minmax(150px, 1fr)); gap: 14px; }
.intro-copy, .metric-card, .panel, .chart-card, .data-card { border: 1px solid var(--line); background: rgba(20, 34, 57, .86); box-shadow: var(--shadow); }
.intro-copy { padding: 28px; min-height: 182px; }
.intro-copy h2 { font-size: clamp(22px, 2.8vw, 38px); letter-spacing: -.045em; margin: 12px 0 10px; line-height: 1.1; }
.intro-copy p { color: var(--muted); max-width: 620px; }
.method-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.method-pills span { border: 1px solid rgba(197,243,106,.26); color: #cbd9b2; padding: 3px 9px; font-size: 11px; }
.metric-card { min-height: 182px; padding: 22px; display: flex; flex-direction: column; justify-content: space-between; border-top: 3px solid var(--line); }
.metric-card.accent-lime { border-top-color: var(--lime); }
.metric-card.accent-amber { border-top-color: var(--amber); }
.metric-card.accent-blue { border-top-color: var(--blue); }
.metric-label { color: var(--muted); font-size: 12px; }
.metric-card strong { font-size: clamp(26px, 4vw, 48px); letter-spacing: -.06em; font-weight: 500; }
.metric-card small { color: var(--dim); }
.contact-card { justify-content: flex-start; gap: 22px; }
.contact-email {
  color: var(--ink);
  text-decoration: none;
  font-size: clamp(14px, 1.5vw, 18px);
  font-weight: 600;
  letter-spacing: -.03em;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.contact-email:hover { color: var(--lime); }
.control-bar { display: flex; gap: 10px; align-items: center; margin: 30px 0 14px; flex-wrap: wrap; }
.search-box, .select-wrap { display: flex; align-items: center; border: 1px solid var(--line); background: var(--panel); height: 42px; }
.search-box { flex: 1 1 300px; padding: 0 12px; gap: 9px; color: var(--lime); }
.search-box input, select { color: var(--ink); background: transparent; border: 0; outline: 0; font: inherit; }
.search-box input { width: 100%; }
.search-box input::placeholder { color: var(--dim); }
.select-wrap { gap: 12px; padding: 0 12px; color: var(--muted); white-space: nowrap; }
.select-wrap span { flex: none; }
.select-wrap select { color: var(--ink); min-width: 92px; cursor: pointer; }
option { background: var(--panel); }
.ghost-button { color: var(--muted); border: 1px solid var(--line); background: transparent; padding: 10px 14px; cursor: pointer; font: inherit; min-height: 42px; }
@media (hover: hover) {
  .ghost-button:hover { color: var(--lime); border-color: rgba(197,243,106,.45); }
}
.ghost-button:focus-visible, .segmented button:focus-visible, .search-box:focus-within, .select-wrap:focus-within {
  outline: 1px solid var(--lime);
  outline-offset: 2px;
}
.panel { overflow: hidden; }
.detail-section.panel { overflow: visible; }
.panel-heading, .detail-heading { display: flex; justify-content: space-between; gap: 20px; align-items: end; padding: 24px 24px 18px; }
h3 { margin-top: 5px; font-size: 24px; letter-spacing: -.04em; }
.table-caption { color: var(--muted); font-size: 12px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; min-width: 940px; border-collapse: collapse; }
th, td { padding: 13px 15px; text-align: left; border-top: 1px solid var(--line); white-space: nowrap; }
th { color: var(--dim); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; }
td { color: #d9e3ef; }
tbody tr { cursor: pointer; transition: background .15s ease; -webkit-tap-highlight-color: rgba(197,243,106,.16); }
@media (hover: hover) {
  tbody tr:hover { background: rgba(118,183,255,.08); }
}
.index-col { text-align: center; }
.index-cell { display: inline-flex; gap: 11px; align-items: center; justify-content: center; }
.index-code { color: var(--lime); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; }
.index-name { font-weight: 650; }
.subcell { color: var(--muted); font-size: 11px; }
.num { font-variant-numeric: tabular-nums; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.quality { color: var(--lime); font-size: 11px; }
.quality.warn { color: var(--amber); }
.quality.empty { color: var(--dim); }
.detail-section { margin-top: 22px; }
.detail-heading { align-items: center; border-bottom: 1px solid var(--line); }
.detail-heading h3 { font-size: clamp(28px, 4vw, 48px); }
.detail-heading p { color: var(--muted); margin-top: 6px; }
.detail-controls { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; padding: 17px 24px; border-bottom: 1px solid var(--line); }
.segmented { display: flex; flex-wrap: wrap; border: 1px solid var(--line); }
.segmented button { border: 0; border-right: 1px solid var(--line); color: var(--muted); background: transparent; padding: 10px 12px; cursor: pointer; font: inherit; font-size: 13px; min-height: 42px; }
.segmented button:last-child { border-right: 0; }
.segmented button.active { color: var(--navy); background: var(--lime); }
.detail-stats { display: grid; grid-template-columns: repeat(6, 1fr); border-bottom: 1px solid var(--line); }
.stat { padding: 17px 20px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat label { display: block; color: var(--dim); font-size: 11px; margin-bottom: 6px; }
.stat strong { font-size: 20px; font-weight: 500; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.chart-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; padding: 14px; background: rgba(6, 12, 22, .2); }
.chart-card { box-shadow: none; }
.chart-title { display: flex; justify-content: space-between; padding: 16px 18px 0; color: var(--ink); }
.chart-title small { color: var(--muted); font-size: 11px; }
.chart { width: 100%; height: 380px; }
.chart-small { height: 380px; }
.detail-lower { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 0 14px 14px; background: rgba(6, 12, 22, .2); }
.data-card { box-shadow: none; padding: 22px; min-height: 180px; }
.data-card h4 { margin: 8px 0 16px; font-size: 18px; }
dl { display: grid; grid-template-columns: 120px 1fr; gap: 7px 16px; margin: 0; }
dt { color: var(--dim); font-size: 12px; }
dd { color: var(--muted); margin: 0; overflow-wrap: anywhere; }
.quality-text { color: var(--muted); }
.quality-text p { margin-bottom: 8px; }
.status-panel { margin: 20px 0; padding: 15px 18px; border: 1px solid rgba(255,200,113,.38); color: var(--amber); background: rgba(255,200,113,.06); }
.legal-notice {
  margin: 22px 0 0;
  padding: 22px 26px 24px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--amber);
  background: rgba(20, 34, 57, .55);
}
.legal-notice h2 {
  margin: 8px 0 14px;
  font-size: 18px;
  letter-spacing: -.03em;
  font-weight: 650;
}
.legal-notice p {
  color: var(--muted);
  max-width: 78ch;
  font-size: 13px;
  line-height: 1.75;
}
.legal-notice p + p { margin-top: 10px; }
.hidden { display: none !important; }
footer {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 0 calc(30px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); color: var(--dim); font-size: 11px;
}
.footer-brand { display: inline-flex; align-items: center; gap: 8px; }
.footer-brand img { display: block; }
footer a { color: var(--muted); text-decoration: none; }
@media (hover: hover) {
  footer a:hover { color: var(--lime); }
}
@media (max-width: 980px) {
  .masthead, .shell, footer { width: min(100% - 32px, 760px); }
  .intro-grid { grid-template-columns: 1fr 1fr; }
  .intro-copy { grid-column: 1 / -1; }
  .detail-stats { grid-template-columns: repeat(3, 1fr); }
  .stat:nth-child(3) { border-right: 0; }
  .chart-grid, .detail-lower { grid-template-columns: 1fr; }
  .table-scroll { overflow: visible; }
  table { min-width: 0; }
  thead { display: none; }
  tbody, tr, td { display: block; width: 100%; }
  tbody tr {
    padding: 16px 18px 12px;
    border-bottom: 1px solid var(--line);
  }
  tbody tr:last-child { border-bottom: 0; }
  td { border-top: 0; white-space: normal; }
  td.index-col {
    text-align: left;
    padding: 0 0 10px;
  }
  .index-cell { display: flex; justify-content: flex-start; }
  td[data-label] {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    padding: 5px 0;
    font-size: 13px;
  }
  td[data-label]::before {
    content: attr(data-label);
    color: var(--dim);
    font-size: 11px;
    letter-spacing: .06em;
    text-transform: uppercase;
    font-weight: 700;
    font-family: inherit;
    flex: none;
  }
}
@media (max-width: 600px) {
  .masthead { display: block; padding: 22px 0 20px; }
  .brand { gap: 12px; }
  .logo { width: 40px; height: 40px; }
  h1 { font-size: 26px; }
  .brand p { margin-top: 6px; font-size: 12px; }
  .header-note { margin-top: 14px; }
  .shell { padding: 16px 0 56px; }
  .intro-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .intro-copy { padding: 16px; min-height: auto; }
  .intro-copy h2 { font-size: 22px; }
  .metric-card { min-height: 118px; padding: 14px; }
  .metric-card strong { font-size: 26px; }
  .contact-card { grid-column: 1 / -1; gap: 12px; }
  .contact-email { font-size: 15px; }
  .control-bar { align-items: stretch; margin: 18px 0 12px; }
  .search-box { flex-basis: 100%; height: 46px; }
  .search-box input, select { font-size: 16px; }
  .select-wrap { flex: 1; min-width: 0; height: 46px; }
  .select-wrap select { min-width: 0; width: 100%; }
  #clearFilters { width: 100%; }
  .panel-heading, .detail-heading { padding: 16px; align-items: flex-start; }
  .detail-heading {
    display: flex;
    flex-wrap: wrap;
    position: sticky;
    top: env(safe-area-inset-top);
    z-index: 6;
    background: #142239;
  }
  .detail-heading h3 { font-size: 28px; }
  .detail-heading button { margin-top: 0; width: 100%; }
  .detail-controls { padding: 10px 12px; gap: 8px; }
  .segmented { width: 100%; }
  .segmented button { flex: 0 0 auto; text-align: center; padding: 10px 11px; }
  #windowControls button { flex: 1 0 auto; }
  .detail-stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2n) { border-right: 0; }
  .stat { padding: 12px; }
  .stat strong { font-size: 18px; }
  .chart-grid, .detail-lower { padding: 9px; gap: 9px; }
  .chart { height: 260px; }
  .chart-small { height: 220px; }
  .chart-title { padding: 12px 14px 0; gap: 8px; flex-wrap: wrap; }
  dl { grid-template-columns: 1fr; gap: 4px; }
  dt { margin-top: 8px; }
  footer { display: block; }
  footer span, footer a { display: block; margin-top: 6px; }
  .legal-notice { margin-top: 16px; padding: 16px; }
  .legal-notice h2 { font-size: 16px; }
  .legal-notice p { font-size: 12px; max-width: none; }
}
