/* ============================================================
   OC Flow Bridge — dashboard styles
   No external fonts or assets: this must render offline in a
   presentation room with no network.
   ============================================================ */

:root {
  --paper:      #f7f7f5;
  --surface:    #ffffff;
  --surface-2:  #fbfbfa;
  --ink:        #14171b;
  --ink-2:      #3d454e;
  --muted:      #555e6b;   /* 6.6:1 on white, 6.1:1 on --paper */
  --faint:      #69717d;   /* 4.9:1 on white, 4.6:1 on --paper -- AA at any size */
  --rule:       #e2e4e7;
  --rule-soft:  #eceef0;

  --oc:         #2f4b8c;
  --oc-soft:    #eef2fb;
  --at:         #9a5a06;
  --at-soft:    #fdf3e4;
  --mid:        #3f4854;
  --mid-soft:   #f0f1f3;

  --ok:         #17703f;
  --ok-soft:    #e7f4ec;
  --error:      #a8271b;
  --error-soft: #fdecea;
  --never:      #6a6154;
  --never-soft: #f4f1ea;

  --accent:     #2f4b8c;
  --focus:      #1f6feb;

  --radius:     12px;
  --radius-sm:  8px;
  --shadow:     0 1px 2px rgba(20,23,27,.05), 0 8px 24px -12px rgba(20,23,27,.14);

  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --topbar-h: 60px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:      #0d1014;
    --surface:    #141920;
    --surface-2:  #11161c;
    --ink:        #e8ebef;
    --ink-2:      #c2c9d2;
    --muted:      #97a1ad;
    --faint:      #78828e;
    --rule:       #262d36;
    --rule-soft:  #1e242c;

    --oc:         #8fabe8;
    --oc-soft:    #1a2337;
    --at:         #e0a458;
    --at-soft:    #2c2214;
    --mid:        #b3bcc8;
    --mid-soft:   #1c222a;

    --ok:         #59c98d;
    --ok-soft:    #12291d;
    --error:      #f08278;
    --error-soft: #2e1815;
    --never:      #c2b596;
    --never-soft: #262218;

    --accent:     #8fabe8;
    --focus:      #6fa8ff;
    --shadow:     0 1px 2px rgba(0,0,0,.4), 0 12px 32px -14px rgba(0,0,0,.7);
  }
}

:root[data-theme="dark"] {
  --paper:      #0d1014;
  --surface:    #141920;
  --surface-2:  #11161c;
  --ink:        #e8ebef;
  --ink-2:      #c2c9d2;
  --muted:      #97a1ad;
  --faint:      #78828e;
  --rule:       #262d36;
  --rule-soft:  #1e242c;

  --oc:         #8fabe8;
  --oc-soft:    #1a2337;
  --at:         #e0a458;
  --at-soft:    #2c2214;
  --mid:        #b3bcc8;
  --mid-soft:   #1c222a;

  --ok:         #59c98d;
  --ok-soft:    #12291d;
  --error:      #f08278;
  --error-soft: #2e1815;
  --never:      #c2b596;
  --never-soft: #262218;

  --accent:     #8fabe8;
  --focus:      #6fa8ff;
  --shadow:     0 1px 2px rgba(0,0,0,.4), 0 12px 32px -14px rgba(0,0,0,.7);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar-h) + 18px);
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.18; letter-spacing: -.018em; margin: 0; text-wrap: balance; }
p { margin: 0; }
code { font-family: var(--mono); font-size: .88em; }
a { color: var(--accent); }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 3px;
}

.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 24px; }

.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;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--surface); color: var(--ink); padding: 10px 16px;
  border: 1px solid var(--rule); border-radius: var(--radius-sm);
  text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: 12px; }

