/* ==================================================================
   SASE.net site stylesheet (Take C, 2026-11)
   One stylesheet for the guide, the briefs and the category pages.
   Light grey page, white reading cards, one blue accent. Every text
   colour pair meets WCAG AA (4.5:1) on the surface it sits on.
   Public Sans is self-hosted (latin subset, OFL-1.1).
   ================================================================== */
@font-face { font-family: "Public Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/fonts/public-sans-latin-400-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Public Sans"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(/fonts/public-sans-latin-600-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Public Sans"; font-style: normal; font-weight: 700; font-display: swap;
  src: url(/fonts/public-sans-latin-700-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #f1f4f8;        /* page */
  --surface: #ffffff;   /* reading cards */
  --tint: #e8f0fc;      /* callouts, hero */
  --tint-2: #f6f9fd;
  --line: #d6dee8;
  --line-2: #b9c6d6;
  --ink: #0f1e2e;       /* headings */
  --body: #344150;      /* paragraphs: 10.4:1 on white */
  --muted: #556272;     /* meta, labels: 6.1:1 on white, 5.6:1 on --bg */
  --accent: #155ec2;    /* links, buttons: 6.3:1 on white */
  --accent-2: #0e4a9e;  /* hover */
  --navy: #0f2742;      /* footer */
  --navy-text: #c3d0df;
  --focus: #155ec2;
  --font: "Public Sans", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SFMono-Regular", Menlo, monospace;
  --radius: 10px;
  --radius-sm: 6px;
  --header-h: 64px;
  --strip-h: 50px;
  --shell: 1240px;
  --gutter: clamp(16px, 3vw, 32px);
  --shadow: 0 1px 2px rgba(15, 30, 46, .04), 0 8px 24px rgba(15, 30, 46, .05);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + var(--strip-h) + 16px); -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--body); background: var(--bg); font: 400 16px/1.65 var(--font); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; }
