@layer sb-tokens, sb-base, sb-blocks, sb-render, sb-style, sb-style-blocks, sb-frame;

@layer sb-tokens {
:root {
  --paper: #fafbfd;
  --paper-dim: #f0f3f9;
  --card: #ffffff;
  --ink: #0a1220;
  --ink-soft: #3c4658;
  --line: #e2e7f0;
  --primary: #267e54;
  --primary-dark: #1d6242;
  --on-primary: #ffffff;
  --accent: #2e9a67;
  --success: #1c9c6f;
  --warning: #b8790a;
  --danger: #d92d20;
  --dark: #020617;
  --dark-card: #0b1120;
  --dark-line: #232a3d;
  --dark-ink: #fafafa;
  --dark-muted: #b8c1d6;
  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;
  --wrap: 1200px;
  --gutter: clamp(20px, 5vw, 48px);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-button: 6px;
  --space-section-base: 96px;
  --heading-weight: 600;
  --heading-tracking: -0.01em;
  --heading-scale: 1;
  --eyebrow-font: var(--font-mono);
  --eyebrow-case: uppercase;
  --eyebrow-tracking: 0.06em;
  --label-font: var(--font-mono);
  --border-w: 1px;
  --shadow-sm: 0 1px 2px rgba(10, 18, 32, 0.06), 0 1px 1px rgba(10, 18, 32, 0.04);
  --shadow-md: 0 24px 60px -34px rgba(10, 18, 32, 0.4);
  --shadow-lg: 0 40px 80px -46px rgba(10, 18, 32, 0.8);
  --shadow-card: none;
  --motion-duration: 0.6s;
  --motion-easing: ease;
  --reveal-distance: 14px;
}
}

@layer sb-base {
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Role tokens. Light is the default; every tone class starts a new scope. */
:root, .tone-light, .tone-dim {
  --bg: var(--paper);
  --bg-card: var(--card);
  --bg-soft: var(--paper-dim);
  --bg-inset: var(--paper-dim);
  --fg: var(--ink);
  --fg-muted: var(--ink-soft);
  --fg-heading: var(--ink);
  --border: var(--line);
  --emph: var(--primary);
  --on-emph: var(--on-primary);
  --positive: var(--success);
  --caution: var(--warning);
  --negative: var(--danger);
}
:root {
  /* Device frames (phones, terminals) are drawn from the dark palette in every tone */
  --device-body: color-mix(in srgb, var(--dark) 60%, var(--dark-line));
  --device-edge: color-mix(in srgb, var(--dark-line) 92%, var(--dark-muted));
  --space-section: var(--space-section-base);
  --space-section-md: calc(var(--space-section-base) * 7 / 12);
  --space-section-sm: calc(var(--space-section-base) / 3);
}
.tone-dim {
  --bg: var(--paper-dim);
}
.tone-dark {
  --bg: var(--dark);
  --bg-card: var(--dark-card);
  --bg-soft: var(--dark-card);
  --bg-inset: var(--dark);
  --fg: var(--dark-ink);
  --fg-muted: var(--dark-muted);
  --fg-heading: var(--dark-ink);
  --border: var(--dark-line);
  --emph: var(--accent);
  --on-emph: var(--dark);
  --positive: color-mix(in oklab, var(--success) 72%, var(--dark-ink));
  --caution: color-mix(in oklab, var(--warning) 72%, var(--dark-ink));
  --negative: color-mix(in oklab, var(--danger) 72%, var(--dark-ink));
}
/* Emphasis at least fairly light on dark. Signals lift lightness but keep
   chroma, so greens stay green rather than turning grey; their tints sit at a
   fixed low lightness so they stay saturated. */
@supports (color: oklch(from red l c h)) {
  .tone-dark {
    --emph: oklch(from var(--accent) max(l, 0.7) c h);
    --positive: oklch(from var(--success) max(l, 0.74) c h);
    --caution: oklch(from var(--warning) max(l, 0.82) c h);
    --negative: oklch(from var(--danger) max(l, 0.72) c h);
  }
  /* An accent pill takes the lifted accent: a dark accent (navy) cannot be read on a dark panel. */
  .tone-dark .badge[data-tone="accent"] { --sig: var(--emph); }
  .tone-dark [data-tone] {
    --sig-bg: oklch(from var(--sig) 0.24 calc(c * 0.5) h);
    --sig-line: oklch(from var(--sig) 0.48 calc(c * 0.8) h);
  }
}

/* Emphasis must stay readable whatever brand colours a site brings: at most
   mid lightness on light sections (dark ones: see darkScope). Colours that
   already contrast are unchanged. */
@supports (color: oklch(from red l c h)) {
  :root, .tone-light, .tone-dim { --emph: oklch(from var(--primary) min(l, 0.6) c h); }
}
.tone-brand {
  --bg: var(--primary);
  --bg-card: color-mix(in srgb, var(--on-primary) 12%, var(--primary));
  --bg-soft: color-mix(in srgb, var(--on-primary) 9%, var(--primary));
  --bg-inset: color-mix(in srgb, var(--on-primary) 9%, var(--primary));
  --fg: var(--on-primary);
  --fg-muted: color-mix(in srgb, var(--on-primary) 82%, var(--primary));
  --fg-heading: var(--on-primary);
  --border: color-mix(in srgb, var(--on-primary) 26%, var(--primary));
  --emph: var(--on-primary);
  --on-emph: var(--primary);
  --positive: color-mix(in oklab, var(--success) 45%, var(--on-primary));
  --caution: color-mix(in oklab, var(--warning) 45%, var(--on-primary));
  --negative: color-mix(in oklab, var(--danger) 45%, var(--on-primary));
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: var(--heading-weight);
  letter-spacing: var(--heading-tracking);
  margin: 0;
  color: var(--fg-heading);
}
/* Emphasis in a heading (*words* in the field): styles restyle it. */
:is(h1, h2):not(.prose *) em { font-style: normal; color: var(--emph); }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; height: auto; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--primary); color: var(--on-primary);
  padding: 12px 20px; border-radius: 0 0 var(--radius-sm) 0; z-index: 100;
}
.skip-link:focus { left: 0; }
:focus-visible { outline: 2px solid var(--emph); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Reveal-on-scroll: progressive enhancement, content is visible without JS */
[data-reveal] { opacity: 0; transform: translateY(var(--reveal-distance)); transition: opacity var(--motion-duration) var(--motion-easing), transform var(--motion-duration) var(--motion-easing); }
[data-reveal].is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { [data-reveal] { opacity: 1; transform: none; transition: none; } }
html.no-reveal [data-reveal] { opacity: 1; transform: none; transition: none; }

/* Section frame: the tone of a section paints it; nested scopes only re-bind tokens */
.blk { padding: var(--space-section) 0; }
.blk.tone-light, .blk.tone-dim, .blk.tone-dark, .blk.tone-brand, .surface { background: var(--bg); color: var(--fg); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-weight: 600; font-size: 0.95rem;
  padding: 13px 24px; border-radius: var(--radius-button); border: var(--border-w) solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  white-space: nowrap; cursor: pointer; max-width: 100%;
}
/* Long labels (translations run longer) wrap on phones instead of widening the page. */
@media (max-width: 600px) { .btn { white-space: normal; text-align: center; } }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.tone-brand .btn-primary { background: var(--on-primary); color: var(--primary); }
.tone-brand .btn-primary:hover { background: color-mix(in srgb, var(--on-primary) 88%, var(--primary)); }
.btn-ghost { background: transparent; color: var(--fg-heading); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--emph); color: var(--emph); }
.btn-sm { padding: 9px 18px; font-size: 0.88rem; }
.btn-lg { padding: 16px 32px; font-size: 1rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.link-muted { font-size: 0.92rem; font-weight: 500; color: var(--fg-muted); }
.link-muted:hover { color: var(--fg); }
/* Credits for stock photos used on the page, after the content. */
.photo-credits { padding: 18px 0; font-size: 0.8rem; color: var(--fg-muted); border-top: 1px solid var(--border); }
.photo-credits a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* Eyebrows and section heads */
.eyebrow {
  font-family: var(--eyebrow-font); font-size: 0.78rem; font-weight: 500;
  letter-spacing: var(--eyebrow-tracking); text-transform: var(--eyebrow-case); color: var(--emph); margin: 0 0 14px;
}
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head-wide { max-width: 700px; }
.section-head h2 { font-size: calc(clamp(1.7rem, 3vw, 2.35rem) * var(--heading-scale)); line-height: 1.16; margin-bottom: 16px; }
.section-lede { font-size: 1.05rem; color: var(--fg-muted); max-width: 58ch; }
.section-lede + .section-lede { margin-top: 12px; }
.section-cta { margin-top: 44px; display: flex; justify-content: center; }

/* Primitives shared by blocks. Styles restyle these. */
.card { background: var(--bg-card); border: var(--border-w) solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-card); }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.88rem; font-weight: 500; color: var(--fg-muted);
  background: var(--bg-card); border: var(--border-w) solid var(--border); border-radius: 999px; padding: 7px 16px;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
