/* ==========================================================================
   Sys-Buddy marketing site — shared styles
   Tokens and layout per design handoff (design_handoff_sys_buddy_marketing).
   ========================================================================== */

/* --- Reset ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }
img, svg { max-width: 100%; }
::selection { background: #E0693F; color: #fff; }

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

/* --- Tokens --------------------------------------------------------------- */
:root {
  --accent: #E0693F;
  --accent-hover: #ef7d54;
  --accent-soft: rgba(224, 105, 63, 0.14);
  --backend: #5468C9;
  --frontend: #C0568C;
  --teal: #3F9E8C;
  --green: #33A852;
  --amber: #E0A22B;
  --red: #DE5B4A;

  --font-sans: 'Geist', system-ui, -apple-system, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --gutter: 24px;
  --maxw: 1160px;
  --maxw-learn: 940px;
  --section-y: clamp(56px, 9vw, 112px);
}

[data-theme="dark"] {
  --bg: #161514;
  --bg-2: #1d1b19;
  --bg-3: #26231f;
  --bg-inset: #100f0e;
  --text: #f5f1ec;
  --text-2: #b0a99e;
  --text-3: #857d72;
  --border: rgba(255, 255, 255, 0.10);
  --border-2: rgba(255, 255, 255, 0.18);
  --shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.6);
  --grid: rgba(255, 255, 255, 0.035);
}

[data-theme="light"] {
  --bg: #f7f2ea;
  --bg-2: #ffffff;
  --bg-3: #f0e9de;
  --bg-inset: #ece4d6;
  --text: #1c1917;
  --text-2: #6b6358;
  /* Handoff lists #989082; darkened to clear 4.5:1 on --bg per the a11y brief. */
  --text-3: #7d7568;
  --border: rgba(28, 25, 23, 0.10);
  --border-2: rgba(28, 25, 23, 0.16);
  --shadow: 0 24px 60px -24px rgba(80, 60, 40, 0.28);
  --grid: rgba(28, 25, 23, 0.04);
}

/* --- Base ----------------------------------------------------------------- */
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  /* On iOS Safari 100vh is the *largest* viewport — measured with the address
     bar collapsed — so it overshoots while the bar is showing and pushes
     content under it. svh is the smallest (bar visible), which is the one that
     always fits; dvh would fit too but reflows on every toolbar transition.
     The 100vh line stays as the fallback for browsers without svh. */
  min-height: 100vh;
  min-height: 100svh;
  overflow-x: hidden;
  transition: background .3s ease, color .3s ease;
  position: relative;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

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

h1, h2, h3 {
  font-weight: 700;
  letter-spacing: -0.02em;
  text-wrap: balance;
  margin: 0;
}

p { text-wrap: pretty; }

code, pre { font-family: var(--font-mono); }

/* Commands and terminal output are up to 2.3x the viewport at 375. Scrolling
   inside a block is poorly discoverable on touch, and these are meant to be
   read and copied exactly — so they wrap on mobile and go back to strict
   `pre` at 768 where they fit. `anywhere` because long URLs have no break
   opportunities the normal algorithm will use. */
.steplist pre,
.contract pre,
.walk pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

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

/* --- Keyframes ------------------------------------------------------------ */
@keyframes sb-pulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--accent-soft); }
  50%      { box-shadow: 0 0 0 8px transparent; }
}
@keyframes sb-connector {
  0%, 100% { opacity: .5; }
  50%      { opacity: 1; }
}
@keyframes sb-cursor {
  0%, 100% { opacity: 1; }
  50%      { opacity: .35; }
}

/* --- Ambient grid --------------------------------------------------------- */
.grid-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 30%, transparent 75%);
          mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 30%, transparent 75%);
}

/* --- Layout --------------------------------------------------------------- */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--gutter);
}
.wrap--learn { max-width: var(--maxw-learn); }

.section { position: relative; z-index: 1; }
.section--pad { padding-block: var(--section-y); }
.section--alt {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
}

/* --- Header / nav --------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--border);
}
.site-nav {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px var(--gutter);
  display: flex;
  align-items: center;
  gap: 16px;
}
.site-nav--learn { max-width: var(--maxw-learn); }
.site-nav .spacer { flex: 1; }

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.01em;
  white-space: nowrap; /* was wrapping to two lines at 375, inflating the header */
  flex-shrink: 0;
}
.brand:hover { color: var(--text); }

/* Two peers linked by the broker. */
.mark {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.mark i {
  display: block;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--accent);
}
.mark i + i {
  width: 14px; height: 2px;
  border-radius: 2px;
  background: var(--text-3);
}
.mark i + i + i {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--backend);
}
.mark--sm i { width: 8px; height: 8px; }
.mark--sm i + i { width: 12px; height: 2px; }
.mark--sm i + i + i { width: 8px; height: 8px; }

/* Mobile: a dropdown panel under the sticky header, opened by .nav-toggle.
   At 768+ this collapses back into the inline bar (see the min-width block). */
.nav-links {
  display: none;
  gap: 26px;
  font-size: 14.5px;
}
.nav-links.is-open {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  padding: 8px var(--gutter) 14px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.nav-links.is-open a {
  display: flex;
  align-items: center;
  min-height: 48px;
  font-size: 16px;
  border-bottom: 1px solid var(--border);
}
.nav-links.is-open a:last-child { border-bottom: none; }
.nav-links.is-open .nav-links__cta { color: var(--accent); font-weight: 600; }
.nav-links a { color: var(--text-2); }
.nav-links a:hover { color: var(--accent-hover); }
/* The panel duplicates the header CTA; only show it in the panel. */
.nav-links__cta { display: none; }

.nav-toggle {
  width: 44px; height: 44px;
  flex-shrink: 0;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.nav-toggle__bars { display: flex; flex-direction: column; gap: 3px; }
.nav-toggle__bars i {
  display: block;
  width: 16px; height: 2px;
  border-radius: 2px;
  background: var(--text);
}
.nav-toggle[aria-expanded="true"] { border-color: var(--accent); }

/* Header space at 375 is tight once the menu button is in; this CTA repeats in
   the hero, the get-started block and the footer, so it moves into the panel. */
/* Scoped past .btn, which sets display:inline-flex later in the file. */
.site-nav .nav-cta { display: none; }

.theme-toggle {
  width: 44px; height: 44px;
  flex-shrink: 0;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

/* --- Buttons / chips ------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 12px;
  font-family: inherit;
  font-weight: 600;
  font-size: 15.5px;
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn--accent {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 24px -8px var(--accent);
}
.btn--accent:hover { color: #fff; background: var(--accent-hover); }
.btn--solid {
  padding: 9px 16px;
  border-radius: 10px;
  background: var(--text);
  color: var(--bg);
  font-size: 14px;
}
.btn--solid:hover { color: var(--bg); opacity: .88; }
.btn--lg { padding: 14px 24px; font-size: 16px; box-shadow: 0 10px 30px -10px var(--accent); }

.code-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-inset);
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-2);
}
.code-chip .prompt { color: var(--accent); }

.kicker {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}
.kicker--muted { color: var(--text-3); }
.kicker--sm { font-size: 11px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-2);
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-2);
}
.dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 25%, transparent);
  flex-shrink: 0;
}

/* Wide content must scroll inside itself, never the page. */
.scroll-x { overflow-x: auto; }

/* ==========================================================================
   Landing page
   ========================================================================== */

/* --- Hero ----------------------------------------------------------------- */
.hero {
  display: grid;
  gap: clamp(40px, 5vw, 64px);
  grid-template-columns: 1fr;
  padding-block: clamp(48px, 8vw, 96px) clamp(40px, 6vw, 72px);
}
.hero__copy { max-width: 720px; }
.hero h1 {
  font-size: clamp(38px, 6.2vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 0 0 22px;
}
.hero h1 .em { color: var(--accent); }
.hero__sub {
  font-size: clamp(17px, 2.2vw, 20px);
  line-height: 1.55;
  color: var(--text-2);
  max-width: 560px;
  margin: 0 0 32px;
}
.hero__sub strong { color: var(--text); font-weight: 600; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* Animated stepper card */
.window {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
  box-shadow: var(--shadow);
  overflow: hidden;
}
.window__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-3);
}
.window__bar i { width: 10px; height: 10px; border-radius: 50%; display: block; }
.window__bar .r { background: var(--red); }
.window__bar .a { background: var(--amber); }
.window__bar .g { background: var(--green); }
.window__bar span { margin-left: 8px; }
.window__body { padding: clamp(24px, 4vw, 40px); position: relative; }
.window__body canvas {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 4;
}

.stepper { display: flex; flex-direction: column; }
.step { display: flex; align-items: center; gap: 16px; }
.step__rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  align-self: stretch;
}
.step__dot {
  flex-shrink: 0;
  width: 30px; height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-3);
  background: transparent;
  border: 2px solid var(--border-2);
  transition: all .4s ease;
}
.step__line {
  width: 2px;
  flex: 1;
  min-height: 14px;
  background: var(--border);
  transition: background .4s ease;
}
.step:last-child .step__line { display: none; }
.step__text { padding: 10px 0 18px; flex: 1; }
.step__label {
  font-family: var(--font-mono);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-3);
  transition: color .4s ease;
}
.step__detail { font-size: 13px; color: var(--text-3); margin-top: 2px; }
.step__badge {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 6px;
  color: var(--text-3);
  transition: all .3s ease;
}

