/* Browser Run Quick Actions — Showcase
 * Editorial / paper aesthetic: cream + forest green, bold serif type. */

:root {
  --paper: #efecdb;
  --paper-2: #f4f1e1;
  --card: #fffdf2;
  --ink: #122e1a;
  --ink-soft: #3b5240;
  --ink-mute: #6b7e6e;
  --line: #c9c6b4;
  --line-soft: #dcd8c5;
  --accent: #122e1a;
  --accent-warm: #c14a1a;
  --code-bg: #0e1a12;
  --code-line: #1d2c22;
  --code-ink: #e2dec5;
  --code-key: #9bd07a;
  --code-str: #d8c46f;
  --code-num: #e08c5f;
  --code-lit: #f08aa3;
  --pill-bg: #122e1a14;
  --cf-orange: #d99069;
  --cf-orange-warm: #e0a37d;
  --cf-pink: #c47e92;
  --cf-pink-soft: #d3a0ad;
  --cf-purple: #a99bc4;
  --cf-violet: #8d7eaa;
  --grad-accent: linear-gradient(135deg, #d99069 0%, #c47e92 55%, #a99bc4 100%);
  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.4 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  --serif: "Iowan Old Style", "Charter", "PT Serif", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(18, 46, 26, 0.4);
  transition: text-decoration-color 120ms ease;
}
a:hover { text-decoration-color: var(--ink); }

code, pre, kbd { font-family: var(--mono); }

/* Subtle paper-grain dot texture */
.bg-pattern {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(18, 46, 26, 0.13) 1px, transparent 1.6px),
    radial-gradient(circle at 12px 8px, rgba(18, 46, 26, 0.06) 0.6px, transparent 1.2px);
  background-size: 24px 24px, 32px 32px;
  background-position: 0 0, 6px 6px;
  opacity: 0.55;
  mask-image: radial-gradient(ellipse 80% 100% at 50% 0%, black 30%, transparent 75%);
}

/* Masthead */
.qa-masthead {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(239, 236, 219, 0.85);
  backdrop-filter: blur(10px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.qa-masthead-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.qa-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--mono);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.qa-brand:hover { text-decoration: none; }
.qa-brand-mark {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px; height: 24px;
  background: var(--grad-accent);
  color: #fffdf2;
  border-radius: 6px;
  font-size: 13px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(18, 46, 26, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.qa-brand-mark::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--grain);
  mix-blend-mode: overlay;
  opacity: 0.5;
  pointer-events: none;
}
.qa-masthead-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}
@media (max-width: 560px) {
  .qa-masthead-inner { padding: 12px 18px; gap: 12px; }
  .qa-masthead-meta .qa-meta-pill { display: none; }
  .qa-masthead-meta .qa-button {
    padding: 8px 12px;
    font-size: 11px;
    letter-spacing: 0.05em;
  }
}

/* Page */
.qa-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 72px 32px 96px;
  position: relative;
  z-index: 1;
}
@media (max-width: 720px) {
  .qa-page { padding: 36px 18px 56px; }
}

/* Hero */
.qa-hero {
  max-width: 940px;
  margin-bottom: 64px;
}
.qa-hero-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(40px, 4.6vw, 64px);
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 0 0 24px 0;
  color: var(--ink);
}
.qa-hero-title em {
  font-style: italic;
  font-weight: 500;
  color: var(--ink-soft);
}
.qa-hero-deck {
  font-family: var(--serif);
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0;
  max-width: 720px;
}
.qa-hero-deck a {
  color: var(--ink);
  text-decoration-color: var(--ink-soft);
}

