/* Code Graph — extends Renso styles.css.
   Product subdomain at cg.renso.ai. Light variant by default, signal green
   for live/active state. v2: simplified — no decorative hero graph, no FAQ,
   no language table, no pricing toggle. Forms get breathing room. */

:root {
  --cg-graph-bg: #f3f1ea;
  --cg-graph-line: rgba(10,10,10,0.16);
  --cg-graph-node: #0a0a0a;
  --cg-graph-active: #15803d;
  --cg-graph-active-fill: rgba(21,128,61,0.10);
  --cg-graph-dim: rgba(10,10,10,0.20);
  --cg-radius: 18px;
  --cg-radius-lg: 24px;
}

[data-variant="dark"] {
  --r-bg: #0a0a0a;
  --r-ink: #ffffff;
  --r-ink-2: rgba(255,255,255,0.72);
  --r-ink-3: rgba(255,255,255,0.48);
  --r-ink-4: rgba(255,255,255,0.28);
  --r-line: rgba(255,255,255,0.08);
  --r-line-2: rgba(255,255,255,0.14);
  --r-chip: rgba(255,255,255,0.04);
  --r-accent: #c8ff4a;
  --r-accent-ink: #0a0a0a;
  --r-signal: #9bff3a;
  --cg-graph-bg: rgba(255,255,255,0.025);
  --cg-graph-line: rgba(255,255,255,0.18);
  --cg-graph-node: #ffffff;
  --cg-graph-active: #9bff3a;
  --cg-graph-active-fill: rgba(155,255,58,0.12);
  --cg-graph-dim: rgba(255,255,255,0.18);
}

/* sticky marketing nav (separate from the lab pages) */
.cg-marketing-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in oklab, var(--r-bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
}

/* ─── product brand block ─────────────────────────────── */
.cg-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--r-ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.cg-brand img { width: 32px; height: 32px; border-radius: 8px; display: block; }

.cg-brand .product {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.cg-brand .product::before {
  content: "";
  width: 1px;
  height: 18px;
  background: var(--r-line-2);
  display: inline-block;
}

.cg-brand .product .renso {
  color: var(--r-ink-3);
  font-weight: 500;
}

.r-navcta { white-space: nowrap; }

.r-navlinks a { white-space: nowrap; }

/* Tighten nav at intermediate widths so links don't wrap */
@media (max-width: 1100px) {
  .r-navlinks { gap: 22px; }
  .r-navlinks a { font-size: 13px; }
}

/* ─── HERO ──────────────────────────────────────────────
   Two columns: copy left, a small sample-output card right. No decorative
   graph. The card is roomy and quiet so it doesn't compete with H1. */
.cg-hero {
  padding: clamp(80px, 12vh, 144px) 0 clamp(80px, 10vh, 120px);
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(48px, 7vw, 104px);
  align-items: center;
}

.cg-hero__copy { display: grid; gap: 32px; align-content: start; }

.cg-hero h1 {
  font-size: clamp(48px, 6vw, 88px);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.035em;
  margin: 0;
}

.cg-hero h1 em { font-style: normal; color: var(--r-ink-3); }

.cg-hero__lead {
  font-size: 17px;
  line-height: 1.55;
  color: var(--r-ink-2);
  max-width: 48ch;
  margin: 0;
  text-wrap: pretty;
}

.cg-hero__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.cg-hero__chips {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  font-family: var(--r-mono);
  font-size: 11px;
  color: var(--r-ink-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.cg-hero__chips b {
  font-weight: 600;
  color: var(--r-ink);
  padding: 5px 10px;
  border: 1px solid var(--r-line-2);
  border-radius: 999px;
  letter-spacing: 0.04em;
}

/* sample output card — restrained, no animation */
.cg-card {
  background: var(--r-bg);
  border: 1px solid var(--r-line);
  border-radius: var(--cg-radius-lg);
  padding: 24px 28px 28px;
  display: grid;
  gap: 18px;
  box-shadow: 0 1px 0 var(--r-line) inset;
}

.cg-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--r-mono);
  font-size: 10.5px;
  color: var(--r-ink-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--r-line);
}

.cg-card__head .dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--cg-graph-active);
  margin-right: 8px;
  vertical-align: middle;
}

