/* ─────────────────────────────────────────────────────────────
   Fyscal ARCX Platform Guide — theme
   Brand: Fyscal indigo #352eff. Type: Public Sans (text), IBM Plex Mono (literal IDs and field codes).
   Colours are tokens on :root with dark values below; components only use tokens.
   ───────────────────────────────────────────────────────────── */
:root {
  color-scheme: light;
  --brand: #352eff;
  --brand-ink: #2a22d6;
  --brand-wash: #eeeeff;
  --on-brand: #ffffff;
  --ink: #16163a;
  --ink-2: #4a4b6a;
  --ink-3: #6e7090;
  --paper: #ffffff;
  --mist: #f5f6fb;
  --line: #e1e3f0;
  --ok: #0d7f56;
  --warn: #9a6200;
  --warn-wash: #fff6e3;
  --bad: #c0283a;
  --bad-wash: #fdeef0;
  --logo-mark: #352eff;
  --logo-word: #05005d;
  --shadow: 0 1px 2px rgba(22, 22, 58, .06), 0 8px 24px rgba(22, 22, 58, .08);
  --font: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --header-h: 60px;
  --side-w: 264px;
  --toc-w: 220px;
  --measure: 46rem;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --brand: #ed68f8;
  --brand-ink: #ed68f8;
  --brand-wash: #351b37;
  --on-brand: #171717;
  --ink: #f2f2f2;
  --ink-2: #cdcdd3;
  --ink-3: #a3a3ac;
  --paper: #171717;
  --mist: #1f1f1f;
  --line: #2e2e2e;
  --logo-mark: #ffffff;
  --logo-word: #ffffff;
  --ok: #45c98f;
  --warn: #f0b44c;
  --warn-wash: #2d2410;
  --bad: #ff7a88;
  --bad-wash: #36151d;
  --shadow: 0 8px 28px rgba(0, 0, 0, .45);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 16px/1.6 var(--font); color: var(--ink); background: var(--paper); }
