/* Two Minute Toolkit: one stylesheet for every page.
   Tokens are the ones twominutetimeline.com already uses. */
:root {
  --bg: #f7f8fa;
  --card: #ffffff;
  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --row-alt: #fafbfc;
  --text: #0f172a;
  --text-muted: #64748b;
  --text-soft: #94a3b8;
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-soft: #eef2ff;
  --danger: #ef4444;
  --danger-soft: #fef2f2;
  --code-bg: #0f172a;
  --code-text: #e2e8f0;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(15,23,42,0.04);
  --shadow-md: 0 4px 18px rgba(15,23,42,0.06), 0 1px 3px rgba(15,23,42,0.04);
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body { min-height: 100vh; display: flex; flex-direction: column; }
button, input, select, textarea { font-family: inherit; color: inherit; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── Brandbar ─────────────────────────────────────────── */
.brandbar {
  background: white;
  border-bottom: 1px solid var(--border);
  padding: 20px 28px 18px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  position: relative;
  z-index: 50;
}
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.9px;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand em { font-style: normal; color: var(--accent); }
.brand-mark { position: relative; display: inline-flex; flex-shrink: 0; }
.brand-logo { width: 32px; height: 32px; color: var(--accent); }
.brand-glyph {
  position: absolute;
  right: -7px;
  bottom: -5px;
  width: 16px;
  height: 16px;
  color: var(--accent);
  background: white;
  border-radius: 4px;
  padding: 1px;
  box-shadow: 0 0 0 1.5px white;
}
.brand-tag { font-size: 12.5px; color: var(--text-muted); margin-top: 5px; letter-spacing: 0.1px; }

.nav { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.nav-btn {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: white;
  cursor: pointer;
  transition: border-color .12s, color .12s, background .12s;
  white-space: nowrap;
  line-height: 1.2;
}
.nav-btn:hover, .nav-btn.active, .nav-menu.open .nav-btn {
  color: var(--accent); border-color: var(--accent); background: var(--accent-soft);
}
.nav-menu { position: relative; }
.nav-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  width: 320px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(15,23,42,0.12);
  padding: 6px;
}
.nav-menu.open .nav-dropdown { display: block; }
.menu-tool {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
}
.menu-tool:hover { background: var(--accent-soft); }
.menu-tool.current { background: var(--accent-soft); }
.menu-tool.current b::after { content: ' · current'; color: var(--accent); font-weight: 600; font-size: 11.5px; }
.menu-tool span { display: flex; flex-direction: column; gap: 2px; }
.menu-tool b { font-size: 13.5px; font-weight: 700; }
.menu-tool small { font-size: 12px; color: var(--text-muted); line-height: 1.35; }
.tool-glyph { width: 20px; height: 20px; color: var(--accent); flex-shrink: 0; margin-top: 1px; }
.menu-all {
  display: block;
  padding: 10px;
  margin-top: 4px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.menu-all:hover { text-decoration: underline; }

/* ── Buttons ──────────────────────────────────────────── */
.btn-primary, .btn-export {
  background: var(--accent);
  color: white;
  border: none;
  padding: 8px 18px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background .12s, transform .08s;
  letter-spacing: -0.1px;
  white-space: nowrap;
}
.btn-primary:hover, .btn-export:hover { background: var(--accent-hover); }
.btn-export:active { transform: translateY(1px); }
.btn-export:disabled { opacity: 0.55; cursor: default; }
.btn-secondary {
  background: white;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 7px 13px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color .12s, color .12s, background .12s;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.btn-lg { padding: 12px 22px; font-size: 14.5px; border-radius: 9px; }
.btn-ghost {
  background: none;
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.btn-ghost:hover { color: var(--accent); background: var(--accent-soft); }
.link-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 9px 6px;
  font-weight: 500;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
}
.link-btn:hover { color: var(--accent); text-decoration: underline; }
.btn-group { display: inline-flex; gap: 2px; }
.icon-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  background: white;
  border-radius: 7px;
  font-size: 16px;
  cursor: pointer;
  color: var(--text-muted);
}
.icon-btn:hover:not(:disabled) { color: var(--accent); border-color: var(--accent); }
.icon-btn:disabled { opacity: .4; cursor: default; }

/* ── Builder layout ───────────────────────────────────── */
.builder { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.command-strip {
  margin: 24px 32px 0;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  min-height: 54px;
}
.strip-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-wrap: nowrap; }
.strip-loading { color: var(--text-soft); font-size: 13px; }
.field { display: flex; align-items: center; gap: 7px; }
.field > label {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  white-space: nowrap;
}
.field input, .field select {
  background: white;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 13px;
  outline: none;
  width: 78px;
  transition: border-color .12s, box-shadow .12s;
}
.field select { width: auto; }
.field input:focus, .field select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79,70,229,0.12); }
.check-field {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: white;
}
.check-field:hover { border-color: var(--border-strong); }
.check-field input { margin: 0; cursor: pointer; accent-color: var(--accent); }

.seg {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #f1f3f7;
  padding: 2px;
}
.seg-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.seg-btn:hover { color: var(--text); }
.seg-btn.active { background: white; color: var(--accent); box-shadow: 0 1px 2px rgba(15,23,42,0.06); }

.workspace { flex: 1; display: flex; min-width: 0; align-items: flex-start; }
.canvas { flex: 1; min-width: 0; overflow-x: auto; padding: 18px 32px 40px; }
.canvas-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  min-width: min-content;
}
.chart-root { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.chart-loading {
  width: min(1280px, 100%);
  min-width: 640px;
  height: 360px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-soft);
}
.render-issues {
  background: var(--danger-soft);
  color: #991b1b;
  border: 1px solid #fecaca;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
}