/* reached */
.step.is-reached .step__dot { color: #fff; background: var(--accent); border-color: var(--accent); }
.step.is-reached .step__label { color: var(--text); }
.step.is-done .step__line { background: var(--accent); }
.step.is-current .step__dot { animation: sb-pulse 1.4s ease-out infinite; }
.step.is-current .step__badge { color: var(--accent); background: var(--accent-soft); padding: 4px 8px; }
.step.is-done .step__badge { padding: 4px 8px; }
.step.is-verified.is-reached .step__dot { background: var(--green); border-color: var(--green); }
.step.is-verified.is-reached .step__badge {
  color: var(--green);
  background: color-mix(in srgb, var(--green) 15%, transparent);
  padding: 4px 8px;
}

/* --- Problem -------------------------------------------------------------- */
.two-col { display: grid; gap: 48px; grid-template-columns: 1fr; }
.lede { font-size: 17px; line-height: 1.6; color: var(--text-2); max-width: 520px; margin: 0; }
.h2 {
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.1;
  margin: 0 0 18px;
}
.h2--lg { font-size: clamp(30px, 4.5vw, 46px); line-height: 1.08; }

.chat-mock {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg);
  padding: 18px 20px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--text-2);
}
.chat-mock .fe { color: var(--frontend); }
.chat-mock .be { color: var(--backend); }
.chat-mock .sep { color: var(--text-3); }
.chat-mock .hl { color: var(--text); }
.chat-mock .fail { color: var(--red); }

/* --- How it works --------------------------------------------------------- */
/* Centered per the design at desktop, but long body copy centered on a narrow
   screen is ragged on both edges with no left anchor per line — so this block
   goes left on mobile, matching .dash-head / .trust-head. Re-centered at 768. */
.center-head { text-align: left; max-width: 720px; margin: 0 auto 24px; }
.center-head p { font-size: 17px; line-height: 1.6; color: var(--text-2); margin: 18px 0 0; }
.center-head strong { color: var(--text); font-weight: 600; }

.chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 44px;
  font-family: var(--font-mono);
  font-size: 12.5px;
}
.chips span {
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--text-2);
}

.track-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
  align-items: stretch;
}
.track {
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: 18px;
  background: var(--bg-2);
  padding: 28px;
}
.track--buddy { border-top-color: var(--backend); }
.track__head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.track__head i {
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.track--buddy .track__head i {
  background: var(--backend);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--backend) 22%, transparent);
}
.track__head span {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  font-weight: 600;
}
.track--buddy .track__head span { color: var(--backend); }
.track__intro { font-size: 14px; color: var(--text-3); margin: 0 0 22px; }
.track__intro strong { color: var(--text-2); font-weight: 600; }

.steplist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.steplist li { display: flex; gap: 14px; align-items: flex-start; }
.steplist__num {
  flex-shrink: 0;
  width: 26px; height: 26px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.steplist__tag {
  flex-shrink: 0;
  padding: 4px 9px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--backend) 15%, transparent);
  color: var(--backend);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.steplist__title {
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 3px;
}
.steplist__body { font-size: 14px; line-height: 1.55; color: var(--text-2); }
.steplist__body code { color: var(--text); }

.handoff {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 8px;
  text-align: center;
}
.handoff__arrow { font-size: 22px; color: var(--text-3); line-height: 1; }
.handoff__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border: 1px dashed var(--accent);
  border-radius: 10px;
  background: var(--accent-soft);
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--accent);
  font-weight: 600;
}
.handoff__note { font-size: 12px; color: var(--text-3); margin-top: 8px; max-width: 150px; }

.callout-inset {
  margin-top: 20px;
  border: 1px solid var(--border-2);
  border-radius: 16px;
  background: var(--bg-inset);
  padding: 24px;
  display: grid;
  gap: 18px;
}
.callout-inset__row { display: flex; gap: 14px; align-items: flex-start; }
.callout-inset__row p { font-size: 14px; line-height: 1.6; color: var(--text-2); margin: 0; }
.callout-inset__row strong { color: var(--text); font-weight: 600; }
.callout-inset__row code { color: var(--text); }
.tagbox {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 7px;
  color: var(--accent);
  background: var(--accent-soft);
}
.tagbox--backend {
  color: var(--backend);
  background: color-mix(in srgb, var(--backend) 15%, transparent);
}

/* --- Deep dives (details) ------------------------------------------------- */
.deepdive {
  margin-top: 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg-2);
  overflow: hidden;
}
.deepdive + .deepdive { margin-top: 16px; }
.deepdive > summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 15.5px;
  letter-spacing: -0.01em;
}
.deepdive > summary::-webkit-details-marker { display: none; }
.deepdive__icon {
  width: 34px; height: 34px;
  flex-shrink: 0;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  background: color-mix(in srgb, var(--teal) 16%, transparent);
}
.deepdive__icon--mag { background: color-mix(in srgb, var(--frontend) 16%, transparent); }
.deepdive__chev {
  margin-left: auto;
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 13px;
  transition: transform .2s ease;
}
.deepdive[open] .deepdive__chev { transform: rotate(90deg); }
.deepdive__body { padding: 0 24px 26px; border-top: 1px solid var(--border); }
.deepdive__body > p:first-child {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-2);
  margin: 20px 0 24px;
}
.deepdive__body strong { color: var(--text); font-weight: 600; }
.deepdive__body code { color: var(--text); }
.muted { color: var(--text-3); }

