/* MH Campaign Hub — Makerss Hub's own ads portal.
   Brand from makersshub.com: warm paper & ink, burnt-orange accent, Fraunces + Inter.
   Dark is the default ("mission control"); light follows the website exactly. */

:root {
  color-scheme: dark;
  --bg: #0a090b;
  --bg-2: #111013;
  --panel: rgba(28, 27, 31, 0.62);
  --panel-solid: #161518;
  --panel-hi: rgba(255, 255, 255, 0.045);
  --line: rgba(245, 241, 234, 0.08);
  --line-2: rgba(245, 241, 234, 0.14);
  --text: #f5f1ea;
  --text-2: #c9c3bb;
  --muted: #a8a29b;
  --faint: #6f6a64;
  --accent: #e08a4f;          /* brand accent, dark mode — buttons, glows, focus */
  --accent-hi: #f0a366;
  --accent-deep: #b85c1f;
  --accent-rgb: 224, 138, 79;
  --on-accent: #140c06;
  --series-1: #d0702f;        /* chart: spend (validated vs dark surface) */
  --series-2: #3f86d1;        /* chart: results */
  --series-prev: #5f5a55;     /* previous period, recessive */
  --grid: rgba(245, 241, 234, 0.07);
  --good: #4fd18b;
  --bad: #ff6b5e;
  --warn: #f5b84a;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  --radius: 18px;
  --radius-sm: 11px;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f7f5f1;
  --bg-2: #efebe3;
  --panel: rgba(255, 255, 255, 0.78);
  --panel-solid: #ffffff;
  --panel-hi: rgba(23, 23, 26, 0.025);
  --line: #e3dfd6;
  --line-2: #d6d0c4;
  --text: #17171a;
  --text-2: #3b3a3f;
  --muted: #6b6862;
  --faint: #9a958c;
  --accent: #b85c1f;
  --accent-hi: #9c4c18;
  --accent-deep: #9c4c18;
  --accent-rgb: 184, 92, 31;
  --on-accent: #fffaf4;
  --series-1: #b85c1f;
  --series-2: #2f6fae;
  --series-prev: #b9b3a8;
  --grid: #ebe7df;
  --good: #1f8a4c;
  --bad: #c43d2f;
  --warn: #a86b00;
  --shadow: 0 20px 50px rgba(23, 23, 26, 0.08);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
}
::selection { background: rgba(var(--accent-rgb), 0.35); }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(128, 120, 110, 0.25); border-radius: 10px; border: 2px solid var(--bg); }

/* ------------------------------------------------------------ backdrop */
.backdrop { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.backdrop .glow {
  position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.55;
  animation: drift 26s ease-in-out infinite alternate;
}
.backdrop .g1 { width: 720px; height: 720px; left: -220px; top: -260px; background: radial-gradient(circle, rgba(var(--accent-rgb), 0.38), transparent 65%); }
.backdrop .g2 { width: 640px; height: 640px; right: -200px; bottom: -240px; background: radial-gradient(circle, rgba(184, 92, 31, 0.28), transparent 65%); animation-duration: 32s; }
.backdrop .g3 { width: 420px; height: 420px; right: 22%; top: 18%; background: radial-gradient(circle, rgba(63, 134, 209, 0.12), transparent 65%); animation-duration: 38s; }
.backdrop .grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 20%, transparent 75%);
  opacity: 0.55;
}
:root[data-theme="light"] .backdrop .glow { opacity: 0.35; }
@keyframes drift { to { transform: translate(60px, 40px) scale(1.08); } }

