@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=IBM+Plex+Sans:ital,wght@0,300;0,400;0,500;0,600;1,400&display=swap');

:root {
  --bg:           #ffffff;
  --bg-subtle:    #f6f8fa;
  --bg-card:      #f0f3f6;
  --bg-inset:     #f0f3f6;
  --border:       #d0d7de;
  --border-hi:    #8c959f;
  --text:         #1f2328;
  --text-dim:     #656d76;
  --text-faint:   #9ca3af;
  --blue:         #0969da;
  --blue-light:   #ddf4ff;
  --blue-mid:     #0550ae;
  --orange:       #bc4c00;
  --yellow:       #9a8f32;
  --yellow-light: #f2efb4;
  --green:        #62933c;
  --green-light:  #d5f9d1;
  --orange-light: #fff1e5;
  --mono:         'IBM Plex Mono', 'Fira Code', monospace;
  --sans:         'IBM Plex Sans', system-ui, sans-serif;
  /* Sticky site header — fragment scrolls leave headings visible below it */
  --sticky-nav-height: 4.75rem;
  --radius-block: 6px;
  /* Terminal / player panels (asciinema, TUI chat) */
  --terminal-bg:     #1e2228;
  --terminal-border: #30363d;
  --terminal-head-bg: #252a32;
  --terminal-muted: #8b949e;
  --terminal-fg:    #c9d1d9;
  --terminal-accent: #58a6ff;
}

html {
  scroll-padding-top: var(--sticky-nav-height);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.7;
}

/* ── Nav ──────────────────────────────────────────────────────── */

nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0.85rem 2rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-logo {
  font-family: var(--mono);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo span { color: var(--text-dim); font-weight: 400; }
.nav-logo-img { height: 1.1em; width: auto; vertical-align: middle; margin-left: 0.35em; opacity: 0.85; }

.nav-links {
  display: flex;
  gap: 1.25rem;
  list-style: none;
  flex: 1;
}

.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.1s;
}

.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--blue); }

.nav-actions {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  flex-shrink: 0;
}

.nav-button {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  text-decoration: none;
  border: 1px solid var(--border);
  padding: 0.3rem 0.7rem;
  transition: border-color 0.1s, color 0.1s, background-color 0.1s;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}

.nav-button:hover {
  border-color: var(--border-hi);
  color: var(--text);
  text-decoration: none;
}

.nav-button-icon {
  width: 0.95rem;
  height: 0.95rem;
  flex-shrink: 0;
}

/* ── Layout ───────────────────────────────────────────────────── */

main { max-width: 1140px; margin: 0 auto; padding: 0 2rem; }

section { padding: 3.5rem 0; }

section + section { border-top: 1px solid var(--border); }

main > section:first-child {
  border-top: none;
}

.section-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--text-faint);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

h1 {
  font-family: var(--sans);
  font-size: clamp(1.75rem, 4vw, 2.6rem);
  font-weight: 600;
  line-height: 1.2;
  color: var(--text);
  letter-spacing: -0.02em;
}

h2 {
  font-family: var(--sans);
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
  letter-spacing: -0.01em;
  margin-bottom: 0.75rem;
}

h3 {
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4rem;
}

p { color: var(--text-dim); margin-bottom: 0.9rem; }
p:last-child { margin-bottom: 0; }

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

/* ── Utilities (replace ad-hoc inline styles) ─────────────────── */

.measure-readable { max-width: 560px; }

.doc-page-title {
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
  line-height: 1.25;
}

.doc-lede {
  font-size: 0.875rem;
  color: var(--text-dim);
  margin-bottom: 2rem;
}

.doc-section-intro {
  font-size: 0.875rem;
  color: var(--text-dim);
  margin-bottom: 1rem;
}

.fine-print {
  font-size: 0.78rem;
  color: var(--text-faint);
}

.prose-small {
  font-size: 0.85rem;
  color: var(--text-dim);
}

.page-intro-lede {
  margin-top: 0.75rem;
  font-size: 0.975rem;
  max-width: 560px;
}

.install-lead {
  margin-bottom: 0.6rem;
}

