/* ==========================================================================
   Agent Sean — agentsean.dev
   Hand-written. No framework, no build step, no external requests.

   The design is the product's own metaphor: a diff.
     red   — what was wrong
     green — what Sean wrote in its place
     blue  — the daemon doing the work
   Nothing here is decorative colour; the palette carries meaning, so the whole
   page can be read the way you read a code review.

   Type is the OS stack, held to a strict modular scale (1.2 minor-third) with
   deliberate optical tracking. Depth is layered elevation, never drop-shadow
   soup. Motion is one orchestrated hero beat plus restrained scroll reveals,
   all of it disabled under prefers-reduced-motion.
   ========================================================================== */

:root {
  /* --- surfaces: shared byte-for-byte with packages/dashboard/src/theme.css so
         the marketing site and the product wear one identity, not two. --------- */
  --bg: #07090d;
  --bg-1: #0b0e14;
  --bg-2: #10141c;
  --bg-3: #161b25;
  --bg-4: #1d2430;
  --bg-5: #26303f;

  /* hairlines — also matched to the dashboard */
  --line: #1e2430;
  --line-2: #2a3342;
  --line-3: #3a4657;

  /* --- text: fg/fg-2/fg-4 match the dashboard exactly. fg-3 is the one
         deliberate divergence: the dashboard's #67758a fails WCAG AA (4.5:1)
         for small secondary text, so it is lightened to the nearest value that
         clears AA on every ground here (worst case 4.96 on bg-3). Measured. -- */
  --fg: #eaf0f7;
  --fg-2: #9fadbf;
  --fg-3: #7d8a9c;
  /* fg-4 is decorative only — prompt sigils, dimmed punctuation, never prose. */
  --fg-4: #46525f;

  /* --- the diff palette. red/green/blue are load-bearing, not accents. ----- */
  --red: #ff6a63;
  --red-2: #ff8a84;
  --red-bg: #2d1416;
  --red-line: rgba(255, 106, 99, 0.26);
  --green: #45d268;
  --green-2: #6fe089;
  --green-bg: #0f2a18;
  --green-line: rgba(69, 210, 104, 0.26);
  --blue: #62a4ff;
  --blue-2: #2f6feb;
  --blue-3: #4c86f5;
  --blue-bg: #0e1c34;
  --amber: #f0b849;
  --violet: #b085f5;

  /* --- radii ---------------------------------------------------------------- */
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 18px;
  --r-xl: 24px;

  /* --- type: one scale, a 1.2 minor third, named so nothing goes off-scale. */
  --t-xs: 0.75rem; /* 12px  — labels, kickers */
  --t-sm: 0.875rem; /* 14px  — captions, dense UI */
  --t-base: 1rem; /* 16px  — body baseline handled on <body> */
  --t-md: 1.125rem; /* 18px  — lead-ins */
  --t-lg: 1.35rem; /* ~22px — h3 */
  --t-xl: 1.62rem;
  --t-2xl: 2.19rem;
  --t-3xl: 2.63rem;
  --t-4xl: clamp(2.5rem, 6vw, 4.5rem); /* display */

  --mono:
    ui-monospace, "SF Mono", "SFMono-Regular", Menlo, Consolas, "Liberation Mono",
    monospace;
  --sans:
    "Inter var", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Helvetica Neue", Arial, sans-serif;

  --wrap: 1160px;
  --wrap-narrow: 900px;

  /* springy, opinionated easing — the same curve everywhere so motion feels
     like one hand authored it. */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

body {
  margin: 0;
  max-width: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1, "cv11" 1, "ss01" 1;
  /* A single very low-contrast field that ties the whole page together and
     stops the near-black from looking like a flat fill. Pure CSS, no image. */
  background-image:
    radial-gradient(60rem 40rem at 78% -8%, rgba(47, 111, 235, 0.06), transparent 60%),
    radial-gradient(48rem 34rem at 8% 2%, rgba(176, 133, 245, 0.045), transparent 62%);
  background-attachment: fixed;
}

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

a {
  color: var(--blue);
  text-decoration: none;
  transition: color 0.15s var(--ease);
}
a:hover {
  color: #92bcff;
}

code,
kbd,
pre,
samp {
  font-family: var(--mono);
  font-feature-settings: "liga" 0;
}
:not(pre) > code {
  font-size: 0.86em;
  color: var(--fg);
  background: var(--bg-3);
  border: 1px solid var(--line);
  padding: 0.1em 0.4em;
  border-radius: 6px;
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 5px;
}
::selection {
  background: rgba(98, 164, 255, 0.28);
}

/* skip link — keyboard users land on content, not on the nav every time */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--bg-3);
  border: 1px solid var(--line-3);
  color: var(--fg);
  padding: 10px 16px;
  border-radius: 0 0 var(--r) 0;
  font-size: var(--t-sm);
}
.skip:focus {
  left: 0;
}

/* ------------------------------------------------------------- primitives -- */
.wrap {
  max-width: min(var(--wrap), 100%);
  margin: 0 auto;
  padding: 0 26px;
}
.narrow {
  max-width: var(--wrap-narrow);
}
.center {
  text-align: center;
}
.muted {
  color: var(--fg-2);
}
.small {
  font-size: var(--t-sm);
}
.mono {
  font-family: var(--mono);
}
.nowrap {
  white-space: nowrap;
}