/* The card: the tool's own SVG plus overlay layers. */
.card-host {
  position: relative;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  flex-shrink: 0;
  background: white;
}
.svg-mount svg { display: block; }
.layer { position: absolute; inset: 0; pointer-events: none; }
.layer > * { pointer-events: auto; position: absolute; }

.hit {
  background: transparent;
  border: none;
  border-radius: 5px;
  cursor: text;
  padding: 0;
}
.hit-text:hover { background: rgba(79,70,229,0.07); box-shadow: inset 0 -1.5px 0 var(--accent); }
.hit-color { cursor: pointer; border-radius: 0; }
.hit-color.round { border-radius: 50%; }
.hit-color.round:hover { box-shadow: 0 0 0 2px var(--accent); }
.hit-color:not(.round):hover { box-shadow: inset 0 0 0 2px rgba(79,70,229,0.35); }
.inplace {
  border: 1.5px solid var(--accent);
  border-radius: 6px;
  padding: 0 6px;
  background: white;
  outline: none;
  box-shadow: 0 0 0 4px rgba(79,70,229,0.15), 0 6px 18px rgba(15,23,42,0.12);
  font-weight: 600;
  z-index: 5;
}
.title-placeholder {
  background: white;
  border: none;
  border-bottom: 1px dashed var(--border-strong);
  border-radius: 0;
  padding: 0 0 0 4px;
  text-align: left;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.6px;
  color: var(--text-soft);
  cursor: text;
}
.title-placeholder:hover { border-bottom-color: var(--accent); }
.title-ghost {
  top: 16px;
  left: 22px;
  background: white;
  border: 1px dashed var(--border-strong);
  color: var(--text-muted);
  border-radius: 7px;
  padding: 5px 10px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  position: absolute;
  transform: translateY(-140%);
}
.title-ghost:hover { border-color: var(--accent); color: var(--accent); }

