/* The Atlas look (optional): a printed anatomy atlas. Cool paper, petrol ink, artery red.
   System fonts only: Times New Roman for headings, Arial for text. The 3D viewers stay dark. */
[data-theme="atlas"] { --bg: #eef1ee; --bg-2: #f8faf8; --panel: #f8faf8; --line: #c2ccc8; --ink: #10262d; --muted: #53686d; --lamp: #b3202c; --danger: #b3202c; --petrol: #1c4a57; --artery: #b3202c; --sig-mechanical: #c26a00; --sig-fluid: #0f7f9e; --sig-electrical: #8f7600; --sig-chemical: #7448c9; --sig-gas: #44799c; --sig-thermal: #cf4526; --display: Arial, Helvetica, "Liberation Sans", sans-serif; --body: Arial, Helvetica, "Liberation Sans", sans-serif; --serif: "Times New Roman", Times, "Liberation Serif", serif; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--body); }
[data-theme="atlas"] a { color: var(--petrol); text-underline-offset: 3px; }
[data-theme="atlas"] a:hover { color: var(--artery); }
[data-theme="atlas"] :focus-visible { outline: 3px solid var(--artery); outline-offset: 2px; border-radius: 0; }
[data-theme="atlas"] h1, [data-theme="atlas"] h2, [data-theme="atlas"] h3, [data-theme="atlas"] h4 { font-family: var(--serif); font-weight: 700; line-height: 1.1; text-wrap: balance; }
[data-theme="atlas"] .stage-box, [data-theme="atlas"] .viewer-box { --bg: #0c242e; --bg-2: #113039; --panel: #143843; --line: #2b5562; --ink: #f1eadb; --muted: #9fb8bc; --lamp: #ffc163; --danger: #ff6b6b; --sig-mechanical: #ffb14a; --sig-fluid: #56d0e8; --sig-electrical: #fff06a; --sig-chemical: #c9a0ff; --sig-gas: #cfeaff; --sig-thermal: #ff7d5c; color: var(--ink); }
[data-theme="atlas"] .band { display: flex; align-items: center; gap: 12px 28px; padding: 12px clamp(16px, 4vw, 48px); background: var(--petrol); color: #fff; flex-wrap: wrap; }
[data-theme="atlas"] .mark { font: 700 26px/1 var(--serif); color: #fff; text-decoration: none; }
[data-theme="atlas"] .band nav { display: flex; gap: 6px 22px; flex-wrap: wrap; margin-right: auto; align-items: center; }
[data-theme="atlas"] .band nav a, [data-theme="atlas"] .band .jump-to { color: #d9e6e6; text-decoration: none; font-size: 15px; }
[data-theme="atlas"] .band nav a:hover, [data-theme="atlas"] .band .jump-to:hover { color: #fff; text-decoration: underline; }
[data-theme="atlas"] .find input { font: 15px var(--body); padding: 7px 12px; width: 210px; max-width: 100%; border: 1px solid #5f8792; background: #133c47; color: #fff; }
[data-theme="atlas"] .find input::placeholder { color: #a9c3c8; }
[data-theme="atlas"] .seg { display: inline-flex; border: 1px solid var(--ink); }
[data-theme="atlas"] .seg button { font-size: 14px; padding: 6px 12px; }
[data-theme="atlas"] .seg button + button { border-left: 1px solid var(--ink); }
[data-theme="atlas"] .seg [aria-checked="true"], [data-theme="atlas"] .seg [aria-pressed="true"] { background: var(--ink); color: #fff; }
[data-theme="atlas"] .band .seg, [data-theme="atlas"] .band .seg button + button { border-color: #5f8792; }
[data-theme="atlas"] .band .seg button { color: #d9e6e6; }
[data-theme="atlas"] .band .seg [aria-checked="true"] { background: #e9efee; color: var(--ink); }
[data-theme="atlas"] .sheet { max-width: 1320px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px); }
[data-theme="atlas"] .opening { padding: 40px 0 24px; max-width: 900px; }
[data-theme="atlas"] .opening h1 { font-size: clamp(32px, 4.6vw, 58px); letter-spacing: -.01em; }
[data-theme="atlas"] .lede { font-size: 19px; color: var(--muted); max-width: 62ch; margin: 16px 0 0; }
[data-theme="atlas"] .plate-tools { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
[data-theme="atlas"] .plate-wrap { position: relative; display: grid; grid-template-columns: 1fr minmax(300px, 500px) 1fr; gap: 0 56px; align-items: stretch; border-top: 3px double var(--ink); border-bottom: 1px solid var(--line); padding: 26px 0; }
[data-theme="atlas"] .plate { margin: 0; background: #0c242e; border: 1px solid var(--ink); display: flex; flex-direction: column; }
[data-theme="atlas"] .viewer-box { position: relative; height: min(76vh, 720px); min-height: 420px; background: radial-gradient(ellipse at 50% 42%, #1e5260 0, #0f2f3a 45%, #0c242e 78%); }
[data-theme="atlas"] .tip { position: absolute; transform: translate(-50%, -170%); background: #fff; color: #10262d; font: 700 15px var(--body); padding: 2px 9px; pointer-events: none; white-space: nowrap; z-index: 2; }
[data-theme="atlas"] .plate figcaption { color: #a9c3c8; font-size: 13px; padding: 9px 12px; border-top: 1px solid #2b5562; }
[data-theme="atlas"] .callouts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 6px; }
[data-theme="atlas"] .callouts.left { text-align: right; }
[data-theme="atlas"] .callouts a { display: block; text-decoration: none; color: var(--ink); padding: 6px 0; }
[data-theme="atlas"] .callouts b { display: block; font: 700 21px/1.2 var(--serif); }
[data-theme="atlas"] .callouts span { font-size: 14px; color: var(--muted); }
[data-theme="atlas"] .callouts a:hover b, [data-theme="atlas"] .callouts a.hot b { color: var(--artery); text-decoration: underline; }
[data-theme="atlas"] .leaders { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
[data-theme="atlas"] .leaders polyline { fill: none; stroke: #7d9197; stroke-width: 1; }
[data-theme="atlas"] .leaders circle { fill: #fff; stroke: var(--artery); stroke-width: 2; }
[data-theme="atlas"] .leaders .hot polyline { stroke: var(--artery); stroke-width: 2; }
[data-theme="atlas"] .index { padding: 44px 0 50px; }
[data-theme="atlas"] .index h2, [data-theme="atlas"] .sect h2 { font-size: 34px; }
[data-theme="atlas"] .note { color: var(--muted); max-width: 70ch; margin: 8px 0 0; }
[data-theme="atlas"] .index h3 { font-size: 22px; margin: 34px 0 6px; padding-top: 10px; border-top: 2px solid var(--ink); }
[data-theme="atlas"] table { width: 100%; border-collapse: collapse; background: var(--bg-2); }
[data-theme="atlas"] th, [data-theme="atlas"] td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
[data-theme="atlas"] thead th { font: 700 13px var(--body); color: var(--muted); border-bottom: 1px solid var(--ink); }
[data-theme="atlas"] tbody th { font: 700 18px/1.3 var(--serif); width: 22%; }
[data-theme="atlas"] td.n, [data-theme="atlas"] th.n { text-align: right; font-variant-numeric: tabular-nums; width: 76px; }
[data-theme="atlas"] tbody tr:hover { background: #fff; }
[data-theme="atlas"] .soon { color: var(--muted); }
[data-theme="atlas"] .foot { border-top: 3px double var(--ink); padding: 18px 0 40px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }
[data-theme="atlas"] .foot p { margin: 0; }
[data-theme="atlas"] .crumbs { font-size: 14px; color: var(--muted); padding: 18px 0 0; margin: 0; }
[data-theme="atlas"] .crumbs a { color: var(--muted); }
[data-theme="atlas"] .organ-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 20px 48px; padding: 14px 0 26px; border-bottom: 3px double var(--ink); align-items: end; }
[data-theme="atlas"] .organ-head h1 { font-size: clamp(48px, 8vw, 104px); letter-spacing: -.02em; overflow-wrap: anywhere; }
[data-theme="atlas"] .organ-head .system { font-size: 15px; color: var(--artery); font-weight: 700; margin: 0 0 4px; }
[data-theme="atlas"] .organ-head .tag { font: italic 22px/1.35 var(--serif); margin: 0 0 12px; }
[data-theme="atlas"] .organ-head .sum { color: var(--muted); margin: 0; max-width: 70ch; }
[data-theme="atlas"] .facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 24px; margin: 0; }
[data-theme="atlas"] .facts div { padding: 14px 0; border-bottom: 1px solid var(--line); }
[data-theme="atlas"] .facts dt { font-size: 13px; font-weight: 700; color: var(--muted); }
[data-theme="atlas"] .facts dd { margin: 3px 0 0; font: 17px/1.3 var(--serif); }
[data-theme="atlas"] .cols { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 0 40px; }
[data-theme="atlas"] .toc { position: sticky; top: 14px; align-self: start; padding: 30px 0; font-size: 15px; display: flex; flex-direction: column; align-items: stretch; }
[data-theme="atlas"] .toc b { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
[data-theme="atlas"] .toc .jump-to { text-align: left; padding: 5px 0 5px 12px; border-left: 2px solid var(--line); }
[data-theme="atlas"] .toc .jump-to:hover { border-color: var(--artery); color: var(--artery); }
[data-theme="atlas"] .sect { padding: 34px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 8px; }
[data-theme="atlas"] .sect > .note { margin-bottom: 18px; }
[data-theme="atlas"] .tabs { display: flex; flex-wrap: wrap; margin: 16px 0 0; border-bottom: 1px solid var(--ink); }
[data-theme="atlas"] .tabs button { font-size: 15px; border: 1px solid transparent; border-bottom: 0; padding: 9px 14px; color: var(--petrol); }
[data-theme="atlas"] .tabs button[aria-selected="true"] { background: var(--bg-2); border-color: var(--ink); color: var(--ink); font-weight: 700; margin-bottom: -1px; }
[data-theme="atlas"] .proc-summary { margin: 12px 0 0; }
[data-theme="atlas"] .work { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 0 28px; margin-top: 18px; align-items: start; }
[data-theme="atlas"] .stage-box { position: relative; height: min(64vh, 600px); min-height: 300px; display: flex; }
[data-theme="atlas"] .stage { flex: 1; min-height: 0; width: 100%; background: radial-gradient(ellipse at 50% 45%, #18434f 0, #0c242e 75%); display: block; }
[data-theme="atlas"] .stage.no-scene { display: grid; place-items: center; padding: 2rem; color: var(--muted); text-align: center; }
[data-theme="atlas"] .transport { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-top: 1px solid #2b5562; color: #c9dadd; font-size: 14px; flex-wrap: wrap; }
[data-theme="atlas"] .transport > button { font-weight: 700; font-size: 14px; background: #e9efee; color: #10262d; padding: 7px 14px; }
[data-theme="atlas"] .transport > button:hover { background: #fff; }
[data-theme="atlas"] .transport .pos { margin-left: auto; }
[data-theme="atlas"] .speed select { background: #0c242e; color: #dfe9ea; border: 1px solid #2b5562; padding: 3px; font: inherit; }
[data-theme="atlas"] .failure-banner { position: absolute; top: 10px; left: 10px; right: 10px; z-index: 2; display: flex; gap: 1rem; align-items: center; justify-content: space-between; padding: 9px 14px; background: #3a1418; border: 1px solid #ff6b6b; color: #fff; }
[data-theme="atlas"] .failure-banner strong { display: block; font: 700 19px var(--serif); }
[data-theme="atlas"] .failure-banner span { color: #ffb3b3; font-size: 14px; }
[data-theme="atlas"] .failure-banner button { border: 1px solid #fff; padding: 5px 12px; white-space: nowrap; }
[data-theme="atlas"] .failure-banner button:hover { background: #fff; color: #3a1418; }
[data-theme="atlas"] .steps { list-style: none; margin: 0; padding: 0; max-height: min(calc(64vh + 46px), 646px); overflow: auto; border-top: 1px solid var(--ink); counter-reset: s; }
[data-theme="atlas"] .steps li { counter-increment: s; border-bottom: 1px solid var(--line); }
[data-theme="atlas"] .step-head { display: grid; grid-template-columns: 30px 1fr; gap: 8px; width: 100%; text-align: left; padding: 10px 8px 10px 0; font-size: 16px; line-height: 1.35; }
[data-theme="atlas"] .step-head::before { content: counter(s); font: 700 17px var(--serif); color: var(--muted); text-align: right; }
[data-theme="atlas"] .steps li.on { background: var(--bg-2); }
[data-theme="atlas"] .steps li.on .step-head { font-weight: 700; }
[data-theme="atlas"] .steps li.on .step-head::before, [data-theme="atlas"] .steps li.bad .step-head::before { color: var(--artery); }
[data-theme="atlas"] .steps .body { padding: 0 12px 14px 38px; }
[data-theme="atlas"] .steps .body p { margin: 0 0 10px; }
[data-theme="atlas"] .broken-note { color: var(--artery); font-weight: 700; }
[data-theme="atlas"] details { font-size: 15px; color: var(--muted); margin-bottom: 10px; }
[data-theme="atlas"] summary { cursor: pointer; color: var(--petrol); font-weight: 700; }
[data-theme="atlas"] .chips { display: flex; flex-wrap: wrap; gap: 6px; }
[data-theme="atlas"] .chip { display: inline-block; font-size: 13px; padding: 1px 8px; border: 1px solid var(--line); }
[data-theme="atlas"] .steps .body > .chip { font-weight: 700; border-color: var(--c); border-left-width: 6px; margin-bottom: 8px; }
[data-theme="atlas"] .chips .chip:hover { border-color: var(--artery); color: var(--artery); }
[data-theme="atlas"] .regions { columns: 3 260px; column-gap: 36px; }
[data-theme="atlas"] .region { break-inside: avoid; margin-bottom: 20px; }
[data-theme="atlas"] .region h3 { font-size: 19px; border-bottom: 1px solid var(--ink); padding-bottom: 4px; margin-bottom: 2px; }
[data-theme="atlas"] .part { border-bottom: 1px dotted var(--line); }
[data-theme="atlas"] .part-head { width: 100%; text-align: left; padding: 6px 0; display: flex; justify-content: space-between; gap: 10px; font-weight: 700; }
[data-theme="atlas"] .part-head::after { content: "+"; color: var(--muted); }
[data-theme="atlas"] .part.open .part-head { color: var(--artery); }
[data-theme="atlas"] .part.open .part-head::after { content: "–"; }
[data-theme="atlas"] .part-body p { margin: 0 0 8px; font-size: 15px; }
[data-theme="atlas"] .fine { color: var(--muted); }
[data-theme="atlas"] .what-if { font-weight: 700; }
[data-theme="atlas"] .filter { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
[data-theme="atlas"] .filter button { font-size: 14px; border: 1px solid var(--ink); padding: 5px 12px; }
[data-theme="atlas"] .filter button[aria-pressed="true"] { background: var(--ink); color: #fff; }
[data-theme="atlas"] .ftable { border-top: 1px solid var(--ink); }
[data-theme="atlas"] .fail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr) auto; gap: 4px 24px; padding: 12px; border-bottom: 1px solid var(--line); background: var(--bg-2); align-items: start; }
[data-theme="atlas"] .fail[data-severity="mild"] { --sev: #4d7f5a; }
[data-theme="atlas"] .fail[data-severity="moderate"] { --sev: #9a7800; }
[data-theme="atlas"] .fail[data-severity="severe"] { --sev: #c25a12; }
[data-theme="atlas"] .fail[data-severity="life-threatening"] { --sev: #b3202c; }
[data-theme="atlas"] .fail.active { background: #fbeceb; outline: 2px solid var(--artery); outline-offset: -2px; }
[data-theme="atlas"] .fail header { grid-column: 1; grid-row: 1; }
[data-theme="atlas"] .fail h4 { font-size: 18px; line-height: 1.25; }
[data-theme="atlas"] .sev { font-size: 14px; font-weight: 700; color: var(--sev); }
[data-theme="atlas"] .sev::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 6px; background: var(--sev); }
[data-theme="atlas"] .fail-part { grid-column: 1; color: var(--muted); font-size: 14px; margin: 0; }
[data-theme="atlas"] .fail p { grid-column: 2; margin: 0 0 6px; font-size: 15px; }
[data-theme="atlas"] .fail .simulate { grid-column: 3; grid-row: 1; border: 1px solid var(--ink); padding: 5px 12px; font-size: 14px; font-weight: 700; white-space: nowrap; }
[data-theme="atlas"] .simulate:hover, [data-theme="atlas"] .fail.active .simulate { background: var(--ink); color: #fff; }
[data-theme="atlas"] .part-body .fail { grid-template-columns: 1fr; }
[data-theme="atlas"] .part-body .fail > * { grid-column: 1; grid-row: auto; }
[data-theme="atlas"] .part-body .fail .simulate { justify-self: start; }
[data-theme="atlas"] .links { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 36px; list-style: none; padding: 0; margin: 0; }
[data-theme="atlas"] .links li { padding: 10px 0; border-bottom: 1px solid var(--line); }
[data-theme="atlas"] .links b { font: 700 18px var(--serif); }
[data-theme="atlas"] .three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
[data-theme="atlas"] .three h3 { font-size: 21px; border-bottom: 2px solid var(--ink); padding-bottom: 5px; margin-bottom: 4px; }
[data-theme="atlas"] .three .mine h3 { border-color: var(--artery); }
[data-theme="atlas"] .three h4 { margin: 12px 0 2px; font: 700 16px/1.3 var(--body); }
[data-theme="atlas"] .three p { margin: 0; font-size: 15px; color: var(--muted); }
[data-theme="atlas"] .sources { padding-left: 20px; color: var(--muted); font-size: 15px; }
@media (max-width: 900px) {
  [data-theme="atlas"] .plate-wrap { grid-template-columns: 1fr; }
  [data-theme="atlas"] .callouts, [data-theme="atlas"] .leaders { display: none; }
  [data-theme="atlas"] thead, [data-theme="atlas"] td.n { display: none; }
  [data-theme="atlas"] tbody th, [data-theme="atlas"] tbody td { display: block; width: auto; border: 0; padding: 2px 12px; }
  [data-theme="atlas"] tbody tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); }
  [data-theme="atlas"] .organ-head, [data-theme="atlas"] .work, [data-theme="atlas"] .cols, [data-theme="atlas"] .links, [data-theme="atlas"] .three { grid-template-columns: 1fr; }
  [data-theme="atlas"] .facts { grid-template-columns: repeat(2, 1fr); }
  [data-theme="atlas"] .toc { display: none; }
  [data-theme="atlas"] .steps { max-height: none; }
  [data-theme="atlas"] .stage-box { height: 62vw; }
  [data-theme="atlas"] .viewer-box { height: 70vh; }
  [data-theme="atlas"] .fail { grid-template-columns: 1fr; }
  [data-theme="atlas"] .fail > * { grid-column: 1; grid-row: auto; }
  [data-theme="atlas"] .fail .simulate { justify-self: start; grid-column: 1; grid-row: auto; }
  [data-theme="atlas"] .find, [data-theme="atlas"] .find input { width: 100%; }
}
