:root {
  color-scheme: light;
  --canvas: #f4f2ed;
  --surface: #fff;
  --surface-2: #f9f8f4;
  --surface-3: #eae8e1;
  --ink: #181916;
  --muted: #62645e;
  --line: #d5d3ca;
  --line-strong: #aaa99f;
  --accent: #2447bd;
  --accent-soft: #e7ecff;
  --success: #126c4c;
  --success-soft: #e2f3ea;
  --warning: #8a5a05;
  --warning-soft: #fff0c9;
  --danger: #a32a20;
  --danger-soft: #fbe7e4;
  --rail: 236px;
  --radius: 8px;
  --shadow: 0 20px 55px rgba(30, 29, 24, .14);
}

[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #10110f;
  --surface: #181916;
  --surface-2: #1e1f1b;
  --surface-3: #292a25;
  --ink: #f1f0e9;
  --muted: #aaaca4;
  --line: #33342f;
  --line-strong: #55574f;
  --accent: #8ca1f6;
  --accent-soft: #252e50;
  --success: #70c7a5;
  --success-soft: #19372c;
  --warning: #e2b75d;
  --warning-soft: #3b301a;
  --danger: #f09288;
  --danger-soft: #3d1c19;
  --shadow: 0 20px 55px rgba(0, 0, 0, .38);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 16px/1.6 Inter, Geist, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.icon { width: 1em; height: 1em; display: block; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.skip-link { position: fixed; top: -100px; left: 12px; z-index: 200; padding: 10px 14px; background: var(--accent); color: white; }
.skip-link:focus { top: 12px; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); transition: grid-template-columns .2s ease; }
.app-shell.rail-closed { --rail: 64px; }

.sidebar { position: sticky; top: 0; z-index: 30; height: 100vh; display: grid; grid-template-rows: auto minmax(180px, 1fr) auto auto; overflow-x: hidden; overflow-y: auto; padding: 16px 12px; border-right: 1px solid var(--line); background: var(--surface); }
.brand-row { min-height: 48px; display: flex; align-items: center; gap: 8px; padding: 0 4px 14px; border-bottom: 1px solid var(--line); }
.brand-copy { min-width: 0; flex: 1; display: grid; line-height: 1.25; }
.brand-copy b { overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.brand-copy span { color: var(--muted); font-size: 14px; }
.rail-toggle { width: 36px; min-width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: var(--radius); background: transparent; cursor: pointer; }

.primary-nav { display: grid; align-content: start; gap: 5px; padding: 16px 0; }
.primary-nav button, .rail-actions button { min-height: 44px; width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; border-radius: var(--radius); background: transparent; color: var(--muted); cursor: pointer; text-align: left; }
.primary-nav button:hover, .rail-actions button:hover { color: var(--ink); background: var(--surface-3); }
.primary-nav button.active { color: var(--accent); background: var(--accent-soft); }
.nav-icon { width: 20px; min-width: 20px; display: grid; place-items: center; }
.nav-icon .icon { width: 19px; height: 19px; }
.nav-label { min-width: 0; flex: 1; overflow: hidden; font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
kbd { margin-left: auto; padding: 2px 6px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); font: 12px ui-monospace, monospace; }

.rail-progress { padding: 16px 6px; border-top: 1px solid var(--line); }
.rail-progress > div { display: flex; align-items: center; gap: 7px; font: 700 13px ui-monospace, monospace; }
.rail-progress i { position: relative; height: 4px; flex: 1; overflow: hidden; border-radius: 4px; background: var(--line); }
.rail-progress i::before { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--rail-progress, 0%); background: var(--accent); }
.rail-progress p { display: grid; margin: 8px 0 0; line-height: 1.35; }
.rail-progress p b { font-size: 14px; }
.rail-progress p span { color: var(--muted); font-size: 14px; }
.rail-actions { display: grid; gap: 5px; padding-top: 12px; border-top: 1px solid var(--line); }
.rail-closed .brand-copy, .rail-closed .rail-toggle, .rail-closed .nav-label, .rail-closed kbd, .rail-closed .rail-progress p { display: none; }
.rail-closed .primary-nav button, .rail-closed .rail-actions button { justify-content: center; padding-inline: 0; }
.rail-closed .rail-progress { padding-inline: 0; }
.mobile-header, .mobile-bottom-nav { display: none; }

main { min-width: 0; padding: 36px clamp(20px, 4vw, 64px) 70px; }
.view { max-width: 1120px; margin: 0 auto; }
h1, h2, h3, p { overflow-wrap: anywhere; }
.view h1 { margin: 0; font-size: clamp(28px, 4vw, 42px); line-height: 1.08; letter-spacing: -.025em; }
.view h2 { margin: 0; font-size: 22px; line-height: 1.2; }
.view h3 { font-size: 17px; }
.page-kicker, .brief-label { color: var(--accent); font-size: 14px; font-weight: 700; }
.page-lede { max-width: 760px; margin: 14px 0 0; color: var(--muted); font-size: 18px; }
.page-header { display: flex; align-items: end; justify-content: space-between; gap: 28px; margin-bottom: 28px; padding-bottom: 24px; border-bottom: 1px solid var(--line-strong); }
.page-header p { max-width: 760px; margin: 12px 0 0; color: var(--muted); }

.primary-button, .secondary-button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 9px 15px; border-radius: var(--radius); font-weight: 700; cursor: pointer; }
.primary-button { border: 1px solid var(--accent); background: var(--accent); color: #fff; }
[data-theme="dark"] .primary-button { color: #10110f; }
.primary-button:hover { filter: brightness(.92); }
.secondary-button { border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.secondary-button:hover { background: var(--surface-3); }

.continue-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 40px; margin-top: 38px; }
.continue-panel { overflow: hidden; border-top: 4px solid var(--accent); background: var(--surface); box-shadow: 0 1px 0 var(--line); }
.continue-head { padding: clamp(24px, 4vw, 42px); border-bottom: 1px solid var(--line); }
.continue-head > span, .next-action span, .context-block > span, .milestone-note > b { color: var(--muted); font-size: 14px; font-weight: 700; }
.continue-head h2 { margin-top: 10px; font-size: clamp(26px, 4vw, 38px); }
.continue-head p { margin: 12px 0 0; color: var(--muted); }
.continue-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.tag, .repo-chip { display: inline-flex; align-items: center; padding: 4px 8px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); background: transparent; font-size: 14px; }
.repo-chip { font-family: ui-monospace, monospace; }
.next-action { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px clamp(24px, 4vw, 42px); }
.next-action p { margin: 5px 0 0; font-weight: 600; }
.milestone-note { display: grid; gap: 4px; padding: 18px clamp(24px, 4vw, 42px); border-bottom: 1px solid var(--line); background: var(--accent-soft); }
.milestone-note span, .milestone-note h2 { color: var(--accent); }
.context-rail { align-self: start; }
.context-block { padding: 20px 0; border-top: 1px solid var(--line); }
.context-block:first-child { border-top-color: var(--ink); }
.context-block h3 { margin: 8px 0 0; }
.context-block p { margin: 8px 0 0; color: var(--muted); }
.large-metric { margin-top: 6px; font-size: 44px; font-weight: 800; line-height: 1; }
.large-metric small { color: var(--muted); font-size: 18px; }

.status { display: inline-flex; align-items: center; gap: 6px; width: fit-content; padding: 4px 9px; border-radius: 99px; font-size: 14px; font-weight: 700; white-space: nowrap; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status.pending { color: var(--muted); background: var(--surface-3); }
.status.progress, .status.ready { color: var(--accent); background: var(--accent-soft); }
.status.complete { color: var(--success); background: var(--success-soft); }
.status.review { color: var(--warning); background: var(--warning-soft); }
.status.repair { color: var(--danger); background: var(--danger-soft); }

.filter-bar { display: flex; align-items: end; gap: 14px; margin-bottom: 28px; }
.filter-bar > label { min-width: 280px; flex: 1; display: grid; gap: 6px; color: var(--muted); font-size: 14px; font-weight: 700; }
.filter-bar input, textarea { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); font-size: 16px; }
.filter-buttons { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-buttons button { min-height: 44px; padding: 7px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--muted); cursor: pointer; }
.filter-buttons button.active { border-color: var(--ink); color: var(--ink); background: var(--surface-3); }

.phase-section { margin: 42px 0; }
.phase-section > header { display: flex; align-items: start; justify-content: space-between; gap: 24px; padding-bottom: 16px; border-bottom: 2px solid var(--ink); }
.phase-section > header span { color: var(--accent); font-size: 14px; font-weight: 700; }
.phase-section > header h2 { margin-top: 6px; }
.phase-section > header p { max-width: 780px; margin: 8px 0 0; color: var(--muted); }
.phase-section > header > b { font: 700 16px ui-monospace, monospace; }
.session-row { width: 100%; min-height: 62px; display: grid; grid-template-columns: 46px minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 10px 12px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.session-row:hover { background: var(--surface); }
.session-row .number { color: var(--muted); font: 700 14px ui-monospace, monospace; }
.session-row .title { min-width: 0; display: grid; }
.session-row .title b { font-size: 16px; }
.session-row .title span { overflow: hidden; color: var(--muted); font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.session-row .kind { padding: 3px 7px; border: 1px solid var(--warning); border-radius: 4px; color: var(--warning); font-size: 14px; }
.phase-gate { padding: 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.phase-gate summary { min-height: 44px; display: flex; align-items: center; font-weight: 700; cursor: pointer; }
.phase-gate p { margin: 0 0 10px; color: var(--muted); }

.repo-strategy { margin-bottom: 44px; }
.repo-strategy > h2, .milestone-section > h2, .progress-table > h2, .evidence-system > h2 { margin-bottom: 14px; }
.repo-list { display: grid; grid-template-columns: repeat(5, 1fr); border: 1px solid var(--line); background: var(--surface); }
.repo-list article { min-width: 0; padding: 18px; border-right: 1px solid var(--line); }
.repo-list article:last-child { border-right: 0; }
.repo-list code { display: block; color: var(--accent); overflow-wrap: anywhere; }
.repo-list b { display: block; margin-top: 10px; }
.repo-list p { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.project-card { margin: 28px 0; border: 1px solid var(--line); border-top: 5px solid var(--accent); background: var(--surface); }
.project-2 { border-top-color: var(--success); }
.project-3 { border-top-color: var(--warning); }
.project-4 { border-top-color: var(--danger); }
.project-card > header { display: flex; align-items: start; justify-content: space-between; gap: 28px; padding: clamp(22px, 4vw, 38px); border-bottom: 1px solid var(--line); }
.project-card > header span { color: var(--accent); font-size: 14px; font-weight: 700; }
.project-card > header h2 { margin-top: 8px; font-size: 30px; }
.project-card > header p { max-width: 780px; margin: 10px 0 0; color: var(--muted); }
.project-card > header code { padding: 6px 9px; border-radius: 4px; color: var(--accent); background: var(--accent-soft); }
.project-summary { display: grid; grid-template-columns: 1fr 1fr; }
.project-summary section { padding: 20px clamp(20px, 3vw, 30px); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.project-summary section:nth-child(2n) { border-right: 0; }
.project-summary span, .project-flow span, .aster-section > div > span, .safety-section > span { color: var(--muted); font-size: 14px; font-weight: 700; }
.project-summary p, .project-flow p { margin: 7px 0 0; }
.project-flow { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; padding: 24px clamp(20px, 3vw, 30px); background: var(--surface-2); }
.project-flow > b { color: var(--accent); font-size: 26px; }
.project-card details > summary { min-height: 52px; display: flex; align-items: center; padding: 10px clamp(20px, 3vw, 30px); font-weight: 700; cursor: pointer; }
.project-details { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; padding: 28px clamp(20px, 3vw, 30px); border-top: 1px solid var(--line); }
.project-details h3, .aster-section h3, .safety-section h3 { margin: 0; }
.project-details ul, .aster-section ul, .safety-section ul { margin: 10px 0 0; padding-left: 20px; }
.project-details li, .aster-section li, .safety-section li { margin: 5px 0; color: var(--muted); }
.aster-section, .safety-section { margin: 38px 0; padding: clamp(24px, 4vw, 38px); border-top: 4px solid var(--ink); background: var(--surface); }
.aster-section > div > p, .safety-section > p { max-width: 840px; color: var(--muted); }
.aster-section > section { margin-top: 26px; }
.two-column { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 26px; }
.table-scroll, .milestone-table { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: var(--surface); }
th, td { padding: 11px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-size: 14px; }
th { background: var(--surface-2); color: var(--muted); font-weight: 700; }

.progress-summary { display: grid; grid-template-columns: repeat(3, 1fr); margin: 28px 0; border: 1px solid var(--line); background: var(--surface); }
.progress-summary > div { display: grid; gap: 5px; padding: 20px; border-right: 1px solid var(--line); }
.progress-summary > div:last-child { border-right: 0; }
.progress-summary span { color: var(--muted); font-size: 14px; font-weight: 700; }
.progress-summary b { font-size: 34px; }
.progress-summary small { color: var(--muted); font-size: 16px; }
.legacy-notice, .repair-notice { display: grid; gap: 4px; margin: 22px 0; padding: 14px 16px; border-left: 4px solid var(--warning); background: var(--warning-soft); }
.repair-notice { border-color: var(--danger); background: var(--danger-soft); }
.evidence-system, .progress-utilities, .progress-table { margin: 36px 0; }
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-list span { padding: 5px 9px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); font-size: 14px; }
.checkpoint-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.checkpoint-list article { padding: 18px; border-top: 3px solid var(--accent); background: var(--surface); }
.checkpoint-list span { display: block; color: var(--muted); font-size: 14px; }
.checkpoint-list p { margin-bottom: 0; }
.progress-utilities > div { display: flex; flex-wrap: wrap; gap: 8px; }
.progress-utilities p { color: var(--muted); }

.session-header { padding-bottom: 24px; border-bottom: 1px solid var(--line-strong); }
.session-header-top { display: flex; align-items: start; justify-content: space-between; gap: 24px; }
.session-header-top > span { color: var(--accent); font-size: 14px; font-weight: 700; }
.session-actions { display: flex; gap: 8px; }
.session-header h1 { max-width: 900px; margin-top: 10px; }
.session-header > p { max-width: 820px; margin: 12px 0 0; color: var(--muted); font-size: 18px; }
.session-tabs { position: sticky; top: 0; z-index: 10; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 28px; border-bottom: 1px solid var(--line); background: var(--canvas); }
.session-tabs button { min-height: 48px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--muted); cursor: pointer; }
.session-tabs button[aria-selected="true"] { border-bottom-color: var(--accent); color: var(--accent); font-weight: 700; }
.session-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 40px; }
.session-context { position: sticky; top: 70px; align-self: start; }
.completion-box { padding: 18px; border-top: 4px solid var(--accent); background: var(--surface); }
.completion-box > span { color: var(--muted); font-size: 14px; font-weight: 700; }
.completion-box > button { width: 100%; margin-top: 14px; }
.requirement { display: flex; gap: 8px; margin-top: 10px; color: var(--muted); font-size: 14px; }
.requirement::before { content: ""; width: 9px; height: 9px; min-width: 9px; margin-top: 6px; border: 1px solid var(--line-strong); border-radius: 50%; }
.requirement.met { color: var(--success); }
.requirement.met::before { border-color: var(--success); background: var(--success); }
.overview-grid > section, .acceptance-box { padding: 24px 0; border-top: 1px solid var(--line); }
.overview-grid > section:first-child, .acceptance-box { border-top: 3px solid var(--ink); }
.overview-grid section > span, .acceptance-box > span { color: var(--muted); font-size: 14px; font-weight: 700; }
.overview-grid h2, .acceptance-box h2 { margin-top: 7px; }
.overview-grid p, .acceptance-box p { margin-bottom: 0; color: var(--muted); }
.reference-list { display: grid; margin-top: 10px; }
.reference-list a { padding: 9px 0; border-bottom: 1px solid var(--line); color: var(--accent); }
.work-group > p { color: var(--muted); }
.check-list { border-top: 2px solid var(--ink); }
.check-row { min-height: 54px; display: flex; align-items: start; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--line); cursor: pointer; }
.check-row input, .explain-check input { width: 21px; height: 21px; min-width: 21px; margin-top: 2px; accent-color: var(--accent); }
.evidence-form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 24px; }
.evidence-form label, .notes-grid label { display: grid; gap: 7px; font-weight: 700; }
.evidence-form .wide { grid-column: 1 / -1; }
textarea { resize: vertical; font-weight: 400; }
.result-controls { margin-top: 26px; padding: 20px; border-top: 3px solid var(--accent); background: var(--surface); }
.result-controls > span { display: block; margin-bottom: 10px; font-weight: 700; }
.result-controls > div { display: flex; flex-wrap: wrap; gap: 8px; }
.result-controls button { min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); cursor: pointer; }
.result-controls button.selected { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.result-controls button.danger { border-color: var(--danger); color: var(--danger); background: var(--danger-soft); }
.explain-check { display: flex; align-items: start; gap: 10px; margin-top: 18px; cursor: pointer; }
.notes-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.notes-grid small { min-height: 44px; color: var(--muted); font-size: 14px; font-weight: 400; }
.adjacent-nav { display: flex; justify-content: space-between; gap: 20px; margin-top: 42px; padding-top: 20px; border-top: 1px solid var(--line); }
.adjacent-nav button { min-height: 44px; border: 0; background: transparent; color: var(--accent); cursor: pointer; font-weight: 700; }

.command-dialog { width: min(620px, calc(100vw - 28px)); padding: 0; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.command-dialog::backdrop { background: rgba(10, 10, 9, .5); backdrop-filter: blur(2px); }
.command-box { margin: 0; }
.command-input-row { display: flex; align-items: center; gap: 10px; padding: 12px; border-bottom: 1px solid var(--line); }
.command-input-row input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 16px; }
.command-input-row button { min-height: 40px; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.command-results { max-height: 430px; overflow-y: auto; padding: 7px; }
.command-result { width: 100%; min-height: 50px; display: grid; grid-template-columns: 72px 1fr; align-items: center; gap: 10px; padding: 9px 11px; border: 0; border-radius: var(--radius); background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.command-result:hover { background: var(--surface-3); }
.command-result span { color: var(--muted); font-size: 14px; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 100; max-width: calc(100vw - 28px); padding: 10px 18px; border-radius: var(--radius); background: var(--ink); color: var(--surface); opacity: 0; pointer-events: none; transform: translateX(-50%); transition: opacity .18s; }
.toast.show { opacity: 1; }
.empty-state { padding: 44px 20px; color: var(--muted); text-align: center; }
.empty-state b { display: block; color: var(--ink); }

@media (max-width: 1040px) {
  .continue-layout, .session-layout { grid-template-columns: 1fr; }
  .context-rail, .session-context { position: static; }
  .context-rail { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .repo-list { grid-template-columns: 1fr 1fr; }
  .repo-list article { border-bottom: 1px solid var(--line); }
  .repo-list article:nth-child(2n) { border-right: 0; }
}

.curriculum-intro { margin-bottom: 32px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.session-format-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin-top: 16px; }
.format-block { padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); text-align: center; }
.format-block b { display: block; font-size: 22px; color: var(--accent); }
.format-block span { display: block; margin-top: 4px; font-size: 14px; color: var(--muted); }
.learning-loop-inline { margin-top: 18px; padding: 16px; border: 1px solid var(--accent-soft); border-radius: var(--radius); background: var(--accent-soft); }
.learning-loop-inline span { display: block; font-size: 14px; font-weight: 700; color: var(--accent); margin-bottom: 6px; }
.learning-loop-inline p { margin: 0; font-size: 15px; line-height: 1.5; }

.parallel-tracks-section, .side-strands-section, .aster-spec-section, .learning-system-section { margin-bottom: 32px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.parallel-tracks-section h2, .side-strands-section h2, .aster-spec-section h2, .learning-system-section h2 { margin-bottom: 8px; }
.track-list, .strand-list, .note-type-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 16px; }
.track-list article, .strand-list article, .note-type-list article { padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); }
.track-list article b, .strand-list article b, .note-type-list article b { display: block; margin-bottom: 4px; }
.track-list article span, .strand-list article span { display: block; font-size: 13px; color: var(--accent); font-weight: 600; margin-bottom: 4px; }
.track-list article p, .strand-list article p, .note-type-list article p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.45; }
.strand-list code { font-size: 13px; background: var(--accent-soft); padding: 2px 6px; border-radius: 4px; }

.aster-services-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-top: 16px; }
.aster-services-list > div { padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); }
.aster-services-list code { display: block; font-weight: 700; }
.aster-services-list span { font-size: 13px; color: var(--muted); }
.aster-spec-section details { margin-top: 16px; }
.aster-spec-section ul { margin: 8px 0 0; padding-left: 20px; }
.aster-spec-section li { margin-bottom: 6px; font-size: 14px; color: var(--muted); }

