/* ==========================================================================
   Otter — marketing site stylesheet
   Hand-written, dependency-free.

   Direction: precise and typographic rather than playful. One electric blue
   carries the brand; near-black ink on white; a measured vertical rhythm.
   Everything is expressed through tokens so pages never hard-code a colour.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */

:root {
  /* ------------------------------------------------------------------
     Palette: warm paper and a rust accent, with a near-black ink.
     Rust is the only brand colour; every other accent means something.
     ------------------------------------------------------------------ */

  /* Warm neutrals */
  --bg: #faf7f1;
  --bg-subtle: #f3eee4;
  --bg-muted: #efe8dc;
  --surface: #fffdf9;
  --ink: #171310;
  --body: #514a41;
  --muted: #6f675c;
  --faint: #9a9184;
  --line: #e7e0d3;
  --line-strong: #d8cfbd;

  /* The one brand colour */
  --rust: #b8410b;
  --rust-dark: #9a3609;
  --rust-bright: #e06a2f;
  --rust-soft: #f6e2d5;
  --rust-tint: #fdf3ec;

  /* Accents — each one carries a meaning, none are decoration */
  --pink: #cc3366;
  --gold: #8a6212;
  --gold-soft: #fff4dd;
  --green: #0f6b4f;
  --green-soft: #e4f2ec;
  --red: #b3261e;
  --red-soft: #fbe8e6;

  /* Inverted band — warm near-black, matching the terminal */
  --dark-bg: #1c1813;
  --dark-surface: #262119;
  --dark-line: #37302a;
  --dark-fg: #f6f2ea;
  --dark-body: #bab1a4;
  --dark-muted: #8d8478;

  /* Type */
  --font-sans: 'Space Grotesk', ui-sans-serif, system-ui, -apple-system,
    'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas,
    'Liberation Mono', monospace;

  /* Space */
  --gap: 1.25rem;
  --pad-section: clamp(3.5rem, 7.5vw, 7rem);
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-pill: 999px;

  /* Structure */
  --border: 1px solid var(--line);
  --border-strong: 1px solid var(--line-strong);
  --shadow-sm: 0 1px 2px rgb(23 19 16 / 0.05);
  --shadow: 0 1px 3px rgb(23 19 16 / 0.06), 0 8px 24px -12px rgb(23 19 16 / 0.16);
  --shadow-lg: 0 2px 6px rgb(23 19 16 / 0.06),
    0 24px 48px -20px rgb(23 19 16 / 0.26);

  --measure: 66ch;
  --container: 1160px;
  --container-narrow: 820px;

  --ease: cubic-bezier(0.2, 0.85, 0.25, 1);
}

/* Inverted band — deep ink, matching the terminal */
.invert {
  --bg: var(--dark-bg);
  --bg-subtle: #201b16;
  --bg-muted: var(--dark-surface);
  --bg-strong: #100d0a;
  --surface: var(--dark-surface);
  --ink: var(--dark-fg);
  --ink-soft: #ffffff;
  --body: #c2c9d6;
  --muted: var(--dark-muted);
  --faint: #5f6980;
  --line: var(--dark-line);
  --line-strong: #2e3644;
  background: var(--bg);
  color: var(--ink);
}
.invert ::selection {
  background: var(--rust-bright);
  color: #ffffff;
}

/* --------------------------------------------------------------------------
   2. Reset
   -------------------------------------------------------------------------- */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.027em;
}

