/* ==========================================================================
   Aura AI · landing styles
   Brand register · "a Windows 11 desktop at night" · Archivo + Fragment Mono
   Violet is light, not paint. The logo gradient stays on the logo.
   ========================================================================== */

/* Reset ----------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
img, picture, svg { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 3px; border-radius: 4px; }
::selection { background: oklch(0.55 0.23 295 / 0.40); color: var(--text-1); }

/* Tokens ---------------------------------------------------------------- */

:root {
  /* Surfaces: deep violet-tinted ink */
  --bg:          oklch(0.08  0.020 285);
  --bg-raised:   oklch(0.105 0.020 285);
  --bg-elev:     oklch(0.14  0.022 285);
  --bg-deep:     oklch(0.06  0.016 285);

  /* Text */
  --text-1:      oklch(0.965 0.008 285);
  --text-2:      oklch(0.73  0.015 285);
  --text-3:      oklch(0.57  0.020 285);

  /* Borders */
  --border:      oklch(0.235 0.020 285);
  --border-hi:   oklch(0.33  0.025 285);
  --border-soft: oklch(0.175 0.018 285);

  /* Brand: one violet, used as light */
  --accent:        oklch(0.54 0.23 295);
  --accent-hi:     oklch(0.75 0.15 295);
  --accent-soft:   oklch(0.54 0.23 295 / 0.20);
  --accent-faint:  oklch(0.54 0.23 295 / 0.08);

  /* Premium amber, premium surfaces only */
  --premium:       oklch(0.82 0.14 58);
  --premium-hi:    oklch(0.88 0.13 62);
  --premium-soft:  oklch(0.82 0.14 58 / 0.16);
  --premium-deep:  oklch(0.40 0.09 50);

  /* Type */
  --font-sans: "Archivo", "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  --font-mono: "Fragment Mono", "Cascadia Code", ui-monospace, Menlo, monospace;

  --step-0:  clamp(0.95rem, 0.92rem + 0.15vw, 1.05rem);
  --step-1:  clamp(1.06rem, 1.00rem + 0.30vw, 1.22rem);
  --step-2:  clamp(1.30rem, 1.10rem + 0.85vw, 1.65rem);
  --step-3:  clamp(1.70rem, 1.30rem + 1.75vw, 2.40rem);
  --step-4:  clamp(2.20rem, 1.60rem + 2.60vw, 3.30rem);
  --step-5:  clamp(2.80rem, 2.00rem + 4.00vw, 4.40rem);
  --step-6:  clamp(3.20rem, 2.00rem + 6.20vw, 5.90rem);
  --step-7:  clamp(3.60rem, 1.80rem + 9.00vw, 8.00rem);

  /* Spacing */
  --space-1:  0.375rem;
  --space-2:  0.75rem;
  --space-3:  1.25rem;
  --space-4:  2rem;
  --space-5:  3rem;
  --space-6:  4.5rem;
  --space-7:  6.5rem;
  --space-8:  clamp(5rem, 10vw, 9.5rem);

  /* Windows 11 corner grammar */
  --radius-s: 4px;
  --radius-m: 8px;
  --radius-l: 12px;
  --radius-xl: 16px;

  --container: 1240px;
  --container-wide: 1400px;
  --container-narrow: 920px;

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 160ms;
  --dur-med:  420ms;
  --dur-slow: 700ms;

  --noise: 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='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");

  color-scheme: dark;
}

/* Base ------------------------------------------------------------------ */

html, body {
  background: var(--bg);
  color: var(--text-1);
}

