/* ==========================================================================
   v2.css — SmartHopper "Canopy" design system
   Organic sculptural volumes, soft sage surfaces, asymmetric rounded
   corners, warm shadows. The brand green (#2d5a3d) is fixed and never
   changes with the theme; dark mode keeps green fills and renders
   text-level accents in neutral ink for contrast.
   Theme: light|dark via [data-theme] on <html>; default resolved from
   prefers-color-scheme by the inline script in layouts/main.pug.

   Design tokens come from css/theme/canopy.css — the vendored
   @smarthopper/theme token file (`npm run sync:theme`), loaded before this
   file inside the `sh-theme` cascade layer. The blocks below only carry
   site extras and values that intentionally diverge from the shared
   defaults (unlayered rules win over the layer).
   ========================================================================== */

:root,
[data-theme="light"] {
  /* Deeper surface tiers + graph chrome only the site uses. */
  --paper-3: #e2ead8;
  --soft: #e4ecdc;
  /* Text-level accents keep brand green on the light canvas. */
  --green-text: var(--green);
  /* Site --accent is the amber highlight. */
  --accent: #c67e39;
  /* D3 tools-map canvas colors. */
  --wire: #cfd8c6;
  --node-stroke: #8ba08a;
}

[data-theme="dark"] {
  --paper-3: #233026;
  --soft: #26352b;
  /* Dark-mode press state on green fills stays deeper than the luminous
     shared ramp — matches the site's darker dark-theme buttons. */
  --green-ink: #24492f;
  /* Fixed brand green fails text contrast on the dark canvas — text-level
     accents fall back to neutral ink (fills keep the green). */
  --green-text: var(--ink);
  /* Site fills stay brand green (#2d5a3d) — dark-on-dark luminous text
     would fail; buttons keep white text instead of the shared dark fg. */
  --btn-fg: #fff;
  --accent: #d09a54;
  --wire: #33413a;
  --node-stroke: #55685a;
}

/* ---------- base ---------- */
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  transition: background 0.2s, color 0.2s;
}

/* base.css adds margin for the old fixed header — the v2 nav is sticky
   in-flow, so content must sit flush beneath it. */
main {
  margin-top: 0;
}

/* layout.css pads every <section> 4rem vertically (v1 style). v2 bands manage
   their own internal spacing — keep them flush edge to edge. */
.hero,
.showcase,
.install,
.cta-final {
  padding: 0;
}

/* anchor offset under the sticky nav */
[id] {
  scroll-margin-top: 4rem;
}

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

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

/* ---------- micro label / tag ---------- */
.tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
/* the arch — canopy's signature mark replaces the blueprint square */
.tag::before {
  content: '';
  width: 10px;
  height: 11px;
  border-radius: 6px 6px 2px 2px;
  background: var(--green);
  flex: none;
}
.tag-chip {
  background: var(--soft);
  color: var(--green-text);
  border-radius: 20px;
  padding: 2px 9px;
  font-weight: 700;
}
.corner {
  position: relative;
}
.corner::after {
  content: '';
  position: absolute;
  top: 12px;
  right: 14px;
  width: 11px;
  height: 12px;
  border-radius: 6px 6px 2px 2px;
  background: var(--green);
  opacity: 0.4;
}
.doclink {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  background: var(--soft);
  color: var(--green-text);
  border-radius: 18px 18px 18px 5px;
  padding: 8px 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.doclink:hover {
  background: var(--green);
  color: var(--btn-fg);
}
.doclink + .doclink {
  margin-left: 10px;
}

/* ---------- nav ---------- */
.vnav {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 1050;
}
.vnav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}
.vnav-logo {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex: none;
}
.vnav-ver {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--soft);
  border-radius: 12px;
  padding: 2px 7px;
}
.vnav-links {
  display: flex;
  align-items: center;
}
.vnav-links a {
  display: flex;
  align-items: center;
  padding: 8px 14px;
  margin: 0 1px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
}
.vnav-links a:hover {
  color: var(--ink);
  background: var(--paper-2);
}
.vnav-grow {
  flex: 1;
}
.vnav-cta {
  display: flex;
  align-items: center;
  margin: 8px 12px 8px 8px;
  padding: 10px 22px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: var(--green);
  color: var(--btn-fg);
  border-radius: 20px 20px 20px 6px;
  text-decoration: none;
  transition: box-shadow 0.15s ease;
}
.vnav-cta:hover {
  box-shadow: 0 0 0 3px var(--paper), 0 0 0 4.5px var(--green);
  color: var(--btn-fg);
}

