/* ============================================================
   LEDGERLINE — mobile-first finance & insurance guide site
   Palette: Deep Ledger Navy / Ivory Paper / Brass / Slate / Moss
   ============================================================ */

:root {
  --navy: #0f2a43;
  --navy-deep: #081827;
  --ivory: #f7f4ee;
  --paper: #fbf9f5;
  --brass: #b8935f;
  --brass-deep: #96733f;
  --slate: #2b2f36;
  --slate-soft: #5b6270;
  --hairline: #ddd6c7;
  --moss: #4c7a62;
  --alert: #a8452f;
  --max-w: 520px;

  --font-display: "Fraunces", "Iowan Old Style", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ivory);
  color: var(--slate);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  min-height: 100vh;
  background: var(--paper);
  box-shadow: 0 0 40px rgba(15, 42, 67, 0.06);
  position: relative;
  padding-bottom: 48px;
}

a { color: inherit; }

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

/* ---------- Header / ledger stripe ---------- */

.site-header {
  background: var(--navy);
  color: var(--ivory);
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 3px solid var(--brass);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 6px;
  text-decoration: none;
  color: var(--ivory);
}

.brand-mark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 21px;
  letter-spacing: 0.2px;
}

.brand-mark span { color: var(--brass); }

.brand-sub {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(247, 244, 238, 0.55);
  display: block;
  margin-top: -2px;
}

.menu-btn {
  background: none;
  border: 1px solid rgba(247, 244, 238, 0.3);
  border-radius: 6px;
  width: 42px;
  height: 38px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
}

.menu-btn span {
  width: 18px;
  height: 2px;
  background: var(--ivory);
  display: block;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-btn.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-btn.open span:nth-child(2) { opacity: 0; }
.menu-btn.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

nav.drawer {
  max-height: 0;
  overflow: hidden;
  background: var(--navy-deep);
  transition: max-height 0.28s ease;
}

nav.drawer.open { max-height: 640px; }

nav.drawer ul {
  list-style: none;
  margin: 0;
  padding: 6px 18px 18px;
}

nav.drawer li { border-bottom: 1px solid rgba(247, 244, 238, 0.08); }

nav.drawer a {
  display: block;
  padding: 12px 2px;
  text-decoration: none;
  color: rgba(247, 244, 238, 0.9);
  font-size: 14.5px;
}

nav.drawer .nav-group-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--brass);
  padding: 14px 2px 4px;
}

/* ---------- Breadcrumb / stamp ---------- */

.stamp-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px 0;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--slate-soft);
}

.stamp-row .dot { color: var(--brass); }

/* ---------- Hero ---------- */

.hero {
  padding: 18px 18px 22px;
  border-bottom: 1px solid var(--hairline);
}

.hero-icon {
  width: 46px;
  height: 46px;
  padding: 10px;
  border-radius: 12px;
  background: var(--ivory);
  border: 1px solid var(--hairline);
  color: var(--brass-deep);
  margin-bottom: 12px;
}

.hero-icon svg { width: 100%; height: 100%; display: block; }

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--brass-deep);
  margin: 0 0 8px;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 28px;
  line-height: 1.18;
  margin: 0 0 10px;
  color: var(--navy);
}

.hero p.lede {
  font-size: 15.5px;
  color: var(--slate-soft);
  margin: 0;
}

.meta-line {
  display: flex;
  gap: 14px;
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--slate-soft);
}

.meta-line b { color: var(--slate); }

/* ---------- Content ---------- */

main.content {
  padding: 4px 18px 8px;
}

.section {
  padding: 22px 0;
  border-bottom: 1px solid var(--hairline);
}

.section:last-child { border-bottom: none; }

.section-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--brass-deep);
  letter-spacing: 1px;
  display: block;
  margin-bottom: 6px;
}

.section h2 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--navy);
  margin: 0 0 10px;
  line-height: 1.3;
}

.section h3 {
  font-family: var(--font-display);
  font-size: 16.5px;
  font-weight: 600;
  color: var(--navy);
  margin: 18px 0 8px;
}

.section p { margin: 0 0 12px; font-size: 15px; }

.section ul, .section ol {
  margin: 0 0 14px;
  padding-left: 20px;
}

.section li { margin-bottom: 8px; font-size: 15px; }

.callout {
  background: var(--ivory);
  border-left: 3px solid var(--brass);
  padding: 12px 14px;
  border-radius: 4px;
  font-size: 14px;
  margin: 14px 0;
}

.callout b { color: var(--navy); }

