/* Golden Bridge v2 — stand-ins for the display face while its file is on the way.
   Cormorant Garamond is much narrower than any system serif, so a heading set in the fallback
   wraps differently and the block under it jumps when the font arrives. These faces are the
   system's own Georgia and Times New Roman scaled to Cormorant's width (measured on the site's
   Russian headings: regular 85.6% and 94.4%, italic 78.5% and 88.1%), so a heading takes the room
   it will need from the first paint. Manrope has the width of Arial and Segoe UI within 1%, and
   needs none. Android has neither of the two: there its own serif (Noto Serif) stands in, scaled
   by an estimate from the published widths of the faces (80%, italic 74%), not measured on a device. */
@font-face { font-family: "GB Serif Fallback A"; src: local("Noto Serif"), local("NotoSerif"), local("Noto Serif Regular"); size-adjust: 80%; }
@font-face { font-family: "GB Serif Fallback A"; font-style: italic; src: local("Noto Serif Italic"), local("NotoSerif-Italic"); size-adjust: 74%; }
@font-face { font-family: "GB Serif Fallback"; src: local("Georgia"); size-adjust: 85.6%; }
@font-face { font-family: "GB Serif Fallback"; font-style: italic; src: local("Georgia Italic"), local("Georgia-Italic"); size-adjust: 78.5%; }
@font-face { font-family: "GB Serif Fallback T"; src: local("Times New Roman"), local("TimesNewRomanPSMT"); size-adjust: 94.4%; }
@font-face { font-family: "GB Serif Fallback T"; font-style: italic; src: local("Times New Roman Italic"), local("TimesNewRomanPS-ItalicMT"); size-adjust: 88.1%; }

/* Golden Bridge v2 — design system, shell and shared parts.
   Night stage, gold light, ivory type. Gold is the firm's own work; teal has one meaning only:
   the decision of the bank or the investor. Sizes follow --u, one hundredth of a 16:9 stage that
   fits the window, so a frame keeps its proportions on a short laptop screen as well. */

/* Neither of the site's fonts has the tenge sign. In running text it comes from one chosen system
   sans face on every platform instead of whatever the fallback chain would pick (in prices it is
   drawn, see .price-c). */
@font-face { font-family: "GB Tenge"; src: local("Segoe UI Light"), local("Segoe UI"), local("Roboto"), local("Noto Sans"), local("Helvetica Neue"), local("Arial"); unicode-range: U+20B8; }

:root {
  --bg: #0b0a08; --bg-deep: #070605; --surface: #13110d; --surface-2: #1b1812;
  --fg: #f2e9d8; --fg-soft: rgba(242, 233, 216, 0.84); --fg-2: #b4a990; --fg-3: #948b78;
  --accent: #d9b260; --accent-hi: #f6dc9c; --accent-lo: #a37a2c; --accent-ink: #1d1508; --teal: #7fcfc8;
  --rule: rgba(217, 178, 96, 0.16); --rule-2: rgba(217, 178, 96, 0.3); --line: rgba(217, 178, 96, 0.26);
  --panel: rgba(15, 13, 10, 0.9);
  --gold-grad: linear-gradient(100deg, #f6dc9c 0%, #d9b260 52%, #c08f3c 100%);
  --serif: "GB Tenge", "Cormorant Garamond", "GB Serif Fallback", "GB Serif Fallback T", "GB Serif Fallback A", Georgia, serif;
  --sans: "GB Tenge", "Manrope", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, Menlo, "Roboto Mono", monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1); --ease-out: cubic-bezier(0.19, 0.8, 0.2, 1);
  --u: min(1vw, 1.78vh);
  --gx: clamp(20px, 6.25vw, 120px);
  --max: 1680px;
  --top-h: 76px;
  --bar-h: 0px;
  --fs-h1: clamp(2.6rem, calc(var(--u) * 6.46), 7.75rem);
  --fs-h2: clamp(2.1rem, calc(var(--u) * 4.8), 5.75rem);
  --fs-h3: clamp(1.4rem, calc(var(--u) * 2.08), 2.5rem);
  --fs-stmt: clamp(1.75rem, calc(var(--u) * 3.85), 4.6rem);
  --fs-lede: clamp(1.06rem, calc(var(--u) * 1.51), 1.8rem);
  --fs-side: clamp(1rem, calc(var(--u) * 1.3), 1.56rem);
  --fs-txt: clamp(1rem, calc(var(--u) * 1.25), 1.5rem);
  --fs-sm: clamp(0.94rem, calc(var(--u) * 1.1), 1.3rem);
  --fs-lbl: clamp(0.75rem, calc(var(--u) * 0.83), 1rem);
  --fs-eb: clamp(0.75rem, calc(var(--u) * 0.99), 1.19rem);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--top-h) + 12px); scrollbar-color: var(--accent-lo) var(--bg-deep); background: var(--bg); }
@media (prefers-reduced-motion: no-preference) { html:not([data-motion="off"]) { scroll-behavior: smooth; } }
body {
  margin: 0; min-height: 100vh; overflow-x: hidden; color: var(--fg); font: 400 1rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  /* The still poster under the canvas: there is never a black flash between pages. */
  background: radial-gradient(70% 60% at 76% 22%, rgba(168, 112, 36, 0.3), transparent 70%), radial-gradient(50% 50% at 18% 82%, rgba(38, 92, 94, 0.14), transparent 70%), var(--bg);
  background-attachment: fixed;
}
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 4px; border-radius: 4px; }
::selection { background: rgba(217, 178, 96, 0.34); color: #fff; }
[hidden] { display: none !important; }
/* Hidden from the eye, present for screen readers. (A table ignores `width` unless it is a block.) */
.sr { position: absolute; display: block; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip { position: fixed; left: 16px; top: -80px; z-index: 110; padding: 12px 18px; border-radius: 999px; background: var(--accent-hi); color: var(--accent-ink); font: 700 0.9rem/1 var(--sans); text-decoration: none; transition: top 0.2s; }
.skip:focus { top: 12px; }

/* ------------------------------------------------------------ the stage */
#scene { position: fixed; inset: 0; z-index: 0; width: 100%; height: 100%; }
.no-js #scene { display: none; }
/* Without scripts a still drawing of the bridge takes the place of the live scene. */
.still { display: none; }
/* It also stands in when scripts were expected but the scene did not start (a failed request). */
.no-js .still, .late:not(.scene-on) .still, .no-scene .still { display: block; position: absolute; right: 1.5vw; top: calc(100vh - 17vh - min(40vw, 620px) * 0.3); z-index: 0; width: min(40vw, 620px); opacity: 0.42; pointer-events: none; }
@media (max-width: 860px) { .no-js .still, .late:not(.scene-on) .still, .no-scene .still { opacity: 0.2; } }
/* The bottom row is operated by the main script: without it the row is not shown. */
.no-js .hud, .late .hud { display: none; }
.veil {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(520px 420px at var(--mx, 50%) var(--my, 50%), rgba(246, 220, 156, 0.045), transparent 70%),
    radial-gradient(130% 100% at 50% 46%, transparent 52%, rgba(0, 0, 0, 0.62) 100%);
}
main, .foot { position: relative; z-index: 1; }

/* ----------------------------------------------------------------- type */
.eb { display: flex; align-items: center; gap: clamp(10px, 0.94vw, 18px); font: 500 var(--fs-eb)/1.2 var(--mono); letter-spacing: 0.3em; text-transform: uppercase; color: var(--accent); }
.eb::before { content: ""; flex: none; width: clamp(28px, 2.7vw, 52px); height: 1px; background: linear-gradient(90deg, rgba(217, 178, 96, 0), var(--accent)); }
.eb--bare::before { display: none; }
.h1 { font: 500 var(--fs-h1)/0.98 var(--serif); letter-spacing: -0.012em; color: var(--fg); text-wrap: balance; }
.h1--page { font-size: clamp(2.2rem, calc(var(--u) * 4.3), 5.2rem); line-height: 1.02; }
.h1--long { font-size: clamp(1.9rem, calc(var(--u) * 3.3), 4rem); line-height: 1.06; }
.h2 { font: 500 var(--fs-h2)/1.02 var(--serif); letter-spacing: -0.01em; color: var(--fg); text-wrap: balance; }
.h2--sm { font-size: clamp(1.8rem, calc(var(--u) * 3.3), 4rem); line-height: 1.05; }
.h3 { font: 600 var(--fs-h3)/1.1 var(--serif); color: var(--fg); }
.em, .h1 em, .h2 em { font-style: italic; padding-right: 0.09em; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
/* A word that must stay whole on one line (a hyphenated word in display type: «Excel-модели»). */
.nw { white-space: nowrap; }
.ln { display: block; overflow: hidden; padding: 0 0.14em 0.16em 0; margin: 0 -0.14em -0.16em 0; }
.ln > span { display: inline-block; }
.lede { font: 400 var(--fs-lede)/1.5 var(--sans); color: var(--fg-soft); text-wrap: pretty; }
.side { font: 400 var(--fs-side)/1.55 var(--sans); color: var(--fg-2); text-wrap: pretty; }
.side b, .txt b { color: var(--fg); font-weight: 600; }
.txt { font: 400 var(--fs-txt)/1.55 var(--sans); color: var(--fg-soft); }
.sm { font: 400 var(--fs-sm)/1.5 var(--sans); color: var(--fg-2); }
.ttl { font: 600 var(--fs-h3)/1.1 var(--serif); color: var(--fg); }
.lbl { font: 500 max(0.75rem, var(--fs-lbl))/1.25 var(--mono); letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent); }
.lbl--mute { color: var(--fg-2); }
.stmt { font: 500 var(--fs-stmt)/1.13 var(--serif); letter-spacing: -0.005em; color: var(--fg); text-wrap: pretty; }
/* The serif face draws old-style figures by default («30» reads as letters, the 4 of «Big4» drops
   under the line): display type always uses lining figures. The `font` shorthand resets this, so
   the rule stands after the classes above. */
.h1, .h2, .h3, .ttl, .stmt { font-variant-numeric: lining-nums; }
/* Notes that qualify a claim are part of the firm's voice: reading size, never tiny. */
.fine { font: 400 clamp(0.94rem, calc(var(--u) * 1.02), 1.16rem)/1.55 var(--sans); color: var(--fg-2); max-width: 66em; }
.fine a, .txt a, .side a, .lede a { color: var(--accent-hi); text-decoration-color: var(--line); text-underline-offset: 0.2em; }
.tring { display: inline-block; width: 0.86em; height: 0.86em; margin-right: 0.5em; vertical-align: -0.06em; flex: none; fill: none; stroke: var(--teal); stroke-width: 1.7; }
.frame p, .frame h1, .frame h2, .frame h3, .frame li, .frame dt, .frame dd { text-shadow: 0 2px 18px rgba(11, 10, 8, 0.92), 0 0 2px rgba(11, 10, 8, 0.6); }
.frame .em, .frame em, .frame .btn, .frame .btn span, .panel p, .panel h3, .panel li, .panel dt, .panel dd { text-shadow: none; }

/* A price set as type: small «от», display numerals, the tenge sign in the text face. */
.price { white-space: nowrap; font-variant-numeric: lining-nums tabular-nums; }
.price-from { margin-right: 0.3em; font: 500 clamp(0.75rem, 0.3em, 1.05rem)/1 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg-2); }
.price-n { font-family: var(--serif); font-weight: 500; }
/* The tenge sign is drawn, not typed: neither of the site's fonts has the glyph, and a system
   fallback would look different on every device. The real character stays for copying and for
   screen readers. */
/* The sign is sized from the numeral beside it (the height of a figure, never under 9 x 12 px);
   its strokes are as heavy as the stems of the figures. */
.price-c { font-size: 1em; color: var(--accent); white-space: nowrap; }
.price-c::before { content: ""; display: inline-block; width: 0.46em; height: 0.62em; min-width: 9px; min-height: 12px; margin-left: 0.17em; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 15 20'%3E%3Cpath d='M0.500 2h14M0.500 6.800h14M7.500 6.800v13.200' fill='none' stroke='%23000' stroke-width='2.600'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 15 20'%3E%3Cpath d='M0.500 2h14M0.500 6.800h14M7.500 6.800v13.200' fill='none' stroke='%23000' stroke-width='2.600'/%3E%3C/svg%3E") center / contain no-repeat; }
.price-c > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.fmts { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.fmts span { padding: 0.34em 0.7em; border: 1px solid var(--line); border-radius: 6px; font: 500 clamp(0.75rem, calc(var(--u) * 0.86), 1rem)/1.2 var(--mono); letter-spacing: 0.06em; color: var(--fg-2); white-space: nowrap; }

/* --------------------------------------------------------------- reveal */
.js .rv { opacity: 0; transform: translateY(34px); }
.js .on .rv, .js .rv.on { opacity: 1; transform: none; transition: opacity 0.9s var(--ease) calc(0.12s + var(--d, 0) * 0.09s), transform 0.9s var(--ease) calc(0.12s + var(--d, 0) * 0.09s); }
/* The opening frame of a page: its lede and its actions are the largest text of the first screen.
   They are painted with the page and only rise a little; they never wait for the script. */
.js :is(.h-hero, .p-hero) :is(.lede, .acts-row).rv { opacity: 1; transform: translateY(14px); }
.js .on:is(.h-hero, .p-hero) :is(.lede, .acts-row).rv { transform: none; transition: transform 0.9s var(--ease) 0.12s; }
.js .ln > span { transform: translateY(108%); }
.js .on .ln > span, .js .ln.on > span { transform: none; transition: transform 1.1s var(--ease-out) calc(0.06s + var(--d, 0) * 0.11s); }
.w { display: inline-block; }
.js .words .w { opacity: 0; transform: translateY(0.35em); filter: blur(6px); }
.js .on .words .w, .js .words.on .w { opacity: 1; transform: none; filter: none; transition: opacity 0.9s var(--ease) calc(var(--b, 0.3s) + var(--i, 0) * 0.03s), transform 0.9s var(--ease) calc(var(--b, 0.3s) + var(--i, 0) * 0.03s), filter 0.9s var(--ease) calc(var(--b, 0.3s) + var(--i, 0) * 0.03s); }
.draw { stroke-dasharray: 1; stroke-dashoffset: 1; }
.js .on .draw { stroke-dashoffset: 0; transition: stroke-dashoffset 1.6s cubic-bezier(0.4, 0.1, 0.2, 1) calc(0.35s + var(--i, 0) * 0.16s); }
/* Still states: no scripts, a late script, motion switched off by the visitor or by the system. */
.no-js .draw, .late .draw, [data-motion="off"] .draw { stroke-dashoffset: 0 !important; transition: none !important; }
.js :is(.fix, .d-fix) svg { clip-path: inset(-3px 100% -3px -3px); }
.js .on :is(.fix, .d-fix) svg { clip-path: inset(-3px); transition: clip-path 1.1s cubic-bezier(0.4, 0.1, 0.2, 1) 0.9s; }
.late :is(.fix, .d-fix) svg, [data-motion="off"] :is(.fix, .d-fix) svg { clip-path: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) { :is(.fix, .d-fix) svg { clip-path: none !important; transition: none !important; } }
@media print { :is(.fix, .d-fix) svg { clip-path: none !important; } }
.late .rv, .late .ln > span, .late .words .w, [data-motion="off"] .rv, [data-motion="off"] .ln > span, [data-motion="off"] .words .w { opacity: 1 !important; transform: none !important; filter: none !important; transition: none !important; }

/* -------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; gap: 14px; padding: 11px 28px 11px 12px; border-radius: 999px;
  border: 1px solid rgba(217, 178, 96, 0.55); background: linear-gradient(180deg, rgba(246, 220, 156, 0.16), rgba(217, 178, 96, 0.06));
  font: 700 clamp(0.96rem, calc(var(--u) * 1.14), 1.38rem)/1.1 var(--sans); letter-spacing: 0.02em; color: var(--fg); text-decoration: none;
  box-shadow: 0 10px 40px rgba(217, 178, 96, 0.12); cursor: pointer; position: relative; overflow: hidden;
  transition: box-shadow 0.25s, border-color 0.25s, background 0.25s, transform 0.2s;
}
.btn:hover { border-color: var(--accent-hi); box-shadow: 0 12px 50px rgba(217, 178, 96, 0.32); }
.btn:active { transform: scale(0.98); }
.btn > i { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(180deg, var(--accent-hi), var(--accent)); color: var(--accent-ink); }
.btn > i svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn > i svg.fill { width: 18px; height: 18px; fill: currentColor; stroke: none; }
/* One sweep of light across a main button when it appears. */
.btn::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(246, 220, 156, 0.34) 50%, transparent 70%); transform: translateX(-120%); pointer-events: none; }
.js .on .btn::after { animation: sweep 1.3s var(--ease) 1.1s 1 both; }
@keyframes sweep { to { transform: translateX(120%); } }
.btn--ghost { border-color: var(--line); background: rgba(15, 13, 10, 0.6); box-shadow: none; font-weight: 600; }
.btn--ghost > i { background: rgba(217, 178, 96, 0.1); border: 1px solid var(--line); color: var(--accent-hi); }
.btn--ghost::after { display: none; }
.btn--sm { padding: 7px 18px 7px 8px; gap: 10px; font-size: 0.9rem; }
.btn--sm > i { width: 28px; height: 28px; }
.btn--sm > i svg { width: 13px; height: 13px; }
.btn--sm > i svg.fill { width: 15px; height: 15px; }
.btn--xl { padding: 14px 36px 14px 14px; font-size: clamp(1.05rem, calc(var(--u) * 1.4), 1.7rem); }
.btn--xl > i { width: clamp(40px, calc(var(--u) * 2.6), 50px); height: clamp(40px, calc(var(--u) * 2.6), 50px); }
.btn--full { width: 100%; justify-content: flex-start; }
.lnk { display: inline-flex; align-items: center; gap: 10px; padding-bottom: 5px; border-bottom: 1px solid var(--line); font: 600 var(--fs-sm)/1.2 var(--sans); color: var(--accent-hi); text-decoration: none; transition: border-color 0.25s, gap 0.3s var(--ease); }
.lnk:hover { border-color: var(--accent-hi); gap: 16px; }
.lnk svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.acts-row { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(14px, 1.6vw, 30px); }

/* --------------------------------------------------------------- header */
.prog { position: fixed; inset: 0 0 auto 0; z-index: 50; height: 2px; background: rgba(217, 178, 96, 0.12); pointer-events: none; }
.prog i { position: absolute; inset: 0; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--accent-lo), var(--accent-hi)); box-shadow: 0 0 18px rgba(246, 220, 156, 0.6); }
/* The width of the Telegram control follows the size of its second line: the longest line it can
   show (a range and a term, 39 characters) fits, so nothing is ever cut. */
:root { --dock-fs: clamp(0.75rem, calc(var(--u) * 0.86), 0.94rem); --dock-w: calc(77px + var(--dock-fs) * 20.2); }
/* The header row. Its box never moves (nothing fixed inside it can be clipped): on the way down
   the brand, the links, the menu button and the band behind them slide out of it, and the Telegram
   control stays where it is. The row itself lets the pointer through. */
.top { position: fixed; inset: 0 0 auto 0; z-index: 40; height: var(--top-h); display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 var(--gx); pointer-events: none; }
.top > * { pointer-events: auto; }
.top::before { content: ""; position: absolute; inset: 0 0 -34px 0; z-index: -1; pointer-events: none; background: linear-gradient(180deg, rgba(11, 10, 8, 0.92), rgba(11, 10, 8, 0.6) 60%, rgba(11, 10, 8, 0)); }
.top::before, .top > .brand, .top > .nav, .top .burger { transition: transform 0.5s var(--ease); }
.top.is-away::before, .top.is-away > .brand, .top.is-away > .nav, .top.is-away .burger { transform: translateY(calc(-1 * var(--top-h) - 48px)); }
/* A link of the header that has the keyboard focus brings the row back. */
.top.is-away:has(:focus-visible)::before, .top.is-away:has(:focus-visible) > .brand, .top.is-away:has(:focus-visible) > .nav, .top.is-away:has(:focus-visible) .burger { transform: none; }
/* Over a scrolled page, and where no script will ever report the scroll, the band is opaque. */
.is-scrolled .top::before, .no-js .top::before, .late .top::before { background: linear-gradient(180deg, #0a0907 0, #0a0907 calc(var(--top-h) + 2px), rgba(10, 9, 7, 0) 100%); }
.brand { flex: none; display: flex; align-items: center; gap: 14px; text-decoration: none; white-space: nowrap; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7); }
.brand img { width: 46px; height: auto; filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.6)); }
.brand b { display: block; font: 600 clamp(0.75rem, calc(var(--u) * 0.84), 0.9rem)/1.2 var(--mono); letter-spacing: 0.2em; text-transform: uppercase; color: var(--fg); }
.brand small { display: block; margin-top: 5px; font: 400 clamp(0.75rem, calc(var(--u) * 0.78), 0.84rem)/1.2 var(--mono); letter-spacing: 0.2em; text-transform: uppercase; color: var(--fg-2); }
.nav-links { display: flex; align-items: center; gap: clamp(12px, calc(2.4vw - 9px), 34px); }
.nav-links a { position: relative; padding: 12px 0; font: 500 clamp(0.75rem, calc(var(--u) * 0.84), 0.9rem)/1 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg-2); text-decoration: none; transition: color 0.25s; }
/* A window just wide enough for the links (1241-1340px): they stand closer, and never wrap. */
.nav-links a { white-space: nowrap; }
@media (max-width: 1340px) { .nav-links { gap: 15px; } .nav-links a { letter-spacing: 0.11em; } }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 6px; height: 1px; background: var(--accent-hi); transform: scaleX(0); transform-origin: 0 50%; transition: transform 0.45s var(--ease); }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--accent-hi); }
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { transform: scaleX(1); }
.top-act { display: flex; align-items: center; gap: 12px; }
.burger { display: none; align-items: center; gap: 10px; height: 44px; padding: 0 16px 0 14px; border-radius: 999px; border: 1px solid var(--line); background: rgba(15, 13, 10, 0.6); text-decoration: none; font: 500 0.75rem/1 var(--mono); letter-spacing: 0.18em; text-transform: uppercase; color: var(--fg); }
.burger i { display: block; width: 16px; height: 1.5px; margin: 3px 0; background: var(--fg); }

/* The Telegram control that follows the visitor's context. */
.dock { display: inline-flex; align-items: center; gap: 12px; padding: 6px 20px 6px 7px; border-radius: 999px; border: 1px solid rgba(217, 178, 96, 0.55); background: linear-gradient(180deg, rgba(40, 32, 18, 0.92), rgba(22, 18, 11, 0.92)); color: var(--fg); text-decoration: none; box-shadow: 0 10px 40px rgba(217, 178, 96, 0.14); transition: opacity 0.35s, visibility 0s, transform 0.4s var(--ease), border-color 0.25s, box-shadow 0.25s; }
.dock:hover { border-color: var(--accent-hi); box-shadow: 0 12px 50px rgba(217, 178, 96, 0.32); }
.dock > i { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(180deg, var(--accent-hi), var(--accent)); color: var(--accent-ink); }
.dock > i svg { width: 18px; height: 18px; fill: currentColor; }
.dock > span { min-width: 0; flex: 1; }
.dock b { display: block; font: 700 clamp(0.86rem, calc(var(--u) * 0.98), 1.06rem)/1.15 var(--sans); letter-spacing: 0.02em; }
.dock small { display: block; margin-top: 3px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font: 500 var(--dock-fs)/1.2 var(--sans); color: var(--accent-hi); font-variant-numeric: lining-nums tabular-nums; }
/* In the header the control has one width for every line it may show: nothing beside it moves
   when the line changes. */
