/* ================================================================
   AfterKin — Shared Stylesheet
   Extracted from what-to-do-when-someone-dies.html + new components
   ================================================================ */

/* ── GOOGLE FONTS: loaded via <link> in each page <head> ── */

/* ── FALLBACK FONT METRICS (prevents CLS during font swap) ── */
@font-face {
  font-family: 'Inter Fallback';
  src: local('Arial'), local('Helvetica');
  size-adjust: 107%;
  ascent-override: 90%;
  descent-override: 22%;
  line-gap-override: 0%;
}

@font-face {
  font-family: 'Lora Fallback';
  src: local('Georgia'), local('Times New Roman');
  size-adjust: 98%;
  ascent-override: 89%;
  descent-override: 22%;
  line-gap-override: 0%;
}

/* ── CSS VARIABLES ── */
:root {
  --cream: #F8F4EF;
  --warm-white: #FDFAF7;
  --charcoal: #3D3D3A;
  --mid: #6B6560;
  --light: #706A63;
  --sage: #5A6D5E;
  --sage-light: #EDF0ED;
  --amber: #8F5C32;
  --amber-light: #FBF3E9;
  --border: #E4DED6;
  --section-1: #F0EDE8;
  --serif: 'Lora', 'Lora Fallback', Georgia, serif;
  --sans: 'Inter', 'Inter Fallback', Arial, sans-serif;
  --nav-height: 60px;
  --content-max: 780px;
  --wide-max: 1080px;
}

/* ── RESET ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--sans);
  background: var(--warm-white);
  color: var(--charcoal);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

/* ── ARTICLE BODY LINKS (visible, underlined) ── */
.article-body a {
  color: var(--sage);
  text-decoration: underline;
  text-decoration-color: rgba(90, 109, 94, 0.4);
  text-underline-offset: 2px;
  transition: color 0.2s, text-decoration-color 0.2s;
}

.article-body a:hover {
  color: var(--charcoal);
  text-decoration-color: rgba(61, 61, 58, 0.45);
}

/* ── PROGRESS BAR ── */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--sage);
  z-index: 200;
  transition: width 0.1s;
  width: 0%;
}

/* ── NAV ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(253, 250, 247, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
}

.nav-logo {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--charcoal);
  text-decoration: none;
  letter-spacing: 0.01em;
  flex-shrink: 0;
}

.nav-logo span { color: var(--sage); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mid);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--charcoal); }

.nav-cta {
  background: var(--sage) !important;
  color: white !important;
  padding: 7px 16px !important;
  border-radius: 6px !important;
  letter-spacing: 0.05em !important;
  text-transform: none !important;
  font-size: 0.8rem !important;
  transition: background 0.2s !important;
}

.nav-cta:hover { background: #4A5B4E !important; }

/* ── HAMBURGER MENU ── */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 6px 4px;
  flex-shrink: 0;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--charcoal);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

body.nav-open .hamburger span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
body.nav-open .hamburger span:nth-child(2) {
  opacity: 0;
}
body.nav-open .hamburger span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-menu {
  display: none;
  position: fixed;
  inset: var(--nav-height) 0 0 0;
  background: var(--warm-white);
  z-index: 99;
  padding: 32px 24px;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid var(--border);
  overflow-y: auto;
}

body.nav-open .mobile-menu {
  display: flex;
}

.mobile-menu a {
  display: block;
  font-size: 1rem;
  font-weight: 500;
  color: var(--charcoal);
  text-decoration: none;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s;
}

.mobile-menu a:hover { color: var(--sage); }

.mobile-menu a:last-child { border-bottom: none; }

.mobile-menu .btn-primary {
  margin-top: 16px;
  display: block;
  text-align: center;
}

/* ── HERO LABEL (pill badge) ── */
.hero-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sage);
  border: 1px solid var(--sage);
  padding: 5px 14px;
  border-radius: 100px;
  margin-bottom: 28px;
}

/* ── HERO SUB TEXT ── */
.hero-sub {
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--mid);
  max-width: 580px;
  margin: 0 auto 36px;
  line-height: 1.8;
}

/* ── HERO META (read time, etc.) ── */
.hero-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  font-size: 0.78rem;
  color: var(--light);
  flex-wrap: wrap;
}

.hero-meta span::before { content: '·'; margin-right: 20px; }
.hero-meta span:first-child::before { content: none; margin: 0; }

.hero-divider {
  width: 60px;
  height: 1px;
  background: var(--border);
  margin: 48px auto 0;
}

