:root {
  --ink: #111318;
  --muted: #5e626a;
  --rule: #aeb1b6;
  --soft-rule: #d8dade;
  --paper: #fff;
  --wash: #f5f5f4;
  --act: #a51c30;
  --sat: #00356b;
  --accent: var(--act);
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); }
button, input, select { font: inherit; color: inherit; }
button, select, input { border-radius: 0; }
.page-shell { max-width: 1600px; margin: 0 auto; padding: 24px 36px 22px; }
.masthead { min-height: 52px; display: flex; align-items: center; justify-content: space-between; border-bottom: 2px solid var(--ink); padding: 0 7px 14px; }
.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand-logo { width: 34px; height: 34px; object-fit: contain; }
.brand-wordmark { width: 254px; height: 29px; display: block; }
.masthead-note, .eyebrow, .controls legend, .curriculum-control > span, .precalc-control > span, .stage-head span, .topic-head, .detail-tags button, .page-footer { font-size: 11px; font-weight: 700; letter-spacing: .055em; }
.masthead-note { color: var(--muted); }
.masthead-note a { color: inherit; text-decoration: none; border-bottom: 1px solid currentColor; }
.masthead-note a:hover { color: var(--ink); }
.masthead-note span { padding: 0 7px; color: var(--accent); }
.intro { padding: 26px 8px 19px; }
.eyebrow { margin: 0 0 8px; color: var(--muted); }
h1, h2, h3 { font-family: Georgia, 'Times New Roman', serif; font-weight: 400; }
h1 { margin: 0 0 7px; font-size: clamp(36px, 4vw, 51px); line-height: 1.04; letter-spacing: -.025em; }
.dek { margin: 0; max-width: 1020px; font-size: 16px; line-height: 1.45; }
.caveat { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.4; }
.controls { display: flex; align-items: end; gap: 18px; padding: 12px 8px 15px; border-bottom: 1px solid var(--ink); }
.test-toggle { display: flex; align-items: stretch; gap: 0; border: 0; padding: 0; margin: 0; }
.test-toggle legend { float: left; align-self: center; padding: 0 12px 0 0; }
.test-toggle button { min-width: 66px; height: 42px; background: #fff; border: 1px solid var(--rule); font-size: 12px; font-weight: 700; cursor: pointer; }
.test-toggle button + button { border-left: 0; }
.test-toggle button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.curriculum-control, .precalc-control { display: flex; flex-direction: column; gap: 6px; min-width: 225px; }
.curriculum-control > span, .precalc-control > span { color: var(--muted); }
.curriculum-control select, .precalc-control select, .search-control { height: 42px; border: 1px solid var(--rule); background: #fff; }
.curriculum-control select, .precalc-control select { padding: 0 32px 0 11px; }
.search-control { display: flex; align-items: center; gap: 10px; width: min(300px, 27vw); margin-left: auto; padding: 0 12px; }
.search-control:focus-within, .curriculum-control select:focus, .precalc-control select:focus, .test-toggle button:focus-visible, .clear-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.search-control input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 14px; }
.search-icon { width: 14px; height: 14px; position: relative; border: 1.7px solid var(--ink); border-radius: 50%; flex: 0 0 auto; }
.search-icon::after { content: ''; width: 6px; height: 1.7px; position: absolute; right: -5px; bottom: -2px; background: var(--ink); transform: rotate(48deg); }
.clear-button { border: 1px solid var(--rule); height: 42px; padding: 0 13px; background: #fff; cursor: pointer; }
.summary-line { min-height: 36px; padding: 10px 8px 8px; display: flex; justify-content: space-between; gap: 16px; color: var(--muted); font-size: 11px; letter-spacing: .045em; text-transform: uppercase; }
.coverage-note { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 10px 12px; background: #f7f7f7; color: var(--muted); font-size: 12px; line-height: 1.45; }
.coverage-note[hidden] { display: none; }
.precalc-default-note { margin: 0; padding: 7px 8px 9px; color: var(--muted); font-size: 11px; line-height: 1.4; border-bottom: 1px solid var(--soft-rule); }
.viz-panel { margin: 14px 0; padding: 18px 20px 14px; border: 1px solid var(--rule); background: #fff; }
.viz-heading { display: flex; justify-content: space-between; align-items: end; gap: 16px; }
.viz-heading h2 { margin: 0; font-size: 27px; }
.viz-subtitle, .viz-note { margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.viz-context { margin: 7px 0 0; font-size: 11px; font-weight: 700; color: var(--ink); }
.density-filters { display: flex; align-items: center; flex-wrap: wrap; gap: 0; margin-top: 13px; }
#act-form-filters[hidden] { display: none; }
.density-filters > span { margin-right: 10px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .05em; }
.density-filters button { min-height: 32px; padding: 5px 13px; border: 1px solid var(--rule); background: #fff; color: var(--ink); font-size: 11px; font-weight: 700; cursor: pointer; }
.density-filters button + button { border-left: 0; }
.density-filters button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: #fff; }
.density-filters button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.density-band-note { margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.4; }
.density-scroll, .web-scroll { max-width: 100%; }
.density-chart { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; align-items: end; padding: 20px 3px 8px; border-bottom: 1px solid var(--soft-rule); }
.density-column { display: flex; flex-direction: column; align-items: center; justify-content: end; min-width: 0; text-align: center; }
.density-value { margin-bottom: 6px; font-size: 14px; color: var(--ink); font-variant-numeric: tabular-nums; }
.density-track { display: flex; align-items: end; height: 155px; width: min(90%, 95px); border-bottom: 2px solid var(--ink); }
.density-bar { display: flex; flex-direction: column-reverse; width: 100%; background: var(--accent); }
.density-core { display: block; background: var(--accent); }
.density-support { display: block; background: color-mix(in srgb, var(--accent) 35%, white); border-top: 1px solid #fff; }
.density-label { min-height: 38px; margin-top: 7px; font-size: 11px; font-weight: 700; line-height: 1.25; }
.web-panel { margin-top: 13px; }
.web-layout { border: 1px solid var(--soft-rule); }
.web-scroll { overflow-x: auto; }
.web-scroll svg { display: block; width: 100%; min-width: 850px; max-width: 1100px; height: auto; margin-inline: auto; }
.web-edge { fill: none; stroke: var(--accent); stroke-opacity: .17; stroke-linecap: round; }
.web-layout.has-selection .web-edge:not(.selected) { stroke-opacity: .035; }
.web-edge.selected { stroke-opacity: .5; }
.web-column-heading { font: 700 10px Arial, Helvetica, sans-serif; fill: var(--muted); letter-spacing: .05em; }
.web-node rect { fill: #fff; stroke: var(--rule); stroke-width: 1; }
.web-node circle { fill: var(--accent); fill-opacity: .8; }
.web-node-label, .web-node-percent { font: 700 11px Arial, Helvetica, sans-serif; fill: var(--ink); }
.web-node-percent { font-size: 10px; text-anchor: end; }
.web-course, .web-family, .web-topic { cursor: pointer; }
.web-course:hover rect, .web-course:focus rect, .web-family:hover rect, .web-family:focus rect, .web-topic:hover rect, .web-topic:focus rect { stroke: var(--accent); stroke-width: 2; }
.web-node.selected rect { stroke: var(--accent); stroke-width: 2; fill: color-mix(in srgb, var(--accent) 6%, white); }
.web-empty-topic { font: 700 12px Arial, Helvetica, sans-serif; fill: var(--muted); }
.timeline-wrap { border: 1px solid var(--rule); }
.timeline-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--rule); background: #fafafa; }
.timeline-toolbar .eyebrow { margin-bottom: 3px; }
#timeline-view-state { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.35; }
#timeline-filter-state { margin: 4px 0 0; font-size: 12px; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.timeline-detail-note { margin: 3px 0 0; color: var(--muted); font-size: 11px; line-height: 1.35; }
.timeline-toolbar button { flex: 0 0 auto; min-height: 34px; padding: 6px 10px; border: 1px solid var(--accent); background: #fff; color: var(--accent); font-size: 11px; font-weight: 700; cursor: pointer; }
.timeline-toolbar button:hover, .timeline-toolbar button:focus-visible { background: color-mix(in srgb, var(--accent) 8%, white); outline: 2px solid var(--accent); outline-offset: 2px; }
.timeline-toolbar button[hidden] { display: none; }
.timeline-scroll { overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scrollbar-color: #90939a #eee; }
.timeline-grid { display: grid; grid-template-columns: minmax(250px, 1.2fr) repeat(5, minmax(150px, 1fr)); min-width: 1000px; }
.timeline-head { min-height: 66px; display: flex; flex-direction: column; justify-content: center; gap: 9px; border-bottom: 1px solid var(--rule); background: #fff; }
.topic-head { position: sticky; left: 0; z-index: 4; padding: 0 14px; border-right: 1px solid var(--rule); }
.stage-head { align-items: center; border-right: 1px solid var(--soft-rule); }
.stage-head strong { font-size: 12px; text-align: center; letter-spacing: .015em; }
.stage-head span { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--muted); font-size: 9px; letter-spacing: .035em; font-weight: 400; }
.stage-head span b { height: 9px; border-left: 1px dashed var(--rule); }
.timeline-rows { display: contents; }
.topic-row { display: contents; }
.topic-cell, .stage-cell { min-height: 35px; border-bottom: 1px solid var(--soft-rule); }
.topic-cell { position: sticky; left: 0; z-index: 2; display: flex; align-items: center; gap: 8px; padding: 0 10px; background: #fff; border-right: 1px solid var(--rule); font-size: 13px; }
.topic-cell.group-cell { font-size: 11px; font-weight: 700; letter-spacing: .025em; text-transform: uppercase; }
.topic-cell.selected, .topic-cell.search-hit { background: color-mix(in srgb, var(--accent) 9%, white); color: var(--accent); }
.topic-cell button.topic-select { min-width: 0; flex: 1; border: 0; padding: 7px 0; background: transparent; text-align: left; cursor: pointer; }
.topic-cell button.topic-select:hover { color: var(--accent); }
.disclosure { width: 14px; height: 20px; flex: 0 0 14px; padding: 0; border: 0; background: transparent; cursor: pointer; color: currentColor; }
.disclosure::before { content: '▶'; font-size: 10px; }
.disclosure[aria-expanded="true"]::before { content: '▼'; }
.tag-count { color: var(--muted); font-size: 10px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; margin-left: auto; }
.row-evidence { color: #737780; font-size: 8px; letter-spacing: .04em; white-space: nowrap; }
.row-evidence.inferred-evidence { color: #555962; }
.stage-cell { position: relative; border-right: 1px solid var(--soft-rule); background-image: linear-gradient(to right, transparent 33.15%, #d7d9dc 33.33%, transparent 33.5%, transparent 66.45%, #d7d9dc 66.66%, transparent 66.85%); }
.stage-cell:last-child { border-right: 0; }
.placement-marker { position: absolute; top: 50%; height: 7px; width: 15px; min-width: 11px; transform: translate(-50%, -50%); background: var(--accent); border: 1px solid var(--accent); }
.placement-marker::after { content: ''; position: absolute; inset: -4px -3px; }
.placement-marker.coarse { left: 50%; width: calc(100% - 28px); height: 8px; min-width: 0; background: var(--accent); border: 0; }
.placement-marker.coarse.inferred { height: 11px; background: transparent; border: 2px dashed #72757a; }
.placement-marker.reference-fallback { background: #fff; border: 2px dashed #72757a; }
.placement-marker.coarse::after { display: none; }
.foundation-exposure { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); border-bottom: 2px dotted #57616e; color: #45505e; padding: 2px 1px; font-size: 9px; font-weight: 700; white-space: nowrap; cursor: help; }
.foundation-first-placement { position: absolute; left: 50%; top: 50%; width: calc(100% - 20px); transform: translate(-50%, -50%); padding: 4px 2px; border: 1px solid #57616e; background: #f5f6f7; color: #34404c; text-align: center; font-size: 9px; font-weight: 700; white-space: nowrap; }
.foundation-first-placement.selected { outline: 2px solid var(--accent); outline-offset: 1px; }
.placement-marker.selected { height: 10px; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent); }
.placement-marker.other { top: 50%; left: 50%; width: auto; height: auto; min-width: 0; padding: 3px 5px; transform: translate(-50%, -50%); border: 1px solid var(--accent); background: #fff; color: var(--accent); font-size: 9px; white-space: nowrap; }
.missing-label { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: #777b82; font-size: 9px; text-transform: uppercase; letter-spacing: .035em; }
.tag-row .topic-cell { padding-left: 37px; font-size: 12px; }
.tag-row .topic-cell button { padding: 6px 0; }
.tag-more-row .topic-cell { padding-left: 43px; min-height: 30px; }
.tag-more-row .stage-cell { min-height: 30px; }
.tag-more-disclosure { display: inline-flex; align-items: center; gap: 7px; min-height: 30px; padding: 3px 0; border: 0; background: transparent; color: #505862; font-size: 11px; font-weight: 600; text-align: left; cursor: pointer; }
.tag-more-disclosure::before { content: '▸'; color: #505862; font-size: 13px; line-height: 1; }
.tag-more-disclosure[aria-expanded="true"]::before { content: '▾'; }
.tag-more-disclosure:hover { color: var(--ink); }
.tag-more-disclosure:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.additional-tag-row .topic-cell { padding-left: 43px; }
.tag-row .tag-id { color: var(--muted); font: 10px/1 Arial, sans-serif; }
.tag-row .stage-cell { min-height: 32px; }
.unsequenced-row .topic-cell { color: #777b82; font-style: italic; }
.empty-state { padding: 34px 18px; display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--muted); text-align: center; }
.empty-state strong { color: var(--ink); font: 24px Georgia, 'Times New Roman', serif; }
.empty-state[hidden] { display: none; }
.unmapped-panel { border-top: 1px solid var(--rule); padding: 14px 14px 16px; background: #fbfbfb; }
.unmapped-panel[hidden] { display: none; }
.unmapped-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.unmapped-heading .eyebrow { margin-bottom: 4px; }
.unmapped-heading h2 { margin: 0; font-size: 22px; }
.unmapped-heading > span { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .05em; }
.unmapped-copy { margin: 7px 0 10px; color: var(--muted); font-size: 12px; }
.unmapped-list { display: flex; flex-wrap: wrap; gap: 6px; }
.unmapped-list button { max-width: 100%; padding: 6px 8px; border: 1px solid var(--rule); background: white; text-align: left; font-size: 11px; cursor: pointer; }
.unmapped-list button:hover, .unmapped-list button.selected { border-color: var(--accent); color: var(--accent); }
.unmapped-more { padding: 7px 2px; color: var(--muted); font-size: 11px; }
.timeline-foot { display: flex; align-items: center; gap: 7px; min-height: 34px; padding: 7px 12px; color: var(--muted); font-size: 10px; border-top: 1px solid var(--rule); }
.legend-mark { width: 15px; height: 6px; background: var(--accent); margin-left: 10px; }
.legend-mark:first-child { margin-left: 0; }
.legend-mark.band { background: var(--accent); }
.legend-mark.inferred { height: 10px; background: transparent; border: 2px dashed #72757a; }
.legend-mark.foundation { height: 0; background: none; border-bottom: 2px dotted #57616e; }
.legend-mark.missing { height: 0; background: none; border-top: 1px dashed #858990; }
.curriculum-lens { margin-top: 18px; padding: 13px 15px; border: 1px solid var(--soft-rule); background: #fafafa; }
.lens-heading h3 { margin: 0 0 11px; font: 20px/1.2 Georgia, 'Times New Roman', serif; }
.lens-placement h4 { margin: 0 0 4px; font-size: 17px; }
.lens-topic { margin: 0 0 4px !important; color: var(--muted); font-size: 11px !important; font-weight: 700; }
.lens-placement p:not(.eyebrow), .topic-detail p:not(.eyebrow), .source-panel p:not(.eyebrow) { font-size: 13px; line-height: 1.5; margin: 0; }
.detail-wrap { grid-column: 1 / -1; position: sticky; left: 0; z-index: 3; box-sizing: border-box; width: min(100%, calc(100vw - 24px)); min-width: 0; margin: 0; padding: 12px; display: grid; grid-template-columns: 1.15fr .85fr; gap: 12px; align-items: stretch; border-bottom: 1px solid var(--rule); border-left: 3px solid var(--accent); background: #f8f8f8; }
.detail-wrap[hidden] { display: none; }
.topic-detail, .source-panel { min-width: 0; padding: 16px 20px; border: 1px solid var(--rule); }
.topic-detail { border-top: 3px solid var(--accent); }
.topic-detail h2 { margin: 0 0 7px; font-size: 29px; }
.detail-kind { color: var(--muted); padding-top: 5px; }
.detail-neighbors { color: #3d4651; padding-top: 8px; }
.detail-foundation { margin: 9px 0 0 !important; padding: 8px 9px; border-left: 2px dotted #57616e; background: #f5f6f7; color: #34404c; }
.detail-foundation[hidden] { display: none; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 12px; }
.detail-tags button { padding: 6px 8px; border: 1px solid var(--accent); color: var(--accent); background: #fff; font-size: 9px; cursor: pointer; }
.detail-tags button:hover { background: color-mix(in srgb, var(--accent) 8%, white); }
.source-panel a { display: inline-block; margin-top: 9px; color: var(--sat); font-size: 13px; font-weight: 700; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.source-panel a + a { display: block; }
.source-panel a[hidden] { display: none; }
.page-footer { display: flex; justify-content: space-between; margin: 16px 5px 0; color: var(--muted); font-weight: 400; letter-spacing: .02em; }
.page-footer span:first-child { font-weight: 700; letter-spacing: .055em; color: var(--ink); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 760px) {
  .page-shell { padding: 15px 14px 18px; display: flex; flex-direction: column; }
  .masthead { order: 0; }
  .intro { order: 1; }
  .viz-panel:not(.web-panel) { order: 2; }
  .web-panel { order: 3; }
  .controls { order: 4; }
  .precalc-default-note { order: 5; }
  .summary-line { order: 6; }
  .coverage-note { order: 7; }
  .timeline-wrap { order: 8; }
  .page-footer { order: 10; }
  .masthead { align-items: flex-start; gap: 12px; padding-left: 2px; padding-right: 2px; }
  .brand { gap: 10px; }
  .brand-logo { width: 27px; height: 27px; }
  .brand-wordmark { width: min(235px, calc(100vw - 88px)); height: 28px; }
  .masthead-note { align-self: center; max-width: none; text-align: right; font-size: 10px; line-height: 1.4; }
  .masthead-section { display: none; }
  .intro { padding: 22px 2px 16px; }
  h1 { font-size: 38px; }
  .dek { font-size: 14px; }
  .controls { align-items: stretch; flex-wrap: wrap; gap: 10px; padding-left: 2px; padding-right: 2px; }
  .test-toggle { width: 100%; }
  .test-toggle legend { width: auto; margin-right: 8px; }
  .curriculum-control { min-width: 0; flex: 1 1 100%; }
  .precalc-control { min-width: 0; flex: 1 1 100%; }
  .search-control { width: auto; flex: 1; margin-left: 0; }
  .clear-button { flex: 0 0 auto; }
  .summary-line { padding-left: 2px; padding-right: 2px; }
  .coverage-note { font-size: 11px; }
  .viz-panel { padding: 14px 10px; }
  .viz-heading { align-items: start; flex-direction: column; gap: 5px; }
  .viz-heading h2 { font-size: 24px; }
  .density-chart { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 16px; }
  .web-scroll svg { width: 1100px; max-width: none; }
  .timeline-grid { grid-template-columns: 210px repeat(5, 145px); min-width: 935px; }
  .topic-cell { font-size: 12px; }
  .timeline-foot { flex-wrap: wrap; line-height: 1.4; }
  .curriculum-lens { padding: 13px 16px; }
  .detail-wrap { grid-template-columns: 1fr; gap: 8px; }
  .topic-detail, .source-panel { padding: 14px 16px; }
  .page-footer { line-height: 1.4; gap: 12px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