body {
  font-family: var(--font-sans);
  font-weight: 420;
  font-size: var(--step-0);
  line-height: 1.6;
  letter-spacing: 0.002em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

p { color: var(--text-2); }
p + p { margin-top: var(--space-3); }
strong, b { color: var(--text-1); font-weight: 650; }
a { color: var(--text-1); text-decoration: none; text-underline-offset: 4px; }
a:hover { text-decoration: underline; text-decoration-color: var(--accent-hi); }

h1, h2, h3, h4 {
  color: var(--text-1);
  font-weight: 800;
  font-stretch: 108%;
  line-height: 1.02;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

code, kbd, pre { font-family: var(--font-mono); }

/* Utility --------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 3rem);
}
.container--wide { max-width: var(--container-wide); }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 1000;
  background: var(--bg-elev); color: var(--text-1);
  padding: 0.7rem 1.1rem; border-radius: var(--radius-m);
}
.skip:focus { left: 1rem; top: 1rem; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--accent-hi);
  font-weight: 550;
  padding-block: 0.15rem;
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-fast) var(--ease-out);
}
.link:hover { border-color: var(--accent-hi); text-decoration: none; }

/* Buttons: Windows 11 corner radius, not pills --------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.9rem 1.4rem;
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: 0;
  border-radius: var(--radius-m);
  border: 1px solid transparent;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  transition:
    background-color var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out);
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--accent);
  color: oklch(0.99 0.005 295);
  border-color: oklch(0.66 0.20 295 / 0.5);
  box-shadow:
    inset 0 1px 0 oklch(1 0 0 / 0.18),
    0 1px 0 oklch(0 0 0 / 0.4),
    0 16px 36px -16px oklch(0.54 0.23 295 / 0.65);
}
.btn--primary:hover {
  background: oklch(0.59 0.23 295);
  box-shadow:
    inset 0 1px 0 oklch(1 0 0 / 0.18),
    0 1px 0 oklch(0 0 0 / 0.4),
    0 18px 44px -14px oklch(0.54 0.23 295 / 0.8);
}

.btn--premium {
  background: var(--premium);
  color: oklch(0.20 0.03 50);
  border-color: var(--premium);
  box-shadow:
    inset 0 1px 0 oklch(1 0 0 / 0.30),
    0 14px 30px -16px oklch(0.82 0.14 58 / 0.45);
}
.btn--premium:hover { background: var(--premium-hi); border-color: var(--premium-hi); }

.btn--ghost {
  background: oklch(1 0 0 / 0.03);
  color: var(--text-1);
  border-color: var(--border-hi);
}
.btn--ghost:hover { background: var(--bg-elev); border-color: var(--text-3); }

.btn--small { padding: 0.5rem 1rem; font-size: 0.92rem; }
.btn--lg    { padding: 1.05rem 1.7rem; font-size: 1.05rem; }
.btn--full  { width: 100%; }

/* Nav ------------------------------------------------------------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: oklch(0.08 0.02 285 / 0.72);
  border-bottom: 1px solid var(--border-soft);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}
.nav__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  height: 62px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 750;
  font-stretch: 105%;
  letter-spacing: -0.01em;
  color: var(--text-1);
}
.brand:hover { text-decoration: none; }
.brand__mark { width: 28px; height: 28px; border-radius: 7px; }
.brand__name { font-size: 1.02rem; }

.nav__links {
  display: none;
  align-items: center;
  gap: 1.7rem;
}
.nav__links a {
  font-size: 0.94rem;
  color: var(--text-2);
  font-weight: 500;
}
.nav__links a:hover { color: var(--text-1); text-decoration: none; }

@media (min-width: 760px) {
  .nav__links { display: inline-flex; }
}

/* Hero ------------------------------------------------------------------ */

.hero {
  padding-top: clamp(3.5rem, 7vw, 6.5rem);
  padding-bottom: clamp(3rem, 7vw, 6rem);
  background:
    radial-gradient(1100px 520px at 80% -12%, oklch(0.20 0.09 290 / 0.45), transparent 70%),
    var(--bg);
}

.hero__title {
  font-size: clamp(2.7rem, 8.2vw, 7.5rem);
  line-height: 0.92;
  letter-spacing: -0.035em;
  font-weight: 850;
  font-stretch: 114%;
}
.hero__line { display: block; }
.hero__em {
  font-style: normal;
  color: var(--accent-hi);
}
.hero__line--quiet {
  font-stretch: 76%;
  font-weight: 350;
  letter-spacing: -0.01em;
  color: var(--text-3);
}

.hero__row {
  display: grid;
  gap: var(--space-4);
  margin-top: clamp(2rem, 4vw, 3.5rem);
  margin-bottom: clamp(2.5rem, 6vw, 5rem);
}
@media (min-width: 980px) {
  .hero__row {
    grid-template-columns: minmax(0, 1fr) minmax(0, auto);
    align-items: end;
    gap: clamp(3rem, 6vw, 6rem);
  }
}

.hero__sub {
  font-size: var(--step-2);
  line-height: 1.4;
  color: var(--text-2);
  max-width: 34ch;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: var(--space-3);
}
.hero__cta--center { justify-content: center; margin-bottom: 0; }

.hero__meta {
  font-size: 0.85rem;
  color: var(--text-3);
}

/* The desktop scene ------------------------------------------------------ */

.desktop { position: relative; }

.desktop__scene {
  position: relative;
  overflow: hidden;
  height: clamp(480px, 52vw, 640px);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(120% 100% at 14% 114%, oklch(0.40 0.13 278 / 0.85), transparent 56%),
    radial-gradient(64% 42% at 72% 104%, oklch(0.30 0.10 292 / 0.55), transparent 70%),
    radial-gradient(70% 60% at 88% -8%, oklch(0.22 0.07 300 / 0.9), transparent 62%),
    linear-gradient(158deg, oklch(0.15 0.04 290), oklch(0.075 0.022 268));
  box-shadow: 0 50px 110px -50px oklch(0 0 0 / 0.8);
}
.desktop__scene::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--noise);
  opacity: 0.05;
  pointer-events: none;
}

/* keycaps */
.keys {
  position: absolute;
  left: 10%;
  top: 44%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 1.4vw, 1rem);
  transition: opacity var(--dur-med) var(--ease-out), transform var(--dur-med) var(--ease-out);
}
.is-summoned .keys {
  opacity: 0.34;
  transform: translateY(-50%) scale(0.86);
  pointer-events: none;
}
@media (max-width: 860px) {
  .keys { left: 50%; top: 21%; transform: translate(-50%, -50%); }
  .is-summoned .keys { transform: translate(-50%, -50%) scale(0.86); }
}

.keycap {
  font-family: var(--font-mono);
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: var(--text-1);
  padding: 0.85em 1.05em;
  border-radius: 10px;
  border: 1px solid var(--border-hi);
  background: linear-gradient(180deg, oklch(0.215 0.022 285), oklch(0.15 0.02 285));
  box-shadow:
    inset 0 1px 0 oklch(1 0 0 / 0.10),
    0 5px 0 -1px oklch(0.04 0.01 285),
    0 14px 24px -10px oklch(0 0 0 / 0.7);
  transform: translateY(0);
  transition:
    transform 120ms var(--ease-out),
    box-shadow 120ms var(--ease-out),
    border-color 120ms var(--ease-out),
    color 120ms var(--ease-out);
}
.keycap.is-down {
  transform: translateY(4px);
  border-color: var(--accent-hi);
  color: var(--accent-hi);
  box-shadow:
    inset 0 1px 0 oklch(1 0 0 / 0.06),
    0 1px 0 -1px oklch(0.04 0.01 285),
    0 0 34px oklch(0.54 0.23 295 / 0.45);
}
.keys__plus {
  font-family: var(--font-mono);
  color: var(--text-3);
  font-size: 1.1em;
}

