/* ==========================================================================
   MapleSolutions — Design tokens
   Brand values are fixed (see brand brief). Everything else derives from them.
   Breakpoints (custom properties cannot be used inside @media, so documented):
     --bp-sm 560px · --bp-md 768px · --bp-lg 1024px · --bp-xl 1280px
   ========================================================================== */
:root {
  /* Brand colours — DO NOT CHANGE */
  --off-white:  #FAF8F4;
  --light-grey: #E2DDD8;
  --maple-red:  #C0392B;
  --ink:        #1A1714;
  --mid-grey:   #6B6560;

  /* Semantic roles */
  --bg:            var(--off-white);
  --bg-panel:      color-mix(in srgb, var(--light-grey) 45%, var(--off-white));
  --bg-panel-strong: var(--light-grey);
  --bg-dark:       var(--ink);
  --surface:       #FFFFFF;                        /* UI-preview windows only */
  --text:          var(--ink);
  --text-muted:    var(--mid-grey);
  --border:        var(--light-grey);
  --border-strong: color-mix(in srgb, var(--ink) 22%, var(--off-white));
  --accent:        var(--maple-red);
  --accent-hover:  color-mix(in srgb, var(--maple-red) 86%, var(--ink));

  /* On-dark roles (mid grey fails contrast on ink, so derive lighter tones) */
  --on-dark:        var(--off-white);
  --on-dark-muted:  color-mix(in srgb, var(--off-white) 66%, var(--ink));
  --on-dark-border: color-mix(in srgb, var(--off-white) 16%, var(--ink));
  --on-dark-panel:  color-mix(in srgb, var(--off-white) 6%, var(--ink));

  /* Supporting product identities (small accents only) */
  --p-bookly: #C8734A;
  --p-speedr: #7C5CD6;
  --p-stackr: #3B82F6;
  --p-orderwise: #4C7A6A;
  --p-alto: #B58432;
  --p-boreal: #245238;
  /* Representative UI semantic colours (inside application previews only) */
  --ui-ok: #1F7A5C;
  --ui-warn: #B7791F;

  /* Typography */
  --font-display: 'DM Serif Display', Georgia, 'Times New Roman', serif;
  --font-body: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --fs-label:   0.75rem;
  --fs-small:   0.875rem;
  --fs-body:    1.0625rem;
  --fs-lede:    clamp(1.125rem, 1.02rem + 0.5vw, 1.375rem);
  --fs-h4:      1.25rem;
  --fs-h3:      clamp(1.5rem, 1.25rem + 1vw, 2.125rem);
  --fs-h2:      clamp(2.125rem, 1.3rem + 3vw, 3.75rem);
  --fs-h1:      clamp(2.5rem, 1.4rem + 4.6vw, 4.75rem);
  --fs-display: clamp(2.875rem, 1.1rem + 7vw, 6.75rem);

  --lh-tight: 1.02;
  --lh-head:  1.1;
  --lh-body:  1.6;
  --tracking-label: 0.14em;

  /* Spacing (4px base) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;
  --space-10: 8rem;
  --section-y: clamp(4rem, 3rem + 6vw, 8.5rem);

  /* Widths */
  --w-content: 1240px;
  --w-wide: 1360px;
  --w-narrow: 780px;
  --w-prose: 62ch;
  --gutter: clamp(1.25rem, 0.5rem + 3vw, 3rem);
  --header-h: 72px;

  /* Radii — restrained */
  --r-0: 0;
  --r-1: 2px;
  --r-2: 4px;
  --r-3: 8px;
  --r-pill: 999px;

  /* Borders & shadows */
  --bw: 1px;
  --line: var(--bw) solid var(--border);
  --line-dark: var(--bw) solid var(--on-dark-border);
  --shadow-1: 0 1px 2px rgb(26 23 20 / 0.06);
  --shadow-2: 0 10px 30px -12px rgb(26 23 20 / 0.22), 0 2px 6px rgb(26 23 20 / 0.05);
  --shadow-window: 0 36px 60px -28px rgb(26 23 20 / 0.38), 0 4px 10px rgb(26 23 20 / 0.06);

  /* Motion */
  --dur-fast: 120ms;
  --dur-med: 240ms;
  --dur-slow: 560ms;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* Base — reset, typography, primitives */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-body); font-size: var(--fs-body); line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4, p, ul, ol, dl, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }

h1, h2, h3, .display { font-family: var(--font-display); font-weight: 400; letter-spacing: -0.015em; line-height: var(--lh-head); text-wrap: balance; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-family: var(--font-body); font-size: var(--fs-h4); font-weight: 600; line-height: 1.3; }
.display { font-size: var(--fs-display); line-height: var(--lh-tight); letter-spacing: -0.025em; }
p { text-wrap: pretty; }
em.serif-i, .serif-i { font-family: var(--font-display); font-style: italic; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: var(--r-1); }
::selection { background: var(--maple-red); color: var(--off-white); }

.skip-link {
  position: absolute; left: var(--space-4); top: -100px; z-index: 200;
  background: var(--ink); color: var(--off-white); padding: var(--space-3) var(--space-4); border-radius: var(--r-2);
}
.skip-link:focus { top: var(--space-4); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; }

