/* ---------------------------------------------------------------------------
 * Shared stylesheet for the static content pages (/study-guide/, /domains/*).
 * Hand-written to match the design tokens in index.html's inline <style> —
 * same colors, same card/button language — so a reader doesn't feel like
 * they left the app when they land here from search.
 * These pages are plain server-rendered HTML (no JS needed to read them),
 * so this file is linked normally rather than inlined.
 * ------------------------------------------------------------------------ */

:root {
  --surface-1: #fcfcfb;
  --page: #f9f9f7;
  --ink-1: #0b0b0b;
  --ink-2: #52514e;
  --ink-3: #898781;
  --grid: #e1e0d9;
  --border: rgba(11,11,11,0.10);
  --border-strong: rgba(11,11,11,0.18);
  --accent: #2a78d6;
  --accent-soft: #cde2fb;
  --good: #006300;
  --good-bg: rgba(12,163,12,0.10);
  --radius-sm: 10px;
  --radius-md: 14px;
  --shadow-sm: 0 1px 2px rgba(11,11,11,0.05);
  --shadow-md: 0 6px 20px rgba(11,11,11,0.07), 0 1px 3px rgba(11,11,11,0.05);
}
@media (prefers-color-scheme: dark) {
  :root {
    --surface-1: #1a1a19;
    --page: #0d0d0d;
    --ink-1: #ffffff;
    --ink-2: #c3c2b7;
    --ink-3: #898781;
    --grid: #2c2c2a;
    --border: rgba(255,255,255,0.10);
    --border-strong: rgba(255,255,255,0.20);
    --accent: #3987e5;
    --accent-soft: #184f95;
    --good: #0ca30c;
    --good-bg: rgba(12,163,12,0.14);
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.5);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.45);
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--page);
  color: var(--ink-1);
  line-height: 1.6;
}
a { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
.wrap { max-width: 760px; margin: 0 auto; padding: 24px 20px 64px; }
.site-nav { max-width: 760px; margin: 0 auto; padding: 16px 20px 0; font-size: 14px; color: var(--ink-2); }
.site-nav a { color: var(--ink-2); text-decoration: none; }
.site-nav a:hover { color: var(--accent); }
.crumbs { font-size: 13px; color: var(--ink-3); margin-bottom: 14px; }
.crumbs a { color: var(--ink-3); }
h1 { font-size: 26px; font-weight: 700; margin: 6px 0 6px; line-height: 1.25; }
h2 { font-size: 19px; font-weight: 650; margin: 34px 0 10px; }
h3 { font-size: 15px; font-weight: 650; margin: 0 0 8px; }
.lede { font-size: 16px; color: var(--ink-2); margin: 0 0 18px; }
p { font-size: 15px; }
.card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}
.domain-grid {
  display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  margin: 14px 0 8px;
}
.domain-grid a {
  display: block; border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px 14px; text-decoration: none; color: var(--ink-1); background: var(--surface-1);
  font-size: 14px; transition: box-shadow .15s ease, border-color .15s ease, transform .15s ease;
}
@media (hover: hover) {
  .domain-grid a:hover { box-shadow: var(--shadow-md); border-color: var(--border-strong); transform: translateY(-1px); }
  .cta:hover { filter: brightness(1.08); }
}
.domain-grid a strong { display: block; color: var(--accent); font-size: 13px; margin-bottom: 3px; }
table { border-collapse: collapse; width: 100%; font-size: 14px; margin: 10px 0; }
th, td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--grid); }
th { color: var(--ink-2); font-weight: 600; font-size: 13px; }
.q-card { margin-bottom: 16px; }
.q-card .qtext { font-size: 15px; font-weight: 600; margin: 0 0 10px; }
.q-card .opts { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.q-card .opts li {
  border: 1px solid var(--border); border-radius: 8px; padding: 9px 12px; font-size: 14px;
}
.q-card .opts li.correct { border-color: var(--good); background: var(--good-bg); }
.q-card .opts li .tag {
  display: inline-block; font-size: 11px; font-weight: 700; color: var(--good);
  margin-left: 8px; text-transform: uppercase; letter-spacing: 0.02em;
}
.q-card .topic {
  display: inline-block; font-size: 12px; color: var(--ink-3); border: 1px solid var(--border);
  border-radius: 999px; padding: 2px 10px; margin-bottom: 10px;
}
.q-card .explain {
  font-size: 14px; color: var(--ink-2); background: var(--page); border: 1px solid var(--border);
  border-radius: 8px; padding: 12px 14px;
}
.q-card .explain strong { color: var(--ink-1); }
.cta {
  display: inline-block; margin-top: 6px; background: var(--accent); color: #fff !important;
  text-decoration: none; font-weight: 600; font-size: 14px; padding: 10px 18px; border-radius: 8px;
}
.faq dt { font-weight: 650; margin-top: 14px; font-size: 15px; }
.faq dd { margin: 4px 0 0; color: var(--ink-2); font-size: 14px; }
footer.site-footer {
  max-width: 760px; margin: 30px auto 0; padding: 16px 20px; border-top: 1px solid var(--border);
  font-size: 13px; color: var(--ink-3);
}
footer.site-footer a { color: var(--ink-3); }
.pill-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 0; }
.pill { font-size: 12px; padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--ink-1); }

/* ------------------------------------------------------------------- ads */
/* Same collapse-while-empty pattern as index.html's .promo-slot/.ad-slot —
   see ads.js. Stays zero-height and invisible until a publisher ID + slot ID
   + visitor consent are all in place. */
.ad-slot:empty { display: none; }
.ad-slot .ad-label {
  font-size: 11px; color: var(--ink-3); text-transform: uppercase;
  letter-spacing: 0.04em; margin-bottom: 6px;
}
.ad-slot ins.adsbygoogle { display: block; min-height: 250px; }

.consent-banner {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 60;
  max-width: 640px; margin: 0 auto;
  background: var(--surface-1); color: var(--ink-1); border: 1px solid var(--border-strong);
  border-radius: var(--radius-md); box-shadow: var(--shadow-md); padding: 14px 16px; font-size: 13px;
}
.consent-banner p { margin: 0 0 10px; }
.consent-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.consent-banner button {
  font: inherit; font-size: 13px; padding: 7px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface-1); color: var(--ink-1); cursor: pointer;
}
.consent-banner button.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }

.link-btn {
  background: none; border: none; padding: 0; color: var(--accent);
  font: inherit; font-size: 12px; cursor: pointer; text-decoration: underline;
}

footer.site-footer .footer-links { margin-bottom: 4px; }