/* ------------------------------------------------------------ shell */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.rail {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  padding: 20px 14px; border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), transparent 40%);
  backdrop-filter: blur(20px);
}
:root[data-theme="light"] .rail { background: rgba(255, 255, 255, 0.5); }
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 26px; }
.brand .chip {
  width: 44px; height: 44px; border-radius: 13px; flex: none; display: grid; place-items: center;
  background: #f7f5f1; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 10px 30px rgba(var(--accent-rgb), 0.28);
}
.brand .chip img { width: 32px; height: auto; }
.brand b { display: block; font: 600 17px/1.1 var(--serif); letter-spacing: -0.3px; }
.brand small { display: block; color: var(--faint); font-size: 10.5px; letter-spacing: 1.4px; text-transform: uppercase; margin-top: 4px; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav h6 { margin: 18px 10px 6px; font-size: 10.5px; letter-spacing: 1.6px; color: var(--faint); text-transform: uppercase; font-weight: 600; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 11px;
  color: var(--muted); font-weight: 550; transition: background 0.15s, color 0.15s;
}
.nav a svg { width: 18px; height: 18px; flex: none; }
.nav a:hover { background: var(--panel-hi); color: var(--text); }
.nav a.on {
  color: var(--text);
  background: linear-gradient(90deg, rgba(var(--accent-rgb), 0.16), rgba(var(--accent-rgb), 0.02));
  box-shadow: inset 2px 0 0 var(--accent);
}
.nav a.on svg { color: var(--accent); }
.nav a .soon { margin-left: auto; font-size: 9.5px; letter-spacing: 1px; color: var(--faint); border: 1px solid var(--line-2); padding: 1px 6px; border-radius: 99px; }
.rail .grow { flex: 1; }
.health {
  border: 1px solid var(--line); border-radius: 14px; padding: 12px 13px; background: var(--panel-hi);
  font-size: 12px; color: var(--muted); display: flex; flex-direction: column; gap: 6px;
}
.health .row { display: flex; align-items: center; gap: 8px; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; position: relative; }
.pulse.up { background: var(--good); }
.pulse.up::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid var(--good); animation: ping 2.4s ease-out infinite; }
.pulse.down { background: var(--bad); }
@keyframes ping { from { opacity: 0.8; transform: scale(0.6); } to { opacity: 0; transform: scale(1.6); } }
.tagline { text-align: center; color: var(--faint); font-size: 10.5px; letter-spacing: 2px; margin-top: 12px; }

main { min-width: 0; padding: 0 34px 80px; }