.steplist--teal .steplist__num {
  background: color-mix(in srgb, var(--teal) 15%, transparent);
  color: var(--teal);
}
.steplist--mag .steplist__num {
  background: color-mix(in srgb, var(--frontend) 15%, transparent);
  color: var(--frontend);
}
.steplist--dive { gap: 20px; }
.steplist--dive li > div { min-width: 0; flex: 1; }
.steplist pre {
  margin: 10px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-inset);
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text-2);
  overflow-x: auto;
}

/* Flow diagrams */
.diagram {
  margin: 4px 0 30px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg-inset);
  padding: clamp(18px, 3vw, 26px);
}
.diagram__label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
  margin-bottom: 18px;
}
.flow { display: flex; flex-direction: column; gap: 12px; align-items: stretch; }
.flow__node {
  flex: 1;
  min-width: 150px;
  border: 1px solid var(--border);
  border-top: 3px solid var(--backend);
  border-radius: 14px;
  background: var(--bg);
  padding: 16px;
}
.flow__node--host { border-top-color: var(--accent); }
.flow__node--cloud {
  flex: 1.2;
  min-width: 160px;
  border: 1px dashed var(--teal);
  background: color-mix(in srgb, var(--teal) 7%, var(--bg));
  text-align: center;
}
.flow__emoji { font-size: 26px; line-height: 1; }
.flow__name { font-weight: 600; font-size: 14px; margin-top: 8px; }
.flow__name .you { font-weight: 400; color: var(--accent); }
.flow__sub { font-size: 12px; color: var(--text-3); margin-bottom: 12px; }
.flow__tags { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.tag {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 7px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  color: var(--text-2);
}
.tag--backend {
  background: color-mix(in srgb, var(--backend) 14%, transparent);
  color: var(--backend);
  border-color: transparent;
}
.tag--accent { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.flow__arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 2px;
  text-align: center;
}
.flow__arrow .glyph { font-size: 20px; color: var(--text-3); transform: rotate(90deg); }
.flow__arrow .glyph--teal { color: var(--teal); }
.flow__arrow .glyph--mag { color: var(--frontend); }
.flow__arrow small { font-family: var(--font-mono); font-size: 10px; color: var(--text-3); }
.flow__arrow small.teal { color: var(--teal); }
.flow__arrow small.mag { color: var(--frontend); }

.tailnet {
  position: relative;
  border: 2px dashed var(--frontend);
  border-radius: 16px;
  padding: clamp(22px, 3.5vw, 28px) clamp(16px, 3vw, 22px) clamp(16px, 3vw, 22px);
  background: color-mix(in srgb, var(--frontend) 6%, var(--bg));
}
.tailnet__label {
  position: absolute;
  top: -11px;
  left: 16px;
  background: var(--bg-inset);
  padding: 0 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--frontend);
  font-weight: 600;
}
.diagram__foot {
  text-align: center;
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-3);
}
.diagram__foot s { text-decoration: line-through; }

.pathbox {
  margin-top: 24px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-inset);
  padding: 18px 20px;
}
.pathbox__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12.5px;
}
.pathbox__row .hop {
  padding: 6px 11px;
  border-radius: 8px;
  font-weight: 600;
}
.hop--backend { background: color-mix(in srgb, var(--backend) 15%, transparent); color: var(--backend); }
.hop--teal { background: color-mix(in srgb, var(--teal) 15%, transparent); color: var(--teal); }
.hop--plain { background: var(--bg-2); border: 1px solid var(--border); color: var(--text-2); }
.hop--accent { background: var(--accent-soft); color: var(--accent); }
.hop--note {
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-3);
}
.arrow-teal { color: var(--teal); }
.arrow-mag { color: var(--frontend); }
.arrow-mute { color: var(--text-3); }
.pathbox p { font-size: 13px; line-height: 1.6; color: var(--text-3); margin: 14px 0 0; }
.pathbox p + p { color: var(--text-2); margin-top: 12px; }
.pathbox strong { color: var(--text-2); font-weight: 600; }

.then {
  margin-top: 40px;
  max-width: 760px;
}
.then h3 {
  font-size: clamp(21px, 3vw, 26px);
  margin: 0 0 12px;
}
.then p { font-size: 16px; line-height: 1.65; color: var(--text-2); margin: 0 0 18px; }
.then strong { color: var(--text); font-weight: 600; }

.machine {
  margin-top: 8px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-inset);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-2);
}
.machine .lbl { color: var(--text-3); }
.machine .end { color: var(--text-3); margin-left: auto; }
.machine .st { font-weight: 600; }
.st--proposed { color: var(--amber); }
.st--signed   { color: var(--backend); }
.st--locked   { color: var(--accent); }
.st--ready    { color: var(--teal); }
.st--verified { color: var(--green); }
.machine .sep { color: var(--text-3); }

/* --- Dashboard showcase --------------------------------------------------- */
.dash-head { max-width: 640px; margin: 0 0 48px; }
.dash-head p { font-size: 17px; line-height: 1.6; color: var(--text-2); margin: 0; }

.dash {
  border: 1px solid var(--border-2);
  border-radius: 20px;
  background: var(--bg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.dash__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.dash__title { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.status-pill {
  /* No auto margin on mobile: the title wraps to two lines and the pill drops
     to its own row, where margin-left:auto strands it right of everything.
     Restored at 768 where it shares the title's row. */
  margin-left: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--green) 16%, transparent);
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
}
.status-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }

/* Wraps to rows on mobile rather than scrolling: all 6 stages stay visible,
   which is the point of a stepper. Reverts to one scrollable row at 768. */
.dash__stepper {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}
.dash__stepper > div { flex: 1; min-width: 92px; }
.dash__bar { height: 4px; border-radius: 4px; background: var(--accent); margin-bottom: 8px; }
.dash__bar--green { background: var(--green); }
.dash__steplabel {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-2);
  font-weight: 500;
  white-space: nowrap;
}
.dash__steplabel--green { color: var(--green); font-weight: 700; }

.dash__grid { display: grid; grid-template-columns: 1fr; }
/* min-width:0 — grid items default to min-width:auto and refuse to shrink below
   their content's min-content width, which pushed these past the track and got
   them clipped by .dash's overflow:hidden (needed for the border-radius). */
.dash__thread { padding: 20px; border-bottom: 1px solid var(--border); min-width: 0; }
.dash__side { display: flex; flex-direction: column; border-left: 1px solid transparent; min-width: 0; }
.dash__block { padding: 20px; }
.dash__block--sep { border-bottom: 1px solid var(--border); }
.dash__label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.dash__label .locked { color: var(--green); }