/* Layout primitives */
.container { width: 100%; max-width: calc(var(--w-content) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.container--narrow { max-width: calc(var(--w-narrow) + var(--gutter) * 2); }
.container--wide { max-width: calc(var(--w-wide) + var(--gutter) * 2); }
.section { padding-block: var(--section-y); position: relative; }
.section--tight { padding-block: calc(var(--section-y) * 0.6); }
.section--panel { background: var(--bg-panel); border-block: var(--line); }
.section--rule { border-top: var(--line); }
.section--dark { background: var(--bg-dark); color: var(--on-dark); }
.section--dark .muted, .section--dark .lede { color: var(--on-dark-muted); }
.muted { color: var(--text-muted); }

/* Labels */
.label {
  font-size: var(--fs-label); font-weight: 600; letter-spacing: var(--tracking-label);
  text-transform: uppercase; color: var(--text-muted);
}
.section--dark .label { color: var(--on-dark-muted); }
.label--accent { color: var(--accent); }
.section--dark .label--accent { color: color-mix(in srgb, var(--maple-red) 70%, var(--off-white)); }
.eyebrow { display: inline-flex; align-items: center; gap: var(--space-3); }
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; opacity: 0.6; }

.lede { font-size: var(--fs-lede); line-height: 1.5; color: var(--text-muted); max-width: var(--w-prose); }
.prose p + p { margin-top: var(--space-4); }
.prose { max-width: var(--w-prose); }

/* Buttons */
.btn {
  --btn-bg: transparent; --btn-fg: var(--text); --btn-bd: var(--border-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 48px; padding: 0.75rem 1.4rem; border-radius: var(--r-2);
  background: var(--btn-bg); color: var(--btn-fg); border: 1px solid var(--btn-bd);
  font-size: 0.9375rem; font-weight: 600; text-decoration: none; line-height: 1.2; white-space: nowrap;
  transition: background var(--dur-med) var(--ease), color var(--dur-med) var(--ease), border-color var(--dur-med) var(--ease), transform var(--dur-med) var(--ease);
}
.btn:hover { --btn-bd: var(--ink); }
.btn--primary { --btn-bg: var(--accent); --btn-fg: var(--off-white); --btn-bd: var(--accent); }
.btn--primary:hover { --btn-bg: var(--accent-hover); --btn-bd: var(--accent-hover); }
.btn--dark { --btn-bg: var(--ink); --btn-fg: var(--off-white); --btn-bd: var(--ink); }
.btn--dark:hover { --btn-bg: color-mix(in srgb, var(--ink) 80%, var(--maple-red)); }
.section--dark .btn:not(.btn--primary) { --btn-fg: var(--on-dark); --btn-bd: color-mix(in srgb, var(--off-white) 38%, var(--ink)); }
.section--dark .btn:not(.btn--primary):hover { --btn-bd: var(--on-dark); }
.btn--sm { min-height: 40px; padding: 0.5rem 1rem; font-size: 0.875rem; }
.btn .arrow { transition: transform var(--dur-med) var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-3); }

.link-arrow {
  display: inline-flex; align-items: center; gap: var(--space-2); font-weight: 600; font-size: 0.9375rem;
  text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px;
}
.link-arrow .arrow { transition: transform var(--dur-med) var(--ease); }
.link-arrow:hover .arrow { transform: translateX(4px); }
.link-arrow:hover { color: var(--accent); }
.section--dark .link-arrow:hover { color: var(--off-white); }

/* Tags / status */
.tag {
  display: inline-flex; align-items: center; gap: 0.4em; padding: 0.25rem 0.6rem;
  border: 1px solid var(--border-strong); border-radius: var(--r-1);
  font-size: 0.75rem; font-weight: 500; line-height: 1.3; color: var(--text);
}
.section--dark .tag { border-color: var(--on-dark-border); color: var(--on-dark); }
.status { display: inline-flex; align-items: center; gap: 0.5em; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--mid-grey); }
.status--live::before { background: var(--ui-ok); }
.status--dev::before { background: var(--ui-warn); }
.status--tbc::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--mid-grey); }

/* Mock-only editorial flag so reviewers can find unconfirmed content */
.content-note {
  border: 1px dashed var(--border-strong); border-radius: var(--r-2); padding: var(--space-4) var(--space-5);
  font-size: var(--fs-small); color: var(--text-muted); background: transparent;
}
.content-note strong { display: block; font-size: 0.6875rem; letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--text); margin-bottom: var(--space-1); }
.section--dark .content-note { border-color: var(--on-dark-border); color: var(--on-dark-muted); }
.section--dark .content-note strong { color: var(--on-dark); }

/* Reveal (progressive enhancement) */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease); transition-delay: var(--d, 0ms); }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* Layout — header, navigation, footer, heroes */

/* ── Header ─────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 100; height: var(--header-h);
  background: color-mix(in srgb, var(--off-white) 94%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: var(--line);
}
.site-header__inner { height: 100%; display: flex; align-items: center; gap: var(--space-6); }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-display); font-size: 1.3rem; letter-spacing: -0.015em; line-height: 1; color: var(--ink); white-space: nowrap; }
.logo img { width: 34px; height: 34px; flex: none; display: block; }
.logo__s { color: var(--maple-red); }
.logo--light { color: var(--off-white); }

.nav { margin-left: auto; display: none; align-items: center; gap: var(--space-1); }
.nav__item { position: relative; display: flex; align-items: center; }
.nav__link {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 var(--space-3);
  font-size: 0.9375rem; font-weight: 500; text-decoration: none; color: var(--text);
  border-bottom: 2px solid transparent; transition: color var(--dur-fast);
}
.nav__link:hover { color: var(--accent); }
.nav__link[aria-current="page"], .nav__item.is-active > .nav__link { color: var(--accent); border-bottom-color: var(--accent); }
.nav__toggle {
  width: 28px; height: 40px; margin-left: -8px; background: none; border: 0; padding: 0; display: grid; place-items: center; color: var(--text-muted);
}
.nav__toggle svg { width: 12px; height: 12px; transition: transform var(--dur-med) var(--ease); }
.nav__toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.nav__cta { margin-left: var(--space-4); }

.mega {
  position: absolute; top: calc(100% + 12px); left: 50%; translate: -35% 0; width: min(780px, 92vw);
  background: var(--off-white); border: var(--line); border-top: 2px solid var(--ink); border-radius: 0 0 var(--r-3) var(--r-3);
  box-shadow: var(--shadow-2); padding: var(--space-6);
  display: none; grid-template-columns: 1.1fr 1.9fr; gap: var(--space-6);
}
.mega::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px; } /* hover bridge */
.nav__item.is-open > .mega { display: grid; }
@media (hover: hover) {
  .nav__item:hover > .mega, .nav__item:focus-within > .mega { display: grid; }
}
.mega--products { width: min(860px, 92vw); }
.mega__intro p { color: var(--text-muted); font-size: var(--fs-small); margin-top: var(--space-3); max-width: 30ch; }
.mega__intro h3 { font-size: 1.6rem; }
.mega__intro .link-arrow { margin-top: var(--space-5); }
.mega__list { display: grid; gap: 2px; align-content: start; }
.mega__list--2 { grid-template-columns: 1fr 1fr; }
.mega__link { display: flex; gap: var(--space-3); padding: var(--space-3); text-decoration: none; border-radius: var(--r-2); align-items: flex-start; }
.mega__link:hover { background: var(--bg-panel); }
.mega__link b { display: block; font-size: 0.9375rem; font-weight: 600; }
.mega__link span { display: block; font-size: 0.8125rem; color: var(--text-muted); line-height: 1.4; margin-top: 2px; }
.mega__num { font-size: 0.75rem; font-weight: 600; color: var(--accent); padding-top: 3px; font-variant-numeric: tabular-nums; min-width: 1.6em; }
.mega__logo { width: 36px; height: 36px; border-radius: 8px; flex: none; }