/* ---------- hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 7fr 5fr;
  border-bottom: 1px solid var(--line);
}
.hero-copy {
  padding: 72px 48px 56px;
  position: relative;
}
.hero-logo {
  display: block;
  width: 56px;
  height: 56px;
  object-fit: contain;
  margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(44px, 5.6vw, 76px);
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -0.045em;
  margin: 26px 0 22px;
}
.hero h1 em {
  font-style: normal;
  color: var(--green-text);
}
.hero .sub {
  max-width: 520px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-soft);
}
.hero .sub b {
  color: var(--ink);
  font-weight: 700;
}
.hero-ctas {
  display: flex;
  margin-top: 36px;
}
.vbtn {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 14px 26px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r-canopy);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  background: var(--paper);
  transition: box-shadow 0.15s ease, background 0.15s ease;
}
.vbtn.primary {
  background: var(--green);
  color: var(--btn-fg);
  border-color: var(--green);
}
.vbtn.primary:hover {
  box-shadow: 0 0 0 3px var(--paper), 0 0 0 4.5px var(--green);
}
.vbtn.ghost:hover {
  background: var(--paper-2);
}

/* component constellation (hero): the real v2 component icons float over
   soft canopy arches. Hover scales x2 with a slight tilt. */
.hero-constellation {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(85% 65% at 80% 12%, #f3f6d8 0%, rgba(243, 246, 216, 0) 60%),
    var(--paper-2);
  overflow: hidden;
  min-height: 420px;
}
/* canopy arch silhouettes behind the icon grid */
.hero-constellation::before {
  content: '';
  position: absolute;
  right: 6%;
  bottom: -8%;
  width: 46%;
  height: 74%;
  border-radius: 999px 999px 18px 18px;
  background: var(--paper-3);
  opacity: 0.75;
}
.hero-constellation::after {
  content: '';
  position: absolute;
  left: -4%;
  top: 8%;
  width: 26%;
  height: 52%;
  border-radius: 999px 999px 14px 14px;
  background: var(--paper-3);
  opacity: 0.5;
}
.hero-constellation .icongrid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(16px, 3vw, 42px);
  padding: clamp(20px, 5vw, 48px);
  width: min(560px, 100%);
}
.hero-constellation .starw {
  position: relative;
  justify-self: center;
  width: 100%;
  max-width: 84px;
}
.hero-constellation .gridtail {
  grid-column: 1 / -1;
  justify-self: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--paper);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  padding: 7px 16px;
}
.hero-constellation .star {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 8px 12px rgba(20, 30, 16, 0.22));
  opacity: 0.95;
  transition: transform 0.22s ease, filter 0.22s ease, opacity 0.22s ease;
}
.hero-constellation .starw:hover .star {
  transform: scale(2) rotate(var(--tilt, 6deg));
  filter: drop-shadow(0 18px 26px rgba(20, 30, 16, 0.34));
  opacity: 1;
  position: relative;
  z-index: 5;
}
/* hover info card — name + one-liner floats above the zoomed icon */
.hero-constellation .tip {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  width: 240px;
  text-align: left;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 10px 13px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 10;
}
.hero-constellation .tip b {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 3px;
}
.hero-constellation .tip span {
  display: block;
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--ink-soft);
}
.hero-constellation .tip::after {
  content: '';
  position: absolute;
  top: calc(100% - 5px);
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 9px;
  height: 9px;
  background: var(--paper);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-bottom-right-radius: 3px;
}
.hero-constellation .starw:hover .tip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
/* first grid row sits at the container's clipped top edge — drop below instead */
.hero-constellation .starw:nth-child(-n + 4) .tip {
  bottom: auto;
  top: calc(100% + 12px);
}
.hero-constellation .starw:nth-child(-n + 4) .tip::after {
  top: auto;
  bottom: calc(100% - 5px);
  border: 0;
  border-left: 1px solid var(--line);
  border-top: 1px solid var(--line);
  border-radius: 0;
  border-top-left-radius: 3px;
}
/* edge columns: anchor the card inward so it never clips the container */
.hero-constellation .starw:nth-child(4n + 1) .tip {
  left: -6px;
  transform: translateY(4px);
}
.hero-constellation .starw:nth-child(4n + 1):hover .tip {
  transform: translateY(0);
}
.hero-constellation .starw:nth-child(4n + 1) .tip::after {
  left: 38px;
}
.hero-constellation .starw:nth-child(4n) .tip {
  left: auto;
  right: -6px;
  transform: translateY(4px);
}
.hero-constellation .starw:nth-child(4n):hover .tip {
  transform: translateY(0);
}
.hero-constellation .starw:nth-child(4n) .tip::after {
  left: auto;
  right: 38px;
}

