/* ==========================================================================
   Stetfolio — landing page
   One accent (the red pen), two grounds (ink and bone paper), three voices
   (Instrument Serif for display, Geist for reading, Geist Mono for the record).
   ========================================================================== */

@property --a {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}

:root {
  /* A single committed look (ink with bone-paper sections), not light/dark themes. */
  color-scheme: dark;
  --safe-top: env(safe-area-inset-top, 0px);
  --ink-950: #060709;
  --ink-900: #0a0c10;
  --ink-850: #0e1116;
  --ink-800: #13171e;
  --ink-700: #1b2029;

  --fg: #ecebe7;
  --fg-2: #b4b1a9;
  --fg-3: #8b877f;
  --line: rgb(255 255 255 / 0.08);
  --line-2: rgb(255 255 255 / 0.14);

  --pen: #ff5b37;
  --pen-2: #ff8a6b;
  --pen-ink: #c2321a;
  --seal: #8ff0c8;
  --amber: #ffd27a;

  --paper: #f3f0e8;
  --paper-2: #e9e4d8;
  --paper-fg: #15130f;
  --paper-fg-2: #4f4a41;
  --paper-fg-3: #6f6a60;
  --paper-line: rgb(21 19 15 / 0.13);

  --font-display: 'Instrument Serif', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --font-sans: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;

  --ease-out: cubic-bezier(0.2, 0, 0, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --gutter: clamp(20px, 4vw, 40px);
  --section-y: clamp(96px, 12vw, 176px);
}

/* ---------- Reset & base ---------- */

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

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ink-950);
  color: var(--fg);
  font: 400 16px/1.55 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden;
}

::selection {
  background: rgb(255 91 55 / 0.35);
  color: #fff;
}

img,
svg,
canvas {
  display: block;
}

button {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
}

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

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

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

.skip {
  position: fixed;
  left: 16px;
  top: -60px;
  z-index: 100;
  background: var(--fg);
  color: var(--ink-950);
  padding: 10px 14px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: top 0.2s var(--ease-out);
}

.skip:focus {
  top: 16px;
}

.mono {
  font-family: var(--font-mono);
}

kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1;
  padding: 3px 6px;
  border-radius: 5px;
  background: rgb(255 255 255 / 0.06);
  box-shadow: 0 0 0 1px var(--line-2) inset;
  color: var(--fg-2);
}

section {
  position: relative;
  padding-block: var(--section-y);
}

.folio {
  position: absolute;
  top: 26px;
  right: var(--gutter);
  z-index: 3;
  font: 400 11px/1 var(--font-mono);
  letter-spacing: 0.14em;
  color: var(--fg-3);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font: 400 12px/1 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-3);
}

.eyebrow span {
  color: var(--pen);
}

.eyebrow::after {
  content: '';
  width: 44px;
  height: 1px;
  background: currentColor;
  opacity: 0.4;
}

h2 {
  margin: 20px 0 0;
  font: 400 clamp(44px, 6.4vw, 94px) / 0.95 var(--font-display);
  letter-spacing: -0.028em;
  text-wrap: balance;
}

h2 em,
h3 em {
  font-style: italic;
  color: var(--pen);
}

.lede {
  max-width: 60ch;
  margin: 26px 0 0;
  font-size: clamp(17px, 1.4vw, 19.5px);
  line-height: 1.6;
  color: var(--fg-2);
  text-wrap: pretty;
}

.section-head {
  max-width: 980px;
}

/* ---------- Paper sections ---------- */

.paper {
  background-color: var(--paper);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.08 0 0 0 0 0.07 0 0 0 0 0.05 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  color: var(--paper-fg);
}

.paper .eyebrow,
.paper .folio {
  color: var(--paper-fg-3);
}

.paper .eyebrow span,
.paper h2 em {
  color: var(--pen-ink);
}

.paper .lede {
  color: var(--paper-fg-2);
}

/* ---------- Buttons ---------- */

.btn {
  --h: 46px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: var(--h);
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  font: 500 15px/1 var(--font-sans);
  letter-spacing: -0.005em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition-property: background-color, color, box-shadow, transform, opacity;
  transition-duration: 0.18s;
  transition-timing-function: var(--ease-out);
}

.btn:active:not(:disabled) {
  transform: scale(0.96);
}

.btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.btn:focus-visible {
  border-radius: 999px;
}

.btn-sm {
  --h: 38px;
  padding: 0 15px;
  font-size: 14px;
}

.btn-xs {
  --h: 30px;
  padding: 0 11px;
  font-size: 13px;
}

.btn-light {
  background: var(--fg);
  color: var(--ink-950);
  box-shadow:
    0 1px 0 rgb(255 255 255 / 0.6) inset,
    0 8px 22px -10px rgb(0 0 0 / 0.7);
}

.btn-light:hover:not(:disabled) {
  background: #fff;
}

.btn-ghost {
  background: rgb(255 255 255 / 0.04);
  color: var(--fg);
  box-shadow: 0 0 0 1px var(--line-2) inset;
}

.btn-ghost:hover:not(:disabled) {
  background: rgb(255 255 255 / 0.09);
}

.btn-text {
  background: transparent;
  color: var(--fg-2);
  padding-inline: 12px;
}

.btn-text:hover:not(:disabled) {
  color: var(--fg);
}

.btn-pen {
  background: rgb(255 91 55 / 0.12);
  color: var(--pen-2);
  box-shadow: 0 0 0 1px rgb(255 91 55 / 0.45) inset;
}

.btn-pen:hover:not(:disabled) {
  background: rgb(255 91 55 / 0.2);
}

/* The conversion button: bone fill, a red-pen light travelling its edge. */
.btn-glow {
  isolation: isolate;
  color: var(--ink-950);
  background: transparent;
  box-shadow: 0 14px 44px -14px rgb(255 91 55 / 0.75);
}

.btn-glow::before,
.btn-glow::after {
  content: '';
  position: absolute;
  border-radius: inherit;
  z-index: -1;
}

.btn-glow::before {
  inset: -1.5px;
  background: conic-gradient(
    from var(--a),
    rgb(255 255 255 / 0.35) 0 55%,
    var(--pen) 72%,
    #ffd9cd 78%,
    var(--pen) 84%,
    rgb(255 255 255 / 0.35) 96%
  );
  animation: spin-a 5s linear infinite;
}

.btn-glow::after {
  inset: 0.5px;
  background: var(--fg);
  transition: background-color 0.18s var(--ease-out);
}

.btn-glow:hover::after {
  background: #fff;
}

@keyframes spin-a {
  to {
    --a: 360deg;
  }
}

/* ---------- Navigation ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  padding-top: var(--safe-top);
  transition-property: background-color, box-shadow;
  transition-duration: 0.3s;
  transition-timing-function: var(--ease-out);
}

.nav.is-scrolled,
body.menu-open .nav {
  background: rgb(6 7 9 / 0.74);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  box-shadow: 0 1px 0 var(--line);
}

.nav.is-light.is-scrolled {
  background: rgb(243 240 232 / 0.8);
  box-shadow: 0 1px 0 var(--paper-line);
}

.nav .logo,
.nav .nav-links a,
.nav kbd,
.nav .nav-toggle i {
  transition-property: color, background-color, box-shadow;
  transition-duration: 0.25s;
}

.nav.is-light .logo {
  color: var(--paper-fg);
}

.nav.is-light .nav-links a {
  color: var(--paper-fg-2);
}

.nav.is-light .nav-links a:hover {
  color: var(--paper-fg);
  background: rgb(21 19 15 / 0.05);
}

.nav.is-light kbd {
  background: rgb(21 19 15 / 0.05);
  box-shadow: 0 0 0 1px var(--paper-line) inset;
  color: var(--paper-fg-2);
}

.nav.is-light .kbd-btn:hover {
  background: rgb(21 19 15 / 0.05);
}

.nav.is-light .btn-light {
  background: var(--paper-fg);
  color: var(--paper);
  box-shadow: 0 6px 16px -10px rgb(21 19 15 / 0.6);
}

.nav.is-light .btn-light:hover {
  background: #000;
}

.nav.is-light .nav-toggle {
  background: rgb(21 19 15 / 0.06);
}

.nav.is-light .nav-toggle i {
  background: var(--paper-fg);
}

.nav.is-light :focus-visible {
  outline-color: var(--pen-ink);
}

.nav-inner {
  height: 68px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.logo {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--fg);
  text-decoration: none;
}

.logo-word {
  font: 400 28px/1 var(--font-display);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.logo-stet {
  position: relative;
}

.logo-stet::after {
  content: '';
  position: absolute;
  left: 6%;
  right: 8%;
  bottom: -0.2em;
  height: 0.14em;
  background: radial-gradient(circle, var(--pen) 0 38%, transparent 44%) 0 50% / 0.27em 100%
    repeat-x;
}

.nav-links {
  display: flex;
  gap: 2px;
}

.nav-links a {
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--fg-2);
  font-size: 14.5px;
  text-decoration: none;
  transition-property: color, background-color;
  transition-duration: 0.15s;
}

.nav-links a:hover {
  color: var(--fg);
  background: rgb(255 255 255 / 0.05);
}

/* The section in view: ink colour plus a red-pen dot under the label. */
.nav-links a[aria-current='true'] {
  position: relative;
  color: var(--fg);
}

.nav-links a[aria-current='true']::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: var(--pen);
}

.nav.is-light .nav-links a[aria-current='true'] {
  color: var(--paper-fg);
}

.nav.is-light .nav-links a[aria-current='true']::after {
  background: var(--pen-ink);
}

/* The standing line: reading progress along the bar's bottom edge. */
.nav-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1.5px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s var(--ease-out);
}

.nav.is-scrolled .nav-progress {
  opacity: 1;
}

.nav-progress i {
  display: block;
  height: 100%;
  background: var(--pen);
  transform: scaleX(var(--progress, 0));
  transform-origin: 0 50%;
}

.nav.is-light .nav-progress i {
  background: var(--pen-ink);
}

body.menu-open .nav-progress {
  opacity: 0;
}

.nav-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.kbd-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-width: 44px;
  min-height: 40px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  transition: background-color 0.15s;
}

.kbd-label {
  margin-right: 5px;
  color: var(--fg-2);
  font-size: 14px;
  transition: color 0.25s;
}

.kbd-btn:hover .kbd-label {
  color: var(--fg);
}

.nav.is-light .kbd-label {
  color: var(--paper-fg-2);
}

.kbd-btn:hover {
  background: rgb(255 255 255 / 0.05);
}

.nav-toggle {
  display: none;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 10px;
  background: rgb(255 255 255 / 0.05);
  cursor: pointer;
  position: relative;
}

.nav-toggle i {
  position: absolute;
  left: 13px;
  right: 13px;
  height: 1.5px;
  background: var(--fg);
  border-radius: 2px;
  transition: transform 0.25s var(--ease-out);
}

.nav-toggle i:first-of-type {
  transform: translateY(-4px);
}

.nav-toggle i:last-of-type {
  transform: translateY(4px);
}

