/* ELC Dashboard — core styles
   Brand: purple #7d639b · gold #AC9D71 · ash #F0EFEB · charcoal #39393B
*/
:root {
  --purple:         #7d639b;
  --purple-dark:    #5c4a73;
  --purple-light:   #a086be;
  --purple-faint:   #ede9f4;
  --gold:           #AC9D71;
  --gold-dark:      #8a7d58;
  --gold-faint:     #f5f1e5;
  --ash:            #F0EFEB;
  --ash-2:          #E5E3DC;
  --surface:        #F7F6F2;
  --white:          #FFFFFF;
  --charcoal:       #39393B;
  --muted:          #6b6b6f;
  --muted-2:        #9a9a9d;
  --hair:           #E5E4DF;
  --hair-strong:    #D4D2CA;

  --blue:   #4D83C3;   /* Dove Centre */
  --green:  #5B8C5A;
  --orange: #C88B5C;
  --red:    #B8564A;

  /* stack tiers */
  --t-confirm-stay: #5c4a73;
  --t-new-confirm:  #8a7d58;
  --t-likely:       #9e85bd;
  --t-new-pipe:     #c5b686;
  --t-unlikely:     #d9cbe8;
  --t-decline:      #e8e4dc;

  --shadow-card: 0 1px 2px rgba(57,57,59,.04), 0 1px 1px rgba(57,57,59,.04);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: var(--ash);
  color: var(--charcoal);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
a { color: var(--purple); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─── Sign-in gate ─────────────────────────── */
.gate { position: fixed; inset: 0; background: var(--ash); z-index: 500; display: flex; align-items: center; justify-content: center; padding: 20px; }
.gate-card { width: 100%; max-width: 440px; background: var(--white); border: 1px solid var(--hair); border-radius: 14px; padding: 44px 40px 36px; text-align: center; }
.gate-logo { width: 56px; height: 56px; margin: 0 auto 22px; background: var(--purple); border-radius: 10px; color: #fff; font-weight: 800; font-size: 18px; letter-spacing: -.5px; display: flex; align-items: center; justify-content: center; }
.gate-title { font-size: 20px; font-weight: 600; margin-bottom: 6px; letter-spacing: -.2px; }
.gate-sub { color: var(--muted); font-size: 13.5px; margin-bottom: 28px; line-height: 1.55; }
.gate-field { margin-bottom: 14px; text-align: left; }
.gate-field label { display: block; font-size: 11px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.gate-field input, .gate-field select { width: 100%; padding: 11px 13px; border: 1px solid var(--hair-strong); border-radius: 8px; background: #fff; font-size: 14px; }
.gate-field input:focus, .gate-field select:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px rgba(125,99,155,.15); }
.gate-btn { width: 100%; padding: 12px; background: var(--purple); color: #fff; border: none; border-radius: 8px; font-weight: 600; font-size: 14px; margin-top: 6px; transition: background .12s; }
.gate-btn:hover { background: var(--purple-dark); }
.gate-foot { margin-top: 18px; font-size: 11.5px; color: var(--muted-2); line-height: 1.5; }
.gate-demo { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--hair-strong); font-size: 11.5px; color: var(--muted-2); }
.gate-demo b { color: var(--muted); font-weight: 600; }

/* ─── App shell ─────────────────────────────── */
.app { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.side { background: #1e1b24; color: rgba(255,255,255,.82); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand { padding: 20px 22px 18px; display: flex; gap: 12px; align-items: center; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand-logo { width: 38px; height: 38px; background: var(--purple); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: 14px; letter-spacing: -.4px; }
.brand-text h1 { font-size: 13.5px; font-weight: 600; color: #fff; letter-spacing: -.1px; }
.brand-text p { font-size: 11px; color: rgba(255,255,255,.5); margin-top: 1px; }

.side-nav { flex: 1; padding: 14px 10px; display: flex; flex-direction: column; gap: 2px; }
.nav-label { font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase; color: rgba(255,255,255,.36); padding: 14px 12px 8px; }
.nav-btn { text-align: left; background: none; border: none; color: rgba(255,255,255,.76); padding: 9px 12px; border-radius: 7px; font-size: 13px; display: flex; align-items: center; gap: 11px; transition: background .12s, color .12s; font-weight: 500; }
.nav-btn:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-btn.active { background: var(--purple); color: #fff; }
.nav-btn .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .6; }
.nav-btn.active .dot { opacity: 1; background: var(--gold); }

.side-user { padding: 14px 16px; border-top: 1px solid rgba(255,255,255,.08); display: flex; align-items: center; gap: 11px; }
.side-user .avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--gold); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; flex-shrink: 0; }
.side-user .u-name { font-size: 12.5px; font-weight: 600; color: #fff; line-height: 1.2; }
.side-user .u-role { font-size: 11px; color: rgba(255,255,255,.5); line-height: 1.3; }
.side-user .u-out { margin-left: auto; background: none; border: none; color: rgba(255,255,255,.5); font-size: 11px; }
.side-user .u-out:hover { color: #fff; }

/* ─── Main ─────────────────────────────────── */
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 18px; padding: 14px 28px; background: #fff; border-bottom: 1px solid var(--hair); position: sticky; top: 0; z-index: 30; }
.topbar .crumb { font-size: 12px; color: var(--muted); }
.topbar .crumb b { color: var(--charcoal); font-weight: 600; }
.topbar .cadence-pill { display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px; border-radius: 20px; font-size: 11.5px; font-weight: 600; letter-spacing: .2px; }
.cadence-pill.weekly { background: var(--gold-faint); color: var(--gold-dark); }
.cadence-pill.monthly { background: var(--purple-faint); color: var(--purple-dark); }
.cadence-pill::before { content:''; width:6px; height:6px; border-radius:50%; background:currentColor; }
.topbar .spacer { flex: 1; }
.topbar .tb-meta { font-size: 12px; color: var(--muted); }
.topbar .tb-actions { display: flex; gap: 8px; }

.btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 7px; border: 1px solid var(--hair-strong); background: #fff; font-size: 12.5px; font-weight: 500; transition: background .12s, border-color .12s; }
.btn:hover { background: var(--ash); }
.btn.primary { background: var(--purple); color: #fff; border-color: var(--purple); }
.btn.primary:hover { background: var(--purple-dark); border-color: var(--purple-dark); }
.btn.gold { background: var(--gold); color: #fff; border-color: var(--gold); }
.btn.gold:hover { background: var(--gold-dark); border-color: var(--gold-dark); }
.btn.ghost { background: transparent; }
.btn.sm { padding: 5px 10px; font-size: 11.5px; }

.view { padding: 26px 28px 60px; max-width: 1400px; width: 100%; }
.view-hd { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; flex-wrap: wrap; }
.view-hd h2 { font-size: 22px; font-weight: 600; letter-spacing: -.4px; }
.view-hd p { color: var(--muted); font-size: 13px; margin-top: 4px; max-width: 640px; }
.view-hd .scope-tag { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 10px; font-size: 10.5px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase; background: var(--gold-faint); color: var(--gold-dark); vertical-align: middle; }

/* ─── Cards ────────────────────────────────── */
.card { background: #fff; border: 1px solid var(--hair); border-radius: 12px; padding: 20px; box-shadow: var(--shadow-card); }
.card > h3 { font-size: 14px; font-weight: 600; margin-bottom: 4px; letter-spacing: -.1px; }
.card > .sub { color: var(--muted); font-size: 12px; margin-bottom: 16px; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; gap: 14px; }
.card-head h3 { font-size: 14px; font-weight: 600; }
.card-head .sub { color: var(--muted); font-size: 12px; margin-top: 2px; }

.grid { display: grid; gap: 16px; }
.grid.c4 { grid-template-columns: repeat(4, 1fr); }
.grid.c3 { grid-template-columns: repeat(3, 1fr); }
.grid.c2 { grid-template-columns: repeat(2, 1fr); }
.grid.cs-2-1 { grid-template-columns: 2fr 1fr; }
.grid.cs-1-2 { grid-template-columns: 1fr 2fr; }

/* ─── KPI tiles ─────────────────────────────── */
.kpi { background: #fff; border: 1px solid var(--hair); border-radius: 12px; padding: 18px 20px; position: relative; overflow: hidden; }
.kpi .lbl { font-size: 10.5px; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.kpi .val { font-size: 30px; font-weight: 600; letter-spacing: -1px; margin-top: 8px; line-height: 1.05; }
.kpi .val .unit { font-size: 14px; color: var(--muted); font-weight: 500; margin-left: 4px; }
.kpi .foot { margin-top: 10px; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.kpi .delta { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; font-size: 11.5px; padding: 2px 7px; border-radius: 4px; }
.delta.pos { background: #e8f0e7; color: #3f6e3e; }
.delta.neg { background: #f7ddd8; color: #8a3830; }
.delta.neu { background: var(--ash); color: var(--muted); }
.kpi .bar { margin-top: 12px; height: 5px; background: var(--ash-2); border-radius: 3px; overflow: hidden; }
.kpi .bar > span { display: block; height: 100%; background: var(--purple); border-radius: 3px; }
.kpi.accent-gold .bar > span { background: var(--gold); }
.kpi.accent-blue .bar > span { background: var(--blue); }
.kpi .spark { margin-top: 10px; display: block; width: 100%; height: 34px; }
.kpi.pressure::after { content:''; position: absolute; top: 0; right: 0; width: 4px; height: 100%; background: var(--red); }

/* ─── Chips / pills ─────────────────────────── */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 20px; font-size: 11px; font-weight: 600; letter-spacing: .2px; background: var(--ash); color: var(--muted); }
.chip.purple { background: var(--purple-faint); color: var(--purple-dark); }
.chip.gold   { background: var(--gold-faint);   color: var(--gold-dark); }
.chip.blue   { background: #e4efef;             color: #2f6075; }
.chip.green  { background: #e6eee4;             color: #3f6e3e; }
.chip.red    { background: #f7ddd8;             color: #8a3830; }
.chip.orange { background: #f6e1cf;             color: #8a4b22; }

/* ─── Narrative ─────────────────────────────── */
.narr { background: #fff; border: 1px solid var(--hair); border-radius: 12px; padding: 20px 22px; display: flex; flex-direction: column; }
.narr-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.narr-who { display: flex; gap: 10px; align-items: center; }
.narr-who .avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--purple); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; flex-shrink: 0; }
.narr-who .avatar.gold { background: var(--gold); }
.narr-who .avatar.blue { background: var(--blue); }
.narr-who .n { font-size: 13px; font-weight: 600; }
.narr-who .r { font-size: 11.5px; color: var(--muted); }
.narr-text { font-size: 13px; line-height: 1.65; color: var(--charcoal); }
.narr-text textarea { width: 100%; border: 1px solid var(--hair); border-radius: 8px; padding: 12px; font-size: 13px; line-height: 1.65; min-height: 180px; resize: vertical; }
.narr-text textarea:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px rgba(125,99,155,.12); }
.narr-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; font-size: 11.5px; color: var(--muted-2); gap: 10px; }
.narr-foot .count { font-variant-numeric: tabular-nums; }
.narr-foot .count.over { color: var(--orange); }

/* ─── Tables ─────────────────────────────────── */
table.dt { width: 100%; border-collapse: collapse; font-size: 13px; }
.dt th { text-align: left; font-size: 10.5px; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--hair); background: var(--surface); }
.dt td { padding: 11px 12px; border-bottom: 1px solid var(--hair); vertical-align: middle; }
.dt tbody tr:last-child td { border-bottom: none; }
.dt .num { text-align: right; font-variant-numeric: tabular-nums; }
.dt .muted { color: var(--muted); }
.mini-bar { display: inline-block; height: 6px; background: var(--ash-2); border-radius: 3px; overflow: hidden; width: 70px; vertical-align: middle; }
.mini-bar > span { display: block; height: 100%; background: var(--purple); }

/* ─── Legend ─────────────────────────────────── */
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); }
.legend .sw { display: inline-flex; align-items: center; gap: 6px; }
.legend .sw::before { content:''; width: 10px; height: 10px; border-radius: 2px; background: currentColor; }
.legend .sw.stay::before     { background: var(--t-confirm-stay); }
.legend .sw.newc::before     { background: var(--t-new-confirm); }
.legend .sw.likely::before   { background: var(--t-likely); }
.legend .sw.newp::before     { background: var(--t-new-pipe); }
.legend .sw.unlikely::before { background: var(--t-unlikely); }
.legend .sw.decline::before  { background: var(--t-decline); }
.legend .sw.cs::before       { background: var(--purple); }
.legend .sw.pe::before       { background: var(--gold); }
.legend .sw.dc::before       { background: var(--blue); }
.legend .sw.y2324::before    { background: var(--hair-strong); }
.legend .sw.y2425::before    { background: var(--purple-light); }
.legend .sw.y2526::before    { background: var(--purple); }
.legend .sw.forced::before   { background: var(--charcoal); }
.legend .sw.unforced::before { background: var(--red); }

/* ─── Priorities ─────────────────────────────── */
.pri-card { background: var(--surface); border: 1px solid var(--hair); border-radius: 10px; padding: 14px 16px; display: flex; gap: 14px; align-items: flex-start; }
.pri-card .n { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; color: #fff; font-size: 12.5px; flex-shrink: 0; }
.pri-card.urgent .n { background: var(--red); }
.pri-card.high .n { background: var(--orange); }
.pri-card.steady .n { background: var(--green); }
.pri-card .body { flex: 1; min-width: 0; }
.pri-card h4 { font-size: 13.5px; font-weight: 600; margin-bottom: 2px; display: flex; gap: 8px; align-items: center; }
.pri-card .tgt { font-size: 11.5px; font-weight: 600; padding: 2px 7px; border-radius: 4px; background: #fff; border: 1px solid var(--hair); color: var(--muted); }
.pri-card p { font-size: 12.5px; color: var(--muted); line-height: 1.5; }

/* ─── Priority urgency variants (background accents) ─────── */
.pri-card.urgent { background: #fbeeea; border-color: #f3d1c8; }
.pri-card.urgent .tgt { background: #fff; color: var(--red); border-color: #f3d1c8; }
.pri-card.high { background: #f9ecdc; border-color: #efd8bb; }
.pri-card.steady { background: #eaf1e9; border-color: #cde0cb; }

/* ─── Funnel ─────────────────────────────────── */
.funnel { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; align-items: stretch; position: relative; }
.fun-stage { padding: 18px 18px; background: var(--surface); border: 1px solid var(--hair); border-right: none; position: relative; }
.fun-stage:first-child { border-radius: 10px 0 0 10px; }
.fun-stage:last-child { border-radius: 0 10px 10px 0; border-right: 1px solid var(--hair); }
.fun-stage .lbl { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .6px; }
.fun-stage .v { font-size: 28px; font-weight: 600; letter-spacing: -.8px; margin-top: 6px; line-height: 1; }
.fun-stage .d { margin-top: 6px; font-size: 11.5px; }
.fun-arrow { position: absolute; right: -9px; top: 50%; transform: translateY(-50%); z-index: 2; width: 18px; height: 18px; background: var(--purple); color: #fff; border-radius: 50%; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; border: 2px solid #fff; }
.conv-row { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 10px; }
.conv-row .cv { text-align: center; font-size: 11.5px; color: var(--muted); padding: 0 8px; }
.conv-row .cv b { display: block; font-size: 15px; color: var(--purple); font-weight: 600; margin-bottom: 2px; letter-spacing: -.2px; }
.conv-row .cv.overall b { color: var(--gold); }

/* ─── Year-level forecast stack ──────────────── */
.fcst-row { display: grid; grid-template-columns: 52px 1fr 56px; align-items: center; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--hair); }
.fcst-row:last-child { border-bottom: none; }
.fcst-row .yr { font-weight: 600; font-size: 13px; }
.fcst-row .total { text-align: right; font-variant-numeric: tabular-nums; font-size: 12.5px; color: var(--muted); }
.fcst-row .total b { color: var(--charcoal); font-weight: 600; margin-right: 3px; font-size: 14px; }
.fcst-bar { display: flex; height: 22px; border-radius: 3px; overflow: hidden; background: var(--ash-2); }
.fcst-seg { height: 100%; min-width: 0; transition: opacity .12s; position: relative; }
.fcst-seg:hover { opacity: .82; }
.fcst-seg.stay     { background: var(--t-confirm-stay); }
.fcst-seg.newc     { background: var(--t-new-confirm); }
.fcst-seg.likely   { background: var(--t-likely); }
.fcst-seg.newp     { background: var(--t-new-pipe); }
.fcst-seg.unlikely { background: var(--t-unlikely); }
.fcst-seg.decline  { background: var(--t-decline); }

/* ─── Scenario range ─────────────────────────── */
.scen-wrap { background: var(--surface); border: 1px solid var(--hair); border-radius: 12px; padding: 22px 26px; }
.scen-axis { position: relative; height: 74px; margin: 14px 20px 6px; }
.scen-track { position: absolute; top: 30px; left: 0; right: 0; height: 10px; background: linear-gradient(90deg, #f3d1c8 0%, #f5eacc 50%, #cde0cb 100%); border-radius: 5px; }
.scen-mark { position: absolute; top: 10px; width: 2px; height: 40px; }
.scen-mark::after { content: attr(data-label); position: absolute; top: -22px; left: 50%; transform: translateX(-50%); font-size: 11px; white-space: nowrap; color: var(--muted); font-weight: 600; }
.scen-mark .v { position: absolute; top: 46px; left: 50%; transform: translateX(-50%); font-size: 14px; font-weight: 600; white-space: nowrap; }
.scen-mark.worst   { background: var(--red); }
.scen-mark.likely  { background: var(--gold); }
.scen-mark.best    { background: var(--green); }
.scen-mark.current { background: var(--purple); width: 3px; }
.scen-mark.current::after { color: var(--purple); font-weight: 700; }
.scen-mark.current .v { color: var(--purple); }

/* ─── Charts ─────────────────────────────────── */
.chart { width: 100%; display: block; }

/* ─── Destinations ───────────────────────────── */
.dest-row { display: grid; grid-template-columns: 110px 1fr 110px; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--hair); }
.dest-row:last-child { border-bottom: none; }
.dest-row .name { font-weight: 600; font-size: 13px; }
.dest-row .bars { display: flex; flex-direction: column; gap: 5px; }
.dest-row .b { display: grid; grid-template-columns: 40px 1fr; font-size: 10.5px; color: var(--muted); align-items: center; gap: 6px; }
.dest-row .b-track { background: var(--ash-2); border-radius: 2px; height: 8px; position: relative; overflow: hidden; }
.dest-row .b-fill-app { height: 100%; background: var(--purple-light); }
.dest-row .b-fill-acc { height: 100%; background: var(--purple); position: absolute; top: 0; left: 0; }
.dest-row .b-fill-acc.gold { background: var(--gold); }
.dest-row .b-fill-app.gold { background: #d4c5a2; }
.dest-row .b-fill-app.grey { background: var(--hair-strong); }
.dest-row .b-fill-acc.grey { background: var(--muted-2); }
.dest-row .totals { font-size: 11px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.dest-row .totals b { color: var(--charcoal); font-weight: 600; font-size: 14px; }

.nist-break { background: var(--purple-faint); border-radius: 8px; padding: 10px 14px; margin-top: 4px; font-size: 12px; color: var(--purple-dark); display: flex; gap: 16px; flex-wrap: wrap; }
.nist-break b { font-weight: 700; }

/* ─── Callouts ───────────────────────────────── */
.callout { background: var(--purple-faint); border-left: 3px solid var(--purple); padding: 12px 16px; border-radius: 6px; font-size: 12.5px; color: var(--purple-dark); line-height: 1.5; }
.callout.gold { background: var(--gold-faint); border-left-color: var(--gold); color: var(--gold-dark); }
.callout.red { background: #fbeeea; border-left-color: var(--red); color: #8a3830; }
.callout.neutral { background: var(--surface); border-left-color: var(--hair-strong); color: var(--muted); }

/* ─── Delta mini ─────────────────────────────── */
.d-mini { font-size: 11.5px; font-weight: 600; padding: 2px 6px; border-radius: 3px; display: inline-block; }
.d-mini.pos { background: #e8f0e7; color: #3f6e3e; }
.d-mini.neg { background: #f7ddd8; color: #8a3830; }
.d-mini.neu { background: var(--ash); color: var(--muted); }

/* ─── Entry banner (data-entry mode) ─────────── */
.entry-banner { background: linear-gradient(180deg, var(--gold-faint), #fff); border: 1px solid #e0d4b0; border-radius: 12px; padding: 16px 20px; margin-bottom: 22px; display: flex; gap: 16px; align-items: center; }
.entry-banner .i { width: 34px; height: 34px; border-radius: 8px; background: var(--gold); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; }
.entry-banner .t h4 { font-size: 13.5px; font-weight: 600; margin-bottom: 2px; }
.entry-banner .t p { font-size: 12px; color: var(--muted); }
.entry-banner .actions { margin-left: auto; display: flex; gap: 8px; }

/* ─── Compact KPI sparkline path ─────────────── */
.spark path.line { fill: none; stroke: var(--purple); stroke-width: 1.5; }
.spark path.area { fill: rgba(125,99,155,.12); stroke: none; }
.spark.gold path.line { stroke: var(--gold); }
.spark.gold path.area { fill: rgba(172,157,113,.15); }

/* ─── 100% stacked ──────────────────────────── */
.pct-row { display: grid; grid-template-columns: 80px 1fr 1fr; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--hair); }
.pct-row:last-child { border-bottom: none; }
.pct-row .nm { font-weight: 600; font-size: 13px; }
.pct-bar { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted); }
.pct-bar .track { flex: 1; height: 10px; background: var(--ash-2); border-radius: 3px; overflow: hidden; }
.pct-bar .track span { display: block; height: 100%; }
.pct-bar.leads .track span { background: var(--purple-light); }
.pct-bar.enrol .track span { background: var(--gold); }
.pct-bar b { font-weight: 600; color: var(--charcoal); min-width: 36px; text-align: right; font-variant-numeric: tabular-nums; }

/* ─── Section heading ───────────────────────── */
.sec-hd { display: flex; align-items: baseline; justify-content: space-between; margin: 24px 0 12px; gap: 12px; }
.sec-hd h3 { font-size: 15px; font-weight: 600; letter-spacing: -.2px; }
.sec-hd .sub { font-size: 12px; color: var(--muted); }
.sec-hd .tag { font-size: 10px; letter-spacing: .8px; text-transform: uppercase; color: var(--gold-dark); background: var(--gold-faint); padding: 2px 8px; border-radius: 10px; font-weight: 600; }

/* ─── Tweaks panel ──────────────────────────── */
.tweaks { position: fixed; bottom: 20px; right: 20px; width: 280px; background: #fff; border: 1px solid var(--hair); border-radius: 12px; padding: 14px 16px; box-shadow: 0 8px 24px rgba(0,0,0,.12); z-index: 100; display: none; }
.tweaks.open { display: block; }
.tweaks h4 { font-size: 12px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.tweak-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; gap: 10px; font-size: 12.5px; }
.tweak-row select, .tweak-row input { padding: 4px 8px; border: 1px solid var(--hair-strong); border-radius: 5px; font-size: 12px; background: #fff; }
.tweak-row .swatches { display: flex; gap: 6px; }
.tweak-row .sw { width: 22px; height: 22px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; }
.tweak-row .sw.active { border-color: var(--charcoal); }

/* ─── Board snapshot ────────────────────────── */
.snap { background: #fff; border: 1px solid var(--hair); border-radius: 12px; padding: 36px 40px; max-width: 860px; margin: 0 auto; }
.snap-hd { display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 2px solid var(--charcoal); padding-bottom: 16px; margin-bottom: 24px; }
.snap-hd h2 { font-size: 24px; font-weight: 600; letter-spacing: -.5px; }
.snap-hd .sub { color: var(--muted); font-size: 13px; margin-top: 4px; }
.snap-hd .logo { width: 56px; height: 56px; background: var(--purple); border-radius: 8px; color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.snap-sec { margin-bottom: 26px; }
.snap-sec h3 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--purple); margin-bottom: 10px; border-bottom: 1px solid var(--hair); padding-bottom: 6px; }
.snap-foot { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--hair); font-size: 11px; color: var(--muted); display: flex; justify-content: space-between; }

/* ─── Toast ─────────────────────────────────── */
.toast { position: fixed; bottom: 22px; left: 50%; transform: translate(-50%, 70px); background: var(--charcoal); color: #fff; padding: 10px 18px; border-radius: 8px; font-size: 13px; z-index: 999; opacity: 0; transition: all .25s; box-shadow: 0 6px 18px rgba(0,0,0,.2); pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ─── Tooltip ───────────────────────────────── */
[data-tt] { position: relative; }
[data-tt]:hover::after { content: attr(data-tt); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: var(--charcoal); color: #fff; padding: 5px 9px; border-radius: 5px; font-size: 11.5px; white-space: nowrap; z-index: 10; font-weight: 500; }

/* ─── Responsive ─────────────────────────────── */
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; overflow-x: auto; }
  .side-nav { flex-direction: row; padding: 10px; gap: 4px; }
  .nav-label, .side-user { display: none; }
  .brand { border-bottom: none; border-right: 1px solid rgba(255,255,255,.08); padding: 14px 16px; }
  .grid.c4 { grid-template-columns: repeat(2, 1fr); }
  .grid.c3, .grid.c2, .grid.cs-2-1, .grid.cs-1-2 { grid-template-columns: 1fr; }
  .view { padding: 18px 16px; }
  .topbar { padding: 12px 16px; flex-wrap: wrap; }
}
@media (max-width: 600px) {
  .grid.c4 { grid-template-columns: 1fr; }
  .funnel { grid-template-columns: 1fr; }
  .fun-stage { border-right: 1px solid var(--hair); border-bottom: none; }
  .fun-arrow { display: none; }
}

/* ─── Print (Board Snapshot) ─────────────────── */
@media print {
  body { background: #fff; }
  .side, .topbar, .tweaks, .toast, .btn, .entry-banner { display: none !important; }
  .app { grid-template-columns: 1fr; }
  .view { padding: 0; max-width: 100%; }
  .snap { border: none; box-shadow: none; padding: 0; max-width: 100%; }
  .card { break-inside: avoid; border: 1px solid #ddd; box-shadow: none; }
  @page { size: A4 portrait; margin: 14mm; }
}