/* ── BUTTONS ── */
.btn-primary {
  display: inline-block;
  background: var(--amber);
  color: white;
  text-decoration: none;
  padding: 13px 28px;
  border-radius: 8px;
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  letter-spacing: 0.01em;
}

.btn-primary:hover {
  background: #7A4E2A;
  transform: translateY(-1px);
}

.btn-secondary {
  display: inline-block;
  background: transparent;
  color: var(--sage);
  text-decoration: none;
  padding: 12px 28px;
  border-radius: 8px;
  border: 1.5px solid var(--sage);
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.15s;
  letter-spacing: 0.01em;
}

.btn-secondary:hover {
  background: var(--sage);
  color: white;
  transform: translateY(-1px);
}

/* ── TRUST BAR ── */
.trust-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--mid);
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.trust-bar span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.trust-bar span::before {
  content: '✓';
  color: var(--sage);
  font-weight: 700;
}

/* ── FEATURE CARDS ── */
.feature-card {
  display: block;
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 24px;
  text-decoration: none;
  transition: all 0.2s;
}

.feature-card:hover {
  border-color: var(--sage);
  box-shadow: rgba(0,0,0,0.06) 0px 8px 28px, rgba(0,0,0,0.035) 0px 3px 9px, rgba(0,0,0,0.02) 0px 1px 3px;
  transform: translateY(-2px);
}

.feature-icon {
  font-size: 1.8rem;
  margin-bottom: 14px;
  display: block;
}

.feature-card h3 {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 8px;
  line-height: 1.3;
}

.feature-card p {
  font-size: 0.84rem;
  color: var(--mid);
  line-height: 1.65;
  margin-bottom: 16px;
}

.card-link {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--sage);
  text-decoration: none;
  letter-spacing: 0.03em;
}

/* ── BLOG CARDS ── */
.blog-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 24px;
  transition: all 0.2s;
}

.blog-card:hover {
  border-color: var(--sage);
  box-shadow: rgba(0,0,0,0.06) 0px 8px 28px, rgba(0,0,0,0.035) 0px 3px 9px, rgba(0,0,0,0.02) 0px 1px 3px;
  transform: translateY(-2px);
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.blog-category {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber);
  background: var(--amber-light);
  padding: 3px 10px;
  border-radius: 100px;
}

.blog-read-time {
  font-size: 0.75rem;
  color: var(--light);
}

.blog-card h2,
.blog-card h3 {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--charcoal);
  line-height: 1.3;
  margin-bottom: 10px;
}

.blog-card h2 { font-size: 1.15rem; }
.blog-card h3 { font-size: 1.1rem; }

.blog-card h2 a,
.blog-card h3 a {
  text-decoration: none;
  color: var(--charcoal);
  transition: color 0.2s;
}

.blog-card h2 a:hover,
.blog-card h3 a:hover { color: var(--sage); }

.blog-card p {
  font-size: 0.86rem;
  color: var(--mid);
  line-height: 1.7;
  margin-bottom: 16px;
}

/* ── PROVIDER CARDS ── */
.providers-heading {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--light);
  margin: 32px 0 14px;
}

.providers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  margin-bottom: 8px;
}

.provider-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  text-decoration: none;
  background: white;
  transition: all 0.2s;
  position: relative;
}

.provider-card:hover {
  border-color: var(--sage);
  box-shadow: rgba(0,0,0,0.06) 0px 8px 28px, rgba(0,0,0,0.035) 0px 3px 9px, rgba(0,0,0,0.02) 0px 1px 3px;
  transform: translateY(-2px);
}

.provider-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber);
  background: var(--amber-light);
  padding: 2px 7px;
  border-radius: 100px;
}

.provider-icon {
  font-size: 1.4rem;
  margin-bottom: 8px;
  display: block;
}

.provider-name {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--charcoal);
  margin-bottom: 3px;
}

.provider-desc {
  font-size: 0.74rem;
  color: var(--light);
  line-height: 1.5;
}

/* ── CHECKLIST ── */
.checklist {
  list-style: none;
  margin: 20px 0 28px;
}

.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.92rem;
  color: var(--charcoal);
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.checklist li:last-child { border-bottom: none; }

.check-box {
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--border);
  border-radius: 4px;
  flex-shrink: 0;
  margin-top: 2px;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.check-box:hover { border-color: var(--sage); }
.check-box.checked { background: var(--sage); border-color: var(--sage); }
.check-box.checked::after { content: '✓'; color: white; font-size: 11px; }