img { max-width: 100%; height: auto; }
a { color: var(--brand-ink); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
code, kbd { font-family: var(--mono); font-size: .88em; }
code { background: var(--mist); border: 1px solid var(--line); border-radius: 4px; padding: .05em .35em; overflow-wrap: anywhere; }
kbd { border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 .35em; background: var(--paper); color: var(--ink-2); }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* ── Header ─────────────────────────────────────────────── */
.site-header { position: sticky; top: 0; z-index: 30; height: var(--header-h); display: flex; align-items: center; gap: 20px; padding: 0 20px; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: var(--paper); padding: 6px 10px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--ink); text-decoration: none; letter-spacing: -.01em; white-space: nowrap; }
.logo { display: block; height: 26px; width: auto; }
.logo-mark { fill: var(--logo-mark); }
.logo-word { fill: var(--logo-word); }
.top-nav { display: flex; gap: 4px; }
.top-nav a { color: var(--ink-2); text-decoration: none; font-size: .92rem; font-weight: 500; padding: 6px 10px; border-radius: 6px; }
.top-nav a:hover { color: var(--ink); background: var(--mist); }
body[data-view="doc"] .top-nav { display: none; }
.header-tools { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.search-btn { display: flex; align-items: center; gap: 10px; font: inherit; font-size: .9rem; color: var(--ink-3); background: var(--mist); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px 6px 12px; cursor: pointer; }
.search-btn svg { width: 16px; height: 16px; flex: none; }
.search-btn:hover { border-color: var(--brand); color: var(--ink-2); }
.locale-tag, .locales a { font-size: .8rem; font-weight: 700; color: var(--ink-3); text-decoration: none; }
.locales { display: flex; gap: 8px; }
.locales a[aria-current] { color: var(--brand-ink); }
.locale-pick { position: relative; display: flex; align-items: center; color: var(--ink-2); }
.locale-pick svg { position: absolute; left: 9px; width: 16px; height: 16px; pointer-events: none; }
.locale-pick select { appearance: none; -webkit-appearance: none; font: inherit; font-size: .85rem; font-weight: 600; color: inherit; background: var(--mist) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none' stroke='%236e7090' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E") right 9px center / 10px no-repeat; border: 1px solid var(--line); border-radius: 8px; padding: 6px 26px 6px 31px; cursor: pointer; max-width: 13rem; }
.locale-pick select:hover { border-color: var(--brand); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ask-btn { font: inherit; font-weight: 600; font-size: .9rem; color: var(--on-brand); background: var(--brand); border: 0; border-radius: 8px; padding: 7px 14px; cursor: pointer; white-space: nowrap; }
.ask-btn:hover { background: var(--brand-ink); }
:root[data-theme="dark"] .ask-btn { color: var(--brand); background: transparent; box-shadow: inset 0 0 0 1px var(--brand); }
:root[data-theme="dark"] .ask-btn:hover { background: var(--brand-wash); }
.icon-btn { font: inherit; background: none; border: 0; color: var(--ink-2); width: 36px; height: 36px; border-radius: 8px; cursor: pointer; }
.icon-btn:hover { background: var(--mist); }
.theme-btn { display: inline-flex; align-items: center; justify-content: center; }
.theme-btn svg { width: 19px; height: 19px; }
.theme-btn .i-sun, :root[data-theme="dark"] .theme-btn .i-moon { display: none; }
:root[data-theme="dark"] .theme-btn .i-sun { display: block; }
.menu-btn { display: none; }

/* ── Shell: sidebar / main / toc ───────────────────────── */
.shell { display: grid; grid-template-columns: 1fr; }
body[data-view="doc"] .shell { grid-template-columns: var(--side-w) minmax(0, 1fr) var(--toc-w); }
.sidebar, .toc { display: none; }
body[data-view="doc"] .sidebar, body[data-view="doc"] .toc { display: block; }
.sidebar { position: sticky; top: var(--header-h); height: calc(100vh - var(--header-h)); overflow-y: auto; border-right: 1px solid var(--line); padding: 20px 14px 40px; font-size: .92rem; }
.side-group + .side-group { margin-top: 18px; }
.side-label { margin: 0 0 4px 10px; font-size: .78rem; font-weight: 700; color: var(--ink-3); }
:root[data-theme="dark"] .side-label { color: var(--brand); text-transform: uppercase; letter-spacing: .06em; font-size: .72rem; }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar a { display: block; padding: 5px 10px; border-radius: 6px; color: var(--ink-2); text-decoration: none; }
.sidebar a:hover { color: var(--ink); background: var(--mist); }
.sidebar a[aria-current="page"] { color: var(--brand-ink); background: var(--brand-wash); font-weight: 600; }
.side-sub { margin-left: 12px !important; border-left: 1px solid var(--line); display: none; }
.side-sub a { font-size: .86rem; padding: 3px 10px; }
li.open > .side-sub { display: block; }
.badge { font-size: .68rem; font-weight: 700; color: var(--warn); background: var(--warn-wash); border-radius: 4px; padding: 1px 5px; vertical-align: 1px; }
.toc { position: sticky; top: var(--header-h); height: calc(100vh - var(--header-h)); overflow-y: auto; padding: 28px 16px; font-size: .84rem; }
.toc-label { margin: 0 0 8px; font-weight: 700; color: var(--ink-3); font-size: .78rem; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 3px 0 3px 12px; margin-left: -1px; border-left: 2px solid transparent; color: var(--ink-3); text-decoration: none; line-height: 1.35; }
.toc a:hover { color: var(--ink); }
.toc a.active { color: var(--brand-ink); border-left-color: var(--brand); }
.toc li.h3 a { padding-left: 24px; font-size: .8rem; }
.toc-empty { padding-left: 12px; color: var(--ink-3); }
main { min-width: 0; outline: none; }

/* ── Homepage ───────────────────────────────────────────── */
.home { --pad: clamp(20px, 5vw, 64px); }
.home > section { padding-inline: var(--pad); }
.hero { max-width: 1240px; margin: 0 auto; padding-top: clamp(48px, 7vw, 96px); padding-bottom: 48px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: clamp(28px, 4vw, 56px); align-items: center; }
.hero-kicker { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px; font-weight: 600; color: var(--ink); }
.hero-kicker::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 18%, transparent); }
.hero-hl { color: var(--brand); }
.hero h1 { margin: 0; max-width: 16ch; font-size: clamp(2.4rem, 4.6vw, 4.1rem); line-height: 1.02; letter-spacing: -.035em; font-weight: 800; }
.hero-sub { max-width: 40rem; margin: 22px 0 0; font-size: 1.2rem; color: var(--ink-2); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 28px 0 0; }
.btn { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-weight: 600; padding: 10px 18px; border-radius: 8px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); text-decoration: none; cursor: pointer; }
.btn:hover { border-color: var(--brand); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.btn-primary:hover { background: var(--brand-ink); border-color: var(--brand-ink); }
.facts { display: flex; flex-wrap: wrap; gap: 6px 22px; list-style: none; margin: 26px 0 0; padding: 0; font-size: .92rem; color: var(--ink-2); }
.facts li::before { content: "•"; color: var(--brand); font-weight: 700; margin-right: 6px; }
.facts { padding-top: 22px; border-top: 1px solid var(--line); }
.facts .facts-pdf::before { content: "↓"; }
.facts-pdf a { color: var(--ink-2); text-decoration: none; }
.facts-pdf a:hover { color: var(--brand-ink); text-decoration: underline; }

/* "How Fyscal ARCX works": six steps on a 3 × 2 map, cycling through on their own */
.flow-card { position: relative; padding: 26px 26px 22px; background: var(--mist); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.flow-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.flow-card-head h2 { margin: 0; font-size: .82rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.flow-tag { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 600; color: var(--brand-ink); background: var(--brand-wash); border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.flow-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
.flow-map { position: relative; }
.flow-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.flow-lines path { fill: none; stroke: var(--ink-3); stroke-opacity: .55; stroke-width: 1.4; stroke-dasharray: 5 5; }
.flow-lines path.on { stroke: var(--brand); stroke-opacity: 1; }
.flow-card.playing .flow-lines path { animation: flow-dash 1.2s linear infinite; }
@keyframes flow-dash { to { stroke-dashoffset: -20; } }
.flow-grid { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: auto auto; grid-auto-flow: column; gap: 56px 26px; list-style: none; margin: 0; padding: 0; }
.flow-grid button { position: relative; display: flex; align-items: center; gap: 10px; width: 100%; min-height: 72px; padding: 14px 24px 12px 10px; text-align: left; font: inherit; font-size: .88rem; font-weight: 600; line-height: 1.2; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 8px; cursor: pointer; transition: border-color .3s, box-shadow .3s, transform .3s; }
.flow-grid button:hover { border-color: color-mix(in srgb, var(--brand) 60%, var(--line)); }
.flow-icon { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 7px; color: var(--brand-ink); background: var(--brand-wash); transition: background .3s, color .3s; }
.flow-icon svg { width: 18px; height: 18px; }
.flow-no { position: absolute; top: 6px; right: 8px; font-family: var(--mono); font-size: .66rem; font-weight: 500; color: var(--ink-3); }
.flow-grid button[aria-selected="true"] { border-color: var(--brand); box-shadow: 0 10px 28px -8px color-mix(in srgb, var(--brand) 55%, transparent); transform: translateY(-2px); }
.flow-grid button[aria-selected="true"] .flow-icon { background: var(--brand); color: var(--on-brand); }
.flow-grid button[aria-selected="true"] .flow-no { color: var(--brand-ink); }
.flow-panel { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); min-height: 9.5rem; }
.flow-detail p { margin: 0 0 8px; }
.flow-detail:not([hidden]) { animation: flow-in .45s ease; }
@keyframes flow-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.flow-count { font-family: var(--mono); font-size: .82rem; color: var(--brand-ink); letter-spacing: .04em; }
.flow-head { font-size: 1.3rem; font-weight: 700; color: var(--ink); }
.flow-body { color: var(--ink-2); font-size: .95rem; }
.flow-detail a { font-weight: 600; color: var(--brand-ink); text-decoration: none; }
.flow-detail a:hover { text-decoration: underline; }
.flow-progress { display: flex; gap: 6px; margin-top: 18px; }
.flow-progress span { position: relative; overflow: hidden; width: 28px; height: 3px; border-radius: 2px; background: var(--line); transition: width .3s; }
.flow-progress span.on { width: 46px; background: color-mix(in srgb, var(--brand) 30%, var(--line)); }
.flow-progress span.on::after { content: ""; position: absolute; inset: 0; background: var(--brand); }
.flow-card.playing .flow-progress span.on::after { transform-origin: left; animation: flow-fill 4s linear; }
@keyframes flow-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.highlights { max-width: 1180px; margin: 56px auto 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-block: 1px solid var(--line); }
.hl { padding: 24px 22px 24px 0; }
.hl + .hl { padding-left: 22px; border-left: 1px solid var(--line); }
.hl img { width: 64px; height: 64px; object-fit: contain; }
.hl h3 { margin: 8px 0 4px; font-size: 1.02rem; }
.hl p { margin: 0; color: var(--ink-2); font-size: .94rem; }

.band { max-width: 1180px; margin: 0 auto; padding-top: 80px; }
.band > h2 { margin: 0; font-size: clamp(1.7rem, 3.4vw, 2.4rem); letter-spacing: -.025em; line-height: 1.1; max-width: 22ch; }
.lead { max-width: 44rem; color: var(--ink-2); font-size: 1.08rem; margin: 12px 0 0; }
.cap-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px 40px; margin-top: 36px; }
.cap h3 { margin: 0 0 6px; font-size: 1.06rem; }
.cap p { margin: 0; color: var(--ink-2); }
.life { list-style: none; padding: 0; margin: 36px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.life li { padding: 0 24px 0 0; }
.life li + li { padding-left: 24px; border-left: 1px solid var(--line); }
.life-no { margin: 0; font-size: .85rem; color: var(--brand-ink); font-weight: 700; }
.life h3 { margin: 4px 0 6px; font-size: 1.3rem; }
.life p { color: var(--ink-2); margin: 0 0 10px; }
.life-links { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .92rem; font-weight: 600; }
.tune { margin-top: 32px; padding: 16px 18px; background: var(--mist); border-radius: 10px; max-width: 52rem; }
.mod-groups { margin-top: 32px; display: grid; gap: 40px; }
.mod-group h3 { margin: 0 0 4px; font-size: 1rem; display: flex; gap: 10px; align-items: baseline; }
.count { font-size: .82rem; color: var(--ink-3); font-weight: 500; }
.mod-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.mod-list a { display: grid; grid-template-columns: 48px minmax(180px, 260px) 1fr; gap: 16px; padding: 16px 4px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; align-items: baseline; }
.mod-list a:hover { background: var(--mist); }
.mod-list a:hover .mod-title { color: var(--brand-ink); }
.mod-no { font-weight: 800; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.mod-title { font-weight: 700; font-size: 1.05rem; }
.mod-sum { color: var(--ink-2); font-size: .95rem; }
.qs { list-style: none; padding: 0; margin: 32px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; counter-reset: qs; }
.qs li { counter-increment: qs; }
.qs li::before { content: counter(qs); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--brand-wash); color: var(--brand-ink); font-weight: 800; }
.qs h3 { margin: 12px 0 4px; }
.qs p { margin: 0; color: var(--ink-2); }
.updates { list-style: none; padding: 0; margin: 28px 0 12px; border-top: 1px solid var(--line); }
.updates li { display: grid; grid-template-columns: 120px 90px 1fr; gap: 4px 16px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.updates time { color: var(--ink-3); font-size: .9rem; font-variant-numeric: tabular-nums; }
.updates a { font-weight: 700; }
.rel-sum { grid-column: 3; color: var(--ink-2); font-size: .95rem; }
.rel-type { font-size: .78rem; font-weight: 700; border-radius: 4px; padding: 2px 6px; justify-self: start; background: var(--mist); color: var(--ink-2); }
.rel-new { background: var(--brand-wash); color: var(--brand-ink); }
.rel-fixed { background: var(--bad-wash); color: var(--bad); }
.help { padding-bottom: 96px; }
.help p { max-width: 44rem; color: var(--ink-2); }

/* ── Docs article ───────────────────────────────────────── */
.docs { padding: 32px clamp(20px, 4vw, 56px) 80px; }
.module { max-width: var(--measure); margin: 0 auto; }
.crumbs { margin: 0 0 10px; font-size: .86rem; color: var(--ink-3); display: flex; gap: 8px; }
.crumbs a { color: var(--ink-3); }
.module-title-row { display: flex; align-items: flex-start; gap: 16px; justify-content: space-between; flex-wrap: wrap; }
.module h1 { margin: 0; font-size: clamp(2rem, 4vw, 2.6rem); line-height: 1.08; letter-spacing: -.03em; }
.ch-no { color: var(--brand); margin-right: .15em; }
.module-actions { display: flex; gap: 6px; padding-top: 6px; }
.ghost { font: inherit; font-size: .84rem; font-weight: 600; color: var(--ink-2); background: none; border: 1px solid var(--line); border-radius: 6px; padding: 4px 10px; cursor: pointer; text-decoration: none; }
.ghost:hover { border-color: var(--brand); color: var(--ink); }
.path { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 14px 0 0; font-size: .88rem; color: var(--ink-2); }
.path span:not(.sep) { background: var(--mist); border: 1px solid var(--line); border-radius: 5px; padding: 1px 8px; }
.path .sep { color: var(--ink-3); }
.prose { margin-top: 24px; }
.prose > * + * { margin-top: 0; }
.prose p, .prose ul, .prose ol { margin: 0 0 1em; }
.prose h2 { font-size: 1.6rem; letter-spacing: -.02em; line-height: 1.2; margin: 2.6em 0 .5em; padding-top: .6em; border-top: 1px solid var(--line); }
.prose h3 { font-size: 1.18rem; margin: 1.8em 0 .4em; }
.prose h4 { font-size: 1rem; margin: 1.4em 0 .3em; }
.prose h2:first-child { margin-top: .5em; }
.h-anchor { margin-left: .35em; color: var(--ink-3); text-decoration: none; opacity: 0; font-weight: 400; }
h2:hover .h-anchor, h3:hover .h-anchor, .h-anchor:focus { opacity: 1; }
.prose li + li { margin-top: .3em; }
.prose strong { font-weight: 700; }
.table-wrap { overflow-x: auto; margin: 0 0 1.4em; border: 1px solid var(--line); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; vertical-align: top; padding: 9px 12px; border-bottom: 1px solid var(--line); }
th { background: var(--mist); font-weight: 700; font-size: .84rem; color: var(--ink-2); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td:first-child { font-weight: 600; }

.step { position: relative; margin: 0 0 1.1em; padding: 14px 18px 4px 20px; border-left: 3px solid var(--brand); background: var(--mist); border-radius: 0 10px 10px 0; }
.step-head { margin: 0 0 6px !important; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.step-no { font-size: .8rem; font-weight: 800; color: var(--brand-ink); white-space: nowrap; }
.step-title { font-weight: 700; }
.step-body > :last-child { margin-bottom: 10px; }

.callout { margin: 0 0 1.2em; padding: 12px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.callout-label { margin: 0 0 4px !important; font-weight: 800; font-size: .84rem; color: var(--ink-2); }
.callout > :last-child { margin-bottom: 0; }
.callout-note { border-left: 4px solid var(--brand); }
.callout-tip { border-left: 4px solid var(--ok); }
.callout-important { border-left: 4px solid var(--warn); background: var(--warn-wash); }
.callout-not-covered { border-left: 4px solid var(--bad); background: var(--bad-wash); }
.callout-todo { border: 2px dashed var(--warn); background: var(--warn-wash); }
.callout-todo .callout-label { color: var(--warn); }

.legend ol { list-style: none; padding: 0; counter-reset: lg; }
.legend li { counter-increment: lg; position: relative; padding-left: 36px; }
.legend li::before { content: counter(lg); position: absolute; left: 0; top: .1em; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: var(--on-brand); font-size: .78rem; font-weight: 800; }
.checks ul { list-style: none; padding: 0; }
.checks li { position: relative; padding-left: 26px; }
.checks li::before { content: "•"; position: absolute; left: 6px; color: var(--ink-2); font-weight: 800; }

.figure { margin: 1.4em 0 1.8em; }
.figure .zoom { display: block; width: 100%; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--mist); cursor: zoom-in; overflow: hidden; }
.figure img { display: block; width: 100%; }
.figure-placeholder { display: grid; place-items: center; gap: 6px; min-height: 180px; border: 2px dashed var(--line); border-radius: 10px; color: var(--ink-3); background: var(--mist); font-weight: 600; padding: 16px; text-align: center; }
figcaption { margin-top: 8px; font-size: .88rem; color: var(--ink-2); }
.fig-no { font-weight: 700; color: var(--ink); margin-right: 4px; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 64px; }
.pager a { display: grid; gap: 2px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--ink); font-weight: 700; }
.pager a:hover { border-color: var(--brand); }
.pager span { font-size: .8rem; font-weight: 500; color: var(--ink-3); }
.pager .next { text-align: right; }

/* ── Footer ─────────────────────────────────────────────── */
.site-footer { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 32px; padding: 48px clamp(20px, 5vw, 64px); border-top: 1px solid var(--line); background: var(--mist); font-size: .9rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li + li { margin-top: 6px; }
.site-footer a { color: var(--ink-2); text-decoration: none; }
.site-footer a:hover { color: var(--brand-ink); }
.foot-brand > a { font-weight: 800; color: var(--ink); display: inline-block; }
.foot-brand .logo { height: 30px; }
.foot-brand p { color: var(--ink-2); max-width: 30rem; }
.foot-title { font-weight: 700; margin: 0 0 10px; }
.social { display: flex; gap: 12px; }
.legal { grid-column: 1 / -1; margin: 0; color: var(--ink-3); border-top: 1px solid var(--line); padding-top: 18px; }
.to-top { position: fixed; right: 20px; bottom: 20px; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow); text-decoration: none; color: var(--ink); opacity: 0; pointer-events: none; transition: opacity .2s; }
.to-top.show { opacity: 1; pointer-events: auto; }

/* ── Dialogs: search, Ask AI, zoom ──────────────────────── */
dialog { border: 1px solid var(--line); border-radius: 14px; background: var(--paper); color: var(--ink); box-shadow: var(--shadow); padding: 0; }
dialog::backdrop { background: rgba(15, 16, 48, .45); }
.search-dialog { width: min(680px, 94vw); margin-top: 10vh; }
.search-form { display: flex; align-items: center; gap: 6px; padding: 10px 10px 10px 16px; border-bottom: 1px solid var(--line); }
.search-form input { flex: 1; font: inherit; font-size: 1.05rem; border: 0; background: none; color: var(--ink); outline: none; padding: 6px 0; }
.search-results { list-style: none; margin: 0; padding: 6px; max-height: 60vh; overflow-y: auto; }
.search-results a { display: block; padding: 10px 12px; border-radius: 8px; text-decoration: none; color: var(--ink); }
.search-results a[aria-selected="true"], .search-results a:hover { background: var(--brand-wash); }
.sr-mod { display: block; font-size: .78rem; color: var(--ink-3); }
.sr-title { font-weight: 700; }
.sr-snip { display: block; font-size: .86rem; color: var(--ink-2); }
.search-results mark { background: none; color: var(--brand-ink); font-weight: 700; }
.search-empty { padding: 18px; color: var(--ink-3); }
.search-foot { margin: 0; padding: 8px 16px; border-top: 1px solid var(--line); font-size: .78rem; color: var(--ink-3); }
.ask-dialog { width: min(640px, 94vw); padding: 18px 20px; }
.ask-head { display: flex; justify-content: space-between; align-items: center; }
.ask-title { margin: 0; font-weight: 800; font-size: 1.1rem; }
.ask-intro, .ask-note { color: var(--ink-2); font-size: .92rem; }
.ask-note { font-size: .8rem; color: var(--ink-3); }
.ask-log { max-height: 46vh; overflow-y: auto; display: grid; gap: 12px; }
.ask-q { justify-self: end; background: var(--brand); color: var(--on-brand); padding: 8px 12px; border-radius: 12px 12px 2px 12px; max-width: 85%; }
.ask-a { background: var(--mist); padding: 10px 14px; border-radius: 12px 12px 12px 2px; font-size: .95rem; }
.ask-a p { margin: 0 0 .6em; } .ask-a :last-child { margin-bottom: 0; }
.ask-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font: inherit; font-size: .84rem; border: 1px solid var(--line); background: var(--paper); color: var(--ink-2); border-radius: 99px; padding: 4px 12px; cursor: pointer; }
.chip:hover { border-color: var(--brand); color: var(--ink); }
.ask-form { display: flex; gap: 8px; }
.ask-form input { flex: 1; font: inherit; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; background: var(--paper); color: var(--ink); }
.zoom-dialog { max-width: 96vw; max-height: 94vh; padding: 8px; }
.zoom-dialog form { position: absolute; right: 8px; top: 8px; }
.zoom-dialog img { max-width: 92vw; max-height: 88vh; display: block; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 8px; font-size: .9rem; z-index: 50; }
.notfound { max-width: 40rem; margin: 18vh auto; padding: 0 20px; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 1180px) {
  body[data-view="doc"] .shell { grid-template-columns: var(--side-w) minmax(0, 1fr); }
  body[data-view="doc"] .toc { display: none; }
}
@media (max-width: 960px) {
  .top-nav { display: none; }
  .menu-btn { display: inline-block; }
  body[data-view="doc"] .shell { grid-template-columns: minmax(0, 1fr); }
  body[data-view="doc"] .sidebar { position: fixed; z-index: 25; left: 0; top: var(--header-h); width: min(320px, 86vw); background: var(--paper); transform: translateX(-102%); transition: transform .2s ease; box-shadow: var(--shadow); }
  body.menu-open .sidebar { transform: none; }
  body[data-view="home"] .sidebar { display: block; position: fixed; z-index: 25; left: 0; top: var(--header-h); width: min(320px, 86vw); height: calc(100vh - var(--header-h)); background: var(--paper); transform: translateX(-102%); transition: transform .2s ease; box-shadow: var(--shadow); }
  .hero { grid-template-columns: 1fr; }
  .highlights, .life, .qs { grid-template-columns: repeat(2, 1fr); row-gap: 24px; }
  .hl:nth-child(odd) { border-left: 0; padding-left: 0; }
  .life li:nth-child(odd) { border-left: 0; padding-left: 0; }
  .cap-grid { grid-template-columns: repeat(2, 1fr); }
  .site-footer { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .search-btn span, .search-btn kbd, .locale-tag { display: none; }
  .search-btn { gap: 6px; padding: 7px 9px; }
  .locale-pick select { width: 34px; padding: 6px 0; color: transparent; background-image: none; }
  .locale-pick select option { color: var(--ink); }
  .site-header { gap: 10px; padding: 0 12px; }
  .site-header .logo { height: 22px; }
  .flow-grid { gap: 40px 18px; }
  .flow-grid button { flex-direction: column; align-items: flex-start; font-size: .8rem; min-height: 0; }
  .flow-card { padding: 20px 16px 18px; }
  .highlights, .life, .qs, .cap-grid { grid-template-columns: 1fr; }
  .hl + .hl, .life li + li { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 18px; }
  .mod-list a { grid-template-columns: 36px 1fr; }
  .mod-sum { grid-column: 2; }
  .updates li { grid-template-columns: 1fr auto; }
  .rel-sum, .updates a { grid-column: 1 / -1; }
  .site-footer { grid-template-columns: 1fr; }
  .pager { grid-template-columns: 1fr; }
}
.flash { animation: flash 1.2s ease; }
@keyframes flash { 0%, 40% { background: var(--brand-wash); } 100% { background: transparent; } }
@media (max-width: 440px) { .site-header .brand { width: 28px; overflow: hidden; flex: none; } .site-header .logo { height: 20px; width: 118px; max-width: none; flex: none; } }
.module-head + .callout { margin-top: 20px; }
.callout p { margin: 0 0 .5em; }

/* ─────────────────────────────────────────────────────────────
   Components carried over from the live guide (kept as raw HTML in the chapters):
   concept diagrams, rule cards, key facts, chapter facts, compare tables, FAQ accordions,
   the glossary A–Z bar and related-module cards. Rules adapted from the live stylesheet;
   the live tokens below are mapped onto this theme's tokens.
   ───────────────────────────────────────────────────────────── */
:root {
  --vx-ink: #1b1c24;
  --vx-body: #3a3c48;
  --vx-muted: #5f6270;
  --vx-panel: #f7f8fc;
  --vx-dot: #e2e4f0;
  --vx-frame: #c4c7dc;
  --vx-node: #ffffff;
  --vx-node-line: #d5d8e8;
  --vx-line: #8f94b3;
  --vx-accent: #352eff;
  --vx-accent-soft: #eeedff;
  --vx-accent-line: #9d99ff;
  --vx-lane-a: #f1f2f9;
  --vx-lane-b: #f8f9fc;
  --vx-note: #352eff;
  --vx-note-bg: #f8f8fd;
  --vx-tip: #1e7a52;
  --vx-tip-bg: #f2f9f5;
  --vx-warn: #a85a07;
  --vx-warn-bar: #e08a2e;
  --vx-warn-bg: #fff8ef;
  --vx-aml: #0e6582;
  --vx-aml-bg: #f1f7fa;
  --vx-tbc: #6b6e80;
  --vx-tbc-line: #c9cbd8;
  --vx-yes: #1e7a52;
  --vx-no: #b4232c;
  --vx-partial: #a85a07;
  --vx-i-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 14'%3E%3Cpath d='M1 7h18M14 2l5 5-5 5' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --vx-i-down: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 30'%3E%3Cpath d='M1 4h8a4 4 0 0 1 4 4v19M8.5 22.5 13 27l4.5-4.5' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --vx-i-up: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 30'%3E%3Cpath d='M1 26h8a4 4 0 0 0 4-4V3M8.5 7.5 13 3l4.5 4.5' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --vx-i-head: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M0 0L10 5L0 10z' fill='black'/%3E%3C/svg%3E");
  --vx-i-yes: 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.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
  --vx-i-no: 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.8' stroke-linecap='round'%3E%3Cpath d='M7 7l10 10M17 7 7 17'/%3E%3C/svg%3E");
  --vx-i-partial: 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.4'%3E%3Ccircle cx='12' cy='12' r='8'/%3E%3Cpath d='M12 4a8 8 0 0 1 0 16z' fill='black'/%3E%3C/svg%3E");
}
:root[data-theme="dark"] {
  --vx-ink: #f2f2f2;
  --vx-body: #cdcdd3;
  --vx-muted: #a3a3ac;
  --vx-panel: #1c1b1e;
  --vx-dot: #2a292d;
  --vx-frame: #3b3940;
  --vx-node: #1f1f1f;
  --vx-node-line: #3a3a3f;
  --vx-line: #8a8892;
  --vx-accent: #ed68f8;
  --vx-accent-soft: #351b37;
  --vx-accent-line: #a24bab;
  --vx-lane-a: #1e1d20;
  --vx-lane-b: #1a1a1c;
  --vx-note: #ed68f8;
  --vx-note-bg: #1f1c22;
  --vx-tip: #6fd3a1;
  --vx-tip-bg: #15231d;
  --vx-warn: #f2b264;
  --vx-warn-bar: #d98a33;
  --vx-warn-bg: #261d12;
  --vx-aml: #6cc4e3;
  --vx-aml-bg: #12212a;
  --vx-tbc: #a3a3ac;
  --vx-tbc-line: #4a4950;
  --vx-yes: #6fd3a1;
  --vx-no: #ff8a8f;
  --vx-partial: #f2b264;
}
.module {
  --primary: var(--brand);
  --border: var(--line);
  --fg: var(--ink);
  --fg-muted: var(--ink-3);
  --bg-card: var(--mist);
  --font-body: var(--font);
  --font-mono: var(--mono);
  --doc-ink: var(--ink);
  --doc-body: var(--ink-2);
  --doc-muted: var(--ink-3);
  --doc-line: var(--line);
  --mono-500: var(--ink-2);
  --ease-site: ease;
}
.module .related-modules { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--border); }
.module .related-modules-title { font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--fg-muted); margin-bottom: 14px; }
.module .related-modules-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.module .related-module-card { display: flex; align-items: center; gap: 9px; padding: 10px 16px; border: 1px solid var(--border); background: var(--bg-card, #f7f8fc); color: var(--fg); text-decoration: none; font-size: 13.5px; font-weight: 600; transition: border-color .15s ease, background .15s ease, transform .15s ease; }
.module .related-module-card:hover { border-color: var(--primary); background: color-mix(in srgb, var(--brand) 8%, transparent); color: var(--primary); transform: translateY(-1px); }
.module .related-module-card .related-module-icon { display: flex; color: var(--primary); flex: none; }
.module figure.shot-modal { max-width: 520px; margin-left: auto; margin-right: auto; }
.module .role-paths { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 16px 0 28px; }
.module .role-path { border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px 6px; background: var(--paper); }
.module .role-path h4.h4-plain { margin: 0 0 4px; font-size: 15.5px; }
.module .role-path > p { font-size: 13.5px; margin: 0 0 10px; color: var(--doc-muted); }
.module .role-path ol { margin: 0; padding-left: 20px; }
.module .role-path li { font-size: 13.5px; line-height: 1.5; margin: 0 0 9px; color: var(--doc-body); }
.module .role-path li a { font-weight: 600; color: var(--primary); }
.module figure.shot-wide figcaption, .module figure.diagram figcaption { width: 0; min-width: 100%; box-sizing: border-box; font-style: normal; font-size: 12.5px; line-height: 1.5; color: var(--doc-muted); }
.module figure.diagram { container-type: inline-size; position: relative; width: 100%; max-width: 100%; margin: 18px 0 32px; padding: 16px 22px 0; background-color: var(--vx-panel); background-image: radial-gradient(var(--vx-dot) 1px, transparent 1.2px); background-size: 16px 16px; background-position: 8px 8px; border: 1.5px dashed var(--vx-frame); border-radius: 12px; color: var(--vx-body); cursor: default; box-shadow: none; overflow: visible; }
.module figure.diagram::before { content: "Concept diagram"; position: static; display: block; margin: 0 0 16px; padding: 0 0 0 19px; min-height: 14px; width: auto; height: auto; opacity: 1; font: 650 10.5px/14px var(--font-body); letter-spacing: .09em; text-transform: uppercase; color: var(--vx-muted); border: 0; box-shadow: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235f6270' stroke-width='2.2' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='7' height='6' rx='1.5'/%3E%3Crect x='14' y='14' width='7' height='6' rx='1.5'/%3E%3Cpath d='M6.5 10v4.5a2 2 0 0 0 2 2H14' stroke-linecap='round'/%3E%3C/svg%3E") left center / 13px 13px no-repeat; }
.module figure.diagram::after { content: none; }
.module figure.diagram figcaption { width: auto; min-width: 0; margin: 18px -22px 0; padding: 10px 22px 11px; background: transparent; border-top: 1.5px dashed var(--vx-frame); color: var(--vx-muted); text-align: left; }
.module figure.diagram figcaption .cap-num { color: var(--vx-ink); }
.module figure.diagram ol, .module figure.diagram ul { list-style: none; margin: 0; padding: 0; }
.module figure.diagram li { margin: 0; padding: 0; max-width: none; }
.module figure.diagram li::before, .module figure.diagram li::after { content: none; }
.module figure.diagram p { margin: 0; max-width: none; }
.module .diagram .dg-node, .module .diagram.flow .dg-step, .module .diagram.lifecycle .dg-state, .module .diagram.decision .dg-q, .module .diagram.decision .dg-out, .module .diagram.swimlane .dg-task { background: var(--vx-node); border: 1px solid var(--vx-node-line); border-radius: 8px; color: var(--vx-ink); font-size: 13.5px; line-height: 1.4; font-weight: 600; }
.module .diagram .dg-sub { display: block; margin-top: 3px; font-size: 12px; line-height: 1.45; font-weight: 400; color: var(--vx-muted); }
.module .diagram .is-key { background: var(--vx-accent-soft) !important; border-color: var(--vx-accent-line) !important; box-shadow: inset 0 0 0 1px var(--vx-accent-line); }
.module .diagram.flow .dg-steps { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); column-gap: 30px; counter-reset: dg-step; }
.module .diagram.flow .dg-step { position: relative; padding: 11px 12px 12px; counter-increment: dg-step; font-size: 13.5px; line-height: 1.4; color: var(--vx-ink); }
.module .diagram.flow .dg-step::before { content: counter(dg-step); display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; margin: 0 0 7px; border-radius: 50%; border: 1px solid var(--vx-accent-line); color: var(--vx-accent); font: 700 11px/1 var(--font-body); background: transparent; }
.module .diagram.flow .dg-step:not(:last-child)::after { content: ""; position: absolute; top: 50%; right: -27px; width: 22px; height: 14px; margin-top: -7px; background: var(--vx-line); -webkit-mask: var(--vx-i-arrow) center / contain no-repeat; mask: var(--vx-i-arrow) center / contain no-repeat; }
.module .diagram.flow .dg-title { display: block; }
.module .diagram.lifecycle .dg-track { display: flex; flex-wrap: wrap; align-items: center; row-gap: 34px; }
.module .diagram.lifecycle .dg-state { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 8px 13px; white-space: nowrap; font-size: 13px; }
.module .diagram.lifecycle .dg-state::before { content: ""; width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--vx-line); position: static; }
.module .diagram.lifecycle .dg-state.is-start::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--vx-line); }
.module .diagram.lifecycle .dg-state.is-end { border-width: 3px; border-style: double; padding: 6px 11px; }
.module .diagram.lifecycle .dg-state.is-ref { border-style: dashed; color: var(--vx-muted); font-weight: 500; background: transparent; }
.module .diagram.lifecycle .dg-state.is-key::before { background: var(--vx-accent); }
.module .diagram.lifecycle .dg-edge { position: relative; flex: 1 1 56px; min-width: 44px; max-width: 140px; height: 2px; margin: 0 6px; background: linear-gradient(var(--vx-line), var(--vx-line)) left center / calc(100% - 6px) 1.5px no-repeat; font-size: 11.5px; line-height: 1.25; font-weight: 500; color: var(--vx-muted); text-align: center; }
.module .diagram.lifecycle .dg-edge::after { content: ""; position: absolute; right: 0; top: -4px; width: 9px; height: 10px; background: var(--vx-line); -webkit-mask: var(--vx-i-head) center / contain no-repeat; mask: var(--vx-i-head) center / contain no-repeat; }
.module .diagram.lifecycle .dg-edge > span { position: absolute; left: -4px; right: -4px; bottom: 7px; }
.module .diagram.lifecycle .dg-fork { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--vx-frame); }
.module .diagram.lifecycle .dg-fork-label { display: block; margin: 0 0 22px; font-size: 12px; font-weight: 600; color: var(--vx-muted); }
.module .diagram.lifecycle .dg-fork + .dg-fork { margin-top: 12px; }
.module .diagram.decision .dg-tree { display: flex; flex-direction: column; align-items: center; }
.module .diagram.decision .dg-q { position: relative; max-width: 420px; padding: 10px 14px 10px 36px; text-align: left; font-size: 13.5px; font-weight: 600; }
.module .diagram.decision .dg-q::before { content: "?"; position: absolute; left: 11px; top: 50%; width: 16px; height: 16px; margin-top: -8px; display: flex; align-items: center; justify-content: center; transform: rotate(45deg); border: 1.5px solid var(--vx-accent-line); border-radius: 3px; background: var(--vx-node); font: 700 0/1 var(--font-body); color: transparent; }
.module .diagram.decision .dg-answers { position: relative; display: flex; width: 100%; padding-top: 16px; }
.module .diagram.decision .dg-answers::before { content: ""; position: absolute; top: 0; left: 50%; height: 16px; border-left: 1.5px solid var(--vx-line); }
.module .diagram.decision .dg-answer { position: relative; flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; padding: 12px 8px 0; }
.module .diagram.decision .dg-answer::before { content: ""; position: absolute; top: 0; left: 0; right: 0; border-top: 1.5px solid var(--vx-line); }
.module .diagram.decision .dg-answer:first-child::before { left: 50%; }
.module .diagram.decision .dg-answer:last-child::before { right: 50%; }
.module .diagram.decision .dg-answer:only-child::before { content: none; }
.module .diagram.decision .dg-answer::after { content: ""; position: absolute; top: 0; left: 50%; height: 40px; border-left: 1.5px solid var(--vx-line); }
.module .diagram.decision .dg-a { position: relative; z-index: 1; margin: 0 0 10px; padding: 2px 10px; border-radius: 999px; background: var(--vx-panel); border: 1px solid var(--vx-node-line); font: 700 11px/1.5 var(--font-body); letter-spacing: .04em; text-transform: uppercase; color: var(--vx-muted); }
.module .diagram.decision .dg-out { position: relative; z-index: 1; max-width: 300px; padding: 10px 13px; text-align: center; }
.module .diagram.decision .dg-answer > .dg-q { z-index: 1; }
.module .diagram.decision .dg-answer::before, .module .diagram.decision .dg-answer:first-child::before, .module .diagram.decision .dg-answer:last-child::before { content: ""; left: -20px; right: auto; width: 14px; top: 11px; }
.module .diagram.swimlane .dg-lanes { display: grid; grid-template-columns: 96px repeat(var(--dg-n, 5), minmax(0, 1fr)); grid-auto-rows: minmax(70px, auto); column-gap: 26px; counter-reset: dg-task; }
.module .diagram.swimlane .dg-lanes.n3 { --dg-n: 3; }
.module .diagram.swimlane .dg-lanes.n4 { --dg-n: 4; }
.module .diagram.swimlane .dg-lanes.n5 { --dg-n: 5; }
.module .diagram.swimlane .dg-lanes.n6 { --dg-n: 6; }
.module .diagram.swimlane .dg-lanes.n7 { --dg-n: 7; }
.module .diagram.swimlane .dg-lanes.n8 { --dg-n: 8; }
.module .diagram.swimlane .dg-lane { grid-column: 1 / -1; display: flex; align-items: center; margin: 0 -10px; padding: 0 10px; border-radius: 6px; background: var(--vx-lane-a); font: 700 11px/1.3 var(--font-body); letter-spacing: .07em; text-transform: uppercase; color: var(--vx-muted); }
.module .diagram.swimlane .dg-lane.l2 { background: var(--vx-lane-b); }
.module .diagram.swimlane .dg-lane.l1 { grid-row: 1; }
.module .diagram.swimlane .dg-lane.l3 { grid-row: 3; }
.module .diagram.swimlane .dg-lane + .dg-lane { box-shadow: 0 -1px 0 var(--vx-frame); border-radius: 0; }
.module .diagram.swimlane .dg-task { position: relative; align-self: center; margin: 10px 0; padding: 9px 10px 10px; counter-increment: dg-task; font-size: 12.5px; line-height: 1.4; }
.module .diagram.swimlane .dg-task::before { content: counter(dg-task); display: flex; align-items: center; justify-content: center; width: 18px; height: 18px; margin: 0 0 5px; border-radius: 50%; border: 1px solid var(--vx-accent-line); color: var(--vx-accent); font: 700 10.5px/1 var(--font-body); }
.module .diagram.swimlane .dg-task:not(:last-child)::after { content: ""; position: absolute; top: 50%; right: -23px; width: 18px; height: 12px; margin-top: -6px; background: var(--vx-line); -webkit-mask: var(--vx-i-arrow) center / contain no-repeat; mask: var(--vx-i-arrow) center / contain no-repeat; }
.module .diagram.swimlane .dg-task.l1:has(+ .dg-task:is(.l2, .module .l3))::after, .module .diagram.swimlane .dg-task.l2:has(+ .dg-task.l3)::after { width: 20px; height: 30px; margin-top: -4px; -webkit-mask-image: var(--vx-i-down); mask-image: var(--vx-i-down); }
.module .diagram.swimlane .dg-task.l3:has(+ .dg-task:is(.l1, .module .l2))::after, .module .diagram.swimlane .dg-task.l2:has(+ .dg-task.l1)::after { width: 20px; height: 30px; margin-top: -26px; -webkit-mask-image: var(--vx-i-up); mask-image: var(--vx-i-up); }
.module .diagram.swimlane .dg-task.l1 { grid-row: 1; }
.module .diagram.swimlane .dg-task.l2 { grid-row: 2; }
.module .diagram.swimlane .dg-task.l3 { grid-row: 3; }
.module .diagram.swimlane .s1 { grid-column: 2; }
.module .diagram.swimlane .s2 { grid-column: 3; }
.module .diagram.swimlane .s3 { grid-column: 4; }
.module .diagram.swimlane .s4 { grid-column: 5; }
.module .diagram.swimlane .s5 { grid-column: 6; }
.module .diagram.swimlane .s6 { grid-column: 7; }
.module .diagram.swimlane .s7 { grid-column: 8; }
.module .diagram.swimlane .s8 { grid-column: 9; }
.module .diagram.swimlane .dg-lanes:not(:has(.l3)) { --dg-lanes: 2; }
.module .diagram.swimlane .dg-task.s1 { grid-row: 2; }
.module .diagram.swimlane .dg-task.s2 { grid-row: 3; }
.module .diagram.swimlane .dg-task.s3 { grid-row: 4; }
.module .diagram.swimlane .dg-task.s4 { grid-row: 5; }
.module .diagram.swimlane .dg-task.s5 { grid-row: 6; }
.module .diagram.swimlane .dg-task.s6 { grid-row: 7; }
.module .diagram.swimlane .dg-task.s7 { grid-row: 8; }
.module .diagram.swimlane .dg-task.s8 { grid-row: 9; }
.module .table-wrap table.compare th:not(:first-child), .module .table-wrap table.compare td:not(:first-child) { text-align: center; }
.module .table-wrap table.compare td:first-child, .module .table-wrap table.compare th:first-child { text-align: left; font-weight: 600; color: var(--vx-ink); }
.module .table-wrap table.compare td.yes, .module .table-wrap table.compare td.no, .module .table-wrap table.compare td.partial { white-space: nowrap; font-weight: 600; font-size: 13px; }
.module table.compare td.yes { color: var(--vx-yes); }
.module table.compare td.no { color: var(--vx-no); }
.module table.compare td.partial { color: var(--vx-partial); }
.module table.compare td.yes::before, .module table.compare td.no::before, .module table.compare td.partial::before { content: ""; display: inline-block; width: 14px; height: 14px; margin: 0 6px -2px 0; background: currentColor; -webkit-mask: var(--vx-i-yes) center / contain no-repeat; mask: var(--vx-i-yes) center / contain no-repeat; }
.module table.compare td.no::before { -webkit-mask-image: var(--vx-i-no); mask-image: var(--vx-i-no); }
.module table.compare td.partial::before { -webkit-mask-image: var(--vx-i-partial); mask-image: var(--vx-i-partial); }
.module table.compare td .cell-note { display: block; font-weight: 400; font-size: 12px; color: var(--vx-muted); white-space: normal; }
.module .table-wrap table.compare th:first-child, .module .table-wrap table.compare td:first-child { position: sticky; left: 0; z-index: 1; background: var(--paper); box-shadow: 1px 0 0 var(--doc-line); min-width: 120px; max-width: 160px; }
.module .table-wrap table.compare th:first-child { background: var(--mist); }
.module dl.key-facts { display: flex; flex-wrap: wrap; gap: 1px; margin: 4px 0 26px; padding: 0; max-width: 780px; background: var(--doc-line); border: 1px solid var(--doc-line); border-radius: 10px; overflow: hidden; }
.module dl.key-facts > div { flex: 1 1 140px; min-width: 0; padding: 10px 14px 11px; background: var(--mist); }
.module dl.key-facts dt { margin: 0 0 3px; font: 700 10.5px/1.3 var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--doc-muted); }
.module dl.key-facts dd { margin: 0; font-size: 14px; line-height: 1.45; font-weight: 600; color: var(--doc-ink); }
.module dl.key-facts dd a { color: var(--primary); }
.module figure.diagram, .module .note-box, .module dl.key-facts { break-inside: avoid; page-break-inside: avoid; }
.module .diagram.lifecycle .dg-state.is-tbc, .module .diagram.flow .dg-step.is-tbc, .module .diagram.swimlane .dg-task.is-tbc, .module .diagram.decision .dg-out.is-tbc { border: 1.5px dashed var(--vx-tbc-line) !important; background: transparent !important; box-shadow: none !important; color: var(--vx-muted); font-weight: 500; }
.module .diagram.lifecycle .dg-state.is-tbc::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--vx-tbc-line); }
.module .diagram.lifecycle .dg-state.is-tbc.is-end { border-width: 3px !important; border-style: double !important; }
.module .diagram.lifecycle .dg-edge.is-tbc { background: repeating-linear-gradient(90deg, var(--vx-tbc-line) 0 5px, transparent 5px 9px) left center / calc(100% - 6px) 1.5px no-repeat; font-style: italic; }
.module .diagram.lifecycle .dg-edge.is-tbc::after { background: var(--vx-tbc-line); }
.module .diagram.swimlane .dg-task.is-tbc::before, .module .diagram.flow .dg-step.is-tbc::before { border-style: dashed; border-color: var(--vx-tbc-line); color: var(--vx-muted); }
.module figure.diagram:has(.is-tbc) figcaption::after { content: "Dashed items are steps not shown in this guide\2019s screenshots."; display: block; margin-top: 3px; font-size: 11.5px; color: var(--vx-muted); }
.module .diagram.flow .dg-aside { display: block; margin-top: 8px; padding: 5px 8px; border: 1px dashed var(--vx-node-line); border-radius: 6px; font-size: 11.5px; line-height: 1.4; font-weight: 500; color: var(--vx-muted); }
.module .diagram.timeline .dg-timeline { position: relative; padding: 0 0 40px; }
.module .diagram.timeline .dg-spans { position: relative; z-index: 1; display: grid; row-gap: 14px; }
.module .diagram.timeline .dg-span { margin: 0; }
.module .diagram.timeline .dg-span-label { display: inline-block; max-width: 100%; margin: 0 0 6px; padding-right: 8px; background: var(--vx-panel); font-size: 13px; line-height: 1.4; font-weight: 600; color: var(--vx-ink); }
.module .diagram.timeline .dg-span-label .dg-sub { margin-top: 1px; }
.module .diagram.timeline .dg-bar { position: relative; display: block; height: 14px; }
.module .diagram.timeline .dg-bar::before { content: ""; position: absolute; top: 0; bottom: 0; left: var(--from, 0%); right: calc(100% - var(--to, 100%)); background: var(--vx-accent-soft); border: 1.5px solid var(--vx-accent-line); border-radius: 4px; }
.module .diagram.timeline .dg-span.is-tbc .dg-bar::before { border-style: dashed; border-color: var(--vx-tbc-line); background: transparent; }
.module .diagram.timeline .dg-scale { position: absolute; inset: 0; z-index: 0; }
.module .diagram.timeline .dg-scale::before { content: ""; position: absolute; left: 0; right: 0; bottom: 28px; border-top: 1.5px solid var(--vx-line); }
.module .diagram.timeline .dg-tick { position: absolute; top: 0; bottom: 22px; left: var(--at); width: 0; border-left: 1px dashed var(--vx-frame); }
.module .diagram.timeline .dg-tick::before { content: ""; position: absolute; left: -1px; bottom: 0; height: 12px; border-left: 1.5px solid var(--vx-line); }
.module .diagram.timeline .dg-tick > span { position: absolute; top: 100%; left: 0; transform: translateX(-50%); margin-top: 4px; width: max-content; max-width: 90px; text-align: center; font-size: 12px; line-height: 1.25; color: var(--vx-muted); font-weight: 500; }
.module .diagram.timeline .dg-tick.is-first > span { transform: none; text-align: left; }
.module .diagram.timeline .dg-tick.is-last > span { transform: translateX(-100%); text-align: right; }
.module .diagram.timeline { background-image: none; }
.module .diagram.timeline .dg-tick.is-last { border-left: 2px solid var(--vx-accent); }
.module .diagram.timeline .dg-tick:not(.is-last) { border-left-color: transparent; }
.module .swatch { display: inline-block; width: 11px; height: 11px; margin: 0 6px 0 0; vertical-align: -1px; border-radius: 3px; background: var(--swatch, #c4c5c4); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .14); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.module ul.chapter-map a:not([class]), .module .role-path li a:not([class]) { text-decoration: none; }
.module ul.chapter-map a:not([class]):hover, .module .role-path li a:not([class]):hover { text-decoration: underline; }
.module .table-wrap table.sticky-first th:first-child, .module .table-wrap table.sticky-first td:first-child { position: sticky; left: 0; z-index: 2; background: var(--paper); box-shadow: inset -1px 0 0 var(--doc-line); min-width: 140px; }
.module .table-wrap table.sticky-first thead th:first-child { background: var(--mist); z-index: 3; }
.module .table-wrap table.sticky-first tbody tr:nth-child(even) td:first-child { background: var(--bg-card); }
.module .diagram.flow .dg-steps:has(> .dg-step:nth-child(6)) { grid-auto-flow: row; row-gap: 26px; }
.module .diagram.flow .dg-steps:has(> .dg-step:nth-child(6)) .dg-step { display: grid; grid-template-columns: 28px 1fr; align-items: start; padding: 10px 12px; }
.module .diagram.flow .dg-steps:has(> .dg-step:nth-child(6)) .dg-step::before { margin: 0; grid-row: 1 / span 2; }
.module .diagram.flow .dg-steps:has(> .dg-step:nth-child(6)) .dg-step:not(:last-child)::after { top: auto; bottom: -22px; right: auto; left: 21px; margin: 0; transform: rotate(90deg); width: 18px; }
.module .diagram.swimlane .dg-lanes:is(.n6, .module .n7, .module .n8) { grid-template-columns: repeat(var(--dg-lanes, 3), minmax(0, 1fr)); grid-template-rows: auto repeat(var(--dg-n, 5), auto); grid-auto-rows: auto; column-gap: 8px; row-gap: 0; }
.module .diagram.swimlane .dg-lanes:is(.n6, .module .n7, .module .n8):not(:has(.l3)) { --dg-lanes: 2; }
.module .diagram.swimlane .dg-lanes:is(.n6, .module .n7, .module .n8) .dg-lane { grid-row: 1 / -1; margin: 0; padding: 10px 6px; align-items: flex-start; justify-content: center; text-align: center; font-size: 10.5px; box-shadow: none !important; border-radius: 6px; }
.module .diagram.swimlane .dg-lanes:is(.n6, .module .n7, .module .n8) .dg-lane.l1 { grid-column: 1; grid-row: 1 / -1; }
.module .diagram.swimlane .dg-lanes:is(.n6, .module .n7, .module .n8) .dg-lane.l2 { grid-column: 2; grid-row: 1 / -1; }
.module .diagram.swimlane .dg-lanes:is(.n6, .module .n7, .module .n8) .dg-lane.l3 { grid-column: 3; grid-row: 1 / -1; }
.module .diagram.swimlane .dg-lanes:is(.n6, .module .n7, .module .n8) .dg-task { margin: 0 6px 22px; font-size: 12px; padding: 8px; }
.module .diagram.swimlane .dg-lanes:is(.n6, .module .n7, .module .n8) .dg-task.l1 { grid-column: 1; }
.module .diagram.swimlane .dg-lanes:is(.n6, .module .n7, .module .n8) .dg-task.l2 { grid-column: 2; }
.module .diagram.swimlane .dg-lanes:is(.n6, .module .n7, .module .n8) .dg-task.l3 { grid-column: 3; }
.module .diagram.swimlane .dg-lanes:is(.n6, .module .n7, .module .n8) .dg-task.s1 { grid-row: 2; }
.module .diagram.swimlane .dg-lanes:is(.n6, .module .n7, .module .n8) .dg-task.s2 { grid-row: 3; }
.module .diagram.swimlane .dg-lanes:is(.n6, .module .n7, .module .n8) .dg-task.s3 { grid-row: 4; }
.module .diagram.swimlane .dg-lanes:is(.n6, .module .n7, .module .n8) .dg-task.s4 { grid-row: 5; }
.module .diagram.swimlane .dg-lanes:is(.n6, .module .n7, .module .n8) .dg-task.s5 { grid-row: 6; }
.module .diagram.swimlane .dg-lanes:is(.n6, .module .n7, .module .n8) .dg-task.s6 { grid-row: 7; }
.module .diagram.swimlane .dg-lanes:is(.n6, .module .n7, .module .n8) .dg-task.s7 { grid-row: 8; }
.module .diagram.swimlane .dg-lanes:is(.n6, .module .n7, .module .n8) .dg-task.s8 { grid-row: 9; }
.module .diagram.swimlane .dg-lanes:is(.n6, .module .n7, .module .n8) .dg-task:not(:last-child)::after { display: none; }
.module .chapter-facts { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 0 0 24px; padding: 14px 0 0; border-top: 1px solid color-mix(in srgb, var(--brand) 12%, transparent); }
.module .chapter-facts > div { min-width: 0; }
.module .chapter-facts dt { margin: 0 0 2px; font: 700 10.5px/1.3 var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--doc-muted); }
.module .chapter-facts dd { margin: 0; font-size: 13.5px; line-height: 1.45; font-weight: 600; color: var(--doc-ink); }
.module .rule-card { margin: 4px 0 22px; padding: 14px 18px 14px; max-width: 780px; border: 1px solid var(--line); border-left: 3px solid var(--primary); border-radius: 0 10px 10px 0; background: var(--mist); }
.module .rule-card-flag { margin: 0 0 10px; font-size: 15px; font-weight: 600; color: var(--doc-ink); max-width: none; }
.module .rule-card-k { display: inline-block; margin-right: 8px; font: 700 10.5px/1 var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--primary); }
.module .rule-card-facts { display: grid; grid-template-columns: 1fr auto auto; gap: 6px 24px; margin: 0 0 10px; }
.module .rule-card-facts dt { margin: 0 0 2px; font: 700 10.5px/1.3 var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--doc-muted); }
.module .rule-card-facts dd { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--doc-body); }
.module .rule-card-facts dd code { font-size: 12px; }
.module .rule-card-result { margin: 0; max-width: none; }
.module .rule-card-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; background: #eef8f2; border: 1px solid #cbe9d7; font: 600 12px/1.4 var(--font-body); color: #1e6b47; }
.module .rule-card-logic { grid-column: 1 / -1; }
.module .glossary-az { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--mist); }
.module .glossary-az a, .module .glossary-az span { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 30px; padding: 0 4px; border-radius: 7px; font: 600 13.5px/1 var(--font-body); }
.module .glossary-az a { border: 1px solid var(--line); background: var(--paper); color: var(--primary); text-decoration: none; transition: border-color .15s ease, background .15s ease; }
.module .glossary-az a:hover { border-color: var(--brand); background: var(--brand-wash); }
.module .glossary-az a:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.module .glossary-az span { color: var(--ink-3); }
.module table.glossary td:first-child { font-weight: 600; color: var(--doc-ink); }
.module .faq-list { border-top: 1px solid var(--border); margin: 8px 0 32px; }
.module .faq-item { border-bottom: 1px solid var(--border); }
.module .faq-q { list-style: none; cursor: pointer; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 22px 0; font-size: 17px; font-weight: 600; line-height: normal; letter-spacing: -.01em; color: var(--fg); }
.module .faq-q::-webkit-details-marker { display: none; }
.module .faq-q:hover { color: var(--primary); }
.module .faq-icon { flex: none; width: 24px; height: 24px; position: relative; margin-top: 1px; }
.module .faq-icon::before, .module .faq-icon::after { content: ""; position: absolute; top: 50%; left: 50%; background: var(--primary); transform: translate(-50%, -50%); }
.module .faq-icon::before { width: 14px; height: 2px; }
.module .faq-icon::after { width: 2px; height: 14px; transition: transform .25s var(--ease-site); }
.module .faq-item[open] .faq-icon::after { transform: translate(-50%, -50%) scaleY(0); }
.module .faq-a { padding: 0 44px 26px 0; max-width: 600px; }
.module .faq-a, .module .faq-a p { font-size: 15px; line-height: 1.7; color: var(--mono-500); }
.module .faq-a strong { color: var(--fg); font-weight: 600; }
.module .faq-a > :first-child { margin-top: 0; }
.module .faq-a > :last-child { margin-bottom: 0; }