/* the summoned window */
.appwin {
  position: absolute;
  right: clamp(1rem, 5%, 3.5rem);
  bottom: 78px;
  width: min(400px, calc(100% - 2rem));
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-l);
  border: 1px solid oklch(0.36 0.03 290 / 0.55);
  background: oklch(0.125 0.022 288 / 0.84);
  backdrop-filter: blur(28px) saturate(140%);
  -webkit-backdrop-filter: blur(28px) saturate(140%);
  box-shadow:
    0 44px 90px -32px oklch(0 0 0 / 0.85),
    0 0 90px -24px oklch(0.54 0.23 295 / 0.55),
    inset 0 1px 0 oklch(1 0 0 / 0.07);
  opacity: 0;
  transform: translateY(40px) scale(0.965);
  transform-origin: bottom right;
  transition:
    opacity 560ms var(--ease-out),
    transform 560ms var(--ease-out);
}
.is-summoned .appwin {
  opacity: 1;
  transform: translateY(0) scale(1);
}
@media (max-width: 860px) {
  .appwin { right: 50%; transform: translate(50%, 40px) scale(0.965); }
  .is-summoned .appwin { transform: translate(50%, 0) scale(1); }
}

.desktop__scene svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.appwin__titlebar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 9px 12px;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--text-3);
}
.appwin__titlebar img { border-radius: 4px; }
.appwin__chrome {
  margin-left: auto;
  display: inline-flex;
  gap: 1.1rem;
  color: var(--text-3);
  padding-right: 2px;
}

.appwin__head {
  padding: 4px 16px 0;
}
.appwin__head strong {
  display: block;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.appwin__head small {
  display: block;
  color: var(--text-3);
  font-size: 0.74rem;
  margin-top: 1px;
}

.appwin__notice {
  margin: 10px 16px 0;
  padding: 5px 9px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-s);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  color: var(--text-3);
  width: fit-content;
}

.appwin__chat {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  min-height: 168px;
}

.msg {
  font-size: 0.84rem;
  line-height: 1.55;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 360ms var(--ease-out), transform 360ms var(--ease-out);
}
.msg.is-in { opacity: 1; transform: translateY(0); }

.msg--user {
  align-self: flex-end;
  max-width: 80%;
  padding: 9px 12px;
  border-radius: 10px 10px 3px 10px;
  background: var(--accent);
  color: oklch(0.99 0.005 295);
}
.msg--ai {
  color: var(--text-2);
  max-width: 95%;
  min-height: 5.2em;
}
.msg__cursor {
  display: inline-block;
  width: 7px;
  height: 0.95em;
  margin-left: 2px;
  vertical-align: text-bottom;
  background: var(--accent-hi);
  animation: cursor-blink 1.05s steps(2, start) infinite;
}
.msg--ai.is-done .msg__cursor { animation: none; opacity: 0; }
@keyframes cursor-blink { to { visibility: hidden; } }

.appwin__input {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 14px 14px;
  padding: 9px 9px 9px 13px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: oklch(0.09 0.018 285 / 0.7);
}
.appwin__placeholder {
  flex: 1;
  font-size: 0.82rem;
  color: var(--text-3);
}
.appwin__tools {
  display: inline-flex;
  gap: 10px;
  color: var(--text-3);
}
.appwin__send {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--accent);
  color: oklch(0.99 0.005 295);
}

/* taskbar */
.taskbar {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 54px;
  display: flex;
  align-items: center;
  background: oklch(0.10 0.016 285 / 0.72);
  backdrop-filter: blur(22px) saturate(130%);
  -webkit-backdrop-filter: blur(22px) saturate(130%);
  border-top: 1px solid oklch(1 0 0 / 0.06);
}
.taskbar__icons {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}
.taskbar__icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-m);
  color: var(--text-2);
}
.taskbar__icon--start { color: var(--text-1); }
.taskbar__icon--aura {
  background: oklch(1 0 0 / 0.05);
  box-shadow: inset 0 -2px 0 -0.5px var(--accent-hi);
}
.taskbar__tray {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 16px;
}
.taskbar__time {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  line-height: 1.5;
  color: var(--text-2);
}

/* replay bar */
.desktop__bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  padding-top: 0.8rem;
}
.replay {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-2);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.replay svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.replay:hover { color: var(--text-1); border-color: var(--border-hi); }
.desktop__hint {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-3);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.desktop__hint kbd {
  font-size: 0.66rem;
  padding: 0.2rem 0.45rem;
  border: 1px solid var(--border-hi);
  border-radius: 5px;
  background: var(--bg-elev);
  color: var(--text-2);
  box-shadow: inset 0 -1.5px 0 oklch(0 0 0 / 0.4);
}
@media (max-width: 700px) {
  .desktop__hint { display: none; }
}

/* Theses: three words ----------------------------------------------------- */

.theses {
  padding-block: var(--space-8);
  background: var(--bg-deep);
  border-block: 1px solid var(--border-soft);
}

.thesis {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr) auto;
  align-items: end;
  gap: clamp(1.5rem, 4vw, 4.5rem);
  padding-block: clamp(2.2rem, 4.5vw, 3.8rem);
}
.thesis + .thesis { border-top: 1px solid var(--border-soft); }

.thesis__word {
  font-size: var(--step-7);
  font-weight: 900;
  font-stretch: 122%;
  letter-spacing: -0.03em;
  line-height: 0.82;
}
.thesis__dot { color: var(--accent-hi); }

