/* ============================================================
   FED BALANCE SHEET GUIDE — style.css
   veridelisi.github.io/fed-balance-sheet-guide
   Aesthetic: Modern Editorial · Warm Light · Gold Accents
   Fonts: DM Serif Display + DM Mono + DM Sans
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Mono:wght@400;500&family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500&display=swap');

/* ── CSS Variables ─────────────────────────────────────── */
:root {
  --bg-page:        #f7f5f0;
  --bg-surface:     #ffffff;
  --bg-subtle:      #f0ece5;
  --bg-hero:        #1a3a5c;

  --gold:           #b07d2e;
  --gold-light:     #e8c97a;
  --gold-dim:       #d4a84b;
  --gold-bg:        #fdf6e8;

  --text-primary:   #1a1a1a;
  --text-secondary: #4a4540;
  --text-muted:     #8a8078;
  --text-faint:     #b5afa5;

  --border:         #e0dbd0;
  --border-mid:     #ccc5b8;

  --c-reg:      #1a3a5c; --c-reg-bg:  #eef2f8; --c-reg-text:  #1a3a5c;
  --c-sup:      #2a7a5a; --c-sup-bg:  #eef6f2; --c-sup-text:  #1e5c42;
  --c-pri:      #b84a20; --c-pri-bg:  #fdf0ec; --c-pri-text:  #8f3618;
  --c-sub:      #5b4fa8; --c-sub-bg:  #f2f0fb; --c-sub-text:  #443d80;
  --c-lia:      #7a3060; --c-lia-bg:  #f8eef5; --c-lia-text:  #5c2248;

  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;
  --font-mono:    'DM Mono', 'Courier New', monospace;

  --radius:       6px;
  --radius-lg:    12px;
  --radius-xl:    16px;
  --shadow-card:  0 1px 4px rgba(0,0,0,0.06), 0 0 0 0.5px var(--border);
  --shadow-hover: 0 4px 16px rgba(0,0,0,0.10), 0 0 0 0.5px var(--border-mid);
  --transition:   0.18s ease;
}

/* ── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background-color: var(--bg-page);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  min-height: 100vh;
}
a { color: var(--gold); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--c-reg); }
img { max-width: 100%; display: block; }

/* ── HEADER ────────────────────────────────────────────── */
.site-header {
  background: var(--bg-surface);
  border-bottom: 0.5px solid var(--border);
  padding: 0 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 54px;
}
.site-header .logo {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--c-reg);
  font-weight: 500;
}
.site-header .logo span { color: var(--gold); }
.site-nav { display: flex; gap: 1.5rem; }
.site-nav a {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.site-nav a:hover, .site-nav a.active { color: var(--c-reg); }

/* ── HERO ──────────────────────────────────────────────── */
.hero {
  background: var(--bg-hero);
  border-radius: var(--radius-xl);
  margin: 1.75rem 2rem 0;
  padding: 3rem 3rem 2.75rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  right: -60px; bottom: -80px;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: rgba(176,125,46,0.12);
  pointer-events: none;
}
.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: 1rem;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 400;
  line-height: 1.15;
  color: #fff;
  max-width: 720px;
  margin-bottom: 1rem;
}
.hero h1 em { font-style: italic; color: var(--gold-light); }
.hero-sub {
  font-size: 0.925rem;
  color: rgba(255,255,255,0.6);
  max-width: 520px;
  font-weight: 300;
  margin-bottom: 2rem;
  line-height: 1.65;
}
.hero-meta { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.hero-meta-item {
  background: rgba(255,255,255,0.08);
  border: 0.5px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  padding: 0.5rem 0.875rem;
}
.hero-meta-item strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--gold-light);
  line-height: 1.2;
}
.hero-meta-item span {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
}
.hero-note {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 0.5px solid rgba(255,255,255,0.1);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.3);
  line-height: 1.6;
}

/* ── CONTAINER & LAYOUT ────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.grid-section { padding: 2.5rem 0; }
.divider { height: 0.5px; background: var(--border); margin: 2rem 0; }

/* ── SECTION LABELS ────────────────────────────────────── */
.section-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.4rem;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.5vw, 1.65rem);
  font-weight: 400;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}