a.chip:hover { border-color: var(--emph); color: var(--emph); }
.label-caps { font-family: var(--label-font); font-size: 0.78rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--fg-muted); }
.icon-tile { display: inline-flex; color: var(--emph); width: 32px; height: 32px; }
.icon-tile svg { width: 100%; height: 100%; }

/* Signal tints. Anything with data-tone gets --sig (the colour) and derived
   --sig-bg / --sig-line; on dark they are recomputed at a fixed low lightness
   so they stay saturated instead of turning grey. */
[data-tone] {
  --sig-bg: color-mix(in srgb, var(--sig) 12%, var(--bg-card));
  --sig-line: color-mix(in srgb, var(--sig) 45%, var(--bg-card));
}

/* Status pills. The tone picks the signal colour; tints derive from it. */
.badge {
  --sig: var(--fg-muted);
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--label-font); font-size: 0.74rem; font-weight: 500;
  padding: 5px 12px; border-radius: 999px;
  color: var(--sig);
  border: var(--border-w) solid var(--sig-line, var(--border));
  background: var(--sig-bg, var(--bg-inset));
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.badge--plain::before { display: none; }
.badge[data-tone="neutral"] { --sig: var(--fg-muted); border-color: var(--border); background: var(--bg-inset); }
.badge[data-tone="brand"] { --sig: var(--emph); }
.badge[data-tone="accent"] { --sig: var(--accent); }
.badge[data-tone="positive"] { --sig: var(--positive); }
.badge[data-tone="caution"] { --sig: var(--caution); }
.badge[data-tone="negative"] { --sig: var(--negative); }

/* Entrance animation primitives: pieces start "before" and settle when their
   [data-reveal] ancestor is revealed. Still for reduced motion, on a page
   marked html.no-reveal and without JavaScript (see noscriptCss). The editor
   preview plays them once (previewRevealJs). */
.anim-draw { stroke-dasharray: 1000; }
@media (prefers-reduced-motion: no-preference) {
  .anim-grow { transition: transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) var(--delay, 0s); transform-box: fill-box; transform-origin: var(--grow-origin, 50% 100%); }
  .anim-draw { transition: stroke-dashoffset 1.4s ease var(--delay, 0s); }
  .anim-fade { transition: opacity 0.9s ease var(--delay, 0s); }
  html:not(.no-reveal) [data-reveal]:not(.is-visible) .anim-grow { transform: scale(var(--grow-x, 1), var(--grow-y, 0)); }
  html:not(.no-reveal) [data-reveal]:not(.is-visible) .anim-draw { stroke-dashoffset: 1000; }
  html:not(.no-reveal) [data-reveal]:not(.is-visible) .anim-fade { opacity: 0; }
}

/* People: a round photo or initials */
.avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.avatar--initials { display: inline-grid; place-items: center; background: color-mix(in srgb, var(--emph) 16%, var(--bg-card)); color: var(--emph); font-family: var(--font-display); font-weight: 600; font-size: 0.9rem; letter-spacing: 0.02em; }

/* Image placeholder shown in the editor preview only */
.img-placeholder {
  display: grid; place-items: center; min-height: 160px; width: 100%;
  border: 1px dashed var(--border); border-radius: var(--radius-md); background: var(--bg-soft);
  color: var(--fg-muted); font-size: 0.85rem; font-family: var(--font-mono);
}

/* Prose inside rich text fields */
.prose p + p, .prose ul + p, .prose p + ul { margin-top: 14px; }
.prose h2 { font-size: 1.5rem; margin: 32px 0 12px; }
.prose h3 { font-size: 1.15rem; margin: 24px 0 10px; }
.prose ul { margin: 0; padding-left: 20px; color: var(--fg-muted); }
.prose li + li { margin-top: 6px; }
.prose a { color: var(--emph); text-decoration: underline; text-underline-offset: 3px; }
.prose code { font-family: var(--font-mono); font-size: 0.88em; background: var(--bg-soft); padding: 1px 6px; border-radius: 4px; }
.prose-wrap { max-width: calc(72ch + 2 * var(--gutter)); }

/* Tables in rich text: they scroll sideways in their own region, never the page */
.rt-table { position: relative; overflow-x: auto; max-width: 100%; border: var(--border-w) solid var(--border); border-radius: var(--radius-md); }
.rt-table:focus-visible { outline-offset: 2px; }
* + .rt-table, .rt-table + * { margin-top: 14px; }
.rt-table table { width: 100%; border-collapse: collapse; font-size: 0.95em; line-height: 1.45; }
.rt-table th, .rt-table td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: var(--border-w) solid var(--border); color: var(--fg); }
.rt-table th { color: var(--fg-heading); font-weight: 600; border-bottom: calc(var(--border-w) * 2) solid color-mix(in srgb, var(--fg-heading) 35%, var(--border)); }
.rt-table tbody tr:last-child > * { border-bottom: 0; }
.rt-table a { color: var(--emph); text-decoration: underline; text-underline-offset: 3px; }
.rt-table code { font-family: var(--font-mono); font-size: 0.88em; padding: 1px 6px; border-radius: 4px; }

/* Links written in text ([words](href) in any field that takes inline markup). */
.text-link { position: relative; z-index: 2; color: var(--emph); text-decoration: underline; text-decoration-thickness: from-font; text-underline-offset: 3px; }
.text-link:hover { text-decoration-thickness: 2px; }

/* A card that links to a page: its title is the link, stretched over the card, so links in its text stay their own. */
.has-link { position: relative; }
.card-link { color: inherit; text-decoration: none; }
/* Above the card's positioned parts (pictures), below links written in its text. */
.card-link::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.has-link:hover .card-link, .card-link:focus-visible { text-decoration: underline; text-decoration-color: var(--emph); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.card-link:focus-visible { outline: none; }
.card-link:focus-visible::after { outline: 2px solid var(--emph); outline-offset: -2px; }

@media (max-width: 760px) {
  :root {
    --space-section: calc(var(--space-section-base) * 2 / 3);
    --space-section-md: calc(var(--space-section-base) * 5 / 12);
    --space-section-sm: calc(var(--space-section-base) / 4);
  }
}
}

