/* ============================================================
   Hivewire — shared stylesheet (landing + interior pages)
   Desktop layout matches the original design comp; below ~980px
   sections restack, type scales fluidly.

   Every design token in the developer site lives in the :root
   below — dashboard.css consumes them and defines none of its own.
   ============================================================ */

/* Outfit is self-hosted rather than pulled from Google Fonts, so the
   developer site renders the same build of the display face as the app
   (see src/styles/fonts.css). Geist and Geist Mono are self-hosted too, so
   typography does not depend on a third-party stylesheet request. */
@font-face { font-family: 'Geist'; src: url('/fonts/Geist-Variable.woff2') format('woff2'); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Geist Mono'; src: url('/fonts/GeistMono-Variable.woff2') format('woff2'); font-weight: 400 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Outfit'; src: url('/fonts/Outfit-Medium.woff2') format('woff2');   font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Outfit'; src: url('/fonts/Outfit-SemiBold.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Outfit'; src: url('/fonts/Outfit-Bold.woff2') format('woff2');     font-weight: 700; font-style: normal; font-display: swap; }

:root {
  /* ---- ink ---------------------------------------------------- */
  --ink: #16130f;
  --body: #3f3a33;
  --muted: #57534e;
  --soft: #6b655d;
  --faint: #6f685f;
  --ghost: #756e65;

  /* ---- hairlines ---------------------------------------------- */
  --hair: #ece7df;
  --hair-soft: #f2eee7;
  --hair-dash: #e4ddd2;
  --hair-warm: #efeae2;

  /* ---- surfaces ----------------------------------------------- */
  --surface: #fff;      /* cards sit a shade brighter than the page */
  --paper: #fffdfa;
  --paper-dim: #fdfbf8;
  --paper-warm: #faf7f2;
  --paper-hl: #fffdf8;
  --canvas: #efedea;
  --chip: #f6f3ee;
  --dot: #e6ddd0;

  /* ---- accent -------------------------------------------------- */
  --accent: #E8862A;
  --accent-bg: #fdf3e6;
  --accent-ink: #9a5d19;
  --accent-hair: #f0d9bd;

  /* ---- status: every family reads ink / bg / hair --------------- */
  --ok-ink: #1a7a44;
  --ok-bg: #eaf6ee;
  --ok-hair: #cfe9d8;
  --danger-ink: #b42318;
  --danger-bg: #fdf3f2;
  --danger-hair: #f0d2ce;
  --danger-hover: #d9534f;
  --warn: #d9822b;
  --info-ink: #1a5fa8;
  --info-bg: #e9f1fa;
  --mcp-ink: #5b3aa6;
  --mcp-bg: #f1ebfb;

  /* ---- code highlighting --------------------------------------- */
  --tk-key: #b45309;
  --tk-str: #15803d;
  --tk-punc: #746d64;
  --tk-num: #7c3aed;

  /* ---- elevation ----------------------------------------------- */
  --scrim: rgba(22, 19, 15, 0.32);
  --shadow-card: 0 18px 36px -22px rgba(60, 45, 30, 0.3);
  --shadow-modal: 0 30px 60px -30px rgba(40, 30, 20, 0.5);
  --shadow-side: 0 20px 50px -20px rgba(40, 30, 20, 0.4);

  /* ---- type ---------------------------------------------------- */
  --sans: 'Geist', sans-serif;
  --display: 'Outfit', 'Geist', sans-serif;
  --mono: 'Geist Mono', monospace;

  --fs-3xs: 10px;
  --fs-2xs: 11px;
  --fs-xs: 12px;
  --fs-sm: 13px;
  --fs-md: 14px;
  --fs-base: 15px;
  --fs-lg: 16px;
  --fs-xl: 17px;
  --fs-2xl: 20px;
  --fs-3xl: 22px;
  --fs-4xl: 26px;
  --fs-5xl: 28px;
  --fs-6xl: 32px;
  --fs-hero: clamp(38px, 6.2vw, 64px);
  --fs-title: clamp(32px, 5.5vw, 42px);
  --fs-title-sm: clamp(24px, 4vw, 30px);

  --track-tight: -0.03em;    /* >= 28px */
  --track: -0.02em;          /* 18-26px */
  --track-loose: -0.01em;    /* <= 17px */
  --track-mono: 0.08em;
  --track-mono-wide: 0.1em;

  /* ---- space (4px base) ---------------------------------------- */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-7: 32px;
  --sp-8: 44px;
  --sp-9: 56px;
  --sp-10: 72px;

  /* ---- radius --------------------------------------------------- */
  --r-xs: 5px;
  --r-sm: 8px;
  --r-md: 10px;
  --r-lg: 13px;
  --r-xl: 16px;
  --r-pill: 999px;

  /* ---- layout --------------------------------------------------- */
  --pad-x: var(--sp-8);         /* marketing gutter */
  --measure: 1120px;            /* marketing content width */
  --measure-page: 780px;        /* interior prose */
  --app-measure: 1080px;        /* dashboard content */
  --app-pad-x: var(--sp-7);     /* dashboard gutter */
  --pad-x-side: var(--sp-6);    /* sidebar inset — matches the nav links */
  --chrome-h: 64px;             /* sidebar brand block; mobile app bar */
}

/* Optional advertising measurement. The banner appears only where consent is
   required (or geolocation is unavailable); the settings control remains so
   a visitor can change the choice later. */
.ads-consent {
  position: fixed; left: 20px; right: 20px; bottom: 20px; z-index: 100;
  max-width: 620px; margin: 0 auto; padding: 18px;
  background: var(--surface); border: 1px solid var(--hair);
  border-radius: var(--r-md); box-shadow: var(--shadow-modal);
}
.ads-consent p { margin: 0; color: var(--body); font-size: var(--fs-sm); line-height: 1.55; }
.ads-consent p a { color: var(--accent-ink); }
.ads-consent-actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.ads-settings {
  position: fixed; left: 14px; bottom: 14px; z-index: 90;
  padding: 6px 9px; border: 1px solid var(--hair); border-radius: var(--r-pill);
  background: var(--surface); color: var(--soft); font: 500 var(--fs-2xs)/1 var(--sans);
  box-shadow: var(--shadow-card); cursor: pointer;
}
.ads-settings:hover { color: var(--ink); border-color: var(--accent-hair); }
@media (max-width: 600px) {
  .ads-consent { left: 12px; right: 12px; bottom: 12px; }
  .ads-consent-actions { flex-direction: column; }
  .ads-consent-actions .b { justify-content: center; width: 100%; }
}

@media (max-width: 900px) {
  :root { --app-pad-x: 18px; --chrome-h: 52px; }
}

@media (max-width: 720px) {
  :root { --pad-x: 22px; }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; transition: color 0.15s ease, opacity 0.15s ease, border-color 0.15s ease; }
a:hover { color: var(--accent-ink); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

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

/* Headings are Outfit everywhere — same display voice as the app. Outfit is a
   wide geometric and reads heavier than the grotesque it replaced, so 600 is
   the default and 700 is reserved for the display tier below, where a
   geometric face needs the extra weight to hold presence. */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: var(--track);
  text-wrap: balance;
}
.hero h1, .page h1, .anatomy h2, .section-head h2, .pricing-head h2, .soon h1 {
  font-weight: 700;
  letter-spacing: var(--track-tight);
}
/* below ~18px the default tracking closes the counters up too far */
.page h3, .dcard-head h3, .faq .q { letter-spacing: var(--track-loose); }

/* One rule for all four wordmarks. 600 / -0.025em matches the app's header
   exactly (src/components/MinimalHeader.tsx), which matters because both
   marks are visible in the same session. */
.nav-brand span, .side-brand span, .footer-brand span, .soon-brand span {
  font-family: var(--display);
  font-weight: 600;
  font-size: var(--fs-3xl);
  letter-spacing: -0.025em;
}
.footer-brand span { font-size: var(--fs-md); color: var(--ink); }

/* ...and one rule for the mark beside them. The source is /logo.png, the same
   full-bleed asset the app renders (src/components/Logo.tsx) — not
   /favicon.png, which is a 64px file with its own padding baked in, so it read
   as a smaller, softer mark than the app's at the same box size.
   Height is ~1.27x the wordmark, matching the app's desktop header; width is
   auto because the artwork is 428x419, not square. The width/height attributes in
   the markup carry that aspect so the line doesn't reflow before it loads. */
.nav-brand img, .side-brand img, .footer-brand img, .soon-brand img {
  height: 28px;
  width: auto;
  object-fit: contain;
}
.footer-brand img { height: 18px; }

.shell {
  background: var(--paper);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Full-bleed bands, capped content */
.container {
  width: 100%;
  max-width: calc(var(--measure) + 2 * var(--pad-x));
  margin: 0 auto;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
}

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

/* ---------------- nav ---------------- */

.nav {
  border-bottom: 1px solid var(--hair);
  background: var(--paper);
}
.nav .container {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  padding-top: 20px; padding-bottom: 20px;
}
.nav-brand { display: flex; align-items: center; gap: 10px; }
.nav-brand:hover { color: inherit; }
.nav-links { display: flex; align-items: center; gap: 26px; font-size: var(--fs-md); color: var(--muted); }

/* ---------------- buttons ----------------
   One button for the whole site. `.b` is the dashboard's historical alias and
   resolves here too, so the marketing and app buttons cannot drift apart
   again. Outlined is the base because it's by far the common case; solid ink
   is `.primary`. */
.btn, .b {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  cursor: pointer;
  font-family: var(--sans); font-size: var(--fs-sm); font-weight: 500;
  padding: var(--sp-2) var(--sp-4);
  border: 1px solid var(--hair); border-radius: var(--r-sm);
  background: var(--surface); color: var(--ink);
  transition: border-color 0.15s ease, opacity 0.15s ease, transform 0.15s ease;
}
.btn:hover, .b:hover { border-color: var(--accent); color: var(--ink); }
.btn:active, .b:active { transform: translateY(1px); }
.btn.primary, .b.primary { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.btn.primary:hover, .b.primary:hover { opacity: 0.85; color: var(--surface); border-color: var(--ink); }
.btn.danger, .b.danger {
  color: var(--danger-ink); border-color: var(--danger-hair); background: var(--danger-bg);
}
.btn.danger:hover, .b.danger:hover { border-color: var(--danger-hover); }
.btn.sm, .b.sm { font-size: var(--fs-xs); padding: 6px 11px; }
.btn.lg, .b.lg { font-size: var(--fs-base); padding: var(--sp-3) 22px; border-radius: var(--r-md); }
.btn svg, .b svg { width: 14px; height: 14px; }
.btn:disabled, .b:disabled { cursor: default; pointer-events: none; opacity: 0.6; }
/* In-flight: dashboard.js adds .busy alongside disabled while a click's
   request runs. The ring joins the label through the button's own flex gap. */
.btn.busy::after, .b.busy::after {
  content: ""; width: 11px; height: 11px; flex: none;
  border-radius: var(--r-pill);
  border: 2px solid currentColor; border-top-color: transparent;
  animation: btn-spin 0.7s linear infinite;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .btn.busy::after, .b.busy::after { animation-duration: 1.6s; }
}

@media (max-width: 560px) {
  .nav-links { gap: var(--sp-4); font-size: var(--fs-md); }
  .nav-links .hide-sm { display: none; }
  .nav-links .btn { min-height: 44px; }
}

/* ---------------- hero ---------------- */

.hero { padding: 64px 0 56px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: start; }
.hero-inner { max-width: 820px; padding-top: 72px; }
.hero-inner:has(> .hero-stats:not([hidden])) { padding-top: 0; }
.hero-visual .diagram-grid { grid-template-columns: 1fr; row-gap: 6px; }
.hero-visual .headline-grid { grid-template-columns: 1fr; }
.hero-visual .cluster-arrow { flex-direction: row; justify-content: center; gap: 10px; padding: 8px 0; }
.hero-visual .cluster-arrow .glyph { transform: rotate(90deg); }
@media (max-width: 1160px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-inner { padding-top: 0; }
}
.hero h1 {
  margin: 0 0 22px;
  font-size: var(--fs-hero);
  line-height: 1.02;
}
.hero-line { display: block; }
.hero .lede { margin: 0 0 28px; font-size: var(--fs-xl); line-height: 1.65; color: var(--muted); max-width: 58ch; }
.hero .lede a, .section-head p a, .anti-audience a, .compare a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.hero-ctas { display: flex; gap: var(--sp-3); flex-wrap: wrap; }

@media (max-width: 720px) {
  .hero { padding-top: 44px; }
}

/* ---------------- clustering diagram ---------------- */

.diagram-wrap { padding: 0 0 64px; }
.diagram {
  border: 1px solid var(--hair); border-radius: var(--r-xl);
  background: var(--paper-dim);
  padding: 24px 28px 28px;
}
.diagram-head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 12px; flex-wrap: wrap; margin-bottom: 18px;
}
.eyebrow { font-family: var(--mono); font-size: var(--fs-2xs); letter-spacing: var(--track-mono-wide); color: var(--accent-ink); }
.timestamp { font-family: var(--mono); font-size: var(--fs-2xs); color: var(--ghost); }

.diagram-grid {
  display: grid;
  grid-template-columns: 1fr auto 400px;
  align-items: center;
}
.headline-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.headline {
  border: 1px solid var(--hair); background: var(--surface); border-radius: var(--r-sm);
  padding: 9px 13px; font-size: var(--fs-sm); color: var(--muted);
  display: flex; gap: 8px; align-items: baseline; min-width: 0;
}
/* The outlet cell holds live publisher names, which run from "AP" to "The New
   York Times". Fixed basis rather than flex:auto, so every headline in the
   stack starts on the same vertical line instead of stepping in and out with
   the name length; still ellipsised, or a long name would squeeze the headline
   out of the diagram entirely. 14em of 10px mono clears "CHANNEL NEWS ASIA"
   and "THE NEW YORK TIMES" outright. */
.headline .outlet {
  font-family: var(--mono); font-size: var(--fs-3xs); color: var(--ghost);
  flex: 0 0 14em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.headline .hl { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.headline-more {
  border: 1px dashed var(--hair-dash); background: var(--paper-dim); border-radius: var(--r-sm);
  padding: 9px 13px; font-size: var(--fs-sm); color: var(--faint); text-align: center;
}

.cluster-arrow {
  display: flex; flex-direction: column; align-items: center;
  padding: 0 26px; gap: 4px;
}
.cluster-arrow .glyph { font-family: var(--mono); font-size: var(--fs-2xl); color: var(--accent-ink); transition: transform 0.2s ease; }
.cluster-arrow .label { font-family: var(--mono); font-size: var(--fs-3xs); letter-spacing: var(--track-mono); color: var(--ghost); }

.story-card {
  border: 1px solid var(--accent-hair); background: var(--surface); border-radius: var(--r-lg);
  padding: 20px;
  box-shadow: var(--shadow-card);
}
.story-card-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 9px; }
.story-card-head .left { font-family: var(--mono); font-size: var(--fs-3xs); color: var(--accent-ink); letter-spacing: var(--track-mono); }
.story-card-head .right { font-family: var(--mono); font-size: var(--fs-3xs); color: var(--ghost); }
.story-card .headline-text {
  font-family: var(--display); font-weight: 600;
  font-size: var(--fs-xl); line-height: 1.25; letter-spacing: -0.01em; margin-bottom: 8px;
}
.story-card .summary { font-size: var(--fs-md); line-height: 1.55; color: var(--soft); margin-bottom: 12px; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
  font-family: var(--mono); font-size: var(--fs-3xs);
  background: var(--chip); color: var(--faint);
  padding: 2px 8px; border-radius: var(--r-xs);
}
.tag.hot { background: var(--accent-bg); color: var(--accent-ink); }

@media (max-width: 980px) {
  .diagram-grid { grid-template-columns: 1fr; row-gap: 6px; }
  .cluster-arrow { flex-direction: row; padding: 8px 0; justify-content: center; gap: 10px; }
  .cluster-arrow .glyph { transform: rotate(90deg); }
}
@media (max-width: 560px) {
  .headline-grid { grid-template-columns: 1fr; }
  /* the rows are the full narrow viewport here — 14em of outlet would leave
     the headline with almost nothing */
  .headline .outlet { flex-basis: 9em; }
  .diagram { padding: 18px 16px 20px; }
}

/* ---------------- anatomy ---------------- */

/* Numbered feature bands: full-bleed, hairline top border, alternating bg */
.feature { border-top: 1px solid var(--hair); padding: 72px 0; }
.feature-dim { background: var(--paper-dim); }
.feature .endpoints { margin-top: 44px; background: var(--paper); }

@media (max-width: 720px) {
  .feature { padding: 52px 0; }
}

.anatomy-grid {
  display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 48px;
  align-items: center;
}
.anatomy h2, .section-head h2 {
  margin: 0 0 14px; font-size: var(--fs-6xl); line-height: 1.1;
}
.anatomy .kicker { font-family: var(--mono); font-size: var(--fs-xs); letter-spacing: var(--track-mono-wide); color: var(--accent-ink); margin-bottom: 12px; }
.anatomy p { margin: 0 0 18px; font-size: var(--fs-base); line-height: 1.6; color: var(--soft); }
.text-link { display: inline-flex; gap: 8px; font-size: var(--fs-md); font-weight: 500; }
.text-link .arrow { color: var(--accent-ink); transition: transform 0.15s ease; }
.text-link:hover .arrow { transform: translateX(3px); }

.terminal { border: 1px solid var(--hair); border-radius: var(--r-lg); overflow: hidden; }
.terminal-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; background: var(--paper-warm);
  border-bottom: 1px solid var(--hair-warm);
}
.terminal-bar .dot { width: 10px; height: 10px; border-radius: var(--r-pill); background: var(--dot); flex: none; }
.terminal-bar .cmd { margin-left: 8px; font-family: var(--mono); font-size: var(--fs-xs); color: var(--faint); }
.terminal-bar .status {
  margin-left: auto; font-family: var(--mono); font-size: var(--fs-2xs);
  color: var(--ok-ink); background: var(--ok-bg);
  padding: 2px 8px; border-radius: var(--r-xs); white-space: nowrap;
}
.terminal-bar .status.muted { color: var(--faint); background: var(--chip); }
.terminal-body {
  padding: 18px 20px; background: var(--paper);
  font-family: var(--mono); font-size: var(--fs-sm); line-height: 1.85; color: var(--muted);
  overflow-x: auto;
}
.terminal-body .indent { padding-left: 16px; }
.tk-k { color: var(--tk-key); }  /* keys */
.tk-s { color: var(--tk-str); }  /* strings */
.tk-p { color: var(--tk-punc); }  /* punctuation */
.tk-n { color: var(--tk-num); }  /* numbers */
.tk-c { color: var(--tk-punc); font-style: italic; }  /* comment lines */
.terminal-intent { margin-top: 28px; }

@media (max-width: 980px) {
  .anatomy-grid { grid-template-columns: 1fr; gap: 28px; }
}

/* ---------------- feature sections (channels, mcp) ---------------- */

.section-head { max-width: 680px; margin-bottom: 26px; }
.section-head-wide { max-width: 780px; }
.section-head .kicker { font-family: var(--mono); font-size: var(--fs-xs); letter-spacing: var(--track-mono-wide); color: var(--accent-ink); margin-bottom: 12px; }
/* .section-head h2 shares the .anatomy h2 rule above */
.section-head p { margin: 0; font-size: var(--fs-base); line-height: 1.6; color: var(--soft); }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.step {
  border: 1px solid var(--hair); border-radius: var(--r-lg); background: var(--paper-dim);
  padding: 20px 22px;
  transition: border-color 0.15s ease;
}
.step:hover { border-color: var(--accent-hair); }
.step .num { font-family: var(--mono); font-size: var(--fs-2xs); letter-spacing: var(--track-mono); color: var(--accent-ink); margin-bottom: 10px; }
.step .call { display: block; font-family: var(--mono); font-size: var(--fs-sm); color: var(--ink); margin-bottom: 8px; overflow-wrap: anywhere; }
.step p { margin: 0; font-size: var(--fs-md); line-height: 1.6; color: var(--soft); }
.step p code { font-family: var(--mono); font-size: var(--fs-sm); }
.use-cases .step { background: var(--surface); }

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

/* ---------------- mcp ---------------- */

.mcp-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 28px; align-items: start; }
.tools-label { font-family: var(--mono); font-size: var(--fs-2xs); letter-spacing: var(--track-mono); color: var(--faint); margin-bottom: 12px; }
.tools { display: flex; flex-wrap: wrap; gap: 8px; }
.tool {
  font-family: var(--mono); font-size: var(--fs-xs);
  border: 1px solid var(--hair); background: var(--paper-dim);
  color: var(--muted);
  padding: 6px 12px; border-radius: var(--r-sm);
  transition: border-color 0.15s ease, color 0.15s ease;
}
.tool:hover { border-color: var(--accent-hair); color: var(--ink); }
.tool.chan { border-color: var(--accent-hair); background: var(--accent-bg); color: var(--accent-ink); }

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

/* ---------------- endpoints ---------------- */

.endpoints { border: 1px solid var(--hair); border-radius: var(--r-lg); overflow: hidden; }
.endpoint {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 20px; border-bottom: 1px solid var(--hair-soft);
}
.endpoint:last-child { border-bottom: none; }
.endpoint .path { font-family: var(--mono); font-size: var(--fs-md); }
.endpoint .desc { margin-left: auto; font-size: var(--fs-md); color: var(--faint); text-align: right; }
.verb {
  font-family: var(--mono); font-size: var(--fs-2xs); font-weight: 500;
  color: var(--accent-ink); background: var(--accent-bg);
  padding: 3px 9px; border-radius: var(--r-xs);
  min-width: 44px; text-align: center; flex: none;
}
.verb.mcp { color: var(--mcp-ink); background: var(--mcp-bg); }
.verb.post { color: var(--info-ink); background: var(--info-bg); }

@media (max-width: 640px) {
  .endpoint { flex-wrap: wrap; row-gap: 4px; }
  .endpoint .desc { margin-left: 58px; flex-basis: 100%; text-align: left; font-size: var(--fs-sm); }
}

/* ---------------- who it's for ---------------- */

.anti-audience {
  margin: 26px 0 0; font-family: var(--mono); font-size: var(--fs-xs); line-height: 1.7;
  color: var(--faint); max-width: 64ch;
}

/* ---------------- pricing ---------------- */

.pricing-note { margin: 0 0 28px; max-width: 86ch; }

.pricing-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 20px;
}
.pricing-head h2 { margin: 0; font-size: var(--fs-title-sm); }
.pricing-head .note { font-family: var(--mono); font-size: var(--fs-xs); color: var(--ghost); }

