/* demo.css — public sample dashboard (/demo). The component rules below the marker are copied VERBATIM
   from thryvest-dashboard.html so the demo reuses the exact visual system (no divergent styling); this
   file only adds the public-page chrome (banner, centered layout, the two interactive sliders). Loaded
   AFTER /css/tokens.css. */
*, *::before, *::after { box-sizing: border-box; }
body { font-family: var(--ff-sans); background: var(--cream); color: var(--charcoal); margin: 0; }

/* Sample-data banner — sticky, unmissable: it must be impossible to mistake the demo for real data. */
.demo-banner { position: sticky; top: 0; z-index: 200; background: var(--terracotta); color: #fff;
  display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap;
  padding: 10px 20px; font-size: 13px; line-height: 1.4; font-weight: 600; text-align: center; }
.demo-banner strong { font-weight: 700; }
.demo-banner-cta { background: rgba(255,255,255,0.18); color: #fff; text-decoration: none;
  padding: 5px 14px; border-radius: 999px; font-weight: 700; white-space: nowrap; transition: background .15s ease; }
.demo-banner-cta:hover { background: rgba(255,255,255,0.30); }

.demo-wrap { max-width: 1080px; margin: 0 auto; padding: 28px 24px 88px; }
.demo-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.demo-greeting { font-family: var(--ff-serif); font-size: var(--fs-page-title); font-weight: 700; color: var(--forest); }
.demo-greeting em { font-style: italic; color: var(--terracotta); }
.demo-sub { font-size: 14px; color: var(--mid-gray); margin-top: 4px; }
.demo-cta { background: var(--terracotta); color: #fff; text-decoration: none; border-radius: 999px;
  font-family: var(--ff-sans); font-size: 15px; font-weight: 600; padding: 12px 24px; transition: all .2s ease; white-space: nowrap; }
