/* ============================================================================
   Aggregator Solutions · site system
   Sits on top of scrollcraft.css. Brand tokens, chapter grounds, type, chrome,
   and the shared page parts. Page-specific choreography lives in each page.
   ========================================================================== */

:root {
  --navy:  #0a1f5c;  --rich: #1a3a8f;  --mid:  #2563c8;  --bright: #3b82f6;
  --light: #93c5fd;  --pale: #bfdbfe;  --paper: #f0f6ff; --white: #ffffff;

  --sc-canvas:     var(--paper);
  --sc-surface:    var(--white);
  --sc-ink:        var(--navy);
  --sc-ink-soft:   #3a4f86;
  --sc-accent:     var(--mid);
  --sc-accent-ink: var(--white);
  --sc-font-display: "Noto Sans Arabic", system-ui, sans-serif;
  --sc-font-text:    "Noto Sans Arabic", system-ui, sans-serif;
  --sc-shadow-color: 224 80% 14%;
  --sc-leading-body: 1.7;
  --sc-hairline: rgb(10 31 92 / 0.12);
  --sc-hairline-strong: rgb(10 31 92 / 0.2);

  --r-sq: 5px;
  --r: 12px;
  --chrome-h: 72px;
  --col: calc(var(--sc-maxw) + 2 * var(--sc-gutter));
}

body { background: var(--paper); }

/* ------------------------------------------------------------- grounds */
.g-paper { background: var(--paper); }
.g-white { background: var(--white); }
.g-pale  { background: #e4eefc; }
.g-paper, .g-white, .g-pale { color: var(--sc-ink); }
.g-navy, .g-rich {
  --sc-ink: var(--paper); --sc-ink-soft: var(--pale);
  --sc-accent: var(--light); --sc-accent-ink: var(--navy);
  --sc-hairline: rgb(191 219 254 / 0.18);
  --sc-hairline-strong: rgb(191 219 254 / 0.32);
  --sc-shadow-color: 226 80% 6%;
  color: var(--sc-ink);
}
.g-navy { background: var(--navy); }
.g-rich { background: var(--rich); }

/* ---------------------------------------------------------------- type */
h1, h2, h3, h4 { font-family: var(--sc-font-display); margin: 0; text-wrap: balance; }
p, ul, ol, dl, dd, figure { margin: 0; }
.t-display { font-weight: 900; line-height: 0.98; letter-spacing: -0.03em; font-size: clamp(2.6rem, 1.4rem + 5.2vw, 6rem); }
.t-h1 { font-weight: 900; line-height: 1; letter-spacing: -0.03em; font-size: clamp(2.4rem, 1.4rem + 4.2vw, 5.2rem); }
.t-h2 { font-weight: 900; line-height: 1.02; letter-spacing: -0.028em; font-size: clamp(2rem, 1.3rem + 3vw, 4rem); }
.t-h2--sm { font-size: clamp(1.7rem, 1.25rem + 2vw, 2.9rem); }
.t-h3 { font-weight: 700; line-height: 1.14; letter-spacing: -0.018em; font-size: clamp(1.3rem, 1.12rem + 0.8vw, 1.85rem); }
.t-h4 { font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; font-size: var(--sc-t-lg); }
.t-lede { font-size: var(--sc-t-lg); line-height: 1.55; color: var(--sc-ink); max-width: 44ch; text-wrap: pretty; }
.t-body { color: var(--sc-ink-soft); max-width: 62ch; text-wrap: pretty; }
.g-navy .t-body, .g-rich .t-body { letter-spacing: 0.004em; line-height: 1.75; }
.t-label { font-size: var(--sc-t-xs); font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--mid); }
.g-navy .t-label, .g-rich .t-label { color: var(--light); }
.t-small { font-size: var(--sc-t-sm); color: var(--sc-ink-soft); }
.t-num { font-variant-numeric: tabular-nums; }
.prose > * + * { margin-top: var(--sc-4); }
.prose strong { color: var(--sc-ink); font-weight: 700; }
sub, sup { line-height: 0; }