.checklist li.done .check-text { text-decoration: line-through; color: var(--light); }

/* ── CALLOUT ── */
.callout {
  background: var(--amber-light);
  border-left: 4px solid var(--amber);
  border-radius: 0 8px 8px 0;
  padding: 18px 22px;
  margin: 24px 0;
}

.callout-label {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 6px;
}

.callout p {
  font-size: 0.88rem;
  color: var(--charcoal);
  margin: 0;
  line-height: 1.7;
}

.callout-sage {
  background: var(--sage-light);
  border-color: var(--sage);
}

.callout-sage .callout-label { color: var(--sage); }

/* ── REVIEW + SOURCE BOXES ── */
.article-answer-box,
.article-source-box {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 22px 20px;
  margin: 24px 0 32px;
}

.article-answer-box { background: var(--cream); }
.article-source-box { background: white; }

.article-box-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sage);
  background: var(--sage-light);
  padding: 5px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.article-box-title {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--charcoal);
  line-height: 1.3;
  margin-bottom: 10px;
}

.article-box-copy {
  color: var(--mid);
  font-size: 0.96rem;
  line-height: 1.8;
}

.article-box-list,
.article-source-list {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
}

.article-box-list li,
.article-source-list li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 10px;
  color: var(--mid);
  font-size: 0.94rem;
  line-height: 1.75;
}

.article-box-list li::before,
.article-source-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--sage);
  font-weight: 700;
}

.article-source-box p {
  margin-bottom: 0;
}

.article-source-list a {
  color: var(--sage);
  text-decoration: none;
}

.article-source-list a:hover {
  text-decoration: underline;
}

/* ── ARTICLE TABLES ── */
.table-scroll {
  overflow-x: auto;
  margin: 2rem 0;
  -webkit-overflow-scrolling: touch;
}

.cost-table,
.timeline-table,
.state-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  color: var(--mid);
}

.cost-table th,
.timeline-table th,
.state-table th {
  background: var(--section-1);
  color: var(--charcoal);
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 10px 14px;
  text-align: left;
  border-bottom: 2px solid var(--border);
}

.cost-table td,
.timeline-table td,
.state-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.5;
}

.cost-table tr:last-child td,
.timeline-table tr:last-child td,
.state-table tr:last-child td {
  border-bottom: none;
}

.cost-table tr:nth-child(even) td,
.timeline-table tr:nth-child(even) td,
.state-table tr:nth-child(even) td {
  background: var(--cream);
}

/* First column of timeline tables: bold, no-wrap, charcoal */
.timeline-table td:first-child {
  font-weight: 600;
  white-space: nowrap;
  color: var(--charcoal);
  min-width: 100px;
}

/* Grid-style tables (comparison, threshold) */
.threshold-table,
.compare-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 0.9rem;
  color: var(--mid);
}

.threshold-table th,
.threshold-table td,
.compare-table th,
.compare-table td {
  border: 1px solid var(--border);
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  line-height: 1.5;
}

.threshold-table th,
.compare-table th {
  background: var(--sage-light);
  color: var(--charcoal);
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* State table: highlight rows with state law */
.state-table tr.has-law td { background: var(--sage-light); }
.state-table tr.has-law td:first-child { font-weight: 600; }

/* Law / state badge pill */
.law-badge {
  display: inline-block;
  background: var(--sage);
  color: white;
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 3px;
  vertical-align: middle;
  margin-left: 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Numbered steps list */
.steps-list {
  counter-reset: step-counter;
  list-style: none;
  padding: 0;
  margin: 24px 0;
}

.steps-list li {
  counter-increment: step-counter;
  display: flex;
  gap: 16px;
  margin-bottom: 28px;
}

.steps-list li::before {
  content: counter(step-counter);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  background: var(--sage);
  color: white;
  border-radius: 50%;
  font-weight: 600;
  font-size: 0.85rem;
  margin-top: 2px;
  flex-shrink: 0;
}

.step-content h3 { margin: 0 0 8px; }

/* Phase list (numbered phases with circle indicators) */
.phase-list {
  list-style: none;
  padding: 0;
  margin: 24px 0;
}

.phase-list li {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  align-items: flex-start;
}

.phase-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background: var(--sage);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.85rem;
  margin-top: 2px;
}

.phase-body strong {
  display: block;
  font-weight: 600;
  margin-bottom: 4px;
}

.phase-body span {
  color: var(--mid);
  font-size: 0.95rem;
  line-height: 1.55;
}

/* Source date line */
.source-date {
  font-size: 0.8rem;
  color: var(--light);
  margin-top: 12px;
  margin-bottom: 0;
}

/* ── FAQ ACCORDION ── */
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
}

