/* ==========================================================================
   SemanticTwin.ai website styles
   Tokens follow the SemanticTwin.ai product design system (01-SITE-BRIEF.md),
   with one change: --muted is #6B7280 so small text passes WCAG AA.
   #9CA3AF is kept as --decor, for icons, arrows and rules only, never text.
   ========================================================================== */

:root {
  --primary: #4F46E5;
  --primary-dark: #3730A3;
  --primary-light: #EEF2FF;
  --primary-line: #C7D2FE;   /* decorative borders on tinted panels */
  --page: #F9FAFB;
  --surface: #FFFFFF;
  --heading: #111827;
  --body: #4B5563;
  --muted: #6B7280;          /* small meta text: 4.83:1 on white, 4.63:1 on page */
  --decor: #9CA3AF;          /* decoration only: icons, arrows, rules */
  --border: #E5E7EB;
  --divider: #F3F4F6;

  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --radius-lg: 8px;
  --radius-xl: 12px;
  --radius-2xl: 16px;
  --shadow-sm: 0 1px 2px rgba(17, 24, 39, 0.05);
  --shadow-md: 0 12px 32px -16px rgba(17, 24, 39, 0.22);

  --container: 1200px;
  --gutter: 16px;
  --section-y: clamp(64px, 9vw, 112px);
  --header-h: 64px;
}

@media (min-width: 640px) { :root { --gutter: 24px; } }
@media (min-width: 1024px) { :root { --gutter: 32px; --header-h: 72px; } }

/* ---------- Reset and base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--page);
  color: var(--body);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; height: auto; }

h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }

:where(ul[role="list"], ol[role="list"]) { list-style: none; padding: 0; }

h1, h2, h3, h4 {
  color: var(--heading);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.25rem, 1.55rem + 2.9vw, 3.5rem); line-height: 1.08; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.75rem, 1.35rem + 1.6vw, 2.5rem); line-height: 1.15; }
h3 { font-size: 1.25rem; line-height: 1.35; font-weight: 600; letter-spacing: -0.01em; }
h4 { font-size: 1.0625rem; line-height: 1.4; font-weight: 600; letter-spacing: 0; }

p { text-wrap: pretty; }

a { color: var(--primary); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--primary-dark); }

strong, b { color: var(--heading); font-weight: 600; }

code, .mono {
  font-family: var(--font-mono);
  font-size: 0.9em;
  font-weight: 500;
}

code {
  padding: 0.1em 0.4em;
  border-radius: 6px;
  background: var(--divider);
  color: var(--heading);
  white-space: nowrap;
}

:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 4px; }

[hidden] { display: none !important; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ---------- Layout helpers ---------- */

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); }
.section--surface { background: var(--surface); border-block: 1px solid var(--border); }
.section--tight { padding-block: clamp(48px, 6vw, 72px); }

.section-head { max-width: 760px; margin-bottom: clamp(32px, 4vw, 48px); }
.section-head > * + * { margin-top: 16px; }
.section-head--center { margin-inline: auto; text-align: center; }

.kicker {
  display: block;
  color: var(--primary);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 8px;
  border-radius: 999px;
  background: var(--primary-light);
  border: 1px solid var(--primary-line);
  color: var(--primary);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.3;
}

.eyebrow__mark { width: 20px; height: 20px; flex: none; }

.lead {
  font-size: clamp(1.125rem, 1.05rem + 0.35vw, 1.25rem);
  line-height: 1.6;
  color: var(--body);
}

.prose { max-width: 70ch; }
.prose > * + * { margin-top: 1em; }
.prose h3 { margin-top: 1.6em; }

.stack > * + * { margin-top: var(--stack, 16px); }

.muted { color: var(--muted); }
.small { font-size: 0.9375rem; }

.grid { display: grid; gap: clamp(16px, 2vw, 24px); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }

@media (min-width: 1024px) {
  .grid--cols-3 { grid-template-columns: repeat(3, 1fr); }
  .grid--cols-4 { grid-template-columns: repeat(4, 1fr); }
}

.split { display: grid; gap: clamp(32px, 5vw, 64px); }
@media (min-width: 960px) {
  .split { grid-template-columns: 1fr 1fr; align-items: start; }
  .split--wide-left { grid-template-columns: 1.15fr 0.85fr; }
  .split--center { align-items: center; }
}

/* ---------- Skip link ---------- */

.skip-link {
  position: absolute;
  left: 16px;
  top: -120px;
  z-index: 100;
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--primary);
  font-weight: 600;
  box-shadow: var(--shadow-md);
}
.skip-link:focus { top: 12px; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--border);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  backdrop-filter: saturate(180%) blur(10px);
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--heading);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
  text-decoration: none;
}
.brand:hover { color: var(--heading); }
.brand img { width: 32px; height: 32px; flex: none; }
.brand--footer { font-size: 1.0625rem; }
.brand--footer img { width: 28px; height: 28px; }

.site-nav { display: flex; align-items: center; }
.site-nav ul { display: flex; flex-wrap: wrap; gap: 2px 4px; list-style: none; margin: 0; padding: 0; }
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: var(--radius-lg);
  color: var(--body);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}
.site-nav a:hover { color: var(--heading); background: var(--divider); }
.site-nav a[aria-current="page"] { color: var(--primary); font-weight: 600; }

.header-cta { flex: none; }

.nav-toggle {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--heading);
  cursor: pointer;
}
.nav-toggle:hover { background: var(--divider); }
.nav-toggle svg { width: 20px; height: 20px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

@media (max-width: 959.98px) {
  .site-header__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    column-gap: 12px;
    padding-block: 10px;
  }
  .site-header .brand { grid-row: 1; grid-column: 1; min-width: 0; }
  .site-header .brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .site-header .header-cta { grid-row: 1; grid-column: 2; }
  .site-header .nav-toggle { grid-row: 1; grid-column: 3; }
  .site-header .site-nav { grid-row: 2; grid-column: 1 / -1; }
  .site-nav ul { margin-inline: -12px; }
  .site-header .site-nav { display: none; }
  .site-header .site-nav.is-open { display: block; padding: 4px 0 8px; border-top: 1px solid var(--divider); }
  .site-nav.is-open ul { flex-direction: column; margin-inline: 0; }
  .site-nav.is-open a { width: 100%; padding-inline: 8px; }
}

/* Without JavaScript the menu button can't work, so the links show instead */
@media (max-width: 959.98px) and (scripting: none) {
  .site-header .site-nav { display: block; }
  .nav-toggle { display: none; }
}

@media (max-width: 399.98px) {
  .site-header__inner { column-gap: 8px; }
  .site-header .brand { font-size: 0.9375rem; gap: 8px; }
  .site-header .header-cta { min-height: 40px; padding: 8px 10px; font-size: 0.875rem; }
  .nav-toggle { width: 40px; height: 40px; }
}

@media (min-width: 960px) {
  .site-header__inner { flex-wrap: nowrap; gap: 24px; }
  .site-nav { margin-left: auto; }
  .nav-toggle { display: none !important; }
}