/* ------------------------------------------------------------ top bar */
.top {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 18px 0 16px; margin-bottom: 8px;
  background: linear-gradient(180deg, var(--bg) 55%, transparent);
}
.top .spacer { flex: 1; }
.control {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--panel); backdrop-filter: blur(14px);
  color: var(--text); font-weight: 550; cursor: pointer; transition: border-color 0.15s, background 0.15s;
}
.control:hover { border-color: rgba(var(--accent-rgb), 0.6); }
.control svg { width: 16px; height: 16px; color: var(--muted); }
.control .k { color: var(--faint); font-weight: 500; }
.control.icon { width: 38px; padding: 0; justify-content: center; }
.control.primary { background: var(--accent); color: var(--on-accent); border-color: transparent; box-shadow: 0 8px 28px rgba(var(--accent-rgb), 0.35); }
.control.primary svg { color: var(--on-accent); }
.sync { color: var(--faint); font-size: 12px; display: inline-flex; align-items: center; gap: 7px; }
.spin { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.menu { position: relative; }
.menu .pop {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 230px; z-index: 40; display: none;
  background: var(--panel-solid); border: 1px solid var(--line-2); border-radius: 14px; padding: 6px;
  box-shadow: var(--shadow);
}
.menu.open .pop { display: block; animation: rise 0.14s ease; }
.menu .pop button {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; background: transparent;
  padding: 9px 11px; border-radius: 9px; cursor: pointer; color: var(--text-2);
}
.menu .pop button:hover { background: var(--panel-hi); color: var(--text); }
.menu .pop button .check { width: 16px; font-weight: 800; color: var(--accent); }
.menu .pop .sep { height: 1px; background: var(--line); margin: 6px 4px; }
.menu .pop .custom { display: flex; gap: 6px; padding: 6px; align-items: center; }
.menu .pop input { flex: 1; min-width: 0; }
@keyframes rise { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------ headings */
.hello { margin: 6px 0 22px; }
.hello h1 { margin: 0; font: 500 38px/1.1 var(--serif); letter-spacing: -1px; }
.hello h1 em { font-style: italic; color: var(--accent); }
.hello p { margin: 8px 0 0; color: var(--muted); font-size: 14.5px; }
.eyebrow { font-size: 11px; letter-spacing: 1.8px; text-transform: uppercase; color: var(--faint); font-weight: 650; }
h2.section { font: 600 20px/1.2 var(--serif); letter-spacing: -0.3px; margin: 34px 0 14px; display: flex; align-items: center; gap: 12px; }
h2.section .count { font: 600 12px var(--sans); color: var(--faint); }

/* ------------------------------------------------------------ cards */
.card {
  position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  backdrop-filter: blur(18px); box-shadow: var(--shadow);
  animation: enter 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 35%);
  mask: linear-gradient(#000, #000) content-box, linear-gradient(#000, #000); padding: 1px;
  -webkit-mask-composite: xor; mask-composite: exclude;
}
:root[data-theme="light"] .card::before { display: none; }
.card .head { display: flex; align-items: center; gap: 10px; padding: 16px 20px 0; }
.card .head { flex-wrap: wrap; row-gap: 6px; }
.card .head h3 { margin: 0; font-size: 13.5px; font-weight: 650; white-space: nowrap; }
.card .head .sub { color: var(--faint); font-size: 12px; }
.card .head .end { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.card .body { padding: 16px 20px 20px; }
@keyframes enter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.stagger > * { animation-delay: calc(var(--i, 0) * 55ms); }

/* hero */
.hero-grid { display: grid; grid-template-columns: minmax(320px, 1.25fr) minmax(0, 2fr); gap: 16px; }
@media (max-width: 1180px) { .hero-grid { grid-template-columns: 1fr; } }
.hero { overflow: hidden; }
.hero::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(600px 240px at 0% 0%, rgba(var(--accent-rgb), 0.22), transparent 60%);
}
.hero .body { position: relative; z-index: 1; padding: 22px 24px 20px; }
.hero .figure { display: flex; align-items: baseline; gap: 10px; margin: 10px 0 6px; }
.hero .figure .cur { color: var(--muted); font-weight: 600; font-size: 18px; }
.hero .figure .num {
  font: 700 58px/1 var(--sans); letter-spacing: -2.5px; font-variant-numeric: proportional-nums;
  text-shadow: 0 0 40px rgba(var(--accent-rgb), 0.25);
}
.hero .meta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; color: var(--muted); font-size: 12.5px; }
.hero { display: flex; flex-direction: column; }
.hero .body { flex: 1; display: flex; flex-direction: column; }
.hero .spark { margin-top: 18px; flex: 1; min-height: 80px; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.tile .body { padding: 16px 18px 14px; }
.tile .label { color: var(--muted); font-size: 12.5px; font-weight: 550; display: flex; align-items: center; gap: 8px; }
.tile .label .key { width: 10px; height: 3px; border-radius: 2px; }
.tile .value { font: 650 28px/1.15 var(--sans); letter-spacing: -0.8px; margin: 8px 0 4px; }
.tile .value small { font-size: 13px; color: var(--muted); font-weight: 600; letter-spacing: 0; margin-right: 4px; }
.tile .foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 22px; }
.tile .spark { width: 84px; height: 24px; }

.delta { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 650; padding: 2px 8px; border-radius: 99px; }
.delta.good { color: var(--good); background: color-mix(in srgb, var(--good) 13%, transparent); }
.delta.bad { color: var(--bad); background: color-mix(in srgb, var(--bad) 13%, transparent); }
.delta.flat { color: var(--muted); background: var(--panel-hi); }
.delta .vs { color: var(--faint); font-weight: 500; }

/* charts */
.charts { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; margin-top: 16px; }
@media (max-width: 1180px) { .charts { grid-template-columns: minmax(0, 1fr); } }
.charts .body { overflow-x: auto; }
.chart { position: relative; height: 260px; }
.chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chart .axis text { fill: var(--faint); font-size: 11px; }
.chart .gridline { stroke: var(--grid); stroke-width: 1; }
.chart .line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .draw { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: draw 1.1s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.chart .bar { transition: opacity 0.15s; transform-origin: bottom; animation: grow 0.7s cubic-bezier(0.16, 1, 0.3, 1) both; }
@keyframes grow { from { transform: scaleY(0); } }
.chart .bar.dim { opacity: 0.35; }
.chart .cross { stroke: var(--line-2); stroke-width: 1; }
.chart .dot { stroke: var(--panel-solid); stroke-width: 2; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 12px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 14px; height: 2px; border-radius: 2px; display: inline-block; }
.legend i.box { width: 10px; height: 10px; border-radius: 3px; }
.tip {
  position: fixed; z-index: 60; pointer-events: none; min-width: 170px;
  background: var(--panel-solid); border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 12px;
  box-shadow: var(--shadow); font-size: 12px; opacity: 0; transition: opacity 0.12s;
}
.tip.on { opacity: 1; }
.tip .when { color: var(--faint); margin-bottom: 6px; font-weight: 600; }
.tip .r { display: flex; align-items: center; gap: 8px; margin-top: 3px; }
.tip .r b { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text); }
.tip .r span { color: var(--muted); }
.tip .r i { width: 12px; height: 2px; border-radius: 2px; }
.tabs { display: inline-flex; background: var(--panel-hi); border: 1px solid var(--line); border-radius: 99px; padding: 3px; gap: 2px; }
.tabs button { border: 0; background: transparent; padding: 4px 11px; border-radius: 99px; font-size: 12px; font-weight: 600; color: var(--muted); cursor: pointer; }
.tabs button.on { background: var(--accent); color: var(--on-accent); }
.linkbtn { border: 0; background: transparent; color: var(--muted); font-size: 12px; cursor: pointer; padding: 2px 4px; text-decoration: underline; text-underline-offset: 3px; }
.linkbtn:hover { color: var(--text); }

/* signals */
.signals { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.signal { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; }
.signal .ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; background: rgba(var(--accent-rgb), 0.14); color: var(--accent); }
.signal .ic svg { width: 16px; height: 16px; }
.signal.good .ic { background: color-mix(in srgb, var(--good) 14%, transparent); color: var(--good); }
.signal.bad .ic { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); }
.signal b { display: block; font-weight: 650; margin-bottom: 2px; }
.signal p { margin: 0; color: var(--muted); font-size: 12.5px; }