.project-relationships { margin-bottom: 32px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.relationship-diagram { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 16px; }
.rel-row { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.rel-triple { gap: 12px; }
.rel-connector { font-size: 18px; color: var(--muted); padding: 4px 0; }
.rel-node { padding: 14px 20px; border: 2px solid var(--line); border-radius: var(--radius); background: var(--surface-2); text-align: center; min-width: 160px; }
.rel-node code { display: block; font-weight: 700; font-size: 15px; }
.rel-node span { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.rel-workbook { border-color: var(--accent); background: var(--accent-soft); }
.rel-flagship { border-color: var(--success); background: var(--success-soft); }
.rel-component { border-color: var(--warning); background: var(--warning-soft); }
.rel-simulator { border-color: var(--muted); background: var(--surface-3); }
.rel-note { margin-top: 14px; font-size: 14px; color: var(--muted); text-align: center; }

.format-sequence { display: flex; flex-direction: column; gap: 6px; }
.format-row { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); cursor: pointer; }
.format-row:hover { background: var(--surface-3); }
.format-row input[type="checkbox"] { min-width: 18px; min-height: 18px; }
.format-time { min-width: 36px; font: 700 14px ui-monospace, monospace; color: var(--accent); }
.format-label { font-size: 15px; }
.field-requirement { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 4px; font-size: 12px; font-weight: 700; }
.field-requirement.required { background: var(--danger-soft); color: var(--danger); }
.field-requirement.provided { background: var(--success-soft); color: var(--success); }

@media (max-width: 760px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; inset: 0 auto 0 0; z-index: 31; width: 270px; height: 100vh; box-shadow: var(--shadow); transform: translateX(-105%); transition: transform .2s ease; }
  .app-shell.mobile-open .sidebar { transform: translateX(0); }
  .mobile-header { position: sticky; top: 0; z-index: 20; min-height: 54px; display: flex; align-items: center; justify-content: space-between; padding: 4px 10px; border-bottom: 1px solid var(--line); background: var(--surface); }
  .mobile-header button { min-width: 44px; min-height: 44px; border: 0; background: transparent; color: var(--accent); cursor: pointer; }
  .mobile-bottom-nav { position: fixed; inset: auto 0 0; z-index: 30; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); background: var(--surface); }
  .mobile-bottom-nav button { min-height: 58px; display: grid; justify-items: center; align-content: center; gap: 2px; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
  .mobile-bottom-nav button.active { color: var(--accent); }
  .mobile-bottom-nav .nav-label { font-size: 14px; }
  main { padding: 24px 15px 88px; }
  .page-header { display: block; }
  .continue-layout { margin-top: 28px; }
  .next-action { align-items: stretch; flex-direction: column; }
  .context-rail { grid-template-columns: 1fr; }
  .filter-bar { align-items: stretch; flex-direction: column; }
  .filter-bar > label { min-width: 0; }
  .session-row { grid-template-columns: 38px minmax(0, 1fr); }
  .session-row .kind, .session-row .status { grid-column: 2; justify-self: start; }
  .session-row .title span { white-space: normal; }
  .phase-section > header, .project-card > header, .session-header-top { flex-direction: column; }
  .repo-list, .project-summary, .project-details, .two-column, .progress-summary, .checkpoint-list, .evidence-form, .notes-grid, .track-list, .strand-list, .note-type-list { grid-template-columns: 1fr; }
  .repo-list article, .project-summary section, .progress-summary > div { border-right: 0; }
  .project-flow { grid-template-columns: 1fr; }
  .project-flow > b { transform: rotate(90deg); justify-self: center; }
  .session-format-grid { grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); }
  .aster-services-list { grid-template-columns: 1fr; }
  .rel-row, .rel-triple { flex-direction: column; align-items: center; }
  .rel-node { min-width: 0; width: 100%; }
  .format-row { flex-wrap: wrap; }
  .evidence-form .wide { grid-column: auto; }
  .session-actions { width: 100%; flex-wrap: wrap; }
  .session-tabs { top: 54px; }
  .session-tabs button { padding-inline: 3px; font-size: 14px; }
  .toast { bottom: 72px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

@media print {
  .sidebar, .mobile-header, .mobile-bottom-nav, .session-actions, .session-tabs, .command-dialog, .toast { display: none !important; }
  .app-shell { display: block; }
  main { padding: 0; }
  body { background: white; color: black; }
}