@layer sb-blocks {
/* ---- hero ---- */
.hero { position: relative; padding: 80px 0 56px; overflow: hidden; }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
.hero-grid--single { grid-template-columns: 1fr; }
.hero-grid--single .hero-copy { max-width: 720px; }
.hero-copy h1 { font-size: calc(clamp(2.2rem, 4.6vw, 3.5rem) * var(--heading-scale)); line-height: 1.07; margin-bottom: 22px; }
.hero-lede { font-size: 1.12rem; color: var(--fg-muted); max-width: 52ch; }
.hero-lede + .hero-lede { margin-top: 12px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.hero-image img { border-radius: var(--radius-lg); }
.hero-steps { border-radius: var(--radius-lg); padding: 26px 26px 22px; box-shadow: var(--shadow-md); }
.hero-steps-label { font-size: 0.76rem; letter-spacing: 0.06em; margin-bottom: 20px; }
.hero-steps-list { list-style: none; margin: 0; padding: 0; }
.hero-steps-item { position: relative; padding: 0 0 26px 30px; }
.hero-steps-item:last-child { padding-bottom: 0; }
.hero-steps-item::before { content: ""; position: absolute; left: 5px; top: 16px; bottom: -2px; width: 1.5px; background: var(--border); }
.hero-steps-item:last-child::before { display: none; }
.hero-steps-dot { position: absolute; left: 0; top: 6px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--emph); background: var(--bg-card); }
.hero-steps-item--end .hero-steps-dot { background: var(--success); border-color: var(--success); box-shadow: 0 0 0 4px color-mix(in srgb, var(--success) 16%, transparent); }
.hero-steps-title { display: block; font-family: var(--font-display); font-weight: 600; font-size: 0.98rem; color: var(--fg-heading); }
.hero-steps-sub { display: block; font-family: var(--font-mono); font-size: 0.76rem; color: var(--fg-muted); margin-top: 3px; }
.hero-steps-foot { margin-top: 22px; padding-top: 18px; border-top: var(--border-w) solid var(--border); font-size: 0.86rem; color: var(--fg-muted); }
.hero-steps-foot strong { color: var(--fg-heading); }
.hero--centered .hero-grid { justify-items: center; text-align: center; }
.hero--centered .hero-copy { max-width: 800px; }
.hero--centered .hero-lede { margin-left: auto; margin-right: auto; }
.hero--centered .hero-actions { justify-content: center; }
.hero--centered .hero-steps { width: 100%; max-width: 560px; text-align: left; }
.hero--centered .hero-image, .hero--stacked .hero-image { width: 100%; }
.hero--stacked .hero-copy { max-width: 780px; }
.hero--stacked .hero-steps-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 18px 24px; }
.hero--stacked .hero-steps-item { padding: 0 0 0 26px; }
.hero--stacked .hero-steps-item::before { display: none; }
/* An image background: a tall section, and a wash that is heavy behind left-aligned text and light on the right. */
.hero.has-bd-image { display: flex; align-items: center; min-height: min(86vh, 720px); padding: 120px 0 96px; }
.hero.has-bd-image > .wrap { width: 100%; }
.hero.has-bd-image:not(.hero--centered) { --bd-wash-lead: 22%; --bd-wash-trail: 54%; }
@media (max-width: 1080px) { .hero-grid { grid-template-columns: 1fr; gap: 40px; } .hero-steps { max-width: 520px; } }
@media (max-width: 760px) { .hero.has-bd-image:not(.hero--centered) { --bd-wash-angle: 180deg; --bd-wash-lead: 0%; --bd-wash-trail: -22%; } .hero.has-bd-image { min-height: 0; padding: 88px 0 64px; } }
@media (max-width: 760px) { .hero { padding: 52px 0 44px; } }

/* ---- post-heading ---- */
.posthead { position: relative; padding: 72px 0 36px; overflow: hidden; }
.posthead-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr); gap: 44px; align-items: center; }
.posthead--side .posthead-grid.has-cover { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); }
.posthead-copy { max-width: 780px; min-width: 0; }
.posthead-copy h1 { font-size: calc(clamp(2rem, 4.2vw, 3.2rem) * var(--heading-scale)); line-height: 1.1; margin: 0 0 18px; overflow-wrap: break-word; }
.posthead-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 0; }
.posthead-tags { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.posthead-tags .chip { padding: 4px 12px; font-size: 0.8rem; }
.posthead-note { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 18px; font-size: 0.85rem; color: var(--fg-muted); }
.posthead-cover { min-width: 0; }
.posthead-cover img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-lg); }
.posthead--above .posthead-cover img { aspect-ratio: 21 / 9; }
.posthead--above .posthead-grid { gap: 40px; }
.posthead.has-bd-image { display: flex; align-items: flex-end; min-height: min(72vh, 560px); padding: 120px 0 56px; }
.posthead.has-bd-image > .wrap { width: 100%; }
@media (max-width: 900px) { .posthead--side .posthead-grid.has-cover { grid-template-columns: minmax(0, 1fr); gap: 32px; } }
@media (max-width: 760px) { .posthead { padding: 48px 0 28px; } .posthead--above .posthead-cover img { aspect-ratio: 16 / 10; } .posthead.has-bd-image { min-height: 0; padding: 96px 0 40px; } }

/* ---- steps ---- */
.steps-list { position: relative; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(var(--rows, 3), auto); grid-auto-flow: column; gap: 0 56px; margin: 8px 0 0; padding: 0; list-style: none; }
.steps-list--single { grid-template-columns: 1fr; grid-template-rows: none; grid-auto-flow: row; max-width: 720px; }
.steps-item { position: relative; padding: 0 0 34px 58px; }
.steps-item::before { content: ""; position: absolute; left: calc(var(--steps-num-size, 36px) / 2 - 1px); top: calc(var(--steps-num-size, 36px) - 2px); bottom: 0; width: 1.5px; background: var(--border); }
.steps-item--last::before, .steps-list--single .steps-item:last-child::before { display: none; }
.steps-list--single .steps-item--last:not(:last-child)::before { display: block; }
.steps-num { position: absolute; left: 0; top: 0; width: var(--steps-num-size, 36px); height: var(--steps-num-size, 36px); display: grid; place-items: center; border-radius: 50%; border: 1.5px solid var(--emph); background: var(--bg-card); color: var(--emph); font-family: var(--font-mono); font-size: 0.86rem; font-weight: 600; }
.steps-title { font-size: 1.05rem; margin-bottom: 8px; }
.steps-desc { font-size: 0.93rem; color: var(--fg-muted); margin-bottom: 12px; }
.steps-path { display: none; }
.steps-code { display: block; font-family: var(--font-mono); font-size: 0.74rem; line-height: 1.6; color: var(--fg-muted); background: var(--bg-soft); border-left: 2px solid var(--accent); padding: 8px 12px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; overflow-wrap: anywhere; }
.steps-list--cards { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); grid-template-rows: none; grid-auto-flow: row; gap: 20px; }
.steps-list--cards .steps-item { padding: 24px 22px; }
.steps-list--cards .steps-item::before { display: none; }
.steps-list--cards .steps-num { position: static; margin-bottom: 18px; }
@media (max-width: 980px) {
  .steps-list:not(.steps-list--cards) { grid-template-columns: 1fr; grid-template-rows: none; grid-auto-flow: row; gap: 0; }
  .steps-item--last:not(:last-child)::before { display: block; }
}