.cg-card__body {
  display: grid;
  gap: 14px;
  font-family: var(--r-mono);
  font-size: 13px;
  line-height: 1.4;
}

.cg-card__body .row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  align-items: baseline;
}

.cg-card__body .row:first-child {
  grid-template-columns: 14px 1fr;
  padding-bottom: 8px;
  margin-bottom: 4px;
  border-bottom: 1px dashed var(--r-line);
}

.cg-card__body .prompt { color: var(--r-ink-3); }
.cg-card__body .cmd { color: var(--r-ink); font-weight: 600; }
.cg-card__body .key {
  color: var(--r-ink-3);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.cg-card__body .val { color: var(--r-ink); }
.cg-card__body .val.tag-med {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--cg-graph-active-fill);
  color: var(--cg-graph-active);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  justify-self: start;
}

/* ─── 6-UP FEATURE GRID ────────────────────────────────
   3 columns × 2 rows. Cells have a top hairline only, so nothing touches
   anything; generous vertical gap. */
.cg-fourup {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 56px 48px;
}

.cg-fourup__cell {
  display: grid;
  gap: 16px;
  padding-top: 28px;
  border-top: 1px solid var(--r-line);
  max-width: 44ch;
}

.cg-fourup__cell .idx {
  font-family: var(--r-mono);
  font-size: 11px;
  color: var(--r-ink-3);
  letter-spacing: 0.06em;
}

.cg-fourup__cell h3 {
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0;
}

.cg-fourup__cell p {
  font-size: 15px;
  line-height: 1.55;
  color: var(--r-ink-2);
  margin: 0;
}

/* ─── INTERACTIVE EXPLORER ─────────────────────────────
   Generous outer card. Inner viz card and panel get their own padding so
   their edges never touch. */
.cg-explorer {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(32px, 4vw, 56px);
  align-items: start;
}

.cg-explorer__viz {
  position: relative;
  aspect-ratio: 1 / 0.55;
  background: var(--cg-graph-bg);
  border: 1px solid var(--r-line);
  border-radius: var(--cg-radius-lg);
  overflow: hidden;
}

.cg-explorer__viz svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.cg-explorer__chrome {
  position: absolute;
  top: 0; left: 0; right: 0;
  padding: 18px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--r-mono);
  font-size: 10.5px;
  color: var(--r-ink-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  pointer-events: none;
  z-index: 2;
}

.cg-explorer__chrome .dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--cg-graph-active);
  margin-right: 8px;
  vertical-align: middle;
}

.cg-explorer__hint {
  position: absolute;
  left: 22px;
  bottom: 18px;
  font-family: var(--r-mono);
  font-size: 10.5px;
  color: var(--r-ink-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  pointer-events: none;
  z-index: 2;
}

.cg-explorer__panel {
  display: grid;
  align-content: start;
  gap: 28px;
}

.cg-explorer__panel h3 {
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 4px 0 0;
  font-family: var(--r-mono);
}

.cg-explorer__panel p {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--r-ink-2);
  margin: 0;
  max-width: 40ch;
  text-wrap: pretty;
}

.cg-explorer__stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  padding: 22px 0;
  border-top: 1px solid var(--r-line);
  border-bottom: 1px solid var(--r-line);
}

.cg-explorer__stats .cell { display: grid; gap: 8px; }

.cg-explorer__stats .k {
  font-family: var(--r-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--r-ink-3);
}

.cg-explorer__stats .v {
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.cg-explorer__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0;
  counter-reset: cg-list;
}

.cg-explorer__list li {
  counter-increment: cg-list;
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 14px;
  align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px solid var(--r-line);
  font-size: 13.5px;
}

.cg-explorer__list li:first-child { padding-top: 0; }
.cg-explorer__list li:last-child { border-bottom: none; }

.cg-explorer__list li::before {
  content: counter(cg-list, decimal-leading-zero);
  font-family: var(--r-mono);
  font-size: 10.5px;
  color: var(--r-ink-3);
  letter-spacing: 0.04em;
}

.cg-explorer__list .file {
  font-family: var(--r-mono);
  color: var(--r-ink);
  font-size: 13px;
}