a { color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
.link {
  color: var(--sc-accent); font-weight: 600; text-decoration: underline; border-radius: 3px;
  text-decoration-color: color-mix(in oklab, var(--sc-accent) 45%, transparent);
  transition: text-decoration-color var(--sc-d-fast) var(--sc-ease-out), color var(--sc-d-fast) var(--sc-ease-out);
}
.link:hover { text-decoration-color: currentColor; }
.link:active { color: var(--sc-ink); }
.link--arrow::after { content: " →"; }
.link--back::before { content: "← "; }

:focus-visible { outline: 2px solid var(--sc-accent); outline-offset: 3px; border-radius: 4px; }

/* -------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; gap: 0.6em; white-space: nowrap;
  font-weight: 700; font-size: var(--sc-t-base); line-height: 1;
  padding: 1em 1.4em; border-radius: var(--r); text-decoration: none; cursor: pointer;
  border: 1px solid transparent; font-family: inherit;
  transition: transform var(--sc-d-fast) var(--sc-ease-out), box-shadow var(--sc-d-fast) var(--sc-ease-out), background-color var(--sc-d-fast) var(--sc-ease-out);
}
.btn--primary { background: var(--mid); color: var(--white); box-shadow: var(--sc-e2), inset 0 1px 0 rgb(255 255 255 / 0.18); }
.g-navy .btn--primary, .g-rich .btn--primary { background: var(--light); color: var(--navy); }
.btn--quiet { color: var(--sc-ink); border-color: var(--sc-hairline-strong); background: transparent; }
@media (hover: hover) and (pointer: fine) {
  .btn--primary:hover { transform: translateY(-1px); background: var(--rich); box-shadow: var(--sc-e3), inset 0 1px 0 rgb(255 255 255 / 0.22); }
  .g-navy .btn--primary:hover, .g-rich .btn--primary:hover { background: var(--pale); }
  .btn--quiet:hover { background: color-mix(in oklab, var(--sc-ink) 6%, transparent); }
}
.btn:active { transform: scale(0.97); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; transform: none; }
.actions { display: flex; flex-wrap: wrap; gap: var(--sc-3); }

/* --------------------------------------------------------------- chrome */
.chrome { position: fixed; top: 14px; z-index: var(--sc-z-chrome); }
.folio { left: 14px; }
.chrome-cta-wrap { right: 14px; }
.plate {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 14px 8px 8px; border-radius: var(--r);
  background: rgb(240 246 255 / 0.95); color: var(--navy);
  border: 1px solid rgb(10 31 92 / 0.10);
  box-shadow: 0 1px 2px rgb(10 31 92 / 0.08), 0 6px 18px -8px rgb(10 31 92 / 0.25);
  font-size: var(--sc-t-sm); font-weight: 600; line-height: 1.2;
  transition: background-color var(--sc-d-base) var(--sc-ease-out), color var(--sc-d-base) var(--sc-ease-out), transform var(--sc-d-fast) var(--sc-ease-out);
}
[data-tone="dark"] .plate { background: rgb(10 31 92 / 0.93); color: var(--paper); border-color: rgb(191 219 254 / 0.16); }
.plate img { width: 30px; height: 30px; object-fit: contain; padding: 3px; border-radius: 7px; background: var(--white); box-shadow: inset 0 0 0 1px rgb(10 31 92 / 0.08); }
.folio summary { list-style: none; cursor: pointer; border-radius: var(--r); }
.folio summary::-webkit-details-marker { display: none; }
.folio__num { color: var(--mid); font-weight: 700; }
.folio__num:empty { display: none; }
[data-tone="dark"] .folio__num { color: var(--light); }
.folio__chev { width: 12px; height: 12px; opacity: 0.6; transition: transform var(--sc-d-fast) var(--sc-ease-out); }
.folio details[open] .folio__chev { transform: rotate(180deg); }
@media (hover: hover) and (pointer: fine) { .folio summary:hover .plate, .chrome-cta:hover { transform: translateY(-1px); } }
.folio summary:active .plate, .chrome-cta:active { transform: scale(0.97); }
.folio__panel {
  margin-top: 8px; width: min(320px, calc(100vw - 28px)); max-height: calc(100svh - 90px); overflow: auto;
  border-radius: calc(var(--r) + 4px); background: var(--white); color: var(--navy);
  border: 1px solid rgb(10 31 92 / 0.1); box-shadow: var(--sc-e3), var(--sc-edge);
  padding: var(--sc-2);
  transform-origin: 18px 0; animation: folio-in var(--sc-d-base) var(--sc-ease-out);
}
@keyframes folio-in { from { opacity: 0; transform: translateY(-6px) scale(0.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .folio__panel { animation: none; } }
.folio__panel ol, .folio__panel ul { list-style: none; padding: 0; margin: 0; }
.folio__panel a {
  display: flex; gap: 10px; padding: 10px 12px; border-radius: 8px; text-decoration: none; font-weight: 500; font-size: var(--sc-t-sm); line-height: 1.35;
  transition: background-color var(--sc-d-fast) var(--sc-ease-out), box-shadow var(--sc-d-fast) var(--sc-ease-out);
}
.folio__panel a:hover { background: var(--paper); }
.folio__panel a:active { background: var(--pale); }
.folio__panel a:focus-visible { outline-offset: -2px; }
.folio__panel a[aria-current="page"] { background: var(--paper); font-weight: 700; box-shadow: inset 3px 0 0 var(--mid); }
.folio__panel .sub a { padding-left: 34px; }

/* -------------------------------------------------------------- scrim */
.folio-scrim {
  position: fixed; inset: 0; z-index: calc(var(--sc-z-chrome) - 20);
  background: rgb(10 31 92 / 0.3); backdrop-filter: blur(2px);
  opacity: 0; pointer-events: none; transition: opacity var(--sc-d-base) var(--sc-ease-out);
}
.folio-scrim.is-visible { opacity: 1; pointer-events: auto; }
@media (prefers-reduced-motion: reduce) { .folio-scrim { transition: none; } }
.chrome-cta { text-decoration: none; padding: 12px 16px; font-weight: 700; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--white); color: var(--navy); padding: 10px 14px; border-radius: 8px; font-weight: 700; }
.skip:focus { top: 12px; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ------------------------------------------------------------ layout */
.wrap { width: 100%; max-width: var(--col); margin-inline: auto; padding-inline: var(--sc-gutter); }
.section { padding-block: var(--sc-section); }
.section--tight { padding-block: clamp(3.5rem, 6vw, 7rem); }
.split { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: var(--sc-8); align-items: start; }
.split--center { align-items: center; }
.split--even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.split--wide-left { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); }
.head { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: var(--sc-8); align-items: end; margin-bottom: var(--sc-8); }
.head > div > .t-label { display: block; margin-bottom: var(--sc-3); }
.stack > * + * { margin-top: var(--sc-4); }
.stack > .t-h2, .stack > .t-h1 { margin-top: var(--sc-3); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sc-7) var(--sc-8); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sc-7) var(--sc-7); }
.rule { border: 0; border-top: 1px solid var(--sc-hairline); margin: 0; }

