/* PolyReceipts — shared styles across all pages */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --g: #00693E; --gd: #004D2C; --gl: #E8F4EE; --gm: #A8D5BE;
  --text: #111C16; --muted: #607068; --border: #DEE8E2; --bg: #FAFCFB;
}
html { overflow-x: hidden; }
body { font-family: 'Plus Jakarta Sans', sans-serif; background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; overflow-x: hidden; max-width: 100vw; }
a { text-decoration: none; }

/* NAV */
nav {
  background: rgba(250,252,251,0.92); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border); padding: 10px 36px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px;
  position: sticky; top: 0; z-index: 100;
}
.logo { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 16px; }
.logo-mark { width: 42px; height: 42px; display: grid; place-items: center; flex-shrink: 0; }
.logo-mark img { width: 100%; height: 100%; object-fit: contain; display: block; }
nav ul { display: flex; flex-wrap: wrap; list-style: none; gap: 4px; align-items: center; }
nav ul a { color: var(--muted); font-size: 14px; font-weight: 500; padding: 6px 14px; border-radius: 20px; transition: color 0.15s, background 0.15s; white-space: nowrap; }
nav ul a:hover, nav ul a.active { color: var(--text); background: var(--gl); }

@media (max-width: 640px) {
  /* Logo is icon-only now (no wordmark) specifically so it's narrow enough to stay on the
     same line as the nav links even on a small phone, instead of wrapping to its own row. */
  nav { padding: 10px 12px; gap: 8px 10px; }
  nav ul { gap: 2px; }
  nav ul a { padding: 5px 8px; font-size: 12.5px; }
}