/* ---------------------------- topbar ---------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  height: var(--topbar-h);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.topbar-inner { display: flex; align-items: center; gap: 20px; height: var(--topbar-h); }

.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; min-width: 0; }
.brand-mark {
  display: grid; place-items: center; width: 32px; height: 32px; flex: none;
  border-radius: 9px;
  background: #146074; color: #ffffff;   /* Powering Futures brand teal */
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-text strong { font-size: 15px; letter-spacing: -.01em; }
.brand-sub { font-size: 11.5px; color: var(--muted); white-space: nowrap; }

.sectionnav { display: flex; gap: 4px; }
.sectionnav a {
  font-size: 13.5px; color: var(--muted); text-decoration: none;
  padding: 7px 11px; border-radius: 7px; white-space: nowrap;
  transition: color .15s, background-color .15s;
}
.sectionnav a:hover { color: var(--ink); background: var(--rule-soft); }
.sectionnav a.is-current { color: var(--ink); font-weight: 600; background: var(--rule-soft); }

.theme-toggle {
  display: grid; place-items: center; width: 34px; height: 34px; flex: none;
  border: 1px solid var(--rule); border-radius: 9px;
  background: var(--surface); color: var(--ink-2); cursor: pointer;
  transition: background-color .15s, color .15s;
}
.theme-toggle:hover { background: var(--rule-soft); color: var(--ink); }
.i-moon { display: none; }
:root[data-theme="dark"] .i-sun { display: none; }
:root[data-theme="dark"] .i-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .i-sun { display: none; }
  :root:not([data-theme="light"]) .i-moon { display: block; }
}

@media (max-width: 860px) {
  .sectionnav { display: none; }
  .brand-sub { display: none; }
}

/* ---------------------------- sections ---------------------------- */
.section { padding: 72px 0; border-top: 1px solid var(--rule); }
.section-alt { background: var(--surface-2); }
.section-hero { border-top: 0; padding-top: 60px; padding-bottom: 76px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--rule); border-radius: 999px;
  padding: 5px 13px 5px 11px; background: var(--surface);
  margin-bottom: 22px;
}

h1 { font-size: clamp(30px, 4.6vw, 47px); font-weight: 680; max-width: 20ch; }
.h1-muted { color: var(--muted); font-weight: 500; }

.lede {
  margin-top: 20px; max-width: 66ch;
  font-size: clamp(16px, 1.45vw, 18px); color: var(--ink-2); line-height: 1.62;
}
.lede em { color: var(--ink); font-style: normal; font-weight: 620; }

.kicker {
  display: flex; align-items: center; gap: 10px;
  font-size: 12.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 14px;
}
.kicker .num {
  font-family: var(--mono); font-size: 11px; color: var(--accent);
  border: 1px solid var(--rule); border-radius: 5px; padding: 2px 6px; letter-spacing: 0;
}
h2 { font-size: clamp(24px, 3vw, 33px); font-weight: 650; max-width: 22ch; }
.section-lede { margin-top: 16px; max-width: 68ch; color: var(--muted); font-size: 16px; }
h3 { font-size: 16.5px; font-weight: 640; }

/* ---------------------------- stat grid ---------------------------- */
.statgrid {
  display: grid; gap: 14px; margin-top: 38px;
  grid-template-columns: repeat(auto-fit, minmax(186px, 1fr));
}
.stat {
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--radius); padding: 18px 18px 16px;
  display: flex; flex-direction: column; gap: 5px;
}
.stat-value {
  font-size: 36px; font-weight: 660; letter-spacing: -.028em;
  font-variant-numeric: tabular-nums; line-height: 1.05;
}
.stat-value.is-small { font-size: 21px; letter-spacing: -.012em; }
.stat-label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.stat-note { font-size: 12.5px; color: var(--faint); line-height: 1.45; }
.stat-ok    .stat-value { color: var(--ok); }
.stat-clean .stat-value { color: var(--ink); }