/* ---------------------------------------------------------- page title */
.page-title {
  min-height: min(100svh, 920px); display: grid; align-items: center; position: relative; overflow: clip;
  padding: calc(var(--chrome-h) + var(--sc-7)) 0 var(--sc-8);
}
.page-title__grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: var(--sc-8); align-items: center; }
.page-title__copy > * + * { margin-top: var(--sc-5); }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: var(--sc-t-sm); font-weight: 600; color: var(--sc-ink-soft); list-style: none; padding: 0; }
.crumbs li + li::before { content: "/"; margin-right: 10px; opacity: 0.5; }
.crumbs a { text-decoration: none; border-radius: 3px; }
.crumbs a:hover { text-decoration: underline; color: var(--sc-ink); }
.crumbs a:active { color: var(--sc-accent); }
.page-title__figure { position: relative; }
.page-title__figure svg { width: 100%; height: auto; overflow: visible; }

/* Figures in the title use the drawing language: stroke, no fill. */
.draw { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.draw--accent { stroke: var(--mid); }
.g-navy .draw--accent, .g-rich .draw--accent { stroke: var(--light); }

/* A row of real figures, set as type (never counters without a source). */
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: var(--sc-5) var(--sc-6); border-top: 1px solid var(--sc-hairline); padding-top: var(--sc-5); }
.figures dt { order: 2; font-size: var(--sc-t-sm); color: var(--sc-ink-soft); line-height: 1.45; margin-top: 4px; }
.figures dd { order: 1; font-weight: 900; font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.4rem); letter-spacing: -0.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.figures > div { display: flex; flex-direction: column; }