.top .dock { width: var(--dock-w); }
/* Alone over the page (the rest of the header has slid away) it stands on a plate of its own. */
.top.is-away .dock { background: linear-gradient(180deg, #2a2112, #17120a); box-shadow: 0 0 0 7px rgba(9, 8, 6, 0.9), 0 0 34px 16px rgba(9, 8, 6, 0.72); }
.top.is-away .dock:hover { box-shadow: 0 0 0 7px rgba(9, 8, 6, 0.9), 0 12px 50px rgba(217, 178, 96, 0.32); }
.js.dock-away .dock { opacity: 0; visibility: hidden; transform: translateY(-6px); pointer-events: none; transition: opacity 0.3s, visibility 0s 0.3s, transform 0.3s; }
/* The main script did not arrive: the control is a plain link and stays in view. */
.late.dock-away .dock { opacity: 1; visibility: visible; transform: none; pointer-events: auto; }
.bar { display: none; }

/* The menu sheet of a phone and a tablet: a dialog over the whole window. Page links and the
   chapters scroll between two fixed rows: the close button above, the two switches below. */
.sheet { position: fixed; inset: 0; z-index: 60; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; overflow: hidden; background: #090806; color: var(--fg); opacity: 0; transition: opacity 0.3s, overlay 0.3s allow-discrete, display 0.3s allow-discrete; }
.sheet:not([open]) { display: none; }
.sheet[open] { display: flex; flex-direction: column; opacity: 1; }
@starting-style { .sheet[open] { opacity: 0; } }
.sheet::backdrop { background: #090806; }
.sheet-top { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; height: var(--top-h); padding: 0 var(--gx); border-bottom: 1px solid var(--rule); }
.sheet .lbl { font-size: 0.75rem; }
.sheet-x { display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 16px 0 14px; border-radius: 999px; border: 1px solid var(--line); background: rgba(19, 16, 11, 0.8); font: 500 0.75rem/1 var(--mono); letter-spacing: 0.18em; text-transform: uppercase; color: var(--fg); }
.sheet-x i { display: block; width: 16px; height: 1.5px; margin: 3px 0; background: var(--fg); }
.sheet-x i:first-child { transform: translateY(2.25px) rotate(45deg); }
.sheet-x i:nth-child(2) { transform: translateY(-2.25px) rotate(-45deg); }
.sheet-in { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 18px var(--gx) 28px; }
.sheet-links { display: grid; }
.sheet-links a { padding: 0.2em 0; font: 500 clamp(1.75rem, 7.4vw, 2.75rem)/1.16 var(--serif); letter-spacing: -0.005em; color: var(--fg); text-decoration: none; transition: color 0.25s; }
.sheet-links a:hover, .sheet-links a[aria-current="page"] { color: var(--accent-hi); }
.sheet[open] .sheet-links a { animation: sheet-in 0.5s var(--ease) calc(0.05s * var(--k, 0) + 0.04s) both; }
@keyframes sheet-in { from { opacity: 0; transform: translateY(16px); } }
.nav-more { display: block; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.hud-none .nav-more { display: none; }
.nav-ch { margin-top: 8px; counter-reset: ch; columns: 2; column-gap: 24px; }
.nav-ch li { counter-increment: ch; break-inside: avoid; }
.nav-ch a { display: flex; gap: 10px; align-items: baseline; min-height: 44px; padding: 11px 0; font: 500 1rem/1.35 var(--sans); color: var(--fg-soft); text-decoration: none; }
.nav-ch a::before { content: counter(ch, decimal-leading-zero); flex: none; font: 500 0.75rem/1 var(--mono); letter-spacing: 0.1em; color: var(--accent-lo); }
.nav-ch a[aria-current] { color: var(--accent-hi); }
.nav-tg { flex: none; display: flex; flex-wrap: wrap; gap: 10px; padding: 12px var(--gx) calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); background: #0d0b08; }
.nav-tg .tgl { flex: 1 1 0; min-width: 0; max-width: 240px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 46px; padding: 0 16px 0 12px; border-radius: 999px; border: 1px solid var(--line); background: rgba(19, 16, 11, 0.8); font: 600 0.9rem/1 var(--sans); }
.nav-tg .tgl:disabled { opacity: 0.45; }
/* While the sheet is open the page behind it does not scroll. */
.nav-open, .nav-open body { overflow: hidden; }
[data-motion="off"] .sheet, [data-motion="off"] .sheet[open] .sheet-links a { transition: none; animation: none; }
@media (prefers-reduced-motion: reduce) { .sheet, .sheet[open] .sheet-links a { transition: none; animation: none; } }

/* ------------------------------------------------------------------ hud */
.hud { position: fixed; inset: auto 0 0 0; z-index: 30; height: 0; pointer-events: none; transition: opacity 0.5s, visibility 0.5s; }
/* The floor under the bottom row. While a tall chapter scrolls, its text runs under the row: the
   floor covers it, so nothing is read through the counter, the ticks and the buttons. It is as
   tall as the space a frame keeps free at its bottom edge, so it never dims a chapter at rest;
   its lower 70px (the row itself) are opaque. */
.hud::before { content: ""; position: absolute; inset: auto 0 0 0; height: clamp(88px, 11vh, 124px); background: linear-gradient(180deg, rgba(9, 8, 6, 0) 0, rgb(9, 8, 6) calc(100% - 70px)); pointer-events: none; transition: opacity 0.5s; }
.at-first:not(.is-scrolled) .hud::before, .at-last .hud::before { opacity: 0; }
/* A focused element is never left under the row (nor under the bar of a phone). */
html { scroll-padding-bottom: 88px; }
/* Chapter navigation puts the top edge of a chapter at the top edge of the window: a frame carries
   its own top padding for the header. (The main script refines the figure for each frame.) */
.frame[data-frame] { scroll-margin-top: calc(-1 * (var(--top-h) + 12px)); }
.frame--auto[data-frame] { scroll-margin-top: calc(-1 * min(clamp(64px, 10vh, 130px), var(--top-h) + 12px)); }
.at-foot .hud, .nav-open .hud { opacity: 0; visibility: hidden; }
/* A control of the row that holds the keyboard focus is never hidden. */
.at-foot .hud:has(:focus-visible) { opacity: 1; visibility: visible; }
/* A page of one chapter keeps the two switches only. */
.hud-none .count, .hud-none .ticks, .hud-none [data-prev], .hud-none [data-next] { display: none; }
/* The counter never reaches the ticks: a long chapter name is cut instead (--ticks-w comes from the script). */
.count { position: absolute; left: var(--gx); bottom: 28px; max-width: calc(50vw - var(--gx) - var(--ticks-w, 30vw) / 2 - 28px); display: flex; align-items: baseline; gap: 10px; font: 500 clamp(0.78rem, calc(var(--u) * 0.9), 1.05rem)/1 var(--mono); letter-spacing: 0.12em; white-space: nowrap; color: var(--fg-2); text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9); transition: opacity 0.5s, visibility 0.5s; }
.count > * { flex: none; }
.count b { font: 600 clamp(1.2rem, calc(var(--u) * 1.4), 1.6rem)/1 var(--mono); letter-spacing: 0.04em; color: var(--accent-hi); }
.count .nm { flex: 0 1 auto; min-width: 0; margin-left: 12px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; letter-spacing: 0.2em; text-transform: uppercase; font-size: clamp(0.75rem, calc(var(--u) * 0.86), 1rem); line-height: 1.3; }
.count .ch { margin-left: 12px; letter-spacing: 0.2em; text-transform: uppercase; font-size: clamp(0.75rem, calc(var(--u) * 0.86), 1rem); color: var(--accent); }
.count .ch:empty { display: none; }
/* Chapter ticks: the hangers of a small cable; their heights follow the bridge's own curve. */
.ticks { position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; align-items: flex-end; height: 40px; pointer-events: auto; transition: opacity 0.5s, visibility 0.5s; }
.ticks::after { content: ""; position: absolute; left: -8px; right: -8px; bottom: 6px; height: 1px; background: rgba(217, 178, 96, 0.3); }
.ticks a { position: relative; display: block; width: clamp(18px, 1.5vw, 28px); height: 40px; }
.ticks a::after { content: ""; position: absolute; left: 50%; bottom: 6px; width: 2px; height: calc(var(--h, 0.5) * 26px); margin-left: -1px; border-radius: 2px 2px 0 0; background: rgba(242, 233, 216, 0.28); transform-origin: 50% 100%; transition: background 0.4s, box-shadow 0.4s, transform 0.3s var(--ease); }
.ticks a.done::after { background: rgba(217, 178, 96, 0.66); }
.ticks a[aria-current]::after { background: var(--accent-hi); box-shadow: 0 0 12px rgba(246, 220, 156, 0.85); }
.ticks a:hover::after, .ticks a:focus-visible::after { background: var(--accent-hi); transform: scaleY(1.2); }
.ticks a:hover::before, .ticks a:focus-visible::before { content: attr(aria-label); position: absolute; left: 50%; bottom: 46px; transform: translateX(-50%); padding: 7px 11px; border-radius: 8px; border: 1px solid var(--line); background: rgba(12, 10, 8, 0.96); white-space: nowrap; font: 500 0.75rem/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-hi); }
.ticks .gap { width: 10px; }
.ctrl { position: absolute; right: var(--gx); bottom: 20px; display: flex; gap: 10px; pointer-events: auto; }
.ctrl button { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); background: rgba(15, 13, 10, 0.66); color: var(--fg); transition: border-color 0.25s, background 0.25s, box-shadow 0.25s, color 0.25s; }
.ctrl button:hover { border-color: var(--accent); background: rgba(217, 178, 96, 0.14); box-shadow: 0 0 24px rgba(217, 178, 96, 0.25); }
.ctrl button:disabled, .ctrl button[aria-disabled="true"] { opacity: 0.4; cursor: default; }
.ctrl button[aria-disabled="true"]:hover { border-color: var(--line); background: rgba(15, 13, 10, 0.66); box-shadow: none; }
.ctrl svg, .tgl svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ctrl .tgl span { display: none; }
.tgl .i-off, .tgl[aria-pressed="false"] .i-on { display: none; }
.tgl[aria-pressed="false"] .i-off { display: block; }
.tgl[aria-pressed="true"] { color: var(--accent-hi); }
/* On the title and on the finale the counter and the ticks step back; the switches and the arrows
   stay (the motion switch is the stop control). Ticks that are not shown take no focus. */
.at-first .count, .at-first .ticks, .at-last .count, .at-last .ticks { opacity: 0; visibility: hidden; pointer-events: none; }
.is-scrolled.at-first .count, .is-scrolled.at-first .ticks, .hud .ticks:has(:focus-visible) { opacity: 1; visibility: visible; pointer-events: auto; }
/* In a long read the counter would stand in the text column, right under its last line: there
   the contents rail of the page marks the place, and the counter gives way. */
.hud-rail.hud-read .count { opacity: 0; visibility: hidden; }
@media (max-width: 1100px) {
  .hud { display: none; }
  html { scroll-padding-bottom: calc(var(--bar-h) + 24px + env(safe-area-inset-bottom, 0px)); }
}
/* A short wide window keeps the switches and the arrows; the counter and the ticks give way. */
@media (min-width: 1101px) and (max-height: 560px) {
  .count, .ticks { display: none; }
}
/* Motion switched off by the visitor or by the system: the shell changes state without sliding. */
[data-motion="off"] .top::before, [data-motion="off"] .top > .brand, [data-motion="off"] .top > .nav, [data-motion="off"] .top .burger, [data-motion="off"] .dock, [data-motion="off"] .bar, [data-motion="off"] .hud, [data-motion="off"] .hud::before, [data-motion="off"] .count, [data-motion="off"] .ticks { transition: none !important; }
@media (prefers-reduced-motion: reduce) { .top::before, .top > .brand, .top > .nav, .top .burger, .dock, .bar, .hud, .hud::before, .count, .ticks { transition: none !important; } }

/* --------------------------------------------------------------- frames */
.frame { position: relative; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: calc(var(--top-h) + clamp(16px, 4vh, 48px)) var(--gx) clamp(88px, 11vh, 124px); }
/* The content of a frame stands above every shade, its neighbours' included. */
.frame > .in { position: relative; z-index: 1; width: 100%; max-width: var(--max); margin-inline: auto; }
.frame--auto { min-height: 0; padding-block: clamp(64px, 10vh, 130px); }
.frame[data-shade]::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; }
/* A shade travels with its frame. It reaches a little beyond the frame and fades out there, while
   the neighbour's shade fades in over the same band (the header and bottom-row zones, where no
   text stands): two shades of one kind add up to one, two of different kinds blend, and no edge
   crosses the picture while the page scrolls. */
@media (min-width: 861px) {
  .frame[data-shade]::before {
    --sf: clamp(64px, 10vh, 110px); inset: calc(var(--sf) * -1) 0;
    -webkit-mask-image: linear-gradient(180deg, transparent 0, rgba(0, 0, 0, 0.65) var(--sf), #000 calc(var(--sf) * 2), #000 calc(100% - var(--sf) * 2), rgba(0, 0, 0, 0.65) calc(100% - var(--sf)), transparent 100%);
    mask-image: linear-gradient(180deg, transparent 0, rgba(0, 0, 0, 0.65) var(--sf), #000 calc(var(--sf) * 2), #000 calc(100% - var(--sf) * 2), rgba(0, 0, 0, 0.65) calc(100% - var(--sf)), transparent 100%);
  }
}
.frame[data-shade="l"]::before { background: linear-gradient(90deg, rgba(11, 10, 8, 0.86) 0%, rgba(11, 10, 8, 0.52) 40%, rgba(11, 10, 8, 0) 66%); }
.frame[data-shade="r"]::before { background: linear-gradient(270deg, rgba(11, 10, 8, 0.86) 0%, rgba(11, 10, 8, 0.52) 40%, rgba(11, 10, 8, 0) 66%); }
.frame[data-shade="c"]::before { background: radial-gradient(90% 80% at 50% 50%, rgba(11, 10, 8, 0.76), rgba(11, 10, 8, 0.2) 70%, rgba(11, 10, 8, 0)); }
.frame[data-shade="t"]::before { background: linear-gradient(180deg, rgba(11, 10, 8, 0.9) 0%, rgba(11, 10, 8, 0.6) 34%, rgba(11, 10, 8, 0) 62%); }
.frame[data-shade="b"]::before { background: linear-gradient(0deg, rgba(11, 10, 8, 0.9) 0%, rgba(11, 10, 8, 0.6) 34%, rgba(11, 10, 8, 0) 62%); }
.frame[data-shade="full"]::before { background: linear-gradient(180deg, rgba(11, 10, 8, 0), rgba(11, 10, 8, 0.8) 14%, rgba(11, 10, 8, 0.8) 86%, rgba(11, 10, 8, 0)); }
.fh { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); column-gap: clamp(24px, 6vw, 120px); row-gap: 20px; align-items: end; margin-bottom: clamp(26px, 4.8vh, 56px); }
.fh--solo { grid-template-columns: minmax(0, 1fr); }
.fh .h2 { margin-top: clamp(14px, 2.2vh, 24px); }
.fh .side { padding-bottom: 0.4em; }
.fh .side > * + * { margin-top: 1em; }
.foot-note { margin-top: clamp(18px, 3vh, 36px); }
/* Anything denser than a headline and a few lines stands on an opaque panel. */
.panel { padding: clamp(16px, 1.9vw, 38px) clamp(18px, 2.2vw, 44px); border: 1px solid var(--line); border-radius: clamp(18px, 1.35vw, 26px); background: var(--panel); }
/* A panel that holds a drawing is opaque: the live bridge must not show through another drawing. */
.panel:has(.fg) { background: #0f0d0a; }
/* Document pages: compact sections on one reading panel. */
.sec { position: relative; z-index: 1; padding: clamp(44px, 7.4vh, 96px) var(--gx); background: var(--panel); }
.sec > .in { max-width: var(--max); margin-inline: auto; }
.sec + .sec > .in { padding-top: clamp(44px, 7.4vh, 96px); border-top: 1px solid var(--rule); }
.sec + .sec { padding-top: 0; }
.frame + .sec { border-top: 1px solid var(--line); }
.sec p, .sec li, .sec h2, .sec h3 { text-shadow: none; }

/* ---------------------------------------------------------- shared parts */
.cells { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: clamp(20px, 2.9vw, 56px); row-gap: clamp(22px, 4.4vh, 54px); }
.cells--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cells--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cell { border-top: 1px solid var(--line); padding-top: clamp(16px, 2.6vh, 32px); }
.cell .ttl + .txt, .cell .ttl + .sm { margin-top: clamp(8px, 1.1vh, 12px); }
.cell .lbl + .ttl, .cell .lbl + .txt { margin-top: clamp(8px, 1.2vh, 14px); }
.idx { font: italic 500 clamp(1.6rem, calc(var(--u) * 2.4), 2.9rem)/1 var(--serif); color: var(--accent-lo); font-variant-numeric: lining-nums; }
.dots { display: grid; gap: clamp(8px, 1.1vh, 12px); }
.dots li { position: relative; padding-left: 24px; font: 400 var(--fs-sm)/1.45 var(--sans); color: var(--fg-soft); }
.dots li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 8px; height: 8px; transform: rotate(45deg); background: var(--accent); }
.dots--out li::before { background: none; border: 1.5px solid var(--accent); }
.dots--dash li::before { top: 0.74em; width: 12px; height: 1.5px; transform: none; background: var(--fg-2); }

/* The price list as a ledger: ruled rows, the price in display numerals. One grid for all rows
   (subgrid), so prices and terms line up; the term and the formats share a column. */
.ledger { display: grid; grid-template-columns: clamp(40px, 3.3vw, 60px) minmax(0, 1fr) auto auto auto; column-gap: clamp(14px, 2vw, 38px); border-top: 1px solid var(--line); }
.ledger--text { grid-template-columns: clamp(40px, 3.3vw, 60px) minmax(0, 1fr) auto auto auto; }
.ld { position: relative; grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; grid-template-rows: auto 1fr; row-gap: 7px; align-items: baseline; padding: clamp(12px, 1.9vh, 20px) clamp(6px, 0.8vw, 14px) clamp(12px, 1.9vh, 20px) 0; border-bottom: 1px solid var(--line); }
@supports not (grid-template-columns: subgrid) {
  .ledger, .ledger--text { display: block; }
  .ld { grid-template-columns: clamp(40px, 3.3vw, 60px) minmax(0, 1fr) 13em 9em 20px; column-gap: clamp(14px, 2vw, 38px); }
  .ledger--text .ld { grid-template-columns: clamp(40px, 3.3vw, 60px) minmax(0, 1fr) 14em 7em 20px; }
}
.ld::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(217, 178, 96, 0.14), rgba(217, 178, 96, 0) 72%); opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.ld:hover::before, .ld:focus-within::before { opacity: 1; }
.ld > * { position: relative; grid-row: 1 / span 2; }
.ld-n { font: italic 500 clamp(1.3rem, calc(var(--u) * 1.9), 2.3rem)/1 var(--serif); color: var(--accent-lo); font-variant-numeric: lining-nums; transition: color 0.3s, text-shadow 0.3s; }
.ld:hover .ld-n, .ld:focus-within .ld-n { color: var(--accent-hi); text-shadow: 0 0 18px rgba(246, 220, 156, 0.6); }
.ld > .ld-name { position: static; font: 600 clamp(1.25rem, calc(var(--u) * 1.85), 2.25rem)/1.12 var(--serif); font-variant-numeric: lining-nums; color: var(--fg); }
.ld-name { text-wrap: balance; }
.ld-name a { color: inherit; text-decoration: none; }
/* The whole row is the link to the service: the stretched link lies above the price, the term and
   the formats; only the row's own «Запросить оценку» stands above it. */
.ld-name a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.ld-name a:focus-visible { outline: none; }
.ld:focus-within { outline: 2px solid var(--accent-hi); outline-offset: 2px; border-radius: 6px; }
.ld-sub { display: block; margin-top: 6px; font: 400 var(--fs-sm)/1.45 var(--sans); color: var(--fg-2); }
.ld-price { text-align: right; font-size: clamp(1.5rem, calc(var(--u) * 2.2), 2.65rem); line-height: 1; color: var(--fg); }
.ld > .ld-term { grid-row: 1; font: 500 var(--fs-sm)/1.3 var(--sans); color: var(--fg-soft); white-space: nowrap; font-variant-numeric: lining-nums tabular-nums; }
.ld > .ld-fmt { grid-row: 2; grid-column: 3; align-self: start; }
/* A group of services opens with what the client needs (groupedLedger in lib/ui.mjs). */
.ld-grp { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; padding: clamp(18px, 2.8vh, 30px) clamp(6px, 0.8vw, 14px) clamp(8px, 1.2vh, 12px); border-bottom: 1px solid var(--line); scroll-margin-top: calc(var(--top-h) + 12px); }
.ld-grp:first-child { padding-top: clamp(8px, 1.4vh, 16px); }
.ld-grp .lbl { color: var(--accent-hi); }
.ld-grp p { font: 400 var(--fs-sm)/1.4 var(--sans); color: var(--fg-2); }
.ledger--text .ld > .ld-term { grid-row: 1 / span 2; }
.ld-meta { font: 500 max(0.75rem, var(--fs-lbl))/1.3 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.ld-ask { z-index: 2; padding-bottom: 3px; border-bottom: 1px solid var(--line); font: 600 clamp(0.9rem, calc(var(--u) * 0.95), 1.12rem)/1.2 var(--sans); color: var(--accent-hi); text-decoration: none; white-space: nowrap; transition: border-color 0.25s; }
.ld-ask:hover { border-color: var(--accent-hi); }
.ld > .ld-go { align-self: center; }
.ld-go svg { width: 18px; height: 18px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.35s var(--ease); }
.ld:hover .ld-go svg, .ld:focus-within .ld-go svg { transform: translateX(6px); }

/* A strip of terms that moves slowly to the left. Every item brings its own separator, a small
   diamond drawn before it. */
.mq { --mq-gap: clamp(14px, 1.4vw, 28px); overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent); mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent); }
.mq .track { display: flex; align-items: center; width: max-content; white-space: nowrap; font: 500 clamp(1.3rem, calc(var(--u) * 2.08), 2.5rem)/1.25 var(--serif); font-variant-numeric: lining-nums; animation: mq 52s linear infinite paused; }
.mq-i { flex: none; display: inline-flex; align-items: center; }
.mq-i::before { content: ""; flex: none; width: 0.24em; height: 0.24em; margin-inline: var(--mq-gap); transform: rotate(45deg); background: var(--accent-lo); }
.mq-i--em { font-style: italic; color: var(--accent); }
/* It moves only while the opening chapter is on screen, with scripts and with motion on. */
.js.at-first .mq .track { animation-play-state: running; }
.js.at-first .mq:hover .track { animation-play-state: paused; }
@keyframes mq { to { transform: translateX(-50%); } }
/* Still states (no scripts, a late script, motion off): all terms as a wrapped line inside the
   page margins. A line never starts with a separator: the first one of every line falls outside
   the clipped box. */
.no-js .mq, .late .mq, [data-motion="off"] .mq { -webkit-mask-image: none; mask-image: none; }
.no-js .mq .track, .late .mq .track, [data-motion="off"] .mq .track { animation: none; width: auto; flex-wrap: wrap; row-gap: 0.12em; white-space: normal; margin-left: calc(-0.24em - var(--mq-gap) * 2); font-size: clamp(1.06rem, calc(var(--u) * 1.3), 1.6rem); }
.no-js .mq [data-copy], .late .mq [data-copy], [data-motion="off"] .mq [data-copy] { display: none; }
@media (prefers-reduced-motion: reduce) {
  .mq { -webkit-mask-image: none; mask-image: none; }
  .mq .track { animation: none; width: auto; flex-wrap: wrap; row-gap: 0.12em; white-space: normal; margin-left: calc(-0.24em - var(--mq-gap) * 2); font-size: clamp(1.06rem, calc(var(--u) * 1.3), 1.6rem); }
  .mq [data-copy] { display: none; }
}

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(18px, 1.5vw, 28px); }
.stats > div { display: flex; align-items: center; gap: clamp(12px, 1.15vw, 22px); }
.stats b { flex: none; min-width: 0.6em; font: 500 clamp(2.6rem, calc(var(--u) * 4.6), 5.5rem)/1 var(--serif); font-variant-numeric: lining-nums; background: linear-gradient(180deg, var(--accent-hi), var(--accent) 70%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stats span { font: 500 var(--fs-sm)/1.3 var(--sans); color: var(--fg-soft); }

.facts { display: grid; grid-template-columns: repeat(3, minmax(0, auto)); justify-content: start; column-gap: clamp(24px, 3.4vw, 64px); row-gap: 14px; }
.facts > div { padding-top: 14px; border-top: 1px solid var(--line); }
.facts dt { font: 500 max(0.75rem, var(--fs-lbl))/1.3 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg-2); }
.facts dd { margin-top: 8px; font: 600 clamp(1.25rem, calc(var(--u) * 1.77), 2.1rem)/1.1 var(--serif); color: var(--fg); font-variant-numeric: lining-nums; }
.facts dd a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--line); transition: border-color 0.25s; }
.facts dd a:hover { border-color: var(--accent-hi); }

.note { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: start; padding: clamp(16px, 1.4vw, 24px) clamp(18px, 1.6vw, 28px); border: 1px solid var(--line); border-radius: 18px; background: rgba(19, 16, 11, 0.7); font: 400 var(--fs-sm)/1.55 var(--sans); color: var(--fg-soft); }
.note svg { width: 26px; height: 26px; fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.note--plain { grid-template-columns: minmax(0, 1fr); }
.note a { color: var(--accent-hi); }

.faq details { border-top: 1px solid var(--line); }
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary { position: relative; list-style: none; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 20px; padding: clamp(14px, 2vh, 22px) 0; cursor: pointer; font: 600 clamp(1.15rem, calc(var(--u) * 1.6), 1.9rem)/1.2 var(--serif); color: var(--fg); transition: color 0.25s; }
.faq summary { font-variant-numeric: lining-nums; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--accent-hi); transform: scaleX(0); transform-origin: 0 50%; transition: transform 0.7s var(--ease); }
.faq details[open] summary::after { transform: scaleX(1); }
.faq summary:hover, .faq details[open] summary { color: var(--accent-hi); }
.faq summary i { position: relative; flex: none; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); transition: transform 0.45s var(--ease), background 0.3s; }
.faq summary i::before, .faq summary i::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.5px; margin: -0.75px 0 0 -6px; background: var(--accent-hi); transition: transform 0.45s var(--ease); }
.faq summary i::after { transform: rotate(90deg); }
.faq details[open] summary i { background: rgba(217, 178, 96, 0.14); transform: rotate(180deg); }
.faq details[open] summary i::after { transform: rotate(0deg); }
.faq details > p { padding: clamp(12px, 1.8vh, 18px) 54px clamp(18px, 2.4vh, 26px) 0; max-width: 62ch; font: 400 var(--fs-sm)/1.65 var(--sans); color: var(--fg-soft); text-shadow: none; }
/* The firm says no in the largest type of the section. */
.faq .no { display: block; width: max-content; margin-bottom: 0.12em; padding-right: 0.1em; font: italic 500 clamp(2.5rem, calc(var(--u) * 4), 4.5rem)/1 var(--serif); background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.js .faq details[open] .no { animation: no-in 0.8s var(--ease-out) both; }
@keyframes no-in { from { opacity: 0; transform: translateY(0.4em); } }
/* In the still states the word simply stands there. */
.late .faq details[open] .no, [data-motion="off"] .faq details[open] .no { animation: none; }
@media (prefers-reduced-motion: reduce) { .js .faq details[open] .no { animation: none; } }

/* A table wider than its frame scrolls inside it. A soft gold edge shows on the side where there
   is more to see; the first two layers move with the table and cover the edge at its ends. */
.tbl-wrap {
  overflow-x: auto; border: 1px solid var(--line); border-radius: 18px;
  background:
    linear-gradient(90deg, #0d0b08 40%, rgba(13, 11, 8, 0)) 0 0 / 56px 100% no-repeat local,
    linear-gradient(270deg, #0d0b08 40%, rgba(13, 11, 8, 0)) 100% 0 / 56px 100% no-repeat local,
    linear-gradient(270deg, rgba(217, 178, 96, 0.2), rgba(217, 178, 96, 0)) 100% 0 / 26px 100% no-repeat scroll,
    #0d0b08;
}
.tbl-wrap table { width: 100%; border-collapse: collapse; font: 400 clamp(0.9rem, calc(var(--u) * 1.05), 1.2rem)/1.45 var(--sans); font-variant-numeric: lining-nums tabular-nums; }
.tbl-wrap th, .tbl-wrap td { padding: 14px 18px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--rule); color: var(--fg-soft); }
.tbl-wrap thead th { font: 500 var(--fs-lbl)/1.3 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); border-bottom-color: var(--line); }
.tbl-wrap tbody th { font-weight: 600; color: var(--fg); }
.tbl-wrap tbody tr:last-child > * { border-bottom: 0; }
.tbl-wrap a { color: var(--accent-hi); text-decoration-color: var(--line); text-underline-offset: 0.2em; }

.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: clamp(16px, 2.8vh, 32px); font: 500 var(--fs-lbl)/1.3 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg-3); }
.crumbs a { color: var(--fg-2); text-decoration: none; transition: color 0.2s; }
.crumbs a:hover { color: var(--accent-hi); }
.crumbs i { font-style: normal; color: var(--accent-lo); }
.crumbs [aria-current] { color: var(--accent); }

/* The closing frame: one action. The column grows with the type, so the title has the same room
   on every screen; the title keeps its authored lines: it is sized down until its widest line
   (--fit, in em, set by cta()) fits the column. Beside the button stands its caption, under them
   a ruled pair of notes: two quiet type styles only, the mono label and one text style. */
.cta { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: start; max-width: min(50vw, max(780px, calc(var(--u) * 52))); container-type: inline-size; }
.cta .h1, .cta .h2 { margin-top: clamp(14px, 2.4vh, 26px); }
@media (min-width: 861px) {
  .cta .h1 { font-size: min(var(--fs-h1), calc(100cqi / var(--fit, 8))); }
  .cta .h2 { font-size: min(var(--fs-h2), calc(100cqi / var(--fit, 11))); }
  .cta .ln { white-space: nowrap; }
}
.cta .lede { margin-top: clamp(14px, 2.6vh, 28px); max-width: 34em; }
.cta-act { justify-self: stretch; display: flex; flex-wrap: wrap; align-items: center; gap: 14px clamp(18px, 2vw, 34px); margin-top: clamp(20px, 3.4vh, 38px); }
.cta-by { flex: 1 1 14em; min-width: 0; }
.cta-at { font: 500 var(--fs-lbl)/1.3 var(--mono); letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); }
.cta-reply, .cta-notes p { max-width: none; font: 400 var(--fs-sm)/1.5 var(--sans); color: var(--fg-soft); }
.cta-reply { margin-top: 6px; max-width: 25em; }
.cta-notes { justify-self: stretch; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17em), 1fr)); gap: 12px clamp(20px, 2.8vw, 48px); margin-top: clamp(18px, 3vh, 34px); padding-top: clamp(14px, 2.2vh, 22px); border-top: 1px solid var(--line); }
.cta-note { display: flex; align-items: baseline; }
/* The line under the note with the ring starts where the note's words start. */
.cta-note + .fine { margin-top: 6px; padding-left: 1.36em; }

/* The opening frame of an inner page. A title set in authored lines (.h1--page) keeps them: it is
   sized down until its widest line (--fit, in em, set by pageHero()) fits the copy column. A long
   title from the data (.h1--long) wraps as it needs. */
.p-hero { justify-content: center; }
.p-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; }
.p-hero-copy { max-width: min(1040px, 62vw); container-type: inline-size; }
@media (min-width: 861px) {
  .p-hero .h1--page { font-size: min(clamp(2.2rem, calc(var(--u) * 4.3), 5.2rem), calc(100cqi / var(--fit, 12))); }
  .p-hero .h1--page .ln { white-space: nowrap; }
}
.p-hero--split .p-hero-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 4.6fr); column-gap: clamp(24px, 5vw, 100px); }
.p-hero--split .p-hero-copy { max-width: none; }
.p-hero .h1 { margin-top: clamp(14px, 2.2vh, 24px); }
.p-hero .lede { margin-top: clamp(16px, 2.8vh, 30px); max-width: 38em; }
.p-hero .acts-row { margin-top: clamp(20px, 3.4vh, 38px); }
.p-hero .meta { margin-top: clamp(18px, 3vh, 32px); }

/* --------------------------------------------------------------- footer */
.foot { margin-top: 0; padding: clamp(48px, 8vh, 96px) var(--gx) clamp(96px, 12vh, 130px); border-top: 1px solid var(--line); background: linear-gradient(180deg, rgba(9, 8, 6, 0.94), rgba(7, 6, 5, 0.98)); }
.foot .in { max-width: var(--max); margin-inline: auto; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); gap: clamp(28px, 3.4vw, 64px); }
.foot-brand p { margin-top: 18px; max-width: 26em; font: 400 0.98rem/1.6 var(--sans); color: var(--fg-2); }
.foot h2 { margin-bottom: 16px; font: 500 0.75rem/1.2 var(--mono); letter-spacing: 0.24em; text-transform: uppercase; color: var(--accent); }
.foot li + li { margin-top: 9px; }
.foot li a { font: 400 0.95rem/1.4 var(--sans); color: var(--fg-2); text-decoration: none; transition: color 0.2s; }
.foot li a:hover { color: var(--accent-hi); }
.foot-legal { margin-top: clamp(36px, 5vh, 60px); padding-top: 24px; border-top: 1px solid var(--rule); }
.foot-legal p { max-width: 86em; font: 400 0.9rem/1.6 var(--sans); color: var(--fg-2); }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; margin-top: 18px; font: 500 0.75rem/1.4 var(--mono); letter-spacing: 0.18em; text-transform: uppercase; color: var(--fg-3); }