/* --------------------------------------------------------------- type scale */
h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 620;
  letter-spacing: -0.028em;
  line-height: 1.12;
  color: var(--fg);
  text-wrap: balance;
}
h1 {
  font-size: var(--t-4xl);
  font-weight: 680;
  letter-spacing: -0.044em;
  line-height: 1.02;
}
h2 {
  font-size: clamp(1.75rem, 3.6vw, var(--t-3xl));
  letter-spacing: -0.036em;
}
h3 {
  font-size: var(--t-lg);
  letter-spacing: -0.02em;
  font-weight: 600;
}
h4 {
  font-size: var(--t-md);
  letter-spacing: -0.016em;
}
p {
  text-wrap: pretty;
}

/* the diff-native gradient: what-was-wrong (soft) melting into Sean's-fix
   (green). Used once, on the hero verb. */
.gradient {
  background: linear-gradient(100deg, #9ecbff 0%, #6fe089 52%, var(--green) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: var(--t-xs);
  font-weight: 500;
  letter-spacing: 0.005em;
  color: var(--fg-2);
  border: 1px solid var(--line-2);
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  padding: 6px 15px 6px 8px;
  border-radius: 999px;
}
.eyebrow .tag {
  background: var(--blue-2);
  color: #fff;
  font-weight: 650;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
}

.sec-head {
  max-width: 680px;
  margin: 0 auto 54px;
  text-align: center;
}
.sec-head p {
  color: var(--fg-2);
  margin: 16px 0 0;
  font-size: var(--t-md);
}
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: var(--t-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 16px;
  font-weight: 500;
}
.kicker::before {
  content: "";
  width: 18px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--blue));
}
.sec-head .kicker {
  justify-content: center;
}
.sec-head .kicker::after {
  content: "";
  width: 18px;
  height: 1px;
  background: linear-gradient(90deg, var(--blue), transparent);
}

/* -------------------------------------------------------------------- nav */
header.nav {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(6, 8, 12, 0.66);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}
header.nav.scrolled {
  border-bottom-color: var(--line);
  background: rgba(6, 8, 12, 0.9);
}
.nav-in {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 26px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 30px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 640;
  font-size: 1.02rem;
  color: var(--fg);
  letter-spacing: -0.022em;
  flex: none;
}
.brand:hover {
  color: var(--fg);
}
.brand svg {
  width: 28px;
  height: 28px;
  flex: none;
}
.nav-links {
  display: flex;
  gap: 26px;
  font-size: 0.9rem;
}
.nav-links a {
  color: var(--fg-2);
  position: relative;
  padding: 4px 0;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--blue);
  transition: right 0.28s var(--ease);
}
.nav-links a:hover {
  color: var(--fg);
}
.nav-links a:hover::after {
  right: 0;
}
.nav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 11px;
}

.ghstar {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  overflow: hidden;
  font-size: 0.815rem;
  background: var(--bg-2);
  transition: border-color 0.18s var(--ease), transform 0.18s var(--ease);
}
.ghstar:hover {
  border-color: var(--line-3);
  transform: translateY(-1px);
  color: var(--fg);
}
.ghstar .gh-l {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  color: var(--fg);
  font-weight: 550;
}
.ghstar .gh-l svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}
.ghstar .gh-n {
  display: flex;
  align-items: center;
  padding: 6px 11px;
  border-left: 1px solid var(--line-2);
  color: var(--fg-2);
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  background: rgba(255, 255, 255, 0.025);
  min-width: 46px;
  justify-content: center;
}

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 21px;
  border-radius: var(--r-sm);
  font-size: 0.93rem;
  font-weight: 550;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: background 0.16s var(--ease), border-color 0.16s var(--ease),
    transform 0.12s var(--ease), box-shadow 0.16s var(--ease);
}
.btn:active {
  transform: translateY(1px);
}
.btn-primary {
  background: linear-gradient(180deg, var(--blue-3), var(--blue-2));
  color: #fff;
  border-color: #5a90f7;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.14) inset,
    0 6px 20px -8px rgba(47, 111, 235, 0.75);
}
.btn-primary:hover {
  color: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset,
    0 10px 28px -8px rgba(47, 111, 235, 0.9);
  transform: translateY(-1px);
}
.btn-ghost {
  background: var(--bg-2);
  color: var(--fg);
  border-color: var(--line-2);
}
.btn-ghost:hover {
  background: var(--bg-3);
  border-color: var(--line-3);
  color: var(--fg);
  transform: translateY(-1px);
}
.btn-sm {
  padding: 7px 14px;
  font-size: 0.85rem;
}
.btn-lg {
  padding: 14px 26px;
  font-size: 1rem;
}
.btn-block {
  width: 100%;
}
.btn svg {
  width: 15px;
  height: 15px;
}

/* ------------------------------------------------------- copyable command */
.cmd {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--line-2);
  border-radius: 10px;
  padding: 12px 12px 12px 18px;
  font-family: var(--mono);
  font-size: 0.94rem;
  color: var(--fg);
  text-align: left;
  transition: border-color 0.18s var(--ease);
}
.cmd:hover {
  border-color: var(--line-3);
}
.cmd .p {
  color: var(--fg-4);
  user-select: none;
}
.cmd button {
  background: var(--bg-3);
  border: 1px solid var(--line-2);
  color: var(--fg-2);
  border-radius: 7px;
  padding: 5px 11px;
  font-size: 0.755rem;
  cursor: pointer;
  font-family: var(--sans);
  font-weight: 500;
  transition: 0.15s var(--ease);
  white-space: nowrap;
}
.cmd button:hover {
  color: var(--fg);
  border-color: var(--line-3);
  background: var(--bg-4);
}
.cmd button.done {
  color: var(--green);
  border-color: var(--green-line);
  background: var(--green-bg);
}