/* Vertical spacing helpers (avoid inline margins) */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 0.6rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 0.9rem; }
.mb-wide { margin-bottom: 2rem; }

.stack-forward {
  margin-top: 1.25rem;
}

.section-heading-tight {
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
}

.two-col--player {
  align-items: start;
  grid-template-columns: 1fr auto;
}

.vibe-intro {
  padding-bottom: 2rem;
}

.callout-spaced {
  margin-top: 0.75rem;
}

/* ── Code ─────────────────────────────────────────────────────── */

code {
  font-family: var(--mono);
  font-size: 0.82em;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.1em 0.35em;
}

/* Default: light inset blocks (marketing + docs). Real terminals use .ap-wrapper. */
pre {
  font-family: var(--mono);
  font-size: 0.82rem;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius-block);
  overflow-x: auto;
  line-height: 1.5;
  color: var(--text);
}

pre code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

/* CLI snippets (hljs `github` theme + overrides below) */
pre.cmd {
  margin: 0.75rem 0;
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-block);
  border: 1px solid var(--border);
  background: var(--bg-inset);
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text);
}

pre.cmd code {
  display: block;
  background: none !important;
  border: none !important;
  padding: 0 !important;
  font-size: inherit;
  line-height: inherit;
}

pre.cmd code.hljs {
  background: transparent !important;
  padding: 0 !important;
}

/* JSON / YAML samples */
pre.json-out,
pre.data-block {
  margin: 0.75rem 0;
  font-size: 0.78rem;
  padding: 0.65rem 0.85rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-block);
  overflow-x: auto;
  line-height: 1.45;
  color: var(--text);
}

pre.json-out code,
pre.data-block code,
pre.json-out code.hljs,
pre.data-block code.hljs {
  background: transparent !important;
  padding: 0 !important;
  font-size: inherit;
  line-height: inherit;
}

/* ── Cards ────────────────────────────────────────────────────── */

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  margin-top: 1.75rem;
}

.card {
  background: var(--bg);
  padding: 1.5rem;
}

.card h3 { color: var(--text); }
.card p { font-size: 0.85rem; }

@media (max-width: 700px) { .card-grid { grid-template-columns: 1fr; } }
@media (min-width: 701px) and (max-width: 960px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }

/* ── Steps ────────────────────────────────────────────────────── */

.steps { display: flex; flex-direction: column; margin-top: 1.75rem; }

.step {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 1.25rem;
  align-items: start;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
}

.step:last-child { border-bottom: 1px solid var(--border); }

.step-num {
  font-family: var(--mono);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-faint);
  line-height: 1;
  padding-top: 0.2rem;
}

.step-body h3 { font-size: 0.95rem; margin-bottom: 0.3rem; }
.step-body p  { font-size: 0.85rem; margin-bottom: 0.6rem; }
.step-body pre:not(.cmd) { margin-top: 0.5rem; font-size: 0.78rem; }
.step-body pre.cmd { margin-top: 0.5rem; }

/* ── Install box ──────────────────────────────────────────────── */

.install-box {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: var(--radius-block);
  padding: 0.7rem 1.1rem;
  font-family: var(--mono);
  font-size: 0.875rem;
  margin-top: 1.75rem;
  color: var(--text);
}

.install-box .prompt {
  color: var(--text-faint);
  user-select: none;
  line-height: 1.5;
  padding-top: 0.06em;
}

.install-box-lines {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  line-height: 1.45;
}

/* ── Tags ─────────────────────────────────────────────────────── */

.tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.68rem;
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 0.2em 0.55em;
  letter-spacing: 0.03em;
}

