/* Shared stylesheet for article pages — matches calculator design tokens */
:root {
  --bg: #F5F2ED;
  --surface: #FFFDF9;
  --surface2: #F0ECE4;
  --border: #D8D0C0;
  --text: #1C1A16;
  --text-secondary: #6B6256;
  --accent: #1A5C3A;
  --accent-light: #D4EDE0;
  --accent-mid: #2E7D50;
  --warn: #7A3B00;
  --warn-light: #FFF0DC;
  --error: #8B1A1A;
  --serif: 'DM Serif Display', Georgia, serif;
  --sans: 'DM Sans', system-ui, sans-serif;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(28,26,22,0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  font-size: 17px;
  line-height: 1.65;
  min-height: 100vh;
}

.shell { max-width: 720px; margin: 0 auto; padding: 0 20px 80px; }

/* ─── SITE NAV ─── */
.site-nav {
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
  margin-bottom: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.site-nav .logo {
  font-family: var(--serif);
  font-size: 18px;
  color: var(--accent);
  text-decoration: none;
}
.site-nav .nav-links {
  display: flex;
  gap: 18px;
  font-size: 14px;
}
.site-nav .nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
}
.site-nav .nav-links a:hover {
  color: var(--accent);
}
.site-nav .nav-links a.cta {
  background: var(--accent);
  color: white;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
}
.site-nav .nav-links a.cta:hover { background: var(--accent-mid); color: white; }

/* ─── AD CONTAINERS ─── */
.ad-slot {
  margin: 28px 0;
  min-height: 100px;
  background: var(--surface2);
  border: 1px dashed var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 16px;
}

/* ─── ARTICLE ─── */
article header {
  margin-bottom: 32px;
}
article .eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
article h1 {
  font-family: var(--serif);
  font-size: clamp(28px, 5vw, 40px);
  line-height: 1.2;
  margin-bottom: 14px;
  color: var(--text);
}
article .deck {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 16px;
}
article .meta {
  font-size: 13px;
  color: var(--text-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

article h2 {
  font-family: var(--serif);
  font-size: clamp(22px, 3.5vw, 28px);
  line-height: 1.25;
  margin-top: 40px;
  margin-bottom: 14px;
  color: var(--text);
}

article h3 {
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.3;
  margin-top: 28px;
  margin-bottom: 10px;
  color: var(--text);
}

article p {
  margin-bottom: 18px;
}

article p + p { margin-top: 0; }

article ul, article ol {
  margin: 0 0 22px 22px;
}
article li {
  margin-bottom: 8px;
  padding-left: 4px;
}

article a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
article a:hover { color: var(--accent-mid); }

article strong { font-weight: 600; }
article em { font-style: italic; }

article blockquote {
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 18px;
  margin: 22px 0;
  color: var(--text-secondary);
  font-style: italic;
}

article .callout {
  background: var(--accent-light);
  border-radius: 10px;
  padding: 18px 22px;
  margin: 24px 0;
}
article .callout p:last-child { margin-bottom: 0; }
article .callout strong { color: var(--accent); }

article .warn-callout {
  background: var(--warn-light);
  border-radius: 10px;
  padding: 18px 22px;
  margin: 24px 0;
  color: var(--warn);
}
article .warn-callout p:last-child { margin-bottom: 0; }

/* Tables */
article table {
  width: 100%;
  border-collapse: collapse;
  margin: 22px 0;
  font-size: 15px;
  background: var(--surface);
  border-radius: 8px;
  overflow: hidden;
}
article th, article td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
article th {
  background: var(--surface2);
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}
article td:last-child, article th:last-child {
  text-align: right;
}

/* ─── SOURCES SECTION ─── */
.sources {
  margin-top: 50px;
  padding-top: 20px;
  border-top: 2px solid var(--border);
}
.sources h2 {
  margin-top: 0;
  font-size: 20px;
}
.sources ol {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-left: 18px;
}
.sources li {
  margin-bottom: 10px;
}
.sources li cite {
  font-style: normal;
  font-weight: 600;
  color: var(--text);
}

/* ─── CTA BLOCK ─── */
.cta-block {
  background: var(--accent);
  color: white;
  border-radius: var(--radius);
  padding: 28px 24px;
  margin: 36px 0;
  text-align: center;
}
.cta-block h3 {
  color: white;
  font-family: var(--serif);
  font-size: 22px;
  margin-bottom: 8px;
  margin-top: 0;
}
.cta-block p {
  color: white;
  opacity: 0.9;
  margin-bottom: 18px;
}
.cta-block a {
  display: inline-block;
  background: white;
  color: var(--accent);
  padding: 12px 24px;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  font-size: 15px;
}

/* ─── RELATED ARTICLES ─── */
.related {
  margin-top: 50px;
  padding-top: 30px;
  border-top: 1px solid var(--border);
}
.related h2 {
  margin-top: 0;
}
.related ul {
  list-style: none;
  margin-left: 0;
}
.related li {
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}
.related li:last-child { border-bottom: none; }
.related li a {
  display: block;
  text-decoration: none;
  color: var(--text);
}
.related li a:hover { color: var(--accent); }
.related .rel-title {
  font-family: var(--serif);
  font-size: 18px;
  margin-bottom: 4px;
  display: block;
}
.related .rel-desc {
  font-size: 14px;
  color: var(--text-secondary);
}

/* ─── FOOTER ─── */
.site-footer {
  margin-top: 60px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
}
.site-footer .footer-nav {
  display: flex;
  gap: 18px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.site-footer .footer-nav a {
  color: var(--text-secondary);
  text-decoration: none;
}
.site-footer .footer-nav a:hover { color: var(--accent); }

/* ─── HOME / HUB PAGE ─── */
.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 30px;
}
.hub-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  transition: transform 0.15s, box-shadow 0.15s;
}
.hub-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(28,26,22,0.12);
}
.hub-card a {
  text-decoration: none;
  color: inherit;
}
.hub-card .card-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.hub-card h3 {
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.25;
  margin-bottom: 8px;
  color: var(--text);
}
.hub-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 0;
}

.hero {
  padding: 40px 0 30px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 30px;
}
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(28px, 5vw, 42px);
  line-height: 1.15;
  margin-bottom: 14px;
}
.hero p {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 540px;
  margin-bottom: 20px;
}

@media (max-width: 600px) {
  .site-nav { flex-direction: column; align-items: flex-start; }
  .site-nav .nav-links { flex-wrap: wrap; gap: 12px; }
}
