/*
  Exam Relay — shared brand styles
  Minimal supplement to Tailwind CDN. Holds brand tokens and a handful
  of components (FAQ accordion, comparison table stripe) that are easier
  to express in CSS than Tailwind class soup.

  Design rules (from decisions/multi-brand-seo-strategy-2026-04-21.md §1.5):
    - ONE primary (navy) + ONE accent (electric green).
    - Each vertical gets ONE tertiary color used sparingly on its spoke.
    - Two fonts maximum: Inter (headings) + system stack (body).
    - Six reusable component blocks. See components below.

  Color tokens are exposed as CSS custom properties so spokes can swap
  their tertiary color without duplicating rules.
*/

:root {
  /* Brand (constant across hub + every spoke) */
  --brand-primary: #0B2545;    /* deep navy */
  --brand-accent:  #00C49A;    /* electric green — "go / pass" */
  --brand-ink:     #0F1F3A;
  --brand-ink-soft:#44506A;
  --brand-paper:   #F8FAFC;
  --brand-border:  #E5E9F0;
  --brand-muted:   #EEF2F6;

  /* Default spoke tertiary (overridden per spoke) */
  --spoke-tertiary: var(--brand-accent);

  /* Type scale */
  --font-heading: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body:    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Content width */
  --content-max: 72rem;   /* ~1152px */
  --prose-max:   42rem;   /* ~672px */

  /* Subtle shadows */
  --shadow-sm: 0 1px 2px rgba(11, 37, 69, 0.06);
  --shadow-md: 0 4px 12px rgba(11, 37, 69, 0.08);
  --shadow-lg: 0 12px 30px rgba(11, 37, 69, 0.12);
}

/* Per-spoke tertiary overrides — set in the spoke HTML via class */
.spoke-leed  { --spoke-tertiary: #2E7D32; }  /* forest green */
.spoke-secai { --spoke-tertiary: #6A1B9A; }  /* cyber purple */
.spoke-tx    { --spoke-tertiary: #BF360C; }  /* burnt orange */

/* Base */
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--brand-ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-heading); color: var(--brand-ink); letter-spacing: -0.01em; }
a { color: var(--brand-primary); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--spoke-tertiary); }

/* The shared wordmark */
.er-logo {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--brand-primary);
}
.er-logo .slash { color: var(--brand-ink-soft); font-weight: 400; margin: 0 0.25rem; }
.er-logo .spoke { color: var(--spoke-tertiary); font-weight: 600; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.75rem 1.25rem; border-radius: 0.5rem;
  font-family: var(--font-heading); font-weight: 600;
  font-size: 0.95rem; line-height: 1;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}
.btn-primary {
  background: var(--brand-primary); color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--brand-ink); box-shadow: var(--shadow-md); transform: translateY(-1px); color: #fff; }