/* ---------------------------- milestone ---------------------------- */
.milestone {
  margin-top: 34px; border: 1px solid var(--rule); border-radius: var(--radius);
  background: var(--surface); overflow: hidden;
}
.milestone-row { display: flex; gap: 12px; padding: 16px 18px; align-items: flex-start; }
.milestone-row + .milestone-row { border-top: 1px solid var(--rule-soft); }
.milestone-row p { font-size: 14.5px; color: var(--ink-2); }
.milestone-row strong { color: var(--ink); }
.tick {
  flex: none; display: grid; place-items: center; width: 22px; height: 22px; margin-top: 1px;
  border-radius: 999px; background: var(--ok-soft); color: var(--ok);
}
.tick-open { background: var(--never-soft); color: var(--never); }
.milestone-row code { background: var(--mid-soft); padding: 1px 5px; border-radius: 4px; font-size: 12px; }

.snapshot-note {
  margin-top: 20px; font-size: 13px; color: var(--faint);
  display: flex; flex-wrap: wrap; gap: 6px 14px;
}
.snapshot-note b { color: var(--muted); font-weight: 600; }

/* ---------------------------- diagram ---------------------------- */
.diagram-figure { margin: 34px 0 0; }
.diagram-scroll {
  overflow-x: auto; border: 1px solid var(--rule); border-radius: var(--radius);
  background: var(--surface); padding: 8px;
}
.flowdiagram { display: block; width: 100%; min-width: 720px; height: auto; }

.d-box { fill: var(--surface); stroke: var(--rule); stroke-width: 1.25; }
.d-box-oc { fill: var(--oc-soft); stroke: color-mix(in srgb, var(--oc) 32%, var(--rule)); }
.d-box-at { fill: var(--at-soft); stroke: color-mix(in srgb, var(--at) 32%, var(--rule)); }
.d-box-mid { fill: var(--mid-soft); }

.d-tag { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; fill: var(--muted); }
.d-tag-oc { fill: var(--oc); }
.d-tag-at { fill: var(--at); }
.d-tag-mid { fill: var(--muted); }
.d-title { font-family: var(--sans); font-size: 19px; font-weight: 640; fill: var(--ink); }
.d-line { font-family: var(--sans); font-size: 13px; fill: var(--muted); }

.d-arrow { stroke: var(--ink-2); stroke-width: 1.6; }
.d-arrowhead { fill: var(--ink-2); }
.d-edge { font-family: var(--mono); font-size: 12px; font-weight: 600; fill: var(--ink); }
.d-edge-sub { font-family: var(--mono); font-size: 10.5px; fill: var(--faint); }
.d-note { font-family: var(--sans); font-size: 12.5px; fill: var(--faint); font-style: italic; }

.d-blocked { fill: none; stroke: var(--error); stroke-width: 1.4; stroke-dasharray: 5 5; opacity: .55; }
.d-blocked-badge { fill: var(--error-soft); stroke: var(--error); stroke-width: 1.3; }
.d-blocked-x { stroke: var(--error); stroke-width: 2.1; stroke-linecap: round; }
.d-blocked-label { font-family: var(--sans); font-size: 13.5px; font-weight: 620; fill: var(--error); }
.d-blocked-sub { font-family: var(--sans); font-size: 12.5px; fill: var(--muted); }

