:root {
  --fds-neutral-0: #ffffff;
  --fds-neutral-50: #f8fafc;
  --fds-neutral-200: #e2e8f0;
  --fds-neutral-500: #64748b;
  --fds-neutral-700: #334155;
  --fds-neutral-900: #0f172a;
  --brand-primary: #8b2f3f;
  --brand-primary-dark: #6f2432;
  --surface-page: var(--fds-neutral-0);
  --surface-subtle: var(--fds-neutral-50);
  --text-primary: var(--fds-neutral-900);
  --text-secondary: var(--fds-neutral-700);
  --text-muted: var(--fds-neutral-500);
  --border-default: var(--fds-neutral-200);
  --border-focus: var(--brand-primary);
  --domain-ink: #145da0;
  --list-header: #30363d;
  --list-stripe: #f0f2f4;
  --panel-surface: #f5f6f7;
  --panel-border: #d3d8de;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --content-width: 90rem;
  --report-width: 90rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: light; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--surface-page);
  color: var(--text-primary);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}
a { color: var(--brand-primary-dark); text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 0.12em; }
a:focus-visible, .domain-table-wrap:focus-visible {
  outline: 3px solid var(--border-focus);
  outline-offset: 4px;
  border-radius: 2px;
}
.skip-link {
  position: fixed;
  inset: var(--space-4) auto auto var(--space-4);
  z-index: 10;
  padding: var(--space-3) var(--space-4);
  background: var(--text-primary);
  color: white;
  transform: translateY(-180%);
}
.skip-link:focus { transform: translateY(0); }
.container {
  width: min(calc(100% - 2rem), var(--content-width));
  margin-inline: auto;
}
.report-container { max-width: var(--report-width); }
.site-header { border-bottom: 1px solid var(--border-default); }
.site-header .container {
  min-height: 3.5rem;
  display: flex;
  align-items: center;
}
.brand {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--text-primary);
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.brand-dot { color: var(--brand-primary); }
main:focus { outline: none; }
.hero { padding-block: var(--space-5) var(--space-4); }
h1, h2, h3 { margin: 0; line-height: 1.14; letter-spacing: -0.035em; }
h1 { font-size: clamp(1.25rem, 2.2vw, 1.5rem); font-weight: 700; }
h2 { font-size: 1.125rem; font-weight: 700; }
h3 { font-size: 1rem; font-weight: 700; }
.hero-lead {
  max-width: 65rem;
  margin: var(--space-2) 0 0;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.55;
}
.section { padding-block: var(--space-6); }
.section + .section { border-top: 1px solid var(--border-default); }
.report-section { padding-top: var(--space-2); background: var(--surface-page); }
.section-heading { margin-bottom: var(--space-4); }
.report-section > .container > .section-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2) var(--space-6); margin-bottom: var(--space-3); }
.section-label {
  margin: 0;
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 750;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}
.report-meta { margin: 0; color: var(--text-muted); font-size: 0.875rem; }
.report-intro { max-width: 60rem; margin: var(--space-4) 0 0; color: var(--text-secondary); font-size: 0.875rem; }
.report-note { max-width: 48rem; margin: var(--space-3) 0 0; color: var(--text-muted); font-size: 0.875rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.report-workspace { display: grid; grid-template-columns: 13rem minmax(0, 1fr); gap: var(--space-5); align-items: start; }
.report-results { min-width: 0; }
.filter-sidebar { min-width: 0; background: var(--panel-surface); border: 1px solid var(--panel-border); }
.filter-heading { display: flex; align-items: center; justify-content: space-between; padding-inline: var(--space-3); border-bottom: 1px solid var(--panel-border); min-height: 2.75rem; }
.filter-heading h3 { font-size: 1.0625rem; letter-spacing: 0; }
.filter-toggle { font: inherit; font-size: 1.125rem; color: var(--text-secondary); background: white; border: 1px solid var(--panel-border); width: 1.75rem; height: 1.75rem; }
.filter-note { font-size: 0.875rem; line-height: 1.45; color: var(--text-secondary); margin: var(--space-3); }
.filter-group { min-width: 0; margin: var(--space-4) 0 0; padding: 0 var(--space-3) var(--space-3); border: 0; border-bottom: 1px solid var(--panel-border); }
.filter-group legend { padding: 0 0 var(--space-2); font-weight: 700; font-size: 0.9375rem; }
.filter-option { display: grid; grid-template-columns: 1rem minmax(0, 1fr) auto; align-items: center; gap: var(--space-2); min-height: 2rem; font-size: 0.875rem; line-height: 1.4; color: var(--text-secondary); }
.filter-option input { margin: 0; width: 0.875rem; height: 0.875rem; }
.filter-option span { overflow-wrap: anywhere; }
.filter-count { font-variant-numeric: tabular-nums; }
.filter-bottom { padding: var(--space-3); }
.show-more { width: 100%; min-height: 2.75rem; background: #e6e9ed; border: 1px solid var(--panel-border); font: inherit; font-size: 0.875rem; color: var(--text-secondary); }
.filter-sidebar button:disabled { cursor: not-allowed; }
.table-scroll-hint { display: none; margin: 0 0 var(--space-2); font-size: 0.875rem; color: var(--text-secondary); }
.domain-table-wrap { max-width: 100%; overflow-x: auto; border: 1px solid var(--panel-border); scrollbar-color: var(--text-muted) var(--list-stripe); }
.domain-table { width: 100%; min-width: 76rem; border-collapse: collapse; table-layout: fixed; }
.domain-table thead { background: var(--list-header); color: var(--fds-neutral-0); }
.domain-table thead th {
  padding: var(--space-3);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0;
  text-align: left;
  text-transform: none;
}
.domain-table thead th:first-child { width: 4%; text-align: right; }
.domain-table thead th:nth-child(2) { width: 18%; }
.domain-table thead th:nth-child(3) { width: 12%; }
.domain-table thead th:nth-child(4) { width: 15%; }
.domain-table thead th:nth-child(5) { width: 23%; }
.domain-table thead th:nth-child(6) { width: 9%; }
.domain-table thead th:nth-child(7) { width: 8%; }
.domain-table thead th:nth-child(8) { width: 11%; }
.domain-table tbody tr { border-bottom: 1px solid var(--border-default); }
.domain-table tbody tr:nth-child(even) { background: var(--list-stripe); }
.domain-table tbody th,
.domain-table tbody td { padding: var(--space-3); text-align: left; vertical-align: middle; overflow-wrap: anywhere; }
.domain-table tbody th { font-weight: 400; }
.domain-table tbody td { color: var(--text-secondary); font-size: 0.875rem; line-height: 1.45; }
.domain-table .rank { text-align: right; color: var(--text-muted); font-variant-numeric: tabular-nums; font-weight: 700; }
.domain-name {
  display: block;
  overflow-wrap: anywhere;
  color: var(--domain-ink);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.35;
}
.domain-reason { color: var(--text-secondary); font-size: 0.875rem; font-weight: 400; line-height: 1.45; }
.domain-name--masked { color: var(--text-secondary); font-weight: 650; }
.visibility-embargoed,
.visibility-strategic { background-color: var(--surface-subtle); }
.visibility-label { color: var(--text-secondary); font-weight: 700; }
.quality, .movement { font-weight: 650; white-space: nowrap; }
.movement-up { color: #166534; }
.movement-down { color: #9a3412; }
.movement-new { color: var(--brand-primary-dark); }
.radar-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-1) var(--space-6);
  margin: 0 0 var(--space-4);
  padding-left: 1.25rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.45;
}
.radar-summary strong { color: var(--text-primary); }
.steps { display: grid; gap: var(--space-4); }
.step-number {
  display: none;
  margin-bottom: var(--space-2);
  color: var(--brand-primary-dark);
  font-size: 0.875rem;
  font-weight: 700;
}
.step p, .project-note { margin: var(--space-2) 0 0; color: var(--text-secondary); font-size: 0.875rem; max-width: 75ch; }
.project-section { padding-top: var(--space-5); }
.empty-state { padding: var(--space-10) 0; border-block: 1px solid var(--border-default); }
.empty-state p { max-width: 42rem; margin: var(--space-4) 0 0; color: var(--text-secondary); }
.site-footer { border-top: 1px solid var(--border-default); padding-block: var(--space-5); color: var(--text-secondary); }
.footer-row { display: flex; flex-wrap: wrap; gap: var(--space-4) var(--space-6); align-items: center; }
.footer-row p { margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-6); }
.footer-links a { min-height: 44px; display: inline-flex; align-items: center; }
.disclaimer { max-width: 46rem; margin: var(--space-6) 0 0; font-size: 0.875rem; }

@media (min-width: 48rem) {
  .container { width: min(calc(100% - 3rem), var(--content-width)); }
  .report-container { width: min(calc(100% - 3rem), var(--report-width)); }
  .steps { grid-template-columns: repeat(3, 1fr); gap: var(--space-8); }
  .footer-row { justify-content: space-between; }
}
@media (min-width: 64rem) {
  .container { width: min(calc(100% - 4rem), var(--content-width)); }
  .report-container { width: min(calc(100% - 4rem), var(--report-width)); }
}
@media (max-width: 30rem) {
  .footer-row, .footer-links { flex-direction: column; align-items: flex-start; gap: var(--space-1); }
}
@media (max-width: 75rem) {
  .table-scroll-hint { display: block; }
  .report-workspace { grid-template-columns: 11rem minmax(0, 1fr); gap: var(--space-4); }
  .radar-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 47.999rem) {
  .report-workspace { display: flex; flex-direction: column; }
  .report-results { order: -1; width: 100%; }
  .filter-sidebar { width: 100%; }
  .radar-summary { grid-template-columns: 1fr; gap: var(--space-1); }
  .domain-table { min-width: 68rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
@media (forced-colors: active) {
  .domain-table thead { background: CanvasText; color: Canvas; }
}