.nav-toggle[aria-expanded='true'] i:first-of-type {
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded='true'] i:last-of-type {
  transform: rotate(-45deg);
}

.mobile-menu {
  position: fixed;
  inset: calc(68px + var(--safe-top)) 0 0;
  background: rgb(6 7 9 / 0.97);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  padding: 20px 0 40px;
  overflow-y: auto;
}

.mobile-menu nav {
  display: grid;
}

.mobile-menu a:not(.btn) {
  font: 400 42px/1.1 var(--font-display);
  letter-spacing: -0.01em;
  color: var(--fg);
  text-decoration: none;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.mobile-menu .btn {
  margin-top: 28px;
  justify-self: start;
}

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

.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(118px, 17vh, 170px) 0 clamp(56px, 7vw, 96px);
  background: var(--ink-950);
}

.gl {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
}

.gl.no-gl {
  background:
    radial-gradient(70% 30% at 50% 58%, rgb(255 91 55 / 0.28), transparent 70%),
    radial-gradient(50% 40% at 18% 20%, rgb(70 36 110 / 0.3), transparent 70%),
    radial-gradient(50% 40% at 85% 30%, rgb(70 36 110 / 0.22), transparent 70%);
}

.hero-veil {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgb(6 7 9 / 0.55) 0%,
    rgb(6 7 9 / 0) 22%,
    rgb(6 7 9 / 0) 72%,
    rgb(6 7 9 / 0.96) 100%
  );
}

.hero > .folio {
  top: 92px;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 4px 14px 4px 4px;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.04);
  box-shadow: 0 0 0 1px var(--line-2) inset;
  color: var(--fg-2);
  font-size: 13.5px;
  text-decoration: none;
  transition-property: background-color, color;
  transition-duration: 0.2s;
}

.kicker:hover {
  background: rgb(255 255 255 / 0.08);
  color: var(--fg);
}

.kicker-tag {
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--pen);
  color: var(--ink-950);
  font: 600 10.5px/1 var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.kicker svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.2s var(--ease-out);
}

.kicker:hover svg {
  transform: translateX(2px);
}

.k-short {
  display: none;
}

.hero-title {
  margin: 30px 0 0;
  font: 400 clamp(58px, 10.4vw, 168px) / 0.88 var(--font-display);
  letter-spacing: -0.035em;
}

.ht-line {
  display: block;
}

.ht-w {
  display: inline-block;
}

.hero-sub {
  max-width: 58ch;
  margin: 34px 0 0;
  font-size: clamp(17px, 1.45vw, 20px);
  line-height: 1.55;
  color: var(--fg-2);
  text-wrap: balance;
}

.hero-sub strong {
  color: var(--fg);
  font-weight: 500;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 34px;
}

.hero-def {
  margin: 26px 0 0;
  font-size: 13px;
  color: var(--fg-3);
}

.hero-def .mono {
  color: var(--fg-2);
}

.hero-def .ipa {
  font: 12px var(--font-mono);
}

/* ---------- The stet mark ---------- */

.stet {
  --t0: 0.2s;
  position: relative;
  display: inline-block;
}

.hero .stet {
  --t0: 1.05s;
}

.stet-strike {
  position: absolute;
  left: -0.05em;
  right: -0.05em;
  top: 0.53em;
  height: 0.055em;
  border-radius: 1em;
  background: var(--pen);
  box-shadow: 0 0 0.3em rgb(255 91 55 / 0.5);
  transform: scaleX(0);
  transform-origin: 0 50%;
  pointer-events: none;
}

.stet-dots {
  position: absolute;
  left: 0.08em;
  right: 0.08em;
  bottom: -0.02em;
  height: 0.075em;
  background: radial-gradient(circle, var(--pen) 0 38%, transparent 43%) 0 50% / 0.15em 100% space
    no-repeat;
  clip-path: inset(0 100% 0 0);
  pointer-events: none;
}

/* A margin note, clear of the period that follows the word. Offsets are in
   the note's own em, which is 0.27 of the title's. */
.stet-note {
  position: absolute;
  right: -3.75em;
  top: 0.45em;
  padding: 0.28em 0.46em;
  font: italic 400 0.27em/1 var(--font-display);
  letter-spacing: 0;
  color: var(--pen);
  white-space: nowrap;
  opacity: 0;
  transform: translateY(0.3em) rotate(-9deg);
  pointer-events: none;
}

.stet-note svg {
  position: absolute;
  inset: -0.1em -0.2em;
  width: calc(100% + 0.4em);
  height: calc(100% + 0.2em);
  overflow: visible;
}

.stet-note path {
  fill: none;
  stroke: var(--pen);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 280;
  stroke-dashoffset: 280;
  vector-effect: non-scaling-stroke;
}

.stet.play .stet-strike {
  animation:
    stet-strike-in 0.42s var(--ease-out) var(--t0) forwards,
    stet-strike-out 0.55s var(--ease-in-out) calc(var(--t0) + 1.7s) forwards;
}

.stet.play .stet-text {
  animation: stet-dim 2.2s ease var(--t0) both;
}

.stet.play .stet-dots {
  animation: stet-dots 0.7s steps(10, end) calc(var(--t0) + 0.75s) forwards;
}

.stet.play .stet-note {
  animation: stet-note 0.5s var(--ease-out) calc(var(--t0) + 0.9s) forwards;
}

.stet.play .stet-note path {
  animation: stet-draw 0.9s var(--ease-out) calc(var(--t0) + 1.05s) forwards;
}

@keyframes stet-strike-in {
  to {
    transform: scaleX(1);
  }
}

@keyframes stet-strike-out {
  from {
    transform: scaleX(1);
    transform-origin: 100% 50%;
  }
  to {
    transform: scaleX(0);
    transform-origin: 100% 50%;
  }
}

@keyframes stet-dim {
  0% {
    color: var(--fg);
  }
  18%,
  76% {
    color: var(--fg-3);
  }
  100% {
    color: var(--fg);
  }
}

@keyframes stet-dots {
  to {
    clip-path: inset(0 0 0 0);
  }
}

@keyframes stet-note {
  to {
    opacity: 1;
    transform: rotate(-9deg);
  }
}

@keyframes stet-draw {
  to {
    stroke-dashoffset: 0;
  }
}

/* ---------- Hero stage & app mock ---------- */

.hero-stage {
  --p: 0;
  --rx: 0;
  --ry: 0;
  position: relative;
  width: min(1200px, calc(100% - 2 * var(--gutter)));
  margin: clamp(56px, 7vw, 88px) auto 0;
  perspective: 2200px;
}

.stage-halo {
  position: absolute;
  left: 8%;
  right: 8%;
  top: -6%;
  height: 40%;
  background: radial-gradient(60% 60% at 50% 60%, rgb(255 91 55 / 0.22), transparent 70%);
  filter: blur(30px);
  opacity: calc(0.4 + var(--p) * 0.6);
  pointer-events: none;
}

.stage-tilt {
  transform-origin: 50% 0%;
  transform: rotateX(calc((1 - var(--p)) * 24deg + var(--rx) * 1deg))
    rotateY(calc(var(--ry) * 1deg)) translateY(calc((1 - var(--p)) * 20px))
    scale(calc(0.93 + var(--p) * 0.07));
  will-change: transform;
}

.fit {
  position: relative;
}

.fit > * {
  transform-origin: 0 0;
}

.app {
  position: absolute;
  left: 0;
  top: 0;
  width: 1200px;
  border-radius: 14px;
  overflow: hidden;
  background: #0a0c10;
  color: var(--fg);
  font: 400 13px/1.45 var(--font-sans);
  text-align: left;
  box-shadow:
    0 0 0 1px rgb(255 255 255 / 0.1),
    0 1px 0 rgb(255 255 255 / 0.08) inset,
    0 70px 130px -40px rgb(0 0 0 / 0.95),
    0 30px 80px -40px rgb(255 91 55 / 0.35);
}

.app-chrome {
  height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  background: #0d1015;
  border-bottom: 1px solid rgb(255 255 255 / 0.06);
}

.tl {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #262b34;
}

.app-url {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 auto;
  padding: 5px 14px;
  border-radius: 8px;
  background: rgb(255 255 255 / 0.04);
  color: var(--fg-3);
  font: 12px var(--font-mono);
}

.lock {
  width: 8px;
  height: 9px;
  border-radius: 2px;
  background: var(--fg-3);
}

.app-kbd {
  font: 11px var(--font-mono);
  color: var(--fg-3);
  padding: 3px 6px;
  border-radius: 5px;
  box-shadow: 0 0 0 1px var(--line-2) inset;
}

.app-body {
  display: grid;
  grid-template-columns: 208px 1fr;
  min-height: 660px;
}

.app-side {
  padding: 18px 12px;
  background: #0b0d11;
  border-right: 1px solid rgb(255 255 255 / 0.06);
}

.app-brand {
  padding: 2px 8px;
}

.app-brand .logo-word {
  font-size: 22px;
}

.app-tenant {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 18px 8px 14px;
  font-size: 12px;
  color: var(--fg-2);
}

.tenant-dot {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: linear-gradient(135deg, #2b3140, #161a22);
  box-shadow: 0 0 0 1px var(--line) inset;
}

.app-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1px;
}

.app-nav li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 10px;
  border-radius: 7px;
  color: var(--fg-2);
}

.app-nav li b {
  padding: 1px 6px;
  border-radius: 99px;
  background: var(--pen);
  color: var(--ink-950);
  font: 600 10.5px/1.4 var(--font-mono);
}

.app-nav li.sep {
  margin-top: 12px;
  padding-bottom: 4px;
  font: 10px/1 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-3);
}

.app-nav li.on {
  background: rgb(255 255 255 / 0.07);
  color: var(--fg);
}

.app-main {
  padding: 20px 26px 26px;
}

.app-crumb {
  font-size: 12px;
  color: var(--fg-3);
}

.app-crumb span:not(.mono) {
  margin: 0 4px;
}

.app-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-top: 10px;
}

.app-title {
  font: 400 34px/1.05 var(--font-display);
  letter-spacing: -0.015em;
}

.app-facts {
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--fg-3);
}

.app-head-r {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  border-radius: 99px;
  background: rgb(255 255 255 / 0.06);
  color: var(--fg-2);
  font-size: 12px;
}

.pill-live i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pen);
  box-shadow: 0 0 10px var(--pen);
}

.mini-btn {
  padding: 6px 11px;
  border-radius: 8px;
  background: rgb(255 255 255 / 0.05);
  box-shadow: 0 0 0 1px var(--line-2) inset;
  color: var(--fg-2);
  font-size: 12px;
  white-space: nowrap;
}

.mini-btn.off {
  color: var(--fg-3);
  background: transparent;
}

.app-tabs {
  display: flex;
  gap: 22px;
  margin-top: 18px;
  border-bottom: 1px solid rgb(255 255 255 / 0.07);
}

.app-tabs span {
  padding: 10px 0;
  color: var(--fg-3);
}

.app-tabs span.on {
  color: var(--fg);
  box-shadow: 0 -2px 0 var(--fg) inset;
}