/* ---------- Buttons and links ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.btn--primary { background: var(--primary); color: #FFFFFF; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--primary-dark); color: #FFFFFF; }
.btn--secondary { background: var(--surface); color: var(--primary); border-color: var(--primary); }
.btn--secondary:hover { background: var(--primary-light); color: var(--primary-dark); border-color: var(--primary-dark); }
.btn--sm { min-height: 40px; padding: 8px 16px; font-size: 0.9375rem; }
.btn--lg { min-height: 52px; padding: 14px 26px; font-size: 1.0625rem; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  text-decoration: none;
}
.link-arrow:hover { text-decoration: underline; }
.more { margin-top: clamp(28px, 3vw, 40px); }

/* ---------- Cards, chips, badges ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: clamp(20px, 2.4vw, 28px);
}
.card > * + * { margin-top: 10px; }
.card--tinted { background: var(--primary-light); border-color: var(--primary-line); }
.card--accent { border-top: 3px solid var(--primary); }
.card h3 { font-size: 1.125rem; }

.card-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--primary-light);
  color: var(--primary);
}
.card-icon svg { width: 22px; height: 22px; }
.card--tinted .card-icon { background: var(--surface); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--heading);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.4;
}
.chip--soft { background: var(--page); }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
  vertical-align: middle;
}
.badge--built { background: var(--primary-light); color: var(--primary); }
.badge--enabled { background: var(--divider); color: var(--body); }
.badge--solid { background: var(--primary); color: #FFFFFF; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(48px, 7vw, 96px) clamp(56px, 8vw, 104px);
  background-color: var(--surface);
  background-image: radial-gradient(rgba(79, 70, 229, 0.16) 1px, transparent 1px);
  background-size: 22px 22px;
  border-bottom: 1px solid var(--border);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(55% 60% at 85% 15%, rgba(79, 70, 229, 0.10), transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0.72) 45%, rgba(249, 250, 251, 0.98) 100%);
  pointer-events: none;
}
.hero > .container { position: relative; }
.hero__grid { display: grid; gap: clamp(40px, 5vw, 56px); align-items: center; }
.hero__copy > * + * { margin-top: 20px; }
.hero__copy .lead { max-width: 34em; }
.hero__copy .btn-row { margin-top: 32px; }
.hero__art { width: 100%; max-width: 560px; margin-inline: auto; }

@media (min-width: 960px) {
  .hero__grid { grid-template-columns: 1.05fr 0.95fr; }
}

.page-hero {
  padding-block: clamp(48px, 7vw, 88px) clamp(40px, 6vw, 72px);
  background-color: var(--surface);
  background-image: radial-gradient(rgba(79, 70, 229, 0.14) 1px, transparent 1px);
  background-size: 22px 22px;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.8) 55%, rgba(249, 250, 251, 0.98) 100%);
  pointer-events: none;
}
.page-hero > .container { position: relative; }
.page-hero__copy { max-width: 820px; }
.page-hero__copy > * + * { margin-top: 18px; }
.page-hero .stats { margin-top: 32px; }

/* ---------- Stat row ---------- */

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 16px clamp(24px, 4vw, 48px);
  list-style: none;
  margin: 0;
  padding: 0;
}
.stat { display: flex; align-items: baseline; gap: 8px; }
.stat__num {
  color: var(--primary);
  font-size: clamp(2rem, 1.6rem + 1.4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}
.stat__label { color: var(--heading); font-size: 1rem; font-weight: 500; }
.stats--boxed {
  padding: 20px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
}

/* ---------- Home: ESDM cards ---------- */

.word-card h3 { color: var(--primary); font-size: 1.125rem; }
.closing-line {
  margin-top: clamp(28px, 3vw, 40px);
  padding: 20px 24px;
  border-left: 3px solid var(--primary);
  border-radius: 0 var(--radius-xl) var(--radius-xl) 0;
  background: var(--surface);
  color: var(--heading);
  font-size: 1.0625rem;
  max-width: 820px;
}

/* ---------- Inputs strip ---------- */

.inputs-strip {
  display: grid;
  gap: 16px;
  padding: clamp(20px, 2.4vw, 28px);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--page);
  margin-bottom: clamp(32px, 4vw, 48px);
}
.inputs-strip h3 { font-size: 1.0625rem; }

/* ---------- Journey diagram ---------- */

.journey {
  --j-gap: 48px;
  --j-gutter: 128px;
  --j-io: 40px;
  --j-line: #9CA3AF;
  position: relative;
  margin: 0;
}

.journey__io {
  position: relative;
  z-index: 2;
  padding: 16px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  text-align: center;
}
.journey__io-title { color: var(--heading); font-weight: 600; line-height: 1.4; }
.journey__io-text { margin-top: 2px; font-size: 0.9375rem; }
.journey__io--out { border: 2px solid var(--primary); }

.journey__steps {
  display: grid;
  gap: 32px;
  margin: 32px 0;
  padding: 0;
  list-style: none;
}

.step {
  position: relative;
  z-index: 1;
  padding: 16px 18px 16px 62px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.step--team { background: var(--primary-light); border-color: var(--primary-line); }

.step__num {
  position: absolute;
  left: 16px;
  top: 16px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #FFFFFF;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1;
}
.step--work .step__num { background: var(--heading); }

.step__lane {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 600;
}
.step--team .step__lane { color: var(--primary); }
.step__title { font-size: 1.0625rem; line-height: 1.4; margin-bottom: 4px; }
.step__text { font-size: 0.9375rem; line-height: 1.6; }

/* Mobile connectors: a down arrow under the input box and under every step */
.journey__io--in::after,
.step::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  width: 12px;
  height: 32px;
  margin-left: -6px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M0 0h12L6 8z' fill='%239CA3AF'/%3E%3C/svg%3E") center bottom / 12px 8px no-repeat,
    linear-gradient(var(--j-line), var(--j-line)) center top / 2px calc(100% - 7px) no-repeat;
}

.arrow { display: none; }

.arrow__label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  color: var(--primary);
  font-size: 0.8125rem;
  font-weight: 600;
}
.arrow__label::after { content: " to step 4"; margin-left: -2px; }
.arrow__label::before {
  content: "";
  width: 22px;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--primary) 0 5px, transparent 5px 9px);
}