.btn-accent {
  background: var(--brand-accent); color: var(--brand-primary);
  box-shadow: var(--shadow-sm);
}
.btn-accent:hover { filter: brightness(0.95); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.btn-outline {
  background: #fff; color: var(--brand-primary);
  border: 1px solid var(--brand-border);
}
.btn-outline:hover { border-color: var(--brand-primary); }

/* Reusable block containers */
.er-section { padding: 4rem 1.25rem; }
.er-section-tight { padding: 2.5rem 1.25rem; }
.er-container { max-width: var(--content-max); margin: 0 auto; }
.er-prose { max-width: var(--prose-max); margin: 0 auto; }
.er-prose p { margin-bottom: 1rem; line-height: 1.7; color: var(--brand-ink); font-size: 1.0625rem; }
.er-prose h2 { font-size: 1.75rem; margin: 2.5rem 0 1rem; }
.er-prose h3 { font-size: 1.25rem; margin: 1.75rem 0 0.75rem; }

/* Hero */
.er-hero {
  background:
    radial-gradient(1200px 600px at 100% 0%, rgba(0,196,154,0.08), transparent 70%),
    linear-gradient(180deg, #fff 0%, var(--brand-paper) 100%);
  padding: 5rem 1.25rem 4rem;
}
.er-hero h1 {
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.1;
  font-weight: 700;
  margin-bottom: 1rem;
}
.er-hero-sub {
  font-size: 1.15rem;
  color: var(--brand-ink-soft);
  max-width: 44rem;
  line-height: 1.6;
  margin-bottom: 1.75rem;
}

/* Trust bar — one strip of credibility */
.er-trust {
  background: var(--brand-primary);
  color: #dbe5f1;
  font-size: 0.875rem;
  padding: 0.875rem 1rem;
  text-align: center;
}
.er-trust strong { color: #fff; }

/* Facts block */
.er-facts {
  display: grid; gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin: 1.5rem 0;
}
.er-fact {
  background: #fff; border: 1px solid var(--brand-border);
  padding: 1rem 1.25rem; border-radius: 0.5rem;
}
.er-fact .label { font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand-ink-soft); }
.er-fact .value { font-family: var(--font-heading); font-weight: 700; font-size: 1.25rem; color: var(--brand-ink); margin-top: 0.25rem; }
.er-fact .note { font-size: 0.8rem; color: var(--brand-ink-soft); margin-top: 0.25rem; }

/* Comparison table */
.er-compare { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid var(--brand-border); border-radius: 0.75rem; overflow: hidden; font-size: 0.95rem; }
.er-compare th { background: var(--brand-muted); color: var(--brand-ink); text-align: left; padding: 0.75rem 1rem; font-weight: 600; }
.er-compare td { padding: 0.75rem 1rem; border-top: 1px solid var(--brand-border); vertical-align: top; }
.er-compare .ours { background: rgba(0,196,154,0.06); }
.er-compare .good { color: #0F7A3A; font-weight: 600; }
.er-compare .bad  { color: #A03030; }

/* Sample question card */
.er-q {
  background: #fff; border: 1px solid var(--brand-border);
  border-radius: 0.75rem; padding: 1.25rem; margin-bottom: 0.75rem;
}
.er-q .stem { font-weight: 500; margin-bottom: 0.75rem; color: var(--brand-ink); }
.er-q .choices { font-size: 0.95rem; color: var(--brand-ink-soft); margin-bottom: 0.5rem; }
.er-q .choices li { padding: 0.125rem 0; }
.er-q details { margin-top: 0.5rem; border-top: 1px solid var(--brand-border); padding-top: 0.75rem; }
.er-q details summary {
  cursor: pointer; font-family: var(--font-heading); font-weight: 600;
  color: var(--spoke-tertiary); font-size: 0.9rem; list-style: none;
}
.er-q details summary::-webkit-details-marker { display: none; }
.er-q details summary::before { content: "▸ "; }
.er-q details[open] summary::before { content: "▾ "; }
.er-q details .answer { margin-top: 0.5rem; font-size: 0.95rem; color: var(--brand-ink); line-height: 1.6; }

/* FAQ accordion */
.er-faq { border: 1px solid var(--brand-border); border-radius: 0.75rem; overflow: hidden; }
.er-faq details { border-top: 1px solid var(--brand-border); }
.er-faq details:first-of-type { border-top: none; }
.er-faq details summary {
  cursor: pointer; padding: 1rem 1.25rem;
  font-family: var(--font-heading); font-weight: 600; color: var(--brand-ink);
  list-style: none; display: flex; align-items: center; justify-content: space-between;
}
.er-faq details summary::-webkit-details-marker { display: none; }
.er-faq details summary::after { content: "+"; font-weight: 300; font-size: 1.35rem; color: var(--brand-ink-soft); }
.er-faq details[open] summary::after { content: "−"; }
.er-faq details .a { padding: 0 1.25rem 1.25rem; color: var(--brand-ink); line-height: 1.65; }

/* Pricing card */
.er-price {
  background: #fff; border: 2px solid var(--spoke-tertiary);
  border-radius: 1rem; padding: 2rem; text-align: center;
  box-shadow: var(--shadow-md);
  max-width: 28rem; margin: 0 auto;
}
.er-price .amount { font-family: var(--font-heading); font-size: 3rem; font-weight: 700; color: var(--brand-primary); line-height: 1; }
.er-price .amount .cents { font-size: 1.5rem; vertical-align: top; }
.er-price .once { color: var(--brand-ink-soft); font-size: 0.9rem; margin-top: 0.25rem; }

/* Email capture */
.er-capture {
  background: linear-gradient(135deg, #F0F6FF 0%, #EFFFFA 100%);
  border: 1px solid var(--brand-border);
  border-radius: 1rem; padding: 2rem;
  display: grid; grid-template-columns: 1fr; gap: 0.75rem;
  max-width: 36rem; margin: 0 auto;
}
.er-capture input[type="email"] {
  padding: 0.75rem 1rem; border: 1px solid var(--brand-border);
  border-radius: 0.5rem; font-family: var(--font-body); font-size: 1rem;
  background: #fff;
}
.er-capture input[type="email"]:focus {
  outline: 2px solid var(--brand-accent); outline-offset: 2px;
}

/* Author byline */
.er-author {
  display: grid; grid-template-columns: 4rem 1fr; gap: 1rem; align-items: start;
  background: #fff; border: 1px solid var(--brand-border); border-radius: 0.75rem;
  padding: 1.25rem; max-width: 42rem;
}
.er-author .avatar {
  width: 4rem; height: 4rem; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-primary), var(--spoke-tertiary));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-family: var(--font-heading); font-weight: 700; font-size: 1.5rem;
}
.er-author .name { font-family: var(--font-heading); font-weight: 700; color: var(--brand-ink); }
.er-author .credential { color: var(--brand-ink-soft); font-size: 0.9rem; }
.er-author .bio { margin-top: 0.5rem; font-size: 0.95rem; line-height: 1.6; }

/* Footer */
.er-footer {
  background: var(--brand-primary); color: #c2cee0;
  padding: 3rem 1.25rem; font-size: 0.9rem;
}
.er-footer a { color: #fff; }
.er-footer a:hover { color: var(--brand-accent); }
.er-footer .nav { display: flex; flex-wrap: wrap; gap: 1.5rem; margin-bottom: 1rem; }
.er-footer .fine { color: #8a98b0; font-size: 0.8rem; }

/* Sticky nav */
.er-nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--brand-border);
}
.er-nav .inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: var(--content-max); margin: 0 auto;
  padding: 0.75rem 1.25rem;
}
.er-nav .links { display: flex; gap: 1.25rem; font-size: 0.9rem; }
.er-nav .links a { color: var(--brand-ink-soft); text-decoration: none; }
.er-nav .links a:hover { color: var(--brand-primary); }

/* Responsive */
@media (max-width: 640px) {
  .er-section { padding: 3rem 1rem; }
  .er-hero { padding: 3.5rem 1rem 3rem; }
  .er-nav .links { display: none; }
}