.app-tabs i {
  margin-left: 4px;
  font: normal 11px var(--font-mono);
  color: var(--fg-3);
}

.phase {
  display: flex;
  gap: 6px;
  margin-top: 18px;
}

.ph {
  position: relative;
  flex: 1;
  padding-top: 12px;
  font-size: 12px;
  color: var(--fg-3);
}

.ph::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 3px;
  background: rgb(255 255 255 / 0.08);
}

.ph.done {
  color: var(--fg-2);
}

.ph.done::before {
  background: rgb(255 255 255 / 0.45);
}

.ph.now {
  color: var(--fg);
}

.ph.now::before {
  background: linear-gradient(90deg, var(--pen) 58%, rgb(255 255 255 / 0.08) 58%);
}

.app-grid {
  display: grid;
  grid-template-columns: 1.45fr 1fr 1fr;
  gap: 14px;
  margin-top: 20px;
}

.app-card {
  padding: 16px;
  border-radius: 12px;
  background: #0e1116;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.07);
}

.card-h {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
  font-weight: 500;
}

.card-h span {
  color: var(--fg-3);
  font-weight: 400;
  font-size: 12px;
}

.card-h.sub {
  margin-top: 18px;
}

.proc {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 9px 8px;
  border-radius: 8px;
  color: var(--fg-2);
}

.proc .mono {
  color: var(--fg-3);
  font-size: 12px;
}

.proc.hl {
  background: rgb(255 91 55 / 0.07);
  box-shadow: 0 0 0 1px rgb(255 91 55 / 0.22) inset;
  color: var(--fg);
}

.ai-chip {
  margin-left: 8px;
  padding: 2px 7px;
  border-radius: 99px;
  background: rgb(255 91 55 / 0.14);
  color: var(--pen-2);
  font-style: normal;
  font-size: 11px;
}

.st {
  padding: 3px 8px;
  border-radius: 99px;
  background: rgb(255 255 255 / 0.04);
  color: var(--fg-3);
  font-size: 11.5px;
  white-space: nowrap;
}

.st-ok {
  color: var(--seal);
  background: rgb(143 240 200 / 0.1);
}

.st-rev {
  color: #cdd6ff;
  background: rgb(160 175 255 / 0.1);
}

.st-inrev {
  color: var(--pen-2);
  background: rgb(255 91 55 / 0.13);
}

.st-prep {
  color: var(--fg-2);
  background: rgb(255 255 255 / 0.07);
}

.bar {
  height: 4px;
  margin: 14px 8px 2px;
  border-radius: 4px;
  background: rgb(255 255 255 / 0.07);
  overflow: hidden;
}

.bar i {
  display: block;
  width: var(--w);
  height: 100%;
  border-radius: inherit;
  background: var(--fg-2);
  transition: width 0.9s var(--ease-out);
}

.kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.kpis div {
  padding: 10px;
  border-radius: 8px;
  background: rgb(255 255 255 / 0.03);
}

.kpis b {
  display: block;
  font: 500 20px/1.2 var(--font-sans);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.kpis span {
  font-size: 11px;
  color: var(--fg-3);
}

.phase-bars {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.phase-bars div {
  display: grid;
  grid-template-columns: 70px 1fr;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--fg-3);
}

.phase-bars i {
  height: 6px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--fg-2) var(--w), rgb(255 255 255 / 0.07) var(--w));
}

.req {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 0;
  border-top: 1px solid rgb(255 255 255 / 0.05);
  font-size: 12.5px;
  color: var(--fg-2);
}

.req .mono {
  margin-right: 6px;
  color: var(--fg-3);
  font-size: 11.5px;
}

.req b {
  color: var(--fg);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.rail-list {
  position: relative;
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0 0 0 18px;
  list-style: none;
}

.rail-list::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: rgb(255 255 255 / 0.12);
}

.rail-list li {
  position: relative;
  display: grid;
  gap: 2px;
  font-size: 12px;
  color: var(--fg-3);
}

.rail-list li::before {
  content: '';
  position: absolute;
  left: -18px;
  top: 4px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #0e1116;
  box-shadow: 0 0 0 1.5px rgb(255 255 255 / 0.25);
}

.rail-list li.ok::before {
  background: var(--seal);
  box-shadow: 0 0 0 3px rgb(143 240 200 / 0.15);
}

.rail-list li.now::before {
  background: var(--pen);
  box-shadow: 0 0 0 3px rgb(255 91 55 / 0.2);
  animation: pulse 2.2s var(--ease-out) infinite;
}

.rail-list b {
  color: var(--fg);
  font-weight: 500;
  font-size: 13px;
}

.rail-list code {
  font: 11px var(--font-mono);
  color: var(--seal);
}

/* The hero's approval landing: the node rings once, the hash appears. */
.rail-list li.just-signed::before {
  animation: signed 1.3s var(--ease-out) 1;
}

.rail-list li.just-signed code {
  animation: chip-in 0.5s var(--ease-out) 0.15s both;
}

@keyframes signed {
  0% {
    box-shadow: 0 0 0 0 rgb(143 240 200 / 0.7);
  }
  100% {
    box-shadow: 0 0 0 12px rgb(143 240 200 / 0);
  }
}

.verify {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgb(255 255 255 / 0.06);
  font-size: 12px;
  color: var(--fg-2);
}

.verify i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--seal);
  box-shadow: 0 0 10px var(--seal);
}

.verify .mono {
  margin-left: auto;
  color: var(--fg-3);
  font-size: 11px;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgb(255 91 55 / 0.55);
  }
  70% {
    box-shadow: 0 0 0 8px rgb(255 91 55 / 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgb(255 91 55 / 0);
  }
}

/* ---------- Ticker ---------- */

.ticker {
  position: relative;
  overflow: hidden;
  padding: 22px 0;
  background: var(--ink-950);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker 48s linear infinite;
}

.ticker:hover .ticker-track {
  animation-play-state: paused;
}

.ticker ul {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ticker li {
  display: flex;
  align-items: center;
  gap: 28px;
  padding-right: 28px;
  font: 400 12.5px/1 var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-2);
  white-space: nowrap;
}

.ticker li::after {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--pen);
}

@keyframes ticker {
  to {
    transform: translateX(-50%);
  }
}

/* ---------- Why (statement + pillars) ---------- */

.statement {
  max-width: 1120px;
  margin: 40px 0 0;
  font: 400 clamp(34px, 4.7vw, 70px) / 1.08 var(--font-display);
  letter-spacing: -0.02em;
  text-wrap: pretty;
}

.statement em {
  font-style: italic;
  color: var(--pen-ink);
}

/* Unread words are the paper's muted ink, still readable at rest; the reading
   line inks them in. */
.js .statement .w {
  color: var(--paper-fg-3);
  transition: color 0.4s var(--ease-out);
}

.js .statement .w.lit {
  color: var(--paper-fg);
}

.js .statement em .w.lit {
  color: var(--pen-ink);
}

.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(22px, 3vw, 44px);
  margin-top: clamp(80px, 10vw, 140px);
}

.pillar {
  padding-top: 28px;
  border-top: 1px solid var(--paper-fg);
}

.pillar-ico {
  width: 44px;
  height: 44px;
  fill: none;
  stroke: var(--paper-fg);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pillar h3 {
  margin: 22px 0 12px;
  font: 400 42px/1 var(--font-display);
  letter-spacing: -0.012em;
}

.pillar p {
  margin: 0 0 24px;
  color: var(--paper-fg-2);
  font-size: 17px;
  line-height: 1.6;
  text-wrap: pretty;
}

.stamp {
  display: inline-block;
  padding: 7px 10px;
  border-radius: 3px;
  box-shadow: 0 0 0 1px var(--paper-line) inset;
  color: var(--paper-fg-2);
  font: 400 11px/1.3 var(--font-mono);
  letter-spacing: 0.08em;
}

/* ---------- The record (tamper demo) ---------- */

.record {
  background:
    radial-gradient(60% 50% at 85% 20%, rgb(255 91 55 / 0.06), transparent 70%), var(--ink-950);
}

.record-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(36px, 5vw, 84px);
  align-items: start;
}

.record-copy {
  position: sticky;
  top: calc(110px + var(--safe-top));
}

.record-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 34px;
}

.step-no {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin-left: -6px;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.1);
  font: 500 11px/1 var(--font-mono);
}

.btn-light .step-no {
  background: rgb(6 7 9 / 0.1);
}

.btn-pen .step-no {
  background: rgb(255 91 55 / 0.2);
}

/* The next move in the sequence breathes until it's taken. */
.record-actions .is-next:not(:disabled) {
  animation: next-ring 2.4s var(--ease-out) infinite;
}

@keyframes next-ring {
  0% {
    box-shadow:
      0 0 0 1px rgb(255 91 55 / 0.45) inset,
      0 0 0 0 rgb(255 91 55 / 0.5);
  }
  70%,
  100% {
    box-shadow:
      0 0 0 1px rgb(255 91 55 / 0.45) inset,
      0 0 0 9px rgb(255 91 55 / 0);
  }
}

.record-explain {
  min-height: 6.6em;
  margin: 24px 0 0;
  padding-left: 16px;
  border-left: 2px solid var(--line-2);
  color: var(--fg-2);
  font-size: 16px;
  line-height: 1.6;
  text-wrap: pretty;
  transition: border-color 0.3s;
}

.record-explain.is-bad {
  border-color: var(--pen);
}

.record-explain.is-good {
  border-color: var(--seal);
}

.chain-panel {
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(180deg, var(--ink-850), var(--ink-900));
  box-shadow:
    0 0 0 1px var(--line),
    0 40px 100px -40px rgb(0 0 0 / 0.9);
}

.chain-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.chain-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.chain-status b {
  font-weight: 500;
}

.chain-status i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--fg-3);
  transition-property: background-color, box-shadow;
  transition-duration: 0.3s;
}

.chain-status.is-ok i {
  background: var(--seal);
  box-shadow:
    0 0 0 4px rgb(143 240 200 / 0.12),
    0 0 16px rgb(143 240 200 / 0.6);
}

.chain-status.is-bad i {
  background: var(--pen);
  box-shadow:
    0 0 0 4px rgb(255 91 55 / 0.14),
    0 0 16px rgb(255 91 55 / 0.7);
}

.chain-status.is-bad b {
  color: var(--pen-2);
}

.chain-scope {
  font-size: 11px;
  color: var(--fg-3);
}

.chain {
  margin: 0;
  padding: 10px 0;
  list-style: none;
}

.link {
  position: relative;
  display: grid;
  grid-template-columns: 46px 1fr;
  padding: 12px 20px 12px 0;
}

.link + .link::before {
  content: '';
  position: absolute;
  left: 22.5px;
  top: -17px;
  height: 38px;
  width: 1px;
  background: rgb(143 240 200 / 0.45);
}

.link.is-bad-link::before {
  background: var(--pen);
  box-shadow: 0 0 8px var(--pen);
}

.link .node {
  position: relative;
  z-index: 1;
  justify-self: center;
  width: 11px;
  height: 11px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--ink-900);
  box-shadow: 0 0 0 2px var(--seal);
}