.callout.warn { border-left-color: var(--alert); }
.callout.good { border-left-color: var(--moss); }

table.compare {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  margin: 12px 0;
}

table.compare th, table.compare td {
  text-align: left;
  padding: 8px 6px;
  border-bottom: 1px solid var(--hairline);
}

table.compare th {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--slate-soft);
}

/* ---------- Ad slots ---------- */

.ad-slot {
  margin: 18px 0;
  padding: 4px;
}

.ad-slot .ad-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--slate-soft);
  text-align: center;
  margin-bottom: 6px;
  opacity: 0.6;
}

.ad-slot .ad-box {
  min-height: 100px;
  background: repeating-linear-gradient(
    45deg, rgba(15,42,67,0.03), rgba(15,42,67,0.03) 10px,
    rgba(15,42,67,0.05) 10px, rgba(15,42,67,0.05) 20px
  );
  border: 1px dashed var(--hairline);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--slate-soft);
  font-size: 11px;
  font-family: var(--font-mono);
}

/* ---------- Related / guide grid ---------- */

.guide-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.guide-card {
  display: block;
  text-decoration: none;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 14px;
  background: var(--paper);
}

.guide-card-icon {
  width: 30px;
  height: 30px;
  color: var(--brass-deep);
  margin-bottom: 8px;
}

.guide-card-icon svg { width: 100%; height: 100%; display: block; }

.guide-card .tag {
  font-family: var(--font-mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--brass-deep);
  display: block;
  margin-bottom: 6px;
}

.guide-card h4 {
  font-family: var(--font-display);
  font-size: 15.5px;
  margin: 0 0 4px;
  color: var(--navy);
}

.guide-card p {
  font-size: 12.5px;
  color: var(--slate-soft);
  margin: 0;
}

/* ---------- Home hero / index-only ---------- */

.index-hero {
  padding: 26px 18px 22px;
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: var(--ivory);
  position: relative;
  overflow: hidden;
}

.index-hero-art {
  position: absolute;
  top: -28px;
  right: -28px;
  width: 150px;
  height: 150px;
  color: var(--brass);
  opacity: 0.14;
  transform: rotate(8deg);
}

.index-hero-art svg { width: 100%; height: 100%; display: block; }

.index-hero > *:not(.index-hero-art) { position: relative; z-index: 1; }

.index-hero .hero-eyebrow { color: var(--brass); }

.index-hero h1 {
  color: var(--ivory);
  font-size: 26px;
}

.index-hero p.lede { color: rgba(247,244,238,0.75); }

.ledger-rule {
  height: 1px;
  background: repeating-linear-gradient(90deg, var(--brass) 0, var(--brass) 4px, transparent 4px, transparent 9px);
  margin: 16px 0;
  opacity: 0.6;
}

.cat-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 18px 4px;
}

.cat-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 7px 12px;
  border: 1px solid var(--hairline);
  border-radius: 20px;
  color: var(--navy);
  text-decoration: none;
  background: var(--ivory);
}

/* ---------- Footer ---------- */

footer.site-footer {
  background: var(--navy-deep);
  color: rgba(247,244,238,0.7);
  padding: 26px 18px 30px;
  margin-top: 20px;
  font-size: 12.5px;
}

footer.site-footer .foot-brand {
  font-family: var(--font-display);
  color: var(--ivory);
  font-size: 17px;
  margin-bottom: 6px;
}

footer.site-footer .foot-brand span { color: var(--brass); }

footer.site-footer .disclaimer {
  border-top: 1px solid rgba(247,244,238,0.12);
  margin-top: 16px;
  padding-top: 14px;
  font-size: 11px;
  line-height: 1.6;
  color: rgba(247,244,238,0.5);
}

footer.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 14px 0;
}

footer.site-footer nav a {
  text-decoration: none;
  color: rgba(247,244,238,0.75);
  font-size: 12px;
}

/* ---------- Utility ---------- */

.author-box {
  display: flex;
  gap: 10px;
  align-items: center;
  background: var(--ivory);
  border-radius: 8px;
  padding: 12px;
  margin: 16px 0;
}

.author-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--brass);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  flex-shrink: 0;
}

.author-box .name { font-size: 13px; font-weight: 600; color: var(--navy); }
.author-box .role { font-size: 11px; color: var(--slate-soft); }

.updated-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--moss);
  border: 1px solid var(--moss);
  border-radius: 20px;
  padding: 3px 9px;
  margin-top: 10px;
}

@media (min-width: 400px) {
  .guide-grid { grid-template-columns: 1fr 1fr; }
}
