/* UMT Training — static docs theme. No external requests. */
@font-face { font-family: "InterVar"; src: url("fonts/Inter-var.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  --font: "InterVar", Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --bg: #f6f8fb; --surface: #ffffff; --surface-2: #f1f4f9; --surface-3: #e9eef5;
  --border: #e2e8f0; --border-strong: #cdd6e3;
  --text: #0e1a2b; --text-2: #3f4f66; --muted: #6a7a91;
  --steel-950: #0a1e33; --steel-900: #0f2a44; --steel-800: #163a5e; --steel-700: #1d4b78; --steel-600: #255d95;
  --steel-500: #3473b3; --steel-200: #c9dbef; --steel-100: #e3edf8; --steel-50: #f1f6fc;
  --accent: #f59e0b; --accent-strong: #d97706; --accent-ink: #92400e; --accent-soft: #fff4dc; --accent-line: #fcd38a;
  --link: #1f5c99; --link-hover: #0f3f70;
  --red: #c2410c; --red-soft: #fff1eb; --red-line: #fdc9b1;
  --green: #15803d; --green-soft: #ecfbf1; --green-line: #b6e8c8;
  --why: #255d95; --why-soft: #eef5fd; --why-line: #c9dbef;
  --shadow-sm: 0 1px 2px rgba(15, 27, 45, .06);
  --shadow: 0 1px 2px rgba(15, 27, 45, .05), 0 4px 14px -4px rgba(15, 27, 45, .08);
  --shadow-lg: 0 24px 60px -12px rgba(10, 30, 51, .35);
  --radius: 12px; --radius-sm: 8px; --header: 64px; --side: 284px; --toc: 236px;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0a111d; --surface: #0f1828; --surface-2: #142034; --surface-3: #1a2840;
  --border: #1e2c43; --border-strong: #2a3b57;
  --text: #e7eef8; --text-2: #b3c1d4; --muted: #8696ad;
  --steel-100: #16273f; --steel-50: #111f33; --steel-200: #23406a;
  --accent: #fbbf24; --accent-strong: #f59e0b; --accent-ink: #fcd34d; --accent-soft: #2a1f0a; --accent-line: #5c4310;
  --link: #8cc0f2; --link-hover: #b9d9f8;
  --red: #fb923c; --red-soft: #2a160d; --red-line: #5a2d17;
  --green: #4ade80; --green-soft: #0d2418; --green-line: #1d4d31;
  --why: #8cc0f2; --why-soft: #0f2238; --why-line: #23406a;
  --shadow-sm: none; --shadow: 0 1px 0 rgba(255,255,255,.02), 0 6px 18px -8px rgba(0,0,0,.6);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header) + 16px); }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.65; color: var(--text); background: var(--bg);
  font-feature-settings: "cv11", "ss01", "ss03"; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.i { width: 18px; height: 18px; flex: none; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--surface); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 12px; }
kbd { font-family: var(--font); font-size: 11px; font-weight: 600; line-height: 1; padding: 4px 6px; border-radius: 5px;
  border: 1px solid var(--border-strong); border-bottom-width: 2px; color: var(--muted); background: var(--surface); }

/* ---------- header */
.topbar { position: sticky; top: 0; z-index: 40; height: var(--header); display: flex; align-items: center; gap: 16px;
  padding: 0 20px; background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: 11px; color: var(--text); min-width: calc(var(--side) - 36px); }
.brand:hover { text-decoration: none; color: var(--text); }
.logo { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: var(--accent);
  background: linear-gradient(145deg, var(--steel-800), var(--steel-950)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), var(--shadow-sm); }
.logo .i { width: 22px; height: 22px; stroke-width: 2.2; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text b { font-size: 15.5px; font-weight: 700; letter-spacing: -.01em; }
.brand-text small { font-size: 12px; color: var(--muted); font-weight: 500; }
.search-trigger { flex: 0 1 440px; display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 10px 0 13px; margin-right: auto;
  font: inherit; font-size: 14px; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 10px; cursor: pointer; transition: border-color .15s, background .15s; }
.search-trigger:hover { border-color: var(--border-strong); background: var(--surface); }
.search-trigger span { flex: 1; text-align: left; }
.top-actions { display: flex; gap: 4px; margin-left: auto; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; border: 1px solid transparent;
  background: transparent; color: var(--text-2); cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); border-color: var(--border); color: var(--text); }
.menu-btn, .search-mobile { display: none; }
.i-sun { display: none; } [data-theme="dark"] .i-sun { display: block; } [data-theme="dark"] .i-moon { display: none; }

/* ---------- layout */
.layout { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); max-width: 1600px; margin: 0 auto; }
.layout.has-toc { grid-template-columns: var(--side) minmax(0, 1fr) var(--toc); }
main { min-width: 0; padding: 40px 56px 32px; outline: none; }

/* ---------- sidebar */
.sidebar { position: sticky; top: var(--header); height: calc(100vh - var(--header)); overflow-y: auto; border-right: 1px solid var(--border);
  scrollbar-width: thin; }
.side-inner { padding: 22px 14px 40px 18px; }
.side-label { margin: 22px 10px 8px; font-size: 11.5px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.side-link { display: flex; align-items: flex-start; gap: 10px; padding: 7px 10px; border-radius: 8px; font-size: 14px; line-height: 1.35;
  color: var(--text-2); font-weight: 500; }
.side-link:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.side-link.is-active { background: var(--steel-100); color: var(--steel-700); font-weight: 600; box-shadow: inset 2px 0 0 var(--accent); }
[data-theme="dark"] .side-link.is-active { color: #d7e8fb; }
.side-home .i { color: var(--muted); }
.side-section { margin-bottom: 6px; }
.side-section > summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px;
  font-size: 14.5px; font-weight: 650; color: var(--text); cursor: pointer; user-select: none; }
.side-section > summary::-webkit-details-marker { display: none; }
.side-section > summary:hover { background: var(--surface-2); }
.side-section > summary .i { color: var(--steel-600); }
[data-theme="dark"] .side-section > summary .i { color: var(--link); }
.side-section > summary span { flex: 1; }
.side-chev { width: 16px; height: 16px; color: var(--muted) !important; transition: transform .2s; }
.side-section[open] .side-chev { transform: rotate(90deg); }
.side-section ul { list-style: none; margin: 0; padding: 0 0 0 8px; border-left: 1px solid var(--border); margin-left: 19px; }
.side-overview { margin: 2px 0 0 19px; padding-left: 18px; border-left: 1px solid var(--border); border-radius: 0 8px 8px 0; }
.side-group { margin: 14px 0 4px 38px; font-size: 11.5px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.side-num { flex: none; min-width: 24px; height: 20px; padding: 0 5px; margin-top: 0; border-radius: 6px; display: grid; place-items: center;
  font-size: 11.5px; font-weight: 650; font-variant-numeric: tabular-nums; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); }
.side-num .i { width: 12px; height: 12px; }
.side-link.is-active .side-num { color: var(--accent-ink); background: var(--accent-soft); border-color: var(--accent-line); }
.side-soon { margin: 26px 10px 0; padding: 14px; border: 1px dashed var(--border-strong); border-radius: 10px; }
.side-soon .side-label { margin: 0 0 6px; }
.side-soon p:last-child { margin: 0; font-size: 13px; line-height: 1.6; color: var(--muted); }

/* ---------- toc */
.toc { position: sticky; top: var(--header); align-self: start; max-height: calc(100vh - var(--header)); overflow-y: auto; padding: 40px 20px 24px 8px; }
.toc-title { margin: 0 0 10px; font-size: 12px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.toc ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--border); }
.toc li a { display: block; margin-left: -1px; padding: 5px 0 5px 14px; border-left: 2px solid transparent; font-size: 13.5px; line-height: 1.4; color: var(--muted); }
.toc li a:hover { color: var(--text); text-decoration: none; }
.toc li a.is-active { color: var(--steel-700); border-left-color: var(--accent); font-weight: 600; }
[data-theme="dark"] .toc li a.is-active { color: var(--link); }
.toc-actions { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); display: grid; gap: 4px; }
.toc-btn { display: flex; align-items: center; gap: 8px; font: inherit; font-size: 13px; color: var(--muted); background: none; border: 0; padding: 4px 0; cursor: pointer; }
.toc-btn:hover { color: var(--text); text-decoration: none; }
.toc-btn .i { width: 15px; height: 15px; }
.rot90 { transform: rotate(90deg); }