.plans { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; align-items: stretch; }
/* Two-plan lineup (Free + Developer): two columns, capped so the cards
   don't sprawl across a wide page. */
.plans.two { grid-template-columns: 1fr 1fr; max-width: 720px; }
.plan {
  border: 1px solid var(--hair); border-radius: var(--r-lg);
  padding: 26px 24px;
  display: flex; flex-direction: column; gap: 12px;
  transition: border-color 0.15s ease;
}
.plan:hover { border-color: var(--hair-dash); }
.plan.featured { border-color: var(--accent-hair); background: var(--paper); }
.plan.featured:hover { border-color: var(--accent); }
.plan-head { display: flex; justify-content: space-between; align-items: baseline; }
.plan-name { font-family: var(--display); font-weight: 600; font-size: var(--fs-xl); }
.plan-price { font-family: var(--display); font-weight: 700; font-size: var(--fs-5xl); letter-spacing: -0.02em; }
.plan-price small { font-size: var(--fs-sm); font-weight: 400; color: var(--faint); }
.plan .blurb { margin: 0; font-size: var(--fs-sm); color: var(--faint); }
.plan-features { display: flex; flex-direction: column; gap: 9px; font-size: var(--fs-md); color: var(--body); }
/* Layout modifier only — composed onto .btn in the markup. */
.plan-cta { margin-top: auto; width: 100%; }