h1 {
  font-size: clamp(2.5rem, 5.6vw, 4.25rem);
  letter-spacing: -0.035em;
}
h2 {
  font-size: clamp(1.85rem, 3.6vw, 2.75rem);
  letter-spacing: -0.03em;
}
h3 {
  font-size: 1.1875rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

p {
  margin: 0 0 1.1rem;
}
p:last-child {
  margin-bottom: 0;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

ul,
ol {
  margin: 0 0 1.1rem;
  padding-left: 1.2em;
}

button {
  font: inherit;
  color: inherit;
}

code,
kbd,
pre,
samp {
  font-family: var(--font-mono);
  font-size: 0.875em;
}

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

::selection {
  background: var(--rust-soft);
  color: var(--ink);
}

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

/* --------------------------------------------------------------------------
   3. Layout
   -------------------------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2rem);
}

.wrap-narrow {
  max-width: var(--container-narrow);
}

.section {
  padding-block: var(--pad-section);
}
.section--tight {
  padding-block: clamp(2.5rem, 5vw, 4rem);
}
.section--flush-top {
  padding-top: 0;
}
.section--subtle {
  background: var(--bg-subtle);
  border-block: var(--border);
}
.section--muted {
  background: var(--bg-muted);
}

.rule {
  border: 0;
  border-top: var(--border);
  margin: 0;
}

.grid {
  display: grid;
  gap: var(--gap);
}
.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.split--wide-left {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
}
.center {
  text-align: center;
}
.mx-auto {
  margin-inline: auto;
}
.measure {
  max-width: var(--measure);
}
.measure-sm {
  max-width: 48ch;
}

/* --------------------------------------------------------------------------
   4. Type
   -------------------------------------------------------------------------- */

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rust);
  display: block;
  margin-bottom: 1.25rem;
}
.invert .eyebrow {
  color: var(--rust-bright);
}

.lead {
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
  line-height: 1.55;
  color: var(--body);
  max-width: var(--measure);
}
.invert .lead {
  color: var(--dark-body);
}

.small {
  font-size: 0.9375rem;
  color: var(--muted);
}
.tiny {
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--muted);
}
.mono {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}
.muted {
  color: var(--muted);
}

.underline-slide {
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.underline-slide:hover {
  border-bottom-color: currentColor;
}

/* Links inside prose get the brand blue and a real underline. */
.prose a,
.lead a,
p a,
li a,
td a,
.faq__body a {
  color: var(--rust);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--rust) 35%, transparent);
}
.prose a:hover,
.lead a:hover,
p a:hover,
li a:hover,
td a:hover,
.faq__body a:hover {
  text-decoration-color: currentColor;
}
.invert p a,
.invert li a,
.invert .lead a {
  color: var(--rust-bright);
}

/* --------------------------------------------------------------------------
   5. Buttons
   -------------------------------------------------------------------------- */

.btn {
  --btn-bg: var(--rust);
  --btn-fg: #ffffff;
  --btn-border: var(--rust);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.68rem 1.1rem;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  border: 1px solid var(--btn-border);
  border-radius: var(--radius-sm);
  background: var(--btn-bg);
  color: var(--btn-fg);
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease,
    color 0.15s ease, transform 0.15s ease;
  white-space: nowrap;
}
.btn:hover {
  --btn-bg: var(--rust-dark);
  --btn-border: var(--rust-dark);
}
.btn:active {
  transform: translateY(1px);
}
.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  --btn-border: var(--line-strong);
}
.btn--ghost:hover {
  --btn-bg: var(--bg-muted);
  --btn-border: var(--ink);
}
.btn--ink {
  --btn-bg: var(--ink);
  --btn-fg: var(--bg);
  --btn-border: var(--ink);
}
.btn--ink:hover {
  --btn-bg: #000000;
  --btn-border: #000000;
}
.btn--lg {
  padding: 0.8rem 1.35rem;
  font-size: 1rem;
}
.btn--sm {
  padding: 0.45rem 0.8rem;
  font-size: 0.875rem;
}
.btn--block {
  width: 100%;
}
.btn--on-dark {
  --btn-bg: #ffffff;
  --btn-fg: var(--ink);
  --btn-border: #ffffff;
}
.btn--on-dark:hover {
  --btn-bg: #e9edf5;
  --btn-border: #e9edf5;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--rust);
  text-decoration: none;
}
.link-arrow span {
  transition: transform 0.15s var(--ease);
}
.link-arrow:hover span {
  transform: translateX(3px);
}
.invert .link-arrow {
  color: var(--rust-bright);
}