.tag-blue { border-color: #a5c8f0; color: var(--blue); background: var(--blue-light); }
.tag-yellow { border-color: #cdc266; color: var(--yellow); background: var(--yellow-light); }
.tag-green { border-color: #90be6d; color: var(--green); background: var(--green-light); }

/* ── Table ────────────────────────────────────────────────────── */

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-top: 1rem;
}

th {
  text-align: left;
  color: var(--text-dim);
  font-weight: 500;
  border-bottom: 1px solid var(--border);
  padding: 0.45rem 0.75rem 0.45rem 0;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

td {
  padding: 0.55rem 0.75rem 0.55rem 0;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  color: var(--text-dim);
}

td:first-child {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text);
  white-space: nowrap;
}

tr:last-child td { border-bottom: none; }

/* ── Terminal player wrapper ─────────────────────────────────── */

.ap-wrapper {
  border: 1px solid var(--terminal-border);
  background: var(--terminal-bg);
  overflow: hidden;
  /* suppress any zoom/scale transitions from asciinema player */
  transform: none;
}

.ap-wrapper * { transition-property: none !important; }

.ap-wrapper .asciinema-player { max-width: 100% !important; }

/* ── Hero ─────────────────────────────────────────────────────── */

.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: stretch;
  padding: 3.5rem 0;
}

.hero-text .tagline {
  font-size: 1rem;
  color: var(--text-dim);
  margin-top: 1rem;
  max-width: 420px;
  line-height: 1.65;
}

.hero-terminal {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.hero-logo-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: left;
  padding: 0.25rem 0 0.65rem;
}

.hero-logo-inner {
  position: relative;
  display: inline-block;
}

.logo-credit {
  position: absolute;
  bottom: -1rem;
  right: 0;
  font-size: 0.65rem;
  color: var(--text-faint);
  opacity: 0.6;
  pointer-events: none;
  white-space: nowrap;
}

.hero-logo {
  width: auto;
  max-width: min(260px, 100%);
  max-height: 160px;
  object-fit: contain;
}

/* ── Terminal slideshow ────────────────────────────────────────── */

.slideshow-wrap { position: relative; }

/* First child stays in normal flow to size the container */
.slideshow-slide:not(:first-child) {
  position: absolute;
  top: 0; left: 0; right: 0;
}

.slideshow-slide {
  transition: opacity 0.6s;
}

.slideshow-slide:not(.active) {
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 800px) {
  .hero { grid-template-columns: 1fr; gap: 2rem; }
}

/* ── Workflow section (index) ─────────────────────────────────── */

.two-col--workflow {
  align-items: start;
}

.workflow-bom-preview {
  border: 1px solid var(--border);
  border-radius: var(--radius-block);
  overflow: hidden;
  background: var(--bg);
  box-shadow: 0 2px 8px rgba(31, 35, 40, 0.06);
}

.workflow-bom-cap {
  padding: 0.42rem 0.85rem;
  background: var(--terminal-head-bg);
  border-bottom: 1px solid var(--terminal-border);
}

.workflow-bom-cmd {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--terminal-muted);
  letter-spacing: 0.03em;
}

.workflow-bom-doc {
  padding: 1rem 1.15rem 1.15rem;
  border-top: 1px solid var(--bg-subtle);
}

.workflow-bom-h1 {
  font-family: var(--sans);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.15rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.workflow-bom-lede {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin: 0 0 0.65rem;
  line-height: 1.4;
}

.workflow-bom-summary {
  font-size: 0.78rem;
  color: var(--text);
  margin: 0 0 1rem;
  line-height: 1.45;
}

.workflow-bom-h2 {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  margin: 0 0 0.5rem;
}

.workflow-bom-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-inset);
}

.workflow-bom-table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 0.7rem;
  line-height: 1.35;
}