@media (max-width: 840px) {
  .plans, .plans.two { grid-template-columns: 1fr; }
}

/* ---------------- footer ---------------- */

.footer {
  border-top: 1px solid var(--hair);
  background: var(--paper-dim);
  font-size: var(--fs-sm); color: var(--faint);
  margin-top: auto;
}
.footer .container {
  display: flex; justify-content: space-between; align-items: center;
  gap: 14px; flex-wrap: wrap;
  padding-top: 26px; padding-bottom: 26px;
}
.footer-brand { display: flex; align-items: center; gap: 8px; }
/* .footer-brand span is covered by the shared wordmark rule near the top */
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }

/* ============================================================
   Interior pages (docs, pricing, changelog, status, contact)
   ============================================================ */

.page { flex: 1; width: 100%; max-width: calc(var(--measure-page) + 2 * var(--pad-x)); margin: 0 auto; padding: var(--sp-9) var(--pad-x) var(--sp-10); }
.page .eyebrow { font-size: var(--fs-xs); margin-bottom: 12px; display: block; }
.page h1 { margin: 0 0 var(--sp-4); font-size: var(--fs-title); line-height: 1.05; }
.page p.lede { margin: 0 0 28px; font-size: var(--fs-lg); line-height: 1.65; color: var(--muted); }
.page h2 { margin: 36px 0 10px; font-size: var(--fs-3xl); }
.page h3 { margin: 26px 0 6px; font-size: var(--fs-lg); }
.page p { font-size: var(--fs-base); line-height: 1.65; color: var(--body); }