/* ------------------------------------------------------------------- hero */
.hero {
  padding: 104px 0 56px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
/* ambient depth: a soft aurora that drifts, plus a masked grid. Both are pure
   CSS; both stop dead under reduced-motion. */
.hero::before {
  content: "";
  position: absolute;
  inset: -30% -10% 0;
  z-index: -2;
  background:
    radial-gradient(46rem 26rem at 50% 6%, rgba(47, 111, 235, 0.2), transparent 60%),
    radial-gradient(30rem 22rem at 82% 0%, rgba(69, 210, 104, 0.1), transparent 64%),
    radial-gradient(28rem 20rem at 14% 6%, rgba(176, 133, 245, 0.09), transparent 66%);
  animation: drift 22s var(--ease) infinite alternate;
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  max-width: 100%;
  z-index: -2;
  background-image: linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 62px 62px;
  mask-image: radial-gradient(40rem 24rem at 50% 20%, #000 8%, transparent 72%);
  -webkit-mask-image: radial-gradient(40rem 24rem at 50% 20%, #000 8%, transparent 72%);
  opacity: 0.4;
  pointer-events: none;
}
@keyframes drift {
  from {
    transform: translate3d(-1.5%, -1%, 0) scale(1);
  }
  to {
    transform: translate3d(2%, 1.5%, 0) scale(1.08);
  }
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.04fr 0.96fr;
  gap: 56px;
  align-items: center;
}
.hero-copy {
  max-width: 620px;
}
.hero h1 {
  margin: 22px 0 0;
}
.lead {
  font-size: var(--t-md);
  color: var(--fg-2);
  max-width: 560px;
  margin: 22px 0 32px;
  line-height: 1.6;
}
.cta-row {
  display: flex;
  gap: 13px;
  flex-wrap: wrap;
  align-items: center;
}
.hero.center .cta-row {
  justify-content: center;
}
.hero-note {
  margin-top: 20px;
  color: var(--fg-3);
  font-size: 0.865rem;
  max-width: 540px;
}
.hero-copy .hero-note {
  margin-left: 0;
  margin-right: 0;
}
/* small trust line under the CTAs */
.trust {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 26px;
  font-size: var(--t-sm);
  color: var(--fg-3);
}
.trust span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.trust svg {
  width: 14px;
  height: 14px;
  flex: none;
  color: var(--green);
}

/* -------------------------------------------------- hero diff (the thesis) */
/* The hero's right column is a live diff card: it types the wrong title,
   snapshots, writes Sean's fix, verifies — the entire product in one beat,
   then invites the visitor to revert it. This is the page's argument, shown. */
.hero-diff {
  position: relative;
}
.hd-card {
  background: linear-gradient(180deg, #0c1119, #080b11);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: 0 50px 100px -50px rgba(0, 0, 0, 0.95),
    0 0 0 1px rgba(255, 255, 255, 0.02) inset;
}
.hd-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  background: linear-gradient(180deg, var(--bg-3), var(--bg-2));
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--fg-4);
}
.hd-head .fname {
  color: var(--fg-3);
}
.hd-head .pill {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  color: var(--fg-3);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 2px 9px 2px 7px;
  background: var(--bg-2);
}
.hd-head .pip {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--fg-4);
  transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.hd-head .pill.live .pip {
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(69, 210, 104, 0.18);
}
.hd-body {
  padding: 20px;
  font-family: var(--mono);
  font-size: 0.85rem;
}
.hd-finding {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px dashed var(--line-2);
}
.hd-finding .fid {
  color: var(--fg-3);
  font-size: 0.78rem;
}
.hd-finding .ftext {
  color: var(--fg-2);
  font-size: 0.78rem;
}
.hd-line {
  display: flex;
  gap: 12px;
  padding: 10px 13px;
  border-radius: var(--r-sm);
  line-height: 1.5;
  margin-bottom: 8px;
  border: 1px solid transparent;
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
  word-break: break-word;
}
.hd-line .sign {
  flex: none;
  font-weight: 700;
  opacity: 0.8;
}
.hd-line.del {
  background: var(--red-bg);
  border-color: var(--red-line);
  color: var(--red);
}
.hd-line.add {
  background: var(--green-bg);
  border-color: var(--green-line);
  color: var(--green);
}
.hd-line.pending {
  opacity: 0;
  transform: translateY(6px);
}
.hd-meta {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: 15px;
  font-size: 0.74rem;
  color: var(--fg-3);
  min-height: 20px;
  transition: opacity 0.4s var(--ease);
}
.hd-meta .ok {
  color: var(--green);
}
.hd-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.hd-status {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--fg-3);
  margin-top: 14px;
  min-height: 1.2em;
}
/* the little floating evidence chip on the card corner — top-left so it never
   competes with the live-status pill in the header's top-right */
.hd-badge {
  position: absolute;
  top: -13px;
  left: 18px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  color: var(--fg-2);
  background: var(--bg-3);
  border: 1px solid var(--line-3);
  border-radius: 999px;
  padding: 5px 12px 5px 9px;
  box-shadow: 0 10px 30px -14px rgba(0, 0, 0, 0.8);
}
.hd-badge b {
  color: var(--green);
}

/* --------------------------------------------------------------- terminal */
.term {
  background: linear-gradient(180deg, #0c1017, #080b10);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.95),
    0 0 0 1px rgba(255, 255, 255, 0.022) inset;
}
.term-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  background: linear-gradient(180deg, var(--bg-3), var(--bg-2));
  border-bottom: 1px solid var(--line);
}
.term-bar i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: block;
}
.term-bar .t {
  margin-left: 12px;
  font-family: var(--mono);
  font-size: 0.755rem;
  color: var(--fg-4);
}
.term pre {
  margin: 0;
  padding: 22px 24px 26px;
  font-size: 0.845rem;
  line-height: 1.78;
  overflow-x: auto;
  color: var(--fg-2);
  white-space: pre;
  min-height: 330px;
}
/* Static transcript shown only when JS is off (see the <noscript> in the head).
   JS-on users get the typed replay in #tty instead. */
