/* Commuter Pulse 2026 — demo dashboard styles */
:root {
  --ink: #0B1A2B;
  --ink-2: #0F2236;
  --ink-3: #16304A;
  --bg: #F4F6F9;
  --card: #FFFFFF;
  --text: #0B1A2B;
  --text-2: #4A5B6E;
  --text-3: #7F8DA0;
  --text-d: #EEF3F8;
  --text-d2: #A9B8C8;
  --text-d3: #73869B;
  --line: rgba(11, 26, 43, .09);
  --line-2: rgba(11, 26, 43, .18);
  --line-d: rgba(255, 255, 255, .09);
  --line-d2: rgba(255, 255, 255, .18);

  --accent: #00A88F;
  --accent-2: #F5A524;
  --accent-ink: #00806D;      /* accent dark enough for text on white */

  /* Diverging chart roles (validated: light vs #FFF, dark vs #0F2236) */
  --pos: #0F9D8A;  --neu: #D5DCE4;  --neg: #E5534B;
  --pos-d: #12A08B; --neu-d: #3B4D62; --neg-d: #EE6359;
  --cmp: #D9861A;  /* "All commuters" comparison series */

  --sans: 'Poppins', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --serif: var(--sans);   /* single typeface: Poppins everywhere */
  --r: 18px;
  /* selection highlight: dark yellow */
  --sel: #B8860B; --sel-fill: #F2D06B; --sel-ink: #7A5A06;
  --shadow: 0 1px 2px rgba(11,26,43,.04), 0 8px 28px -12px rgba(11,26,43,.14);
  --maxw: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 70px; }
body {
  margin: 0; font-family: var(--sans); color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; font-feature-settings: "tnum" 1, "cv11" 1;
}
button, select, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* ---------------- Nav ---------------- */
.nav {
  --navp: 0;
  position: fixed; inset: 0 0 auto 0; z-index: 60; height: 72px;
  display: flex; align-items: center; gap: 22px; padding: 0 32px;
  color: var(--text-d);
}
/* the banner itself fades in with scroll; the logo stays put */
.nav::before { content: ''; position: absolute; inset: 0; z-index: -1; opacity: var(--navp);
  background: rgba(11, 26, 43, .88); backdrop-filter: blur(14px) saturate(1.4); border-bottom: 1px solid var(--line-d); }
.nav__fade { opacity: var(--navp); transform: translateY(calc((1 - var(--navp)) * -6px)); }
.nav:not(.is-on) .nav__fade { pointer-events: none; }
.nav__bb { display: block; flex: none; line-height: 0; }
.nav__bb img { width: 54px; height: 54px; display: block; transition: transform .2s; }
.nav__bb:hover img { transform: scale(1.05); }
.nav__brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-weight: 500; letter-spacing: -.01em; }
.nav__brand b { font-weight: 800; color: var(--accent); }
.nav__mark { display: inline-flex; gap: 3px; align-items: flex-end; height: 18px; }
.nav__mark i { width: 4px; border-radius: 2px; background: var(--accent); animation: bars 1.4s ease-in-out infinite; }
.nav__mark i:nth-child(1) { height: 8px; } .nav__mark i:nth-child(2) { height: 16px; animation-delay: .2s; background: var(--accent-2); } .nav__mark i:nth-child(3) { height: 11px; animation-delay: .4s; }
@keyframes bars { 50% { transform: scaleY(.55); } }
.nav__menu { display: flex; gap: 2px; margin: 0 auto; }
.nav__menu a { color: var(--text-d2); text-decoration: none; font-size: 13px; font-weight: 500; padding: 7px 12px; border-radius: 99px; transition: .2s; }
.nav__menu a:hover, .nav__menu a.is-active { color: #fff; background: rgba(255,255,255,.08); }
.nav.is-on .nav__demoDate { display: none; }
.nav__demo { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-2); background: rgba(11,26,43,.45); backdrop-filter: blur(6px); border: 1px solid rgba(245,165,36,.45); padding: 6px 12px; border-radius: 99px; white-space: nowrap; }   /* always visible, top right */
.nav:not(.is-on) .nav__demo { background: none; border-color: transparent; backdrop-filter: none; padding-right: 0; text-shadow: 0 1px 8px rgba(11,26,43,.55); }   /* first page: plain text */
.nav__demo { transition: background .3s, border-color .3s, padding .3s; }

/* ---------------- Hero ---------------- */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 540px; display: flex; align-items: center; color: #fff; overflow: hidden; background: var(--ink); }
.hero__bg { position: absolute; inset: 0; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; transform: scale(1.06); animation: heroZoom 22s ease-out forwards; }
@keyframes heroZoom { to { transform: scale(1); } }
.hero__scrim { position: absolute; inset: 0; background:
  linear-gradient(90deg, rgba(11,26,43,.82) 0%, rgba(11,26,43,.55) 45%, rgba(11,26,43,.08) 80%),
  linear-gradient(0deg, rgba(11,26,43,.92) 0%, rgba(11,26,43,0) 42%); }