.placeholder {
  border: 1px dashed var(--hair-dash); background: var(--paper-dim); border-radius: var(--r-lg);
  padding: 22px 24px; font-size: var(--fs-md); color: var(--faint); margin: 24px 0;
}
.placeholder code { font-family: var(--mono); font-size: var(--fs-sm); color: var(--accent-ink); }
.placeholder a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }

/* Legal-page summaries use one bordered surface instead of a paragraph full
   of inline separators. The 2x2 grid is easy to scan at prose width and
   becomes a single reading column on small screens. */
.legal-summary {
  margin: 28px 0 36px;
  border: 1px solid var(--hair);
  border-radius: var(--r-lg);
  background: var(--surface);
  overflow: hidden;
}
.legal-summary-label {
  padding: 12px var(--sp-5);
  border-bottom: 1px solid var(--hair);
  background: var(--paper-dim);
  font-family: var(--mono);
  font-size: var(--fs-2xs);
  letter-spacing: var(--track-mono);
  color: var(--faint);
}
.legal-summary ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}
.legal-summary li {
  min-width: 0;
  padding: 18px var(--sp-5) 20px;
  color: var(--soft);
  font-size: var(--fs-md);
  line-height: 1.55;
}
.legal-summary li:nth-child(even) { border-left: 1px solid var(--hair); }
.legal-summary li:nth-child(n + 3) { border-top: 1px solid var(--hair); }
.legal-summary strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-family: var(--display);
  font-size: var(--fs-base);
  font-weight: 600;
  letter-spacing: var(--track-loose);
}
@media (max-width: 560px) {
  .legal-summary ul { grid-template-columns: 1fr; }
  .legal-summary li:nth-child(even) { border-left: 0; }
  .legal-summary li:nth-child(n + 2) { border-top: 1px solid var(--hair); }
}