/* Filipino labels for text the stylesheet adds */
:lang(fil) .module figure.diagram::before { content: "Konseptong diagram"; }
:lang(fil) .module figure.diagram:has(.is-tbc) figcaption::after { content: "Ang mga item na may putol-putol na linya ay mga hakbang na hindi ipinapakita sa mga screenshot ng gabay na ito."; }

/* ─────────────────────────────────────────────────────────────
   Live-guide design: section eyebrows, icon cards, the blue lifecycle band,
   chapter banner with "I want to…" cards, sidebar icons, reveal-on-scroll
   and the hover "lift" used on every card and tab.
   ───────────────────────────────────────────────────────────── */
:root {
  --cta: #352eff;
  --cta-ink: #2a22d6;
  --band-blue: #1a1aee;
  --banner-bg: #f8f8ff;
  --banner-line: #e6e5fb;
  --tile: color-mix(in srgb, var(--brand) 10%, transparent);
  --lift: 0 2px 4px rgba(16, 16, 19, .04), 0 22px 44px -12px rgba(16, 16, 19, .16);
  --ease-out: cubic-bezier(.2, .8, .2, 1);
}
:root[data-theme="dark"] {
  --banner-bg: #1f1c22;
  --banner-line: #37243e;
  --tile: color-mix(in srgb, var(--brand) 15%, transparent);
  --lift: 0 24px 48px -12px rgba(0, 0, 0, .65);
}