/* ---------------------------- cards ---------------------------- */
.cardgrid { display: grid; gap: 14px; margin-top: 22px; }
.cardgrid-3 { grid-template-columns: repeat(auto-fit, minmax(258px, 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--radius); padding: 20px;
}
.card h3 { margin-bottom: 8px; }
.card p { font-size: 14.5px; color: var(--muted); }
.card strong { color: var(--ink); font-variant-numeric: tabular-nums; }

/* ---------------------------- boundary ---------------------------- */
.boundary-grid {
  display: grid; gap: 30px; margin-top: 34px;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
}
@media (max-width: 940px) { .boundary-grid { grid-template-columns: 1fr; } }

.boundary-h { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; font-size: 15px; }
.boundary-icon { display: grid; place-items: center; width: 21px; height: 21px; border-radius: 999px; flex: none; }
.boundary-h-yes .boundary-icon { background: var(--ok-soft); color: var(--ok); }
.boundary-h-no  .boundary-icon { background: var(--error-soft); color: var(--error); }

.table-scroll {
  overflow-x: auto; border: 1px solid var(--rule);
  border-radius: var(--radius); background: var(--surface);
}
table { border-collapse: collapse; width: 100%; }
.mapping-table { font-size: 13.5px; min-width: 620px; }
.mapping-table th {
  text-align: left; font-size: 11px; letter-spacing: .07em; text-transform: uppercase;
  color: var(--muted); font-weight: 640; padding: 11px 14px;
  border-bottom: 1px solid var(--rule); background: var(--surface-2);
  position: sticky; top: 0; z-index: 1;
}
.mapping-table td { padding: 10px 14px; border-bottom: 1px solid var(--rule-soft); vertical-align: top; }
.mapping-table tr:last-child td { border-bottom: 0; }
.mapping-table code { font-size: 12px; color: var(--ink-2); }
.src-note { display: block; font-size: 11.5px; color: var(--faint); margin-top: 2px; }
.dir { font-family: var(--mono); font-size: 11.5px; color: var(--muted); white-space: nowrap; }

.policy {
  display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
  font-size: 11.5px; font-weight: 620; padding: 2px 8px; border-radius: 999px;
}
.policy-on  { background: var(--ok-soft); color: var(--ok); }
.policy-off { background: var(--error-soft); color: var(--error); }
.policy-derived { background: var(--mid-soft); color: var(--muted); }

.blocklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.blocklist li {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--rule);
  border-left: 3px solid var(--error);
  border-radius: var(--radius-sm); padding: 11px 13px; font-size: 13.5px; color: var(--ink-2);
}
.blocklist li strong { color: var(--ink); }
.blocklist .x { color: var(--error); font-weight: 700; flex: none; line-height: 1.5; }

.dropnote { margin-top: 18px; font-size: 13px; color: var(--muted); }
.dropnote strong { color: var(--ink); }
.droppedfields {
  list-style: none; margin: 12px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 6px;
}
.droppedfields li {
  font-family: var(--mono); font-size: 11.5px; color: var(--muted);
  background: var(--surface); border: 1px dashed var(--rule);
  border-radius: 6px; padding: 3px 8px;
  text-decoration: line-through; text-decoration-color: var(--error);
}

/* ---------------------------- controls ---------------------------- */
.controls {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  margin-top: 28px;
}
.search-wrap { position: relative; flex: 1 1 250px; min-width: 0; }
.search-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--faint); pointer-events: none;
}
#tableSearch {
  width: 100%; font: inherit; font-size: 14px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--radius-sm); padding: 9px 12px 9px 36px;
}
#tableSearch::placeholder { color: var(--faint); }
#tableSearch::-webkit-search-cancel-button { cursor: pointer; }

.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.chipbtn {
  display: inline-flex; align-items: center; gap: 6px;
  font: inherit; font-size: 13px; font-weight: 550; color: var(--muted);
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: 999px; padding: 7px 13px; cursor: pointer;
  transition: color .14s, border-color .14s, background-color .14s;
}
.chipbtn:hover { color: var(--ink); border-color: var(--faint); }
.chipbtn.is-active { color: var(--ink); border-color: var(--ink-2); background: var(--rule-soft); font-weight: 620; }

#schoolFilter {
  font: inherit; font-size: 13.5px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--radius-sm); padding: 8px 11px; max-width: 210px;
}

.switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-track {
  width: 34px; height: 20px; border-radius: 999px; flex: none;
  background: var(--rule); border: 1px solid var(--rule);
  display: flex; align-items: center; padding: 2px; transition: background-color .16s;
}
.switch-thumb {
  width: 14px; height: 14px; border-radius: 999px; background: var(--surface);
  box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .16s;
}
.switch input:checked + .switch-track { background: var(--accent); border-color: var(--accent); }
.switch input:checked + .switch-track .switch-thumb { transform: translateX(14px); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--focus); outline-offset: 2px; }
.switch-label { font-size: 13px; color: var(--muted); }
.switch-hint { color: var(--faint); }

