* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { background: #f8fafc; color: #111827; font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-size: 1rem; font-variant-numeric: tabular-nums; line-height: 1.5; margin: 0; }
a { color: #1D4ED8; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid #3B82F6; outline-offset: 4px; }
.skip-link { background: #ffffff; color: #1D4ED8; left: 16px; padding: 12px 16px; position: absolute; top: -64px; z-index: 4; }
.skip-link:focus { top: 16px; }

.site-header { align-items: center; background: #ffffff; border-bottom: 1px solid #cbd5e1; column-gap: 24px; display: grid; grid-template-columns: 1fr auto 1fr; min-height: 56px; padding: 12px max(16px, calc((100vw - 1100px) / 2)); position: sticky; top: 0; z-index: 3; }
.wordmark { color: #111827; font-size: 1rem; font-weight: 750; justify-self: start; letter-spacing: -0.02em; text-decoration: none; }
.header-client { align-items: center; display: flex; gap: 8px; justify-self: center; min-width: 0; }
.sample-header { grid-column: 2; }
.header-client strong { color: #111827; font-size: 0.8125rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sample-marker { background: #dbeafe; border: 1px solid #3B82F6; border-radius: 999px; color: #1e3a8a; display: inline-block; font-size: 0.625rem; font-weight: 800; letter-spacing: 0.06em; padding: 4px 8px; text-transform: uppercase; white-space: nowrap; }
.header-actions { align-items: center; display: flex; gap: 12px; justify-self: end; }
.run-select-label { align-items: center; color: #475569; display: flex; font-size: 0.75rem; font-weight: 700; gap: 8px; white-space: nowrap; }
.run-select-label select { background: #ffffff; border: 1px solid #94a3b8; border-radius: 4px; color: #111827; font: inherit; min-height: 32px; padding: 4px 8px; }
.link-button, .back-button { background: none; border: 0; color: #1D4ED8; cursor: pointer; font: inherit; padding: 0; text-decoration: underline; }
.section-nav { background: #ffffff; border-bottom: 1px solid #e2e8f0; display: flex; gap: 20px; overflow-x: auto; padding: 12px max(16px, calc((100vw - 1100px) / 2)); position: sticky; top: 56px; z-index: 2; }
.section-nav a { color: #334155; font-size: 0.75rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.section-nav a:hover { color: #1D4ED8; }

main { margin: 0 auto; max-width: 1100px; padding: 32px 20px 64px; }
h1, h2, h3, p { margin-top: 0; }
.sample-notice { color: #475569; margin-bottom: 24px; max-width: 70ch; }
h1 { font-size: clamp(2rem, 3vw, 2.5rem); letter-spacing: -0.04em; line-height: 1.08; margin-bottom: 24px; }
h2 { font-size: 1.5rem; letter-spacing: -0.025em; line-height: 1.2; margin-bottom: 8px; }
h3 { font-size: 1rem; line-height: 1.3; margin-bottom: 8px; }
.eyebrow, .rate-label, .question-label { color: #475569; font-size: 0.6875rem; font-weight: 750; letter-spacing: 0.06em; margin-bottom: 8px; text-transform: uppercase; }
.surface-card { background: #ffffff; border: 1px solid #cbd5e1; border-radius: 8px; padding: 24px; }
.sign-in-panel, .status-panel { max-width: 560px; }
form { display: grid; gap: 8px; }
label { font-weight: 700; margin-top: 8px; }
input { border: 1px solid #64748b; border-radius: 4px; font: inherit; min-height: 44px; padding: 8px 12px; }
.button { background: #1D4ED8; border: 1px solid #1D4ED8; border-radius: 4px; color: #ffffff; display: inline-block; font-weight: 750; margin-top: 12px; padding: 12px 16px; text-align: center; text-decoration: none; width: fit-content; }
.run-list { display: grid; gap: 12px; list-style: none; margin: 0; padding: 0; }
.run-list a { background: #ffffff; border: 1px solid #cbd5e1; border-radius: 8px; display: grid; gap: 4px; padding: 16px; text-decoration: none; transition: border-color 150ms ease, background 150ms ease; }
.run-list a:hover { background: #eff6ff; border-color: #3B82F6; }
.run-list span { color: #475569; }

.loading-shell { display: grid; gap: 16px; }
.skeleton { background: #e2e8f0; border-radius: 4px; }
.skeleton-title { height: 40px; max-width: 440px; }
.skeleton-row { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
.skeleton-panel { height: 180px; }
.skeleton-matrix { height: 440px; }

.overview-topline { align-items: stretch; display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.finding-panel { background: #eff6ff; border-color: #93c5fd; display: flex; flex-direction: column; justify-content: space-between; }
.finding-panel h2 { color: #1e3a8a; font-size: clamp(1.5rem, 2.2vw, 1.75rem); max-width: 34ch; }
.finding-detail { color: #475569; margin-bottom: 0; max-width: 70ch; }
.absence-callout { border-color: #cbd5e1; }
.absence-callout h2 { max-width: 30ch; }
.absence-callout ul { display: grid; gap: 8px; list-style: none; margin: 16px 0 0; padding: 0; }
.absence-callout button { background: #ffffff; border: 1px solid #cbd5e1; border-radius: 4px; color: #111827; cursor: pointer; display: grid; gap: 4px; padding: 12px; text-align: left; transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease; width: 100%; }
.absence-callout button:hover { background: #eff6ff; border-color: #3B82F6; box-shadow: inset 4px 0 #3B82F6; }
.absence-question { color: #475569; font-size: 0.6875rem; font-weight: 750; letter-spacing: 0.06em; text-transform: uppercase; }
.absence-callout button strong { font-size: 0.875rem; font-weight: 700; line-height: 1.35; }
.absence-cue { align-items: center; color: #1D4ED8; display: flex; font-size: 0.75rem; font-weight: 750; gap: 8px; }
.absence-cue b { font-size: 1rem; }

.matrix-section, .evidence-section, .coverage-section, .method-section { margin-top: 32px; scroll-margin-top: 120px; }
.section-heading { align-items: end; display: flex; gap: 24px; justify-content: space-between; margin-bottom: 20px; }
.section-heading p { color: #475569; font-size: 0.875rem; margin-bottom: 0; max-width: 70ch; }
.matrix-table { border: 1px solid #cbd5e1; border-radius: 8px; overflow: hidden; }
.matrix-row { display: grid; grid-template-columns: minmax(280px, 2.1fr) repeat(6, minmax(88px, 1fr)); }
.matrix-table.matrix-columns-1 .matrix-row { grid-template-columns: minmax(280px, 1fr); }
.matrix-table.matrix-columns-2 .matrix-row { grid-template-columns: minmax(280px, 1.7fr) minmax(160px, 1fr); }
.matrix-table.matrix-columns-3 .matrix-row { grid-template-columns: minmax(280px, 1.9fr) repeat(2, minmax(130px, 1fr)); }
.matrix-table.matrix-columns-4 .matrix-row { grid-template-columns: minmax(280px, 2fr) repeat(3, minmax(112px, 1fr)); }
.matrix-table.matrix-columns-5 .matrix-row { grid-template-columns: minmax(280px, 2.1fr) repeat(4, minmax(100px, 1fr)); }
.matrix-table.matrix-columns-6 .matrix-row { grid-template-columns: minmax(280px, 2.1fr) repeat(5, minmax(92px, 1fr)); }
.matrix-row > * { border-bottom: 1px solid #e2e8f0; border-right: 1px solid #e2e8f0; min-width: 0; }
.matrix-row > *:last-child { border-right: 0; }
.matrix-row:last-child > * { border-bottom: 0; }
.matrix-header { background: #f1f5f9; color: #475569; font-size: 0.6875rem; font-weight: 800; letter-spacing: 0.02em; text-transform: none; }
.matrix-header span { align-items: center; display: flex; justify-content: center; line-height: 1.25; min-height: 64px; overflow-wrap: anywhere; padding: 8px; text-align: center; }
.matrix-header span:first-child { justify-content: flex-start; text-align: left; }
.matrix-header .client-column { background: #eaf2ff; box-shadow: inset 0 4px #1D4ED8; color: #1e3a8a; }
.matrix-question { background: #ffffff; border-left: 0; border-top: 0; color: #111827; cursor: pointer; display: grid; gap: 4px; padding: 12px; text-align: left; transition: background 150ms ease; }
.matrix-question:hover { background: #eff6ff; }
.matrix-question span, .matrix-question em { color: #475569; font-size: 0.6875rem; font-style: normal; }
.matrix-question strong { display: -webkit-box; font-size: 0.8125rem; line-height: 1.3; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.matrix-cell { align-items: center; background-color: #ffffff; border: 0; color: #111827; cursor: pointer; display: grid; gap: 4px; justify-items: center; min-height: 72px; padding: 8px; transition: filter 150ms ease; }
.matrix-cell:hover { filter: brightness(0.96); }
.matrix-cell strong { font-size: 1.125rem; }
.matrix-cell span { color: #475569; font-size: 0.625rem; }
.client-cell { box-shadow: inset 4px 0 #1D4ED8; }
.zero-cell { background: #ffffff; box-shadow: inset 0 0 0 2px #94a3b8; }
.zero-cell.client-cell { box-shadow: inset 4px 0 #1D4ED8, inset 0 0 0 2px #1D4ED8; }

.exclusion-line { background: #f1f5f9; border-left: 4px solid #64748b; color: #334155; margin-bottom: 16px; padding: 8px 12px; }
.plot-grid, .engine-plot-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.engine-plot-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 16px; }
.interval-plot { background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 4px; min-width: 0; padding: 16px; }
.plot-value { color: #111827; font-size: 1.5rem; font-weight: 800; margin-bottom: 4px; }
.interval-plot svg { display: block; height: auto; max-width: 100%; width: 100%; }
.plot-axis, .plot-tick { stroke: #64748b; stroke-width: 1; }
.plot-band { stroke: #3B82F6; stroke-width: 8; stroke-linecap: round; }
.plot-dot { fill: #1D4ED8; }
.interval-plot text { fill: #475569; font-size: 0.625rem; }
.plot-detail { color: #334155; font-size: 0.75rem; margin: 0; }

.coverage-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.coverage-legend span { align-items: center; color: #334155; display: inline-flex; font-size: 0.8125rem; gap: 8px; }
.legend-symbol, .coverage-cell b { align-items: center; border: 1px solid #64748b; display: inline-flex; height: 20px; justify-content: center; width: 20px; }
.named-symbol, .coverage-cell.named { background: #bfdbfe; border-color: #1D4ED8; color: #1e3a8a; }
.not-named-symbol, .coverage-cell.not-named { background: #f1f5f9; color: #334155; }
.excluded-symbol, .coverage-cell.excluded { background: #e2e8f0; border-color: #64748b; color: #111827; }
.coverage-bases { display: grid; gap: 8px; grid-template-columns: repeat(4, minmax(0, 1fr)); list-style: none; margin: 0 0 16px; padding: 0; }
.coverage-bases li { background: #f8fbff; border: 1px solid #dbeafe; border-left: 4px solid #3B82F6; border-radius: 4px; color: #475569; display: grid; font-size: 0.75rem; gap: 4px; line-height: 1.35; padding: 12px; }
.coverage-bases strong { color: #111827; font-size: 0.8125rem; }
.coverage-grid { border: 1px solid #cbd5e1; display: grid; }
.coverage-row { display: grid; grid-template-columns: 112px repeat(4, minmax(0, 1fr)); }
.coverage-row > * { border-bottom: 1px solid #e2e8f0; border-right: 1px solid #e2e8f0; min-height: 36px; }
.coverage-row > *:last-child { border-right: 0; }
.coverage-row:last-child > * { border-bottom: 0; }
.coverage-header { background: #f1f5f9; color: #475569; font-size: 0.6875rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
.coverage-header span, .coverage-question { align-items: center; display: flex; overflow-wrap: anywhere; padding: 8px; }
.coverage-question { color: #334155; font-size: 0.75rem; font-weight: 800; }
.coverage-cell { align-items: center; display: flex; justify-content: center; }
.coverage-cell b { font-size: 0.6875rem; font-weight: 800; }

.method-section { color: #334155; margin-bottom: 24px; }
.method-section p { max-width: 70ch; }
.method-section p:last-child { margin-bottom: 0; }
.question-detail { scroll-margin-top: 120px; }
.back-button { font-weight: 750; margin-bottom: 24px; }
.question-base { color: #475569; }
.share-section, .checked-section, .engine-strip-section, .raw-details { border-top: 1px solid #cbd5e1; margin-top: 24px; padding-top: 16px; }
.share-section ul, .checked-section ul, .engine-strip { display: grid; gap: 12px; list-style: none; margin: 0; padding: 0; }
.share-bar { background: #f8fafc; border: 1px solid #cbd5e1; border-radius: 4px; padding: 12px; }
.share-bar > div { align-items: baseline; display: flex; gap: 8px; justify-content: space-between; margin-bottom: 8px; }
.share-bar span { color: #475569; font-size: 0.8125rem; }
.bar-track { background: #e2e8f0; display: block; height: 12px; overflow: hidden; }
.bar-fill { background: #3B82F6; display: block; height: 100%; min-width: 0; }
.client-bar { border-color: #1D4ED8; }
.client-bar .bar-fill { background: #1D4ED8; }
.checked-section li { background: #f1f5f9; border-left: 4px solid #64748b; padding: 8px 12px; }
.engine-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.engine-status { align-items: start; border: 1px solid #cbd5e1; display: flex; gap: 8px; min-height: 88px; padding: 12px; }
.engine-status > b { align-items: center; border: 1px solid #64748b; display: inline-flex; flex: 0 0 20px; height: 20px; justify-content: center; }
.engine-status.named > b { background: #bfdbfe; border-color: #1D4ED8; color: #1e3a8a; }
.engine-status.excluded > b { background: #e2e8f0; }
.engine-status span { color: #475569; display: grid; font-size: 0.75rem; gap: 4px; }
.engine-status strong { color: #111827; font-size: 0.8125rem; }
.raw-details { background: #f8fafc; padding: 16px; }
.raw-details summary { color: #1D4ED8; cursor: pointer; font-weight: 800; }
.raw-table { margin-top: 16px; overflow-x: auto; }
table { border-collapse: collapse; table-layout: fixed; width: 100%; }
th, td { border-bottom: 1px solid #cbd5e1; padding: 12px 8px; text-align: left; vertical-align: top; word-wrap: break-word; }
thead th { color: #475569; font-size: 0.6875rem; text-transform: uppercase; }
tbody th { font-size: 0.8125rem; }
.observation-list { display: grid; gap: 4px; margin: 0; padding-left: 20px; }
.visually-hidden { clip: rect(0, 0, 0, 0); height: 1px; margin: -1px; overflow: hidden; position: absolute; width: 1px; }

@media (max-width: 760px) {
  .site-header { column-gap: 8px; grid-template-columns: minmax(0, 1fr) auto auto; padding: 8px 12px; }
  .header-client { justify-self: start; }
  .sample-header { grid-column: 2 / 4; justify-self: end; }
  .header-client strong { max-width: 96px; }
  .header-actions { gap: 8px; }
  .run-select-label > span { display: none; }
  .run-select-label select { max-width: 88px; }
  .link-button { font-size: 0.6875rem; }
  .section-nav { gap: 16px; padding: 12px 16px; top: 56px; }
  main { padding: 24px 16px 48px; }
  .overview-topline, .plot-grid, .engine-plot-grid, .engine-strip, .skeleton-row { grid-template-columns: 1fr; }
  .section-heading { align-items: start; flex-direction: column; gap: 8px; }
  .matrix-table { border: 0; overflow: visible; }
  .matrix-row, .matrix-table.matrix-columns-1 .matrix-row, .matrix-table.matrix-columns-2 .matrix-row, .matrix-table.matrix-columns-3 .matrix-row, .matrix-table.matrix-columns-4 .matrix-row, .matrix-table.matrix-columns-5 .matrix-row, .matrix-table.matrix-columns-6 .matrix-row { border: 1px solid #cbd5e1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 12px; }
  .matrix-table .matrix-header, .matrix-table.matrix-columns-1 .matrix-header, .matrix-table.matrix-columns-2 .matrix-header, .matrix-table.matrix-columns-3 .matrix-header, .matrix-table.matrix-columns-4 .matrix-header, .matrix-table.matrix-columns-5 .matrix-header, .matrix-table.matrix-columns-6 .matrix-header { display: none; }
  .matrix-question { border-bottom: 1px solid #cbd5e1; grid-column: 1 / -1; min-height: 72px; }
  .matrix-cell { min-height: 72px; }
  .matrix-row > * { border-bottom: 1px solid #e2e8f0; }
  .coverage-bases { grid-template-columns: 1fr 1fr; }
  .coverage-row { grid-template-columns: 72px repeat(4, minmax(0, 1fr)); }
  .share-bar > div { align-items: start; flex-direction: column; gap: 4px; }
  table, thead, tbody, tr, th, td { display: block; }
  thead { height: 1px; overflow: hidden; position: absolute; width: 1px; }
  tr { border-top: 1px solid #cbd5e1; padding: 8px 0; }
  th, td { border: 0; padding: 4px 0; }
  td::before { color: #475569; content: attr(data-label); display: block; font-size: 0.6875rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
}

@media (max-width: 440px) {
  .header-client strong { display: none; }
  .header-client { gap: 0; }
  .wordmark { font-size: 0.875rem; }
  .run-select-label select { max-width: 80px; }
}

@media print {
  body { background: #ffffff; font-size: 0.75rem; }
  .site-header, .section-nav, .skip-link, .link-button, .back-button, .run-select-label { display: none; }
  main { max-width: none; padding: 0; }
  h1, h2, h3 { break-after: avoid; }
  .surface-card, .matrix-row { break-inside: avoid; }
  .overview-topline { display: block; }
  .overview-topline > * + * { margin-top: 16px; }
  .matrix-table { overflow: visible; }
  .matrix-row { grid-template-columns: minmax(200px, 1.8fr) repeat(6, minmax(54px, 1fr)); }
}