/* Section headings on the homepage */
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); }
.eyebrow::before { content: ""; width: 24px; height: 2px; background: currentColor; }
.band > h2 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); font-weight: 700; letter-spacing: -.03em; }
.band > h2 .accent { color: var(--brand); }
.band .lead { font-size: 1.12rem; margin-top: 14px; }

/* Hero */
.hero .btn-primary { background: var(--cta); border-color: var(--cta); color: #fff; }
.hero .btn-primary:hover { background: var(--cta-ink); border-color: var(--cta-ink); }
.hero .btn { border-radius: 0; padding: 13px 22px; }
.facts li::before { content: ""; display: inline-block; vertical-align: -3px; width: 16px; height: 16px; margin-right: 8px; border-radius: 50%; background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4.5 8.2 2.3 2.3 4.7-4.9'/%3E%3C/svg%3E") center / 12px no-repeat; }
.facts .facts-pdf::before { content: "↓"; width: auto; height: auto; background: none; border-radius: 0; color: var(--ink-3); vertical-align: 0; margin-right: 6px; }
.flow-card, .flow-grid button, .flow-icon { border-radius: 0; }

/* What Fyscal ARCX does: 3 × 2 grid with hairline borders */
.cap-grid { gap: 1px; margin-top: 44px; background: var(--line); border: 1px solid var(--line); }
.cap { position: relative; padding: 30px 28px; background: var(--paper); transition: background .3s, transform .3s var(--ease-out), box-shadow .3s; }
.cap::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--brand); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease-out); }
.cap:hover { background: var(--mist); }
.cap:hover::after { transform: scaleX(1); }
.cap-ic, .mod-ic { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 20px; background: var(--tile); color: var(--brand); }
.cap-ic svg, .mod-ic svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 1.2; }
.cap h3 { font-size: 1.05rem; margin-bottom: 10px; }
.cap p { font-size: .92rem; line-height: 1.6; }