.section-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  max-width: 640px;
  font-weight: 300;
  line-height: 1.65;
}

/* ── POLICY CARDS GRID ─────────────────────────────────── */
.policy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(278px, 1fr));
  gap: 1rem;
  margin-top: 1.75rem;
}

.policy-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.375rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--transition), transform var(--transition);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--text-primary);
}
.policy-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}
.policy-card.c-reg::before  { background: var(--c-reg); }
.policy-card.c-sup::before  { background: var(--c-sup); }
.policy-card.c-pri::before  { background: var(--c-pri); }
.policy-card.c-sub::before  { background: var(--c-sub); }
.policy-card.c-lia::before  { background: var(--c-lia); }

.policy-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
  color: var(--text-primary);
}

.card-number {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  color: var(--gold);
  text-transform: uppercase;
}
.card-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-primary);
  line-height: 1.3;
}
.card-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.55;
  flex: 1;
  font-weight: 300;
}
.card-estimate {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.2rem;
}
.estimate-bar {
  flex: 1;
  height: 3px;
  background: var(--bg-subtle);
  border-radius: 2px;
  overflow: hidden;
}
.estimate-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-dim));
  border-radius: 2px;
}
.estimate-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--gold);
  white-space: nowrap;
}

/* ── TAGS ──────────────────────────────────────────────── */
.tag-row { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.card-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius);
  font-weight: 500;
}
.card-tag.regulatory    { background: var(--c-reg-bg); color: var(--c-reg-text); }
.card-tag.supervisory   { background: var(--c-sup-bg); color: var(--c-sup-text); }
.card-tag.pricing       { background: var(--c-pri-bg); color: var(--c-pri-text); }
.card-tag.substitutes   { background: var(--c-sub-bg); color: var(--c-sub-text); }
.card-tag.precautionary { background: var(--c-sup-bg); color: var(--c-sup-text); }
.card-tag.liability     { background: var(--c-lia-bg); color: var(--c-lia-text); }
.card-tag.default       { background: var(--bg-subtle); color: var(--text-muted); }

/* ── SUMMARY BAR ───────────────────────────────────────── */
.summary-bar {
  background: var(--bg-hero);
  border-radius: var(--radius-xl);
  padding: 2rem 2.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1.5rem;
  margin: 2.5rem 0 3rem;
}
.summary-stat { text-align: center; }
.summary-stat .value {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 400;
  color: var(--gold-light);
  display: block;
}
.summary-stat .label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.38);
  margin-top: 0.2rem;
}

/* ── POLICY PAGE LAYOUT ────────────────────────────────── */
.policy-layout {
  display: grid;
  grid-template-columns: 1fr 296px;
  gap: 2.5rem;
  align-items: start;
  padding: 2rem 0 5rem;
}
@media (max-width: 900px) { .policy-layout { grid-template-columns: 1fr; } }

/* ── POLICY CONTENT ────────────────────────────────────── */
.policy-content h1 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.5vw, 2.4rem);
  font-weight: 400;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 1.25rem;
}
.policy-content h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--text-primary);
  margin: 2.25rem 0 0.65rem;
  padding-bottom: 0.5rem;
  border-bottom: 0.5px solid var(--border);
}
.policy-content p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 300;
  line-height: 1.78;
}
.policy-content strong { color: var(--text-primary); font-weight: 500; }
.policy-content a { color: var(--gold); }
.policy-content a:hover { color: var(--c-reg); }

/* ── ESTIMATE BOX ──────────────────────────────────────── */
.estimate-box {
  background: var(--bg-hero);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  margin: 2rem 0;
}
.estimate-box .box-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.38);
  margin-bottom: 0.75rem;
}
.estimate-range {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.estimate-range .min,
.estimate-range .max  { font-family: var(--font-mono); font-size: 0.85rem; color: rgba(255,255,255,0.38); }
.estimate-range .mid  { font-family: var(--font-display); font-size: 2rem; font-weight: 400; color: var(--gold-light); }
.estimate-range .unit { font-family: var(--font-mono); font-size: 0.7rem; color: rgba(255,255,255,0.3); }
.estimate-range .sep  { color: rgba(255,255,255,0.2); }
.estimate-visual {
  margin-top: 1rem;
  height: 5px;
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}
.estimate-visual-track {
  position: absolute;
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-dim));
  border-radius: 3px;
}
.estimate-box p {
  font-family: var(--font-mono) !important;
  font-size: 0.63rem !important;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.28) !important;
  margin-top: 0.75rem !important;
  margin-bottom: 0 !important;
  line-height: 1.55;
  font-weight: 400 !important;
}