/* ------------------------------------------------------------ ledger */
.ledger { list-style: none; padding: 0; }
.ledger > li {
  display: grid; grid-template-columns: 3.5rem minmax(0, 0.8fr) minmax(0, 1.2fr); gap: var(--sc-6);
  padding-block: var(--sc-7); border-top: 1px solid var(--sc-hairline-strong); align-items: start;
}
.ledger > li:last-child { border-bottom: 1px solid var(--sc-hairline-strong); }
.ledger__mark { width: 22px; height: 22px; border-radius: var(--r-sq); margin-top: 0.4em; background: var(--mid); }
.ledger__n { font-weight: 900; font-size: var(--sc-t-lg); color: var(--mid); line-height: 1.3; font-variant-numeric: tabular-nums; }
.g-navy .ledger__n, .g-rich .ledger__n { color: var(--light); }
.ledger__body > * + * { margin-top: var(--sc-3); }

.facts { list-style: none; padding: 0; display: grid; gap: 6px; }
.facts li { font-size: var(--sc-t-sm); padding-left: 18px; position: relative; line-height: 1.55; }
.facts li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 7px; height: 7px; border-radius: 2px; background: var(--light); }
.g-paper .facts li::before, .g-white .facts li::before, .g-pale .facts li::before { background: var(--bright); }
.facts--row { display: flex; flex-wrap: wrap; gap: 6px 22px; }

/* ---------------------------------------------------------- process */
.process { list-style: none; padding: 0; counter-reset: step; display: grid; gap: 0; }
.process > li { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: var(--sc-5); padding-block: var(--sc-6); border-top: 1px solid var(--sc-hairline); }
.process > li:last-child { border-bottom: 1px solid var(--sc-hairline); }
.process__n { counter-increment: step; width: 3rem; height: 3rem; border-radius: 10px; display: grid; place-items: center; font-weight: 900; background: var(--navy); color: var(--paper); font-variant-numeric: tabular-nums; }
.g-navy .process__n, .g-rich .process__n { background: var(--light); color: var(--navy); }
.process__body > * + * { margin-top: var(--sc-3); }

/* --------------------------------------------------------- spec lists */
.spec { display: grid; grid-template-columns: max-content 1fr; gap: 6px var(--sc-5); font-size: var(--sc-t-sm); }
.spec dt { color: var(--sc-ink-soft); }
.spec dd { font-weight: 600; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------ panels */
.panel {
  background: var(--white); border-radius: calc(var(--r) + 4px); padding: var(--sc-6);
  border: 1px solid rgb(10 31 92 / 0.08); box-shadow: var(--sc-e1), var(--sc-edge);
}
.panel > * + * { margin-top: var(--sc-3); }
.g-navy .panel, .g-rich .panel { background: rgb(191 219 254 / 0.06); border-color: rgb(191 219 254 / 0.16); box-shadow: none; }
.panel--note { background: #e4eefc; box-shadow: none; border-color: rgb(37 99 200 / 0.18); }
.g-navy .panel--note, .g-rich .panel--note { background: rgb(147 197 253 / 0.12); }
.panel__tag { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: var(--sc-t-sm); color: var(--mid); }
.panel__tag::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: currentColor; }
.g-navy .panel__tag, .g-rich .panel__tag { color: var(--light); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; }
.chips li { font-size: var(--sc-t-xs); font-weight: 600; padding: 5px 10px; border-radius: 7px; background: #e4eefc; color: var(--rich); }
.g-navy .chips li, .g-rich .chips li { background: rgb(191 219 254 / 0.12); color: var(--pale); }

/* ------------------------------------------------------------ tables */
.table-wrap { overflow-x: auto; border-radius: var(--r); border: 1px solid var(--sc-hairline-strong); background: var(--white); -webkit-overflow-scrolling: touch; }
.g-navy .table-wrap, .g-rich .table-wrap { background: rgb(191 219 254 / 0.05); }
.table { width: 100%; border-collapse: collapse; font-size: var(--sc-t-sm); min-width: 640px; }
.table caption { text-align: left; padding: var(--sc-4) var(--sc-5) 0; font-weight: 700; }
.table th, .table td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--sc-hairline); vertical-align: top; line-height: 1.5; }
.table thead th { font-size: var(--sc-t-xs); letter-spacing: 0.1em; text-transform: uppercase; color: var(--sc-ink-soft); font-weight: 600; background: color-mix(in oklab, var(--sc-ink) 4%, transparent); }
.table tbody tr:last-child > * { border-bottom: 0; }
.table tbody th { font-weight: 700; }
.table td.num { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.table .col-us { background: rgb(37 99 200 / 0.06); }
.table-note { margin-top: var(--sc-3); font-size: var(--sc-t-xs); color: var(--sc-ink-soft); max-width: 80ch; }
.level { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; white-space: nowrap; }
.level::before { content: ""; width: 9px; height: 9px; border-radius: 2px; background: var(--level, var(--light)); }

/* ------------------------------------------------------------- quote */
.pull { font-weight: 700; font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2.2rem); line-height: 1.3; letter-spacing: -0.015em; max-width: 34ch; text-wrap: balance; }
.pull cite { display: block; margin-top: var(--sc-4); font-style: normal; font-size: var(--sc-t-sm); font-weight: 600; color: var(--sc-ink-soft); letter-spacing: 0; }