.rowcount {
  margin-top: 14px; font-size: 12.5px; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.rowcount b { color: var(--ink); font-weight: 640; }

/* ---------------------------- workspace table ---------------------------- */
.table-shell { margin-top: 10px; }
.table-scroll-tall { max-height: 620px; overflow-y: auto; }

.ws-table { font-size: 13.5px; min-width: 1040px; }
.ws-table thead th {
  position: sticky; top: 0; z-index: 2;
  text-align: left; font-size: 11px; letter-spacing: .07em; text-transform: uppercase;
  color: var(--muted); font-weight: 640; padding: 11px 14px;
  background: var(--surface-2); border-bottom: 1px solid var(--rule);
  white-space: nowrap;
}
.ws-table .th-num { text-align: right; }
.ws-table tbody tr {
  border-bottom: 1px solid var(--rule-soft); cursor: pointer;
  transition: background-color .12s;
}
.ws-table tbody tr:last-child { border-bottom: 0; }
.ws-table tbody tr:hover { background: var(--rule-soft); }
.ws-table tbody tr:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; background: var(--rule-soft); }
.ws-table tbody tr.is-selected { background: var(--oc-soft); }
.ws-table td { padding: 9px 14px; vertical-align: middle; }
.ws-table .td-num { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.ws-table .td-uuid { font-family: var(--mono); font-size: 11.5px; color: var(--faint); white-space: nowrap; }
.ws-table .td-time { font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: nowrap; }
/* The workspace name already contains the school and cohort, so it is long.
   Keep it on one line and let the table scroll rather than wrapping every row
   to two lines. */
.ws-table td:nth-child(2), .ws-table td:nth-child(3) { white-space: nowrap; }
.ws-name { font-weight: 550; color: var(--ink); }

.ws-name .test-tag {
  font-family: var(--mono); font-size: 10px; color: var(--faint);
  border: 1px solid var(--rule); border-radius: 4px; padding: 0 4px; margin-right: 7px;
  vertical-align: 1px;
}
.synth-tag {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .05em;
  background: var(--never-soft); color: var(--never); border: 1px solid color-mix(in srgb, var(--never) 30%, transparent);
  border-radius: 4px; padding: 1px 5px; margin-left: 8px; vertical-align: 1px;
}

.chip {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  font-size: 11.5px; font-weight: 640; padding: 3px 9px; border-radius: 999px;
  font-family: var(--mono); letter-spacing: .01em;
}
.chip-ok    { background: var(--ok-soft);    color: var(--ok); }
.chip-error { background: var(--error-soft); color: var(--error); }
.chip-never { background: var(--never-soft); color: var(--never); }

.dot { width: 7px; height: 7px; border-radius: 999px; flex: none; display: inline-block; }
.dot-ok { background: var(--ok); }
.dot-error { background: var(--error); }
.dot-never { background: var(--never); }
.chip .dot { width: 6px; height: 6px; }

.empty-state {
  padding: 40px 20px; text-align: center; color: var(--muted); font-size: 14px;
  border: 1px solid var(--rule); border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius); background: var(--surface);
}

/* ---------------------------- roadmap ---------------------------- */
.roadmap { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 14px; counter-reset: none; }
.roadmap-item {
  display: grid; grid-template-columns: 148px minmax(0, 1fr); gap: 20px;
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--radius); padding: 20px 22px;
}
@media (max-width: 720px) { .roadmap-item { grid-template-columns: 1fr; gap: 12px; } }
.roadmap-status {
  font-family: var(--mono); font-size: 11px; font-weight: 640;
  letter-spacing: .05em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px; height: fit-content;
  justify-self: start; white-space: nowrap;
}
.roadmap-status-progress { background: var(--at-soft); color: var(--at); }
.roadmap-status-blocked  { background: var(--error-soft); color: var(--error); }
.roadmap-body h3 { margin-bottom: 7px; }
.roadmap-body p { font-size: 14.5px; color: var(--muted); max-width: 70ch; }
.roadmap-body code { background: var(--mid-soft); padding: 1px 5px; border-radius: 4px; font-size: 12.5px; }