.workflow-bom-table thead th {
  text-align: left;
  padding: 0.45rem 0.5rem;
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.workflow-bom-table thead th.num {
  text-align: right;
}

.workflow-bom-table tbody td {
  padding: 0.42rem 0.5rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: top;
}

.workflow-bom-table tbody tr:last-child td {
  border-bottom: none;
}

.workflow-bom-table tbody tr:nth-child(even) td {
  background: var(--bg-subtle);
}

.workflow-bom-table td.num {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.workflow-bom-table td.num.price {
  color: var(--text);
  font-weight: 500;
}

.workflow-bom-table td.num.warn {
  color: var(--orange);
  font-weight: 500;
}

.workflow-bom-table td.note {
  color: var(--text-dim);
  max-width: 11rem;
  hyphens: auto;
}

.workflow-bom-table .ref {
  font-weight: 600;
  color: var(--blue-mid);
}

.workflow-bom-table code {
  font-size: 0.65rem;
  padding: 0.05em 0.28em;
}

.workflow-bom-truncate {
  margin: 0.75rem 0 0;
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--text-dim);
}

.workflow-bom-dim {
  color: var(--text-faint);
}

/* ── Callout ──────────────────────────────────────────────────── */

.callout {
  border: 1px solid #f5c68a;
  border-left: 3px solid var(--orange);
  background: var(--orange-light);
  padding: 0.9rem 1.1rem;
  font-size: 0.875rem;
  color: var(--text);
  margin: 1.25rem 0;
  position: relative;
}

.callout strong { color: var(--orange); }

.callout-blue {
  border-color: #a5c8f0;
  border-left-color: var(--blue);
  background: var(--blue-light);
}

.callout-blue strong { color: var(--blue-mid); }

/* ── Copy button ──────────────────────────────────────────────── */

.copy-btn {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-dim);
  cursor: pointer;
  transition: background 0.1s, color 0.1s;
}

.copy-btn:hover  { background: var(--bg-card); color: var(--text); }
.copy-btn.copied { color: var(--blue); border-color: #a5c8f0; }

/* ── Analysis card ────────────────────────────────────────────── */

.analysis-card {
  border: 1px solid #ddd5c0;
  background: #faf7f1;
  margin: 1.25rem 0;
}

.analysis-card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 1.1rem;
  border-bottom: 1px solid #ece5d4;
  flex-wrap: wrap;
}

.analysis-part-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.analysis-part-name a { color: var(--blue); }

.analysis-meta {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--text-faint);
}

.analysis-body {
  position: relative;
}

.analysis-body.collapsed .analysis-rendered {
  max-height: 230px;
  overflow: hidden;
}

.analysis-fade {
  display: none;
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 90px;
  background: linear-gradient(to bottom, transparent, #faf7f1);
  pointer-events: none;
}

.analysis-body.collapsed .analysis-fade { display: block; }

.analysis-expand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem;
  border-top: 1px solid #ece5d4;
  cursor: pointer;
  font-size: 0.78rem;
  color: var(--text-dim);
  background: transparent;
  width: 100%;
  border-left: none;
  border-right: none;
  border-bottom: none;
  font-family: var(--sans);
  transition: color 0.1s, background 0.1s;
}

