/* Money Tracker Daily — mobile-first, no web fonts. The only JS is the cookie consent script. */
:root {
  --bg: #fbfbf8;
  --surface: #ffffff;
  --ink: #16201b;
  --ink-2: #4a5550;
  --line: #e3e6e1;
  --brand: #0f5132;
  --brand-ink: #ffffff;
  --accent: #d9f0e3;
  --warn-bg: #fff4d6;
  --warn-line: #e8c15a;
  --row-now: #f1f8f3;
  --radius: 10px;
  /* payment groups */
  --pc-ssi: #7c3aed;
  --pc-third: #0891b2;
  --pc-wed2: #15803d;
  --pc-wed3: #ca8a04;
  --pc-wed4: #dc2626;
  --pc-multi: #1f2937;
  --pc-empty: #eef0ec;
  --pc-weekend: #e2e5df;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1412; --surface: #161d1a; --ink: #e8ece9; --ink-2: #a3aea8; --line: #2a332f;
    --brand: #3fb27f; --brand-ink: #06110b; --accent: #173326; --warn-bg: #3a2f10; --warn-line: #8a6d1d;
    --row-now: #18261f; --pc-empty: #222a26; --pc-weekend: #1b221f; --pc-multi: #e5e7eb;
    --pc-ssi: #a78bfa; --pc-third: #22d3ee; --pc-wed2: #4ade80; --pc-wed3: #facc15; --pc-wed4: #f87171;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--font); }
a { color: var(--brand); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.7rem, 4.5vw, 2.4rem); }
h2 { font-size: 1.3rem; margin-top: 1.8em; }
h3 { font-size: 1.05rem; margin-top: 1.5em; }
p { margin: 0 0 1em; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--ink-2); }
.lede { font-size: 1.1rem; color: var(--ink-2); max-width: 70ch; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 10; }

/* header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 750; font-size: 1.1rem; color: var(--ink); text-decoration: none; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand-mark rect { fill: var(--brand); }
.brand-mark path { stroke: var(--brand-ink); }
.header-nav { display: flex; align-items: center; gap: 16px; font-size: .95rem; }
.header-nav a:not(.btn) { color: var(--ink); text-decoration: none; }
@media (max-width: 560px) { .header-nav a:not(.btn) { display: none; } }

.btn { display: inline-block; background: var(--brand); color: var(--brand-ink); padding: 10px 16px; border-radius: 8px; font-weight: 650; text-decoration: none; }
.btn-sm { padding: 7px 12px; font-size: .9rem; }
.btn-ghost { background: transparent; color: var(--brand); border: 1px solid var(--line); }

.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 16px 0 0; font-size: .85rem; color: var(--ink-2); }
.crumbs li + li::before { content: "›"; margin-right: 6px; }
.crumbs a { color: var(--ink-2); }
main { padding-bottom: 48px; }

/* home */
.hero { padding: 40px 0 8px; }
.hero h1 { max-width: 20ch; }
.section-h { font-size: 1.15rem; margin-top: 2em; }
.cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card { display: flex; flex-direction: column; gap: 6px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; }
a.card:hover { border-color: var(--brand); }
.card-kicker { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); }
.card-title { font-size: 1.15rem; font-weight: 700; }
.card-stat { font-size: .95rem; }
.card-meta { font-size: .82rem; color: var(--ink-2); margin-top: auto; }
.card-soon { opacity: .6; }
.how-list { padding-left: 1.2em; max-width: 72ch; }
.how-list li { margin-bottom: .6em; }

