/* CSWE Accreditation Command Center — design system (restrained, academic, accessible) */
:root {
  --ink: #1b2430; --ink-2: #3b4a5a; --ink-3: #5f6f80; --muted: #8a97a6;
  --bg: #f4f6f8; --surface: #ffffff; --surface-2: #f9fafb; --line: #dfe5ec; --line-2: #eef1f5;
  --brand: #1f3a4d; --brand-2: #2b5570; --brand-soft: #e6eef4; --accent: #9a6b1f; --accent-soft: #f6efe1;
  --ready: #1f6f43; --ready-soft: #e3f3ea; --progress: #8a5a00; --progress-soft: #fbf0d9; --risk: #a72e24; --risk-soft: #fbe6e3; --none: #5b6875; --none-soft: #e9edf1;
  --focus: #2b5570; --radius: 8px; --shadow: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.08);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { font-size: 15px; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.5; }
a { color: var(--brand-2); text-decoration: none; } a:hover { text-decoration: underline; }
h1,h2,h3,h4 { margin: 0 0 .5rem; line-height: 1.25; color: var(--ink); font-weight: 650; }
h1 { font-size: 1.55rem; } h2 { font-size: 1.2rem; } h3 { font-size: 1rem; } h4 { font-size: .9rem; color: var(--ink-2); text-transform: uppercase; letter-spacing: .04em; }
p { margin: 0 0 .75rem; } small, .muted { color: var(--ink-3); } .tiny { font-size: .8rem; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85em; background: var(--surface-2); padding: 0 .25em; border-radius: 3px; }
:focus-visible { outline: 3px solid #9cc3de; outline-offset: 2px; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 8px; top: 8px; background: #fff; padding: .5rem; z-index: 100; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* layout */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar { background: var(--brand); color: #dfe8ef; padding: 1rem .9rem; position: sticky; top: 0; height: 100vh; overflow: auto; }
.brand { display: block; color: #fff; font-weight: 700; font-size: 1rem; line-height: 1.2; padding: .25rem .5rem .9rem; border-bottom: 1px solid rgba(255,255,255,.14); margin-bottom: .75rem; }
.brand small { display: block; color: #a9bfd0; font-weight: 500; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; margin-top: .25rem; }
.nav h4 { color: #9db3c5; font-size: .68rem; padding: .6rem .5rem .2rem; }
.nav a { display: flex; align-items: center; gap: .5rem; color: #dfe8ef; padding: .42rem .55rem; border-radius: 6px; font-size: .92rem; }
.nav a:hover { background: rgba(255,255,255,.08); text-decoration: none; }
.nav a[aria-current="page"] { background: rgba(255,255,255,.16); color: #fff; font-weight: 600; }
.nav .badge { margin-left: auto; }
.nav .ico { width: 1.15rem; text-align: center; opacity: .85; }
.main { min-width: 0; } .content { min-width: 0; } .split > * { min-width: 0; }
.topbar { display: flex; align-items: center; gap: 1rem; padding: .65rem 1.5rem; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar form { flex: 1; max-width: 520px; }
.topbar input[type=search] { width: 100%; }
.userbox { margin-left: auto; display: flex; align-items: center; gap: .75rem; font-size: .88rem; }
.userbox .who { text-align: right; line-height: 1.15; } .userbox .who small { display: block; }
.content { padding: 1.4rem 1.6rem 3rem; max-width: 1380px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; }
.page-head .grow { flex: 1; min-width: 260px; }
.page-head .actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.crumbs { font-size: .82rem; color: var(--ink-3); margin-bottom: .35rem; } .crumbs a { color: var(--ink-3); }
.lede { color: var(--ink-2); max-width: 70ch; }

/* cards & grids */
.card { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem 1.1rem; margin-bottom: 1rem; }
.card > h2, .card > h3 { display: flex; align-items: center; gap: .5rem; } .card > h2 .count, .card > h3 .count { color: var(--ink-3); font-weight: 500; font-size: .85em; }
.card.soft { background: var(--surface-2); box-shadow: none; }
.grid { display: grid; gap: 1rem; } .grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); } .grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); } .grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.section { margin-bottom: 1.6rem; } .section > h2 { padding-bottom: .35rem; border-bottom: 1px solid var(--line); margin-bottom: .75rem; }
.row { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; } .between { justify-content: space-between; }
.stack > * + * { margin-top: .6rem; }
.split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 1.2rem; align-items: start; }
.sticky { position: sticky; top: 4.2rem; }

/* status & badges */
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .12rem .5rem; border-radius: 999px; font-size: .74rem; font-weight: 600; line-height: 1.5; border: 1px solid transparent; white-space: nowrap; }
.badge.ready { background: var(--ready-soft); color: var(--ready); border-color: #bfe0cc; }
.badge.in_progress, .badge.progress { background: var(--progress-soft); color: var(--progress); border-color: #ebd6a3; }
.badge.at_risk, .badge.risk { background: var(--risk-soft); color: var(--risk); border-color: #f1c1bb; }
.badge.not_started, .badge.none { background: var(--none-soft); color: var(--none); border-color: #d2d9e0; }
.badge.neutral { background: var(--surface-2); color: var(--ink-2); border-color: var(--line); }
.badge.brand { background: var(--brand-soft); color: var(--brand); border-color: #c6d7e4; }
.badge.accent { background: var(--accent-soft); color: var(--accent); border-color: #e6d2a6; }
.badge.wrap { white-space: normal; max-width: 100%; overflow-wrap: anywhere; }
.badge.demo { background: #ede9fe; color: #5b21b6; border-color: #d6ccf7; }
.badge.critical { background: var(--risk-soft); color: var(--risk); } .badge.high { background: var(--progress-soft); color: var(--progress); } .badge.medium { background: var(--brand-soft); color: var(--brand); } .badge.low { background: var(--none-soft); color: var(--none); }
.badge.complete, .badge.approved, .badge.final { background: var(--ready-soft); color: var(--ready); border-color: #bfe0cc; }
.badge.blocked, .badge.rejected, .badge.overdue, .badge.stale { background: var(--risk-soft); color: var(--risk); }
.badge.waiting, .badge.ready_for_review, .badge.under_review, .badge.candidate, .badge.needs_update, .badge.needs_review { background: var(--progress-soft); color: var(--progress); }
.badge.deferred, .badge.superseded, .badge.archived { background: var(--none-soft); color: var(--none); }

/* readiness tiles */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: .8rem; }
.tile { border-radius: var(--radius); padding: .9rem 1rem; border: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; gap: .15rem; text-decoration: none; color: inherit; }
.tile:hover { text-decoration: none; border-color: var(--brand-2); }
.tile .n { font-size: 2rem; font-weight: 700; line-height: 1; } .tile .l { font-weight: 600; display: flex; align-items: center; gap: .35rem; } .tile .s { font-size: .8rem; color: var(--ink-3); }
.tile.ready { border-top: 4px solid var(--ready); } .tile.ready .n { color: var(--ready); }
.tile.in_progress { border-top: 4px solid var(--progress); } .tile.in_progress .n { color: var(--progress); }
.tile.at_risk { border-top: 4px solid var(--risk); } .tile.at_risk .n { color: var(--risk); }
.tile.not_started { border-top: 4px solid var(--none); } .tile.not_started .n { color: var(--none); }
.meter { display: grid; grid-template-columns: 1fr auto; gap: .25rem .75rem; align-items: center; } .meter .lbl { font-size: .84rem; color: var(--ink-2); } .meter .val { font-weight: 700; font-variant-numeric: tabular-nums; }
.bar { height: 8px; background: var(--line-2); border-radius: 999px; overflow: hidden; grid-column: 1 / -1; } .bar > span { display: block; height: 100%; background: var(--brand-2); }
.bar.ready > span { background: var(--ready); } .bar.progress > span { background: var(--progress); } .bar.accent > span { background: var(--accent); }
.kpi { display: flex; flex-direction: column; } .kpi .n { font-size: 1.6rem; font-weight: 700; } .kpi .l { font-size: .82rem; color: var(--ink-3); }
.internal-label { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); font-weight: 700; }

/* tables & lists */
table { width: 100%; border-collapse: collapse; font-size: .9rem; } th, td { text-align: left; padding: .5rem .55rem; border-bottom: 1px solid var(--line-2); vertical-align: top; }
th { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); font-weight: 600; background: var(--surface-2); }
tr:hover td { background: #fbfcfd; } .table-wrap { overflow-x: auto; max-width: 100%; }
/* Wide tables scroll inside their card instead of stretching the page (phone widths, 9-column registries). */
.card { overflow-x: auto; }
.card > table, .table-wrap > table { min-width: 100%; }
.card > table th, .card > table td { white-space: normal; }
table.compact { font-size: .85rem; } table.compact th, table.compact td { padding: .4rem .35rem; } table.compact th { letter-spacing: .03em; }
/* Registries (evidence, maintenance, tasks): keep the title column readable before the narrower columns take space. */
.table-wrap table th:first-child, .table-wrap table td:first-child { min-width: 16rem; }
.table-wrap table th, .table-wrap table td { white-space: normal; }
.table-wrap table td .code-list a { white-space: nowrap; }
.table-wrap.maint-wrap table th:first-child, .table-wrap.maint-wrap table td:first-child { min-width: 12rem; }
.code-list { display: flex; flex-wrap: wrap; gap: .15rem .4rem; } .code-list a { white-space: nowrap; }
.narratives-table th:first-child, .narratives-table td:first-child { min-width: 8rem; }
/* Guide text with restored paragraphs (Educational Policy, standard language). */
.guide-text p { margin: 0 0 .6rem; } .guide-text .guide-heading { margin: .8rem 0 .3rem; font-size: .95rem; color: var(--brand); } .guide-text .guide-heading:first-child { margin-top: 0; }
.guide-text .guide-items { margin: .2rem 0 .7rem 1.4rem; padding: 0; } .guide-text .guide-items li { margin: .15rem 0; }
.guide-more { margin-top: .4rem; } .guide-more > summary { cursor: pointer; color: var(--brand-2); font-weight: 600; font-size: .88rem; } .guide-more[open] > summary { margin-bottom: .6rem; }
.list { list-style: none; margin: 0; padding: 0; } .list li { padding: .55rem 0; border-bottom: 1px solid var(--line-2); } .list li:last-child { border-bottom: 0; }
.item-title { font-weight: 600; } .item-meta { font-size: .8rem; color: var(--ink-3); display: flex; gap: .6rem; flex-wrap: wrap; margin-top: .15rem; }
.empty { color: var(--ink-3); font-style: italic; padding: .5rem 0; }
.bullets { margin: .25rem 0 .5rem 1.1rem; padding: 0; } .bullets li { margin: .2rem 0; }
.checklist { list-style: none; margin: .25rem 0; padding: 0; } .checklist li { padding-left: 1.5rem; position: relative; margin: .3rem 0; } .checklist li::before { content: "☐"; position: absolute; left: 0; color: var(--brand-2); }
.quote { border-left: 4px solid var(--brand-2); background: var(--brand-soft); padding: .6rem .9rem; border-radius: 0 6px 6px 0; margin: .35rem 0 .75rem; }
.quote.accent { border-color: var(--accent); background: var(--accent-soft); }
pre.src { white-space: pre-wrap; font-size: .78rem; background: var(--surface-2); padding: .6rem; border-radius: 6px; max-height: 320px; overflow: auto; }
details > summary { cursor: pointer; color: var(--brand-2); font-weight: 600; } details { margin: .4rem 0; }
.subnav { display: flex; gap: .25rem; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 1rem; }
.subnav a { padding: .45rem .7rem; border-bottom: 2px solid transparent; color: var(--ink-2); font-size: .9rem; } .subnav a[aria-current="page"] { border-color: var(--brand); color: var(--brand); font-weight: 600; }
.anchor-nav { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: 1rem; } .anchor-nav a { font-size: .8rem; padding: .25rem .6rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }

/* tree */
.tree ul { list-style: none; margin: 0; padding-left: 1.1rem; } .tree > ul { padding-left: 0; }
.tree li { margin: .15rem 0; } .tree .node { display: flex; align-items: center; gap: .5rem; padding: .35rem .5rem; border-radius: 6px; }
.tree .node:hover { background: var(--surface-2); } .tree .code { font-weight: 600; min-width: 9.5rem; font-variant-numeric: tabular-nums; } .tree .ttl { flex: 1; color: var(--ink-2); }
.tree details > summary { list-style: none; } .tree details > summary::-webkit-details-marker { display: none; }
.tree summary .node::before { content: "▸"; width: 1rem; color: var(--ink-3); } .tree details[open] > summary .node::before { content: "▾"; }
.tree .leaf .node::before { content: ""; width: 1rem; }
.tree .pcts { font-size: .75rem; color: var(--ink-3); font-variant-numeric: tabular-nums; min-width: 12rem; }

/* forms & buttons */
input:not([type]), input[type=text], input[type=search], input[type=email], input[type=password], input[type=date], input[type=url], input[type=number], select, textarea { font: inherit; padding: .45rem .6rem; border: 1px solid #c9d2db; border-radius: 6px; background: #fff; color: var(--ink); width: 100%; }
textarea { min-height: 5rem; resize: vertical; } input:focus, select:focus, textarea:focus { border-color: var(--brand-2); }
label { font-size: .82rem; font-weight: 600; color: var(--ink-2); display: block; margin-bottom: .2rem; }
.field { margin-bottom: .7rem; } .field .help { font-size: .76rem; color: var(--ink-3); margin-top: .15rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .25rem .9rem; } .form-grid .full { grid-column: 1 / -1; }
.btn { display: inline-flex; align-items: center; gap: .4rem; font: inherit; font-weight: 600; font-size: .86rem; padding: .45rem .85rem; border-radius: 6px; border: 1px solid var(--brand); background: var(--brand); color: #fff; cursor: pointer; text-decoration: none; line-height: 1.3; }
.btn:hover { background: var(--brand-2); text-decoration: none; } .btn.secondary { background: #fff; color: var(--brand); } .btn.secondary:hover { background: var(--brand-soft); }
.btn.small { padding: .25rem .55rem; font-size: .78rem; } .btn.danger { background: #fff; color: var(--risk); border-color: var(--risk); } .btn.danger:hover { background: var(--risk-soft); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--brand-2); } .btn.accent { background: var(--accent); border-color: var(--accent); }
.inline-form { display: inline; } .inline-form button { margin-right: .25rem; }
.toolbar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: end; margin-bottom: .9rem; } .toolbar .field { margin: 0; min-width: 140px; }
.notice { padding: .7rem .9rem; border-radius: 6px; border: 1px solid; margin-bottom: 1rem; font-size: .9rem; }
.notice.info { background: var(--brand-soft); border-color: #c6d7e4; color: var(--brand); } .notice.warn { background: var(--progress-soft); border-color: #ebd6a3; color: var(--progress); } .notice.danger { background: var(--risk-soft); border-color: #f1c1bb; color: var(--risk); } .notice.ok { background: var(--ready-soft); border-color: #bfe0cc; color: var(--ready); }
.safeguard { font-size: .78rem; color: var(--ink-3); border-top: 1px dashed var(--line); padding-top: .5rem; margin-top: .75rem; }

/* timeline & calendar */
.tl-list .tl-row { display: grid; grid-template-columns: 7rem 1fr auto; gap: .75rem; align-items: start; padding: .5rem 0; border-bottom: 1px solid var(--line-2); }
.tl-date { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink-2); font-size: .85rem; }
.gantt { display: grid; grid-template-columns: 260px 1fr; font-size: .8rem; } .gantt .g-label { padding: .3rem .4rem; border-bottom: 1px solid var(--line-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gantt .g-track { position: relative; border-bottom: 1px solid var(--line-2); background: repeating-linear-gradient(90deg, transparent 0, transparent calc(100%/48 - 1px), var(--line-2) calc(100%/48 - 1px), var(--line-2) calc(100%/48)); }
.gantt .g-bar { position: absolute; top: .3rem; height: 1.1rem; border-radius: 4px; background: var(--brand-2); color: #fff; font-size: .7rem; padding: 0 .3rem; overflow: hidden; white-space: nowrap; }
.gantt .g-bar.complete { background: var(--ready); } .gantt .g-bar.at_risk { background: var(--risk); } .gantt .g-bar.not_started { background: var(--none); } .gantt .g-bar.milestone { background: var(--accent); }
.gantt .g-head { font-weight: 600; color: var(--ink-3); padding: .3rem .4rem; border-bottom: 2px solid var(--line); } .gantt .g-months { display: grid; border-bottom: 2px solid var(--line); } .gantt .g-months span { padding: .3rem .2rem; font-weight: 600; color: var(--ink-3); border-left: 1px solid var(--line-2); overflow: hidden; }
.gantt .g-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--risk); }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: 2px; } .cal .d { background: var(--surface); border: 1px solid var(--line-2); min-height: 6rem; padding: .3rem; font-size: .78rem; } .cal .d .dn { font-weight: 700; color: var(--ink-3); } .cal .d.today { border-color: var(--brand-2); } .cal .d.pad { background: var(--surface-2); } .cal .ev { display: block; margin-top: .2rem; padding: .1rem .3rem; border-radius: 3px; background: var(--brand-soft); color: var(--brand); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal .ev.at_risk, .cal .ev.overdue { background: var(--risk-soft); color: var(--risk); } .cal .ev.complete { background: var(--ready-soft); color: var(--ready); } .cal .ev.milestone { background: var(--accent-soft); color: var(--accent); }
.gantt .g-bar.clipped { opacity: .85; border: 1px dashed rgba(255,255,255,.8); }
.cal-head { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); font-size: .74rem; text-transform: uppercase; color: var(--ink-3); font-weight: 600; margin-bottom: .2rem; }
/* phones: the month grid becomes a stacked agenda with full titles (one row per day that has items) */
@media (max-width: 600px) {
  .cal { display: block; } .cal .d { display: block; min-height: 0; border-width: 0 0 1px 0; border-bottom: 1px solid var(--line); }
  .cal .d.pad, .cal .d:not(:has(.ev)):not(.today) { display: none; } .cal .ev { white-space: normal; overflow: visible; }
  .cal-head { display: none; }
}

/* charts (inline SVG) */
.chart svg { width: 100%; height: auto; } .chart .lbl { font-size: 11px; fill: var(--ink-2); } .chart .axis { stroke: var(--line); }
.legend { display: flex; gap: .8rem; flex-wrap: wrap; font-size: .78rem; color: var(--ink-2); } .legend i { display: inline-block; width: .7rem; height: .7rem; border-radius: 2px; margin-right: .3rem; vertical-align: -1px; }

/* scout cards */
.scout-card { border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; margin-bottom: .8rem; background: var(--surface); }
.scout-card .kv { display: grid; grid-template-columns: 11rem 1fr; gap: .2rem .8rem; font-size: .85rem; margin: .5rem 0; } .scout-card .kv dt { color: var(--ink-3); font-weight: 600; } .scout-card .kv dd { margin: 0; }
.level { font-weight: 700; letter-spacing: .04em; font-size: .72rem; text-transform: uppercase; }
.level.program_practice { color: var(--ready); } .level.institutional_support { color: var(--brand-2); } .level.institutional_context { color: var(--accent); } .level.external_context { color: var(--none); }

/* login */
.login { max-width: 460px; margin: 6vh auto; } .login .card { padding: 1.6rem; } .demo-accounts { font-size: .82rem; } .demo-accounts td { padding: .3rem .4rem; }
.print-only { display: none; }
@media print { .sidebar, .topbar, .no-print, .actions, form { display: none !important; } .shell { display: block; } .content { padding: 0; max-width: none; } .card { box-shadow: none; break-inside: avoid; } .print-only { display: block; } body { background: #fff; } }
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0,1fr)); } .tiles { grid-template-columns: repeat(2, minmax(0,1fr)); } .split { grid-template-columns: minmax(0,1fr); } .sticky { position: static; } }
@media (max-width: 860px) { .shell { grid-template-columns: 1fr; } .sidebar { position: static; height: auto; } .sidebar .nav { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); } .content { padding: 1rem; } .grid-2, .form-grid, .grid-3, .grid-4, .tiles { grid-template-columns: minmax(0,1fr); } .topbar { flex-wrap: wrap; } .tl-list .tl-row { grid-template-columns: 1fr; } .gantt { grid-template-columns: 160px 1fr; } .scout-card .kv { grid-template-columns: 1fr; } }

/* ---- Continuous readiness: mode pill, attention list, health */
.mode-pill { display: inline-block; margin: 0 .5rem .6rem; padding: .18rem .6rem; border-radius: 999px; background: rgba(255,255,255,.12); color: #dfe8ef; font-size: .72rem; font-weight: 600; letter-spacing: .03em; }
.health-strip { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: .8rem; margin: .6rem 0 .4rem; }
.health-strip .stat { border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem; background: var(--surface); display: flex; flex-direction: column; gap: .1rem; color: inherit; }
.health-strip .stat:hover { border-color: var(--brand-2); text-decoration: none; }
.health-strip .stat .n { font-size: 1.9rem; font-weight: 700; line-height: 1.1; } .health-strip .stat .l { font-weight: 600; font-size: .9rem; } .health-strip .stat .s { font-size: .78rem; color: var(--ink-3); }
.health-strip .stat.immediate { border-top: 4px solid var(--risk); } .health-strip .stat.immediate .n { color: var(--risk); }
.health-strip .stat.soon { border-top: 4px solid var(--progress); } .health-strip .stat.soon .n { color: var(--progress); }
.health-strip .stat.evidence { border-top: 4px solid var(--brand-2); } .health-strip .stat.evidence .n { color: var(--brand-2); }
.health-strip .stat.cswe { border-top: 4px solid var(--accent); } .health-strip .stat.cswe .n { color: var(--accent); }
.attn { list-style: none; margin: 0; padding: 0; }
.attn li { display: grid; grid-template-columns: auto 1fr auto; gap: .3rem .8rem; align-items: start; padding: .6rem 0; border-bottom: 1px solid var(--line-2); }
.attn li:last-child { border-bottom: 0; }
.attn .urg { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: .15rem .45rem; border-radius: 4px; white-space: nowrap; margin-top: .15rem; }
.attn .urg.immediate { background: var(--risk-soft); color: var(--risk); } .attn .urg.soon { background: var(--progress-soft); color: var(--progress); } .attn .urg.info { background: var(--none-soft); color: var(--none); }
.attn .act { white-space: nowrap; }
.kv-mini { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .5rem .9rem; margin: .5rem 0; font-size: .85rem; } .kv-mini div > span:first-child { display: block; color: var(--ink-3); font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; }
.legend-health { display: flex; flex-wrap: wrap; gap: .4rem; margin: .4rem 0; }
.badge.risk { background: var(--risk-soft); color: var(--risk); border-color: #f1c1bb; }
.badge.needs_review { background: var(--progress-soft); color: var(--progress); }
.timeline-dots { list-style: none; margin: 0; padding: 0 0 0 1rem; border-left: 2px solid var(--line); } .timeline-dots li { position: relative; padding: .2rem 0 .6rem .8rem; } .timeline-dots li::before { content: ""; position: absolute; left: -.45rem; top: .55rem; width: .6rem; height: .6rem; border-radius: 50%; background: var(--brand-2); }
@media (max-width: 1100px) { .health-strip { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 860px) { .health-strip { grid-template-columns: minmax(0,1fr); } .attn li { grid-template-columns: 1fr; } }

/* ---- AS 1.0 prototype mode */
.proto-banner { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; align-items: baseline; padding: .55rem 1.5rem; background: #3b2f00; color: #fff3d6; border-bottom: 3px solid var(--accent); font-size: .86rem; }
.proto-banner strong { letter-spacing: .06em; }
.proto-banner .tiny { color: #e9d9ad; }
.stepper { display: grid; grid-template-columns: repeat(10, minmax(0,1fr)); gap: .25rem; margin: .5rem 0 1rem; list-style: none; padding: 0; counter-reset: st; }
.stepper li { border: 1px solid var(--line); border-radius: 6px; padding: .45rem .5rem; font-size: .74rem; background: var(--surface-2); color: var(--ink-3); min-width: 0; }
.stepper li .n { display: block; font-weight: 700; font-size: .7rem; letter-spacing: .05em; text-transform: uppercase; }
.stepper li .t { display: block; font-weight: 600; color: var(--ink-2); line-height: 1.2; }
.stepper li .s { display: block; font-size: .68rem; margin-top: .15rem; }
.stepper li.current { background: var(--brand-soft); border-color: var(--brand-2); color: var(--brand); } .stepper li.current .t { color: var(--brand); }
.stepper li.available { background: var(--ready-soft); border-color: #bfe0cc; } .stepper li.available .t { color: var(--ready); }
.stepper li.done { background: var(--surface); border-color: var(--line); } .stepper li.done .t { color: var(--ink-2); }
.stepper li a { color: inherit; text-decoration: none; display: block; }
.src-status { display: inline-flex; align-items: center; gap: .3rem; font-size: .72rem; font-weight: 700; padding: .12rem .5rem; border-radius: 4px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2); text-transform: none; letter-spacing: 0; }
.src-status.official_cswe_source, .src-status.official_published_source { background: var(--ready-soft); color: var(--ready); border-color: #bfe0cc; }
.src-status.imported_workbook_record, .src-status.inferred, .src-status.source_grounded_hypothesis { background: var(--progress-soft); color: var(--progress); border-color: #ebd6a3; }
.src-status.unverified, .src-status.human_review_required { background: var(--accent-soft); color: var(--accent); border-color: #e6d2a6; }
.src-status.not_located { background: var(--risk-soft); color: var(--risk); border-color: #f1c1bb; }
.src-status.demo_path { background: #ede9fe; color: #5b21b6; border-color: #d6ccf7; }
.provisional { border: 2px dashed var(--accent); background: var(--accent-soft); border-radius: var(--radius); padding: .8rem 1rem; }
.provisional .lbl { font-weight: 800; letter-spacing: .06em; color: var(--accent); font-size: .78rem; }
.cmp { width: 100%; } .cmp th:first-child { width: 34%; }
.cmp td .y { color: var(--ready); font-weight: 600; } .cmp td .n { color: var(--risk); font-weight: 600; } .cmp td .q { color: var(--accent); font-weight: 600; }
@media (max-width: 1100px) { .stepper { grid-template-columns: repeat(5, minmax(0,1fr)); } }
@media (max-width: 860px) { .stepper { grid-template-columns: repeat(2, minmax(0,1fr)); } .proto-banner { padding: .5rem 1rem; } }

/* ---- Help / user manual */
.help-grid{display:grid;grid-template-columns:260px minmax(0,1fr);gap:1.2rem;align-items:start}
.help-toc{position:sticky;top:1rem;max-height:calc(100vh - 2rem);overflow:auto}
.help-toc ul{list-style:none;margin:0;padding:0}
.help-toc li{margin:.25rem 0}.help-toc li.sub{padding-left:.9rem;font-size:.9em}
.help-body{max-width:900px}
.help-body h1{font-size:1.6rem;margin-top:0}.help-body h2{margin-top:2.2rem;padding-top:1rem;border-top:1px solid var(--line,#e5e7eb)}.help-body h3{margin-top:1.6rem}
.help-body p,.help-body li{line-height:1.6}
.help-body .md-figure{margin:1rem 0}.help-body .md-figure img{max-width:100%;border:1px solid var(--line,#e5e7eb);border-radius:6px;box-shadow:0 1px 4px rgba(0,0,0,.08)}
.help-body .md-figure figcaption{font-size:.85em;color:var(--muted,#6b7280);margin-top:.3rem}
.help-body .md-quote{border-left:4px solid var(--brand,#1f3a5f);background:#f5f7fa;padding:.6rem 1rem;margin:1rem 0;border-radius:4px}
.help-body .md-table{width:100%;border-collapse:collapse;margin:.8rem 0}.help-body .md-table th,.help-body .md-table td{border:1px solid var(--line,#e5e7eb);padding:.45rem .6rem;text-align:left;vertical-align:top}
.help-body .md-table th{background:#f5f7fa}
.help-body pre{background:#1f2937;color:#f9fafb;padding:.8rem 1rem;border-radius:6px;overflow:auto}
@media (max-width:900px){.help-grid{grid-template-columns:minmax(0,1fr)}.help-toc{position:static;max-height:none}}
/* ---- persistent demonstration / readiness disclaimer (every Layout and Bare page) */
.site-footer { padding: .8rem 1.6rem 1.2rem; font-size: .74rem; color: var(--ink-2); border-top: 1px solid var(--line); background: var(--surface-2); line-height: 1.4; }
.login + .site-footer, body > .site-footer { max-width: 460px; margin: 0 auto; border-top: 0; background: transparent; text-align: center; }
@media print { .site-footer { border-top: 1px solid #000; background: #fff; } }
.md-placeholder { display: flex; align-items: center; justify-content: center; min-height: 120px; border: 1px dashed var(--line); border-radius: 6px; background: var(--surface-2); color: var(--ink-2); font-size: .8rem; }

/* ---- list pagination (src/db/repo/paging.tsx) */
nav[data-pager] { margin-top: .6rem; gap: .5rem; flex-wrap: wrap; }
nav[data-pager] .row { gap: .4rem; }

/* vault (src/server/routes/vault.tsx) — evidence vault card, version history, claim pins */
.vault .kv-mini code, .vault td code { font-size: .78rem; }
.vault td { vertical-align: top; }
.vault form.inline { display: inline-flex; margin-left: .4rem; }
.vault details form { margin-top: .5rem; }
/* end vault */

/* ---- Home readiness trend (src/server/routes/home.tsx TrendChart): HTML columns so labels stay legible at any width */
.trend-today { max-width: 640px; margin-bottom: .6rem; }
.trend-chart { margin: .3rem 0 .6rem; }
.tc-frame { display: grid; grid-template-columns: 2.4rem minmax(0,1fr); grid-template-rows: 160px 1.4rem; }
.tc-y { position: relative; grid-row: 1; grid-column: 1; }
.tc-y span { position: absolute; right: .4rem; transform: translateY(50%); font-size: .68rem; color: var(--ink-3); font-variant-numeric: tabular-nums; line-height: 1; }
.tc-plot { position: relative; grid-row: 1; grid-column: 2; border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.tc-grid { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.tc-grid i { position: absolute; left: 0; right: 0; border-top: 1px solid rgba(255,255,255,.55); }
.tc-cols { position: absolute; inset: 0; display: flex; align-items: stretch; gap: 2px; padding: 0 1px; }
.tc-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column-reverse; border-radius: 2px 2px 0 0; overflow: hidden; }
.tc-col span { display: block; width: 100%; flex: none; }
.tc-col:hover { outline: 2px solid var(--ink-2); outline-offset: 0; }
.tc-col.today { box-shadow: 0 0 0 1.5px var(--ink); }
.tc-marker { position: absolute; top: -2px; bottom: 0; border-left: 2px dashed var(--ink-2); pointer-events: none; }
.tc-marker span { position: absolute; top: 0; right: 4px; white-space: nowrap; font-size: .68rem; font-weight: 600; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: .05rem .35rem; }
.tc-x { position: relative; grid-row: 2; grid-column: 2; }
.tc-x span { position: absolute; top: .25rem; transform: translateX(-50%); font-size: .7rem; color: var(--ink-2); white-space: nowrap; line-height: 1; }
.tc-x span.first { transform: none; margin-left: -.5rem; } .tc-x span.today { transform: translateX(-100%); margin-left: .5rem; font-weight: 700; color: var(--ink); }
.tc-legend { margin-top: .5rem; gap: .4rem 1.1rem; } .tc-legend strong { font-variant-numeric: tabular-nums; }
.tc-data { margin-top: .4rem; } .tc-data summary { cursor: pointer; color: var(--ink-2); }
.tc-data .table-wrap table th:first-child, .tc-data .table-wrap table td:first-child { min-width: 6rem; }
.tc-data table { max-width: 560px; }
@media (max-width: 560px) { .tc-frame { grid-template-rows: 130px 1.4rem; } .tc-cols { gap: 1px; } }

/* ---- Evidence Library table (src/server/routes/evidence.tsx EvidenceList): priority columns, no horizontal scroll.
   Breakpoints are container widths, so the list adapts to the card it sits in (≈944px at a 1280px window,
   ≈690px at 1024px). pri-5 goes first, pri-1 never; a hidden column's content shows in .ev-more under the title. */
.ev-wrap { container-type: inline-size; }
.ev-table { table-layout: auto; }
.table-wrap.ev-wrap table th.ev-title, .table-wrap.ev-wrap table td.ev-title { min-width: 13rem; width: 36%; }
.ev-table td.ev-review { white-space: nowrap; }
.ev-table .ev-more { display: none; flex-wrap: wrap; gap: .15rem .9rem; margin-top: .3rem; color: var(--ink-2); }
.ev-table .ev-more > span { display: none; align-items: baseline; gap: .3rem; min-width: 0; }
.ev-table .ev-more .k { font-size: .68rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); font-weight: 600; }
.ev-table .ev-more .code-list { display: inline-flex; }
@container (max-width: 1119px) { .ev-table .pri-5 { display: none; } .ev-table .ev-more, .ev-table .ev-more > .alt-5 { display: flex; } }
@container (max-width: 959px) { .ev-table .pri-4 { display: none; } .ev-table .ev-more > .alt-4 { display: flex; } }
@container (max-width: 759px) { .ev-table .pri-3 { display: none; } .ev-table .ev-more > .alt-3 { display: flex; } }
@container (max-width: 519px) { .ev-table .pri-2 { display: none; } .ev-table .ev-more > .alt-2 { display: flex; } .table-wrap.ev-wrap table td.ev-title, .table-wrap.ev-wrap table th.ev-title { min-width: 0; width: auto; } }