.msgs { display: flex; flex-direction: column; gap: 14px; }
.msg { display: flex; gap: 12px; align-items: flex-start; }
.msg__avatar {
  flex-shrink: 0;
  width: 32px; height: 32px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: var(--backend);
}
.msg--fe .msg__avatar { background: var(--frontend); }
.msg__body { flex: 1; min-width: 0; }
.msg__meta { display: flex; align-items: baseline; gap: 8px; }
.msg__name {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--backend);
}
.msg--fe .msg__name { color: var(--frontend); }
.msg__time { font-family: var(--font-mono); font-size: 11px; color: var(--text-3); }
.msg__text { font-size: 14px; line-height: 1.55; color: var(--text-2); margin-top: 4px; }
.msg__text--fail { color: var(--red); }
.msg__text--ok { color: var(--green); }

.contract {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-inset);
  overflow: hidden;
}
.contract pre {
  margin: 0;
  padding: 16px;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--text-2);
  overflow-x: auto;
}
.contract .cm { color: var(--text-3); }
.contract .verb { color: var(--frontend); }
.contract .code-n { color: var(--accent); }
.contract .url { color: var(--teal); }
.sigs { display: flex; gap: 12px; margin-top: 12px; }
.sigs > div {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-2);
}
.sigs i { width: 8px; height: 8px; border-radius: 50%; background: var(--backend); }
.sigs .fe i { background: var(--frontend); }

.events { display: flex; flex-direction: column; gap: 8px; font-family: var(--font-mono); font-size: 12px; }
.events > div { display: flex; gap: 10px; align-items: baseline; }
.events time { color: var(--text-3); flex-shrink: 0; }
.events i {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
  top: 5px;
  background: var(--text-3);
}
.events i.accent { background: var(--accent); }
.events i.backend { background: var(--backend); }
.events i.red { background: var(--red); }
.events i.green { background: var(--green); }
.events span { color: var(--text-2); }

/* --- Trust ---------------------------------------------------------------- */
.trust-head { max-width: 720px; margin: 0 0 40px; }
.trust-head p { font-size: 17px; line-height: 1.6; color: var(--text-2); margin: 0; }
.trust-head code { color: var(--text); }

.worry {
  margin-bottom: 32px;
  border: 1px solid var(--border-2);
  border-radius: 16px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr;
}
.worry__side { padding: 22px 24px; }
.worry__side--bad {
  background: color-mix(in srgb, var(--red) 8%, var(--bg-2));
  border-bottom: 1px solid var(--border);
}
.worry__side--good { background: color-mix(in srgb, var(--green) 8%, var(--bg-2)); }
.worry__side p { font-size: 15px; line-height: 1.55; color: var(--text); margin: 0; }
.worry__side code { color: var(--text-2); }
.worry__label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}
.worry__side--bad .worry__label { color: var(--red); }
.worry__side--good .worry__label { color: var(--green); }

/* align-items:start so a card expanding on open doesn't stretch its row-mates;
   the card's overflow:hidden (for the radius) would otherwise clip the reveal. */
.trust-grid { display: grid; gap: 16px; grid-template-columns: 1fr; align-items: start; }
.trust-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg-2);
  overflow: hidden;
}
.trust-card > summary {
  list-style: none;
  cursor: pointer;
  display: block;
  padding: 24px;
}
.trust-card > summary::-webkit-details-marker { display: none; }
.trust-card__icon {
  width: 42px; height: 42px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 16px;
}
.i-teal    { background: color-mix(in srgb, var(--teal) 16%, transparent); }
.i-accent  { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.i-backend { background: color-mix(in srgb, var(--backend) 16%, transparent); }
.i-front   { background: color-mix(in srgb, var(--frontend) 16%, transparent); }
.i-amber   { background: color-mix(in srgb, var(--amber) 16%, transparent); }
.i-red     { background: color-mix(in srgb, var(--red) 16%, transparent); }
.trust-card h3 { font-size: 17px; font-weight: 600; margin: 0 0 8px; letter-spacing: -0.01em; }
.trust-card__lead { font-size: 14.5px; line-height: 1.6; color: var(--text-2); margin: 0; }
.trust-card__more {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 14px;
  font-family: var(--font-mono); font-size: 11.5px; color: var(--accent);
}
.trust-card__more .chev { display: inline-block; transition: transform .2s ease; }
.trust-card[open] .chev { transform: rotate(90deg); }
.trust-card__detail {
  margin: 0;
  padding: 0 24px 24px;
  font-size: 14.5px; line-height: 1.6; color: var(--text-2);
}
@media (prefers-reduced-motion: reduce) {
  .trust-card__more .chev { transition: none; }
}

/* "so why run tailscale serve?" infographic — Tailscale deep-dive (how-it-works) */
.tsinfo {
  margin-top: 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-2);
  overflow: hidden;
}
.tsinfo__q {
  font-family: var(--font-mono);
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-3);
  padding: 14px 18px 0;
}
.tsinfo__cmd { color: var(--frontend); }
.tsinfo__rows { display: flex; flex-direction: column; }
.tsinfo__row {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 16px 18px;
}
.tsinfo__row:first-child { border-bottom: 1px solid var(--border); }
.tsinfo__icon { flex-shrink: 0; font-size: 18px; line-height: 1.3; }
.tsinfo__mid { flex: 1; min-width: 0; }
.tsinfo__name { font-size: 13.5px; font-weight: 600; margin-bottom: 2px; }
.tsinfo__meta { font-family: var(--font-mono); font-size: 11px; color: var(--text-3); font-weight: 400; }
.tsinfo__desc { font-size: 13px; line-height: 1.55; color: var(--text-2); }
.tsinfo__badge {
  flex-shrink: 0;
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  padding: 4px 9px; border-radius: 7px;
}
.tsinfo__badge--ok   { color: var(--green); background: color-mix(in srgb, var(--green) 15%, transparent); }
.tsinfo__badge--warn { color: var(--amber); background: color-mix(in srgb, var(--amber) 15%, transparent); }
.tsinfo__badge--nowrap { white-space: nowrap; }
.tsinfo__foot {
  padding: 14px 18px;
  border-top: 1px solid var(--border);
  background: var(--bg-inset);
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
}
.tsinfo__run { font-family: var(--font-mono); font-size: 12px; color: var(--frontend); font-weight: 600; }
.tsinfo__foottext { font-size: 13px; line-height: 1.5; color: var(--text-2); flex: 1; min-width: 200px; }
.tsinfo__foottext code { font-family: var(--font-mono); color: var(--text); }
/* forward-link paragraph that follows the infographic, at deepdive-body level */
.deepdive__outro { font-size: 13px; line-height: 1.6; color: var(--text-2); margin: 14px 0 0; }
.deepdive__outro strong { color: var(--text); font-weight: 600; }
/* narrow screens: drop the badge to its own row under the text instead of
   squeezing the middle column — flex can't do a content-width wrap cleanly. */
@media (max-width: 479px) {
  .tsinfo__row {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas: "icon mid" ". badge";
    gap: 6px 14px;
  }
  .tsinfo__row .tsinfo__icon  { grid-area: icon; }
  .tsinfo__row .tsinfo__mid   { grid-area: mid; }
  .tsinfo__row .tsinfo__badge { grid-area: badge; justify-self: start; }
}