/* ---------- links band ---------- */
.resband {
  display: flex;
  align-items: center;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  padding: 10px 26px;
  flex-wrap: wrap;
}
.resband .lab {
  padding: 8px 14px 8px 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  white-space: nowrap;
}
.resband a {
  padding: 8px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  text-decoration: none;
}
.resband a:hover {
  background: var(--paper-2);
  color: var(--green-text);
}
.resband a.cloud b,
.resband a b {
  color: var(--green-text);
  font-weight: 700;
}

/* ---------- badges / social proof ---------- */
.badges {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  border-bottom: 1px solid var(--line);
  background: var(--paper-2);
}
.badge-cell {
  padding: 22px;
}
a.badge-cell {
  color: inherit;
  text-decoration: none;
  border-radius: var(--r-md);
  transition: background 0.15s ease;
}
a.badge-cell:hover {
  background: var(--paper);
}
a.badge-cell:hover b {
  color: var(--green-text);
}
.badge-cell b {
  display: block;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.badge-cell b i {
  font-style: normal;
  color: var(--green-text);
  font-size: 18px;
}
.badge-cell > span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ---------- section head ---------- */
.sec-head {
  padding: 44px 48px 0;
}

/* ---------- key features 2-col ---------- */
.kf-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 20px 48px 34px;
}
.kf {
  position: relative;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.kf-copy {
  padding: 26px 30px 18px;
}
.kf .n {
  font-size: 11px;
  font-weight: 800;
  color: var(--green-text);
  letter-spacing: 0.08em;
}
.kf h3 {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 8px 0;
}
.kf p {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.6;
}
.kf .doclink {
  margin-top: 14px;
  margin-bottom: 4px;
  padding: 6px 12px;
  font-size: 10px;
}

/* mini screenshot slot — always light */
.minishot {
  margin: 0 22px 22px;
  height: 150px;
  position: relative;
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.minishot .mbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  border-bottom: 1px solid var(--line);
  padding: 6px 12px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  background: var(--paper);
  display: flex;
  justify-content: space-between;
  z-index: 2;
}
.minishot .mnote {
  position: absolute;
  bottom: 8px;
  left: 12px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
  text-transform: uppercase;
}

/* ---------- fig sections (full-width highlights) ---------- */
.fig-head {
  padding: 0 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.fig-head .tag {
  padding: 18px 0;
}
.figno {
  font-size: 11px;
  font-weight: 800;
  color: var(--ink-soft);
  letter-spacing: 0.1em;
  background: var(--soft);
  border-radius: 12px;
  padding: 3px 9px;
}
.showcase {
  display: grid;
  grid-template-columns: 5fr 7fr;
  border-bottom: 1px solid var(--line);
}
.showcase.rev {
  grid-template-columns: 7fr 5fr;
}
/* FIG.02 — slimmer diff panel: visual gets a third, copy keeps the rest. */
#ghjson + .showcase {
  grid-template-columns: 1fr 2fr;
}
.showcase .copy {
  padding: 60px 48px;
  position: relative;
}
.showcase.rev .copy {
  order: 2;
}
.showcase h2 {
  font-size: clamp(30px, 3.4vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 700;
  margin: 22px 0 18px;
}
.showcase h2 .kw {
  color: var(--green-text);
}
.showcase p {
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.65;
  max-width: 460px;
}
.showcase p + p {
  margin-top: 12px;
}
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 26px;
}
.chip {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: var(--paper-2);
  border-radius: 16px;
  padding: 7px 13px;
  color: var(--ink-soft);
}
.chip.green {
  background: var(--soft);
  color: var(--green-text);
  font-weight: 700;
}
.visual {
  position: relative;
  min-height: 400px;
  background: var(--paper-2);
}

/* screenshot slot — resembles a Grasshopper window; always light */
.shot {
  position: absolute;
  inset: 24px;
  display: flex;
  flex-direction: column;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.shot-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 10px 14px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.shot-bar .btns {
  display: flex;
  gap: 5px;
}
.shot-bar .btns i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--line);
  display: block;
}
.shot-ribbon {
  display: flex;
  align-items: center;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  padding: 6px 10px;
  font-size: 9px;
  font-weight: 600;
  color: var(--ink-soft);
  overflow: hidden;
}
.shot-ribbon span {
  padding: 4px 9px;
  border-radius: 9px;
}
.shot-ribbon .on {
  color: var(--btn-fg);
  background: var(--green);
  font-weight: 700;
}
.shot-body {
  flex: 1;
  position: relative;
  background: var(--paper);
}
.shot-note {
  position: absolute;
  left: 12px;
  bottom: 9px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
  text-transform: uppercase;
}

