/* ==========================================================================
   Static site stylesheet. No build step. Tokens on :root, dark overrides twice
   (prefers-color-scheme unless the user forced light, and explicit data-theme).
   ========================================================================== */

:root {
  --bg: #f5f2ea;
  --bg-2: #ece7da;
  --surface: #fffdf7;
  --ink: #14161a;
  --ink-2: #2a2e36;
  --muted: #565b65;
  --line: #d8d2c3;
  --line-2: #c4bdab;
  --accent: #a35a00;
  --accent-ink: #ffffff;
  --accent-soft: #f3e3c9;
  --teal: #0b6a6a;
  --teal-soft: #d3e9e6;
  --warn: #8a1f1f;
  --warn-soft: #f4dcd6;
  --shadow: 0 1px 0 rgba(20,22,26,.04), 0 12px 32px -16px rgba(20,22,26,.28);
  --grid: rgba(20,22,26,.055);
  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Code", Consolas, "SFMono-Regular", Menlo, monospace;
  --w: 1120px;
  --r: 6px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1015; --bg-2: #12161c; --surface: #151a21; --ink: #ebe8e0; --ink-2: #cfccc3;
    --muted: #9ba1ab; --line: #262d37; --line-2: #343d4a; --accent: #f0a830; --accent-ink: #1a1200;
    --accent-soft: #2d2410; --teal: #4fd1c5; --teal-soft: #11302e; --warn: #ff8f85; --warn-soft: #351a18;
    --shadow: 0 1px 0 rgba(0,0,0,.4), 0 14px 34px -14px rgba(0,0,0,.7);
    --grid: rgba(235,232,224,.045); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d1015; --bg-2: #12161c; --surface: #151a21; --ink: #ebe8e0; --ink-2: #cfccc3;
  --muted: #9ba1ab; --line: #262d37; --line-2: #343d4a; --accent: #f0a830; --accent-ink: #1a1200;
  --accent-soft: #2d2410; --teal: #4fd1c5; --teal-soft: #11302e; --warn: #ff8f85; --warn-soft: #351a18;
  --shadow: 0 1px 0 rgba(0,0,0,.4), 0 14px 34px -14px rgba(0,0,0,.7);
  --grid: rgba(235,232,224,.045); color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 1.0625rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--accent); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
::selection { background: var(--accent); color: var(--accent-ink); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: .5rem .9rem; z-index: 100; border-radius: 4px; }
.skip:focus { left: 8px; }

.wrap { width: min(var(--w), 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); margin-inline: auto; }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; line-height: 1.12; letter-spacing: -.012em; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 5.4vw, 4.1rem); font-weight: 450; letter-spacing: -.025em; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.45rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.05rem; font-family: var(--sans); font-weight: 600; letter-spacing: 0; }
p { margin: 0 0 1em; text-wrap: pretty; }
.lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--ink-2); max-width: 60ch; line-height: 1.55; }
.muted { color: var(--muted); }
small, .small { font-size: .875rem; }
code, kbd, samp { font-family: var(--mono); font-size: .88em; background: var(--bg-2); border: 1px solid var(--line); padding: .08em .38em; border-radius: 4px; color: var(--ink); overflow-wrap: anywhere; }
pre { font-family: var(--mono); font-size: .85rem; line-height: 1.55; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 1rem 1.15rem; overflow-x: auto; margin: 0 0 1.2em; }
pre code { background: none; border: 0; padding: 0; font-size: inherit; }
hr { border: 0; border-top: 1px solid var(--line); margin: 3rem 0; }