/* ---- compare-lists ---- */
.compare-grid { display: grid; grid-template-columns: repeat(var(--cols, 2), 1fr); gap: 24px; }
.compare-col { padding: 28px 26px; }
.compare-col--muted { background: var(--bg-inset); }
.compare-head { color: var(--emph); margin-bottom: 18px; }
.compare-col--muted .compare-head { color: var(--fg-muted); }
.compare-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.compare-list li { position: relative; padding-left: 22px; font-size: 0.93rem; color: var(--fg-muted); }
.compare-list li::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 8px; height: 8px; border-radius: 2px; background: var(--emph); }
.compare-col--muted .compare-list li::before { background: var(--fg-muted); opacity: 0.45; }
.compare-note { margin-top: 40px; text-align: center; font-size: 1.02rem; color: var(--fg); max-width: 62ch; margin-left: auto; margin-right: auto; }
.compare-plain { display: grid; grid-template-columns: repeat(var(--cols, 2), 1fr); gap: 48px; }
.compare-plain-heading { font-size: 1.05rem; margin-bottom: 18px; }
.compare-plain-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 14px; }
.compare-plain-list li { position: relative; padding-left: 20px; font-size: 0.95rem; color: var(--fg-muted); }
.compare-plain-list li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 6px; height: 6px; border-radius: 50%; background: var(--emph); }
.compare-plain-list strong { color: var(--fg-heading); }
@media (max-width: 980px) { .compare-grid, .compare-plain { grid-template-columns: 1fr; } }

/* ---- benefits ---- */
.benefits-grid { display: grid; grid-template-columns: repeat(var(--cols, 3), 1fr); gap: 24px; }
.benefits-item { border-top: 2px solid var(--emph); padding-top: 20px; }
.benefits-item h3 { font-size: 1.02rem; margin-bottom: 10px; }
.benefits-item p { font-size: 0.92rem; color: var(--fg-muted); }
.benefits-note { margin-top: 40px; font-size: 0.85rem; color: var(--fg-muted); text-align: center; max-width: 68ch; margin-left: auto; margin-right: auto; }
@media (max-width: 980px) { .benefits-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) { .benefits-grid { grid-template-columns: 1fr; } }

/* ---- feature-cards ---- */
.features-grid { display: grid; grid-template-columns: repeat(var(--cols, 4), 1fr); gap: 24px; }
.features-card { padding: 28px 24px; }
.features-icon { margin-bottom: 18px; }
.features-card h3 { font-size: 1.05rem; margin-bottom: 10px; }
.features-card p { font-size: 0.92rem; color: var(--fg-muted); }
.features-flag { margin-top: 16px; padding: 4px 11px; }
.features-chips { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.features-chip { font-family: var(--label-font); font-size: 0.8rem; color: var(--emph); padding: 6px 14px; }
.features-grid--plain .features-card { padding: 0; }
.features-grid--list { grid-template-columns: repeat(2, 1fr); gap: 0 48px; }
.features-grid--list .features-card { display: grid; grid-template-columns: 44px 1fr; align-content: start; column-gap: 16px; padding: 24px 0; border-top: var(--border-w) solid var(--border); }
.features-grid--list .features-card > :not(.features-icon) { grid-column: 2; }
.features-grid--list .features-icon { grid-row: 1 / span 3; margin: 2px 0 0; width: 28px; height: 28px; }
.features-grid--list .features-flag { justify-self: start; }
@media (max-width: 980px) { .features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) { .features-grid, .features-grid--list { grid-template-columns: 1fr; } }

/* ---- bento-grid ---- */
.bento-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: minmax(200px, auto); grid-auto-flow: dense; gap: 18px; }
.bento-tile { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 26px 24px; border-radius: var(--radius-lg); overflow: hidden; color: var(--fg); }
.bento-tile--wide { grid-column: span 2; }
.bento-tile--tall { grid-row: span 2; }
.bento-tile--large { grid-column: span 2; grid-row: span 2; }
.bento-tile--tint { background: color-mix(in srgb, var(--emph) 9%, var(--bg-card)); border: var(--border-w) solid color-mix(in srgb, var(--emph) 18%, var(--border)); }
.bento-tile.surface { border: var(--border-w) solid var(--border); }
.bento-tile.has-link { transition: transform 0.2s ease, box-shadow 0.2s ease; }
.bento-tile.has-link:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.bento-icon { margin-bottom: 6px; }
.bento-figure { font-family: var(--font-display); font-weight: var(--heading-weight); font-size: calc(clamp(2.2rem, 4vw, 3.2rem) * var(--heading-scale)); line-height: 1; letter-spacing: -0.03em; color: var(--emph); }
.bento-title { font-size: 1.12rem; }
.bento-tile--large .bento-title { font-size: calc(1.5rem * var(--heading-scale)); }
.bento-text { font-size: 0.93rem; color: var(--fg-muted); max-width: 52ch; }
/* Pictures never size their row: each is absolutely placed in its room and cropped to it, so the row is as tall as its tiles' text. */
.bento-media { position: relative; margin: 14px -24px -26px; flex: 1 1 0; min-height: 120px; }
.bento-media img, .bento-media .img-placeholder { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 0; border: 0; }
/* Beside the text (wide and large tiles): the picture is the right half, edge to edge. */
.bento-tile--side .bento-body { display: flex; flex-direction: column; gap: 10px; width: calc(50% - 24px); }
.bento-tile--side .bento-media { position: absolute; top: 0; right: 0; bottom: 0; width: 50%; margin: 0; min-height: 0; }
/* Fills the tile: the picture behind, the text at the bottom on a dark shade that reaches the tile's edges. */
.bento-tile--fill { justify-content: flex-end; isolation: isolate; background: var(--dark-card); }
.bento-tile--fill .bento-media { position: absolute; z-index: -2; inset: 0; margin: 0; padding: 0; min-height: 0; }
.bento-caption { position: relative; display: flex; flex-direction: column; gap: 10px; color: var(--fg); }
.bento-caption::before { content: ""; position: absolute; z-index: -1; inset: -96px -200px -200px; background: linear-gradient(to top, color-mix(in srgb, var(--dark) 86%, transparent) calc(100% - 96px), color-mix(in srgb, var(--dark) 62%, transparent) calc(100% - 64px), color-mix(in srgb, var(--dark) 26%, transparent) calc(100% - 30px), transparent); }
.bento-caption {
  --bg: var(--dark);
  --bg-card: var(--dark-card);
  --bg-soft: var(--dark-card);
  --bg-inset: var(--dark);
  --fg: var(--dark-ink);
  --fg-muted: var(--dark-muted);
  --fg-heading: var(--dark-ink);
  --border: var(--dark-line);
  --emph: var(--accent);
  --on-emph: var(--dark);
  --positive: color-mix(in oklab, var(--success) 72%, var(--dark-ink));
  --caution: color-mix(in oklab, var(--warning) 72%, var(--dark-ink));
  --negative: color-mix(in oklab, var(--danger) 72%, var(--dark-ink));
}
/* Emphasis at least fairly light on dark. Signals lift lightness but keep
   chroma, so greens stay green rather than turning grey; their tints sit at a
   fixed low lightness so they stay saturated. */