.hero__lines { position: absolute; left: 0; right: 0; bottom: 4%; width: 100%; height: 34%; opacity: .9; }
.hl { fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-dasharray: 2200; stroke-dashoffset: 2200; animation: draw 3.2s cubic-bezier(.4,0,.2,1) forwards; }
.hl--1 { stroke: var(--accent); animation-delay: .3s; }
.hl--2 { stroke: var(--accent-2); animation-delay: .6s; opacity: .8; }
.hl--3 { stroke: rgba(255,255,255,.5); animation-delay: .9s; stroke-width: 1.4; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.hero__inner { position: relative; z-index: 2; width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 72px 32px 40px; }
.hero__title { font-size: clamp(36px, min(6.4vw, 10.5vh), 88px); line-height: 1.08; letter-spacing: -.025em; font-weight: 700; margin: 0 0 2.6vh; max-width: 900px; }
em, i, cite, var, dfn, address { font-style: normal; }
.hero__title em, .title em { font-family: inherit; font-style: normal; font-weight: inherit; letter-spacing: inherit; }   /* accent words: same bold face as the title, colour only */
.hero__title em { color: var(--accent); }
.hero__lede { font-size: clamp(15px, min(1.4vw, 2.3vh), 19px); line-height: 1.6; color: #C9D5E2; max-width: 600px; margin: 0 0 4.5vh; }
.hero__stats { display: flex; flex-wrap: wrap; gap: 0; }
.stat { padding: 4px 36px 4px 0; margin-right: 36px; border-right: 1px solid rgba(255,255,255,.16); }
.stat:last-child { border-right: 0; }
.stat__num { font-size: clamp(28px, min(3.6vw, 6vh), 50px); font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.stat__lbl { margin-top: 8px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-d2); }
@keyframes scrollDot { 60% { transform: translateY(12px); opacity: 0; } 100% { opacity: 0; } }

/* ---------------- Panels ---------------- */
.panel { padding: 110px 32px; position: relative; }
.panel > * { max-width: var(--maxw); margin-left: auto; margin-right: auto; }
.panel--dark { background: var(--ink); color: var(--text-d); }
.panel--rule { border-top: 1px solid var(--line); }   /* separates two adjacent light panels */
.kicker { display: flex; align-items: center; gap: 12px; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--text-2); }
.kickrow { display: flex; align-items: center; margin-bottom: 20px; }
.kicker--dark { color: var(--text-d2); }
.kicker__num { display: inline-grid; place-items: center; min-width: 34px; height: 24px; padding: 0 8px; border-radius: 99px; background: var(--ink); color: #fff; font-size: 11px; letter-spacing: .04em; }
.kicker--dark .kicker__num { background: var(--accent); color: var(--ink); }
.head { margin-bottom: 40px; }
.head--split { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; }
.head--split > div:first-child { flex: 1 1 520px; }
.title { font-size: clamp(30px, 3.6vw, 46px); line-height: 1.14; letter-spacing: -.02em; font-weight: 700; margin: 0 0 14px; max-width: 820px; }
.title em { color: var(--accent-ink); }
.panel--dark .title em { color: var(--accent); }
.desc { font-size: 16px; line-height: 1.65; color: var(--text-2); max-width: 680px; margin: 0; }
.panel--dark .desc { color: var(--text-d2); }

.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); border: 1px solid var(--line); padding: 26px; }
.card--dark { background: rgba(255,255,255,.035); border-color: var(--line-d); box-shadow: none; }

/* segmented toggle */
.seg { display: inline-flex; padding: 4px; border-radius: 99px; background: rgba(11,26,43,.06); gap: 2px; }
.panel--dark .seg { background: rgba(255,255,255,.07); }
.seg__btn { border: 0; background: none; padding: 8px 16px; border-radius: 99px; font-size: 13px; font-weight: 600; color: var(--text-2); transition: .2s; white-space: nowrap; }
.panel--dark .seg__btn { color: var(--text-d2); }
.seg__btn.is-on { background: var(--card); color: var(--text); box-shadow: 0 1px 3px rgba(11,26,43,.15); }
.panel--dark .seg__btn.is-on { background: var(--accent); color: var(--ink); }

