/* ═══════════════════════════════════════════════════════════
   CheckRetire — Global Stylesheet
   styles.css

   HOW TO USE:
   Add this to <head> on every page — BEFORE any page-specific styles:
   <link rel="stylesheet" href="/styles.css">

   Page-specific styles go in a small <style> block after this link.
   Only add styles that are unique to that page — not already here.
   ═══════════════════════════════════════════════════════════ */


/* ── 1. CSS VARIABLES ───────────────────────────────────── */
:root {
  /* Fonts */
  --serif: 'Source Serif 4', Georgia, serif;
  --sans:  'DM Sans', Helvetica, sans-serif;

  /* Brand colors */
  --green:      #1B6B4A;
  --dark:       #1a2e23;
  --accent:     #2A9D6B;
  --gray:       #5a6e63;

  /* UI colors */
  --border:     #C8D5CE;
  --bg:         #FAFCFA;
  --light:      #EDF5F0;
  --red:        #C0392B;
  --amber:      #D4880F;
  --red-bg:     #FDF0EF;
  --amber-bg:   #FFF8EC;
  --green-bg:   #E8F5ED;
}


/* ── 2. RESET & BASE ────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--dark);
  line-height: 1.6;
}
::selection {
  background: rgba(27, 107, 74, .15);
}


/* ── 3. TYPOGRAPHY ──────────────────────────────────────── */
h1, h2, h3 {
  font-family: var(--serif);
  color: var(--dark);
  line-height: 1.3;
}
h2 {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 6px;
}
h3 {
  font-size: 21px;
  font-weight: 700;
  margin: 0 0 20px;
}
p {
  line-height: 1.7;
}
a {
  color: var(--green);
}


/* ── 4. HERO SECTION ────────────────────────────────────── */
/* Used on: states page, blog post, privacy policy */
.hero {
  background: linear-gradient(160deg, var(--dark) 0%, #1B4A3A 100%);
  padding: 40px 20px 36px;
  position: relative;
  overflow: hidden;
  text-align: center;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: .04;
  background-image: radial-gradient(circle, #fff 1px, transparent 1px);
  background-size: 28px 28px;
}
.hero-inner {
  max-width: 700px;
  margin: 0 auto;
  position: relative;
}
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(24px, 5vw, 44px);
  font-weight: 700;
  color: #fff;
  line-height: 1.15;
  letter-spacing: -.03em;
  margin-bottom: 12px;
}
.hero h1 span { color: #7BCBA5; }
.hero-sub {
  font-size: clamp(14px, 2.5vw, 17px);
  color: #9BB5A8;
  line-height: 1.6;
  margin-bottom: 28px;
}
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}
.hero-stat { text-align: center; }
.hero-stat-num {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 700;
  color: #fff;
}
.hero-stat-label {
  font-size: 11px;
  color: #7BCBA5;
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
  margin-top: 2px;
}


/* ── 5. BADGE ───────────────────────────────────────────── */
/* Used on: hero sections, blog posts */
.badge,
.hero-badge,
.post-category {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(42, 157, 107, .15);
  border: 1px solid rgba(42, 157, 107, .3);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 11px;
  font-weight: 700;
  color: #7BCBA5;
  letter-spacing: .8px;
  text-transform: uppercase;
  margin-bottom: 16px;
  text-decoration: none;
}


/* ── 6. BUTTONS ─────────────────────────────────────────── */
.btn {
  padding: 16px 32px;
  font-size: 18px;
  font-family: var(--sans);
  font-weight: 600;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: all .25s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary {
  background: var(--green);
  color: #fff;
  box-shadow: 0 2px 8px rgba(27, 107, 74, .3);
}
.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(27, 107, 74, .35);
}
.btn-secondary {
  background: transparent;
  color: var(--green);
  border: 2px solid var(--border);
}
.btn-secondary:hover { border-color: var(--green); }
.btn-row {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  gap: 12px;
  flex-wrap: wrap;
}
.btn-row.center { justify-content: center; }


/* ── 7. CARDS ───────────────────────────────────────────── */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
}