.cg-explorer__list .kind {
  font-family: var(--r-mono);
  color: var(--r-ink-3);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* graph svg — nodes + edges + label backings */
.cg-graph .edge {
  stroke: var(--cg-graph-line);
  stroke-width: 1.1;
  fill: none;
  transition: stroke 200ms ease, stroke-width 200ms ease, opacity 200ms ease;
}

.cg-graph .edge.dim { opacity: 0.4; }
.cg-graph .edge.active {
  stroke: var(--cg-graph-active);
  stroke-width: 1.6;
}

.cg-graph .node circle {
  fill: var(--r-bg);
  stroke: var(--cg-graph-node);
  stroke-width: 1.4;
  transition: fill 200ms ease, stroke 200ms ease;
}

.cg-graph .node.dim circle { stroke: var(--cg-graph-dim); }
.cg-graph .node.active circle {
  fill: var(--cg-graph-active);
  stroke: var(--cg-graph-active);
}
.cg-graph .node.focus circle {
  fill: var(--cg-graph-node);
  stroke: var(--cg-graph-node);
}

/* label bg rect — sits behind text to mask edges */
.cg-graph .node rect.label-bg {
  fill: var(--cg-graph-bg);
  rx: 3;
  stroke: none;
}

.cg-graph .node text {
  font-family: var(--r-mono);
  font-size: 13px;
  fill: var(--r-ink-2);
  text-anchor: middle;
  pointer-events: none;
  letter-spacing: 0.02em;
  text-transform: lowercase;
  dominant-baseline: middle;
  /* halo masks edges that pass behind the label */
  paint-order: stroke;
  stroke: var(--cg-graph-bg);
  stroke-width: 5;
  stroke-linejoin: round;
}

.cg-graph .node.dim text { fill: var(--r-ink-4); }
.cg-graph .node.focus text,
.cg-graph .node.active text { fill: var(--r-ink); font-weight: 600; }

.cg-graph .node.dim text { fill: var(--r-ink-4); }
.cg-graph .node.focus text,
.cg-graph .node.active text { fill: var(--r-ink); font-weight: 600; }

.cg-graph .node { cursor: pointer; outline: none; }
.cg-graph .node:focus-visible circle {
  stroke-dasharray: 3 2;
  stroke-width: 2;
}

/* ─── INSTALL ──────────────────────────────────────────
   Single full-width terminal — copy is in the section head. Adds breathing
   on each pane row and the supported-languages chip rail. */
.cg-term {
  background: var(--cg-graph-bg);
  border: 1px solid var(--r-line);
  border-radius: var(--cg-radius-lg);
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
}

.cg-term__tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--r-line);
  overflow-x: auto;
  scrollbar-width: none;
  background: var(--r-bg);
}

.cg-term__tabs::-webkit-scrollbar { display: none; }

.cg-term__tabs button {
  background: transparent;
  border: 0;
  font-family: var(--r-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--r-ink-3);
  padding: 18px 22px;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  transition: color 160ms ease;
}

.cg-term__tabs button:hover { color: var(--r-ink-2); }

.cg-term__tabs button[aria-selected="true"] {
  color: var(--r-ink);
  font-weight: 600;
}

.cg-term__tabs button[aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: -1px;
  height: 2px;
  background: var(--r-ink);
}

.cg-term__body {
  padding: 32px 28px;
  font-family: var(--r-mono);
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--r-ink-2);
  display: grid;
  gap: 6px;
  position: relative;
  overflow-x: auto;
  scrollbar-width: thin;
  min-height: 200px;
}

.cg-term__body > [data-pane] {
  display: grid;
  gap: 6px;
}

.cg-term__body > [data-pane] > div { white-space: nowrap; }

.cg-term__body .prompt { color: var(--r-ink-3); user-select: none; margin-right: 6px; }
.cg-term__body .cmd { color: var(--r-ink); font-weight: 500; }
.cg-term__body .out { color: var(--r-ink-3); }
.cg-term__body .ok { color: var(--cg-graph-active); }

.cg-term__body[data-active] > [data-pane]:not([data-active-pane]) { display: none; }