.menu-btn { margin-left: auto; width: 44px; height: 44px; display: grid; place-items: center; background: none; border: 1px solid var(--border-strong); border-radius: var(--r-2); }
.menu-btn span { display: block; width: 18px; height: 1.5px; background: var(--ink); position: relative; transition: background var(--dur-fast); }
.menu-btn span::before, .menu-btn span::after { content: ""; position: absolute; left: 0; width: 100%; height: 1.5px; background: var(--ink); transition: transform var(--dur-med) var(--ease); }
.menu-btn span::before { top: -6px; } .menu-btn span::after { top: 6px; }
.menu-btn[aria-expanded="true"] span { background: transparent; }
.menu-btn[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

.mobile-nav {
  position: fixed; inset: var(--header-h) 0 0 0; z-index: 99; background: var(--off-white);
  padding: var(--space-5) var(--gutter) var(--space-8); overflow-y: auto; overscroll-behavior: contain;
}
.mobile-nav[hidden] { display: none; }
.mobile-nav__list > li { border-bottom: var(--line); }
.mobile-nav__link, .mobile-nav summary {
  display: flex; align-items: center; justify-content: space-between; min-height: 60px;
  font-family: var(--font-display); font-size: 1.75rem; text-decoration: none; list-style: none; cursor: pointer;
}
.mobile-nav summary::-webkit-details-marker { display: none; }
.mobile-nav summary svg { width: 14px; height: 14px; transition: transform var(--dur-med) var(--ease); }
.mobile-nav details[open] summary svg { transform: rotate(180deg); }
.mobile-nav__sub { padding: 0 0 var(--space-4); display: grid; gap: 2px; }
.mobile-nav__sub a { display: flex; align-items: center; gap: var(--space-3); min-height: 48px; text-decoration: none; font-size: 1rem; color: var(--text-muted); }
.mobile-nav__sub a b { color: var(--text); font-weight: 500; }
.mobile-nav__sub img { width: 28px; height: 28px; border-radius: 6px; }
.mobile-nav__cta { margin-top: var(--space-6); width: 100%; }
body.nav-open { overflow: hidden; }

@media (min-width: 1024px) {
  .nav { display: flex; }
  .menu-btn, .mobile-nav { display: none !important; }
}

/* ── Footer ─────────────────────────────────────────────── */
.site-footer { background: var(--ink); color: var(--on-dark); padding-top: var(--space-9); }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--off-white); text-decoration: underline; }
.footer__top { display: grid; gap: var(--space-8); grid-template-columns: 1fr; padding-bottom: var(--space-8); }
.footer__brand p { color: var(--on-dark-muted); max-width: 34ch; margin-top: var(--space-4); font-size: var(--fs-small); }
.footer__brand .logo { font-size: 1.6rem; }
.footer__mail { display: inline-block; margin-top: var(--space-5); font-family: var(--font-display); font-size: 1.35rem; color: var(--on-dark); border-bottom: 1px solid var(--on-dark-border); }
.footer__cols { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-7) var(--space-5); }
.footer__col h2 { font-family: var(--font-body); font-size: var(--fs-label); letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--on-dark-muted); font-weight: 600; margin-bottom: var(--space-4); }
.footer__col li + li { margin-top: var(--space-2); }
.footer__col a { color: var(--on-dark); font-size: 0.9375rem; opacity: 0.92; }
.footer__col .ext::after { content: "↗"; margin-left: 0.3em; opacity: 0.6; font-size: 0.85em; }
.footer__bottom { border-top: var(--line-dark); padding-block: var(--space-5); display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-6); justify-content: space-between; font-size: 0.8125rem; color: var(--on-dark-muted); }
.footer__bottom a { color: var(--on-dark-muted); }
.footer__word { font-family: var(--font-display); font-size: clamp(3.5rem, 2rem + 11vw, 12rem); line-height: 0.85; letter-spacing: -0.03em; color: color-mix(in srgb, var(--off-white) 7%, var(--ink)); white-space: nowrap; overflow: hidden; padding-top: var(--space-4); user-select: none; }
@media (min-width: 768px) { .footer__cols { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1024px) { .footer__top { grid-template-columns: 1.1fr 2.2fr; } }

/* ── Breadcrumbs ────────────────────────────────────────── */
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: var(--space-2); font-size: var(--fs-small); color: var(--text-muted); }
.breadcrumbs li + li::before { content: "/"; margin-right: var(--space-2); opacity: 0.5; }
.breadcrumbs a { text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); text-decoration: underline; }
.breadcrumbs [aria-current] { color: var(--text); }
.section--dark .breadcrumbs ol { color: var(--on-dark-muted); }
.section--dark .breadcrumbs [aria-current] { color: var(--on-dark); }

/* ── Technical background ───────────────────────────────── */
.tech-grid {
  background-image:
    linear-gradient(to right, color-mix(in srgb, var(--ink) 6%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--ink) 6%, transparent) 1px, transparent 1px);
  background-size: 56px 56px; background-position: -1px -1px;
}
.section--dark.tech-grid, .tech-grid--dark {
  background-image:
    linear-gradient(to right, color-mix(in srgb, var(--off-white) 6%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--off-white) 6%, transparent) 1px, transparent 1px);
  background-size: 56px 56px; background-position: -1px -1px;
}
.mask-fade { -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent); mask-image: linear-gradient(to bottom, #000 55%, transparent); }

/* ── Home hero ──────────────────────────────────────────── */
.hero { position: relative; padding-block: clamp(2.5rem, 2rem + 4vw, 6rem) clamp(3.5rem, 3rem + 4vw, 7rem); overflow: clip; }
.hero__grid { position: absolute; inset: 0; pointer-events: none; }
.hero__inner { position: relative; display: grid; gap: var(--space-8); }
.hero__copy { max-width: 880px; }
.hero__title { margin-top: var(--space-5); font-size: clamp(2.875rem, 1rem + 5.4vw, 5.5rem); }
.hero__title .accent { color: var(--accent); font-style: italic; }
.hero__sub { margin-top: var(--space-6); max-width: 52ch; }
.hero .btn-row { margin-top: var(--space-6); }
.hero__meta { margin-top: var(--space-7); display: flex; flex-wrap: wrap; gap: var(--space-2); }
.hero__stage { position: relative; }
@media (min-width: 1024px) {
  .hero__inner { grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); align-items: center; gap: var(--space-6); }
  .hero__stage { margin-right: calc(var(--gutter) * -0.9); }
}

/* ── Page hero (inner pages) ────────────────────────────── */
.page-hero { padding-block: var(--space-7) var(--space-9); position: relative; overflow: clip; }
.page-hero__inner { display: grid; gap: var(--space-7); position: relative; }
.page-hero h1 { margin-top: var(--space-5); max-width: 18ch; }
.page-hero .lede { margin-top: var(--space-5); }
.page-hero .btn-row { margin-top: var(--space-6); }
.page-hero__crumbs { margin-bottom: var(--space-5); }
@media (min-width: 1024px) {
  .page-hero__inner--split { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: center; gap: var(--space-8); }
}