.term-noscript {
  display: none;
}
.c-p {
  color: var(--blue);
}
.c-g {
  color: var(--green);
}
.c-a {
  color: var(--amber);
}
.c-r {
  color: var(--red);
}
.c-d {
  color: var(--fg-4);
}
.c-w {
  color: var(--fg);
}
.c-v {
  color: var(--violet);
}
.caret {
  display: inline-block;
  width: 8px;
  height: 1.05em;
  background: var(--blue);
  vertical-align: text-bottom;
  animation: blink 1.05s steps(2, start) infinite;
}
@keyframes blink {
  to {
    visibility: hidden;
  }
}

/* ------------------------------------------------------------ logo / proof */
.proof {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--bg-1), var(--bg));
}
.proof-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: var(--wrap);
  margin: 0 auto;
}
.proof-grid div {
  padding: 32px 22px;
  text-align: center;
  border-left: 1px solid var(--line);
}
.proof-grid div:first-child {
  border-left: 0;
}
.proof-grid b {
  display: block;
  font-size: 2rem;
  font-weight: 640;
  font-family: var(--mono);
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, var(--fg), #9db3cc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.proof-grid span {
  font-size: 0.75rem;
  color: var(--fg-3);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 500;
  margin-top: 4px;
  display: block;
}

/* --------------------------------------------------------------- sections */
section {
  padding: 104px 0;
  position: relative;
}
section.alt {
  background: var(--bg-1);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
section.tight {
  padding-top: 0;
}

/* ------------------------------------------------------------------ cards */
.card {
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 26px;
  position: relative;
  transition: border-color 0.22s var(--ease), transform 0.22s var(--ease),
    box-shadow 0.22s var(--ease);
}
.card:hover {
  border-color: var(--line-2);
  transform: translateY(-2px);
  box-shadow: 0 24px 50px -34px rgba(0, 0, 0, 0.9);
}
.card p {
  margin: 10px 0 0;
  color: var(--fg-2);
  font-size: 0.935rem;
  line-height: 1.62;
}
.card .ic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--bg-3);
  border: 1px solid var(--line-2);
  margin-bottom: 16px;
  color: var(--blue);
}
.card .ic svg {
  width: 19px;
  height: 19px;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

/* ------------------------------------------------------------------ lists */
ul.ticks {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}
ul.ticks li {
  padding-left: 28px;
  position: relative;
  color: var(--fg-2);
  font-size: 0.945rem;
  line-height: 1.55;
}
ul.ticks li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.5em;
  width: 11px;
  height: 6px;
  border-left: 2px solid var(--green);
  border-bottom: 2px solid var(--green);
  transform: rotate(-45deg);
}
ul.ticks li b,
ul.ticks li strong {
  color: var(--fg);
  font-weight: 600;
}
ul.crosses li::before {
  content: "×";
  border: 0;
  transform: none;
  color: var(--red);
  font-size: 1.2rem;
  line-height: 1;
  top: 0.18em;
  left: 4px;
  width: auto;
  height: auto;
  font-weight: 500;
}

/* ------------------------------------------------ the two-column diff pair */
/* "What it does / what it will never do" rendered literally as an add/remove
   pair of panels — the metaphor made structural. */
.diffcols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 52px;
}
.dcol {
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
}
.dcol-h {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 20px;
  font-weight: 600;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--line);
}
.dcol-h .g {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.05rem;
}
.dcol.add {
  border-color: var(--green-line);
}
.dcol.add .dcol-h {
  color: var(--green);
  background: linear-gradient(180deg, rgba(13, 40, 24, 0.55), transparent);
}
.dcol.del {
  border-color: var(--red-line);
}
.dcol.del .dcol-h {
  color: var(--red-2);
  background: linear-gradient(180deg, rgba(42, 19, 21, 0.55), transparent);
}
.dcol ul.ticks {
  padding: 20px 22px 24px;
}

/* ----------------------------------------------------------------- tables */
.tw {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--bg-1);
  -webkit-overflow-scrolling: touch;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.915rem;
  min-width: 660px;
}
th,
td {
  padding: 15px 18px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
thead th {
  background: var(--bg-2);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--fg-3);
  font-weight: 600;
  white-space: nowrap;
}
tbody tr:last-child td {
  border-bottom: 0;
}
tbody tr {
  transition: background 0.16s var(--ease);
}
tbody tr:hover {
  background: rgba(255, 255, 255, 0.016);
}
td.y {
  color: var(--green);
  font-weight: 550;
}
td.n {
  /* "No"/"—" cells: deliberately de-emphasised so Sean's column reads first,
     but still a word the user reads — fg-3 keeps it AA rather than fg-4. */
  color: var(--fg-3);
}
td strong {
  color: var(--fg);
  font-weight: 600;
}
table code {
  font-size: 0.86em;
  color: var(--fg-2);
  background: none;
  border: 0;
  padding: 0;
}
th.hl,
td.hl {
  background: rgba(47, 111, 235, 0.055);
}