.footnote {
  margin-top: 20px;
  border: 1px dashed var(--border-2);
  border-radius: 14px;
  background: var(--bg-inset);
  padding: 18px 22px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.footnote p {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-2);
  margin: 0;
  flex: 1;
  min-width: 240px;
}
.footnote strong { color: var(--text); font-weight: 600; }

/* --- Get started ---------------------------------------------------------- */
.start { max-width: 900px; margin: 0 auto; text-align: center; padding-block: clamp(64px, 9vw, 120px); }
.start__mark { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 22px; }
.start__mark i { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); }
.start__mark i + i {
  width: 44px; height: 2px;
  border-radius: 0;
  background: var(--text-3);
  animation: sb-connector 2.4s ease-in-out infinite;
}
.start__mark i + i + i { width: 12px; height: 12px; border-radius: 50%; background: var(--backend); }
.start h2 { font-size: clamp(32px, 5vw, 52px); line-height: 1.06; letter-spacing: -0.025em; margin: 0 0 18px; }
.start p { font-size: 18px; line-height: 1.6; color: var(--text-2); max-width: 520px; margin: 0 auto 32px; }
.start__ctas { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-bottom: 20px; }
.start__form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  max-width: 440px;
  margin: 0 auto;
}
.start__form input {
  flex: 1;
  min-width: 200px;
  padding: 12px 16px;
  border-radius: 11px;
  border: 1px solid var(--border-2);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  font-family: var(--font-sans);
}
.start__form button {
  padding: 12px 20px;
  border-radius: 11px;
  border: 1px solid var(--border-2);
  background: var(--text);
  color: var(--bg);
  font-family: inherit;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  white-space: nowrap;
}
.start__fine { font-family: var(--font-mono); font-size: 12px; color: var(--text-3); margin-top: 12px; }

/* --- Footer --------------------------------------------------------------- */
.site-footer { position: relative; z-index: 1; border-top: 1px solid var(--border); }
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  padding-block: 40px;
}
.site-footer .tagline { font-size: 13.5px; color: var(--text-3); }
.site-footer__links { margin-left: auto; display: flex; flex-wrap: wrap; gap: 22px; font-size: 14px; }
.site-footer__links a { color: var(--text-2); }
.site-footer__links a:hover { color: var(--accent-hover); }
.site-footer__legal {
  border-top: 1px solid var(--border);
  padding: 16px var(--gutter);
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-3);
}

/* ==========================================================================
   Learn page
   ========================================================================== */
.learn-main { position: relative; z-index: 1; padding-block: clamp(40px, 7vw, 72px) clamp(64px, 9vw, 100px); }
.learn-head { max-width: 680px; margin-bottom: clamp(32px, 5vw, 48px); }
.learn-head h1 {
  font-size: clamp(32px, 5.5vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 18px;
}
.learn-head p { font-size: 18px; line-height: 1.6; color: var(--text-2); margin: 0; }
.learn-head .tony { color: var(--accent); font-weight: 600; }
.learn-head .peter { color: var(--backend); font-weight: 600; }
.learn-head strong { color: var(--text); font-weight: 600; }
/* Hidden on mobile — decorative breadcrumb that pushed the learn header past
   320px, and the page title states the same thing directly below. */
.nav-slash { display: none; font-family: var(--font-mono); font-size: 13px; color: var(--text-3); }

/* --- Roster --------------------------------------------------------------- */
.roster { margin-bottom: clamp(40px, 6vw, 56px); }
.roster__head { text-align: center; margin-bottom: 28px; }
.roster__head .sel {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-3);
  letter-spacing: 0.14em;
  margin-bottom: 10px;
}
.roster__head h2 {
  font-family: var(--font-mono);
  font-size: clamp(26px, 5.5vw, 46px);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0;
  color: var(--text);
  text-shadow: 0 0 26px color-mix(in srgb, var(--accent) 45%, transparent);
}
.roster__grid { display: grid; gap: 16px; grid-template-columns: 1fr; }

.fighter {
  position: relative;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  border: 2px solid var(--border);
  border-radius: 18px;
  background: var(--bg-2);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 13px;
  opacity: .78;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, opacity .18s ease;
  --f: var(--accent);
  --f-soft: color-mix(in srgb, var(--accent) 22%, transparent);
}
.fighter--ngrok { --f: var(--teal); --f-soft: color-mix(in srgb, var(--teal) 22%, transparent); }
.fighter--tailscale { --f: var(--frontend); --f-soft: color-mix(in srgb, var(--frontend) 22%, transparent); }
.fighter[aria-pressed="true"] {
  opacity: 1;
  border-color: var(--f);
  box-shadow: 0 0 0 4px var(--f-soft), 0 18px 44px -20px var(--f);
  transform: translateY(-4px);
}
.fighter__ribbon {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-inset);
  color: var(--text-3);
}
.fighter[aria-pressed="true"] .fighter__ribbon {
  background: var(--f);
  color: #fff;
  animation: sb-cursor 1.4s ease-in-out infinite;
}
.fighter__ribbon .on { display: none; }
.fighter[aria-pressed="true"] .fighter__ribbon .on { display: inline; }
.fighter[aria-pressed="true"] .fighter__ribbon .off { display: none; }
.fighter__portrait {
  height: 96px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 46px;
  background: linear-gradient(135deg, var(--f-soft), transparent 70%);
  border: 1px solid var(--border);
}
.fighter__name {
  display: block;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.02em;
  color: var(--text);
}
.fighter__klass {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--f);
  margin-top: 2px;
}
.fighter__tagline {
  display: block;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-2);
  min-height: 58px;
}
.fighter__stats { display: flex; flex-direction: column; gap: 8px; margin-top: 2px; }
.fighter__portrait svg { width: 62px; height: 46px; }
.stat { display: flex; align-items: center; gap: 10px; }
.stat__label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-3);
  width: 88px;
  flex-shrink: 0;
}
.stat__track {
  flex: 1;
  height: 7px;
  border-radius: 4px;
  background: var(--bg-inset);
  overflow: hidden;
}
.stat__fill { display: block; height: 100%; background: var(--f); border-radius: 4px; }

.versus-cta-row {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: center;
}
.versus-cta {
  width: 100%;
  max-width: 440px;
  cursor: pointer;
  font-family: inherit;
  font-size: 14.5px;
  line-height: 1.35;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-inset);
  text-align: left;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.versus-cta:hover {
  border-color: var(--border-2);
  background: var(--bg-2);
  transform: translateY(-2px);
}
.versus-cta__icon {
  width: 34px; height: 34px;
  flex-shrink: 0;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  background: var(--accent-soft);
  color: var(--accent);
}
.versus-cta__go { margin-left: auto; font-family: var(--font-mono); font-size: 12px; color: var(--accent); }

/* --- Arenas --------------------------------------------------------------- */
.arena[hidden] { display: none; }
.arena__banner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-2);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent);
  flex-wrap: wrap;
}
.arena__banner i {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
  animation: sb-cursor 1.4s ease-in-out infinite;
}
.arena__banner a { margin-left: auto; font-size: 12px; color: var(--text-2); }
.arena--teal .arena__banner { color: var(--teal); }
.arena--teal .arena__banner i {
  background: var(--teal);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 22%, transparent);
}
.arena--mag .arena__banner { color: var(--frontend); }
.arena--mag .arena__banner i {
  background: var(--frontend);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--frontend) 22%, transparent);
}