@media (min-width: 960px) {
  .journey__steps {
    grid-template-columns: 1fr var(--j-gutter) 1fr;
    grid-template-rows: 56px auto var(--j-gap) auto var(--j-gap) auto var(--j-gap) auto;
    gap: 0;
    margin: var(--j-io) 0;
  }

  /* Lane backgrounds and titles (decorative; each step also names its lane for screen readers) */
  .journey__steps::before,
  .journey__steps::after {
    position: relative;
    z-index: 0;
    grid-row: 1 / -1;
    margin: 0 -20px -20px;
    padding: 18px 20px 0;
    border-radius: var(--radius-2xl);
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.3;
  }
  .journey__steps::before {
    content: "SemanticTwin does the work";
    content: "SemanticTwin does the work" / "";
    grid-column: 1;
    border: 1px solid var(--border);
    background: rgba(249, 250, 251, 0.85);
    color: var(--muted);
  }
  .journey__steps::after {
    content: "Your team makes the decisions";
    content: "Your team makes the decisions" / "";
    grid-column: 3;
    border: 1px solid var(--primary-line);
    background: rgba(238, 242, 255, 0.7);
    color: var(--primary);
  }

  .step { grid-column: 1; }
  .step--team { grid-column: 3; background: var(--surface); }
  .step-1 { grid-row: 2; }
  .step-2, .step-3 { grid-row: 4; }
  .step-4, .step-5 { grid-row: 6; }
  .step-6 { grid-row: 8; }

  .step__lane { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

  .journey__io--in::after,
  .step::after { display: none; }

  .arrow { display: block; position: absolute; pointer-events: none; }

  .arrow--in,
  .arrow--down,
  .arrow--out {
    left: 50%;
    width: 12px;
    margin-left: -6px;
    background:
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M0 0h12L6 8z' fill='%239CA3AF'/%3E%3C/svg%3E") center bottom / 12px 8px no-repeat,
      linear-gradient(var(--j-line), var(--j-line)) center top / 2px calc(100% - 7px) no-repeat;
  }
  .arrow--in { left: 76%; bottom: 100%; height: calc(56px + var(--j-io)); }
  .arrow--down { top: 100%; height: var(--j-gap); }
  .arrow--out { top: 100%; height: var(--j-io); }

  .arrow--right,
  .arrow--fwd {
    left: 100%;
    width: var(--j-gutter);
    height: 12px;
    margin-top: -6px;
    background:
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='12' viewBox='0 0 8 12'%3E%3Cpath d='M0 0l8 6-8 6z' fill='%239CA3AF'/%3E%3C/svg%3E") right center / 8px 12px no-repeat,
      linear-gradient(var(--j-line), var(--j-line)) left center / calc(100% - 7px) 2px no-repeat;
  }
  .arrow--right { top: 50%; }
  .arrow--fwd { top: calc(50% - 14px); }

  .arrow--back {
    right: 100%;
    top: calc(50% + 6px);
    width: var(--j-gutter);
    height: 12px;
    margin-top: -6px;
    background:
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='12' viewBox='0 0 8 12'%3E%3Cpath d='M8 0L0 6l8 6z' fill='%234F46E5'/%3E%3C/svg%3E") left center / 8px 12px no-repeat,
      repeating-linear-gradient(90deg, #4F46E5 0 6px, transparent 6px 10px) right center / calc(100% - 7px) 2px no-repeat;
  }

  .arrow__label {
    position: absolute;
    right: 100%;
    top: calc(50% + 16px);
    width: var(--j-gutter);
    margin: 0;
    padding-inline: 0;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
    font-size: 0.75rem;
    line-height: 1.3;
  }
  .arrow__label::after { content: none; }
  .arrow__label::before { display: none; }

  /* Step 3 to step 4: down, across the lanes, down */
  .arrow--elbow {
    top: 100%;
    right: 50%;
    width: calc(100% + var(--j-gutter));
    height: var(--j-gap);
    background:
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M0 0h12L6 8z' fill='%239CA3AF'/%3E%3C/svg%3E") left -5px bottom 0 / 12px 8px no-repeat,
      linear-gradient(var(--j-line), var(--j-line)) right 0 top 0 / 2px 50% no-repeat,
      linear-gradient(var(--j-line), var(--j-line)) left 0 center / 100% 2px no-repeat,
      linear-gradient(var(--j-line), var(--j-line)) left 0 bottom 7px / 2px calc(50% - 6px) no-repeat;
  }
}

/* ---------- Principles and cryptic-to-clear ---------- */

.how-extras { margin-top: clamp(40px, 5vw, 64px); }
.area-stats { display: inline-flex; margin-bottom: clamp(24px, 3vw, 32px); }

.principles { display: grid; gap: 16px; }
.principle { display: flex; gap: 16px; align-items: flex-start; }
.principle > * + * { margin-top: 0; }
.principle p { margin-top: 4px; }

.compare-panel > * + * { margin-top: 14px; }
.compare-panel h3 { font-size: 1.125rem; }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--surface); }
.compare { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.compare th, .compare td { padding: 12px 18px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--divider); }
.compare thead th {
  white-space: nowrap;
  background: var(--page);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.compare tbody tr:last-child td { border-bottom: 0; }
.compare td:first-child { white-space: nowrap; }
.compare td:first-child code { background: transparent; padding: 0; color: var(--primary); }
.caption { font-size: 0.9375rem; color: var(--body); }

/* ---------- Home: use-case area cards ---------- */

.area-card { display: flex; flex-direction: column; }
.area-card h3 { font-size: 1.125rem; }
.area-card__desc { color: var(--body); font-size: 0.9375rem; }
.area-list { list-style: none; margin: 16px 0 0; padding: 16px 0 0; border-top: 1px solid var(--divider); display: grid; gap: 10px; }
.area-list li { display: grid; grid-template-columns: 1fr auto; align-items: start; gap: 10px; font-size: 0.9375rem; color: var(--heading); line-height: 1.45; }
.area-list .badge { margin-top: 1px; }
.area-card--link {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  background: var(--primary);
  border-color: var(--primary);
  color: #FFFFFF;
  text-decoration: none;
  font-size: 1.125rem;
  font-weight: 600;
}
.area-card--link:hover { background: var(--primary-dark); color: #FFFFFF; }
.area-card--link .area-card__big { font-size: 2.75rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1; }

/* ---------- Closing band ---------- */

.cta-section { padding-block: 0 var(--section-y); }
.section--surface + .cta-section, .page-hero + .cta-section { padding-top: var(--section-y); }

.cta-band {
  position: relative;
  overflow: hidden;
  padding: clamp(40px, 6vw, 72px) clamp(20px, 5vw, 64px);
  border: 1px solid var(--primary-line);
  border-radius: var(--radius-2xl);
  background: var(--primary-light);
  text-align: center;
}
.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(79, 70, 229, 0.18) 1px, transparent 1px);
  background-size: 20px 20px;
  -webkit-mask-image: radial-gradient(70% 90% at 50% 50%, transparent 40%, #000 100%);
  mask-image: radial-gradient(70% 90% at 50% 50%, transparent 40%, #000 100%);
  pointer-events: none;
}
.cta-band > * { position: relative; }
.cta-band p { max-width: 36em; margin: 12px auto 28px; }

/* ---------- Footer ---------- */

.site-footer {
  padding-block: 48px 40px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.9375rem;
}
.site-footer__inner { display: grid; gap: 20px 32px; }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 0 20px; list-style: none; margin: 0; padding: 0; }
.site-footer__links a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  color: var(--body);
  text-decoration: none;
}
.site-footer__links a:hover { color: var(--primary); text-decoration: underline; }
.site-footer__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 20px;
  border-top: 1px solid var(--divider);
  color: var(--muted);
}
.site-footer__meta a { color: var(--primary); }
@media (min-width: 768px) {
  .site-footer__inner { grid-template-columns: auto 1fr; align-items: center; }
  .site-footer__links { justify-content: flex-end; }
  .site-footer__meta { grid-column: 1 / -1; }
}

/* ---------- Inner pages ---------- */

.problem-example {
  margin-top: 28px;
  padding: 20px 24px;
  border: 1px solid var(--primary-line);
  border-radius: var(--radius-xl);
  background: var(--primary-light);
  color: var(--heading);
}
.problem-example p + p { margin-top: 8px; }

.analogy {
  display: grid;
  gap: 16px;
  margin-top: clamp(28px, 3vw, 40px);
}
@media (min-width: 800px) { .analogy { grid-template-columns: 1fr 1fr; } }

.blocks { counter-reset: block; }
.block-card { position: relative; }
.block-card__plain { color: var(--heading); font-weight: 500; }
.block-card__example {
  padding-top: 12px;
  border-top: 1px solid var(--divider);
  font-size: 0.9375rem;
}
.block-card__example strong { display: block; color: var(--muted); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 2px; }
.block-card--proof { border: 2px solid var(--primary); }
.block-card__title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }

.reasons { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; counter-reset: reason; }
.reasons li {
  counter-increment: reason;
  position: relative;
  padding: 18px 20px 18px 64px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
}
.reasons li::before {
  content: counter(reason);
  position: absolute;
  left: 18px;
  top: 16px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.9375rem;
}
@media (min-width: 900px) { .reasons { grid-template-columns: 1fr 1fr; } }
.result-note { margin-top: 24px; max-width: 70ch; color: var(--heading); font-weight: 500; }

.takeaways { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.takeaways li {
  position: relative;
  padding-left: 32px;
  color: var(--heading);
}
.takeaways li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35em;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.5l2.5 2.5L13 6.5' fill='none' stroke='%234F46E5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px 18px no-repeat,
    var(--primary-light);
}

.faq { display: grid; gap: 12px; max-width: 860px; }
.faq__item { padding: 20px 24px; border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--surface); }
.faq__item h3 { font-size: 1.0625rem; margin-bottom: 6px; }

.next-step {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
}
.next-step p { color: var(--heading); font-weight: 600; }

/* Inputs by group */
.input-groups { columns: 1; column-gap: 24px; }
@media (min-width: 900px) { .input-groups { columns: 2; } }
.input-group { break-inside: avoid; margin-bottom: 24px; }
.input-group h3 { display: flex; align-items: center; gap: 10px; font-size: 1.0625rem; margin-bottom: 14px; }
.input-group h3 .count {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.8125rem;
  font-weight: 700;
}
.code-note {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px 22px;
  border: 1px solid var(--primary-line);
  border-radius: var(--radius-xl);
  background: var(--primary-light);
  color: var(--heading);
  margin-bottom: 28px;
}
.code-note .card-icon { background: var(--surface); flex: none; }

/* Build phases */
.phases { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
@media (min-width: 800px) { .phases { grid-template-columns: repeat(3, 1fr); gap: 0; } }
.phase {
  position: relative;
  padding: 20px 24px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-xl);
}
.phase__num { color: var(--primary); font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }
.phase__name { color: var(--heading); font-size: 1.125rem; font-weight: 600; margin-top: 2px; }
@media (min-width: 800px) {
  .phase { border-radius: 0; margin-left: -1px; padding-right: 36px; }
  .phase:first-child { border-radius: var(--radius-xl) 0 0 var(--radius-xl); margin-left: 0; }
  .phase:last-child { border-radius: 0 var(--radius-xl) var(--radius-xl) 0; }
  .phase:not(:last-child)::after {
    content: "";
    position: absolute;
    right: -11px;
    top: 50%;
    z-index: 1;
    width: 20px;
    height: 20px;
    margin-top: -10px;
    border-top: 1px solid var(--border);
    border-right: 1px solid var(--border);
    background: var(--surface);
    transform: rotate(45deg);
  }
}

.gates { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.gate {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 10px;
  border: 1px solid var(--primary-line);
  border-radius: 999px;
  background: var(--primary-light);
  color: var(--heading);
  font-size: 0.9375rem;
  font-weight: 600;
}
.gate__mark { width: 12px; height: 12px; background: var(--primary); transform: rotate(45deg); border-radius: 2px; flex: none; }

.subhead { margin: clamp(36px, 4vw, 48px) 0 16px; font-size: 1.25rem; }
.subhead:first-child { margin-top: 0; }

.tier__speed { color: var(--primary); font-size: 0.875rem; font-weight: 600; }

/* Trust */
.confidence { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.confidence li { display: flex; align-items: center; gap: 12px; font-size: 0.9375rem; }
.confidence .badge { min-width: 76px; justify-content: center; }
.dots { display: inline-flex; gap: 4px; }
.dots span { width: 10px; height: 10px; border-radius: 50%; background: var(--primary); }
.dots span.off { background: transparent; border: 1.5px solid var(--decor); }

.ladder { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ladder li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--page);
  font-size: 0.9375rem;
  color: var(--heading);
}
.ladder li:first-child { background: var(--primary-light); border-color: var(--primary-line); font-weight: 600; }
.ladder__rank { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; background: var(--surface); border: 1px solid var(--border); color: var(--primary); font-size: 0.8125rem; font-weight: 700; flex: none; }

/* Playground */
.views { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 700px) { .views { grid-template-columns: repeat(4, 1fr); } }
.view {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  color: var(--heading);
  font-weight: 600;
}
.view svg { width: 100%; height: 64px; }
.panels { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.panels li { display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: baseline; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); font-size: 0.9375rem; }
.panels li strong { color: var(--primary); }

/* What you get */
.docs-list { columns: 2 170px; column-gap: 24px; list-style: none; margin: 0; padding: 0; }
.docs-list li { break-inside: avoid; padding: 6px 0 6px 22px; position: relative; font-size: 0.9375rem; color: var(--heading); }
.docs-list li::before { content: ""; position: absolute; left: 2px; top: 0.85em; width: 8px; height: 8px; background: var(--primary); transform: rotate(45deg); border-radius: 1px; }
.tick-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tick-list li { position: relative; padding-left: 26px; font-size: 0.9375rem; }
.tick-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.3em;
  width: 16px;
  height: 16px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%234F46E5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px 16px no-repeat;
}
.lifecycle { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.lifecycle li { display: inline-flex; align-items: center; gap: 8px; color: var(--heading); font-weight: 600; font-size: 0.9375rem; }
.lifecycle li span { padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); }
.lifecycle li:last-child span { background: var(--primary); border-color: var(--primary); color: #FFFFFF; }
.lifecycle li:not(:last-child)::after { content: "\2192"; color: var(--muted); font-weight: 400; }
.lifecycle-card { margin-top: clamp(24px, 3vw, 32px); }

/* Worked example */
.codes { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.codes li { padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); font-size: 0.9375rem; }
.codes code { display: block; margin-bottom: 4px; padding: 0; background: transparent; color: var(--primary); font-size: 1.0625rem; font-weight: 500; }
.rule-callout { display: flex; gap: 14px; align-items: flex-start; }
.question {
  padding: 20px 24px;
  border-left: 3px solid var(--primary);
  background: var(--surface);
  border-radius: 0 var(--radius-xl) var(--radius-xl) 0;
}
.question__q { color: var(--heading); font-size: 1.125rem; font-weight: 600; }
.question p + p { margin-top: 8px; }

/* Use cases page */
.legend { display: grid; gap: 12px; }
@media (min-width: 760px) { .legend { grid-template-columns: 1fr 1fr; } }
.legend__item { display: flex; gap: 14px; align-items: flex-start; }
.legend__item .badge { margin-top: 3px; }
.legend-note { margin-top: 16px; font-size: 0.9375rem; }

.uc-section__meta { display: flex; flex-wrap: wrap; gap: 8px; }
.uc-card { display: flex; flex-direction: column; }
.uc-card h3 { font-size: 1.0625rem; }
.uc-card__scenario { font-size: 0.9375rem; flex: 1 1 auto; }
.uc-card__today {
  margin-top: 16px !important;
  padding-top: 14px;
  border-top: 1px solid var(--divider);
  font-size: 0.875rem;
}
.uc-card__today p { color: var(--heading); }
.uc-card__label { color: var(--muted) !important; font-size: 0.8125rem; font-weight: 600; margin-bottom: 6px; }
.uc-card__today .badge { margin-right: 6px; }

/* Video */
.video-block { display: grid; gap: clamp(24px, 4vw, 48px); align-items: center; }
@media (min-width: 960px) { .video-block { grid-template-columns: 0.8fr 1.2fr; } }
.video-block__copy > * + * { margin-top: 14px; }
.video { margin: 0; }
.video__poster, .video__frame {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: var(--radius-xl);
  background: #1E1B4B;
}
.video__poster {
  position: relative;
  overflow: hidden;
  color: #FFFFFF;
  text-decoration: none;
  box-shadow: var(--shadow-md);
}
.video__art { position: absolute; inset: 0; }
.video__art svg { width: 100%; height: 100%; }
.video__play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px 12px 14px;
  border-radius: 999px;
  background: #FFFFFF;
  color: var(--primary);
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.25);
  white-space: nowrap;
}
.video__play svg { width: 28px; height: 28px; }
.video__poster:hover .video__play { background: var(--primary-light); }
.video figcaption { margin-top: 10px; color: var(--muted); font-size: 0.875rem; }