/* ── CALLOUT ───────────────────────────────────────────── */
.callout {
  border-left: 3px solid var(--gold-dim);
  padding: 0.875rem 1.25rem;
  background: var(--gold-bg);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.5rem 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.68;
  font-weight: 300;
}

/* ── POLICY HERO BAND ──────────────────────────────────── */
.policy-hero { padding: 2rem 0 0; }
.policy-hero-eyebrow {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

/* ── BREADCRUMB ────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  padding: 1rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.breadcrumb a { color: var(--text-faint); }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb .sep { color: var(--border-mid); }
.breadcrumb .current { color: var(--gold); }

/* ── SIDEBAR ───────────────────────────────────────────── */
.policy-sidebar { position: sticky; top: 66px; }
.sidebar-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 1.125rem 1.25rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-card);
}
.sidebar-card .card-head {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 0.5px solid var(--border);
}

.nav-policy-list { list-style: none; display: flex; flex-direction: column; gap: 0.15rem; }
.nav-policy-list li a {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-size: 0.78rem;
  color: var(--text-muted);
  padding: 0.3rem 0.5rem;
  border-radius: var(--radius);
  transition: background var(--transition), color var(--transition);
  line-height: 1.35;
  font-weight: 400;
}
.nav-policy-list li a:hover { background: var(--bg-subtle); color: var(--text-primary); }
.nav-policy-list li a.current { background: var(--gold-bg); color: var(--gold); }
.nav-policy-list li a .num {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-faint);
  flex-shrink: 0;
  margin-top: 0.15rem;
}
.nav-policy-list li a.current .num { color: var(--gold); }

.key-term {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.5rem 0;
  border-bottom: 0.5px solid var(--border);
}
.key-term:last-child { border-bottom: none; }
.key-term dt {
  font-family: var(--font-mono);
  font-size: 0.67rem;
  color: var(--text-primary);
  font-weight: 500;
  letter-spacing: 0.03em;
}
.key-term dd {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.45;
  font-weight: 300;
}

/* ── BOTTOM PAGE NAV ───────────────────────────────────── */
.page-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 0 4rem;
  border-top: 0.5px solid var(--border);
}
.page-nav a {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.page-nav .prev { color: var(--text-muted); }
.page-nav .next { color: var(--c-reg); }
.page-nav .prev:hover { color: var(--text-primary); }
.page-nav .next:hover { color: var(--gold); }

/* ── FOOTER ────────────────────────────────────────────── */
.site-footer {
  background: var(--bg-surface);
  border-top: 0.5px solid var(--border);
  padding: 2rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.site-footer a { color: var(--text-faint); }
.site-footer a:hover { color: var(--gold); }
.site-footer p + p { margin-top: 0.35rem; }

/* ── ANIMATIONS ─────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate-fade-up { animation: fadeUp 0.38s ease both; }
.delay-1 { animation-delay: 0.08s; }
.delay-2 { animation-delay: 0.16s; }
.delay-3 { animation-delay: 0.24s; }
.delay-4 { animation-delay: 0.32s; }

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero { margin: 1rem 1rem 0; padding: 2rem 1.5rem 2rem; }
  .site-header { padding: 0 1rem; }
  .site-nav { gap: 0.75rem; }
  .container { padding: 0 1rem; }
  .policy-grid { grid-template-columns: 1fr; }
  .summary-bar { padding: 1.5rem; }
  .hero-meta { gap: 0.5rem; }
  .hero-meta-item { padding: 0.4rem 0.6rem; }
}
