/* ==========================================================================
   Clarity Act Crypto — Design System
   Restrained, editorial, greyscale-first system (tier1-marketing-site tokens
   adapted for a static multi-page content site). Whitespace and typography
   do the work; decoration is avoided on purpose.
   ========================================================================== */

:root {
  /* Greyscale-first palette. Colour is reserved for functional signal only
     (the three quiz-result states) — never for section decoration. */
  --ink: #111111;
  --body: #555555;
  --support: #707070; /* nudged from #777 — was 4.48:1 on white, just under AA's
    4.5:1 for normal-size nav text; #707070 clears it (4.95:1). */
  --label: #6b6b6b; /* darkened from the skill's literal #999 token — #999 on white
    fails WCAG AA (2.85:1) and this token is used for real content (footer nav
    links, breadcrumbs, disclosure text), not just decoration. #6b6b6b clears
    AA (5.3:1) while still reading as clearly secondary to --body/--ink. */
  --hint: #cccccc; /* kept light — used only for non-text decoration (underline
    color, border/box-shadow), never as a text color. See --label above for text. */
  --line: #e8e8e8;
  --line-soft: #f0f0f0;
  --white: #ffffff;
  --alt: #fafafa;

  /* Functional-only colour (quiz result states, status dot) — kept muted */
  --ok: #1f8a4c;
  --ok-bg: #f2f8f4;
  --bad: #c0392b;
  --bad-bg: #fbf2f1;
  --warn: #8a6d1f;
  --warn-bg: #f8f5ec;

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --max-width: 1060px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-card: 0 8px 30px rgba(0, 0, 0, 0.06);
  --section-pad: 140px;
}

@media (max-width: 760px) {
  :root { --section-pad: 96px; }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; display: block; }

a { color: var(--ink); text-decoration: none; }
a:hover { text-decoration: underline; }
.prose a, .card a, .footer-disclaimer a { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 2px; }
.prose a:hover, .card a:hover, .footer-disclaimer a:hover { text-decoration-color: currentColor; }

h1, h2, h3, h4 { font-weight: 600; letter-spacing: -0.03em; line-height: 1.08; color: var(--ink); margin-top: 0; }
h1 { font-size: clamp(2.6rem, 5.5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); margin-top: 2.5rem; letter-spacing: -0.025em; }
h3 { font-size: 1.5rem; letter-spacing: -0.02em; margin-top: 1.75rem; }
p { margin: 0 0 1rem; color: var(--body); }
ul, ol { color: var(--body); }
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff;
  padding: 10px 16px; z-index: 1000; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Top utility bar ---------- */
.utility-bar {
  background: var(--alt); color: var(--support); font-size: 0.8rem; padding: 9px 0;
  border-bottom: 1px solid var(--line-soft);
}
.utility-bar .container { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.utility-bar a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--hint); text-underline-offset: 2px; }
.utility-bar strong { color: var(--ink); font-weight: 600; }