.eyebrow { font: 500 .78rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); display: inline-flex; align-items: center; gap: .7em; margin-bottom: 1.1rem; }
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; gap: 1rem; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--ink); text-decoration: none; font: 600 1.05rem/1 var(--sans); letter-spacing: -.01em; white-space: nowrap; }
.brand svg { width: 26px; height: 26px; }
.brand b { font-weight: 600; }
.brand span { color: var(--muted); font-weight: 400; }
.nav { margin-left: auto; display: flex; align-items: center; gap: .15rem; }
.nav a.nl, .nav button.nl { color: var(--ink-2); text-decoration: none; font-size: .93rem; padding: .5rem .7rem; border-radius: 6px; background: none; border: 0; font-family: inherit; cursor: pointer; }
.nav a.nl:hover, .nav button.nl:hover { background: var(--bg-2); color: var(--ink); }
.nav a.nl[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
.dd { position: relative; }
.dd-panel { position: absolute; right: 0; top: calc(100% + 8px); min-width: 280px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 8px; box-shadow: var(--shadow); padding: .5rem; display: none; }
.dd.open .dd-panel { display: block; }
.dd-panel a { display: block; padding: .55rem .7rem; border-radius: 6px; text-decoration: none; color: var(--ink); font-size: .93rem; line-height: 1.3; }
.dd-panel a small { display: block; color: var(--muted); font-size: .78rem; margin-top: .15rem; }
.dd-panel a:hover { background: var(--bg-2); }
.icon-btn { width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); cursor: pointer; }
.icon-btn:hover { border-color: var(--accent); }
.icon-btn svg { width: 18px; height: 18px; }
.theme-ico-moon { display: none; }
:root[data-theme="dark"] .theme-ico-sun { display: none; }
:root[data-theme="dark"] .theme-ico-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-ico-sun { display: none; }
  :root:not([data-theme="light"]) .theme-ico-moon { display: block; }
}
.menu-btn { display: none; }
.hdr-cta { margin-left: .4rem; }

@media (max-width: 940px) {
  .menu-btn { display: inline-grid; margin-left: auto; }
  .nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--bg); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: .6rem 16px 1rem; margin: 0; display: none; max-height: calc(100vh - 64px); overflow: auto; }
  .nav.open { display: flex; }
  .nav a.nl, .nav button.nl { padding: .8rem .4rem; border-bottom: 1px solid var(--line); border-radius: 0; text-align: left; }
  .nav a.nl[aria-current="page"] { box-shadow: none; color: var(--accent); }
  .dd-panel { position: static; display: block; border: 0; box-shadow: none; background: transparent; padding: 0 0 0 .8rem; }
  .dd > button { display: none; }
  .hdr-cta { margin: .8rem 0 0; }
  .nav-tools { display: flex; gap: .5rem; padding-top: .8rem; }
}
@media (min-width: 941px) { .nav-tools { display: contents; } }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: .55em; padding: .8rem 1.25rem; border-radius: 6px; font: 600 .95rem/1.1 var(--sans); text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: transform .15s ease, background .15s ease, border-color .15s ease; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { transform: translateY(-1px); filter: brightness(1.06); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn.ghost:hover { border-color: var(--ink); }
.btn.sm { padding: .55rem .9rem; font-size: .85rem; }
.btn svg { width: 16px; height: 16px; }
.row { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; }

/* ---------- sections ---------- */
section.s { padding: clamp(3.5rem, 7vw, 6rem) 0; }
section.s.alt { background: var(--bg-2); border-block: 1px solid var(--line); }
.sec-head { max-width: 760px; margin-bottom: 2.4rem; }
.sec-head p { color: var(--ink-2); font-size: 1.1rem; }

.hero { position: relative; overflow: hidden; padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(3rem, 6vw, 5rem); border-bottom: 1px solid var(--line); }
.hero::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 44px 44px; mask-image: radial-gradient(ellipse 80% 90% at 70% 40%, #000 20%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse 80% 90% at 70% 40%, #000 20%, transparent 75%); pointer-events: none; }
.hero .wrap { position: relative; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.hero h1 em { font-style: italic; color: var(--accent); font-weight: 400; }
.hero-sub { padding-bottom: clamp(2.5rem, 5vw, 4rem); }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

.meta-row { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.4rem 0 0; padding: 0; list-style: none; }
.meta-row li { font: 500 .78rem/1 var(--mono); padding: .5rem .7rem; border: 1px solid var(--line-2); border-radius: 999px; color: var(--ink-2); background: var(--surface); }

/* ---------- cards / grids ---------- */
.grid { display: grid; gap: 1.1rem; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .g3, .g4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 1.5rem; position: relative; }
.card h3 { margin-bottom: .45rem; }
.card p:last-child { margin-bottom: 0; }
.card .num { font: 500 .78rem/1 var(--mono); color: var(--muted); letter-spacing: .1em; display: block; margin-bottom: 1rem; }
a.card { text-decoration: none; color: inherit; display: flex; flex-direction: column; transition: border-color .2s, transform .2s, box-shadow .2s; }
a.card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--shadow); }
a.card .more { margin-top: auto; padding-top: 1rem; font: 500 .85rem var(--mono); color: var(--accent); }
.card .needs { font-size: .85rem; color: var(--muted); border-top: 1px dashed var(--line-2); margin-top: 1rem; padding-top: .8rem; }
.card .needs b { color: var(--ink-2); font-weight: 600; }
.tag { font: 500 .72rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--teal); display: block; margin-bottom: .9rem; }
.suite-card { background: linear-gradient(135deg, var(--accent-soft), var(--surface) 70%); border-color: var(--accent); }