.demo-cta:hover { background: var(--terracotta-dark); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(168,90,56,0.35); }
.demo-final { text-align: center; margin-top: 28px; padding: 32px 20px; background: #fff; border: 1px solid var(--sand); border-radius: 20px; }
.demo-final-title { font-family: var(--ff-serif); font-size: 22px; font-weight: 700; color: var(--forest); margin-bottom: 8px; }
.demo-final-sub { font-size: 14px; color: var(--mid-gray); margin-bottom: 20px; }

/* Interactive sliders (demo-only) — each computes exactly ONE output; they never touch score/net worth/moves. */
.demo-sims { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-bottom: 20px; }
.demo-sim { background: #fff; border: 1px solid var(--sand); border-radius: 16px; padding: 20px 22px; }
.demo-sim-title { font-family: var(--ff-serif); font-size: 16px; font-weight: 700; color: var(--forest); margin-bottom: 2px; }
.demo-sim-note { font-size: 12px; color: var(--mid-gray); margin-bottom: 16px; }
.demo-sim-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.demo-sim-lab { font-size: 11px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; color: var(--light-gray); }
.demo-sim-inputval { font-size: 15px; font-weight: 700; color: var(--forest); }
.demo-sim input[type=range] { width: 100%; accent-color: var(--forest); margin: 8px 0 16px; cursor: pointer; }
.demo-sim-out { border-top: 1px solid var(--sand); padding-top: 14px; font-size: 14px; color: var(--charcoal); }
.demo-sim-big { font-family: var(--ff-serif); font-size: 30px; font-weight: 700; color: var(--forest); line-height: 1; }
.demo-sim-rate { font-size: 12px; color: var(--mid-gray); margin-top: 6px; }

/* ===================== copied VERBATIM from thryvest-dashboard.html (exact reuse) ===================== */
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
  /* ===== Reusable labeled-hairline section divider — copied verbatim from thryvest-savings.html (shared pattern) ===== */
  .sv-divider { display: flex; align-items: center; gap: 14px; margin: 22px 0 14px; }
  .sv-divider:first-of-type { margin-top: 0; }
  .sv-divider-label { font-size: 11px; font-weight: 500; letter-spacing: 1.3px; text-transform: uppercase; color: var(--forest); white-space: nowrap; }
  .sv-divider-rule { flex: 1; height: 1px; background: var(--sand); }
  .score-hero-verdict {
    font-family: var(--ff-serif);
    font-size: 20px; line-height: 1.4; font-weight: var(--fw-semibold);
    color: var(--forest); margin: 2px 0 16px;
  }
  .score-hero-forecast {
    font-family: var(--ff-serif);
    font-size: 15px; line-height: 1.5; font-weight: var(--fw-regular);
    color: var(--charcoal);
    margin: 14px 0 18px;
    padding: 10px 0 10px 14px;
    border-left: 3px solid var(--terracotta);
  }
  .score-hero-forecast .forecast-eyebrow {
    display: block;
    font-family: var(--ff-sans, var(--ff-serif));
    font-size: 11px; font-weight: var(--fw-semibold);
    letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--terracotta);
    margin-bottom: 4px;
  }
  /* Removed dead pre-donut score layout (.score-hero-main / -number / -denom): the score now renders in
     the donut (.sn-donut-num); these classes had zero references in any markup or JS template. */
  .score-components { flex: 1; min-width: 280px; display: flex; flex-direction: column; gap: 12px; }
  .score-comp-head { display: flex; align-items: center; gap: 8px; font-size: 14px; margin-bottom: 5px; }
  .score-comp-label { flex: 1; font-weight: 600; }
  .score-comp-value { opacity: .85; font-variant-numeric: tabular-nums; }
  .score-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; display: inline-block; }
  .score-dot.green { background: var(--mint); }
  .score-dot.amber { background: var(--amber); }
  .score-dot.red   { background: var(--terracotta); }
  .sn-cards { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
  .sn-card {
    flex: 1 1 0; min-width: 240px;
    background: var(--forest); color: #FFFFFF;
    border-radius: 16px; padding: 22px 24px;
    display: flex; align-items: stretch; gap: 12px;
  }
  /* The whole Net Worth card is clickable → same hover lift as the stat cards. SAME green as Score. */
  .sn-card-nw { cursor: pointer; transition: transform .18s ease, box-shadow .18s ease; }
  .sn-card-nw:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(45,74,62,0.16); }
  .sn-card-nw:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; }
  /* Score card gets the SAME cosmetic lift as Net Worth (its inner rows are already clickable). */
  .sn-card-score { cursor: pointer; transition: transform .18s ease, box-shadow .18s ease; }
  .sn-card-score:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(45,74,62,0.16); }
  .sn-card-score:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; }
  .sn-card-left { flex: 0 0 124px; align-self: center; display: flex; align-items: center; justify-content: center; }
  .sn-card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
  /* Eyebrow = the stat-label treatment (matches "SPENT THIS MONTH"). */
  .sn-card-title { font-size: 11px; font-weight: 500; letter-spacing: .5px; text-transform: uppercase; color: rgba(255,255,255,0.55); margin-bottom: 12px; }
  .sn-donut { width: 124px; height: 124px; display: block; }
  /* Headline number = the .stat-value treatment: white, Lora, 700. */
  .sn-donut-num { fill: #FFFFFF; font-family: var(--ff-serif); font-size: 24px; font-weight: 700; text-anchor: middle; }
  .sn-donut-sub { fill: #FFFFFF; opacity: .55; font-size: 10px; font-weight: 600; text-anchor: middle; letter-spacing: .4px; }
  /* Tabular figures: one utility so every currency value, score, and numeric stat has fixed-width
     digits that align in columns. Applied to the numeric display classes in a single rule (not
     scattered inline); .tnum opts any other numeric span in. Pure glyph-metrics — no layout/value change. */
  .tnum,
  .sn-donut-num, .sn-donut-sub, .sn-legend-val, .stat-value, .stat-change,
  .score-comp-val, .activity-amount, .sn-footer-pts, .tv-modal-value {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
  }
  /* Legend rows: IDENTICAL geometry + type on both cards; only the score rows light up on hover. */
  .sn-legend { display: flex; flex-direction: column; gap: 4px; }
  .sn-legend-row { display: flex; align-items: center; gap: 9px; font-size: 13px; padding: 3px 8px; margin: 0 -8px; border-radius: 8px; }
  .sn-legend-label { flex: 1; font-weight: 600; color: #FFFFFF; }
  .sn-legend-val { color: rgba(255,255,255,0.78); font-variant-numeric: tabular-nums; }
  .sn-legend-clickable { cursor: pointer; transition: background .15s ease; }
  .sn-legend-clickable:hover, .sn-legend-clickable:focus-visible { background: rgba(255,255,255,0.08); outline: none; }
  /* Donut/center is its own button → the card's overview modal (matches both cards). */
  .sn-card-left[role="button"] { cursor: pointer; border-radius: 12px; transition: background .15s ease; }
  .sn-card-left[role="button"]:hover { background: rgba(255,255,255,0.06); }
  .sn-card-left[role="button"]:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; }
  /* Nav hint (↗): this line navigates to another page rather than opening a modal. */
  .sn-nav-hint { font-size: 11px; color: rgba(255,255,255,0.6); font-weight: 700; }
  /* Inline clickable in the footer (e.g. "Home equity $230K") — pairs with .sn-legend-clickable. */
  .sn-footer-link { cursor: pointer; border-radius: 6px; padding: 1px 5px; margin: 0 -3px; transition: background .15s ease; }
  .sn-swatch { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
  .sn-swatch-debt { background: transparent; border: 1.5px solid rgba(255,255,255,0.5); }
  .sn-nw-loading { color: rgba(255,255,255,0.6); font-size: 13px; padding: 8px 0; }
  /* Footer rows (folded-in score nudge + net-worth readout): identical type + divider on both. */
  .sn-footer { margin-top: auto; padding-top: 11px; border-top: 1px solid rgba(255,255,255,0.16); font-size: 12.5px; font-weight: 600; line-height: 1.35; color: rgba(255,255,255,0.82); }
  .sn-footer-pts { color: var(--mint); font-weight: var(--fw-bold); }
  .sn-footer-clickable { cursor: pointer; transition: color .15s ease; }
  .sn-footer-clickable:hover, .sn-footer-clickable:focus-visible { color: #FFFFFF; outline: none; }
  .sn-footer-static { color: rgba(255,255,255,0.5); font-weight: 500; }
  @media (max-width: 600px) {
    .sn-cards { flex-direction: column; }
  }
  .moves-section { margin-bottom: 20px; animation: fadeUp 0.4s 0.12s ease forwards; opacity: 0; }
  .moves-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 16px;
    align-items: stretch;
  }
  .move-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: white;
    border: 1px solid rgba(45,74,62,0.14);
    border-left: 3px solid rgba(45,74,62,0.18);   /* brand-colored spine, set by role below */
    border-radius: 16px;
    padding: 18px 18px 16px;
    box-shadow: 0 8px 22px rgba(45,74,62,0.10);
    cursor: pointer;
    transition: transform 0.18s, box-shadow 0.18s;
  }
  .move-card:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(45,74,62,0.16); }
  .move-card.alert { background: #FEF6F1; border-color: rgba(196,113,74,0.30); }
  .move-card.celebration { background: var(--green-light); border-color: var(--green-mid); }
  /* brand-palette left spine, matched to the role color-coding on the icon + label */
  .move-card.cat-action   { border-left-color: var(--terracotta); }
  .move-card.cat-positive { border-left-color: var(--green-accent); }
  .move-card.cat-muted    { border-left-color: rgba(45,74,62,0.20); }
  /* the top move = the priority action: forest spine + tint + lift, clearly the lead (defined last so it wins) */
  .move-card.primary { border-left-width: 4px; border-left-color: var(--forest); background: linear-gradient(135deg, rgba(45,74,62,0.055), rgba(45,74,62,0.015)); box-shadow: 0 12px 30px rgba(45,74,62,0.16); }
  .move-card.primary:hover { box-shadow: 0 18px 40px rgba(45,74,62,0.20); }
  /* "On the horizon" card — fills slot 2 when there's a single move; a calm forecast peek, not an action. */
  .horizon-card { display: flex; flex-direction: column; cursor: default; }
  .horizon-card:hover { transform: none; box-shadow: 0 8px 22px rgba(45,74,62,0.10); }
  .horizon-eyebrow { font-family: var(--ff-sans, var(--ff-serif)); font-size: 11px; font-weight: var(--fw-semibold); letter-spacing: 0.08em; text-transform: uppercase; color: var(--terracotta); margin-bottom: 2px; }
  .horizon-sub { font-size: 13px; color: var(--mid-gray, #6b6b6b); margin-bottom: 12px; }
  .horizon-row { display: flex; align-items: baseline; gap: 10px; padding: 7px 0; border-bottom: 1px solid rgba(45,74,62,0.08); }
  .horizon-row:last-child { border-bottom: none; }
  .horizon-date { font-size: 13px; color: var(--mid-gray, #6b6b6b); min-width: 48px; }
  .horizon-label { font-size: 14px; color: var(--charcoal); flex: 1; }
  .horizon-amt { font-size: 14px; font-weight: var(--fw-semibold); font-variant-numeric: tabular-nums; }
  .horizon-amt-in { color: var(--forest); }
  .horizon-amt-out { color: var(--charcoal); }
  .horizon-amt-neutral { color: var(--mid-gray, #6b6b6b); }
  /* (.horizon-card inherits .move-card's 18px 18px 16px padding — kept consistent, no override.) */
  .horizon-row-clickable { cursor: pointer; margin: 0 -8px; padding-left: 8px; padding-right: 8px; border-radius: 6px; transition: background .15s ease; }
  .horizon-row-clickable:hover { background: rgba(45,74,62,0.05); }
  .horizon-row-clickable:focus-visible { outline: 2px solid var(--mint); outline-offset: -2px; }
  .tv-horizon-explainer { font-size: 14px; line-height: 1.5; color: var(--charcoal); background: rgba(196,113,74,0.08); border-left: 3px solid var(--terracotta); padding: 12px 14px; border-radius: 8px; margin-bottom: 16px; }

  .move-card-cat { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
  .move-card-cat-icon { display: flex; width: 32px; height: 32px; border-radius: 9px; background: var(--cream); align-items: center; justify-content: center; flex-shrink: 0; color: var(--forest); }
  .move-card-cat-icon svg { width: 18px; height: 18px; }
  /* Brand-palette color-coding by role: terracotta = action item, green = positive, muted = FYI */
  .move-card-cat-icon.cat-action   { color: var(--terracotta);   background: rgba(196,113,74,0.12); }
  .move-card-cat-icon.cat-positive { color: var(--green-accent); background: rgba(74,140,111,0.14); }
  .move-card-cat-icon.cat-muted    { color: var(--mid-gray);     background: rgba(106,106,106,0.10); }
  .move-card-cat-label { font-size: 11px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; color: var(--mid-gray); }
  .move-card-cat-label.cat-action   { color: var(--terracotta); }
  .move-card-cat-label.cat-positive { color: var(--green-accent); }
  .move-card-cat-label.cat-muted    { color: var(--mid-gray); }
  .move-card-rank { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--forest); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: 0.3px; flex-shrink: 0; }
  .move-card.primary .move-card-rank { background: var(--terracotta); }

  .move-card-title { font-family: var(--ff-serif); font-size: 16px; font-weight: 700; color: var(--forest); line-height: 1.3; margin-bottom: 6px; }
  .move-card-support { font-size: 13px; color: var(--charcoal); line-height: 1.5; margin-bottom: 14px; }
  .move-card-support strong { color: var(--forest); font-weight: 700; }
  .move-card-foot { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
  .move-card-foot .rec-score-note { margin-top: 0; }
  .move-card-foot .rec-action-btn { margin-top: 0; }
  /* button tones per card type (mirrors the old .rec-item scoping) */
  .move-card.alert .rec-action-btn { background: var(--terracotta); }
  .move-card.alert .rec-action-btn:hover { background: #a85a38; }
  .move-card.alert .rec-action-btn.outline { background: transparent; color: var(--terracotta); border-color: var(--terracotta); }
  .move-card.celebration .rec-action-btn { background: var(--green-accent); }
  .move-card.celebration .rec-action-btn.outline { background: transparent; color: var(--green-accent); border-color: var(--green-accent); }
  .rec-action-btn { display: inline-block; margin-top: 10px; padding: 7px 14px; border-radius: 8px; background: var(--forest); color: white; font-family: 'DM Sans', sans-serif; font-size: 12px; font-weight: 600; text-decoration: none; transition: background 0.15s; border: none; cursor: pointer; }
  .rec-action-btn:hover { background: var(--forest-light); }
  .rec-item.celebration .rec-action-btn { background: var(--green-accent); }