.notyet {
  margin-top: 26px; border: 1px solid var(--rule); border-left: 3px solid var(--muted);
  border-radius: var(--radius); background: var(--surface); padding: 20px 22px;
}
.notyet h3 { margin-bottom: 10px; }
.notyet ul { margin: 0; padding-left: 18px; display: grid; gap: 7px; }
.notyet li { font-size: 14px; color: var(--muted); }
.notyet code { background: var(--mid-soft); padding: 1px 5px; border-radius: 4px; font-size: 12.5px; }

/* ---------------------------- footer ---------------------------- */
.footer { border-top: 1px solid var(--rule); padding: 26px 0 40px; background: var(--paper); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }
.footer p { font-size: 12.5px; color: var(--faint); }
.footer-meta { font-family: var(--mono); font-size: 11.5px; }

.noscript-note {
  padding: 30px 24px; font-size: 14px; color: var(--muted);
}

/* ---------------------------- drawer ---------------------------- */
/* The UA's [hidden] rule loses to the display values set below, so state it
   explicitly -- otherwise the drawer renders open on first paint. */
.drawer[hidden], .drawer-scrim[hidden] { display: none; }

.drawer-scrim {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(12, 15, 19, .42);
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
  animation: fade .16s ease-out;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.drawer {
  position: fixed; z-index: 51; top: 0; right: 0; bottom: 0;
  width: min(460px, 100%);
  background: var(--surface); border-left: 1px solid var(--rule);
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  animation: slide .2s cubic-bezier(.32,.72,.35,1);
}
@keyframes slide { from { transform: translateX(18px); opacity: .4; } to { transform: none; opacity: 1; } }

.drawer-head {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 20px 22px 16px; border-bottom: 1px solid var(--rule); flex: none;
}
.drawer-eyebrow {
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); font-weight: 640; margin-bottom: 5px;
}
.drawer-title { font-size: 17px; font-weight: 640; margin-right: auto; }
.drawer-close {
  margin-left: auto; flex: none; display: grid; place-items: center;
  width: 32px; height: 32px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--rule); background: var(--surface); color: var(--muted);
}
.drawer-close:hover { background: var(--rule-soft); color: var(--ink); }
.drawer-body { padding: 20px 22px 32px; overflow-y: auto; flex: 1 1 auto; }

.dl { display: grid; grid-template-columns: 118px minmax(0,1fr); gap: 7px 14px; font-size: 13px; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; color: var(--ink); font-family: var(--mono); font-size: 12px; word-break: break-all; }

.drawer-sub {
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); font-weight: 640;
  margin: 26px 0 12px; padding-top: 18px; border-top: 1px solid var(--rule-soft);
}
.drawer-sub:first-child { margin-top: 0; padding-top: 0; border-top: 0; }

.timeline { list-style: none; margin: 0; padding: 0 0 0 22px; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px;
  width: 1px; background: var(--rule);
}
.timeline li { position: relative; padding-bottom: 16px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: -21px; top: 5px;
  width: 9px; height: 9px; border-radius: 999px;
  background: var(--surface); border: 2px solid var(--rule);
}
.timeline li.is-cursor::before { border-color: var(--accent); background: var(--accent); }
.ev-type { font-family: var(--mono); font-size: 12.5px; font-weight: 620; color: var(--ink); }
.ev-time { font-family: var(--mono); font-size: 11.5px; color: var(--faint); display: block; margin-top: 1px; }
.ev-delta { color: color-mix(in srgb, var(--accent) 75%, var(--faint)); }
.ev-flag {
  display: inline-block; margin-left: 8px; font-family: var(--mono); font-size: 9.5px;
  letter-spacing: .05em; color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  border-radius: 4px; padding: 0 5px; vertical-align: 1px;
}