.chapter { margin-bottom: clamp(48px, 7vw, 72px); }
.chapter--tight { margin-bottom: clamp(40px, 6vw, 56px); }
.ch-label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}
.ch-label--teal { color: var(--teal); }
.ch-label--mag { color: var(--frontend); }
.ch-h2 {
  font-size: clamp(24px, 3.5vw, 34px);
  line-height: 1.12;
  margin: 0 0 16px;
}
.ch-h2 em { font-style: normal; }
.ch-h2 .where { color: var(--accent); }
.ch-h2 .who { color: var(--backend); }
.ch-h2 .both { color: var(--frontend); }
.ch-p {
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-2);
  margin: 0 0 14px;
  max-width: 720px;
}
.ch-p strong { color: var(--text); font-weight: 600; }
.ch-p em { font-style: normal; color: var(--text); font-weight: 600; }
.ch-p code, .ch-code { font-family: var(--font-mono); color: var(--text); font-size: 0.9em; }

.sketch {
  margin: 18px 0;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-inset);
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--text-2);
  overflow-x: auto;
  white-space: pre;
}
.sketch .accent { color: var(--accent); }
.sketch .backend { color: var(--backend); }
.sketch .teal { color: var(--teal); }
.sketch .green { color: var(--green); }
.sketch .red { color: var(--red); }
.sketch .mute { color: var(--text-3); }

.two-cards { display: grid; gap: 16px; grid-template-columns: 1fr; margin: 24px 0; }
.def-card {
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: 16px;
  background: var(--bg-2);
  padding: 22px;
}
.def-card--backend { border-top-color: var(--backend); }
.def-card--teal { border-top-color: var(--teal); }
.def-card--mag { border-top-color: var(--frontend); }
.def-card__label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.def-card--backend .def-card__label { color: var(--backend); }
.def-card--teal .def-card__label { color: var(--teal); }
.def-card--mag .def-card__label { color: var(--frontend); }
.def-card p { font-size: 14.5px; line-height: 1.6; color: var(--text-2); margin: 0; }
.def-card em { font-style: normal; color: var(--text); font-weight: 600; }
.def-card strong { color: var(--text); font-weight: 600; }
.def-card code { color: var(--text); }

.note-box {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-inset);
  padding: 16px 18px;
  margin-top: 16px;
}
.note-box p { font-size: 13px; line-height: 1.6; color: var(--text-3); margin: 0; }
.note-box strong { color: var(--text-2); font-weight: 600; }
.note-box em { font-style: normal; color: var(--text-2); font-weight: 600; }
.note-box code { color: var(--text-2); }

/* address table */
.addr-table {
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  margin: 22px 0;
}
.addr-row {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  flex-wrap: wrap;
  background: var(--bg-2);
}
.addr-row + .addr-row { border-top: 1px solid var(--border); }
.addr-row__how { flex-shrink: 0; width: 128px; }
.addr-row__how b { font-weight: 600; font-size: 14px; }
.addr-row__how span { display: block; font-family: var(--font-mono); font-size: 11px; color: var(--text-3); }
.addr-row code {
  font-size: 13px;
  color: var(--text-3);
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  word-break: break-all;
  flex: 1;
  min-width: 200px;
}
.addr-row--teal code { color: var(--teal); }
.addr-row--mag code { color: var(--frontend); }

/* redeem flow */
.redeem {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg-inset);
  padding: clamp(18px, 3vw, 26px);
  margin-bottom: 24px;
}
.redeem__flow { display: flex; flex-direction: column; gap: 14px; align-items: stretch; }
.redeem__invite {
  border: 1px dashed var(--accent);
  border-radius: 14px;
  background: var(--accent-soft);
  padding: 18px;
  text-align: center;
  align-self: center;
  max-width: 260px;
}
.redeem__invite b { font-family: var(--font-mono); font-size: 13px; font-weight: 700; color: var(--accent); }
.redeem__invite span { display: block; font-size: 12px; color: var(--text-2); margin-top: 6px; }
.redeem__out { flex: 1; display: flex; flex-direction: column; gap: 10px; }
.redeem__item {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  padding: 14px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.redeem__item--watch { border-left: 3px solid var(--teal); }
.redeem__item > span { font-size: 18px; }
.redeem__item b { display: block; font-weight: 600; font-size: 14px; }
.redeem__item small { font-size: 12.5px; color: var(--text-3); }
.redeem__item .ro { font-family: var(--font-mono); font-size: 11px; color: var(--teal); font-weight: 500; }
.redeem__item .ui-url {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--teal);
  margin-top: 2px;
  word-break: break-all;
}

/* what each holds */
.hold-grid { display: grid; gap: 16px; grid-template-columns: 1fr; margin-top: 20px; }
.hold-card {
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: 18px;
  background: var(--bg-2);
  padding: 26px;
}
.hold-card--buddy { border-top-color: var(--backend); }
.hold-card__head { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.hold-card__head i {
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.hold-card--buddy .hold-card__head i {
  background: var(--backend);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--backend) 22%, transparent);
}
.hold-card__head span { font-weight: 700; font-size: 17px; }
.hold-card__list { display: flex; flex-direction: column; gap: 12px; }
.hold-row { display: flex; gap: 12px; align-items: flex-start; }
.hold-row b { display: block; font-weight: 600; font-size: 14.5px; }
.hold-row p { font-size: 13px; line-height: 1.55; color: var(--text-2); margin: 0; }
.badge {
  flex-shrink: 0;
  padding: 3px 9px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.badge--act { background: var(--accent-soft); color: var(--accent); }
.badge--watch { background: color-mix(in srgb, var(--teal) 15%, transparent); color: var(--teal); }
.badge--hand {
  background: var(--bg-inset);
  border: 1px solid var(--border);
  color: var(--text-3);
}

/* walkthroughs */
.walk { display: flex; flex-direction: column; gap: 14px; margin: 22px 0; }
.walk li { display: flex; gap: 14px; align-items: flex-start; }
.walk__num {
  flex-shrink: 0;
  width: 26px; height: 26px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--teal) 15%, transparent);
  color: var(--teal);
}
.walk--mag .walk__num {
  background: color-mix(in srgb, var(--frontend) 15%, transparent);
  color: var(--frontend);
}
.walk__body { flex: 1; min-width: 0; }
.walk__title { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 4px; }
.walk__text { font-size: 14px; line-height: 1.6; color: var(--text-2); }
.walk pre {
  margin: 10px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-inset);
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-2);
  overflow-x: auto;
  white-space: pre;
}

/* worry callout (learn) */
.worry--learn { border-radius: 16px; margin: 22px 0 0; }
.worry--learn .worry__side--good p + p { font-size: 14px; color: var(--text-2); margin-top: 10px; }