/* BUTTONS */
.btn-main { background: var(--g); color: #fff; font-size: 15px; font-weight: 700; padding: 12px 28px; border-radius: 20px; border: none; cursor: pointer; font-family: inherit; transition: background 0.15s; display: inline-block; }
.btn-main:hover { background: var(--gd); }
.btn-ghost { background: transparent; color: var(--text); font-size: 15px; font-weight: 500; padding: 12px 22px; border-radius: 20px; border: 1.5px solid var(--border); cursor: pointer; font-family: inherit; transition: border-color 0.15s, background 0.15s; display: inline-block; }
.btn-ghost:hover { border-color: var(--gm); background: var(--gl); }

/* PAGE HEADER — used by secondary pages instead of the full homepage hero */
.page-header { max-width: 720px; margin: 0 auto; padding: 56px 32px 0; text-align: center; }
.eyebrow { font-size: 12px; font-weight: 700; color: var(--g); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 10px; }
.page-h { font-size: clamp(28px, 4vw, 44px); font-weight: 800; letter-spacing: -0.03em; margin-bottom: 14px; }
.page-sub { font-size: 15.5px; color: var(--muted); line-height: 1.65; }

.section { max-width: 960px; margin: 0 auto; padding: 56px 32px 80px; }
.section-top { text-align: center; margin-bottom: 40px; }
.section-h { font-size: clamp(24px, 3vw, 38px); font-weight: 800; letter-spacing: -0.03em; }

/* BANNER — placeholder/preview disclosure, reused wherever unverified data is shown */
.preview-banner {
  max-width: 860px; margin: 0 auto 32px; background: #FFFBEB; border: 1px solid #FDE68A;
  color: #92400E; font-size: 13px; line-height: 1.6; padding: 12px 18px; border-radius: 10px;
  text-align: center;
}
.preview-banner strong { color: #78350F; }

/* WAITLIST CTA — appears at the bottom of every page */
.cta { max-width: 560px; margin: 0 auto; padding: 80px 32px; text-align: center; }
.cta h2 { font-size: clamp(26px, 4vw, 44px); font-weight: 800; letter-spacing: -0.03em; margin-bottom: 10px; }
.cta h2 span { color: var(--g); }
.cta p { font-size: 15px; color: var(--muted); margin-bottom: 28px; }
.email-stack { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.email-stack input { width: 100%; max-width: 360px; padding: 12px 18px; border-radius: 20px; border: 1.5px solid var(--border); font-size: 14px; font-family: inherit; outline: none; background: #fff; transition: border-color 0.15s; text-align: center; }
.email-stack input:focus { border-color: var(--g); }
.btn-full { background: var(--g); color: #fff; font-size: 15px; font-weight: 700; padding: 13px 32px; border-radius: 20px; border: none; cursor: pointer; font-family: inherit; transition: background 0.15s; width: 100%; max-width: 360px; }
.btn-full:hover { background: var(--gd); }
.cta-note { font-size: 12px; color: var(--muted); margin-top: 10px; }

footer { border-top: 1px solid var(--border); padding: 24px 36px; display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); flex-wrap: wrap; gap: 8px; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.55s ease, transform 0.55s ease; }
.reveal.in { opacity: 1; transform: none; }
.d1 { transition-delay: 0.1s; } .d2 { transition-delay: 0.2s; } .d3 { transition-delay: 0.3s; }
.reveal.pop { transform: translateY(14px) scale(0.94); }
.reveal.pop.in { opacity: 1; transform: scale(1) translateY(0); transition: opacity 0.5s ease, transform 0.7s cubic-bezier(.34,1.56,.64,1); }

/* SCORE BAR — stacked-points bar used on /receipts and /tools/<slug>. Palette validated
   against #ffffff (worst adjacent CVD ΔE 11.4). Yellow/magenta segments sit under 3:1
   contrast on white by design — identity is always carried by the legend/tooltip/table
   text too, never by color alone. Re-validate after any change:
   node <dataviz-skill>/scripts/validate_palette.js "#00693E,#eb6834,#2a78d6,#eda100,#e87ba4,#4a3aa7" --mode light --surface "#ffffff" */
:root {
  --m-vol: #00693E; --m-data: #eb6834; --m-sec: #2a78d6;
  --m-spd: #eda100; --m-trn: #e87ba4; --m-rel: #4a3aa7;
  --m-track: #EDF2EF;
}
.score-bar { display: flex; align-items: stretch; height: 14px; border-radius: 7px; overflow: hidden; background: var(--m-track); position: relative; gap: 2px; }
.score-bar.hero { height: 22px; border-radius: 11px; }
.score-bar .seg {
  height: 100%; background: var(--seg-color); position: relative; flex: 0 0 auto;
  outline: none; cursor: pointer;
}
.score-bar .seg:first-child { border-radius: 7px 0 0 7px; }
.score-bar.hero .seg:first-child { border-radius: 11px 0 0 11px; }
.score-bar .seg.cap-end { border-radius: 0 4px 4px 0; }
.score-bar .seg.pending {
  background: repeating-linear-gradient(45deg, color-mix(in srgb, var(--seg-color) 18%, var(--m-track)) 0 6px, var(--m-track) 6px 12px);
  cursor: default;
}
/* Hit target extends the full row height even though the visual bar is 14px, per §5. */
.score-bar-wrap { position: relative; padding: 6px 0; margin: -6px 0; }
.bar-tooltip {
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  background: var(--text); color: #fff; font-size: 12px; line-height: 1.5; padding: 8px 12px;
  border-radius: 8px; white-space: nowrap; z-index: 20; pointer-events: none;
  opacity: 0; visibility: hidden; transition: opacity 0.12s ease;
}
.bar-tooltip.show { opacity: 1; visibility: visible; }
.bar-tooltip b { font-weight: 700; }

/* LEGEND — one instance per page, six chips: dot + name + weight */
.metric-legend { display: flex; flex-wrap: wrap; gap: 10px 20px; justify-content: center; margin: 0 auto 28px; max-width: 760px; }
.metric-legend .lg-item { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.metric-legend .lg-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }

/* SCORE TABLE — accessible text alternative to the bar (required, see §5) */
.score-table-wrap { overflow-x: auto; }
.score-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 640px; }
.score-table th, .score-table td { padding: 10px 12px; text-align: right; border-bottom: 1px solid var(--border); }
.score-table th:first-child, .score-table td:first-child { text-align: left; }
.score-table th { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.score-table td.na { color: var(--muted); font-style: italic; }
.score-table tr:hover td { background: var(--bg); }