/* ------------------------------------------------------- the diff demo */
.demo {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 20px;
  align-items: start;
}
.panel {
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}
.panel-h {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 0.775rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--fg-3);
  font-weight: 600;
}
.panel-b {
  padding: 20px;
}
.sev {
  font-family: var(--mono);
  font-size: 0.68rem;
  padding: 3px 8px;
  border-radius: 5px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-weight: 600;
}
.sev.crit {
  color: var(--red);
  background: var(--red-bg);
  border: 1px solid var(--red-line);
}
.sev.t1 {
  color: var(--green);
  background: var(--green-bg);
  border: 1px solid var(--green-line);
}
.finding-id {
  font-family: var(--mono);
  font-size: 0.79rem;
  color: var(--fg-3);
  margin: 14px 0 6px;
}
.finding-t {
  font-size: 1.06rem;
  font-weight: 560;
  letter-spacing: -0.016em;
  margin-bottom: 8px;
}
.diffline {
  display: flex;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--r-sm);
  font-family: var(--mono);
  font-size: 0.875rem;
  line-height: 1.5;
  margin-bottom: 9px;
  border: 1px solid transparent;
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
  word-break: break-word;
}
.diffline .sign {
  flex: none;
  font-weight: 700;
  opacity: 0.85;
}
.diffline.del {
  background: var(--red-bg);
  border-color: var(--red-line);
  color: var(--red);
}
.diffline.add {
  background: var(--green-bg);
  border-color: var(--green-line);
  color: var(--green);
}
.diffline.pending {
  opacity: 0;
  transform: translateY(6px);
}
.meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 0.775rem;
  color: var(--fg-3);
}
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(69, 210, 104, 0.16);
}
.dot.idle {
  background: var(--fg-4);
  box-shadow: none;
}

/* ------------------------------------------------------- three-plane model */
.planes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--bg-1);
}
.plane {
  padding: 26px 24px;
  border-left: 1px solid var(--line);
  position: relative;
}
.plane:first-child {
  border-left: 0;
}
.plane h4 {
  font-size: 0.98rem;
  margin-bottom: 4px;
}
.plane .lbl {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: 14px;
  display: block;
}
.plane .flag {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.855rem;
  color: var(--fg-2);
  margin-top: 11px;
}
.flag .pip {
  width: 17px;
  height: 17px;
  border-radius: 5px;
  display: grid;
  place-items: center;
  font-size: 0.66rem;
  font-weight: 700;
  flex: none;
}
.pip.no {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid var(--red-line);
}
.pip.yes {
  background: var(--green-bg);
  color: var(--green);
  border: 1px solid var(--green-line);
}

/* --------------------------------------------------------- evidence ladder */
/* A→E confidence, coloured by how much the data supports the claim: green at
   the top rung (a controlled experiment), cooling to muted at E (not yet
   measurable). The colour IS the information, same as the diff palette. */