/* ---------- Header / Nav ---------- */
header.site-header {
  /* Note: deliberately NOT using backdrop-filter/filter/transform here — any
     of those on an ancestor creates a new containing block for descendant
     position:fixed elements (like the mobile nav overlay below), which
     would silently break its full-screen positioning. Solid translucent
     background gets a similar "frosted" read without that side effect. */
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line-soft);
  position: sticky; top: 0; z-index: 100;
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; gap: 16px; }
.brand { display: flex; align-items: baseline; gap: 8px; font-weight: 600; font-size: 1.05rem; letter-spacing: -0.02em; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand .mark { display: none; } /* plain text wordmark only — no icon/logo mark */
.brand .tagline { display: none; } /* keep the wordmark clean; domain lives in the footer */

nav.primary-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
nav.primary-nav a {
  color: var(--support); font-weight: 500; font-size: 0.85rem; padding: 8px 12px; border-radius: 8px;
}
nav.primary-nav a:hover, nav.primary-nav a[aria-current="page"] { color: var(--ink); text-decoration: none; }
.nav-cta {
  background: var(--ink) !important; color: #fff !important; padding: 10px 22px !important;
  border-radius: 999px; font-weight: 500 !important; margin-left: 4px;
  transition: background 0.15s ease, transform 0.15s ease;
}
.nav-cta:hover { background: #333 !important; transform: translateY(-1px); }

.nav-toggle {
  display: none; border: 1px solid var(--line); border-radius: 999px; background: #fff;
  width: 40px; height: 40px; align-items: center; justify-content: center; cursor: pointer;
}
.nav-toggle span { display: block; width: 16px; height: 1.5px; background: var(--ink); position: relative; }
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; width: 16px; height: 1.5px; background: var(--ink); transition: transform .2s ease; }
.nav-toggle span::before { top: -5px; }
.nav-toggle span::after { top: 5px; }

@media (max-width: 900px) {
  nav.primary-nav {
    display: none; position: fixed; inset: 0; top: 65px; z-index: 99;
    background: rgba(255,255,255,0.96); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    flex-direction: column; align-items: stretch; gap: 0; padding: 12px 24px;
  }
  nav.primary-nav.open { display: flex; }
  nav.primary-nav a { padding: 16px 4px; border-bottom: 1px solid var(--line-soft); border-radius: 0; font-size: 1rem; }
  .nav-cta { margin: 16px 0 0; text-align: center; justify-content: center; }
  .nav-toggle { display: inline-flex; }
}

/* ---------- Status banner ---------- */
.status-banner {
  background: var(--alt); border-bottom: 1px solid var(--line-soft);
  padding: 12px 0; font-size: 0.86rem; color: var(--body);
}
.status-banner .container { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.status-banner a { text-decoration: underline; text-decoration-color: var(--hint); text-underline-offset: 2px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink); flex-shrink: 0; animation: pulse 2.4s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

/* ---------- Hero (centred, plain background — no split, no gradient) ---------- */
.hero { padding: 96px 0 72px; text-align: center; }
.hero .container { max-width: 760px; }
.hero h1 { color: var(--ink); }
.hero .lede { color: var(--body); font-size: 1.2rem; max-width: 620px; margin: 0 auto 1rem; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 1.75rem; justify-content: center; }
.hero-meta { display: flex; gap: 32px; flex-wrap: wrap; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--line-soft); justify-content: center; }
.hero-meta div { min-width: 120px; }
.hero-meta .num { font-size: 1.4rem; font-weight: 600; color: var(--ink); letter-spacing: -0.02em; }
.hero-meta .lbl { font-size: 0.78rem; color: var(--label); margin-top: 2px; }

/* ---------- Buttons (pill, greyscale) ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 500; font-size: 0.92rem;
  padding: 12px 28px; border-radius: 999px; border: 1px solid transparent; cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease, color 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-primary:hover { background: #333; }
.btn-outline, .btn-navy {
  background: #fff; color: var(--ink); border-color: #ddd;
}
.btn-outline:hover, .btn-navy:hover { border-color: var(--ink); background: #fff; }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

/* ---------- Sections / cards ---------- */
main { display: block; }
section.section { padding: 72px 0; }
@media (min-width: 900px) { section.section { padding: var(--section-pad) 0; } }
section.section.alt { background: var(--alt); }
.section-head { max-width: 640px; margin-bottom: 2.5rem; }
.eyebrow {
  display: inline-block; font-size: 0.8rem; font-weight: 500; letter-spacing: 0; color: var(--label);
  margin-bottom: 14px;
}

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 28px; transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.card:hover { box-shadow: var(--shadow-card); transform: translateY(-2px); border-color: #ddd; }
.card h3 { margin-top: 0; font-size: 1.15rem; }
.card h3 a { color: inherit; }
.card h3 a:hover { color: var(--ink); }
.card .meta { font-size: 0.8rem; color: var(--label); margin-bottom: 8px; }

/* ---------- Functional badges (kept minimal — outline only, no fill) ---------- */
.pill { display: inline-block; font-size: 0.72rem; font-weight: 500; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--support); background: #fff; }
.pill-gov { color: var(--ink); border-color: var(--ink); }
.pill-senate { color: var(--support); }
.pill-house { color: var(--support); }
.pill-law { color: var(--ink); border-color: var(--ink); }

/* ---------- Answer / TL;DR boxes (GEO/AEO) — neutral, not coloured ---------- */
.answer-box {
  background: var(--alt); border-left: 3px solid var(--ink);
  border-radius: var(--radius-sm); padding: 20px 22px; margin: 1.5rem 0;
}
.answer-box p:last-child { margin-bottom: 0; }
.answer-box .lbl { font-weight: 600; font-size: 0.76rem; letter-spacing: 0.02em; color: var(--label); display: block; margin-bottom: 8px; }

.callout {
  border: 1px solid var(--line); border-radius: var(--radius-md); padding: 20px 22px; background: var(--alt);
  margin: 1.5rem 0;
}
.callout.warn { border-color: var(--line); background: #fff; border: 1px solid var(--ink); }
.callout.warn strong { color: var(--ink); }

/* ---------- Tables ---------- */
table { width: 100%; border-collapse: collapse; margin: 1.75rem 0; font-size: 0.94rem; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
th { background: var(--alt); font-weight: 600; color: var(--ink); }

/* ---------- FAQ / accordion (native details, Cal.com pattern) ---------- */
details.faq-item {
  border-bottom: 1px solid var(--line-soft); padding: 18px 0;
}
details.faq-item summary {
  cursor: pointer; font-weight: 600; color: var(--ink); list-style: none; display: flex;
  justify-content: space-between; align-items: center; gap: 12px;
}
details.faq-item summary::-webkit-details-marker { display: none; }
details.faq-item summary::after {
  content: "+"; font-size: 1.2rem; color: var(--label); flex-shrink: 0; font-weight: 400;
  transition: transform 0.2s ease; display: inline-block;
}
details.faq-item[open] summary::after { transform: rotate(45deg); }
details.faq-item .faq-answer { margin-top: 12px; color: var(--body); }

/* ---------- Glossary ---------- */
.glossary-entry { border-bottom: 1px solid var(--line-soft); padding: 22px 0; }
.glossary-entry dt { font-weight: 600; font-size: 1.05rem; color: var(--ink); letter-spacing: -0.01em; }
.glossary-entry dd { margin: 8px 0 0; color: var(--body); }
.jump-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 1.75rem 0; }
.jump-nav a {
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font-size: 0.82rem; font-weight: 500;
  color: var(--support);
}
.jump-nav a:hover { border-color: var(--ink); color: var(--ink); text-decoration: none; }

/* ---------- Timeline ---------- */
.timeline { position: relative; margin: 2.25rem 0; padding-left: 28px; border-left: 1px solid var(--line); }
.timeline-item { position: relative; padding-bottom: 34px; }
.timeline-item::before {
  content: ""; position: absolute; left: -33px; top: 4px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--ink); border: 3px solid #fff; box-shadow: 0 0 0 1px var(--ink);
}
.timeline-item.future::before { background: #fff; box-shadow: 0 0 0 1px var(--hint); }
.timeline-item .date { font-size: 0.78rem; font-weight: 500; color: var(--label); letter-spacing: 0.01em; }
.timeline-item h3 { margin-top: 4px; font-size: 1.2rem; }

/* ---------- Newsletter / email capture — the one deliberate flat-black block ---------- */
.newsletter-box {
  background: var(--ink); color: #fff; border-radius: var(--radius-lg); padding: 40px; text-align: left;
}
.newsletter-box h2, .newsletter-box h3 { color: #fff; }
.newsletter-box p { color: #b3b3b3; }
.newsletter-form { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 1rem; }
.newsletter-form input[type="email"] {
  flex: 1 1 240px; padding: 12px 16px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.08); color: #fff; font-size: 0.92rem; font-family: var(--font-sans);
}
.newsletter-form input::placeholder { color: #888; }
.newsletter-form .btn-primary { background: #fff; color: var(--ink); border-color: #fff; }
.newsletter-form .btn-primary:hover { background: #e6e6e6; }
.newsletter-form .fine { font-size: 0.76rem; color: #999; margin-top: 10px; }
.fine { font-size: 0.76rem; color: var(--label); margin-top: 10px; }

/* ---------- Quiz tool ---------- */
.quiz-shell { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 36px; }
.quiz-progress { height: 3px; background: var(--line-soft); border-radius: 999px; overflow: hidden; margin-bottom: 28px; }
.quiz-progress-bar { height: 100%; background: var(--ink); width: 0%; transition: width 0.3s ease; }
.quiz-question { display: none; }
.quiz-question.active { display: block; animation: fadein 0.25s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.quiz-options { display: grid; gap: 10px; margin-top: 1.5rem; }
.quiz-option {
  text-align: left; padding: 15px 18px; border: 1px solid var(--line); border-radius: 10px; background: #fff;
  cursor: pointer; font-size: 0.95rem; font-weight: 500; color: var(--ink); font-family: var(--font-sans);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.quiz-option:hover { border-color: var(--ink); }
.quiz-option.selected { border-color: var(--ink); background: var(--alt); }
.quiz-nav { display: flex; justify-content: space-between; margin-top: 28px; gap: 10px; }
.quiz-result { display: none; }
.quiz-result.active { display: block; animation: fadein 0.3s ease; }
.result-badge {
  display: inline-block; font-weight: 500; font-size: 0.82rem; padding: 7px 16px; border-radius: 999px;
  margin-bottom: 18px; border: 1px solid var(--line);
}
.result-commodity { background: var(--ok-bg); color: var(--ok); border-color: #d7ecdf; }
.result-security { background: var(--bad-bg); color: var(--bad); border-color: #f3dcda; }
.result-unclear { background: var(--warn-bg); color: var(--warn); border-color: #ece2c6; }

/* ---------- Footer (light, per design system — no dark section) ---------- */
footer.site-footer { background: var(--white); color: var(--support); padding: 64px 0 28px; margin-top: 40px; border-top: 1px solid var(--line-soft); }
footer.site-footer h4 { color: var(--ink); font-size: 0.85rem; font-weight: 600; margin: 0 0 16px; }
footer.site-footer a { color: var(--label); font-size: 0.82rem; }
footer.site-footer a:hover { color: var(--ink); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-bottom {
  /* --label (not --hint) — this line carries the copyright + "not advice"
     notice, so it needs to actually be legible, not just decoratively faint. */
  border-top: 1px solid var(--line-soft); margin-top: 44px; padding-top: 22px; font-size: 0.74rem;
  color: var(--label); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
}
.footer-disclaimer {
  /* --label, not --hint — this paragraph carries the FTC affiliate-link
     disclosure and legal disclaimer; it must stay legible, not just present. */
  font-size: 0.78rem; color: var(--label); max-width: 900px; margin-top: 18px; line-height: 1.7;
}
.footer-disclaimer a { color: var(--label); }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { font-size: 0.82rem; color: var(--label); padding: 18px 0 6px; }
.breadcrumbs a { color: var(--label); }
.breadcrumbs a:hover { color: var(--ink); }

/* ---------- Related / internal links block ---------- */
.related-links { background: var(--alt); border-radius: var(--radius-lg); padding: 28px; margin: 3rem 0; }
.related-links h2 { margin-top: 0; font-size: 1.05rem; }
.related-links ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.related-links a { font-weight: 500; text-decoration: underline; text-decoration-color: var(--hint); text-underline-offset: 2px; }

/* ---------- Prose / article pages ---------- */
.prose { max-width: 720px; }
.prose h2 { border-bottom: 1px solid var(--line-soft); padding-bottom: 10px; }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li { margin-bottom: 0.5rem; }
.byline { display: flex; gap: 10px; align-items: center; font-size: 0.85rem; color: var(--label); margin-bottom: 2rem; }
.byline .avatar {
  width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 0.75rem; flex-shrink: 0;
}

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.small { font-size: 0.85rem; color: var(--label); }
.mt-0 { margin-top: 0; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ---------- Scroll-reveal (the one animation the system allows) ----------
   IMPORTANT: content must always be visible without JavaScript — this is a
   content/SEO site, not a marketing splash page, and hidden-until-scrolled
   text is unacceptable for crawlers, AI answer engines, and no-JS users.
   `.reveal` alone is always fully visible. Only `.reveal.pending` (added by
   main.js, and only when JS actually runs) starts hidden, and main.js keeps
   a safety-net timer that force-reveals anything left pending. */
.reveal { opacity: 1; transform: none; }
.reveal.pending { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.reveal.pending.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal.pending { opacity: 1; transform: none; transition: none; }
}