.link.is-bad-row .node {
  background: var(--pen);
  box-shadow:
    0 0 0 2px var(--pen),
    0 0 14px var(--pen);
}

.link-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  font-size: 12.5px;
  color: var(--fg-3);
}

.link-top .n {
  color: var(--fg-2);
}

.link-act {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  margin-top: 5px;
}

.act {
  padding: 2px 6px;
  border-radius: 4px;
  background: rgb(255 255 255 / 0.06);
  color: var(--fg-2);
  font: 400 10.5px/1.5 var(--font-mono);
  letter-spacing: 0.08em;
}

.obj {
  font-size: 15px;
  color: var(--fg);
}

.obj.is-changed {
  padding: 0 5px;
  border-radius: 4px;
  background: rgb(255 91 55 / 0.1);
  box-shadow: 0 0 0 1px rgb(255 91 55 / 0.35) inset;
  color: var(--pen-2);
}

.link-hash {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  margin-top: 7px;
  font: 400 11.5px/1.5 var(--font-mono);
  color: var(--fg-3);
}

.link-hash .bad {
  color: var(--pen-2);
}

.link-hash .verdict {
  margin-left: auto;
  color: var(--seal);
}

.link.is-bad-row .verdict,
.link.is-bad-link .verdict {
  color: var(--pen-2);
}

.link.is-voided .act,
.link.is-voided .obj {
  color: var(--fg-3);
  text-decoration: line-through;
  text-decoration-color: var(--pen);
  text-decoration-thickness: 1.5px;
}

.tag-void {
  padding: 1px 6px;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgb(255 91 55 / 0.45) inset;
  color: var(--pen-2);
  font: 400 10px/1.5 var(--font-mono);
  letter-spacing: 0.1em;
}

.link.is-new {
  animation: link-in 0.55s var(--ease-out) both;
}

@keyframes link-in {
  from {
    opacity: 0;
    transform: translateY(10px);
    filter: blur(4px);
  }
}

.chain-foot {
  padding: 13px 20px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  letter-spacing: 0.03em;
  color: var(--fg-3);
}

/* ---------- Workflow ---------- */

.wf-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(36px, 5vw, 88px);
  margin-top: clamp(56px, 7vw, 100px);
}

.wf-steps {
  position: relative;
  padding-left: 38px;
}

.wf-rail {
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 0;
  width: 1px;
  background: var(--paper-line);
}

.wf-rail i {
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 100%;
  background: var(--pen-ink);
  transform: scaleY(var(--fill, 0));
  transform-origin: 0 0;
}

/* Every step stays readable; the one in focus takes full ink. */
.step {
  min-height: 46vh;
  padding: 0 0 48px;
}

.step:last-child {
  min-height: 42vh;
}

.step h3,
.step > p {
  transition: color 0.45s var(--ease-out);
}

.step:not(.is-active) h3 {
  color: var(--paper-fg-2);
}

.step:not(.is-active) > p {
  color: var(--paper-fg-3);
}

.step-n {
  position: relative;
  margin: 0 0 14px;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--pen-ink);
}

.step-n::before {
  content: '';
  position: absolute;
  left: -43px;
  top: 50%;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--paper);
  box-shadow: 0 0 0 1.5px var(--paper-fg-3);
  transform: translateY(-50%);
  transition-property: background-color, box-shadow;
  transition-duration: 0.3s;
}

.step.is-active .step-n::before {
  background: var(--pen-ink);
  box-shadow:
    0 0 0 1.5px var(--pen-ink),
    0 0 0 6px rgb(194 50 26 / 0.14);
}

.step h3 {
  margin: 0 0 14px;
  font: 400 clamp(38px, 3.8vw, 56px) / 1 var(--font-display);
  letter-spacing: -0.015em;
}

.step > p {
  max-width: 46ch;
  margin: 0;
  color: var(--paper-fg-2);
  font-size: 18px;
  line-height: 1.6;
  text-wrap: pretty;
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.facts li {
  padding: 7px 11px;
  border-radius: 99px;
  box-shadow: 0 0 0 1px var(--paper-line) inset;
  color: var(--paper-fg-2);
  font: 400 11.5px/1 var(--font-mono);
  letter-spacing: 0.03em;
}

.wf-stage {
  position: sticky;
  top: calc(100px + var(--safe-top));
  height: min(620px, calc(100vh - 140px));
}

.stage-count {
  position: absolute;
  right: 0;
  top: -30px;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--paper-fg-3);
  font-variant-numeric: tabular-nums;
}

/* The visual cards: product surfaces laid on paper. */
.step-visual {
  padding: 22px;
  border-radius: 20px;
  background: var(--ink-900);
  color: var(--fg);
  font-size: 13px;
  box-shadow:
    0 1px 0 rgb(255 255 255 / 0.06) inset,
    0 50px 90px -40px rgb(28 22 12 / 0.55),
    0 18px 30px -20px rgb(28 22 12 / 0.4);
}

.wf-stage .step-visual {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  opacity: 0;
  transform: translateY(calc(-50% + 22px)) scale(0.985);
  filter: blur(6px);
  pointer-events: none;
  transition-property: opacity, transform, filter;
  transition-duration: 0.6s;
  transition-timing-function: var(--ease-out);
}

.wf-stage .step-visual.is-active {
  opacity: 1;
  transform: translateY(-50%);
  filter: none;
}

.vh {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.vh b {
  font-weight: 500;
  font-size: 15px;
}

.vh .mono {
  font-size: 11px;
  color: var(--fg-3);
}

.vfoot {
  margin-top: 16px;
  font-size: 11px;
  letter-spacing: 0.02em;
  color: var(--fg-3);
}

.pill-s {
  padding: 3px 9px;
  border-radius: 99px;
  background: rgb(255 255 255 / 0.07);
  color: var(--fg-2);
  font: 400 10.5px/1.5 var(--font-mono);
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.pill-s.ok {
  background: rgb(143 240 200 / 0.12);
  color: var(--seal);
}

.pill-s.hi {
  background: rgb(255 91 55 / 0.15);
  color: var(--pen-2);
}

.pill-s.warn {
  background: rgb(255 210 122 / 0.12);
  color: var(--amber);
}

/* v-risk */
.risk-wrap {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 22px;
  align-items: center;
}

.heat {
  display: grid;
  grid-template-columns: repeat(5, 42px);
  grid-auto-rows: 42px;
  gap: 4px;
}

.heat i {
  display: grid;
  place-items: center;
  border-radius: 7px;
  font: normal 11px var(--font-mono);
  color: rgb(255 255 255 / 0.85);
}

.heat .h1 {
  background: rgb(255 255 255 / 0.05);
}

.heat .h2 {
  background: rgb(255 91 55 / 0.16);
}

.heat .h3 {
  background: rgb(255 91 55 / 0.32);
}

.heat .h4 {
  background: rgb(255 91 55 / 0.52);
}

.heat .h5 {
  background: rgb(255 91 55 / 0.8);
  color: var(--ink-950);
}

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

.toplist li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  background: rgb(255 255 255 / 0.03);
  color: var(--fg-2);
}

.toplist b {
  font: 500 12px var(--font-mono);
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}

/* v-plan */
.gantt {
  position: relative;
  display: grid;
  gap: 2px;
}

.g-head,
.g-row {
  display: grid;
  grid-template-columns: 138px 1fr 1fr 1fr 1fr;
  align-items: center;
}

.g-head span {
  font: 10.5px var(--font-mono);
  letter-spacing: 0.1em;
  color: var(--fg-3);
  padding-bottom: 8px;
}

.g-row {
  position: relative;
  height: 36px;
  border-top: 1px solid rgb(255 255 255 / 0.05);
}

.g-row span {
  color: var(--fg-2);
  font-size: 12.5px;
  white-space: nowrap;
}

.g-row i {
  grid-column: 2 / -1;
  grid-row: 1;
  height: 16px;
  margin-left: calc(var(--s) * 25%);
  width: calc(var(--l) * 25%);
  border-radius: 5px;
  background: rgb(255 255 255 / 0.16);
}

.g-row.moving i {
  background: transparent;
  box-shadow: 0 0 0 1.5px var(--pen) inset;
  animation: nudge 3.6s var(--ease-in-out) infinite;
}

.g-row.moving em {
  position: absolute;
  right: 0;
  top: -10px;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--pen);
  color: var(--ink-950);
  font: 600 10px/1.3 var(--font-mono);
  letter-spacing: 0.04em;
  font-style: normal;
}

@keyframes nudge {
  0%,
  20% {
    transform: translateX(0);
  }
  55%,
  80% {
    transform: translateX(28%);
  }
  100% {
    transform: translateX(0);
  }
}

.chainline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.chainline span {
  padding: 5px 10px;
  border-radius: 99px;
  background: rgb(255 255 255 / 0.05);
  color: var(--fg-2);
  font: 400 11px/1.4 var(--font-mono);
}

.chainline .ok {
  background: rgb(143 240 200 / 0.1);
  color: var(--seal);
}

/* v-field */
.wp {
  padding: 16px;
  border-radius: 12px;
  background: rgb(255 255 255 / 0.03);
  box-shadow: 0 0 0 1px var(--line) inset;
}

.wp p {
  margin: 0;
  color: var(--fg-2);
  line-height: 1.6;
}

.wp .wp-t {
  margin-bottom: 8px;
  color: var(--fg);
  font-weight: 500;
}

.ref {
  padding: 1px 6px;
  border-radius: 5px;
  background: rgb(255 91 55 / 0.12);
  color: var(--pen-2);
  font: 11px var(--font-mono);
}

.files {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.file {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgb(255 255 255 / 0.04);
  box-shadow: 0 0 0 1px var(--line) inset;
  color: var(--fg-2);
  font: 11.5px var(--font-mono);
}

.file em {
  font-style: normal;
  font-size: 10.5px;
  padding: 1px 6px;
  border-radius: 99px;
}

.file.ok em {
  background: rgb(143 240 200 / 0.12);
  color: var(--seal);
}

.file.scan em {
  background: rgb(255 255 255 / 0.08);
  color: var(--fg-2);
  background-image: linear-gradient(90deg, transparent, rgb(255 255 255 / 0.18), transparent);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}

@keyframes shimmer {
  from {
    background-position: 200% 0;
  }
  to {
    background-position: -200% 0;
  }
}

.ready {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.ready li {
  position: relative;
  padding: 9px 10px 9px 32px;
  border-radius: 8px;
  background: rgb(255 255 255 / 0.03);
  color: var(--fg-3);
}

.ready li::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 50%;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  box-shadow: 0 0 0 1.5px var(--fg-3) inset;
  transform: translateY(-50%);
}

.ready li.ok {
  color: var(--fg);
}

.ready li.ok::before {
  background: var(--seal);
  box-shadow: none;
}

.submit {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  font-size: 12px;
  color: var(--fg-3);
}

/* v-review */
.note {
  padding: 14px;
  border-radius: 12px;
  background: rgb(255 255 255 / 0.03);
  box-shadow: 0 0 0 1px var(--line) inset;
}

.note + .note {
  margin-top: 8px;
}

.note.reply {
  margin-left: 26px;
}

.note p {
  margin: 0;
  color: var(--fg-2);
  line-height: 1.55;
}

.note .note-h {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  color: var(--fg);
  font-weight: 500;
}

.note .note-h .mono {
  color: var(--pen-2);
  font-weight: 400;
  font-size: 11.5px;
}

.note .pill-s {
  margin-left: auto;
}

.seal-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.seal {
  position: relative;
  flex: 0 0 auto;
  width: 96px;
  height: 96px;
}

.seal svg {
  width: 100%;
  height: 100%;
  fill: none;
  animation: spin 28s linear infinite;
}

.seal circle {
  stroke: rgb(143 240 200 / 0.55);
  stroke-width: 1;
}

.seal text {
  fill: var(--seal);
  font: 500 9.2px var(--font-mono);
  letter-spacing: 0.18em;
}

.seal > span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--seal);
  font-size: 26px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.seal-meta {
  font-size: 12px;
  line-height: 1.7;
  color: var(--fg-3);
}