.ladder {
  display: grid;
  gap: 10px;
  max-width: 900px;
  margin: 0 auto;
}
.rung {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: start;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--line-3);
  border-radius: var(--r);
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.rung:hover {
  transform: translateX(3px);
}
.rung .lt {
  font-family: var(--mono);
  font-size: 1.5rem;
  font-weight: 680;
  line-height: 1;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  background: var(--bg-3);
  color: var(--fg-3);
  flex: none;
}
.rung .rh {
  font-size: 1rem;
  font-weight: 580;
  letter-spacing: -0.014em;
  color: var(--fg);
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.rung p {
  margin: 0;
  color: var(--fg-2);
  font-size: 0.92rem;
  line-height: 1.6;
}
.rung.a {
  border-left-color: var(--green);
}
.rung.a .lt {
  color: var(--green);
  background: var(--green-bg);
  border-color: var(--green-line);
}
.rung.b {
  border-left-color: #7fc98a;
}
.rung.b .lt {
  color: #7fc98a;
}
.rung.c {
  border-left-color: var(--amber);
}
.rung.c .lt {
  color: var(--amber);
}
.rung.d {
  border-left-color: var(--line-3);
}
.rung.e {
  border-left-color: var(--red);
}
.rung.e .lt {
  color: var(--red);
  background: var(--red-bg);
  border-color: var(--red-line);
}
.cause {
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.cause.yes {
  color: var(--green);
  background: var(--green-bg);
  border: 1px solid var(--green-line);
}
.cause.no {
  color: var(--fg-3);
  background: var(--bg-3);
  border: 1px solid var(--line-2);
}

/* ---------------------------------------------------------------- pricing */
.price-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  align-items: stretch;
}
@media (max-width: 1100px) and (min-width: 981px) {
  .price-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.plan-card {
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: border-color 0.22s var(--ease), transform 0.22s var(--ease);
}
.plan-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-2);
}
.plan-card.feat {
  border-color: rgba(47, 111, 235, 0.55);
  background: linear-gradient(180deg, #101a2c, var(--bg-1));
  box-shadow: 0 0 0 1px rgba(47, 111, 235, 0.22),
    0 30px 60px -34px rgba(47, 111, 235, 0.55);
}
.plan-card .tag {
  position: absolute;
  top: -11px;
  left: 27px;
  background: linear-gradient(180deg, var(--blue-3), var(--blue-2));
  color: #fff;
  font-size: 0.665rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 11px;
  border-radius: 999px;
}
.plan-card h3 {
  font-size: 1.14rem;
}
.plan-card .sub {
  color: var(--fg-3);
  font-size: 0.86rem;
  margin: 7px 0 22px;
  min-height: 42px;
  line-height: 1.5;
}
.amt {
  font-size: 2.5rem;
  font-weight: 640;
  letter-spacing: -0.045em;
  line-height: 1;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}
/* The mono period has wide sidebearings, so "$14.99" reads as "$14 . 99" at
   display size. Setting the cents smaller both fixes the spacing and is the
   conventional way to letter a price. */
.amt .cents {
  font-size: 0.52em;
  letter-spacing: -0.01em;
  vertical-align: baseline;
  margin-left: -0.06em;
}
.amt.text {
  font-size: 1.65rem;
  font-family: var(--sans);
  letter-spacing: -0.028em;
  line-height: 1.55;
}
.per {
  color: var(--fg-3);
  font-size: 0.83rem;
  display: block;
  margin: 9px 0 24px;
  line-height: 1.5;
}
.plan-card ul {
  margin: 0 0 26px;
  flex: 1;
}
.price-note {
  text-align: center;
  color: var(--fg-3);
  font-size: 0.875rem;
  margin-top: 26px;
}

/* -------------------------------------------------------------------- faq */
.faq {
  max-width: 780px;
  margin: 0 auto;
  border-top: 1px solid var(--line);
}
.faq details {
  border-bottom: 1px solid var(--line);
}
.faq summary {
  cursor: pointer;
  padding: 21px 40px 21px 0;
  font-weight: 550;
  font-size: 1rem;
  letter-spacing: -0.012em;
  list-style: none;
  position: relative;
  transition: color 0.15s var(--ease);
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary:hover {
  color: var(--blue);
}
.faq summary::after {
  content: "+";
  position: absolute;
  right: 6px;
  top: 18px;
  font-size: 1.35rem;
  font-weight: 300;
  color: var(--fg-3);
  transition: transform 0.25s var(--ease);
}
.faq details[open] summary::after {
  transform: rotate(45deg);
}
.faq .a {
  padding: 0 40px 24px 0;
  color: var(--fg-2);
  font-size: 0.95rem;
  line-height: 1.68;
  margin: 0;
}

/* -------------------------------------------------------------------- cta */
.cta-box {
  background: linear-gradient(155deg, #101a2c 0%, var(--bg-1) 58%);
  border: 1px solid var(--line-2);
  border-radius: var(--r-xl);
  padding: 64px 36px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-box::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(30rem 14rem at 50% 0%, rgba(47, 111, 235, 0.2), transparent 68%);
  pointer-events: none;
}
.cta-box > * {
  position: relative;
}

/* ----------------------------------------------------------------- footer */
footer {
  border-top: 1px solid var(--line);
  padding: 64px 0 44px;
  background: var(--bg-1);
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.7fr repeat(4, 1fr);
  gap: 36px;
  margin-bottom: 46px;
}
.foot-grid h4 {
  font-size: 0.725rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-3);
  margin: 0 0 16px;
  font-weight: 600;
}
.foot-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}
.foot-grid a {
  color: var(--fg-2);
  font-size: 0.885rem;
}
.foot-grid a:hover {
  color: var(--fg);
}
.foot-bot {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding-top: 26px;
  color: var(--fg-3);
  font-size: 0.845rem;
}

/* ------------------------------------------------------------ scroll reveal */
/* The base state is hidden+nudged; .in reveals. A --d custom property lets a
   parent stagger its children without per-element rules. JS adds .in; the
   <noscript> block and the reduced-motion query both neutralise this. */
.rv {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease) var(--d, 0s),
    transform 0.7s var(--ease) var(--d, 0s);
}
.rv.in {
  opacity: 1;
  transform: none;
}

/* -------------------------------------------------------------- doc pages */
main.doc {
  max-width: 780px;
  margin: 0 auto;
  padding: 62px 26px 96px;
}
main.doc h1 {
  font-size: clamp(2rem, 5vw, 2.7rem);
  text-align: left;
  margin-bottom: 10px;
}
main.doc h2 {
  font-size: 1.4rem;
  margin-top: 46px;
  text-align: left;
}
main.doc p,
main.doc li {
  color: var(--fg-2);
}
main.doc .lead {
  margin: 14px 0 30px;
  text-align: left;
  max-width: none;
}
main.doc pre {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 17px 19px;
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.6;
}
main.doc pre.install {
  font-size: 0.95rem;
}
main.doc table {
  min-width: 0;
}
main.doc .matrix {
  width: 100%;
}
.badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.71rem;
  padding: 2px 8px;
  border-radius: 5px;
  border: 1px solid var(--line-2);
  color: var(--fg-2);
  background: var(--bg-2);
}
.badge.t1 {
  color: var(--green);
  border-color: var(--green-line);
}
.badge.t3 {
  color: var(--amber);
  border-color: rgba(240, 184, 73, 0.4);
}
.badge.t4 {
  color: var(--red);
  border-color: var(--red-line);
}