/* Forms */
.form-layout { display: grid; gap: clamp(32px, 5vw, 64px); align-items: start; }
@media (min-width: 960px) { .form-layout { grid-template-columns: 1.2fr 0.8fr; } }
.form { display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
.field label { color: var(--heading); font-weight: 600; font-size: 0.9375rem; }
.field .optional { color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid #9CA3AF;
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--heading);
  font: inherit;
  font-size: 1rem;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--primary); outline-offset: 1px; border-color: var(--primary); }
.field [aria-invalid="true"] { border-color: #B91C1C; }
.field__error { color: #B91C1C; font-size: 0.875rem; font-weight: 500; min-height: 0; }
.field__error:empty { display: none; }
.form__row { display: grid; gap: 18px; }
@media (min-width: 640px) { .form__row { grid-template-columns: 1fr 1fr; } }
.form__note { color: var(--muted); font-size: 0.875rem; }
.form__privacy { color: var(--body); font-size: 0.875rem; }
.form-card { padding: clamp(20px, 3vw, 36px); }
.hp-field { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.aside-card > * + * { margin-top: 12px; }

/* Legal and utility pages */
.legal { max-width: 760px; }
.legal h2 { font-size: 1.375rem; margin-top: 2em; margin-bottom: 0.5em; }
.legal ul { padding-left: 1.25em; }
.legal li + li { margin-top: 6px; }
.legal p + p { margin-top: 0.9em; }
.updated { color: var(--muted); font-size: 0.9375rem; }

.link-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; max-width: 520px; }
.link-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--heading);
  font-weight: 600;
  text-decoration: none;
}
.link-list a:hover { border-color: var(--primary); color: var(--primary); }
.link-list a::after { content: "\2192"; color: var(--primary); }

/* ---------- Page-level additions ---------- */

.h3 { font-size: 1.25rem; line-height: 1.35; font-weight: 600; letter-spacing: -0.01em; }
.word-card h4 { color: var(--primary); font-size: 1.125rem; }
.split > .problem-example { margin-top: 0; }
@media (min-width: 960px) { .split--wide-left > .problem-example { margin-top: 64px; } }
.blocks .block-card--proof { grid-column: 1 / -1; }
@media (min-width: 900px) {
  .blocks .block-card--proof { display: grid; grid-template-columns: 1fr 1fr 2fr; gap: 24px; align-items: start; }
  .blocks .block-card--proof > * + * { margin-top: 0; }
  .blocks .block-card--proof .block-card__example { padding-top: 0; border-top: 0; padding-left: 24px; border-left: 1px solid var(--divider); }
}
.on-this-page { margin-top: 28px; }
.on-this-page p { color: var(--muted); font-size: 0.875rem; font-weight: 600; margin-bottom: 10px; }
.on-this-page a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--heading);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
}
.on-this-page a:hover { border-color: var(--primary); color: var(--primary); }
.panel-notes { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; }
.panel-notes li { padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); font-size: 0.9375rem; }
.panel-notes strong { color: var(--primary); }
.mode-grid { display: grid; gap: 16px; }
@media (min-width: 960px) { .mode-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
.mode-grid .grid { gap: 12px; }
.mode-grid .card h4 { font-size: 1.0625rem; }
.example-head { display: grid; gap: 24px; align-items: start; margin-bottom: 24px; }
@media (min-width: 960px) { .example-head { grid-template-columns: 1.2fr 0.8fr; } }
.example-stats { flex-direction: column; gap: 12px; }
.example-stats .stat__label { font-size: 0.9375rem; }
.example-stats + p { margin-top: 10px; }
.example-grid { margin-top: 24px; }
.uc-legend-title { margin-bottom: 16px; }
.section-head + .subhead { margin-top: 0; }
.gates-intro { margin-bottom: 14px; }
.mode-grid { margin-top: clamp(36px, 4vw, 48px); }
.page-hero .stats { margin-top: 28px; }
.legal > h2:first-child { margin-top: 0; }
@media (max-width: 479.98px) {
  .hero .btn-row .btn { flex: 1 1 100%; }
}

/* ==========================================================================
   Use cases page: the layout of the "Build once, use everywhere" deck.
   Stage colours follow the deck's request → quote → order thread.
   ========================================================================== */

:root {
  --request-fill: #CFFAFE; --request-line: #0891B2; --request-ink: #155E75;
  --quote-fill: #FFEDD5;   --quote-line: #EA580C;   --quote-ink: #9A3412;
  --order-fill: #EDE9FE;   --order-line: #7C3AED;   --order-ink: #5B21B6;
  --uc-bar-h: 60px;
}

/* Play icon used on buttons, tiles and the matrix */
.uc-play { flex: none; width: 22px; height: 22px; }
.uc-play__bg { fill: currentColor; }
.uc-play__tri { fill: #FFFFFF; }
.uc-icon { width: 22px; height: 22px; flex: none; }
.uc-icon--sm { width: 18px; height: 18px; }

/* Hero: copy and the area hub */
.uc-hero__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(36px, 5vw, 56px); align-items: center; }
@media (min-width: 1024px) { .uc-hero__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.uc-hero .page-hero__copy { max-width: 640px; }
.uc-hero .uc-hero__actions { margin-top: 28px; }
.uc-stats { gap: 10px; }
.uc-stat {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.uc-stat:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); }
.uc-stat .stat__num { font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.25rem); }
@media (max-width: 479.98px) {
  .uc-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .uc-stat { flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; height: 100%; padding: 10px 14px; }
  .uc-stat .stat__label { font-size: 0.875rem; }
}