a { color: var(--accent); }
a:hover { color: var(--accent-2); }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3, h4, p, blockquote, ul, ol { margin-top: 0; }
h1, h2, h3, h4 { color: var(--ink); text-wrap: balance; }
ul { padding-left: 0; list-style: none; }
::selection { color: #fff; background: var(--accent); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 300; padding: 10px 16px; color: #fff; background: var(--accent); border-radius: var(--radius-sm); text-decoration: none; font-weight: 600; }
.skip:focus { top: 10px; color: #fff; }

/* ------------------------------------------------------------ buttons */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; color: #fff; background: var(--accent); border: 1px solid var(--accent); border-radius: var(--radius-sm); font: 600 15px/1.2 var(--font); text-decoration: none; cursor: pointer; transition: background .15s var(--ease), border-color .15s var(--ease); }
.button:hover { color: #fff; background: var(--accent-2); border-color: var(--accent-2); }
.button-ghost, .button-teal { color: var(--accent); background: var(--surface); border-color: var(--line-2); }
.button-ghost:hover, .button-teal:hover { color: var(--accent-2); background: var(--tint); border-color: var(--accent); }
.btn-ghost { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; color: var(--accent); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius-sm); font: 600 14px var(--font); cursor: pointer; }
.btn-ghost:hover { background: var(--tint); border-color: var(--accent); }

/* ------------------------------------------------------------- header */
.topbar { position: sticky; top: 0; z-index: 100; height: var(--header-h); background: rgba(255, 255, 255, .97); border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; align-items: center; gap: 20px; max-width: var(--shell); height: 100%; margin: 0 auto; padding: 0 var(--gutter); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 700 19px/1 var(--font); letter-spacing: -.01em; white-space: nowrap; }
.brand:hover { color: var(--ink); }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; color: #fff; background: var(--accent); border-radius: 7px; font: 700 17px/1 var(--font); }
.topnav { display: flex; align-items: center; gap: 4px; margin: 0 auto; }
.topnav > a, .menu > summary { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; color: var(--ink); border-radius: var(--radius-sm); font: 600 15px var(--font); text-decoration: none; cursor: pointer; white-space: nowrap; }
.topnav > a:hover, .menu > summary:hover, .menu[open] > summary { color: var(--accent); background: var(--tint); }
.topnav > a[aria-current="page"] { color: var(--accent); }
.menu { position: relative; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary::after { content: ""; width: 7px; height: 7px; margin-left: 2px; border: solid currentColor; border-width: 0 1.6px 1.6px 0; transform: translateY(-2px) rotate(45deg); transition: transform .15s var(--ease); }
.menu[open] > summary::after { transform: translateY(1px) rotate(-135deg); }
.menu-panel { position: absolute; top: calc(100% + 8px); left: 50%; z-index: 120; transform: translateX(-50%); width: max-content; max-width: min(92vw, 720px); padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 16px 40px rgba(15, 30, 46, .14); }
.menu-panel a { display: block; padding: 6px 8px; margin: 0 -8px; color: var(--body); border-radius: var(--radius-sm); font-size: 15px; line-height: 1.35; text-decoration: none; }
.menu-panel a:hover { color: var(--accent); background: var(--tint); }
.menu-panel a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.menu-guide .n { display: inline-block; min-width: 26px; color: var(--muted); font: 500 13px var(--mono); }
.menu-briefs .nav-briefs { display: grid; grid-template-columns: repeat(2, minmax(200px, 1fr)); gap: 6px 32px; }
.menu-briefs .nav-briefs > .nav-label { grid-column: 1 / -1; }
.header-tools { display: flex; align-items: center; gap: 10px; }
.search-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; color: var(--muted); background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); font: 500 14px var(--font); cursor: pointer; }
.search-btn:hover { color: var(--accent); border-color: var(--accent); }
.search-btn svg { width: 16px; height: 16px; }
.topbar .button { min-height: 40px; padding: 0 16px; font-size: 14.5px; }
.menu-toggle { display: none; width: 44px; height: 44px; padding: 13px 11px; background: transparent; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; }
.menu-toggle span { display: block; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s var(--ease), opacity .2s; }
.menu-toggle span + span { margin-top: 5px; }
.topbar.nav-open .menu-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.topbar.nav-open .menu-toggle span:nth-child(2) { opacity: 0; }
.topbar.nav-open .menu-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* shared nav lists (briefs menu, brief library, rail) */
.nav-label { margin: 0 0 6px; color: var(--muted); font: 600 12.5px/1.3 var(--font); letter-spacing: .04em; text-transform: uppercase; }
.nav-label a { display: inline; padding: 0; margin: 0; color: inherit; background: none; font: inherit; text-decoration: none; }
.nav-label a:hover { color: var(--accent); background: none; text-decoration: underline; }
.nav-briefs .arts { margin: 0; }
.nav-briefs .arts .nav-label { margin-top: 10px; color: var(--ink); text-transform: none; letter-spacing: 0; font-size: 14px; }

/* ---------------------------------------------------------- page head */
.page-head { max-width: var(--shell); margin: 0 auto; padding: 22px var(--gutter) 0; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 0; margin: 0; padding: 0; list-style: none; font-size: 14.5px; }
.crumbs li { color: var(--muted); }
.crumbs li + li::before { content: "/"; margin: 0 9px; color: var(--line-2); }
.crumbs a { color: var(--accent); text-underline-offset: 3px; }
.crumbs [aria-current] { color: var(--body); }

/* --------------------------------------------------------- home hero */
.hero { background: var(--tint); border-bottom: 1px solid var(--line); }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 48px; align-items: start; max-width: var(--shell); margin: 0 auto; padding: clamp(40px, 6vw, 76px) var(--gutter) clamp(40px, 5vw, 64px); }
.eyebrow { margin: 0 0 12px; color: var(--accent); font: 600 14.5px/1.3 var(--font); }
.eyebrow .dot { display: none; }
.hero h1 { margin: 0 0 14px; font: 700 clamp(38px, 5.2vw, 62px)/1.04 var(--font); letter-spacing: -.025em; }
.hero h1 em { font-style: normal; }
.hero .h1-sub { margin: 0 0 20px; color: var(--ink); font: 500 clamp(18px, 1.8vw, 22px)/1.4 var(--font); }
.hero-copy > p:not(.eyebrow):not(.h1-sub) { max-width: 60ch; margin: 0 0 12px; color: var(--body); font-size: 17px; line-height: 1.7; }
.hero-copy > p.hero-aside { color: var(--muted); font-size: 15.5px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.library { padding: 24px 26px 26px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.library-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.library-head p { margin: 0; }
.library-title { color: var(--ink); font: 700 19px/1.3 var(--font); }
.library-count { color: var(--muted); font-size: 14px; white-space: nowrap; }
.library .nav-briefs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
.library .nav-briefs > .nav-label { display: none; }
.library .nav-briefs .arts .nav-label { margin: 16px 0 4px; font-size: 13.5px; }
.library .arts > a { display: block; padding: 3px 0; font-size: 15px; line-height: 1.4; text-decoration: none; }
.library .arts > a:hover { text-decoration: underline; }
.library-all { display: inline-block; margin-top: 18px; font-weight: 600; font-size: 15px; text-underline-offset: 3px; }

/* ------------------------------------------------------------ layout */
.doc { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; max-width: var(--shell); margin: 0 auto; padding: 24px var(--gutter) 72px; }
.doc-home { max-width: 1040px; padding-top: 40px; }
.doc-cat { max-width: 1000px; }
.doc-article { grid-template-columns: 228px minmax(0, 1fr); grid-template-areas: "rail main"; align-items: start; }
.doc-article > .doc-main { grid-area: main; max-width: 860px; }
.doc-article > .rail { grid-area: rail; }
.doc-main { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }

/* left rail: the current topic's briefs */
.rail { position: sticky; top: calc(var(--header-h) + 20px); padding-top: 6px; }
.rail .nav-label { margin-bottom: 8px; color: var(--ink); text-transform: none; letter-spacing: 0; font-size: 15px; }
.rail .nav-label a { color: var(--ink); }
.rail a { display: block; padding: 7px 12px; margin-left: -12px; color: var(--body); border-left: 3px solid transparent; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: 15px; line-height: 1.4; text-decoration: none; }
.rail a:hover { color: var(--accent); background: rgba(21, 94, 194, .06); }
.rail a.active { color: var(--ink); background: var(--surface); border-left-color: var(--accent); font-weight: 600; }
.rail .rail-all { margin-top: 12px; color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* "On this page": centered sticky strip with reading progress */
.toc-strip { position: sticky; top: var(--header-h); z-index: 60; display: flex; gap: 4px; justify-content: safe center; min-height: var(--strip-h); align-items: center; overflow-x: auto; padding: 0 20px; background: rgba(255, 255, 255, .97); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); scrollbar-width: none; }
.toc-strip::-webkit-scrollbar { display: none; }
.toc-strip a { flex: none; padding: 6px 12px; color: var(--muted); border-radius: 999px; font: 500 14px/1.3 var(--font); text-decoration: none; white-space: nowrap; }
.toc-strip a:hover { color: var(--accent); background: var(--tint); }
.toc-strip a.active { color: #fff; background: var(--accent); }
.toc-progress { position: sticky; top: calc(var(--header-h) + var(--strip-h) - 3px); z-index: 61; display: block; height: 3px; margin-top: -3px; background: transparent; pointer-events: none; }
.toc-progress::before { content: ""; display: block; height: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(var(--read, 0)); }
.doc-home .toc-strip { border-top: 0; border-radius: var(--radius) var(--radius) 0 0; }

/* -------------------------------------------------- guide sections */
.sec { padding: clamp(36px, 5vw, 60px) clamp(20px, 5vw, 64px); border-bottom: 1px solid var(--line); }
.doc-main > .sec:last-child, .doc-main > article > .sec:last-child { border-bottom: 0; }
.kicker { margin: 0 0 10px; color: var(--accent); font: 600 14.5px/1.3 var(--font); }
.sec h2 { max-width: 30ch; margin: 0 0 18px; font: 700 clamp(28px, 3.2vw, 38px)/1.15 var(--font); letter-spacing: -.02em; }
.sec h2 em { font-style: normal; }
.sec h2 .h2-q { display: block; margin-top: 8px; color: var(--muted); font: 600 clamp(17px, 1.5vw, 19px)/1.4 var(--font); letter-spacing: 0; }
.prose { max-width: 70ch; }
.prose p, .lede { margin: 0 0 18px; color: var(--body); font-size: 17px; line-height: 1.75; }
.prose p:last-child { margin-bottom: 0; }
.lede { max-width: 70ch; color: var(--ink); font-size: 18px; }
.prose strong, .lede strong { color: var(--ink); font-weight: 600; }
.subhead { margin: 40px 0 12px; font: 700 clamp(20px, 2vw, 24px)/1.3 var(--font); letter-spacing: -.01em; }
.prose-lead { max-width: 70ch; margin: 0 0 16px; color: var(--body); font-size: 16.5px; line-height: 1.7; }

.callout { max-width: 72ch; margin: 30px 0 0; padding: 20px 24px; background: var(--tint); border-left: 4px solid var(--accent); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.callout .tag { display: block; margin-bottom: 6px; color: var(--accent); font: 700 14px/1.3 var(--font); }
.callout p { margin: 0; color: var(--ink); font-size: 17px; line-height: 1.65; }
.callout p + p { margin-top: 12px; }
.callout strong { font-weight: 700; }
.keystone { max-width: 72ch; margin: 26px 0 0; padding: 22px 26px; color: var(--ink); background: var(--tint-2); border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: clamp(17px, 1.4vw, 19px); line-height: 1.65; }
.keystone strong { font-weight: 700; }
.keystone em { font-style: normal; color: var(--accent); font-weight: 600; }

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 28px; }
.card, .plane { padding: 20px; background: var(--tint-2); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.card .abbr, .plane .pn { color: var(--accent); font: 700 13px/1.2 var(--mono); letter-spacing: .02em; }
.card h3, .plane h3 { margin: 8px 0 8px; font: 700 18px/1.3 var(--font); }
.card p, .plane p { margin: 0; color: var(--body); font-size: 15px; line-height: 1.6; }
.planes { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 26px 0 20px; }

.refs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 26px; }
.ref { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; color: var(--body); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); text-decoration: none; transition: border-color .15s var(--ease), box-shadow .15s var(--ease); }
.ref:hover { color: var(--body); border-color: var(--accent); box-shadow: var(--shadow); }
.ref .role { color: var(--muted); font: 600 13px/1.3 var(--font); }
.ref b { color: var(--accent); font: 700 16.5px/1.3 var(--font); }
.ref .d { font-size: 14.5px; line-height: 1.55; }
.ref .ext { margin-top: auto; padding-top: 4px; color: var(--accent); font: 600 13.5px var(--font); }

.blist, .dotlist { max-width: 72ch; margin: 18px 0 0; display: grid; gap: 10px; }
.blist li, .dotlist li { position: relative; padding-left: 22px; color: var(--body); font-size: 16.5px; line-height: 1.7; }
.blist li::before, .dotlist li::before { content: ""; position: absolute; left: 4px; top: .72em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.blist li b, .dotlist li strong, .steps li strong { color: var(--ink); font-weight: 600; }
.steps { max-width: 72ch; margin: 18px 0 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 12px; }
.steps li { counter-increment: step; position: relative; padding-left: 42px; color: var(--body); font-size: 16.5px; line-height: 1.7; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 1px; display: grid; place-items: center; width: 28px; height: 28px; color: var(--accent); background: var(--tint); border-radius: 50%; font: 700 14px/1 var(--font); }

blockquote.pull { max-width: 72ch; margin: 32px 0 0; padding: 4px 0 4px 22px; border-left: 4px solid var(--accent); }
blockquote.pull p { margin: 0 0 10px; color: var(--ink); font: 500 clamp(18px, 1.6vw, 21px)/1.5 var(--font); }
blockquote.pull footer { color: var(--muted); font-size: 14.5px; }

.faq { margin-top: 24px; border-top: 1px solid var(--line); }
details.q { border-bottom: 1px solid var(--line); }
details.q summary { display: flex; align-items: center; gap: 16px; padding: 18px 2px; color: var(--ink); cursor: pointer; list-style: none; }
details.q summary::-webkit-details-marker { display: none; }
details.q summary:hover { color: var(--accent); }
details.q summary .qt { flex: 1; font: 600 17.5px/1.4 var(--font); }
details.q summary .mark { flex: none; position: relative; width: 14px; height: 14px; }
details.q summary .mark::before, details.q summary .mark::after { content: ""; position: absolute; top: 50%; left: 0; width: 14px; height: 2px; margin-top: -1px; background: var(--accent); transition: transform .2s var(--ease), opacity .2s; }
details.q summary .mark::after { transform: rotate(90deg); }
details.q[open] summary .mark::after { transform: rotate(0); opacity: 0; }
details.q .qa { max-width: 70ch; padding: 0 0 20px; }
details.q .qa p { margin: 0; color: var(--body); font-size: 16px; line-height: 1.72; }

/* tables */
.tbl-wrap { margin-top: 22px; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.tbl { width: 100%; border-collapse: collapse; background: var(--surface); }
.tbl th, .tbl td { padding: 13px 16px; text-align: left; vertical-align: top; color: var(--body); border-bottom: 1px solid var(--line); font-size: 15px; line-height: 1.6; }
.tbl thead th { color: var(--ink); background: var(--tint); font: 700 14px/1.4 var(--font); vertical-align: bottom; }
.tbl tbody th { width: 1%; color: var(--ink); font-weight: 600; white-space: nowrap; }
.tbl tbody tr:last-child td, .tbl tbody tr:last-child th { border-bottom: 0; }
.tbl tr.is-extra { display: none; }
.tbl.is-open tr.is-extra { display: table-row; }
.tbl-more { margin-top: 14px; }
.tbl-note { max-width: 72ch; margin: 16px 0 0; color: var(--muted); font-size: 15px; line-height: 1.7; }
.tbl-foot { max-width: 72ch; margin: 10px 0 0; color: var(--muted); font-size: 14px; line-height: 1.62; }
.ast { color: var(--accent); font-weight: 700; }
.atag { display: inline-block; margin: 0 4px 4px 0; padding: 1px 8px; border: 1px solid; border-radius: 999px; font: 600 12.5px/1.6 var(--font); }
.atag.cloud { color: var(--muted); border-color: var(--line-2); }
.atag.hybrid { color: #6b3fa0; border-color: #c9b5e3; }
.atag.dist { color: var(--accent); border-color: #a9c4ec; }

/* ------------------------------------------------------------ briefs */
.art-head { padding: clamp(32px, 5vw, 52px) clamp(20px, 5vw, 56px) 0; }
.art-head h1 { margin: 0 0 14px; font: 700 clamp(30px, 4vw, 44px)/1.12 var(--font); letter-spacing: -.022em; }
.art-meta { display: flex; flex-wrap: wrap; gap: 2px 18px; margin: 0; padding-bottom: 22px; color: var(--muted); font-size: 14.5px; border-bottom: 1px solid var(--line); }
.art .sec, .art-sec { padding: 28px clamp(20px, 5vw, 56px) 34px; border-bottom: 0; }
.art .art-intro { padding-top: 26px; }
.art .art-intro .prose p:first-child { color: var(--ink); font-size: 18.5px; line-height: 1.7; }
.art-sec h2 { max-width: 34ch; margin-bottom: 16px; font-size: clamp(25px, 2.6vw, 31px); }
.art-sec .subhead { max-width: 44ch; margin: 34px 0 12px; font-size: clamp(19px, 1.8vw, 22px); }
.art-sec .qhead { max-width: 64ch; margin: 28px 0 10px; font: 600 18px/1.4 var(--font); }
.art-sec .prose + .dotlist, .art-sec .prose + .steps, .art-sec .prose + .tbl-wrap { margin-top: 18px; }
.art-sec .dotlist + .prose, .art-sec .steps + .prose, .art-sec .tbl-wrap + .prose, .art-sec .callout + .prose, .art-sec .callout + .dotlist { margin-top: 22px; }
.art-sec a:not(.button), .sec .prose a, .sec .lede a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.art-sec a:not(.button):hover { color: var(--accent-2); }
.art-sec .tbl tbody th { width: 22%; white-space: normal; }
.art .toc-strip { margin: 0; }

.related { margin: 8px clamp(20px, 5vw, 56px) 0; padding: 28px 0 40px; border-top: 1px solid var(--line); }
.related-label { margin: 0 0 14px; color: var(--ink); font: 700 19px/1.3 var(--font); }
.related ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; }
.related a, .cat-list a { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 16px 18px; color: var(--body); background: var(--tint-2); border: 1px solid var(--line); border-radius: var(--radius-sm); text-decoration: none; transition: border-color .15s var(--ease), background .15s var(--ease); }
.related a:hover, .cat-list a:hover { color: var(--body); background: var(--surface); border-color: var(--accent); }
.related .bt, .cat-list .bt { color: var(--muted); font: 600 13px/1.3 var(--font); }
.related b, .cat-list b { color: var(--accent); font: 700 16.5px/1.3 var(--font); }
.related .bd, .cat-list .bd { font-size: 14.5px; line-height: 1.5; }

/* --------------------------------------------------- category pages */
.cat-head { padding: clamp(32px, 5vw, 52px) clamp(20px, 5vw, 56px) 8px; }
.cat-head h1 { margin: 0 0 18px; font: 700 clamp(32px, 4vw, 44px)/1.12 var(--font); letter-spacing: -.022em; }
.cat-head p { max-width: 68ch; margin: 0 0 16px; color: var(--body); font-size: 17.5px; line-height: 1.72; }
.cat-head p:first-of-type { color: var(--ink); font-size: 18.5px; }
.cat-group { padding: 20px clamp(20px, 5vw, 56px) 8px; }
.cat-group-label { margin: 0 0 12px; color: var(--ink); font: 700 20px/1.3 var(--font); }
.cat-group-label a { color: inherit; text-decoration: none; }
.cat-group-label a:hover { color: var(--accent); text-decoration: underline; }
.cat-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0 0 16px; }
.cat-foot { padding: 12px clamp(20px, 5vw, 56px) 40px; margin: 0; color: var(--muted); font-size: 15px; }

/* -------------------------------------------------------- CTA, about */
.cta-band { background: var(--tint); border-top: 1px solid var(--line); }
.cta-inner { max-width: 860px; margin: 0 auto; padding: clamp(44px, 6vw, 72px) var(--gutter); text-align: center; }
.cta-inner .kicker { margin-bottom: 8px; }
.cta-inner h2 { margin: 0 auto 14px; max-width: 26ch; font: 700 clamp(26px, 3vw, 36px)/1.2 var(--font); letter-spacing: -.02em; }
.cta-inner h2 em { font-style: normal; color: var(--accent); }
.cta-inner > p { max-width: 64ch; margin: 0 auto 24px; color: var(--body); font-size: 16.5px; line-height: 1.7; }
.cta-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 14px 24px; }
.tlink { color: var(--accent); font-weight: 600; text-underline-offset: 3px; }
.cta-note { margin: 22px auto 0 !important; color: var(--muted) !important; font-size: 14px !important; }
.about-band { background: var(--surface); border-top: 1px solid var(--line); }
.about-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px 40px; align-items: center; max-width: var(--shell); margin: 0 auto; padding: clamp(30px, 4vw, 44px) var(--gutter); }
.about-inner h3 { margin: 0 0 6px; font: 700 19px/1.3 var(--font); }
.about-inner p { max-width: 76ch; margin: 0; color: var(--body); font-size: 15.5px; line-height: 1.7; }

/* ------------------------------------------------------------ footer */
.site-footer { color: var(--navy-text); background: var(--navy); }
.footer-inner { max-width: var(--shell); margin: 0 auto; padding: clamp(40px, 5vw, 60px) var(--gutter) 28px; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 32px; }
.footer-brand { margin: 0 0 10px; color: #fff; font: 700 19px/1 var(--font); }
.footer-inner .note { max-width: 46ch; margin: 0; color: var(--navy-text); font-size: 14.5px; line-height: 1.7; }
.footer-col p { margin: 0 0 10px; color: #fff; font: 700 15px/1.3 var(--font); }
.footer-col a, .footer-col button { display: block; padding: 4px 0; color: var(--navy-text); background: none; border: 0; font: 400 15px/1.5 var(--font); text-align: left; text-decoration: none; cursor: pointer; }
.footer-col a:hover, .footer-col button:hover { color: #fff; text-decoration: underline; }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 36px; padding-top: 20px; border-top: 1px solid rgba(195, 208, 223, .25); font-size: 14px; }
.footer-base a { color: var(--navy-text); }
.footer-base a:hover { color: #fff; }
.site-footer :focus-visible { outline-color: #9cc2ff; }

/* ------------------------------------------------------------ search */
.search-dialog { width: min(720px, calc(100% - 32px)); max-height: min(80vh, 760px); margin: 8vh auto auto; padding: 0; color: var(--body); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 24px 60px rgba(15, 30, 46, .25); }
.search-dialog::backdrop { background: rgba(15, 30, 46, .45); }
.search-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.search-dialog-head p { margin: 0; color: var(--ink); font-weight: 700; }
.search-close { width: 36px; height: 36px; color: var(--muted); background: none; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 20px; line-height: 1; cursor: pointer; }
.search-close:hover { color: var(--ink); }
#search { padding: 16px 18px 20px; overflow-y: auto; max-height: calc(min(80vh, 760px) - 66px); --pagefind-ui-primary: #155ec2; --pagefind-ui-text: #0f1e2e; --pagefind-ui-background: #ffffff; --pagefind-ui-border: #b9c6d6; --pagefind-ui-tag: #e8f0fc; --pagefind-ui-border-radius: 6px; --pagefind-ui-font: "Public Sans", sans-serif; --pagefind-ui-scale: .9; }

/* -------------------------------------------------------- responsive */
@media (max-width: 1100px) {
  .menu-toggle { display: block; }
  .topbar-inner { gap: 10px; }
  .topnav { position: absolute; top: var(--header-h); left: 0; right: 0; display: none; flex-direction: column; align-items: stretch; gap: 2px; margin: 0; padding: 10px var(--gutter) 18px; max-height: calc(100vh - var(--header-h)); overflow-y: auto; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: 0 16px 30px rgba(15, 30, 46, .12); }
  .topbar.nav-open .topnav { display: flex; }
  .header-tools { margin-left: auto; }
  .menu-panel { position: static; transform: none; width: auto; max-width: none; margin: 4px 0 8px; padding: 6px 12px 10px; border: 0; border-left: 3px solid var(--line); border-radius: 0; box-shadow: none; }
  .menu-briefs .nav-briefs { grid-template-columns: 1fr; }
  .hero-inner { grid-template-columns: 1fr; gap: 32px; }
  .doc-article { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main" "rail"; }
  .doc-article > .doc-main { max-width: none; }
  .rail { position: static; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  :root { --header-h: 58px; --strip-h: 46px; }
  .search-btn .search-label, .topbar .button .full { display: none; }
  .topbar .button { padding: 0 12px; }
  .cards, .planes, .refs, .related ul, .cat-list { grid-template-columns: 1fr; }
  .library .nav-briefs { grid-template-columns: 1fr; }
  .toc-strip { justify-content: flex-start; padding: 0 12px; }
  .doc { padding-left: 10px; padding-right: 10px; gap: 20px; }
  .tbl, .tbl thead, .tbl tbody, .tbl tr, .tbl th, .tbl td { display: block; width: auto; }
  .tbl thead { display: none; }
  .tbl.is-open tr.is-extra { display: block; }
  .tbl tbody tr { border-bottom: 6px solid var(--bg); }
  .tbl tbody tr:last-child { border-bottom: 0; }
  .tbl tbody th, .art-sec .tbl tbody th { width: auto; white-space: normal; background: var(--tint-2); }
  .tbl td::before { content: attr(data-label); display: block; margin-bottom: 2px; color: var(--muted); font: 700 13px/1.4 var(--font); }
  .about-inner { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 400px) { .brand { font-size: 17px; } .brand-mark { width: 28px; height: 28px; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
@media print {
  .topbar, .toc-strip, .toc-progress, .rail, .cta-band, .site-footer, #site-consent, .search-dialog, .related { display: none !important; }
  body, .doc-main { background: #fff; border: 0; box-shadow: none; }
}

/* ------------------------------------------------------------ consent
   Banner and preferences dialog driven by consent.js (markup in every page).
   Ported from consent.css, restyled to the site palette. */
#site-consent { font: 400 15px/1.55 var(--font); color: var(--body); }
#site-consent *, #site-consent *::before, #site-consent *::after { box-sizing: border-box; }
#site-consent [hidden] { display: none !important; }
#site-consent button, #site-consent input { font: inherit; letter-spacing: normal; text-transform: none; }
#site-consent button { cursor: pointer; }
#site-consent button:focus-visible, #site-consent a:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
#site-consent .consent-banner { position: fixed; bottom: 0; left: 0; z-index: 500; width: 100%; max-height: 70dvh; overflow-y: auto; background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(15, 30, 46, .14); }
#site-consent .consent-banner__inner { display: flex; align-items: center; gap: 28px; max-width: var(--shell); margin: 0 auto; padding: 20px var(--gutter); }
#site-consent .consent-banner__text { flex: 1; }
#site-consent .consent-banner__text p { margin: 0; color: var(--body); }
#site-consent .consent-banner__actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
#site-consent .consent-button { display: inline-flex; align-items: center; justify-content: center; min-width: 150px; min-height: 42px; padding: 8px 18px; color: #fff; background: var(--accent); border: 1px solid var(--accent); border-radius: var(--radius-sm); font-weight: 600; white-space: nowrap; }
#site-consent .consent-button:hover { background: var(--accent-2); border-color: var(--accent-2); }
#site-consent .consent-button--secondary { color: var(--accent); background: var(--surface); border-color: var(--accent); }
#site-consent .consent-button--secondary:hover { color: var(--accent-2); background: var(--tint); }
#site-consent .consent-banner__btn { min-height: 42px; padding: 8px 12px; color: var(--accent); background: transparent; border: 0; font-weight: 600; white-space: nowrap; }
#site-consent .consent-banner__btn:hover { text-decoration: underline; }
#site-consent .consent-policy-link { color: var(--accent); font-weight: 600; }
#site-consent .consent-banner__actions .consent-policy-link { white-space: nowrap; }
#site-consent .consent-settings { position: fixed; bottom: 12px; left: 12px; z-index: 499; padding: 7px 14px; color: var(--body); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius-sm); box-shadow: 0 2px 8px rgba(15, 30, 46, .12); font-size: 14px; }
#site-consent .consent-modal { width: calc(100% - 32px); max-width: 640px; max-height: 85dvh; margin: auto; padding: 0; overflow: hidden; color: var(--body); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); font: inherit; }
#site-consent .consent-modal::backdrop { background: rgba(15, 30, 46, .55); }
#site-consent .consent-modal__content { display: flex; flex-direction: column; max-height: inherit; }
#site-consent .consent-modal__header { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-shrink: 0; padding: 20px 22px 14px; border-bottom: 1px solid var(--line); }
#site-consent .consent-modal__title { margin: 0; color: var(--ink); font: 700 22px/1.3 var(--font); }
#site-consent .consent-modal__close { display: flex; padding: 4px; color: var(--muted); background: none; border: 0; border-radius: 4px; }
#site-consent .consent-modal__close:hover { color: var(--ink); }
#site-consent .consent-modal__body { flex: 1; min-height: 0; padding: 14px 18px; overflow-y: auto; overscroll-behavior: contain; }
#site-consent .consent-modal__description { margin: 0 0 10px; }
#site-consent .consent-modal__signal { margin: 0 0 12px; padding: 8px 12px; color: var(--ink); background: var(--tint); border-radius: var(--radius-sm); }
#site-consent .consent-modal__categories { display: flex; flex-direction: column; gap: 10px; }
#site-consent .consent-category { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
#site-consent .consent-category__header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
#site-consent .consent-category__expand { display: flex; align-items: center; gap: 8px; padding: 0; color: var(--ink); background: none; border: 0; font-size: 16px; font-weight: 700; }
#site-consent .consent-category__expand svg { flex-shrink: 0; transition: transform .15s ease; }
#site-consent .consent-category__expand[aria-expanded="true"] svg { transform: rotate(90deg); }
#site-consent .consent-category__badge { flex-shrink: 0; padding: 2px 10px; color: var(--accent); border: 1px solid #a9c4ec; border-radius: 999px; font-size: 13px; font-weight: 600; }
#site-consent .consent-category__description { margin: 8px 0 0; color: var(--muted); }
#site-consent .consent-category__details { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
#site-consent .consent-category__service { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 2px 0; }
#site-consent .consent-category__service span:first-child { color: var(--ink); font-weight: 600; }
#site-consent .consent-category__service span:last-child { color: var(--muted); font-size: 13.5px; text-align: right; }
#site-consent .consent-toggle { position: relative; display: inline-flex; flex-shrink: 0; width: 44px; height: 24px; margin: 0; cursor: pointer; }
#site-consent .consent-toggle input { position: absolute; width: 100%; height: 100%; margin: 0; opacity: 0; }
#site-consent .consent-toggle__slider { position: absolute; inset: 0; background: #8a97a8; border-radius: 999px; transition: background .15s ease; pointer-events: none; }
#site-consent .consent-toggle__slider::before { content: ""; position: absolute; left: 3px; bottom: 3px; width: 18px; height: 18px; background: #fff; border-radius: 50%; transition: transform .15s ease; }
#site-consent .consent-toggle input:checked + span { background: var(--accent); }
#site-consent .consent-toggle input:checked + span::before { transform: translateX(20px); }
#site-consent .consent-toggle input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
#site-consent .consent-toggle input:disabled + span { opacity: .5; cursor: not-allowed; }
#site-consent .consent-modal__footer { display: flex; justify-content: flex-end; gap: 12px; flex-shrink: 0; padding: 14px 22px; border-top: 1px solid var(--line); }
#site-consent .consent-modal__error { margin: 12px 0 0; color: #b42318; }
@media (max-width: 1023px) {
  #site-consent .consent-banner__inner { flex-direction: column; align-items: stretch; gap: 14px; }
  #site-consent .consent-banner__actions { flex-wrap: wrap; }
}
@media (max-width: 639px) {
  #site-consent .consent-banner__actions, #site-consent .consent-modal__footer { flex-direction: column; }
  #site-consent .consent-banner__actions > button, #site-consent .consent-modal__footer > button { width: 100%; }
  #site-consent .consent-category__service { flex-direction: column; gap: 2px; }
  #site-consent .consent-category__service span:last-child { text-align: left; }
}
@media print { #site-consent { display: none !important; } }