/* ======================================================================== */
/*  Documentation pages — install.html, security.html                       */
/*  A sticky table of contents beside a wide reading column. Every component */
/*  here is built from the same tokens and primitives as the landing page;  */
/*  nothing invents a second visual language.                               */
/* ======================================================================== */
.doc-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 48px;
  max-width: 1080px;
  margin: 0 auto;
  padding: 40px 26px 0;
}
.toc {
  position: sticky;
  top: 92px;
  align-self: start;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  font-size: var(--t-sm);
  padding-bottom: 20px;
}
.toc-h {
  display: block;
  font-family: var(--mono);
  font-size: var(--t-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: 14px;
}
.toc nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-left: 1px solid var(--line);
}
.toc nav a {
  color: var(--fg-2);
  padding: 6px 0 6px 16px;
  margin-left: -1px;
  border-left: 2px solid transparent;
  line-height: 1.35;
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease);
}
.toc nav a:hover {
  color: var(--fg);
  border-left-color: var(--line-3);
}
.toc nav a.active {
  color: var(--blue);
  border-left-color: var(--blue);
}
.toc nav a code {
  font-size: 0.85em;
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
}

/* the reading column: wider than the old single-column .doc, and its own
   left alignment and rhythm. */
main.doc.doc-wide {
  max-width: 760px;
  margin: 0;
  padding: 6px 0 100px;
}
main.doc.doc-wide h1 {
  font-size: clamp(2.1rem, 4.6vw, 3rem);
  line-height: 1.04;
  margin-bottom: 18px;
}
main.doc.doc-wide h2 {
  font-size: clamp(1.5rem, 3vw, 1.9rem);
  margin-top: 62px;
  margin-bottom: 14px;
  scroll-margin-top: 90px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
main.doc.doc-wide h3 {
  margin-bottom: 8px;
}
main.doc.doc-wide > p {
  color: var(--fg-2);
  margin: 0 0 16px;
}
main.doc.doc-wide .lead {
  color: var(--fg);
  font-size: var(--t-md);
  margin-bottom: 8px;
}
main.doc.doc-wide ul,
main.doc.doc-wide ol {
  margin: 0 0 18px;
}
main.doc.doc-wide .kicker {
  margin-bottom: 14px;
}
/* copyable command as a block on doc pages. The command string can be long
   (the curl one-liner, the docker line) and must wrap rather than shove the
   Copy button past the viewport edge on a phone. */
main.doc.doc-wide .cmd {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  width: 100%;
  margin: 0 0 18px;
  font-size: 0.9rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}
main.doc.doc-wide .cmd button {
  margin-left: auto;
}
.fineprint {
  font-size: var(--t-sm);
  color: var(--fg-3) !important;
}

/* --- requirements strip (install) ------------------------------------- */
.req {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  margin: 30px 0 10px;
}
.req-i {
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  padding: 18px 18px 20px;
}
.req-k {
  display: block;
  font-family: var(--mono);
  font-size: var(--t-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.req-v {
  display: block;
  font-size: 1.18rem;
  font-weight: 640;
  letter-spacing: -0.02em;
  color: var(--fg);
  margin: 5px 0 8px;
}
.req-d {
  display: block;
  font-size: var(--t-sm);
  color: var(--fg-2);
  line-height: 1.5;
}

/* --- callout ---------------------------------------------------------- */
.callout {
  display: flex;
  gap: 15px;
  padding: 18px 20px;
  border-radius: var(--r);
  border: 1px solid var(--line-2);
  background: var(--bg-2);
  margin: 6px 0 20px;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--fg-2);
}
.callout strong {
  color: var(--fg);
}
.callout-i {
  flex: none;
  width: 22px;
  height: 22px;
  color: var(--blue);
  margin-top: 1px;
}
.callout.warn {
  border-color: rgba(240, 184, 73, 0.32);
  background: linear-gradient(180deg, rgba(240, 184, 73, 0.07), transparent);
}
.callout.warn .callout-i {
  color: var(--amber);
}

/* --- numbered steps (install first-run) ------------------------------- */
ol.steps {
  list-style: none;
  padding: 0;
  margin: 8px 0 20px;
  counter-reset: none;
}
ol.steps > li {
  position: relative;
  padding: 0 0 8px 0;
  margin-bottom: 20px;
}
.step-h {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: -0.018em;
  color: var(--fg);
  margin-bottom: 12px;
}
.step-n {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--bg-3);
  border: 1px solid var(--line-2);
  color: var(--blue);
  font-family: var(--mono);
  font-size: 0.9rem;
  font-weight: 600;
}
ol.steps > li > p {
  margin: 0 0 12px;
  color: var(--fg-2);
}

/* --- platform tabs (install service) ---------------------------------- */
.tabs {
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  margin: 4px 0 20px;
  background: var(--bg-1);
}
.tab-bar {
  display: flex;
  gap: 4px;
  padding: 8px 8px 0;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
}
.tab-bar button {
  appearance: none;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--fg-2);
  font-family: var(--sans);
  font-size: var(--t-sm);
  font-weight: 550;
  padding: 10px 14px 11px;
  cursor: pointer;
  margin-bottom: -1px;
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease);
}
.tab-bar button:hover {
  color: var(--fg);
}
.tab-bar button[aria-selected="true"] {
  color: var(--blue);
  border-bottom-color: var(--blue);
}
.tab-panel {
  padding: 20px 22px 6px;
}
.tab-panel p {
  margin: 0 0 12px;
  color: var(--fg-2);
}
.tab-panel pre {
  margin: 0 0 12px;
}
/* The JS-off fallback (show every panel, hide the bar) is handled by the
   <noscript> block in install.html, matching the site's other fallbacks. */

