
:root {
  --bg: #f3f2f6;
  --surface: #ffffff;
  --text: #141318;
  --muted: #6b6a76;
  --line: #e6e5ec;

  --dark: #1b1a21;
  --dark-text: rgba(255, 255, 255, .62);
  --dark-line: rgba(255, 255, 255, .14);

  --accent: #6d28d9;
  --accent-hover: #5b21b6;
  --accent-soft: #ede9fe;
  --accent-tint: rgba(109, 40, 217, .045);
  --accent-ring: rgba(109, 40, 217, .10);
  --accent-text: #ffffff;
  --warn: #c2410c;

  --radius: 12px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  --shadow: 0 1px 2px rgba(28, 27, 34, .04), 0 8px 24px rgba(28, 27, 34, .04);
  --shadow-accent: 0 8px 20px rgba(109, 40, 217, .26);
  --ring: inset 0 0 0 1px var(--line);

  --measure: 68ch;

  --header-h: 68px;
  --container: 1140px;
  --gutter: 20px;
  --logo-h: 36px;
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
}

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

a { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }

::selection { background: var(--accent); color: var(--accent-text); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 110;
  padding: 8px 16px;
  background: var(--dark);
  color: #fff;
}
.skip-link:focus { left: 16px; top: 16px; }

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


/* Buttons
   ========================================================================== */

.btn {
  /* also applies to <button>, which otherwise inherits the UA font and padding */
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-size: 14px;
  line-height: 1;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .1s;
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
  box-shadow: var(--shadow-accent);
}
.btn--primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  box-shadow: 0 10px 24px rgba(109, 40, 217, .32);
}

.btn--ghost {
  background: var(--surface);
  border-color: var(--line);
  color: var(--text);
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn--lg { padding: 15px 30px; font-size: 15px; }


/* Header
   ========================================================================== */

.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--bg);
  box-shadow: 0 1px 0 var(--line);
}

.header__inner {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  text-decoration: none;
}
.logo img { height: var(--logo-h); width: auto; }

.header__menu { flex: 1; }

.header__menu ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.header__menu a:not(.btn) {
  color: inherit;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
}
.header__menu a:not(.btn):hover,
.header__menu a:not(.btn)[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.header__menu-cta { display: none; }
.header__menu-cta .btn { width: 100%; }

.header__actions { display: flex; align-items: center; gap: 10px; }

.header__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  margin-left: auto;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}
.header__burger span {
  display: block;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}


/* Hero
   ========================================================================== */

.hero {
  width: calc(100% - var(--gutter) * 2);
  max-width: var(--container);
  margin: calc(var(--header-h) + 12px) auto 0;
  padding: 68px 44px 76px;
  border-radius: var(--radius-lg);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.055'/%3E%3C/svg%3E") repeat,
    linear-gradient(125deg, #e7e0ff 0%, #f1ecff 48%, #fbf8ff 100%);
  background-size: 160px 160px, auto;
  box-shadow: inset 0 0 0 1px var(--accent-ring);
}
.hero > .container { max-width: none; padding: 0; }

.hero__title {
  margin: 0 0 18px;
  max-width: 820px;
  font-size: clamp(34px, 5.4vw, 58px);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -.025em;
  text-wrap: balance;
}
.hero__text {
  margin: 0 0 32px;
  max-width: 580px;
  font-size: 17px;
  color: var(--muted);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }


/* Content
   ========================================================================== */

.section { padding: 80px 0; }

.prose > *:first-child { margin-top: 0; }
.prose > *:last-child { margin-bottom: 0; }

.prose h2 {
  margin: 56px 0 16px;
  font-size: clamp(23px, 3vw, 32px);
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -.02em;
}
.prose h3 { margin: 38px 0 10px; font-size: 19px; line-height: 1.3; font-weight: 700; }
.prose p { margin: 0 0 18px; }
.prose a:not(.btn) { color: var(--accent); }

.prose ul,
.prose ol { margin: 0 0 18px; padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose li::marker { color: var(--accent); }

/* Reading measure: running text stays at ~68 characters,
   while tables, figures and chip rows keep the full column width. */
.prose p,
.prose ul:not(.chips),
.prose ol,
.prose blockquote { max-width: var(--measure); }

.prose h2,
.prose h3 { text-wrap: balance; }
.prose p,
.prose li { text-wrap: pretty; }

.steps,
.prose .steps { margin: 0 0 18px; padding-left: 0; list-style: none; counter-reset: step; }
.steps li {
  position: relative;
  margin-bottom: 12px;
  padding-left: 42px;
}
.steps li::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position: absolute;
  top: 0;
  left: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  font-variant-numeric: tabular-nums;
  /* same line box as the 16px/1.7 body text, so the number sits on the
     first line's baseline instead of ~3px above it */
  line-height: calc(16px * 1.7);
  color: var(--accent);
}

.chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 16px; padding: 0; list-style: none; }
.chips li {
  margin: 0;
  padding: 9px 18px;
  background: var(--surface);
  border-radius: var(--radius-pill);
  box-shadow: var(--ring);
  font-size: 14px;
  line-height: 1.3;
  transition: box-shadow .15s;
}
.chips li:has(a:hover) { box-shadow: inset 0 0 0 1px var(--accent); }