/* ── Section header ─────────────────────────────────────── */
.section-head { display: grid; gap: var(--space-5); margin-bottom: var(--space-8); }
.section-head__num { display: flex; align-items: center; gap: var(--space-3); }
.section-head__num b { color: var(--accent); font-weight: 600; font-variant-numeric: tabular-nums; }
.section--dark .section-head__num b { color: color-mix(in srgb, var(--maple-red) 70%, var(--off-white)); }
.section-head__num::after { content: ""; flex: 1; height: 1px; background: var(--border); max-width: 220px; }
.section--dark .section-head__num::after { background: var(--on-dark-border); }
.section-head h2 { max-width: 20ch; }
.section-head--wide h2 { max-width: 26ch; }
@media (min-width: 1024px) {
  .section-head--split { grid-template-columns: 1fr 1fr; align-items: end; gap: var(--space-8); }
  .section-head--split .lede { justify-self: end; }
}

/* Components */

/* ── Statement / tracks (home positioning) ──────────────── */
.statement { font-family: var(--font-display); font-size: clamp(1.75rem, 1.1rem + 2.6vw, 3.25rem); line-height: 1.15; letter-spacing: -0.015em; max-width: 30ch; text-wrap: balance; }
.statement .dim { color: var(--text-muted); }
.tracks { display: grid; gap: var(--space-4); margin-top: var(--space-8); }
.track { display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-6); border: var(--line); background: var(--surface); text-decoration: none; position: relative; transition: border-color var(--dur-med) var(--ease), transform var(--dur-med) var(--ease); }
.track:hover { border-color: var(--ink); }
.track h3 { font-size: 1.75rem; }
.track p { color: var(--text-muted); max-width: 44ch; }
.track__top { display: flex; justify-content: space-between; align-items: center; }
.track__foot { margin-top: auto; padding-top: var(--space-5); display: flex; align-items: center; justify-content: space-between; border-top: var(--line); font-weight: 600; font-size: 0.9375rem; }
.track:hover .arrow { transform: translateX(4px); }
.track .arrow { transition: transform var(--dur-med) var(--ease); }
@media (min-width: 768px) { .tracks { grid-template-columns: 1fr 1fr; } }

/* ── Capability index (3×3 square + live diagram + overlay) ─ */
.cap-layout { display: grid; gap: var(--space-7); }
.cap-square { display: grid; grid-template-columns: 1fr; gap: var(--space-3); }
.cap-cell { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: var(--space-4); min-width: 0; padding: var(--space-4); border: var(--line-dark); background: transparent; text-decoration: none; color: var(--on-dark); transition: border-color var(--dur-med) var(--ease), background var(--dur-med); }
.cap-cell__n { font-size: 0.8125rem; color: var(--on-dark-muted); font-variant-numeric: tabular-nums; }
.cap-cell__t { font-family: var(--font-display); font-size: clamp(1.05rem, 0.9rem + 0.6vw, 1.4rem); line-height: 1.15; overflow-wrap: anywhere; }
.cap-cell__a { position: absolute; top: var(--space-4); right: var(--space-4); color: var(--on-dark-muted); transition: color var(--dur-fast), transform var(--dur-med) var(--ease); }
.cap-cell:hover, .cap-cell:focus-visible, .cap-cell.is-active { border-color: var(--maple-red); background: var(--on-dark-panel); }
.cap-cell.is-active .cap-cell__n, .cap-cell:hover .cap-cell__n { color: var(--maple-red); }
.cap-cell:hover .cap-cell__a, .cap-cell.is-active .cap-cell__a { color: var(--maple-red); transform: translateX(3px); }
.cap-hint { margin-top: var(--space-4); color: var(--on-dark-muted); font-size: 0.875rem; }
.cap-aside .diagram-frame { transition: border-color var(--dur-med); }
.diagram.is-filtered .d-layer { opacity: 0.22; transition: opacity var(--dur-med) var(--ease); }
.diagram.is-filtered .d-layer.is-on { opacity: 1; }
.diagram.is-filtered .d-layer.is-on .d-box { stroke: var(--maple-red); stroke-width: 1.6; }
@media (min-width: 640px) {
  .cap-square { grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); aspect-ratio: 1 / 1; }
}
@media (min-width: 1024px) {
  .cap-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-8); align-items: center; }
}
.cap-dialog { margin: auto; width: min(460px, calc(100vw - 2rem)); padding: var(--space-6); border: var(--line); background: var(--bg); color: var(--ink); box-shadow: 0 24px 60px rgba(0,0,0,.45); }
.cap-dialog::backdrop { background: rgba(26,23,20,.6); }
.cap-dialog h3 { margin: var(--space-3) 0; font-size: 1.75rem; }
.cap-dialog p { color: var(--text-muted); margin-bottom: var(--space-4); }
.cap-dialog__layers { display: flex; flex-direction: column; gap: var(--space-1); font-size: 0.875rem; }
.cap-dialog__layers span { font-size: 0.75rem; letter-spacing: var(--tracking-label); text-transform: uppercase; }
.cap-dialog__layers b { color: var(--ink); font-weight: 500; }
.cap-dialog__close { position: absolute; top: var(--space-3); right: var(--space-4); background: none; border: 0; font-size: 1.75rem; line-height: 1; color: var(--ink); cursor: pointer; }

/* ── Service cards ──────────────────────────────────────── */
.card-grid { display: grid; gap: var(--space-4); }
@media (min-width: 768px) { .card-grid--2 { grid-template-columns: repeat(2, 1fr); } .card-grid--3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .card-grid--4 { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 768px) and (max-width: 1023px) { .card-grid--4 { grid-template-columns: repeat(2, 1fr); } }
.service-card { display: flex; flex-direction: column; background: var(--surface); border: var(--line); text-decoration: none; transition: border-color var(--dur-med), transform var(--dur-med) var(--ease); overflow: hidden; }
.service-card:hover { border-color: var(--ink); }
.service-card__vis { background: var(--bg-panel); border-bottom: var(--line); padding: var(--space-5); aspect-ratio: 16 / 10; display: grid; place-items: center; overflow: hidden; }
.service-card__body { padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-3); flex: 1; }
.service-card__body h3 { font-size: 1.6rem; }
.service-card__body p { color: var(--text-muted); font-size: 0.9375rem; }
.service-card__foot { margin-top: auto; padding-top: var(--space-4); font-weight: 600; font-size: 0.9375rem; display: flex; justify-content: space-between; }
.service-card:hover .arrow { transform: translateX(4px); }
.service-card .arrow { transition: transform var(--dur-med) var(--ease); }

