/* Moose Marketing brand: ink #151716, cream #F7F6F2, teal #6A989E; Bricolage Grotesque headings, Manrope body. */
:root {
  color-scheme: light;
  --navy:#24494F; --navy-text:#24494F; --teal:#4E7F86; --rust:#8A5A2B; --orange:#6A989E;
  --bg:#F7F6F2; --fg:#151716; --muted:#5F6864; --card:#fff; --line:#E6E3DA; --err:#b3261e;
  --side:#151716; --side-fg:#B9C2BF; --accent:#24494F; --bar:#24494F;
  --warn-bg:#F4ECE0; --warn-fg:#8A5A2B;
  --up-bg:#E2F1EC; --up-fg:#1F6B57; --down-bg:#FBE9E4; --down-fg:#A63A1A;
  --c1:#24494F; --c2:#6A989E; --c3:#C9A66B; --c4:#8A5A2B; --c5:#9DB7BB; --c6:#C4D6D8; --c7:#E3CDA0; --c8:#CFCDC5;
  --shadow:0 1px 2px rgba(21,23,22,.05), 0 6px 18px -10px rgba(21,23,22,.18);
  --head:"Bricolage Grotesque", Manrope, system-ui, sans-serif;
}
/* Dark mode: same navy/teal/orange brand accents, lifted onto a near-black surface (the toggle in
   the header sets data-theme; the media query covers a first visit before any choice is saved). */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg:#101312; --fg:#F1EFE8; --muted:#9AA5A1; --card:#181C1B; --line:#2A312F; --err:#F2857D;
  --side:#0B0D0C; --side-fg:#A9B5B1; --accent:#6A989E; --bar:#6A989E; --navy-text:#F1EFE8;
  --warn-bg:#2A2418; --warn-fg:#D9B98A;
  --up-bg:#123024; --up-fg:#5FCBA3; --down-bg:#331A16; --down-fg:#F2857D;
  --c1:#6A989E; --c2:#86B3B8; --c3:#6A989E; --c4:#C9A66B; --c5:#9AA5A1; --c6:#7FA0A3; --c7:#D9B98A; --c8:#3A4442;
  --shadow:0 1px 2px rgba(0,0,0,.3), 0 8px 20px -12px rgba(0,0,0,.55);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg:#101312; --fg:#F1EFE8; --muted:#9AA5A1; --card:#181C1B; --line:#2A312F; --err:#F2857D;
    --side:#0B0D0C; --side-fg:#A9B5B1; --accent:#6A989E; --bar:#6A989E; --navy-text:#F1EFE8;
    --warn-bg:#2A2418; --warn-fg:#D9B98A;
    --up-bg:#123024; --up-fg:#5FCBA3; --down-bg:#331A16; --down-fg:#F2857D;
    --c1:#6A989E; --c2:#86B3B8; --c3:#6A989E; --c4:#C9A66B; --c5:#9AA5A1; --c6:#7FA0A3; --c7:#D9B98A; --c8:#3A4442;
    --shadow:0 1px 2px rgba(0,0,0,.3), 0 8px 20px -12px rgba(0,0,0,.55);
  }
}
:root[data-theme="dark"] .brand { background:#F7F6F2; }
* { box-sizing: border-box; }
body { margin:0; font:14px/1.55 Manrope, system-ui, sans-serif; background:var(--bg); color:var(--fg); -webkit-font-smoothing:antialiased; transition:background-color .25s ease, color .25s ease; }
h1, h2, h3, h4, .big, .brand { font-family:var(--head); }
body, .card, .side, .tile, header, #nav a, button, select, input, .bar-row-lane, .ring-track, .donut-track { transition:background-color .25s ease, border-color .25s ease, color .25s ease, box-shadow .25s ease; }

/* ---- Theme toggle ---- */
.theme-toggle { display:flex; align-items:center; justify-content:center; width:38px; padding:0; color:var(--navy-text); border-color:#D8D4C8; }
.theme-icon { width:16px; height:16px; display:inline-block; border-radius:50%; background:var(--orange); box-shadow:0 0 0 3px transparent; transition:box-shadow .25s ease, background .25s ease, transform .4s ease; }
:root[data-theme="dark"] .theme-icon { background:transparent; box-shadow:inset -3px -3px 0 1px var(--orange); transform:rotate(-40deg); }
:root[data-theme="dark"] .theme-toggle { color:var(--fg); border-color:var(--line); }

.app { display:flex; min-height:100vh; }
.side { width:232px; flex:none; background:var(--side); color:var(--side-fg); padding:0 0 20px; position:sticky; top:0; align-self:flex-start; min-height:100vh; }
.brand { background:#F7F6F2; padding:18px 20px; border-bottom:4px solid var(--orange); }
.brand img { display:block; height:46px; width:auto; }
.brand span { display:block; margin-top:8px; font-size:10.5px; letter-spacing:.16em; text-transform:uppercase; color:var(--teal); font-weight:600; font-family:Manrope, sans-serif; }
#nav { display:flex; flex-direction:column; gap:4px; padding:18px 12px 0; }
#nav a { color:var(--side-fg); text-decoration:none; padding:10px 14px; border-radius:6px; font-weight:500; border-left:3px solid transparent; transition:background .15s, color .15s; }
#nav a:hover { background:rgba(255,255,255,.08); color:#fff; }
#nav a.active { background:rgba(255,255,255,.12); color:#fff; border-left-color:var(--orange); }

.content { flex:1; min-width:0; }
header { display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; padding:18px 28px; background:var(--card); border-bottom:1px solid var(--line); position:sticky; top:0; z-index:5; }
h1 { margin:0; font-size:26px; font-weight:700; color:var(--navy-text); letter-spacing:-.01em; }
h3 { margin:0 0 14px; font-size:16px; font-weight:700; color:var(--navy-text); }
.controls { display:flex; gap:8px; align-items:center; flex-wrap:wrap; justify-content:flex-end; }
.custom { display:flex; gap:6px; align-items:center; }
.custom[hidden] { display:none; }
button, select, input[type=date] { padding:8px 14px; border:1px solid var(--line); background:var(--card); color:var(--fg); border-radius:6px; font:inherit; font-weight:500; }
select { padding-right:10px; color:var(--navy-text); font-weight:600; border-color:#D8D4C8; }
button { cursor:pointer; }
button:hover { border-color:var(--navy-text); }
#refresh { background:var(--navy); color:#fff; border-color:var(--navy-text); font-weight:600; }
#refresh:hover { background:var(--teal); border-color:var(--teal); }
.period { padding:14px 28px 0; font-size:13px; font-weight:500; }
main { padding:18px 28px 48px; display:flex; flex-direction:column; gap:18px; }

.card { background:var(--card); border:1px solid var(--line); border-radius:12px; padding:20px; overflow-x:auto; box-shadow:var(--shadow); transition:transform .2s ease, box-shadow .2s ease, background-color .25s ease, border-color .25s ease; }
.card:hover { transform:translateY(-2px); box-shadow:0 2px 4px rgba(21,23,22,.06), 0 14px 28px -14px rgba(21,23,22,.28); }
:root[data-theme="dark"] .card:hover { box-shadow:0 2px 4px rgba(0,0,0,.4), 0 14px 28px -14px rgba(0,0,0,.7); }
.tile { transition:transform .2s ease, box-shadow .2s ease; }
.tile:hover { transform:translateY(-1px); }

/* Content fade-slide-in each time a tab/section (re)renders. */
.part-body { opacity:0; transform:translateY(6px); transition:opacity .35s ease, transform .35s ease; }
.part-body.in { opacity:1; transform:none; }
@media (prefers-reduced-motion: reduce) {
  .part-body { opacity:1; transform:none; transition:none; }
  .card:hover, .tile:hover { transform:none; }
}
.muted { color:var(--muted); }
.small { font-size:12px; }
.left { text-align:left; margin:0; }
.error { color:var(--err); }
.warn { background:var(--warn-bg); color:var(--warn-fg); border-radius:8px; padding:11px 16px; font-size:13.5px; border-left:4px solid var(--orange); }

.banner { font-family:var(--head); color:var(--navy-text); font-size:18px; font-weight:700; padding:6px 0 10px; margin:10px 0 0; border-bottom:1px solid var(--line); position:relative; }
.banner::after { content:""; position:absolute; left:0; bottom:-1px; width:48px; height:3px; background:var(--orange); }
.tiles { display:grid; gap:14px; grid-template-columns:repeat(auto-fill, minmax(210px, 1fr)); }
.tile { background:var(--card); border:1px solid var(--line); border-top:3px solid var(--teal); border-radius:10px; padding:16px 16px 14px; box-shadow:var(--shadow); }
.tile h4 { margin:0; font-family:Manrope, sans-serif; font-size:11.5px; font-weight:600; text-transform:uppercase; letter-spacing:.07em; color:var(--muted); text-align:center; }
.big { font-size:34px; font-weight:700; text-align:center; padding:8px 0 4px; color:var(--navy-text); letter-spacing:-.02em; line-height:1.15; }
.tile .small { text-align:center; color:var(--muted); }
.delta { text-align:center; margin-top:4px; }
.pill { font-size:12px; font-weight:600; padding:2px 9px; border-radius:10px; }
.pill.up { background:var(--up-bg); color:var(--up-fg); }
.pill.down { background:var(--down-bg); color:var(--down-fg); }

.chart { width:100%; height:auto; min-width:520px; }
.chart .grid { stroke:var(--line); stroke-width:1; }
.chart .axis { fill:var(--muted); font-size:11px; }
.chart .bar { fill:var(--bar); }
.chart .bar:hover { opacity:.8; }
.chart .line { fill:none; stroke:var(--bar); stroke-width:2; }
.chart .dot { fill:var(--bar); }
.chart.hbars { min-width:0; }

.bullet { margin-top:8px; }
.bullet-track { position:relative; height:8px; background:var(--line); border-radius:4px; overflow:visible; }
.bullet-track div:first-child { height:100%; background:var(--bar); border-radius:4px; }
.bullet-track div:first-child.over { background:var(--up-fg); }
.bullet-target { position:absolute; top:-3px; left:100%; width:2px; height:14px; background:var(--fg); }
.bullet .muted { margin-top:3px; text-align:center; }

.warn ul.gaps { margin:6px 0 0; padding-left:18px; }
.warn ul.gaps li { margin:2px 0; }

table { width:100%; border-collapse:collapse; font-size:14px; }
th, td { padding:10px 12px; text-align:left; border-bottom:1px solid var(--line); }
th { color:var(--muted); font-weight:600; font-size:11.5px; text-transform:uppercase; letter-spacing:.06em; background:#F7FAFB; }
tbody tr:hover td { background:#F7FAFB; }
th.sortable { cursor:pointer; user-select:none; white-space:nowrap; }
th.sortable:hover { color:var(--fg); }
th.r, td.r { text-align:right; font-variant-numeric:tabular-nums; }
tr.unassigned td { color:var(--warn-fg); font-style:italic; }
.meter { width:120px; height:8px; background:var(--line); border-radius:4px; overflow:hidden; }
.meter div { height:100%; background:var(--bar); }

@media (max-width: 760px) {
  .app { flex-direction:column; }
  .side { width:auto; min-height:0; position:static; padding:0; display:flex; align-items:center; gap:8px; overflow-x:auto; }
  .brand { padding:8px 12px; border-bottom:0; border-right:4px solid var(--orange); flex:none; }
  .brand img { width:110px; }
  .brand span { display:none; }
  #nav { flex-direction:row; padding:0 8px; }
  #nav a { border-left:0; border-bottom:3px solid transparent; white-space:nowrap; padding:12px 10px; border-radius:0; }
  #nav a.active { border-bottom-color:var(--orange); }
  header { position:static; padding:14px 14px; }
  h1 { font-size:22px; }
  .period, main { padding-left:14px; padding-right:14px; }
}

.seg { display:inline-flex; border:1px solid var(--line); border-radius:6px; overflow:hidden; align-self:flex-start; }
.seg button { border:0; border-radius:0; background:var(--card); }
.seg button.on { background:var(--navy); color:#fff; }

.search { display:flex; gap:8px; flex-wrap:wrap; }
.search input { flex:1; min-width:200px; max-width:420px; padding:7px 12px; border:1px solid var(--line); background:var(--card); color:var(--fg); border-radius:6px; font:inherit; }
a.link { color:var(--teal); font-weight:500; text-decoration:none; }
a.link:hover { text-decoration:underline; }
.chip { display:inline-block; font-size:12px; padding:1px 8px; border-radius:10px; }
.chip.good { background:var(--up-bg); color:var(--up-fg); }
.chip.bad { background:var(--down-bg); color:var(--down-fg); }
.chip.info { background:var(--card); color:var(--muted); border:1px solid var(--line); }
button.more { margin-top:12px; }
.pager { display:flex; align-items:center; gap:10px; margin-top:14px; }
.pager button:disabled { opacity:.4; cursor:default; }

/* ---- Analytics: a distinct, calmer "glance at it once" style ---- */
.analytics-page {
  --a-bg:transparent; --a-card:#fff; --a-fg:#151716; --a-muted:#5F6864; --a-line:#E6E3DA;
  --a-accent:#4E7F86; --a-accent-soft:#DDEBEA; --a-up:#1F6B57; --a-down:#A63A1A; --a-shadow:0 1px 2px rgba(21,23,22,.05), 0 6px 18px -10px rgba(21,23,22,.18);
  background:var(--a-bg); color:var(--a-fg); margin:0; padding:0; border-radius:0;
  display:flex; flex-direction:column; gap:16px;
}
.analytics-page .a-hero { display:grid; gap:14px; grid-template-columns:repeat(auto-fit, minmax(220px, 1fr)); }
.analytics-page .a-tile { background:var(--a-card); border-radius:12px; border-top:3px solid var(--a-accent); box-shadow:var(--a-shadow); padding:20px 22px; }
.analytics-page .a-tile h4 { margin:0 0 10px; font-size:12px; font-weight:600; text-transform:uppercase; letter-spacing:.06em; color:var(--a-muted); }
.analytics-page .a-big { font-family:var(--head); color:var(--navy-text); font-size:36px; font-weight:700; letter-spacing:-.01em; line-height:1.1; }
.analytics-page .a-delta { display:inline-flex; align-items:center; gap:4px; font-size:13px; font-weight:600; margin-top:6px; }
.analytics-page .a-delta.up { color:var(--a-up); }
.analytics-page .a-delta.down { color:var(--a-down); }
.analytics-page .a-target-row { display:flex; align-items:center; gap:8px; margin-top:14px; }
.analytics-page .a-target-track { position:relative; flex:1; height:4px; background:var(--a-line); border-radius:2px; }
.analytics-page .a-target-fill { height:100%; background:var(--a-accent); border-radius:2px; }
.analytics-page .a-target-dot { position:absolute; top:50%; width:9px; height:9px; border-radius:50%; background:var(--a-accent); border:2px solid var(--a-card); transform:translate(-50%,-50%); }
.analytics-page .a-target-label { font-size:12px; color:var(--a-muted); white-space:nowrap; }
.analytics-page .a-source { margin-top:14px; font-size:12px; color:var(--a-muted); }

.analytics-page .a-card { background:var(--a-card); border-radius:12px; box-shadow:var(--a-shadow); padding:22px; }
.analytics-page .a-card h3 { margin:0; font-size:16px; font-weight:700; color:var(--navy-text); }
.analytics-page .a-card-head { display:flex; justify-content:space-between; align-items:baseline; gap:12px; flex-wrap:wrap; margin-bottom:14px; }
.analytics-page .a-card-note { font-size:12px; color:var(--a-muted); }

.analytics-page .a-area { width:100%; height:auto; }
.analytics-page .a-area .a-grid { stroke:var(--a-line); stroke-width:1; }
.analytics-page .a-area .a-axis { fill:var(--a-muted); font-size:11px; }
.analytics-page .a-area .a-fill { fill:url(#analyticsAreaGrad); }
.analytics-page .a-area .a-line { fill:none; stroke:var(--a-accent); stroke-width:2.5; stroke-linecap:round; stroke-linejoin:round; }
.analytics-page .a-area .a-dot { fill:var(--a-accent); }
.analytics-page .a-area .a-target-line { stroke:var(--a-muted); stroke-width:1; stroke-dasharray:4 4; }
.analytics-page .a-area .a-target-text { fill:var(--a-muted); font-size:11px; }

.analytics-page .a-row2 { display:grid; gap:16px; grid-template-columns:1.1fr 1fr; }
@media (max-width:820px) { .analytics-page .a-row2 { grid-template-columns:1fr; } }

.analytics-page .a-sliders { display:flex; flex-direction:column; gap:16px; }
.analytics-page .a-slider-label { display:flex; justify-content:space-between; font-size:13px; margin-bottom:6px; }
.analytics-page .a-slider-label .name { font-weight:500; }
.analytics-page .a-slider-label .val { color:var(--a-muted); font-variant-numeric:tabular-nums; }
.analytics-page .a-slider-track { position:relative; height:3px; background:var(--a-line); border-radius:2px; }
.analytics-page .a-slider-fill { position:relative; height:100%; background:var(--a-accent); border-radius:2px; }
.analytics-page .a-slider-dot { position:absolute; top:50%; right:-5px; width:10px; height:10px; border-radius:50%; background:var(--a-accent); transform:translateY(-50%); }

.analytics-page .a-table { width:100%; border-collapse:collapse; font-size:13px; }
.analytics-page .a-table th { text-align:left; color:var(--a-muted); font-weight:600; font-size:11px; text-transform:uppercase; letter-spacing:.05em; padding:0 0 10px; border-bottom:1px solid var(--a-line); }
.analytics-page .a-table th.r, .analytics-page .a-table td.r { text-align:right; font-variant-numeric:tabular-nums; }
.analytics-page .a-table td { padding:9px 0; border-bottom:1px solid var(--a-line); }
.analytics-page .a-table tr:last-child td { border-bottom:0; }
.analytics-page .a-table-note { margin:10px 0 0; font-size:12px; color:var(--a-muted); }

.analytics-page .a-funnel { display:flex; flex-direction:column; gap:10px; }
.analytics-page .a-funnel-row { display:grid; grid-template-columns:120px 1fr 130px; align-items:center; gap:10px; font-size:13px; }
.analytics-page .a-funnel-label { color:var(--a-muted); }
.analytics-page .a-funnel-track { height:20px; background:var(--a-accent-soft); border-radius:5px; overflow:hidden; }
.analytics-page .a-funnel-fill { height:100%; background:var(--a-accent); border-radius:5px; }
.analytics-page .a-funnel-val { text-align:right; font-variant-numeric:tabular-nums; }
.analytics-page .a-funnel-val .pct { color:var(--a-muted); font-size:12px; margin-left:4px; }

.analytics-page .a-foot { font-size:12px; color:var(--a-muted); }
.analytics-page .a-foot summary { cursor:pointer; font-weight:500; }
.analytics-page .a-foot ul { margin:8px 0 0; padding-left:18px; }
.analytics-page .a-foot li { margin:3px 0; }

/* Multi-section pages */
.part { display:flex; flex-direction:column; gap:16px; }
.part-body { display:flex; flex-direction:column; gap:16px; }
.part-title { margin:18px 0 0; font-size:20px; font-weight:700; color:var(--navy-text); padding-bottom:10px; border-bottom:1px solid var(--line); position:relative; }
.part-title::after { content:""; position:absolute; left:0; bottom:-1px; width:56px; height:3px; background:var(--orange); }
.part:first-child .part-title { margin-top:0; }

/* Closer leaderboard */
.leaders { display:flex; flex-direction:column; gap:14px; }
.leader { display:grid; grid-template-columns:200px 1fr 190px; align-items:center; gap:14px; }
.leader-who { display:flex; align-items:center; gap:12px; min-width:0; }
.leader-rank { flex:none; width:28px; height:28px; border-radius:50%; display:grid; place-items:center; font:700 13px var(--head); background:var(--bg); color:var(--navy-text); border:1px solid var(--line); }
.leader.first .leader-rank { background:var(--orange); color:#fff; border-color:var(--orange); }
.leader-name { font-weight:600; color:var(--navy-text); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.leader-bar { height:12px; background:var(--bg); border-radius:6px; overflow:hidden; }
.leader-bar div { height:100%; background:var(--teal); border-radius:6px; }
.leader.first .leader-bar div { background:var(--navy); }
.leader-nums { display:flex; flex-direction:column; text-align:right; line-height:1.3; }
.leader-nums strong { font:700 16px var(--head); color:var(--navy-text); }
@media (max-width:760px) { .leader { grid-template-columns:1fr; gap:6px; } .leader-nums { text-align:left; flex-direction:row; gap:10px; align-items:baseline; } }
.card-head { display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; margin-bottom:12px; }
.card-head h3 { margin:0; }

/* Form funnel */
.ffunnel { display:flex; flex-direction:column; gap:12px; }
.ffunnel-row { display:grid; grid-template-columns:130px 1fr 130px; align-items:center; gap:12px; }
.ffunnel-label { font-weight:600; color:var(--navy-text); }
.ffunnel-track { height:26px; background:var(--bg); border-radius:6px; overflow:hidden; }
.ffunnel-fill { height:100%; border-radius:6px; }
.ffunnel-fill.start { background:var(--navy); }
.ffunnel-fill.submit { background:var(--teal); }
.ffunnel-val { text-align:right; }
.ffunnel-val strong { font:700 16px var(--head); color:var(--navy-text); }
@media (max-width:760px) { .ffunnel-row { grid-template-columns:1fr; gap:4px; } .ffunnel-val { text-align:left; } }

/* Webinar filter (sits under the period filter) */
.subfilter { display:flex; align-items:center; gap:10px; flex-wrap:wrap; padding:12px 28px 0; }
.subfilter[hidden] { display:none; }
.subfilter label { font-size:11.5px; font-weight:600; text-transform:uppercase; letter-spacing:.07em; color:var(--muted); }
.subfilter select { min-width:220px; }
@media (max-width:760px) { .subfilter { padding:12px 14px 0; } .subfilter select { flex:1; min-width:0; } }

/* Groups shown when a webinar is picked */
.group { display:flex; flex-direction:column; gap:18px; }
.group + .group { margin-top:14px; padding-top:22px; border-top:2px dashed var(--line); }
.group-head { display:flex; align-items:baseline; justify-content:space-between; gap:12px; flex-wrap:wrap; background:var(--navy); color:#fff; border-radius:10px; padding:12px 18px; border-left:6px solid var(--orange); }
.group-title { margin:0; font:700 17px var(--head); color:#fff; }
.group-note { font-size:12.5px; color:#B9C2BF; }

/* ---- Tabs ---- */
.tabs { display:flex; gap:4px; padding:0 28px; background:var(--card); border-bottom:1px solid var(--line); overflow-x:auto; scrollbar-width:none; }
.tabs::-webkit-scrollbar { display:none; }
.tabs[hidden] { display:none; }
.tab { flex:none; padding:13px 16px 11px; color:var(--muted); text-decoration:none; font-weight:600; font-size:14px; border-bottom:3px solid transparent; margin-bottom:-1px; white-space:nowrap; transition:color .15s, border-color .15s; }
.tab:hover { color:var(--navy-text); }
.tab.active { color:var(--navy-text); border-bottom-color:var(--orange); }
@media (max-width:760px) { .tabs { padding:0 8px; } .tab { padding:12px 12px 10px; } }

/* ---- Two-up layout for infographic cards ---- */
.grid2 { display:grid; gap:18px; grid-template-columns:repeat(auto-fit, minmax(340px, 1fr)); }
.grid2 > .card { margin:0; }

/* ---- Donut ---- */
.donut { display:flex; align-items:center; gap:22px; flex-wrap:wrap; }
.donut-svg { width:190px; height:190px; flex:none; }
.donut-track { fill:none; stroke:var(--bg); stroke-width:16; }
.donut-seg { fill:none; stroke-width:16; transition:stroke-width .15s; }
.donut-seg:hover { stroke-width:19; }
.donut-total { font:700 15px var(--head); fill:var(--navy); dominant-baseline:middle; }
.donut-sub { font:500 8px Manrope, sans-serif; fill:var(--muted); text-transform:uppercase; letter-spacing:.06em; }
.donut-legend { list-style:none; margin:0; padding:0; flex:1; min-width:200px; display:flex; flex-direction:column; gap:7px; }
.donut-legend li { display:grid; grid-template-columns:12px 1fr auto 44px; align-items:center; gap:10px; font-size:13.5px; }
.donut-legend .dot { width:12px; height:12px; border-radius:4px; }
.donut-legend .lbl { color:var(--fg); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.donut-legend .val { font-weight:600; color:var(--navy-text); font-variant-numeric:tabular-nums; }
.donut-legend .pct { text-align:right; color:var(--muted); font-variant-numeric:tabular-nums; }
.card > .donut { margin:2px 0 18px; }

/* ---- Rings ---- */
.rings { display:grid; gap:18px 12px; grid-template-columns:repeat(auto-fit, minmax(128px, 1fr)); justify-items:center; }
.ring { display:flex; flex-direction:column; align-items:center; text-align:center; min-width:130px; }
.ring-svg { width:130px; height:130px; }
.ring-track { fill:none; stroke:var(--bg); stroke-width:11; }
.ring-arc { fill:none; stroke-width:11; stroke-linecap:round; transition:stroke-dasharray .5s; }
.ring-val { font:700 22px var(--head); fill:var(--navy); }
.ring-label { margin-top:8px; font-weight:600; color:var(--navy-text); font-size:14px; }
.ring-sub { font-size:12px; color:var(--muted); }
.ring-tiles { display:grid; gap:14px; grid-template-columns:repeat(auto-fill, minmax(190px, 1fr)); }
.ring-tile { display:flex; flex-direction:column; align-items:center; }
.ring-tile .ring-svg { width:104px; height:104px; margin:6px 0 2px; }
.ring-tile .ring-label:empty { display:none; }

/* ---- Funnel ---- */
.funnel { display:flex; flex-direction:column; gap:2px; }
.funnel-row { display:grid; grid-template-columns:132px 1fr 80px; align-items:center; gap:14px; }
.funnel-label { font-weight:600; color:var(--navy-text); font-size:14px; }
.funnel-lane { display:flex; justify-content:center; }
.funnel-bar { height:38px; border-radius:6px; min-width:6px; transition:width .5s; }
.funnel-val { text-align:right; font:700 18px var(--head); color:var(--navy-text); font-variant-numeric:tabular-nums; }
.funnel-conv { display:flex; align-items:center; justify-content:center; gap:8px; padding:5px 0; }
.funnel-conv .pill { background:var(--bg); color:var(--navy-text); border:1px solid var(--line); }
@media (max-width:760px) { .funnel-row { grid-template-columns:90px 1fr 60px; gap:8px; } .funnel-val { font-size:15px; } }

/* ---- Bar rows: replaces gauges/donuts for rates and rankings with one shared, legible shape
   (label, thin fill track, value) - reused for "Conversion rates" and "Revenue by X" alike. ---- */
.bar-rows { display:flex; flex-direction:column; gap:16px; }
.bar-row { display:grid; grid-template-columns:150px 1fr 100px; align-items:center; gap:14px; }
.bar-row-label { display:flex; flex-direction:column; gap:1px; overflow:hidden; }
.bar-row-label .name { font-weight:600; color:var(--navy-text); font-size:13.5px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.bar-row-label .sub { font-size:11px; color:var(--muted); }
.bar-row-lane { height:10px; background:var(--bg); border-radius:6px; overflow:hidden; }
.bar-row-fill { height:100%; width:0; border-radius:6px; transition:width .7s cubic-bezier(.16,1,.3,1); }
.bar-row-val { text-align:right; font-weight:700; color:var(--navy-text); font-size:14px; font-variant-numeric:tabular-nums; white-space:nowrap; }
.bar-row-val .share { display:block; font-weight:500; color:var(--muted); font-size:11px; }
@media (max-width:600px) { .bar-row { grid-template-columns:100px 1fr 74px; gap:8px; } }

/* ---- Paired bars ---- */
.chart .bar-a { fill:var(--c1); }
.chart .bar-b { fill:var(--c2); }
.chart-key { display:flex; gap:18px; margin:0 0 4px; font-size:13px; color:var(--muted); }
.chart-key .key { display:inline-flex; align-items:center; gap:7px; }
.chart-key .sw { width:12px; height:12px; border-radius:3px; display:inline-block; }
.chart-key .sw.bar-a { background:var(--c1); }
.chart-key .sw.bar-b { background:var(--c2); }

/* ---- Sortable columns + export ---- */
th.sortable-col { cursor:pointer; user-select:none; white-space:nowrap; }
th.sortable-col:hover { color:var(--navy-text); }
th.sortable-col::after { content:"↕"; margin-left:6px; font-size:11px; opacity:.35; }
th.sortable-col[data-dir="desc"]::after { content:"▼"; opacity:1; color:var(--orange); }
th.sortable-col[data-dir="asc"]::after { content:"▲"; opacity:1; color:var(--orange); }
th.sortable-col:focus-visible { outline:2px solid var(--teal); outline-offset:-2px; }
.card { position:relative; }
.card.has-export > h3 { padding-right:96px; }
.export-btn { position:absolute; top:14px; right:14px; padding:5px 11px; font-size:12px; font-weight:600; color:var(--navy-text); border-color:#D8D4C8; }
.export-btn:hover { background:var(--navy); color:#fff; border-color:var(--navy-text); }
header .controls button { font-size:13px; }
#export, #print { color:var(--navy-text); border-color:#D8D4C8; }
#export:hover, #print:hover { background:#F7F6F2; }

/* ---- Print / PDF: just the report ---- */
@media print {
  .side, header .controls, .tabs, .subfilter, .export-btn, .brand { display:none !important; }
  body { background:#fff; }
  header, .period, main { padding-left:0; padding-right:0; position:static; }
  header { border:0; }
  .card, .tile { box-shadow:none; break-inside:avoid; }
  .content { width:100%; }
  .app { display:block; }
  .group-head { -webkit-print-color-adjust:exact; print-color-adjust:exact; }
  .funnel-bar, .donut-seg, .ring-arc, .chart .bar, .chart .bar-a, .chart .bar-b, .leader-bar div { -webkit-print-color-adjust:exact; print-color-adjust:exact; }
}

.tiles.kpis { grid-template-columns:repeat(auto-fit, minmax(150px, 1fr)); }
.tiles.kpis .big { font-size:28px; }

/* ---- Overview > Webinars: one card per webinar ---- */
.wgrid { grid-template-columns:repeat(auto-fit, minmax(380px, 1fr)); align-items:start; }
.wcard { padding:22px; }
.wcard.thu { border-top:4px solid var(--c1); }
.wcard.sun { border-top:4px solid var(--c2); }
.wcard > h3 { font-size:18px; margin-bottom:16px; }
.mini-kpis { display:grid; grid-template-columns:repeat(2, 1fr); gap:12px; }
.mini { background:var(--bg); border-radius:10px; padding:14px 16px; display:flex; flex-direction:column; gap:3px; min-width:0; }
.mini h4 { margin:0; font:600 11.5px Manrope, sans-serif; text-transform:uppercase; letter-spacing:.07em; color:var(--muted); }
.mini .v { font:700 28px var(--head); color:var(--navy); letter-spacing:-.02em; line-height:1.15; }
.mini .delta { text-align:left; margin-top:4px; }
.mini .small { line-height:1.35; }
.wrings { margin-top:20px; padding-top:20px; border-top:1px solid var(--line); grid-template-columns:repeat(2, 1fr); align-items:start; }
.wring { display:flex; flex-direction:column; align-items:center; gap:6px; text-align:center; }
.wring .ring-svg { width:118px; height:118px; }
.wring .ring-sub { font-size:12px; color:var(--muted); max-width:200px; line-height:1.35; }
@media (max-width:480px) { .wgrid { grid-template-columns:1fr; } .mini .v { font-size:24px; } }

/* demo additions */
.demo-banner { background:var(--warn-bg); color:var(--warn-fg); font-size:12.5px; font-weight:500; padding:7px 14px; border-radius:8px; margin:0 0 12px; }
@media print { .demo-banner { display:none; } }
