/* style.css — Ramp AI Token Calculator: Ramp Web (Kirby) brand tokens + components */

/* ============ FONTS — TWK Lausanne, weight 400 only ============ */
@font-face {
  font-family: "TWK Lausanne";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("/ai-token-calculator/assets/fonts/TWKLausanne-400.woff2") format("woff2"),
    url("/ai-token-calculator/assets/fonts/TWKLausanne-400.woff") format("woff");
}

/* ============ DESIGN TOKENS (Ramp Web / Kirby) ============ */
:root {
  /* Type scale (rem) */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.25rem;
  --text-xl: 1.75rem;
  --text-2xl: 2.5rem;
  --text-3xl: 3.5rem;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Fonts — TWK Lausanne, weight 400 only. Hierarchy comes from size/color/spacing. */
  --font-display: "TWK Lausanne", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-body: "TWK Lausanne", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Surfaces */
  --color-bg: #ffffff;
  --color-surface: #ffffff;
  --color-surface-2: #f4f2f0; /* grayLight */
  --color-surface-offset: #f4f2f0; /* grayLight */
  --color-divider: #d2cecb; /* grayMedium / borderPrimary */
  --color-border: #d2cecb; /* grayMedium / borderPrimary */

  /* Text */
  --color-text: #0c0a08; /* textPrimary */
  --color-text-muted: oklch(0.1465 0.0057 69.2 / 60%); /* textHushed */
  --color-text-faint: #6e6a68; /* grayDark */
  --color-text-inverse: #ffffff;
  --color-text-inverse-hushed: rgba(255, 255, 255, 0.6); /* textHushedReverse */
  --color-text-inverse-faint: rgba(255, 255, 255, 0.5);
  --color-ink: #0c0a08;

  /* Primary (solar) — reserved for the single most important CTA on a view. Never a fill/background. */
  --color-primary: #e4f222;
  --color-primary-hover: #f5ff78; /* solarLight */
  --color-primary-active: #f5ff78;
  --color-primary-highlight: #e4ebf6; /* springLight, used for the "selected row" tint instead of solar */
  --color-primary-text: #0c0a08;

  /* Semantic */
  --color-constructive: #01a741;
  --color-destructive: #e96516; /* blaze — error states only */
  --color-secondary: #5683d2; /* spring — active/highlighted data state only, never text/chrome */
  --color-warning: #e96516; /* blaze */

  /* Data-viz sequence (Ramp secondary palette, in brand order: Spring, Eggplant, Mist, Blaze) */
  --color-blue: #5683d2; /* spring */
  --color-purple: #684162; /* eggplant */
  --color-orange: #e96516; /* blaze */
  --color-teal: #75876f; /* mist (approx) */
  --color-success: #01a741;
  --color-error: #e96516;

  /* Radius — 4px tags, 6px buttons/inputs, 8px cards, 12px pills/badges/containers. Never rounded-full on a container. */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;
  --radius-full: 9999px; /* pills/avatars only — never on a container */

  /* Motion */
  --transition-interactive: 200ms cubic-bezier(0.4, 0, 0.2, 1);

  /* No visible drop shadows on this site — hierarchy comes from tonal fills + spacing. */
  --shadow-sm: none;
  --shadow-md: none;
  --shadow-lg: none;

  /* Content widths */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;
  --content-full: 100%;
}

/* ============ LAYOUT PRIMITIVES ============ */
.wrap {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-6);
}
.wrap--narrow {
  max-width: var(--content-default);
}
section {
  padding-block: clamp(var(--space-10), 5vw, var(--space-16));
}
.section-head {
  max-width: 640px;
  margin-bottom: var(--space-8);
}
.eyebrow {
  display: block;
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
}
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.01em;
}
h2 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-3);
}
h3 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-2);
}
.section-sub {
  color: var(--color-text-muted);
  font-size: var(--text-base);
  max-width: 60ch;
}
.tabular {
  font-variant-numeric: tabular-nums;
}

/* ============ HEADER ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-divider);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--text-sm);
  color: var(--color-text);
  text-decoration: none;
}
.brand svg {
  width: auto;
  height: 24px;
  flex-shrink: 0;
}
.brand-name {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.brand-name small {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}
.nav-links a {
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--color-text);
  text-decoration: none;
}
.nav-links a:hover {
  color: var(--color-text-muted);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}
@media (max-width: 760px) {
  .nav-links {
    display: none;
  }
  .brand-name small {
    display: none;
  }
  .btn.btn-primary.btn-sm {
    padding: var(--space-2) var(--space-4);
  }
}

/* ============ BUTTONS ============ */
.btn-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 400;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: background-color var(--transition-interactive);
}
/* Primary — solid black fill, white text. The workhorse button. */
.btn-primary {
  background: var(--color-text);
  color: #ffffff;
}
.btn-primary:hover {
  background: oklch(from var(--color-text) l c h / 0.8);
}
/* Solar — reserved for the single most important CTA on the page. */
.btn-solar {
  background: var(--color-primary);
  color: var(--color-ink);
}
.btn-solar:hover {
  background: var(--color-primary-hover);
}
.btn-secondary {
  background: var(--color-surface-2);
  color: var(--color-text);
}
.btn-secondary:hover {
  background: var(--color-border);
}
.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-xs);
}