/* --------------------------------------------------------------------------
   6. Header
   -------------------------------------------------------------------------- */

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--bg);
  padding: 0.75rem 1rem;
  z-index: 100;
}
.skip:focus {
  left: 1rem;
  top: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.site-header[data-stuck='true'] {
  border-bottom-color: var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 4rem;
}

.brand {
  /* The lockup is a single image now, so the brand carries no type of its
     own: the wordmark is drawn in the SVG. --brand-h is the knob for its size. */
  --brand-h: 2.5rem;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex: none;
}
.brand__logo {
  display: block;
  height: var(--brand-h);
  width: auto;
  flex: none;
  /* The UA default max-width:100% would clamp the image to .brand's
     shrink-to-fit width, which the negative margins below have already
     reduced. The SVG then keeps its ratio with `meet` and the artwork is
     silently scaled down inside the narrower box (21px of visible lockup
     instead of the 24.5px the margins below assume). The overflow those
     margins create is intentional. */
  max-width: none;
  /* otter_logo.svg is a 1905x826 canvas whose artwork only occupies
     x 149-1773, y 174-680. Those fractions of the height are transparent, so
     they are cancelled here rather than left as an optical indent: the lockup
     then aligns with the gutter and centres like any other nav item. */
  margin: calc(var(--brand-h) * -174 / 826) calc(var(--brand-h) * -132 / 826)
    calc(var(--brand-h) * -146 / 826) calc(var(--brand-h) * -149 / 826);
}

/* At the brand's old 2.5rem the visible wordmark was only 14px tall, i.e.
   shorter than the 15px nav links beside it. Step the header lockup up as the
   viewport grows so it never dominates a narrow header; the footer keeps the
   2.5rem baseline. (These steps are optical — 3rem would still fit at 320px.) */
@media (min-width: 375px) {
  .site-header .brand {
    --brand-h: 2.75rem;
  }
}
@media (min-width: 414px) {
  .site-header .brand {
    --brand-h: 3rem;
  }
}
@media (min-width: 1000px) {
  .site-header .brand {
    --brand-h: 3.25rem;
  }
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__links a {
  display: block;
  padding: 0.4rem 0.65rem;
  font-size: 0.9375rem;
  color: var(--body);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.nav__links a:hover {
  color: var(--ink);
  border-bottom-color: var(--pink);
}
.nav__links a[aria-current='page'] {
  color: var(--ink);
  border-bottom-color: var(--rust);
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: none;
}

/* The sheet's copy of Sign in. On desktop the same link sits in .nav__actions,
   so this row is suppressed here and switched on by the 860px query below,
   which is exactly where .nav__actions is switched off. */
.nav__signin {
  display: none;
}

.nav__toggle {
  display: none;
  background: transparent;
  border: var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.7rem;
  font-size: 0.875rem;
  cursor: pointer;
}

@media (max-width: 860px) {
  .nav {
    flex-wrap: wrap;
  }
  .nav__toggle {
    display: inline-block;
  }
  .nav__links {
    order: 3;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.28s var(--ease);
  }
  .nav[data-open='true'] .nav__links {
    max-height: 20rem;
    border-top: var(--border);
    padding-top: 0.25rem;
    margin-top: 0.5rem;
  }
  .nav__links a {
    padding: 0.75rem 0.25rem;
    border-bottom: var(--border);
  }
  .nav__links a:hover {
    border-bottom-color: var(--line);
  }
  /* The markup carries .nav__actions, not .nav__cta, so this rule never
     matched and the CTA stayed in the collapsed header, forcing the nav to
     wrap to a second row below ~345px. */
  .nav__actions {
    display: none;
  }
  /* Dropping the actions would take Sign in with them, so the sheet carries it
     here: the product stays one tap from the top of the page on a phone. */
  .nav__signin {
    display: block;
  }
}

/* --------------------------------------------------------------------------
   7. Hero
   -------------------------------------------------------------------------- */

.hero {
  padding-top: clamp(2.5rem, 5vw, 4.25rem);
  padding-bottom: clamp(3rem, 6vw, 5.5rem);
}

.hero__inner {
  max-width: 62rem;
}

.hero h1 {
  margin-bottom: 1.5rem;
  max-width: 22ch;
}
.hero h1 .accent {
  color: var(--rust);
}

.hero .lead {
  font-size: clamp(1.125rem, 1.7vw, 1.375rem);
  max-width: 60ch;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  margin-top: 2rem;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem 1.25rem;
  margin-top: 1.75rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--muted);
}
.hero__meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.hero__meta svg {
  width: 12px;
  height: 12px;
  color: var(--green);
  flex: none;
}

.hero__demo {
  margin-top: clamp(2.5rem, 5vw, 4rem);
}

/* --------------------------------------------------------------------------
   8. Terminal
   -------------------------------------------------------------------------- */

.term {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--dark-bg);
  color: #e9edf6;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.8;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.term__bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--dark-line);
  background: #241f19;
}
.term__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.term__dot--a {
  background: var(--pink);
}
.term__dot--b {
  background: #ffb86b;
}
.term__dot--c {
  background: #5fd39a;
}
.term__title {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--dark-muted);
}
.term__body {
  padding: 1.15rem 1.25rem 1.4rem;
  overflow-x: auto;
  white-space: pre;
  tab-size: 2;
}
.term__body .c-dim {
  color: #6f7a8d;
}
.term__body .c-cmd {
  color: #ffffff;
}
.term__body .c-ok {
  color: #5fd39a;
}
.term__body .c-warn {
  color: #ffb86b;
}
.term__body .c-err {
  color: #ff8b7a;
}
.term__body .c-key {
  color: #f0a878;
}
.term__cursor {
  display: inline-block;
  width: 0.55em;
  height: 1.05em;
  background: var(--rust-bright);
  vertical-align: -0.18em;
  animation: blink 1.1s steps(2, start) infinite;
}
@keyframes blink {
  to {
    visibility: hidden;
  }
}