.thesis__body p {
  max-width: 34ch;
  font-size: var(--step-1);
  padding-bottom: 0.35em;
}

.thesis__index {
  align-self: start;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-3);
}

.thesis:nth-child(2) .thesis__word { margin-left: clamp(0rem, 4vw, 4rem); }
.thesis:nth-child(3) .thesis__word { margin-left: clamp(0rem, 2vw, 2rem); }

@media (max-width: 760px) {
  .thesis { grid-template-columns: 1fr auto; align-items: start; }
  .thesis__word { grid-row: 1; grid-column: 1; }
  .thesis__index { grid-row: 1; grid-column: 2; }
  .thesis__body { grid-column: 1 / -1; }
  .thesis__body p { padding-bottom: 0; }
  .thesis:nth-child(2) .thesis__word,
  .thesis:nth-child(3) .thesis__word { margin-left: 0; }
}

/* Features (alternating rows) ------------------------------------------- */

.features {
  padding-block: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: clamp(5rem, 10vw, 10rem);
}

.feat-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
  align-items: center;
  max-width: var(--container);
  width: 100%;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 3rem);
}
@media (min-width: 920px) {
  .feat-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(3rem, 6vw, 6rem); }
}
.feat-row__text { max-width: 50ch; }
.feat-row__text h2 {
  font-size: var(--step-4);
  margin-bottom: var(--space-3);
}
.feat-row__text p { font-size: var(--step-1); }
.feat-row__text .link { margin-top: var(--space-3); }

.feat-row__list {
  list-style: none;
  padding: 0;
  margin-top: var(--space-4);
  display: grid;
  gap: 0.55rem;
}
.feat-row__list li {
  position: relative;
  padding-left: 1.4rem;
  color: var(--text-2);
  font-size: 0.98rem;
}
.feat-row__list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.62em;
  width: 7px; height: 7px;
  border-radius: 1.5px;
  background: var(--accent-hi);
}
.feat-row__list--inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.6rem;
  margin-top: var(--space-4);
}
.feat-row__list--inline li {
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--border);
  background: oklch(1 0 0 / 0.03);
  border-radius: var(--radius-m);
  font-size: 0.84rem;
  color: var(--text-2);
}
.feat-row__list--inline li::before { display: none; }

@media (min-width: 920px) {
  .feat-row--img-left .feat-row__text { order: 2; }
  .feat-row--img-left .feat-row__img  { order: 1; }
}

.feat-row__img img {
  border-radius: var(--radius-l);
  border: 1px solid var(--border);
  box-shadow:
    0 36px 80px -30px oklch(0 0 0 / 0.65),
    0 8px 30px -8px oklch(0.5 0.18 295 / 0.14);
}
.feat-row__img figcaption {
  margin-top: 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-3);
}

/* Boundary artifact: what stays, what crosses ---------------------------- */

.boundary {
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  background: var(--bg-raised);
  overflow: hidden;
}
.boundary__label {
  padding: 1.1rem 1.4rem 0;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-3);
}
.boundary__tree {
  padding: 0.8rem 1.4rem 1.4rem;
  font-size: clamp(0.7rem, 1.4vw, 0.82rem);
  line-height: 1.85;
  color: var(--text-1);
  white-space: pre;
  overflow-x: auto;
}
.tree__path { color: var(--accent-hi); }
.tree__note { color: var(--text-3); }

.boundary__wire {
  border-top: 1px dashed var(--border-hi);
  background: var(--bg-deep);
  padding-bottom: 1.3rem;
}
.boundary__label--wire { color: var(--accent-hi); }
.boundary__wire ul {
  list-style: none;
  padding: 0.7rem 1.4rem 0;
  margin: 0;
  display: grid;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-1);
}
.boundary__wire li::before {
  content: "\258D";
  color: var(--accent-hi);
}
.boundary__end {
  padding: 0.8rem 1.4rem 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-3);
}

/* Provider switchboard ---------------------------------------------------- */

.switch__list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--border-soft);
}
.switch__row {
  width: 100%;
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 0.85rem 0.9rem;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--border-soft);
  border-radius: 0;
  cursor: pointer;
  text-align: left;
  transition: background-color var(--dur-fast) var(--ease-out);
}
.switch__row:hover { background: oklch(1 0 0 / 0.03); }
.switch__row::before {
  content: "";
  align-self: center;
  flex: 0 0 7px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--border-hi);
  transition: background-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.switch__row.is-active { background: var(--accent-faint); }
.switch__row.is-active::before {
  background: var(--accent-hi);
  box-shadow: 0 0 12px oklch(0.54 0.23 295 / 0.8);
}
.switch__name {
  flex: 1;
  font-weight: 650;
  font-size: 1.04rem;
  letter-spacing: -0.015em;
  color: var(--text-1);
}
.switch__ep {
  font-size: 0.74rem;
  color: var(--text-3);
}
.switch__tag {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  min-width: 4.5em;
  text-align: right;
}
.switch__status {
  margin-top: 1rem;
  font-size: 0.8rem;
}
.switch__status code { color: var(--text-3); }
.switch__status b { color: var(--accent-hi); font-weight: 400; }
.switch__status code::after {
  content: "\258D";
  color: var(--accent-hi);
  animation: cursor-blink 1.05s steps(2, start) infinite;
}
@media (max-width: 560px) {
  .switch__ep { display: none; }
}

/* Keyboard shortcut stack ------------------------------------------------- */