.faq-q {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--charcoal);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

.faq-q::after {
  content: '+';
  font-size: 1.2rem;
  color: var(--sage);
  font-weight: 300;
  flex-shrink: 0;
  margin-left: 16px;
}

.faq-q.open::after { content: '−'; }

.faq-a {
  font-size: 0.9rem;
  color: var(--mid);
  line-height: 1.8;
  padding-top: 12px;
  display: none;
}

.faq-a.open { display: block; }

/* ── CTA BANNER ── */
.cta-banner {
  background: linear-gradient(135deg, #2C3830 0%, #3D5245 100%);
  padding: 60px 32px;
  text-align: center;
}

.cta-banner h2 {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 300;
  color: white;
  margin-bottom: 14px;
}

.cta-banner p {
  font-size: 0.92rem;
  color: rgba(255,255,255,0.8);
  max-width: 460px;
  margin: 0 auto 28px;
}

.cta-form {
  display: flex;
  gap: 10px;
  justify-content: center;
  max-width: 440px;
  margin: 0 auto;
}

.cta-form input {
  flex: 1;
  padding: 12px 18px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.1);
  color: white;
  font-family: var(--sans);
  font-size: 0.88rem;
  outline: none;
}

.cta-form input::placeholder { color: rgba(255,255,255,0.4); }

.cta-form button {
  padding: 12px 24px;
  background: var(--amber);
  color: white;
  border: none;
  border-radius: 8px;
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}

.cta-form button:hover { background: #7A4E2A; }
.cta-form button:disabled { background: var(--light); cursor: default; }

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border);
  padding: 48px 32px 40px;
  text-align: center;
}

.footer-inner {
  max-width: var(--content-max);
  margin: 0 auto;
}

.footer-logo {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 16px;
}

.footer-links {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
  list-style: none;
}

.footer-links a {
  font-size: 0.78rem;
  color: var(--light);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--mid); }

.footer-disclaimer {
  font-size: 0.72rem;
  color: var(--light);
  line-height: 1.7;
  max-width: 560px;
  margin: 0 auto;
}

/* ── BREADCRUMB ── */
.breadcrumb {
  font-size: 0.78rem;
  color: var(--light);
  margin-bottom: 20px;
}

.breadcrumb a {
  color: var(--light);
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb a:hover { color: var(--sage); }

.breadcrumb span { margin: 0 6px; }

/* ── ARTICLE HERO ── */
.article-hero {
  max-width: var(--wide-max);
  margin: 0 auto;
  padding: 56px 32px 40px;
}

.article-hero h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 300;
  color: var(--charcoal);
  line-height: 1.2;
  margin-bottom: 20px;
  letter-spacing: -0.03em;
}

.article-hero h1 em {
  font-style: italic;
  color: var(--sage);
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--light);
  flex-wrap: wrap;
}

.article-meta span { display: flex; align-items: center; }

/* ── ARTICLE LAYOUT (2-col: body + sidebar) ── */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 56px;
  max-width: var(--wide-max);
  margin: 0 auto;
  padding: 0 32px 80px;
  align-items: start;
}

.article-body {
  min-width: 0;
}

.article-body h2 {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  font-weight: 400;
  color: var(--charcoal);
  line-height: 1.3;
  margin: 40px 0 14px;
  letter-spacing: -0.025em;
}

.article-body h2:first-of-type { margin-top: 0; }

.article-body h3 {
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--charcoal);
  line-height: 1.4;
  margin: 28px 0 10px;
  letter-spacing: -0.01em;
}

.article-intro {
  font-size: 1.05rem;
  color: var(--mid);
  line-height: 1.8;
  margin-bottom: 24px;
}

.article-body p {
  font-size: 0.95rem;
  color: var(--mid);
  line-height: 1.85;
  margin-bottom: 16px;
}

.article-body ul,
.article-body ol {
  margin: 0 0 16px 20px;
}

.article-body li {
  font-size: 0.95rem;
  color: var(--mid);
  line-height: 1.8;
  margin-bottom: 6px;
}

.article-body strong { color: var(--charcoal); }

/* ── ARTICLE SIDEBAR ── */
.article-sidebar {
  position: sticky;
  top: calc(var(--nav-height) + 20px);
}