/* ---------- figures ---------- */
.plate { background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; padding: 1rem 1rem .7rem; box-shadow: var(--shadow); }
.plate figcaption, figure.fig figcaption { font: 400 .8rem/1.45 var(--mono); color: var(--muted); padding: .7rem .3rem .2rem; }
figure.fig { margin: 2rem 0; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 1.2rem 1.2rem .8rem; }
figure { margin: 0; }
svg.dg { width: 100%; height: auto; font-family: var(--mono); }
.dg .t { fill: var(--ink); font-size: 11px; }
.dg .t2 { fill: var(--muted); font-size: 10px; }
.dg .tb { fill: var(--ink); font-size: 12px; font-weight: 600; font-family: var(--sans); }
.dg .ta { fill: var(--accent); font-size: 11px; font-weight: 600; }
.dg .tt { fill: var(--teal); font-size: 11px; font-weight: 600; }
.dg .ln { stroke: var(--line-2); stroke-width: 1; fill: none; }
.dg .ink { stroke: var(--ink); stroke-width: 1.8; fill: none; stroke-linejoin: round; stroke-linecap: round; }
.dg .acc { stroke: var(--accent); stroke-width: 1.4; fill: none; }
.dg .tl { stroke: var(--teal); stroke-width: 1.4; fill: none; }
.dg .dash { stroke-dasharray: 4 4; }
.dg .box { fill: var(--surface); stroke: var(--line-2); stroke-width: 1; }
.dg .boxa { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1; }
.dg .boxt { fill: var(--teal-soft); stroke: var(--teal); stroke-width: 1; }
.dg .boxm { fill: var(--bg-2); stroke: var(--line-2); stroke-width: 1; }
.dg .dot { fill: var(--accent); }
.dg .dott { fill: var(--teal); }
.dg .vol { fill: var(--line-2); }
.dg .vola { fill: var(--accent); opacity: .85; }
.dg .zone { fill: var(--accent); opacity: .08; }
.dg .zonet { fill: var(--teal); opacity: .12; }
.dg .faint { stroke: var(--line-2); stroke-width: .6; fill: none; opacity: .8; }
.dg .nd { fill: var(--surface); stroke: var(--ink); stroke-width: 1.3; }
.dg .nda { fill: var(--accent); stroke: var(--accent); }
.dg .ndt { fill: var(--teal); stroke: var(--teal); }
.dg .arrow { stroke: var(--ink-2); stroke-width: 1.3; fill: none; marker-end: url(#ah); }
.dg .hatch { fill: url(#hatch); stroke: var(--line-2); }

/* ---------- tables ---------- */
.tbl-wrap { overflow-x: auto; margin: 0 0 1.5rem; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: .93rem; }
th, td { text-align: left; padding: .75rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font: 500 .74rem/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); background: var(--bg-2); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td code { white-space: nowrap; }
@media (max-width: 640px) { td code { white-space: normal; overflow-wrap: anywhere; } th, td { padding: .6rem .7rem; } }

/* ---------- callouts ---------- */
.callout { border: 1px solid var(--line-2); border-left: 4px solid var(--teal); background: var(--surface); border-radius: 6px; padding: 1rem 1.2rem; margin: 1.6rem 0; font-size: .98rem; }
.callout > :last-child { margin-bottom: 0; }
.callout strong.k { font: 600 .74rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; display: block; margin-bottom: .5rem; color: var(--teal); }
.callout.warn { border-left-color: var(--warn); background: var(--warn-soft); }
.callout.warn strong.k { color: var(--warn); }
.callout.note { border-left-color: var(--accent); }
.callout.note strong.k { color: var(--accent); }

/* ---------- lists ---------- */
ul.ticks, ul.dashes { list-style: none; padding: 0; margin: 0 0 1.2em; }
ul.ticks li, ul.dashes li { position: relative; padding-left: 1.5rem; margin-bottom: .55rem; }
ul.ticks li::before { content: ""; position: absolute; left: 0; top: .6em; width: 10px; height: 6px; border-left: 2px solid var(--teal); border-bottom: 2px solid var(--teal); transform: rotate(-45deg) translateY(-50%); }
ul.dashes li::before { content: ""; position: absolute; left: 0; top: .85em; width: 10px; height: 1px; background: var(--muted); }
ol.steps { list-style: none; counter-reset: s; padding: 0; margin: 0 0 1.5rem; }
ol.steps > li { counter-increment: s; position: relative; padding: 0 0 1.4rem 3.2rem; border-left: 1px solid var(--line-2); margin-left: 1rem; }
ol.steps > li:last-child { border-left-color: transparent; padding-bottom: 0; }
ol.steps > li::before { content: counter(s); position: absolute; left: -1rem; top: -.1rem; width: 2rem; height: 2rem; border-radius: 50%; background: var(--surface); border: 1px solid var(--accent); color: var(--accent); display: grid; place-items: center; font: 600 .85rem var(--mono); }
ol.steps > li h4 { margin-bottom: .25rem; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1.4rem; margin: 0 0 1.4rem; font-size: .96rem; }
.kv dt { font: 500 .78rem/1.8 var(--mono); color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.kv dd { margin: 0; }
@media (max-width: 560px) { .kv { grid-template-columns: 1fr; gap: 0; } .kv dd { margin-bottom: .7rem; } }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.prose h2 { margin-top: 2.6rem; font-size: 1.75rem; }
.prose h3 { margin-top: 1.8rem; }
.prose li { margin-bottom: .4rem; }
.prose ul, .prose ol { padding-left: 1.3rem; }

/* ---------- pricing ---------- */
.price-card { display: flex; flex-direction: column; }
.price-card.featured { border-color: var(--accent); box-shadow: var(--shadow); }
.price-card .amt { font: 450 2.6rem/1 var(--serif); letter-spacing: -.02em; margin: .6rem 0 .2rem; }
.price-card .amt small { font: 400 .9rem var(--sans); color: var(--muted); letter-spacing: 0; }
.price-card .term { font-size: .85rem; color: var(--muted); margin-bottom: 1rem; }
.price-card ul { margin-bottom: 1.4rem; font-size: .95rem; }
.price-card .btn { margin-top: auto; justify-content: center; }
.ph-stamp { position: absolute; top: 14px; right: 14px; }

/* ---------- FAQ ---------- */
details.faq { border-bottom: 1px solid var(--line); }
details.faq:first-of-type { border-top: 1px solid var(--line); }
details.faq summary { cursor: pointer; padding: 1.1rem 2.2rem 1.1rem 0; font: 500 1.12rem/1.35 var(--serif); list-style: none; position: relative; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; position: absolute; right: .3rem; top: 1rem; font: 400 1.5rem/1 var(--mono); color: var(--accent); transition: transform .2s; }
details.faq[open] summary::after { transform: rotate(45deg); }
details.faq .ans { padding: 0 0 1.3rem; color: var(--ink-2); max-width: 70ch; }
.toc { position: sticky; top: 90px; }
.toc a { display: block; padding: .35rem 0 .35rem .9rem; color: var(--ink-2); text-decoration: none; font-size: .93rem; border-left: 2px solid var(--line); }
.toc a:hover { color: var(--accent); border-left-color: var(--accent); }
.doc-layout { display: grid; grid-template-columns: 220px 1fr; gap: 3rem; align-items: start; }
@media (max-width: 860px) { .doc-layout { grid-template-columns: 1fr; gap: 1rem; } .toc { position: static; display: flex; flex-wrap: wrap; gap: .4rem; } .toc a { border: 1px solid var(--line); border-radius: 999px; padding: .35rem .8rem; } }

/* ---------- forms ---------- */
label { display: block; font: 500 .8rem var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: .35rem; }
input, select, textarea { width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line-2); border-radius: 6px; padding: .7rem .85rem; }
textarea { min-height: 150px; resize: vertical; }
.field { margin-bottom: 1.1rem; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-2); padding: 3.5rem 0 2rem; font-size: .93rem; }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 2rem; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .foot-grid { grid-template-columns: 1fr; } }
.site-footer h5 { font: 500 .74rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 .9rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .45rem; }
.site-footer a { color: var(--ink-2); text-decoration: none; }
.site-footer a:hover { color: var(--accent); text-decoration: underline; }
.risk { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line-2); color: var(--muted); font-size: .82rem; line-height: 1.6; }
.risk b { color: var(--ink-2); }
.copy { margin-top: 1rem; font: 400 .78rem var(--mono); color: var(--muted); display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; }

/* ---------- motion ---------- */
.js .rv { opacity: 0; transform: translateY(14px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.js .rv.in { opacity: 1; transform: none; }
.draw { stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: draw 2.4s cubic-bezier(.3,.6,.2,1) .2s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.pop { opacity: 0; animation: pop .5s ease forwards; }
@keyframes pop { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .rv { opacity: 1; transform: none; transition: none; }
  .draw { animation: none; stroke-dashoffset: 0; }
  .pop { animation: none; opacity: 1; }
  .btn, a.card { transition: none; }
}
@media print { .site-header, .site-footer .foot-grid, .hero::before { display: none; } body { background: #fff; color: #000; } }

/* horizontal scroll wrapper for wide diagrams on phones */
.dg-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.dg-scroll > svg { min-width: 680px; }
.dg-scroll.wide > svg { min-width: 820px; }
.hint-scroll { display: none; font: 400 .75rem var(--mono); color: var(--muted); margin: 0 0 .4rem; }
@media (max-width: 760px) { .hint-scroll { display: block; } }

/* grid/flex children must be allowed to shrink so wide diagrams scroll instead of widening the page */
.grid > *, .split > *, .hero-grid > *, .doc-layout > *, .foot-grid > * { min-width: 0; }

/* ---------- screenshot slots ---------- */
.shot { margin: 1.6rem 0; }
.shot-frame { position: relative; aspect-ratio: 16 / 10; background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); }
.shot-frame img { width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.shot-frame img[hidden] { display: none; }
.shot-note { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; text-align: center; padding: 1.5rem; color: var(--muted); font: 500 .85rem/1.5 var(--mono); letter-spacing: .04em; background:
  repeating-linear-gradient(135deg, transparent 0 14px, var(--grid) 14px 15px); }
.shot.is-empty .shot-note { display: flex; }
.shot figcaption { font: 400 .8rem/1.45 var(--mono); color: var(--muted); padding: .7rem .3rem .2rem; }

/* ---------- screenshot lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 1000; background: rgba(6, 8, 11, .92); display: flex; align-items: center; justify-content: center; overflow: auto; padding: 2.5rem 1rem 3rem; cursor: zoom-out; }
.lightbox img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; border-radius: 6px; box-shadow: 0 10px 40px rgba(0, 0, 0, .6); cursor: zoom-in; }
.lightbox.is-full { align-items: flex-start; justify-content: flex-start; }
.lightbox.is-full img { max-width: none; max-height: none; cursor: zoom-out; }
.lightbox-close { position: fixed; top: .6rem; right: .8rem; width: 2.4rem; height: 2.4rem; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .35); background: rgba(20, 24, 30, .85); color: #fff; font: 400 1.6rem/1 var(--sans, sans-serif); cursor: pointer; }
.lightbox-close:focus-visible { outline: 2px solid #f0a830; outline-offset: 2px; }
.lightbox-hint { position: fixed; left: 0; right: 0; bottom: .7rem; text-align: center; font: 400 .75rem/1.4 var(--mono, monospace); color: rgba(255, 255, 255, .6); pointer-events: none; }