.cursor-box {
  margin-top: 8px; border: 1px solid var(--rule); border-radius: var(--radius-sm);
  background: var(--surface-2); padding: 14px 15px;
}
.cursor-box p { font-size: 12.5px; color: var(--muted); }
.cursor-box p + p { margin-top: 9px; }
.cursor-box code {
  display: block; margin-top: 8px; font-size: 11.5px; color: var(--ink-2);
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: 6px; padding: 8px 10px; word-break: break-all;
}
.cursor-box strong { color: var(--ink); }

.err-box {
  border: 1px solid color-mix(in srgb, var(--error) 34%, var(--rule));
  background: var(--error-soft); border-radius: var(--radius-sm);
  padding: 12px 14px; font-family: var(--mono); font-size: 11.5px;
  color: var(--error); white-space: pre-wrap; word-break: break-word;
}
.synth-warning {
  margin-bottom: 16px; border: 1px dashed color-mix(in srgb, var(--never) 45%, var(--rule));
  background: var(--never-soft); border-radius: var(--radius-sm);
  padding: 11px 13px; font-size: 12.5px; color: var(--never);
}
.synth-warning strong { color: var(--ink); }
.drawer-note { font-size: 12.5px; color: var(--muted); }
.drawer-note code { font-size: 11.5px; }

@media (max-width: 560px) {
  .section { padding: 54px 0; }
  .wrap { padding: 0 18px; }
  .drawer { width: 100%; border-left: 0; }
  .stat-value { font-size: 31px; }
}

/* ---------------------------- cohort summary ---------------------------- */
.subhead { margin: 40px 0 10px; font-size: 15px; }
.subnote { font-size: 13px; color: var(--muted); max-width: 74ch; margin-bottom: 14px; }
.subnote strong { color: var(--ink); }
.statgrid-tight { margin-top: 26px; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); }