.seal-meta b {
  color: var(--fg);
  font-weight: 500;
}

.seal-meta span {
  color: var(--seal);
}

/* v-finding */
.fivec {
  display: grid;
  grid-template-columns: 116px 1fr;
  margin: 0;
}

.fivec dt,
.fivec dd {
  padding: 9px 0;
  border-top: 1px solid var(--line);
}

.fivec dt {
  font: 10.5px var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-3);
  padding-top: 11px;
}

.fivec dd {
  margin: 0;
  color: var(--fg-2);
  line-height: 1.5;
}

.response {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgb(143 240 200 / 0.06);
  box-shadow: 0 0 0 1px rgb(143 240 200 / 0.18) inset;
  color: var(--fg-2);
  line-height: 1.5;
}

.response b {
  display: block;
  margin-bottom: 2px;
  color: var(--fg);
  font-weight: 500;
}

.response .mono {
  color: var(--seal);
  font-size: 11px;
}

/* v-report */
.doc {
  padding: 26px 28px;
  border-radius: 8px;
  background: #f7f5ef;
  color: #1a1814;
  box-shadow: 0 20px 40px -24px rgb(0 0 0 / 0.8);
}

.doc p {
  margin: 0;
}

.doc-k {
  font-size: 10px;
  letter-spacing: 0.14em;
  color: #6d675b;
}

.doc-t {
  margin-top: 8px !important;
  font: 400 30px/1.05 var(--font-display);
  letter-spacing: -0.01em;
}

.doc-s {
  margin: 8px 0 14px !important;
  font-size: 12.5px;
  color: #4f4a41;
}

.doc-h {
  margin: 14px 0 8px !important;
  font-weight: 600;
  font-size: 12.5px;
}

.doc-f {
  display: flex;
  gap: 10px;
  padding: 6px 0;
  border-top: 1px solid #e5e0d4;
  font-size: 12.5px;
}

.doc-f b {
  margin-left: auto;
  color: var(--pen-ink);
  font-weight: 600;
}

.ln {
  display: block;
  height: 6px;
  margin: 7px 0;
  border-radius: 3px;
  background: #e5e0d4;
}

.w60 {
  width: 60%;
}

.w70 {
  width: 70%;
}

.w75 {
  width: 75%;
}

.w80 {
  width: 80%;
}

.w90 {
  width: 90%;
}

.doc-hash {
  margin-top: 14px !important;
  padding-top: 10px;
  border-top: 1px solid #e5e0d4;
  font-size: 10.5px;
  color: #2f6b52;
}

/* v-actions */
.act-row {
  position: relative;
  display: grid;
  grid-template-columns: 112px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 12px 0 16px;
  border-top: 1px solid var(--line);
  color: var(--fg-2);
}

.act-row .mono {
  font-size: 11px;
  color: var(--fg-3);
}

.act-row i {
  position: absolute;
  left: 112px;
  right: 0;
  bottom: 7px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--fg-2) var(--w), rgb(255 255 255 / 0.07) var(--w));
}

.aging {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 12px;
}

.aging span {
  padding: 10px;
  border-radius: 8px;
  background: rgb(255 255 255 / 0.03);
  font-size: 10.5px;
  color: var(--fg-3);
}

.aging b {
  display: block;
  margin-top: 4px;
  font: 500 18px var(--font-sans);
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}

/* ---------- Copilot ---------- */

.copilot {
  background:
    radial-gradient(50% 40% at 15% 10%, rgb(255 91 55 / 0.07), transparent 70%), var(--ink-950);
}

.copilot-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: 18px;
  margin-top: 60px;
  align-items: start;
}

.draft-card {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  background: var(--ink-850);
  box-shadow:
    0 0 0 1px var(--line),
    0 50px 120px -50px rgb(0 0 0 / 0.95);
}

.draft-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--pen), transparent);
  background-size: 50% 100%;
  background-repeat: no-repeat;
  background-position: -60% 0;
  opacity: 0;
}

.draft-card.is-drafting::before {
  opacity: 1;
  animation: scan 1.6s var(--ease-in-out) infinite;
}

@keyframes scan {
  to {
    background-position: 160% 0;
  }
}

.draft-tabs,
.code-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  padding: 10px;
  border-bottom: 1px solid var(--line);
}

.draft-tabs button,
.code-tabs button {
  height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--fg-3);
  font: 500 14px var(--font-sans);
  cursor: pointer;
  transition-property: background-color, color;
  transition-duration: 0.15s;
}

.draft-tabs button:hover,
.code-tabs button:hover {
  color: var(--fg);
}

.draft-tabs button[aria-selected='true'],
.code-tabs button[aria-selected='true'] {
  background: rgb(255 255 255 / 0.08);
  color: var(--fg);
}

.draft-panel {
  padding: 22px 24px 22px;
}

.draft-h {
  display: flex;
  align-items: center;
  gap: 14px;
}

.spark {
  color: var(--pen);
  font-size: 18px;
  line-height: 1;
}

.draft-h b {
  display: block;
  font-weight: 500;
  font-size: 16px;
}

.draft-h span:not(.spark) {
  color: var(--fg-3);
  font-size: 13px;
}

.draft-h .btn {
  margin-left: auto;
}

.fields {
  margin-top: 18px;
}

.field {
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 6px 18px;
  min-height: 66px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}

.fk {
  padding-top: 3px;
  font: 400 11px/1.5 var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-3);
}

.field.done .fk {
  color: var(--fg-2);
}

.fv {
  min-height: 1.55em;
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--fg);
  text-wrap: pretty;
}

.field.typing .fv::after {
  content: '';
  display: inline-block;
  width: 2px;
  height: 1.05em;
  margin-left: 2px;
  vertical-align: -0.16em;
  background: var(--pen);
  animation: caret 0.9s steps(1) infinite;
}

@keyframes caret {
  50% {
    opacity: 0;
  }
}

.cites {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cites:empty {
  display: none;
}

.cite {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 8px;
  border: 0;
  border-radius: 7px;
  background: rgb(255 91 55 / 0.1);
  box-shadow: 0 0 0 1px rgb(255 91 55 / 0.28) inset;
  color: var(--pen-2);
  font: 400 11px/1 var(--font-mono);
  cursor: default;
  transition: background-color 0.15s;
  animation: chip-in 0.4s var(--ease-out) both;
}

button.cite:hover,
button.cite:focus-visible {
  background: rgb(255 91 55 / 0.2);
}

.cite.more {
  background: rgb(255 255 255 / 0.06);
  box-shadow: 0 0 0 1px var(--line-2) inset;
  color: var(--fg-2);
}

@keyframes chip-in {
  from {
    opacity: 0;
    transform: scale(0.85);
    filter: blur(3px);
  }
}

.draft-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.prov {
  font-size: 12px;
  color: var(--fg-3);
  font-variant-numeric: tabular-nums;
}

.draft-actions {
  display: flex;
  gap: 8px;
}

.accepted {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-top: 14px;
  animation: chip-in 0.45s var(--ease-out) both;
}

.accepted[hidden] {
  display: none;
}

.acc-chip {
  padding: 7px 12px;
  border-radius: 99px;
  background: rgb(143 240 200 / 0.1);
  box-shadow: 0 0 0 1px rgb(143 240 200 / 0.3) inset;
  color: var(--seal);
  font-size: 13px;
}

.accepted .mono {
  font-size: 11px;
  color: var(--fg-3);
}

.abstain-lede {
  margin: 20px 0 0;
  font: 400 26px/1.2 var(--font-display);
  color: var(--fg);
}

.abstain-list {
  display: grid;
  gap: 8px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.abstain-list li {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgb(255 255 255 / 0.03);
  box-shadow: 0 0 0 1px var(--line) inset;
  color: var(--fg-2);
}

.abstain-list .x {
  color: var(--pen-2);
  font-size: 12px;
}

.abstain-foot {
  margin: 18px 0 0;
  font-size: 11.5px;
  color: var(--fg-3);
}

.sources {
  display: grid;
  gap: 10px;
}

.sources-h {
  margin: 4px 0 4px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-3);
}

.source {
  display: grid;
  gap: 3px;
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--ink-850);
  box-shadow: 0 0 0 1px var(--line);
  transition-property: box-shadow, transform, background-color;
  transition-duration: 0.22s;
  transition-timing-function: var(--ease-out);
}

.source b {
  font-weight: 500;
}

.source span:last-child {
  color: var(--fg-3);
  font-size: 13.5px;
}

.src-k {
  font-size: 11px;
  color: var(--pen-2);
}

.source.is-hot {
  background: #17110f;
  box-shadow:
    0 0 0 1px var(--pen),
    0 0 0 6px rgb(255 91 55 / 0.12);
  transform: translateX(-4px);
}

.gov {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 64px 0 0;
  padding: 0;
  list-style: none;
  border-radius: 18px;
  overflow: hidden;
  background: var(--line);
  box-shadow: 0 0 0 1px var(--line);
}

.gov li {
  padding: 26px 24px;
  background: var(--ink-950);
  color: var(--fg-2);
  font-size: 15px;
  line-height: 1.55;
}

.gov b {
  display: block;
  margin-bottom: 4px;
  color: var(--fg);
  font-weight: 500;
}

.ask {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 36px;
  align-items: center;
  margin-top: 18px;
  padding: 36px;
  border-radius: 22px;
  background:
    radial-gradient(90% 120% at 100% 0%, rgb(255 91 55 / 0.09), transparent 60%), var(--ink-900);
  box-shadow: 0 0 0 1px var(--line);
}

.ask h3 {
  margin: 14px 0 12px;
  font: 400 36px/1.05 var(--font-display);
  letter-spacing: -0.012em;
  text-wrap: balance;
}

.ask-copy p:not(.eyebrow) {
  margin: 0 0 22px;
  color: var(--fg-2);
  line-height: 1.6;
}

.ask-copy .btn kbd {
  margin-left: 2px;
}