/* ── Feature grid (hairline cells) ──────────────────────── */
.feature-grid { display: grid; gap: 1px; background: var(--border); border: var(--line); }
.section--dark .feature-grid { background: var(--on-dark-border); border-color: var(--on-dark-border); }
.feature { background: var(--bg); padding: var(--space-6); display: flex; flex-direction: column; gap: var(--space-3); }
.section--panel .feature { background: var(--bg-panel); }
.section--dark .feature { background: var(--ink); }
.feature__n { font-size: 0.75rem; font-weight: 600; letter-spacing: var(--tracking-label); color: var(--accent); }
.section--dark .feature__n { color: color-mix(in srgb, var(--maple-red) 70%, var(--off-white)); }
.feature h3 { font-family: var(--font-body); font-size: 1.125rem; font-weight: 600; letter-spacing: 0; line-height: 1.3; }
.feature p { color: var(--text-muted); font-size: 0.9375rem; }
.section--dark .feature p { color: var(--on-dark-muted); }
@media (min-width: 640px) { .feature-grid--2, .feature-grid--3, .feature-grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .feature-grid--3 { grid-template-columns: repeat(3, 1fr); } .feature-grid--4 { grid-template-columns: repeat(4, 1fr); } }

/* ── Product card ───────────────────────────────────────── */
.product-grid { display: grid; gap: var(--space-4); }
@media (min-width: 768px) { .product-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .product-grid--3 { grid-template-columns: repeat(3, 1fr); } }
.product-card { --pa: var(--ink); display: flex; flex-direction: column; background: var(--surface); border: var(--line); text-decoration: none; position: relative; transition: border-color var(--dur-med), transform var(--dur-med) var(--ease); overflow: hidden; }
.product-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--pa); z-index: 2; }
.product-card:hover { border-color: var(--ink); }
.product-card__vis { background: var(--bg-panel); border-bottom: var(--line); padding: var(--space-5) var(--space-5) 0; height: 250px; overflow: hidden; position: relative; }
.product-card__vis .ui { transform-origin: top left; }
.product-card__body { padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-3); flex: 1; }
.product-card__id { display: flex; align-items: center; gap: var(--space-3); }
.product-card__id img, .product-card__id svg { width: 44px; height: 44px; border-radius: 10px; flex: none; }
.product-card__id h3 { font-size: 1.75rem; line-height: 1; }
.product-card__id .status { margin-top: 6px; }
.product-card p { color: var(--text-muted); font-size: 0.9375rem; }
.product-card__foot { margin-top: auto; padding-top: var(--space-4); border-top: var(--line); display: flex; justify-content: space-between; font-weight: 600; font-size: 0.9375rem; }
.product-card:hover .arrow { transform: translateX(4px); }
.product-card .arrow { transition: transform var(--dur-med) var(--ease); }
.product-card--feature { grid-column: 1 / -1; }
@media (min-width: 900px) {
  .product-card--feature { flex-direction: row; }
  .product-card--feature .product-card__vis { width: 58%; height: auto; min-height: 380px; border-bottom: 0; border-right: var(--line); padding-top: var(--space-6); }
  .product-card--feature .product-card__body { padding: var(--space-7); justify-content: center; }
  .product-card--feature .product-card__id h3 { font-size: 2.75rem; }
  .product-card--feature p { font-size: 1.0625rem; max-width: 40ch; }
}

/* ── Product showcase / project cards ───────────────────── */
.project { display: grid; gap: var(--space-6); padding-block: var(--space-7); border-top: var(--line); }
.project:last-child { border-bottom: var(--line); }
.project__meta { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.project h3 { margin-top: var(--space-4); }
.project__cols { display: grid; gap: var(--space-5); margin-top: var(--space-5); }
.project__cols dt { font-size: var(--fs-label); letter-spacing: var(--tracking-label); text-transform: uppercase; font-weight: 600; color: var(--text-muted); margin-bottom: var(--space-1); }
.project__cols dd { font-size: 0.9375rem; max-width: 46ch; }
.project__vis { background: var(--bg-panel); border: var(--line); padding: var(--space-6) var(--space-6) 0; overflow: hidden; align-self: stretch; display: flex; align-items: flex-end; }
.project__vis .ui { width: 100%; }
@media (min-width: 1024px) {
  .project { grid-template-columns: 1fr 1.1fr; gap: var(--space-8); align-items: stretch; }
  .project--flip .project__vis { order: -1; }
  .project__cols { grid-template-columns: 1fr 1fr; }
}

/* ── Chips / stack ──────────────────────────────────────── */
.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }

/* ── Process timeline ───────────────────────────────────── */
.timeline { display: grid; gap: 0; counter-reset: step; border-top: var(--line); }
.step { display: grid; grid-template-columns: 3rem 1fr; gap: var(--space-4); padding: var(--space-5) 0; border-bottom: var(--line); }
.step__n { font-family: var(--font-display); font-size: 2rem; line-height: 1; color: var(--accent); }
.step h3 { font-family: var(--font-body); font-size: 1.125rem; font-weight: 600; letter-spacing: 0; }
.step p { color: var(--text-muted); font-size: 0.9375rem; margin-top: var(--space-2); max-width: 46ch; }
@media (min-width: 900px) {
  .timeline { grid-template-columns: repeat(var(--steps, 6), 1fr); border-top: 0; position: relative; }
  .timeline::before { content: ""; position: absolute; left: 0; right: 0; top: 18px; height: 1px; background: var(--border-strong); }
  .step { grid-template-columns: 1fr; gap: var(--space-4); border-bottom: 0; padding: 0 var(--space-4) 0 0; position: relative; }
  .step__n { display: inline-grid; place-items: center; width: 37px; height: 37px; border-radius: 50%; background: var(--bg); border: 1px solid var(--accent); font-family: var(--font-body); font-size: 0.8125rem; font-weight: 600; position: relative; }
  .section--panel .step__n { background: var(--bg-panel); }
  .step h3 { margin-top: var(--space-2); }
}
.section--dark .timeline, .section--dark .step { border-color: var(--on-dark-border); }
.section--dark .step p { color: var(--on-dark-muted); }

/* ── FAQ ────────────────────────────────────────────────── */
.faq { border-top: var(--line); }
.faq details { border-bottom: var(--line); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: var(--space-5); padding: var(--space-5) 0; cursor: pointer; list-style: none; font-family: var(--font-display); font-size: clamp(1.2rem, 1.05rem + 0.6vw, 1.5rem); line-height: 1.25; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-body); font-size: 1.5rem; font-weight: 300; color: var(--accent); transition: transform var(--dur-med) var(--ease); flex: none; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 var(--space-5); color: var(--text-muted); max-width: 62ch; }