/* Hero + grid layout */
.qa-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 64px;
  align-items: start;
  margin-bottom: 80px;
}
.qa-intro .qa-hero { margin-bottom: 0; max-width: none; }
@media (max-width: 980px) {
  .qa-intro { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 720px) {
  .qa-intro { gap: 0; margin-bottom: 40px; }
  .qa-cards { gap: 24px; }
}

/* 3x3 data grid (replaces TOC) */
.qa-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
@media (max-width: 720px) {
  .qa-grid { display: none; }
}

.qa-tile {
  position: relative;
  aspect-ratio: 1.25 / 1;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px 16px 12px;
  text-decoration: none;
  color: #fffdf2;
  background: linear-gradient(135deg, var(--g-from, #d99069), var(--g-mid, #c47e92) 55%, var(--g-to, #a99bc4));
  box-shadow: 0 1px 0 rgba(18, 46, 26, 0.04), 0 10px 24px -18px rgba(18, 46, 26, 0.22);
  transition: transform 200ms ease, box-shadow 200ms ease, filter 200ms ease;
}
.qa-tile:hover {
  text-decoration: none;
  color: #fffdf2;
  transform: translateY(-2px);
  box-shadow: 0 1px 0 rgba(18, 46, 26, 0.04), 0 16px 32px -16px rgba(18, 46, 26, 0.3);
}
.qa-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--grain);
  background-size: 220px 220px;
  mix-blend-mode: overlay;
  opacity: 0.4;
  pointer-events: none;
}
.qa-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 80% at 100% 0%, rgba(255, 255, 255, 0.12), transparent 55%);
  pointer-events: none;
}
.qa-tile-num {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  font-style: italic;
  letter-spacing: -0.01em;
  color: rgba(255, 253, 240, 0.92);
  position: relative;
  z-index: 1;
  text-shadow: 0 1px 1px rgba(18, 14, 30, 0.14);
}
.qa-tile-name {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fffdf2;
  position: relative;
  z-index: 1;
  text-shadow: 0 1px 2px rgba(18, 14, 30, 0.22);
}
.qa-tile-pending {
  filter: saturate(0.45) brightness(0.92);
}
.qa-tile-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 4px;
  background: rgba(255, 253, 240, 0.85);
  color: var(--ink);
  z-index: 2;
}