.cg-copy {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--r-bg);
  border: 1px solid var(--r-line-2);
  border-radius: 999px;
  padding: 7px 14px;
  font-family: var(--r-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--r-ink-2);
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
  z-index: 1;
}

.cg-copy:hover { color: var(--r-ink); border-color: var(--r-ink); }
.cg-copy[data-state="copied"] {
  color: var(--cg-graph-active);
  border-color: var(--cg-graph-active);
}

/* language chip rail — separates from terminal with a real gap */
.cg-langs {
  margin-top: 40px;
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  font-family: var(--r-mono);
  font-size: 11px;
  color: var(--r-ink-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.cg-langs b {
  font-weight: 500;
  color: var(--r-ink-2);
  padding: 6px 12px;
  border: 1px solid var(--r-line);
  border-radius: 999px;
  letter-spacing: 0.04em;
}

/* "Also includes" chip rail — secondary capabilities */
.cg-also {
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--r-line);
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  font-family: var(--r-mono);
  font-size: 11px;
  color: var(--r-ink-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.cg-also b {
  font-weight: 500;
  color: var(--r-ink-2);
  padding: 7px 13px;
  background: var(--r-chip);
  border-radius: 999px;
  letter-spacing: 0.04em;
}

/* nav sign-in link sits next to the CTA */
.r-navlinks .signin {
  color: var(--r-ink-3);
}
.r-navlinks .signin:hover { color: var(--r-ink); }

/* ─── MCP ──────────────────────────────────────────────
   Tool rows separated by hairlines, not all-around borders. */
.cg-mcp {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(48px, 6vw, 88px);
  align-items: start;
}

.cg-mcp h2 {
  font-size: clamp(36px, 4.2vw, 60px);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 22px 0 22px;
}

.cg-mcp > div > p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--r-ink-2);
  max-width: 42ch;
  margin: 0;
}

.cg-mcp__tools {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0;
  border-top: 1px solid var(--r-line);
}

.cg-mcp__tools li {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.6fr);
  gap: 32px;
  align-items: baseline;
  padding: 22px 0;
  border-bottom: 1px solid var(--r-line);
}

.cg-mcp__tools code {
  font-family: var(--r-mono);
  font-size: 14px;
  color: var(--r-ink);
  font-weight: 500;
}

.cg-mcp__tools p {
  margin: 0;
  font-size: 14px;
  color: var(--r-ink-2);
  line-height: 1.55;
}

/* ─── PRICING ──────────────────────────────────────────
   Card has consistent inner padding; list items separated, never adjacent
   to the card border. */
.cg-pricing {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(48px, 6vw, 96px);
  align-items: start;
}

.cg-pricing__copy h2 {
  font-size: clamp(40px, 5vw, 72px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.03em;
  margin: 22px 0 24px;
}

.cg-pricing__copy p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--r-ink-2);
  max-width: 40ch;
  margin: 0;
  text-wrap: pretty;
}

.cg-pricing__card {
  border: 1px solid var(--r-line-2);
  border-radius: var(--cg-radius-lg);
  padding: clamp(32px, 3.6vw, 48px);
  display: grid;
  gap: 32px;
  background: var(--r-bg);
}