/* ============ HERO ============ */
.hero {
  padding-top: clamp(var(--space-10), 6vw, var(--space-16));
  padding-bottom: clamp(var(--space-8), 4vw, var(--space-10));
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: var(--space-10);
  align-items: stretch;
}
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .hero-media {
    display: none;
  }
}
.hero-media {
  min-height: 380px;
  overflow: hidden;
  border-radius: var(--radius-lg);
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}
.hero h1 {
  font-size: var(--text-2xl);
  max-width: 900px;
  margin-bottom: var(--space-4);
}
.hero .section-sub {
  font-size: var(--text-base);
  max-width: 560px;
}
.hero-actions {
  display: flex;
  gap: var(--space-4);
  margin-top: var(--space-6);
  flex-wrap: wrap;
}
/* ============ CARD — tonal fill, no border, no shadow ============ */
.card {
  background: var(--color-surface-2);
  border-radius: var(--radius-lg);
}

/* ============ CALCULATOR ============ */
.calc-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: var(--space-8);
  align-items: start;
}
.calc-grid > * {
  min-width: 0;
}
@media (max-width: 900px) {
  .calc-grid {
    grid-template-columns: 1fr;
  }
}
.calc-panel {
  padding: var(--space-8);
  min-width: 0;
}
.step-label {
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--color-text);
  margin-bottom: var(--space-4);
}
.step-label .step-num {
  color: var(--color-text-muted);
}
.field {
  margin-bottom: var(--space-6);
}
.field label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 400;
  margin-bottom: var(--space-2);
}
.hint {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-top: var(--space-2);
}
textarea,
input[type='number'],
select {
  width: 100%;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text);
}
textarea {
  min-height: 160px;
  resize: vertical;
  line-height: 1.5;
}
textarea:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--color-text);
  outline-offset: 1px;
  border-color: var(--color-text);
}
.input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}
@media (max-width: 520px) {
  .input-row {
    grid-template-columns: 1fr;
  }
}
.live-counts {
  display: flex;
  gap: var(--space-6);
  margin-top: var(--space-3);
  flex-wrap: wrap;
}
.live-counts .count {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.live-counts .count strong {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--color-text);
  font-weight: 400;
}

.live-indicator {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}
.live-dot {
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--color-blue);
  animation: live-pulse 1.8s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .live-dot { animation: none; }
}
@keyframes live-pulse {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}

/* Stat tiles (results) */
.stat-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}
@media (max-width: 640px) {
  .stat-tiles {
    grid-template-columns: 1fr;
  }
}
.stat-tile {
  padding: 0;
}
.stat-tile .label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-weight: 400;
  margin-bottom: var(--space-2);
}
.stat-tile .value {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 400;
  color: var(--color-text);
}
.stat-tiles .stat-tile:first-child .value {
  font-size: var(--text-2xl);
}
.stat-tiles {
  border-bottom: 1px solid var(--color-divider);
  padding-bottom: var(--space-6);
}

.compare-note {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
}
.compare-note strong {
  font-weight: 700;
  color: var(--color-text);
}

/* Results table */
.table-wrap {
  overflow-x: auto;
  overflow-y: auto;
  max-height: 460px;
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
}
table.results thead th {
  position: sticky;
  top: 0;
  z-index: 1;
}
table.results {
  width: 100%;
  font-size: var(--text-sm);
}
table.results th,
table.results td {
  padding: var(--space-3) var(--space-4);
  text-align: right;
  white-space: nowrap;
  border-bottom: 1px solid var(--color-divider);
}
table.results th:first-child,
table.results td:first-child {
  text-align: left;
  white-space: normal;
}
table.results thead th {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-weight: 400;
  background: var(--color-surface-2);
}
table.results tbody tr:last-child td {
  border-bottom: none;
}
table.results tbody tr.is-primary {
  background: var(--color-primary-highlight);
}
.model-name {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.model-name .provider {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}
.badge {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.01em;
  padding: 2px var(--space-2);
  border-radius: var(--radius-xl);
  margin-left: var(--space-2);
}
.badge-best {
  background: var(--color-surface-2);
  color: var(--color-text);
}
.badge-picked {
  background: var(--color-border);
  color: var(--color-text);
}

.chart-card {
  padding: var(--space-6);
  margin-top: var(--space-8);
}
.chart-card h3 {
  margin-bottom: var(--space-1);
}
.chart-card .section-sub {
  font-size: var(--text-sm);
  margin-bottom: var(--space-4);
}
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}
.chart-legend-item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 400;
  color: var(--color-text-muted);
}
.chart-legend-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.chart-legend-dot--ring {
  box-shadow: 0 0 0 1.5px var(--color-text);
}
.chart-canvas-wrap {
  position: relative;
  width: 100%;
}