/* 9 muted gradient tones (peach / dusty rose / mauve) */
.qa-tile[data-tone="t1"] { --g-from: #d99069; --g-mid: #c47e92; --g-to: #a99bc4; }
.qa-tile[data-tone="t2"] { --g-from: #e0a37d; --g-mid: #d3a0ad; --g-to: #b1a4cc; }
.qa-tile[data-tone="t3"] { --g-from: #b1a4cc; --g-mid: #c98ea1; --g-to: #d99069; }
.qa-tile[data-tone="t4"] { --g-from: #d99069; --g-mid: #d8b1a4; --g-to: #8d7eaa; }
.qa-tile[data-tone="t5"] { --g-from: #d6a874; --g-mid: #c98ea1; --g-to: #8d7eaa; }
.qa-tile[data-tone="t6"] { --g-from: #c47e92; --g-mid: #b1a4cc; --g-to: #d99069; }
.qa-tile[data-tone="t7"] { --g-from: #a99bc4; --g-mid: #c98ea1; --g-to: #d99069; }
.qa-tile[data-tone="t8"] { --g-from: #d99069; --g-mid: #b1a4cc; --g-to: #c98ea1; }
.qa-tile[data-tone="t9"] { --g-from: #d6a874; --g-mid: #c98ea1; --g-to: #7a6e96; }

/* Cards */
.qa-cards {
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.qa-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  scroll-margin-top: 88px;
  box-shadow: 0 1px 0 rgba(18, 46, 26, 0.05), 0 12px 40px -24px rgba(18, 46, 26, 0.18);
}
.qa-head {
  padding: 28px 36px 24px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: baseline;
  border-bottom: 1px solid var(--line-soft);
}
.qa-num {
  font-family: var(--serif);
  font-size: 52px;
  font-weight: 600;
  font-style: italic;
  background: var(--grad-accent);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  line-height: 1;
  letter-spacing: -0.02em;
}
.qa-head-text { display: flex; flex-direction: column; gap: 4px; }
.qa-title {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ink);
  line-height: 1.1;
}
.qa-tagline {
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
  margin: 0;
  color: var(--ink-soft);
}
.qa-endpoint {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--paper-2);
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid var(--line-soft);
  white-space: nowrap;
}
@media (max-width: 720px) {
  .qa-head { grid-template-columns: auto 1fr; padding: 22px 22px 18px; gap: 16px; }
  .qa-endpoint { grid-column: 1 / -1; justify-self: start; }
  .qa-num { font-size: 38px; }
  .qa-title { font-size: 26px; }
  .qa-tagline { font-size: 15px; }
  .qa-body { padding: 22px 22px 26px; gap: 18px; }
}

.qa-body {
  padding: 28px 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.qa-description {
  font-size: 16px;
  color: var(--ink-soft);
  margin: 0;
  line-height: 1.6;
  max-width: 760px;
}
.qa-description code {
  background: var(--paper-2);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 13px;
  color: var(--ink);
  border: 1px solid var(--line-soft);
}

/* Badges */
.qa-badges {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.qa-badge {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 14px;
  background: var(--paper-2);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  font-size: 12px;
  min-width: 130px;
}
.qa-badge .b-label {
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  font-size: 10px;
  font-family: var(--mono);
}
.qa-badge .b-value {
  color: var(--ink);
  font-weight: 700;
  font-family: var(--mono);
  font-size: 14px;
}
@media (max-width: 720px) {
  .qa-badges {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    margin: 0 -22px;
    padding: 0 22px 4px;
    scroll-snap-type: x proximity;
  }
  .qa-badges::-webkit-scrollbar { display: none; }
  .qa-badge {
    flex: 0 0 auto;
    min-width: 0;
    scroll-snap-align: start;
  }
}

/* Section labels */
.qa-section-label {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
  color: var(--ink-soft);
}
.qa-output-note {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-mute);
  font-style: italic;
}

/* API call block */
.qa-api {
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: var(--paper-2);
  overflow: hidden;
}
.qa-api > summary {
  cursor: pointer;
  padding: 14px 18px;
  list-style: none;
  user-select: none;
}
.qa-api > summary::-webkit-details-marker { display: none; }
.qa-api > summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 10px;
  color: var(--ink);
  transition: transform 150ms ease;
}
.qa-api[open] > summary::before { transform: rotate(90deg); }
.qa-api[open] > summary { border-bottom: 1px solid var(--line-soft); }
.qa-api-grid {
  padding: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 900px) {
  .qa-api-grid { grid-template-columns: 1fr; }
}

/* Code blocks (dark, for contrast against cream) */
.qa-codeblock {
  display: flex;
  flex-direction: column;
  background: var(--code-bg);
  border: 1px solid var(--code-line);
  border-radius: 10px;
  overflow: hidden;
}
.qa-codeblock-head {
  padding: 9px 14px;
  font-family: var(--mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: var(--code-ink);
  background: var(--code-line);
  border-bottom: 1px solid var(--code-line);
}
.qa-code {
  margin: 0;
  padding: 16px 18px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--code-ink);
  overflow-x: auto;
  background: var(--code-bg);
}
.qa-code code { color: inherit; }
.j-key { color: var(--code-key); }
.j-str { color: var(--code-str); }
.j-num { color: var(--code-num); }
.j-lit { color: var(--code-lit); font-style: italic; }

/* TABS */
.qa-tabs {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.qa-tab-radio {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0; height: 0;
}
.qa-tab-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-soft);
  flex-wrap: wrap;
}
.qa-tab-buttons {
  display: flex;
  gap: 4px;
  background: var(--paper-2);
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
}
.qa-tab-label {
  cursor: pointer;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-radius: 999px;
  transition: all 120ms ease;
  user-select: none;
}
.qa-tab-label:hover { color: var(--ink); }

.qa-tab-panel { display: none; }
.qa-tabs .qa-tab-radio-rendered:checked ~ .qa-tab-panels .qa-tab-panel-rendered { display: block; }
.qa-tabs .qa-tab-radio-raw:checked ~ .qa-tab-panels .qa-tab-panel-raw { display: block; }

.qa-tabs .qa-tab-radio-rendered:checked ~ .qa-tab-bar .qa-tab-label[for$="-rendered"],
.qa-tabs .qa-tab-radio-raw:checked ~ .qa-tab-bar .qa-tab-label[for$="-raw"] {
  background: var(--ink);
  color: var(--paper);
}

.qa-raw-json {
  max-height: 520px;
  overflow-y: auto;
}

/* Output viewers */
.qa-html-preview, .qa-md-preview {
  max-height: 380px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
}
.qa-md-preview { font-size: 13px; line-height: 1.7; }

/* Image / PDF */
.qa-image-frame {
  background: var(--paper-2);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  overflow: hidden;
  max-height: 560px;
  overflow-y: auto;
}
.qa-image-frame img { display: block; width: 100%; height: auto; }
.qa-pdf-frame {
  border-radius: 12px;
  overflow: hidden;
  background: var(--paper-2);
  border: 1px solid var(--line-soft);
}
.qa-meta-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 12px;
}
.qa-meta-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--pill-bg);
  color: var(--ink);
  border: 1px solid var(--line-soft);
  text-transform: lowercase;
  letter-spacing: 0.02em;
  font-family: var(--mono);
}
.qa-pill-accent {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.qa-button {
  display: inline-block;
  padding: 9px 16px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 8px;
  font-weight: 700;
  font-size: 13px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  font-family: var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.qa-button:hover {
  background: var(--ink-soft);
  text-decoration: none;
  color: var(--paper);
}

/* Snapshot */
.qa-snapshot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 900px) {
  .qa-snapshot-grid { grid-template-columns: 1fr; }
}
.qa-snapshot-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Scrape */
.qa-scrape-group {
  background: var(--paper-2);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  margin-bottom: 14px;
  overflow: hidden;
}
.qa-scrape-selector {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line-soft);
  flex-wrap: wrap;
  background: var(--card);
}
.qa-scrape-selector code {
  font-size: 12.5px;
  color: var(--ink);
  background: var(--paper-2);
  padding: 4px 10px;
  border-radius: 4px;
  flex: 1;
  border: 1px solid var(--line-soft);
}
.qa-scrape-table, .qa-links-table, .qa-crawl-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.qa-scrape-table th, .qa-links-table th, .qa-crawl-table th {
  padding: 10px 16px;
  text-align: left;
  font-weight: 700;
  color: var(--ink-mute);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: var(--paper-2);
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--mono);
}
.qa-scrape-table td, .qa-links-table td, .qa-crawl-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}
.qa-scrape-table tr:last-child td, .qa-links-table tr:last-child td, .qa-crawl-table tr:last-child td {
  border-bottom: none;
}
.qa-scrape-text {
  color: var(--ink);
  max-width: 480px;
  word-break: break-word;
}
.qa-scrape-attrs { font-size: 11.5px; }
.qa-scrape-attrs code {
  color: var(--ink-soft);
  background: transparent;
  margin-right: 8px;
  display: inline-block;
}
.qa-scrape-more {
  text-align: center;
  font-size: 12px;
  color: var(--ink-mute);
  font-style: italic;
}

/* JSON action */
.qa-json-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 900px) {
  .qa-json-grid { grid-template-columns: 1fr; }
}

