@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: #0b5fff;
  --primary-dark: #073999;
  --on-primary: #ffffff;
  --accent: #0eb9c7;
  --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 {
/* ---- 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; min-width: 0; }
.brand-glyph { height: 28px; width: auto; }
.brand-glyph.img-placeholder { min-height: 28px; width: 46px; font-size: 0.6rem; }
.site-header .brand-glyph { height: calc(var(--brand-logo-base, 28px) * var(--brand-logo-scale, 1)); width: auto; }
.site-header .brand-glyph.img-placeholder { min-height: calc(var(--brand-logo-base, 28px) * var(--brand-logo-scale, 1)); }
.site-header.has-logo-medium { --brand-logo-scale: 1.3; }
.site-header.has-logo-large { --brand-logo-scale: 1.7; }
.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; }
  .site-header .brand-glyph { max-height: 40px; max-width: min(60vw, 260px); object-fit: contain; object-position: left center; }
}

/* ---- 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; }
}
}

@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; }
}
