/* =====================================================================
   MoneySavv — landing.css
   First-visit onboarding dialog, the app's small footer, and the static info pages
   (about, privacy, terms, phoenix-grocery-prices). Uses only app.css tokens. Dark only;
   green only on primary CTAs.
   ===================================================================== */

/* ---------- onboarding dialog ---------- */
.onb {
  width: min(520px, calc(100vw - 24px)); max-height: calc(100dvh - 24px);
  padding: 0; border: 0; border-radius: var(--radius);
  background: var(--surface-3); color: var(--text); box-shadow: var(--shadow-lg);
  overflow: auto;
}
.onb::backdrop { background: var(--overlay); }
.onb-inner { padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-4); }
.onb-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.onb-step { display: flex; flex-direction: column; gap: var(--space-3); }
.onb-step h2 { font-size: var(--fs-xl); }
.onb-step h2:focus { outline: none; }
.onb-step .muted { font-size: var(--fs-sm); }
.onb-zip { max-width: 180px; font-variant-numeric: tabular-nums; }
.onb-region:empty { display: none; }
.onb-sample { display: flex; align-items: flex-start; gap: var(--space-2); font-size: var(--fs-xs); color: var(--muted); }
.onb-sample .badge-sample { flex: none; }
.onb-choices { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.onb-choice {
  display: flex; align-items: flex-start; gap: var(--space-3); cursor: pointer;
  padding: var(--space-3) var(--space-4); border-radius: var(--radius-sm);
  background: var(--surface-2); box-shadow: var(--line-strong) 0 0 0 1px inset;
}
.onb-choice:hover { background: var(--surface-hover); }
.onb-choice input { margin: 3px 0 0; width: 18px; height: 18px; flex: none; accent-color: var(--text); }
.onb-choice:has(input:checked) { box-shadow: var(--text) 0 0 0 2px inset; }
.onb-choice:has(input:focus-visible) { box-shadow: var(--focus-ring); }
.onb-choice input:focus-visible { outline: none; }
.onb-choice-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.onb-choice-label { font-weight: var(--fw-bold); }
.onb-choice-desc { font-size: var(--fs-sm); color: var(--muted); }
.onb-actions { display: flex; justify-content: flex-end; gap: var(--space-3); flex-wrap: wrap; }
.onb-tip span { line-height: var(--lh); }
@media (max-width: 480px) {
  .onb-inner { padding: var(--space-4); }
  .onb-actions .btn { flex: 1 1 auto; }
}

/* ---------- app footer (index.html) ---------- */
.site-foot {
  max-width: var(--page-max); margin: 0 auto; padding: var(--space-4) var(--space-5) 0;
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-4);
  font-size: var(--fs-xs); color: var(--muted);
}
.site-foot nav { display: flex; flex-wrap: wrap; gap: 0 var(--space-4); }
.site-foot a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; display: inline-flex; align-items: center; min-height: 32px; }
.site-foot a:hover { color: var(--text); }
@media (max-width: 699px) {
  .site-foot { padding: var(--space-3) calc(var(--space-4) + env(safe-area-inset-right, 0px)) 0 calc(var(--space-4) + env(safe-area-inset-left, 0px)); }
}

/* ---------- static info pages ---------- */
.sp-body { min-height: 100vh; display: flex; flex-direction: column; }
.sp-top { background: var(--sidebar-bg); }
.sp-top-inner {
  max-width: 880px; margin: 0 auto; padding: var(--space-3) var(--space-5);
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap;
}
.sp-brand { display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--control-h); text-decoration: none; color: var(--text); font-size: var(--fs-lg); letter-spacing: -0.3px; }
.sp-brand svg { width: 24px; height: 24px; color: var(--accent); flex: none; }
.sp-brand b { font-weight: var(--fw-bold); }
.sp-main { flex: 1; width: 100%; max-width: 880px; margin: 0 auto; padding: var(--space-6) var(--space-5) var(--space-7); }
.sp-main:focus { outline: none; }
.sp-article { display: flex; flex-direction: column; gap: var(--space-4); line-height: 1.6; }
.sp-article h1 { font-size: 28px; line-height: var(--lh-tight); }
.sp-article h2 { font-size: var(--fs-xl); margin-top: var(--space-5); }
.sp-article h3 { font-size: var(--fs-lg); margin-top: var(--space-2); }
.sp-article p, .sp-article li { color: var(--text); max-width: 68ch; }
.sp-article ul, .sp-article ol { margin: 0; padding-left: 1.25em; display: flex; flex-direction: column; gap: var(--space-2); }
.sp-article a { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }
.sp-article a.btn { text-decoration: none; }
.sp-lede { font-size: var(--fs-lg); color: var(--muted) !important; }
.sp-meta { font-size: var(--fs-sm); color: var(--muted) !important; }
.sp-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-3); }
.sp-grid { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.sp-grid .sp-card h3 { margin-top: 0; }
.sp-grid .sp-card p { font-size: var(--fs-sm); }
.sp-cta { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
/* Owner-review notes: amber, never green. Remove once reviewed. */
.sp-note {
  border-radius: var(--radius-sm); padding: var(--space-3) var(--space-4);
  background: var(--warn-soft); color: var(--sample-ink); box-shadow: var(--warn) 0 0 0 1px inset;
  font-size: var(--fs-sm);
}
.sp-note strong { color: var(--sample-ink); }
.sp-soon { display: inline-block; margin-left: var(--space-2); padding: 0 var(--space-2); border-radius: var(--radius-pill); background: var(--info-soft); color: #8fc0fa; font-size: var(--fs-xs); font-weight: var(--fw-bold); vertical-align: middle; white-space: nowrap; }
.sp-table-wrap { overflow-x: auto; }
.sp-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.sp-table th, .sp-table td { text-align: left; padding: var(--space-2) var(--space-3); border-bottom: 1px solid var(--line-strong); vertical-align: top; }
.sp-table th { color: var(--muted); font-weight: var(--fw-bold); }
.sp-foot { background: var(--sidebar-bg); }
.sp-foot-inner { max-width: 880px; margin: 0 auto; padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-2); font-size: var(--fs-xs); color: var(--muted); }
.sp-foot nav { display: flex; flex-wrap: wrap; gap: 0 var(--space-4); }
.sp-foot a { color: var(--muted); display: inline-flex; align-items: center; min-height: 32px; }
.sp-foot a:hover, .sp-foot a[aria-current="page"] { color: var(--text); }
@media (max-width: 699px) {
  .sp-top-inner, .sp-main, .sp-foot-inner { padding-left: var(--space-4); padding-right: var(--space-4); }
  .sp-main { padding-top: var(--space-5); }
  .sp-article h1 { font-size: var(--fs-xl); }
  .sp-card { padding: var(--space-4); }
}