/* --------------------------------------------------------------------------
   8b. Code window with schedule and outcome

   The hero leads with a script, not a terminal: `sync_orders.py` beside what it
   runs on and what happened, so the whole product is one picture.
   -------------------------------------------------------------------------- */

.demo {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.demo__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0.9rem;
  border-bottom: var(--border);
  background: var(--bg-muted);
}
.demo__file {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--ink);
}
.demo__dots {
  display: flex;
  gap: 0.35rem;
}
.demo__dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--line-strong);
}
.demo__body {
  margin: 0;
  padding: 1.15rem 1.25rem 1.3rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.75;
  color: var(--ink);
  tab-size: 2;
  background: var(--surface);
}
.demo__body code {
  font-size: inherit;
}
/* The hero code window is a light surface, so it uses the light token palette. */
.demo__body .tok-c {
  color: #8a93a3;
}
.demo__body .tok-s {
  color: #a05a12;
}
.demo__body .tok-k {
  color: #c8342b;
}
.demo__body .tok-f {
  color: var(--rust);
}
.demo__body .tok-n {
  color: #2a6fd0;
}
.demo__body .tok-p {
  color: #2b3441;
}
.demo__body .tok-a {
  color: #b3267a;
}

.demo__bar .demo__file-pill {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.demo__status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  padding: 0.75rem 0.9rem;
  border-top: var(--border);
  background: var(--bg-subtle);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
}
.demo__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: var(--border);
  border-radius: var(--radius-pill);
  padding: 0.15rem 0.6rem;
  background: var(--surface);
  color: var(--ink);
}
.demo__chip--ok {
  background: var(--green-soft);
  border-color: color-mix(in srgb, var(--green) 25%, transparent);
  color: var(--green);
}
.demo__chip svg {
  width: 11px;
  height: 11px;
  flex: none;
}
.demo__note {
  margin-left: auto;
}

/* --------------------------------------------------------------------------
   9. Cards and lists
   -------------------------------------------------------------------------- */

.card {
  border: var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1.5rem;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.card--hover:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}
.card--flat {
  background: transparent;
  border-color: transparent;
  padding: 0;
}
.card--blue {
  background: var(--rust-tint);
  border-color: var(--rust-soft);
}
.card--dark {
  background: var(--dark-bg);
  border-color: var(--dark-bg);
}
.card--dark h3 {
  color: var(--dark-fg);
}
.card__kicker {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.85rem;
  display: block;
}
.card h3 {
  margin-bottom: 0.5rem;
}
.card p {
  color: var(--body);
  font-size: 0.9375rem;
  margin-bottom: 0;
}
.card--dark p {
  color: #b3bccb;
}
.card__icon {
  width: 1.25rem;
  height: 1.25rem;
  margin-bottom: 1rem;
  color: var(--rust);
}

.card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}
.card-link:hover .card {
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}

/* Steps */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
  border: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.step {
  counter-increment: step;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-bottom: var(--border);
  align-items: start;
}
.step:last-child {
  border-bottom: 0;
}
.step::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--rust);
  padding-top: 0.2rem;
  font-weight: 500;
}
.step h3 {
  margin-bottom: 0.35rem;
}
.step p {
  color: var(--body);
  font-size: 0.9375rem;
  margin: 0;
  max-width: 60ch;
}