/* ── CTA ────────────────────────────────────────────────── */
.cta { display: grid; gap: var(--space-6); align-items: end; }
.cta h2 { font-size: var(--fs-h1); max-width: 16ch; }
.cta__side { display: grid; gap: var(--space-5); justify-items: start; }
.cta__mail { font-family: var(--font-display); font-size: 1.4rem; text-decoration: none; border-bottom: 1px solid var(--border-strong); }
.section--dark .cta__mail { border-color: var(--on-dark-border); }
@media (min-width: 900px) { .cta { grid-template-columns: 1.3fr 1fr; gap: var(--space-9); } }

/* ── Spec / definition lists ────────────────────────────── */
.spec { display: grid; border-top: var(--line); }
.spec div { display: grid; grid-template-columns: 9rem 1fr; gap: var(--space-4); padding: var(--space-4) 0; border-bottom: var(--line); font-size: 0.9375rem; }
.spec dt { color: var(--text-muted); }
.spec dd { margin: 0; }
.spec a { color: var(--accent); }
.section--dark .spec, .section--dark .spec div { border-color: var(--on-dark-border); }
.section--dark .spec dt { color: var(--on-dark-muted); }

/* ── Two-column editorial split ─────────────────────────── */
.split { display: grid; gap: var(--space-7); }
@media (min-width: 1024px) {
  .split { grid-template-columns: 5fr 7fr; gap: var(--space-9); align-items: start; }
  .split--even { grid-template-columns: 1fr 1fr; }
  .split--rev { grid-template-columns: 7fr 5fr; }
  .split__sticky { position: sticky; top: calc(var(--header-h) + var(--space-6)); }
}

/* ── Bullet list (editorial) ────────────────────────────── */
.checklist li { display: grid; grid-template-columns: 1.4rem 1fr; gap: var(--space-3); padding: var(--space-3) 0; border-bottom: var(--line); font-size: 0.9875rem; }
.checklist li:first-child { border-top: var(--line); }
.checklist li::before { content: ""; width: 8px; height: 8px; margin-top: 0.55em; background: var(--accent); }
.section--dark .checklist li { border-color: var(--on-dark-border); }
.checklist b { font-weight: 600; }
.checklist span { color: var(--text-muted); display: block; font-size: 0.9375rem; }
.section--dark .checklist span { color: var(--on-dark-muted); }

/* ── Quote / pull statement ─────────────────────────────── */
.pull { font-family: var(--font-display); font-size: clamp(1.6rem, 1.2rem + 1.8vw, 2.6rem); line-height: 1.2; max-width: 26ch; }

/* ── Contact ────────────────────────────────────────────── */
.contact-grid { display: grid; gap: var(--space-8); }
@media (min-width: 1024px) { .contact-grid { grid-template-columns: 5fr 7fr; gap: var(--space-9); } }
.steps-list { counter-reset: s; display: grid; gap: var(--space-5); margin-top: var(--space-6); }
.steps-list li { counter-increment: s; display: grid; grid-template-columns: 2.2rem 1fr; gap: var(--space-3); }
.steps-list li::before { content: counter(s, decimal-leading-zero); color: var(--accent); font-weight: 600; font-size: 0.8125rem; padding-top: 0.2em; }
.steps-list b { display: block; font-weight: 600; }
.steps-list span { color: var(--text-muted); font-size: 0.9375rem; }

/* ── Docs (preserved guides) ────────────────────────────── */
.docs { display: grid; gap: var(--space-7); padding-block: var(--space-7) var(--space-9); }
.docs__side { font-size: 0.9375rem; }
.docs__side h2 { font-family: var(--font-body); font-size: var(--fs-label); letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--text-muted); font-weight: 600; margin: var(--space-5) 0 var(--space-2); }
.docs__side h2:first-child { margin-top: 0; }
.docs__side a { display: block; padding: 0.35rem 0.75rem; margin-left: -0.75rem; border-left: 2px solid transparent; text-decoration: none; color: var(--text); }
.docs__side a:hover { color: var(--accent); border-left-color: var(--accent); }
@media (min-width: 1024px) {
  .docs { grid-template-columns: 260px minmax(0, 1fr); gap: var(--space-9); }
  .docs__side { position: sticky; top: calc(var(--header-h) + var(--space-5)); max-height: calc(100vh - var(--header-h) - 2rem); overflow: auto; align-self: start; }
}
@media (max-width: 1023px) { .docs__side { border: var(--line); padding: var(--space-4); background: var(--bg-panel); } .docs__side a { display: inline-block; } .docs__side h2 { margin-top: var(--space-4); } }
.docs__main { max-width: 760px; }
.docs__title { font-family: var(--font-display); font-size: var(--fs-h1); line-height: 1.05; margin-bottom: var(--space-4); }
.docs__sub { color: var(--text-muted); font-size: var(--fs-lede); margin-bottom: var(--space-8); }
.docs-section { padding-block: var(--space-6); border-top: var(--line); }
.docs-section-title { font-family: var(--font-display); font-size: var(--fs-h3); margin-bottom: var(--space-4); }
.docs-section-body p { margin-bottom: var(--space-4); max-width: 66ch; }
.docs-section-body ul, .docs-section-body ol { margin: 0 0 var(--space-4) 1.25rem; }
.docs-section-body ul { list-style: disc; } .docs-section-body ol { list-style: decimal; }
.docs-section-body li { margin-bottom: var(--space-2); padding-left: 0.25rem; }
.docs-section-body li::marker { color: var(--accent); }
.docs-section-body code { background: var(--bg-panel-strong); padding: 0.1em 0.4em; border-radius: var(--r-1); font-size: 0.9em; }
.docs-section-body table { width: 100%; border-collapse: collapse; margin: var(--space-4) 0 var(--space-5); font-size: 0.9375rem; }
.docs-section-body th, .docs-section-body td { text-align: left; padding: var(--space-3) var(--space-3) var(--space-3) 0; border-bottom: var(--line); vertical-align: top; }
.docs-section-body th { font-size: var(--fs-label); text-transform: uppercase; letter-spacing: var(--tracking-label); color: var(--text-muted); }
.docs-section-body a { color: var(--accent) !important; }
.docs-callout { background: var(--bg-panel); border-left: 3px solid var(--accent); padding: var(--space-4) var(--space-5); margin: var(--space-5) 0; font-size: 0.9375rem; border-radius: 0 var(--r-2) var(--r-2) 0; }
.docs-section-body .docs-table-wrap, .docs-section-body table { display: block; overflow-x: auto; }

/* ── Legal ──────────────────────────────────────────────── */
.legal h1 { margin-bottom: var(--space-3); }
.legal__date { color: var(--text-muted); margin-bottom: var(--space-7); }
.legal h2 { font-family: var(--font-display); font-size: 1.75rem; margin: var(--space-7) 0 var(--space-3); }
.legal p { max-width: 66ch; }
.legal a { color: var(--accent); }

/* ── Mock marker ────────────────────────────────────────── */