/* tracker */
.tracker-head { padding-top: 16px; }
.meta-row { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 12px 0 0; font-size: .9rem; }
.meta-row dt { color: var(--ink-2); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.meta-row dd { margin: 0; font-weight: 600; }
.changed { background: var(--accent); border-radius: var(--radius); padding: 12px 14px; margin-top: 20px; }
.changed-label { font-weight: 700; margin-right: 4px; }
.notice { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin: 16px 0; }
.notice-warn { background: var(--warn-bg); border-color: var(--warn-line); }
.badge { display: inline-block; font-size: .72rem; padding: 1px 6px; border-radius: 4px; font-weight: 700; }
.badge-warn { background: var(--warn-bg); border: 1px solid var(--warn-line); color: var(--ink); }

.stat-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.stat { background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.stat-label { font-size: .82rem; color: var(--ink-2); }
.stat-value { font-size: 1.25rem; font-weight: 750; }
.pc-key-ssi { border-left-color: var(--pc-ssi); }
.pc-key-third { border-left-color: var(--pc-third); }
.pc-key-wed2 { border-left-color: var(--pc-wed2); }
.pc-key-wed3 { border-left-color: var(--pc-wed3); }
.pc-key-wed4 { border-left-color: var(--pc-wed4); }

.table-scroll, .chart-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); font-size: .92rem; font-variant-numeric: tabular-nums; min-width: 640px; }
table.data caption { caption-side: bottom; text-align: left; font-size: .82rem; color: var(--ink-2); padding: 8px 2px; }
table.data th, table.data td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.data thead th { font-size: .82rem; background: var(--bg); }
.th-sub { display: block; font-weight: 400; color: var(--ink-2); font-size: .75rem; }
table.data tbody th { font-weight: 650; }
tr.row-now { background: var(--row-now); }

.chart { margin: 28px 0 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.chart figcaption { font-size: .92rem; margin-bottom: 8px; }
.pay-cal { width: 100%; min-width: 620px; height: auto; display: block; }
.pc-axis { font: 10px var(--font); fill: var(--ink-2); }
.pc-day { fill: var(--pc-empty); }
.pc-weekend { fill: var(--pc-weekend); }
.pc-ssi { fill: var(--pc-ssi); background: var(--pc-ssi); }
.pc-third { fill: var(--pc-third); background: var(--pc-third); }
.pc-wed2 { fill: var(--pc-wed2); background: var(--pc-wed2); }
.pc-wed3 { fill: var(--pc-wed3); background: var(--pc-wed3); }
.pc-wed4 { fill: var(--pc-wed4); background: var(--pc-wed4); }
.pc-multi { fill: var(--pc-multi); background: var(--pc-multi); }
.pc-today { stroke: var(--ink); stroke-width: 2; }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 0; margin: 10px 0 0; font-size: .82rem; color: var(--ink-2); }
.swatch { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.explainer ul { padding-left: 1.2em; max-width: 75ch; }

.cta { margin: 32px 0; }
.signup { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.signup-h { font-weight: 750; font-size: 1.1rem; margin: 0; }
.signup-p { margin: 0; color: var(--ink-2); }
.signup-embed { width: 100%; max-width: 420px; height: 52px; border: 0; }
.signup-soon { margin: 0; font-size: .92rem; }

.methodology { border-top: 1px solid var(--line); margin-top: 32px; padding-top: 8px; }
.method-list { margin: 0; }
.method-list > div { display: grid; grid-template-columns: 1fr; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 720px) { .method-list > div { grid-template-columns: 180px 1fr; gap: 16px; } }
.method-list dt { font-weight: 650; }
.method-list dd { margin: 0; max-width: 75ch; }
.changelog { list-style: none; padding: 0; }
.changelog li { padding: 6px 0; border-bottom: 1px dashed var(--line); }
.changelog time { color: var(--ink-2); font-variant-numeric: tabular-nums; margin-right: 8px; }

/* static pages */
.prose { max-width: 72ch; padding-top: 16px; }
.prose ul { padding-left: 1.2em; }
.person { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.person-photo { border-radius: 50%; }
.page-updated { margin-top: 2em; font-size: .85rem; }

/* footer */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding: 28px 0 36px; font-size: .92rem; }
.footer-signup { margin-bottom: 24px; }
.footer-signup .signup { background: var(--bg); }
.footer-grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-brand { font-weight: 750; margin-bottom: 4px; }
.footer-h { font-weight: 700; margin-bottom: 6px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 4px; }
.fine { color: var(--ink-2); font-size: .8rem; margin-top: 20px; }

/* COLA tracker */
.cola-bars { width: 100%; min-width: 640px; height: auto; display: block; }
.cb-grid { stroke: var(--line); stroke-width: 1; }
.cb-axis { font: 10px var(--font); fill: var(--ink-2); }
.cb-bar { fill: var(--brand); }
.cb-calc { fill: var(--pc-wed3); }
.hero-stat { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin-top: 20px; }
.big-stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.big-stat .stat-label { display: block; }
.big-stat .big { display: block; font-size: 2.4rem; font-weight: 800; line-height: 1.1; margin: 4px 0; font-variant-numeric: tabular-nums; }
.big-stat.calc { border-color: var(--pc-wed3); }
.big-stat p { margin: 0; font-size: .88rem; color: var(--ink-2); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.row-q3 td, tr.row-q3 th { font-weight: 650; }
.pill { display: inline-block; font-size: .72rem; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--accent); vertical-align: 1px; }
.pill-calc { background: var(--warn-bg); border: 1px solid var(--warn-line); }

/* line charts (mortgage) */
.line-chart { width: 100%; min-width: 560px; height: auto; display: block; }
.lc-line { fill: none; stroke-width: 2; stroke-linejoin: round; }
.lc-30 { stroke: var(--brand); fill: var(--brand); }
.lc-15 { stroke: var(--pc-ssi); fill: var(--pc-ssi); }
path.lc-30, path.lc-15 { fill: none; }
.swatch.lc-30 { background: var(--brand); }
.swatch.lc-15 { background: var(--pc-ssi); }
.ad-module { border: 1px dashed var(--line); border-radius: var(--radius); padding: 14px 16px; margin: 28px 0; background: var(--surface); }
.ad-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); margin: 0 0 6px; }