/* legend */
.legend { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 12.5px; color: var(--text-2); margin-bottom: 18px; }
.legend--dark { color: var(--text-d2); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.sw { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.sw--pos { background: var(--pos); } .sw--neu { background: var(--neu); } .sw--neg { background: var(--neg); }
.panel--dark .sw--pos { background: var(--pos-d); } .panel--dark .sw--neu { background: var(--neu-d); } .panel--dark .sw--neg { background: var(--neg-d); }
.sw--line { width: 18px; height: 3px; border-radius: 2px; }

/* reveal */
.rv { opacity: 0; transform: translateY(26px); transition: opacity .8s cubic-bezier(.2,.8,.2,1), transform .8s cubic-bezier(.2,.8,.2,1); }
.rv.is-in { opacity: 1; transform: none; }

/* ---------------- 01 KPIs ---------------- */
.kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 22px 22px 16px; box-shadow: var(--shadow); position: relative; overflow: hidden; transition: transform .3s, box-shadow .3s; }
.kpi--hero { background: var(--ink); color: #fff; border-color: var(--ink); }
.kpi__lbl { font-size: 13px; font-weight: 600; color: var(--text-2); }
.kpi--hero .kpi__lbl { color: var(--text-d2); }
.kpi__sub { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.kpi--hero .kpi__sub { color: var(--text-d3); }
.kpi__val { font-size: 42px; font-weight: 700; letter-spacing: -.035em; margin: 14px 0 6px; line-height: 1; }
.kpi__val small { font-size: 18px; font-weight: 600; color: var(--text-3); margin-left: 2px; letter-spacing: 0; }
.kpi--hero .kpi__val small { color: var(--text-d2); }
.kpi__delta { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 99px; }
.kpi__delta--good { color: #00735F; background: rgba(15,157,138,.12); }
.kpi__delta--bad { color: #B42D25; background: rgba(229,83,75,.12); }
.kpi__delta--flat { color: var(--text-2); background: rgba(11,26,43,.06); }
.kpi--hero .kpi__delta--good { color: #6EE7D2; background: rgba(18,160,139,.2); }
.kpi--hero .kpi__delta--bad { color: #FFA19A; background: rgba(238,99,89,.2); }
.kpi__vs { font-size: 11px; color: var(--text-3); margin-left: 6px; }
.kpi__spark { margin-top: 12px; height: 40px; }
.kpi__spark svg { width: 100%; height: 40px; overflow: visible; }
.lowbase { display: inline-block; font-size: 10.5px; font-weight: 600; color: #9A5B00; background: rgba(245,165,36,.16); padding: 2px 7px; border-radius: 99px; margin-left: 6px; vertical-align: middle; }

/* ---------------- 02 Trend ---------------- */
.trend { padding: 26px 26px 18px; }
.trend__plot { position: relative; }
.trend__plot svg { width: 100%; height: auto; display: block; overflow: visible; }
.trend__note { font-size: 12.5px; color: var(--text-d3); margin-top: 8px; }
.ax text { font-size: 11.5px; fill: var(--text-3); }
.panel--dark .ax text { fill: var(--text-d3); }
.ax line { stroke: var(--line); }
.panel--dark .ax line { stroke: var(--line-d); }
.annot text { font-size: 11.5px; fill: var(--text-d2); }
.annot rect { fill: rgba(238,99,89,.08); }

/* ---------------- 03 Network ---------------- */
.net { display: grid; grid-template-columns: 1.7fr 1fr; gap: 20px; align-items: start; }
.net__map { display: flex; flex-direction: column; gap: 12px; padding: 14px; }
.net__bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.net__chips { display: flex; gap: 6px; flex-wrap: wrap; }
.net__chip { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: #fff; border-radius: 9px; padding: 3px 9px 3px 3px; font-size: 12.5px; font-weight: 700; transition: .2s; }
.net__chip:hover { border-color: var(--line-2); transform: translateY(-1px); }
.net__chip.is-on { border-color: var(--ink); box-shadow: 0 0 0 2px rgba(11,26,43,.12); }
.net__chip.is-dim { opacity: .45; }
.net__chip .lineTag { height: 22px; font-size: 11px; }
.net__zoom { display: inline-flex; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; background: #fff; }
.net__zoom button { border: 0; background: none; width: 34px; height: 30px; font-size: 16px; font-weight: 600; color: var(--text-2); }
.net__zoom button + button { border-left: 1px solid var(--line); }
.net__zoom button:hover { background: var(--bg); color: var(--text); }
.net__canvas { position: relative; border-radius: 14px; overflow: hidden; background: #CFE1EC; box-shadow: inset 0 0 0 1px rgba(11,26,43,.06); }
.net__canvas svg { width: 100%; height: auto; display: block; cursor: grab; touch-action: none; user-select: none; }
.net__canvas svg.is-drag { cursor: grabbing; }
.net__foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }
.net__ramp { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--text-2); }
.net__rampBar { width: 120px; height: 9px; border-radius: 5px; border: 1px solid var(--line); }
.net__rampLbl { font-weight: 600; color: var(--text); }
.net__attr { font-size: 10.5px; color: var(--text-3); max-width: 520px; line-height: 1.45; }

.parea { stroke: rgba(255,255,255,.95); stroke-width: .7; vector-effect: non-scaling-stroke; transition: fill .3s, opacity .3s; cursor: pointer; }
.parea:hover { fill: #DCD3C2; }
.parea.is-on { fill: var(--sel-fill); stroke: var(--sel); stroke-width: 1.4; }
.parea.is-on:hover { fill: #ECC35C; }
.is-regSel .parea { opacity: .55; }
/* region score labels written on the map */
.mreg { fill: var(--text-2); font-weight: 600; paint-order: stroke; stroke: rgba(255,255,255,.9); stroke-width: 3.5px; stroke-linejoin: round; cursor: pointer; letter-spacing: .01em; }
.mreg__v { fill: var(--text); font-weight: 800; }
.mreg.is-on, .mreg.is-on .mreg__v { fill: var(--sel-ink); }
.is-regSel .mreg:not(.is-on) { opacity: .5; }
.net__selKey { display: inline-flex; align-items: center; gap: 6px; margin-left: 14px; }
.net__selKey i { width: 14px; height: 10px; border-radius: 3px; background: var(--sel-fill); border: 1px solid var(--sel); }
.is-regSel .parea.is-on { opacity: 1; }
.mlrt { fill: none; stroke: #9AA6B2; stroke-width: 1.4; vector-effect: non-scaling-stroke; stroke-linecap: round; opacity: .7; }
.mline { fill: none; stroke-width: 4; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; transition: opacity .3s, stroke-width .3s; }
.mhit { fill: none; stroke: transparent; stroke-width: 16; vector-effect: non-scaling-stroke; cursor: pointer; }
#mLines:hover .mline { opacity: .55; }
#mLines .mhit:hover + * {}
.is-lineSel .mline, .is-lineSel .is-lineSel .mline.is-on { opacity: 1; }
.is-lineSel .mline.is-on { stroke-width: 5.4; }
.mst { fill: #fff; stroke: #33404D; stroke-width: 1.8; vector-effect: non-scaling-stroke; transition: opacity .3s; }
.mst--x { stroke: var(--ink); stroke-width: 2.4; }
.mst.is-dim { opacity: .15; }
.mst__lbl { fill: var(--ink); font-weight: 600; paint-order: stroke; stroke: rgba(232,226,213,.85); stroke-width: 2.5px; stroke-linejoin: round; pointer-events: none; display: none; }
.mtrain { pointer-events: none; }
.is-lineSel /* replay strip */
.rp { display: grid; grid-template-columns: auto auto 1fr; gap: 12px 16px; align-items: center; padding: 16px 2px 6px; }
.rp__btn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--ink); cursor: pointer; display: grid; place-items: center; position: relative; transition: transform .15s; }
.rp__btn:hover { transform: scale(1.06); }
.rp__btn::before { content: ''; width: 0; height: 0; border-left: 12px solid #fff; border-top: 7.5px solid transparent; border-bottom: 7.5px solid transparent; margin-left: 3px; }
.rp__btn.is-play::before { width: 11px; height: 13px; border: 0; margin: 0; background: linear-gradient(90deg, #fff 0 4px, transparent 4px 7px, #fff 7px 11px); }
.rp__clock { display: flex; flex-direction: column; width: 112px; line-height: 1.1; }   /* fixed: the timeline must not shift as the clock text changes */
.rp__clock span { font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }
.rp__clock b { font-size: 22px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.rp__track { position: relative; height: 50px; cursor: ew-resize; touch-action: none; outline: none; }
.rp__track:focus-visible { box-shadow: 0 0 0 2px var(--accent); border-radius: 6px; }
.rp__track svg { position: absolute; left: 0; right: 0; top: 0; width: 100%; height: 34px; border-radius: 6px; overflow: hidden; }
.rp__head { position: absolute; top: -3px; height: 40px; width: 2px; background: var(--ink); border-radius: 2px; transform: translateX(-1px); pointer-events: none; }
.rp__head::after { content: ''; position: absolute; left: 50%; top: -4px; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 2px #fff; }
.rp__ticks { position: absolute; left: 0; right: 0; bottom: 0; height: 12px; font-size: 10.5px; color: var(--text-3); }
.rp__ticks span { position: absolute; transform: translateX(-50%); }
.rp__ticks span:first-child { transform: none; }
.rp__read { grid-column: 1 / -1; font-size: 12.5px; color: var(--text-2); }
.rp__lead { display: block; height: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 8px; }
.rp__lead b { color: var(--ink); }
.rp__board { position: relative; height: 26px; }
.rp__item { position: absolute; left: 0; top: 0; width: calc(100% / 6); display: inline-flex; align-items: center; gap: 5px; transition: transform .9s cubic-bezier(.4,0,.2,1), opacity .2s; will-change: transform; }
.rp__rank { width: 14px; font-size: 11px; font-weight: 700; color: var(--text-3); font-variant-numeric: tabular-nums; }
.rp__item i { transition: background .4s; }
.rp__item .lineTag { height: 20px; font-size: 10.5px; padding: 0 6px; }
.rp__item i { width: 10px; height: 10px; border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(11,26,43,.12); }
.rp__item b { color: var(--ink); font-variant-numeric: tabular-nums; }
.rp__item.is-dim { opacity: .35; }
.rp__key { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; font-size: 12px; color: var(--text-2); border-top: 1px solid var(--line); padding-top: 10px; }
.rp__ramp { display: inline-flex; align-items: center; gap: 8px; }
.rp__ramp .heatLegend__ramp { width: 110px; }
.rank__row.rank__row--reg { grid-template-columns: 1fr 56px; }
.rank__hd { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-3); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; padding-bottom: 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.rank__row { display: grid; grid-template-columns: 44px 1fr 56px; align-items: center; gap: 12px; padding: 7px 10px; margin: 0 -10px; border-radius: 12px; border: 0; background: none; width: calc(100% + 20px); text-align: left; transition: background .2s; }
.rank__row:hover { background: rgba(11,26,43,.04); }
.rank__row.is-on { background: rgba(201,150,20,.14); }
.rank__row.is-dim { opacity: .45; }
.lineTag { display: inline-grid; place-items: center; height: 24px; padding: 0 7px; border-radius: 6px; color: #fff; font-size: 11.5px; font-weight: 700; letter-spacing: .02em; }
.rank__name { font-size: 13.5px; font-weight: 600; }
.rank__name small { display: block; font-size: 11px; color: var(--text-3); font-weight: 500; margin-top: 1px; }
.rank__track { height: 8px; border-radius: 4px; background: rgba(11,26,43,.06); margin-top: 7px; overflow: hidden; }
.rank__fill { height: 100%; border-radius: 0 4px 4px 0; background: var(--accent); transition: width .7s cubic-bezier(.2,.8,.2,1); }
.rank__val { font-size: 17px; font-weight: 700; text-align: right; letter-spacing: -.02em; }
.rank__foot { font-size: 11.5px; color: var(--text-3); margin-top: 12px; line-height: 1.5; }

/* ---------------- 04 Touchpoints ---------------- */
.tp { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; }
.tpRow { display: grid; grid-template-columns: 190px 1fr; align-items: center; gap: 14px; padding: 9px 0; }
.tpRow__lbl { font-size: 13.5px; font-weight: 600; color: var(--text-d); }
.tpRow__lbl small { display: block; font-size: 11px; color: var(--text-d3); font-weight: 500; margin-top: 2px; }
.tpRow__bar { display: flex; height: 26px; gap: 2px; }
.tpSeg { height: 100%; display: flex; align-items: center; justify-content: center; font-size: 11.5px; font-weight: 600; transition: width .7s cubic-bezier(.2,.8,.2,1); overflow: hidden; white-space: nowrap; cursor: default; }
.tpSeg:first-child { border-radius: 4px 0 0 4px; }
.tpSeg:last-child { border-radius: 0 4px 4px 0; }
.tpSeg--neg { background: var(--neg-d); color: #fff; }
.tpSeg--neu { background: var(--neu-d); color: var(--text-d); }
.tpSeg--pos { background: var(--pos-d); color: #fff; }
.tpSeg:hover { filter: brightness(1.12); }
.tp__mHead { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.tp__mHead span { font-size: 12px; color: var(--text-d3); font-weight: 500; margin-left: 8px; }
#tpMatrix svg { width: 100%; height: auto; display: block; overflow: visible; }
.quad text { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; fill: var(--text-d3); }
.quad--prio rect { fill: rgba(238,99,89,.09); }
.quad--prio text { fill: #FFA19A; }
.dotLbl { font-size: 11.5px; fill: var(--text-d); font-weight: 500; pointer-events: none; }
.mdot { transition: cx .7s cubic-bezier(.2,.8,.2,1), cy .7s cubic-bezier(.2,.8,.2,1); cursor: pointer; }

/* ---------------- 05 Heatmap ---------------- */
.heat { padding: 24px 24px 18px; overflow-x: auto; }
.heat svg { width: 100%; min-width: 760px; height: auto; display: block; }
.hcell { transition: fill .5s; cursor: pointer; }
.hcell:hover { stroke: var(--ink); stroke-width: 2; }
.hlab { font-size: 11.5px; fill: var(--text-2); }
.hlab--b { font-weight: 600; fill: var(--text); }
.heatLegend { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--text-2); }
.heatLegend__ramp { width: 180px; height: 10px; border-radius: 5px; }
.heatFacts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 20px; }
.fact { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; }
.fact b { display: block; font-size: 18px; letter-spacing: -.02em; }
.fact span { font-size: 12.5px; color: var(--text-2); }

/* ---------------- 06 NPS ---------------- */
.nps { display: grid; grid-template-columns: 380px 1fr; gap: 20px; }
.nps__gauge { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.nps__gauge svg { width: 100%; max-width: 300px; height: auto; }
.gauge__val { font-size: 54px; font-weight: 800; letter-spacing: -.04em; fill: var(--text); }
.gauge__lbl { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; fill: var(--text-3); font-weight: 600; }
.gauge__split { display: flex; width: 100%; max-width: 300px; margin-top: 14px; gap: 2px; height: 10px; }
.gauge__split div { height: 100%; transition: width .7s; }
.gauge__split div:first-child { border-radius: 4px 0 0 4px; } .gauge__split div:last-child { border-radius: 0 4px 4px 0; }
.gauge__nums { display: flex; justify-content: space-between; width: 100%; max-width: 300px; margin-top: 10px; font-size: 12px; color: var(--text-2); }
.gauge__nums b { display: block; font-size: 18px; color: var(--text); letter-spacing: -.02em; }
#npsDist svg { width: 100%; height: auto; display: block; overflow: visible; }
.ncol { transition: y .6s cubic-bezier(.2,.8,.2,1), height .6s cubic-bezier(.2,.8,.2,1); cursor: pointer; }
.ncol:hover { filter: brightness(1.08); }
.nlab { font-size: 11.5px; fill: var(--text-2); }
.nval { font-size: 11.5px; fill: var(--text); font-weight: 600; }

/* ---------------- 07 Voice ---------------- */
.voice { display: grid; grid-template-columns: 1fr 1.1fr; gap: 20px; align-items: start; }
.theme { display: grid; grid-template-columns: 1fr 52px; gap: 6px 12px; align-items: center; width: 100%; text-align: left; padding: 10px 12px; margin: 0 -12px; width: calc(100% + 24px); border: 0; background: none; border-radius: 12px; color: var(--text-d); transition: background .2s; }
.theme:hover { background: rgba(255,255,255,.05); }
.theme.is-on { background: rgba(0,168,143,.14); }
.theme__lbl { font-size: 13.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.theme__pol { font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 2px 6px; border-radius: 99px; }
.theme__pol--pos { color: #6EE7D2; background: rgba(18,160,139,.18); }
.theme__pol--neg { color: #FFA19A; background: rgba(238,99,89,.18); }
.theme__val { text-align: right; font-weight: 700; font-size: 15px; }
.theme__track { grid-column: 1 / -1; height: 6px; background: rgba(255,255,255,.06); border-radius: 3px; overflow: hidden; }
.theme__fill { height: 100%; border-radius: 0 3px 3px 0; transition: width .7s cubic-bezier(.2,.8,.2,1); }
.voice__quotes { display: grid; gap: 14px; }
.quote { position: relative; background: #fff; color: var(--text); border-radius: var(--r); padding: 24px 26px 20px 26px; animation: qIn .6s cubic-bezier(.2,.8,.2,1) both; }
.quote:nth-child(2) { animation-delay: .08s; } .quote:nth-child(3) { animation-delay: .16s; }
@keyframes qIn { from { opacity: 0; transform: translateY(14px); } }
.quote p { margin: 0 0 14px; font-size: 17px; line-height: 1.6; font-weight: 400; }
.quote__who { font-size: 12px; color: var(--text-3); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.quote__who .lineTag { height: 20px; font-size: 10.5px; }
.quote__empty { color: var(--text-d2); font-size: 14px; padding: 20px; border: 1px dashed var(--line-d2); border-radius: var(--r); }
.voice__more { justify-self: start; border: 1px solid var(--line-d2); background: none; color: var(--text-d); padding: 9px 16px; border-radius: 99px; font-size: 13px; font-weight: 600; }
.voice__more:hover { border-color: var(--accent); color: var(--accent); }

/* ---------------- 08 Compare ---------------- */
.cmp__controls { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.ctl { display: flex; flex-direction: column; gap: 6px; }
.ctl__cap { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.select { position: relative; display: inline-block; }
.select::after { content: ""; position: absolute; right: 14px; top: 50%; width: 7px; height: 7px; border-right: 2px solid var(--text-2); border-bottom: 2px solid var(--text-2); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.select select { appearance: none; -webkit-appearance: none; background: var(--card); border: 1px solid var(--line-2); border-radius: 12px; padding: 11px 42px 11px 14px; font-size: 14px; font-weight: 600; min-width: 240px; cursor: pointer; }
.select select:hover { border-color: var(--accent); }
/* custom dropdown (replaces the browser's native list) */
.dd select { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; min-width: 0; padding: 0; border: 0; }
.dd::after { content: none; }
.dd__btn { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-width: 260px; width: 100%; background: var(--card); border: 1px solid var(--line-2); border-radius: 12px; padding: 11px 14px; font-size: 14px; font-weight: 600; text-align: left; cursor: pointer; transition: border-color .2s, box-shadow .2s; }
.dd__btn:hover, .dd.open .dd__btn { border-color: var(--text-3); }
.dd__btn:focus-visible { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(14,27,44,.12); }
.dd__chev { flex: none; width: 7px; height: 7px; border-right: 2px solid var(--text-2); border-bottom: 2px solid var(--text-2); transform: translateY(-2px) rotate(45deg); transition: transform .25s; }
.dd.open .dd__chev { transform: translateY(1px) rotate(225deg); }
.dd__list { position: absolute; z-index: 40; top: calc(100% + 8px); left: 0; min-width: 100%; max-height: 320px; overflow-y: auto; margin: 0; padding: 6px; list-style: none; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 24px 60px -20px rgba(11,26,43,.35); opacity: 0; transform: translateY(-6px); pointer-events: none; transition: opacity .2s, transform .2s cubic-bezier(.2,.8,.2,1); }
.dd.open .dd__list { opacity: 1; transform: none; pointer-events: auto; }
.dd__opt { position: relative; padding: 9px 34px 9px 12px; border-radius: 9px; font-size: 13.5px; font-weight: 500; color: var(--text); white-space: nowrap; cursor: pointer; }
.dd__opt.is-act { background: var(--bg); }
.dd__opt.is-on { background: rgba(242,208,107,.35); color: var(--sel-ink); font-weight: 600; }
.dd__opt.is-on::after { content: ""; position: absolute; right: 14px; top: 50%; width: 5px; height: 9px; border-right: 2px solid var(--sel); border-bottom: 2px solid var(--sel); transform: translateY(-65%) rotate(45deg); }
.cmp { padding: 26px 30px; }
.cRow { display: grid; grid-template-columns: 170px 1fr 70px; gap: 16px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.cRow:last-of-type { border-bottom: 0; }
.cRow.is-sel { background: rgba(0,168,143,.08); border-radius: 10px; margin: 0 -12px; padding: 10px 12px; }
.cRow__lbl { font-size: 14px; font-weight: 600; }
.cRow__lbl small { display: block; font-size: 11.5px; color: var(--text-3); font-weight: 500; }
.cRow__plot { position: relative; height: 22px; }
.cRow__bar { position: absolute; left: 0; top: 0; height: 22px; border-radius: 0 4px 4px 0; background: var(--accent); transition: width .7s cubic-bezier(.2,.8,.2,1); }
.cRow__bar--neg { background: var(--neg); }
.cRow__tot { position: absolute; top: -5px; width: 2px; height: 32px; background: var(--ink); border-radius: 1px; transition: left .7s cubic-bezier(.2,.8,.2,1); }
.cRow__val { font-size: 18px; font-weight: 700; letter-spacing: -.02em; text-align: right; }
.cRow__diff { font-size: 11.5px; font-weight: 600; display: block; }
.cRow__diff--up { color: #00735F; } .cRow__diff--down { color: #B42D25; }
.cmp__key { display: flex; gap: 20px; font-size: 12px; color: var(--text-2); margin-bottom: 10px; flex-wrap: wrap; }
.cmp__key span { display: inline-flex; align-items: center; gap: 8px; }
.cmp__key .k-tot { width: 2px; height: 14px; background: var(--ink); }
.cmp__key .k-bar { width: 14px; height: 10px; border-radius: 2px; background: var(--accent); }

/* ---------------- Notes / footer ---------------- */
.panel--notes { padding-top: 70px; padding-bottom: 70px; border-top: 1px solid var(--line); }
.about { display: grid; grid-template-columns: minmax(260px, 1fr) 2fr; gap: 48px; align-items: stretch; }
.about__photo { position: relative; margin: 0; border-radius: var(--r); overflow: hidden; min-height: 380px; box-shadow: var(--shadow); }
.about__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 62% 80%; display: block; }
.notes { display: grid; grid-template-columns: 1fr; gap: 28px; align-content: center; }
.notes h3 { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); margin: 0 0 10px; }
.notes p { font-size: 13.5px; line-height: 1.7; color: var(--text-2); margin: 0; }
.foot { background: var(--ink); color: var(--text-d2); padding: 30px 32px; }
.foot__row { max-width: var(--maxw); margin: 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; font-size: 13px; }
.foot__row b { color: #fff; font-weight: 600; }
.foot__bb { display: flex; align-items: center; gap: 12px; color: var(--text-d2); text-decoration: none; }
.foot__bb img { width: 40px; height: 40px; display: block; }

/* ---------------- Tooltip ---------------- */
.tip { position: fixed; z-index: 200; pointer-events: none; background: var(--ink); color: #fff; padding: 10px 12px; border-radius: 10px; font-size: 12.5px; line-height: 1.45; box-shadow: 0 10px 30px -8px rgba(0,0,0,.4); opacity: 0; transform: translateY(4px); transition: opacity .15s, transform .15s; max-width: 260px; border: 1px solid rgba(255,255,255,.1); }
.tip.is-on { opacity: 1; transform: none; }
.tip b { font-weight: 700; }
.tip .tip__hd { font-weight: 700; margin-bottom: 4px; }
.tip .tip__row { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.tip .tip__row i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; margin-right: 6px; }
.tip .tip__mute { color: var(--text-d3); font-size: 11.5px; margin-top: 4px; }

/* ---------------- Chat ---------------- */
.chatFab { position: fixed; right: 24px; bottom: calc(24px + var(--footLift, 0px)); z-index: 70; display: flex; align-items: center; gap: 9px; border: 0; background: var(--accent); color: var(--ink); padding: 13px 20px 13px 16px; border-radius: 99px; font-weight: 700; font-size: 14px; box-shadow: 0 12px 30px -10px rgba(0,168,143,.7); transition: transform .2s; }
.chatFab:hover { transform: translateY(-2px); }
.chat { position: fixed; right: 24px; bottom: 24px; z-index: 80; width: min(400px, calc(100vw - 32px)); height: min(560px, calc(100vh - 100px)); background: #fff; border-radius: 20px; box-shadow: 0 30px 80px -20px rgba(11,26,43,.45); display: flex; flex-direction: column; overflow: hidden; transform: translateY(20px) scale(.97); opacity: 0; pointer-events: none; transition: .3s cubic-bezier(.2,.8,.2,1); transform-origin: bottom right; }
.chat.open { transform: none; opacity: 1; pointer-events: auto; }
.chat__hd { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; background: var(--ink); color: #fff; }
.chat__hd small { display: block; font-size: 11.5px; color: var(--text-d2); margin-top: 2px; }
.chat__x, .ffilter__x { border: 0; background: rgba(255,255,255,.1); color: inherit; width: 30px; height: 30px; border-radius: 50%; font-size: 18px; line-height: 1; }
.chat__body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); }
.msg { display: flex; }
.msg--user { justify-content: flex-end; }
.msg__bubble { max-width: 86%; padding: 10px 14px; border-radius: 14px; font-size: 13.5px; line-height: 1.55; white-space: pre-wrap; background: #fff; border: 1px solid var(--line); }
.msg--user .msg__bubble { background: var(--ink); color: #fff; border-color: var(--ink); }
.suggs { display: flex; flex-wrap: wrap; gap: 6px; }
.sugg { border: 1px solid rgba(0,168,143,.4); background: #fff; color: var(--accent-ink); border-radius: 99px; padding: 6px 11px; font-size: 12.5px; font-weight: 600; }
.sugg:hover { background: var(--accent); color: var(--ink); }
.typing { display: flex; gap: 4px; padding: 4px 0; }
.typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); animation: typ 1s infinite; }
.typing span:nth-child(2) { animation-delay: .15s; } .typing span:nth-child(3) { animation-delay: .3s; }
@keyframes typ { 50% { opacity: .3; transform: translateY(-3px); } }
.chat__form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.chat__form input { flex: 1; border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 12px; font-size: 13.5px; }
.chat__form button { border: 0; background: var(--accent); color: var(--ink); width: 42px; border-radius: 12px; display: grid; place-items: center; }


/* ---------------- Responsive ---------------- */
@media (max-width: 1240px) {
  .nav__menu { display: none; }
}
@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(3, 1fr); }
  .net, .tp, .voice { grid-template-columns: 1fr; }
  .nps { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .panel { padding: 72px 18px; }
  .hero { height: auto; min-height: 100svh; }
  .hero__inner { padding: 88px 20px 48px; }
  .hero__scrim { background: linear-gradient(0deg, rgba(11,26,43,.95), rgba(11,26,43,.72)); }
  .stat { padding-right: 20px; margin-right: 20px; margin-bottom: 18px; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .heatFacts, .notes, .about { grid-template-columns: 1fr; }
  .about__photo { min-height: 260px; }
  .tpRow { grid-template-columns: 1fr; gap: 6px; }
  .cRow { grid-template-columns: 110px 1fr 60px; }
  .chatFab span { display: none; }
  .chatFab { padding: 14px; }
  .nav { padding: 0 16px; }
  .nav__demoDate { display: none; }
  .nav__demo { font-size: 10px; padding: 5px 10px; }
  .select select { min-width: 0; width: 100%; }
  .dd__btn { min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .rv { opacity: 1; transform: none; }
  .hl { stroke-dashoffset: 0; }
}

/* Line breaks: headings balance their lines (no lone word on the last line); body text avoids orphans */
h2, h3, h4, .title, .hero__lede, .kpi__lbl, .card__t, .fact b { text-wrap: balance; }
p, li, .desc, .lede, figcaption, .tip, .chat__msg { text-wrap: pretty; }