/* One box. `.dcard` and `.stat` are the dashboard's names for the same thing.
   The hover border stays on `.card` alone — dashboard cards aren't clickable,
   and a border that lights up on a static tile promises an affordance that
   isn't there. */
.card, .dcard, .stat {
  border: 1px solid var(--hair); border-radius: var(--r-lg); background: var(--surface);
  padding: var(--sp-5) var(--sp-6);
}
.card { margin: var(--sp-4) 0; transition: border-color 0.15s ease; }
.card:hover { border-color: var(--hair-dash); }
.card .mono-label {
  font-family: var(--mono); font-size: var(--fs-2xs); letter-spacing: var(--track-mono);
  color: var(--faint); margin-bottom: 6px;
}
.card code, .page code {
  font-family: var(--mono); font-size: var(--fs-sm);
}

.pill {
  display: inline-block; font-family: var(--mono); font-size: var(--fs-2xs);
  font-weight: 500; color: var(--accent-ink); background: var(--accent-bg);
  padding: 3px 9px; border-radius: var(--r-xs);
}
.pill.ok { color: var(--ok-ink); background: var(--ok-bg); }
.pill.mcp { color: var(--mcp-ink); background: var(--mcp-bg); }
/* status-page states: degraded/unknown (warn) and outage (err) */
.pill.warn { color: #7a5a00; background: #fdf3d7; }
.pill.err { color: #8c1d18; background: #fbe3e1; }

pre.code {
  border: 1px solid var(--hair); border-radius: var(--r-lg); background: var(--paper-dim);
  padding: 16px 18px; overflow-x: auto;
  font-family: var(--mono); font-size: var(--fs-sm); line-height: 1.8; color: var(--muted);
}
pre.code .cm { color: var(--ghost); }

/* wide interior pages (pricing) */
.page.page-wide { max-width: calc(1120px + 2 * var(--pad-x)); }

/* on-this-page anchor nav (docs) — reuses .tools chip look via .toc */
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 4px; }
.toc a {
  font-family: var(--mono); font-size: var(--fs-xs);
  border: 1px solid var(--hair); background: var(--paper-dim); color: var(--muted);
  padding: 6px 12px; border-radius: var(--r-sm);
  transition: border-color 0.15s ease, color 0.15s ease;
}
.toc a:hover { border-color: var(--accent-hair); color: var(--ink); }
.docs-switch {
  display: inline-flex; gap: 4px; margin: 0 0 8px; padding: 4px;
  border: 1px solid var(--hair); border-radius: var(--r-md); background: var(--paper-dim);
}
.docs-switch a {
  padding: 7px 16px; border-radius: var(--r-sm);
  font-family: var(--mono); font-size: var(--fs-sm); color: var(--muted);
}
.docs-switch a:hover { color: var(--ink); }
.docs-switch a.active { color: var(--accent-ink); background: var(--surface); box-shadow: 0 1px 2px rgba(30, 25, 20, 0.08); }
.page h2 { scroll-margin-top: 24px; }

/* comparison / data tables */
.table-scroll, .table-wrap { overflow-x: auto; }
.table-scroll {
  border: 1px solid var(--hair); border-radius: var(--r-lg);
  background: var(--surface); margin: var(--sp-4) 0;
}

/* Shared table base — `.compare` is marketing, `.dtable` is the dashboard.
   Each keeps only the behaviour that is genuinely its own, below. */
.compare, .dtable { width: 100%; border-collapse: collapse; font-size: var(--fs-md); }
.compare th, .compare td, .dtable th, .dtable td {
  padding: var(--sp-3) var(--sp-4); text-align: left;
  border-bottom: 1px solid var(--hair-soft);
}
.compare thead th, .dtable thead th {
  font-family: var(--mono); font-size: var(--fs-2xs); font-weight: 500;
  letter-spacing: var(--track-mono); color: var(--faint);
}
.compare code, .dtable .mono, .dtable .num { font-family: var(--mono); font-size: var(--fs-sm); }

.compare th, .compare td { white-space: nowrap; }
.compare tbody th { color: var(--body); font-weight: 400; }
.compare tr:last-child > * { border-bottom: none; }
.compare thead th { background: var(--paper-warm); }
.compare td:first-child { color: var(--body); }
.compare:not(.left) th:not(:first-child), .compare:not(.left) td:not(:first-child) { text-align: center; }
.compare .yes { color: var(--ok-ink); }
.compare .no { color: var(--ghost); }
.compare .hl { background: var(--paper-hl); }
.compare.left td, .compare.left th { white-space: normal; }

/* Pricing reference and FAQ disclosures keep the initial page focused on
   choosing a plan while leaving the detailed buying information one tap away. */
.pricing-details {
  display: flex; flex-direction: column; gap: 10px;
  margin: 32px 0 0;
}
.pricing-disclosure, .faq-item {
  border: 1px solid var(--hair); border-radius: var(--r-lg); background: var(--surface);
}
.pricing-disclosure summary, .faq-item summary {
  position: relative; cursor: pointer; list-style: none; color: var(--ink);
}
.pricing-disclosure summary:hover, .faq-item summary:hover { background: var(--paper-warm); }
.pricing-disclosure summary:focus-visible, .faq-item summary:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-lg);
}
.pricing-disclosure summary::-webkit-details-marker, .faq-item summary::-webkit-details-marker { display: none; }
.pricing-disclosure summary::after, .faq-item summary::after {
  content: "+"; position: absolute; color: var(--accent-ink); font-family: var(--mono); font-weight: 400;
}
.pricing-disclosure[open] > summary::after, .faq-item[open] > summary::after { content: "−"; }
.pricing-disclosure > summary {
  min-height: 70px; padding: 16px 54px 16px 20px;
  display: flex; flex-direction: column; justify-content: center; gap: 3px;
}
.pricing-disclosure > summary::after { right: 22px; top: 22px; font-size: var(--fs-xl); }
.pricing-disclosure > summary span { font-family: var(--display); font-size: var(--fs-lg); font-weight: 600; }
.pricing-disclosure > summary small { font-size: var(--fs-sm); color: var(--faint); }
.pricing-disclosure[open] > summary { border-bottom: 1px solid var(--hair-soft); }
.disclosure-body { padding: 4px 20px 20px; }
.disclosure-body > p:first-child { margin-top: 14px; }
.disclosure-body > :last-child { margin-bottom: 0; }
.faq-heading { margin-top: 34px !important; }
.faq { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: var(--sp-3); }
.faq-item > summary {
  min-height: 52px; padding: 14px 42px 14px 16px;
  display: flex; align-items: center;
  font-family: var(--display); font-size: var(--fs-base); font-weight: 600;
}
.faq-item > summary::after { right: 16px; top: 14px; font-size: var(--fs-lg); }
.faq-item p { margin: 0; padding: 0 16px 16px; font-size: var(--fs-md); line-height: 1.6; color: var(--soft); }