.ask-demo {
  border-radius: 16px;
  overflow: hidden;
  background: var(--ink-950);
  box-shadow:
    0 0 0 1px var(--line-2),
    0 30px 60px -30px rgb(0 0 0 / 0.9);
}

.ask-q {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}

.ask-a {
  padding: 16px 18px 18px;
  color: var(--fg-2);
  line-height: 1.6;
}

.ask-a p {
  margin: 0;
}

.ask-a b {
  color: var(--fg);
  font-weight: 500;
}

.ask-cites {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px !important;
}

.ask-hand {
  margin-top: 14px !important;
  font-size: 12px;
  color: var(--pen-2);
}

/* ---------- Suite (bento) ---------- */

.suite {
  padding-top: 0;
  background: var(--ink-950);
}

.bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
  margin-top: 60px;
}

.tile {
  position: relative;
  isolation: isolate;
  grid-column: span 4;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  min-height: 320px;
  padding: 26px;
  border-radius: 22px;
  overflow: hidden;
  background: var(--ink-900);
  box-shadow: 0 0 0 1px var(--line);
}

.tile::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(
    420px circle at var(--mx, 50%) var(--my, 0%),
    rgb(255 91 55 / 0.1),
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.3s var(--ease-out);
}

.tile:hover::before {
  opacity: 1;
}

.tile h3 {
  margin: 0 0 8px;
  font-weight: 500;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.tile p {
  max-width: 46ch;
  margin: 0;
  color: var(--fg-2);
  font-size: 14.5px;
  line-height: 1.55;
  text-wrap: pretty;
}

.t-cover {
  grid-column: span 7;
}

.t-cap {
  grid-column: span 5;
}

.t-rcm {
  grid-column: span 7;
}

.t-more {
  grid-column: span 5;
  justify-content: flex-start;
}

/* coverage matrix */
.cover-matrix {
  display: grid;
  gap: 6px;
}

.cm-head,
.cm-row {
  display: grid;
  grid-template-columns: minmax(120px, 1.4fr) repeat(5, 1fr);
  gap: 6px;
  align-items: center;
}

.cm-head span {
  font: 10.5px var(--font-mono);
  letter-spacing: 0.08em;
  color: var(--fg-3);
  text-align: center;
}

.cm-row span {
  color: var(--fg-2);
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cm-row i {
  position: relative;
  height: 24px;
  border-radius: 6px;
  background: rgb(255 255 255 / 0.03);
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.04) inset;
}

.cm-row i.now {
  background: var(--pen);
  box-shadow: 0 0 18px -4px rgb(255 91 55 / 0.8);
}

.cm-row i.p {
  background: transparent;
  box-shadow: 0 0 0 1.5px rgb(255 91 55 / 0.7) inset;
}

.cm-row i.mv::after,
.cm-row i.sk::after {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font: 12px var(--font-mono);
}

.cm-row i.mv::after {
  content: '→';
  color: var(--amber);
}

.cm-row i.sk::after {
  content: '—';
  color: var(--fg-3);
}

/* Tiles rest in their finished state. The first time one scrolls into view it
   gets .is-played and replays its drawing from these keyframes' start. */
.is-played .cm-row i {
  animation: fade-in 0.6s var(--ease-out) both;
}

.is-played .cm-row:nth-child(3) i {
  animation-delay: 0.06s;
}

.is-played .cm-row:nth-child(4) i {
  animation-delay: 0.12s;
}

.is-played .cm-row:nth-child(5) i {
  animation-delay: 0.18s;
}

.is-played .cm-row:nth-child(6) i {
  animation-delay: 0.24s;
}

.is-played .cm-row:nth-child(7) i {
  animation-delay: 0.3s;
}

@keyframes fade-in {
  from {
    opacity: 0.15;
  }
}

@keyframes grow-x {
  from {
    transform: scaleX(0.05);
  }
}

@keyframes grow-y {
  from {
    transform: scaleY(0.04);
  }
}

@keyframes draw-stroke {
  from {
    stroke-dashoffset: var(--len);
  }
}

/* capacity */
.cap {
  position: relative;
  display: grid;
  gap: 10px;
  padding-right: 34px;
}

.cap-row {
  display: grid;
  grid-template-columns: 26px 1fr;
  align-items: center;
  gap: 10px;
  position: relative;
}

.cap-row span {
  font: 11px var(--font-mono);
  color: var(--fg-3);
}

.cap-row i {
  height: 12px;
  border-radius: 6px;
  background: rgb(255 255 255 / 0.18);
  transform-origin: 0 50%;
  width: var(--w);
}

.cap-row.over i {
  background: var(--pen);
  box-shadow: 0 0 16px -4px var(--pen);
}

.cap-row em {
  position: absolute;
  right: -34px;
  font: normal 11px var(--font-mono);
  color: var(--pen-2);
}

.is-played .cap-row i {
  animation: grow-x 0.9s var(--ease-out) both;
}

.cap-line {
  position: absolute;
  top: -6px;
  bottom: -6px;
  left: calc(36px + (100% - 36px - 34px) * 0.92);
  width: 1px;
  background: repeating-linear-gradient(180deg, var(--fg-3) 0 4px, transparent 4px 8px);
}

/* monitoring */
.ccm {
  width: 100%;
  height: auto;
  overflow: visible;
}

.ccm .thr {
  stroke: rgb(255 91 55 / 0.55);
  stroke-dasharray: 4 5;
  stroke-width: 1;
}

.ccm .spark-line {
  fill: none;
  stroke: var(--fg-2);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 320;
  --len: 320;
}

.is-played .ccm .spark-line {
  animation: draw-stroke 1.6s var(--ease-out) both;
}

.ccm .breach {
  fill: var(--pen);
}

.is-played .ccm .breach {
  animation: fade-in 0.4s var(--ease-out) 1.3s both;
}

/* The breach keeps pulsing only while the tile is on screen. */
.is-live .ccm .breach {
  animation:
    fade-in 0.4s var(--ease-out) 1.3s both,
    breach 2s var(--ease-out) 1.7s infinite;
}

@keyframes breach {
  0% {
    r: 4;
  }
  50% {
    r: 7;
  }
  100% {
    r: 4;
  }
}

.tile-pill {
  align-self: flex-start;
  padding: 5px 10px;
  border-radius: 99px;
  background: rgb(255 91 55 / 0.12);
  color: var(--pen-2);
  font-size: 11px;
}

/* benford */
.benford {
  position: relative;
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  align-items: end;
  gap: 6px;
  height: 120px;
}

.benford i {
  height: calc(var(--h) * 3.2);
  border-radius: 4px 4px 2px 2px;
  background: rgb(255 255 255 / 0.18);
  transform-origin: 50% 100%;
}

.benford i.odd {
  background: var(--pen);
}

.is-played .benford i {
  animation: grow-y 0.8s var(--ease-out) both;
}

.benford svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.benford polyline {
  fill: none;
  stroke: var(--seal);
  stroke-width: 1.4;
  stroke-dasharray: 3 3;
  vector-effect: non-scaling-stroke;
}

/* sampled request grid */
.reqgrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.rg-h {
  font: 10.5px var(--font-mono);
  letter-spacing: 0.08em;
  color: var(--fg-3);
  padding-bottom: 2px;
}

.reqgrid i {
  position: relative;
  height: 34px;
  border-radius: 8px;
  background: rgb(255 255 255 / 0.03);
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.06) inset;
}

.reqgrid i[class^='c']::after {
  content: '✓';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--seal);
  font-size: 13px;
}

.reqgrid i[class^='c'] {
  background: rgb(143 240 200 / 0.08);
}

/* Received cells tick in one by one, as files would arrive. */
.is-played .reqgrid i[class^='c']::after {
  animation: tick-in 0.4s var(--ease-out) both;
}

.is-played .reqgrid .c2::after {
  animation-delay: 0.15s;
}

.is-played .reqgrid .c3::after {
  animation-delay: 0.3s;
}

.is-played .reqgrid .c4::after {
  animation-delay: 0.45s;
}

.is-played .reqgrid .c5::after {
  animation-delay: 0.6s;
}

.is-played .reqgrid .c6::after {
  animation-delay: 0.75s;
}

@keyframes tick-in {
  from {
    opacity: 0;
    transform: scale(0.4);
  }
}

/* QAIP ring */
.ring {
  position: relative;
  width: 132px;
  height: 132px;
  align-self: flex-start;
}

.ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ring circle {
  fill: none;
  stroke-width: 10;
}

.ring-bg {
  stroke: rgb(255 255 255 / 0.06);
}

/* 13 of 15 principles conform (261.7 of the 302 circumference), 2 are partial. */
.ring-fg {
  stroke: var(--seal);
  stroke-dasharray: 261.7 302;
}

.ring-part {
  stroke: var(--pen);
  stroke-dasharray: 0 263.7 38.3 302;
}

.is-played .ring-fg {
  animation: ring-fg 1.2s var(--ease-out) both;
}

.is-played .ring-part {
  animation: ring-part 0.5s var(--ease-out) 1s both;
}

@keyframes ring-fg {
  from {
    stroke-dasharray: 0 302;
  }
}

@keyframes ring-part {
  from {
    stroke-dasharray: 0 263.7 0 302;
  }
}

.ring span {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  font-size: 12px;
  color: var(--fg-3);
}

.ring b {
  display: block;
  font: 400 40px/1 var(--font-display);
  color: var(--fg);
}

/* templates */
.tpl {
  padding: 18px;
  border-radius: 10px;
  background: #f7f5ef;
  color: #1a1814;
}

.tpl p {
  margin: 0 0 6px;
  max-width: none;
  color: inherit;
  font-size: 12px;
}

.tpl .ln {
  background: #e3ddcf;
}

.tag {
  padding: 1px 5px;
  border-radius: 4px;
  background: rgb(194 50 26 / 0.12);
  color: var(--pen-ink);
  font: 11px var(--font-mono);
}

/* terminology */
.terms {
  font: 400 34px/1.2 var(--font-display) !important;
  color: var(--fg-2) !important;
}

.roll {
  display: inline-block;
  height: 1.2em;
  overflow: hidden;
  vertical-align: bottom;
}

.roll span {
  display: block;
  font-style: italic;
  color: var(--pen);
  animation: roll 8s var(--ease-in-out) infinite;
  animation-play-state: paused;
}

.is-live .roll span {
  animation-play-state: running;
}

@keyframes roll {
  0%,
  18% {
    transform: translateY(0);
  }
  25%,
  43% {
    transform: translateY(-100%);
  }
  50%,
  68% {
    transform: translateY(-200%);
  }
  75%,
  93% {
    transform: translateY(-300%);
  }
  100% {
    transform: translateY(-400%);
  }
}

/* RCM */
.rcm {
  width: 100%;
  height: auto;
  max-height: 176px;
  overflow: visible;
}

.rcm path {
  fill: none;
  stroke: rgb(255 255 255 / 0.22);
  stroke-width: 1.3;
  stroke-dasharray: 260;
  --len: 260;
}

.rcm path.bad {
  stroke: var(--pen);
}

.is-played .rcm path {
  animation: draw-stroke 1.3s var(--ease-out) both;
}