/* analogy cards */
.analogy__head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.analogy__head span { font-size: 24px; }
.analogy__head b { display: block; font-weight: 700; font-size: 16px; }
.analogy__head small { font-family: var(--font-mono); font-size: 12px; color: var(--teal); }
.def-card--mag .analogy__head small { color: var(--frontend); }
.analogy p { margin: 0 0 14px; }
.analogy__verdict {
  font-family: var(--font-mono);
  font-size: 12.5px;
  border-radius: 9px;
  padding: 10px 12px;
  color: var(--teal);
  background: color-mix(in srgb, var(--teal) 10%, transparent);
}
.def-card--mag .analogy__verdict {
  color: var(--frontend);
  background: color-mix(in srgb, var(--frontend) 10%, transparent);
}

/* VS arena */
.vs-grid { display: grid; gap: 16px; grid-template-columns: 1fr; align-items: stretch; margin-bottom: 28px; }
.vs-side {
  border: 1px solid var(--border);
  border-top: 4px solid var(--teal);
  border-radius: 18px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--teal) 10%, var(--bg-2)), var(--bg-2) 60%);
  padding: 24px;
}
.vs-side--mag {
  border-top-color: var(--frontend);
  background: linear-gradient(200deg, color-mix(in srgb, var(--frontend) 10%, var(--bg-2)), var(--bg-2) 60%);
}
.vs-side__portrait {
  height: 96px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--teal) 22%, transparent), transparent 70%);
  border: 1px solid var(--border);
  margin-bottom: 16px;
}
.vs-side--mag .vs-side__portrait {
  background: linear-gradient(225deg, color-mix(in srgb, var(--frontend) 22%, transparent), transparent 70%);
}
.vs-side__name { font-weight: 800; font-size: 22px; letter-spacing: 0.02em; }
.vs-side__klass {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--teal);
  margin: 2px 0 18px;
}
.vs-side--mag .vs-side__klass { color: var(--frontend); }
.vs-list { display: flex; flex-direction: column; gap: 9px; margin: 0; padding: 0; list-style: none; }
.vs-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-2);
}
.vs-list li.con { color: var(--text-3); }
.vs-list .pro-i { color: var(--green); font-weight: 700; flex-shrink: 0; }
.vs-list .con-i { color: var(--red); font-weight: 700; flex-shrink: 0; }

.vs-badge-wrap { display: flex; align-items: center; justify-content: center; padding: 8px; }
.vs-badge {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(28px, 6vw, 40px);
  letter-spacing: 0.04em;
  color: var(--accent);
  text-shadow: 0 0 26px color-mix(in srgb, var(--accent) 55%, transparent);
  transform: rotate(-6deg);
  padding: 12px 16px;
  border: 2px solid var(--accent);
  border-radius: 14px;
  background: var(--bg);
}

.verdict {
  border: 1px solid var(--border-2);
  border-radius: 16px;
  background: var(--bg-inset);
  padding: 22px 24px;
  margin-bottom: 28px;
}
.verdict__label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--amber);
  margin-bottom: 12px;
}
.verdict p { font-size: 15.5px; line-height: 1.65; color: var(--text); margin: 0; }
.verdict .pick-teal { color: var(--teal); font-weight: 700; }
.verdict .pick-mag { color: var(--frontend); font-weight: 700; }

/* next row */
.next-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 20px;
  border: 1px dashed var(--border-2);
  border-radius: 16px;
  background: var(--bg-inset);
}
.next-row > span { font-family: var(--font-mono); font-size: 12px; color: var(--text-3); }
.next-btn {
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
}
.next-btn--teal {
  border-color: var(--teal);
  background: color-mix(in srgb, var(--teal) 12%, transparent);
  color: var(--teal);
}
.next-btn--mag {
  border-color: var(--frontend);
  background: color-mix(in srgb, var(--frontend) 12%, transparent);
  color: var(--frontend);
}

/* finish card */
.finish {
  margin-top: 56px;
  text-align: center;
  padding: clamp(32px, 6vw, 52px) 20px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background:
    radial-gradient(ellipse 80% 120% at 50% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%),
    var(--bg-2);
  overflow: hidden;
}
.finish__pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-bottom: 16px;
}
.finish__pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.finish__kicker {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-3);
  letter-spacing: 0.14em;
  margin-bottom: 10px;
}
.finish__wordmark {
  font-family: var(--font-mono);
  font-size: clamp(28px, 6.5vw, 58px);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0;
  line-height: 1.05;
  background: linear-gradient(180deg, #ffd28a, var(--accent) 55%, #b64420);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}
.finish p { font-size: 15px; line-height: 1.6; color: var(--text-2); max-width: 460px; margin: 16px auto 24px; }

/* ==========================================================================
   Breakpoints (per handoff)
   ========================================================================== */
@media (min-width: 720px) {
  .flow { flex-direction: row; align-items: stretch; }
  .flow__arrow .glyph { transform: rotate(0deg); }
  .redeem__flow { flex-direction: row; align-items: stretch; }
  .redeem__flow .flow__arrow .glyph { transform: rotate(0deg); }
  .two-cards { grid-template-columns: 1fr 1fr; }
  .hold-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 760px) {
  .roster__grid { grid-template-columns: repeat(3, 1fr); }
  .vs-grid { grid-template-columns: 1fr auto 1fr; }
}

@media (min-width: 768px) {
  .center-head { text-align: center; }
  .nav-links { display: flex; }
  .nav-toggle { display: none; }
  .site-nav .nav-cta { display: inline-flex; }
  .nav-slash { display: inline; }
  .status-pill { margin-left: auto; }
  .steplist pre,
  .contract pre,
  .walk pre { white-space: pre; overflow-wrap: normal; }
  .dash__stepper { flex-wrap: nowrap; gap: 4px; }
  /* Panel-only duplicate; the real header CTA takes over here. */
  .nav-links__cta { display: none !important; }
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .worry { grid-template-columns: 1fr 1fr; }
  .worry__side--bad { border-bottom: none; }
  .worry__side--good { border-left: 1px solid var(--border); }
}

@media (min-width: 860px) {
  .hero { grid-template-columns: 1.05fr 1fr; align-items: center; }
  .two-col { grid-template-columns: 1fr 1fr; align-items: center; }
  .track-grid { grid-template-columns: 1fr auto 1fr; align-items: stretch; }
  .handoff__arrow { display: none; }
}

@media (min-width: 900px) {
  .dash__grid { grid-template-columns: 1.4fr 1fr; }
  .dash__side { border-left-color: var(--border); }
  .dash__thread { border-bottom: none; }
}

@media (min-width: 1040px) {
  .trust-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ==========================================================================
   Setup page (setup.html)
   ========================================================================== */

/* Narrower measure while the tracks are stacked; widens at 1040 where they go
   side by side and each column needs room for command blocks. */
.wrap.setup-main { max-width: var(--maxw-learn); }
.site-nav--setup { max-width: var(--maxw-learn); }

/* --- Track tabs ----------------------------------------------------------- */
.setup-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 22px;
}
.setup-tab {
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: flex-start;
  text-align: left;
  padding: 14px 16px;
  min-height: 48px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-2);
  color: var(--text-2);
  font-family: inherit;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, color .18s ease;
}
.setup-tab:hover { border-color: var(--border-2); color: var(--text); }
.setup-tab__title { font-size: 15.5px; font-weight: 600; letter-spacing: -0.01em; }
.setup-tab__sub {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-3);
  line-height: 1.4;
}
.setup-tab[aria-selected="true"] {
  border-color: var(--backend);
  background: color-mix(in srgb, var(--backend) 10%, var(--bg-2));
  color: var(--text);
}
.setup-tab[aria-selected="true"] .setup-tab__sub { color: var(--backend); }
/* The host tab is the accent-coloured track, matching its panel. */
.setup-tab[data-track="host"][aria-selected="true"] {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, var(--bg-2));
}
.setup-tab[data-track="host"][aria-selected="true"] .setup-tab__sub { color: var(--accent); }