.kbd-stack {
  border: 1px solid var(--border);
  background: var(--bg-raised);
  border-radius: var(--radius-l);
  padding: 1.5rem;
  display: grid;
  gap: 1.05rem;
}
.kbd-row {
  display: grid;
  grid-template-columns: minmax(108px, auto) 1fr;
  align-items: center;
  gap: 1rem;
}
kbd {
  font-size: 0.74rem;
  padding: 0.32rem 0.55rem;
  border: 1px solid var(--border-hi);
  border-radius: 6px;
  background: linear-gradient(180deg, oklch(0.19 0.02 285), oklch(0.145 0.018 285));
  box-shadow: inset 0 -2px 0 oklch(0 0 0 / 0.35), inset 0 1px 0 oklch(1 0 0 / 0.05);
  color: var(--text-1);
  min-width: 30px;
  text-align: center;
}
.kbd-keys { display: inline-flex; gap: 0.35rem; }
.kbd-glyph { color: var(--accent-hi); }
.kbd-label {
  font-size: 0.93rem;
  color: var(--text-2);
}

/* Pricing ----------------------------------------------------------------- */

.pricing {
  padding-block: var(--space-8);
  border-top: 1px solid var(--border-soft);
  background:
    radial-gradient(900px 420px at 12% 0%, oklch(0.16 0.05 290 / 0.35), transparent 70%),
    var(--bg-raised);
}
.section-h { margin-bottom: var(--space-6); }
.section-h h2 {
  font-size: var(--step-5);
  font-weight: 850;
  font-stretch: 112%;
  letter-spacing: -0.032em;
  max-width: 16ch;
}
.pricing__grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: 1fr;
  align-items: stretch;
}
@media (min-width: 920px) {
  .pricing__grid { grid-template-columns: 7fr 5fr; gap: var(--space-5); }
}

.plan {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: clamp(2rem, 3vw, 2.6rem);
  background: var(--bg-elev);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.plan__name {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-3);
}
.plan__price {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.55rem;
}
.plan__amount {
  font-size: clamp(2.6rem, 4.5vw, 3.6rem);
  font-weight: 900;
  font-stretch: 116%;
  letter-spacing: -0.035em;
  color: var(--text-1);
  line-height: 1;
}
.plan__per {
  color: var(--text-3);
  font-size: 0.95rem;
}
.plan__sub {
  color: var(--text-2);
  margin-top: 0.5rem;
}
.plan__list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.7rem;
  font-size: 0.97rem;
  align-content: start;
}
.plan__list li {
  position: relative;
  padding-left: 1.5rem;
  color: var(--text-2);
}
.plan__list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.6em;
  width: 7px; height: 7px;
  border-radius: 1.5px;
  background: var(--accent-hi);
}
.plan__list b { color: var(--text-1); font-variant-numeric: tabular-nums; }

.plan__list--quiet li::before { background: var(--text-3); }
.plan__list--quiet li { color: var(--text-3); font-size: 0.92rem; }

.plan--free .btn { margin-top: auto; }

.plan--premium {
  border-color: var(--premium-deep);
  background:
    radial-gradient(420px 240px at 100% 0%, var(--premium-soft), transparent 70%),
    var(--bg-elev);
}
.plan--premium .plan__list li::before { background: var(--premium); }
.plan--premium .plan__amount { color: var(--premium-hi); }
.plan--premium .btn { margin-top: auto; }

.plan__badge {
  position: absolute;
  top: -12px; right: 20px;
  background: var(--premium);
  color: oklch(0.20 0.03 50);
  font-weight: 650;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-s);
}

.plan__split {
  display: grid;
  gap: var(--space-3);
}
@media (min-width: 720px) {
  .plan__split { grid-template-columns: 1fr 1fr; gap: var(--space-4); }
}

.pricing__note {
  margin-top: var(--space-5);
  font-size: 0.95rem;
  color: var(--text-3);
  max-width: 62ch;
}

/* FAQ --------------------------------------------------------------------- */

.faq { padding-block: var(--space-8); }
.faq__wrap { display: grid; gap: var(--space-5); }
@media (min-width: 920px) {
  .faq__wrap { grid-template-columns: 5fr 7fr; align-items: start; gap: var(--space-7); }
  .faq .section-h { margin-bottom: 0; position: sticky; top: 96px; }
}

.faq__list { display: grid; gap: 0; border-top: 1px solid var(--border-soft); }
.faq details {
  border-bottom: 1px solid var(--border-soft);
  padding: 1.35rem 0;
}
.faq summary {
  cursor: pointer;
  font-size: var(--step-1);
  font-weight: 600;
  color: var(--text-1);
  letter-spacing: -0.01em;
  list-style: none;
  position: relative;
  padding-right: 2.2rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 0.2rem; top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  color: var(--text-3);
  font-weight: 400;
  font-size: 1.3rem;
  line-height: 1;
  transition: color var(--dur-fast) var(--ease-out);
}
.faq details[open] summary::after { content: "\2212"; color: var(--accent-hi); }
.faq details p {
  margin-top: 0.9rem;
  font-size: 0.97rem;
  color: var(--text-2);
  max-width: 62ch;
}
.faq details p a { color: var(--accent-hi); border-bottom: 1px solid var(--border-hi); }

/* CTA ----------------------------------------------------------------------*/

.cta {
  padding-block: clamp(6rem, 12vw, 11rem);
  border-top: 1px solid var(--border-soft);
  background:
    radial-gradient(820px 420px at 50% 8%, oklch(0.20 0.09 292 / 0.4), transparent 72%),
    var(--bg-deep);
}
.cta__inner {
  max-width: var(--container-narrow);
  margin-inline: auto;
  text-align: center;
  display: grid;
  justify-items: center;
  gap: var(--space-4);
}
.cta__inner h2 {
  font-size: var(--step-6);
  font-weight: 880;
  font-stretch: 114%;
  letter-spacing: -0.034em;
  max-width: 18ch;
}
.cta__keys {
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 1.6vw, 1.1rem);
  margin-block: var(--space-2);
}
.keycap--xl {
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  cursor: pointer;
}
.cta__sub {
  color: var(--text-2);
  max-width: 44ch;
}
.cta__fineprint {
  font-size: 0.8rem;
  color: var(--text-3);
  max-width: 62ch;
}