/* savings / CD tracker */
.term-bars { width: 100%; max-width: 640px; min-width: 460px; height: auto; display: block; }
.tb-value { font: 600 11px var(--font); fill: var(--ink); }
.lc-savings { stroke: var(--brand); fill: var(--brand); }
.lc-money_market { stroke: var(--pc-third); fill: var(--pc-third); }
.lc-cd_12m { stroke: var(--pc-ssi); fill: var(--pc-ssi); }
path.lc-savings, path.lc-money_market, path.lc-cd_12m { fill: none; }
.swatch.lc-savings { background: var(--brand); }
.swatch.lc-money_market { background: var(--pc-third); }
.swatch.lc-cd_12m { background: var(--pc-ssi); }
.lc-upper { stroke: var(--pc-third); fill: var(--pc-third); }
.lc-lower { stroke: var(--pc-third); fill: var(--pc-third); stroke-dasharray: 4 3; }
.lc-effr { stroke: var(--brand); fill: var(--brand); }
path.lc-upper, path.lc-lower, path.lc-effr { fill: none; }
.swatch.lc-upper, .swatch.lc-lower { background: var(--pc-third); }
.swatch.lc-effr { background: var(--brand); }
.lc-ca { stroke: var(--pc-wed4); fill: var(--pc-wed4); }
.lc-fl { stroke: var(--pc-third); fill: var(--pc-third); }
.lc-tx { stroke: var(--pc-wed3); fill: var(--pc-wed3); }
path.lc-ca, path.lc-fl, path.lc-tx { fill: none; }
.swatch.lc-ca { background: var(--pc-wed4); }
.swatch.lc-fl { background: var(--pc-third); }
.swatch.lc-tx { background: var(--pc-wed3); }
.next-tag { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 4px; background: var(--accent); font-size: .8rem; font-weight: 650; }

/* newsletter signup form */
.signup-form { display: flex; gap: 8px; flex-wrap: wrap; width: 100%; max-width: 420px; }
.signup-form input { flex: 1 1 200px; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: var(--surface); color: var(--ink); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* "About this data" notice on tracker pages */
.notice-data { font-size: .9rem; }
.notice-data p { margin: 0; }
.notice-data p + p { margin-top: 6px; }
.ad-label { text-transform: none; letter-spacing: 0; font-size: .82rem; }

/* Cookie consent banner (static/js/consent.js) */
.consent { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(0,0,0,.08); font-size: .92rem; }
.consent[hidden] { display: none; }
.consent-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; padding-top: 14px; padding-bottom: 14px; }
.consent-inner p { margin: 0; flex: 1 1 320px; }
.consent-actions { display: flex; gap: 10px; }
.consent-actions .btn { border: 0; cursor: pointer; font: inherit; font-weight: 650; min-width: 96px; }

/* Related trackers (tracker.html) */
.related { margin: 28px 0; }
.related ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.related li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; }
.related a { font-weight: 650; }

/* Tracker data links and citation (tracker.html) */
.data-links { font-size: .9rem; margin: 4px 0 16px; color: var(--ink-2); }
.cite-text { margin: 0; padding: 8px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; font-size: .88rem; user-select: all; }