/* --- Track panel ---------------------------------------------------------- */
.setup-track {
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: 18px;
  background: var(--bg-2);
  padding: clamp(20px, 4vw, 30px);
}
/* Beats the earlier .track--buddy rule, which the shorthand above would win. */
.setup-track.track--buddy { border-top-color: var(--backend); }
.setup-track[hidden] { display: none; }
.setup-track > .steplist { margin-top: 4px; }
/* Step bodies are flex items and default to shrink-to-fit, so a short step left
   its command block half the width of a long one's. Same fix .steplist--dive
   already uses — makes every .cmd align to one edge. */
.setup-track .steplist li > div { flex: 1; min-width: 0; }

/* --- Prerequisites callout ------------------------------------------------ */
.prereq {
  border: 1px solid var(--border-2);
  border-left: 3px solid var(--backend);
  border-radius: 12px;
  background: var(--bg-inset);
  padding: 16px 18px;
  margin: 18px 0;
}
.prereq--host { border-left-color: var(--accent); }
.prereq__label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--backend);
  margin-bottom: 8px;
}
.prereq--host .prereq__label { color: var(--accent); }
.prereq ul { margin: 0; padding-left: 18px; }
.prereq li { font-size: 14px; line-height: 1.6; color: var(--text-2); }
.prereq li + li { margin-top: 4px; }
.prereq strong { color: var(--text); font-weight: 600; }

/* --- Secrets warning ------------------------------------------------------ */
.secret {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border: 1px solid color-mix(in srgb, var(--amber) 35%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--amber) 8%, transparent);
  padding: 14px 16px;
  margin: 18px 0;
}
.secret__icon { flex-shrink: 0; font-size: 15px; line-height: 1.5; }
.secret p { font-size: 13.5px; line-height: 1.6; color: var(--text-2); margin: 0; }
.secret strong { color: var(--text); font-weight: 600; }

/* --- Way A / Way B -------------------------------------------------------- */
.way { margin-top: 26px; }
.way--alt { margin-top: 34px; padding-top: 26px; border-top: 1px solid var(--border); }
.way__head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.way__badge {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 9px;
  border-radius: 7px;
  color: var(--backend);
  background: color-mix(in srgb, var(--backend) 15%, transparent);
}
.way__badge--alt { color: var(--text-3); background: var(--bg-3); }
.way__title { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.way__title em { font-style: normal; font-weight: 400; color: var(--text-3); font-size: 14px; }
.way__intro { font-size: 14px; line-height: 1.6; color: var(--text-3); margin: 0 0 18px; }
.way__intro strong { color: var(--text-2); font-weight: 600; }
.way .steplist { margin-top: 16px; }

/* --- Command blocks with copy button -------------------------------------- */
.cmd {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 10px 0 0;
  padding: 10px 10px 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-inset);
}
/* Commands always wrap — they can be 2x the viewport, and scrolling inside a
   block is poorly discoverable on touch. The copy button keeps them exact, so
   wrapping costs nothing here (unlike the .sketch diagrams). Specificity beats
   the `white-space: pre` restore that .steplist pre gets at 768. */
.cmd .cmd__code {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  border-radius: 0;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--text-2);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  overflow-x: visible;
}
.cmd .cmd__code code { font-family: var(--font-mono); }
.cmd__copy {
  flex-shrink: 0;
  min-width: 62px;
  padding: 6px 10px;
  border: 1px solid var(--border-2);
  border-radius: 8px;
  background: var(--bg-2);
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.cmd__copy:hover { color: var(--text); border-color: var(--text-3); }
.cmd__copy.is-copied { color: var(--green); border-color: var(--green); }
.cmd__copy.is-failed { color: var(--amber); border-color: var(--amber); }
.cmd__caption { margin-top: 6px; font-size: 12.5px; color: var(--text-3); }

/* Placeholders the reader must swap for their own values. */
.ph {
  padding: 1px 4px;
  border-radius: 5px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
  /* `anywhere` breaks only when the token genuinely doesn't fit, so <BROKER_URL>
     stays intact at normal widths but can't overrun the ~96px code column at
     320. Pinning this to `keep-all` overflowed the track by 14px. */
  overflow-wrap: anywhere;
}
.ph-hint { margin-top: 10px; font-size: 12.5px; color: var(--text-3); }

/* --- Optional / Playwright note ------------------------------------------- */
.optional { margin-top: 26px; }
.optional__label {
  font-family: var(--font-mono);
  font-size: 11px !important;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-2) !important;
  margin-bottom: 8px !important;
}
.optional .cmd { background: var(--bg-2); margin-bottom: 12px; }

/* --- "What you'll see" ---------------------------------------------------- */
.watch {
  margin-top: 26px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-inset);
  padding: 18px 20px;
}
.watch__label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--teal);
  margin-bottom: 8px;
}
.watch p { font-size: 14px; line-height: 1.6; color: var(--text-2); margin: 0 0 10px; }
.watch a { font-size: 13.5px; font-weight: 600; }

/* --- Page foot ------------------------------------------------------------ */
.setup-foot {
  margin: clamp(40px, 7vw, 64px) 0 clamp(48px, 8vw, 80px);
  text-align: center;
}
.setup-foot p { font-size: 15px; color: var(--text-2); margin: 0 0 16px; }

/* --- Setup breakpoints ---------------------------------------------------- */
@media (max-width: 559px) {
  /* Two tabs plus a subtitle each don't fit a 320 column; the titles carry it. */
  .setup-tab__sub { display: none; }
  .setup-tab { min-height: 52px; justify-content: center; }
  /* The code column is only ~96px at 320 once the step number, padding and
     button are subtracted — trim the chrome to give commands room. */
  .cmd { padding: 10px 8px 10px 10px; gap: 7px; }
  .cmd__copy { min-width: 0; padding: 6px 8px; }
}

@media (max-width: 767px) {
  /* Copying is the whole point of this page, so the button gets a real touch
     target — same 44px floor the theme toggle was raised to. */
  .cmd__copy { min-height: 44px; }
}

/* Wide screens show both tracks at once — no switching, and a buddy can see
   what their host is doing. setup.js unhides the inactive panel and swaps
   role="tabpanel" to "region" at this breakpoint, since the tablist is gone. */
@media (min-width: 1040px) {
  .wrap.setup-main { max-width: var(--maxw); }
  .site-nav--setup { max-width: var(--maxw); }
  .setup-tabs { display: none; }
  .setup-tracks {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    align-items: start; /* buddy track is much taller; don't stretch host to match */
  }
  /* Buddy first in the DOM (it's the default tab); keep that order visually. */
  .setup-track { margin: 0; }
}

@media (min-width: 768px) {
  .cmd { padding: 12px 12px 12px 16px; }
  .cmd .cmd__code { font-size: 13px; }
}