.cg-pricing__cardhead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.cg-pricing__cardhead .label {
  font-family: var(--r-mono);
  font-size: 11px;
  color: var(--r-ink-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.cg-pricing__cardhead .badge {
  font-family: var(--r-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cg-graph-active);
  background: var(--cg-graph-active-fill);
  padding: 6px 12px;
  border-radius: 999px;
}

.cg-pricing__price {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
}

.cg-pricing__price .amount {
  font-size: clamp(72px, 8vw, 112px);
  line-height: 1;
  font-weight: 500;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.cg-pricing__price .unit {
  font-family: var(--r-mono);
  font-size: 12px;
  color: var(--r-ink-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.cg-pricing__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
}

.cg-pricing__list li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 14px;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid var(--r-line);
  font-size: 14.5px;
  color: var(--r-ink-2);
  line-height: 1.5;
}

.cg-pricing__list li > span { min-width: 0; }

.cg-pricing__list li:first-child { padding-top: 0; }
.cg-pricing__list li:last-child { border-bottom: none; padding-bottom: 0; }

.cg-pricing__list li::before {
  content: "✓";
  display: inline-block;
  font-family: var(--r-mono);
  font-size: 14px;
  color: var(--cg-graph-active);
  line-height: 1.5;
}

.cg-pricing__cta {
  display: grid;
  gap: 12px;
  margin-top: 4px;
}

.cg-pricing__cta .r-btn {
  justify-content: center;
  height: 54px;
  font-size: 15px;
  width: 100%;
}

.cg-pricing__fineprint {
  font-family: var(--r-mono);
  font-size: 10.5px;
  color: var(--r-ink-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: center;
}

.cg-cta-row { display: flex; gap: 12px; margin-top: 8px; flex-wrap: wrap; }

/* ─── CHECKOUT FORM ────────────────────────────────────
   Spacious sheet. Inputs get real vertical rhythm; their borders never sit
   against the sheet border. Summary rows use spacing, not stacked borders. */
.cg-checkout {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(10,10,10,0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none;
  place-items: start center;
  padding: 48px 24px;
  overflow-y: auto;
}

.cg-checkout[data-open="true"] {
  display: grid;
}

.cg-checkout__sheet {
  width: min(460px, 100%);
  background: var(--r-bg);
  border: 1px solid var(--r-line-2);
  border-radius: var(--cg-radius-lg);
  padding: 36px 36px 36px;
  display: grid;
  gap: 28px;
  box-shadow: 0 30px 80px -20px rgba(10,10,10,0.45);
  margin: auto;
}

/* removed: sheet transform is animated via cg-slideUp keyframes */

.cg-checkout__sheet header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.cg-checkout__sheet header h3 {
  font-size: 22px;
  letter-spacing: -0.015em;
  font-weight: 500;
  margin: 0;
  line-height: 1.2;
}

.cg-checkout__sheet .close {
  background: transparent;
  border: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  color: var(--r-ink-3);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 160ms ease, color 160ms ease;
}

.cg-checkout__sheet .close:hover {
  background: var(--r-chip);
  color: var(--r-ink);
}

/* summary uses spacing, not double-stacked borders */
.cg-checkout__sheet .summary {
  display: grid;
  gap: 12px;
  padding: 20px 22px;
  background: var(--r-chip);
  border-radius: 14px;
  font-size: 13.5px;
  color: var(--r-ink-2);
}

.cg-checkout__sheet .summary .row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: baseline;
  white-space: nowrap;
}

.cg-checkout__sheet .summary .row.total {
  font-size: 15px;
  color: var(--r-ink);
  font-weight: 600;
  padding-top: 12px;
  border-top: 1px solid var(--r-line);
  margin-top: 4px;
}

/* form — generous spacing between fields, real breathing before submit */
.cg-checkout__sheet form {
  display: grid;
  gap: 20px;
  padding-top: 4px;
}

.cg-checkout__sheet label {
  display: grid;
  gap: 10px;
  font-family: var(--r-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--r-ink-3);
}

.cg-checkout__sheet input {
  width: 100%;
  height: 48px;
  border-radius: 12px;
  border: 1px solid var(--r-line-2);
  background: var(--r-bg);
  padding: 0 16px;
  font: inherit;
  color: var(--r-ink);
  font-size: 15px;
  letter-spacing: -0.005em;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.cg-checkout__sheet input::placeholder {
  color: var(--r-ink-4);
  font-family: var(--r-mono);
  font-size: 13.5px;
  letter-spacing: 0;
  text-transform: none;
}

.cg-checkout__sheet input:hover { border-color: var(--r-ink-3); }
.cg-checkout__sheet input:focus {
  border-color: var(--r-ink);
  box-shadow: 0 0 0 3px var(--r-chip);
}

.cg-checkout__sheet .row-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.cg-checkout__sheet form > button[type="submit"] {
  margin-top: 16px;
  height: 56px;
  font-size: 15px;
}

.cg-checkout__success {
  text-align: center;
  display: grid;
  gap: 18px;
  padding: 16px 0 4px;
}

.cg-checkout__success[hidden] { display: none; }

.cg-checkout__success .check {
  margin: 0 auto;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--cg-graph-active-fill);
  color: var(--cg-graph-active);
  font-size: 26px;
}

/* ─── TOAST ────────────────────────────────────────────── */
.cg-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--r-ink);
  color: var(--r-bg);
  padding: 12px 20px;
  border-radius: 999px;
  font-family: var(--r-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0;
  transition: opacity 200ms ease, transform 200ms ease;
  pointer-events: none;
  z-index: 80;
}

.cg-toast[data-show="true"] {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ─── responsive (single breakpoint) ───────────────────
   Everything fluid above 880px. Below, all 2-col grids fall to 1-col. */
@media (max-width: 1080px) {
  .cg-fourup { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 44px 40px; }
}

@media (max-width: 880px) {
  .r-nav {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px 18px;
    align-items: center;
    height: auto;
    min-height: 72px;
    padding-block: 12px;
  }

  .cg-brand {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
  }

  .r-navlinks {
    grid-column: 1 / -1;
    grid-row: 2;
    display: flex;
    min-width: 0;
    gap: 22px;
    margin-inline: calc(-1 * var(--r-gutter));
    padding: 2px var(--r-gutter) 10px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .r-navlinks::-webkit-scrollbar { display: none; }

  .r-navlinks a {
    flex: 0 0 auto;
    font-size: 13px;
  }

  .r-navcta {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    height: 34px;
    padding-inline: 14px;
    font-size: 12.5px;
  }

  .cg-hero,
  .cg-explorer,
  .cg-mcp,
  .cg-pricing { grid-template-columns: 1fr; }

  .cg-fourup { grid-template-columns: 1fr; gap: 36px; }

  .r-sec__head { grid-template-columns: 1fr; gap: 24px; }

  .cg-explorer__stats { grid-template-columns: repeat(2, 1fr); gap: 18px 24px; }
}

/* very narrow — hide the eyebrow-meta side of section heads */
@media (max-width: 560px) {
  .cg-hero {
    padding: 56px 0 64px;
    gap: 32px;
  }

  .cg-hero h1 {
    font-size: 42px;
    line-height: 1;
  }

  .cg-hero__actions .r-btn,
  .cg-cta-row .r-btn {
    width: 100%;
    justify-content: center;
  }

  .cg-card {
    padding: 20px;
    border-radius: 18px;
  }

  .cg-card__body .row { grid-template-columns: 1fr; gap: 4px; }
  .cg-card__body .row:first-child { grid-template-columns: 14px 1fr; }
  .cg-hero__chips { font-size: 10.5px; }

  .cg-explorer__viz { aspect-ratio: 1 / 0.72; }

  .cg-explorer__chrome {
    padding: 14px 16px;
    font-size: 9.5px;
  }

  .cg-explorer__hint {
    left: 16px;
    bottom: 14px;
    font-size: 9.5px;
  }

  .cg-explorer__list li {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 8px 12px;
  }

  .cg-explorer__list .kind { grid-column: 2; }

  .cg-term__tabs button { padding: 14px 16px; }

  .cg-term__body {
    padding: 52px 18px 24px;
    font-size: 12.5px;
    min-height: 180px;
  }

  .cg-copy {
    top: 12px;
    right: 12px;
  }

  .cg-mcp__tools li {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 18px 0;
  }

  .cg-mcp__tools code { overflow-wrap: anywhere; }

  .cg-pricing__card {
    padding: 24px 20px;
    border-radius: 18px;
  }

  .cg-pricing__price .amount { font-size: 64px; }

  .cg-checkout { padding: 20px 16px; }

  .cg-checkout__sheet { padding: 28px 22px; }

  .cg-checkout__sheet .summary .row {
    grid-template-columns: 1fr;
    gap: 4px;
    white-space: normal;
  }

  .cg-checkout__sheet .row-pair { grid-template-columns: 1fr; }
}

.cg-checkout__note {
  font-family: var(--r-sans);
  font-size: 12px;
  line-height: 1.5;
  color: var(--r-ink-3);
  text-align: center;
  text-transform: none;
  letter-spacing: -0.005em;
  margin: 2px 0 0;
}