@supports (color: oklch(from red l c h)) {
  .bento-caption {
    --emph: oklch(from var(--accent) max(l, 0.7) c h);
    --positive: oklch(from var(--success) max(l, 0.74) c h);
    --caution: oklch(from var(--warning) max(l, 0.82) c h);
    --negative: oklch(from var(--danger) max(l, 0.72) c h);
  }
  /* An accent pill takes the lifted accent: a dark accent (navy) cannot be read on a dark panel. */
  .bento-caption .badge[data-tone="accent"] { --sig: var(--emph); }
  .bento-caption [data-tone] {
    --sig-bg: oklch(from var(--sig) 0.24 calc(c * 0.5) h);
    --sig-line: oklch(from var(--sig) 0.48 calc(c * 0.8) h);
  }
}

/* A linked full-picture tile: the caption is positioned (for its shade), so the stretched link reaches past it to the whole tile, which clips it. */
.bento-tile--fill .card-link::after { inset: -200vmax; }
@media (prefers-reduced-motion: reduce) { .bento-tile.has-link:hover { transform: none; } }
@media (max-width: 980px) { .bento-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .bento-grid { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .bento-tile--wide, .bento-tile--large { grid-column: auto; }
  .bento-tile--tall, .bento-tile--large { grid-row: auto; }
  /* One picture shape on phones; a side picture shows at the bottom; a full picture tile is at least that shape and grows with its text. */
  .bento-media { flex: none; min-height: 0; aspect-ratio: 16 / 10; }
  .bento-tile--side .bento-body { width: auto; }
  .bento-tile--side .bento-media { position: relative; top: auto; right: auto; bottom: auto; width: auto; margin: 14px -24px -26px; }
  /* A full picture tile grows with its caption (a fixed shape would clip it) and keeps a band of picture above it, half the width tall, so it is never shorter than 16:10. */
  .bento-tile--fill .bento-caption { margin-top: 50%; }
  .bento-tile--fill .bento-media { aspect-ratio: auto; }
}

/* ---- feature-tabs ---- */
.tabs-list { display: flex; flex-wrap: wrap; gap: 6px; padding: 5px; border-radius: 999px; background: var(--bg-soft); border: var(--border-w) solid var(--border); width: fit-content; max-width: 100%; margin-bottom: 28px; }
.tabs-list[hidden] { display: none; }
.tabs-tab { display: inline-flex; align-items: center; gap: 8px; font: inherit; font-size: 0.92rem; font-weight: 600; padding: 9px 18px; border-radius: 999px; border: 0; background: transparent; color: var(--fg-muted); cursor: pointer; transition: background 0.15s ease, color 0.15s ease; }
.tabs-tab:hover { color: var(--fg); }
.tabs-tab[aria-selected="true"] { background: var(--bg-card); color: var(--fg-heading); box-shadow: var(--shadow-sm); }
.tabs-tab-icon { display: inline-flex; color: var(--emph); }
.tabs-panels { display: grid; gap: 40px; }
.tabs-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 40px; align-items: center; }
.tabs-panel[hidden] { display: none; }
.tabs-panel:not(:has(.tabs-media)) { grid-template-columns: minmax(0, 1fr); max-width: 760px; }
.tabs-title { font-size: calc(1.5rem * var(--heading-scale)); margin-bottom: 12px; }
.tabs-text { color: var(--fg-muted); }
.tabs-text + .tabs-text { margin-top: 10px; }
.tabs-bullets { margin: 18px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.tabs-bullets li { position: relative; padding-left: 26px; color: var(--fg); font-size: 0.95rem; }
.tabs-bullets li::before { content: ""; position: absolute; left: 0; top: 0.35em; width: 14px; height: 14px; border-radius: 50%; background: color-mix(in srgb, var(--emph) 18%, transparent); box-shadow: inset 0 0 0 4px var(--bg), inset 0 0 0 7px var(--emph); }
.tabs-btn { margin-top: 24px; }
.tabs-media img, .tabs-media .img-placeholder { border-radius: var(--radius-lg); width: 100%; }
.is-enhanced .tabs-panels { display: block; }
@media (min-width: 980px) {
  .tabs--side.is-enhanced { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 40px; align-items: start; }
  .tabs--side .tabs-list { flex-direction: column; border-radius: var(--radius-md); width: auto; margin: 0; }
  .tabs--side .tabs-tab { border-radius: var(--radius-sm); justify-content: flex-start; }
}
@media (max-width: 980px) { .tabs-panel { grid-template-columns: 1fr; } .tabs-list { border-radius: var(--radius-md); } }
@media (prefers-reduced-motion: no-preference) { .is-enhanced .tabs-panel:not([hidden]) { animation: tabs-in 0.3s ease; } }
@keyframes tabs-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---- gallery ---- */
.gallery { list-style: none; margin: 0; padding: 0; }
.gallery-figure { margin: 0; }
.gallery-link { display: block; border-radius: var(--radius-md); overflow: hidden; }
.gallery img, .gallery .img-placeholder { width: 100%; border-radius: var(--radius-md); }
.gallery-open { cursor: zoom-in; }
.gallery-open img { transition: transform 0.35s ease; }
.gallery-open:hover img { transform: scale(1.03); }
.gallery-caption { margin-top: 8px; font-size: 0.85rem; color: var(--fg-muted); }
.gallery--grid { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 16px; }
.gallery--grid img { aspect-ratio: 4 / 3; object-fit: cover; }
.gallery--masonry { columns: var(--cols, 3); column-gap: 16px; }
.gallery--masonry .gallery-item { break-inside: avoid; margin-bottom: 16px; }
.gallery--strip { position: relative; display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; }
.gallery--strip .gallery-item { flex: 0 0 min(420px, 80vw); scroll-snap-align: start; }
.gallery--strip img { aspect-ratio: 4 / 3; object-fit: cover; }
.gallery-dialog { max-width: min(1200px, 94vw); max-height: 92vh; padding: 0; border: 0; border-radius: var(--radius-md); background: var(--dark); color: var(--dark-ink); overflow: hidden; }
.gallery-dialog::backdrop { background: color-mix(in srgb, var(--dark) 82%, transparent); }
.gallery-dialog img { display: block; max-width: 100%; max-height: calc(92vh - 56px); margin: 0 auto; object-fit: contain; }
.gallery-dialog-bar { display: flex; align-items: center; gap: 16px; padding: 12px 16px; font-size: 0.9rem; }
.gallery-dialog-bar p { flex: 1; }
.gallery-dialog-close { font: inherit; font-weight: 600; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--dark-line); background: transparent; color: var(--dark-ink); cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .gallery-open:hover img { transform: none; } }
@media (max-width: 760px) { .gallery--grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .gallery--masonry { columns: 2; } }

/* ---- rich-text ---- */
.richtext { font-size: 1.02rem; color: var(--fg-muted); }
.richtext h2, .richtext h3 { color: var(--fg-heading); }