/* always-dark code panel (ghjson diff) */
.codepanel {
  position: absolute;
  inset: 24px;
  display: flex;
  flex-direction: column;
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #131a15;
  color: #cfd4cc;
}
.codepanel .hd {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid #2c3830;
  padding: 10px 14px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: #8b9187;
}
.codepanel .codebody {
  flex: 1;
  padding: 16px 18px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.7;
  overflow: auto;
}
.codepanel .cl {
  white-space: pre;
}
.codepanel .p {
  color: #6fbf8e;
}
.codepanel .m {
  color: #d98a7e;
}
.codepanel .k {
  color: #8b9187;
}
.codepanel .c {
  color: #5c645c;
}

/* github repo card (open source fig) */
.repocard {
  position: absolute;
  inset: 24px;
  display: flex;
  flex-direction: column;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.repocard .rh {
  border-bottom: 1px solid var(--line);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
}
.repocard .rh .pub {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  background: var(--soft);
  color: var(--green-text);
  border-radius: 12px;
  padding: 3px 9px;
  text-transform: uppercase;
}
.repocard .rh .gmark {
  color: var(--ink-soft);
  font-weight: 400;
}
.repocard .rr {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 12px 18px;
  font-size: 12px;
  color: var(--ink-soft);
}
.repocard .rr b {
  color: var(--ink);
  font-weight: 700;
}
.repocard .rr .g {
  color: var(--green-text);
  font-weight: 700;
}
.repocard .license {
  margin-top: auto;
  padding: 15px 18px;
  font-size: 11px;
  line-height: 1.7;
  color: var(--ink-soft);
  background: var(--paper-2);
}
.repocard .license b {
  color: var(--ink);
}

/* mcp flow diagram */
.flow {
  position: absolute;
  inset: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fbox {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  padding: 16px 14px;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  min-width: 108px;
}
.fbox b {
  display: block;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 4px;
}
.fbox span {
  font-size: 9px;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}
.fbox.gate {
  border: 1.5px dashed var(--accent);
  color: var(--accent);
  box-shadow: none;
}
.fbox.dest {
  border: 2px solid var(--green);
  color: var(--green-text);
  font-weight: 700;
}
.flink {
  width: 34px;
  height: 1.5px;
  background: var(--line-strong);
  position: relative;
  flex: none;
}
.flink::after {
  content: '▸';
  position: absolute;
  right: -4px;
  top: -9px;
  font-size: 12px;
  color: var(--line-strong);
}

/* ---------- install ---------- */
.install {
  display: grid;
  grid-template-columns: 5fr 7fr;
  border-bottom: 1px solid var(--line);
}
.install .copy {
  padding: 56px 48px;
  position: relative;
}
.install h2 {
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 700;
  margin: 20px 0 16px;
}
.install .copy p {
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.65;
}
.steps {
  background: var(--paper-2);
}
.step {
  display: grid;
  grid-template-columns: 80px 1fr;
  padding: 28px 48px 28px 0;
}
.step .sn {
  font-size: 22px;
  font-weight: 800;
  color: var(--btn-fg);
  align-self: start;
  justify-self: start;
  margin-left: 48px;
  background: var(--green);
  border-radius: 14px 14px 14px 4px;
  padding: 7px 12px;
}
.step .sc {
  padding-left: 28px;
}
.step .sc b {
  display: block;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}
.step .sc span {
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-soft);
}
.step .sc code {
  font-size: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 6px;
}
.step .sc em {
  font-style: normal;
  font-weight: 700;
  color: var(--green-text);
}

/* install walkthrough — recording slot; always light */
.install-media {
  grid-column: 1 / -1;
  padding: 40px 48px 52px;
}
.vid {
  margin: 0;
  background: var(--paper);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.vid-bar {
  display: flex;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}
.vid-stage {
  position: relative;
  aspect-ratio: 21 / 9;
  overflow: hidden;
}
.vid-stage video,
.vid-stage img.vid-live,
.vid-still {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.vid-play {
  position: absolute;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  width: 64px;
  height: 64px;
  border: none;
  border-radius: 50%;
  background: var(--green);
  color: var(--btn-fg);
  font-size: 20px;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 150ms ease, box-shadow 150ms ease;
}
.vid-play:hover:not(:disabled) {
  transform: scale(1.06);
  box-shadow: 0 0 0 4px var(--paper), 0 0 0 5.5px var(--green);
}
.vid-play:disabled {
  opacity: 0.55;
  cursor: default;
}
.vid-note {
  position: absolute;
  left: 14px;
  bottom: 10px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: rgba(23, 26, 23, 0.72);
  border-radius: 8px;
  padding: 4px 9px;
}
.vid-cap {
  margin-top: 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.vid.has-media .vid-note {
  display: none;
}

/* ---------- providers list ---------- */
.provlist {
  margin: 20px 48px 34px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.prow {
  display: grid;
  /* fixed px widths so .hd (10px) and data rows (12px) share geometry */
  grid-template-columns: 160px minmax(0, 380px) 70px 90px 130px 80px minmax(0, 1fr);
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 14px 26px;
  font-size: 13px;
}
.prow:last-child {
  border-bottom: none;
}
.prow:not(.hd) {
  transition: background 0.12s ease;
}
.prow:not(.hd):hover {
  background: var(--paper);
}
.prow.hd {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding-top: 12px;
  padding-bottom: 12px;
}
.prow .nm {
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}
/* logos sit on a white tile so dark marks stay readable on the dark theme */
.prow .nm img,
.fcell h3 img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 2px;
  flex: none;
}
.prow .ab {
  color: var(--ink);
}
.prow .tp {
  color: var(--ink-soft);
}
.prow .tp.local {
  color: var(--green-text);
  font-weight: 700;
}
.prow .au,
.prow .co {
  color: var(--ink-soft);
}
.prow a.dl {
  color: var(--green-text);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}
.prow a.dl:hover {
  text-decoration: underline;
}
.prow .lk {
  justify-self: end;
}
.prow a.lk {
  color: var(--ink-soft);
  font-weight: 600;
  text-decoration: none;
}
.prow a.lk:hover {
  color: var(--green-text);
}

/* ---------- tools map — always light ---------- */
.tools-wrap {
  margin: 20px 48px 0;
  height: 460px;
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.map-hint {
  padding: 12px 48px 18px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  text-transform: uppercase;
}
#aitools-details-panel {
  margin: 0 48px 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.details-card {
  background: var(--paper-2);
}
.details-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 14px 20px;
}
.details-header h3 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
}
#aitools-details-body {
  padding: 16px 20px;
}
#aitools-details-description {
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-soft);
}
#aitools-details-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
#aitools-details-list li {
  border-top: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 9px 10px;
  font-size: 12px;
}
#aitools-details-list li.details-clickable {
  cursor: pointer;
}
#aitools-details-list li.details-clickable:hover {
  background: var(--paper);
}
#aitools-details-list li strong {
  display: block;
  font-weight: 700;
}
#aitools-details-list li span {
  color: var(--ink-soft);
  font-size: 11px;
}
.badge-experimental {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border-radius: 10px;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 7px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.badge-component {
  color: #0891b2;
  background: rgba(8, 145, 178, 0.1);
  border-radius: 10px;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 7px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
#aitools-details-comps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 10px 0 4px;
}
#aitools-details-comps .comp-head {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  width: 100%;
}
#aitools-details-comps .comp-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  padding: 4px 9px 4px 5px;
  font-size: 11px;
  font-weight: 600;
}
#aitools-details-comps .comp-chip img {
  display: block;
}
#aitools-fallback {
  margin: 0 48px 24px;
  padding: 20px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  font-size: 12px;
}
#aitools-fallback ul {
  columns: 3;
}