.analysis-expand:hover { color: var(--text); background: #f3ede3; }

.analysis-expand .arrow {
  font-size: 0.9rem;
  transition: transform 0.2s;
  display: inline-block;
}

.analysis-expand.open .arrow { transform: rotate(180deg); }

.analysis-rendered {
  padding: 1.1rem 1.4rem;
  font-size: 0.875rem;
  line-height: 1.7;
  overflow-x: auto;
}

.analysis-rendered h1 { font-size: 1.15rem; margin: 0 0 0.9rem; border-bottom: 1px solid #e0d8c8; padding-bottom: 0.5rem; }
.analysis-rendered h2 { font-size: 0.95rem; margin: 1.5rem 0 0.4rem; color: var(--text); }
.analysis-rendered h3 { font-size: 0.875rem; margin: 1rem 0 0.3rem; color: var(--text); }
.analysis-rendered p  { margin-bottom: 0.7rem; color: var(--text-dim); }
.analysis-rendered ul, .analysis-rendered ol { padding-left: 1.5rem; margin-bottom: 0.7rem; color: var(--text-dim); }
.analysis-rendered li { margin-bottom: 0.2rem; }
.analysis-rendered code { font-family: var(--mono); font-size: 0.82em; background: #efe8d8; border: 1px solid #ddd5c0; padding: 0.1em 0.35em; color: var(--text); }
.analysis-rendered pre { background: var(--terminal-bg); border: 1px solid var(--terminal-border); padding: 0.75rem 1rem; color: #e6edf3; font-size: 0.8rem; overflow-x: auto; margin: 0.75rem 0; }
.analysis-rendered pre code { background: none; border: none; padding: 0; color: inherit; }
.analysis-rendered table { width: 100%; border-collapse: collapse; font-size: 0.82rem; margin: 0.75rem 0 1rem; }
.analysis-rendered th { text-align: left; border-bottom: 2px solid #ddd5c0; padding: 0.4rem 0.75rem 0.4rem 0; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-dim); }
.analysis-rendered td { padding: 0.4rem 0.75rem 0.4rem 0; border-bottom: 1px solid #ece5d4; color: var(--text-dim); vertical-align: top; }
.analysis-rendered tr:last-child td { border-bottom: none; }
.analysis-rendered blockquote { border-left: 3px solid #ddd5c0; padding-left: 0.9rem; color: var(--text-faint); margin: 0.5rem 0; font-style: italic; }
.analysis-rendered hr { border: none; border-top: 1px solid #ddd5c0; margin: 1.25rem 0; }
.analysis-rendered strong { color: var(--text); font-weight: 600; }

/* ── Two-col ──────────────────────────────────────────────────── */

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

@media (max-width: 700px) { .two-col { grid-template-columns: 1fr; } }

/* ── Agent badges ─────────────────────────────────────────────── */

.agent-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
}

/* ── Prompt list ──────────────────────────────────────────────── */

.prompt-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.prompt-item {
  font-size: 0.83rem;
  font-family: var(--mono);
  color: var(--text-dim);
  border: 1px solid var(--border);
  padding: 0.5rem 0.75rem;
  background: var(--bg-subtle);
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 0.6rem;
  row-gap: 0.4rem;
  align-items: start;
  cursor: pointer;
  user-select: none;
}

.prompt-item:hover { background: var(--bg-card); }

.prompt-item::before {
  content: '▸';
  color: var(--blue);
  line-height: 1.45;
  display: inline-block;
  transition: transform 0.15s;
  grid-column: 1;
  grid-row: 1;
}

.prompt-item-label {
  grid-column: 2;
  grid-row: 1;
  line-height: 1.45;
  min-width: 0;
}

.prompt-item.open::before { transform: rotate(90deg); }

.prompt-cmd {
  display: none;
  grid-column: 1 / -1;
  padding: 0.45rem 0.7rem;
  font-family: var(--mono);
  font-size: 0.74rem;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: var(--radius-block);
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.55;
}

/* Undo global `code` inset chrome inside prompt rows */
.prompt-item code.prompt-cmd {
  border: none;
  font-size: 0.74rem;
}

.prompt-cmd.hljs {
  background: var(--bg-inset) !important;
  padding: 0.45rem 0.7rem !important;
}

.prompt-item.open .prompt-cmd { display: block; }

/* ── Example prompts as chat bubbles (index landing) ─────────── */

.prompt-bubbles {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
  margin-top: 0.45rem;
  width: 100%;
}

.prompt-bubble {
  margin: 0;
  max-width: 95%;
  padding: 0.4rem 0.65rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--text-dim);
  font-family: var(--sans);
}

/* ── Feature rows ─────────────────────────────────────────────── */

.feature-rows {
  border: 1px solid var(--border);
  margin-top: 1.5rem;
}

.feature-row {
  display: grid;
  grid-template-columns: 175px 1fr 320px;
  gap: 1.5rem;
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  align-items: start;
}

.feature-row:last-child { border-bottom: none; }

.feature-row:nth-child(even) { background: var(--bg-subtle); }

.feature-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  padding-top: 0.1rem;
}

.feature-name small {
  display: block;
  font-weight: 400;
  font-size: 0.72rem;
  color: var(--text-faint);
  margin-top: 0.15rem;
}

.feature-desc {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.6;
}

/* Feature grid: same shell styling as pre.cmd */
pre.cmd.feature-code {
  margin: 0;
}

@media (max-width: 800px) {
  .feature-row { grid-template-columns: 1fr; gap: 0.5rem; }
  .feature-code { display: none; }
}

/* ── Footer ───────────────────────────────────────────────────── */

footer {
  border-top: 1px solid var(--border);
  padding: 1.75rem 2rem;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-faint);
}

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

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

/* ── Player block (examples page) ────────────────────────────── */

.player-block {
  margin: 1.25rem 0 1.75rem;
  overflow-x: auto;
}

.player-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-faint);
  margin-bottom: 0.35rem;
}

/* ── Getting-started page ─────────────────────────────────────── */

.guide-url {
  font-family: var(--mono);
  font-size: 0.8rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--orange);
  padding: 0.5rem 0.9rem;
  display: inline-block;
  margin: 0.5rem 0;
  word-break: break-all;
}

.checklist { list-style: none; padding: 0; margin: 1rem 0; }

.checklist li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-size: 0.875rem;
  color: var(--text-dim);
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.checklist li:last-child { border-bottom: none; }

.checklist li::before {
  content: '○';
  color: var(--text-faint);
  font-family: var(--mono);
  flex-shrink: 0;
  line-height: 1.6;
}

.task-group { margin-bottom: 2rem; }

.task-group h3 {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-faint);
  margin-bottom: 0.6rem;
}