/* Links */
.qa-links-table {
  background: var(--paper-2);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  overflow: hidden;
}
.qa-link-href { word-break: break-all; font-family: var(--mono); font-size: 12px; }
.qa-link-href code { color: var(--ink); background: transparent; }
.qa-link-kind { text-align: right; white-space: nowrap; }

/* Crawl */
.qa-crawl-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.qa-crawl-stat {
  background: var(--paper-2);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.qa-crawl-stat code {
  font-size: 11px;
  color: var(--ink);
  word-break: break-all;
}
.qa-crawl-table {
  background: var(--paper-2);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  overflow: hidden;
}
.qa-crawl-title {
  max-width: 240px;
  font-weight: 600;
}
.qa-crawl-url {
  max-width: 280px;
  word-break: break-all;
  font-size: 11.5px;
}
.qa-crawl-url code {
  color: var(--ink-soft);
  background: transparent;
  font-size: 11.5px;
}

/* Mobile table → stacked card layouts */
@media (max-width: 720px) {
  .qa-scrape-table thead,
  .qa-links-table thead,
  .qa-crawl-table thead { display: none; }

  .qa-scrape-table,
  .qa-links-table,
  .qa-crawl-table { font-size: 13px; }

  .qa-scrape-table tr,
  .qa-links-table tr,
  .qa-crawl-table tr {
    display: block;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line-soft);
  }
  .qa-scrape-table tr:last-child,
  .qa-links-table tr:last-child,
  .qa-crawl-table tr:last-child { border-bottom: none; }

  .qa-scrape-table td,
  .qa-links-table td,
  .qa-crawl-table td {
    display: block;
    padding: 0;
    border: none;
  }

  /* Scrape: text on top, attributes below */
  .qa-scrape-text {
    max-width: none;
    margin-bottom: 6px;
    font-size: 14px;
    line-height: 1.45;
  }
  .qa-scrape-attrs { font-size: 11px; color: var(--ink-mute); line-height: 1.6; }
  .qa-scrape-attrs code { display: inline; margin-right: 6px; word-break: break-all; }

  .qa-scrape-selector { padding: 10px 12px; gap: 8px; }
  .qa-scrape-selector code { font-size: 12px; padding: 3px 8px; }

  /* Links: URL on top, kind pill aligned left below */
  .qa-link-href { font-size: 11.5px; margin-bottom: 6px; }
  .qa-link-kind { text-align: left; }

  /* Crawl: status + http inline at top, size right-aligned, then title and url full-width below */
  .qa-crawl-table tr {
    display: grid;
    grid-template-columns: auto auto 1fr;
    grid-template-areas:
      "status http size"
      "title  title title"
      "url    url   url";
    gap: 6px 8px;
    align-items: center;
  }
  .qa-crawl-table td:nth-child(1) { grid-area: status; }
  .qa-crawl-table td:nth-child(2) { grid-area: http; }
  .qa-crawl-table td:nth-child(3) {
    grid-area: title;
    max-width: none;
    margin-top: 4px;
  }
  .qa-crawl-table td:nth-child(4) { grid-area: url; max-width: none; }
  .qa-crawl-table td:nth-child(5) {
    grid-area: size;
    justify-self: end;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--ink-mute);
  }

  /* Crawl summary stats: tighter grid */
  .qa-crawl-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .qa-crawl-stat { padding: 10px 12px; font-size: 12px; }
}