/* The AML lifecycle: full-width blue band, four cards joined by dots */
.home > .life-band { position: relative; isolation: isolate; padding-top: 88px; padding-bottom: 88px; margin-top: 88px; color: #fff; }
.life-band::before { content: ""; position: absolute; inset: 0 calc(50% - 50vw); z-index: -1; background: var(--band-blue); }
.life-band .eyebrow { color: rgba(255, 255, 255, .8); }
.life-band > h2 { color: #fff; }
.life-band > h2 .accent { color: #c8d2ff; }
.life-band .lead { color: rgba(255, 255, 255, .82); }
.life { gap: 20px; margin-top: 52px; }
.life li, .life li + li { position: relative; display: flex; flex-direction: column; padding: 28px 26px 24px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .22); transition: background .25s, border-color .25s, transform .35s var(--ease-out), box-shadow .35s; }
.life li:not(:last-child)::after { content: ""; position: absolute; top: 49px; right: -21px; width: 21px; height: 1.5px; background: rgba(255, 255, 255, .55); }
.life li:not(:last-child)::before { content: ""; position: absolute; z-index: 1; top: 46px; right: -14px; width: 7px; height: 7px; border-radius: 50%; background: #fff; }
.life li:hover { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .5); }
.life-top { display: flex; align-items: center; justify-content: space-between; margin: 0; }
.life-ic { display: grid; place-items: center; width: 44px; height: 44px; background: #fff; }
.life-ic svg { width: 22px; height: 22px; stroke: var(--band-blue); stroke-width: 1.5; }
.life-ic svg > :first-child { stroke: #ff00ff; }
.life-no { font-family: var(--mono); font-size: .78rem; letter-spacing: .08em; color: rgba(255, 255, 255, .6); }
.life h3 { margin: 22px 0 8px; font-size: 1.3rem; color: #fff; }
.life li p:not(.life-top):not(.life-links) { flex: 1; color: rgba(255, 255, 255, .8); font-size: .95rem; line-height: 1.6; }
.life-links { flex-direction: column; align-items: flex-start; gap: 8px; margin: 0; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .2); min-height: 76px; }
.life-links a { color: #fff; text-decoration: none; }
.life-links a::after { content: "→"; display: inline-block; margin-left: 6px; transition: transform .2s; }
.life-links a:hover { color: #c8d2ff; }
.life-links a:hover::after { transform: translateX(4px); }
.tune { display: flex; align-items: center; gap: 14px; max-width: none; margin-top: 24px; padding: 14px 20px; border-radius: 0; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .3); color: rgba(255, 255, 255, .9); }
.tune strong { color: #fff; }
.tune a { color: #fff; font-weight: 600; }
.tune-ic { flex: none; display: grid; place-items: center; width: 32px; height: 32px; background: #fff; color: var(--band-blue); font-weight: 700; }

/* Browse the guide by module: icon cards */
.mod-groups { gap: 48px; margin-top: 44px; }
.mod-group h3 { margin: 0 0 16px; align-items: center; }
.mod-group-title { display: inline-flex; align-items: center; gap: 8px; font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--brand); }
.mod-group-title::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.mod-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.mod-card { display: flex; flex-direction: column; height: 100%; padding: 26px 24px 22px; background: var(--mist); border: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: transform .25s var(--ease-out), box-shadow .25s, border-color .25s; }
.mod-top { display: flex; align-items: flex-start; justify-content: space-between; }
.mod-card .mod-ic { width: 48px; height: 48px; margin-bottom: 18px; background: var(--brand); color: var(--on-brand); }
.mod-card .mod-ic svg { stroke-width: 1.6; }
.mod-card .mod-no { font-family: var(--mono); font-size: .78rem; font-weight: 600; letter-spacing: .08em; color: var(--ink-3); }
.mod-card .mod-title { display: block; margin-bottom: 8px; font-size: 1.08rem; font-weight: 700; }
.mod-card .mod-sum { flex: 1; color: var(--ink-2); font-size: .9rem; line-height: 1.6; }
.mod-explore { display: inline-flex; gap: 6px; margin-top: 18px; font-size: .88rem; font-weight: 700; color: var(--brand); transition: gap .2s; }
.mod-card:hover { border-color: var(--brand); }
.mod-card:hover .mod-explore { gap: 11px; }
:root[data-theme="dark"] .mod-card .mod-ic { color: #fff; }

/* Chapter page: breadcrumb bar, banner, "I want to…" cards, chapter map */
.module-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-bottom: 14px; margin-bottom: 26px; border-bottom: 1px solid var(--line); }
.module-bar .crumbs { margin: 0; font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.crumb-here { color: var(--brand); }
.module-bar .ghost { border-radius: 0; }
.chapter-banner { position: relative; padding: 32px 36px 24px; background: var(--banner-bg); border: 1px solid var(--banner-line); }
.sec-tag { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); }
.sec-tag::before { content: ""; width: 24px; height: 2px; background: currentColor; }
.chapter-banner h1 { margin: 0; }
.chapter-banner h1::after { content: ""; display: block; width: 56px; height: 4px; margin-top: 18px; background: var(--brand); }
.chapter-banner .ch-no { display: none; }
.chapter-banner .sec-intro { margin: 20px 0 0; font-size: 1.12rem; line-height: 1.65; color: var(--ink-2); max-width: 48rem; }
.chapter-banner .chapter-facts { margin: 22px 0 0; padding-top: 18px; border-top: 1px solid var(--banner-line); }
.task-cards { margin: 30px 0 0; }
.task-cards-title { margin: 0 0 10px; font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.task-cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.task-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; padding: 14px 18px; background: var(--mist); border: 1px solid var(--line); color: var(--ink); font-weight: 600; line-height: 1.35; text-decoration: none; transition: transform .25s var(--ease-out), box-shadow .25s, border-color .25s, background .25s; }
.task-card:hover { border-color: var(--brand); }
.task-card-arrow { flex: none; color: var(--brand); transition: transform .2s; }
.task-card:hover .task-card-arrow { transform: translateX(4px); }
.checks.chapter-map { margin: 30px 0 8px; padding: 22px 26px; background: var(--mist); border: 1px solid var(--line); }
.checks.chapter-map ul { margin: 0; columns: 2; column-gap: 40px; }
.checks.chapter-map li { break-inside: avoid; margin: 0 0 12px; padding-left: 0; color: var(--ink-2); font-size: .95rem; line-height: 1.55; }
.checks.chapter-map li::before { content: none; }
.checks.chapter-map a { color: var(--brand); font-weight: 500; text-decoration: none; }
.checks.chapter-map a:hover { text-decoration: underline; }

/* Sidebar with module icons */
.sidebar a[data-nav] { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-left: 3px solid transparent; border-radius: 0; transition: background .2s, color .2s, transform .2s var(--ease-out); }
.side-ic { display: grid; place-items: center; flex: none; width: 20px; height: 20px; color: var(--ink-3); transition: color .2s; }
.side-ic svg { width: 20px; height: 20px; stroke: currentColor; }
.sidebar a[data-nav]:hover { transform: translateX(3px); }
.sidebar a[data-nav]:hover .side-ic { color: var(--brand); }
.sidebar a[aria-current="page"] { border-left-color: var(--brand); }
.sidebar a[aria-current="page"] .side-ic { color: var(--brand); }
.side-group + .side-group { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.toc-label { text-transform: uppercase; letter-spacing: .1em; color: var(--ink); }
.toc a { transition: color .2s, padding-left .2s; }
.toc a:hover { padding-left: 16px; color: var(--brand-ink); }

/* Hover "lift": every card and tab pops up a little under the pointer */
.cap:hover, .mod-card:hover, .life li:hover, .task-card:hover, .flow-grid button:hover, .hl:hover, .related-module-card:hover, .pager a:hover, .updates li:hover, .qs li:hover {
  transform: translateY(-4px) scale(1.012); box-shadow: var(--lift); position: relative; z-index: 1;
}
.hl, .qs li, .updates li, .pager a { transition: transform .25s var(--ease-out), box-shadow .25s, background .25s; }
.hl:hover, .qs li:hover, .updates li:hover { background: var(--mist); }
.btn, .ghost, .ask-btn, .search-btn, .icon-btn, .locale-pick select { transition: transform .2s var(--ease-out), box-shadow .2s, background .2s, border-color .2s, color .2s; }
.btn:hover, .ghost:hover, .ask-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px -12px color-mix(in srgb, var(--brand) 70%, transparent); }
.prose figure img { transition: transform .3s var(--ease-out), box-shadow .3s; }
.prose figure:hover img { transform: translateY(-3px); box-shadow: var(--lift); }

/* Reveal on scroll (only when the script runs, so the page never stays hidden) */
.js-reveal .reveal { opacity: 0; translate: 0 18px; transition: opacity .6s var(--ease-out) var(--d, 0s), translate .6s var(--ease-out) var(--d, 0s), transform .25s var(--ease-out), box-shadow .25s, border-color .25s, background .25s; }
.js-reveal .reveal.in { opacity: 1; translate: none; }
@media (prefers-reduced-motion: reduce) {
  .js-reveal .reveal { opacity: 1; translate: none; }
  .cap:hover, .mod-card:hover, .life li:hover, .task-card:hover, .flow-grid button:hover, .hl:hover, .related-module-card:hover, .pager a:hover, .updates li:hover, .qs li:hover, .btn:hover, .ghost:hover, .ask-btn:hover, .sidebar a[data-nav]:hover, .prose figure:hover img { transform: none; }
}

@media (max-width: 1180px) { .mod-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 960px) {
  .mod-cards, .life { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .life li:nth-child(2)::after, .life li:nth-child(2)::before { display: none; }
  .life li:nth-child(n) { padding: 28px 26px 24px; border: 1px solid rgba(255, 255, 255, .22); }
}
@media print { .reveal { opacity: 1 !important; translate: none !important; } .task-cards, .module-bar { display: none !important; } }
@media (max-width: 600px) {
  .mod-cards, .life { grid-template-columns: 1fr; }
  .life li::after, .life li::before { display: none; }
  .chapter-banner { padding: 22px 18px 18px; }
  .checks.chapter-map ul { columns: 1; }
  .tune { align-items: flex-start; }
}
.life-band > h2 { max-width: none; }
@media print { .chapter-banner .ch-no { display: inline; } .chapter-banner { break-inside: avoid; } }

/* Language picker: a compact square box (globe + EN / FIL); the native list of language names
   opens from an invisible select laid over the box. Search and theme buttons match it. */
.locale-pick { gap: 8px; height: 38px; padding: 0 12px; border: 1px solid var(--line); background: var(--mist); color: var(--ink); font-size: .85rem; font-weight: 700; letter-spacing: .02em; cursor: pointer; transition: border-color .2s, transform .2s var(--ease-out), box-shadow .2s; }
.locale-pick svg { position: static; width: 16px; height: 16px; color: var(--ink-2); }
.locale-pick select, .locale-pick select:hover { position: absolute; inset: 0; width: 100%; max-width: none; height: 100%; padding: 0; opacity: 0; cursor: pointer; border: 0; }
.locale-pick:hover, .locale-pick:focus-within { border-color: var(--brand); }
.locale-pick:hover { transform: translateY(-2px); box-shadow: 0 10px 22px -12px color-mix(in srgb, var(--brand) 70%, transparent); }
.locale-pick:focus-within { outline: 2px solid var(--brand); outline-offset: 2px; }
.search-btn { height: 38px; border-radius: 0; }
.theme-btn { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 0; background: var(--mist); }
.theme-btn:hover { border-color: var(--brand); }
.ask-btn { height: 38px; border-radius: 0; }
@media (max-width: 600px) { .locale-pick { padding: 0 9px; } .locale-pick .locale-code { display: none; } .locale-pick select { width: 100%; color: transparent; } }