/* ---------------------------------------------------------- intertitle */
.inter { min-height: 80svh; display: grid; align-items: center; padding-block: var(--sc-9); }
.inter__word { font-weight: 900; letter-spacing: -0.045em; line-height: 1; font-size: clamp(4rem, 1.6rem + 13vw, 13rem); padding: 0.06em 0.02em 0.12em; }
.inter__word span { color: var(--light); }

/* ------------------------------------------------------------ rails */
.rail-stage { display: grid; align-content: center; padding-top: calc(var(--chrome-h) + var(--sc-3)); overflow: hidden; }
.rail { gap: var(--sc-5); padding-inline: var(--sc-gutter); align-items: stretch; }
.rail > * { flex: none; }
.rail__lead { width: min(30rem, 78vw); padding-right: var(--sc-5); align-self: center; }
.rail__lead > * + * { margin-top: var(--sc-4); }
.rail__item { width: clamp(17rem, 26vw, 23rem); }
.rail__item.panel { display: flex; flex-direction: column; }
.rail__end { width: min(22rem, 70vw); align-self: center; }

/* --------------------------------------------------------------- faq */
.faq-list details { border-top: 1px solid var(--sc-hairline-strong); }
.faq-list details:last-child { border-bottom: 1px solid var(--sc-hairline-strong); }
.faq-list summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: var(--sc-5);
  padding: var(--sc-5) 0; font-weight: 700; font-size: var(--sc-t-lg); line-height: 1.3; border-radius: 4px;
  transition: color var(--sc-d-fast) var(--sc-ease-out);
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary:hover { color: var(--mid); }
.faq-list summary:active { color: var(--rich); }
.faq-list summary::after { content: ""; flex: none; width: 14px; height: 14px; margin-top: 0.35em; border-radius: 3px; background: var(--pale); transition: transform var(--sc-d-base) var(--sc-ease-out), background-color var(--sc-d-base) var(--sc-ease-out); }
.faq-list details[open] summary::after { transform: rotate(45deg); background: var(--mid); }
.faq-list details > div { padding: 0 0 var(--sc-5); color: var(--sc-ink-soft); max-width: 66ch; }

/* --------------------------------------------------------- next pages */
.next { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: var(--sc-4); list-style: none; padding: 0; }
.next a {
  display: flex; flex-direction: column; gap: 6px; height: 100%; padding: var(--sc-5); border-radius: calc(var(--r) + 2px); text-decoration: none;
  background: var(--white); border: 1px solid rgb(10 31 92 / 0.08); box-shadow: var(--sc-e1);
  transition: transform var(--sc-d-fast) var(--sc-ease-out), box-shadow var(--sc-d-fast) var(--sc-ease-out);
}
.next a strong { font-size: var(--sc-t-lg); line-height: 1.25; }
.next a span { font-size: var(--sc-t-sm); color: var(--sc-ink-soft); }
.next a::after { content: "→"; margin-top: auto; padding-top: var(--sc-3); color: var(--mid); font-weight: 700; }
@media (hover: hover) and (pointer: fine) { .next a:hover { transform: translateY(-2px); box-shadow: var(--sc-e2); } }
.next a:active { transform: scale(0.98); }