/* ── 8. CTA BANNER ──────────────────────────────────────── */
/* Used on: states page, blog post */
.cta-banner {
  background: linear-gradient(135deg, var(--dark) 0%, #1B4A3A 100%);
  border-radius: 16px;
  padding: 36px 28px;
  text-align: center;
  margin-top: 28px;
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: .04;
  background-image: radial-gradient(circle, #fff 1px, transparent 1px);
  background-size: 24px 24px;
}
.cta-banner-inner { position: relative; }
.cta-banner h2 {
  font-family: var(--serif);
  font-size: clamp(20px, 3vw, 26px);
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
  line-height: 1.25;
}
.cta-banner p {
  font-size: 15px;
  color: #9BB5A8;
  margin-bottom: 22px;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}
.cta-banner-btn {
  display: inline-block;
  background: #fff;
  color: var(--dark);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 700;
  padding: 14px 32px;
  border-radius: 12px;
  text-decoration: none;
  transition: all .2s;
}
.cta-banner-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
}
.cta-banner-note {
  font-size: 12px;
  color: #5a7a6a;
  margin-top: 10px;
}


/* ── 9. INSIGHT / DARK CALLOUT BOX ─────────────────────── */
/* Used on: quiz page */
.insight {
  background: var(--dark);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.insight::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: .04;
  background-image: radial-gradient(circle, #fff 1px, transparent 1px);
  background-size: 20px 20px;
}
.insight-inner { position: relative; }
.insight-label {
  font-size: 12px;
  color: #7BCBA5;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.insight-text {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  line-height: 1.4;
}
.insight-sub {
  font-size: 14px;
  color: #9BB5A8;
  margin-top: 8px;
  line-height: 1.5;
}


/* ── 10. TIP BOX ────────────────────────────────────────── */
/* Used on: quiz page */
.tip {
  background: var(--light);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 24px;
  font-size: 15px;
  line-height: 1.6;
  color: #2d4a3a;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  word-break: break-word;
  overflow-wrap: break-word;
}
.tip-icon { font-size: 20px; line-height: 1; flex-shrink: 0; margin-top: 2px; }
.tip-text { min-width: 0; }


/* ── 11. FORM ELEMENTS ──────────────────────────────────── */
/* Used on: quiz page */
input, select {
  width: 100%;
  padding: 14px 16px;
  font-size: 20px;
  font-family: var(--sans);
  font-weight: 500;
  border: 2px solid var(--border);
  border-radius: 12px;
  outline: none;
  background: var(--bg);
  color: var(--dark);
  transition: border-color .2s, box-shadow .2s;
}
input:focus, select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(27, 107, 74, .12);
}
input.has-prefix { padding-left: 34px; }
input.has-suffix  { padding-right: 56px; }
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; }
select {
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235a6e63' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.input-wrap { position: relative; }
.input-prefix, .input-suffix {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--sans);
  pointer-events: none;
  color: var(--gray);
}
.input-prefix { left: 16px; font-size: 20px; font-weight: 500; }
.input-suffix  { right: 16px; font-size: 15px; }
.field { margin-bottom: 28px; }
.field-label {
  display: block;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 4px;
  line-height: 1.3;
}
.field-sub {
  display: block;
  font-size: 15px;
  color: var(--gray);
  margin-bottom: 10px;
  line-height: 1.5;
}


/* ── 12. CHOICE CARDS ───────────────────────────────────── */
/* Used on: quiz page */
.choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}
.choice-card {
  background: #fff;
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 20px 18px;
  cursor: pointer;
  text-align: center;
  transition: all .2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.choice-card:hover { border-color: var(--accent); background: #F5FBF8; }
.choice-card.selected {
  border-color: var(--green);
  background: #E8F5ED;
  box-shadow: 0 0 0 3px rgba(27, 107, 74, .15);
}
.choice-icon  { font-size: 28px; }
.choice-label { font-family: var(--serif); font-size: 16px; font-weight: 600; color: var(--dark); }
.choice-sub   { font-size: 13px; color: var(--gray); line-height: 1.4; }


/* ── 13. PROGRESS BAR ───────────────────────────────────── */
/* Used on: quiz page */
.progress-wrap  { margin-bottom: 32px; }
.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--gray);
  margin-bottom: 8px;
  font-weight: 500;
}
.progress-track {
  height: 8px;
  background: #D6DDD9;
  border-radius: 4px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--accent));
  border-radius: 4px;
  transition: width .6s cubic-bezier(.4, 0, .2, 1);
}


/* ── 14. DISCLAIMER BOX ─────────────────────────────────── */
/* Used on: quiz page */
.disclaimer {
  background: #FFF8EC;
  border: 1px solid #E8D5A8;
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 28px;
  font-size: 14px;
  line-height: 1.6;
  color: #7A6530;
}


/* ── 15. FAQ ────────────────────────────────────────────── */
/* Used on: quiz page */
.faq-section {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 32px 20px;
}
.faq-inner     { max-width: 620px; margin: 0 auto; }
.faq-title     { font-family: var(--serif); font-size: 18px; font-weight: 700; color: var(--dark); margin-bottom: 16px; line-height: 1.3; }
.faq-item      { border: 1px solid var(--border); border-radius: 10px; margin-bottom: 8px; overflow: hidden; }
.faq-item summary {
  padding: 14px 18px;
  font-size: 15px;
  font-weight: 600;
  color: var(--dark);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  line-height: 1.4;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 20px;
  color: var(--gray);
  font-weight: 400;
  flex-shrink: 0;
  margin-left: 12px;
}
.faq-item[open] summary::after { content: '\2212'; }
.faq-answer { padding: 0 18px 16px; font-size: 14px; color: var(--gray); line-height: 1.65; }