/* tables */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
table.data th {
  text-align: right; font-size: 11px; letter-spacing: 0.8px; text-transform: uppercase; color: var(--faint);
  font-weight: 650; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.data th:first-child, table.data td:first-child { text-align: left; }
table.data td { text-align: right; padding: 13px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data tbody tr { transition: background 0.12s; }
table.data tbody tr.link { cursor: pointer; }
table.data tbody tr.link:hover { background: var(--panel-hi); }
table.data tbody tr:last-child td { border-bottom: 0; }
.cname { display: flex; flex-direction: column; gap: 4px; max-width: 420px; white-space: normal; }
.cname b { font-weight: 600; line-height: 1.3; }
.cname .tags { display: flex; gap: 6px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 99px; border: 1px solid var(--line-2); color: var(--muted); }
.pill .d { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }
.pill.active { color: var(--good); border-color: color-mix(in srgb, var(--good) 40%, transparent); }
.pill.active .d { background: var(--good); box-shadow: 0 0 8px var(--good); }
.pill.accent { color: var(--accent); border-color: rgba(var(--accent-rgb), 0.4); }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.mono { font-family: var(--mono); font-size: 12px; }
.num-strong { font-weight: 650; }

/* campaign detail */
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 550; margin: 4px 0 10px; }
.back:hover { color: var(--text); }
.ads { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.ad { overflow: hidden; display: flex; flex-direction: column; }
.ad .img { aspect-ratio: 1 / 1; background: var(--bg-2) center / cover no-repeat; position: relative; }
.ad .img .pill { position: absolute; top: 10px; left: 10px; background: var(--panel-solid); }
.ad .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; }
.ad .title { font-weight: 650; line-height: 1.3; }
.ad .copy { color: var(--muted); font-size: 12.5px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ad .stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 4px; border-top: 1px solid var(--line); padding-top: 10px; }
.ad .stats div { display: flex; flex-direction: column; }
.ad .stats span { color: var(--faint); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.6px; }
.ad .stats b { font-size: 14px; font-variant-numeric: tabular-nums; }
.facts { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }

/* clients */
.matrix td.tick, .matrix th.tick { text-align: center; }
.matrix input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }
.why { display: block; font-size: 10px; color: var(--faint); margin-top: 2px; letter-spacing: 0.4px; }
.why.rule { color: var(--accent); }
.unassigned td:first-child b::after { content: "unassigned"; margin-left: 8px; font-size: 10px; color: var(--warn); border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent); padding: 1px 6px; border-radius: 99px; font-weight: 600; }
.client-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field label { font-size: 12px; color: var(--muted); font-weight: 600; }
input[type="text"], input[type="date"], select {
  font: inherit; color: var(--text); background: var(--bg-2); border: 1px solid var(--line-2);
  border-radius: 10px; padding: 8px 11px; width: 100%;
}
input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.18); }
.btnrow { display: flex; gap: 10px; align-items: center; margin-top: 18px; }