@media (max-width: 840px) {
  .faq { grid-template-columns: 1fr; }
  .pricing-disclosure > summary small { max-width: 32ch; }
}

/* ---------------- homepage live pulse (hydrated by demo.js) ----------------
   The `hidden` attribute must beat any display rule below — same trap the
   dashboard hit with .callout: author display rules silently defeat the
   UA's [hidden]. Both pulse blocks ship hidden and are revealed by JS. */
[hidden] { display: none !important; }

.hero-stats { margin-top: 28px; }
.hero-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(105px, 1fr));
  gap: 18px;
}
.hstat b {
  display: block; font-family: var(--display); font-weight: 700;
  font-size: var(--fs-2xl); letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.hstat span {
  display: block;
  font-family: var(--mono); font-size: var(--fs-3xs); letter-spacing: 0.08em;
  color: var(--faint); text-transform: uppercase;
}
.hero-stats-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 14px;
  font-family: var(--mono);
  font-size: var(--fs-2xs);
  color: var(--faint);
}
.hero-stats-meta b { color: var(--ink); font-weight: 600; }

.live-feed {
  display: flex; flex-direction: column;
  border: 1px solid var(--hair); border-radius: var(--r-lg);
  background: var(--surface); overflow: hidden;
}
.live-row {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 14px 18px; border-bottom: 1px solid var(--hair);
}
.live-row:last-child { border-bottom: none; }
.live-main { flex: 1; min-width: 0; }
.live-headline { display: block; font-weight: 600; font-size: var(--fs-md); color: var(--ink); }
.live-summary {
  display: -webkit-box;
  margin-top: 3px;
  font-size: var(--fs-sm);
  line-height: 1.55;
  color: var(--soft);
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.live-meta {
  flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 3px;
  font-family: var(--mono); font-size: var(--fs-2xs); color: var(--faint); white-space: nowrap;
}
@media (max-width: 720px) {
  .hero-stats-grid { gap: 16px 12px; }
  .hero-stats-meta { display: grid; gap: 6px; }
  .live-row { flex-wrap: wrap; }
  .live-meta { width: 100%; flex-direction: row; align-items: baseline; gap: 12px; }
}