/* Footer -------------------------------------------------------------------*/

.foot {
  border-top: 1px solid var(--border-soft);
  padding-block: clamp(3rem, 6vw, 5rem) clamp(1.5rem, 3vw, 2.5rem);
  background: var(--bg-raised);
}
.foot__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
  padding-bottom: var(--space-5);
  border-bottom: 1px solid var(--border-soft);
}
@media (min-width: 720px) {
  .foot__grid {
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: var(--space-6);
  }
}
.foot__tag {
  font-size: 0.93rem;
  color: var(--text-3);
  margin-top: var(--space-3);
  max-width: 28ch;
}
.foot__col { display: flex; flex-direction: column; gap: 0.55rem; }
.foot__col h3 {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-3);
  font-weight: 400;
  margin-bottom: 0.5rem;
}
.foot__col a {
  color: var(--text-2);
  font-size: 0.94rem;
  width: fit-content;
}
.foot__col a:hover { color: var(--text-1); text-decoration: none; }

.foot__bottom {
  padding-top: var(--space-4);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-3);
  color: var(--text-3);
  font-size: 0.84rem;
}
.foot__bottom-meta { max-width: 60ch; text-align: right; }
@media (max-width: 720px) {
  .foot__bottom-meta { text-align: left; }
}

/* Reveal animation ---------------------------------------------------------*/

[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity var(--dur-slow) var(--ease-out),
    transform var(--dur-slow) var(--ease-out);
}
[data-reveal].reveal-in {
  opacity: 1;
  transform: translateY(0);
}

.hero__title[data-reveal]   { transition-delay: 0ms; }
.hero__row[data-reveal]     { transition-delay: 110ms; }
.hero .desktop[data-reveal] { transition-delay: 240ms; }
.cta__inner > [data-reveal]:nth-child(1) { transition-delay: 0ms; }
.cta__inner > [data-reveal]:nth-child(2) { transition-delay: 80ms; }
.cta__inner > [data-reveal]:nth-child(3) { transition-delay: 160ms; }
.cta__inner > [data-reveal]:nth-child(4) { transition-delay: 240ms; }
.cta__inner > [data-reveal]:nth-child(5) { transition-delay: 320ms; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
}

[hidden] { display: none !important; }

/* Blog ----------------------------------------------------------------------*/

/* "From the blog" on the homepage */
.home-blog {
  padding-block: var(--space-8);
  border-top: 1px solid var(--border-soft);
  background: var(--bg-raised);
}
.home-blog__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}
.home-blog__head h2 {
  font-size: var(--step-5);
  font-weight: 850;
  font-stretch: 112%;
  letter-spacing: -0.032em;
}
.home-blog__head h2 span { color: var(--accent-hi); }
.home-blog__grid {
  display: grid;
  gap: clamp(2rem, 4vw, 3rem);
  grid-template-columns: 1fr;
}
@media (min-width: 880px) {
  .home-blog__grid { grid-template-columns: repeat(3, 1fr); }
}
.home-post {
  display: block;
  border-top: 1px solid var(--border-hi);
  padding-top: 1.2rem;
  color: inherit;
}
.home-post:hover { text-decoration: none; }
.home-post__date {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-3);
}
.home-post__title {
  margin-block: 0.55rem 0.6rem;
  font-size: var(--step-2);
  font-weight: 800;
  font-stretch: 108%;
  letter-spacing: -0.022em;
  transition: color var(--dur-fast) var(--ease-out);
}
.home-post:hover .home-post__title { color: var(--accent-hi); }
.home-post__desc {
  color: var(--text-2);
  font-size: 0.95rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-hero {
  padding-block: clamp(4.5rem, 9vw, 8rem) clamp(3rem, 6vw, 5rem);
}
.blog-shell {
  max-width: 1120px;
}
.blog-hero__grid {
  display: grid;
  gap: clamp(2.5rem, 7vw, 7rem);
  align-items: end;
}
@media (min-width: 840px) {
  .blog-hero__grid {
    grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.6fr);
  }
}
.blog-kicker,
.post-kicker {
  margin-bottom: var(--space-3);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-hi);
  text-transform: uppercase;
}
.blog-hero h1 {
  max-width: 13ch;
  font-size: clamp(3rem, 7vw, 6.2rem);
  font-weight: 880;
  font-stretch: 116%;
  line-height: 0.94;
}
.blog-hero h1 span { color: var(--accent-hi); }
.blog-hero__aside p {
  font-size: var(--step-1);
  max-width: 36ch;
  text-wrap: pretty;
}
.blog-rss {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: var(--space-4);
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--border-hi);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-2);
}
.blog-rss:hover {
  color: var(--text-1);
  border-bottom-color: var(--accent-hi);
  text-decoration: none;
}

