/* ──────────────────────────────────────────────────────────────
 * Product subpage styles (FAQs, guides, help docs living under
 * /products/<slug>/*.html). Depends on css/tokens.css for the
 * brand palette — this file only adds the document-chrome layer
 * (page surfaces, text muted, callouts, borders).
 *
 * Used by every /products/<slug>/faq.html page. Before this file
 * existed, each FAQ had a ~150-line inline <style> duplicating
 * these rules — three copies, three places to drift. Now one.
 *
 * Accent override: pages that want an accent other than indigo
 * can set `data-accent="sd"` (violet / SenseDedupe) on <html>.
 * See the rule at the bottom of this file.
 * ────────────────────────────────────────────────────────────── */

:root {
  /* Semantic surfaces derived from the brand tokens. These stay
   * page-local so tokens.css can remain brand-only. */
  --page-bg:        #F6F7FB;
  --surface:        #FFFFFF;
  --border-subtle:  #E7EAF3;
  --text-primary:   var(--navy);
  --text-muted:     #4B556B;
  --accent:         var(--sv-700);
  --accent-light:   var(--sv-500);

  /* Callouts */
  --warn-bg:        #FFFBEB;
  --warn-border:    #FCD34D;
  --warn-fg:        #92400E;
  --ok-bg:          #ECFDF5;
  --ok-border:      #6EE7B7;
  --ok-fg:          #065F46;
}

/* SenseDedupe and any future violet-accent product subpages opt
 * in via <html data-accent="sd"> without needing a separate CSS
 * file. Keep the accent swap to the two colours actually used
 * for links and eyebrow text. */
html[data-accent="sd"] {
  --accent:       var(--sd-700);
  --accent-light: var(--sd-500);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-sans);
  background: var(--page-bg);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  line-height: 1.7;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Top nav — consistent with site, but self-contained so this
   file drops in without requiring the full shared nav markup. ── */
.subpage-nav {
  background: var(--navy);
  padding: 0 24px;
  height: 58px;
  display: flex; align-items: center; justify-content: space-between;
}
.subpage-nav .nav-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.subpage-nav .nav-logo {
  width: 30px; height: 30px; border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.subpage-nav .nav-logo img,
.subpage-nav .nav-logo svg { width: 100%; height: 100%; display: block; }
.subpage-nav .nav-wordmark {
  font-size: 15px; font-weight: 700; color: #fff;
  letter-spacing: -0.02em;
}
.subpage-nav ul { display: flex; align-items: center; gap: 20px; list-style: none; }
.subpage-nav ul a {
  font-size: 13px; font-weight: 500;
  color: rgba(255,255,255,0.55);
  transition: color 140ms;
}
.subpage-nav ul a:hover { color: #fff; text-decoration: none; }

/* ── Page wrap ─────────────────────────────────────────────────── */
.page-wrap { max-width: 740px; margin: 0 auto; padding: 60px 24px 80px; }

.doc-header {
  background: var(--surface); border: 1px solid var(--border-subtle);
  border-radius: 16px; padding: 36px 40px 32px; margin-bottom: 24px;
}
.doc-eyebrow {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--accent-light); margin-bottom: 10px;
}
.doc-title {
  font-size: 2rem; font-weight: 800;
  letter-spacing: -0.04em; color: var(--text-primary);
  margin-bottom: 10px; line-height: 1.15;
}
.doc-intro { font-size: 14px; color: var(--text-muted); }

/* ── FAQ index pills ───────────────────────────────────────────── */
.faq-index {
  background: var(--surface); border: 1px solid var(--border-subtle);
  border-radius: 14px; padding: 18px 22px; margin-bottom: 24px;
}
.faq-index-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 10px;
}
.faq-index-list { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.faq-index-list a {
  font-size: 12.5px; padding: 5px 11px; border-radius: 999px;
  background: var(--sv-50); color: var(--accent); border: 1px solid var(--sv-200);
  transition: background 140ms;
}
html[data-accent="sd"] .faq-index-list a {
  background: var(--sd-50); border-color: var(--sd-200);
}
.faq-index-list a:hover { filter: brightness(0.97); text-decoration: none; }

/* ── Q/A body ──────────────────────────────────────────────────── */
.doc-body {
  background: var(--surface); border: 1px solid var(--border-subtle);
  border-radius: 16px; padding: 40px;
}
.qa { padding: 22px 0; border-bottom: 1px solid var(--border-subtle); }
.qa:first-child { padding-top: 0; }
.qa:last-child  { padding-bottom: 0; border-bottom: none; }
.qa > .q {
  font-size: 15.5px; font-weight: 700; color: var(--text-primary);
  letter-spacing: -0.015em; margin-bottom: 10px; line-height: 1.35;
}
.qa > .a { font-size: 14px; color: var(--text-muted); }
.qa > .a p { margin-bottom: 12px; }
.qa > .a p:last-child { margin-bottom: 0; }
.qa > .a ul { padding-left: 20px; margin-bottom: 12px; }
.qa > .a li { margin-bottom: 6px; line-height: 1.6; }
.qa > .a strong { color: var(--text-primary); font-weight: 600; }
.qa > .a code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px; padding: 1px 5px; border-radius: 4px;
  background: #F1F3F9; color: var(--text-primary);
}

/* ── Callouts ──────────────────────────────────────────────────── */
.callout {
  background: var(--warn-bg); border: 1px solid var(--warn-border);
  border-radius: 10px; padding: 12px 16px;
  font-size: 13.5px; color: var(--warn-fg); margin: 12px 0;
}
.callout.ok {
  background: var(--ok-bg); border-color: var(--ok-border); color: var(--ok-fg);
}

/* ── Footer ────────────────────────────────────────────────────── */
.subpage-footer {
  background: #05080F;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 28px 24px;
}
.subpage-footer .footer-inner {
  max-width: 740px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
}
.subpage-footer ul { display: flex; gap: 20px; list-style: none; flex-wrap: wrap; }
.subpage-footer ul a {
  font-size: 12px; font-weight: 500;
  color: rgba(255,255,255,0.35);
}
.subpage-footer ul a:hover { color: rgba(255,255,255,0.7); text-decoration: none; }
.subpage-footer .footer-copy { font-size: 11px; color: rgba(255,255,255,0.2); }

@media (max-width: 600px) {
  .doc-header, .doc-body { padding: 24px; }
  .doc-title { font-size: 1.6rem; }
}