/* Pending state */
.qa-pending {
  background: rgba(193, 74, 26, 0.08);
  border: 1px dashed rgba(193, 74, 26, 0.4);
  border-radius: 12px;
  padding: 16px 20px;
  font-size: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.qa-pending strong { color: var(--accent-warm); }
.qa-pending code {
  background: var(--paper-2);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--ink);
  border: 1px solid var(--line-soft);
}

.qa-empty {
  padding: 16px 20px;
  background: var(--paper-2);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  color: var(--ink-mute);
  font-size: 13px;
}

.qa-footer {
  margin-top: 96px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-mute);
  text-align: center;
  line-height: 1.7;
  font-family: var(--serif);
  font-style: italic;
}

/* === Mobile: tighter card chrome, code bleeds to card edges, side-scroll instead of wrap === */
@media (max-width: 720px) {
  .qa-page { padding: 36px 14px 56px; }

  /* Card stays a card, but tighter */
  .qa-cards { gap: 20px; }
  .qa-card { border-radius: 14px; }
  .qa-head { padding: 18px 16px 14px; gap: 12px; }
  .qa-body { padding: 16px 14px 18px; gap: 14px; }
  .qa-num { font-size: 36px; }

  /* Badges bleed to card edges, smaller / more subordinate on mobile */
  .qa-badges {
    margin: 0 -14px;
    padding: 0 14px 4px;
    gap: 8px;
  }
  .qa-badge {
    padding: 6px 10px;
    border-radius: 8px;
    min-width: 0;
  }
  .qa-badge .b-label { font-size: 9px; letter-spacing: 0.08em; }
  .qa-badge .b-value { font-size: 12px; }

  /* Code / output containers bleed to card edges and lose side borders */
  .qa-codeblock,
  .qa-image-frame,
  .qa-pdf-frame,
  .qa-scrape-group,
  .qa-links-table,
  .qa-crawl-table {
    margin-left: -14px;
    margin-right: -14px;
    border-left: none;
    border-right: none;
    border-radius: 0;
  }
  .qa-codeblock-head { padding: 9px 14px; }
  .qa-code { padding: 14px; }

  /* qa-api bleeds within the card; nested codeblocks ride along, no double-bleed */
  .qa-api {
    margin: 0 -14px;
    border-left: none;
    border-right: none;
    border-radius: 0;
  }
  .qa-api > summary { padding: 12px 14px; }
  .qa-api-grid { padding: 0; gap: 1px; }
  .qa-api .qa-codeblock {
    margin: 0;
    border: none;
    border-top: 1px solid var(--code-line);
    border-radius: 0;
  }

  /* Side-scroll rendered HTML / markdown previews instead of wrapping */
  .qa-html-preview, .qa-md-preview {
    white-space: pre;
    word-break: normal;
    max-height: 420px;
  }

  /* Snapshot grid columns also bleed within the card */
  .qa-snapshot-grid {
    margin-left: -14px;
    margin-right: -14px;
    gap: 14px;
  }
  .qa-snapshot-col > .qa-codeblock-head { padding-left: 14px; padding-right: 14px; }

  .qa-footer { margin-top: 56px; padding-top: 24px; }
}