.sidebar-block {
  background: var(--section-1);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 22px;
  margin-bottom: 20px;
}

.sidebar-block .toc-title {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--light);
  margin-bottom: 14px;
}

.sidebar-toc ol {
  list-style: none;
  counter-reset: toc-counter;
}

.sidebar-toc ol li {
  counter-increment: toc-counter;
  margin-bottom: 8px;
}

.sidebar-toc ol li a {
  font-size: 0.83rem;
  color: var(--mid);
  text-decoration: none;
  display: flex;
  gap: 8px;
  align-items: baseline;
  transition: color 0.2s;
  line-height: 1.4;
}

.sidebar-toc ol li a::before {
  content: counter(toc-counter);
  font-family: var(--serif);
  font-size: 0.9rem;
  color: var(--border);
  flex-shrink: 0;
}

.sidebar-toc ol li a:hover,
.sidebar-toc ol li a.active { color: var(--sage); }

.sidebar-toc ol li a.active::before { color: var(--sage); }

.sidebar-related ul {
  list-style: none;
}

.sidebar-related ul li {
  border-bottom: 1px solid var(--border);
  padding: 8px 0;
}

.sidebar-related ul li:last-child { border-bottom: none; }

.sidebar-related ul li a {
  font-size: 0.83rem;
  color: var(--mid);
  text-decoration: none;
  line-height: 1.4;
  transition: color 0.2s;
}

.sidebar-related ul li a:hover { color: var(--sage); }

.sidebar-cta { text-align: center; }

.sidebar-cta p {
  font-size: 0.84rem;
  color: var(--mid);
  margin-bottom: 14px;
  line-height: 1.6;
}

.sidebar-cta .btn-primary {
  width: 100%;
  text-align: center;
  font-size: 0.84rem;
  padding: 11px 16px;
}

/* ── INLINE TOC (mobile) ── */
.article-toc-inline {
  background: var(--section-1);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 22px;
  margin-bottom: 36px;
  display: none;
}

.article-toc-inline .toc-title {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--light);
  margin-bottom: 14px;
}

.article-toc-inline ol {
  list-style: none;
  counter-reset: toc-inline;
}

.article-toc-inline ol li {
  counter-increment: toc-inline;
  margin-bottom: 8px;
}

.article-toc-inline ol li a {
  font-size: 0.85rem;
  color: var(--mid);
  text-decoration: none;
  display: flex;
  gap: 8px;
  align-items: baseline;
  transition: color 0.2s;
  line-height: 1.4;
}

.article-toc-inline ol li a::before {
  content: counter(toc-inline);
  font-family: var(--serif);
  font-size: 0.9rem;
  color: var(--border);
  flex-shrink: 0;
}

.article-toc-inline ol li a:hover { color: var(--sage); }

/* ── RELATED ARTICLES ── */
.related-articles {
  max-width: var(--wide-max);
  margin: 0 auto;
  padding: 48px 32px;
  border-top: 1px solid var(--border);
}

.related-articles h2 {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--charcoal);
  margin-bottom: 28px;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

/* ── SECTION HEADER (blog preview, related, etc.) ── */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
}

.section-header h2 {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 400;
  color: var(--charcoal);
  letter-spacing: -0.02em;
}

.see-all-link {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--sage);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s;
}

.see-all-link:hover { color: var(--charcoal); }

/* ── FOCUS STATES (accessibility) ── */
:focus-visible {
  outline: 2px solid var(--sage);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ── FADE-IN ANIMATION ── */
.fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: none;
}

/* ── RESPONSIVE ── */
@media (max-width: 860px) {
  .article-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .article-sidebar { display: none; }
  .article-toc-inline { display: block; }
}

@media (max-width: 640px) {
  nav { padding: 0 20px; }
  .nav-links { display: none; }
  .hamburger { display: flex; }

  .hero-sub { font-size: 0.95rem; }

  .cta-banner { padding: 48px 20px; }
  .cta-form { flex-direction: column; }
  .cta-form button { width: 100%; }

  .providers-grid { grid-template-columns: 1fr 1fr; }

  footer { padding: 36px 20px; }

  .article-hero { padding: 40px 20px 28px; }
  .article-layout { padding: 0 20px 60px; }
  .related-articles { padding: 36px 20px; }

  .blog-grid { grid-template-columns: 1fr; gap: 12px; }
}

/* ================================================================
   ENTRY QUIZ — Homepage situation-based entry path
   ================================================================ */

.quiz-section {
  background: var(--warm-white);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 64px 32px;
}

