/* site.css · v1 · 2026-08-11 · bestaivoicegenerator.com design system
   Dark default, light via prefers-color-scheme — same palette family as the
   launch page. System font stack, restrained accents, prose measure ~46rem,
   tables may run wider inside a scrollable wrapper. */

:root {
  color-scheme: dark light;
  --bg: #0f1115;
  --bg-soft: #161a22;
  --fg: #e6e8ee;
  --muted: #9aa3b2;
  --faint: #7c8aa0;
  --line: #2a3140;
  --accent: #93b8ea;
  --accent-contrast: #0f1115;
  --measure: 46rem;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #fbfcfe;
    --bg-soft: #f1f4f9;
    --fg: #111826;
    --muted: #4a5568;
    --faint: #5a6478;
    --line: #dde3ec;
    --accent: #2b5aa0;
    --accent-contrast: #fbfcfe;
  }
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font: 16px/1.65 ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--fg);
  -webkit-text-size-adjust: 100%;
}

/* ---------- Focus & skip link ---------- */

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 10;
  padding: 0.5rem 0.9rem;
  background: var(--accent);
  color: var(--accent-contrast);
  border-radius: 0.4rem;
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-300%);
}
.skip-link:focus { transform: none; }

/* ---------- Links ---------- */

a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

/* ---------- Header ---------- */

.site-header {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 1rem 1rem 0.9rem;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.6rem 1.4rem;
}
.site-name {
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--fg);
  text-decoration: none;
}
.site-name:hover { color: var(--accent); }
.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1.1rem;
  margin-left: auto;
  font-size: 0.95rem;
}
.site-header nav a { color: var(--muted); text-decoration: none; }
.site-header nav a:hover { color: var(--accent); text-decoration: underline; }

/* ---------- Main / prose measure ---------- */

main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0.5rem 0 1rem;
}
h2 {
  font-size: 1.35rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 2.2rem 0 0.7rem;
}
h3 {
  font-size: 1.1rem;
  line-height: 1.35;
  margin: 1.6rem 0 0.5rem;
}

p { margin: 0 0 1rem; }
main > p, li { color: var(--fg); }
.lede { color: var(--muted); font-size: 1.05rem; }

ul, ol { padding-left: 1.4rem; margin: 0 0 1rem; }
li { margin-bottom: 0.35rem; }

hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

/* Small uppercase pill, as on the launch page */
.tag {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  margin-bottom: 1rem;
}

/* ---------- Breadcrumb (must be rendered wherever BreadcrumbList schema ships) ---------- */

.breadcrumb {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 0.75rem;
}
.breadcrumb ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; }
.breadcrumb li { margin: 0; }
.breadcrumb li + li::before { content: "\203A"; color: var(--faint); padding: 0 0.5rem; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--accent); }

/* ---------- Dated update line (06 rules 26–27, 33) ---------- */

.updated-line {
  font-size: 0.85rem;
  color: var(--muted);
  border-left: 2px solid var(--line);
  padding-left: 0.7rem;
  margin: 0 0 1.25rem;
}

/* ---------- Verdict capsule (answer-first block, 04 rule 36; 06 rule 35) ---------- */

.verdict-capsule {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 0.5rem;
  padding: 1rem 1.1rem;
  margin: 1.25rem 0 1.75rem;
}
.verdict-capsule > :first-child { margin-top: 0; }
.verdict-capsule > :last-child { margin-bottom: 0; }
.verdict-capsule .updated-line { border: 0; padding: 0; margin: 0.6rem 0 0; }

/* ---------- Tables (semantic, striped, scrollable) ---------- */
/* Every table sits inside <div class="table-wrap"> so wide data scrolls
   inside its own container instead of the page. Add .wide to let the
   wrapper break out of the prose measure on large screens. */

.table-wrap {
  overflow-x: auto;
  margin: 1.25rem 0;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
}
@media (min-width: 64rem) {
  .table-wrap.wide {
    width: min(62rem, 92vw);
    position: relative;
    left: 50%;
    transform: translateX(-50%);
  }
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.95rem;
}
caption {
  text-align: left;
  font-weight: 600;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--line);
}
th, td {
  text-align: left;
  vertical-align: top;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--line);
}
thead th {
  font-weight: 600;
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: var(--bg-soft);
}
tbody tr:nth-child(even) { background: var(--bg-soft); }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }

/* Metadata table (review/page fact box, 04 rule 19) — compact two-column */
.metadata-table table, table.metadata-table { font-size: 0.9rem; }
.metadata-table th[scope="row"], table.metadata-table th[scope="row"] {
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
  width: 11rem;
  background: transparent;
  text-transform: none;
  letter-spacing: normal;
  font-size: 0.9rem;
}

/* ---------- FAQ blocks (visible HTML only — no FAQPage markup) ---------- */

.faq details {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  margin: 0.75rem 0;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--fg);
}
.faq summary:hover { color: var(--accent); }
.faq details[open] summary { margin-bottom: 0.5rem; }
.faq details > :last-child { margin-bottom: 0; }
/* Non-collapsible fallback */
.faq-item { border-top: 1px solid var(--line); padding: 0.9rem 0 0.2rem; }
.faq-item h3 { margin-top: 0; }

/* ---------- Footer ---------- */

.site-footer {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 1.25rem 1rem 2.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--muted);
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
  margin-bottom: 0.75rem;
}
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--accent); text-decoration: underline; }