/* Check lists */
.check-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.6rem;
}
.check-list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.65rem;
  align-items: start;
  font-size: 0.9375rem;
  color: var(--body);
}
.check-list li::before {
  content: '';
  width: 0.95rem;
  height: 0.95rem;
  margin-top: 0.28rem;
  border-radius: 50%;
  background: var(--green-soft);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--green) 35%, transparent);
  flex: none;
}
.check-list--x li::before {
  background: var(--red-soft);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--red) 30%, transparent);
}
.check-list b {
  font-weight: 600;
  color: var(--ink);
}

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  border: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.stat {
  padding: 1.5rem;
  border-right: var(--border);
}
.stat:last-child {
  border-right: 0;
}
.stat__num {
  display: block;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: 0.35rem;
}
.stat__num .accent {
  color: var(--rust);
}
.stat__label {
  font-size: 0.875rem;
  color: var(--muted);
}
@media (max-width: 700px) {
  .stat {
    border-right: 0;
    border-bottom: var(--border);
  }
  .stat:last-child {
    border-bottom: 0;
  }
}

/* Badges */
.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.badges li {
  border: var(--border);
  border-radius: var(--radius-pill);
  padding: 0.3rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
  background: var(--surface);
}

/* --------------------------------------------------------------------------
   10. Code
   -------------------------------------------------------------------------- */

.code {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--dark-bg);
  color: #e9edf6;
  overflow: hidden;
  font-family: var(--font-mono);
}
.code__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0.85rem;
  border-bottom: 1px solid var(--dark-line);
  background: #241f19;
}
.code__name {
  font-size: 0.75rem;
  color: var(--dark-muted);
}
.code__copy {
  background: transparent;
  border: 1px solid var(--dark-line);
  color: var(--dark-body);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  padding: 0.2rem 0.55rem;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease,
    border-color 0.15s ease;
}
.code__copy:hover {
  background: #302a21;
  border-color: #3d352b;
  color: #ffffff;
}
.code pre {
  margin: 0;
  padding: 1.15rem 1.25rem;
  overflow-x: auto;
  line-height: 1.75;
  font-size: 0.8125rem;
  tab-size: 2;
}
.code code {
  font-size: inherit;
}

.code--light {
  background: var(--surface);
  color: var(--ink);
}
.code--light .code__head {
  background: var(--bg-muted);
  border-bottom-color: var(--line);
}
.code--light .code__name {
  color: var(--muted);
}
.code--light .code__copy {
  border-color: var(--line-strong);
  color: var(--body);
}
.code--light .code__copy:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

/* Syntax tokens — dark code surfaces */
.tok-c {
  color: #6f7a8d;
}
.tok-s {
  color: #ffd479;
}
.tok-k {
  color: #ff8b7a;
}
.tok-f {
  color: #f0a878;
}
.tok-n {
  color: #5fd39a;
}
.tok-p {
  color: #d5dbe7;
}
.tok-a {
  color: #e8a0c0;
}
/* …and on the light ones */
.code--light .tok-c {
  color: #8a93a3;
}
.code--light .tok-s {
  color: #a05a12;
}
.code--light .tok-k {
  color: #c8342b;
}
.code--light .tok-f {
  color: var(--rust);
}
.code--light .tok-n {
  color: #2a6fd0;
}
.code--light .tok-p {
  color: #2b3441;
}
.code--light .tok-a {
  color: #b3267a;
}

/* Inline code, as a typographic shift rather than a chip. A bordered box made
   the mono space (0.60em) sitting beside sans spaces (0.28em) conspicuous; with
   no box the difference reads as letter-spacing, which is fine. */
.pill-code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  font-weight: 400;
  color: var(--ink);
}
.invert .pill-code {
  background: #302a21;
  border-color: #3d352b;
  color: var(--dark-fg);
}

/* Inline mention of a command or identifier. Deliberately *not* monospace:
   JetBrains Mono's space is 0.60em against Space Grotesk's 0.28em, so a
   multi-word code span leaves a visibly wide gap in the sentence. A bold sans
   term keeps even spacing while still reading as a literal. */
.term {
  font-weight: 500;
  color: var(--ink);
}
.invert .term {
  color: var(--dark-fg);
}