.prose blockquote {
  margin: 24px 0;
  padding: 4px 0 4px 18px;
  border-left: 3px solid var(--accent);
  color: var(--muted);
}

.prose figure { margin: 28px 0; }
.prose figcaption { margin-top: 8px; font-size: 14px; color: var(--muted); }
.prose img { border-radius: var(--radius); box-shadow: var(--ring); }

.table-wrap {
  margin: 0 0 18px;
  overflow-x: auto;
  border-radius: var(--radius);
  box-shadow: var(--ring);
  background-color: var(--surface);
  /* Edge shadows that appear only while the table can still be scrolled:
     the two "cover" layers scroll with the content (background-attachment:
     local) and hide the shadows once you reach that end. No JS. */
  background-image:
    linear-gradient(to right, var(--surface) 30%, rgba(255, 255, 255, 0)),
    linear-gradient(to left, var(--surface) 30%, rgba(255, 255, 255, 0)),
    radial-gradient(farthest-side at 0 50%, rgba(20, 19, 24, .13), rgba(20, 19, 24, 0)),
    radial-gradient(farthest-side at 100% 50%, rgba(20, 19, 24, .13), rgba(20, 19, 24, 0));
  background-position: left center, right center, left center, right center;
  background-repeat: no-repeat;
  background-size: 44px 100%, 44px 100%, 15px 100%, 15px 100%;
  background-attachment: local, local, scroll, scroll;
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}
.prose th,
.prose td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--line); }
.prose th {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--accent);
  background: var(--accent-soft);
  white-space: nowrap;
}
.prose tbody tr:last-child td { border-bottom: 0; }
.prose tbody tr:hover td { background: var(--accent-tint); }


/* Offer bar
   ========================================================================== */

body.has-offer-bar .footer { padding-bottom: 104px; }

.offer-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 12px 48px calc(12px + env(safe-area-inset-bottom, 0px)) 16px;
  background: var(--dark);
  color: #fff;
  box-shadow: 0 -6px 20px rgba(0, 0, 0, .25);
}
.offer-bar[hidden] { display: none; }
.offer-bar img { flex: none; border-radius: 6px; }
.offer-bar__text { margin: 0; line-height: 1.3; }
.offer-bar__btn { flex: none; white-space: nowrap; }

.offer-bar__close {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: 0;
  background: none;
  color: inherit;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  opacity: .7;
}
.offer-bar__close:hover { opacity: 1; }


/* Footer
   ========================================================================== */