.uc-hub { width: 100%; max-width: 560px; margin: 0 auto; container-type: inline-size; }
.uc-hub__stage { position: relative; }
.uc-hub__lines { display: none; }
.uc-hub__core {
  display: grid;
  place-items: center;
  width: 150px;
  aspect-ratio: 1 / 0.866;
  margin: 0 auto 16px;
  padding: 0 18px;
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
  background: #1E1B4B;
  color: #FFFFFF;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
}
.uc-hub__nodes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.uc-hub__node a {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  height: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--heading);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.uc-hub__node a:hover, .uc-hub__node a:focus-visible { border-color: var(--primary); color: var(--primary); }
.uc-hub__icon { flex: none; width: 20px; height: 20px; color: var(--primary); }
.uc-hub__name { flex: 1 1 auto; min-width: 0; overflow-wrap: break-word; }
.uc-hub__count {
  flex: none;
  min-width: 26px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.75rem;
  text-align: center;
}
@container (max-width: 399.98px) { .uc-hub__count { display: none; } }
@container (min-width: 500px) {
  .uc-hub__stage { aspect-ratio: 560 / 450; }
  .uc-hub__lines { display: block; position: absolute; inset: 0; width: 100%; height: 100%; }
  .uc-hub__line { fill: none; stroke: var(--primary-line); stroke-width: 2; stroke-dasharray: 5 5; transition: stroke 0.15s ease; }
  .uc-hub__core { position: absolute; left: 50%; top: 54.44%; width: 26%; margin: 0; transform: translate(-50%, -50%); }
  .uc-hub__nodes { display: block; }
  .uc-hub__node { position: absolute; width: 30%; transform: translate(-50%, -50%); }
  .uc-hub__node a { flex-direction: column; justify-content: center; gap: 3px; padding: 8px; text-align: center; }
  .uc-hub__node--1 { left: 50%;     top: 11.11%; }
  .uc-hub__node--2 { left: 83.57%;  top: 30%; }
  .uc-hub__node--3 { left: 83.57%;  top: 56.67%; }
  .uc-hub__node--4 { left: 83.57%;  top: 83.33%; }
  .uc-hub__node--5 { left: 16.43%;  top: 83.33%; }
  .uc-hub__node--6 { left: 16.43%;  top: 56.67%; }
  .uc-hub__node--7 { left: 16.43%;  top: 30%; }
  .uc-hub:has(.uc-hub__node--1 a:hover, .uc-hub__node--1 a:focus-visible) .uc-hub__line--1,
  .uc-hub:has(.uc-hub__node--2 a:hover, .uc-hub__node--2 a:focus-visible) .uc-hub__line--2,
  .uc-hub:has(.uc-hub__node--3 a:hover, .uc-hub__node--3 a:focus-visible) .uc-hub__line--3,
  .uc-hub:has(.uc-hub__node--4 a:hover, .uc-hub__node--4 a:focus-visible) .uc-hub__line--4,
  .uc-hub:has(.uc-hub__node--5 a:hover, .uc-hub__node--5 a:focus-visible) .uc-hub__line--5,
  .uc-hub:has(.uc-hub__node--6 a:hover, .uc-hub__node--6 a:focus-visible) .uc-hub__line--6,
  .uc-hub:has(.uc-hub__node--7 a:hover, .uc-hub__node--7 a:focus-visible) .uc-hub__line--7 {
    stroke: var(--primary);
    stroke-dasharray: none;
  }
}

/* Buttons that play a video */
.btn .uc-play { width: 22px; height: 22px; }
.btn--primary .uc-play { color: #FFFFFF; }
.btn--primary .uc-play__tri { fill: var(--primary); }

/* Five-video strip */
.video-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(240px, 78%);
  gap: 16px;
  margin: 0 calc(-1 * var(--gutter));
  padding: 4px var(--gutter) 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
}
.video-tile { display: flex; flex-direction: column; gap: 4px; scroll-snap-align: start; }
@media (min-width: 640px) {
  .video-strip { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; padding: 0; overflow: visible; gap: 24px 20px; }
}
@media (min-width: 900px) { .video-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1140px) { .video-strip { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.video-tile__poster {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #1E1B4B;
  box-shadow: var(--shadow-md);
  color: #FFFFFF;
  text-decoration: none;
}
.video-tile__art { position: absolute; inset: 0; width: 100%; height: 100%; }
.video-tile__play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); transition: transform 0.15s ease; }
.video-tile__play .uc-play { width: 52px; height: 52px; color: #FFFFFF; filter: drop-shadow(0 6px 16px rgba(17, 24, 39, 0.35)); }
.video-tile__play .uc-play__tri { fill: var(--primary); }
.video-tile__poster:hover .video-tile__play { transform: translate(-50%, -50%) scale(1.06); }
.video-tile__dur {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(17, 24, 39, 0.78);
  color: #FFFFFF;
  font-size: 0.75rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.video-tile__area { margin-top: 10px; color: var(--muted); font-size: 0.8125rem; font-weight: 600; }
.video-tile__title { font-size: 1.0625rem; line-height: 1.3; }
.video-tile__link { font-size: 0.875rem; line-height: 1.4; }
.video-strip__note { margin-top: 16px; color: var(--muted); font-size: 0.875rem; }

/* One process: request → quote → order */
.stage-strip { display: grid; gap: 28px; }
@media (min-width: 760px) { .stage-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 44px; } }
.stage { position: relative; padding: 18px 20px 20px; border: 1.5px solid; border-radius: var(--radius-xl); }
.stage--request { background: var(--request-fill); border-color: var(--request-line); }
.stage--quote   { background: var(--quote-fill);   border-color: var(--quote-line); }
.stage--order   { background: var(--order-fill);   border-color: var(--order-line); }
.stage__n {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #FFFFFF;
  font-size: 0.875rem;
  font-weight: 700;
}
.stage__name { margin-top: 8px; font-size: 1.125rem; }
.stage--request .stage__n, .stage--request .stage__name { color: var(--request-ink); }
.stage--quote .stage__n,   .stage--quote .stage__name   { color: var(--quote-ink); }
.stage--order .stage__n,   .stage--order .stage__name   { color: var(--order-ink); }
.stage p { margin-top: 4px; color: var(--heading); font-size: 0.9375rem; }
.stage + .stage::before, .stage + .stage::after { content: ""; position: absolute; }
.stage + .stage::before { left: calc(50% - 1px); top: -24px; width: 2px; height: 12px; background: var(--decor); }
.stage + .stage::after { left: calc(50% - 6px); top: -13px; border-top: 8px solid var(--decor); border-left: 6px solid transparent; border-right: 6px solid transparent; }
@media (min-width: 760px) {
  .stage + .stage::before { left: -36px; top: calc(50% - 1px); width: 20px; height: 2px; }
  .stage + .stage::after { left: -17px; top: calc(50% - 6px); border-top: 6px solid transparent; border-bottom: 6px solid transparent; border-left: 8px solid var(--decor); border-right: 0; }
}

/* What an AI assistant sees: without / with a model */
.model-toggle {
  margin-top: clamp(32px, 4vw, 48px);
  padding: clamp(18px, 3vw, 32px);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  background: var(--page);
}
.model-toggle__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-bottom: 20px; }
.model-toggle__title { font-size: 1.125rem; }
.segmented, .uc-switch {
  display: inline-flex;
  flex: none;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
}
.segmented button, .uc-switch button {
  min-height: 38px;
  padding: 4px 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--body);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.segmented button:hover, .uc-switch button:hover { color: var(--primary); }