.blog-list {
  border-top: 1px solid var(--border-hi);
  margin-bottom: var(--space-8);
}
.blog-item {
  display: grid;
  grid-template-columns: minmax(120px, 150px) minmax(0, 1fr) auto;
  gap: clamp(1.25rem, 4vw, 4rem);
  align-items: start;
  padding-block: clamp(2rem, 4vw, 3.5rem);
  border-bottom: 1px solid var(--border-soft);
  color: inherit;
}
.blog-item:hover,
.blog-item:focus-visible { text-decoration: none; }
.blog-item__rail {
  display: grid;
  gap: 0.7rem;
}
.blog-item__index,
.blog-item__date {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.blog-item__index {
  color: var(--accent-hi);
}
.blog-item__content {
  min-width: 0;
}
.blog-item__title {
  max-width: 23ch;
  font-size: clamp(1.8rem, 4vw, 3.3rem);
  font-weight: 820;
  font-stretch: 110%;
  line-height: 1;
  transition: color var(--dur-fast) var(--ease-out);
}
.blog-item:hover .blog-item__title,
.blog-item:focus-visible .blog-item__title { color: var(--accent-hi); }
.blog-item__desc {
  margin-top: 1rem;
  color: var(--text-2);
  max-width: 64ch;
  text-wrap: pretty;
}
.blog-item__meta {
  margin-top: 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-3);
}
.blog-item__arrow {
  color: var(--text-3);
  font-size: 1.2rem;
  line-height: 1;
  transition:
    color var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out);
}
.blog-item:hover .blog-item__arrow,
.blog-item:focus-visible .blog-item__arrow {
  color: var(--accent-hi);
  transform: translate(3px, -3px);
}
@media (max-width: 700px) {
  .blog-hero {
    padding-block: var(--space-6) var(--space-5);
  }
  .blog-hero h1 {
    font-size: clamp(2.8rem, 14vw, 4.5rem);
  }
  .blog-item {
    grid-template-columns: 1fr auto;
    gap: var(--space-3);
  }
  .blog-item__rail {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    gap: var(--space-3);
  }
}

.blog-note {
  padding-block: var(--space-6) var(--space-8);
  color: var(--text-3);
  font-size: 0.95rem;
}
.blog-note strong {
  display: block;
  margin-bottom: 0.35rem;
  font-size: var(--step-2);
}
.blog-note p {
  margin-bottom: var(--space-3);
}
.blog-skeleton {
  display: grid;
  grid-template-columns: minmax(120px, 150px) minmax(0, 1fr);
  gap: clamp(1.25rem, 4vw, 4rem);
  padding-block: clamp(2rem, 4vw, 3.5rem);
  border-bottom: 1px solid var(--border-soft);
}
.blog-skeleton span {
  display: block;
  height: 0.7rem;
  border-radius: var(--radius-s);
  background: var(--border-soft);
}
.blog-skeleton span:nth-child(2) {
  width: min(100%, 560px);
  height: 2.5rem;
}
.blog-skeleton span:nth-child(3) {
  grid-column: 2;
  width: min(72%, 440px);
}
@media (max-width: 700px) {
  .blog-skeleton { grid-template-columns: 1fr; gap: var(--space-3); }
  .blog-skeleton span:nth-child(3) { grid-column: 1; }
}

/* Post page: rendered markdown inside .doc__body --------------------------- */

.post-back {
  display: inline-flex;
  margin-bottom: var(--space-5);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-3);
}
.post-back:hover { color: var(--text-1); text-decoration: none; }

.doc__body pre {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  padding: 1.1rem 1.3rem;
  font-size: 0.86rem;
  line-height: 1.6;
  overflow-x: auto;
  color: var(--text-1);
}
.doc__body code {
  font-size: 0.92em;
  color: var(--text-1);
}
.doc__body p code,
.doc__body li code {
  background: var(--bg-elev);
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  padding: 0.1em 0.35em;
}
.doc__body pre code {
  background: transparent;
  border: 0;
  padding: 0;
}
.doc__body blockquote {
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  background: var(--bg-raised);
  padding: 1rem 1.3rem;
  color: var(--text-2);
}
.doc__body hr {
  border: 0;
  border-top: 1px solid var(--border-soft);
  margin-block: var(--space-3);
}

/* Legal pages (privacy / terms / legal) ------------------------------------*/

.doc {
  padding-block: clamp(3rem, 8vw, 7rem);
}
.doc__wrap {
  max-width: 760px;
  margin-inline: auto;
}
.doc__meta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-3);
  margin-bottom: var(--space-3);
}
.doc__title {
  font-size: var(--step-5);
  font-weight: 850;
  font-stretch: 112%;
  letter-spacing: -0.032em;
  margin-bottom: var(--space-3);
}
.doc__lede {
  font-size: var(--step-2);
  color: var(--text-2);
  max-width: 42ch;
  margin-bottom: var(--space-6);
}
.doc__body { display: grid; gap: var(--space-4); }
.doc__body h2 {
  font-size: var(--step-3);
  margin-top: var(--space-5);
}
.doc__body h3 {
  font-size: var(--step-2);
  margin-top: var(--space-4);
  color: var(--text-1);
}
.doc__body p, .doc__body li {
  font-size: 1.02rem;
  color: var(--text-2);
  line-height: 1.65;
}
.doc__body strong { color: var(--text-1); }
.doc__body ul, .doc__body ol {
  padding-left: 1.5rem;
  display: grid;
  gap: 0.45rem;
}
.doc__body ul li::marker { color: var(--accent-hi); }
.doc__body a {
  color: var(--accent-hi);
  border-bottom: 1px solid var(--border-hi);
}
.doc__body a:hover { border-bottom-color: var(--accent-hi); text-decoration: none; }

.doc__table-wrap { overflow-x: auto; margin-block: var(--space-4); }
.doc__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.doc__table th, .doc__table td {
  border: 1px solid var(--border);
  padding: 0.7rem 0.85rem;
  vertical-align: top;
  text-align: left;
  color: var(--text-2);
}
.doc__table th {
  background: var(--bg-elev);
  color: var(--text-1);
  font-weight: 650;
  letter-spacing: -0.01em;
}