/* ---- post-list ---- */
.postlist-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, max(280px, calc((100% - 48px) / 3))), 1fr)); gap: 24px; }
.postlist-item { position: relative; display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.postlist-cover { position: relative; overflow: hidden; }
.postlist-cover img, .postlist-cover .img-placeholder { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.postlist-body { display: flex; flex-direction: column; gap: 10px; padding: 22px 24px 24px; min-width: 0; flex: 1; }
.postlist-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0; font-size: 0.72rem; }
.postlist-title { font-size: 1.18rem; line-height: 1.25; margin: 0; overflow-wrap: break-word; }
.postlist-summary { margin: 0; color: var(--fg-muted); font-size: 0.95rem; }
.postlist-tags { list-style: none; margin: auto 0 0; padding: 6px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.postlist-tag { position: relative; z-index: 2; padding: 3px 10px; font-size: 0.76rem; }
.postlist-rows { display: grid; gap: 0; border-top: var(--border-w) solid var(--border); }
.postlist--list .postlist-item { flex-direction: row-reverse; align-items: flex-start; gap: 28px; padding: 26px 0; border-bottom: var(--border-w) solid var(--border); overflow: visible; }
.postlist--list .postlist-body { padding: 0; }
.postlist--list .postlist-cover { flex: 0 0 200px; border-radius: var(--radius-md); }
.postlist--list .postlist-title { font-size: 1.32rem; }
.postlist-featured { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.postlist-featured.is-single { grid-template-columns: minmax(0, 1fr); }
.postlist-featured > .postlist-grid { grid-template-columns: minmax(0, 1fr); }
.postlist-featured > .postlist-grid .postlist-cover { display: none; }
.postlist-item--lead .postlist-title { font-size: calc(clamp(1.4rem, 2.4vw, 1.9rem) * var(--heading-scale)); }
.postlist-item--lead .postlist-body { padding: 26px 28px 28px; }
.postlist-empty { margin: 0; padding: 28px; text-align: center; color: var(--fg-muted); border: var(--border-w) dashed var(--border); border-radius: var(--radius-md); }
.postlist-pager { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; margin-top: 40px; }
.postlist-pager .postlist-next { justify-self: end; }
.postlist-pager .postlist-prev { justify-self: start; }
@media (max-width: 900px) { .postlist-featured { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .postlist--list .postlist-item { flex-direction: column; gap: 14px; }
  .postlist--list .postlist-cover { flex: none; width: 100%; }
  .postlist-pager { grid-template-columns: 1fr 1fr; }
  .postlist-page { grid-column: 1 / -1; grid-row: 1; text-align: center; }
}

/* ---- image ---- */
.figure { margin-top: 0; margin-bottom: 0; }
.figure--full { margin: 0; }
.figure--full { width: 100%; }
.figure--rounded img { border-radius: var(--radius-lg); }
.figure figcaption { margin-top: 12px; font-size: 0.85rem; color: var(--fg-muted); text-align: center; font-family: var(--label-font); }

/* ---- cta-banner ---- */
.banner { max-width: 760px; }
.banner h2 { font-size: calc(clamp(1.6rem, 3vw, 2.1rem) * var(--heading-scale)); line-height: 1.16; margin-bottom: 16px; }
.banner-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.banner--centered, .banner--panel { text-align: center; margin: 0 auto; }
.banner--centered .section-lede, .banner--panel .section-lede { margin-left: auto; margin-right: auto; }
.banner--centered .banner-actions, .banner--panel .banner-actions { justify-content: center; }
.banner--split { max-width: none; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 24px 48px; }
.banner--split .banner-copy { max-width: 680px; }
.banner--split .banner-actions { margin-top: 0; justify-content: flex-end; }
.banner--panel { max-width: none; border-radius: var(--radius-lg); padding: clamp(40px, 6vw, 72px) clamp(24px, 5vw, 64px); }
@media (max-width: 760px) { .banner--split { grid-template-columns: 1fr; } .banner--split .banner-actions { justify-content: flex-start; } }

/* ---- header ---- */
.site-header { z-index: 50; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(10px); border-bottom: var(--border-w) solid var(--border); color: var(--fg); }
.site-header.is-sticky { position: sticky; top: 0; }
.header-row { display: flex; align-items: center; gap: 28px; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.brand-glyph { height: 28px; width: auto; }
.brand-glyph.img-placeholder { min-height: 28px; width: 46px; font-size: 0.6rem; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em; color: var(--fg-heading); }
.site-nav { display: flex; align-items: center; gap: 24px; font-size: 0.93rem; font-weight: 500; }
.site-nav a { color: var(--fg-muted); transition: color 0.15s ease; }
.site-nav a:hover { color: var(--fg); }
.site-nav a[aria-current], .site-nav-item.is-current > .site-nav-link { color: var(--fg); }
.site-nav-item { position: relative; display: flex; align-items: center; gap: 2px; }
.site-nav-item > .site-nav-link { color: var(--fg-muted); }
.site-nav-item > span.site-nav-link { cursor: default; }
.site-nav-arrow {
  display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 32px; flex-shrink: 0;
  padding: 0; margin: 0; background: none; border: 0; appearance: none; -webkit-appearance: none; color: var(--fg-muted); cursor: pointer; border-radius: var(--radius-sm);
}
.site-nav-arrow::before { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform 0.15s ease; }
.site-nav-item:hover > .site-nav-arrow, .site-nav-item.is-open > .site-nav-arrow { color: var(--fg); }
.site-nav-item.is-open > .site-nav-arrow::before { transform: translateY(2px) rotate(225deg); }
.site-nav-menu {
  position: absolute; top: calc(100% + 8px); left: -12px; z-index: 60; min-width: 220px; max-width: min(320px, calc(100vw - 2 * var(--gutter)));
  list-style: none; margin: 0; padding: 6px; background: var(--bg-card); color: var(--fg); border: var(--border-w) solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-md);
  font-size: 0.92rem; font-weight: 500; letter-spacing: normal; text-transform: none; white-space: normal;
  visibility: hidden; opacity: 0; transform: translateY(4px); transition: opacity 0.15s ease, transform 0.15s ease, visibility 0s linear 0.2s;
}
.site-nav-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }
.site-nav-menu > li { position: relative; display: block; }
.site-nav-menu a, .site-nav-menu .site-nav-link { display: block; flex: 1; min-width: 0; padding: 8px 10px; border-radius: var(--radius-sm); color: var(--fg); overflow-wrap: anywhere; }
.site-nav-menu a:hover { background: var(--bg-soft); color: var(--fg); }
.site-nav-menu a[aria-current] { color: var(--emph); }
.site-nav-menu > .site-nav-item { display: flex; align-items: center; }
.site-nav-menu > .site-nav-item > .site-nav-arrow { height: 36px; width: 28px; }
.site-nav-menu > .site-nav-item > .site-nav-arrow::before { transform: rotate(-45deg); }
.site-nav-menu > .site-nav-item.is-open > .site-nav-arrow::before { transform: rotate(-45deg) translate(1px, 1px); }
.site-nav-submenu { top: -7px; left: 100%; margin-left: 6px; }
.site-nav-submenu::before { left: -10px; right: auto; top: 0; bottom: 0; width: 10px; height: auto; }
.site-nav-item.is-flip > .site-nav-menu { left: auto; right: -12px; }
.site-nav-item.is-flip .site-nav-submenu { left: auto; right: 100%; margin: 0 6px 0 0; }
.site-nav-item.is-flip .site-nav-submenu::before { left: auto; right: -10px; }
.site-header:not(.is-enhanced) .site-nav > .site-nav-item:nth-last-child(-n + 2) > .site-nav-menu { left: auto; right: -12px; }
.site-header:not(.is-enhanced) .site-nav > .site-nav-item:nth-last-child(-n + 2) .site-nav-submenu { left: auto; right: 100%; margin: 0 6px 0 0; }
.site-nav-menu > .site-nav-item.is-flip > .site-nav-arrow::before, .site-nav-item.is-flip .site-nav-menu > .site-nav-item > .site-nav-arrow::before,
.site-header:not(.is-enhanced) .site-nav > .site-nav-item:nth-last-child(-n + 2) .site-nav-menu > .site-nav-item > .site-nav-arrow::before { transform: rotate(135deg); }
.site-header:not(.is-enhanced) .site-nav-item:focus-within > .site-nav-menu, .site-nav-item.is-open > .site-nav-menu { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
@media (hover: hover) {
  .site-nav-item:hover > .site-nav-menu { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
}
@media (prefers-reduced-motion: reduce) {
  .site-nav-menu, .site-nav-arrow::before { transition: none; }
}
.header-actions { display: flex; align-items: center; gap: 20px; }
.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 40px; height: 40px; flex-shrink: 0; background: none; border: none; padding: 0; appearance: none; -webkit-appearance: none;
}
.nav-toggle span { display: block; height: 2px; width: 100%; background: var(--fg); border-radius: 2px; }
.mobile-nav { display: none; flex-direction: column; padding: 12px var(--gutter) 24px; border-top: var(--border-w) solid var(--border); gap: 4px; }
.mobile-nav a { padding: 12px 4px; font-weight: 500; border-bottom: var(--border-w) solid var(--border); }
.mobile-nav .btn { margin-top: 14px; text-align: center; }
/* Weight and a line, not a colour: the phone menu sits on the header, which some styles darken. */
.mobile-nav a[aria-current] { font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.mobile-nav-group.is-current > .mobile-nav-row > a, .mobile-nav-group.is-current > .mobile-nav-row > span { color: var(--fg-heading); font-weight: 600; }
.mobile-nav-group { display: flex; flex-direction: column; }
.mobile-nav-row { display: flex; align-items: stretch; border-bottom: var(--border-w) solid var(--border); }
.mobile-nav-row > a, .mobile-nav-row > span { flex: 1; min-width: 0; border-bottom: 0; }
.mobile-nav-row > span { padding: 12px 4px; font-weight: 500; }
.mobile-nav-arrow {
  display: flex; align-items: center; justify-content: center; width: 44px; flex-shrink: 0;
  padding: 0; margin: 0; background: none; border: 0; appearance: none; -webkit-appearance: none; color: inherit; cursor: pointer;
}
.mobile-nav-arrow::before { content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.mobile-nav-group.is-open > .mobile-nav-row > .mobile-nav-arrow::before { transform: translateY(2px) rotate(225deg); }
.mobile-nav-menu { display: flex; flex-direction: column; padding-left: 16px; }
.site-header.is-enhanced .mobile-nav-group:not(.is-open) > .mobile-nav-menu { display: none; }
.site-header.is-open .mobile-nav { display: flex; }
.header-lang { position: relative; font-size: 0.85rem; font-weight: 600; }
.header-lang summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; padding: 6px 10px; border: var(--border-w) solid var(--border); border-radius: var(--radius-button); color: var(--fg-muted); }
.header-lang summary::-webkit-details-marker { display: none; }
.header-lang summary::after { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.header-lang summary:hover, .header-lang[open] summary { color: var(--fg); }
.header-lang-list { position: absolute; right: 0; top: calc(100% + 8px); min-width: 160px; list-style: none; margin: 0; padding: 6px; background: var(--bg-card); border: var(--border-w) solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-md); z-index: 60; }
.header-lang-list a { display: flex; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm); color: var(--fg); font-weight: 500; }
.header-lang-list a:hover { background: var(--bg-soft); }
.header-lang-list a[aria-current] { color: var(--emph); }
.header-lang-list .header-lang-code { color: var(--fg-muted); min-width: 2ch; }
.header-lang-links { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; font-size: 0.82rem; font-weight: 600; }
.header-lang-links a { padding: 4px 6px; color: var(--fg-muted); border-radius: var(--radius-sm); }
.header-lang-links a:hover { color: var(--fg); }
.header-lang-links a[aria-current] { color: var(--fg-heading); }
.header-lang-links .header-lang-name, .header-mobile-lang .header-lang-code { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.header-mobile-lang { display: flex; flex-wrap: wrap; gap: 8px 16px; list-style: none; margin: 14px 0 0; padding: 0; font-size: 0.9rem; }
.site-header .header-mobile-lang a { border: 0; padding: 4px 0; color: var(--fg-muted); }
.site-header .header-mobile-lang a[aria-current] { color: var(--fg-heading); }
@media (max-width: 900px) {
  .site-header .site-nav, .site-header .header-actions, .site-header .header-lang, .site-header .header-lang-links { display: none; }
  .nav-toggle { display: flex; }
}

/* ---- footer ---- */
.site-footer { background: var(--bg); color: var(--fg-muted); padding: 72px 0 0; }
.site-footer.tone-light, .site-footer.tone-dim { border-top: var(--border-w) solid var(--border); }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(var(--footer-cols, 3), 1fr); gap: 32px; padding-bottom: 56px; border-bottom: var(--border-w) solid var(--border); }
.footer-brand .brand-name { color: var(--fg-heading); }
.footer-brand .brand-glyph { height: 24px; }
.footer-tagline { font-family: var(--label-font); font-size: 0.8rem; margin-top: 10px; color: var(--fg-muted); max-width: 26ch; }
.footer-col { display: flex; flex-direction: column; gap: 12px; }
.footer-heading { font-family: var(--label-font); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--fg-heading); margin-bottom: 4px; }
.footer-col a { font-size: 0.92rem; transition: color 0.15s ease; }
.footer-col a:hover { color: var(--fg-heading); }
.footer-bottom { padding: 22px 0; font-size: 0.82rem; }
.footer-bottom:has(.footer-lang) { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.footer-lang { display: flex; gap: 16px; list-style: none; margin: 0; padding: 0; }
.footer-lang .footer-lang-code { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.footer-lang a:hover, .footer-lang a[aria-current] { color: var(--fg-heading); }
@media (max-width: 980px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; } }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 32px; } }

/* ---- contact-popup ---- */
.cpop { position: fixed; inset: 0; z-index: 200; display: none; align-items: center; justify-content: center; padding: 16px; overflow-y: auto; }
.cpop:target { display: flex; }
.cpop.is-enhanced { display: none; }
.cpop.is-enhanced.is-open { display: flex; }
.cpop-backdrop { position: fixed; inset: 0; background: color-mix(in srgb, var(--dark) 62%, transparent); cursor: default; }
.cpop-panel { position: relative; width: 100%; max-width: 480px; margin: auto; background: var(--bg-card); color: var(--fg); border: var(--border-w) solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-md); padding: 36px 32px 28px; text-align: left; }
.cpop-close { position: absolute; top: 10px; right: 10px; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 999px; font-size: 1.6rem; line-height: 1; color: var(--fg-muted); text-decoration: none; }
.cpop-close:hover { color: var(--fg-heading); background: var(--bg-soft); }
.cpop-close:focus-visible { outline: 2px solid var(--emph); outline-offset: 2px; }
.cpop-title { font-size: calc(clamp(1.4rem, 2.4vw, 1.75rem) * var(--heading-scale)); line-height: 1.18; color: var(--fg-heading); margin: 0 40px 10px 0; }
.cpop-text { color: var(--fg-muted); margin: 0 0 8px; }
.cpop-form { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }
.cpop-form[hidden], .cpop-done[hidden] { display: none; }
.cpop-field { display: flex; flex-direction: column; gap: 6px; font-size: 0.85rem; font-weight: 500; color: var(--fg-muted); }
.cpop-field input, .cpop-field textarea { font: inherit; font-size: 1rem; color: var(--fg-heading); background: var(--bg); border: var(--border-w) solid var(--border); border-radius: var(--radius-sm); padding: 11px 13px; width: 100%; box-sizing: border-box; }
.cpop-field textarea { resize: vertical; min-height: 110px; }
.cpop-field input:focus, .cpop-field textarea:focus { outline: 2px solid var(--emph); outline-offset: 1px; border-color: var(--emph); }
.cpop-field.is-invalid input, .cpop-field.is-invalid textarea, .cpop-field input:user-invalid, .cpop-field textarea:user-invalid { border-color: var(--negative); }
.cpop-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cpop-send { align-self: flex-start; }
.cpop-status { margin: 0; font-size: 0.9rem; color: var(--fg-muted); }
.cpop-status.is-error { color: var(--negative); }
.cpop-done { font-size: 1.05rem; color: var(--fg-heading); margin: 18px 0 0; }
.cpop-email { margin: 18px 0 0; padding-top: 16px; border-top: var(--border-w) solid var(--border); font-size: 0.92rem; color: var(--fg-muted); overflow-wrap: anywhere; }
.cpop-email a { color: var(--emph); font-weight: 600; }
html.has-cpop-open { overflow: hidden; }
@media (max-width: 600px) {
  .cpop { padding: 12px; align-items: flex-end; }
  .cpop-panel { padding: 30px 20px 22px; }
  .cpop-send { align-self: stretch; }
}

.has-backdrop { position: relative; isolation: isolate; overflow: hidden; }
.has-backdrop > :where(:not(.bd)) { position: relative; z-index: 1; }
.bd { --bd-c1: var(--primary); --bd-c2: var(--primary); --bd-speed: 1; --bd-level: 0.6; position: absolute; inset: 0; z-index: 0; pointer-events: none; color: var(--bd-c1); opacity: calc(var(--bd-base, 1) * var(--bd-level)); }
.bd > svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; overflow: visible; }
.bd-c-accent { --bd-c1: var(--accent); --bd-c2: var(--accent); }
.bd-c-ink { --bd-c1: var(--fg); --bd-c2: var(--fg-muted); }
.bd-c-duo { --bd-c1: var(--primary); --bd-c2: var(--accent); }
.tone-brand > .bd-c-primary, .tone-brand > .bd-c-duo { --bd-c1: var(--on-primary); }
.tone-brand > .bd-c-primary { --bd-c2: var(--on-primary); }
.bd-i-subtle { --bd-level: 0.35; }
.bd-i-strong { --bd-level: 0.9; }
.bd-m-lively { --bd-speed: 0.5; }
.bd-f-bottom { -webkit-mask-image: linear-gradient(to bottom, currentColor 40%, transparent); mask-image: linear-gradient(to bottom, currentColor 40%, transparent); }
.bd-f-edges { -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, currentColor 30%, transparent 100%); mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, currentColor 30%, transparent 100%); }
.bd-f-center { -webkit-mask-image: radial-gradient(ellipse 60% 60% at 50% 45%, transparent 20%, currentColor 80%); mask-image: radial-gradient(ellipse 60% 60% at 50% 45%, transparent 20%, currentColor 80%); }
.bd .bd-l1, .bd .bd-l2 { fill: none; stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.bd .bd-l1 { stroke: var(--bd-c1); }
.bd .bd-l2 { stroke: var(--bd-c2); }
.bd .bd-faint { opacity: 0.5; }
@keyframes bd-drift { from { transform: translate3d(-1.2%, 0.8%, 0) scale(1.02); } to { transform: translate3d(1.2%, -0.8%, 0) scale(1.05); } }
@media (prefers-reduced-motion: no-preference) {
  .bd:not(.bd-m-none) .bd-drift { animation: bd-drift calc(28s * var(--bd-speed)) ease-in-out infinite alternate; transform-box: view-box; transform-origin: 50% 50%; }
}

/* ---- backdrop: grid ---- */
.bd-grid { --bd-cell: 48px; background-image: linear-gradient(to right, color-mix(in srgb, var(--bd-c1) 32%, transparent) 1px, transparent 1px), linear-gradient(to bottom, color-mix(in srgb, var(--bd-c1) 32%, transparent) 1px, transparent 1px); background-size: var(--bd-cell) var(--bd-cell); background-position: center; }
.bd-grid.bd-d-low { --bd-cell: 80px; }
.bd-grid.bd-d-high { --bd-cell: 28px; }
@keyframes bd-pan { to { background-position: calc(50% + var(--bd-cell)) calc(50% + var(--bd-cell)); } }
@media (prefers-reduced-motion: no-preference) { .bd-grid:not(.bd-m-none) { animation: bd-pan calc(6s * var(--bd-speed)) linear infinite; } }

/* ---- backdrop: image ---- */
.bd-image { opacity: 1; --bd-wash: 72%; }
.bd-image.bd-i-subtle { --bd-wash: 86%; }
.bd-image.bd-i-strong { --bd-wash: 48%; }
.bd-image img { width: 100%; height: 100%; object-fit: cover; display: block; border: 0; border-radius: 0; max-width: none; }
/* Even by default; a block can slope it with --bd-wash-angle, --bd-wash-lead (added at the start) and --bd-wash-trail (taken off at the end). */
.bd-image::after { content: ""; position: absolute; inset: 0; background: linear-gradient(var(--bd-wash-angle, 90deg),
  color-mix(in srgb, var(--bg) clamp(0%, calc(var(--bd-wash) + var(--bd-wash-lead, 0%)), 96%), transparent) 0%,
  color-mix(in srgb, var(--bg) var(--bd-wash), transparent) 42%,
  color-mix(in srgb, var(--bg) clamp(0%, calc(var(--bd-wash) - var(--bd-wash-trail, 0%)), 96%), transparent) 100%); }

/* ---- backdrop: trace ---- */
.bd-trace { --bd-base: 0.9167; }
.bd-trace-path { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; opacity: 0.35; stroke-dasharray: 1000; stroke-dashoffset: 0; }
@keyframes bd-draw { from { stroke-dashoffset: 1000; } to { stroke-dashoffset: 0; } }
@keyframes bd-sway { from { transform: translateY(-3%); } to { transform: translateY(3%); } }
@media (prefers-reduced-motion: no-preference) {
  .bd-trace:not(.bd-m-none) .bd-trace-path { animation: bd-draw 2.6s ease-out both; }
  .bd-trace.bd-m-lively > svg { animation: bd-sway 7s ease-in-out 2.6s infinite alternate; }
}
}

@layer sb-frame {
.blk.sp-t-medium { padding-top: var(--space-section-md); }
.blk.sp-t-small { padding-top: var(--space-section-sm); }
.blk.sp-t-none { padding-top: var(--strip-pad, 0); }
.blk.sp-b-medium { padding-bottom: var(--space-section-md); }
.blk.sp-b-small { padding-bottom: var(--space-section-sm); }
.blk.sp-b-none { padding-bottom: var(--strip-pad, 0); }
/* A shaped top edge overlaps the section above by up to 48px: that section keeps enough bottom padding for it. */
.blk.sp-b-small:has(+ .blk.has-divider), .blk.sp-b-none:has(+ .blk.has-divider) { padding-bottom: 56px; }
}