/* ── Redirect / 404 ─────────────────────────────────────── */
.center-page { min-height: 60vh; display: grid; place-content: center; text-align: center; gap: var(--space-5); justify-items: center; padding: var(--space-9) var(--gutter); }

/* Representative application interfaces — all sizing in em so previews scale with their container. */
.ui-wrap, .stage { container-type: inline-size; }
.ui, .ui-card, .diagram { font-size: clamp(7.5px, 1.9cqi, 14px); }
.stage .ui, .stage .ui-card { font-size: clamp(7px, 1.7cqi, 13px); }

.ui {
  --u-line: color-mix(in srgb, var(--light-grey) 80%, var(--surface));
  background: var(--surface); border: 1px solid var(--u-line); border-radius: 0.7em; box-shadow: var(--shadow-window);
  overflow: hidden; color: var(--ink); line-height: 1.35; font-family: var(--font-body); text-align: left;
  user-select: none; pointer-events: none;
}
.ui__bar { height: 2.7em; display: flex; align-items: center; gap: 0.6em; padding: 0 1em; border-bottom: 1px solid var(--u-line); background: color-mix(in srgb, var(--off-white) 70%, var(--surface)); }
.ui__dots { display: flex; gap: 0.4em; } .ui__dots i { width: 0.65em; height: 0.65em; border-radius: 50%; background: var(--light-grey); }
.ui__url { flex: 1; max-width: 22em; margin: 0 auto; height: 1.7em; border-radius: 0.4em; background: var(--surface); border: 1px solid var(--u-line); font-size: 0.85em; display: flex; align-items: center; justify-content: center; color: var(--mid-grey); }
.ui__body { display: grid; grid-template-columns: 11.5em minmax(0, 1fr); min-height: 22em; }
.ui__body--full { grid-template-columns: 1fr; }
.ui__side { background: color-mix(in srgb, var(--off-white) 60%, var(--surface)); border-right: 1px solid var(--u-line); padding: 1em 0.8em; display: grid; gap: 0.15em; align-content: start; }
.ui__brand { display: flex; align-items: center; gap: 0.6em; font-weight: 600; font-size: 1.05em; padding: 0.2em 0.6em 1em; }
.ui__brand img, .ui__brand svg { width: 1.9em; height: 1.9em; border-radius: 0.45em; }
.ui__nav { padding: 0.5em 0.7em; border-radius: 0.35em; color: var(--mid-grey); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ui__nav.is-on { background: var(--light-grey); color: var(--ink); font-weight: 600; background: color-mix(in srgb, var(--light-grey) 70%, var(--surface)); }
.ui__nav-label { font-size: 0.8em; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mid-grey); padding: 1em 0.7em 0.3em; font-weight: 600; }
.ui__main { padding: 1.3em 1.4em; display: grid; gap: 1.1em; align-content: start; min-width: 0; }
.ui__head { display: flex; justify-content: space-between; align-items: center; gap: 1em; }
.ui__h { font-size: 1.35em; font-weight: 600; letter-spacing: -0.01em; }
.ui__sub { color: var(--mid-grey); font-size: 0.9em; }
.ui__btn { padding: 0.45em 0.9em; border-radius: 0.35em; border: 1px solid var(--u-line); font-weight: 600; font-size: 0.9em; background: var(--surface); white-space: nowrap; }
.ui__btn--p { background: var(--ink); color: var(--off-white); border-color: var(--ink); }
.ui__kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(7.5em, 1fr)); gap: 0.8em; }
.ui__kpi { border: 1px solid var(--u-line); border-radius: 0.5em; padding: 0.8em 0.9em; }
.ui__kpi small { display: block; color: var(--mid-grey); font-size: 0.85em; }
.ui__kpi b { display: block; font-size: 1.9em; line-height: 1.15; letter-spacing: -0.02em; margin-top: 0.1em; }
.ui__kpi em { font-style: normal; font-size: 0.82em; color: var(--ui-ok); font-weight: 600; }
.ui__tabs { display: flex; gap: 1.2em; border-bottom: 1px solid var(--u-line); font-weight: 500; color: var(--mid-grey); }
.ui__tabs span { padding: 0 0 0.6em; } .ui__tabs .is-on { color: var(--ink); font-weight: 600; box-shadow: 0 2px 0 var(--ink); }
.ui__tbl { display: grid; border: 1px solid var(--u-line); border-radius: 0.5em; overflow: hidden; }
.ui__tr { display: grid; grid-template-columns: var(--cols, 1.4fr 1.4fr 1fr 0.8fr); gap: 0.8em; padding: 0.7em 1em; align-items: center; border-top: 1px solid var(--u-line); white-space: nowrap; overflow: hidden; }
.ui__tr > * { overflow: hidden; text-overflow: ellipsis; }
.ui__tr:first-child { border-top: 0; }
.ui__tr--h { background: color-mix(in srgb, var(--off-white) 70%, var(--surface)); color: var(--mid-grey); font-size: 0.85em; font-weight: 600; }
.ui__tr .r { text-align: right; }
.ui__pill { display: inline-block; padding: 0.15em 0.65em; border-radius: 999px; font-size: 0.85em; font-weight: 600; background: var(--light-grey); color: var(--ink); width: max-content; background: color-mix(in srgb, var(--light-grey) 70%, var(--surface)); }
.ui__pill--ok { background: color-mix(in srgb, var(--ui-ok) 14%, var(--surface)); color: var(--ui-ok); }
.ui__pill--warn { background: color-mix(in srgb, var(--ui-warn) 16%, var(--surface)); color: color-mix(in srgb, var(--ui-warn) 80%, var(--ink)); }
.ui__pill--bad { background: color-mix(in srgb, var(--maple-red) 12%, var(--surface)); color: var(--maple-red); }
.ui__pill--info { background: color-mix(in srgb, var(--p-stackr) 14%, var(--surface)); color: color-mix(in srgb, var(--p-stackr) 80%, var(--ink)); }
.ui__cols { display: grid; gap: 1em; grid-template-columns: 1.5fr 1fr; }
.ui__panel { border: 1px solid var(--u-line); border-radius: 0.5em; padding: 1em; display: grid; gap: 0.7em; align-content: start; }
.ui__panel > b { font-size: 0.95em; }
.ui__chart { width: 100%; height: 8em; }
.ui__bars { display: flex; align-items: flex-end; gap: 0.5em; height: 8em; }
.ui__bars i { flex: 1; background: var(--ink); border-radius: 0.2em 0.2em 0 0; min-height: 0.4em; opacity: 0.88; }
.ui__bars i.hi { background: var(--maple-red); opacity: 1; }
.ui__bars i.lo { background: var(--light-grey); }
.ui__meter { display: grid; gap: 0.35em; font-size: 0.9em; }
.ui__meter > div { display: grid; grid-template-columns: 4.5em 1fr 2.2em; gap: 0.6em; align-items: center; }
.ui__meter i { height: 0.55em; border-radius: 99px; background: var(--light-grey); overflow: hidden; position: relative; display: block; }
.ui__meter i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); background: var(--c, var(--ink)); }
.ui__ring { --v: 78; width: 7em; height: 7em; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--c, var(--p-speedr)) calc(var(--v) * 1%), var(--light-grey) 0); position: relative; justify-self: center; }
.ui__ring::before { content: ""; position: absolute; inset: 0.75em; background: var(--surface); border-radius: 50%; }
.ui__ring b { position: relative; font-size: 2em; letter-spacing: -0.03em; line-height: 1; text-align: center; }
.ui__ring b small { display: block; font-size: 0.4em; font-weight: 500; color: var(--mid-grey); letter-spacing: 0; margin-top: 0.15em; }
.ui__avatar { width: 1.9em; height: 1.9em; border-radius: 50%; background: var(--light-grey); display: inline-grid; place-items: center; font-size: 0.85em; font-weight: 600; flex: none; }
.ui__thumb { width: 2.6em; height: 2.6em; border-radius: 0.4em; background: linear-gradient(135deg, var(--light-grey), color-mix(in srgb, var(--light-grey) 40%, var(--surface))); flex: none; }
.ui__line { display: flex; align-items: center; gap: 0.7em; }
.ui__field { border: 1px solid var(--u-line); border-radius: 0.35em; padding: 0.5em 0.7em; display: flex; justify-content: space-between; font-size: 0.95em; }
.ui__field small { color: var(--mid-grey); }
.ui__calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.3em; text-align: center; font-size: 0.9em; }
.ui__calendar span { padding: 0.5em 0; border-radius: 0.3em; } .ui__calendar .h { color: var(--mid-grey); font-weight: 600; font-size: 0.85em; }
.ui__calendar .x { color: var(--light-grey); } .ui__calendar .a { background: color-mix(in srgb, var(--p-bookly) 14%, var(--surface)); font-weight: 600; } .ui__calendar .s { background: var(--ink); color: var(--off-white); font-weight: 600; }
.ui__slots { display: flex; flex-wrap: wrap; gap: 0.5em; } .ui__slots span { border: 1px solid var(--u-line); padding: 0.4em 0.8em; border-radius: 0.35em; font-weight: 500; } .ui__slots .s { background: var(--ink); color: var(--off-white); border-color: var(--ink); }
.ui__note { position: absolute; right: 1em; bottom: 0.8em; font-size: 0.75em; color: var(--mid-grey); }