.doc__note {
  margin-top: var(--space-5);
  padding: 1.25rem 1.4rem;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  font-size: 0.94rem;
  color: var(--text-3);
}

.doc__toc {
  position: sticky;
  top: 80px;
  display: none;
}
@media (min-width: 1100px) {
  .doc__layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: var(--space-6);
    max-width: 1100px;
    margin-inline: auto;
  }
  .doc__toc { display: block; }
  .doc__toc ol {
    list-style: none;
    padding: 0;
    display: grid;
    gap: 0.55rem;
    counter-reset: toc;
    font-size: 0.86rem;
  }
  .doc__toc li { counter-increment: toc; color: var(--text-3); }
  .doc__toc li::before {
    content: counter(toc, decimal-leading-zero) " ";
    font-family: var(--font-mono);
    color: var(--text-3);
    font-variant-numeric: tabular-nums;
    margin-right: 0.35rem;
  }
  .doc__toc a { color: var(--text-2); }
.doc__toc a:hover { color: var(--text-1); text-decoration: none; }
  .doc__wrap { max-width: 720px; margin-inline: 0; }
}

/* Blog article: scoped so legal documents keep their existing layout --------*/

.blog-post .post-page {
  padding-block: clamp(3.5rem, 8vw, 7rem);
}
.post-layout {
  max-width: 1180px;
}
.blog-post .doc__wrap {
  width: 100%;
  max-width: 780px;
}
.post-header {
  padding-bottom: clamp(2.5rem, 6vw, 4.5rem);
  margin-bottom: clamp(2.5rem, 6vw, 4.5rem);
  border-bottom: 1px solid var(--border-hi);
}
.blog-post .post-kicker {
  margin-bottom: var(--space-2);
}
.blog-post .doc__meta {
  margin-bottom: var(--space-4);
  font-variant-numeric: tabular-nums;
}
.blog-post .doc__title {
  max-width: 19ch;
  margin-bottom: var(--space-4);
  font-size: clamp(2.65rem, 5vw, 4.15rem);
  font-weight: 840;
  font-stretch: 102%;
  line-height: 0.99;
}
.blog-post .doc__lede {
  max-width: 55ch;
  margin-bottom: 0;
  font-size: clamp(1.22rem, 2vw, 1.55rem);
  line-height: 1.48;
  text-wrap: pretty;
}
.blog-post .doc__body {
  display: block;
}
.blog-post .doc__body > p,
.blog-post .doc__body > ul,
.blog-post .doc__body > ol,
.blog-post .doc__body > blockquote {
  max-width: 68ch;
}
.blog-post .doc__body p,
.blog-post .doc__body li {
  font-size: clamp(1.02rem, 0.98rem + 0.2vw, 1.1rem);
  line-height: 1.78;
  text-wrap: pretty;
}
.blog-post .doc__body > p:first-child {
  color: var(--text-1);
  font-size: var(--step-1);
  line-height: 1.65;
}
.blog-post .doc__body > p + p {
  margin-top: 1.15rem;
}
.blog-post .doc__body > h2 {
  scroll-margin-top: 90px;
  margin-top: clamp(4rem, 9vw, 6rem);
  margin-bottom: var(--space-3);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-soft);
  font-size: clamp(1.8rem, 3.5vw, 2.65rem);
  line-height: 1.05;
}
.blog-post .doc__body > h3 {
  scroll-margin-top: 90px;
  margin-top: var(--space-5);
  margin-bottom: var(--space-3);
  font-size: var(--step-2);
}
.blog-post .doc__body > ul,
.blog-post .doc__body > ol {
  margin-block: var(--space-3);
}
.blog-post .doc__body > blockquote,
.blog-post .doc__body > pre {
  margin-block: var(--space-4);
}
.blog-post .doc__body > hr {
  margin-block: var(--space-6);
}
.post-toc {
  display: none;
}
.post-toc__title {
  margin-bottom: var(--space-3);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-3);
  text-transform: uppercase;
}
.post-toc ol {
  display: grid;
  gap: 0.7rem;
  padding: 0;
  list-style: none;
  counter-reset: section;
}
.post-toc li {
  display: grid;
  grid-template-columns: 1.8rem minmax(0, 1fr);
  gap: 0.35rem;
  counter-increment: section;
}
.post-toc li::before {
  content: counter(section, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.post-toc a {
  color: var(--text-3);
  font-size: 0.78rem;
  line-height: 1.35;
}
.post-toc a:hover {
  color: var(--text-1);
  text-decoration: none;
}
.post-end {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: clamp(5rem, 10vw, 8rem);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-hi);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-3);
}
.post-end a {
  color: var(--text-2);
}
.post-end a:hover {
  color: var(--accent-hi);
  text-decoration: none;
}
@media (min-width: 1100px) {
  .post-layout {
    display: grid;
    grid-template-columns: 190px minmax(0, 780px);
    justify-content: center;
    gap: clamp(3rem, 7vw, 7rem);
    align-items: start;
  }
  .post-toc:not([hidden]) {
    position: sticky;
    top: 94px;
    display: block;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
  }
  .blog-post .doc__wrap {
    margin-inline: 0;
  }
}
@media (max-width: 700px) {
  .blog-post .post-page {
    padding-block: var(--space-5) var(--space-7);
  }
  .post-header {
    margin-bottom: var(--space-5);
    padding-bottom: var(--space-5);
  }
  .blog-post .doc__title {
    font-size: clamp(2.2rem, 10.5vw, 3.25rem);
  }
}

