:root {
  --ink: #0a1020;
  --ink-soft: #536078;
  --night: #050914;
  --surface: #f4f7fb;
  --panel: #ffffff;
  --line: #d8e0ec;
  --accent: #0078d4;
  --accent-2: #4cc2ff;
  --lime: #a8ff2f;
  --display: Bahnschrift, "Segoe UI Variable Display", "Segoe UI", Arial, sans-serif;
  --sans: "Segoe UI Variable Text", "Segoe UI", Arial, sans-serif;
  --mono: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { min-width: 320px; margin: 0; color: var(--ink); background: var(--surface); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
.skip-link { position: fixed; z-index: 100; top: 0.5rem; left: 0.5rem; padding: 0.7rem 1rem; color: #fff; background: var(--accent); transform: translateY(-180%); }
.skip-link:focus { transform: translateY(0); }

.article-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0 clamp(1.25rem, 4vw, 4rem);
  background: rgba(5, 9, 20, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px);
}
.brand { display: inline-flex; width: 182px; }
.brand img { display: block; width: 100%; height: auto; }
.languages { display: flex; gap: 0.15rem; padding: 3px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 6px; }
.languages a { display: grid; min-width: 38px; min-height: 34px; place-items: center; border-radius: 3px; opacity: 0.78; transition: opacity 150ms ease, background 150ms ease, transform 150ms ease; }
.languages a:hover { opacity: 1; transform: translateY(-1px); }
.languages a[aria-current="page"] { background: rgba(255, 255, 255, 0.12); opacity: 1; box-shadow: 0 6px 18px rgba(0, 120, 212, 0.34); }
.flag { display: block; width: 23px; height: 15px; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.28); border-radius: 2px; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.22); }
.flag-it { background: linear-gradient(90deg, #009246 0 33.333%, #fff 33.333% 66.666%, #ce2b37 66.666%); }
.flag-de { background: linear-gradient(#151515 0 33.333%, #dd0000 33.333% 66.666%, #ffce00 66.666%); }
.flag-gb { background: #012169 url("/brand/flag-gb.svg") center / cover no-repeat; }

.article-hero {
  color: #fff;
  background:
    radial-gradient(circle at 78% 22%, rgba(0, 120, 212, 0.38), transparent 29%),
    radial-gradient(circle at 88% 76%, rgba(76, 194, 255, 0.16), transparent 25%),
    linear-gradient(rgba(83, 118, 169, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(83, 118, 169, 0.12) 1px, transparent 1px),
    var(--night);
  background-size: auto, auto, 70px 70px, 70px 70px, auto;
}
.hero-shell { width: min(1360px, 100%); margin: 0 auto; padding: clamp(2.75rem, 5.5vw, 5.25rem) clamp(1.25rem, 5vw, 5rem); }
.back-link { display: inline-flex; align-items: center; gap: 0.55rem; margin-bottom: 2.25rem; color: rgba(255, 255, 255, 0.65); font-size: 0.76rem; font-weight: 750; }
.back-link:hover { color: #fff; }
.eyebrow { margin: 0 0 1rem; color: var(--accent-2); font-family: var(--mono); font-size: 0.68rem; font-weight: 800; letter-spacing: 0.13em; text-transform: uppercase; }
.article-hero h1 { max-width: 1080px; margin: 0; font-family: var(--display); font-size: clamp(3.3rem, 7vw, 6.8rem); font-weight: 620; letter-spacing: -0.07em; line-height: 0.9; }
.hero-copy { max-width: 850px; margin: 2rem 0 0; color: rgba(255, 255, 255, 0.72); font-size: clamp(1rem, 1.5vw, 1.25rem); line-height: 1.65; }

.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: clamp(1.25rem, 2vw, 2rem); width: min(1560px, 100%); margin: 0 auto; padding: clamp(3.5rem, 7vw, 7rem) clamp(1.25rem, 4vw, 4rem); }
.article-body { min-width: 0; }

.article-section { scroll-margin-top: 105px; padding: 0 0 5rem; }
.article-section + .article-section { padding-top: 1rem; border-top: 1px solid var(--line); }
.section-kicker { display: block; margin-bottom: 0.75rem; color: var(--accent); font-family: var(--mono); font-size: 0.62rem; font-weight: 800; letter-spacing: 0.11em; text-transform: uppercase; }
.article-section h2 { max-width: 940px; margin: 0 0 1.3rem; font-family: var(--display); font-size: clamp(2.15rem, 3.6vw, 3.85rem); font-weight: 620; letter-spacing: -0.052em; line-height: 0.98; }
.article-section > p { max-width: 80ch; color: var(--ink-soft); font-size: 1rem; line-height: 1.75; }
.path-card { margin: 1.45rem 0; padding: 1rem 1.15rem; background: linear-gradient(120deg, #eef7ff, #fff); border: 1px solid #b9daf4; border-left: 4px solid var(--accent); border-radius: 8px; }
.path-label { display: block; margin-bottom: 0.45rem; color: var(--accent); font-family: var(--mono); font-size: 0.58rem; font-weight: 800; letter-spacing: 0.09em; text-transform: uppercase; }
.path-card p { margin: 0; color: #20324f; font-weight: 720; line-height: 1.55; }
.action-list { display: grid; gap: 0.7rem; margin: 1.4rem 0 0; padding: 0; list-style: none; counter-reset: action; }
.action-list li { position: relative; min-height: 3rem; padding: 0.8rem 1rem 0.8rem 3.7rem; color: var(--ink-soft); background: #fff; border: 1px solid var(--line); border-radius: 8px; line-height: 1.58; counter-increment: action; }
.action-list li::before { content: counter(action, decimal-leading-zero); position: absolute; top: 0.78rem; left: 0.85rem; display: grid; width: 2rem; height: 2rem; place-items: center; color: #fff; background: var(--accent); border-radius: 50%; font: 800 0.62rem/1 var(--mono); }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.85rem; margin-top: 1.25rem; }
.detail-card { padding: 1.15rem; background: #fff; border: 1px solid var(--line); border-radius: 9px; }
.detail-card h3 { margin: 0 0 0.5rem; font-family: var(--display); font-size: 1.25rem; letter-spacing: -0.025em; }
.detail-card p { margin: 0; color: var(--ink-soft); line-height: 1.62; }
.plain-note { margin-top: 1.2rem; padding: 1rem 1.1rem; color: #334664; background: #edf3fa; border-radius: 8px; line-height: 1.62; }
.plain-note strong { color: var(--ink); }
.article-source { display: inline-flex; align-items: center; gap: 0.7rem; margin-top: 1.35rem; padding: 0.75rem 0.9rem; color: var(--accent); background: #fff; border: 1px solid #b9d8ef; border-radius: 6px; font-size: 0.78rem; font-weight: 800; }
.article-source::after { content: "↗"; }
.article-source:hover { border-color: var(--accent); box-shadow: 0 10px 24px rgba(0, 120, 212, 0.1); }
.evidence-figure { margin: 1.55rem 0 0; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 18px 45px rgba(28, 44, 75, 0.08); }
.evidence-figure a { display: block; }
.evidence-figure img { display: block; width: 100%; height: auto; }
.evidence-figure figcaption { padding: 0.8rem 1rem; color: var(--ink-soft); border-top: 1px solid var(--line); font-size: 0.74rem; line-height: 1.5; }
.evidence-figure figcaption a { display: inline; color: var(--accent); font-weight: 700; }

.step-list { display: grid; gap: 1rem; margin-top: 1.7rem; }
.step { position: relative; padding: 1.5rem 1.5rem 1.5rem 4.6rem; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 14px 35px rgba(28, 44, 75, 0.05); }
.step-number { position: absolute; top: 1.45rem; left: 1.35rem; display: grid; width: 2.25rem; height: 2.25rem; place-items: center; color: #fff; background: var(--accent); border-radius: 50%; font-family: var(--mono); font-size: 0.7rem; font-weight: 800; }
.step h3 { margin: 0 0 0.65rem; font-family: var(--display); font-size: 1.5rem; font-weight: 650; letter-spacing: -0.035em; }
.step p { margin: 0; color: var(--ink-soft); line-height: 1.65; }
.step ul, .check-list { margin: 1rem 0 0; padding-left: 1.1rem; color: var(--ink-soft); line-height: 1.7; }
.step li + li, .check-list li + li { margin-top: 0.45rem; }
.command { margin: 1rem 0 0; padding: 1rem; overflow-x: auto; color: #dce9ff; background: #071426; border: 1px solid #173456; border-radius: 7px; font: 0.76rem/1.6 var(--mono); white-space: pre; }
.command-label { display: block; margin-top: 1.2rem; color: var(--accent); font-family: var(--mono); font-size: 0.56rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }

.toc { position: sticky; top: 96px; align-self: start; max-height: calc(100dvh - 116px); padding: 1.25rem; overflow-y: auto; background: #fff; border: 1px solid var(--line); border-radius: 10px; scrollbar-gutter: stable; }
.toc strong { display: block; margin-bottom: 0.9rem; font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; }
.toc nav { display: grid; gap: 0.2rem; }
.toc a { padding: 0.55rem 0.65rem; overflow-wrap: anywhere; color: var(--ink-soft); border-left: 2px solid transparent; font-size: 0.76rem; line-height: 1.35; }
.toc a:hover { color: var(--accent); background: #f4f8fd; border-left-color: var(--accent); }
.toc a[aria-current="location"] { color: var(--accent); background: #eaf5fd; border-left-color: var(--accent); font-weight: 800; }
.toc a:focus-visible, .article-source:focus-visible { outline: 3px solid rgba(0, 120, 212, 0.35); outline-offset: 2px; }

.reference-list { display: grid; gap: 0.7rem; margin-top: 1.5rem; }
.reference-list a { display: flex; justify-content: space-between; gap: 1.5rem; padding: 1rem 1.1rem; color: var(--accent); background: #fff; border: 1px solid var(--line); border-radius: 8px; font-weight: 750; line-height: 1.45; }
.reference-list a::after { content: "↗"; flex: 0 0 auto; }
.reference-list a:hover { border-color: var(--accent); box-shadow: 0 12px 28px rgba(0, 120, 212, 0.09); }
.article-cta { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 0.45fr); gap: 2rem; align-items: center; padding: clamp(3rem, 6vw, 5rem); color: #fff; background: linear-gradient(120deg, #061121, #0a2d58); border-top: 3px solid var(--accent); }
.article-cta h2 { margin: 0; font-family: var(--display); font-size: clamp(2.5rem, 5vw, 5rem); font-weight: 620; letter-spacing: -0.06em; line-height: 0.95; }
.article-cta p { margin: 1rem 0 0; color: rgba(255, 255, 255, 0.66); line-height: 1.6; }
.article-cta a { display: flex; justify-content: space-between; gap: 1.5rem; padding: 1rem 1.15rem; color: var(--ink); background: var(--lime); border-radius: 5px; font-weight: 800; }
.article-footer { display: flex; justify-content: space-between; gap: 1.5rem; padding: 1.15rem clamp(1.25rem, 5vw, 5rem); color: rgba(255, 255, 255, 0.44); background: var(--night); border-top: 1px solid rgba(255, 255, 255, 0.1); font-family: var(--mono); font-size: 0.58rem; }

@media (max-width: 1119px) {
  .article-layout { grid-template-columns: 1fr; }
  .toc { position: static; order: -1; max-height: none; overflow: visible; }

  .article-cta { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .article-header { min-height: 68px; padding: 0 1rem; }
  .brand { width: 145px; }
  .languages a { min-width: 29px; }
  .article-hero h1 { font-size: clamp(3rem, 15vw, 5.1rem); }
  .detail-grid { grid-template-columns: 1fr; }
  .step { padding: 4.4rem 1.2rem 1.25rem; }
  .step-number { top: 1.2rem; left: 1.2rem; }
  .article-footer { flex-direction: column; gap: 0.4rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* Shared SOP response layer
   Markup remains usable without JavaScript. Interactive enhancements use
   data attributes documented in article.sop-replacement.js. */
:root {
  --success: #087a55;
  --success-soft: #e8f8f1;
  --warning: #a65f00;
  --warning-soft: #fff6df;
  --danger: #b42318;
  --danger-soft: #fff0ee;
  --focus: #ffbf47;
  --panel-muted: #eef3f9;
  --shadow-sm: 0 8px 24px rgba(28, 44, 75, 0.08);
  --shadow-md: 0 18px 45px rgba(28, 44, 75, 0.11);
  --header-height: 76px;
}

html {
  scroll-padding-top: calc(var(--header-height) + 1.5rem);
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
summary,
a,
label {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

:where(a, button, input, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  min-height: 44px;
  border-radius: 6px;
}

.languages a {
  min-width: 44px;
  min-height: 44px;
  touch-action: manipulation;
}

.back-link,
.article-source,
.article-cta a,
.reference-list a {
  min-height: 44px;
}

.article-section,
.phase-card,
.sop-phase {
  scroll-margin-top: calc(var(--header-height) + 1.5rem);
}

/* Procedure utilities */
.sop-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  margin: 0 0 1.4rem;
  padding: 0.7rem;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
}

.sop-toolbar button,
.sop-toolbar a,
.sop-tool-button,
[data-action="print"],
[data-action="copy-url"],
[data-action="copy-page-url"],
[data-action="copy-checklist"],
[data-action="reset-checklist"],
[data-action="copy-evidence"],
[data-sop-action] {
  display: inline-flex;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.7rem 0.9rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid #cbd6e4;
  border-radius: 7px;
  font-weight: 750;
  line-height: 1.15;
  cursor: pointer;
  touch-action: manipulation;
}

.sop-toolbar button:hover,
.sop-toolbar a:hover,
.sop-tool-button:hover,
[data-sop-action]:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: #f4f9fd;
}

.sop-status,
[data-sop-status] {
  min-height: 1.2rem;
  margin-inline-start: auto;
  color: var(--success);
  font-size: 0.76rem;
  font-weight: 750;
}

.sop-status[data-state="error"],
[data-sop-status][data-state="error"] {
  color: var(--danger);
}

/* First response and checklist patterns */
.quick-response,
.first-ten-minutes,
.sop-priority {
  position: relative;
  margin: 0 0 clamp(2.5rem, 5vw, 4.5rem);
  padding: clamp(1.35rem, 3vw, 2.25rem);
  overflow: hidden;
  background:
    radial-gradient(circle at 100% 0, rgba(76, 194, 255, 0.15), transparent 34%),
    #fff;
  border: 1px solid #b9d8ef;
  border-top: 5px solid var(--accent);
  border-radius: 13px;
  box-shadow: var(--shadow-md);
}

.quick-response::after,
.first-ten-minutes::after,
.sop-priority::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  pointer-events: none;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--lime));
}

.quick-response .section-kicker,
.first-ten-minutes .section-kicker {
  margin-bottom: 0.55rem;
}

.quick-response h2,
.first-ten-minutes h2,
.sop-priority h2 {
  max-width: 820px;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2rem, 4vw, 3.35rem);
  font-weight: 650;
  letter-spacing: -0.045em;
  line-height: 1;
}

.quick-response > p,
.first-ten-minutes > p,
.sop-priority > p {
  max-width: 780px;
  margin: 0.9rem 0 0;
  color: var(--ink-soft);
  line-height: 1.65;
}

.checklist-head,
.quick-response-header,
.phase-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
}

.checklist-progress,
[data-checklist-progress] {
  flex: 0 0 auto;
  padding: 0.45rem 0.65rem;
  color: var(--accent);
  background: #edf7ff;
  border: 1px solid #b9daf4;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 800;
}

.task-checklist,
.closure-checklist,
[data-checklist] ol {
  display: grid;
  gap: 0.6rem;
  margin: 1.35rem 0 0;
  padding: 0;
  list-style: none;
}

.task-checklist li,
.closure-checklist li {
  min-width: 0;
}

.task-checklist label,
.closure-checklist label,
.check-task {
  display: grid;
  grid-template-columns: 1.55rem minmax(0, 1fr);
  gap: 0.85rem;
  min-height: 56px;
  align-items: start;
  padding: 0.85rem 1rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.task-checklist label:hover,
.closure-checklist label:hover,
.check-task:hover {
  border-color: #9dc9ea;
  box-shadow: 0 8px 18px rgba(0, 120, 212, 0.07);
}

.task-checklist input[type="checkbox"],
.closure-checklist input[type="checkbox"],
.check-task input[type="checkbox"] {
  width: 1.4rem;
  height: 1.4rem;
  margin: 0.05rem 0 0;
  accent-color: var(--success);
  cursor: pointer;
}

.task-checklist label > span,
.closure-checklist label > span,
.check-task > span {
  min-width: 0;
  line-height: 1.48;
}

.task-checklist strong,
.closure-checklist strong,
.check-task strong {
  display: block;
  color: var(--ink);
  font-size: 0.94rem;
}

.task-checklist small,
.closure-checklist small,
.check-task small {
  display: block;
  margin-top: 0.2rem;
  color: var(--ink-soft);
  font-size: 0.82rem;
  line-height: 1.5;
}

.task-checklist li.is-complete label,
.closure-checklist li.is-complete label,
.check-task.is-complete {
  background: var(--success-soft);
  border-color: #a7dfca;
}

.task-checklist li.is-complete strong,
.closure-checklist li.is-complete strong,
.check-task.is-complete strong {
  color: #315a4b;
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

/* Phase and task cards */
.phase-card,
.sop-phase {
  position: relative;
  margin: 0 0 1.25rem;
  padding: clamp(1.25rem, 2.5vw, 2rem);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.phase-index,
.phase-label,
.task-label {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.phase-card h2,
.sop-phase h2 {
  margin: 0.55rem 0 0;
  font-family: var(--display);
  font-size: clamp(2rem, 3.5vw, 3.5rem);
  font-weight: 650;
  letter-spacing: -0.05em;
  line-height: 1;
}

.phase-goal,
.sop-goal,
.goal-line {
  margin: 0.9rem 0 0;
  padding: 0.85rem 1rem;
  color: #24415f;
  background: #eff7fd;
  border-left: 4px solid var(--accent);
  border-radius: 0 7px 7px 0;
  font-weight: 650;
  line-height: 1.55;
}

.task-grid,
.phase-task-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 1.2rem;
}

.task-card,
.sop-task,
.phase-task {
  min-width: 0;
  padding: 1.15rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.task-card h3,
.sop-task h3,
.phase-task h3 {
  margin: 0.4rem 0 0.55rem;
  font-family: var(--display);
  font-size: 1.32rem;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.task-card p,
.sop-task p,
.phase-task p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.6;
}

.task-card ul,
.task-card ol,
.sop-task ul,
.sop-task ol,
.phase-task ul,
.phase-task ol {
  margin: 0.85rem 0 0;
  padding-left: 1.2rem;
  color: var(--ink-soft);
  line-height: 1.65;
}

.task-card li + li,
.sop-task li + li,
.phase-task li + li {
  margin-top: 0.4rem;
}

/* Decisions, warnings, evidence, owners, and completion */
.alert,
.sop-alert,
.stop-rule,
.decision-card,
.completion-card,
.complete-when,
.evidence-card,
.owner-card {
  margin: 1rem 0;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-left-width: 5px;
  border-radius: 8px;
  line-height: 1.6;
}

.alert-title,
.stop-rule h3,
.decision-card h3,
.completion-card h3,
.complete-when h3,
.evidence-card h3,
.owner-card h3 {
  margin: 0 0 0.35rem;
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 750;
  letter-spacing: -0.015em;
}

.alert p,
.sop-alert p,
.stop-rule p,
.decision-card p,
.completion-card p,
.complete-when p,
.evidence-card p,
.owner-card p {
  margin: 0;
}

.alert-warning,
.sop-alert.warning,
.decision-card {
  color: #624413;
  background: var(--warning-soft);
  border-color: #e8c26f;
  border-left-color: var(--warning);
}

.alert-danger,
.sop-alert.danger,
.stop-rule {
  color: #67241f;
  background: var(--danger-soft);
  border-color: #efb4ae;
  border-left-color: var(--danger);
}

.alert-success,
.sop-alert.success,
.completion-card,
.complete-when {
  color: #205a47;
  background: var(--success-soft);
  border-color: #a7dfca;
  border-left-color: var(--success);
}

.evidence-card,
.owner-card {
  color: #283b58;
  background: #f6f9fd;
  border-left-color: var(--accent);
}

.decision-list,
.evidence-fields,
.owner-list {
  display: grid;
  gap: 0.45rem;
  margin: 0.75rem 0 0;
  padding-left: 1.15rem;
}

.owner-grid,
.evidence-grid,
.closure-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 1rem;
}

.evidence-template,
[data-evidence-template] {
  margin: 0.9rem 0 0;
  padding: 1rem;
  overflow-x: auto;
  color: #dce9ff;
  background: #071426;
  border: 1px solid #173456;
  border-radius: 7px;
  font: 0.76rem/1.65 var(--mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* Native disclosures keep detailed material available without overwhelming the action path. */
.sop-disclosure,
.article-disclosure,
details.supporting-detail {
  margin: 1rem 0;
  overflow: clip;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.sop-disclosure summary,
.article-disclosure summary,
details.supporting-detail summary {
  position: relative;
  display: flex;
  min-height: 52px;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 3.1rem 0.8rem 1rem;
  color: var(--ink);
  font-weight: 750;
  line-height: 1.35;
  cursor: pointer;
  list-style: none;
  touch-action: manipulation;
}

.sop-disclosure summary::-webkit-details-marker,
.article-disclosure summary::-webkit-details-marker,
details.supporting-detail summary::-webkit-details-marker {
  display: none;
}

.sop-disclosure summary::after,
.article-disclosure summary::after,
details.supporting-detail summary::after {
  content: "";
  position: absolute;
  right: 1.15rem;
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 150ms ease;
}

.sop-disclosure[open] summary,
.article-disclosure[open] summary,
details.supporting-detail[open] summary {
  color: var(--accent);
  background: #f4f9fd;
  border-bottom: 1px solid var(--line);
}

.sop-disclosure[open] summary::after,
.article-disclosure[open] summary::after,
details.supporting-detail[open] summary::after {
  transform: rotate(225deg) translate(-2px, -2px);
}

.disclosure-body,
.sop-disclosure > :not(summary),
.article-disclosure > :not(summary),
details.supporting-detail > :not(summary) {
  padding-inline: 1rem;
}

.sop-disclosure > :last-child,
.article-disclosure > :last-child,
details.supporting-detail > :last-child {
  padding-bottom: 1rem;
}

/* Licensing and least-privilege prerequisites */
.prerequisites-section {
  background:
    radial-gradient(circle at 100% 0, rgba(76, 194, 255, 0.11), transparent 34%),
    linear-gradient(145deg, #ffffff, #f7fbff);
  border-color: #bfd9ee;
}

.matrix-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 1rem;
  margin: 1.2rem 0;
}

.matrix-intro p { margin: 0; color: var(--ink-soft); line-height: 1.65; }

.matrix-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
}

.capability-status {
  display: inline-flex;
  min-height: 1.65rem;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.55rem;
  color: #15324d;
  background: #edf3fa;
  border: 1px solid #c9d7e6;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.57rem;
  font-weight: 850;
  letter-spacing: 0.045em;
  line-height: 1.1;
  text-transform: uppercase;
  white-space: nowrap;
}

.capability-status::before {
  content: "";
  width: 0.42rem;
  height: 0.42rem;
  flex: 0 0 auto;
  background: currentColor;
  border-radius: 50%;
}

.capability-status[data-state="available"] { color: #176548; background: #e8f8f1; border-color: #a7dfca; }
.capability-status[data-state="limited"] { color: #75500e; background: #fff6df; border-color: #e8c26f; }
.capability-status[data-state="addon"] { color: #71402f; background: #fff0ea; border-color: #efb9a7; }

.matrix-disclosure > .matrix-note,
.matrix-disclosure > .plain-note { margin-inline: 1rem; }

.license-matrix-wrap {
  margin: 0;
  padding: 0 !important;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-gutter: stable;
  border-bottom: 1px solid var(--line);
}

.license-matrix {
  width: 100%;
  min-width: 760px;
  border-collapse: separate;
  border-spacing: 0;
  color: var(--ink);
  background: #fff;
  font-size: 0.78rem;
  line-height: 1.5;
}

.license-matrix caption {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.license-matrix th,
.license-matrix td {
  padding: 0.82rem 0.9rem;
  vertical-align: top;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.license-matrix thead th {
  color: #334664;
  background: #edf4fb;
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 850;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.license-matrix tbody th { width: 29%; color: var(--ink); font-weight: 780; }
.license-matrix tbody tr:last-child > * { border-bottom: 0; }
.license-matrix tbody tr:hover > * { background: #f8fbfe; }

.license-matrix a,
.action-access a,
.diagnostic-callout a:not(.diagnostic-action) {
  color: var(--accent);
  font-weight: 750;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.action-access,
.action-access-callout {
  display: block;
  margin: 0.9rem 1rem 0;
  padding: 0.9rem 1rem;
  color: #334664;
  background: #f1f7fc;
  border: 1px solid #c9dceb;
  border-left: 4px solid var(--accent);
  border-radius: 7px;
  font-size: 0.76rem;
  line-height: 1.55;
}

.action-access > div {
  min-width: 0;
  padding: 0.48rem 0;
  border-bottom: 1px solid var(--line);
}

.action-access > div:last-child { border-bottom: 0; }
.action-access > strong,
.action-access-callout > strong { display: block; margin-bottom: 0.35rem; color: var(--ink); font-family: var(--display); font-size: 0.96rem; }
.action-access > p,
.action-access-callout > p { margin: 0.35rem 0; }
.action-access > a,
.action-access-callout > a { display: inline-block; margin-top: 0.35rem; color: var(--accent); font-weight: 750; text-decoration: underline; text-underline-offset: 0.18em; }

.action-access dt {
  margin: 0 0 0.3rem;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.55rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.action-access dd {
  margin: 0;
  color: #334664;
  font-size: 0.73rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.diagnostic-callout {
  position: relative;
  display: block;
  gap: 1.25rem;
  margin: 1.25rem 0;
  padding: clamp(1.15rem, 2.5vw, 1.6rem);
  overflow: hidden;
  color: #dce9ff;
  background:
    radial-gradient(circle at 100% 0, rgba(168, 255, 47, 0.18), transparent 38%),
    linear-gradient(135deg, #071426, #0e2d4f);
  border: 1px solid #24557b;
  border-radius: 11px;
  box-shadow: 0 18px 42px rgba(7, 20, 38, 0.16);
}

.diagnostic-callout h3 {
  margin: 0;
  color: #fff;
  font-family: var(--display);
  font-size: clamp(1.25rem, 2vw, 1.7rem);
  letter-spacing: -0.03em;
}

.diagnostic-callout p { margin: 0.55rem 0 0; color: #bed0e4; line-height: 1.6; }
.diagnostic-callout > :first-child { margin-top: 0; }
.diagnostic-callout > :last-child { margin-bottom: 0; }
.diagnostic-callout .diagnostic-meta { font-size: 0.73rem; }

.diagnostic-action {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1rem;
  color: #071426;
  background: linear-gradient(135deg, var(--lime), #70e8f1);
  border-radius: 7px;
  font-size: 0.78rem;
  font-weight: 850;
  text-align: center;
  box-shadow: 0 12px 28px rgba(76, 194, 255, 0.18);
}

.diagnostic-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 15px 32px rgba(76, 194, 255, 0.27);
}

/* Localized SOPs share one visual table system even when their semantic class names differ. */
#licensing-access {
  background:
    radial-gradient(circle at 100% 0, rgba(76, 194, 255, 0.11), transparent 34%),
    linear-gradient(145deg, #ffffff, #f7fbff);
  border-color: #bfd9ee;
}

:is(.matrix-legend, .license-legend, .table-key) {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 1rem 0;
}

:is(.capability-status, .license-status, .license-state, .license-matrix strong[data-state]) {
  display: inline-flex;
  min-height: 1.65rem;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.55rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.57rem;
  font-weight: 850;
  letter-spacing: 0.045em;
  line-height: 1.1;
  text-transform: uppercase;
  white-space: nowrap;
}

:is(.capability-status, .license-status, .license-state, .license-matrix strong[data-state])[data-state="available"] { color: #176548; background: #e8f8f1; }
:is(.capability-status, .license-status, .license-state, .license-matrix strong[data-state])[data-state="limited"] { color: #75500e; background: #fff6df; }
:is(.capability-status, .license-status, .license-state, .license-matrix strong[data-state])[data-state="addon"] { color: #71402f; background: #fff0ea; }

:is(.license-matrix-wrap, .sop-table-wrap, .table-scroll, .access-table-wrap) {
  margin: 1.1rem 0 1.4rem;
  padding: 0 !important;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-gutter: stable;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
}

:is(.license-matrix, .sop-table, .access-matrix, .access-table) {
  width: 100%;
  min-width: 760px;
  border-collapse: separate;
  border-spacing: 0;
  color: var(--ink);
  background: #fff;
  font-size: 0.76rem;
  line-height: 1.5;
}

:is(.license-matrix, .sop-table, .access-matrix, .access-table) caption {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.access-footnote {
  margin: -0.8rem 0 1.6rem;
  color: var(--ink-soft);
  font-size: 0.78rem;
  line-height: 1.55;
}

:is(.permission-table, .access-matrix, .access-table-wide) { min-width: 1080px; }

:is(.license-matrix, .sop-table, .access-matrix, .access-table) th,
:is(.license-matrix, .sop-table, .access-matrix, .access-table) td {
  padding: 0.82rem 0.9rem;
  vertical-align: top;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

:is(.license-matrix, .sop-table, .access-matrix, .access-table) thead th {
  color: #334664;
  background: #edf4fb;
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 850;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

:is(.license-matrix, .sop-table, .access-matrix, .access-table) tbody th { color: var(--ink); font-weight: 780; }
:is(.license-matrix, .sop-table, .access-matrix, .access-table) tbody tr:last-child > * { border-bottom: 0; }
:is(.license-matrix, .sop-table, .access-matrix, .access-table) tbody tr:hover > * { background: #f8fbfe; }
:is(.license-matrix, .sop-table, .access-matrix, .access-table) a { color: var(--accent); font-weight: 750; text-decoration: underline; text-underline-offset: 0.18em; }

/* Screenshots are supporting evidence, never the only instruction. */
.sop-screenshot,
.screenshot-figure {
  margin: 1.35rem 0 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  box-shadow: var(--shadow-md);
}

.sop-screenshot > a,
.screenshot-figure > a {
  display: block;
  min-height: 44px;
}

.sop-screenshot img,
.screenshot-figure img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--panel-muted);
}

.sop-screenshot figcaption,
.screenshot-figure figcaption {
  padding: 0.9rem 1rem;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
  line-height: 1.55;
}

.sop-screenshot figcaption a,
.screenshot-figure figcaption a {
  color: var(--accent);
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.screenshot-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1rem;
  margin-top: 0.35rem;
  color: #6c7890;
  font-family: var(--mono);
  font-size: 0.65rem;
}

/* Reusable SOP navigation
   Large pointer-driven screens get a quiet, luminous progress rail. Compact,
   touch and no-hover layouts retain the explicit disclosure navigation. */
.toc {
  --toc-progress-ratio: 0;
  position: sticky;
  z-index: 12;
  top: calc(var(--header-height) + 1.25rem);
  width: 44px;
  max-height: none;
  align-self: start;
  justify-self: end;
  padding: 0;
  overflow: visible;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  scrollbar-gutter: auto;
}

.toc-panel {
  position: relative;
  width: 44px;
  overflow: visible;
}

.toc-panel > strong,
.toc-label,
.toc-progress {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.toc nav,
.toc-steps {
  position: relative;
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc-steps::before,
.toc-steps::after {
  content: "";
  position: absolute;
  z-index: 0;
  top: 22px;
  right: 21px;
  bottom: 22px;
  width: 2px;
  border-radius: 999px;
  pointer-events: none;
}

.toc-steps::before {
  background: color-mix(in srgb, var(--ink-soft) 28%, transparent);
}

.toc-steps::after {
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  box-shadow: 0 0 13px color-mix(in srgb, var(--accent-2) 58%, transparent);
  transform: scaleY(var(--toc-progress-ratio));
  transform-origin: top;
  transition: transform 180ms ease;
}

.toc-steps li {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc a {
  position: relative;
  display: flex;
  width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--ink-soft);
  background: transparent;
  border: 0;
  border-radius: 50%;
}

.toc-dot {
  position: relative;
  z-index: 2;
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  background: #8190a5;
  border: 1px solid color-mix(in srgb, #8190a5 70%, #fff);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(129, 144, 165, 0.08);
  transition: width 160ms ease, height 160ms ease, background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.toc a[data-complete="true"] .toc-dot {
  background: var(--accent-2);
  border-color: color-mix(in srgb, var(--accent-2) 78%, #fff);
  box-shadow: 0 0 11px color-mix(in srgb, var(--accent-2) 38%, transparent);
}

.toc a[aria-current="location"] .toc-dot {
  width: 11px;
  height: 11px;
  flex-basis: 11px;
  background: var(--accent);
  border-color: #fff;
  box-shadow:
    0 0 0 5px color-mix(in srgb, var(--accent) 18%, transparent),
    0 0 20px color-mix(in srgb, var(--accent) 58%, transparent);
}

.toc-link-label {
  position: absolute;
  top: 50%;
  right: calc(100% + 12px);
  width: max-content;
  max-width: min(290px, calc(100vw - 7rem));
  padding: 0.68rem 0.8rem;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 36px rgba(20, 39, 68, 0.14);
  font-size: 0.76rem;
  font-weight: 750;
  line-height: 1.35;
  opacity: 0;
  overflow-wrap: anywhere;
  pointer-events: none;
  text-align: right;
  transform: translate(8px, -50%);
  transition: opacity 150ms ease, transform 180ms ease;
}

.toc-link-label::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 100%;
  width: 8px;
  height: 8px;
  background: inherit;
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  transform: translate(-4px, -50%) rotate(45deg);
}

.toc a:hover .toc-dot,
.toc a:focus-visible .toc-dot {
  width: 11px;
  height: 11px;
  flex-basis: 11px;
  background: var(--lime);
  border-color: #fff;
  box-shadow:
    0 0 0 6px color-mix(in srgb, var(--lime) 20%, transparent),
    0 0 24px color-mix(in srgb, var(--lime) 65%, transparent);
}

.toc a:hover .toc-link-label,
.toc a:focus-visible .toc-link-label {
  opacity: 1;
  transform: translate(0, -50%);
}

.toc a:hover,
.toc a[aria-current="location"] {
  color: var(--ink);
  background: transparent;
  border: 0;
}

.toc a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: -4px;
}

.toc-toggle,
[data-toc-toggle] {
  display: none;
  width: 100%;
  min-height: 52px;
  padding: 0.65rem 0.75rem;
  color: var(--ink);
  background: #fff;
  border: 0;
  border-radius: 7px;
  text-align: left;
  cursor: pointer;
}

.toc-toggle > span:first-child,
[data-toc-toggle] > span:first-child {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#toc-current {
  min-width: 0;
  overflow: hidden;
  font-size: 0.82rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toc-chevron {
  margin-inline-start: auto;
  color: var(--accent);
  font-size: 1.15rem;
  transition: transform 150ms ease;
}

.toc[data-open="true"] .toc-chevron {
  transform: rotate(180deg);
}

/* Compact layouts prioritize the current action and keep the full navigation
   one tap away. Coarse pointers never depend on hover labels. */
@media (max-width: 1119px), (hover: none), (pointer: coarse) {
  :root {
    --header-height: 76px;
  }

  .article-layout {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .toc:has([data-toc-toggle]),
  .toc:has(.toc-toggle) {
    position: sticky;
    z-index: 15;
    top: calc(var(--header-height) + 0.5rem);
    order: -1;
    width: 100%;
    max-height: calc(100dvh - var(--header-height) - 1rem);
    padding: 0.4rem;
    overflow: visible;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
  }

  .toc-toggle,
  [data-toc-toggle] {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 0.7rem;
  }

  .toc-toggle > span:first-child,
  [data-toc-toggle] > span:first-child {
    grid-column: 1 / -1;
  }

  #toc-current {
    grid-column: 1;
  }

  .toc-chevron {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
  }

  .toc-panel {
    position: static;
    width: auto;
    max-height: calc(100dvh - var(--header-height) - 5rem);
    margin-top: 0.4rem;
    padding: 0.55rem;
    overflow-y: auto;
    border-top: 1px solid var(--line);
    overscroll-behavior: contain;
  }

  .toc-panel[hidden] {
    display: none;
  }

  .toc-panel > strong {
    position: static;
    display: block;
    width: auto;
    height: auto;
    margin: 0.35rem 0 0.55rem;
    overflow: visible;
    clip: auto;
    white-space: normal;
    font-family: var(--mono);
    font-size: 0.62rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }

  .toc nav,
  .toc-steps {
    gap: 0.1rem;
  }

  .toc-steps::before,
  .toc-steps::after,
  .toc-dot {
    display: none;
  }

  .toc-steps li {
    display: block;
  }

  .toc a {
    width: auto;
    min-height: 44px;
    justify-content: flex-start;
    padding: 0.62rem 0.7rem;
    color: var(--ink-soft);
    border-left: 2px solid transparent;
    border-radius: 5px;
  }

  .toc a:hover,
  .toc a[aria-current="location"] {
    color: var(--accent);
    background: #eaf5fd;
    border-left: 2px solid var(--accent);
  }

  .toc-link-label {
    position: static;
    width: auto;
    max-width: none;
    padding: 0;
    color: inherit;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    font-size: 0.76rem;
    opacity: 1;
    pointer-events: auto;
    text-align: left;
    transform: none;
    transition: none;
  }

  .toc-link-label::after {
    display: none;
  }

  .toc-progress {
    position: static;
    display: block;
    width: auto;
    height: auto;
    margin: 0.7rem 0 0;
    overflow: visible;
    clip: auto;
    color: var(--ink-soft);
    font-family: var(--mono);
    font-size: 0.62rem;
    white-space: normal;
  }

  .task-grid,
  .phase-task-grid,
  .owner-grid,
  .evidence-grid,
  .closure-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  :root {
    --header-height: 68px;
  }

  html {
    scroll-padding-top: calc(var(--header-height) + 5.1rem);
  }

  .article-section,
  .phase-card,
  .sop-phase {
    scroll-margin-top: calc(var(--header-height) + 5.1rem);
  }

  .languages a {
    min-width: 44px;
  }

  .sop-toolbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 0.55rem;
  }

  .sop-toolbar button,
  .sop-toolbar a,
  .sop-tool-button {
    width: 100%;
  }

  .sop-status,
  [data-sop-status] {
    grid-column: 1 / -1;
    margin-inline-start: 0;
  }

  .checklist-head,
  .quick-response-header,
  .phase-header {
    align-items: start;
    flex-direction: column;
  }

  .quick-response,
  .first-ten-minutes,
  .sop-priority,
  .phase-card,
  .sop-phase {
    border-radius: 10px;
  }

  .task-checklist label,
  .closure-checklist label,
  .check-task {
    padding: 0.8rem;
  }

  .sop-disclosure summary,
  .article-disclosure summary,
  details.supporting-detail summary {
    padding-left: 0.85rem;
  }

  .sop-screenshot,
  .screenshot-figure {
    margin-inline: -0.25rem;
    border-radius: 8px;
  }

  .command {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }
}

/* The procedure must remain operable in high-contrast modes. */
@media (forced-colors: active) {
  .quick-response,
  .first-ten-minutes,
  .sop-priority,
  .phase-card,
  .sop-phase,
  .task-card,
  .sop-task,
  .phase-task,
  .task-checklist label,
  .closure-checklist label,
  .check-task,
  .alert,
  .sop-alert,
  .stop-rule,
  .decision-card,
  .completion-card,
  .complete-when {
    border: 1px solid CanvasText;
  }

  .task-checklist input[type="checkbox"],
  .closure-checklist input[type="checkbox"],
  .check-task input[type="checkbox"] {
    forced-color-adjust: auto;
  }

  .toc a[aria-current="location"] {
    border-left: 4px solid Highlight;
  }

  .toc-dot {
    border: 1px solid ButtonText;
  }

  .toc a[aria-current="location"] .toc-dot {
    background: Highlight;
    border-color: HighlightText;
  }
}

/* Low-ink emergency print/PDF version */
@media print {
  @page {
    size: auto;
    margin: 13mm;
  }

  * {
    box-shadow: none !important;
    text-shadow: none !important;
  }

  html,
  body {
    min-width: 0;
    color: #000;
    background: #fff;
    font: 10.5pt/1.45 Arial, sans-serif;
    print-color-adjust: economy;
    -webkit-print-color-adjust: economy;
  }

  .article-header,
  .back-link,
  .languages,
  .toc,
  .sop-toolbar,
  .article-cta,
  .article-footer,
  .sop-status,
  [data-sop-status],
  [data-action],
  [data-sop-action],
  .toc-toggle,
  [data-toc-toggle] {
    display: none !important;
  }

  .article-hero {
    color: #000;
    background: #fff;
    border-bottom: 2px solid #000;
  }

  .hero-shell {
    width: auto;
    padding: 0 0 7mm;
  }

  .eyebrow,
  .section-kicker,
  .phase-index,
  .phase-label,
  .task-label {
    color: #000;
  }

  .article-hero h1 {
    max-width: none;
    color: #000;
    font-size: 34pt;
    letter-spacing: -0.04em;
    line-height: 1;
  }

  .hero-copy {
    max-width: none;
    margin-top: 5mm;
    color: #222;
    font-size: 11pt;
  }

  .article-layout {
    display: block;
    width: auto;
    padding: 8mm 0 0;
  }

  .article-section,
  .phase-card,
  .sop-phase {
    padding-bottom: 9mm;
    scroll-margin: 0;
  }

  .article-section + .article-section {
    padding-top: 7mm;
    border-top-color: #777;
  }

  .article-section h2,
  .phase-card h2,
  .sop-phase h2 {
    font-size: 22pt;
    break-after: avoid-page;
  }

  .quick-response,
  .first-ten-minutes,
  .sop-priority,
  .phase-card,
  .sop-phase,
  .task-card,
  .sop-task,
  .phase-task,
  .path-card,
  .plain-note,
  .alert,
  .sop-alert,
  .stop-rule,
  .decision-card,
  .completion-card,
  .complete-when,
  .evidence-card,
  .owner-card {
    color: #000;
    background: #fff !important;
    border: 1px solid #777;
    break-inside: avoid;
  }

  .quick-response::after,
  .first-ten-minutes::after,
  .sop-priority::after {
    display: none;
  }

  .task-checklist label,
  .closure-checklist label,
  .check-task,
  .action-list li,
  .step,
  .detail-card {
    color: #000;
    background: #fff;
    border-color: #999;
    break-inside: avoid;
  }

  .task-checklist small,
  .closure-checklist small,
  .check-task small,
  .article-section > p,
  .task-card p,
  .sop-task p,
  .phase-task p,
  .step p,
  .detail-card p {
    color: #222;
  }

  .action-list li::before,
  .step-number {
    color: #000;
    background: #fff;
    border: 1px solid #000;
  }

  .sop-disclosure,
  .article-disclosure,
  details.supporting-detail {
    overflow: visible;
    border-color: #999;
    break-inside: auto;
  }

  .sop-disclosure > *,
  .article-disclosure > *,
  details.supporting-detail > * {
    display: block !important;
  }

  .sop-disclosure summary,
  .article-disclosure summary,
  details.supporting-detail summary {
    min-height: 0;
    padding: 3mm 0;
    color: #000;
    background: #fff;
    border-bottom: 1px solid #999;
  }

  .sop-disclosure summary::after,
  .article-disclosure summary::after,
  details.supporting-detail summary::after {
    display: none;
  }

  .command,
  .evidence-template,
  [data-evidence-template] {
    color: #000;
    background: #fff;
    border-color: #777;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    break-inside: avoid;
  }

  :is(.license-matrix-wrap, .sop-table-wrap, .table-scroll, .access-table-wrap) {
    overflow: visible;
    border-color: #777;
  }

  :is(.license-matrix, .sop-table, .access-matrix, .access-table) {
    min-width: 0;
    color: #000;
    background: #fff;
    font-size: 7.5pt;
  }

  :is(.license-matrix, .sop-table, .access-matrix, .access-table) th,
  :is(.license-matrix, .sop-table, .access-matrix, .access-table) td,
  .action-access > div {
    color: #000;
    background: #fff !important;
    border-color: #999;
  }

  .diagnostic-callout {
    grid-template-columns: 1fr;
    color: #000;
    background: #fff !important;
    border-color: #777;
    box-shadow: none;
    break-inside: avoid;
  }

  .diagnostic-callout h3,
  .diagnostic-callout p { color: #000; }

  .evidence-figure,
  .sop-screenshot,
  .screenshot-figure {
    max-width: 170mm;
    box-shadow: none;
    break-inside: avoid;
  }

  .evidence-figure img,
  .sop-screenshot img,
  .screenshot-figure img {
    filter: grayscale(100%);
  }

  a {
    color: #000;
    text-decoration: underline;
  }

  h2,
  h3,
  figure,
  pre {
    break-after: avoid-page;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .toc-chevron,
  .toc-steps::after,
  .toc-dot,
  .toc-link-label,
  .sop-disclosure summary::after,
  .article-disclosure summary::after,
  details.supporting-detail summary::after {
    transition: none;
  }
}

/* Compatibility with concise card titles used by the SOP page. */
.alert > strong,
.sop-alert > strong,
.stop-rule > strong,
.decision-card > strong,
.completion-card > strong,
.complete-when > strong,
.evidence-card > strong,
.owner-card > strong {
  display: block;
  margin: 0 0 0.35rem;
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 750;
  letter-spacing: -0.015em;
}

/* Keep long localized Microsoft reference titles inside narrow phone cards. */
.reference-list > li {
  min-width: 0;
  max-width: 100%;
}

.reference-list a {
  width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
}
@media (max-width: 620px) {
  .matrix-intro,
  .diagnostic-callout {
    grid-template-columns: 1fr;
  }

  :is(.matrix-legend, .license-legend, .table-key) { justify-content: flex-start; }
  :is(.license-matrix, .sop-table, .access-matrix, .access-table) { min-width: 680px; }
  :is(.permission-table, .access-matrix, .access-table-wide) { min-width: 960px; }
  :is(.license-matrix, .sop-table, .access-matrix, .access-table) th,
  :is(.license-matrix, .sop-table, .access-matrix, .access-table) td { padding: 0.72rem; }
  .action-access { grid-template-columns: 1fr; }
  .diagnostic-action { width: 100%; }

  .action-list > li {
    min-width: 0;
    max-width: 100%;
  }

  .article-hero h1,
  .article-body h2,
  .article-body h3,
  .article-body li,
  .article-body a,
  .article-body p,
  .article-body code {
    overflow-wrap: anywhere;
    hyphens: auto;
  }
}