/* ---------- doc */
.doc { max-width: 800px; margin: 0 auto; }
.doc-wide { max-width: 1000px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--muted); } .crumbs a:hover { color: var(--text); }
.crumbs .i { width: 14px; height: 14px; opacity: .6; }
.crumbs span { color: var(--text-2); font-weight: 500; }
.doc-head { padding-bottom: 26px; margin-bottom: 30px; border-bottom: 1px solid var(--border); }
h1, h2, h3, h4 { line-height: 1.25; letter-spacing: -.018em; color: var(--text); }
.doc-head h1 { font-size: 2.35rem; font-weight: 750; letter-spacing: -.028em; margin: 0 0 12px; text-wrap: balance; }
.lede { font-size: 1.15rem; line-height: 1.6; color: var(--text-2); margin: 0 0 18px; max-width: 64ch; text-wrap: pretty; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12.5px; font-weight: 550;
  color: var(--text-2); background: var(--surface); border: 1px solid var(--border); }
.chip .i { width: 13px; height: 13px; }
.chip-num { color: var(--steel-700); background: var(--steel-100); border-color: var(--steel-200); font-weight: 650; }
[data-theme="dark"] .chip-num { color: var(--link); }
.chip-rv-never, .chip-rv-due { color: var(--muted); border-style: dashed; }
.chip-plain { border-color: transparent; background: transparent; color: var(--muted); padding-left: 2px; }
.doc-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 10px;
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.btn:hover { text-decoration: none; border-color: var(--muted); color: var(--text); }
.btn .i { width: 16px; height: 16px; }
.btn-primary { background: var(--accent); border-color: var(--accent-strong); color: #1f1300; box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 4px 14px -4px rgba(245,158,11,.55); }
.btn-primary:hover { background: #fbb024; color: #1f1300; border-color: var(--accent-strong); }
.btn-ghost { background: var(--surface); }

/* ---------- prose */
.prose { font-size: 16.25px; }
.prose > section, .prose > div > section { margin-top: 44px; }
.prose h2 { position: relative; font-size: 1.55rem; font-weight: 700; margin: 0 0 16px; padding-top: 4px; }
.prose h3 { font-size: 1.15rem; font-weight: 650; margin: 30px 0 10px; }
.h-eyebrow { display: block; margin-bottom: 4px; font-size: 12px; font-weight: 650; letter-spacing: .09em; text-transform: uppercase; color: var(--accent-strong); }
[data-theme="dark"] .h-eyebrow { color: var(--accent); }
.h-anchor { margin-left: 8px; opacity: 0; color: var(--muted); vertical-align: middle; transition: opacity .15s; }
.h-anchor .i { width: 16px; height: 16px; }
h2:hover .h-anchor, h3:hover .h-anchor, .h-anchor:focus { opacity: 1; }
.prose p { margin: 0 0 14px; max-width: 72ch; }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 14px; }
.prose li { margin: 5px 0; }
.prose li > p { margin: 0 0 6px; }
.prose strong { font-weight: 650; color: var(--text); }
.prose code { font-family: var(--mono); font-size: .84em; padding: 2px 6px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text); overflow-wrap: anywhere; }
.xref, .num-link { font-weight: 600; font-variant-numeric: tabular-nums; padding: 0 2px; white-space: nowrap; font-size: .94em; border-radius: 5px; background: var(--steel-50); border: 1px solid var(--steel-100); }
.xref:hover, .num-link:hover { text-decoration: none; background: var(--steel-100); }
.tag-new { display: inline-flex; align-items: center; height: 19px; padding: 0 7px; margin: 0 2px; border-radius: 999px; vertical-align: 1px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-ink);
  background: var(--accent-soft); border: 1px solid var(--accent-line); cursor: help; }
.new-detail { margin-left: 4px; font-size: .88em; color: var(--muted); font-style: italic; }