/* ============ BENCHMARKS ============ */
.stat-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
  margin-bottom: var(--space-8);
}
@media (max-width: 800px) {
  .stat-row {
    grid-template-columns: 1fr;
  }
}
.big-stat {
  padding: var(--space-6);
}
.big-stat .value {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 400;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}
.big-stat .value .accent {
  color: var(--color-text);
}
.big-stat .desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
.compare-pair {
  display: flex;
  align-items: baseline;
  gap: var(--space-4);
  margin-bottom: var(--space-2);
}
.compare-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.compare-value {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 400;
  color: var(--color-text);
}
.compare-value.accent {
  color: var(--color-text);
}
.compare-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.compare-vs {
  font-size: var(--text-sm);
  color: var(--color-text-faint);
}

.chart-two-col {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--space-6);
  align-items: start;
}
.chart-two-col > * {
  min-width: 0;
}
@media (max-width: 900px) {
  .chart-two-col {
    grid-template-columns: 1fr;
  }
}

.io-ratio-viz {
  margin-top: var(--space-4);
}
.segment-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.segment-row .top {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  margin-bottom: var(--space-2);
}
.segment-row .top .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-secondary);
  flex-shrink: 0;
}
.segment-row .top .label {
  flex: 1;
}
.segment-row .top strong {
  font-family: var(--font-display);
  font-weight: 400;
}
.segment-track {
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--color-surface-offset);
  overflow: hidden;
}
.segment-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--color-secondary);
}

.source-note {
  margin-top: var(--space-8);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  max-width: 70ch;
}
.source-note a {
  color: var(--color-text-muted);
}

/* ============ MID CTA ============ */
.mid-cta-card {
  padding: clamp(var(--space-8), 5vw, var(--space-12));
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.mid-cta-card h2 {
  margin-bottom: var(--space-2);
}
.mid-cta-card .section-sub {
  max-width: 560px;
  margin-bottom: var(--space-6);
}

/* ============ CTA ============ */
.cta {
  background: var(--color-text);
  border-radius: var(--radius-xl);
  padding: clamp(var(--space-10), 6vw, var(--space-16));
  color: var(--color-text-inverse);
  text-align: center;
}
.cta h2 {
  color: var(--color-text-inverse);
}
.cta .section-sub {
  color: var(--color-text-inverse-hushed);
  margin-inline: auto;
}
.cta-actions {
  display: flex;
  justify-content: center;
  gap: var(--space-4);
  margin-top: var(--space-8);
  flex-wrap: wrap;
}
/* On the dark CTA section, the workhorse button inverts to white-on-black so it stays visible. */
.cta .btn-primary {
  background: #ffffff;
  color: var(--color-text);
}
.cta .btn-primary:hover {
  background: oklch(1 0 0 / 0.8);
}

.email-capture {
  display: flex;
  gap: var(--space-2);
  max-width: 480px;
  margin: var(--space-6) auto 0;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-md);
  padding: var(--space-2);
}
.email-capture input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  color: var(--color-text-inverse);
  padding: var(--space-2) var(--space-3);
}
.email-capture input::placeholder {
  color: var(--color-text-inverse-hushed);
}
.email-capture input:focus-visible {
  outline: none;
}
.email-capture .btn {
  flex-shrink: 0;
}
@media (max-width: 520px) {
  .email-capture {
    flex-direction: column;
  }
}
.form-status {
  max-width: 480px;
  margin: var(--space-3) auto 0;
  font-size: var(--text-sm);
  color: var(--color-text-inverse-hushed);
  text-align: center;
  min-height: 1.5em;
}
.form-status.is-error {
  color: var(--color-destructive);
}

/* ============ STEP CARD SELECTOR (replaces pill tabs) ============ */
.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}
.tab-btn {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface-2);
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--color-text-muted);
  text-align: left;
}
.tab-btn .tab-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.tab-btn[aria-selected='true'] {
  background: var(--color-surface);
  border-color: var(--color-text);
  color: var(--color-text);
}
.tab-panel[hidden] {
  display: none;
}