.pathnote {
  margin-top: 30px; border: 1px solid var(--rule); border-radius: var(--radius);
  background: var(--surface); overflow: hidden;
}
.pathnote-head { padding: 18px 20px 0; }
.pathnote-badge {
  display: inline-block; font-family: var(--mono); font-size: 10.5px; font-weight: 640;
  letter-spacing: .06em; text-transform: uppercase; color: var(--at);
  background: var(--at-soft); border-radius: 999px; padding: 3px 10px; margin-bottom: 10px;
}
.pathnote-head h3 { font-size: 16px; margin-bottom: 4px; }
.pathrow { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 16px 20px 4px; }
@media (max-width: 760px) { .pathrow { grid-template-columns: 1fr; } }
.pathcard { border: 1px solid var(--rule); border-radius: var(--radius-sm); padding: 14px 16px; }
.pathcard-alt { border-left: 3px solid var(--at); background: var(--surface-2); }
.pathcard-t { font-size: 13px; font-weight: 640; color: var(--ink); margin-bottom: 4px; }
.pathcard-tag {
  font-family: var(--mono); font-size: 10px; font-weight: 500; color: var(--muted);
  border: 1px solid var(--rule); border-radius: 4px; padding: 1px 6px; margin-left: 6px;
}
.pathcard-flow { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.pathcard-flow b { color: var(--ink); }
.pathcard p:last-child { font-size: 13px; color: var(--muted); }
.pathnote-foot {
  padding: 14px 20px 18px; font-size: 12.5px; color: var(--muted);
  border-top: 1px solid var(--rule-soft); margin-top: 12px;
}
.pathnote-foot code {
  background: var(--mid-soft); padding: 1px 5px; border-radius: 4px; font-size: 11.5px;
}
.pathnote-foot strong { color: var(--ink); }

/* stacked comparison bars */
.bars { margin-top: 6px; }
.barrow { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 16px; align-items: center; padding: 7px 0; }
@media (max-width: 700px) { .barrow { grid-template-columns: 1fr; gap: 6px; } }
.barrow-hl .bar { outline: 2px solid var(--accent); outline-offset: 2px; }
.bar-label { display: flex; flex-direction: column; line-height: 1.3; }
.bar-label b { font-size: 13.5px; }
.bar-label span { font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.bar { display: flex; height: 30px; border-radius: 6px; overflow: hidden; background: var(--rule-soft); }
.seg { display: flex; align-items: center; justify-content: center; min-width: 2px; }
.seg-l { font-family: var(--mono); font-size: 11px; font-weight: 640; color: #fff; }
/* Segment fills are deliberately identical in both themes: the same colour
   should always mean the same outcome, and every one of these clears 4.5:1
   against the white label sitting on it. Lightening them for dark mode dropped
   the labels to ~3.4:1. */
.seg-pass      { background: #17703f; }   /* white label 6.1:1 */
.seg-passa     { background: #2f8050; }   /* white label 4.9:1 */
.seg-noaward   { background: #a8271b; }   /* white label 7.2:1 */
.seg-withdrawn { background: #8a6d3b; }   /* white label 5.0:1 */
.seg-pending   { background: #8a6a1e; }   /* white label 5.5:1 */
.seg-none      { background: var(--rule); }
/* The "not submitted" track is light in light mode, so its label takes ink. */
.seg-none .seg-l { color: var(--ink-2); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 14px; padding-left: 206px; }
@media (max-width: 700px) { .legend { padding-left: 0; } }
.legend-i { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); }
.legend-i .seg { width: 12px; height: 12px; border-radius: 3px; flex: none; }

.gapnote {
  margin-top: 26px; border: 1px solid var(--rule); border-left: 3px solid var(--at);
  background: var(--at-soft); border-radius: var(--radius); padding: 18px 20px;
}
.gapnote h4 { font-size: 14.5px; font-weight: 640; margin-bottom: 7px; color: var(--ink); }
.gapnote p { font-size: 13.5px; color: var(--ink-2); max-width: 82ch; }
.gapnote strong { color: var(--ink); }
.gapnote em { font-style: normal; font-family: var(--mono); font-size: 12.5px; }

.cohort-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 30px; margin-top: 4px; }
@media (max-width: 940px) { .cohort-grid { grid-template-columns: 1fr; } }
.stagebars { margin-bottom: 8px; }
.stagebars .barrow { grid-template-columns: 120px minmax(0,1fr); }
.stagebars .legend { padding-left: 136px; }
@media (max-width: 700px) { .stagebars .barrow { grid-template-columns: 1fr; } .stagebars .legend { padding-left: 0; } }

.votable { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.votable li {
  position: relative; display: flex; align-items: center; gap: 10px;
  padding: 7px 11px; border-radius: var(--radius-sm); overflow: hidden;
  background: var(--surface); border: 1px solid var(--rule);
}
.vo-bar { position: absolute; left: 0; top: 0; bottom: 0; background: var(--oc-soft); z-index: 0; }
.vo-l { position: relative; z-index: 1; font-size: 12.5px; color: var(--ink-2); flex: 1 1 auto; }
.vo-n {
  position: relative; z-index: 1; font-family: var(--mono); font-size: 12px;
  color: var(--ink); font-weight: 640; flex: none; font-variant-numeric: tabular-nums;
}
.vo-n em { font-style: normal; color: var(--faint); font-weight: 500; margin-left: 4px; }
.demo-h { font-size: 13px; font-weight: 640; color: var(--muted); margin-bottom: 9px; }
#schoolTable .td-num, #schoolTable .th-num { text-align: right; font-variant-numeric: tabular-nums; }
#schoolTable td { font-size: 13px; }
/* .mapping-table's 620px min-width is sized for the wide field-mapping table
   and pushes the Pass rate column out of this narrower two-column layout. */
#schoolTable { min-width: 430px; }
#schoolTable th, #schoolTable td { padding-left: 10px; padding-right: 10px; }
