/* ──────────────────────────────────────────────
   Guide page extensions
   ────────────────────────────────────────────── */

.crumbs {
  display: flex; gap: 8px; align-items: center;
  font-family: var(--f-mono); font-size: 11px;
  color: var(--muted); letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 28px;
}
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.crumbs .sep { color: var(--rule); }

.guide-hero {
  padding-top: 64px;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--rule);
}
.guide-hero .row {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 64px;
  align-items: end;
}
.guide-hero .num {
  font-family: var(--f-mono); font-size: 13px;
  letter-spacing: 0.08em; color: var(--cyto-fg);
  display: inline-flex; align-items: center; gap: 10px;
  margin-bottom: 16px;
}
.guide-hero .num::before { content: ""; width: 28px; height: 1px; background: var(--cyto); display: inline-block; }
.guide-hero h1 { font-size: clamp(40px, 5vw, 64px); }
.guide-hero h1 em { font-style: italic; color: var(--cyto-fg); font-weight: 400; }
.guide-hero .lede { font-family: var(--f-serif); font-size: 19px; color: var(--ink-2); margin-top: 26px; max-width: 640px; line-height: 1.45; }

.guide-hero .meta-card {
  border: 1px solid var(--ink);
  padding: 22px;
  font-family: var(--f-mono); font-size: 12px;
}
.guide-hero .meta-card .h {
  font-family: var(--f-mono); font-size: 11px;
  color: var(--muted); text-transform: uppercase;
  letter-spacing: 0.08em;
  padding-bottom: 10px; margin-bottom: 14px;
  border-bottom: 1px solid var(--rule);
}
.guide-hero .meta-card .kv {
  display: grid; grid-template-columns: 110px 1fr;
  gap: 10px; padding: 6px 0;
  border-bottom: 1px dashed var(--rule);
}
.guide-hero .meta-card .kv:last-child { border-bottom: 0; }
.guide-hero .meta-card .kv dt { color: var(--muted); }
.guide-hero .meta-card .kv dd { margin: 0; color: var(--ink); }

/* ── Steps (vertical) ───────────────────────────────────── */
.steps {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 0;
  margin-top: 28px;
}
.steps .ix {
  border-right: 1px solid var(--rule);
  padding-right: 24px;
  padding-top: 4px;
}
.steps .ix .lbl {
  font-family: var(--f-mono); font-size: 11px;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted);
}
.steps .ix .nm { font-family: var(--f-serif); font-size: 28px; margin-top: 4px; }
.steps .bd {
  padding-left: 32px;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--rule);
}
.steps .row + .row .ix,
.steps .row + .row .bd { padding-top: 56px; }
.steps .row { display: contents; }

/* ── IO terminal ───────────────────────────────────────── */
.terminal {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: 4px;
  font-family: var(--f-mono); font-size: 12.5px;
  overflow: hidden;
}
.terminal .hdr {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.terminal .hdr .dots { display: inline-flex; gap: 6px; }
.terminal .hdr .dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--rule-2); display: inline-block; }
.terminal .bd { padding: 16px 18px; }
.terminal .bd .pr { color: var(--muted); }
.terminal .bd .ok { color: var(--cyto-fg); }
.terminal .bd .warn { color: var(--amber); }
.terminal .bd .err { color: var(--crimson); }
.terminal .bd .k { color: var(--dapi); }
.terminal .bd .s { color: var(--cyto-fg); }
.terminal .bd .n { color: var(--amber); }
.terminal .bd .c { color: var(--muted); }
.terminal .bd .line { white-space: pre-wrap; }

/* ── Dataset chooser ───────────────────────────────────── */
.choose {
  display: grid; gap: 12px;
}
.choose .opt {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--rule);
  background: var(--paper);
  cursor: pointer;
  align-items: center;
  font-family: var(--f-sans);
  border-radius: 4px;
  text-align: left;
  color: var(--ink);
}
.choose .opt:hover { background: var(--paper-2); border-color: var(--ink-2); }
.choose .opt.sel { border-color: var(--ink); background: var(--paper-2); }
.choose .opt .radio {
  width: 16px; height: 16px; border-radius: 50%;
  border: 1.5px solid var(--ink-2);
  display: grid; place-items: center;
}
.choose .opt.sel .radio::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--cyto); }
.choose .opt .nm { font-family: var(--f-serif); font-size: 16px; }
.choose .opt .sub { font-family: var(--f-mono); font-size: 11px; color: var(--muted); margin-top: 2px; letter-spacing: 0.04em; }
.choose .opt .pill { font-family: var(--f-mono); font-size: 10px; }

.runbar {
  margin-top: 22px;
  display: flex; gap: 10px; align-items: center;
  font-family: var(--f-mono); font-size: 11px;
  color: var(--muted);
}
.runbar .btn { font-family: var(--f-sans); }
.runbar .btn[disabled] { opacity: 0.4; cursor: not-allowed; pointer-events: none; }

/* ── Output panel ─────────────────────────────────────── */
.output {
  margin-top: 28px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
}
.output .figbox { border: 1px solid var(--rule); background: var(--paper); padding: 18px; }
.output .figbox .cap { font-family: var(--f-mono); font-size: 10.5px; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 12px; }
.output .figbox .fig-placeholder { min-height: 340px; }

.output .side { font-family: var(--f-mono); font-size: 12px; }
.output .side .kv { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--rule); }
.output .side .kv dt { color: var(--muted); }
.output .side .kv dd { margin: 0; color: var(--ink); }
.output .side .actions { display: flex; gap: 8px; margin-top: 18px; }
.output .side .actions .btn { font-size: 12px; padding: 8px 12px; }

/* ── Run progress ─────────────────────────────────────── */
.progress {
  margin-top: 18px;
  border: 1px solid var(--rule);
  background: var(--paper);
  border-radius: 4px;
  padding: 14px 16px;
  font-family: var(--f-mono); font-size: 12px;
}
.progress .ph { display: grid; grid-template-columns: 90px 1fr 80px; gap: 14px; padding: 4px 0; align-items: center; color: var(--muted); }
.progress .ph .lbl { letter-spacing: 0.04em; }
.progress .ph .bar { height: 2px; background: var(--rule); position: relative; overflow: hidden; }
.progress .ph .bar::after {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0;
  background: var(--cyto); width: 0%;
  transition: width .4s ease-out;
}
.progress .ph.done .bar::after { width: 100%; }
.progress .ph.run .bar::after { width: 60%; }
.progress .ph.done { color: var(--ink); }
.progress .ph.run  { color: var(--ink); }
.progress .ph .v { text-align: right; color: var(--ink); }
.progress .ph.idle .v { color: var(--muted); }

/* ── FAQ ──────────────────────────────────────────────── */
.faq .qa { padding: 22px 0; border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: 200px 1fr; gap: 32px; }
.faq .qa h4 { font-family: var(--f-serif); font-weight: 500; font-size: 19px; margin: 0; }
.faq .qa p { margin: 0; color: var(--ink-2); }

/* ── Token strip / gene attention ─────────────────────── */
.token-strip {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(58px, 1fr);
  gap: 4px; padding: 12px; border: 1px solid var(--rule);
  background: var(--paper-2);
  font-family: var(--f-mono); font-size: 11px;
}
.token-strip .t {
  background: var(--paper); border: 1px solid var(--rule);
  padding: 8px 6px; text-align: center;
  position: relative;
}
.token-strip .t .g { font-size: 12px; color: var(--ink); }
.token-strip .t .v { font-size: 10px; color: var(--muted); margin-top: 2px; }
.token-strip .t .hl {
  position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: var(--cyto);
}