/* ============ FOOTER ============ */
.site-footer {
  background: var(--color-text);
  color: var(--color-text-inverse-hushed);
  padding-block: var(--space-10);
}
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-8);
  flex-wrap: wrap;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-text-inverse);
  font-size: var(--text-sm);
}
.footer-brand svg {
  width: auto;
  height: 20px;
}
.footer-links {
  display: flex;
  gap: var(--space-8);
  flex-wrap: wrap;
}
.footer-links a {
  font-size: var(--text-sm);
  color: var(--color-text-inverse-hushed);
  text-decoration: none;
}
.footer-links a:hover {
  color: var(--color-text-inverse);
}
.footer-disclaimer {
  font-size: var(--text-xs);
  color: var(--color-text-inverse-faint);
  margin-top: var(--space-8);
  max-width: 80ch;
}

/* ============ SKIP LINK ============ */
.skip-link {
  position: absolute;
  left: -9999px;
  top: var(--space-4);
  background: var(--color-primary);
  color: var(--color-ink);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  z-index: 100;
}
.skip-link:focus {
  left: var(--space-4);
}

/* ============ SHARE REPORT ============ */
.share-report {
  margin-top: var(--space-6);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-divider);
}
.share-report-label {
  font-size: var(--text-sm);
  margin-bottom: var(--space-3);
}
.share-report-actions {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.results-cta {
  margin-top: var(--space-6);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-divider);
}
.results-cta-label {
  font-size: var(--text-sm);
  margin-bottom: var(--space-3);
}
.email-capture--onlight {
  background: var(--color-surface-2);
  border-color: var(--color-divider);
  margin: 0;
}
.email-capture--onlight input {
  color: var(--color-text);
}
.email-capture--onlight input::placeholder {
  color: var(--color-text-faint);
}
.form-status--onlight {
  margin: var(--space-2) 0 0;
  color: var(--color-text-muted);
  text-align: left;
}

/* ============ TOKEN VISUALIZATION ============ */
.token-viz-wrap {
  margin-top: var(--space-4);
}
.token-viz-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}
.token-viz-note {
  color: var(--color-text-faint);
}
.token-viz {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: var(--text-sm);
  line-height: 1.7;
  padding: var(--space-3);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  max-height: 180px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
}
.token-viz-empty {
  color: var(--color-text-faint);
}
.token-viz-stat {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-2);
}
.disclosure {
  margin-top: var(--space-3);
  border: 1px dashed var(--color-divider);
  border-radius: var(--radius-md);
}
.disclosure > summary {
  list-style: none;
  cursor: pointer;
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.disclosure > summary::-webkit-details-marker {
  display: none;
}
.disclosure > summary::before {
  content: "\25B8";
  font-size: 0.65rem;
  transition: transform var(--transition-interactive);
}
.disclosure[open] > summary::before {
  transform: rotate(90deg);
}
.disclosure .disclosure-body {
  padding: 0 var(--space-3) var(--space-3);
}
.disclosure .token-viz-wrap {
  margin: 0 var(--space-3) var(--space-3);
}
.response-presets {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-bottom: var(--space-3);
}
.preset-btn {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface-2);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.preset-btn:hover {
  background: var(--color-border);
}
.preset-btn[aria-pressed='true'] {
  background: var(--color-surface);
  border-color: var(--color-text);
  color: var(--color-text);
}
.token-chunk {
  border-radius: 3px;
  padding: 0 1px;
}
/* Page chrome stays near-monochrome + one blue accent per brand — no purple/orange/teal or large solar fills here. */
.token-chunk.viz-0 { background: var(--color-surface-2); }
.token-chunk.viz-1 { background: var(--color-border); }

/* ============ INPUT/OUTPUT DEFINITION LIST ============ */
.io-def-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.io-def-row {
  padding-left: var(--space-4);
  border-left: 2px solid var(--color-border);
}
.io-def-row dt {
  font-size: var(--text-sm);
  color: var(--color-text);
  margin-bottom: 2px;
}
.io-def-row dd {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin: 0;
}

/* ============ HOW-TO / FAQ ============ */
.howto-list {
  padding-left: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.faq-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  margin-top: var(--space-6);
}
.faq-item {
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--color-divider);
}
.faq-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.faq-heading {
  font-size: var(--text-lg);
  margin: 0;
}
.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  width: 100%;
  padding: var(--space-2) 0;
  text-align: left;
  font-size: inherit;
  font-family: inherit;
  color: var(--color-text);
}
.faq-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--color-text-muted);
  transition: transform var(--transition-interactive);
}
.faq-question[aria-expanded='true'] .faq-icon {
  transform: rotate(180deg);
}
.faq-answer {
  padding-top: var(--space-3);
}
.faq-answer[hidden] {
  display: none;
}