.rcm .n-r circle {
  fill: var(--ink-900);
  stroke: var(--fg-2);
  stroke-width: 1.5;
}

.rcm .n-c rect {
  fill: var(--ink-900);
  stroke: var(--seal);
  stroke-width: 1.5;
}

.rcm .n-c rect.bad {
  stroke: var(--pen);
  fill: rgb(255 91 55 / 0.15);
}

.rcm .lbl {
  fill: var(--pen-2);
  font: 11px var(--font-mono);
}

/* and more */
.more-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.more-list li {
  padding: 8px 12px;
  border-radius: 99px;
  box-shadow: 0 0 0 1px var(--line-2) inset;
  color: var(--fg-2);
  font-size: 13.5px;
}

/* ---------- Portal ---------- */

.portal-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(40px, 6vw, 100px);
  align-items: center;
}

.ticks {
  display: grid;
  gap: 16px;
  margin: 34px 0 0;
  padding: 0;
  list-style: none;
}

.ticks li {
  position: relative;
  padding-left: 32px;
  color: var(--paper-fg-2);
  font-size: 17px;
  line-height: 1.55;
  text-wrap: pretty;
}

.ticks li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.42em;
  width: 13px;
  height: 7px;
  border-left: 2px solid var(--pen-ink);
  border-bottom: 2px solid var(--pen-ink);
  transform: rotate(-45deg);
}

.phone-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 20px 0 40px;
}

.phone-wrap::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 8px;
  width: 300px;
  height: 40px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: rgb(40 30 15 / 0.25);
  filter: blur(22px);
}

.phone {
  position: relative;
  width: 340px;
  padding: 16px 16px 22px;
  border-radius: 50px;
  background: #fbfaf7;
  color: #17150f;
  font-size: 13px;
  box-shadow:
    0 0 0 10px #0d0e11,
    0 0 0 11px #30343b,
    0 60px 90px -40px rgb(28 22 12 / 0.6);
}

.notch {
  width: 108px;
  height: 28px;
  margin: -4px auto 14px;
  border-radius: 20px;
  background: #0d0e11;
}

.pt-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  color: #5d584d;
}

.pt-top i {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #efe9dc;
  color: #3c372d;
  font: normal 600 11px var(--font-sans);
}

.pt-hello {
  margin: 18px 0 2px;
  font: 400 30px/1.1 var(--font-display);
  letter-spacing: -0.01em;
}

.pt-sub {
  margin: 0 0 14px;
  color: #5d584d;
}

.pt-card {
  position: relative;
  margin-bottom: 12px;
  padding: 16px;
  border-radius: 20px;
  background: #fff;
  box-shadow:
    0 0 0 1px rgb(23 21 15 / 0.08),
    0 8px 18px -12px rgb(23 21 15 / 0.25);
  overflow: hidden;
}

.pt-t {
  margin: 0;
  font-weight: 600;
  font-size: 14.5px;
}

.pt-m {
  margin: 2px 0 10px;
  font-size: 12px;
  color: #6b665b;
}

.pt-count {
  position: relative;
  height: 18px;
  margin: 0 0 6px;
  font-weight: 500;
  font-size: 12.5px;
}

.pt-count span {
  position: absolute;
  left: 0;
  top: 0;
}

.pt-count .n5 {
  opacity: 0;
}

.pt-bar {
  height: 6px;
  border-radius: 99px;
  background: #eee9dd;
  overflow: hidden;
}

.pt-bar i {
  display: block;
  width: 66.6%;
  height: 100%;
  border-radius: inherit;
  background: var(--pen-ink);
}

.pt-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  gap: 6px;
  margin-top: 12px;
  align-items: center;
}

.pt-grid .h {
  font: 10.5px var(--font-mono);
  color: #6f6a5e;
}

.pt-grid .k {
  font: 11px var(--font-mono);
}

.pt-grid i {
  position: relative;
  height: 28px;
  border-radius: 8px;
  background: #f4f1ea;
  box-shadow: 0 0 0 1px rgb(23 21 15 / 0.08) inset;
}

.pt-grid i.ok {
  background: #e7f3ec;
}

.pt-grid i.ok::after,
.pt-grid i.drop::after {
  content: '✓';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #1f7a4d;
  font-size: 13px;
  font-weight: 700;
}

.pt-grid i.drop::after {
  opacity: 0;
}

/* The upload button becomes the upload for a moment, then hands back. */
.pt-file {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 12px;
  border-radius: 14px;
  overflow: hidden;
  background: #17150f;
  color: #f3f0e8;
  font: 11.5px var(--font-mono);
  opacity: 0;
  transform: translateY(6px);
}

.pt-file::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 100%;
  background: var(--pen);
  transform-origin: 0 50%;
  transform: scaleX(0);
}

.is-live .pt-file::after {
  animation: pt-progress 7s linear infinite;
}

@keyframes pt-progress {
  0%,
  12% {
    transform: scaleX(0);
  }
  38%,
  100% {
    transform: scaleX(1);
  }
}

.pt-file::before {
  content: '';
  width: 12px;
  height: 14px;
  border-radius: 2px;
  background: #f3f0e8;
  opacity: 0.8;
}

.pt-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  margin-top: 14px;
  border-radius: 14px;
  background: #17150f;
  color: #f3f0e8;
  font-weight: 500;
  font-size: 14px;
}

.pt-btn.ghost {
  margin-top: 4px;
  background: transparent;
  color: #17150f;
  box-shadow: 0 0 0 1px rgb(23 21 15 / 0.18) inset;
}

.pt-note {
  margin: 8px 0 0;
  text-align: center;
  font-size: 11.5px;
  color: #6f6a5e;
}

.is-live .pt-file {
  animation: pt-file 7s var(--ease-out) infinite;
}

.is-live .pt-grid i.drop {
  animation: pt-drop 7s var(--ease-out) infinite;
}

.is-live .pt-grid i.drop::after {
  animation: pt-drop-ok 7s var(--ease-out) infinite;
}

.is-live .pt-count .n4 {
  animation: pt-n4 7s steps(1) infinite;
}

.is-live .pt-count .n5 {
  animation: pt-n5 7s steps(1) infinite;
}

.is-live .pt-bar i {
  animation: pt-bar 7s var(--ease-out) infinite;
}

@keyframes pt-file {
  0%,
  8% {
    opacity: 0;
    transform: translateY(14px);
  }
  14%,
  34% {
    opacity: 1;
    transform: none;
  }
  42%,
  100% {
    opacity: 0;
    transform: translateY(-8px);
  }
}

@keyframes pt-drop {
  0%,
  30% {
    background: #f4f1ea;
    box-shadow: 0 0 0 1px rgb(23 21 15 / 0.08) inset;
  }
  34%,
  46% {
    background: #fbeee9;
    box-shadow: 0 0 0 1.5px var(--pen-ink) inset;
  }
  52%,
  92% {
    background: #e7f3ec;
    box-shadow: 0 0 0 1px rgb(23 21 15 / 0.08) inset;
  }
  100% {
    background: #f4f1ea;
  }
}

@keyframes pt-drop-ok {
  0%,
  50% {
    opacity: 0;
  }
  54%,
  92% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes pt-n4 {
  0% {
    opacity: 1;
  }
  52% {
    opacity: 0;
  }
  93% {
    opacity: 1;
  }
}

@keyframes pt-n5 {
  0% {
    opacity: 0;
  }
  52% {
    opacity: 1;
  }
  93% {
    opacity: 0;
  }
}

@keyframes pt-bar {
  0%,
  50% {
    width: 66.6%;
  }
  56%,
  92% {
    width: 83.3%;
  }
  100% {
    width: 66.6%;
  }
}

/* ---------- Platform ---------- */

.platform {
  background:
    radial-gradient(40% 40% at 90% 0%, rgb(255 91 55 / 0.06), transparent 70%), var(--ink-950);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-top: 64px;
  border-radius: 22px;
  overflow: hidden;
  background: var(--line);
  box-shadow: 0 0 0 1px var(--line);
}

.stat {
  padding: 34px 28px 30px;
  background: var(--ink-950);
}

.stat b {
  display: block;
  font: 400 clamp(58px, 6.2vw, 92px) / 1 var(--font-display);
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.stat b small {
  margin-left: 6px;
  font: 400 16px var(--font-mono);
  letter-spacing: 0;
  color: var(--fg-3);
}

.stat > span {
  display: block;
  margin-top: 14px;
  color: var(--fg-2);
  font-size: 14.5px;
  line-height: 1.5;
}

.code-card {
  margin-top: 18px;
  border-radius: 22px;
  overflow: hidden;
  background: #08090c;
  box-shadow: 0 0 0 1px var(--line);
}

.code-note {
  margin-left: auto;
  padding-right: 8px;
  font-size: 11px;
  color: var(--fg-3);
}

.code-panel pre {
  margin: 0;
  padding: 26px 28px;
  overflow-x: auto;
  font: 400 13.5px/1.75 var(--font-mono);
  color: #cfccc4;
  tab-size: 2;
}

.c-str {
  color: #ffb59f;
}

.c-key {
  color: #b9c7ff;
}

.c-num {
  color: var(--seal);
}

.c-kw {
  color: var(--pen-2);
}

.c-fn {
  color: var(--fg);
}

.c-com {
  color: var(--fg-3);
}

.c-cmd {
  color: var(--seal);
}

.sec-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.sec-grid li {
  padding: 22px;
  border-radius: 18px;
  background: var(--ink-900);
  box-shadow: 0 0 0 1px var(--line);
}

.sec-grid b {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
}

.sec-grid span {
  color: var(--fg-2);
  font-size: 14px;
  line-height: 1.5;
}

/* ---------- Compare ---------- */

.cmp {
  margin-top: 60px;
  border-top: 1px solid var(--paper-fg);
}

.cmp-row {
  display: grid;
  grid-template-columns: 1fr 1.25fr 1.5fr;
  gap: 28px;
  align-items: baseline;
  padding: 24px 0;
  border-bottom: 1px solid var(--paper-line);
}

.cmp-head {
  padding: 16px 0;
}

.cmp-head span {
  font: 400 11.5px/1 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper-fg-3);
}

.cmp-row [role='rowheader'] {
  font: 400 27px/1.1 var(--font-display);
  letter-spacing: -0.01em;
}

.cmp-row [role='cell']:nth-child(2) {
  color: var(--paper-fg-3);
  font-size: 16.5px;
  text-decoration: line-through;
  text-decoration-color: rgb(194 50 26 / 0.6);
  text-decoration-thickness: 1.5px;
}

.cmp-row [role='cell']:nth-child(3) {
  color: var(--paper-fg);
  font-weight: 500;
  font-size: 16.5px;
}

/* ---------- Questions ---------- */

/* Continues the compare section's paper, so it needs no top padding of its own. */
.faq {
  padding-top: 0;
}

.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: clamp(36px, 5vw, 88px);
  align-items: start;
}

.faq-head {
  position: sticky;
  top: calc(110px + var(--safe-top));
}

.faq-list {
  border-top: 1px solid var(--paper-fg);
}