/* settings */
.perm { display: flex; flex-wrap: wrap; gap: 8px; }
.perm .pill.ok { color: var(--text-2); }
.perm .pill.ok .d { background: var(--good); }
.perm .pill.miss { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.kv { display: grid; grid-template-columns: 170px 1fr; gap: 10px 16px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

/* soon */
.soon-hero { text-align: center; padding: 70px 30px; }
.soon-hero h2 { font: 500 34px/1.15 var(--serif); letter-spacing: -0.8px; margin: 14px 0 10px; }
.soon-hero p { color: var(--muted); max-width: 560px; margin: 0 auto; }
.soon-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin: 30px auto 0; max-width: 900px; text-align: left; }

/* states */
.loading { opacity: 0.45; transition: opacity 0.2s; pointer-events: none; }
.empty { text-align: center; color: var(--muted); padding: 40px 20px; }
.error { border-color: color-mix(in srgb, var(--bad) 45%, transparent); }
.error .body { color: var(--text-2); }
.error b { color: var(--bad); }
.skeleton { height: 120px; border-radius: var(--radius); background: linear-gradient(90deg, var(--panel-hi), rgba(var(--accent-rgb), 0.06), var(--panel-hi)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 70; background: var(--panel-solid); border: 1px solid var(--line-2); border-left: 3px solid var(--good); border-radius: 12px; padding: 12px 16px; box-shadow: var(--shadow); animation: rise 0.2s ease; max-width: 420px; }
.toast.err { border-left-color: var(--bad); }
.toast ul { margin: 6px 0 0; padding-left: 18px; color: var(--muted); }

@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .rail { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .rail .nav { flex-direction: row; flex-wrap: wrap; }
  .rail .nav h6, .rail .grow, .rail .health, .tagline { display: none; }
  main { padding: 0 16px 60px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .chart .draw { stroke-dashoffset: 0; }
}

/* ------------------------------------------------------------ funnel: ad to customer */
.funnel { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.funnel .step {
  position: relative; padding: 14px 16px 12px; border-radius: var(--radius-sm);
  background: var(--panel-hi); border: 1px solid var(--line);
  animation: enter 0.5s cubic-bezier(0.16, 1, 0.3, 1) both; animation-delay: calc(var(--i, 0) * 70ms);
}
.funnel .foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; font-size: 11.5px; min-height: 17px; }
.funnel .rate { font-weight: 650; color: var(--text-2); }
.funnel .step .eyebrow { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.funnel .src { font-size: 9.5px; letter-spacing: 1px; padding: 1px 6px; border-radius: 99px; border: 1px solid var(--line-2); color: var(--faint); }
.funnel .src.crm { color: var(--series-2); border-color: color-mix(in srgb, var(--series-2) 45%, transparent); }
.funnel .n { font: 650 30px/1.1 var(--sans); letter-spacing: -1px; margin: 10px 0 10px; font-variant-numeric: tabular-nums; }
.funnel .bar { height: 6px; border-radius: 99px; background: var(--grid); overflow: hidden; }
.funnel .bar i {
  display: block; height: 100%; border-radius: inherit; background: var(--series-1);
  animation: grow 0.9s cubic-bezier(0.16, 1, 0.3, 1) both; animation-delay: calc(var(--i, 0) * 70ms + 150ms); transform-origin: left;
}
.funnel .hero-step { border-color: rgba(var(--accent-rgb), 0.55); background: linear-gradient(160deg, rgba(var(--accent-rgb), 0.16), transparent 70%); box-shadow: 0 0 40px rgba(var(--accent-rgb), 0.14); }
.funnel .hero-step .n { color: var(--accent); text-shadow: 0 0 30px rgba(var(--accent-rgb), 0.3); }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.note { font-size: 12px; margin: 14px 0 0; }
.accent-tile { border-color: rgba(var(--accent-rgb), 0.5); }
.accent-tile .value { color: var(--accent); }
.channels { display: flex; flex-direction: column; gap: 8px; }
.chan { display: grid; grid-template-columns: 10px minmax(0, 150px) minmax(0, 1fr); align-items: center; gap: 10px; font-size: 13px; }
.chan .d { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 8px var(--good); }
.chan.off .d { background: var(--faint); box-shadow: none; }
.chan.off b { color: var(--faint); font-weight: 550; }
table.data.compact td, table.data.compact th { padding: 8px 10px; }
@media (prefers-reduced-motion: reduce) { .funnel .step, .funnel .bar i { animation: none; } }

/* A client's share link: their report only. */
body.share .nav h6, body.share .nav a:not([data-route="overview"]), body.share .health { display: none; }

/* Signed out: nothing but the passphrase box. */
body.locked .rail, body.locked #top { display: none; }
body.locked .shell { grid-template-columns: minmax(0, 1fr); }
.login { min-height: 80vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.login img { border-radius: 12px; }
.login input { width: min(320px, 100%); height: 44px; padding: 0 14px; border-radius: 12px; font-size: 15px; }
.login button { width: min(320px, 100%); justify-content: center; }