/* File tree */
.tree {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.9;
  margin: 0;
  white-space: pre;
  overflow-x: auto;
}
.tree .dir {
  color: var(--rust-bright);
}
.tree .file {
  color: #ffffff;
}
.tree .note {
  color: #6f7a8d;
}

/* --------------------------------------------------------------------------
   11. Tables
   -------------------------------------------------------------------------- */

.table-scroll {
  overflow-x: auto;
  border: var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
table.compare {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
  font-size: 0.9375rem;
}
table.compare th,
table.compare td {
  text-align: left;
  padding: 0.9rem 1.1rem;
  border-bottom: var(--border);
  vertical-align: top;
}
table.compare thead th {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--bg-muted);
}
table.compare th[scope='row'] {
  font-weight: 500;
  color: var(--ink);
  width: 20%;
}
table.compare td {
  color: var(--body);
}
table.compare tbody tr:last-child th,
table.compare tbody tr:last-child td {
  border-bottom: 0;
}
/* Emphasised column */
table.compare thead th:nth-child(2) {
  color: var(--rust);
  background: var(--rust-tint);
}
table.compare td:nth-child(2) {
  color: var(--ink);
  background: var(--rust-tint);
}
.invert table.compare thead th:nth-child(2),
.invert table.compare td:nth-child(2) {
  background: #2a2320;
  color: var(--dark-fg);
}
.invert table.compare thead th:nth-child(2) {
  color: var(--rust-bright);
}

/* Long tokens must never widen the page, but ordinary words must not be
   broken mid-word either — `anywhere` does the first and causes the second. */
table.compare td,
table.compare th,
p,
li,
td,
th,
.faq__body,
.lead,
.callout {
  overflow-wrap: break-word;
  word-break: normal;
}
table.compare td,
table.compare th {
  overflow-wrap: anywhere;
}

/* --------------------------------------------------------------------------
   12. Callouts
   -------------------------------------------------------------------------- */

.callout {
  border: var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  background: var(--bg-subtle);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.9rem;
  align-items: start;
  font-size: 0.9375rem;
}
.callout__icon {
  width: 1.15rem;
  height: 1.15rem;
  flex: none;
  margin-top: 0.2rem;
  color: var(--rust);
}
.callout p {
  color: var(--body);
  margin: 0;
}
.callout strong {
  font-weight: 600;
  color: var(--ink);
}
.callout--gold {
  background: var(--gold-soft);
  border-color: color-mix(in srgb, var(--gold) 22%, transparent);
}
.callout--gold .callout__icon {
  color: var(--gold);
}
.callout--warn {
  background: var(--red-soft);
  border-color: color-mix(in srgb, var(--red) 20%, transparent);
}
.callout--warn .callout__icon {
  color: var(--red);
}
.invert .callout {
  background: var(--dark-surface);
  border-color: var(--dark-line);
}
.invert .callout p {
  color: var(--dark-body);
}
.invert .callout strong {
  color: var(--dark-fg);
}

/* --------------------------------------------------------------------------
   13. Quote
   -------------------------------------------------------------------------- */

.quote {
  margin: 0;
  padding-left: 1.25rem;
  border-left: 2px solid var(--rust);
}
.quote p {
  font-size: clamp(1.0625rem, 1.8vw, 1.35rem);
  line-height: 1.45;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.quote footer {
  margin-top: 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   14. FAQ
   -------------------------------------------------------------------------- */

.faq {
  border-top: var(--border);
}
.faq details {
  border-bottom: var(--border);
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 1.15rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.015em;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: '+';
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--muted);
  flex: none;
  transition: transform 0.2s var(--ease), color 0.2s ease;
}
.faq details[open] summary::after {
  transform: rotate(45deg);
  color: var(--rust);
}
.faq__body {
  padding-bottom: 1.35rem;
  max-width: 72ch;
  color: var(--body);
  font-size: 0.9375rem;
}
.faq__body > * + * {
  margin-top: 0.85rem;
}

/* --------------------------------------------------------------------------
   15. Page headers and in-page nav
   -------------------------------------------------------------------------- */

.page-head {
  padding-top: clamp(2.5rem, 5vw, 4rem);
  padding-bottom: clamp(2rem, 4vw, 3rem);
  border-bottom: var(--border);
}
.page-head h1 {
  font-size: clamp(2.125rem, 4.4vw, 3.25rem);
  max-width: 24ch;
}
.page-head .lead {
  margin-top: 1.25rem;
}

.crumbs {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}
.crumbs a {
  color: inherit;
  text-decoration: none;
}
.crumbs a:hover {
  color: var(--ink);
}
.crumbs span {
  margin-inline: 0.4rem;
  opacity: 0.5;
}

.toc {
  position: sticky;
  top: 5.5rem;
  align-self: start;
  font-size: 0.875rem;
}
.toc__title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.85rem;
}
.toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1px;
}
.toc a {
  display: block;
  padding: 0.3rem 0.65rem;
  text-decoration: none;
  color: var(--muted);
  border-left: 2px solid var(--line);
  transition: color 0.15s ease, border-color 0.15s ease;
}
.toc a:hover,
.toc a.is-active {
  color: var(--ink);
  border-left-color: var(--rust);
}