.faq-list details {
  border-bottom: 1px solid var(--paper-line);
}

.faq-list summary {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 72px;
  padding: 18px 56px 18px 0;
  font: 400 clamp(22px, 2vw, 27px) / 1.2 var(--font-display);
  letter-spacing: -0.01em;
  list-style: none;
  cursor: pointer;
  transition: color 0.2s;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::before,
.faq-list summary::after {
  content: '';
  position: absolute;
  right: 12px;
  top: 50%;
  width: 14px;
  height: 1.5px;
  background: currentColor;
  transition-property: transform, opacity;
  transition-duration: 0.25s;
  transition-timing-function: var(--ease-out);
}

.faq-list summary::after {
  transform: rotate(90deg);
}

.faq-list details[open] summary::after {
  transform: rotate(0deg);
  opacity: 0;
}

.faq-list summary:hover {
  color: var(--pen-ink);
}

.faq-list summary:focus-visible {
  outline-color: var(--pen-ink);
  outline-offset: 4px;
}

.faq-list details p {
  max-width: 62ch;
  margin: 0;
  padding: 0 56px 26px 0;
  color: var(--paper-fg-2);
  font-size: 17px;
  line-height: 1.65;
  text-wrap: pretty;
}

.faq-list details[open] p {
  animation: faq-in 0.35s var(--ease-out) both;
}

@keyframes faq-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
}

/* ---------- Final CTA ---------- */

.cta {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  place-items: center;
  min-height: 92vh;
  text-align: center;
  background: var(--ink-950);
}

.cta-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 64px floor: on a phone "stand." sits alone on its line with room for the margin note. */
.cta-title {
  margin: 0;
  font: 400 clamp(64px, 14vw, 220px) / 0.88 var(--font-display);
  letter-spacing: -0.04em;
}

.cta-sub {
  max-width: 44ch;
  margin: 34px 0 0;
  color: var(--fg-2);
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.55;
  text-wrap: balance;
}

.cta-agenda {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.cta-agenda li {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px 7px 7px;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.04);
  box-shadow: 0 0 0 1px var(--line-2) inset;
  color: var(--fg-2);
  font-size: 14.5px;
  text-align: left;
}

.cta-agenda .mono {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgb(255 91 55 / 0.14);
  color: var(--pen-2);
  font-size: 11px;
}

/* The address as plain, selectable text: a mailto link doesn't open for everyone. */
.cta-mail {
  margin: 18px 0 0;
  color: var(--fg-3);
  font-size: 14px;
}

.cta-mail .mono {
  color: var(--fg-2);
  user-select: all;
}

.cta-stamp {
  margin: 36px 0 0;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--fg-3);
}

.cta-stamp span {
  color: var(--seal);
}

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

.footer {
  padding: 72px 0 34px;
  background: var(--ink-950);
  border-top: 1px solid var(--line);
  color: var(--fg-2);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
}

.footer-brand .logo-word {
  font-size: 36px;
  color: var(--fg);
}

.footer-brand p {
  margin: 16px 0 0;
  font: 400 22px var(--font-display);
  color: var(--fg-2);
}

.footer nav {
  display: grid;
  align-content: start;
  gap: 2px;
}

.footer nav a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  color: var(--fg-2);
  font-size: 14.5px;
  text-decoration: none;
  transition: color 0.15s;
}

.footer nav a:hover {
  color: var(--fg);
}

.f-h {
  margin: 0 0 8px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-3);
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 20px;
  margin-top: 60px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--fg-3);
}

/* ---------- Command palette ---------- */

.palette {
  width: min(660px, calc(100vw - 28px));
  max-width: none;
  max-height: min(78vh, 640px);
  margin: 13vh auto auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--fg);
  overflow: visible;
}

.palette::backdrop {
  background: rgb(3 3 5 / 0.62);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.palette[open] .pal-box {
  animation: pal-in 0.22s var(--ease-out);
}

@keyframes pal-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }
}

.pal-box {
  display: flex;
  flex-direction: column;
  max-height: min(78vh, 640px);
  border-radius: 18px;
  overflow: hidden;
  background: rgb(14 16 21 / 0.97);
  box-shadow:
    0 0 0 1px var(--line-2),
    0 50px 140px -30px rgb(0 0 0 / 0.95);
}

.pal-input {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.pal-input input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--fg);
  font: 400 16px var(--font-sans);
}

.pal-input input::placeholder {
  color: var(--fg-3);
}

.pal-list {
  flex: 1 1 auto;
  margin: 0;
  padding: 8px;
  overflow-y: auto;
  list-style: none;
}

.pal-group {
  padding: 12px 10px 6px;
  font: 400 10.5px/1 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-3);
}

.pal-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 10px;
  color: var(--fg-2);
  font-size: 14.5px;
  cursor: pointer;
}

.pal-item[aria-selected='true'] {
  background: rgb(255 255 255 / 0.07);
  color: var(--fg);
}

.pal-item .ico {
  width: 20px;
  text-align: center;
  color: var(--fg-3);
}

.pal-item[aria-selected='true'] .ico {
  color: var(--pen);
}

.pal-item .hint {
  margin-left: auto;
  font: 11px var(--font-mono);
  color: var(--fg-3);
}

.pal-empty {
  padding: 22px 12px;
  color: var(--fg-3);
  font-size: 14px;
}

.pal-answer {
  padding: 18px 20px 20px;
  border-top: 1px solid var(--line);
  background: rgb(255 255 255 / 0.02);
}

.pal-answer .pal-q {
  margin: 0 0 10px;
  color: var(--fg-3);
  font-size: 13px;
}

.pal-answer .pal-a {
  margin: 0;
  color: var(--fg-2);
  font-size: 15.5px;
  line-height: 1.6;
}

.pal-answer .pal-a b {
  color: var(--fg);
  font-weight: 500;
}

.pal-answer .pal-cites {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0 0;
}

.pal-answer .pal-hand {
  margin: 14px 0 0;
  font: 12px var(--font-mono);
  color: var(--pen-2);
}

.pal-thinking {
  color: var(--fg-3);
  font: 12.5px var(--font-mono);
}

.pal-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 11px 16px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--fg-3);
}

.pal-foot span:last-child {
  margin-left: auto;
}

.pal-foot kbd {
  margin-right: 3px;
  padding: 2px 5px;
  font-size: 10px;
}

/* ---------- Reveal & entrance ---------- */

/* Content rests visible and in place: nothing waits at opacity 0 for an
   observer. Blocks below the fold rise a few pixels as they arrive. The hero
   keeps its one orchestrated moment, the stet mark, and starts complete. */
.js .reveal {
  transform: translateY(14px);
  transition: transform 0.8s var(--ease-out) var(--d, 0s);
}

.js .reveal.is-in,
.js .hero .reveal {
  transform: none;
}

/* ---------- Responsive ---------- */

@media (max-width: 1180px) {
  .tile,
  .t-cover,
  .t-cap,
  .t-rcm,
  .t-more {
    grid-column: span 6;
  }

  .gov {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats,
  .sec-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1023px) {
  .record-grid,
  .copilot-grid,
  .portal-grid,
  .ask {
    grid-template-columns: 1fr;
  }

  .record-copy {
    position: static;
  }

  .wf-grid {
    grid-template-columns: 1fr;
  }

  .wf-stage {
    display: none;
  }

  .step {
    min-height: 0;
    padding-bottom: 72px;
  }

  /* No sticky stage on narrow screens, so no focus effect: every step in full ink. */
  .step:not(.is-active) h3 {
    color: var(--paper-fg);
  }

  .step:not(.is-active) > p {
    color: var(--paper-fg-2);
  }

  .step:last-child {
    min-height: 0;
    padding-bottom: 0;
  }

  .step .step-visual {
    margin-top: 30px;
  }

  .sources {
    grid-template-columns: repeat(2, 1fr);
  }

  .sources-h {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .nav-links,
  .kbd-btn,
  .nav-cta {
    display: none;
  }

  .nav-toggle {
    display: inline-grid;
  }

  .pillars {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  .tile,
  .t-cover,
  .t-cap,
  .t-rcm,
  .t-more {
    grid-column: span 12;
    min-height: 0;
  }

  .gov,
  .sec-grid,
  .sources {
    grid-template-columns: 1fr;
  }

  .stats {
    grid-template-columns: 1fr 1fr;
  }

  .stat {
    padding: 26px 20px;
  }

  .field {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .cites {
    grid-column: 1;
  }

  .cmp-head {
    display: none;
  }

  .cmp-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .ask {
    padding: 24px;
  }

  .draft-panel {
    padding: 20px 18px;
  }

  .risk-wrap {
    grid-template-columns: 1fr;
  }

  .heat {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    grid-auto-rows: 36px;
  }

  .g-head,
  .g-row {
    grid-template-columns: 104px 1fr 1fr 1fr 1fr;
  }

  .g-row span {
    font-size: 11.5px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .ready {
    grid-template-columns: 1fr;
  }

  .fivec {
    grid-template-columns: 1fr;
  }

  .fivec dt {
    padding-bottom: 0;
  }

  .fivec dd {
    border-top: 0;
    padding-top: 4px;
  }

  .act-row {
    grid-template-columns: 1fr auto;
  }

  .act-row .mono {
    grid-column: 1 / -1;
  }

  .act-row i {
    left: 0;
  }

  .phone {
    width: min(340px, calc(100vw - 64px));
  }

  .record-actions .btn {
    flex: 1 1 auto;
  }

  .footer-base {
    flex-direction: column;
  }

  .k-long {
    display: none;
  }

  .k-short {
    display: inline;
  }

  /* On a phone the product mock drops its sidebar and budget card, so what
     remains is shown at roughly twice the size. */
  .app {
    width: 760px;
  }

  .app-body {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .app-side,
  .app-card.budget {
    display: none;
  }

  .app-grid {
    grid-template-columns: 1.25fr 1fr;
  }

  .cta-agenda {
    flex-direction: column;
    align-items: stretch;
  }

  .cta-agenda li {
    border-radius: 16px;
  }
}

@media (max-width: 1023px) {
  .faq-grid {
    grid-template-columns: 1fr;
  }

  .faq-head {
    position: static;
  }
}

/* Touch screens: every control gets a full 44px target. */
@media (pointer: coarse) {
  .draft-tabs button,
  .code-tabs button {
    height: 44px;
  }

  .btn-sm,
  .btn-xs {
    --h: 44px;
  }

  .kicker,
  .footer nav a {
    min-height: 44px;
  }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }

  .js .reveal {
    transform: none;
  }

  .stet-strike {
    display: none;
  }

  .stet-dots {
    clip-path: none;
  }

  .stet-note {
    opacity: 1;
    transform: rotate(-9deg);
  }

  .stet-note path {
    stroke-dashoffset: 0;
  }

  .ticker-track {
    animation: none;
    flex-wrap: wrap;
    width: auto;
  }

  .ticker ul[aria-hidden='true'] {
    display: none;
  }

  .ticker ul {
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 14px;
  }

  .stage-tilt {
    transform: none;
  }
}