/* intro panels */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px 6px; box-shadow: var(--shadow-sm); }
.panel-title { display: flex; align-items: center; gap: 8px; margin: 0 0 10px !important; font-size: 12.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.panel-title .i { width: 16px; height: 16px; color: var(--steel-500); }
.panel-body ul { padding-left: 1.1em; }
.panel-body li::marker { color: var(--steel-500); }
.panel-role { margin-bottom: 18px; border-left: 3px solid var(--steel-600); }
.role-badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.role-badge { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px 0 10px; border-radius: 999px; font-size: 14px; font-weight: 650;
  color: #fff; background: linear-gradient(180deg, var(--steel-600), var(--steel-800)); box-shadow: var(--shadow-sm); }
.role-badge .i { width: 15px; height: 15px; color: var(--accent); }
.panel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 18px 0; }
.panel-grid .panel { font-size: 15px; }

/* callouts */
.callout { display: flex; gap: 14px; margin: 18px 0; padding: 16px 18px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface-2); }
.callout-icon { flex: none; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; color: var(--muted); background: var(--surface); border: 1px solid var(--border); }
.callout-body { min-width: 0; }
.callout-body > :last-child, .callout-body > p:last-child { margin-bottom: 0; }
.callout-title { margin: 3px 0 4px !important; font-weight: 700; font-size: 14.5px; color: var(--text); }
.callout-why { background: var(--why-soft); border-color: var(--why-line); }
.callout-why .callout-icon { color: var(--why); border-color: var(--why-line); }
.callout-why .callout-title { color: var(--why); }
.callout-warning { background: var(--accent-soft); border-color: var(--accent-line); box-shadow: inset 4px 0 0 var(--accent); }
.callout-warning .callout-icon { color: var(--accent-ink); background: #ffe6b0; border-color: var(--accent-line); }
[data-theme="dark"] .callout-warning .callout-icon { background: #3a2a0c; }
.callout-warning .callout-title { color: var(--accent-ink); }
.callout-tip { background: var(--green-soft); border-color: var(--green-line); }
.callout-tip .callout-icon { color: var(--green); border-color: var(--green-line); }
.callout-tip .callout-title { color: var(--green); }
.callout-info .callout-icon { color: var(--steel-600); }
[data-theme="dark"] .callout-info .callout-icon { color: var(--link); }
.sec-warning { margin: 24px 0; padding: 18px 20px 6px; border-radius: var(--radius); background: var(--red-soft); border: 1px solid var(--red-line); box-shadow: inset 4px 0 0 var(--red); }
.sec-warning h3 { margin-top: 0; color: var(--red); }

/* step cards */
:is(.sec-steps, .substeps) > ol { list-style: none; padding: 0; margin: 0; counter-reset: step; }
:is(.sec-steps, .substeps) > ol > li { counter-increment: step; position: relative; margin: 0 0 10px; padding: 14px 18px 14px 62px; min-height: 58px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s; }
:is(.sec-steps, .substeps) > ol > li:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
:is(.sec-steps, .substeps) > ol > li::before { content: counter(step); position: absolute; left: 16px; top: 13px; width: 32px; height: 32px; border-radius: 10px;
  display: grid; place-items: center; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums;
  color: #fff; background: linear-gradient(180deg, var(--steel-600), var(--steel-800)); box-shadow: 0 2px 6px -2px rgba(15, 42, 68, .5); }
:is(.sec-steps, .substeps) > ol > li > p:last-child, :is(.sec-steps, .substeps) > ol > li > ul:last-child, :is(.sec-steps, .substeps) > ol > li > ol:last-child { margin-bottom: 0; }
:is(.sec-steps, .substeps) > ol > li ul, :is(.sec-steps, .substeps) > ol > li ol { margin: 8px 0 2px; padding-left: 1.15em; }
:is(.sec-steps, .substeps) > ol > li li::marker { color: var(--steel-500); }
.sec-steps h3 { margin-top: 26px; }

/* checkpoints / mistakes / handoffs */
.sec-check > ul, .sec-mistakes > ul, .sec-handoff > ul { list-style: none; padding: 0; margin: 0; }
.sec-check > ul > li, .sec-mistakes > ul > li, .sec-handoff > ul > li { position: relative; margin: 0; padding: 13px 16px 13px 50px; }
.sec-check > ul { border: 1px solid var(--green-line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.sec-check > ul > li + li { border-top: 1px solid var(--border); }
.sec-check > ul > li::before, .sec-mistakes > ul > li::before, .sec-handoff > ul > li::before {
  content: ""; position: absolute; left: 16px; top: 15px; width: 20px; height: 20px; background-color: currentColor;
  -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.sec-check > ul > li::before { color: var(--green);
  --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 11.1V12a10 10 0 1 1-5.9-9.1'/%3E%3Cpath d='m22 4-10 10-3-3'/%3E%3C/svg%3E"); }
.sec-mistakes > ul { display: grid; gap: 10px; }
.sec-mistakes > ul > li { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.sec-mistakes > ul > li::before { color: var(--red);
  --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7.9 2h8.2L22 7.9v8.2L16.1 22H7.9L2 16.1V7.9z'/%3E%3Cpath d='m15 9-6 6M9 9l6 6'/%3E%3C/svg%3E"); }
.sec-mistakes > ul > li > strong:first-child, .sec-mistakes > ul > li > p:first-child > strong:first-child,
.sec-check > ul > li > strong:first-child, .sec-check > ul > li > p:first-child > strong:first-child { display: block; margin-bottom: 2px; }
.sec-handoff > ul { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.sec-handoff > ul > li + li { border-top: 1px solid var(--border); }
.sec-handoff > ul > li::before { color: var(--steel-500);
  --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m22 2-7 20-4-9-9-4z'/%3E%3Cpath d='M22 2 11 13'/%3E%3C/svg%3E"); }
.handoff-role { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; margin-right: 8px; border-radius: 7px; font-size: 13px; font-weight: 650;
  color: var(--steel-700); background: var(--steel-100); border: 1px solid var(--steel-200); }
[data-theme="dark"] .handoff-role { color: var(--link); }

/* to be confirmed */
.sec-open { margin-top: 44px; }
.oq { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.oq > summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 14px 18px; cursor: pointer; border-radius: var(--radius); }
.oq > summary::-webkit-details-marker { display: none; }
.oq > summary:hover { background: var(--surface-3); }
.oq-i { color: var(--muted); width: 22px; height: 22px; }
.oq-text { flex: 1; display: flex; flex-direction: column; line-height: 1.3; }
.oq-text b { font-weight: 650; font-size: 15px; color: var(--text-2); }
.oq-text small { font-size: 13px; color: var(--muted); }
.oq-chev { color: var(--muted); transition: transform .2s; }
.oq[open] .oq-chev { transform: rotate(90deg); }
.oq-body { padding: 0 20px 10px 52px; color: var(--text-2); font-size: 15px; }
.oq-body ul { padding-left: 1.1em; }

/* tables */
.table-wrap { margin: 18px 0 22px; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.5; }
th, td { padding: 11px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
th { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--steel-50); }
td code { font-size: .8em; }

/* pager */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 56px 0 8px; }
.pager-link { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s; }
.pager-link:hover { text-decoration: none; border-color: var(--steel-500); box-shadow: var(--shadow); }
.pager-link.next { text-align: right; align-items: flex-end; }
.pager-dir { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.pager-dir .i { width: 14px; height: 14px; }
.pager-title { font-weight: 650; color: var(--text); }

.foot { max-width: 1120px; margin: 64px auto 0; padding: 24px 0 8px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); }
.foot p { margin: 0 0 4px; }
.foot b { color: var(--text-2); }

/* video */
.video { margin: 0 0 28px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: #000; }
.video video { display: block; width: 100%; }
.video figcaption { display: flex; gap: 8px; align-items: center; padding: 10px 14px; font-size: 13px; color: var(--muted); background: var(--surface); }

/* ---------- section landing */
.section-hero { display: flex; gap: 20px; align-items: flex-start; padding-bottom: 24px; margin-bottom: 8px; }
.section-hero h1 { font-size: 2.35rem; font-weight: 750; letter-spacing: -.028em; margin: 2px 0 10px; }
.section-icon { flex: none; width: 60px; height: 60px; border-radius: 16px; display: grid; place-items: center; color: var(--accent);
  background: linear-gradient(145deg, var(--steel-700), var(--steel-950)); box-shadow: var(--shadow); }
.section-icon .i { width: 30px; height: 30px; }
.eyebrow { display: inline-flex; align-items: center; gap: 7px; margin: 0 0 8px; font-size: 12.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--steel-600); }
[data-theme="dark"] .eyebrow { color: var(--link); }
.eyebrow .i { width: 15px; height: 15px; }
.eyebrow-amber { color: var(--accent-strong) !important; }
.group { margin-top: 40px; }
.group-title { font-size: 13px !important; font-weight: 700 !important; letter-spacing: .08em !important; text-transform: uppercase; color: var(--muted) !important; margin: 0 0 12px !important; }
.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.page-card { display: flex; align-items: flex-start; gap: 14px; padding: 16px 16px 16px 16px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s, transform .15s; }
.page-card:hover { text-decoration: none; color: var(--text); border-color: var(--steel-500); box-shadow: var(--shadow); transform: translateY(-1px); }
.card-num { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums;
  color: var(--steel-700); background: var(--steel-100); border: 1px solid var(--steel-200); }
[data-theme="dark"] .card-num { color: var(--link); }
.card-num-start { color: var(--accent-ink); background: var(--accent-soft); border-color: var(--accent-line); }
.card-num .i { width: 17px; height: 17px; }
.card-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.card-title { font-weight: 650; line-height: 1.35; }
.card-sum { font-size: 14px; line-height: 1.5; color: var(--text-2); }
.card-meta { display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; font-size: 12.5px; font-weight: 550; color: var(--muted); }
.card-meta .i { width: 13px; height: 13px; }
.card-arrow { margin-top: 8px; color: var(--muted); opacity: 0; transition: opacity .15s, transform .15s; }
.page-card:hover .card-arrow, .sec-card:hover .card-arrow { opacity: 1; transform: translateX(2px); }

/* ---------- home */
.home { max-width: 1120px; margin: 0 auto; }
.hero { position: relative; overflow: hidden; padding: 56px 56px 44px; border-radius: 22px; color: #e9f1fa;
  background: radial-gradient(1200px 400px at 85% -10%, rgba(245, 158, 11, .20), transparent 60%),
              radial-gradient(900px 500px at -10% 120%, rgba(52, 115, 179, .45), transparent 60%),
              linear-gradient(160deg, #143656 0%, #0d2540 55%, #0a1c31 100%);
  box-shadow: var(--shadow-lg); isolation: isolate; }
.hero-grid { position: absolute; inset: 0; z-index: -1; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 32px 32px; -webkit-mask-image: linear-gradient(180deg, #000, transparent 85%); mask-image: linear-gradient(180deg, #000, transparent 85%); }
.hero .eyebrow { color: var(--accent); }
.hero h1 { margin: 0 0 14px; font-size: 3.1rem; font-weight: 780; line-height: 1.07; letter-spacing: -.035em; color: #fff; max-width: 15ch; }
.hero h1 span { color: var(--accent); }
.hero .lede { color: #b9cbe0; font-size: 1.2rem; max-width: 52ch; }
.hero-search { display: flex; align-items: center; gap: 12px; width: min(560px, 100%); height: 52px; margin: 26px 0 18px; padding: 0 12px 0 18px;
  font: inherit; font-size: 15.5px; color: #9fb4cc; text-align: left; cursor: pointer; border-radius: 14px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); box-shadow: inset 0 1px 0 rgba(255,255,255,.06); transition: background .15s, border-color .15s; }
.hero-search:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.28); }
.hero-search span { flex: 1; }
.hero-search .short { display: none; }
.hero-search kbd { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.2); color: #c5d4e6; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-on-dark { background: rgba(255,255,255,.06); color: #fff; border-color: rgba(255,255,255,.22); box-shadow: none; }
.btn-on-dark:hover { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.4); }
.hero-stats { display: flex; gap: 40px; margin: 38px 0 0; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.1); }
.hero-stats div { display: flex; flex-direction: column-reverse; }
.hero-stats dt { font-size: 12.5px; color: #8fa6c0; font-weight: 500; }
.hero-stats dd { margin: 0; font-size: 1.5rem; font-weight: 700; color: #fff; letter-spacing: -.02em; }
.home-block { margin-top: 64px; }
.block-head { margin-bottom: 22px; }
.block-head h2 { margin: 0 0 6px; font-size: 1.75rem; font-weight: 720; letter-spacing: -.025em; }
.block-head p:not(.eyebrow) { margin: 0; color: var(--text-2); max-width: 64ch; }
.hl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.hl-card { position: relative; display: flex; flex-direction: column; padding: 22px 22px 18px; border-radius: 16px; background: var(--surface);
  border: 1px solid var(--accent-line); box-shadow: var(--shadow); overflow: hidden; }
.hl-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--accent), var(--accent-strong)); }
.hl-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: var(--accent-ink); background: var(--accent-soft); border: 1px solid var(--accent-line); margin-bottom: 14px; }
.hl-icon .i { width: 22px; height: 22px; }
.hl-card h3 { margin: 0 0 6px; font-size: 1.12rem; font-weight: 700; }
.hl-card p { margin: 0 0 16px; font-size: 14.5px; color: var(--text-2); line-height: 1.55; }
.hl-links { margin-top: auto; display: grid; gap: 6px; }
.hl-links a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--text); background: var(--surface-2); border: 1px solid var(--border); }
.hl-links a:hover { text-decoration: none; border-color: var(--accent); background: var(--accent-soft); }
.hl-num { white-space: nowrap; font-size: 12px; font-weight: 700; color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.hl-arrow { margin-left: auto; width: 15px; height: 15px; color: var(--muted); }
.sec-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 16px; }
.sec-card { display: flex; gap: 18px; align-items: flex-start; padding: 24px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface); color: var(--text); box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
a.sec-card:hover { text-decoration: none; color: var(--text); border-color: var(--steel-500); transform: translateY(-1px); }
.sec-card-icon { flex: none; width: 48px; height: 48px; border-radius: 13px; display: grid; place-items: center; color: var(--accent); background: linear-gradient(145deg, var(--steel-700), var(--steel-950)); }
.sec-card-icon .i { width: 24px; height: 24px; }
.sec-card-body { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.sec-card-title { font-size: 1.15rem; font-weight: 700; }
.sec-card-sum { font-size: 14.5px; color: var(--text-2); line-height: 1.55; }
.sec-card-meta { display: flex; gap: 8px; margin-top: 6px; }
.pill { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--steel-700); background: var(--steel-100); }
[data-theme="dark"] .pill { color: var(--link); }
.sec-card-soon { background: transparent; border-style: dashed; border-color: var(--border-strong); box-shadow: none; }
.sec-card-soon .sec-card-icon { background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.soon-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.soon { font-size: 12.5px; font-weight: 550; color: var(--muted); padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); }
.role-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.role-card { padding: 22px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-sm); }
.role-card header { display: flex; gap: 14px; align-items: center; margin-bottom: 10px; }
.role-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: var(--steel-600); background: var(--steel-100); border: 1px solid var(--steel-200); }
[data-theme="dark"] .role-icon { color: var(--link); }
.role-card h3 { margin: 0; font-size: 1.08rem; font-weight: 700; }
.role-who { display: flex; align-items: center; gap: 5px; margin: 2px 0 0; font-size: 13px; font-weight: 550; color: var(--muted); }
.role-who .i { width: 13px; height: 13px; }
.role-blurb { margin: 0 0 12px; font-size: 14.5px; color: var(--text-2); }
.mini-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.mini-list a { display: flex; gap: 10px; align-items: baseline; padding: 6px 8px; margin: 0 -8px; border-radius: 8px; font-size: 14.5px; font-weight: 550; color: var(--text); }
.mini-list a:hover { background: var(--surface-2); text-decoration: none; }
.mini-num { flex: none; width: 22px; font-size: 12.5px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.role-card-soon { background: transparent; border-style: dashed; box-shadow: none; }
.role-card-soon .role-icon { color: var(--muted); background: var(--surface-2); border-color: var(--border); }
.soon-roles { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.soon-roles li { display: flex; flex-direction: column; font-size: 14px; }
.soon-roles b { font-weight: 650; }
.soon-roles span { color: var(--muted); font-size: 13.5px; }

/* ---------- search modal */
.search-modal { position: fixed; inset: 0; z-index: 80; display: flex; justify-content: center; align-items: flex-start; padding: 10vh 16px 16px;
  background: rgba(6, 15, 28, .55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.search-modal[hidden] { display: none; }
.search-box { width: min(680px, 100%); max-height: 76vh; display: flex; flex-direction: column; border-radius: 16px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); }
.search-field { display: flex; align-items: center; gap: 12px; padding: 0 14px 0 18px; height: 60px; border-bottom: 1px solid var(--border); }
.search-field .i { color: var(--steel-500); width: 20px; height: 20px; }
.search-field input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font: inherit; font-size: 17px; color: var(--text); }
.search-field input::-webkit-search-cancel-button { display: none; }
.esc-btn { font: inherit; font-size: 12px; font-weight: 600; color: var(--muted); padding: 4px 8px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface-2); cursor: pointer; }
.results { list-style: none; margin: 0; padding: 8px; overflow-y: auto; }
.results:empty { display: none; }
.results li a { display: block; padding: 11px 14px; border-radius: 10px; color: var(--text); }
.results li a:hover { text-decoration: none; }
.results li.is-active a { background: var(--steel-100); }
.r-top { display: flex; align-items: center; gap: 8px; font-weight: 650; font-size: 15px; }
.r-num { font-size: 11.5px; font-weight: 700; padding: 1px 6px; border-radius: 5px; color: var(--steel-700); background: var(--steel-100); border: 1px solid var(--steel-200); }
.results li.is-active .r-num { background: var(--surface); }
.r-path { font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.r-x { font-size: 13.5px; color: var(--text-2); margin-top: 4px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.results mark { background: var(--accent-soft); color: inherit; border-radius: 3px; padding: 0 1px; box-shadow: inset 0 -2px 0 var(--accent-line); }
.r-empty { padding: 28px 16px; text-align: center; color: var(--muted); font-size: 14.5px; }
.search-foot { display: flex; gap: 18px; padding: 10px 16px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--border); background: var(--surface-2); }
.search-foot kbd { margin-right: 3px; }
.scrim { position: fixed; inset: var(--header) 0 0 0; z-index: 30; background: rgba(6, 15, 28, .45); }
.scrim[hidden] { display: none; }

/* ---------- responsive */
@media (max-width: 1240px) {
  .layout.has-toc { grid-template-columns: var(--side) minmax(0, 1fr); }
  .toc { display: none; }
  main { padding: 36px 40px 28px; }
}
@media (max-width: 960px) {
  :root { --header: 58px; }
  .layout, .layout.has-toc { grid-template-columns: minmax(0, 1fr); }
  .menu-btn, .search-mobile { display: grid; }
  .search-trigger { display: none; }
  .brand { min-width: 0; margin-right: auto; }
  .topbar { gap: 8px; padding: 0 10px 0 8px; }
  .sidebar { position: fixed; top: var(--header); left: 0; bottom: 0; z-index: 35; width: min(320px, 86vw); height: auto; background: var(--surface);
    transform: translateX(-102%); visibility: hidden; transition: transform .22s ease, visibility .22s; }
  body.nav-open .sidebar { transform: none; visibility: visible; box-shadow: var(--shadow-lg); }
  body.nav-open { overflow: hidden; }
  .hl-grid { grid-template-columns: 1fr; }
  .sec-grid, .role-grid, .card-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  main { padding: 22px 16px 24px; }
  .brand-text small { display: none; }
  .logo { width: 32px; height: 32px; }
  .doc-head h1, .section-hero h1 { font-size: 1.85rem; }
  .lede { font-size: 1.05rem; }
  .prose { font-size: 16px; }
  .prose h2 { font-size: 1.35rem; }
  .panel-grid { grid-template-columns: 1fr; gap: 12px; }
  .panel { padding: 16px 16px 4px; }
  :is(.sec-steps, .substeps) > ol > li { padding: 13px 14px 13px 54px; }
  :is(.sec-steps, .substeps) > ol > li::before { left: 12px; width: 30px; height: 30px; font-size: 13.5px; }
  .callout { padding: 14px; gap: 12px; }
  .callout-icon { width: 28px; height: 28px; }
  .callout-icon .i { width: 16px; height: 16px; }
  .sec-check > ul > li, .sec-mistakes > ul > li, .sec-handoff > ul > li { padding: 12px 14px 12px 44px; }
  .sec-check > ul > li::before, .sec-mistakes > ul > li::before, .sec-handoff > ul > li::before { left: 14px; }
  .oq-body { padding: 0 16px 8px 20px; }
  .pager { grid-template-columns: 1fr; }
  .pager-link.next { text-align: left; align-items: flex-start; }
  .hero { padding: 34px 22px 28px; border-radius: 18px; }
  .hero h1 { font-size: 2.2rem; }
  .hero .lede { font-size: 1.05rem; }
  .hero-search kbd, .hero-search .long { display: none; }
  .hero-search .short { display: block; }
  .hero-actions .btn { flex: 1 1 auto; }
  .hero-stats { gap: 26px; }
  .home-block { margin-top: 48px; }
  .section-hero { flex-direction: column; gap: 14px; }
  .doc-actions .btn { flex: 1; }
  table { font-size: 14px; }
  .search-modal { padding: 0; }
  .search-box { max-height: 100vh; height: 100%; border-radius: 0; }
  .search-foot { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ---------- print */
@media print {
  @page { size: Letter; margin: 0.6in 0.65in; }
  :root, [data-theme="dark"] { --bg: #fff; --surface: #fff; --surface-2: #f4f6f9; --text: #000; --text-2: #222; --muted: #555; --border: #bbb; --border-strong: #999; color-scheme: light; }
  body { background: #fff; color: #000; font-size: 10.5pt; line-height: 1.45; }
  .topbar, .sidebar, .toc, .pager, .doc-actions, .search-modal, .scrim, .skip, .h-anchor, .foot-note, .crumbs, .chip-plain { display: none !important; }
  .layout, .layout.has-toc { display: block; }
  main { padding: 0; }
  .doc { max-width: none; }
  .doc-head { padding-bottom: 10px; margin-bottom: 14px; border-bottom: 2px solid #0f2a44; }
  .doc-head h1 { font-size: 20pt; margin-bottom: 6px; }
  .lede { font-size: 11pt; margin-bottom: 8px; }
  .chip { height: auto; padding: 1px 7px; font-size: 8.5pt; }
  .prose { font-size: 10.5pt; }
  .prose > section, .prose > div > section { margin-top: 18px; }
  .prose h2 { font-size: 13.5pt; margin-bottom: 8px; break-after: avoid; }
  .prose h3 { font-size: 11.5pt; break-after: avoid; }
  .h-eyebrow { font-size: 7.5pt; color: #8a5a00; }
  .panel, .callout, :is(.sec-steps, .substeps) > ol > li, .sec-mistakes > ul > li, .table-wrap, .hl-card { box-shadow: none !important; break-inside: avoid; }
  :is(.sec-steps, .substeps) > ol > li { padding: 7px 10px 7px 42px; min-height: 0; margin-bottom: 5px; border-color: #bbb; }
  :is(.sec-steps, .substeps) > ol > li::before { left: 9px; top: 7px; width: 22px; height: 22px; font-size: 9.5pt; border-radius: 6px; background: #0f2a44 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .role-badge { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .callout, .sec-warning, .tag-new, .chip-num, .handoff-role, .sec-check > ul > li::before, .sec-mistakes > ul > li::before { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .callout { padding: 8px 12px; margin: 10px 0; }
  .callout-icon { width: 24px; height: 24px; }
  .oq { background: #fff; }
  .oq > summary { padding: 8px 0; }
  .oq-chev, .oq-text small { display: none; }
  .oq-body { padding: 0 0 0 2px; }
  .table-wrap { overflow: visible; }
  th, td { padding: 5px 8px; }
  a { color: #000; }
  .xref, .num-link { background: none; border: 0; padding: 0; }
  .foot { margin-top: 20px; padding-top: 8px; font-size: 8pt; }
  .home .hero { color: #000; background: none !important; box-shadow: none; padding: 0 0 12px; border-bottom: 2px solid #0f2a44; border-radius: 0; }
  .hero h1, .hero .lede, .hero-stats dd { color: #000; }
  .hero-search, .hero-actions, .hero-grid { display: none; }
}

/* ---------------------------------------------------------------- document control */
.side-num.side-doc { min-width: 0; width: auto; padding: 0 5px; font-size: 10px; letter-spacing: .02em; white-space: nowrap; }
.card-doc { display: block; margin-bottom: 3px; font-size: 11.5px; font-weight: 650; letter-spacing: .03em; color: var(--muted); font-variant-numeric: tabular-nums; }
.mini-num { width: auto; min-width: 92px; font-size: 11.5px; letter-spacing: .02em; }
.doc-ctrl { display: grid; grid-template-columns: repeat(auto-fit, minmax(98px, 1fr)); gap: 0; margin: 18px 0 0; border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.doc-ctrl > div { padding: 9px 12px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); margin: 0 -1px -1px 0; }
.doc-ctrl dt { font-size: 11px; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.doc-ctrl dd { margin: 2px 0 0; font-size: 14px; font-weight: 600; }
.doc-ctrl .st { display: inline-block; white-space: nowrap; padding: 0 8px; border-radius: 999px; font-size: 12.5px; }
.doc-ctrl .st-pending-review, .doc-ctrl .st-draft { color: var(--accent-ink); background: var(--accent-soft); border: 1px solid var(--accent-line); }
.doc-ctrl .st-approved { color: var(--green); background: var(--green-soft, transparent); border: 1px solid var(--green-line); }
.doc-ctrl .st-obsolete { color: var(--red); border: 1px solid var(--red-line); }
@media print {
  .doc-ctrl { grid-template-columns: repeat(7, auto); margin-top: 8px; font-size: 8pt; }
  .doc-ctrl > div { padding: 3px 6px; }
  .doc-ctrl dt { font-size: 6.5pt; }
  .doc-ctrl dd { font-size: 8.5pt; }
}
.doc-ctrl > div:first-child dd { white-space: nowrap; }
.tag-verify { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; margin: 0 2px; border-radius: 5px; vertical-align: 1px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-ink); background: transparent;
  border: 1px dashed var(--accent-line); cursor: help; }

/* ---------- live layer: sign-in, user menu, review and training */
[hidden] { display: none !important; }
.user-slot { position: relative; display: flex; align-items: center; margin-left: 6px; }
.btn-signin { height: 38px; padding: 0 12px; font-size: 14px; }
.user-btn { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 10px 0 4px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.user-btn:hover { border-color: var(--border-strong); background: var(--surface-2); }
.avatar { width: 30px; height: 30px; border-radius: 999px; display: grid; place-items: center; font-size: 12px; font-weight: 750; letter-spacing: .02em;
  color: #fff; background: linear-gradient(145deg, var(--steel-600), var(--steel-900)); }
.user-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; width: 270px; padding: 6px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); }
.um-head { display: flex; flex-direction: column; padding: 10px 12px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--border); line-height: 1.35; }
.um-head span { font-size: 13px; color: var(--muted); }
.um-head .um-jobs { font-size: 12.5px; }
.um-link { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 12px; border-radius: 8px; border: 0; background: none; font: inherit;
  font-size: 14px; color: var(--text-2); text-align: left; cursor: pointer; }
.um-link:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.um-link .i { width: 16px; height: 16px; color: var(--muted); }
.um-out { border-top: 1px solid var(--border); border-radius: 0 0 8px 8px; margin-top: 4px; }
.side-app { margin-bottom: 6px; }
.side-app .side-link { display: flex; align-items: center; gap: 10px; }
.side-app .side-link .i { width: 16px; height: 16px; color: var(--steel-500); }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13.5px; border-radius: 9px; }
.btn-sm .i { width: 15px; height: 15px; }
.btn-approve { background: var(--green); border-color: var(--green); color: #fff; }
.btn-approve:hover { color: #fff; border-color: var(--green); filter: brightness(1.08); }
.btn-danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn-danger:hover { color: #fff; border-color: var(--red); filter: brightness(1.08); }
.btn-quiet { color: var(--muted); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }

.live-panel { margin-top: 18px; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--steel-200); background: var(--steel-50); }
.lp-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.lp-top { margin-bottom: 10px; }
.lp-label { font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.lp-meta, .lp-note { font-size: 13.5px; color: var(--text-2); }
.lp-note { margin: 8px 0 0; }
.lp-warn { color: var(--accent-ink); }
.lp-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
.lp-actions:empty { display: none; }
.lp-row + .lp-row, .lp-actions + .lp-row { margin-top: 10px; }
.lp-history { margin-top: 10px; font-size: 13.5px; }
.lp-history summary { cursor: pointer; font-weight: 600; color: var(--text-2); }
.ev-list { margin: 8px 0 0; padding-left: 1.1em; }
.ev-list li { margin: 4px 0; }
.ev-what { font-weight: 650; }
.ev-comment { display: block; margin-top: 2px; padding: 4px 10px; border-left: 3px solid var(--border-strong); color: var(--text-2); }

.q-badge { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12.5px; font-weight: 650; white-space: nowrap;
  border: 1px solid var(--border); color: var(--muted); background: var(--surface); }
.q-rd { color: var(--steel-700); background: var(--steel-100); border-color: var(--steel-200); }
.q-qp { color: var(--why); background: var(--why-soft); border-color: var(--why); }
.q-ql { color: var(--green); background: var(--green-soft); border-color: var(--green-line); }
.q-rt { color: var(--accent-ink); background: var(--accent-soft); border-color: var(--accent-line); }
[data-theme="dark"] .q-rd { color: var(--steel-200); }

.app-head { margin-bottom: 24px; }
.app-note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); }
.app-note .i { margin-top: 3px; color: var(--steel-500); }
.app-note-warn { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-ink); }
.app-note-warn .i { color: var(--accent-ink); }
.app-msg { margin: 12px 0; padding: 10px 12px; border-radius: var(--radius-sm); font-size: 14px; }
.app-msg-error { color: var(--red); background: var(--red-soft); border: 1px solid var(--red-line); }
.app-msg-ok { color: var(--green); background: var(--green-soft); border: 1px solid var(--green-line); }
.app-msg-info { color: var(--text-2); background: var(--surface-2); border: 1px solid var(--border); }
.app-h2 { display: flex; align-items: center; gap: 10px; font-size: 1.25rem; margin: 28px 0 12px; }
.card-form { max-width: 440px; padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.fld { display: flex; flex-direction: column; gap: 6px; margin: 0 0 14px; border: 0; padding: 0; min-width: 0; }
.fld > span, .fld legend { font-size: 13px; font-weight: 650; color: var(--text-2); padding: 0; }
.fld input, .fld select, .fld textarea { font: inherit; font-size: 15px; padding: 9px 11px; border-radius: 9px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); width: 100%; }
.fld input:focus, .fld select:focus, .fld textarea:focus { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); border-color: var(--accent-strong); }
.fld textarea.mono { font-family: var(--mono); font-size: 13px; line-height: 1.5; }
.fld-inline { flex-direction: row; align-items: center; gap: 10px; }
.fld-inline select { width: auto; max-width: 100%; }
.fld-help { font-size: 13px; color: var(--muted); margin: 0 0 12px; }
.fld-check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; margin: 0 14px 10px 0; }
.checks { display: flex; flex-wrap: wrap; }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; margin: 0; }
.kv > div { padding: 10px 14px; border-right: 1px solid var(--border); margin-right: -1px; }
.kv dt { font-size: 11px; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.kv dd { margin: 2px 0 0; font-weight: 600; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }

.modal { border: 0; padding: 0; border-radius: 14px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); width: min(640px, calc(100vw - 32px)); }
.modal::backdrop { background: rgba(10, 30, 51, .45); backdrop-filter: blur(2px); }
.modal-box { padding: 22px 22px 18px; }
.modal-title { margin: 0 0 14px; font-size: 1.2rem; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }

.plan { margin: 0 0 30px; }
.plan-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 10px 24px; margin-bottom: 12px; }
.plan-head h2 { margin: 2px 0 0; font-size: 1.35rem; }
.plan-prog { display: flex; flex-direction: column; gap: 6px; min-width: 240px; font-size: 13.5px; color: var(--text-2); }
.bar { display: flex; height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.bar-q { background: var(--green); } .bar-p { background: var(--steel-500); opacity: .55; }
.plan-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.plan-item { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--border); }
.plan-item:last-child { border-bottom: 0; }
.plan-n { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-size: 12.5px; font-weight: 700; color: var(--steel-700); background: var(--steel-100); }
.plan-doc { display: flex; flex-direction: column; min-width: 0; color: var(--text); }
.plan-doc:hover { text-decoration: none; color: var(--link); }
.plan-no { font-size: 12px; font-weight: 650; color: var(--muted); letter-spacing: .02em; }
.plan-title { font-weight: 600; line-height: 1.35; }
.plan-act { display: flex; gap: 6px; justify-content: flex-end; min-width: 0; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; font-size: 13px; color: var(--text-2); margin: 14px 0 6px; }
.legend > span { display: inline-flex; align-items: center; gap: 6px; }

.quiz { max-width: 720px; }
.qq { margin: 0 0 16px; padding: 16px 18px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); }
.qq legend { display: flex; gap: 10px; font-weight: 650; padding: 0 4px; line-height: 1.45; }
.qq-n { flex: none; width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; font-size: 12px; color: var(--steel-700); background: var(--steel-100); }
.qo { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; margin: 4px 0; border-radius: 9px; cursor: pointer; }
.qo:hover { background: var(--surface-2); }
.qo input { margin-top: 5px; accent-color: var(--steel-600); }
.qq-ok { border-color: var(--green-line); box-shadow: inset 4px 0 0 var(--green); }
.qq-bad { border-color: var(--red-line); box-shadow: inset 4px 0 0 var(--red); }
.qo-right { background: var(--green-soft); font-weight: 600; }

.so-act { text-align: right; white-space: nowrap; }
.u-act { white-space: nowrap; text-align: right; }
.u-act .btn + .btn { margin-left: 6px; }
.u-off td { opacity: .6; }
.temp-box { margin: 0 0 16px; padding: 14px 16px; border-radius: var(--radius); background: var(--accent-soft); border: 1px solid var(--accent-line); }
.temp-box p { margin: 0 0 8px; font-size: 14px; }
.temp-pw { font-family: var(--mono); font-size: 18px; letter-spacing: .06em; padding: 4px 10px; border-radius: 8px; background: var(--surface); border: 1px solid var(--accent-line); user-select: all; }
table.audit td { font-size: 13.5px; }
tr.a-bad td { background: var(--red-soft); }

.mx-actions { align-items: center; margin-top: 0; }
.mx-wrap { overflow: auto; max-height: 72vh; }
table.matrix { font-size: 13px; width: auto; min-width: 100%; }
table.matrix th, table.matrix td { padding: 6px 8px; border-right: 1px solid var(--border); }
table.matrix thead th { position: sticky; top: 0; z-index: 2; }
.mx-doc { vertical-align: bottom; text-align: center; min-width: 40px; }
.mx-doc a { display: inline-block; writing-mode: vertical-rl; transform: rotate(180deg); color: var(--text-2); font-weight: 650; letter-spacing: .02em; text-transform: none; }
.mx-doc small { display: block; font-weight: 500; letter-spacing: 0; text-transform: none; margin-top: 4px; }
.mx-person { position: sticky; left: 0; z-index: 1; background: var(--surface); min-width: 190px; text-transform: none; letter-spacing: 0; font-size: 13.5px; color: var(--text); white-space: nowrap; }
thead .mx-person { z-index: 3; background: var(--surface-2); }
.mx-person small { display: block; font-weight: 500; color: var(--muted); }
.mx-c { text-align: center; font-weight: 750; width: 40px; }
td.mx-c.q-ns { color: var(--muted); }
td.mx-c.q-rd { background: var(--steel-100); color: var(--steel-700); }
td.mx-c.q-qp { background: var(--why-soft); color: var(--why); }
td.mx-c.q-ql { background: var(--green-soft); color: var(--green); }
td.mx-c.q-rt { background: var(--accent-soft); color: var(--accent-ink); }
.mx-na { background: repeating-linear-gradient(135deg, transparent 0 5px, var(--surface-2) 5px 10px); color: var(--muted); }
.mx-sum { font-weight: 700; white-space: nowrap; }
.mx-key { display: inline-grid; place-items: center; width: 24px; height: 22px; border-radius: 5px; border: 1px solid var(--border); }
.mx-legend { gap: 8px 16px; }

.rv-list { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 8px; }
.rv-item { display: flex; flex-direction: column; align-items: flex-start; width: 100%; padding: 12px 14px; text-align: left; font: inherit; cursor: pointer;
  border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.rv-item:hover, .rv-item.is-active { border-color: var(--steel-500); background: var(--steel-50); }
.rv-item .muted { font-size: 13px; }
.rv-detail { margin-top: 10px; padding: 16px 18px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); }
.rv-detail h3 { margin: 0 0 4px; }
.diff { margin-top: 12px; font-family: var(--mono); font-size: 12.5px; line-height: 1.55; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: auto; max-height: 60vh; }
.dl { white-space: pre-wrap; padding: 0 10px 0 0; }
.dl-m { display: inline-block; width: 22px; text-align: center; color: var(--muted); user-select: none; }
.dl-add { background: var(--green-soft); } .dl-add .dl-m { color: var(--green); }
.dl-del { background: var(--red-soft); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--red) 50%, transparent); } .dl-del .dl-m { color: var(--red); }
.dl-gap { color: var(--muted); text-align: center; background: var(--surface-2); }
.diff-raw { margin: 0; padding: 10px; white-space: pre-wrap; }

@media (max-width: 720px) {
  .user-name { display: none; }
  .user-btn { padding: 0 4px; }
  .btn-signin span { display: none; }
  .plan-item { grid-template-columns: 26px minmax(0, 1fr); }
  .plan-item .q-badge, .plan-act { grid-column: 2; justify-self: start; }
}
@media print {
  .user-slot, .live-panel, .side-app, .modal, .mx-actions, .app-msg { display: none !important; }
  .mx-wrap { max-height: none; overflow: visible; }
  table.matrix { font-size: 7.5pt; }
  table.matrix th, table.matrix td { padding: 2px 3px; }
  .mx-person { position: static; min-width: 0; }
  table.matrix thead th { position: static; }
  td.mx-c { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .mx-na { background: #f3f3f3 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .doc-wide:has(.matrix) { max-width: none; }
}
td.mx-c { border-color: var(--border) !important; }
.doc-wide:has(.matrix) { max-width: none; }
.app .st { display: inline-block; white-space: nowrap; padding: 0 8px; border-radius: 999px; font-size: 12.5px; font-weight: 600; }
.app .st-pending-review, .app .st-draft { color: var(--accent-ink); background: var(--accent-soft); border: 1px solid var(--accent-line); }
.app .st-approved { color: var(--green); background: var(--green-soft); border: 1px solid var(--green-line); }
.app .st-obsolete { color: var(--red); border: 1px solid var(--red-line); }
/* bare account pages (sign-in, first password change) */
.bare .topbar .brand { min-width: 0; }
.bare-main { max-width: 480px; margin: 0 auto; padding: 56px 20px 32px; }
.bare-h1 { font-size: 2rem; font-weight: 750; letter-spacing: -.02em; margin: 0 0 8px; }
.bare .card-form { max-width: none; }
.link-btn { border: 0; background: none; padding: 0; font: inherit; color: var(--link); cursor: pointer; }
.link-btn:hover { text-decoration: underline; }

/* ======================================================================
   Theme C "Dashboard": deep navy-black, soft raised cards, red glow on the
   hero, the logo red as the accent for actions, progress and active links.
   Amber stays for warnings and "Pending review"; green stays for done.
   ====================================================================== */
:root { --brand: #c8102e; --brand-strong: #a50d26; --brand-ink: #b0102a; --brand-soft: #fdecee; --brand-line: #f5b5bf; }
[data-theme="dark"] {
  --bg: #0b0e14; --surface: #141923; --surface-2: #1a2030; --surface-3: #222a3a;
  --border: #1f2633; --border-strong: #2d3646;
  --text: #eef1f6; --text-2: #b8c0cd; --muted: #8b95a6;
  --steel-950: #0b0e14; --steel-900: #10141c; --steel-800: #1a2030; --steel-700: #eef1f6; --steel-600: #c9d0db; --steel-500: #6b7587;
  --steel-200: #2d3646; --steel-100: #1a2030; --steel-50: #121722;
  --link: #ff8f93; --link-hover: #ffb3b6;
  --brand: #e5484d; --brand-strong: #c93a3f; --brand-ink: #ff7a7f; --brand-soft: rgba(229, 72, 77, .14); --brand-line: rgba(229, 72, 77, .42);
  --why: #8fb8ee; --why-soft: #121d30; --why-line: #24344f;
  --shadow-sm: 0 1px 0 rgba(255,255,255,.03) inset;
  --shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 10px 30px -18px rgba(0,0,0,.85);
  --shadow-lg: 0 1px 0 rgba(255,255,255,.04) inset, 0 24px 60px -24px rgba(0,0,0,.9);
}
:focus-visible { outline-color: var(--brand-ink); }
/* header and brand */
.topbar { background: color-mix(in srgb, var(--bg) 88%, transparent); }
.brand { gap: 12px; }
.brand-logo { display: block; height: 40px; width: auto; }
.brand-text { padding-left: 12px; border-left: 1px solid var(--border-strong); }
.brand-text b { font-size: 14px; font-weight: 600; letter-spacing: .02em; color: var(--muted); }
/* actions */
.btn { border-radius: 10px; }
.btn-primary { background: var(--brand); border-color: var(--brand-strong); color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, 0 6px 18px -8px rgba(229,72,77,.7); }
.btn-primary:hover { background: var(--brand-strong); border-color: var(--brand-strong); color: #fff; }
.btn-ghost { background: var(--surface); border-color: var(--border-strong); }
.btn-ghost:hover { border-color: var(--brand-line); }
/* active links */
.side-link.is-active, [data-theme="dark"] .side-link.is-active { background: var(--brand-soft); color: var(--text); box-shadow: inset 2px 0 0 var(--brand); }
.side-link.is-active .side-num { color: var(--brand-ink); background: transparent; border-color: var(--brand-line); }
.toc li a.is-active, [data-theme="dark"] .toc li a.is-active { color: var(--brand-ink); border-left-color: var(--brand); }
.results li.is-active a, .rv-item.is-active { background: var(--brand-soft); border-color: var(--brand-line); }
.side-app .side-link .i { color: var(--brand-ink); }
/* hero: red glow on a navy card */
.hero { background: radial-gradient(900px 420px at 100% 0%, rgba(229, 72, 77, .20), transparent 60%),
    radial-gradient(700px 400px at -10% 120%, rgba(60, 80, 120, .30), transparent 60%), #121722;
  border: 1px solid #222a3a; color: #eef1f6; }
.hero-grid { opacity: .25; }
.hero .eyebrow, .hero h1 span { color: #ff7a7f; }
.hero .lede { color: #b8c0cd; }
.hero-stats dt { color: #8b95a6; }
.btn-on-dark { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.18); color: #eef1f6; }
/* raised cards */
.sec-card, .role-card, .hl-card, .page-card, .plan, .live-panel, .rv-item, .card-form { border-radius: 16px; box-shadow: var(--shadow); }
a.sec-card:hover { border-color: var(--brand-line); }
.sec-card-icon { background: var(--brand-soft); color: var(--brand-ink); border: 1px solid var(--brand-line); }
.hl-card::before { background: linear-gradient(90deg, var(--brand), var(--brand-strong)); }
.live-panel { background: var(--surface); border-color: var(--border); }
/* progress */
.bar { background: var(--surface-3); }
.bar-q { background: var(--brand); } .bar-p { background: var(--brand); opacity: .38; }
.home-progress { padding: 26px 28px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow); }
.home-progress .block-head { margin-bottom: 14px; }
.home-progress .block-head h2 { margin: 4px 0 4px; }
.home-progress .block-head p:not(.eyebrow) { margin: 0; color: var(--text-2); }
.home-progress .eyebrow { display: inline-flex; align-items: center; gap: 6px; color: var(--brand-ink); }
.home-progress .eyebrow svg { width: 15px; height: 15px; }
.hp-card .bar { height: 10px; max-width: 640px; }
.hp-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-top: 16px; }
.hp-next { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; color: var(--text); font-size: 15px; }
a.hp-next:hover { text-decoration: none; color: var(--brand-ink); }
.hp-lbl { width: 100%; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 760px) {
  .brand-logo { height: 32px; }
  .brand-text { display: none; }
  .home-progress { padding: 20px; }
  .hp-row .btn { width: 100%; }
}
@media print {
  .hero { background: none !important; border: 1px solid #bbb; color: #000; box-shadow: none; }
  .hero h1, .hero h1 span, .hero .lede, .hero .eyebrow, .hero-stats dd, .hero-stats dt { color: #000 !important; }
  .hero-grid, .hero-search, .hero-actions, .home-progress { display: none !important; }
  .sec-card, .role-card, .hl-card, .page-card, .plan, .card-form { box-shadow: none !important; }
  .bar-q { background: #000; } .bar-p { background: #777; }
}
.fld input:focus, .fld select:focus, .fld textarea:focus { outline: 3px solid color-mix(in srgb, var(--brand) 40%, transparent); border-color: var(--brand); }
@media screen { .doc-ctrl { grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); } .doc-ctrl .st { white-space: normal; } }
.role-toggles{display:flex;flex-wrap:wrap;gap:.4rem}
.role-toggle{display:inline-flex;align-items:center;gap:.3rem;padding:.2rem .6rem;border:1px solid var(--border);border-radius:999px;font-size:.85rem;cursor:pointer;color:var(--text)}
.role-toggle:has(input:checked){background:var(--green-soft);border-color:var(--green-line);color:var(--text)}
.ov-banner{display:flex;flex-wrap:wrap;align-items:center;gap:.6rem;margin:0 0 1rem;padding:.6rem .9rem;border:1px solid var(--border);border-radius:10px;background:var(--surface);color:var(--text)}
.ov-banner>span{flex:1;display:inline-flex;gap:.4rem;align-items:center}
.ov-banner.ov-late{border-color:var(--red-line);background:var(--red-soft)}
.upd-list,.ov-list{list-style:none;padding:0;margin:.5rem 0;display:grid;gap:.5rem}
.upd{display:flex;gap:1rem;align-items:flex-start;justify-content:space-between;padding:.7rem .9rem;border:1px solid var(--border);border-radius:10px}
.upd p{margin:.3rem 0 0;color:var(--muted)}
.upd-late{border-color:var(--red-line)}
.ov-kind{font-size:.75rem;padding:.05rem .45rem;border-radius:6px;background:var(--red-soft);border:1px solid var(--red-line)}
.sort-btn{background:none;border:0;color:inherit;font:inherit;font-weight:600;cursor:pointer;padding:0}
table.prog td,table.prog th{padding:.45rem .6rem;text-align:left;vertical-align:top}
table.prog small{display:block;color:var(--muted)}
.pct{font-weight:700}
@media print {
  .callout, .callout * { color: #000 !important; }
  .callout { background: #fff !important; border: 2px solid #000 !important; }
  .callout-warning { border-left: 8px solid #000 !important; }
  .ov-banner, .lp-roles, [data-live-doc] { display: none !important; }
  body { font-size: 12pt; }
}
/* Step screenshots and photos: never wider than the step card, click to enlarge. */
.layout > *, main, .doc, .doc li, .doc figure { min-width: 0; }
.doc figure { margin: .6rem 0; max-width: 100%; }
.doc figure figcaption { font-size: .85em; color: var(--muted); margin-top: .3rem; }
.doc img[src^="/media/"], .step-media img { display: block; max-width: 100% !important; width: auto; height: auto; border: 1px solid var(--border); border-radius: 8px; cursor: zoom-in; }
.lightbox { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 2vh 2vw; background: rgba(0,0,0,.82); cursor: zoom-out; }
.lightbox img { max-width: 96vw; max-height: 92vh; width: auto; height: auto; border-radius: 6px; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.lightbox p { position: absolute; bottom: 1.5vh; left: 0; right: 0; text-align: center; color: #eee; margin: 0; font-size: 14px; }
@media print { .doc img[src^="/media/"] { max-width: 100% !important; max-height: 9cm; width: auto; border: 1px solid #000; break-inside: avoid; } .lightbox { display: none !important; } }
.step-media{display:flex;flex-wrap:wrap;gap:.6rem;align-items:flex-start;margin:.5rem 0 .25rem}
.step-media .sm-item{margin:0;max-width:320px}
.step-media img,.step-media video{max-width:100%;max-height:240px;border-radius:6px;border:1px solid var(--line,#ccc);display:block}
.step-media figcaption{font-size:.85em;opacity:.8}
@media print{.step-media button{display:none}}
.rv-roles{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 18px}
.rv-chip{display:inline-flex;align-items:center;gap:6px;padding:5px 12px;border:1px solid var(--border);border-radius:999px;font-size:13.5px;color:var(--text);text-decoration:none}
.rv-chip:hover{border-color:var(--border-strong);text-decoration:none}
.rv-chip.is-active{background:var(--accent);border-color:var(--accent);color:#1a1a1a;font-weight:600}
.rv-chip.is-active .pill{background:rgba(0,0,0,.15);color:#1a1a1a}
@media print{.rv-roles{display:none}}

/* ---------------------------------------------------------------- site editor */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.modal.editor { width: min(1400px, calc(100vw - 24px)); max-height: calc(100vh - 24px); }
.ed-box { padding: 18px 20px 16px; display: flex; flex-direction: column; gap: 10px; max-height: calc(100vh - 24px); box-sizing: border-box; }
.ed-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 18px; }
.ed-head .modal-title { margin: 0; }
.ed-locked { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; font-size: 12.5px; color: var(--muted); }
.ed-locked div { display: flex; gap: 5px; } .ed-locked dt { font-weight: 600; } .ed-locked dd { margin: 0; color: var(--text); }
.ed-fields { display: grid; grid-template-columns: 2fr 1fr; gap: 0 12px; }
.ed-fields .fld { margin: 0 0 4px; } .ed-fields .ed-wide { grid-column: 1 / -1; }
.ed-tabs { display: none; gap: 4px; }
.ed-tabs button { flex: 1; padding: 7px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); border-radius: 8px; font: inherit; font-weight: 600; }
.ed-tabs button[aria-selected="true"] { background: var(--accent-soft); border-color: var(--accent); }
.ed-panes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; min-height: 0; height: min(56vh, 640px); }
.ed-pane { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.ed-write textarea { flex: 1; width: 100%; height: 100%; min-height: 0; box-sizing: border-box; resize: none; padding: 12px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font-family: var(--mono); font-size: 13px; line-height: 1.55; }
.ed-preview { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); overflow: auto; }
.ed-changes .diff { flex: 1; max-height: none; margin: 0; }
.ed-preview-head { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; gap: 10px; padding: 6px 12px; font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--border); }
.ed-scan { color: var(--red); }
.ed-preview .prose { padding: 4px 16px 16px; }
.ed-pv-title { font-size: 1.5rem; margin: 12px 0 8px; }
.ed-changes { display: none; }
.ed-panes[data-show="changes"] { grid-template-columns: 1fr; }
.ed-panes[data-show="changes"] .ed-write, .ed-panes[data-show="changes"] .ed-preview { display: none; }
.ed-panes[data-show="changes"] .ed-changes { display: flex; }
.ed-tabs { display: flex; }
@media (max-width: 900px) {
  .ed-fields { grid-template-columns: 1fr; }
  .ed-panes { grid-template-columns: 1fr; }
  .ed-panes[data-show="write"] .ed-preview, .ed-panes[data-show="preview"] .ed-write { display: none; }
  .ed-box { overflow: auto; }
  .ed-panes { height: 62vh; flex-shrink: 0; }
  .ed-locked { font-size: 12px; }
}
.vh-grid { display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: 14px; min-height: 0; }
.vh-list { list-style: none; margin: 0; padding: 0; overflow: auto; max-height: 64vh; display: flex; flex-direction: column; gap: 6px; }
.vh-item { width: 100%; text-align: left; display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
.vh-item.is-active { border-color: var(--accent); background: var(--accent-soft); }
.vh-detail { min-width: 0; }
@media (max-width: 800px) { .vh-grid { grid-template-columns: 1fr; } }