/* ------------------------------------------------------- range input */
.range { width: 100%; appearance: none; background: transparent; height: 36px; cursor: pointer; }
.range::-webkit-slider-runnable-track { height: 6px; border-radius: 6px; background: linear-gradient(to right, var(--light) var(--fill, 50%), rgb(191 219 254 / 0.22) var(--fill, 50%)); }
.range::-moz-range-track { height: 6px; border-radius: 6px; background: rgb(191 219 254 / 0.22); }
.range::-moz-range-progress { height: 6px; border-radius: 6px; background: var(--light); }
.range::-webkit-slider-thumb { appearance: none; width: 26px; height: 26px; margin-top: -10px; border-radius: 8px; background: var(--paper); border: 3px solid var(--light); box-shadow: 0 2px 8px rgb(0 0 0 / 0.35); transition: transform var(--sc-d-fast) var(--sc-ease-out); }
.range::-moz-range-thumb { width: 22px; height: 22px; border-radius: 8px; background: var(--paper); border: 3px solid var(--light); }
.range:hover::-webkit-slider-thumb { transform: scale(1.08); }
.range:active::-webkit-slider-thumb { transform: scale(0.95); }
.range:focus-visible { outline-offset: 6px; }
.g-paper .range::-webkit-slider-runnable-track, .g-white .range::-webkit-slider-runnable-track { background: linear-gradient(to right, var(--mid) var(--fill, 50%), rgb(10 31 92 / 0.12) var(--fill, 50%)); }
.g-paper .range::-webkit-slider-thumb, .g-white .range::-webkit-slider-thumb { background: var(--white); border-color: var(--mid); }

/* --------------------------------------------------------- toggles */
.seg { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: calc(var(--r) + 4px); background: rgb(10 31 92 / 0.05); border: 1px solid var(--sc-hairline-strong); }
.g-navy .seg, .g-rich .seg { background: rgb(191 219 254 / 0.08); }
.seg button {
  appearance: none; border: 0; background: transparent; color: var(--sc-ink-soft); cursor: pointer; font: inherit;
  font-weight: 700; font-size: var(--sc-t-sm); padding: 0.85em 1.1em; border-radius: var(--r); white-space: nowrap;
  transition: background-color var(--sc-d-fast) var(--sc-ease-out), color var(--sc-d-fast) var(--sc-ease-out), transform var(--sc-d-fast) var(--sc-ease-out);
}
.seg button:hover { background: color-mix(in oklab, var(--sc-ink) 8%, transparent); color: var(--sc-ink); }
.seg button:active { transform: scale(0.97); }
.seg button[aria-checked="true"], .seg button[aria-pressed="true"], .seg button[aria-selected="true"] { background: var(--mid); color: var(--white); box-shadow: 0 2px 8px -2px rgb(10 31 92 / 0.4), inset 0 1px 0 rgb(255 255 255 / 0.25); }
.g-navy .seg button[aria-checked="true"], .g-rich .seg button[aria-checked="true"],
.g-navy .seg button[aria-selected="true"], .g-rich .seg button[aria-selected="true"] { background: var(--light); color: var(--navy); }