/* Floating UI cards used in the hero composition */
.ui-card { background: var(--surface); border: 1px solid var(--light-grey); border-radius: 0.7em; box-shadow: var(--shadow-window); padding: 1.1em 1.2em; display: grid; gap: 0.7em; line-height: 1.35; pointer-events: none; user-select: none; }

/* Hero stage */
.stage { position: relative; padding: 0 0 12% 0; }
.stage__main { width: 100%; }
.stage__a { position: absolute; left: -4%; bottom: 0; width: 38%; }
.stage__b { position: absolute; right: -2%; bottom: 3%; width: 34%; }
.stage__c { position: absolute; right: 8%; top: -5%; width: 36%; }
.stage__tag { position: absolute; left: 0; top: -2.2em; }
.stage__cap { font-size: 0.75rem; color: var(--text-muted); margin-top: var(--space-4); letter-spacing: 0.02em; }
.stage--drift .stage__a { animation: drift 9s ease-in-out infinite alternate; }
.stage--drift .stage__b { animation: drift 11s ease-in-out infinite alternate-reverse; }
@keyframes drift { to { transform: translateY(-8px); } }
@media (max-width: 600px) { .stage__a { left: 0; width: 46%; } .stage__c { display: none; } .stage__b { width: 40%; } }

/* Diagrams (SVG) */
.diagram { width: 100%; height: auto; }
.diagram text { font-family: var(--font-body); font-size: 11px; fill: var(--ink); }
.diagram .d-muted { fill: var(--mid-grey); }
.diagram .d-box { fill: var(--surface); stroke: var(--ink); stroke-width: 1.2; }
.diagram .d-box--soft { fill: var(--bg-panel); stroke: var(--border-strong); }
.diagram .d-box--ink { fill: var(--ink); stroke: var(--ink); } .diagram .d-box--ink text, .diagram text.d-on-ink { fill: var(--off-white); }
.diagram .d-line { stroke: var(--ink); stroke-width: 1.2; fill: none; }
.diagram .d-dash { stroke: var(--mid-grey); stroke-width: 1; stroke-dasharray: 3 4; fill: none; }
.diagram .d-accent { stroke: var(--maple-red); stroke-width: 1.6; fill: none; } .diagram .d-fill-accent { fill: var(--maple-red); }
.diagram .d-serif { font-family: var(--font-display); font-size: 14px; }
.section--dark .diagram text { fill: var(--on-dark); } .section--dark .diagram .d-muted { fill: var(--on-dark-muted); }
.section--dark .diagram .d-box { fill: var(--on-dark-panel); stroke: color-mix(in srgb, var(--off-white) 40%, var(--ink)); }
.section--dark .diagram .d-box--soft { fill: transparent; stroke: var(--on-dark-border); }
.section--dark .diagram .d-box--ink { fill: var(--off-white); stroke: var(--off-white); } .section--dark .diagram .d-box--ink text { fill: var(--ink); }
.section--dark .diagram .d-line { stroke: color-mix(in srgb, var(--off-white) 70%, var(--ink)); }
.section--dark .diagram .d-dash { stroke: var(--on-dark-muted); }
.diagram-frame { border: var(--line); background: var(--surface); padding: var(--space-5); }
.section--dark .diagram-frame { border-color: var(--on-dark-border); background: transparent; }
.diagram-cap { display: flex; justify-content: space-between; gap: var(--space-4); font-size: 0.75rem; color: var(--text-muted); margin-top: var(--space-3); }
.section--dark .diagram-cap { color: var(--on-dark-muted); }

/* Browser-style frame for product interface previews */
.shot { position: relative; }
.shot__cap { display: flex; justify-content: space-between; gap: var(--space-4); font-size: 0.75rem; color: var(--text-muted); margin-top: var(--space-3); }
.shot-set { display: grid; gap: var(--space-5); }
@media (min-width: 900px) { .shot-set--3 { grid-template-columns: repeat(3, 1fr); } .shot-set--2 { grid-template-columns: repeat(2, 1fr); } }
.shot-set .ui-wrap { background: var(--bg-panel); border: var(--line); padding: var(--space-5); overflow: hidden; }
.shot-set .ui { box-shadow: var(--shadow-2); }