.card-below { width: 100%; }
.add-bar { display: flex; gap: 8px; }
.btn-add {
  background: white;
  border: 1px dashed var(--border-strong);
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: 7px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.btn-add:hover { border-color: var(--accent); border-style: solid; color: var(--accent); background: var(--accent-soft); }

/* Timeline canvas overlays (tools/timeline/canvas.js) */
.tl-bar { cursor: grab; border-radius: 6px; }
.tl-bar:hover { box-shadow: 0 3px 10px rgba(15,23,42,0.20); }
.tl-milestone { border-radius: 50%; }
.tl-resize {
  position: absolute;
  top: 0;
  right: 0;
  width: 10px;
  height: 100%;
  cursor: col-resize;
}
.tl-resize::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 3px;
  transform: translateY(-50%);
  width: 2px;
  height: 12px;
  background: rgba(255,255,255,0.7);
  border-radius: 1px;
  opacity: 0;
}
.tl-bar:hover .tl-resize::after { opacity: 1; }
.tl-milestone .tl-resize::after { background: var(--text-soft); right: 2px; }
.tl-handle, .tl-del {
  background: none;
  border: none;
  border-radius: 5px;
  color: var(--text-soft);
  opacity: 0;
  transition: opacity .1s, background .1s;
  line-height: 1;
}
.tl-handle { cursor: grab; font-size: 13px; }
.tl-del { cursor: pointer; font-size: 17px; }
.tl-handle.show, .tl-del.show { opacity: 1; }
.tl-handle:hover { background: rgba(15,23,42,0.07); color: var(--text); }
.tl-handle.on-dark { color: rgba(255,255,255,0.8); }
.tl-del:hover { background: var(--danger-soft); color: var(--danger); }
.tl-name-empty {
  background: none;
  border: 1px dashed var(--border-strong);
  border-radius: 5px;
  color: var(--text-soft);
  font-size: 12.5px;
  text-align: left;
  padding: 0 8px;
  cursor: text;
}
.tl-add-head {
  background: white;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  opacity: 0;
  transition: opacity .12s;
}
.card-host:hover .tl-add-head { opacity: 1; }
.tl-add-head:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.tl-drop { background: var(--accent); border-radius: 2px; pointer-events: none; }
body.dragging, body.dragging * { user-select: none; }

/* ── Outline panel ────────────────────────────────────── */
.outline-mount { padding: 18px 0 40px 32px; position: sticky; top: 0; }
.outline-panel {
  width: 280px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: width .15s;
}
.outline-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 10px 10px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-muted);
}
.outline-toggle {
  border: 1px solid var(--border);
  background: white;
  border-radius: 6px;
  width: 26px;
  height: 26px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1;
}
.outline-toggle:hover { color: var(--accent); border-color: var(--accent); }
.outline-text {
  display: block;
  width: 100%;
  min-height: 340px;
  border: none;
  outline: none;
  resize: vertical;
  padding: 12px 14px;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.7;
  tab-size: 3;
  background: #fcfcfd;
}
.outline-hint { font-size: 11.5px; color: var(--text-muted); padding: 10px 14px 12px; border-top: 1px solid var(--border); line-height: 1.45; }
.outline-panel.collapsed { width: 46px; }
.outline-panel.collapsed .outline-body { display: none; }
.outline-panel.collapsed .outline-head span { display: none; }
.outline-panel.collapsed .outline-head { border-bottom: none; padding: 10px; }

/* ── Quick Start ──────────────────────────────────────── */
.howto {
  width: var(--chart-w, 1280px);
  max-width: 100%;
  min-width: 640px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px 26px;
  box-shadow: var(--shadow-sm);
}
.howto-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.howto-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 32px; }
.howto-item { display: flex; align-items: flex-start; gap: 12px; font-size: 13.5px; line-height: 1.45; }
.howto-num {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}
.howto-item b { font-weight: 600; }
.howto-item span { color: var(--text-muted); }

/* ── Popovers: menus, colour picker ─────────────────── */
.popover {
  position: absolute;
  z-index: 200;
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(15,23,42,0.14);
  padding: 6px;
  width: max-content;
  max-width: calc(100vw - 16px);
}
.menu { display: flex; flex-direction: column; min-width: 260px; }
.menu-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  padding: 9px 10px;
  border: none;
  background: none;
  border-radius: 7px;
  cursor: pointer;
  text-align: left;
}
.menu-item:hover { background: var(--accent-soft); }
.menu-label { font-size: 13px; font-weight: 600; }
.menu-sub { font-size: 12px; color: var(--text-muted); }
.menu-note { font-size: 12px; color: #9a3412; padding: 8px 10px 4px; max-width: 260px; }
.color-picker { padding: 6px; width: 232px; }
.swatches { display: grid; grid-template-columns: repeat(6, 1fr); gap: 7px; margin-bottom: 10px; }
.swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 0 0 1px var(--border-strong);
  cursor: pointer;
}
.swatch:hover, .swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--accent); }
.color-row { display: flex; gap: 6px; align-items: center; }
.color-row input[type="color"] { width: 32px; height: 30px; border: 1px solid var(--border); border-radius: 6px; padding: 2px; background: white; cursor: pointer; }
.hex {
  width: 90px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 8px;
  font-family: var(--mono);
  font-size: 12px;
  outline: none;
}
.hex:focus { border-color: var(--accent); }

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #0f172a;
  color: white;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  opacity: 0;
  transition: opacity .2s, transform .2s;
  pointer-events: none;
  z-index: 300;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Mobile gate (builder pages) ──────────────────────── */