/* ------------------------------------------------- between two pages */
#scene { view-transition-name: scene; }
main { view-transition-name: content; }
::view-transition-group(scene) { animation-duration: 0.25s; }
::view-transition-old(content) { animation: vt-out 0.3s var(--ease) both; }
::view-transition-new(content) { animation: vt-in 0.42s var(--ease) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-14px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(16px); } }
/* The name and the price of the chosen service travel into the heading of its page. */
.vt-src .ld-name, .vt-title { view-transition-name: svc-title; }
.vt-src .ld-price, .vt-price { view-transition-name: svc-price; }
[data-motion="off"]::view-transition-group(*), [data-motion="off"]::view-transition-old(*), [data-motion="off"]::view-transition-new(*) { animation: none !important; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1240px) {
  .burger { display: inline-flex; }
  /* The links of the header move into the menu sheet (a dialog of its own, see "header"). */
  .top > .nav { display: none; }
}
@media (max-width: 1100px) {
  :root { --top-h: 64px; --bar-h: 64px; }
  .top .dock { display: none; }
  /* The bottom bar: chapter counter on the left, the Telegram control on the right. */
  .bar { position: fixed; inset: auto 0 0 0; z-index: 35; display: flex; align-items: stretch; gap: 6px; padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(180deg, rgba(9, 8, 6, 0), rgb(9, 8, 6) 30%); transition: transform 0.5s var(--ease); }
  /* It steps aside for a Telegram button of the page itself, the calculator's own button included. */
  .js.dock-away .bar, .js.bar-away .bar { transform: translateY(115%); }
  /* The main script did not arrive: the bar stays as a plain link, without the chapter chip. */
  .late.dock-away .bar { transform: none; }
  .no-js .bar-ch, .late .bar-ch { display: none; }
  .bar-ch { flex: none; display: flex; align-items: center; justify-content: center; min-width: 48px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: #14110c; font: 500 0.75rem/1 var(--mono); letter-spacing: 0.1em; color: var(--fg-2); }
  .bar-in { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
  .bar-ch b { font: 600 1.05rem/1 var(--mono); color: var(--accent-hi); }
  .bar-nm { display: none; }
  /* Nothing in the line is ever cut: where it does not fit, it wraps at the dot between its parts. */
  .bar .dock small { overflow: visible; white-space: normal; text-overflow: clip; letter-spacing: -0.012em; }
  .bar .dock { flex: 1; min-width: 0; min-height: 48px; gap: 10px; padding-right: 12px; opacity: 1; visibility: visible; transform: none; pointer-events: auto; background: linear-gradient(180deg, #2a2112, #17120a); }
  /* A phone: the chip shows the chapter number alone, so the longest line of the control (a range
     and a term) stays on one line; a narrow phone also spends less on the edges of the bar. */
  @media (max-width: 409px) { .bar-of { display: none; } html .bar[data-bar] .dock small { letter-spacing: -0.02em; } }
  @media (max-width: 374px) {
    html .bar[data-bar] { gap: 5px; padding-inline: 8px; }
    html .bar[data-bar] .bar-ch { padding: 0 10px; }
    html .bar[data-bar] .dock { gap: 8px; padding-right: 10px; }
    html .bar[data-bar] .dock > i { width: 32px; height: 32px; }
  }
  /* A tablet: the chip names the chapter and the control keeps a sensible width. */
  @media (min-width: 600px) {
    .bar { gap: 10px; padding-inline: 16px; }
    .bar-ch { padding: 0 18px; }
    .bar-nm { display: block; margin-left: 8px; max-width: 38vw; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; line-height: 1.3; letter-spacing: 0.16em; text-transform: uppercase; }
    .bar .dock { flex: 0 1 25rem; margin-left: auto; }
  }
  .foot { padding-bottom: calc(var(--bar-h) + 40px + env(safe-area-inset-bottom, 0px)); }
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-brand { grid-column: 1 / -1; }
  .cells--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 26px; }
  /* A number never gives way to its label: in a narrow cell the label wraps, the figure is whole. */
  .stats b { flex: none; }
  /* Touch: every link is at least 44px high. The box grows, the look stays: the hairline of a
     quiet link is drawn 5px under its text, as the border was. */
  .lnk { min-height: 44px; padding: 13px 0; border-bottom: 0; background: linear-gradient(var(--line), var(--line)) 0 calc(100% - 7px) / 100% 1px no-repeat; }
  .lnk:hover, .lnk:active, .lb-ex-copy:hover > .lnk, .lb-doc-copy:hover > .lnk, .lb-doc--online:hover > .lnk { background-image: linear-gradient(var(--accent-hi), var(--accent-hi)); }
  /* Breadcrumbs keep their line; each link takes 44px across it. */
  .crumbs a { display: inline-flex; align-items: center; min-height: 44px; margin-block: -15px; }
  .facts dd a { padding-top: 19px; }
  .foot h2 { margin-bottom: 6px; }
  .foot li + li { margin-top: 0; }
  .foot li a { display: flex; width: fit-content; min-width: 44px; align-items: center; min-height: 44px; padding-block: 6px; }
  .foot .brand { min-height: 44px; }
  /* The row's own «Запросить оценку» is a 44px target in every layout of the ledger. */
  .ld > .ld-ask { display: inline-flex; align-items: center; min-height: 44px; padding: 13px 0; border-bottom: 0; background: linear-gradient(var(--line), var(--line)) 0 calc(100% - 7px) / 100% 1px no-repeat; }
  .ld > .ld-ask:hover, .ld > .ld-ask:active { background-image: linear-gradient(var(--accent-hi), var(--accent-hi)); }
  /* Tables. A table of two or three columns fits the screen (its column heads wrap). A table of
     four columns and more scrolls inside its frame, and its first column stays in place. */
  .tbl-wrap table:has(thead th:nth-child(4)) tr > :first-child { position: sticky; left: 0; z-index: 1; max-width: 9.5em; background: #100e0a; box-shadow: 1px 0 0 var(--rule); }
}
@media (max-width: 860px) {
  .fh { grid-template-columns: minmax(0, 1fr); }
  .cta, .p-hero-copy { max-width: none; }
  /* The closing frame on a phone: the bridge above, the words and the button under it. */
  .top .brand { min-height: 44px; }
  /* The top band of the closing frame belongs to the bridge (the scene's phone view "finale"). */
  .f-cta { justify-content: flex-end; }
  .f-cta > .in { padding-top: 20vh; padding-top: 20svh; }
  .p-hero--split .p-hero-grid { grid-template-columns: minmax(0, 1fr); row-gap: clamp(24px, 4vh, 40px); }
  .cells, .cells--2 { grid-template-columns: minmax(0, 1fr); }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .frame { padding-bottom: calc(var(--bar-h) + clamp(28px, 6vh, 56px)); }
  /* In one column a side shade would leave a seam between chapters: the shade becomes a soft band. */
  .frame[data-shade="l"]::before, .frame[data-shade="r"]::before { background: linear-gradient(180deg, rgba(11, 10, 8, 0) 0%, rgba(11, 10, 8, 0.68) 16%, rgba(11, 10, 8, 0.68) 84%, rgba(11, 10, 8, 0) 100%); }
  /* An opening keeps its bridge in the lower right corner of the first screen: the band of
     shade ends above it. */
  .h-hero[data-shade="l"]::before, .p-hero[data-shade="l"]::before { background: linear-gradient(180deg, rgba(11, 10, 8, 0) 0%, rgba(11, 10, 8, 0.68) 16%, rgba(11, 10, 8, 0.68) min(52%, 52vh), rgba(11, 10, 8, 0) min(74%, 74vh)); }
  /* A frame shaded from the top keeps its top band for the bridge on a phone: no shade there. */
  .frame[data-shade="t"]::before { background: none; }
  /* Without the scene nothing stands in those bands: the frames give them back. */
  .no-js .f-cta > .in, .late .f-cta > .in, .no-scene .f-cta > .in { padding-top: 0; }
  .js .words .w { filter: none; }
  /* Below this width a heading appears as one block instead of rising line by line. The authored
     lines stay: each starts on its own line, and one that is too long wraps inside itself. */
  .ln { display: block; overflow: visible; padding: 0; margin: 0; }
  .js .ln > span { display: inline; transform: none; opacity: 0; }
  .js .on .ln > span, .js .ln.on > span { opacity: 1; transition: opacity 0.8s var(--ease) 0.1s; }
  /* Ledger rows stack, every part on a line of its own, so nothing can run into its neighbour:
     the number and the name; the price; the term; the description; the formats; the row's own
     «Запросить оценку» as a 44px target. The name and the description are laid out as parts of
     the row (the heading itself takes no box), which lets the price stand between them. */
  .ledger, .ledger--text { display: block; }
  .ld, .ledger--text .ld { grid-template-columns: 34px minmax(0, 1fr) auto; grid-template-rows: none; row-gap: 0; column-gap: 0; padding: 16px 0; }
  .ld > .ld-name { display: contents; }
  .ld > *, .ld-name > *, .ld > .ld-fmt { grid-column: 2 / -1; grid-row: auto; }
  .ld > .ld-n { grid-column: 1; grid-row: 1; order: 0; }
  .ld-name > a { order: 1; }
  .ld > .ld-price { order: 2; margin-top: 10px; text-align: left; font-size: 1.9rem; }
  .ld > .ld-term, .ledger--text .ld > .ld-term { order: 3; grid-row: auto; margin-top: 5px; text-align: left; white-space: normal; }
  .ld-name > .ld-sub { order: 4; margin-top: 10px; }
  .ld > .ld-fmt { order: 5; margin-top: 12px; align-self: start; }
  .ld > .ld-ask { order: 6; justify-self: start; margin: 4px 0 -10px; }
  .ld > .ld-go { display: none; }
  /* A guide row: the category and the reading time stand above the title, as a kicker. */
  .ledger--text .ld > .ld-meta { order: 0; grid-column: 2; grid-row: 1; }
  .ledger--text .ld > .ld-term { order: 0; grid-column: 3; grid-row: 1; margin: 0 0 0 16px; font-size: 0.86rem; color: var(--fg-2); white-space: nowrap; }
  .ledger--text .ld-name > a { margin-top: 8px; }
  .ledger--text .ld-name > .ld-sub { margin-top: 8px; }
  /* From 640px a row has room for two columns: the name, the description and the formats on the
     left; the price, the term and the ask link on the right, as in a term sheet. */
  @media (min-width: 640px) {
    .ledger:not(.ledger--text) > .ld { grid-template-columns: 44px minmax(0, 1fr) auto; column-gap: clamp(16px, 3vw, 28px); }
    .ledger:not(.ledger--text) > .ld > .ld-n { grid-column: 1; }
    .ledger:not(.ledger--text) .ld-name > a { grid-column: 2; grid-row: 1; }
    .ledger:not(.ledger--text) > .ld > .ld-price { grid-column: 3; grid-row: 1; margin-top: 0; text-align: right; }
    /* The term hangs under the price whatever the height of the name beside them. */
    .ledger:not(.ledger--text) > .ld > .ld-term { grid-column: 3; grid-row: 1; align-self: start; margin-top: 0; text-align: right; white-space: nowrap; }
    .ledger:not(.ledger--text) .ld-name > .ld-sub { grid-column: 2; grid-row: 2; margin-top: 8px; }
    .ledger:not(.ledger--text) > .ld > .ld-fmt { grid-column: 2; grid-row: 3; align-self: center; }
    .ledger:not(.ledger--text) > .ld > .ld-ask { grid-column: 3; grid-row: 2 / span 2; justify-self: end; align-self: end; margin: 4px 0 -10px; }
  }
  /* A tablet held upright has the width for larger display type: the unit of the type scale grows
     (in landscape the height of the window still limits it). Three facts stand in one row. */
  @media (min-width: 600px) { :root { --u: min(1.3vw, 1.78vh); } }
  @media (min-width: 700px) { .facts { grid-template-columns: repeat(3, minmax(0, auto)); } }
}
@media (max-width: 560px) {
  .cells--4, .stats { grid-template-columns: minmax(0, 1fr); }
  .foot-grid { grid-template-columns: minmax(0, 1fr); }
  .brand small { display: none; }
  .facts { grid-template-columns: minmax(0, 1fr); }
  /* The narrowest phones: the longest single word of a page title («Конфиденциальность») fits
     the line, and no word of a heading can stick out of the screen. */
  .h1, .h2, .h3, .stmt { overflow-wrap: break-word; }
  @media (max-width: 340px) { .h1--page, .h2:not(.h2--sm) { font-size: 2rem; } }
  .faq details > p { padding-right: 0; }
  .nav-ch { columns: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .js .rv, .js .ln > span, .js .words .w { opacity: 1 !important; transform: none !important; filter: none !important; transition: none !important; }
  .draw { stroke-dashoffset: 0 !important; transition: none !important; }
  .mq { -webkit-mask-image: none; mask-image: none; }
  .mq .track { animation: none; width: auto; flex-wrap: wrap; row-gap: 6px; white-space: normal; }
  .mq [data-copy] { display: none; }
  .btn::after { display: none; }
  * { scroll-behavior: auto !important; }
}
[data-motion="off"] .btn::after { display: none; }

/* Paper: night ink on white. The sheet is narrower than 860px, so the one-column layout applies. */
@media print {
  @page { margin: 14mm 14mm 16mm; }
  /* The palette is re-inked for paper: hairlines, marks and drawings follow these tokens. */
  :root { color-scheme: light; --fg: #1a1712; --fg-soft: #1a1712; --fg-2: #4a4539; --fg-3: #6b6557; --accent: #7a5b17; --accent-hi: #5f4610; --accent-lo: #8c6a1e; --teal: #1d766e; --line: rgba(26, 23, 18, 0.34); --rule: rgba(26, 23, 18, 0.18); --rule-2: rgba(26, 23, 18, 0.34); --panel: transparent; --gold-grad: none; }
  /* The shell stays on the screen: the scene, the header, the bars, the menu, the footer links. */
  #scene, .still, .veil, .skip, .top, .hud, .prog, .bar, .sheet, .foot-grid, .h-cue, .h-hero-foot { display: none !important; }
  * { text-shadow: none !important; box-shadow: none !important; color: #1a1712 !important; -webkit-text-fill-color: #1a1712; background: none !important; }
  html, body { background: #fff !important; }
  /* One measure for the whole sheet: the page margins are the only margins. */
  .frame, .sec, .foot { min-height: 0 !important; padding: 14pt 0 !important; }
  .frame > .in, .sec > .in { max-width: none; }
  .sec { border-top: 0 !important; }
  .sec + .sec > .in { padding-top: 14pt; }
  .frame::before, .sec::before, .btn::after { display: none !important; }
  /* Small marks drawn as backgrounds (list diamonds, the rule of an eyebrow) are printed as ink. */
  .dots li::before, .prose ul:not([class]) > li::before, .eb::before { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .foot { border-top: 1px solid #999; }
  .foot-legal { margin-top: 0; padding-top: 0; border-top: 0; }
  /* Everything that waits for the reader on the screen is in place on paper. */
  .js .rv, .js .ln > span, .js .words .w { opacity: 1 !important; transform: none !important; filter: none !important; }
  .draw { stroke-dashoffset: 0 !important; }
  .js .lb-node::before, .js .lb-node::after { transform: none !important; }
  .sec, .panel, .note, .tbl-wrap, .btn, .fmts span, .chip span { border-color: #999; }
  /* A price keeps its sign on any printer: the real character is printed in place of the drawn
     one, in the same room, so no line of a price changes its length. */
  .price-c::before { display: none; }
  .price-c > span { position: static; display: inline-block; width: 0.75em; height: auto; overflow: visible; clip-path: none; font-size: 0.84em; white-space: nowrap; }
  /* Nothing is cut in two: a heading stays with its text; a figure, a table row, a ledger row and
     a question with its answer stay whole. A table is printed in full, not as a scroll area. */
  h1, h2, h3, h4, .eb, .lbl, .fh, summary { break-after: avoid; }
  figure, .fg, tr, li, .cell, .note, .formula, .pull, .offer, .mark, .faq details, .cta, .h-step-copy, .tk-panel, .calc-out, .sv-pass, .demo { break-inside: avoid; }
  p { orphans: 3; widows: 3; }
  .tbl-wrap { overflow: visible; break-inside: avoid; }
  .tbl-wrap table { min-width: 0 !important; }
  .tbl-wrap table tr > * { position: static !important; }
}

/* Golden Bridge v2 — the home page: fourteen chapters of one crossing. */

/* --------------------------------------------- the chapters in a wide window */
/* In a wide window the bottom row (counter, ticks, round buttons) stands on a floor 136px high
   (see "hud" in the base file). A chapter that fills the window keeps its last line above that
   floor: nothing of it is read through the row. A short window gives the space back at the top.
   (The first and the last chapter have no floor under them.) */
@media (min-width: 1101px) and (min-height: 561px) {
  .p-home .frame:not(.frame--auto, .h-hero, .f-cta) { padding-top: calc(var(--top-h) + clamp(12px, calc(13.4vh - 86px), 48px)); padding-bottom: 136px; }
}

/* ------------------------------------------------------------- 01 title */
.h-hero { justify-content: flex-start; padding-bottom: clamp(64px, 8vh, 96px); }
.h-hero > .in { flex: 1; display: flex; flex-direction: column; }
.h-hero-copy { margin-block: auto; max-width: min(1180px, 62vw); }
.h-hero .h1 .eb { margin-bottom: clamp(16px, 2.8vh, 30px); }
.h-hero .lede { margin-top: clamp(16px, 3vh, 34px); max-width: min(860px, 52vw); }
.h-hero .acts-row { margin-top: clamp(20px, 3.4vh, 38px); }
.h-hero .facts { margin-top: clamp(22px, 4.2vh, 48px); }
.h-hero .facts .price-n { font-weight: 600; }
/* The band that closes the first screen: the strip of terms, edge to edge. In the still states the
   strip is a wrapped line and keeps the page margins. */
.h-hero-foot { margin: clamp(12px, 2.2vh, 24px) calc(var(--gx) * -1) 0; }
.no-js .h-hero-foot, .late .h-hero-foot, [data-motion="off"] .h-hero-foot { margin-inline: 0; }
/* The cue «Листайте» belongs to the wide composition below; it shows only while it can move. */
.h-cue { display: none; }
@keyframes cue { 0% { transform: scaleY(0); opacity: 0; } 30% { opacity: 1; } 70% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .h-hero-foot { margin-inline: 0; } }
/* A wide window: the first screen is exactly one window at any height from 720px up. The gaps
   follow the window height; the band stands on the line of the round buttons of the bottom row
   (right corner, three buttons, 152px wide): the cue at the left edge of the content, the strip after it, ending
   well before the buttons. Nothing of the band ever lies under them. */
@media (min-width: 1101px) {
  .h-hero { padding-top: calc(var(--top-h) + clamp(12px, calc(12vh - 72px), 44px)); padding-bottom: 20px; }
  .h-hero .h1 .eb { margin-bottom: clamp(12px, calc(6vh - 29px), 30px); }
  .h-hero .lede { margin-top: clamp(14px, calc(6.1vh - 28px), 34px); }
  .h-hero .acts-row { margin-top: clamp(16px, calc(7vh - 32px), 38px); }
  .h-hero .facts { margin-top: clamp(18px, calc(9.8vh - 50px), 48px); }
  .h-hero .facts > div { padding-top: clamp(10px, 1.6vh, 14px); }
  .h-hero .facts dd { margin-top: clamp(5px, 0.9vh, 8px); }
  .h-hero-foot { display: flex; align-items: center; gap: clamp(18px, 2vw, 40px); min-height: 44px; margin: clamp(12px, 2.2vh, 24px) 0 0; padding-right: 196px; }
  .h-hero-foot .mq { flex: 1; min-width: 0; }
  .js .h-cue { flex: none; display: inline-flex; align-items: center; gap: 14px; font: 500 max(0.75rem, var(--fs-lbl))/1 var(--mono); letter-spacing: 0.3em; text-transform: uppercase; color: var(--fg-2); text-decoration: none; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9); transition: color 0.25s; }
  .js .h-cue:hover { color: var(--accent-hi); }
  .h-cue i { width: 1px; height: clamp(24px, 3.6vh, 34px); background: linear-gradient(var(--accent-hi), transparent); transform-origin: 50% 0; animation: cue 2.4s var(--ease) infinite paused; }
  /* The cue moves only while the opening chapter is on screen. */
  .js.at-first .h-cue i { animation-play-state: running; }
  .late .h-cue, [data-motion="off"] .h-cue { display: none; }
  .no-js .mq, .late .mq, [data-motion="off"] .mq { --mq-gap: 0.62em; }
}
@media (min-width: 1101px) and (prefers-reduced-motion: reduce) {
  .js .h-cue { display: none; }
  .mq { --mq-gap: 0.62em; }
}

/* ------------------------------------------------- 02-04 the three steps */
.h-step > .in { flex: 1; display: flex; }
.h-step-copy { position: relative; max-width: 46vw; }
.h-step--l .h-step-copy { margin-top: auto; }
.h-step--r > .in { justify-content: flex-end; }
.h-step--r .h-step-copy { margin-bottom: auto; margin-top: clamp(8px, 4vh, 60px); }
/* The numeral of the step: a large outline figure drawn in the line of the bridge. It stands above
   the eyebrow, in the flow of the block (never behind small type, never under the header). */
.h-step-n { display: block; margin: 0 0 clamp(8px, 1.6vh, 18px) -0.05em; font: italic 500 clamp(6rem, calc(var(--u) * 11), 13.5rem)/0.78 var(--serif); font-variant-numeric: lining-nums; color: transparent; -webkit-text-stroke: 1.5px rgba(226, 190, 112, 0.86); text-shadow: none !important; pointer-events: none; }
/* In the chapter whose block stands in the upper right the numeral hangs to the left of the block:
   the lines of text keep their place in the dark of the sky. */
@media (min-width: 1101px) { .h-step--r .h-step-n { position: absolute; right: 100%; top: -0.05em; margin: 0 0.16em 0 0; } }
.h-step .h2 { margin-top: clamp(14px, 2.2vh, 24px); }
.h-step .lede { margin-top: clamp(12px, 2vh, 22px); max-width: 30em; }
.h-decision { display: block; margin-top: 0.7em; color: var(--fg); }

/* ------------------------------------------------------ 05 the statement */
.h-stmt { justify-content: flex-start; }
.h-stmt > .in { flex: 1; display: flex; flex-direction: column; }
/* The head stands above the bridge: the statement on the left, what it means on the right. The
   lower half of the window belongs to the bridge and to its dimension line. */
.h-stmt-top { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); column-gap: clamp(32px, 7vw, 120px); align-items: end; }
.h-stmt-top .h1 { margin-top: clamp(12px, 2vh, 22px); }
.h-stmt-side { justify-self: end; max-width: 29em; padding-bottom: 0.9em; }
.h-stmt-side .lede { margin: 0; }
.h-stmt-note { margin-top: clamp(12px, 2vh, 20px); font: 500 var(--fs-side)/1.4 var(--sans); color: var(--fg); }
.h-stmt-line { width: 100%; margin-top: auto; }
/* Tied to the live bridge (app.js, "the dimension line"): the ends stand under the anchors, the
   ticks under the towers and at mid-span, the labels to the right of their ticks, over the water. */
[data-dim].is-pinned .fg-dim { max-width: none; padding-right: 0; will-change: transform; transition: opacity 0.25s ease; }
[data-dim].is-pinned .fg-w { overflow: visible; }
[data-dim].is-pinned .fg-dim-tk text { text-anchor: start; }
[data-dim].is-pinned .fg-dim text { paint-order: stroke; stroke: rgba(11, 10, 8, 0.88); stroke-width: 5px; stroke-linejoin: round; }
[data-dim].is-pinned.is-far .fg-dim { opacity: 0; }

/* ------------------------------------------------- the pinned flight (01-05) */
/* In a wide window with a pointer (app.js sets html.fly and wraps the content of each of these
   chapters in .pin) the chapters do not scroll: the frame is only the stretch of the page that
   belongs to the chapter, and its content stands still in the window for that stretch. A chapter
   is shown while it is the one in place (.is-here); between two chapters the camera flies and no
   text is on screen. The last chapter holds for half a window and then leaves with the page. */
@media screen {
  .fly .p-home .frame[data-flight] { display: block; padding-block: 0; }
  .fly [data-flight]::before { content: none; }
  .fly [data-flight] > .pin { position: sticky; top: var(--pin-top, 0px); z-index: 1; height: 0; }
  .fly [data-flight] > .pin > .in { position: absolute; top: 0; left: 0; right: 0; display: flex; width: auto; max-width: var(--max); height: var(--pin-h, 60vh); margin-inline: auto; opacity: 0; pointer-events: none; transition: opacity 0.4s ease; }
  .fly .h-hero > .pin > .in, .fly .h-stmt > .pin > .in { flex-direction: column; }
  .fly .h-step--r > .pin > .in { justify-content: flex-end; }
  .fly [data-flight].is-here > .pin > .in { opacity: 1; pointer-events: auto; }
  /* The shade of a pinned chapter stands with its text and goes with it. */
  .fly [data-flight][data-shade] > .pin::before { content: ""; position: absolute; top: calc(var(--pin-top, 0px) * -1); left: calc(var(--gx) * -1); right: calc(var(--gx) * -1); height: 100vh; pointer-events: none; opacity: 0; transition: opacity 0.4s ease; }
  .fly [data-flight].is-here > .pin::before { opacity: 1; }
  .fly [data-flight][data-shade="l"] > .pin::before { background: linear-gradient(90deg, rgba(11, 10, 8, 0.86) 0%, rgba(11, 10, 8, 0.52) 40%, rgba(11, 10, 8, 0) 66%); }
  .fly [data-flight][data-shade="r"] > .pin::before { background: linear-gradient(270deg, rgba(11, 10, 8, 0.86) 0%, rgba(11, 10, 8, 0.52) 40%, rgba(11, 10, 8, 0) 66%); }
  .fly [data-flight][data-shade="t"] > .pin::before { background: linear-gradient(180deg, rgba(11, 10, 8, 0.9) 0%, rgba(11, 10, 8, 0.6) 34%, rgba(11, 10, 8, 0) 62%); }
  /* The last one is an ordinary sticky block: it lets go after its hold and leaves with its frame. */
  .fly [data-flight].fly-last { min-height: calc(150vh); }
  .fly [data-flight].fly-last > .pin { height: var(--pin-h, 60vh); }
  .fly [data-flight].fly-last > .pin > .in { position: relative; height: 100%; }
  html[data-motion="off"].fly [data-flight] > .pin > .in, html[data-motion="off"].fly [data-flight] > .pin::before { transition: none; }
}
@media screen and (prefers-reduced-motion: reduce) { .fly [data-flight] > .pin > .in, .fly [data-flight] > .pin::before { transition: none; } }

/* -------------------------------------------------- 06 what you came with */
/* Four situations and one answer card, driven by radio buttons: it works without scripts. */
/* The rules belong to the list of situations; the answer card stands beside it, from the first
   rule of the list to the last. */
.tk { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); column-gap: clamp(24px, 4.2vw, 80px); grid-auto-rows: auto; align-items: stretch; }
.tk-item { display: contents; }
.tk-item:first-child .tk-opt { border-top: 1px solid var(--line); }
.tk-in { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.tk-opt { grid-column: 1; position: relative; display: grid; grid-template-columns: clamp(44px, 3.6vw, 70px) minmax(0, 1fr); align-items: baseline; align-content: center; padding: clamp(14px, 2.2vh, 24px) 18px clamp(14px, 2.2vh, 24px) 0; border-bottom: 1px solid var(--line); cursor: pointer; transition: background 0.4s; }
.tk-opt .n { font: italic 500 clamp(1.6rem, calc(var(--u) * 2.4), 2.9rem)/1 var(--serif); font-variant-numeric: lining-nums; color: var(--accent-lo); transition: color 0.3s, text-shadow 0.3s; }
.tk-t { font: 500 clamp(1.4rem, calc(var(--u) * 2.5), 3rem)/1.08 var(--serif); font-variant-numeric: lining-nums; color: var(--fg-soft); transition: color 0.3s; text-shadow: 0 2px 18px rgba(11, 10, 8, 0.92); }
.tk-mini { display: none; }
.tk-opt:hover .tk-t { color: var(--fg); }
.tk-in:checked + .tk-opt { background: linear-gradient(90deg, rgba(217, 178, 96, 0.14), rgba(217, 178, 96, 0)); }
.tk-in:checked + .tk-opt .n { color: var(--accent-hi); text-shadow: 0 0 20px rgba(246, 220, 156, 0.7); }
.tk-in:checked + .tk-opt .tk-t { color: var(--accent-hi); }
.tk-in:focus-visible + .tk-opt { outline: 2px solid var(--accent-hi); outline-offset: 2px; border-radius: 6px; }
.tk-panel { grid-column: 2; grid-row: 1 / span var(--n, 4); align-self: stretch; opacity: 0; visibility: hidden; clip-path: inset(0 0 0 100%); transition: opacity 0.3s, visibility 0s 0.3s, clip-path 0.3s var(--ease); }
.tk-in:checked ~ .tk-panel { opacity: 1; visibility: visible; clip-path: inset(0); transition: opacity 0.3s, visibility 0s, clip-path 0.45s var(--ease); }
.tk-text { font: 400 var(--fs-txt)/1.55 var(--sans); color: var(--fg-soft); }
.tk-panel .lbl { margin-top: clamp(16px, 2.6vh, 28px); }
.tk-name { margin-top: 8px; font: 600 clamp(1.3rem, calc(var(--u) * 1.9), 2.3rem)/1.12 var(--serif); font-variant-numeric: lining-nums; text-wrap: balance; }
.tk-name a { color: var(--fg); text-decoration-color: var(--line); text-underline-offset: 0.16em; }
.tk-price { margin-top: clamp(10px, 1.8vh, 20px); font-size: clamp(3rem, calc(var(--u) * 5.2), 6.2rem); line-height: 1; }
.tk-price .price-n { font-style: italic; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: 0.06em; }
.tk-term { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 12px; font: 500 var(--fs-sm)/1.4 var(--sans); color: var(--fg-soft); font-variant-numeric: lining-nums tabular-nums; }
.tk-panel .acts-row { margin-top: clamp(18px, 2.8vh, 30px); }
[data-motion="off"] .tk-panel, [data-motion="off"] .tk-in:checked ~ .tk-panel { transition: none; }
/* The note about the term closes the list of situations (first column). */
.tk-note { grid-column: 1; max-width: 52ch; }
/* A wide window: the chapter is exactly one window. The card stands beside the list and its note,
   its content centred; the term and the formats stand beside the price (and go under it when
   there is no room). */
@media (min-width: 1101px) {
  .h-task .fh { margin-bottom: clamp(12px, calc(9vh - 52.8px), 46px); }
  .tk { grid-template-rows: repeat(var(--n, 4), minmax(min-content, 1fr)) auto; }
  .tk-note { grid-row: var(--n1, 5); align-self: start; margin-top: clamp(10px, calc(5vh - 22px), 30px); }
  .tk-opt { padding-block: clamp(8px, 1.6vh, 24px); }
  .tk-panel { grid-row: 1 / span var(--n1, 5); display: flex; flex-direction: column; justify-content: center; padding-block: clamp(12px, calc(8vh - 45px), 34px); padding-inline: clamp(18px, 1.9vw, 40px); }
  .tk-text { font-size: clamp(0.94rem, calc(var(--u) * 1.18), 1.4rem); line-height: 1.5; }
  .tk-panel .lbl { margin-top: clamp(8px, calc(5vh - 27px), 28px); }
  .tk-name { margin-top: clamp(5px, 0.9vh, 8px); font-size: clamp(1.3rem, calc(var(--u) * 1.8), 2.2rem); }
  .tk-lock { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px clamp(14px, 1.4vw, 26px); margin-top: clamp(5px, calc(3.6vh - 20px), 20px); }
  .tk-price { flex: none; margin-top: 0; font-size: clamp(3rem, calc(var(--u) * 4.8), 5.9rem); }
  .tk-term { margin-top: clamp(8px, 1.6vh, 18px); gap: 8px 14px; }
  /* More than five situations: the lines are set smaller, so the list and its card stay in view together. */
  .tk--many .tk-opt { padding-block: clamp(7px, 1.25vh, 15px); }
  .tk--many .tk-opt .n { font-size: clamp(1.2rem, calc(var(--u) * 1.6), 1.95rem); }
  .tk--many .tk-t { font-size: clamp(1.12rem, calc(var(--u) * 1.62), 1.95rem); line-height: 1.12; }
  .tk--many .tk-panel { position: sticky; top: calc(var(--top-h) + 8px); align-self: start; max-height: calc(100vh - var(--top-h) - 96px); }
  .tk-panel .acts-row { margin-top: clamp(10px, calc(5.4vh - 28.9px), 30px); }
}

/* ---------------------------------------------------------- 07 price list */
/* Every row carries its whole description under the name: nothing is cut. */
.h-services .ld-sub { max-width: 46em; }
.pl-pane { display: none; }
/* A wide window with a pointer (and a running script): the eight prices are read in one view.
   Left, the head of the chapter and under it a quiet pane with the description and the formats of
   the current row; right, the rows, compact: number, name, the price with the term under it, the
   ask link. The current row is the one under the pointer or in focus (the first one until then);
   the script moves `is-cur` and `is-on`, nothing changes its size or place. The rows keep their
   own descriptions and formats for screen readers; the copies in the pane are hidden from them. */
@media (min-width: 1101px) and (hover: hover) and (pointer: fine) {
  .js:not(.late) .pl { display: grid; grid-template-columns: minmax(0, 0.44fr) minmax(0, 1fr); column-gap: clamp(28px, 3.6vw, 68px); align-items: stretch; }
  .js:not(.late) .pl-side { display: flex; flex-direction: column; min-width: 0; }
  .js:not(.late) .pl-side .fh { display: block; margin-bottom: 0; }
  .js:not(.late) .pl-side .fh .side { margin-top: clamp(12px, 2.2vh, 24px); padding-bottom: 0; font-size: var(--fs-sm); }
  .js:not(.late) .pl-pane { display: grid; margin-top: auto; padding-top: clamp(12px, 2vh, 22px); border-top: 1px solid var(--line); }
  .pl-card { grid-area: 1 / 1; opacity: 0; visibility: hidden; transition: opacity 0.26s var(--ease), visibility 0s 0.26s; }
  .pl-card.is-on { opacity: 1; visibility: visible; transition: opacity 0.3s var(--ease) 0.08s, visibility 0s; }
  .pl-n { font: italic 500 clamp(1.5rem, calc(var(--u) * 2.2), 2.65rem)/1 var(--serif); font-variant-numeric: lining-nums; color: var(--accent-hi); }
  .pl-text { margin-top: clamp(6px, 1vh, 12px); font: 400 var(--fs-sm)/1.5 var(--sans); color: var(--fg-soft); text-wrap: pretty; }
  .pl-fmt { margin-top: clamp(8px, 1.3vh, 14px); }
  .js:not(.late) .pl-main { display: flex; flex-direction: column; min-width: 0; }
  .js:not(.late) .pl-main .panel { padding: clamp(6px, 1vh, 14px) clamp(16px, 1.5vw, 30px); }
  .js:not(.late) .pl-main .foot-note { margin-top: clamp(10px, 1.8vh, 22px); font-size: var(--fs-sm); }
  .js:not(.late) .pl .ledger { grid-template-columns: clamp(34px, 2.7vw, 52px) minmax(0, 1fr) auto auto auto; column-gap: clamp(12px, 1.5vw, 28px); border-top: 0; }
  .js:not(.late) .pl .ld { grid-template-rows: auto auto; align-content: center; row-gap: 1px; align-items: center; min-height: calc(2 * 1.1 * clamp(1.375rem, calc(var(--u) * 1.6), 2rem) + 2 * clamp(6px, 0.9vh, 10px)); padding: clamp(6px, 0.9vh, 10px) 4px clamp(6px, 0.9vh, 10px) 0; }
  .js:not(.late) .pl .ld:last-child { border-bottom: 0; }
  .js:not(.late) .pl .ld-n { font-size: clamp(1.15rem, calc(var(--u) * 1.5), 1.9rem); }
  .js:not(.late) .pl .ld > .ld-name { font-size: clamp(1.375rem, calc(var(--u) * 1.6), 2rem); line-height: 1.1; }
  .js:not(.late) .pl :is(.ld-sub, .ld-fmt) { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .js:not(.late) .pl .ld > .ld-price { grid-column: 3; grid-row: 1; align-self: end; font-size: clamp(1.5rem, calc(var(--u) * 1.95), 2.4rem); }
  .js:not(.late) .pl .ld > .ld-term { grid-column: 3; grid-row: 1 / span 2; align-self: center; text-align: right; font-size: clamp(0.94rem, calc(var(--u) * 1.04), 1.2rem); line-height: 1.25; color: var(--fg-soft); }
  .js:not(.late) .pl .ld-grp { padding-inline: 0 4px; }
  .js:not(.late) .pl .ld > .ld-ask { grid-column: 4; }
  .js:not(.late) .pl .ld > .ld-go { grid-column: 5; }
  .pl .ld.is-cur::before { opacity: 1; }
  .pl .ld.is-cur .ld-n { color: var(--accent-hi); text-shadow: 0 0 18px rgba(246, 220, 156, 0.6); }
  [data-motion="off"] .pl-card, [data-motion="off"] .pl-card.is-on { transition: none; }
  @supports not (grid-template-columns: subgrid) {
    .js:not(.late) .pl .ld { grid-template-columns: clamp(34px, 2.7vw, 52px) minmax(0, 1fr) 11.5em 8.5em 20px; column-gap: clamp(12px, 1.5vw, 28px); }
  }
}
@media (min-width: 1101px) and (hover: hover) and (pointer: fine) and (prefers-reduced-motion: reduce) {
  .pl-card, .pl-card.is-on { transition: none; }
}

/* ---------------------------------------------------------- 08 calculator */
.calc { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(20px, 2.6vw, 50px); align-items: start; }
.calc-form { display: grid; gap: clamp(13px, 2.1vh, 24px); }
.calc-form fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.calc-form legend { margin-bottom: 10px; padding: 0; font: 500 max(0.75rem, var(--fs-lbl))/1.3 var(--mono); letter-spacing: 0.2em; text-transform: uppercase; color: var(--fg-2); text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.chip span { display: block; padding: clamp(9px, 1.2vh, 12px) clamp(13px, 1.05vw, 19px); border-radius: 999px; border: 1px solid var(--line); background: rgba(15, 13, 10, 0.86); font: 500 clamp(0.9rem, calc(var(--u) * 1.04), 1.22rem)/1.2 var(--sans); color: var(--fg-soft); transition: border-color 0.2s, background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.2s; }
.chip:hover span { border-color: var(--accent); }
.chip input:checked + span { background: linear-gradient(180deg, var(--accent-hi), var(--accent)); border-color: transparent; color: var(--accent-ink); font-weight: 700; box-shadow: 0 8px 30px rgba(217, 178, 96, 0.25); }
.chip input:focus-visible + span { outline: 2px solid var(--accent-hi); outline-offset: 3px; }
.chip input:active + span { transform: scale(0.97); }
.calc-out { position: sticky; top: calc(var(--top-h) + 14px); box-shadow: 0 30px 90px rgba(0, 0, 0, 0.45), 0 0 60px rgba(217, 178, 96, 0.08); }
.calc-price { display: flex; align-items: baseline; flex-wrap: wrap; margin-top: 10px; font: italic 500 clamp(2.9rem, calc(var(--u) * 5), 6rem)/1 var(--serif); color: var(--accent-hi); font-variant-numeric: lining-nums tabular-nums; white-space: nowrap; }
.calc-price .price-from { align-self: center; margin-right: 0.3em; font-style: normal; }
.calc-price .price-c { font-style: normal; }
.odo { display: inline-flex; }
.odo-d { position: relative; display: inline-block; }
.odo-g { visibility: hidden; }
.odo-w { position: absolute; inset: 0 -0.06em; overflow: hidden; }
.odo-r { display: flex; flex-direction: column; height: 1000%; transition: transform 0.45s var(--ease); }
.odo-r b { flex: 1; display: block; padding: 0 0.06em; font: inherit; }
.odo-s { display: inline-block; width: 0.2em; }
[data-motion="off"] .odo-r { transition: none; }
.calc-term { margin-top: 8px; font: 500 var(--fs-sm)/1.4 var(--sans); color: var(--fg-soft); font-variant-numeric: lining-nums tabular-nums; text-wrap: balance; }
.calc-rail { position: relative; height: 1px; margin-top: clamp(18px, 2.8vh, 30px); background: var(--rule-2); }
.calc-rail i { position: absolute; inset: 0; transform-origin: 0 50%; transform: scaleX(var(--pos, 0)); background: linear-gradient(90deg, var(--accent-lo), var(--accent-hi)); transition: transform 0.45s var(--ease); }
.calc-rail b { position: absolute; top: 50%; left: calc(var(--pos, 0) * 100%); width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--accent-hi); box-shadow: 0 0 16px rgba(246, 220, 156, 0.85); transition: left 0.45s var(--ease); }
.calc-range { display: flex; justify-content: space-between; gap: 10px; margin-top: 10px; font: 500 clamp(0.75rem, calc(var(--u) * 0.86), 1rem)/1.3 var(--mono); letter-spacing: 0.04em; color: var(--fg-2); font-variant-numeric: lining-nums tabular-nums; }
.calc-range span { white-space: nowrap; }
.calc-range span:nth-child(2) { min-width: 0; white-space: normal; text-align: center; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-3); }
.calc-out > .fine { margin-top: clamp(12px, 1.8vh, 18px); font-size: 0.94rem; }
.calc-out > .btn { margin-top: clamp(12px, 1.8vh, 18px); }
/* The text of the message is a closed disclosure: the visitor opens it to read or copy it. */
.calc-msg { margin-top: clamp(12px, 1.8vh, 18px); border-top: 1px solid var(--rule); }
.calc-msg summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0 2px; cursor: pointer; font: 500 clamp(0.75rem, calc(var(--u) * 0.86), 1rem)/1.3 var(--mono); letter-spacing: 0.2em; text-transform: uppercase; color: var(--fg-2); transition: color 0.25s; }
.calc-msg summary::-webkit-details-marker { display: none; }
.calc-msg summary:hover, .calc-msg[open] summary { color: var(--accent-hi); }
.calc-msg summary i { position: relative; flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line); }
.calc-msg summary i::before, .calc-msg summary i::after { content: ""; position: absolute; left: 50%; top: 50%; width: 8px; height: 1.5px; margin: -0.75px 0 0 -4px; background: var(--accent-hi); transition: transform 0.3s var(--ease); }
.calc-msg summary i::after { transform: rotate(90deg); }
.calc-msg[open] summary i::after { transform: none; }
.calc-msg pre { margin: 10px 0 12px; padding: 12px 14px; max-height: 13.5em; overflow: auto; white-space: pre-wrap; border-radius: 12px; border: 1px solid var(--rule); background: rgba(7, 6, 5, 0.7); font: 400 0.8rem/1.55 var(--mono); color: var(--fg-soft); }
.calc-msg pre span { transition: color 0.6s, background 0.6s; border-radius: 3px; }
.calc-msg pre .chg { color: var(--accent-hi); background: rgba(217, 178, 96, 0.14); transition: none; }
.toast { margin-left: 12px; font: 500 0.86rem/1.3 var(--sans); color: var(--accent-hi); opacity: 0; transition: opacity 0.3s; }
.toast.is-on { opacity: 1; }
/* Without scripts, or when the script did not start (the message of the sheet is still empty),
   the calculator cannot count: the form and the sheet are not shown. The visitor reads a note
   and gets a plain link; the prices are in the chapter above. */
.calc-plain { display: none; max-width: 46em; }
.calc-plain > p + p { margin-top: clamp(16px, 2.6vh, 28px); }
.no-js .calc { display: none; }
.no-js .h-calc .fh .side, .late .h-calc:has([data-calc-preview]:empty) .fh .side { display: none; }
.no-js .calc-plain { display: block; }
.late .calc:has([data-calc-preview]:empty) { display: none; }
.late .calc:has([data-calc-preview]:empty) + .calc-plain { display: block; }
/* A wide window: the five questions and the sheet with its button are read in one view. */
@media (min-width: 1101px) {
  .h-calc .fh { margin-bottom: clamp(12px, calc(8vh - 60px), 28px); }
  .calc { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(20px, 2.4vw, 46px); }
  .calc-form { gap: clamp(10px, 1.45vh, 16px); }
  .calc-form legend { margin-bottom: clamp(6px, 0.8vh, 8px); }
  .chip span { padding: clamp(7px, 1vh, 11px) clamp(12px, 0.95vw, 19px); font-size: clamp(0.875rem, calc(var(--u) * 1), 1.2rem); }
  .calc-out { padding-block: clamp(14px, 1.8vh, 30px); }
  .calc-price { margin-top: clamp(6px, 1vh, 10px); }
  /* The term may take a second line («· ускорение согласуем»): its place is kept, so the sheet
     does not change its height when an answer changes. */
  .calc-term { min-height: 2.8em; margin-top: clamp(4px, 0.8vh, 8px); }
  .calc-rail { margin-top: clamp(8px, 1.1vh, 16px); }
  .calc-out > .fine, .calc-out > .btn, .calc-msg { margin-top: clamp(10px, 1.4vh, 16px); }
}
/* A low wide window (a laptop of 720-800px): the price list and the calculator are set tighter,
   so the eighth row and the sheet's button stand above the bottom row when the chapter lands. */
@media (min-width: 1101px) and (max-height: 800px) and (hover: hover) and (pointer: fine) {
  .js:not(.late) .pl .ld { min-height: 0; padding-block: 4px; }
  .js:not(.late) .pl .ld > .ld-name { font-size: 1.1875rem; }
  .js:not(.late) .pl .ld > .ld-price { font-size: 1.375rem; }
  .js:not(.late) .pl .ld > .ld-term { font-size: 0.875rem; line-height: 1.2; }
  .js:not(.late) .pl-main .panel { padding-block: 4px; }
  .js:not(.late) .pl-main .foot-note { margin-top: 8px; }
  /* The left column (the head and the pane with the description) sets the height of the chapter. */
  .js:not(.late) .pl { grid-template-columns: minmax(0, 0.5fr) minmax(0, 1fr); }
  .js:not(.late) .pl-side .fh .side { margin-top: 8px; }
  .js:not(.late) .pl-pane { padding-top: 8px; }
  .pl-n { font-size: 1.4rem; }
  .pl-text { margin-top: 4px; font-size: 0.875rem; line-height: 1.4; }
  .pl-fmt { margin-top: 6px; }
}
@media (min-width: 1101px) and (max-height: 800px) {
  .p-home .h-calc.frame { padding-top: calc(var(--top-h) + 10px); }
  .h-calc .fh { margin-bottom: 6px; }
  .h-calc .fh .h2 { font-size: calc(var(--fs-h2) * 0.74); }
  .calc-form { gap: 5px; }
  .calc-form legend { margin-bottom: 4px; }
  .chips { gap: 6px; }
  .chip span { padding-block: 5px; }
  .calc-out { padding-block: 12px; }
  .calc-price { font-size: 2.6rem; }
  .calc-term { min-height: 2.5em; }
  .calc-rail { margin-top: 8px; }
  .calc-out > .fine { font-size: 0.8125rem; line-height: 1.38; }
  .calc-out > .fine, .calc-out > .btn, .calc-msg { margin-top: 8px; }
  .calc-out > .btn { min-height: 50px; padding-block: 8px; }
  .calc-msg summary { padding-top: 8px; }
}
/* From this width the eight services stand as a block of four by two. */
@media (min-width: 1400px) {
  .calc-form fieldset:first-child .chips { display: grid; grid-template-columns: repeat(4, minmax(0, auto)); justify-content: start; }
  .calc-form fieldset:first-child .chip span { text-align: center; }
}

/* ---------------------------------------------------------- 09 conditions */
.clauses { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(24px, 4vw, 80px); border-top: 1px solid var(--line); }
.clause { display: grid; grid-template-columns: clamp(44px, 3.6vw, 70px) minmax(0, 1fr); align-items: baseline; padding: clamp(14px, 2.4vh, 26px) 0; border-bottom: 1px solid var(--line); transition: opacity 0.3s; }
.clause .n { font: italic 500 clamp(1.6rem, calc(var(--u) * 2.4), 2.9rem)/1 var(--serif); font-variant-numeric: lining-nums; color: var(--accent-lo); transition: color 0.3s; }
.clause h3 { font: 600 clamp(1.25rem, calc(var(--u) * 1.8), 2.2rem)/1.12 var(--serif); color: var(--fg); }
.clause p { margin-top: 8px; max-width: 34em; font: 400 var(--fs-sm)/1.55 var(--sans); color: var(--fg-soft); }
.clause--first { grid-column: 1 / -1; }
.clause--first h3 { font-size: clamp(1.7rem, calc(var(--u) * 3), 3.6rem); font-weight: 500; }
.clause--first p { max-width: 46em; font-size: var(--fs-txt); }
.clause:hover .n { color: var(--accent-hi); }
.clauses:has(.clause:hover) .clause:not(:hover) { opacity: 0.62; }
.fix { position: relative; display: inline-block; padding: 0.1em 0.42em; margin: 0 0.1em 0 -0.42em; color: var(--fg); }
.fix svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.fix rect { fill: none; stroke: var(--accent-hi); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.clause h3 { font-variant-numeric: lining-nums; }
.clause p { text-wrap: pretty; }
/* A wide window: the five clauses and the head are exactly one window; the gaps follow its height. */
@media (min-width: 1101px) {
  .h-terms .fh { margin-bottom: clamp(10px, calc(8vh - 47px), 40px); }
  .clauses { column-gap: clamp(24px, 3vw, 60px); }
  .clause { padding-block: clamp(7px, calc(4.2vh - 23px), 20px); }
  .clause p { max-width: 38em; margin-top: clamp(3px, 0.7vh, 8px); line-height: 1.5; }
  .clause--first p { max-width: none; }
  .clause--first h3 { font-size: clamp(1.7rem, calc(var(--u) * 2.8), 3.4rem); }
}


/* ---------------------------------------------------------- 10 five steps */
/* A wide window: the head, the drawing of the route and the five steps are one window from 900px
   of height up (in a lower window the steps alone need more than is left under the head, and the
   chapter is taller than the window). The drawing is set lower than it is drawn: its towers and
   cables are pressed by a fifth (--k), the numbered lights keep their round shape, and the box
   shrinks with it (its height is 23.333% of its width), so the flags under it follow. */
@media (min-width: 1101px) {
  .h-proc .fh { margin-bottom: clamp(8px, calc(8vh - 62px), 24px); }
  .h-proc .fg-route-fig { margin-bottom: clamp(1.8em, calc(3.2vh - 6px), 2.6em); }
  .h-proc .fg-steps li { padding-top: clamp(8px, 1.3vh, 18px); }
  .h-proc .fg-step-t { font-size: clamp(1.15rem, calc(var(--u) * 1.45), 1.85rem); }
  .h-proc .fg-step-d { margin-top: clamp(4px, 0.8vh, 10px); font-size: min(var(--fs-sm), 1.12rem); }
  @supports (width: 1cqw) {
    .h-proc .fg-route { --k: 0.76; }
    @media (min-width: 1101px) and (max-height: 800px) {
      .h-proc .fg-route { --k: 0.54; }
      .h-proc .fh { margin-bottom: 2px; }
      .h-proc .fg-route-fig { margin-bottom: 1.2em; }
      .h-proc .fg-steps li { padding-top: 6px; }
      .h-proc .fg-step-d { margin-top: 3px; font-size: 0.94rem; line-height: 1.36; }
    }
    .h-proc .fg-route-fig { display: flow-root; }
    .h-proc .fg-route-svg { margin-bottom: calc((var(--k) - 1) * 23.333cqw); }
    .h-proc .fg-route-svg > :not(defs) { transform: scaleY(var(--k)); transform-origin: 0 0; }
    .h-proc .fg-route-svg .fg-nd { transform: scaleY(calc(1 / var(--k))); transform-box: fill-box; transform-origin: 50% 50%; }
  }
}

/* ------------------------------------------------- 11 examples and files */
.demos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 1.5vw, 28px); align-items: stretch; }
.demo { position: relative; display: flex; flex-direction: column; transition: border-color 0.3s; }
.demo:hover { border-color: rgba(246, 220, 156, 0.55); }
.demo .lbl { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
/* «Синтетическое демо» stands in the same place of both cards: the label row. (The figure's own
   badge is not repeated inside a card.) */
.flag { padding: 0.5em 0.9em; border: 1px solid var(--line); border-radius: 999px; font: 500 clamp(0.75rem, calc(var(--u) * 0.86), 0.94rem)/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); white-space: nowrap; }
.demo .fg-head .fg-tag { display: none; }
.demo h3 { margin-top: clamp(10px, 1.6vh, 18px); font: 600 clamp(1.4rem, calc(var(--u) * 2.08), 2.5rem)/1.1 var(--serif); font-variant-numeric: lining-nums; }
.demo h3 a { color: var(--fg); text-decoration: none; }
.demo h3 a::after { content: ""; position: absolute; inset: 0; }
.demo > .txt { margin-top: 10px; }
/* The two cards are one height; the shorter drawing stands in the middle of its place. */
.demo-fig { position: relative; z-index: 1; flex: 1 1 auto; display: flex; flex-direction: column; justify-content: center; margin: clamp(14px, 2.4vh, 26px) 0; }
.demo-facts { grid-template-columns: repeat(4, minmax(0, auto)); justify-content: start; gap: clamp(14px, 2vw, 40px); margin: auto 0 clamp(14px, 2.2vh, 24px); padding-top: clamp(12px, 2vh, 20px); border-top: 1px solid var(--rule); }
.demo-facts > div { align-items: baseline; gap: 8px; }
.demo-facts b { font-size: clamp(1.8rem, calc(var(--u) * 2.7), 3.2rem); }
/* While the two cards stand side by side (up to 1100px) four facts do not fit one row of a card. */
@media (max-width: 1100px) { .demo-facts { grid-template-columns: repeat(2, minmax(0, auto)); } }
.demo-facts span { font-size: 0.86rem; color: var(--fg-2); }
.demo > .lnk { align-self: flex-start; position: relative; z-index: 1; }
.h-files { margin-top: clamp(56px, 10vh, 120px); }
.files-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(24px, 4vw, 80px); align-items: center; }
.files-facts { grid-template-columns: minmax(0, 1fr); row-gap: clamp(14px, 2.4vh, 26px); }
.files { border-top: 1px solid var(--line); }
.file { position: relative; display: grid; grid-template-columns: 64px minmax(0, 1fr) auto auto; column-gap: clamp(12px, 1.6vw, 28px); align-items: center; padding: clamp(13px, 2vh, 20px) 0; border-bottom: 1px solid var(--line); }
.file-type { font: 500 clamp(0.75rem, calc(var(--u) * 0.86), 1rem)/1 var(--mono); letter-spacing: 0.14em; color: var(--accent); }
.file-name { font: 600 clamp(1.2rem, calc(var(--u) * 1.7), 2rem)/1.12 var(--serif); font-variant-numeric: lining-nums; }
.file-name a { color: var(--fg); text-decoration: none; transition: color 0.2s; }
.file-name a:hover { color: var(--accent-hi); }
.file-text { display: block; margin-top: 6px; max-width: 44em; font: 400 var(--fs-sm)/1.5 var(--sans); color: var(--fg-2); }
.file-size { font: 500 0.8rem/1 var(--mono); color: var(--fg-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.file-get { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 10px 0; font: 600 0.9rem/1 var(--sans); color: var(--accent-hi); text-decoration: none; white-space: nowrap; }
.file-get svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.file-get::after { content: ""; position: absolute; right: 8px; top: 100%; width: 1px; height: 12px; background: var(--accent-hi); transform: scaleY(0); transform-origin: 50% 0; transition: transform 0.35s var(--ease); }
.file-get:hover::after, .file-get:focus-visible::after { transform: scaleY(1); }

/* ------------------------------------------- 12 experience and recipients */
.exp { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: clamp(24px, 5vw, 100px); align-items: end; }
.exp .stmt { margin-top: clamp(16px, 2.8vh, 32px); max-width: 21em; }
.exp .lnk { margin-top: clamp(18px, 3vh, 34px); }
.exp-note { font-size: var(--fs-sm); }
.exp--to { margin-top: clamp(36px, 7vh, 84px); padding-top: clamp(28px, 5vh, 60px); border-top: 1px solid var(--line); align-items: start; }
@media (min-width: 1101px) { .exp--to { margin-top: clamp(22px, calc(13vh - 68px), 84px); padding-top: clamp(20px, calc(9vh - 42px), 60px); } }
/* The recipients as one set line. Every name brings its separator before it and never breaks;
   the separator of the first name of a line falls outside the clipped box, so no line starts or
   ends with a lone diamond. */
.recipients { --rc-gap: 0.4em; display: flex; flex-wrap: wrap; align-items: center; row-gap: 0.08em; margin: clamp(14px, 2.4vh, 26px) 0 0 calc(-0.17em - var(--rc-gap) * 2); clip-path: inset(-0.5em -2em -0.5em calc(0.17em + var(--rc-gap) * 2)); font: 500 clamp(1.4rem, calc(var(--u) * 2.3), 2.75rem)/1.3 var(--serif); font-variant-numeric: lining-nums; color: var(--fg); }
.recipients li { display: inline-flex; align-items: center; white-space: nowrap; }
.recipients li::before { content: ""; flex: none; width: 0.17em; height: 0.17em; margin-inline: var(--rc-gap); transform: rotate(45deg); background: var(--accent-lo); }

/* ------------------------------------------------------------ 13 questions */
.faq-grid { display: grid; grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr); gap: clamp(24px, 5vw, 100px); align-items: start; margin-top: clamp(56px, 10vh, 120px); }
.faq-side { position: sticky; top: calc(var(--top-h) + 24px); }
.faq-side .fh { margin-bottom: clamp(12px, 2.2vh, 24px); }
.faq-side .side { margin-bottom: clamp(16px, 2.6vh, 28px); }

/* ----------------------------------------------------------- responsive */
@media (max-width: 1100px) {
  .calc { grid-template-columns: minmax(0, 1fr); }
  .calc-out { position: static; }
  .exp, .files-grid { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .files-facts { grid-template-columns: repeat(2, minmax(0, auto)); justify-content: start; column-gap: 40px; }
  /* Touch: a chip, the disclosure of the message and a download link are 44px targets. */
  .chip span { display: flex; align-items: center; min-height: 44px; padding-block: 8px; }
  .calc-msg summary { min-height: 44px; padding-block: 6px; }
  .file-get { min-height: 44px; }
  /* The name of a service in the answer card and the name of a file are links: each takes 44px
     across its line (the line keeps its place). */
  .tk-name a, .file-name a { display: inline-block; padding-block: 12px; margin-block: -12px; }
  /* A tablet: the questions and the sheet stand side by side, and the sheet stays in view while
     the answers change. */
  @media (min-width: 700px) {
    .calc { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 32px); }
    .calc-out { position: sticky; top: calc(var(--top-h) + 14px); }
    .calc-price { font-size: clamp(2.5rem, 5.6vw, 3.4rem); }
  }
  /* A tablet on its side (861-1100px). The rows of the price list carry their descriptions, so
     they keep the two-column form of the upright tablet: the name, the description and the
     formats on the left; the price, the term and the ask link on the right. (The compact rows
     with the pane beside them need a pointer and 1101px.) */
  @media (min-width: 861px) {
    .h-services .ledger { display: block; }
    .h-services .ld { grid-template-columns: 52px minmax(0, 1fr) auto; grid-template-rows: none; column-gap: clamp(20px, 3vw, 36px); row-gap: 0; padding: 18px 0; }
    .h-services .ld > .ld-name { display: contents; }
    .h-services .ld > *, .h-services .ld-name > * { grid-row: auto; }
    .h-services .ld > .ld-n { grid-column: 1; grid-row: 1; }
    .h-services .ld-name > a { grid-column: 2; grid-row: 1; }
    .h-services .ld > .ld-price { grid-column: 3; grid-row: 1; text-align: right; font-size: 1.9rem; }
    .h-services .ld > .ld-term { grid-column: 3; grid-row: 1; align-self: start; margin-top: 0.35em; text-align: right; }
    .h-services .ld-name > .ld-sub { grid-column: 2; grid-row: 2; margin-top: 8px; }
    .h-services .ld > .ld-fmt { grid-column: 2; grid-row: 3; align-self: center; margin-top: 12px; }
    .h-services .ld > .ld-ask { grid-column: 3; grid-row: 2 / span 2; justify-self: end; align-self: end; margin-bottom: -10px; }
    .h-services .ld > .ld-go { display: none; }
  }
}
@media (max-width: 860px) {
  .h-hero-copy, .h-hero .lede { max-width: none; }
  /* The title keeps its three authored lines on every phone from 320px up: the size follows the
     width of the screen, so the longest line («под требования банка») always fits. */
  .h-hero .h1 { font-size: min(var(--fs-h1), 10.3vw); }
  .h-cue { display: none; }
  /* The three steps become compact rows: the price list arrives two screens earlier. */
  .h-step { min-height: 62vh; min-height: 62svh; padding-block: clamp(40px, 7vh, 72px); }
  /* Their blocks of text carry their own night (below): the frame itself is not shaded, so the
     portal shows between the blocks. */
  .h-step[data-shade]::before { background: none; }
  .h-step-copy { width: 100%; max-width: none; margin: auto 0 0; }
  .h-step--r > .in { justify-content: flex-start; }
  .h-step--r .h-step-copy { margin: auto 0 0; }
  /* The numeral stands above the eyebrow instead of behind it: outlines must not cross small type. */
  .h-step-n { position: static; display: block; margin: 0 0 4px -0.04em; font-size: 4.6rem; line-height: 0.86; }
  /* On a phone the bridge of the statement stands in the upper part of the screen, the words under it. */
  /* The top band of the screen belongs to the bridge (the scene's phone view of this chapter). */
  .h-stmt > .in { justify-content: flex-end; padding-top: 22vh; padding-top: 22svh; }
  .h-stmt-top { grid-template-columns: minmax(0, 1fr); row-gap: clamp(14px, 2.4vh, 22px); }
  .h-stmt-side { justify-self: start; padding-bottom: 0; }
  .h-stmt-line { margin-top: clamp(20px, 4vh, 40px); }
  /* The situations become four rows that open in place; price and term stay visible when closed. */
  .tk { grid-template-columns: minmax(0, 1fr); }
  .tk-opt { grid-template-columns: 38px minmax(0, 1fr); row-gap: 6px; padding-right: 0; }
  .tk-mini { display: block; grid-column: 2; font: 500 0.9rem/1.3 var(--sans); color: var(--fg-soft); font-variant-numeric: lining-nums tabular-nums; }
  .tk-in:checked + .tk-opt .tk-mini { display: none; }
  .tk-panel { grid-column: 1; grid-row: auto; display: none; margin: 12px 0 18px; clip-path: none; }
  .tk-in:checked ~ .tk-panel { display: block; }
  .demos, .faq-grid, .clauses { grid-template-columns: minmax(0, 1fr); }
  .faq-side { position: static; }
  .demo-facts { grid-template-columns: repeat(2, minmax(0, auto)); }
  .file { grid-template-columns: 52px minmax(0, 1fr) auto; row-gap: 4px; }
  .file-size { grid-column: 2; }
  .file-get { grid-column: 3; grid-row: 1 / span 2; }
  .calc-msg:not([open]) pre { display: none; }
  .clauses:has(.clause:hover) .clause:not(:hover) { opacity: 1; }
  /* A phone: the opened message is read in the flow of the page, not in a scroll area of its own. */
  @media (max-width: 699px) { .calc-msg pre { max-height: none; overflow: visible; } }
  /* An upright tablet: the lower right corner of the title belongs to the bridge; the strip of terms steps back. */
  @media (min-width: 600px) { .h-hero-foot { display: none; } }
  /* A tablet: the numeral of a step keeps pace with the larger heading under it. */
  @media (min-width: 600px) { .h-step-n { font-size: 6.4rem; } }
  /* The three steps stand on the deck portal: each block of text carries its own night, so the
     structure behind the words is only a dim trace. */
  .h-step-copy { position: relative; }
  .h-step-copy::before { content: ""; position: absolute; z-index: -1; inset: -60px calc(var(--gx) * -1); background: linear-gradient(180deg, rgba(11, 10, 8, 0), rgba(11, 10, 8, 0.96) 26px, rgba(11, 10, 8, 0.96) calc(100% - 26px), rgba(11, 10, 8, 0)); pointer-events: none; }
  /* Without the scene the band above the statement is empty: the frame gives it back. */
  .no-js .h-stmt > .in, .late .h-stmt > .in, .no-scene .h-stmt > .in { padding-top: 0; }
  .no-js .h-stmt, .late .h-stmt, .no-scene .h-stmt, .no-js .h-calc { min-height: 0; }
  /* A tablet: the first clause across the sheet, the other four in two columns. */
  @media (min-width: 700px) { .clauses { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(24px, 4vw, 48px); } }
}
@media (prefers-reduced-motion: reduce) {
  .h-cue i { animation: none; }
  .tk-panel, .tk-in:checked ~ .tk-panel, .odo-r, .calc-rail i, .calc-rail b { transition: none; }
}

/* Golden Bridge v2 — long reads: guides, legal pages, template pages, text under the examples.
   One dark panel, a 62-70 character column, no staging inside the text. */

.read { display: grid; grid-template-columns: minmax(0, 680px) minmax(220px, 300px); justify-content: space-between; column-gap: clamp(32px, 7vw, 140px); align-items: start; }
.read:has(> .prose:only-child) { grid-template-columns: minmax(0, 680px); justify-content: start; }
.prose { font: 400 clamp(1.06rem, 1.04rem + 0.1vw, 1.125rem)/1.7 var(--sans); color: var(--fg-soft); }
.prose > * + *, .prose-sec > * + * { margin-top: 1.05em; }
.prose-sec { margin-top: clamp(40px, 6.5vh, 72px); scroll-margin-top: 8px; }
.prose h2 { font: 600 clamp(1.8rem, 1.4rem + 1.1vw, 2.5rem)/1.1 var(--serif); color: var(--fg); text-wrap: balance; scroll-margin-top: 8px; }
.prose > h2 { margin-top: clamp(40px, 6.5vh, 72px); }
.prose h3 { margin-top: 1.6em; font: 600 clamp(1.3rem, 1.15rem + 0.5vw, 1.6rem)/1.15 var(--serif); color: var(--fg); }
.prose p { text-wrap: pretty; }
.prose strong { color: var(--fg); font-weight: 600; }
.prose a { color: var(--accent-hi); text-decoration-color: var(--line); text-underline-offset: 0.2em; transition: text-decoration-color 0.2s; }
.prose a:hover { text-decoration-color: var(--accent-hi); }
.prose ul:not([class]), .prose ol:not([class]) { display: grid; gap: 0.5em; padding-left: 1.3em; }
.prose ul:not([class]) { list-style: none; padding-left: 0; }
.prose ul:not([class]) > li { position: relative; padding-left: 24px; }
.prose ul:not([class]) > li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 8px; height: 8px; transform: rotate(45deg); background: var(--accent); }
.prose ol:not([class]) { list-style: decimal; }
.prose ol:not([class]) > li::marker { color: var(--accent); font-family: var(--mono); font-size: 0.86em; }
.prose .dots li { font-size: inherit; line-height: inherit; }

/* The short conclusion: a ruled pull box. */
.pull { padding: clamp(18px, 2.4vh, 26px) 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pull .lbl { margin-bottom: 10px; }
.pull p:last-child { font: 500 clamp(1.3rem, 1.1rem + 0.6vw, 1.7rem)/1.3 var(--serif); color: var(--fg); }

/* A formula is a display plate. */
.formula { margin: 1.4em 0; padding: clamp(18px, 2.6vh, 28px) clamp(18px, 2vw, 30px); border: 1px solid var(--line); border-radius: 18px; background: rgba(9, 8, 6, 0.6); }
.formula-x { font: italic 500 clamp(1.6rem, 1.2rem + 1.2vw, 2.5rem)/1.2 var(--serif); color: var(--accent-hi); font-variant-numeric: lining-nums; overflow-wrap: anywhere; }
.formula figcaption { margin-top: 12px; font: 400 0.98rem/1.6 var(--sans); color: var(--fg-2); }

.steps { display: grid; counter-reset: none; border-top: 1px solid var(--line); }
.steps > li { display: grid; grid-template-columns: 54px minmax(0, 1fr); align-items: baseline; padding: 16px 0; border-bottom: 1px solid var(--line); }
.steps .n { font: italic 500 1.7rem/1 var(--serif); font-variant-numeric: lining-nums; color: var(--accent-lo); }
.steps strong, .steps h2, .steps h3 { display: block; margin: 0; font: 600 1.35rem/1.15 var(--serif); color: var(--fg); }
.steps p { margin-top: 6px; }
.steps--lg strong, .steps--lg h2, .steps--lg h3 { font-size: clamp(1.5rem, 1.2rem + 0.9vw, 2.1rem); }

.checks { display: grid; gap: 0.6em; }
.checks li { display: grid; grid-template-columns: 26px minmax(0, 1fr); column-gap: 8px; align-items: start; }
.checks svg { width: 20px; height: 20px; margin-top: 0.28em; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.mark { padding: 4px 0 4px 20px; border-left: 2px solid var(--accent-lo); color: var(--fg-soft); }
/* The teal ring set inside running text (ui.mjs, decided()): it is tied to the first word of its
   clause and stands a little closer to it than a ring that opens a line. */
.nw > .tring { margin-right: 0.34em; }
.see { color: var(--fg-2); }
.prose .tbl-wrap { margin: 1.4em 0; }
.prose .tbl-wrap table { font-size: 0.98rem; }
.prose .tbl-wrap td:not(:first-child) { font-variant-numeric: lining-nums tabular-nums; }
.disclaimer { margin-top: clamp(32px, 5vh, 56px); padding-top: 20px; border-top: 1px solid var(--rule); font-size: 0.98rem; color: var(--fg-2); }
.sources ol { list-style: none; padding: 0; display: grid; gap: 10px; counter-reset: src; }
.sources li { position: relative; padding-left: 38px; counter-increment: src; overflow-wrap: anywhere; }
.sources li::before { content: counter(src, decimal-leading-zero); position: absolute; left: 0; top: 0.28em; font: 500 0.72rem/1.4 var(--mono); letter-spacing: 0.08em; color: var(--accent-lo); }

/* The service offer inside a text: one quiet row. */
.offer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 28px; margin: clamp(32px, 5vh, 56px) 0; padding: clamp(16px, 2.4vh, 24px) 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.offer-t { margin-top: 8px; font-size: clamp(1.6rem, 1.3rem + 0.9vw, 2.2rem); line-height: 1.1; color: var(--fg); }
.offer-t > span:not(.price) { font: 500 1rem/1.3 var(--sans); color: var(--fg-soft); }
.offer-d { margin-top: 8px; max-width: 32em; font-size: 0.98rem; line-height: 1.55; color: var(--fg-2); }
/* The offer beside the free files: the title is words, not a price. */
.offer--audit > div { flex: 1 1 340px; min-width: 0; }
.offer--audit .offer-t { font-family: var(--serif); font-weight: 500; }
.offer--audit .offer-d { max-width: 40em; }
.h-files .offer--audit, .lb-list .offer--audit { margin-bottom: 0; }

/* The rail: contents as a quiet list, the section in view marked. */
.read-rail { position: sticky; top: calc(var(--top-h) + 24px); display: grid; gap: clamp(24px, 4vh, 40px); max-height: calc(100vh - var(--top-h) - 48px); overflow-y: auto; scrollbar-width: thin; }
.read-rail ol { margin-top: 14px; display: grid; }
.read-rail nav a { position: relative; display: block; padding: 8px 0 8px 18px; border-left: 1px solid var(--rule-2); font: 400 0.92rem/1.35 var(--sans); color: var(--fg-2); text-decoration: none; transition: color 0.2s, border-color 0.2s; }
.read-rail nav a:hover { color: var(--fg); }
.read-rail nav a[aria-current] { color: var(--accent-hi); border-left-color: var(--accent-hi); }
.rail-card { padding-top: 18px; border-top: 1px solid var(--line); }
.rail-t { margin-top: 10px; font: 600 1.35rem/1.15 var(--serif); }
.rail-t a { color: var(--fg); text-decoration: none; }
.rail-d { margin: 8px 0 14px; font: 400 0.92rem/1.55 var(--sans); color: var(--fg-2); }

/* The meta line of an article: reading time, dates, author. */
.meta { display: flex; flex-wrap: wrap; gap: 8px 22px; font: 500 var(--fs-lbl)/1.4 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-2); }
.meta a { color: var(--accent-hi); text-decoration: none; }

@media (max-width: 1100px) {
  .read { grid-template-columns: minmax(0, 680px); justify-content: start; }
  .read-rail { position: static; max-height: none; order: -1; margin-bottom: clamp(24px, 4vh, 40px); }
  .read-rail nav ol { display: none; }
  .read-rail nav > .lbl { display: none; }
  .rail-card { display: none; }
  /* Touch: the author link in the meta line is 44px high (its line keeps its height). */
  .meta a { padding-block: 16px; }
  /* The links of a sources list are 44px targets that stand one under another without overlap. */
  .sources ol { gap: 15px; }
  .sources li a { padding-block: 10px; }
}
@media (max-width: 560px) {
  .prose { font-size: 1.06rem; line-height: 1.65; }
  /* A narrow table of up to three columns reads as label and value rows. */
  .prose .tbl-wrap table { font-size: 0.94rem; }
  .prose .tbl-wrap th, .prose .tbl-wrap td { padding: 11px 12px; }
  /* The narrowest phones: a table of two or three columns still fits the screen. */
  @media (max-width: 380px) {
    .prose .tbl-wrap table { font-size: 0.875rem; }
    .prose .tbl-wrap th, .prose .tbl-wrap td { padding: 10px 9px; }
  }
}
@media print {
  .read { display: block; }
  .read-rail { display: none; }
  /* The addresses of the sources are printed beside their names (and nothing after a button). */
  .sources a[href^="http"]::after, .sv-src a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.86em; overflow-wrap: anywhere; }
  .prose { font-size: 11pt; line-height: 1.55; }
  .prose-sec, .prose > h2 { margin-top: 20pt; }
}

/* Golden Bridge v2 — the diagram kit (markup: lib/figures.mjs).
   Gold strokes are the firm's work, teal is only the recipient's decision, ivory at 32% is for
   axes. A figure is a size container: it shows svg.fg-w or svg.fg-n by its own width.
   Sizes inside an svg with a viewBox are in its own units; the comments give the smallest size
   on screen. */

:root {
  --fg-lbl: clamp(12px, calc(var(--u) * 0.9), 15px);
  --fg-axis: rgba(242, 233, 216, 0.32);
  --fg-disc: #100d09;
  --fg-white: #fff6dc;
}

.fg { position: relative; margin: 0; container-type: inline-size; }
.fg svg { display: block; width: 100%; overflow: visible; }
.fg svg[viewBox] { height: auto; }
.fg .fg-n { display: none; }
.fg .fg-hit { fill: transparent; stroke: none; }
.fg text { font-variant-numeric: lining-nums tabular-nums; }

/* ------------------------------------------------- reveal: fade and grow */
.js .fg-rv { opacity: 0; }
.js .on .fg-rv { opacity: 1; transition: opacity 0.7s var(--ease) calc(var(--fg-t, 0.5s) + var(--i, 0) * var(--fg-s, 0.1s)); }
.fg-gr { transform-box: fill-box; transform-origin: 50% 100%; }
.fg-gr--dn { transform-origin: 50% 0; }
.js .fg-gr { transform: scaleY(0); }
.js .on .fg-gr { transform: none; transition: transform 0.9s var(--ease) calc(var(--fg-t, 0.4s) + var(--i, 0) * var(--fg-s, 0.1s)); }

/* ------------------------------------------------- captions and badges */
.fg-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px 20px; margin-bottom: clamp(10px, 1.6vh, 18px); }
.fg-ttl { font: 600 clamp(1rem, calc(var(--u) * 1.15), 1.3rem)/1.3 var(--sans); color: var(--fg); text-shadow: none; }
.fg-ttl span { display: block; margin-top: 7px; font: 500 var(--fg-lbl)/1.3 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.fg-tag { flex: none; display: inline-block; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; background: rgba(11, 10, 8, 0.6); font: 500 var(--fg-lbl)/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; white-space: nowrap; color: var(--accent); text-shadow: none; }
.fg-note { margin-top: clamp(10px, 1.6vh, 16px); max-width: 64ch; font: 400 clamp(0.9375rem, calc(var(--u) * 1.05), 1.15rem)/1.5 var(--sans); color: var(--fg-2); text-shadow: none; }
.fg-foot { margin-top: 12px; }

/* ------------------------------------------------------- 1. the teal ring */
.fg-ring { display: inline-block; flex: none; width: 0.74em; height: 0.74em; margin-right: 0.44em; vertical-align: -0.03em; overflow: visible; }
.fg-ring circle { fill: none; stroke: var(--teal); stroke-width: 1.7; }

/* -------------------------------------------------- 2. the dimension line */
.fg-dim { max-width: 1180px; margin-inline: auto; padding-right: 20px; --fg-run: calc(100cqw - 5px); --fg-t: 0.75s; --fg-s: 0.17s; }
.fg-dim .fg-w { height: 76px; }
.fg-dim text { font: 500 var(--fg-lbl)/1 var(--mono); letter-spacing: 0.18em; fill: var(--fg-soft); }
.fg-dim text .n { fill: var(--accent); }
.fg-dim .fg-dim-cap { fill: var(--accent-hi); }
.fg-dim .fg-dim-cap--to { fill: var(--teal); }
.fg-dim-ln, .fg-dim-end, .fg-dim-tk line { fill: none; stroke: var(--accent); stroke-width: 1.5; }
.fg-dim-ring { fill: none; stroke: var(--teal); stroke-width: 1.7; }
.fg-dim-bead { opacity: 0; }
.fg-dim-bead circle { fill: var(--fg-white); }
.fg-dim-bead .g { fill: rgba(246, 220, 156, 0.24); }
.js .fg-dim .fg-dim-ring { stroke-opacity: 0.4; }
.js .on .fg-dim .fg-dim-ring { stroke-opacity: 1; transition: stroke-opacity 0.8s ease 2s; }
/* The line and the bead share one clock, so the bead rides the head of the line. */
.js .on .fg-dim .fg-dim-ln { transition: stroke-dashoffset 1.7s cubic-bezier(0.3, 0, 0.2, 1) 0.4s; }
.js .on .fg-dim .fg-w .fg-dim-bead { animation: fg-run-x 1.7s cubic-bezier(0.3, 0, 0.2, 1) 0.4s both; }
.js .on .fg-dim .fg-n .fg-dim-bead { animation: fg-run-y 1.7s cubic-bezier(0.3, 0, 0.2, 1) 0.4s both; }
/* The bead fades out at the open ring: nothing arrives, the ring only brightens. */
@keyframes fg-run-x { 0% { opacity: 0; transform: translateX(0); } 8% { opacity: 1; } 86% { opacity: 1; } 100% { opacity: 0; transform: translateX(var(--fg-run)); } }
@keyframes fg-run-y { 0% { opacity: 0; transform: translateY(0); } 8% { opacity: 1; } 86% { opacity: 1; } 100% { opacity: 0; transform: translateY(var(--fg-run)); } }
@supports not (width: 1cqw) { .fg-dim .fg-w .fg-dim-bead { display: none; } }

/* ------------------------------------------------ 3. the bridge elevation */
.fg-bridge path { fill: none; stroke: var(--accent); stroke-linecap: round; stroke-linejoin: round; }
.fg-bridge .fg-bridge-water { stroke: var(--fg-axis); stroke-width: 1; }
.fg-bridge .fg-bridge-deck { stroke: var(--accent-hi); stroke-width: 2.6; }
.fg-bridge .fg-bridge-girder { stroke-width: 1.2; stroke-opacity: 0.6; }
.fg-bridge .fg-bridge-tower { stroke: var(--accent-hi); stroke-width: 2.2; }
.fg-bridge .fg-bridge-cable { stroke: var(--accent-hi); stroke-width: 2; }
.fg-bridge .fg-bridge-hangers { stroke-width: 1; stroke-opacity: 0.6; }
.js .on .fg-bridge .draw { transition-duration: 1.5s; transition-delay: calc(0.2s + var(--i, 0) * 0.2s); }
/* The hangers are many short pieces and come last, when the cable is there to hang them from. */
.js .on .fg-bridge .fg-bridge-hangers { transition-duration: 1.6s; transition-delay: 2s; }

/* ----------------------------------------------------- 4. the five lights */
.fg-route-fig { position: relative; margin-bottom: 3.6em; font-size: var(--fg-lbl); }
.fg-route .fg-sp { cursor: pointer; }
.fg-route .fg-cab { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; }
.js .on .fg-route .fg-cab { transition: stroke-dashoffset 1.6s cubic-bezier(0.4, 0.1, 0.2, 1) calc(0.3s + var(--i, 0) * 0.16s), stroke 0.4s, stroke-width 0.4s; }
.fg-route .fg-hgs { fill: none; stroke: rgba(246, 220, 156, 0.32); stroke-width: 1; }
.fg-route .fg-py { fill: none; stroke: var(--accent-hi); stroke-width: 2.2; }
.fg-route .fg-deck { fill: none; stroke: var(--accent-hi); stroke-width: 2.6; }
.fg-route .fg-deck2 { fill: none; stroke: rgba(217, 178, 96, 0.45); stroke-width: 1.2; }
.fg-route .fg-term { fill: var(--accent-hi); }
.fg-route .fg-stem { fill: none; stroke: var(--accent); stroke-width: 1.5; }
.fg-route .fg-stem--dash { stroke-dasharray: 5 6; }
.fg-route .fg-disc { fill: var(--fg-disc); stroke: var(--accent); stroke-width: 1.5; transition: stroke 0.4s, fill 0.4s; }
.fg-route .fg-glow { fill: url(#fg-route-glow); opacity: 0; transition: opacity 0.5s; }
/* 28 units: 17px at the narrowest width this drawing is shown at. */
.fg-route .fg-nd text { font: italic 500 28px var(--serif); font-variant-numeric: lining-nums; fill: var(--accent); transition: fill 0.4s; }
.fg-route .fg-bd { fill: var(--fg-white); opacity: 0; }
.fg-route { --fg-s: 0.14s; }
.fg-route .fg-hgs { --fg-t: 1.3s; }
.fg-route .fg-nd { --fg-t: 0.9s; }
.fg-route .fg-sp.hot .fg-cab { stroke: var(--accent-hi); stroke-width: 3.4; }
.fg-route .fg-sp.hot .fg-hgs { stroke: rgba(246, 220, 156, 0.85); }
.fg-route .fg-sp.hot .fg-disc { stroke: var(--accent-hi); fill: #1f170a; }
.fg-route .fg-sp.hot .fg-glow { opacity: 1; }
.fg-route .fg-sp.hot .fg-nd text { fill: var(--fg-white); }
.fg-route .fg-sp.hot .fg-bd { animation: fg-bead 1.1s var(--ease) both; }
@keyframes fg-bead { 0% { opacity: 0; transform: translateX(-86px); } 18% { opacity: 1; } 76% { opacity: 1; } 100% { opacity: 0; transform: none; } }

.fg-flag { font: 500 var(--fg-lbl)/1.35 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); text-shadow: 0 1px 10px rgba(11, 10, 8, 0.9); }
.fg-route-fig .fg-flag, .fg-route-fig .fg-end { position: absolute; --fg-t: 1.2s; }
.fg-route-fig .fg-flag--price { left: 30%; top: 90.6%; width: max-content; max-width: 19.4%; transform: translateX(-50%); text-align: center; }
.fg-route-fig .fg-flag--paid { left: 80%; top: 90.6%; max-width: 19.4%; padding-left: 0.9em; }
.fg-route-fig .fg-end { left: 0; top: 79.4%; font: 500 var(--fg-lbl)/1 var(--mono); letter-spacing: 0.22em; text-transform: uppercase; color: var(--fg-2); text-shadow: 0 1px 10px rgba(11, 10, 8, 0.9); }
.fg-route-fig .fg-end--to { left: auto; right: 0; }

/* The five steps under the drawing are five ruled columns of reading text, one under each span:
   the rules between them continue the towers. The text is set flush left at reading size, and
   every description starts on the same line whatever the length of the titles (the list shares
   its two rows with the items). */
.fg-steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.fg-steps li { padding: 0 clamp(8px, 0.9vw, 16px); text-align: left; cursor: pointer; }
.fg-step-n, .fg-steps .fg-flag--in { display: none; }
.fg-step-t { font: 600 clamp(1.15rem, calc(var(--u) * 1.55), 2.1rem)/1.12 var(--serif); color: var(--fg-soft); text-wrap: balance; transition: color 0.4s; }
.fg-step-d { margin-top: 10px; font: 400 var(--fs-sm)/1.5 var(--sans); color: var(--fg-soft); transition: color 0.4s; }
.fg-steps li.hot .fg-step-t { color: var(--accent-hi); }
.fg-steps li.hot .fg-step-d { color: var(--fg); }
@container (min-width: 752px) {
  .fg-steps { border-top: 1px solid var(--line); }
  .fg-steps li { padding: clamp(12px, 2.1vh, 24px) clamp(10px, 1vw, 18px) 0; }
  .fg-steps li:first-child { padding-left: 0; }
  .fg-steps li:last-child { padding-right: 0; }
  .fg-steps li + li { border-left: 1px solid var(--rule); }
  /* Without shared rows: two lines are kept for every title. */
  .fg-step-t { min-height: 2.24em; }
  @supports (grid-template-rows: subgrid) {
    .fg-steps { grid-template-rows: auto auto; }
    .fg-steps li { display: grid; grid-row: span 2; grid-template-rows: subgrid; row-gap: 0; align-content: start; }
    .fg-steps li > div { display: contents; }
    .fg-step-t { min-height: 0; }
  }
}

/* The compact strip for service pages. */
.fg-strip ol { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.fg-strip li { position: relative; padding: 28px 16px 0 0; }
.fg-strip li::before { content: ""; position: absolute; left: 0; right: 0; top: 6px; height: 1.5px; background: rgba(217, 178, 96, 0.55); transform-origin: 0 0; }
.fg-strip li:last-child::before { background: linear-gradient(90deg, rgba(217, 178, 96, 0.55), rgba(217, 178, 96, 0)); }
.fg-strip li::after { content: ""; position: absolute; left: 0; top: 0; width: 13.5px; height: 13.5px; border-radius: 50%; border: 1.5px solid var(--accent); background: var(--fg-disc); transition: background 0.35s, border-color 0.35s, box-shadow 0.35s; }
.fg-strip b { display: block; font: 500 var(--fg-lbl)/1 var(--mono); letter-spacing: 0.16em; color: var(--accent); }
.fg-strip span { display: block; margin-top: 8px; font: 600 clamp(0.9375rem, calc(var(--u) * 1.1), 1.3rem)/1.25 var(--sans); color: var(--fg-soft); transition: color 0.35s; }
.fg-strip li.hot::after, .fg-strip li:hover::after { background: var(--accent-hi); border-color: var(--accent-hi); box-shadow: 0 0 16px rgba(246, 220, 156, 0.7); }
.fg-strip li.hot span, .fg-strip li:hover span { color: var(--accent-hi); }
.fg-strip { --fg-s: 0.14s; }
.js .fg-strip li::before { transform: scaleX(0); }
.js .on .fg-strip li::before { transform: none; transition: transform 0.7s var(--ease) calc(0.3s + var(--i, 0) * 0.14s); }

/* ------------------------------------------------------ 5. the DSCR span */
.fg-dscr { max-width: 800px; --fg-s: 0.09s; }
.fg-dscr .fg-grid { fill: none; stroke: rgba(242, 233, 216, 0.12); stroke-width: 1; }
.fg-dscr .fg-lv { fill: none; stroke: var(--accent); stroke-width: 1.4; stroke-dasharray: 6 6; }
.fg-dscr .fg-deck { fill: none; stroke: var(--accent-hi); stroke-width: 2.4; stroke-linecap: round; }
.fg-dscr .fg-deck2 { fill: none; stroke: rgba(217, 178, 96, 0.45); stroke-width: 1.2; }
.fg-dscr .fg-cab { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.js .on .fg-dscr .fg-cab { transition-duration: 1.4s; transition-delay: 0.8s; }
.fg-dscr .fg-hg { fill: var(--accent); stroke: none; }
.fg-dscr .fg-nd { fill: var(--accent-hi); stroke: var(--bg); stroke-width: 2; --fg-t: 0.9s; }
/* Under the level: an outlined hanger and an open node. Form, not colour. */
.fg-dscr .is-low .fg-hg { fill: rgba(11, 10, 8, 0.7); stroke: var(--accent); stroke-width: 1.5; }
.fg-dscr .is-low .fg-nd { fill: var(--fg-disc); stroke: var(--accent-hi); stroke-width: 1.6; }
/* Wide drawing: 16 units are 12px at its narrowest (540px). */
.fg-dscr .fg-ax { font: 500 16px var(--sans); fill: var(--fg-2); }
.fg-dscr .fg-ax--lv { fill: var(--accent); }
.fg-dscr .fg-ax--deck { fill: var(--fg); font-weight: 600; }
.fg-dscr .fg-val { font: 600 19px var(--sans); fill: var(--fg); paint-order: stroke; stroke: rgba(11, 10, 8, 0.88); stroke-width: 5px; stroke-linejoin: round; --fg-t: 1.1s; }
.fg-dscr .fg-yl { font: 500 16px var(--mono); letter-spacing: 0.06em; fill: var(--fg-2); }
.fg-dscr .fg-low path { fill: none; stroke: var(--fg-axis); stroke-width: 1.2; }
.fg-dscr .fg-low text { font: 600 16px var(--sans); fill: var(--accent-hi); }
.fg-dscr .fg-n .fg-ax { font-size: 14px; }
.fg-dscr .fg-n .fg-val { font-size: 15.5px; stroke-width: 4px; }
.fg-dscr .fg-n .fg-yl { font-size: 14px; letter-spacing: 0.03em; }
.fg-dscr .fg-n .fg-low text { font-size: 14px; }
.fg-dscr .fg-yr { outline: none; }
.fg-dscr .fg-yl { transition: fill 0.25s; }
@media (hover: hover) {
  .fg-dscr .fg-yr:hover .fg-hg { fill: var(--accent-hi); }
  .fg-dscr .fg-yr.is-low:hover .fg-hg { fill: rgba(246, 220, 156, 0.14); stroke: var(--accent-hi); }
  .fg-dscr .fg-yr:hover .fg-val { fill: var(--accent-hi); }
  .fg-dscr .fg-yr:hover .fg-yl { fill: var(--fg); }
}
.fg-dscr .fg-yr:focus-visible .fg-hg { fill: var(--accent-hi); }
.fg-dscr .fg-yr.is-low:focus-visible .fg-hg { fill: rgba(246, 220, 156, 0.14); stroke: var(--accent-hi); }
.fg-dscr .fg-yr:focus-visible .fg-val { fill: var(--accent-hi); }
.fg-dscr .fg-yr:focus-visible .fg-hit { stroke: var(--accent-hi); stroke-width: 2; }

/* Scenario chips: radio inputs, no script. */
.fg-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: clamp(10px, 1.6vh, 16px); }
.fg-chips label { display: inline-flex; align-items: center; min-height: 44px; padding: 0 clamp(14px, 1.1vw, 20px); border: 1px solid var(--line); border-radius: 999px; background: rgba(15, 13, 10, 0.86); font: 500 clamp(0.9rem, calc(var(--u) * 1.04), 1.22rem)/1.2 var(--sans); color: var(--fg-soft); cursor: pointer; transition: border-color 0.2s, background 0.2s, color 0.2s; }
.fg-chips label:hover { border-color: var(--accent); }
.fg-sw:nth-of-type(1):checked ~ .fg-chips label:nth-child(1),
.fg-sw:nth-of-type(2):checked ~ .fg-chips label:nth-child(2),
.fg-sw:nth-of-type(3):checked ~ .fg-chips label:nth-child(3) { background: linear-gradient(180deg, var(--accent-hi), var(--accent)); border-color: transparent; color: var(--accent-ink); font-weight: 700; }
.fg-sw:nth-of-type(1):focus-visible ~ .fg-chips label:nth-child(1),
.fg-sw:nth-of-type(2):focus-visible ~ .fg-chips label:nth-child(2),
.fg-sw:nth-of-type(3):focus-visible ~ .fg-chips label:nth-child(3) { outline: 2px solid var(--accent-hi); outline-offset: 3px; }
.fg-dscr--sc .fg-sc { transition: opacity 0.4s var(--ease), visibility 0s; }
.fg-sw:nth-of-type(1):not(:checked) ~ .fg-plot .fg-sc-0,
.fg-sw:nth-of-type(2):not(:checked) ~ .fg-plot .fg-sc-1,
.fg-sw:nth-of-type(3):not(:checked) ~ .fg-plot .fg-sc-2 { opacity: 0; visibility: hidden; transition: opacity 0.4s var(--ease), visibility 0s 0.4s; }

/* ------------------------------------------------ 6. anatomy of a model */
.fg-anat { max-width: 940px; }
/* Wide drawing: 16 units are 12px at its narrowest (600px). */
.fg-anat .fg-hd { font: 500 15px var(--mono); letter-spacing: 0.14em; fill: var(--accent); }
.fg-anat .fg-nl { font: 500 16.5px var(--sans); fill: var(--fg-soft); transition: fill 0.3s; }
.fg-anat .fg-nd--st .fg-nl { font-weight: 600; fill: var(--fg); }
.fg-anat .fg-lk { fill: none; stroke: rgba(217, 178, 96, 0.62); stroke-width: 1.5; }
.fg-anat .fg-fr, .fg-anat .fg-tie, .fg-anat .fg-bus { fill: none; stroke: var(--accent); stroke-width: 1.5; }
.fg-anat .fg-sh { fill: rgba(28, 23, 15, 0.92); stroke: rgba(217, 178, 96, 0.55); stroke-width: 1.2; transition: fill 0.3s, stroke 0.3s; }
.fg-anat .fg-pt { fill: var(--accent); transition: fill 0.3s; }
.fg-anat .fg-dk { fill: var(--accent); }
.js .on .fg-anat .draw { transition: stroke-dashoffset 0.9s cubic-bezier(0.4, 0.1, 0.2, 1) calc(0.3s + var(--i, 0) * 0.09s), stroke 0.3s, stroke-width 0.3s; }
.fg-anat .fg-nd.hot .fg-nl { fill: var(--accent-hi); }
.fg-anat .fg-nd.hot .fg-lk { stroke: var(--accent-hi); stroke-width: 2.4; }
.fg-anat .fg-nd.hot .fg-pt { fill: var(--fg-white); }
.fg-anat .fg-nd--st.hot .fg-sh { fill: rgba(217, 178, 96, 0.18); stroke: var(--accent-hi); }
.fg-anat .fg-n .fg-hd { font-size: 13.5px; letter-spacing: 0.12em; }
.fg-anat .fg-n .fg-nl { font-size: 14.5px; }

/* ---------------------------------------------- 7. from profit to cash */
.fg-cash { max-width: 820px; }
.fg-cash .fg-axis { fill: none; stroke: var(--fg-axis); stroke-width: 1.2; }
.fg-cash .fg-ghost { fill: none; stroke: var(--fg-axis); stroke-width: 1; stroke-dasharray: 3 6; }
.fg-cash .fg-stair { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.js .on .fg-cash .fg-stair { transition-duration: 1.6s; transition-delay: 0.5s; }
.fg-cash .fg-band { fill: rgba(217, 178, 96, 0.07); }
.fg-cash .fg-sep { fill: none; stroke: rgba(217, 178, 96, 0.3); stroke-width: 1; stroke-dasharray: 2 5; }
.fg-cash .fg-nl { font: 500 16.5px var(--sans); fill: var(--fg-soft); }
.fg-cash .fg-bar { fill: var(--accent); }
.fg-cash .fg-dot { fill: var(--accent-hi); stroke: var(--bg); stroke-width: 2; }
.fg-cash .fg-cap { font: 500 16px var(--mono); letter-spacing: 0.16em; fill: var(--accent); }
.fg-cash { --fg-s: 0.22s; }
.fg-cash .fg-nd.hot .fg-band { fill: rgba(246, 220, 156, 0.22); }
.fg-cash .fg-nd.hot .fg-nl { fill: var(--accent-hi); }
.fg-cash .fg-nd.hot .fg-bar { fill: var(--accent-hi); }
.fg-cash .fg-nd.hot .fg-cap { fill: var(--fg-white); }
.fg-cash .fg-n .fg-nl { font-size: 14.5px; }
.fg-cash .fg-n .fg-cap { font-size: 13.5px; letter-spacing: 0.12em; }

/* ------------------------------------------------------- narrow drawings */
/* Each figure decides by its own width. Browsers without size queries use the window width. */
@container (max-width: 679px) {
  .fg-dim > .fg-w { display: none; }
  .fg-dim > .fg-n { display: block; }
  .fg-strip ol { grid-template-columns: minmax(0, 1fr); }
  .fg-strip li { padding: 0 0 20px 34px; }
  .fg-strip li:last-child { padding-bottom: 0; }
  .fg-strip li::before { left: 6px; right: auto; top: 16px; bottom: -2px; width: 1.5px; height: auto; }
  .fg-strip li:last-child::before { display: none; }
  .fg-strip li::after { top: 3px; }
  .fg-strip b, .fg-strip span { display: inline; }
  .fg-strip b { margin-right: 12px; }
  .js .fg-strip li::before { transform: scaleY(0); }
}
@container (max-width: 751px) {
  .fg-route-fig { display: none; }
  .fg-steps { grid-template-columns: minmax(0, 1fr); }
  .fg-steps li { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 16px; padding: 0 0 28px; text-align: left; }
  .fg-steps li:last-child { padding-bottom: 0; }
  .fg-steps li::before { content: ""; position: absolute; left: 21.25px; top: 48px; bottom: 4px; width: 1.5px; background: linear-gradient(180deg, var(--accent), rgba(217, 178, 96, 0.4)); transform-origin: 50% 0; }
  .fg-steps li:last-child::before { display: none; }
  .fg-step-n { display: grid; place-items: center; width: 44px; height: 44px; border: 1.5px solid var(--accent); border-radius: 50%; background: var(--fg-disc); font: italic 500 22px/1 var(--serif); font-variant-numeric: lining-nums; color: var(--accent); transition: border-color 0.4s, color 0.4s, box-shadow 0.4s; }
  .fg-steps li.hot .fg-step-n { border-color: var(--accent-hi); color: var(--fg-white); box-shadow: 0 0 22px rgba(246, 220, 156, 0.45); }
  .fg-step-t { padding-top: 9px; font-size: 1.3rem; }
  .fg-step-d { font-size: 0.9375rem; }
  .fg-steps .fg-flag--in { display: block; margin-top: 10px; }
  .fg-steps li.is-paid .fg-flag--in { margin: 0; padding-top: 12px; }
  .fg-steps li.is-paid .fg-step-t { padding-top: 6px; }
  .fg-steps li.is-paid::after { content: ""; position: absolute; left: 60px; right: 0; top: 0; border-top: 1.5px dashed var(--accent); }
  .js .fg-steps li::before { transform: scaleY(0); }
  .js .on .fg-steps li::before { transform: none; transition: transform 0.8s var(--ease) calc(0.4s + var(--d, 0) * 0.1s); }
}
@container (max-width: 539px) {
  .fg-dscr .fg-w, .fg-cash .fg-w { display: none; }
  .fg-dscr .fg-n, .fg-cash .fg-n { display: block; max-width: 400px; }
}
@container (max-width: 599px) {
  .fg-anat > .fg-w { display: none; }
  .fg-anat > .fg-n { display: block; max-width: 400px; }
}
@supports not (container-type: inline-size) {
  @media (max-width: 719px) {
    .fg .fg-w, .fg-route-fig { display: none; }
    .fg-bridge path { stroke-width: 4; }
    .fg .fg-n { display: block; max-width: 400px; }
    .fg-dim > .fg-n { max-width: none; }
    .fg-strip ol, .fg-steps { grid-template-columns: minmax(0, 1fr); }
    .fg-strip li { padding: 0 0 20px 34px; }
    .fg-strip li::before { left: 6px; right: auto; top: 16px; bottom: -2px; width: 1.5px; height: auto; }
    .fg-strip li:last-child::before { display: none; }
    .fg-strip li::after { top: 3px; }
    .fg-strip b, .fg-strip span { display: inline; }
    .fg-strip b { margin-right: 12px; }
    .js .fg-strip li::before { transform: scaleY(0); }
    .fg-steps li { display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 16px; padding: 0 0 28px; text-align: left; }
    .fg-step-n { display: grid; place-items: center; width: 44px; height: 44px; border: 1.5px solid var(--accent); border-radius: 50%; background: var(--fg-disc); font: italic 500 22px/1 var(--serif); color: var(--accent); }
    .fg-step-t { padding-top: 9px; }
    .fg-steps .fg-flag--in { display: block; margin-top: 10px; }
  }
}
/* The still bridge keeps one drawing: thicker strokes when it is drawn small. */
@container (max-width: 719px) {
  .fg-bridge .fg-bridge-deck, .fg-bridge .fg-bridge-tower, .fg-bridge .fg-bridge-cable { stroke-width: 3.6; }
  .fg-bridge .fg-bridge-girder, .fg-bridge .fg-bridge-hangers { stroke-width: 1.7; }
  .fg-bridge .fg-bridge-water { stroke-width: 2; }
}
@container (max-width: 419px) {
  .fg-bridge .fg-bridge-deck, .fg-bridge .fg-bridge-tower, .fg-bridge .fg-bridge-cable { stroke-width: 5.4; }
  .fg-bridge .fg-bridge-girder, .fg-bridge .fg-bridge-hangers { stroke-width: 2.6; }
  .fg-bridge .fg-bridge-water { stroke-width: 3; }
}

/* ---------------------------------------------------------- still states */
/* Reduced motion, the motion switch and print show every figure finished. */
/* (.fg-rv only fades: its transform is left alone, some labels are placed with it.) */
@media (prefers-reduced-motion: reduce) {
  .js .fg-rv { opacity: 1 !important; transition: none !important; }
  .js .fg-gr, .js .fg-steps li::before, .js .fg-strip li::before { transform: none !important; transition: none !important; }
  .js .fg-dim .fg-dim-ring { stroke-opacity: 1 !important; transition: none !important; }
  .fg * { animation: none !important; }
  .fg .fg-dim-bead, .fg .fg-bd { opacity: 0 !important; }
}
html[data-motion="off"] .fg-rv { opacity: 1 !important; transition: none !important; }
html[data-motion="off"] .fg-gr, html[data-motion="off"] .fg-steps li::before, html[data-motion="off"] .fg-strip li::before { transform: none !important; transition: none !important; }
html[data-motion="off"] .fg .rv { opacity: 1 !important; transform: none !important; transition: none !important; }
html[data-motion="off"] .fg .draw { stroke-dashoffset: 0 !important; transition: none !important; }
html[data-motion="off"] .fg-dim .fg-dim-ring { stroke-opacity: 1 !important; transition: none !important; }
html[data-motion="off"] .fg * { animation: none !important; }
html[data-motion="off"] .fg .fg-dim-bead, html[data-motion="off"] .fg .fg-bd { opacity: 0 !important; }

@media print {
  .js .fg-rv { opacity: 1 !important; }
  .js .fg-gr, .js .fg-steps li::before, .js .fg-strip li::before { transform: none !important; }
  .fg .draw { stroke-dashoffset: 0 !important; }
  .fg .fg-dim-bead, .fg .fg-bd, .fg .fg-glow, .fg-chips { display: none !important; }
  .fg text { fill: #000 !important; stroke: none !important; }
  .fg-dscr .fg-grid, .fg-cash .fg-axis, .fg-cash .fg-ghost, .fg-dscr .fg-low path, .fg-bridge .fg-bridge-water { stroke: #888 !important; }
  .fg .fg-disc, .fg-anat .fg-sh, .fg-dscr .is-low .fg-hg, .fg-dscr .is-low .fg-nd { fill: #fff !important; }
  .fg-tag { background: none; border-color: #999; }
}

/* Golden Bridge v2 — service pages (markup: lib/services.mjs).
   The opening stands at the service's station along the deck. The passport is one object for the
   whole page: beside the heading first, then in view down to the last section; on a phone it
   follows the opening and the bottom bar carries the price and the term. Between the opening and the closing frame the
   page is a document: compact sections on the reading panel, structured by hairlines. */

.p-service { --sv-rail: clamp(336px, 28vw, 520px); --sv-gap: clamp(32px, 4.4vw, 84px); --sv-num: clamp(44px, 3.6vw, 64px); }
.sv-doc { position: relative; }
.sv-rail + .sec { border-top: 1px solid var(--line); }
/* Each section lays itself out by the width of its own column, not of the window. */
.p-service .sec > .in { container: svdoc / inline-size; }

/* ----------------------------------------------------------------- opening */
/* The intro is a paragraph, not a line: a deeper shade under the text column. */
@media (min-width: 861px) { .sv-hero[data-shade="l"]::before { background: linear-gradient(90deg, rgba(11, 10, 8, 0.92) 0%, rgba(11, 10, 8, 0.8) 40%, rgba(11, 10, 8, 0.46) 58%, rgba(11, 10, 8, 0) 75%); } }
/* The heading stands in two or three authored lines at the size of the other page titles. Beside
   the passport the lines stay as authored: the heading is sized down until its widest line
   (--fit, in em) fits the copy column. */
.sv-hero .h1 { font-size: clamp(2rem, calc(var(--u) * 4.6), 5.4rem); line-height: 1.03; }
@media (min-width: 861px) {
  .sv-hero .h1 { font-size: min(clamp(2rem, calc(var(--u) * 4.6), 5.4rem), calc(100cqi / var(--fit, 12))); }
  .sv-hero .h1 .ln { white-space: nowrap; }
}
.sv-hero .lede { max-width: 37em; font-size: clamp(1.02rem, calc(var(--u) * 1.36), 1.62rem); }

/* ---------------------------------------------------------------- passport */
.sv-rail { padding: 0 var(--gx) clamp(36px, 6vh, 64px); }
/* Its inner distances follow the height of the window (the "4.8vh - 17px" kind of values run
   from a short laptop screen to a tall one), so the whole passport stands between the header and
   the row of controls on a 720px screen as well. */
.sv-pass { container-type: inline-size; max-width: 560px; padding-block: clamp(14px, calc(4.8vh - 17px), 38px); background: linear-gradient(180deg, rgba(28, 24, 17, 0.95), rgba(15, 13, 10, 0.95)); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.36); }
.sv-pass-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sv-step { font: 500 var(--fs-lbl)/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-2); white-space: nowrap; }
.sv-step b { font-weight: 600; color: var(--accent-hi); }
/* The range in display numerals, the largest type of the passport: the lower figure with its dash
   over the upper one with the tenge sign of the kit. --w is the wider of the two lines in em, so
   the numerals never outgrow the passport. */
.sv-pass-price { margin-top: clamp(10px, 1.8vh, 18px); font-size: clamp(2.6rem, 4.6vw, 4.5rem); font-size: min(clamp(3rem, calc(var(--u) * 4.4), 4.5rem), calc(100cqw / var(--w, 4.7))); line-height: 0.96; }
.sv-pass-price .price-n { font-style: italic; padding-right: 0.05em; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
/* Where the price stood: the first step, in the card's largest type. */
.sv-pass-first { margin-top: clamp(10px, 1.8vh, 18px); font: 500 clamp(1.3rem, calc(var(--u) * 1.9), 2.2rem)/1.12 var(--serif); font-variant-numeric: lining-nums; color: var(--fg); text-wrap: balance; }
.sv-pass-first em { font-style: italic; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: 0.05em; }
.sv-pass-dl { margin-top: clamp(10px, 1.8vh, 18px); border-top: 1px solid var(--line); }
.sv-pass-dl > div { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: clamp(5px, calc(2.6vh - 13px), 12px) 0; border-bottom: 1px solid var(--rule); }
/* A value keeps its line; the label takes what is left and wraps when it has to. */
.sv-pass-dl dt { flex: 1 1 0; min-width: 0; font: 500 clamp(0.75rem, calc(var(--u) * 0.8), 0.94rem)/1.4 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-2); }
.sv-pass-dl dd { flex: 0 1 auto; max-width: 78%; text-align: right; font: 600 clamp(0.94rem, calc(var(--u) * 1.08), 1.2rem)/1.3 var(--sans); color: var(--fg); font-variant-numeric: lining-nums tabular-nums; }
.sv-pass-dl .fmts { justify-content: flex-end; vertical-align: middle; }
.sv-pass .btn { margin-top: clamp(14px, 2.2vh, 22px); }
.sv-pass-note { margin-top: clamp(10px, 1.6vh, 14px); font: 400 0.94rem/1.5 var(--sans); color: var(--fg-2); }
/* The neighbours in the price list, named in words: round arrows stand only in the row of
   controls at the bottom of the window, where they mean the chapters of the page. */
.sv-near { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 10px; margin: clamp(6px, 1.2vh, 14px) 0 -8px; padding-top: clamp(1px, 0.5vh, 6px); border-top: 1px solid var(--rule); }
.sv-near a { display: inline-flex; align-items: center; gap: 5px; min-height: 34px; font: 600 0.8rem/1.2 var(--sans); color: var(--fg-soft); text-decoration: none; white-space: nowrap; transition: color 0.25s; }
.sv-near a:last-child { margin-left: auto; }
.sv-near a:hover { color: var(--accent-hi); }
.sv-near svg { flex: none; width: 12px; height: 12px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.3s var(--ease); }
.sv-near a:first-child:hover svg { transform: translateX(-3px); }
.sv-near a:last-child:hover svg { transform: translateX(3px); }
@media (pointer: coarse) { .sv-near a { min-height: 44px; } }

/* Hairlines that draw themselves when their block comes into view. */
.js .sv-ln { transform: scaleX(0); }
.js .on .sv-ln { transform: none; transition: transform 1.1s var(--ease) 0.6s; }

@media (min-width: 1101px) {
  .sv-rail { position: absolute; z-index: 2; top: 0; bottom: 0; right: max(var(--gx), calc((100% - var(--max)) / 2)); width: var(--sv-rail); padding: 0 0 clamp(44px, 7.4vh, 96px); pointer-events: none; }
  .sv-pass { margin-top: max(calc(var(--top-h) + 14px), calc(50vh - 310px)); pointer-events: auto; }
  .sv-hero .p-hero-copy { max-width: calc(100% - var(--sv-rail) - var(--sv-gap)); }
  .p-service .sec > .in { padding-right: calc(var(--sv-rail) + var(--sv-gap)); }
}
/* The passport follows the reading only where it fits under the header with room to spare. */
@media (min-width: 1101px) and (min-height: 640px) {
  .sv-pass { position: sticky; top: calc(var(--top-h) + 14px); }
}
@media (max-width: 1100px) {
  /* The opening keeps the text at the top and the bridge below it; the bottom bar shows the
     price and the term from the first screen, the passport follows on the first scroll. */
  .sv-hero { justify-content: flex-start; }
  .sv-rail { padding-top: clamp(4px, 1vh, 12px); }
  .sv-step a { width: 44px; height: 44px; }
  /* Room for the whole line «range · term» in the bottom bar. */
  .p-service .bar { gap: 6px; padding-inline: 10px; }
  .p-service .bar-ch { padding: 0 12px; }
  .p-service .bar .dock { gap: 10px; padding-right: 12px; }
  .p-service .bar .dock small { max-width: none; letter-spacing: -0.012em; }
}

/* ----------------------------------------------------- fit, result, notes */
.sv-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.sv-cell { padding: clamp(16px, 2.6vh, 28px) clamp(20px, 2.6vw, 44px) 0 0; }
.sv-cell + .sv-cell { padding: clamp(16px, 2.6vh, 28px) 0 0 clamp(20px, 2.6vw, 44px); border-left: 1px solid var(--rule); }
.sv-stmt { margin-top: clamp(10px, 1.6vh, 16px); font: 500 clamp(1.3rem, calc(var(--u) * 1.9), 2.2rem)/1.2 var(--serif); color: var(--fg); text-wrap: pretty; }
.sv-notes { margin-top: clamp(26px, 4.6vh, 52px); border-top: 1px solid var(--rule); }
.sv-notes > * { display: grid; grid-template-columns: clamp(120px, 21%, 190px) minmax(0, 1fr); column-gap: clamp(16px, 2vw, 32px); align-items: start; padding: clamp(14px, 2.2vh, 22px) 0; border-bottom: 1px solid var(--rule); }
.sv-notice svg { width: 28px; height: 28px; fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.sv-notice span, .sv-alt p:last-child { max-width: 62ch; font: 400 var(--fs-sm)/1.6 var(--sans); color: var(--fg-soft); }
.sv-alt .lbl { padding-top: 0.34em; }
.sv-alt a, .sv-src a { color: var(--accent-hi); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 0.2em; transition: text-decoration-color 0.2s; }
.sv-alt a:hover, .sv-src a:hover { text-decoration-color: var(--accent-hi); }

/* ------------------------------------------- numbered rows and the scope */
.sv-n { font: italic 500 clamp(1.6rem, calc(var(--u) * 2.4), 2.9rem)/1 var(--serif); font-variant-numeric: lining-nums; color: var(--accent-lo); transition: color 0.3s, text-shadow 0.3s; }
.sv-rows { border-top: 1px solid var(--line); }
.sv-rows > li { display: grid; grid-template-columns: var(--sv-num) minmax(0, 1fr); align-items: baseline; padding: clamp(16px, 2.6vh, 28px) 0; border-bottom: 1px solid var(--line); }
.sv-rows > li:hover .sv-n, .sv-q:hover .sv-n { color: var(--accent-hi); text-shadow: 0 0 18px rgba(246, 220, 156, 0.6); }
.sv-row-t { font: 600 clamp(1.3rem, calc(var(--u) * 1.85), 2.2rem)/1.12 var(--serif); color: var(--fg); }
.sv-row-d { margin-top: 8px; max-width: 62ch; font: 400 var(--fs-sm)/1.6 var(--sans); color: var(--fg-soft); }
.sv-row-l { margin-top: 14px; }
.sv-src { margin-top: 14px; font: 400 0.94rem/1.65 var(--sans); color: var(--fg-2); }
.sv-foot { margin-top: clamp(18px, 3vh, 32px); }
.sv-fig { margin-top: clamp(24px, 4vh, 48px); }
.sv-fig--row { margin-top: clamp(18px, 3vh, 30px); }

.sv-incl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(24px, 3vw, 56px); border-bottom: 1px solid var(--line); }
.sv-incl li { position: relative; padding: clamp(14px, 2.2vh, 22px) 0 clamp(14px, 2.2vh, 22px) 30px; border-top: 1px solid var(--line); font: 600 clamp(1.15rem, calc(var(--u) * 1.5), 1.75rem)/1.2 var(--serif); color: var(--fg); }
.sv-incl li::before { content: ""; position: absolute; left: 3px; top: calc(clamp(14px, 2.2vh, 22px) + 0.42em); width: 8px; height: 8px; transform: rotate(45deg); background: var(--accent); }

/* --------------------------------------------------------------- questions */
.sv-qs { border-top: 1px solid var(--line); }
.sv-q { display: grid; grid-template-columns: var(--sv-num) minmax(0, 1.08fr) minmax(0, 1fr); align-items: baseline; padding: clamp(18px, 3vh, 32px) 0; border-bottom: 1px solid var(--line); }
.sv-q-t { font: 500 clamp(1.5rem, calc(var(--u) * 2.25), 2.7rem)/1.1 var(--serif); letter-spacing: -0.005em; color: var(--fg); text-wrap: balance; }
.sv-q-a { padding-left: clamp(20px, 2.6vw, 44px); font: 400 var(--fs-sm)/1.6 var(--sans); color: var(--fg-soft); }
.sv-fig--q { grid-column: 2 / -1; margin-top: clamp(20px, 3.4vh, 36px); }
.sv-ex { display: flex; flex-wrap: wrap; align-items: baseline; gap: 14px clamp(20px, 2.4vw, 40px); margin-top: clamp(24px, 4vh, 44px); }
.sv-ex .fine { flex-basis: 100%; }

/* ------------------------------------------- data and boundaries: equals */
.sv-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(28px, 3.6vw, 64px); }
.sv-h { margin-top: clamp(12px, 2vh, 20px); font-size: clamp(1.6rem, calc(var(--u) * 2.5), 3rem); line-height: 1.06; }
.sv-list { margin-top: clamp(18px, 3vh, 32px); border-top: 1px solid var(--line); }
.sv-list li { display: grid; grid-template-columns: clamp(38px, 3vw, 52px) minmax(0, 1fr); align-items: baseline; padding: clamp(12px, 1.9vh, 18px) 0; border-bottom: 1px solid var(--line); }
.sv-list li > span { font: italic 500 clamp(1.35rem, calc(var(--u) * 1.8), 2.1rem)/1 var(--serif); font-variant-numeric: lining-nums; color: var(--accent); }
.sv-list--out li > span { font-style: normal; color: var(--fg); }
.sv-list p { font: 400 var(--fs-txt)/1.5 var(--sans); color: var(--fg); }
@supports (grid-template-rows: subgrid) {
  /* Eyebrows, headings and lists of the two columns start on the same lines. */
  .sv-two { grid-template-rows: auto auto 1fr; }
  .sv-col { display: grid; grid-row: span 3; grid-template-rows: subgrid; align-items: start; }
}

/* ------------------------------------------- before and after full payment */
.sv-pv { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); column-gap: clamp(20px, 2.6vw, 44px); }
.sv-pv-thread { position: relative; width: 13px; }
.sv-pv-thread i { position: absolute; left: 6px; top: 6px; bottom: 0; width: 1px; background: linear-gradient(180deg, var(--accent-hi), var(--accent) 55%, rgba(217, 178, 96, 0.18)); transform-origin: 50% 0; }
.js .sv-pv-thread .sv-ln { transform: scaleY(0); }
.js .on .sv-pv-thread .sv-ln { transform: none; }
.sv-pv-thread b { position: absolute; left: 2px; top: 1px; width: 9px; height: 9px; transform: rotate(45deg); background: var(--accent-hi); box-shadow: 0 0 14px rgba(246, 220, 156, 0.7); }
.sv-pv-file { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: clamp(16px, 2.6vh, 26px); padding-top: clamp(12px, 2vh, 18px); border-top: 1px solid var(--rule); font: 500 var(--fs-lbl)/1.3 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg-2); }
/* The formats are the same chips on both sides of the thread (and in every ledger). */
.sv-pv-file .fmts span { text-transform: none; }
.sv-pv-in { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-top: 12px; font: 500 var(--fs-sm)/1.4 var(--sans); color: var(--fg-soft); }
.sv-pv-in i { font-style: normal; color: var(--accent-lo); }

/* ------------------------------------------------- guides, steps, others */
.p-service .sv-guides .ledger { display: block; }
.p-service .sv-guides .ld { display: grid; grid-template-columns: var(--sv-num) minmax(0, 1fr) auto auto; column-gap: clamp(12px, 1.6vw, 28px); row-gap: 6px; align-items: baseline; padding: clamp(14px, 2.2vh, 22px) clamp(6px, 0.8vw, 14px) clamp(14px, 2.2vh, 22px) 0; }
.p-service .sv-guides .ld-n { grid-column: 1; grid-row: 1 / span 2; }
.p-service .sv-guides .ld-meta { grid-column: 2; grid-row: 1; }
.p-service .sv-guides .ld-term { grid-column: 3; grid-row: 1; text-align: right; font-size: 0.9rem; color: var(--fg-2); }
.p-service .sv-guides .ld-name { grid-column: 2 / 4; grid-row: 2; }
.p-service .sv-guides .ld-sub { max-width: 62ch; }
.p-service .sv-guides .ld-go { grid-column: 4; grid-row: 1 / span 2; display: block; }

.sv-more .lbl { margin-bottom: clamp(14px, 2.2vh, 22px); }
/* The rows stand in the column beside the passport: the names are set a size down, so the longest
   one takes three lines, not four. */
.sv-others .ld > .ld-name { font-size: clamp(1.25rem, calc(var(--u) * 1.6), 2rem); }
@supports (grid-template-columns: subgrid) {
  @media (min-width: 861px) {
    .p-service .sv-others { grid-template-columns: var(--sv-num) minmax(0, 1fr) auto auto auto; }
  }
}

/* Leaving for another service: the name and the price travel from the chosen row (it holds the
   focus at that moment), so the heading and the passport give up the shared names. */
.sv-others .ld:focus-within .ld-name { view-transition-name: svc-title; }
.sv-others .ld:focus-within .ld-price { view-transition-name: svc-price; }
.p-service:has(.sv-others .ld:focus-within) .vt-title, .p-service:has(.sv-others .ld:focus-within) .vt-price { view-transition-name: none; }

/* ------------------------------------------------------- a narrow column */
@container svdoc (max-width: 660px) {
  .fh { grid-template-columns: minmax(0, 1fr); }
  .sv-pair { grid-template-columns: minmax(0, 1fr); }
  .sv-cell { padding-right: 0; }
  .sv-cell + .sv-cell { margin-top: clamp(20px, 3.4vh, 30px); padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .sv-notes > * { grid-template-columns: minmax(0, 1fr); row-gap: 10px; }
  .sv-alt .lbl { padding-top: 0; }
  .sv-incl { grid-template-columns: minmax(0, 1fr); }
  .sv-q { grid-template-columns: var(--sv-num) minmax(0, 1fr); }
  .sv-q-a { grid-column: 2; margin-top: 10px; padding-left: 0; }
  .sv-fig--q { grid-column: 1 / -1; }
  /* Phone: a question appears whole, not word by word. */
  .sv-q-t .w { opacity: 1 !important; transform: none !important; filter: none !important; }
  .sv-two { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; row-gap: clamp(40px, 6vh, 56px); }
  .sv-col { display: block; grid-row: auto; }
  .sv-pv { grid-template-columns: auto minmax(0, 1fr); column-gap: 18px; row-gap: clamp(26px, 4vh, 36px); }
  .sv-pv-thread { grid-column: 1; grid-row: 1 / span 2; }
  .sv-pv-side { grid-column: 2; }
  .sv-others.ledger { display: block; }
  .sv-others .ld { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; row-gap: 8px; column-gap: 10px; padding: 16px 0; }
  .sv-others .ld-name { grid-column: 2 / -1; }
  .sv-others .ld-price { grid-column: 2; text-align: left; font-size: 1.65rem; }
  .sv-others .ld-term { grid-column: 3; align-self: baseline; text-align: right; }
  .sv-others .ld-go { display: none; }
  .p-service .sv-guides .ld-go { display: none; }
  .p-service .sv-guides .ld-name { grid-column: 2 / -1; }
  /* The thread runs down the left edge: the second half gets its own mark on it. */
  .sv-pv-side:last-child { position: relative; }
  .sv-pv-side:last-child::before { content: ""; position: absolute; left: -29px; top: 2px; width: 9px; height: 9px; transform: rotate(45deg); border: 1.5px solid var(--accent-hi); background: var(--bg); }
}
/* Browsers without size queries: the same collapse by the width of the window. */
@supports not (container-type: inline-size) {
  @media (max-width: 1280px) {
    .p-service .fh, .sv-pair, .sv-incl, .sv-two, .sv-notes > * { grid-template-columns: minmax(0, 1fr); }
    .sv-cell + .sv-cell { margin-top: 24px; padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
    .sv-q { grid-template-columns: var(--sv-num) minmax(0, 1fr); }
    .sv-q-a { grid-column: 2; margin-top: 10px; padding-left: 0; }
    .sv-fig--q { grid-column: 1 / -1; }
    .sv-two { grid-template-rows: none; row-gap: 44px; }
    .sv-col { display: block; grid-row: auto; }
    .sv-pv { grid-template-columns: auto minmax(0, 1fr); column-gap: 18px; row-gap: 28px; }
    .sv-pv-thread { grid-column: 1; grid-row: 1 / span 2; }
    .sv-pv-side { grid-column: 2; }
  }
}
@media (max-width: 860px) {
  .sv-rows > li { padding: 18px 0; }
  /* «Другие услуги» follow the ledger of the kit: on a phone the name, the price and the term
     stand each on a line of their own (from 640px the price and the term take the right column). */
  .sv-others .ld { grid-template-columns: 34px minmax(0, 1fr) auto; row-gap: 0; column-gap: 0; }
  .sv-others .ld-price { grid-column: 2 / -1; font-size: 1.9rem; }
  .sv-others .ld-term { grid-column: 2 / -1; text-align: left; }
}
@media (max-width: 560px) {
  .sv-hero .eb { letter-spacing: 0.18em; }
  .sv-pass-dl > div { gap: 10px; }
  .sv-pass-dl dt { max-width: 31%; }
}

/* ------------------------------------------------------------ still states */
.late .sv-ln, [data-motion="off"] .sv-ln { transform: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) {
  .js .sv-ln { transform: none !important; transition: none !important; }
}
@media print {
  .sv-rail { position: static; width: auto; padding: 0; }
  .sv-pass { position: static; margin: 12pt 0; box-shadow: none; }
  .p-service .sec > .in { padding-right: 0; }
  .js .sv-ln { transform: none !important; }
}

/* Golden Bridge v2 — the guides (hub and long reads), "how the work goes", "about", the two legal
   texts and the 404 page. Prefixes: g- guides, d- document pages, a- about, e- error. */

/* A section title of a document page: two lines, the second one in italic gold. */
.d-h { font: 500 clamp(1.7rem, calc(var(--u) * 2.8), 3.4rem)/1.06 var(--serif); letter-spacing: -0.008em; color: var(--fg); text-wrap: balance; }
.d-h em { font-style: italic; padding-right: 0.09em; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eb + .d-h { margin-top: clamp(12px, 2vh, 22px); }

/* Numbered clauses between hairlines. */
.d-clauses { border-top: 1px solid var(--line); counter-reset: clause; }
.d-clauses li { display: grid; grid-template-columns: clamp(40px, 3.2vw, 60px) minmax(0, 1fr); align-items: baseline; padding: clamp(14px, 2.2vh, 22px) 0; border-bottom: 1px solid var(--line); counter-increment: clause; }
.d-clauses .n, .d-clauses--counted li::before { font: italic 500 clamp(1.5rem, calc(var(--u) * 2.2), 2.6rem)/1 var(--serif); font-variant-numeric: lining-nums; color: var(--accent-lo); }
.d-clauses--counted li::before { content: counter(clause); }
.d-clauses p { max-width: 40em; font: 400 var(--fs-txt)/1.55 var(--sans); color: var(--fg-soft); }
.d-clauses a, .a-more a, .a-contact a, .g-intro-b a { color: var(--accent-hi); text-decoration-color: var(--line); text-underline-offset: 0.2em; transition: text-decoration-color 0.2s; }
.d-clauses a:hover, .a-more a:hover, .a-contact a:hover, .g-intro-b a:hover { text-decoration-color: var(--accent-hi); }
.d-clauses--lg p { font: 600 clamp(1.25rem, calc(var(--u) * 1.85), 2.25rem)/1.16 var(--serif); color: var(--fg); }
/* Three clauses side by side: each under its own hairline. */
.d-clauses--row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: clamp(24px, 3.4vw, 64px); border-top: 0; }
.d-clauses--row li { grid-template-columns: minmax(0, 1fr); align-content: start; row-gap: clamp(10px, 1.8vh, 18px); padding: clamp(16px, 2.6vh, 30px) 0 0; border-top: 1px solid var(--line); border-bottom: 0; }
.d-clauses--row p { font-size: var(--fs-side); color: var(--fg); }
/* What is fixed before the start: a thin rectangle closes around the words. */
.d-fix { position: relative; display: inline-block; padding: 0.1em 0.42em; margin: 0 0.1em 0 -0.42em; color: var(--fg); }
.d-fix svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.d-fix rect { fill: none; stroke: var(--accent-hi); stroke-width: 1.5; vector-effect: non-scaling-stroke; }

/* A title on the left, the content on the right. */
.d-split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); column-gap: clamp(24px, 5vw, 100px); row-gap: 18px; align-items: start; }
.d-split-b .lede { max-width: 36em; }
.d-split-b .lede a { transition: text-decoration-color 0.2s; }
.d-split-b .lede a:hover { text-decoration-color: var(--accent-hi); }

/* ================================================================ guides */
/* ----------------------------------------------------------------- hub */
.g-intro { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: clamp(24px, 5vw, 100px); row-gap: 28px; align-items: center; }
.g-intro-t { font: 500 clamp(1.6rem, calc(var(--u) * 2.9), 3.5rem)/1.14 var(--serif); color: var(--fg); text-wrap: balance; }
.g-intro-lead .txt { margin-top: clamp(14px, 2.4vh, 26px); max-width: 30em; }
.g-intro-b + .g-intro-b { margin-top: clamp(18px, 3vh, 32px); padding-top: clamp(18px, 3vh, 32px); border-top: 1px solid var(--line); }
.g-intro-b p { margin-top: 12px; font: 400 var(--fs-txt)/1.62 var(--sans); color: var(--fg-soft); text-wrap: pretty; }
.p-guides .ledger--text .ld-sub { max-width: 46em; }

/* --------------------------------------------------------------- guide */
.g-hero .p-hero-copy { max-width: min(1120px, 68vw); }
.g-hero.p-hero--split .p-hero-copy { max-width: none; }
.g-hero .lede { max-width: 36em; }
.p-guides .p-hero .lede { max-width: 30em; }
.g-hero-fig { padding: clamp(14px, 1.4vw, 26px); }
.g-text .prose > :first-child, .d-legal .prose > :first-child { margin-top: 0; }
.g-example { margin-top: 1.3em; }
.p-guide .prose-sec[data-frame] { scroll-margin-top: 8px; }
/* Questions inside the text keep the reading size. */
.g-faq .faq { margin-top: 1.3em; }
.g-faq .faq summary { font-size: clamp(1.2rem, 1.1rem + 0.4vw, 1.5rem); }
.g-faq .faq details > p { max-width: none; padding-right: 0; font: inherit; color: var(--fg-soft); }
.g-faq .faq .no { font-size: clamp(2.4rem, 2rem + 1.4vw, 3.4rem); }
.p-guide .sources li a { text-decoration-color: var(--rule-2); }
/* The related service in the rail: the action, the service page, the worked example. */
.g-rail-acts { display: grid; justify-items: start; gap: 12px; }
.g-rail-acts .lnk { font-size: 0.86rem; line-height: 1.35; text-align: left; }
/* The rail ends above the row of controls at the bottom of the window. */
.p-guide .read-rail { gap: clamp(18px, 3vh, 28px); max-height: calc(100vh - var(--top-h) - 128px); }
.p-guide .read-rail ol { margin-top: 10px; }
.p-guide .read-rail nav a { padding-block: 6px; font-size: 0.88rem; }
.p-guide .rail-card { padding-top: 16px; }
.p-guide .rail-t { margin-top: 8px; font-size: 1.2rem; }
.p-guide .rail-d { margin: 6px 0 12px; font-size: 0.86rem; }
/* The offer row: the text gives way, so the button stays beside it. */
.p-guide .offer > div { flex: 1 1 340px; min-width: 0; }
/* The price inside the offer row keeps its display numerals. */
.p-guide .offer-t .price { font-size: 1em; line-height: inherit; color: inherit; }
.p-guide .offer-t .price-from { font: 500 clamp(0.75rem, 0.3em, 1.05rem)/1 var(--sans); color: var(--fg-2); }
.p-guide .offer-t .price-n { font: 500 1em/1 var(--serif); color: var(--fg); }
.p-guide .offer-t .price-c { color: var(--accent); }
.p-guide .offer-t .price, .p-guide .offer-t .price span { font-variant-numeric: lining-nums tabular-nums; }
.g-rail-acts .lnk span { min-width: 0; }
/* Tables of a guide. Four columns and more scroll inside their frame, the first column stays. */
.p-guide .prose .tbl-wrap { position: relative; }
/* On a wide screen a table of four or five columns hangs out into the margin beside the text. */
@media (min-width: 1101px) { .p-guide .prose .tbl-wrap:has(.g-tbl--wide) { margin-right: calc(-1 * clamp(0px, 100vw - 2 * var(--gx) - 1048px, 240px)); } }
@media (min-width: 761px) and (max-width: 1100px) { .p-guide .prose .tbl-wrap:has(.g-tbl--wide) { margin-right: calc(-1 * clamp(0px, 100vw - 2 * var(--gx) - 700px, 240px)); } }
@media (max-width: 760px) { .g-tbl--wide { min-width: 640px; } }
/* A table that scrolls sideways shows a soft gold edge where there is more to see. */
.p-guide .prose .tbl-wrap:has(.g-tbl--wide) {
  background:
    linear-gradient(90deg, #0d0b08 40%, rgba(13, 11, 8, 0)) 0 0 / 56px 100% no-repeat local,
    linear-gradient(270deg, #0d0b08 40%, rgba(13, 11, 8, 0)) 100% 0 / 56px 100% no-repeat local,
    linear-gradient(270deg, rgba(217, 178, 96, 0.2), rgba(217, 178, 96, 0)) 100% 0 / 26px 100% no-repeat scroll,
    #0d0b08;
}
.g-tbl--wide tbody th { position: sticky; left: 0; z-index: 1; background: #100e0a; box-shadow: 1px 0 0 var(--rule); }
.p-guide .prose .tbl-wrap th, .p-guide .prose .tbl-wrap td { padding: 12px 14px; }
.p-guide .prose .tbl-wrap thead th { white-space: normal; }
.g-more .ledger--text .ld-sub { max-width: 46em; }

/* ============================================================== /process/ */
.d-hero .lede { max-width: 30em; }
.d-route > .in > .eb { margin-bottom: clamp(20px, 4vh, 48px); }
.d-route .fg-route-fig { margin-bottom: clamp(3.4em, 6vh, 5em); }
/* Under the wide drawing the five steps are the kit's five ruled columns (40-figures.css); here
   the titles are the headings of the page. */
@container (min-width: 752px) {
  .d-route .fg-step-t { font-size: clamp(1.2rem, calc(var(--u) * 1.75), 2.1rem); color: var(--fg); }
}
/* In the vertical route the words «после полной оплаты» stand under the last step. */
@container (max-width: 751px) {
  .d-route .fg-steps li.is-paid .fg-flag--in { margin: 10px 0 0; padding-top: 0; }
  .d-route .fg-steps li.is-paid .fg-step-t { padding-top: 9px; }
}

/* Three kinds of edits: a table of three ruled columns. */
.d-defs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.d-defs article { display: flex; flex-direction: column; padding: clamp(18px, 3vh, 34px) clamp(16px, 2.4vw, 46px) clamp(20px, 3.4vh, 40px); }
.d-defs article:first-child { padding-left: 0; }
.d-defs article:last-child { padding-right: 0; }
.d-defs article + article { border-left: 1px solid var(--line); }
.d-defs h3 { margin-top: clamp(10px, 1.6vh, 16px); font: 600 clamp(1.5rem, calc(var(--u) * 2.3), 2.8rem)/1.08 var(--serif); color: var(--fg); }
.d-defs h3 + p { flex: 1; display: flex; flex-direction: column; margin-top: clamp(10px, 1.6vh, 16px); font: 400 var(--fs-txt)/1.55 var(--sans); color: var(--fg-soft); }
.d-then { display: block; margin-top: auto; padding-top: clamp(14px, 2.2vh, 22px); font: 500 clamp(1.25rem, calc(var(--u) * 1.75), 2.1rem)/1.18 var(--serif); color: var(--accent-hi); }
.d-then::before { content: ""; display: block; width: clamp(28px, 2.7vw, 52px); height: 1px; margin-bottom: clamp(12px, 2vh, 20px); background: linear-gradient(90deg, var(--accent), rgba(217, 178, 96, 0)); }

/* The price list with named columns. The names stand over their columns: «Срок · Формат» over
   the one that holds the term and, under it, the formats (the same chips as in every ledger). */
.d-ledger-head { display: none; }
@supports (grid-template-columns: subgrid) {
  @media (min-width: 861px) {
    .ledger > .d-ledger-head { display: grid; padding-block: 0 10px; border-bottom-color: var(--line); font: 500 var(--fs-lbl)/1.3 var(--mono); letter-spacing: 0.18em; text-transform: uppercase; color: var(--fg-2); }
    .ledger:has(> .d-ledger-head) { border-top: 0; }
    .d-ledger-head::before { display: none; }
    .d-ledger-head span:nth-child(3) { text-align: left; }
  }
}
.d-start { margin-top: clamp(44px, 7.4vh, 96px); padding-top: clamp(40px, 6.6vh, 84px); border-top: 1px solid var(--rule); }

/* ================================================================ /about/ */
.a-hero { justify-content: flex-start; }
.a-hero > .in { flex: 1; display: flex; flex-direction: column; }
/* The head stands above the bridge, as in the statement of the home page: the name on the left,
   the lead on the right; the lower half of the window belongs to the bridge and its dimension line. */
.a-hero-top { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); column-gap: clamp(32px, 7vw, 120px); align-items: end; margin-top: clamp(10px, 2vh, 22px); }
.a-hero-lead { justify-self: end; margin: 0 0 0.9em; max-width: 19em; font: 500 clamp(1.35rem, calc(var(--u) * 2.25), 2.7rem)/1.22 var(--serif); color: var(--fg); text-wrap: balance; }
.a-hero-line { width: 100%; margin: auto 0 0; padding-top: clamp(24px, 4vh, 48px); }
/* The labels of the line cross the lit bridge: a dark edge keeps them legible. */
.a-hero .fg-dim text { paint-order: stroke; stroke: rgba(11, 10, 8, 0.88); stroke-width: 5px; stroke-linejoin: round; }
.no-js .em-w { font-style: italic; color: var(--accent-hi); }

.a-who-top .lede { margin-top: clamp(14px, 2.4vh, 26px); max-width: 40em; }
.a-exp { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: clamp(24px, 5vw, 100px); align-items: end; margin-top: clamp(30px, 5.6vh, 68px); padding-top: clamp(28px, 5vh, 60px); border-top: 1px solid var(--line); }
.a-exp .stmt { max-width: 19em; }
.a-exp-how { margin-top: clamp(16px, 2.8vh, 30px); max-width: 38em; }
.a-exp-note { font-size: var(--fs-sm); color: var(--fg-soft); }

/* What we do, facing what we do not do: the same type size on both sides. */
.a-face { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: clamp(28px, 5.4vw, 108px); row-gap: 48px; align-items: start; }
.a-face .d-h { margin-bottom: clamp(18px, 3vh, 34px); }
.a-led .ld { align-items: baseline; }
@supports (grid-template-columns: subgrid) {
  @media (min-width: 861px) { .ledger.a-led { grid-template-columns: clamp(40px, 3.3vw, 60px) minmax(0, 1fr) auto auto; } }
}
@supports not (grid-template-columns: subgrid) {
  @media (min-width: 861px) { .a-led .ld { grid-template-columns: clamp(40px, 3.3vw, 60px) minmax(0, 1fr) minmax(0, auto) auto; } }
}
.a-not { border-top: 1px solid var(--line); }
.a-not li { position: relative; padding: clamp(13px, 2vh, 21px) 0 clamp(13px, 2vh, 21px) clamp(34px, 2.8vw, 52px); border-bottom: 1px solid var(--line); font: 600 clamp(1.25rem, calc(var(--u) * 1.85), 2.25rem)/1.16 var(--serif); color: var(--fg); text-wrap: pretty; }
.a-not li::before { content: "—"; position: absolute; left: 0; color: var(--accent-lo); }
/* The sentence that says whose decision the financing is: the teal ring stands in place of its
   dash, beside the whole sentence, and the sentence itself runs on unbroken. */
.a-not .a-decides::before { content: none; }
.a-not .a-decides .tring { position: absolute; left: 0.04em; top: calc(clamp(13px, 2vh, 21px) + 0.29em); width: 0.6em; height: 0.6em; margin: 0; }

.a-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: clamp(20px, 2.8vw, 54px); row-gap: 28px; }
.a-steps li { padding-top: clamp(16px, 2.6vh, 30px); border-top: 1px solid var(--line); }
.a-steps .n { display: block; font: italic 500 clamp(1.6rem, calc(var(--u) * 2.4), 2.9rem)/1 var(--serif); font-variant-numeric: lining-nums; color: var(--accent-lo); }
.a-steps h3 { margin-top: clamp(10px, 1.6vh, 16px); font: 600 var(--fs-h3)/1.1 var(--serif); color: var(--fg); }
.a-steps p { margin-top: clamp(8px, 1.2vh, 12px); font: 400 var(--fs-sm)/1.55 var(--sans); color: var(--fg-soft); }
.a-order-notes { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); column-gap: clamp(24px, 5vw, 100px); row-gap: 14px; align-items: end; margin-top: clamp(28px, 5vh, 60px); padding-top: clamp(20px, 3.4vh, 36px); border-top: 1px solid var(--rule); }
.a-order-notes p:first-child { max-width: 46em; }
.a-order-notes a { color: var(--accent-hi); text-decoration-color: var(--line); text-underline-offset: 0.2em; }

.a-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(28px, 6vw, 120px); row-gap: 52px; align-items: start; }
.a-pair .d-h { margin-bottom: clamp(18px, 3vh, 34px); }
.a-more { margin-top: clamp(16px, 2.6vh, 24px); color: var(--fg-2); }
.a-contact { max-width: 30em; }
.a-place { margin-top: clamp(18px, 3vh, 30px); padding-top: clamp(14px, 2.2vh, 20px); border-top: 1px solid var(--line); font: 500 clamp(0.75rem, calc(var(--u) * 0.9), 1.05rem)/1.4 var(--mono); letter-spacing: 0.18em; text-transform: uppercase; color: var(--fg-2); }

/* ============================================================ legal texts */
.d-hero--short { min-height: 0; padding-top: calc(var(--top-h) + clamp(28px, 7vh, 84px)); padding-bottom: clamp(36px, 7vh, 84px); }

/* ==================================================================== 404 */
.e-copy { max-width: min(820px, 54vw); }
.e-n { margin: 0 0 clamp(16px, 3vh, 34px) -0.04em; font: italic 500 clamp(6.5rem, calc(var(--u) * 13), 16rem)/0.8 var(--serif); font-variant-numeric: lining-nums; color: transparent; -webkit-text-stroke: 1px rgba(217, 178, 96, 0.7); text-shadow: none !important; pointer-events: none; }
.e-frame .h1 { margin-top: clamp(14px, 2.2vh, 24px); }
.e-frame .lede { margin-top: clamp(16px, 2.8vh, 30px); max-width: 28em; }
.e-frame .acts-row { margin-top: clamp(20px, 3.4vh, 38px); }

/* Without scripts a still bridge stands behind the page: it is dimmed where text lies on it. */
.no-js .d-route::before, .no-js .a-who::before, .no-js .g-start::before { content: ""; position: absolute; inset: 0; background: rgba(11, 10, 8, 0.72); pointer-events: none; }

/* ============================================================= responsive */
@media (max-width: 1100px) {
  .g-intro, .a-face, .a-exp, .a-pair, .d-split, .a-order-notes { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .a-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .a-exp .stmt { max-width: none; }
  /* The price in the offer row of a guide carries the tenge sign at the size it has in every
     other price (0.62 of the numerals). */
  .p-guide .offer-t .price-c { font-size: 1em; }
}
@media (max-width: 860px) {
  .g-hero .p-hero-copy, .e-copy { max-width: none; }
  .d-defs, .d-clauses--row { grid-template-columns: minmax(0, 1fr); }
  .d-defs article, .d-defs article:first-child, .d-defs article:last-child { padding: 20px 0 22px; }
  .d-defs article + article { border-left: 0; border-top: 1px solid var(--line); }
  .d-then { margin-top: 12px; }
  .d-clauses--row li { padding-bottom: 20px; }
  .a-who { min-height: 0; }
  .d-fmts i { display: none; }
  .a-hero-top { grid-template-columns: minmax(0, 1fr); row-gap: clamp(12px, 2.2vh, 20px); }
  .a-hero-lead { justify-self: start; }
  .e-n { font-size: 6rem; }
}
@media (max-width: 560px) {
  .a-steps { grid-template-columns: minmax(0, 1fr); }
  .a-not li { padding-left: 30px; }
  /* A table of up to three columns reads as label and value rows. */
  .g-tbl--fold, .g-tbl--fold tbody, .g-tbl--fold tr, .g-tbl--fold tbody th, .g-tbl--fold td { display: block; }
  .g-tbl--fold thead { display: none; }
  .p-guide .prose .tbl-wrap .g-tbl--fold tr { padding: 14px 16px 16px; border-bottom: 1px solid var(--rule); }
  .p-guide .prose .tbl-wrap .g-tbl--fold tr:last-child { border-bottom: 0; }
  .p-guide .prose .tbl-wrap .g-tbl--fold tbody th, .p-guide .prose .tbl-wrap .g-tbl--fold td { padding: 0; border: 0; }
  .p-guide .prose .tbl-wrap .g-tbl--fold tbody th { font: 600 1.25rem/1.2 var(--serif); }
  .p-guide .prose .tbl-wrap .g-tbl--fold td { margin-top: 10px; }
  .g-tbl--fold [data-l]::before { content: attr(data-l); display: block; margin-bottom: 3px; font: 500 0.75rem/1.3 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
  .g-tbl--wide tbody th { max-width: 9.5em; }
}

/* Golden Bridge v2 — the library: examples hub, the two interactive examples, templates hub and
   the two template pages. Body classes: p-examples, p-demo, p-templates, p-template.
   Own classes carry the prefix "lb-". The instruments keep their markup and their stylesheet
   (/assets/demos.css, loaded after this file); the rules under .p-demo give them the new stage. */

/* --------------------------------------------------- facts under an opening */
/* The meta slot of the opening frame holds a strip of facts on these pages. */
.p-examples .p-hero .meta, .p-demo .p-hero .meta, .p-templates .p-hero .meta { display: block; font: inherit; letter-spacing: 0; text-transform: none; color: inherit; }
.p-examples .p-hero .lede, .p-demo .p-hero .lede, .p-templates .p-hero .lede, .p-template .p-hero .lede { max-width: 32em; }
.lb-facts .lbl { margin-bottom: clamp(10px, 1.6vh, 16px); }
.lb-facts .facts { grid-template-columns: repeat(2, minmax(0, auto)); }
.lb-facts--4 .facts { grid-template-columns: repeat(4, minmax(0, auto)); }
.lb-facts .facts > div { min-width: clamp(96px, 9vw, 170px); }
/* The four facts of an example stand close together, on the dark side of the opening: the strip
   ends before the left span of the bridge begins. */
.p-demo .lb-facts--4 .facts { column-gap: clamp(14px, 1.35vw, 26px); }
.p-demo .lb-facts--4 .facts > div { min-width: 0; }
.p-demo .lb-facts--4 .facts dd { font-size: clamp(1.2rem, calc(var(--u) * 1.5), 1.8rem); }
.lb-mark { display: flex; align-items: center; gap: 10px; margin-top: clamp(12px, 2vh, 20px); font: 500 var(--fs-lbl)/1.3 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg-soft); }
/* A hollow gold ring: the mark of synthetic data. Never green, never a tick. */
.lb-mark i, .lb-syn i { flex: none; width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--accent-hi); box-shadow: 0 0 10px rgba(246, 220, 156, 0.45); }
/* Published structural facts as display numerals (they count up once). */
.lb-facts--big .facts { column-gap: clamp(32px, 5vw, 96px); }
.lb-facts--big .facts dd { margin-top: 4px; font: 500 clamp(3rem, calc(var(--u) * 5.2), 6.2rem)/1 var(--serif); font-variant-numeric: lining-nums tabular-nums; }
.lb-facts--big .facts dd b { font-weight: inherit; background: linear-gradient(180deg, var(--accent-hi), var(--accent) 70%); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; }

/* ------------------------------------------------- three nodes on one deck */
.lb-nodes { position: relative; --lb-node: 15px; }
.lb-nodes-line { position: absolute; left: 0; top: 0; width: 100%; height: var(--lb-node); overflow: visible; -webkit-mask-image: linear-gradient(90deg, #000 78%, transparent); mask-image: linear-gradient(90deg, #000 78%, transparent); }
.lb-nodes-line line { fill: none; stroke: rgba(217, 178, 96, 0.62); stroke-width: 1.5; }
.lb-nodes ol { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: clamp(20px, 2.9vw, 56px); }
.lb-node { position: relative; padding-top: calc(var(--lb-node) + clamp(14px, 2.2vh, 22px)); }
.lb-node::before { content: ""; position: absolute; left: 0; top: 0; width: var(--lb-node); height: var(--lb-node); border-radius: 50%; border: 1.5px solid var(--accent); background: #0f0d0a; transition: background 0.35s, border-color 0.35s, box-shadow 0.35s; }
.lb-node > b { display: block; font: 500 var(--fs-lbl)/1 var(--mono); letter-spacing: 0.18em; color: var(--accent); transition: color 0.35s; }
.lb-node > div { margin-top: clamp(8px, 1.3vh, 14px); }
.lb-node-t { font: 600 var(--fs-h3)/1.1 var(--serif); color: var(--fg); transition: color 0.35s; }
.lb-node p { max-width: 30em; font: 400 var(--fs-sm)/1.5 var(--sans); color: var(--fg-soft); }
.lb-node-t + p { margin-top: clamp(8px, 1.1vh, 12px); }
.lb-node.hot::before, .lb-node.is-done::before { background: var(--accent-hi); border-color: var(--accent-hi); box-shadow: 0 0 16px rgba(246, 220, 156, 0.7); }
.lb-node.hot > b, .lb-node.is-done > b { color: var(--accent-hi); }
.lb-node.hot .lb-node-t { color: var(--accent-hi); }
/* On an example page the nodes fill as the visitor performs the steps; the idle cycle steps back. */
.lb-live .lb-node.hot:not(.is-done)::before { background: #0f0d0a; border-color: var(--accent); box-shadow: none; }
.lb-live .lb-node.hot:not(.is-done) > b { color: var(--accent); }
.js .lb-node::before { transform: scale(0); }
.js .on .lb-node::before { transform: none; transition: transform 0.5s var(--ease) calc(0.55s + var(--i, 0) * 0.34s), background 0.35s, border-color 0.35s, box-shadow 0.35s; }
.late .lb-node::before, [data-motion="off"] .lb-node::before { transform: none !important; transition: none !important; }
/* The hint of an example: the step itself is the text, so it is set larger. */
.lb-hint .lb-node p { font-size: var(--fs-txt); line-height: 1.45; color: var(--fg); }
.lb-tip { margin-top: clamp(20px, 3.4vh, 38px); padding-top: clamp(14px, 2vh, 20px); border-top: 1px solid var(--rule); max-width: none; }
.lb-tip strong { font-weight: 600; color: var(--fg); }

/* ---------------------------------------------------- examples hub: rows */
.lb-list > .in > .fh { margin-bottom: clamp(22px, 4vh, 46px); }
.lb-exs { display: grid; gap: clamp(16px, 1.5vw, 28px); }
/* The second column is a little wider: on a 1280px screen the figure of the first card still has
   room for its wide drawing, which is as tall as the text beside it. */
.lb-ex { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); column-gap: clamp(24px, 4.2vw, 80px); align-items: stretch; transition: border-color 0.3s; }
.lb-ex--flip .lb-ex-copy { order: 2; }
.lb-ex:has(.lb-ex-copy:hover), .lb-ex:has(.lb-ex-t a:focus-visible) { border-color: rgba(246, 220, 156, 0.55); }
.lb-ex-copy { position: relative; display: flex; flex-direction: column; align-items: flex-start; padding-block: clamp(4px, 1vh, 12px); }
.lb-ex-copy > .lbl { padding-right: 11em; line-height: 1.9; }
.lb-ex-flag { position: absolute; right: 0; top: clamp(4px, 1vh, 12px); }
.lb-ex-t { margin-top: clamp(12px, 2vh, 22px); font: 600 clamp(1.6rem, calc(var(--u) * 3), 3.6rem)/1.08 var(--serif); text-wrap: balance; }
.lb-ex-t a { color: var(--fg); text-decoration: none; transition: color 0.25s; }
.lb-ex-t a::after { content: ""; position: absolute; inset: 0; }
.lb-ex-t a:focus-visible { outline: none; }
.lb-ex-copy:has(a:focus-visible) { outline: 2px solid var(--accent-hi); outline-offset: 6px; border-radius: 6px; }
.lb-ex-copy:hover .lb-ex-t a { color: var(--accent-hi); }
.lb-ex-copy > .txt { margin: clamp(12px, 2vh, 20px) 0 clamp(20px, 3.4vh, 38px); max-width: 32em; font-size: clamp(1rem, calc(var(--u) * 1.5), 1.8rem); line-height: 1.5; }
/* The counted facts are the weight of the text column: display numerals, four of them two by two,
   three in one row. With them the column is as tall as the figure beside it and holds no void. */
.lb-ex-facts { align-self: stretch; grid-template-columns: repeat(4, minmax(0, auto)); justify-content: start; gap: clamp(8px, 1.4vh, 16px) clamp(18px, 2.6vw, 48px); margin-top: auto; padding-top: clamp(14px, 2.2vh, 24px); border-top: 1px solid var(--rule); }
.lb-ex-facts--4 { grid-template-columns: repeat(2, minmax(0, auto)); }
.lb-ex-facts--3 { grid-template-columns: repeat(3, minmax(0, auto)); }
.lb-ex-facts > div { align-items: baseline; gap: 10px; }
.lb-ex-facts b { font-size: clamp(1.8rem, calc(var(--u) * 3.9), 4.7rem); }
.lb-ex-facts span { font-size: clamp(0.86rem, calc(var(--u) * 1.05), 1.24rem); color: var(--fg-soft); }
.lb-ex-copy > .lnk { margin-top: clamp(16px, 2.6vh, 28px); }
.lb-ex-copy:hover > .lnk { border-color: var(--accent-hi); gap: 16px; }
.lb-ex-fig { min-width: 0; align-self: center; }
/* In a narrower window the figure shows its narrow drawing, which is taller: beside the text it
   is kept small, so the text column still holds no void. */
@media (min-width: 1101px) { .lb-ex-fig .fg-dscr .fg-n { max-width: 330px; margin-inline: auto; } }
/* The note is as wide as the cards (or the strip) it stands under. */
.lb-disclaimer { margin-top: clamp(18px, 3vh, 34px); }
.lb-nodes + .lb-disclaimer { margin-top: clamp(30px, 5.4vh, 60px); }
.lb-how .idx + .ttl { margin-top: clamp(10px, 1.6vh, 16px); }

/* ------------------------------------------------------- the files: rows */
.lb-files { border-top: 1px solid var(--line); }
.lb-file { position: relative; display: grid; grid-template-columns: 58px minmax(0, 1fr) auto auto; grid-template-areas: "type name size get" "type what size get"; column-gap: clamp(12px, 1.5vw, 26px); align-items: center; padding: clamp(14px, 2.1vh, 22px) 0; border-bottom: 1px solid var(--line); }
.lb-file::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(217, 178, 96, 0.12), rgba(217, 178, 96, 0) 70%); opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.lb-file:hover::before, .lb-file:focus-within::before { opacity: 1; }
.lb-file > * { position: relative; }
.lb-file-meta { display: contents; }
.lb-file-meta > i { display: none; }
.lb-file-type { grid-area: type; align-self: start; margin-top: 0.2em; padding: 8px 0 7px; border: 1px solid var(--line); border-radius: 7px; text-align: center; font: 500 0.75rem/1 var(--mono); letter-spacing: 0.1em; color: var(--accent); transition: border-color 0.3s, color 0.3s; }
.lb-file:hover .lb-file-type, .lb-file:focus-within .lb-file-type { border-color: var(--accent); color: var(--accent-hi); }
.lb-file-name { grid-area: name; align-self: end; font: 600 clamp(1.2rem, calc(var(--u) * 1.62), 1.95rem)/1.15 var(--serif); color: var(--fg); }
.lb-file-what { grid-area: what; align-self: start; margin-top: 5px; font: 400 var(--fs-sm)/1.45 var(--sans); color: var(--fg-2); }
.lb-file-size { grid-area: size; font: 500 0.8rem/1 var(--mono); color: var(--fg-2); white-space: nowrap; font-variant-numeric: lining-nums tabular-nums; }
/* The download link: its hairline draws downward on hover and focus. */
.lb-get { grid-area: get; position: relative; display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 2px 0 6px; font: 600 0.92rem/1 var(--sans); color: var(--accent-hi); text-decoration: none; white-space: nowrap; }
.lb-get svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.35s var(--ease); }
.lb-get::after { content: ""; position: absolute; right: 10.5px; top: calc(50% + 11px); width: 1px; height: 15px; background: linear-gradient(var(--accent-hi), rgba(246, 220, 156, 0)); transform: scaleY(0); transform-origin: 50% 0; transition: transform 0.4s var(--ease); }
.lb-get:hover::after, .lb-get:focus-visible::after { transform: scaleY(1); }
.lb-get:hover svg, .lb-get:focus-visible svg { transform: translateY(2px); }
[data-motion="off"] .lb-get::after, [data-motion="off"] .lb-get svg { transition: none; }
.lb-main-get > i svg { transition: transform 0.35s var(--ease); }
.lb-main-get:hover > i svg, .lb-main-get:focus-visible > i svg { transform: translateY(2px); }

/* -------------------------------------------------- templates hub: documents */
.lb-docs { padding-block: 0; }
.lb-doc { position: relative; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: clamp(24px, 4.2vw, 80px); align-items: start; padding: clamp(24px, 4vh, 46px) 0; border-bottom: 1px solid var(--line); }
.lb-doc:last-child { border-bottom: 0; }
.lb-doc .lbl span { margin-left: 12px; letter-spacing: 0.12em; color: var(--fg-2); }
.lb-doc-copy { position: relative; display: flex; flex-direction: column; align-items: flex-start; }
.lb-doc-t { margin-top: clamp(10px, 1.6vh, 16px); font: 600 clamp(1.5rem, calc(var(--u) * 2.2), 2.65rem)/1.1 var(--serif); text-wrap: balance; }
.lb-doc-t a { color: var(--fg); text-decoration: none; transition: color 0.25s; }
.lb-doc-t a::after { content: ""; position: absolute; inset: 0; }
.lb-doc-t a:focus-visible { outline: none; }
.lb-doc-copy:has(a:focus-visible) { outline: 2px solid var(--accent-hi); outline-offset: 6px; border-radius: 6px; }
.lb-doc-copy:hover .lb-doc-t a { color: var(--accent-hi); }
.lb-doc-copy > .txt { margin-top: clamp(8px, 1.4vh, 14px); max-width: 32em; font-size: var(--fs-sm); }
.lb-doc-copy > .lnk { margin-top: clamp(16px, 2.6vh, 28px); }
.lb-doc-copy:hover > .lnk { border-color: var(--accent-hi); gap: 16px; }
/* The interactive example among the files: a quieter row, the whole of it is the link. */
.lb-doc--online { grid-template-rows: auto auto; align-items: end; padding-block: clamp(20px, 3.2vh, 36px); }
.lb-doc--online::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(217, 178, 96, 0.12), rgba(217, 178, 96, 0) 70%); opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.lb-doc--online:hover::before, .lb-doc--online:focus-within::before { opacity: 1; }
.lb-doc--online > .lbl { grid-column: 1; grid-row: 1; }
.lb-doc--online .lb-doc-copy { display: contents; }
.lb-doc--online .lb-doc-t { grid-column: 1; grid-row: 2; font-size: clamp(1.35rem, calc(var(--u) * 1.8), 2.2rem); }
.lb-doc--online .lb-doc-copy > .txt { grid-column: 2; grid-row: 1 / span 2; align-self: center; margin: 0; max-width: 36em; padding-right: 13em; }
.lb-doc--online > .lnk { position: absolute; right: 0; bottom: clamp(20px, 3.2vh, 36px); }
.lb-doc--online:hover > .lnk { border-color: var(--accent-hi); gap: 16px; }
.lb-doc--online:hover .lb-doc-t a { color: var(--accent-hi); }
.lb-doc--online:focus-within { outline: 2px solid var(--accent-hi); outline-offset: 4px; border-radius: 6px; }
.lb-fiction { max-width: 60em; }

/* ------------------------------------------------ template page: download */
.p-demo .prose > .prose-sec:first-child { margin-top: 0; }
.lb-dl { scroll-margin-top: 8px; }
.prose .lb-file { grid-template-columns: 54px minmax(0, 1fr) auto; grid-template-areas: "type name get" "type what get" "type size get"; }
.prose .lb-file-name { font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem); }
.prose .lb-file-what { font-size: 0.98rem; }
.prose .lb-file-size { margin-top: 8px; }
.prose .lb-get { color: var(--accent-hi); text-decoration: none; }
.lb-dl-note { margin-top: 16px; color: var(--fg-soft); }
.lb-decision { color: var(--fg-soft); }
.p-template .prose .faq { margin-top: 1.2em; }
.p-template .prose .faq summary { font-size: clamp(1.2rem, 1.1rem + 0.4vw, 1.45rem); }
.p-template .prose .faq details > p { font-size: inherit; }

/* ------------------------------------------------- the instrument: the case */
@font-face { font-family: "GB Tenge"; src: local("Segoe UI Light"), local("Segoe UI"), local("Roboto"), local("Noto Sans"), local("Helvetica Neue"), local("Arial"); unicode-range: U+20B8; }
.lb-hint { padding-bottom: clamp(26px, 4.2vh, 48px); }
.sec + .sec.lb-stage > .in { padding-top: 0; border-top: 0; }
.lb-inst { position: relative; border: 1px solid var(--rule-2); border-radius: clamp(16px, 1.5vw, 24px); background: #0c0a08; overflow: hidden; overflow: clip; box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5), 0 0 70px rgba(217, 178, 96, 0.07); scroll-margin-top: calc(var(--top-h) + 8px); }
/* The lit edge of the instrument. */
.lb-inst::before { content: ""; position: absolute; inset: 0 14% auto; z-index: 3; height: 1px; background: linear-gradient(90deg, rgba(246, 220, 156, 0), var(--accent-hi), rgba(246, 220, 156, 0)); opacity: 0.75; pointer-events: none; }
/* «Синтетические данные» stays in view for as long as any part of the instrument is on screen. */
.lb-inst-bar { position: sticky; top: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 6px 18px; padding: 11px 18px; border-bottom: 1px solid var(--rule-2); background: #14110c; font: 500 0.68rem/1.3 var(--mono); letter-spacing: 0.18em; text-transform: uppercase; }
/* While the header is shown the bar stops under it, and a plain cover hides the part of the
   instrument that would otherwise show through the header. */
.top:not(.is-away) ~ main .lb-inst-bar { top: var(--top-h); }
.lb-inst-bar::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: var(--top-h); background: #0c0a08; pointer-events: none; }
.lb-syn { display: flex; align-items: center; gap: 10px; color: var(--accent-hi); }
/* Both labels stand at the left end of the bar: the right end lies under the Telegram control of
   the header, which stays on screen while the page is scrolled. */
.lb-inst-id { padding-left: 18px; border-left: 1px solid var(--rule-2); color: var(--fg-2); }
/* Without scripts (and while they have not arrived) the instrument is a still picture of its
   starting state: a line under the bar says so, the controls step back and «LIVE CALC» goes. The
   figures of the tables are buttons too: they stay readable. */
.lb-inst-off { display: none; padding: 11px 18px; border-bottom: 1px solid var(--rule-2); background: #14110c; font: 400 var(--fs-sm)/1.45 var(--sans); color: var(--fg-soft); }
.lb-inst-off a { color: var(--accent-hi); text-decoration-color: var(--line); text-underline-offset: 0.2em; }
:is(.no-js, .late) .lb-inst-off { display: block; }
:is(.no-js, .late) [data-lb-inst] :is(button, input, select) { pointer-events: none; cursor: default; }
:is(.no-js, .late) [data-lb-inst] :is(button:not([data-model-cell]), input, select) { opacity: 0.45; }
:is(.no-js, .late) .p-demo :is(.live-chip, .diagnostics-live) { display: none; }
.lb-inst-note { margin-top: clamp(16px, 2.6vh, 28px); max-width: 60em; font-size: var(--fs-sm); }
.lb-inst-note strong { font-weight: 600; color: var(--fg); }

/* --------------------------------------- the instrument on the new stage */
/* demos.css was written for the current site. Tokens it expects are the same here; what follows
   replaces its status colours (a state is a form and a word, never red and green) and sets the
   key outputs in display numerals, labels in mono, structure in gold hairlines. */
.p-demo :is(.model-workbench, .diagnostics-workbench) { --ok: var(--accent-hi); --warn: var(--fg); --alt: rgba(242, 233, 216, 0.7); border: 0; border-radius: 0; background: none; box-shadow: none; font-size: 0.875rem; color: var(--fg); }
.p-demo :is(.model-workbench, .diagnostics-workbench) :is(select, input) { font: inherit; color: inherit; }
.p-demo :is(.workbench-titlebar, .diagnostics-topbar) { background: #0f0d0a; }
.p-demo .window-dots i { width: 9px; height: 9px; border: 1px solid var(--rule-2); background: none; }
.p-demo .window-dots i:first-child { border-color: var(--accent); background: var(--accent); }
.p-demo .workbench-file strong { font: 500 0.8rem/1.2 var(--mono); letter-spacing: 0.02em; color: var(--fg); }
.p-demo .workbench-file small { font: 400 0.76rem/1.2 var(--sans); color: var(--fg-2); }
.p-demo .file-badge { width: 26px; height: 26px; border: 1px solid var(--line); border-radius: 7px; background: rgba(217, 178, 96, 0.08); font: 600 0.7rem/1 var(--mono); color: var(--accent-hi); }
.p-demo :is(.model-health, .diagnostics-export) { font: 500 0.64rem/1 var(--mono); letter-spacing: 0.14em; color: var(--fg-2); }
.p-demo :is(.model-health strong, .diagnostics-export b) { font-weight: 600; color: var(--accent-hi); }
/* Attention is a hollow ring; all clear is a lit dot. */
.p-demo .model-warning .model-health i { width: 9px; height: 9px; border: 1.5px solid var(--fg); background: none; box-shadow: none; }
.p-demo .ribbon-brand { font: 600 0.7rem/1 var(--mono); letter-spacing: 0.16em; }
.p-demo .ribbon-brand span { color: var(--fg-2); }
.p-demo :is(.scenario-switch, .diagnostics-period) { border-color: var(--line); background: rgba(7, 6, 5, 0.6); }
.p-demo :is(.scenario-switch, .diagnostics-period) button { min-height: 38px; font-size: 0.84rem; }
.p-demo .ribbon-action { min-height: 38px; border-color: var(--line); font-size: 0.84rem; }
.p-demo .formula-bar { background: #080706; }
.p-demo .formula-bar i { color: var(--fg-2); font-style: italic; }
.p-demo :is(.model-sheet-nav, .diagnostics-nav) { background: #0e0c09; }
.p-demo .model-sheet-nav > span { font: 500 0.6rem/1 var(--mono); letter-spacing: 0.2em; color: var(--fg-2); }
.p-demo :is(.model-sheet-nav, .diagnostics-nav) button { font-size: 0.875rem; }
.p-demo :is(.model-sheet-nav, .diagnostics-nav) button :is(b, span) { font: 500 0.64rem/1 var(--mono); color: var(--fg-2); }
.p-demo :is(.model-sheet-nav, .diagnostics-nav) button.active { background: linear-gradient(90deg, rgba(217, 178, 96, 0.2), rgba(217, 178, 96, 0.03)); }
.p-demo :is(.model-sheet-nav, .diagnostics-nav) button.active i { box-shadow: 0 0 10px rgba(246, 220, 156, 0.8); background: var(--accent-hi); }
.p-demo .model-canvas-head span, .p-demo .diagnostics-heading > div:first-child > span { font: 500 0.62rem/1 var(--mono); letter-spacing: 0.2em; }
.p-demo :is(.model-canvas-head, .diagnostics-heading) h2 { margin-top: 10px; font: 500 clamp(1.7rem, 2.5vw, 2.5rem)/1.05 var(--serif); letter-spacing: -0.005em; color: var(--fg); }
.p-demo .diagnostics-heading p { font-size: 0.92rem; color: var(--fg-2); }
.p-demo :is(.live-chip, .diagnostics-live) { border-color: var(--line); font: 500 0.6rem/1 var(--mono); letter-spacing: 0.16em; }
/* Key outputs: ruled cells, display numerals. They change only when the visitor changes an input. */
.p-demo :is(.model-kpi-grid, .diagnostics-kpis) { gap: 16px clamp(14px, 1.7vw, 28px); }
.p-demo :is(.model-kpi-grid, .diagnostics-kpis) article { padding: 14px 0 4px; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: none; }
.p-demo :is(.model-kpi-grid, .diagnostics-kpis) span { font: 500 0.62rem/1.4 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-2); }
.p-demo :is(.model-kpi-grid, .diagnostics-kpis) strong { margin-top: 10px; font: 500 clamp(1.75rem, 2.7vw, 2.7rem)/1 "GB Tenge", var(--serif); font-variant-numeric: lining-nums tabular-nums; color: var(--accent-hi); }
.p-demo :is(.model-kpi-grid, .diagnostics-kpis) small { margin-top: 8px; font: 500 0.8rem/1.3 var(--sans); color: var(--fg-2); font-variant-numeric: lining-nums tabular-nums; }
.p-demo .diagnostics-kpis small.positive { color: var(--fg-soft); }
/* A figure that asks for a check: ivory instead of gold and a hollow diamond beside its name. */
.p-demo .diagnostics-kpis article.warning { border-top-color: var(--fg); }
.p-demo .diagnostics-kpis article.warning strong { color: var(--fg); }
.p-demo .diagnostics-kpis article.warning > span::before, .p-demo .model-warning .driver-impact strong::before { content: ""; display: inline-block; width: 7px; height: 7px; margin: 0 9px 1px 2px; border: 1.5px solid var(--fg); transform: rotate(45deg); }
.p-demo :is(.model-chart-card, .model-drivers, .model-table-card, .diagnostics-chart, .cash-release, .diagnostics-signals) { border-radius: 14px; background: rgba(255, 255, 255, 0.012); }
.p-demo :is(.model-chart-card, .model-drivers, .model-table-card, .diagnostics-chart, .diagnostics-signals) > header span { font: 500 0.6rem/1.3 var(--mono); letter-spacing: 0.18em; color: var(--fg-2); }
.p-demo :is(.model-chart-card, .model-drivers, .model-table-card, .diagnostics-chart, .diagnostics-signals) > header :is(strong, b) { font-size: 0.98rem; }
.p-demo .model-table-card > header > span, .p-demo .diagnostics-signals > header > small { font: 500 0.78rem/1.4 var(--sans); letter-spacing: 0; color: var(--fg-2); }
.p-demo :is(.chart-legend, .diagnostics-legend) span { font-size: 0.78rem !important; color: var(--fg-2); }
.p-demo :is(.chart-legend, .diagnostics-legend) span + span i { background: repeating-linear-gradient(90deg, var(--alt) 0 4px, transparent 4px 7px); }
.p-demo :is(.model-chart-card, .diagnostics-chart) { display: flex; flex-direction: column; }
.p-demo :is(.model-chart-card, .diagnostics-chart) > svg { margin-block: auto; }
.p-demo .grid-lines line { stroke: rgba(242, 233, 216, 0.08); }
.p-demo :is([data-model-chart-area], [data-diagnostics-area]) { fill: rgba(217, 178, 96, 0.1); }
.p-demo :is([data-model-chart-revenue], [data-diagnostics-line]) { stroke-width: 2.5; }
/* The second series is ivory and dashed: told apart by form, and teal stays free for its one meaning. */
.p-demo :is(.ebitda-line, .cash-line) { stroke-width: 2; stroke-dasharray: 7 6; }
.p-demo .chart-years text { fill: var(--fg-2); font: 500 11px var(--mono); }
/* Beside the controls (wide windows) the chart is drawn small: its year labels keep a readable size. */
@media (min-width: 1101px) { .p-demo .model-main-chart .chart-years text { font-size: clamp(13px, calc(50.3px - 2.57vw), 22px); } }
.p-demo .diagnostics-chart .chart-badge { border-color: var(--line); }
.p-demo :is(.model-drivers, .cash-release) label > span { font-size: 0.86rem; color: var(--fg-soft); }
.p-demo :is(.model-drivers, .cash-release) input[type="range"]::-webkit-slider-runnable-track { background: rgba(217, 178, 96, 0.28); }
.p-demo :is(.model-drivers, .cash-release) input[type="range"]::-moz-range-track { background: rgba(217, 178, 96, 0.28); }
.p-demo :is(.model-drivers, .cash-release) input[type="range"]::-webkit-slider-thumb { border-color: #0c0a08; box-shadow: 0 0 0 1px var(--accent), 0 0 14px rgba(246, 220, 156, 0.55); }
.p-demo :is(.model-drivers, .cash-release) input[type="range"]:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 2px; }
.p-demo .driver-impact span, .p-demo .cash-release > div small, .p-demo .cash-release > span { font: 500 0.6rem/1.3 var(--mono); letter-spacing: 0.18em; color: var(--fg-2); }
.p-demo .driver-impact strong, .p-demo .cash-release > div strong { font: 500 1.6rem/1.1 "GB Tenge", var(--serif); font-variant-numeric: lining-nums tabular-nums; }
/* «Дефицит ликвидности: ₸ 1 287.6 млн» is longer than its line: the two lines are balanced, so
   the break falls after the colon and the tenge sign stays with its number. (The text is written
   by the shared script of the example with plain spaces.) */
.p-demo .driver-impact strong { text-wrap: balance; }
.p-demo .driver-impact p, .p-demo .cash-release > div p { font-size: 0.86rem; line-height: 1.5; color: var(--fg-2); }
.p-demo .cash-release h3 { font: 600 1.4rem/1.15 var(--serif); color: var(--fg); }
.p-demo .model-table thead th { font: 500 0.62rem/1 var(--mono); letter-spacing: 0.14em; color: var(--accent); }
.p-demo .model-table tbody th { color: var(--fg-soft); }
.p-demo .model-table td button { color: var(--fg); }
.p-demo .model-table td button:focus-visible { outline-offset: -2px; }
.p-demo .model-table td.pass-cell button { color: var(--accent-hi); }
.p-demo .model-table td.check-cell button { color: var(--fg); font-weight: 700; text-decoration: underline dotted; text-underline-offset: 3px; }
.p-demo .model-statusbar { background: #0f0d0a; font-size: 0.66rem; letter-spacing: 0.06em; color: var(--fg-2); }
.p-demo .model-statusbar b { color: var(--accent-hi); }
.p-demo .diagnostics-filterbar label { font: 500 0.64rem/1 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg-2); }
.p-demo .diagnostics-filterbar select { min-height: 40px; border-color: var(--line); background-color: #14110c; font: 500 0.86rem/1 var(--sans); letter-spacing: 0; text-transform: none; color: var(--fg); }
.p-demo .health-score > div::before { background: #0c0a08; }
.p-demo .health-score strong { font-size: 1.7rem; }
.p-demo .health-score small { color: var(--fg-2); }
.p-demo .health-score > span { font: 500 0.6rem/1.5 var(--mono); color: var(--fg-2); }
.p-demo .diagnostics-signals article > b { font: 500 0.7rem/1 var(--mono); }
.p-demo .diagnostics-signals article span { font: 500 0.6rem/1 var(--mono); letter-spacing: 0.18em; color: var(--fg-2); }
.p-demo .diagnostics-signals article h3 { font: 600 1rem/1.25 var(--sans); color: var(--fg); }
.p-demo .diagnostics-signals article p { font-size: 0.86rem; color: var(--fg-2); }
.p-demo .diagnostics-signals article > i { border-color: var(--line); font: 500 0.62rem/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-soft); }
/* The one warm status of the report (its hint calls it red): always with its word and a filled mark. */
.p-demo .diagnostics-signals .signal-high > i { border-color: rgba(229, 142, 120, 0.7); color: #f2a593; }
.p-demo .diagnostics-signals .signal-high > i::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: currentColor; vertical-align: 1px; }

/* ----------------------------------------------------------- responsive */
@media (max-width: 1100px) {
  .lb-ex, .lb-doc { grid-template-columns: minmax(0, 1fr); row-gap: clamp(22px, 3.6vh, 36px); }
  .lb-ex--flip .lb-ex-copy { order: 0; }
  .lb-doc .lb-files .lb-file:last-child { padding-bottom: 0; border-bottom: 0; }
  .lb-doc--online { row-gap: 10px; }
  .lb-doc--online .lb-doc-t { grid-row: 2; }
  .lb-doc--online .lb-doc-copy > .txt { grid-column: 1; grid-row: 3; padding-right: 0; }
  .lb-doc--online > .lnk { position: relative; right: auto; bottom: auto; grid-column: 1; grid-row: 4; justify-self: start; margin-top: 8px; }
  /* The years under the chart of the model stand under their points whatever the size of the type. */
  .p-demo .model-main-chart .chart-years text:not(:first-child) { text-anchor: middle; transform: translateX(10px); }
  .p-demo .model-main-chart .chart-years text:last-child { text-anchor: end; transform: translateX(20px); }
  /* Beside the controls the chart is drawn at less than half its size: its labels are set larger. */
  @media (min-width: 1024px) { .p-demo .model-main-chart .chart-years text { font-size: 24px; } }
  /* Touch: the controls of an instrument and the cells of its table are 44px targets. */
  .p-demo :is(.scenario-switch, .diagnostics-period) button, .p-demo .ribbon-action { min-height: 44px; }
  .p-demo :is(.model-sheet-nav, .diagnostics-nav) button { min-height: 44px; }
  .p-demo :is(.model-drivers, .cash-release) input[type="range"] { height: 44px; }
  .p-demo .diagnostics-filterbar select { min-height: 44px; }
  .p-demo .model-table td button { min-height: 44px; }
}
@media (max-width: 860px) {
  /* The deck turns: the line runs down the left edge, one node per step. */
  .lb-nodes-line { display: none; }
  .lb-nodes ol { grid-template-columns: minmax(0, 1fr); }
  .lb-node { padding: 0 0 clamp(20px, 3vh, 28px) 36px; }
  .lb-node:last-child { padding-bottom: 0; }
  .lb-node::after { content: ""; position: absolute; left: 7px; top: calc(var(--lb-node) + 5px); bottom: 3px; width: 1.5px; background: rgba(217, 178, 96, 0.5); transform-origin: 50% 0; }
  .lb-node:last-child::after { display: none; }
  .js .lb-node::after { transform: scaleY(0); }
  .js .on .lb-node::after { transform: none; transition: transform 0.6s var(--ease) calc(0.7s + var(--i, 0) * 0.34s); }
  .late .lb-node::after, [data-motion="off"] .lb-node::after { transform: none !important; transition: none !important; }
  .lb-node > b { padding-top: 2px; }
  .lb-facts--4 .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Facts in one row stand on one line: a label that wraps does not push its figure down. */
  .lb-facts .facts > div { display: flex; flex-direction: column; }
  .lb-facts .facts dd { margin-top: auto; padding-top: 6px; }
  .lb-file { grid-template-columns: 54px minmax(0, 1fr) auto; grid-template-areas: "type name name" "type what what" "type size get"; row-gap: 2px; }
  .lb-file-what { margin-top: 2px; }
  .prose .lb-file { grid-template-areas: "type name name" "type what what" "type size get"; }
  .prose .lb-file-size { margin-top: 0; }
  .lb-get { justify-self: end; }
  /* The instrument takes the width of the screen. */
  .lb-stage { padding-inline: 10px; }
  .lb-inst-note { padding-inline: 10px; }
  .lb-inst-bar { padding: 10px 14px; font-size: 0.69rem; letter-spacing: 0.12em; }
  .p-demo .diagnostics-filterbar label { flex: 1 1 100%; justify-content: space-between; }
  .p-demo .diagnostics-filterbar select { flex: 1; max-width: 70%; }
  .p-demo :is(.model-ribbon, .diagnostics-filterbar) { padding-inline: 14px; }
  .p-demo :is(.model-sheet-nav, .diagnostics-nav) { -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); scrollbar-width: none; }
  /* The chart is scaled down with the screen; the type of its labels grows to stay about 12px. */
  .p-demo .model-main-chart .chart-years text { font-size: clamp(12px, calc(40px - 3.3vw), 21.5px); }
  /* The table of the model: the first column stays in place and a soft gold edge shows where
     there is more to see. */
  .p-demo .model-table :is(thead th:first-child, tbody th) { position: sticky; left: 0; z-index: 1; background: #0f0d0b; box-shadow: 1px 0 0 var(--rule); }
  .p-demo .model-table-scroll {
    background:
      linear-gradient(90deg, #0f0d0b 40%, rgba(15, 13, 11, 0)) 0 0 / 56px 100% no-repeat local,
      linear-gradient(270deg, #0f0d0b 40%, rgba(15, 13, 11, 0)) 100% 0 / 56px 100% no-repeat local,
      linear-gradient(270deg, rgba(217, 178, 96, 0.2), rgba(217, 178, 96, 0)) 100% 0 / 26px 100% no-repeat scroll;
  }
}
@media (max-width: 560px) {
  .lb-facts .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lb-ex-copy > .lbl { padding-right: 0; }
  .lb-ex-flag { position: static; order: -1; margin-bottom: 12px; }
  .lb-ex-facts { grid-template-columns: repeat(2, minmax(0, auto)); }
  /* The ribbon of the model: the name and «Сбросить» on one line, the scenarios across the next. */
  .p-demo .model-ribbon .scenario-switch { order: 3; flex: 1 1 100%; }
  .p-demo .model-ribbon .scenario-switch button { flex: 1; padding-inline: 8px; }
  .p-demo :is(.model-kpi-grid, .diagnostics-kpis) strong { font-size: 1.6rem; }
  .p-demo .model-main-chart .chart-years text { font-size: clamp(24px, calc(67px - 10vw), 35px); }
}
@media (prefers-reduced-motion: reduce) {
  .lb-node::before, .lb-node::after { transform: none !important; transition: none !important; }
  .lb-get::after, .lb-get svg, .lb-main-get > i svg { transition: none; }
}
@media print {
  .lb-inst { box-shadow: none; }
  .lb-inst-bar { position: static; }
}

/* Golden Bridge v2 — the chat window (assets/chat.js). It drops from the header's control in a
   wide window and takes the whole screen on a phone. Above the header and the bottom row, below
   the menu sheet. */
.gbc {
  position: fixed; z-index: 55; right: clamp(12px, 1.6vw, 28px); top: calc(var(--top-h) + 4px);
  width: min(412px, calc(100vw - 24px)); height: min(660px, calc(100vh - var(--top-h) - 24px));
  display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid var(--rule-2); border-radius: 22px; background: #0e0c09; color: var(--fg);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.62), 0 0 0 1px rgba(0, 0, 0, 0.4);
  animation: gbc-in 0.3s var(--ease-out) both;
}
@keyframes gbc-in { from { opacity: 0; transform: translateY(-10px); } }
html[data-motion="off"] .gbc { animation: none; }
@media (prefers-reduced-motion: reduce) { .gbc, .gbc-typing i { animation: none !important; } }

.gbc-top { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 12px 12px 20px; border-bottom: 1px solid var(--rule); background: linear-gradient(180deg, rgba(40, 32, 18, 0.62), rgba(22, 18, 11, 0)); }
.gbc-t { font: 600 1.2rem/1.15 var(--serif); letter-spacing: 0.01em; }
.gbc-s { margin-top: 5px; font: 500 0.75rem/1.25 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.gbc-x { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: rgba(19, 16, 11, 0.8); transition: border-color 0.2s; }
.gbc-x:hover { border-color: var(--accent-hi); }
.gbc-x i { display: block; width: 16px; height: 1.5px; margin: 3px 0; background: var(--fg); }
.gbc-x i:first-child { transform: translateY(2.25px) rotate(45deg); }
.gbc-x i:nth-child(2) { transform: translateY(-2.25px) rotate(-45deg); }

.gbc-log { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 10px; padding: 16px 16px 10px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--accent-lo) transparent; }
.gbc-log:focus-visible { outline-offset: -3px; }
.gbc-m { max-width: 88%; padding: 10px 14px; border-radius: 16px; font: 400 0.95rem/1.5 var(--sans); white-space: pre-wrap; overflow-wrap: anywhere; }
.gbc-m--bot { align-self: flex-start; border: 1px solid var(--rule); border-bottom-left-radius: 6px; background: var(--surface-2); }
.gbc-m--me { align-self: flex-end; border-bottom-right-radius: 6px; background: linear-gradient(180deg, #ecd08d, #d3aa55); color: var(--accent-ink); font-weight: 500; }
.gbc-m a { color: var(--accent-hi); text-decoration-color: var(--line); text-underline-offset: 0.2em; }
.gbc-topic, .gbc-note { align-self: center; max-width: 94%; text-align: center; font: 500 0.82rem/1.4 var(--sans); color: var(--fg-2); }
.gbc-topic { padding: 5px 13px; border: 1px solid var(--rule); border-radius: 999px; color: var(--accent-hi); font-variant-numeric: lining-nums; }
.gbc-typing { display: inline-flex; align-items: center; gap: 5px; padding: 15px 16px; }
.gbc-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--fg-2); animation: gbc-dot 1.2s ease-in-out infinite both; }
.gbc-typing i:nth-child(2) { animation-delay: 0.16s; }
.gbc-typing i:nth-child(3) { animation-delay: 0.32s; }
@keyframes gbc-dot { 0%, 70%, 100% { opacity: 0.3; transform: none; } 35% { opacity: 1; transform: translateY(-3px); } }

.gbc-quick { flex: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 16px 10px; }
.gbc-quick:empty { display: none; }
.gbc-quick button { min-height: 40px; padding: 8px 15px; border: 1px solid var(--line); border-radius: 999px; background: rgba(217, 178, 96, 0.07); font: 600 0.86rem/1.2 var(--sans); color: var(--accent-hi); transition: border-color 0.2s, background-color 0.2s; }
.gbc-quick button:hover { border-color: var(--accent-hi); background: rgba(217, 178, 96, 0.14); }

.gbc-in { flex: none; display: flex; align-items: flex-end; gap: 8px; margin: 0 12px; padding: 5px 5px 5px 16px; border: 1px solid var(--rule-2); border-radius: 24px; background: var(--surface); transition: border-color 0.2s; }
.gbc-in:focus-within { border-color: var(--accent); }
.gbc-text { flex: 1; min-width: 0; max-height: 132px; padding: 10px 0; resize: none; border: 0; outline: 0; background: none; color: var(--fg); font: 400 1rem/1.45 var(--sans); }
.gbc-text::placeholder, .gbc-form ::placeholder { color: var(--fg-3); }
.gbc-send { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(180deg, var(--accent-hi), var(--accent)); color: var(--accent-ink); }
.gbc-send svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.gbc-alt { flex: none; align-self: center; min-height: 40px; margin-top: 4px; padding: 6px 12px; font: 600 0.86rem/1.2 var(--sans); color: var(--accent-hi); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 0.25em; }
.gbc-fine { flex: none; margin: 2px 18px 12px; text-align: center; font: 400 0.75rem/1.45 var(--sans); color: var(--fg-3); }
.gbc-fine a { color: var(--fg-2); text-underline-offset: 0.2em; }

/* The contact form takes the place of the conversation. */
.gbc--form .gbc-log { display: none; }
.gbc-form { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 12px; padding: 18px 18px 6px; overflow-y: auto; overscroll-behavior: contain; }
.gbc-lead { font: 400 0.95rem/1.5 var(--sans); color: var(--fg-soft); }
.gbc-field { display: grid; gap: 6px; }
.gbc-field span { font: 600 0.82rem/1.3 var(--sans); color: var(--fg-2); }
.gbc-field :is(input, textarea) { width: 100%; padding: 11px 14px; border: 1px solid var(--rule-2); border-radius: 14px; outline: 0; resize: none; background: var(--surface); color: var(--fg); font: 400 1rem/1.4 var(--sans); transition: border-color 0.2s; }
.gbc-field :is(input, textarea):focus { border-color: var(--accent); }
.gbc-err { min-height: 1.3em; font: 500 0.84rem/1.35 var(--sans); color: #f0b48a; }
.gbc-err:empty { display: none; }
.gbc-submit { min-height: 48px; padding: 12px 22px; border-radius: 999px; background: linear-gradient(180deg, var(--accent-hi), var(--accent)); color: var(--accent-ink); font: 700 1rem/1.2 var(--sans); }
.gbc-submit:disabled { opacity: 0.6; cursor: default; }

@media (max-width: 720px) {
  .gbc { inset: 0; width: 100%; height: 100%; height: 100dvh; border: 0; border-radius: 0; }
  .gbc-top { padding-top: max(14px, env(safe-area-inset-top)); }
  .gbc-fine { margin-bottom: max(12px, env(safe-area-inset-bottom)); }
  /* The page behind a full-screen window does not scroll. */
  .chat-open, .chat-open body { overflow: hidden; }
}
@media (max-height: 520px) and (min-width: 721px) { .gbc { top: 8px; height: calc(100vh - 16px); } }
@media print { .gbc { display: none !important; } }