/* ── 16. BLOG ARTICLE BODY ──────────────────────────────── */
/* Used on: blog post template */
.post-body h2, .article-card h2 {
  font-family: var(--serif);
  font-size: clamp(20px, 3vw, 26px);
  font-weight: 700;
  color: var(--dark);
  margin: 40px 0 14px;
  line-height: 1.3;
}
.post-body h2:first-child,
.article-card h2:first-child { margin-top: 0; }
.post-body h3 {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--dark);
  margin: 28px 0 10px;
}
.post-body p, .article-card p {
  font-family: var(--serif);
  font-size: 17px;
  color: #2d3d35;
  line-height: 1.85;
  margin-bottom: 18px;
}
.post-body ul, .post-body ol,
.article-card ul { margin: 0 0 18px 20px; }
.post-body li, .article-card li {
  font-family: var(--serif);
  font-size: 17px;
  color: #2d3d35;
  line-height: 1.75;
  margin-bottom: 6px;
}
.post-body a, .article-card a {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.post-body strong, .article-card strong { color: var(--dark); font-weight: 700; }


/* ── 17. BLOG CALLOUT BOXES ─────────────────────────────── */
/* Used on: blog post template */
.callout {
  background: var(--light);
  border-left: 4px solid var(--green);
  border-radius: 0 12px 12px 0;
  padding: 18px 22px;
  margin: 28px 0;
}
.callout-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--green);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.callout p { font-size: 15px !important; margin-bottom: 0 !important; color: #2d4a3a !important; }

.warning {
  background: #FFF8EC;
  border-left: 4px solid var(--amber);
  border-radius: 0 12px 12px 0;
  padding: 18px 22px;
  margin: 28px 0;
}
.warning-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--amber);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.warning p { font-size: 15px !important; margin-bottom: 0 !important; color: #5a4a2a !important; }


/* ── 18. DATA TABLE ─────────────────────────────────────── */
/* Used on: blog post template, states page */
.post-table {
  width: 100%;
  border-collapse: collapse;
  margin: 28px 0;
  font-size: 14px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
}
.post-table th {
  background: var(--dark);
  color: #fff;
  padding: 11px 14px;
  text-align: left;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
}
.post-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  font-family: var(--sans);
  color: #2d3d35;
}
.post-table tr:nth-child(even) td { background: var(--light); }
.post-table tr:last-child td      { border-bottom: none; }
.post-table .highlight td         { background: #E8F5ED; font-weight: 600; color: var(--green); }


/* ── 19. FILTER TABS ────────────────────────────────────── */
/* Used on: states page */
.filter-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-tab {
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--gray);
  cursor: pointer;
  transition: all .15s;
}
.filter-tab.active { background: var(--dark); color: #fff; border-color: var(--dark); }


/* ── 20. GRADE BADGES ───────────────────────────────────── */
/* Used on: states page */
.grade-a-bg { background: #E8F5ED; color: #1B6B4A; }
.grade-b-bg { background: #D4EDDF; color: #2A9D6B; }
.grade-c-bg { background: #FFF8EC; color: #D4880F; }
.grade-d-bg { background: #FDF0EF; color: #C0392B; }
.ga { background: #E8F5ED; color: #1B6B4A; }
.gb { background: #D4EDDF; color: #2A9D6B; }
.gc { background: #FFF8EC; color: #D4880F; }
.gd { background: #FDF0EF; color: #C0392B; }


/* ── 21. PAGE WRAPPER ───────────────────────────────────── */
.page-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}
.container {
  max-width: 620px;
  margin: 0 auto;
  padding: 32px 20px 60px;
}


/* ── 22. ANIMATIONS ─────────────────────────────────────── */
@keyframes fadeIn    { from { opacity: 0 } to { opacity: 1 } }
@keyframes slideIn   { from { opacity: 0; transform: translateY(16px) } to { opacity: 1; transform: translateY(0) } }
@keyframes pulse     { 0%, 100% { transform: scale(1) } 50% { transform: scale(1.02) } }
@keyframes scoreReveal { from { stroke-dashoffset: 251 } to { stroke-dashoffset: var(--offset) } }
@keyframes countUp   { from { opacity: 0; transform: scale(.8) } to { opacity: 1; transform: scale(1) } }


/* ── 23. MOBILE ─────────────────────────────────────────── */
@media (max-width: 600px) {
  h2                  { font-size: 21px; }
  .container          { padding: 20px 16px 48px; }
  .page-wrap          { padding: 16px 16px 48px; }
  .btn                { padding: 12px 16px; font-size: 15px; white-space: nowrap; }
  .btn-row            { gap: 8px; flex-wrap: nowrap; }
  .btn-row .btn       { flex: 1; min-width: 0; justify-content: center; text-align: center; }
  .choice-grid        { gap: 8px; }
  .choice-card        { padding: 14px 12px; gap: 4px; }
  .choice-icon        { font-size: 24px; }
  .choice-label       { font-size: 14px; }
  .choice-sub         { font-size: 11px; }
  .field              { margin-bottom: 20px; }
  .field-label        { font-size: 17px; }
  .tip                { padding: 12px 14px; font-size: 13px; margin-bottom: 16px; }
  .insight            { padding: 16px; margin-bottom: 16px; }
  .insight-text       { font-size: 16px; }
  .progress-wrap      { margin-bottom: 24px; }
  .cta-banner         { padding: 28px 20px; }
  .post-body p,
  .article-card p,
  .post-body li,
  .article-card li    { font-size: 16px; }
  .post-table         { font-size: 12px; }
  .post-table th,
  .post-table td      { padding: 9px 10px; }
}