.mobile-gate {
  display: none;
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, #f7f8fa 0%, #eef2ff 100%);
  z-index: 9999;
  padding: 32px 16px;
  overflow-y: auto;
  align-items: flex-start;
  justify-content: center;
}
.mobile-gate-card {
  max-width: 460px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: 0 12px 40px rgba(15,23,42,0.08);
  margin-top: 5vh;
}
.mobile-gate-logo { width: 40px; height: 40px; color: var(--accent); margin-bottom: 14px; }
.mobile-gate-card h2 { font-size: 22px; font-weight: 800; letter-spacing: -0.4px; margin-bottom: 10px; }
.mobile-gate-card p { color: var(--text-muted); font-size: 14.5px; line-height: 1.55; margin-bottom: 12px; }
.mobile-gate-card p strong { color: var(--text); }
.mobile-gate-alt { font-size: 13.5px !important; }
.mobile-gate-card a { color: var(--accent); font-weight: 600; text-decoration: none; }
.mobile-gate-links { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.mobile-gate-links a {
  flex: 1 1 auto;
  text-align: center;
  padding: 11px 14px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent-soft);
  font-size: 13.5px;
}
@media (max-width: 900px) {
  .mobile-gate { display: flex; }
  body.gate-active { overflow: hidden; }
}

