/* qdata page styles. Tokens, base, header, buttons, install command and footer come from brand/brand.css (load it first). */
/* ---------- hero ---------- */
.hero { width: min(1180px, 100% - 32px); margin-inline: auto; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(32px, 5vw, 72px); align-items: center; padding-block: clamp(48px, 7vw, 96px) clamp(48px, 6vw, 80px); }
.hero h1 { font-size: clamp(38px, 6.2vw, 84px); font-stretch: 118%; font-weight: 800; letter-spacing: -0.035em; line-height: 0.95; }
.lede { margin-top: 28px; font-size: clamp(18px, 1.6vw, 20px); color: var(--muted); max-width: 56ch; }
.install { margin-top: 34px; max-width: 620px; }
.tabs { display: flex; gap: 4px; margin-bottom: -1px; position: relative; }
.tabs [role="tab"] { font: 600 14px var(--display); color: var(--muted); background: transparent; border: 1px solid transparent;
  border-bottom: none; padding: 8px 14px; border-radius: 8px 8px 0 0; cursor: pointer; }
.tabs [role="tab"][aria-selected="true"] { color: #e8eaf3; background: var(--term-bg); }
.install .cmd { border-top-left-radius: 0; }
.install-note { margin-top: 12px; font-size: 14px; color: var(--muted); }

.board { margin: 0; }
.board canvas { width: 100%; height: auto; aspect-ratio: 560 / 620; }
.board figcaption { margin-top: 12px; font-size: 14px; color: var(--muted); max-width: 46ch; }
@media (max-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .board { max-width: 420px; }
}

/* ---------- demo ---------- */
.demo { background: var(--term-bg); color: var(--term-text); }
.demo h2 { color: #f2f3f8; }
.demo h2 code { color: var(--marigold); }
.demo .section-lede { color: var(--term-dim); }
.section-lede { margin-top: 14px; font-size: 18px; color: var(--muted); max-width: 62ch; }
.video-frame { margin-top: 36px; border-radius: 12px; overflow: hidden; box-shadow: 0 0 0 1px #ffffff1f, 0 30px 80px #0007; background: #16182b; }
.video-frame video { width: 100%; aspect-ratio: 16 / 9; }

/* ---------- split sections ---------- */
.split { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.split-flip { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); }
.split-flip .split-text { order: 2; }
.split-text p { margin-top: 18px; color: var(--muted); max-width: 52ch; }
.split-text > .cmd, .split-text > .terminal { margin-top: 24px; }
.split-demo { min-width: 0; display: grid; gap: 14px; }
@media (max-width: 900px) { .split, .split-flip { grid-template-columns: minmax(0, 1fr); } .split-flip .split-text { order: 0; } }

.terminal { margin: 0; background: var(--term-bg); color: var(--term-text); border-radius: var(--radius); padding: 18px 20px;
  overflow-x: auto; font-size: 14px; line-height: 1.6; }
.terminal code { background: none; padding: 0; font-size: inherit; color: inherit; white-space: pre; }
.terminal .ok { color: var(--term-ok); }

.table-scroll { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.data { width: 100%; border-collapse: collapse; font: 400 14px/1.4 var(--mono); }
.data th { text-align: left; font: 600 13px var(--display); color: var(--cobalt-ink); padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface); }
.data td { padding: 9px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data tr:last-child td { border-bottom: none; }
.data .num { text-align: right; font-variant-numeric: tabular-nums; }
.data td.hl { color: var(--marigold-ink); }
.data td.bad { color: var(--rose); background: var(--rose-bg); }
.data td.null { font-style: italic; }
.data.compact td, .data.compact th { padding: 7px 12px; }
.compact { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); border-collapse: separate; border-spacing: 0; overflow: hidden; }

/* ---------- catalog ---------- */
.catalog-head { display: grid; grid-template-columns: 1fr auto; gap: 14px 40px; align-items: end; }
.catalog-head h2 { grid-column: 1; }
.catalog-head p { grid-column: 1; color: var(--muted); }
.filter { grid-column: 2; grid-row: 1 / span 2; align-self: end; }
.filter input { width: min(340px, 80vw); font: 400 16px var(--display); color: var(--text); background: var(--surface);
  border: 2px solid var(--line); border-radius: 999px; padding: 11px 18px; }
.filter input:focus { border-color: var(--cobalt); outline: none; }
@media (max-width: 760px) { .catalog-head { grid-template-columns: minmax(0, 1fr); } .filter { grid-column: 1; grid-row: auto; } }
.catalog-scroll { margin-top: 28px; max-height: 560px; overflow: auto; }
.catalog-table thead th { position: sticky; top: 0; z-index: 1; }
.catalog-table td { vertical-align: top; }
.catalog-table td:first-child { color: var(--text); font-weight: 600; }
.catalog-table td:first-child small { display: block; font: 400 13px/1.4 var(--display); color: var(--muted); white-space: normal; max-width: 36ch; margin-top: 3px; }
.catalog-table td:nth-child(2) { font-family: var(--display); color: var(--muted); }
.catalog-table td:nth-child(3) { white-space: normal; }
.sample { display: inline-block; background: var(--sunk); border-radius: 4px; padding: 1px 7px; margin: 0 6px 5px 0; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: top; max-width: min(46ch, 100%); }
.catalog-count { margin-top: 12px; font-size: 14px; color: var(--muted); }

/* ---------- dirty scale ---------- */
.scale { list-style: none; margin: 26px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); max-width: 460px;
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.scale li { padding: 10px 8px; text-align: center; border-left: 1px solid var(--line); font-size: 13px; }
.scale li:first-child { border-left: none; }
.scale code { display: block; background: none; padding: 0; font-size: 12px; color: var(--muted); }
.scale span { font-weight: 700; font-size: 17px; }
.scale li:nth-child(n+4) span { color: var(--rose); }
@media (max-width: 420px) { .scale code { font-size: 10px; } }

/* ---------- relational ---------- */
.relational { background: var(--surface); border-block: 1px solid var(--line); }
.section-head h2 { max-width: 24ch; }
.pro-tag { display: inline-block; vertical-align: 0.35em; font: 700 13px/1 var(--display); font-stretch: 110%; letter-spacing: 0;
  color: var(--pro-text); background: var(--pro-bg); padding: 5px 10px; border-radius: 999px; }
.rel-grid { margin-top: 40px; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 28px; align-items: start; }
@media (max-width: 980px) { .rel-grid { grid-template-columns: minmax(0, 1fr); } }
.toml { font-size: 13px; }
.toml mark { display: block; background: #f5a5242b; color: inherit; outline: 1px solid #f5a52480; border-radius: 3px; margin: 0 -8px; padding: 0 8px; }
.t-h { color: #fff; font-weight: 600; }
.t-k { color: var(--term-key); }
.t-s { color: var(--term-str); }
.t-n { color: var(--marigold); }
.rel-result { display: grid; gap: 14px; min-width: 0; }
.er { width: 100%; max-width: 420px; }
.er-box { fill: var(--bg); stroke: var(--line); stroke-width: 1.5; }
.er-title { font: 700 17px var(--display); fill: var(--text); }
.er-sub { font: 400 13px var(--display); fill: var(--muted); }
.er-key { font: 500 13px var(--mono); fill: var(--marigold-ink); }
.er-line { fill: none; stroke: var(--cobalt); stroke-width: 2; }
.er-dot { fill: var(--cobalt); }
.note { font-size: 14px; color: var(--muted); }
.modes { margin-top: 56px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 2px solid var(--text); }
.mode { padding: 22px 24px 0 0; }
.mode + .mode { padding-left: 24px; border-left: 1px solid var(--line); }
.mode p { margin-top: 10px; color: var(--muted); font-size: 15px; }
.mode > code { display: inline-block; margin-top: 14px; }
@media (max-width: 860px) { .modes { grid-template-columns: 1fr; } .mode + .mode { padding-left: 0; border-left: none; border-top: 1px solid var(--line); margin-top: 22px; } }
.funnel { margin-top: 12px; display: grid; gap: 4px; }
.funnel span { display: flex; justify-content: space-between; width: max(var(--w), 46%); background: var(--sunk); border-left: 4px solid var(--cobalt);
  padding: 3px 8px; font-size: 13px; border-radius: 0 4px 4px 0; }
.funnel span:last-child { border-left-color: var(--rose); }
.funnel b { font-variant-numeric: tabular-nums; }

/* ---------- twin ---------- */
.twin-chart { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.twin-chart figcaption { font-weight: 650; }
.legend { font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.sw { display: inline-block; width: 14px; height: 10px; border-radius: 2px; }
.sw-real { background: var(--cobalt); }
.sw-twin { background: var(--marigold); margin-left: 8px; }
#twin-hist { width: 100%; height: auto; }
#twin-hist .bar-real { fill: var(--cobalt); }
#twin-hist .bar-twin { fill: var(--marigold); }
#twin-hist .axis { stroke: var(--line); }
#twin-hist text { font: 400 12px var(--display); fill: var(--muted); }

/* ---------- skill ---------- */
.skill { background: var(--sunk); }
.chat { gap: 14px; }
.bubble { padding: 16px 20px; border-radius: 16px; max-width: 46ch; font-size: 16px; }
.bubble.you { background: var(--cobalt); color: #fff; justify-self: end; border-bottom-right-radius: 4px; }
:root[data-theme="dark"] .bubble.you { color: #14162a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bubble.you { color: #14162a; } }
.bubble.claude { background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 4px; }

/* ---------- pricing ---------- */
.pricing h2 { max-width: none; }
.tiers { margin-top: 40px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 2px solid var(--text); }
.tier { padding: 28px 40px 8px 0; display: flex; flex-direction: column; }
.tier-pro { padding-left: 40px; border-left: 1px solid var(--line); }
.price { margin-top: 6px; font: 780 40px var(--display); font-stretch: 115%; letter-spacing: -0.02em; }
.tier ul { margin: 18px 0 28px; padding: 0; list-style: none; display: grid; gap: 10px; color: var(--muted); }
.tier li { padding-left: 22px; position: relative; }
.tier li::before { content: ""; position: absolute; left: 2px; top: 0.55em; width: 9px; height: 9px; border-radius: 50%; background: var(--marigold); }
.tier .btn { margin-top: auto; align-self: flex-start; }
@media (max-width: 760px) { .tiers { grid-template-columns: 1fr; } .tier { padding-right: 0; } .tier-pro { padding-left: 0; border-left: none; border-top: 1px solid var(--line); margin-top: 24px; } }


/* ---------- recipes ---------- */
.section-lede { margin-top: 16px; color: var(--muted); max-width: 62ch; font-size: 18px; }
.section-foot { margin-top: 28px; color: var(--muted); font-size: 15px; }
.usecases { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.usecases a { display: block; height: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); color: var(--muted); text-decoration: none; font-size: 14px; line-height: 1.45; }
.usecases a:hover { border-color: var(--cobalt); }
.usecases strong { display: block; color: var(--text); font-size: 15px; margin-bottom: 4px; }
.recipe-grid { margin-top: 28px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.recipe { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); display: grid; gap: 10px; min-width: 0;
  scroll-margin-top: 90px; }
.recipe h3 { font-size: 19px; }
.recipe p { color: var(--muted); font-size: 15px; }
.recipe .cmd { margin-top: 6px; }
.recipe .cmd code { font-size: 13.5px; }
@media (max-width: 1000px) { .usecases { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .recipe-grid, .usecases { grid-template-columns: minmax(0, 1fr); } }

/* ---------- data packs ---------- */
.pack-grid { margin-top: 36px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.pack { display: flex; flex-direction: column; gap: 14px; padding: 24px; border: 1px solid var(--line); border-top: 4px solid var(--marigold);
  border-radius: var(--radius); background: var(--surface); min-width: 0; scroll-margin-top: 90px; }
.pack header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.pack-name { color: var(--muted); }
.pack-pitch { font-size: 17px; font-weight: 600; }
.pack-bullets { margin: 0; padding: 0; list-style: none; display: grid; gap: 7px; color: var(--muted); font-size: 15px; }
.pack-bullets li { padding-left: 20px; position: relative; }
.pack-bullets li::before { content: ""; position: absolute; left: 2px; top: 0.6em; width: 8px; height: 8px; border-radius: 50%; background: var(--marigold); }
.pack-sample td { max-width: 230px; overflow: hidden; text-overflow: ellipsis; font-size: 12.5px; }
.pack-sample th { font-size: 12px; }
.pack-more summary { cursor: pointer; color: var(--cobalt-ink); font-weight: 600; font-size: 15px; }
.pack-templates { margin: 12px 0 0; padding-left: 18px; display: grid; gap: 6px; color: var(--muted); font-size: 14px; }
.pack-sources { margin-top: 10px; font-size: 13px; color: var(--muted); }
.pack footer { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 6px; }
.pack-price { font: 780 22px var(--display); font-stretch: 110%; }
.pack-price small { font-size: 14px; font-weight: 500; color: var(--muted); }
.pack-badge { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; background: var(--pro-bg); color: var(--pro-text);
  font: 650 11.5px/1.6 var(--display); text-decoration: none; vertical-align: 0.1em; white-space: nowrap; }
.pack-steps { margin-top: 40px; padding: 28px; border-radius: var(--radius); background: var(--sunk); }
.pack-steps ol { margin: 16px 0 0; padding-left: 22px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.pack-steps li { min-width: 0; }
.pack-steps li { color: var(--muted); }
.pack-steps li strong { color: var(--text); }
.pack-steps .cmd { margin-top: 10px; }
.pack-note { margin-top: 18px; font-size: 14px; color: var(--muted); }
@media (max-width: 860px) { .pack-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- pricing (three tiers) ---------- */
.tiers-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tiers-3 .tier + .tier { padding-left: 32px; border-left: 1px solid var(--line); }
.tiers-3 .tier { padding-right: 32px; }
.price-period { font-size: 16px; font-weight: 500; color: var(--muted); }
.pricing-note { margin-top: 28px; color: var(--muted); }
@media (max-width: 900px) {
  .tiers-3 { grid-template-columns: minmax(0, 1fr); }
  .tiers-3 .tier + .tier { padding-left: 0; border-left: none; border-top: 1px solid var(--line); }
}

/* ---------- FAQ ---------- */
.faq-list { margin-top: 32px; border-top: 2px solid var(--text); }
.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq summary { cursor: pointer; font-weight: 650; font-size: 18px; list-style-position: outside; }
.faq details p { margin-top: 12px; color: var(--muted); max-width: 72ch; }

/* ---- qdata additions ---- */
.runboard { margin: 0; background: var(--term-bg); color: var(--term-text); border-radius: 14px; padding: 18px 18px 14px;
  font: 400 13.5px/1.55 var(--mono); box-shadow: 0 30px 60px -30px #16182b66; min-width: 0; }
.runboard .tabs { margin-bottom: 12px; }
.runboard .tabs [role="tab"] { color: var(--term-dim); border-radius: 6px; border: 1px solid #ffffff1f; padding: 4px 10px; font-size: 13px; }
.runboard .tabs [role="tab"][aria-selected="true"] { color: var(--term-text); background: #ffffff14; }
.runboard ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.runboard li { display: grid; grid-template-columns: 2.4em minmax(0, 1fr) auto; gap: 10px; align-items: baseline;
  padding: 8px 10px; border-radius: 8px; background: #ffffff08; }
.runboard .n { color: var(--term-dim); }
.runboard .what { min-width: 0; overflow-wrap: anywhere; }
.runboard .what small { display: block; color: var(--term-dim); font-size: 12px; }
.runboard .st { font-size: 12px; padding: 1px 8px; border-radius: 999px; white-space: nowrap; }
.runboard .st.ran { color: var(--term-ok); border: 1px solid currentColor; }
.runboard .st.hit { color: var(--term-bg); background: var(--marigold); }
.runboard .total { margin-top: 12px; color: var(--term-ok); }
.runboard figcaption { margin-top: 10px; color: var(--term-dim); font: 400 13px/1.5 var(--display); }
.tree { font: 400 14px/1.7 var(--mono); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 18px; margin: 0; overflow-x: auto; }
.tree b { color: var(--cobalt-ink); font-weight: 600; }
.tree i { font-style: normal; color: var(--muted); }
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 40px; margin-top: 40px; border-top: 2px solid var(--text); padding-top: 28px; }
.features h3 { font-size: 19px; margin-bottom: 8px; }
.features p { color: var(--muted); font-size: 16px; }
@media (max-width: 900px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .features { grid-template-columns: minmax(0, 1fr); } }
.gif-frame { border-radius: 14px; overflow: hidden; background: var(--term-bg); }
.gif-frame img { width: 100%; height: auto; }
.limits { margin-top: 18px; font-size: 15px; color: var(--muted); max-width: 60ch; }
.demo .section-lede code { background: #ffffff14; color: var(--term-text); }
.gif-frame img { max-height: 70vh; object-fit: contain; margin-inline: auto; }

/* ---------- certification ---------- */
.certify { padding-block: clamp(56px, 7vw, 96px); }
.eyebrow { font: 600 13px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--marigold-ink); }
.certify > h2 { margin-top: 10px; }
.certify .split { margin-top: 40px; }
.certify h3 { font-size: 21px; }
.score-parts { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; max-width: 52ch; }
.score-parts li { color: var(--muted); padding-left: 12px; border-left: 3px solid var(--marigold); }
.score-parts b { display: block; color: var(--text); font-family: var(--mono); font-size: 14px; }
.runboard .st.warn { color: var(--marigold); border: 1px solid currentColor; }
.runboard .st.fail { color: #fff; background: #c2412d; }
.runboard .st.skip { color: var(--term-dim); border: 1px dashed currentColor; }
.runboard .total.fail { color: #f08a78; }
.runboard figcaption code { background: #ffffff14; color: var(--term-text); }
.compare { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 40px; margin-top: 48px; border-top: 2px solid var(--text); padding-top: 28px; }
.compare h3 { font-size: 19px; margin-bottom: 8px; }
.compare p { color: var(--muted); font-size: 16px; }
.compare > div:nth-child(2) h3 { color: var(--cobalt-ink); }
@media (max-width: 900px) { .compare { grid-template-columns: minmax(0, 1fr); } }