/* --- autonomy tiers (security) ---------------------------------------- */
.tiers {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 8px 0 20px;
}
.tier {
  border: 1px solid var(--line);
  border-left-width: 3px;
  border-radius: var(--r-sm);
  padding: 16px 20px;
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
}
.tier-h {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -0.016em;
  margin-bottom: 6px;
}
.tier p {
  margin: 0;
  color: var(--fg-2);
  font-size: 0.94rem;
  line-height: 1.6;
}
.tier.t0 {
  border-left-color: var(--line-3);
}
.tier.t1 {
  border-left-color: var(--green);
}
.tier.t2 {
  border-left-color: var(--blue);
}
.tier.t3 {
  border-left-color: var(--amber);
}
.tier.t4 {
  border-left-color: var(--red);
}

/* --- validator table numerals ----------------------------------------- */
.matrix.checks td:first-child {
  color: var(--fg-3);
  text-align: right;
  width: 2.4em;
}
.matrix.checks td:nth-child(2) {
  color: var(--fg);
  white-space: nowrap;
}

/* --- red-team grid (security) ----------------------------------------- */
.rt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
  margin: 6px 0 18px;
}
.rt {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--bg-1);
  font-size: 0.9rem;
  color: var(--fg-2);
  line-height: 1.4;
}
.rt-n {
  flex: none;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--green);
  background: var(--green-bg);
  border: 1px solid var(--green-line);
  border-radius: 5px;
  padding: 2px 6px;
}
.rt code {
  font-size: 0.82em;
}

/* --- troubleshooting accordion (install) ------------------------------ */
.tshoot {
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  margin: 4px 0 24px;
}
.tshoot details {
  border-bottom: 1px solid var(--line);
  background: var(--bg-1);
}
.tshoot details:last-child {
  border-bottom: 0;
}
.tshoot summary {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 16px 20px;
  cursor: pointer;
  font-weight: 550;
  color: var(--fg);
  list-style: none;
}
.tshoot summary::-webkit-details-marker {
  display: none;
}
.tshoot summary::after {
  content: "+";
  margin-left: auto;
  color: var(--fg-3);
  font-family: var(--mono);
  font-size: 1.1rem;
}
.tshoot details[open] summary::after {
  content: "\2212";
}
.ts-tag {
  flex: none;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--blue);
  background: var(--blue-bg);
  border: 1px solid rgba(98, 164, 255, 0.28);
  border-radius: 5px;
  padding: 3px 7px;
}
.ts-b {
  padding: 2px 20px 20px;
}
.ts-b p {
  margin: 0 0 12px;
  color: var(--fg-2);
}
.ts-b .cmd {
  margin-bottom: 12px;
}

/* --- next-steps button row -------------------------------------------- */
.doc-next {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 56px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}

/* ------------------------------------------------------------- responsive */
@media (max-width: 980px) {
  /* the sticky TOC has nowhere to sit on a narrow screen; drop it and let the
     reading column run full width. minmax(0,1fr) — not a bare 1fr — so the
     track can shrink below the min-content width of a long command string
     instead of blowing the grid wider than the viewport. */
  .doc-shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  .toc {
    display: none;
  }
  main.doc.doc-wide {
    max-width: none;
    padding-bottom: 80px;
  }
  .req {
    grid-template-columns: 1fr 1fr;
  }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .hero-copy {
    max-width: none;
  }
  .hero.center .cta-row,
  .hero-grid .trust {
    justify-content: flex-start;
  }
  .demo,
  .grid-2,
  .diffcols {
    grid-template-columns: 1fr;
  }
  .grid-3,
  .price-grid {
    grid-template-columns: 1fr;
  }
  .planes {
    grid-template-columns: 1fr;
  }
  .plane {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .plane:first-child {
    border-top: 0;
  }
  .foot-grid {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
  .nav-links {
    display: none;
  }
  section {
    padding: 70px 0;
  }
  .hero {
    padding: 64px 0 34px;
  }
  .proof-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .proof-grid div:nth-child(3) {
    border-left: 0;
  }
  .proof-grid div:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 560px) {
  body {
    font-size: 16px;
  }
  /* At 390px the nav pill + CTA overran the viewport by 4px. Tighten the
     gutter and the gap rather than shrinking the tap targets. */
  .nav-in,
  .wrap {
    padding-left: 18px;
    padding-right: 18px;
  }
  .nav-in {
    gap: 12px;
  }
  .nav-right {
    gap: 8px;
  }
  .ghstar .gh-l span {
    display: none;
  }
  h1 {
    overflow-wrap: break-word;
  }
  /* doc pages: single-column strips and gutters that match the site's */
  .doc-shell {
    padding-left: 18px;
    padding-right: 18px;
  }
  .req {
    grid-template-columns: 1fr;
  }
  .rt-grid {
    grid-template-columns: 1fr;
  }
  .callout,
  .tier {
    padding-left: 16px;
    padding-right: 16px;
  }
}

@media (max-width: 400px) {
  /* The nav CTA duplicates the hero's install command; drop it rather than
     shrink a tap target below the accessible minimum. */
  .nav-right .btn {
    display: none;
  }
  .cmd {
    font-size: 0.8rem;
    width: 100%;
    gap: 10px;
  }
  .cmd button {
    margin-left: auto;
  }
  .cta-row .btn {
    width: 100%;
  }
  .foot-grid {
    grid-template-columns: 1fr;
  }
  .cta-box {
    padding: 42px 22px;
  }
  .term pre {
    font-size: 0.755rem;
    padding: 17px;
  }
  .plan-card {
    padding: 26px 22px;
  }
  .hd-body {
    padding: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .hero::before {
    animation: none;
  }
  .rv {
    opacity: 1;
    transform: none;
  }
}