/* ── Docs pages ───────────────────────────────────────── */
.container { width: 100%; max-width: 1240px; margin: 32px auto; padding: 0 28px 60px; flex: 1; }
.hero {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 32px 28px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}
.hero h1 { font-size: 28px; font-weight: 800; letter-spacing: -0.6px; margin-bottom: 8px; }
.hero p { color: var(--text-muted); font-size: 15px; max-width: 760px; }
.endpoint {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  background: #f1f3f7;
  border: 1px solid var(--border);
  padding: 10px 14px;
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 13px;
  word-break: break-all;
  max-width: 100%;
}
.verb {
  background: #059669;
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  font-family: 'Inter', sans-serif;
}
.verb.mcp { background: #7c3aed; }
.copy-btn {
  border: 1px solid var(--border);
  background: white;
  border-radius: 5px;
  padding: 3px 9px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  flex-shrink: 0;
}
.copy-btn:hover { border-color: var(--accent); color: var(--accent); }
.grid { display: grid; grid-template-columns: minmax(0, 480px) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 1000px) { .grid { grid-template-columns: minmax(0, 1fr); } }
.card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
}
.card + .card { margin-top: 20px; }
.card h2 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.card h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.card p { color: var(--text-muted); margin-bottom: 12px; font-size: 13.5px; }
.card p:last-child { margin-bottom: 0; }
.card ul, .card ol { padding-left: 20px; color: var(--text-muted); font-size: 13.5px; margin-bottom: 12px; }
.card li { margin-bottom: 6px; }
.card a { text-decoration: none; font-weight: 500; }
.card a:hover { text-decoration: underline; }
.card textarea {
  width: 100%;
  min-height: 320px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.55;
  outline: none;
  resize: vertical;
  background: #fcfcfd;
}
.card textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79,70,229,0.12); }
.row { display: flex; gap: 10px; margin-top: 14px; align-items: center; flex-wrap: wrap; }
.status { font-size: 12.5px; color: var(--text-muted); flex-basis: 100%; }
.status.ok { color: #059669; }
.status.warn { color: #b45309; }
.status.err { color: #dc2626; }
.preview {
  background: #f1f3f7;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.preview img { max-width: 100%; height: auto; border-radius: 6px; box-shadow: 0 6px 28px rgba(15,23,42,0.10); }
.preview .placeholder { color: var(--text-muted); font-size: 13px; text-align: center; }
pre {
  background: var(--code-bg);
  color: var(--code-text);
  padding: 14px 16px;
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.6;
  overflow-x: auto;
  white-space: pre;
  margin-bottom: 12px;
}
pre:last-child { margin-bottom: 0; }
code.inline {
  background: #f1f3f7;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text);
  word-break: break-word;
}
.table-scroll { width: 100%; overflow-x: auto; }
table.schema { width: 100%; border-collapse: collapse; font-size: 13px; }
table.schema th, table.schema td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.schema th { font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--text-muted); font-weight: 700; }
table.schema td:first-child { font-family: var(--mono); font-size: 12px; white-space: nowrap; }
table.schema td.type { color: var(--accent); font-family: var(--mono); font-size: 12px; white-space: nowrap; }
table.schema td.desc { color: var(--text-muted); }
table.schema .range { font-size: 11.5px; color: var(--text-soft); margin-top: 3px; font-family: var(--mono); }
table.schema .req {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 10.5px;
  color: #b45309;
  font-weight: 600;
  margin-top: 2px;
}
.tabs { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.tab {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.tab.active { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }
.notice {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 18px;
}
.notice strong { color: #7c2d12; }

/* ── Home ─────────────────────────────────────────────── */
.home { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 28px 60px; flex: 1; }
.home-hero { padding: 64px 0 40px; max-width: 820px; }
.home-hero h1 { font-size: 44px; font-weight: 800; letter-spacing: -1.4px; line-height: 1.08; margin-bottom: 16px; text-wrap: balance; }
.home-hero p { font-size: 17px; color: var(--text-muted); max-width: 640px; margin-bottom: 26px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.tool-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; scroll-margin-top: 20px; }
.tool-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}
/* Every thumbnail gets the same frame whatever the chart's shape. */
.tool-thumb {
  display: block;
  position: relative;
  aspect-ratio: 16 / 9;
  background: #f1f3f7;
  border-bottom: 1px solid var(--border);
}
.tool-thumb img {
  position: absolute;
  inset: 22px;
  width: calc(100% - 44px);
  height: calc(100% - 44px);
  object-fit: contain;
  filter: drop-shadow(0 3px 10px rgba(15,23,42,0.10));
}
.tool-card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.tool-card h3 { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.tool-card p { font-size: 14.5px; color: var(--text-muted); flex: 1; }
.tool-card-links { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.home-band {
  margin-top: 48px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  scroll-margin-top: 20px;
}
.home-band h2, .home-why h2 { font-size: 22px; font-weight: 800; letter-spacing: -0.4px; margin-bottom: 8px; }
.home-band p { color: var(--text-muted); font-size: 14.5px; max-width: 620px; margin-bottom: 6px; }
.home-band .link-btn { padding-left: 0; }
.home-band .endpoint { margin-top: 0; }
.home-why { margin-top: 48px; }
.why-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 16px; }
.why-grid h3 { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.why-grid p { font-size: 13.5px; color: var(--text-muted); }

/* ── Footer ───────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--border); background: white; margin-top: auto; }
.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 22px 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 28px;
  font-size: 13px;
}
.footer-brand { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--text); text-decoration: none; }
.footer-logo { width: 20px; height: 20px; color: var(--accent); }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.footer-links a { color: var(--text-muted); text-decoration: none; }
.footer-links a:hover { color: var(--accent); }
.footer-note { color: var(--text-soft); margin-left: auto; }

/* ── Small screens (docs and home; builders show the gate) ── */
@media (max-width: 720px) {
  .tool-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .tool-thumb img { inset: 12px; width: calc(100% - 24px); height: calc(100% - 24px); }
  .brandbar { padding: 14px 16px; gap: 10px; }
  .brand { font-size: 20px; gap: 8px; }
  .brand-logo { width: 26px; height: 26px; }
  .brand-tag { font-size: 11.5px; }
  .nav { width: 100%; margin-left: 0; gap: 6px; }
  .nav > .nav-btn, .nav-menu { flex: 1 1 auto; }
  .nav-menu .nav-btn { width: 100%; }
  .nav-btn { text-align: center; padding: 8px 10px; font-size: 12.5px; }
  .nav-dropdown { width: min(320px, calc(100vw - 32px)); }
  .container, .home { padding: 0 16px 48px; }
  .container { margin: 18px auto; }
  .hero { padding: 22px 18px; }
  .hero h1 { font-size: 22px; }
  .card { padding: 18px 16px; }
  .home-hero { padding: 36px 0 28px; }
  .home-hero h1 { font-size: 30px; letter-spacing: -0.8px; }
  .home-hero p { font-size: 15px; }
  .home-band { grid-template-columns: minmax(0, 1fr); padding: 22px 18px; }
  .why-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-inner { padding: 18px 16px; }
  .footer-note { margin-left: 0; }
  pre { font-size: 11px; }
}