.footer {
  margin-top: 24px;
  padding: 36px 0 28px;
  background: var(--dark);
  color: var(--dark-text);
  font-size: 14px;
}
.footer__links { display: flex; flex-wrap: wrap; gap: 12px 28px; margin-bottom: 22px; }
.footer__links a {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.footer__links a:hover { color: var(--accent); }

.footer a { color: #fff; }

.footer__note { margin: 0 0 8px; }

.footer__copy {
  margin: 22px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--dark-line);
  font-size: 13px;
  opacity: .75;
}


/* Responsive
   ========================================================================== */

@media (max-width: 1024px), (pointer: coarse) {
  .btn { min-height: 48px; }
  .logo { padding: 10px 0; }
  .footer__links a { padding: 13px 0; }
}

@media (max-width: 900px) {
  .header__burger { display: flex; }
  .header__menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 50;
    padding: 16px;
    background: var(--dark);
    color: #fff;
    box-shadow: 0 12px 24px rgba(0, 0, 0, .25);
  }
  .header__menu.is-open { display: block; }
  .header__menu ul { flex-direction: column; gap: 14px; }

  /* opt-in: <figure class="is-wide"> keeps a wide infographic readable by scrolling */
  .prose figure.is-wide { overflow-x: auto; }
  .prose figure.is-wide img { width: 820px; max-width: none; }
}

@media (max-width: 640px) {
  :root { --header-h: 60px; --logo-h: 28px; --radius-lg: 16px; }

  .header__actions { display: none; }
  .header__menu-cta { display: block; }

  .hero { padding: 44px 22px 48px; }
  .hero__text { font-size: 16px; }
  .hero__actions .btn { flex: 1 1 100%; }

  .section { padding: 56px 0; }
  .prose h2 { margin-top: 40px; }
  .steps li { padding-left: 36px; }

  .offer-bar { gap: 10px; font-size: 14px; }
  .offer-bar img { display: none; }
  body.has-offer-bar .footer { padding-bottom: 132px; }
}

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


/* Inline schematic figure
   ========================================================================== */

.figure-svg {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  background: var(--accent-soft);
}
.figure-svg text { font-family: var(--font); }
.fig-h { font-size: 32px; font-weight: 700; fill: var(--text); }
.fig-note { font-size: 25px; fill: var(--muted); }
.fig-note--warn { fill: var(--warn); }
.fig-url { font-size: 25px; font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; fill: var(--text); }
.fig-url--warn { fill: var(--warn); }
.fig-card { fill: var(--surface); stroke: var(--line); stroke-width: 2; }
.fig-dot { fill: #d8d7e0; }
.fig-bar { fill: #f4f3f8; stroke: var(--accent); stroke-width: 2; }
.fig-bar--warn { stroke: var(--warn); stroke-dasharray: 10 7; }
.fig-lock { fill: none; stroke: var(--accent); stroke-width: 4; }
.fig-lockbody { fill: var(--accent); }
.fig-warn { fill: var(--warn); }
.fig-warnmark { stroke: #fff; stroke-width: 3; stroke-linecap: round; }
.fig-line { fill: #ddd9ea; }
.fig-line--soft { fill: #eceaf2; }
.fig-field { fill: none; stroke: var(--line); stroke-width: 2; }
.fig-btn { fill: var(--accent); }
.fig-btn--warn { fill: var(--warn); }

/* shared by the alternative schematics */
.fig-panel { fill: var(--surface); stroke: var(--line); stroke-width: 2; }
.fig-panel--soft { fill: var(--accent-soft); stroke: none; }
.fig-rail { stroke: var(--line); stroke-width: 3; }
.fig-num { fill: var(--accent); }
.fig-numtext { font-size: 30px; font-weight: 700; fill: #fff; text-anchor: middle; }
.fig-title { font-size: 32px; font-weight: 700; fill: var(--text); }
.fig-sub { font-size: 26px; fill: var(--muted); }
.fig-kicker { font-size: 25px; fill: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.fig-value { font-size: 34px; font-weight: 800; fill: var(--accent); letter-spacing: -.02em; }
.fig-value--big { font-size: 46px; fill: var(--text); }
.fig-op { font-size: 40px; font-weight: 700; fill: var(--muted); text-anchor: middle; }
.fig-node { fill: var(--accent); }
.fig-mid { text-anchor: middle; }
.fig-track { fill: #e6e3f0; }
.fig-fill { fill: var(--accent); }
.fig-fill--thin { fill: #b9a4e8; }