.section-head {
  margin-bottom: clamp(1.75rem, 3.5vw, 2.5rem);
}
.section-head h2 {
  max-width: 28ch;
}
.section-head .lead {
  margin-top: 1rem;
}

/* --------------------------------------------------------------------------
   16. Pricing
   -------------------------------------------------------------------------- */

.price-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--gap);
  align-items: stretch;
}
.plan {
  border: var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  position: relative;
}
.plan--featured {
  border-color: var(--ink);
  box-shadow: var(--shadow);
}
.plan__flag {
  position: absolute;
  top: -0.7rem;
  left: 1.5rem;
  background: var(--rust);
  color: #ffffff;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  padding: 0.15rem 0.55rem;
}
.plan__name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
}
.plan__price {
  font-size: 1.875rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1;
}
.plan__price small {
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--muted);
  display: block;
  margin-top: 0.5rem;
  letter-spacing: -0.01em;
}
.plan__desc {
  font-size: 0.9375rem;
  color: var(--body);
  margin: 0;
}
.plan__features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.5rem;
  font-size: 0.9375rem;
}
.plan__features li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.55rem;
  color: var(--body);
}
.plan__features li::before {
  content: '→';
  font-family: var(--font-mono);
  color: var(--rust);
  font-size: 0.8125rem;
}
.plan__cta {
  margin-top: auto;
}

/* --------------------------------------------------------------------------
   17. Footer
   -------------------------------------------------------------------------- */

.site-footer {
  border-top: var(--border);
  padding-block: clamp(2.5rem, 5vw, 4rem) 2rem;
  font-size: 0.9375rem;
  background: var(--bg);
}
.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
  gap: 2.5rem 1.5rem;
}
.footer__title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.9rem;
}
.footer__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}
.footer__list a {
  color: var(--body);
  text-decoration: none;
}
.footer__list a:hover {
  color: var(--rust);
}
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: var(--border);
}
.socials {
  display: flex;
  gap: 0.5rem;
}
.socials a {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--body);
  transition: border-color 0.15s ease, color 0.15s ease;
}
.socials a:hover {
  border-color: var(--ink);
  color: var(--ink);
}
.socials svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

@media (max-width: 780px) {
  .footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .footer__grid > :first-child {
    grid-column: 1 / -1;
  }
}

/* --------------------------------------------------------------------------
   18. Reveal
   -------------------------------------------------------------------------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
[data-reveal].is-in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

/* --------------------------------------------------------------------------
   19. Utilities
   -------------------------------------------------------------------------- */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.75rem; }
.mt-2 { margin-top: 1.5rem; }
.mt-3 { margin-top: 2.25rem; }
.mt-4 { margin-top: 3rem; }
.mb-2 { margin-bottom: 1.5rem; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.gap-1 { gap: 0.75rem; }
.gap-2 { gap: 1.5rem; }
.justify-between { justify-content: space-between; }

@media (max-width: 780px) {
  .grid-2,
  .grid-3,
  .grid-4,
  .split,
  .split--wide-left {
    grid-template-columns: minmax(0, 1fr);
  }
  .hide-sm {
    display: none !important;
  }
}

/* --------------------------------------------------------------------------
   20. Print
   -------------------------------------------------------------------------- */

@media print {
  .site-header {
    display: none;
  }
  body {
    background: #fff;
    font-size: 11pt;
  }
  .section {
    padding-block: 1.5rem;
  }
  .card,
  .code,
  .term {
    box-shadow: none;
  }
  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