/* ── Doc layout ───────────────────────────────────────────────── */

.doc-layout {
  display: grid;
  grid-template-columns: minmax(15.5rem, 17.5rem) minmax(0, 1fr);
  gap: 2.5rem 3rem;
  align-items: start;
  padding: 2.5rem 0;
}

@media (max-width: 700px) {
  .doc-layout { grid-template-columns: 1fr; }
  .doc-nav { display: none; }
}

/* Sidebar TOC: not the site header <nav> — reset global nav row layout */
.doc-nav {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 0;
  border: none;
  background: transparent;
  position: sticky;
  top: var(--sticky-nav-height);
  z-index: 1;
}

.doc-nav-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.45;
  margin-bottom: 0.85rem;
}

.doc-nav ul { list-style: none; }
.doc-nav li + li { margin-top: 0.35rem; }

.doc-nav a {
  font-size: 0.84rem;
  color: var(--text-dim);
  text-decoration: none;
  display: block;
  padding: 0.28rem 0 0.28rem 0.75rem;
  line-height: 1.38;
  border-left: 2px solid transparent;
  transition: border-color 0.1s, color 0.1s;
}

.doc-nav a:hover  { color: var(--text); border-left-color: var(--border-hi); }
.doc-nav a.active { color: var(--blue); border-left-color: var(--blue); }

/* Let long code/pre in the article shrink the text column correctly */
.doc-content { min-width: 0; }

.doc-content h1 { font-size: 1.5rem; margin-bottom: 0.4rem; }

.doc-content h1.doc-page-title {
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
}

.doc-content h2 {
  font-size: 1.1rem;
  margin-top: 2.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
}

.doc-content h2:first-child { margin-top: 0; border-top: none; padding-top: 0; }

.doc-content h3 { font-size: 0.9rem; margin-top: 1.25rem; }

.doc-content p  { font-size: 0.875rem; margin-bottom: 0.8rem; }

.doc-content pre { margin: 0.9rem 0; }

.doc-content ul, .doc-content ol {
  padding-left: 1.4rem;
  margin-bottom: 0.9rem;
  color: var(--text-dim);
  font-size: 0.875rem;
}

.doc-content li { margin-bottom: 0.2rem; }

.doc-content table { margin: 0.75rem 0 1.75rem; }

/* Per-command examples (examples.html) */
.doc-content .example-item {
  margin: 0.85rem 0 1.35rem;
}
.doc-content .example-item pre.cmd {
  margin: 0 0 0.4rem;
}
.doc-content .example-item .ex {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-dim);
  line-height: 1.55;
}
.doc-content .example-item .ex strong {
  color: var(--text);
  font-weight: 500;
}
.doc-content .example-item .out-label {
  margin: 0.55rem 0 0.3rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-faint);
}
.doc-content .example-item pre.out {
  margin: 0;
  font-size: 0.76rem;
  padding: 0.55rem 0.85rem;
  background: var(--bg-subtle);
  border: 1px dashed var(--border);
  border-radius: var(--radius-block);
  color: var(--text);
  line-height: 1.4;
}
.doc-content .example-item pre.out code.hljs,
.doc-content .example-item pre.out code.nohighlight {
  padding: 0;
  background: transparent !important;
  font-size: inherit;
  color: inherit;
}
.doc-content .example-item pre.json-out {
  margin: 0;
}