.quiz-inner {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}

.quiz-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 10px;
}

.quiz-inner > h2 {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 400;
  color: var(--charcoal);
  margin-bottom: 8px;
  line-height: 1.3;
}

.quiz-inner > p {
  font-size: 0.92rem;
  color: var(--mid);
  margin-bottom: 36px;
}

.quiz-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 28px;
}

.quiz-progress-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  transition: background 0.25s;
}

.quiz-progress-dot.active { background: var(--sage); }
.quiz-progress-dot.done { background: var(--sage); opacity: 0.5; }

.quiz-step { display: none; }
.quiz-step.active { display: block; }

.quiz-step-label {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--light);
  margin-bottom: 14px;
}

.quiz-step h3 {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 400;
  color: var(--charcoal);
  margin-bottom: 24px;
  line-height: 1.4;
}

.quiz-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  max-width: 520px;
  margin: 0 auto;
}

.quiz-options.three-col { grid-template-columns: repeat(3, 1fr); }

.quiz-option-btn {
  padding: 16px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: white;
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--charcoal);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s, box-shadow 0.2s;
  text-align: center;
  line-height: 1.35;
}

.quiz-option-btn .option-icon {
  display: block;
  font-size: 1.4rem;
  margin-bottom: 6px;
}

.quiz-option-btn:hover {
  border-color: var(--sage);
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

.quiz-option-btn.selected {
  border-color: var(--sage);
  background: var(--sage-light);
  color: var(--sage);
}

.quiz-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}

.quiz-back-btn {
  background: none;
  border: none;
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--light);
  cursor: pointer;
  padding: 8px 12px;
  transition: color 0.2s;
}

.quiz-back-btn:hover { color: var(--mid); }

/* Quiz Result Card */
.quiz-result {
  display: none;
  text-align: left;
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  margin-top: 8px;
}

.quiz-result.visible { display: block; }

.quiz-result-header {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.quiz-result-header h3 {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--charcoal);
  margin-bottom: 6px;
}

.quiz-result-header p {
  font-size: 0.88rem;
  color: var(--mid);
  line-height: 1.6;
}

.quiz-result-sections-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--light);
  margin-bottom: 12px;
}

.quiz-result-sections {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}

.quiz-result-section-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--section-1);
  border-radius: 8px;
  text-decoration: none;
  color: var(--charcoal);
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.2s;
}

.quiz-result-section-link:hover { background: var(--sage-light); }

.quiz-result-section-link .section-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: var(--sage);
  color: white;
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 600;
  flex-shrink: 0;
}

.quiz-result-section-link .section-icon { font-size: 1.1rem; flex-shrink: 0; }

.quiz-result-section-link .section-text { flex: 1; line-height: 1.3; }
.quiz-result-section-link .section-text small {
  display: block;
  font-size: 0.78rem;
  color: var(--mid);
  font-weight: 400;
  margin-top: 2px;
}

.quiz-result-email {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  margin-top: 4px;
}

.quiz-result-email p {
  font-size: 0.85rem;
  color: var(--mid);
  margin-bottom: 12px;
}

.quiz-result-email .cta-form-light {
  display: flex;
  gap: 10px;
}

.cta-form-light input {
  flex: 1;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: white;
  font-family: var(--sans);
  font-size: 0.88rem;
  color: var(--charcoal);
  outline: none;
  transition: border-color 0.2s;
}

.cta-form-light input:focus { border-color: var(--sage); }
.cta-form-light input::placeholder { color: var(--light); }

.cta-form-light button {
  padding: 10px 20px;
  background: var(--sage);
  color: white;
  border: none;
  border-radius: 8px;
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}

.cta-form-light button:hover { background: #4A5B4E; }
.cta-form-light button:disabled { background: var(--light); cursor: default; }

.quiz-restart-btn {
  display: inline-block;
  margin-top: 16px;
  font-size: 0.8rem;
  color: var(--light);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--sans);
  text-decoration: underline;
  padding: 0;
  transition: color 0.2s;
}

.quiz-restart-btn:hover { color: var(--mid); }

@media (max-width: 640px) {
  .quiz-section { padding: 48px 20px; }
  .quiz-options { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .quiz-options.three-col { grid-template-columns: repeat(3, 1fr); }
  .quiz-option-btn { padding: 14px 10px; font-size: 0.82rem; }
  .quiz-result { padding: 24px 18px; }
  .quiz-result-email .cta-form-light { flex-direction: column; }
}