.segmented button[aria-pressed="true"], .uc-switch button[aria-pressed="true"] { background: var(--primary); color: #FFFFFF; }
.uc-switch .n { margin-left: 2px; font-size: 0.8125rem; opacity: 0.8; }
@media (max-width: 419.98px) {
  .segmented, .uc-switch { display: flex; width: 100%; }
  .segmented button, .uc-switch button { flex: 1 1 0; min-width: 0; padding: 4px 6px; font-size: 0.8125rem; }
}
.model-toggle__panels { display: grid; gap: 20px; }
@media (min-width: 900px) { .model-toggle__panels { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.model-toggle.is-enhanced .model-toggle__panels { grid-template-columns: minmax(0, 1fr); }
.model-panel { margin: 0; padding: clamp(16px, 2.4vw, 24px); border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--surface); }
.model-panel > * + * { margin-top: 14px; }
.model-panel__title { font-size: 1rem; }
.model-toggle.is-enhanced .model-panel__title {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.model-toggle.is-enhanced .model-panel > .model-panel__bubble { margin-top: 0; }
.model-panel__bubble {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 14px 14px 14px 4px;
  background: #FEF2F2;
  color: #991B1B;
  font-size: 0.9375rem;
  font-weight: 600;
}
.model-panel__bubble code { background: rgba(255, 255, 255, 0.7); }
.model-panel__bubble--ok { background: #F0FDF4; color: #166534; }
.model-table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.model-table th {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-align: left;
  text-transform: uppercase;
}
.model-table td { padding: 10px 12px; border-bottom: 1px solid var(--divider); }
.model-table tr:last-child td { border-bottom: 0; }
.guess { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #FEE2E2; color: #B91C1C; font-weight: 700; }
.thing { display: inline-flex; padding: 3px 10px; border-radius: 999px; font-size: 0.875rem; font-weight: 600; white-space: nowrap; }
@media (max-width: 479.98px) {
  .model-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .model-table, .model-table tbody, .model-table tr, .model-table td { display: block; }
  .model-table tr { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 10px 0; border-bottom: 1px solid var(--divider); }
  .model-table tr:last-child { border-bottom: 0; }
  .model-table td { padding: 0; border: 0; }
}
.thing--request { background: var(--request-fill); color: var(--request-ink); }
.thing--quote   { background: var(--quote-fill);   color: var(--quote-ink); }
.thing--order   { background: var(--order-fill);   color: var(--order-ink); }
.model-panel figcaption { font-size: 0.9375rem; }
@media (min-width: 900px) {
  .model-toggle.is-enhanced .model-panel { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); grid-template-rows: auto 1fr; column-gap: 36px; align-items: start; }
  .model-toggle.is-enhanced .model-panel > * + * { margin-top: 0; }
  .model-toggle.is-enhanced .model-panel__bubble { grid-column: 1; grid-row: 1; justify-self: start; }
  .model-toggle.is-enhanced .model-panel figcaption { grid-column: 1; grid-row: 2; margin-top: 16px; }
  .model-toggle.is-enhanced .model-table { grid-column: 2; grid-row: 1 / 3; }
}

/* Area by area: sticky area tabs and the Built in / Enabled switch */
.uc-areas { padding-top: 0; }
.uc-toolbar {
  position: sticky;
  top: var(--header-h);
  z-index: 40;
  margin-bottom: clamp(28px, 4vw, 44px);
  border-bottom: 1px solid var(--border);
  background: rgba(249, 250, 251, 0.96);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.uc-toolbar__inner { display: flex; align-items: center; gap: 16px; min-height: var(--uc-bar-h); }
.uc-tabs { flex: 1 1 auto; min-width: 0; }
.uc-tabs ul { position: relative; display: flex; gap: 4px; margin: 0; padding: 10px 4px; overflow-x: auto; scrollbar-width: thin; scroll-padding-inline: 4px; }
.uc-tabs a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 6px 12px 6px 6px;
  border-radius: 999px;
  color: var(--body);
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
}
.uc-tabs a:hover { background: var(--primary-light); color: var(--primary); }
.uc-tabs a[aria-current="true"] { background: var(--primary); color: #FFFFFF; }
.uc-tabs__n {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--heading);
  font-size: 0.75rem;
  font-weight: 700;
}
.uc-tabs a[aria-current="true"] .uc-tabs__n { border-color: transparent; background: rgba(255, 255, 255, 0.2); color: #FFFFFF; }
@media (max-width: 1279.98px) { .uc-switch--bar { display: none !important; } }
@media (min-width: 1280px) { .uc-switch--inline, .uc-filter-note { display: none !important; } }
.uc-filter-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  min-height: 36px;
  padding: 4px 6px 4px 12px;
  border: 1px solid var(--primary-line);
  border-radius: 999px;
  background: var(--primary-light);
  color: var(--primary-dark);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.uc-filter-note__reset { padding: 3px 10px; border-radius: 999px; background: var(--primary); color: #FFFFFF; }
.uc-filter-note:hover .uc-filter-note__reset { background: var(--primary-dark); }
.uc-areas__intro { margin-bottom: clamp(36px, 5vw, 56px); }
.uc-areas__intro .legend { align-items: start; }
.uc-areas__intro .uc-switch { margin-top: 16px; }

.uc-chapter { scroll-margin-top: calc(var(--uc-bar-h) + 8px); }
.uc-chapter + .uc-chapter { margin-top: clamp(56px, 7vw, 88px); padding-top: clamp(40px, 5vw, 64px); border-top: 1px solid var(--border); }
.uc-chapter__head { max-width: 820px; margin-bottom: 24px; }
.uc-chapter__head > * + * { margin-top: 10px; }
.uc-chapter__kicker { display: flex; align-items: center; gap: 10px; color: var(--primary); font-size: 0.875rem; font-weight: 600; }
.uc-chapter__icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--primary-light); }
.uc-chapter__body { display: grid; gap: 24px; align-items: start; }
@media (max-width: 1023.98px) { .uc-chapter__art { max-width: 560px; } }
@media (min-width: 1024px) {
  .uc-chapter__body { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px; }
  .uc-chapter__art { position: sticky; top: calc(var(--header-h) + var(--uc-bar-h) + 24px); }
}
.uc-chapter__art { margin: 0; padding: clamp(10px, 2vw, 16px); border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--surface); }
.uc-art { width: 100%; height: auto; }
.uc-chapter__art figcaption { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--divider); font-size: 0.9375rem; }
.uc-chapter__cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.uc-card { scroll-margin-top: calc(var(--uc-bar-h) + 16px); }
.uc-card[data-video] { border-color: var(--primary-line); }
.uc-card:target { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.25); animation: uc-flash 1.8s ease-out; }
@keyframes uc-flash { from { background-color: var(--primary-light); } to { background-color: var(--surface); } }
.uc-card__watch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  min-height: 40px;
  margin-top: 16px !important;
  padding: 6px 14px 6px 8px;
  border-radius: 999px;
  background: var(--primary);
  color: #FFFFFF;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
}
.uc-card__watch:hover { background: var(--primary-dark); color: #FFFFFF; }
.uc-card__watch .uc-play { width: 24px; height: 24px; color: #FFFFFF; }
.uc-card__watch .uc-play__tri { fill: var(--primary); }
.uc-card__dur { opacity: 0.85; font-weight: 500; }
.uc-empty { display: none; padding: 20px; border: 1px dashed #D1D5DB; border-radius: var(--radius-xl); color: var(--muted); font-size: 0.9375rem; }
#areas[data-showing="built"] .uc-card[data-status="enabled"],
#areas[data-showing="enabled"] .uc-card[data-status="built"] { display: none; }
#areas[data-showing="enabled"] .uc-empty { display: block; }

/* All 34 at a glance */
.uc-matrix { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.uc-matrix th, .uc-matrix td { padding: 14px 18px; border-bottom: 1px solid var(--divider); text-align: left; vertical-align: top; }
.uc-matrix thead th { background: var(--page); color: var(--heading); font-size: 0.875rem; white-space: nowrap; }
.uc-matrix tbody tr:last-child > * { border-bottom: 0; }
.uc-matrix tbody th { width: 22%; font-weight: 600; }
.uc-matrix tbody th a { color: var(--heading); text-decoration: none; }
.uc-matrix tbody th a:hover { color: var(--primary); text-decoration: underline; }
.uc-matrix td { width: 39%; }
.uc-matrix__n { margin-left: 4px; color: var(--muted); font-weight: 600; }
.uc-matrix__list { display: grid; gap: 6px; }
.uc-matrix__list li { line-height: 1.45; }
.uc-nowrap { white-space: nowrap; }
.uc-matrix__list .uc-play { display: inline-block; width: 15px; height: 15px; margin-left: 6px; vertical-align: -2px; color: var(--primary); }
.uc-matrix__key .uc-play { width: 16px; height: 16px; color: var(--primary); }
.uc-matrix__none { color: var(--decor); }
.uc-matrix__key { display: flex; align-items: center; gap: 6px; margin-top: 12px; color: var(--muted); font-size: 0.875rem; }
@media (max-width: 759.98px) {
  .uc-matrix thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .uc-matrix, .uc-matrix tbody, .uc-matrix tr, .uc-matrix th, .uc-matrix td { display: block; width: auto; }
  .uc-matrix tr { padding: 16px 18px; border-bottom: 1px solid var(--divider); }
  .uc-matrix tbody tr:last-child { border-bottom: 0; }
  .uc-matrix th, .uc-matrix td { padding: 0; border: 0; }
  .uc-matrix tbody th, .uc-matrix td { width: auto; }
  .uc-matrix td { margin-top: 12px; }
  .uc-matrix td::before {
    content: attr(data-label);
    display: inline-flex;
    margin-bottom: 8px;
    padding: 2px 9px;
    border-radius: 999px;
    background: var(--divider);
    color: var(--body);
    font-size: 0.75rem;
    font-weight: 600;
  }
  .uc-matrix td:nth-of-type(1)::before { background: var(--primary-light); color: var(--primary); }
  .uc-matrix__none { display: none !important; }
}

/* One rule, every team */
.rule-map { position: relative; max-width: 1040px; margin-inline: auto; }
.rule-map__lines { display: none; }
.rule-map__rule {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  max-width: 360px;
  margin: 0 auto 20px;
  padding: 20px 24px;
  border: 2px solid var(--primary);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  text-align: center;
}
.rule-map__label { color: var(--primary); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.rule-map__text { color: var(--heading); font-size: clamp(1.125rem, 1rem + 0.6vw, 1.375rem); font-weight: 700; line-height: 1.3; }
.rule-map__uses { display: grid; gap: 14px; }
.rule-use { padding: 18px 20px; border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--surface); transition: border-color 0.15s ease; }
.rule-use > * + * { margin-top: 8px; }
.rule-use__area { display: flex; align-items: center; gap: 8px; color: var(--primary); font-size: 0.875rem; font-weight: 600; }
.rule-use__case { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding-top: 10px; border-top: 1px solid var(--divider); }
.rule-use__case a { font-weight: 600; }
.rule-use:hover, .rule-use:focus-within { border-color: var(--primary); }
@media (min-width: 1024px) {
  .rule-map__lines { display: block; position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
  .rule-map__line { stroke: var(--primary-line); stroke-width: 3; vector-effect: non-scaling-stroke; transition: stroke 0.15s ease; }
  .rule-map__uses { position: relative; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 36%; row-gap: 32px; }
  .rule-use { position: relative; z-index: 1; }
  .rule-map__rule { position: absolute; left: 50%; top: 50%; z-index: 2; width: 30%; max-width: none; margin: 0; transform: translate(-50%, -50%); }
  .rule-map:has(.rule-use--1:hover, .rule-use--1:focus-within) .rule-map__line--1,
  .rule-map:has(.rule-use--2:hover, .rule-use--2:focus-within) .rule-map__line--2,
  .rule-map:has(.rule-use--3:hover, .rule-use--3:focus-within) .rule-map__line--3,
  .rule-map:has(.rule-use--4:hover, .rule-use--4:focus-within) .rule-map__line--4 { stroke: var(--primary); }
}

/* MCP spotlight */
.mcp-flow { margin: 0; container-type: inline-size; }
.mcp-flow__steps { display: grid; gap: 30px; }
.mcp-flow__box {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
}
.mcp-flow__box--core { border-color: #1E1B4B; background: #1E1B4B; box-shadow: var(--shadow-md); }
.mcp-flow__kicker { color: var(--primary); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.mcp-flow__name { color: var(--heading); font-weight: 600; line-height: 1.35; }
.mcp-flow__box--core .mcp-flow__kicker { color: #A5B4FC; }
.mcp-flow__box--core .mcp-flow__name { color: #FFFFFF; }
.mcp-flow__box + .mcp-flow__box::before { content: ""; position: absolute; left: calc(50% - 1px); top: -26px; width: 2px; height: 14px; background: var(--decor); }
.mcp-flow__box + .mcp-flow__box::after { content: ""; position: absolute; left: calc(50% - 6px); top: -14px; border-top: 8px solid var(--decor); border-left: 6px solid transparent; border-right: 6px solid transparent; }
@container (min-width: 520px) {
  .mcp-flow__steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px; align-items: stretch; }
  .mcp-flow__box { justify-content: center; padding: 18px 16px; }
  .mcp-flow__box + .mcp-flow__box::before { left: -29px; top: calc(50% - 1px); width: 16px; height: 2px; }
  .mcp-flow__box + .mcp-flow__box::after { left: -14px; top: calc(50% - 6px); border-top: 6px solid transparent; border-bottom: 6px solid transparent; border-left: 8px solid var(--decor); border-right: 0; }
}
.uc-spot-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }

/* Key takeaways */
.uc-takeaways { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.uc-takeaway { display: flex; gap: 14px; align-items: flex-start; }
.uc-takeaway > * + * { margin-top: 0; }
.uc-takeaway p { color: var(--heading); }
.uc-takeaway__icon { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--primary-light); color: var(--primary); }
.uc-takeaway__icon .uc-icon { width: 18px; height: 18px; }

/* Video player dialog */
.video-dialog {
  width: min(960px, calc(100vw - 32px), calc((100vh - 92px) * 16 / 9));
  width: min(960px, calc(100vw - 32px), calc((100dvh - 92px) * 16 / 9));
  max-width: none;
  max-height: calc(100vh - 16px);
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: var(--radius-xl);
  background: #0B0A1F;
  color: #FFFFFF;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}
.video-dialog::backdrop { background: rgba(17, 24, 39, 0.75); }
.video-dialog__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 8px 8px 18px; }
.video-dialog__title { color: #FFFFFF; font-size: 1rem; font-weight: 600; }
.video-dialog__close {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #FFFFFF;
  cursor: pointer;
}
.video-dialog__close:hover { background: rgba(255, 255, 255, 0.12); }
.video-dialog__close svg { width: 20px; height: 20px; }
.video-dialog :focus-visible { outline-color: #FFFFFF; }
.video-dialog__frame { aspect-ratio: 16 / 9; background: #000000; }
.video-dialog__frame iframe { display: block; width: 100%; height: 100%; border: 0; }
