/* F15 legal/*.html ship without the Plus Jakarta Sans link, qc-studio.css or body.studio-site, so they render in
   Arial / Georgia / monospace. Same font URL as every other page (the browser dedupes it). Markup fix still recommended. */
@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap");
/* QuidCast v65 — visual QA fixes (CSS only; loaded after qc-lens.css / qc-editorial.css).
   Each block names the finding it closes. Tokens from qc-design.css; the two raw hexes
   (#241a13, #1c2124) are the site's existing "ink on accent" values from qc-lens.css / qc-design.css. */

/* ── F15 (cont.) Pages without the studio layer get the site family, as .studio-site does ── */
body:not(.studio-site),body:not(.studio-site) *{font-family:"Plus Jakarta Sans",system-ui,-apple-system,"Segoe UI",Arial,sans-serif!important}

/* ── F1 Dark theme: white text on the light-peach accent (1.95:1). Use the site's ink-on-accent value, as .qc-primary does. ── */
[data-theme="dark"] .aa-fetch-btn,
[data-theme="dark"] .aa-copy-btn,
[data-theme="dark"] .ailab-run-btn,
[data-theme="dark"] .aa-bookmarklet-btn,
[data-theme="dark"] .tool-badge{color:#241a13}
[data-theme="dark"] .tool-cta-btn{color:#241a13!important}

/* ── F2 AI Lab allocation bar: white 10px label on the gold "bonds" segment (2.84:1) ── */
.ailab-bar-seg.ailab-bar-bonds{color:#1c2124}

/* ── F3 AI Lab step numerals: accent at 35% opacity reads at 1.7:1 (38px display text needs 3:1) ── */
.ailab-step-num{opacity:.72}

/* ── F4 Placeholders: browser-default grey (#757575) is 3.3–4.1:1 on the site surfaces. Use the muted token, as .studio-search already does. ── */
.studio-site input::placeholder,
.studio-site textarea::placeholder,
.qc-dock-form textarea::placeholder{color:var(--muted);opacity:1}

/* ── F5 Footer links: hard-coded #E8661A (2.9:1 on cream). Use the accent token in both themes. ── */
.sf-bottom a,
.sf-links a[style]{color:var(--accent)!important}

/* ── F6 Lead card leaks `font-style:italic` and a 5-line clamp (≤768px) into the "For you" line ── */
.studio-site .lead-card .qc-foryou p{font-style:normal;color:var(--ink)}
@media (max-width:768px){
  .studio-site .lead-card .qc-foryou p{display:block;-webkit-line-clamp:unset;overflow:visible}
}

/* ── F7 Badge row: keep the category icon + label pair together (the icon was wrapping alone); badges follow the category, as on every pre-existing card ── */
.studio-story-top .qc-lens-badge{order:2;margin-right:0}
.studio-story-top{row-gap:8px}

/* ── F8 Lens badges: match the .article-tag type (10px / 1.2px tracking) ── */
.qc-lens-badge{font-size:10px;letter-spacing:1.2px}

/* ── F9 Rail at tablet widths: 3 narrow auto-fit columns left the 4th card orphaned; use a 2×2 grid ── */
@media (min-width:600px) and (max-width:1099px){
  .qc-rail{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* ── F10 Mobile sheet sat under the bottom tab bar (z-index 160 > 120); dialogs share the modal layer (300) ── */
.qc-sheet{z-index:300}

/* ── F11 Dock textarea at ≤480px: the two-line placeholder was clipped at the 48px minimum ── */
@media (max-width:480px){
  .qc-dock-form textarea{min-height:72px}
}

/* ── F12 Mobile tap targets (<44px): sort segment, rail links, sheet close ── */
@media (max-width:768px){
  .qc-lens-seg{padding:3px}
  .qc-lens-seg-btn{min-height:44px}
  .qc-rail-head{align-items:center}
  .qc-rail-head a,.qc-rail-row a{display:inline-flex;align-items:center;min-height:44px;padding:0 6px;margin:-12px -6px}
  .qc-sheet-close{width:44px;height:44px;top:8px;right:10px}
  .qc-guides-heading a{display:inline-flex;align-items:center;min-height:44px}
}

/* ── F13 Topics row at ≤700px: qc-design forces nowrap, qc-editorial removes the scroll, so 9 of 12 topic chips were unreachable ── */
@media (max-width:700px){
  .studio-site #cat-row.categories{flex-wrap:wrap!important;overflow:visible}
}

/* ── F14 Orphaned last words on multi-line headings ── */
.studio-section-head h2,.ailab-step-content h2,#plans-title,article>h2,.modal-article-title{text-wrap:balance}

/* ── Company details (Dash Digital Ltd) in every footer + About; Sources block on guides ── */
.qc-company{margin:14px auto 0;max-width:760px;font-size:12px;line-height:1.55;color:inherit;opacity:.78;text-align:center}
.qc-company a{color:inherit;text-decoration:underline;text-underline-offset:2px}
.site-footer .qc-company{max-width:1320px;padding:0 24px 8px;text-align:left}
.qc-company--inline{margin:10px 0 0;opacity:1;color:var(--muted);text-align:left;font-size:14px}
.qc-company--inline a{color:var(--accent2,inherit)}
.qc-sources{margin-top:34px;padding-top:18px;border-top:1px solid var(--border,rgba(0,0,0,.12))}
.qc-sources h2{font-size:18px;margin:0 0 6px}
.qc-sources-note{font-size:13px;color:var(--muted);margin:0 0 10px}
.qc-sources ul{margin:0;padding-left:18px;font-size:14px;line-height:1.7}
.qc-sources a{color:var(--accent2,inherit);text-decoration:underline;text-underline-offset:2px;overflow-wrap:anywhere}