/* docs reference row under the map */
.tools-ref {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 48px;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.tools-ref a {
  color: var(--green-text);
  text-decoration: none;
  white-space: nowrap;
}
.tools-ref a:hover {
  text-decoration: underline;
}

/* ---------- free band ---------- */
.freegrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 20px 48px 34px;
}
.fcell {
  position: relative;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 26px 26px 24px;
}
.fcell .flabel {
  display: inline-flex;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green-text);
  background: var(--soft);
  border-radius: 12px;
  padding: 4px 10px;
}
.fcell h3 {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 12px 0 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.fcell p {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.6;
}
.fcell .doclink {
  margin-top: 18px;
  padding: 7px 13px;
  font-size: 10px;
}
.fcell .flinks {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.fcell .flinks .doclink {
  margin-top: 0;
  margin-left: 0;
}

/* ---------- faq ---------- */
.faqlist {
  margin: 20px 48px 34px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.qa {
  display: grid;
  grid-template-columns: 1fr 2fr;
  border-bottom: 1px solid var(--line);
  padding: 20px 26px;
}
.qa:nth-child(odd) {
  background: var(--paper-2);
}
.qa:last-child {
  border-bottom: none;
}
.qa .q {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.qa .an {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.6;
}
.qa .an a {
  color: var(--green-text);
  border-bottom: 1.5px solid var(--green);
  font-weight: 600;
  text-decoration: none;
}
.qa .an ul {
  margin: 8px 0 0;
  padding-left: 18px;
  list-style: square;
}
.qa .an li {
  margin-bottom: 7px;
}
.qa .an li:last-child {
  margin-bottom: 0;
}
.qa .an li::marker {
  color: var(--green);
}
.qa .an li b {
  color: var(--ink);
  font-weight: 700;
}

/* ---------- community CTA (final band) ---------- */
.cta-final {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(80% 90% at 85% 110%, #f0f4da 0%, rgba(240, 244, 218, 0) 62%),
    var(--paper-2);
}
/* canopy arches behind the closing band */
.cta-final::before {
  content: '';
  position: absolute;
  left: 6%;
  bottom: -22%;
  width: 300px;
  height: 340px;
  border-radius: 999px 999px 22px 22px;
  background: var(--paper-3);
  opacity: 0.8;
}
.cta-final::after {
  content: '';
  position: absolute;
  right: 8%;
  top: -30%;
  width: 220px;
  height: 300px;
  border-radius: 999px 999px 18px 18px;
  background: var(--paper-3);
  opacity: 0.55;
}
.cta-inner {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
  padding: 72px 48px;
}
.cta-inner h2 {
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.06;
  letter-spacing: -0.04em;
  font-weight: 700;
  margin: 22px 0 16px;
}
.cta-inner h2 .kw {
  color: var(--green-text);
}
.cta-inner p {
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.65;
  max-width: 560px;
  margin: 0 auto;
}
.cta-btns {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 34px;
}
.cta-btns .vbtn {
  background: var(--paper);
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}
.cta-btns .vbtn.primary {
  background: var(--green);
  border-color: var(--green);
}
.cta-btns .vbtn:hover {
  background: var(--paper);
}
.cta-btns .vbtn.primary:hover {
  background: var(--green);
  box-shadow: 0 0 0 3px var(--paper-2), 0 0 0 4.5px var(--green);
}

/* ---------- v2 footer ---------- */
.vfooter {
  border-top: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  padding: 0;
  margin-top: 0;
  position: relative;
}
.foot-grid {
  display: grid;
  grid-template-columns: 4fr 2fr 2fr 2fr 2fr;
}
.foot-grid > div {
  padding: 36px 28px;
}
.foot-grid h5 {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 14px;
}
.foot-grid a {
  display: block;
  font-size: 13px;
  font-weight: 500;
  padding: 4px 0;
  color: var(--ink);
  text-decoration: none;
}
.foot-grid a:hover {
  color: var(--green-text);
  text-decoration: underline;
}
.foot-brand {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.foot-note {
  font-size: 11px;
  color: var(--ink-soft);
  margin-top: 14px;
  line-height: 1.7;
}
.foot-btn {
  display: block;
  width: 100%;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 4px 0;
  color: var(--ink);
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
}
.foot-btn:hover {
  color: var(--green-text);
  text-decoration: underline;
}
.foot-bottom {
  border-top: 1px solid var(--line);
  padding: 14px 28px;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-soft);
  display: flex;
  justify-content: space-between;
}
.foot-theme {
  position: absolute;
  right: 28px;
  bottom: 52px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 8px 13px;
  cursor: pointer;
}
.foot-theme:hover {
  color: var(--ink);
  border-color: var(--line-strong);
}
.foot-theme .sw {
  width: 10px;
  height: 10px;
  flex: none;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ink) 50%, var(--paper) 50%);
  border: 1px solid var(--line-strong);
}

/* ---------- consent banner (canopy restyle of general.css rules) ---------- */
.consent-banner {
  background: var(--paper);
  color: var(--ink);
  border-top: 1px solid var(--line);
  border-bottom: none;
  box-shadow: 0 -12px 30px -18px rgba(34, 58, 40, 0.35);
  font-size: 13px;
  gap: 16px;
}
.consent-banner a {
  color: var(--green-text);
}
.consent-banner .actions {
  gap: 8px;
}
.consent-banner .btn {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 16px 16px 16px 5px;
  padding: 9px 22px;
  border: 1.5px solid var(--line-strong);
}
.consent-banner .btn-primary {
  background: var(--green);
  border-color: var(--green);
  color: var(--btn-fg);
}
.consent-banner .btn-primary:hover {
  box-shadow: 0 0 0 3px var(--paper), 0 0 0 4.5px var(--green);
}
.consent-banner .btn-outline {
  background: transparent;
  color: var(--ink);
}
.consent-banner .btn-outline:hover {
  background: var(--paper-2);
  color: var(--ink);
}

/* ---------- three ways to work ---------- */
.ways-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 20px 48px 34px;
}
.waycard {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 26px 28px 28px;
}
.waycard .wn {
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  color: var(--btn-fg);
  background: var(--green);
  border-radius: 12px 12px 12px 4px;
  padding: 5px 10px;
  align-self: flex-start;
}
.waycard h3 {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 14px 0 8px;
}
.waycard p {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.6;
}
.wshot {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  margin-top: 16px;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
}
.waycard .doclink {
  margin-top: 16px;
  align-self: flex-start;
}

/* real captures inside the shot/minishot slots replace the note */
.minishot .ghview {
  top: 24px;
}
.shot-body:has(.ghview) .shot-note,
.minishot:has(.ghview) .mnote {
  display: none;
}

/* ---------- gh canvas viewer ---------- */
/* Shared zoom/pan renderer for example captures — see js/ghcanvas.js.
   Zoomable/pannable capture areas keep a fixed light surface in both
   themes so screenshots stay readable — see the token scope below. */
.ghview {
  position: absolute;
  inset: 0;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
}
.ghview.panning {
  cursor: grabbing;
}
.ghview > img {
  position: absolute;
  top: 0;
  left: 0;
  max-width: none;
  max-height: none;
  transform-origin: 0 0;
  user-select: none;
  -webkit-user-drag: none;
}
.ghview-hint {
  position: absolute;
  right: 8px;
  bottom: 6px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 3px 8px;
  pointer-events: none;
  opacity: 0.9;
}

/* ---------- always-light media surfaces ----------
   Zoom/pan captures and the tools map keep a fixed light palette in both
   themes (screenshots and node colors are drawn for a light canvas). */
.shot,
.minishot,
.wshot,
.vid,
.ghview,
.tools-wrap,
#aitools-tooltip {
  --paper: #f7f9f4;
  --paper-2: #eef2e8;
  --paper-3: #e2ead8;
  --soft: #e4ecdc;
  --ink: #222b23;
  --ink-soft: #5c685e;
  --line: #dde4d4;
  --line-strong: #b9c7ae;
  --green-text: #2d5a3d;
  --wire: #cfd8c6;
  --accent: #c67e39;
  --btn-fg: #fff;
  color-scheme: light;
}
.shot,
.minishot,
.wshot,
.vid,
.ghview {
  background: var(--paper);
}
.tools-wrap {
  background: var(--paper-2);
}

/* ---------- responsive ---------- */
@media (max-width: 640px) {
  .vnav-cta {
    padding: 9px 14px;
    font-size: 10px;
    white-space: nowrap;
  }
  .hero-constellation {
    min-height: 220px;
  }
  .vnav-brand {
    padding: 14px;
    font-size: 15px;
  }
  .tools-ref,
  .resband {
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* The MCP flow row (5 fixed-width boxes + links) overflows its absolute slot
   between the single-column breakpoint and ~1130px — wrap it like the mobile rule. */
@media (min-width: 961px) and (max-width: 1130px) {
  .flow {
    flex-wrap: wrap;
    align-content: center;
    row-gap: 10px;
  }
  .flink {
    width: 1.5px;
    height: 18px;
  }
  .flink::after {
    content: '▾';
    right: -4px;
    top: 7px;
  }
}

@media (max-width: 960px) {
  .hero,
  .showcase,
  .showcase.rev,
  #ghjson + .showcase,
  .install {
    grid-template-columns: 1fr;
  }
  .showcase .copy,
  .visual,
  .install .copy,
  .install-media,
  .steps,
  .repocard,
  .shot,
  .codepanel {
    min-width: 0;
  }
  .hero-constellation {
    min-height: 360px;
  }
  .visual {
    min-height: 340px;
  }
  .shot,
  .codepanel,
  .flow,
  .repocard {
    position: relative;
    inset: 0;
    margin: 16px;
    min-height: 300px;
  }
  .badges {
    grid-template-columns: repeat(3, 1fr);
  }
  .kf-grid,
  .freegrid,
  .ways-grid {
    grid-template-columns: 1fr;
    padding: 16px 24px 28px;
  }
  .prow {
    grid-template-columns: repeat(4, 1fr);
    row-gap: 4px;
  }
  .prow .nm,
  .prow .ab {
    grid-column: 1 / -1;
    margin-bottom: 2px;
  }
  .prow a.lk {
    grid-column: 1 / -1;
    justify-self: start;
  }
  .prow.hd {
    display: none;
  }
  .qa {
    grid-template-columns: 1fr;
    row-gap: 6px;
    padding: 18px 22px;
  }
  .vnav-links {
    display: none;
  }
  .tools-wrap {
    margin: 20px 16px 0;
    height: 360px;
  }
  #aitools-details-panel,
  #aitools-fallback {
    margin: 0 16px 24px;
  }
  .provlist,
  .faqlist {
    margin: 16px 16px 28px;
  }
  .map-hint {
    padding-left: 16px;
    padding-right: 16px;
  }
  .sec-head,
  .hero-copy,
  .showcase .copy,
  .install .copy,
  .cta-inner {
    padding-left: 24px;
    padding-right: 24px;
  }
  .step {
    padding-right: 24px;
  }
  .step .sn {
    margin-left: 24px;
  }
  .install-media {
    padding: 28px 16px 36px;
  }
  .vid-stage {
    aspect-ratio: 16 / 9;
  }
  #aitools-fallback ul {
    columns: 1;
  }
  .foot-grid {
    grid-template-columns: 1fr 1fr;
  }
  .flow {
    flex-wrap: wrap;
    gap: 10px;
    padding: 20px;
  }
  .flink {
    width: 1.5px;
    height: 26px;
  }
  .flink::after {
    content: '▾';
    right: -4px;
    top: 10px;
  }
  .resband a {
    flex: 1 0 40%;
  }
}