.toggles { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; }
.toggles button {
  appearance: none; font: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
  padding: 0.7em 1em; border-radius: 10px; font-weight: 600; font-size: var(--sc-t-sm);
  background: var(--white); color: var(--navy); border: 1px solid var(--sc-hairline-strong);
  transition: background-color var(--sc-d-fast) var(--sc-ease-out), border-color var(--sc-d-fast) var(--sc-ease-out), transform var(--sc-d-fast) var(--sc-ease-out);
}
.toggles button::before { content: ""; width: 12px; height: 12px; border-radius: 3px; border: 2px solid var(--mid); transition: background-color var(--sc-d-fast) var(--sc-ease-out); }
.toggles button[aria-pressed="true"] { background: #e4eefc; border-color: var(--mid); }
.toggles button[aria-pressed="true"]::before { background: var(--mid); }
.toggles button:hover { border-color: var(--mid); }
.toggles button:active { transform: scale(0.97); }

/* ---------------------------------------------------------- colophon */
.colophon { padding: var(--sc-section) 0 var(--sc-6); }
.colophon__lead { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: var(--sc-8); align-items: start; }
.colophon__lead .t-display { font-size: clamp(2.4rem, 1.4rem + 4.2vw, 5rem); }
.colophon__text > * + * { margin-top: var(--sc-4); }
.colophon__text .t-lede { color: var(--paper); max-width: 40ch; }
.colophon__reader { color: var(--light); font-weight: 600; }
.channels { list-style: none; padding: 0; margin: var(--sc-8) 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--sc-hairline-strong); }
.channels li { padding: var(--sc-5) var(--sc-5) var(--sc-5) 0; min-width: 0; }
.channels li + li { padding-left: var(--sc-5); border-left: 1px solid var(--sc-hairline); }
.channels .t-label { display: block; margin-bottom: var(--sc-2); }
.channels a { font-weight: 600; text-decoration: none; border-radius: 4px; overflow-wrap: anywhere; }
.channels a:hover { text-decoration: underline; }
.channels a:active { color: var(--light); }
.booking {
  margin-top: var(--sc-7); border-radius: calc(var(--r) + 6px); background: var(--white); color: var(--navy);
  padding: var(--sc-6); box-shadow: var(--sc-e3);
  --sc-ink: var(--navy); --sc-ink-soft: #3a4f86; --sc-accent: var(--mid);
}
.booking__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--sc-4); align-items: baseline; }
.booking__head h3 { font-size: var(--sc-t-xl); font-weight: 900; letter-spacing: -0.02em; }
.booking__gate { display: flex; flex-wrap: wrap; gap: var(--sc-5); align-items: center; margin-top: var(--sc-5); padding-top: var(--sc-5); border-top: 1px solid rgb(10 31 92 / 0.1); min-height: 120px; }
.booking__gate p { max-width: 38ch; }
.booking__cal { display: none; margin-top: var(--sc-5); }
.booking__cal iframe { width: 100%; height: 640px; border: 0; border-radius: var(--r); }
.booking.is-open .booking__gate { display: none; }
.booking.is-open .booking__cal { display: block; }
.booking :focus-visible { outline-color: var(--mid); }
.smallprint { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--sc-3) var(--sc-6); margin-top: var(--sc-8); padding-top: var(--sc-5); border-top: 1px solid var(--sc-hairline); font-size: var(--sc-t-xs); color: var(--pale); }
.smallprint nav { display: flex; flex-wrap: wrap; gap: var(--sc-2) var(--sc-5); }
.smallprint a { text-decoration: none; border-radius: 3px; }
.smallprint a:hover { text-decoration: underline; color: var(--paper); }
.smallprint a:active { color: var(--light); }
.disclaimer { margin-top: var(--sc-5); font-size: var(--sc-t-xs); color: var(--pale); max-width: 90ch; opacity: 0.85; }

/* --------------------------------------------------------------- phone */
@media (max-width: 900px) {
  :root { --chrome-h: 64px; }
  .split, .split--even, .split--wide-left, .head, .colophon__lead, .page-title__grid { grid-template-columns: 1fr; gap: var(--sc-6); }
  .head { margin-bottom: var(--sc-7); }
  .grid-2, .grid-3 { grid-template-columns: 1fr; gap: var(--sc-6); }
  .ledger > li { grid-template-columns: 1fr; gap: var(--sc-3); padding-block: var(--sc-6); }
  .process > li { grid-template-columns: 3.5rem minmax(0, 1fr); gap: var(--sc-4); }
  .channels { grid-template-columns: 1fr; }
  .channels li + li { padding-left: 0; border-left: 0; border-top: 1px solid var(--sc-hairline); }
  .channels li { padding: var(--sc-4) 0; }
  .page-title { min-height: 0; padding-top: calc(var(--chrome-h) + var(--sc-6)); }
  .page-title__figure { max-width: 460px; }
  .booking { padding: var(--sc-5); }
}
@media (max-width: 420px) {
  .chrome-cta.plate { padding: 10px 12px; font-size: var(--sc-t-xs); }
  .folio .plate { font-size: var(--sc-t-xs); max-width: calc(100vw - 170px); }
  .folio [data-folio-title] { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

@media (prefers-reduced-motion: reduce) {
  .ln-in > span { animation: none !important; }
  /* Every pinned chapter on this site has a complete static reading, so under
     reduced motion it stops pinning and flows like ordinary content: no held
     screens of scroll with nothing changing, and no stacked steps cut off. */
  [data-sc-act="pin"], [data-sc-act="pan"] { height: auto !important; }
  [data-sc-act="pin"] > [data-sc-stage], [data-sc-act="pan"] > [data-sc-stage] { position: relative !important; top: auto !important; height: auto !important; min-height: 0 !important; overflow: visible; padding-block: var(--sc-section); }
  [data-sc-act="pan"] > [data-sc-stage] { overflow-x: auto; }
}

@media print {
  .chrome, .sc-grain, [data-sc-progress], .booking { display: none !important; }
  .g-navy, .g-rich { background: #fff !important; color: #000 !important; }
}
