/* Specialist: light (white) theme only. */
:root {
  color-scheme: light;
  --page: #ffffff;
  --surface: #ffffff;
  --surface-2: #f5f5f3;
  --sidebar: #fafaf9;
  --text: #0b0b0b;
  --text-2: #52514e;
  --muted: #898781;
  --grid: #ecebe6;
  --axis: #c3c2b7;
  --border: #e6e5e0;
  --accent: #2a78d6;
  --accent-soft: #eaf2fc;
  --accent-ink: #1c5cab;
  --good: #0ca30c;
  --good-text: #006300;
  --warning: #fab219;
  --critical: #d03b3b;
  --info: #2a78d6;
  --heat-0: #f0efec;
  --seq-1: #cde2fb; --seq-2: #9ec5f4; --seq-3: #6da7ec; --seq-4: #3987e5;
  --seq-5: #256abf; --seq-6: #184f95; --seq-7: #0d366b;
  --shadow: 0 1px 2px rgba(16, 16, 16, 0.04);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--text); font-size: 14px; line-height: 1.5; }
[hidden] { display: none !important; }
a { color: var(--accent-ink); }
code { font-size: 0.92em; background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }
h1, h2, h3 { margin: 0; }
h1 { font-size: 22px; letter-spacing: -0.01em; }
h2 { font-size: 15px; font-weight: 600; }
h3 { font-size: 13px; font-weight: 600; color: var(--text-2); }
.muted { color: var(--muted); font-size: 12px; }
.sub { display: block; color: var(--muted); font-size: 11.5px; }

.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; }
.logo { width: 22px; height: 22px; border-radius: 6px; background: linear-gradient(135deg, #2a78d6 0 50%, #1baf7a 50% 100%); flex: none; }

.btn {
  display: inline-flex; align-items: center; gap: 10px; font: inherit; font-weight: 600; text-decoration: none;
  color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 11px 18px; cursor: pointer;
}
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.06); }
.btn.small { padding: 5px 12px; font-size: 13px; border-radius: 8px; }
.btn[aria-disabled="true"] { opacity: 0.5; pointer-events: none; }
.linkish { font: inherit; background: none; border: 0; padding: 0; color: var(--accent-ink); cursor: pointer; text-decoration: underline; }
.pill { display: inline-block; font-size: 10.5px; font-weight: 600; letter-spacing: 0.02em; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); margin-left: 6px; vertical-align: 1px; white-space: nowrap; }
.pill.on { background: #e6f4e6; color: var(--good-text); }
.alert { border-radius: 10px; padding: 10px 14px; margin-top: 16px; border: 1px solid var(--border); background: var(--surface); }
.alert.critical { border-left: 4px solid var(--critical); }
.note { color: var(--text-2); font-size: 13px; margin-top: 16px; }
.fine { color: var(--muted); font-size: 12px; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--grid); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 0 auto 16px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Top bar used by the Connection Check page */
.topbar, .landing-top { display: flex; align-items: center; gap: 16px; padding: 14px 24px; border-bottom: 1px solid var(--border); background: var(--surface); }

/* Landing */
.hero { max-width: 760px; margin: 0 auto; padding: 72px 24px 48px; }
.hero h1 { font-size: clamp(28px, 5vw, 42px); line-height: 1.15; letter-spacing: -0.02em; }
.lead { font-size: 17px; color: var(--text-2); margin: 16px 0 28px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.features { list-style: none; padding: 0; margin: 48px 0 24px; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.features li { background: var(--surface-2); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.features span { color: var(--text-2); font-size: 13px; }

/* App shell: sidebar + main */
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--sidebar); border-right: 1px solid var(--border); padding: 18px 12px; display: flex; flex-direction: column; gap: 18px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar .brand { padding: 0 8px; }
#nav { display: flex; flex-direction: column; gap: 14px; flex: 1; }
.nav-group > .nav-title { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding: 0 10px 4px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; color: var(--text-2); text-decoration: none; font-weight: 500; }
.nav-item svg { width: 17px; height: 17px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item[aria-current="page"] { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.side-foot { border-top: 1px solid var(--border); padding: 12px 8px 0; font-size: 12px; color: var(--text-2); display: flex; flex-direction: column; gap: 6px; }
.who { overflow-wrap: anywhere; }
.side-links { display: flex; gap: 12px; flex-wrap: wrap; }

.main { min-width: 0; display: flex; flex-direction: column; }
.toolbar { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; padding: 12px 28px; border-bottom: 1px solid var(--border); background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(6px); position: sticky; top: 0; z-index: 20; }
.field { display: flex; flex-direction: column; font-size: 11px; color: var(--muted); gap: 3px; }
.field.grow { flex: 1; min-width: 200px; max-width: 420px; }
select { font: inherit; font-size: 13px; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; width: 100%; }
.banner { background: var(--accent-soft); color: var(--accent-ink); padding: 8px 28px; font-size: 13px; }
.view { padding: 22px 28px 64px; max-width: 1400px; width: 100%; }

.seg { display: inline-flex; background: var(--surface-2); border-radius: 8px; padding: 2px; flex-wrap: wrap; }
.seg button { font: inherit; font-size: 12.5px; border: 0; background: none; color: var(--text-2); padding: 4px 11px; border-radius: 6px; cursor: pointer; }
.seg button[aria-selected="true"] { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: 0 0 0 1px var(--border), var(--shadow); }

/* Page header + breadcrumbs */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.crumbs a { color: var(--text-2); text-decoration: none; }
.crumbs a:hover { color: var(--accent-ink); text-decoration: underline; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head p { margin: 4px 0 0; color: var(--text-2); max-width: 760px; }
.range-note { color: var(--muted); font-size: 12px; }

/* KPI tiles */
.kpis { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
@media (max-width: 1280px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 560px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; background: var(--surface); }
.kpi .label { color: var(--text-2); font-size: 12px; }
.kpi .value { font-size: clamp(17px, 1.6vw, 22px); font-weight: 650; letter-spacing: -0.01em; margin: 1px 0; }
.kpi .delta { font-size: 11.5px; color: var(--muted); }
.good-d { color: var(--good-text); font-weight: 600; }
.bad-d { color: var(--critical); font-weight: 600; }

/* Cards & grids */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px; margin-bottom: 16px; box-shadow: var(--shadow); min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.card-head .muted { display: block; margin-top: 2px; }
.grid-main { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 16px; }
.grid-main > .card { margin-bottom: 16px; }
@media (max-width: 1100px) { .grid-main { grid-template-columns: 1fr; } }
.chart-box { position: relative; height: 290px; }
.chart-box.share { height: 290px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 12px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; max-width: 260px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.legend em { font-style: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chart-note { color: var(--muted); font-size: 11.5px; margin-top: 6px; }

/* Highlight cards */
.highlights { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-bottom: 16px; }
.hl { border: 1px solid var(--border); border-radius: 12px; padding: 14px; background: var(--surface); text-align: left; font: inherit; color: inherit; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
button.hl { cursor: pointer; }
button.hl:hover { border-color: var(--accent); }
.hl .hl-label { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; color: var(--text-2); }
.hl .dot { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; color: #fff; font-weight: 700; }
.hl .dot.good { background: var(--good); }
.hl .dot.warn { background: var(--warning); color: #0b0b0b; }
.hl .dot.crit { background: var(--critical); }
.hl .dot.info { background: var(--info); }
.hl .hl-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hl .hl-fig { font-size: 20px; font-weight: 650; }
.hl .hl-sub { font-size: 12px; color: var(--text-2); }

/* Tables */
.table-tools { display: flex; gap: 10px; align-items: center; }
.table-tools input:not([type=checkbox]):not([type=radio]) { font: inherit; font-size: 13px; border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; width: 220px; }
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.data th { text-align: right; font-weight: 600; font-size: 12px; color: var(--text-2); padding: 7px 10px; border-bottom: 1px solid var(--axis); white-space: nowrap; background: var(--surface); }
.data th.sortable { cursor: pointer; user-select: none; }
.data th.sortable:hover, .data th[aria-sort] { color: var(--text); }
.data td { text-align: right; padding: 8px 10px; border-bottom: 1px solid var(--grid); white-space: nowrap; }
.data th:first-child, .data td:first-child { text-align: left; }
.data td:first-child { white-space: normal; min-width: 200px; max-width: 420px; }
.data tbody tr:hover td { background: #f8f8f6; }
.data tr.clickable { cursor: pointer; }
.data tr.clickable td:first-child .nm { color: var(--accent-ink); font-weight: 500; }
.data tr.clickable td:first-child .nm::after { content: " ›"; color: var(--muted); }
.data tfoot td { font-weight: 600; border-top: 1px solid var(--axis); border-bottom: 0; }
.bar-cell { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.bar-cell .track { width: 64px; display: flex; }
.bar-cell .bar { height: 6px; border-radius: 3px; background: var(--accent); }
.d-small { display: block; font-size: 11px; }
.flag { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; color: var(--critical); }
.qs { display: inline-block; min-width: 24px; text-align: center; border-radius: 4px; padding: 0 4px; font-weight: 600; font-size: 11px; margin-left: 6px; }
.qs.low { color: var(--critical); background: #fbeaea; }
.qs.mid { color: var(--text-2); background: var(--surface-2); }
.qs.high { color: var(--good-text); background: #e6f4e6; }
.empty { color: var(--text-2); padding: 18px 4px; }

/* Insights (overview) */
.insights { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 10px; }
.insight { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; display: grid; grid-template-columns: 22px 1fr; gap: 10px; }
.insight .icon { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff; margin-top: 1px; }
.insight.critical .icon { background: var(--critical); }
.insight.warning .icon { background: var(--warning); color: #0b0b0b; }
.insight.good .icon { background: var(--good); }
.insight.info .icon { background: var(--info); }
.insight .tag { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.insight .title { font-weight: 600; margin: 1px 0 4px; }
.insight .detail { color: var(--text-2); font-size: 13px; }
.insight .action { font-size: 13px; margin-top: 6px; }
.insight .action::before { content: "→ "; color: var(--muted); }

/* Heatmap */
.heatmap { display: grid; grid-template-columns: 34px repeat(24, minmax(0, 1fr)); gap: 2px; font-size: 10px; color: var(--muted); }
.heatmap .cell { aspect-ratio: 1; border-radius: 3px; background: var(--heat-0); min-height: 12px; }
.heatmap .cell:hover { outline: 2px solid var(--text); outline-offset: -1px; }
.heatmap .rowlabel { align-self: center; }
.heatmap .collabel { text-align: center; }
.heat-legend { display: flex; align-items: center; gap: 6px; justify-content: flex-end; margin-top: 10px; font-size: 11px; color: var(--muted); }
.heat-legend .swatch { width: 18px; height: 10px; border-radius: 2px; }

.state { text-align: center; padding: 80px 24px; color: var(--text-2); }
.state h2 { font-size: 18px; margin-bottom: 8px; color: var(--text); }

.tooltip { position: fixed; z-index: 100; pointer-events: none; background: #fff; color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; font-size: 12px; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1); max-width: 300px; font-variant-numeric: tabular-nums; }
.tooltip b { display: block; margin-bottom: 4px; }
.tooltip .row { display: flex; justify-content: space-between; gap: 16px; color: var(--text-2); }
.tooltip .row span:first-child { display: inline-flex; align-items: center; gap: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tooltip .row span:last-child { color: var(--text); }
.tooltip .row i { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.tooltip .row.total { border-top: 1px solid var(--grid); margin-top: 3px; padding-top: 3px; font-weight: 600; }

/* Narrow screens: sidebar becomes a scrollable top nav */
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; align-items: center; padding: 10px 16px; gap: 12px; overflow-x: auto; }
  #nav { flex-direction: row; gap: 4px; }
  .nav-group { display: flex; gap: 2px; }
  .nav-group > .nav-title, .side-foot .who { display: none; }
  .nav-item { white-space: nowrap; padding: 6px 10px; }
  .side-foot { border: 0; padding: 0; flex-direction: row; white-space: nowrap; }
  .toolbar, .view, .banner { padding-left: 16px; padding-right: 16px; }
  .toolbar { position: static; }
  .insights { grid-template-columns: 1fr; }
  .table-tools input:not([type=checkbox]):not([type=radio]) { width: 150px; }
}

/* ---- v3: dual-metric charts, tree tables, creatives, MoM/WoW, prospecting vs remarketing ---- */
.pair { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.pair select { width: auto; padding: 4px 8px; font-size: 12.5px; }
.pair .bar-key, .pair .line-key { display: inline-block; width: 12px; height: 10px; border-radius: 2px; vertical-align: -1px; }
.pair .line-key { height: 3px; border-radius: 2px; vertical-align: 2px; }

/* Tree table */
.data td.nm-cell { display: flex; align-items: flex-start; gap: 6px; }
.caret { flex: none; width: 22px; height: 22px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text-2); cursor: pointer; font-size: 11px; line-height: 1; display: grid; place-items: center; margin-top: 1px; }
.caret:hover { border-color: var(--accent); color: var(--accent-ink); }
.caret[aria-expanded="true"] { background: var(--accent-soft); color: var(--accent-ink); border-color: var(--accent); }
.caret-space { flex: none; width: 22px; }
.nm-wrap { min-width: 0; flex: 1; }
.details-btn { font: inherit; font-size: 11.5px; border: 1px solid var(--border); background: var(--surface); color: var(--accent-ink); border-radius: 6px; padding: 1px 8px; cursor: pointer; margin-left: 6px; vertical-align: 1px; white-space: nowrap; }
.details-btn:hover { border-color: var(--accent); }
.details-btn[aria-pressed="true"] { background: var(--accent); color: #fff; border-color: var(--accent); }
.data tr.lvl-1 td { background: #fbfbfa; }
.data tr.lvl-2 td { background: #f6f6f4; }
.data tr.lvl-1 td:first-child { padding-left: 34px; }
.data tr.lvl-2 td:first-child { padding-left: 58px; }
.data tr.child-note td { color: var(--muted); font-size: 12px; text-align: left; }
.data tr.selected td { background: var(--accent-soft) !important; }
.data tbody tr.row-click { cursor: pointer; }

/* Detail panel */
.drill { border: 1px solid var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.detail-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.detail-head h2 { font-size: 18px; }
.close-btn { font: inherit; border: 1px solid var(--border); background: var(--surface); border-radius: 8px; padding: 4px 10px; cursor: pointer; color: var(--text-2); }
.close-btn:hover { border-color: var(--text-2); color: var(--text); }
.section-title { margin: 22px 0 12px; font-size: 17px; }

/* Creative gallery */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.creative { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--surface); cursor: pointer; text-align: left; font: inherit; color: inherit; padding: 0; display: flex; flex-direction: column; }
.creative:hover { border-color: var(--accent); }
.creative[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.thumb { aspect-ratio: 16 / 9; background: var(--surface-2); display: grid; place-items: center; position: relative; overflow: hidden; color: var(--text-2); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .ph { font-size: 12px; padding: 12px; text-align: center; }
.thumb .ph svg { width: 28px; height: 28px; stroke: currentColor; fill: none; stroke-width: 1.6; display: block; margin: 0 auto 6px; }
.thumb.text { background: #f7f9fc; align-items: center; padding: 14px; }
.thumb.text q { font-size: 14px; font-weight: 600; color: var(--text); quotes: "“" "”"; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.thumb .play { position: absolute; width: 38px; height: 38px; border-radius: 50%; background: rgba(0, 0, 0, 0.6); display: grid; place-items: center; }
.thumb .play::after { content: ""; border-left: 12px solid #fff; border-top: 8px solid transparent; border-bottom: 8px solid transparent; margin-left: 3px; }
.cr-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; }
.cr-name { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cr-meta { display: flex; justify-content: space-between; align-items: center; font-size: 11.5px; color: var(--muted); gap: 6px; }
.cr-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; font-size: 11px; color: var(--muted); }
.cr-stats b { display: block; color: var(--text); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.plabel { font-size: 10.5px; font-weight: 700; letter-spacing: 0.04em; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.plabel.BEST { background: #e6f4e6; color: var(--good-text); }
.plabel.GOOD { background: var(--accent-soft); color: var(--accent-ink); }
.plabel.LOW { background: #fbeaea; color: var(--critical); }

/* Prospecting vs remarketing */
.pr-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
@media (max-width: 1100px) { .pr-grid { grid-template-columns: 1fr; } }
.split-row { display: grid; grid-template-columns: 110px 1fr; gap: 10px; align-items: center; margin-bottom: 10px; font-size: 12.5px; }
.split-row .lbl { color: var(--text-2); }
.split-bar { display: flex; height: 22px; border-radius: 6px; overflow: hidden; gap: 2px; background: var(--surface); }
.split-bar span { display: flex; align-items: center; padding: 0 8px; color: #fff; font-size: 11.5px; font-weight: 600; white-space: nowrap; min-width: 0; overflow: hidden; }
.pr-rules { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 12px; font-size: 12px; color: var(--text-2); }
.pr-rules input { font: inherit; font-size: 12.5px; border: 1px solid var(--border); border-radius: 8px; padding: 5px 9px; flex: 1; min-width: 240px; }
.pr-list { margin-top: 10px; font-size: 12.5px; color: var(--text-2); }
.pr-list summary { cursor: pointer; color: var(--accent-ink); }
.pr-list ul { margin: 6px 0 0; padding-left: 18px; columns: 2; }
.win { color: var(--good-text); font-weight: 600; }

/* MoM / WoW column picker */
.colpick { position: relative; }
.colpick summary { list-style: none; cursor: pointer; font-size: 12.5px; border: 1px solid var(--border); border-radius: 8px; padding: 5px 10px; background: var(--surface); }
.colpick summary::-webkit-details-marker { display: none; }
.colpick[open] summary { border-color: var(--accent); }
.colpick .menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); padding: 8px; display: grid; gap: 2px; min-width: 200px; }
.colpick label { display: flex; gap: 8px; align-items: center; padding: 5px 8px; border-radius: 6px; font-size: 13px; cursor: pointer; }
.colpick label:hover { background: var(--surface-2); }
.chg { display: block; font-size: 11px; }
.data td.num-cell { vertical-align: top; }
.toolbar .field[hidden] { display: none !important; }

/* Insights page */
.kpis.cmp { grid-template-columns: repeat(7, minmax(0, 1fr)); }
@media (max-width: 1280px) { .kpis.cmp { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 560px) { .kpis.cmp { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpis.cmp .d-small { color: var(--muted); margin-top: 2px; }
.spark { display: block; margin-left: auto; }
.kpis.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 560px) { .kpis.five { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.grid-main.half { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 1100px) { .grid-main.half { grid-template-columns: 1fr; } }
.data tr.lvl-3 td { background: #f1f1ee; }
.data tr.lvl-3 td:first-child { padding-left: 82px; }

/* India map (Locations) */
.map-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 1100px) { .map-grid { grid-template-columns: 1fr; } }
.india { position: relative; max-width: 560px; margin: 0 auto; width: 100%; }
.india svg { width: 100%; height: auto; display: block; }
.india path { stroke: #fff; stroke-width: 0.8; cursor: pointer; transition: opacity 0.15s; }
.india path:hover { stroke: var(--text); stroke-width: 1.6; }
.india path.nodata { cursor: default; }
.india path.selected { stroke: var(--text); stroke-width: 2; }
.map-legend { display: flex; align-items: center; gap: 4px; justify-content: center; font-size: 11px; color: var(--muted); margin-top: 8px; flex-wrap: wrap; }
.map-legend .swatch { width: 22px; height: 10px; border-radius: 2px; }
.rank { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.rank li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 8px; align-items: center; font-size: 13px; cursor: pointer; padding: 3px 4px; border-radius: 6px; }
.rank li:hover { background: var(--surface-2); }
.rank .n { color: var(--muted); font-variant-numeric: tabular-nums; }
.rank .nm2 { min-width: 0; }
.rank .nm2 span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank .track2 { height: 5px; border-radius: 3px; background: var(--surface-2); margin-top: 3px; }
.rank .track2 i { display: block; height: 100%; border-radius: 3px; background: var(--accent); }
.rank .v { font-variant-numeric: tabular-nums; font-weight: 600; }
.map-credit { font-size: 10.5px; color: var(--muted); text-align: center; margin-top: 4px; }

/* Trend filters */
.filterbar { padding: 12px 16px; }
.fb-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; }
.fb-row select:disabled { color: var(--muted); background: var(--surface-2); }

/* Top 5 insights */
.takeaways { border-left: 4px solid var(--accent); }
.takeaways ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.takeaways li { display: grid; grid-template-columns: 20px 1fr; gap: 8px; align-items: baseline; font-size: 14px; line-height: 1.45; }
.takeaways .ti { font-size: 11px; font-weight: 700; text-align: center; }
.takeaways li.good .ti { color: var(--good-text); }
.takeaways li.bad .ti { color: var(--critical); }
.takeaways li.info .ti { color: var(--accent); }
.rank-n { display: inline-block; width: 20px; color: var(--muted); font-variant-numeric: tabular-nums; }
h2 .dot { display: inline-grid; width: 18px; height: 18px; border-radius: 50%; place-items: center; font-size: 11px; color: #fff; font-weight: 700; vertical-align: 1px; }
h2 .dot.good { background: var(--good); }
h2 .dot.crit { background: var(--critical); }

/* Date range + comparison */

/* Profile menu (top right) */
.profile { position: relative; margin-left: auto; align-self: center; }
.avatar { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; font: inherit; font-weight: 700; font-size: 13px; cursor: pointer; display: grid; place-items: center; }
.avatar:hover { filter: brightness(1.08); }
.avatar.big { width: 44px; height: 44px; font-size: 15px; cursor: default; flex: none; }
.profile-menu { position: absolute; right: 0; top: calc(100% + 8px); width: 290px; background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12); padding: 10px; z-index: 50; display: grid; gap: 2px; }
.pm-head { display: flex; gap: 10px; align-items: center; padding: 6px 6px 10px; border-bottom: 1px solid var(--grid); margin-bottom: 4px; }
.pm-head b { display: block; font-size: 14px; }
.pm-head span { display: block; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.pm-row { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--text-2); padding: 4px 6px; }
.pm-row b { color: var(--text); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; }
.pm-link { display: block; width: 100%; text-align: left; font: inherit; font-size: 13px; color: var(--text); background: none; border: 0; padding: 7px 6px; border-radius: 6px; cursor: pointer; text-decoration: none; }
.pm-link:hover { background: var(--surface-2); }
.pm-link.danger { color: var(--critical); border-top: 1px solid var(--grid); border-radius: 0 0 6px 6px; margin-top: 4px; }

/* Page header: right-hand slot */
.head-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }

/* Recommendations */
.recs { border-left: 4px solid var(--good); }
.recs ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.recs li { display: grid; grid-template-columns: 22px 1fr; gap: 8px; font-size: 14px; line-height: 1.45; }
.recs .ri { width: 20px; height: 20px; border-radius: 50%; background: #e6f4e6; color: var(--good-text); font-size: 11px; font-weight: 700; display: grid; place-items: center; margin-top: 1px; }
.recs .proj { display: block; font-size: 12.5px; color: var(--text-2); margin-top: 2px; }
.recs .proj b { color: var(--good-text); }
.recs .assume { font-size: 11.5px; color: var(--muted); margin: 10px 0 0; }
.is-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; min-width: 120px; background: var(--surface-2); gap: 1px; }
.is-bar i { display: block; height: 100%; }

/* ---- Compact, screen-responsive sizing (fits 1280–1536px laptops, scales up and down) ---- */
.shell { grid-template-columns: clamp(188px, 15vw, 236px) minmax(0, 1fr); }
.view { padding: clamp(12px, 1.5vw, 22px) clamp(12px, 2vw, 28px) 48px; }
.toolbar { padding: 8px clamp(12px, 2vw, 28px); gap: 10px; }
h1 { font-size: clamp(18px, 1.5vw, 22px); }
.page-head { margin-bottom: 12px; }
.card { padding: clamp(12px, 1.1vw, 18px); margin-bottom: clamp(10px, 1vw, 16px); }
.kpis { gap: 8px; margin-bottom: clamp(10px, 1vw, 16px); }
.kpi { padding: 8px 10px; border-radius: 10px; }
.kpi .label { font-size: 11.5px; }
.kpi .value { font-size: clamp(15px, 1.3vw, 21px); }
.kpi .delta { font-size: 11px; }
.kpis.cmp { grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); }
.highlights { gap: 8px; margin-bottom: clamp(10px, 1vw, 16px); }
.hl { padding: 10px 12px; }
.hl .hl-fig { font-size: clamp(16px, 1.25vw, 20px); }
.chart-box { height: clamp(200px, 32vh, 290px); }
.nav-item { padding: 6px 10px; }
#nav { gap: 10px; }

/* Insights: top insights (left) + recommendations (right) in one frame */
.frame2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; border-left: 4px solid var(--accent); }
.frame2 .takeaways, .frame2 .recs { border: 0; }
.frame2 h2 { margin-bottom: 8px; }
.frame2 .recs { border-left: 1px solid var(--grid); padding-left: 20px; }
.frame2 .takeaways li, .frame2 .recs li { font-size: 13px; }
@media (max-width: 1000px) {
  .frame2 { grid-template-columns: 1fr; }
  .frame2 .recs { border-left: 0; padding-left: 0; border-top: 1px solid var(--grid); padding-top: 12px; }
}

/* One-line points */
.points { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.points li { display: grid; grid-template-columns: 16px 1fr; gap: 6px; font-size: 13px; line-height: 1.45; }
.points .ti { font-size: 10px; font-weight: 700; text-align: center; padding-top: 3px; }
.points li.good .ti { color: var(--good-text); }
.points li.bad .ti { color: var(--critical); }
.points li.info .ti { color: var(--accent); }

/* Top campaigns / ad groups / creatives */
.top3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 12px; }
@media (max-width: 1300px) { .top3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 860px) { .top3 { grid-template-columns: 1fr; } }
.top3 h3 { margin-bottom: 6px; }
table.data.compact { font-size: 12px; }
.data.compact td, .data.compact th { padding: 5px 6px; }
.data.compact td:first-child { min-width: 140px; }
.data.compact .bar-cell .track { width: 34px; }
.data.compact td:first-child { min-width: 120px; white-space: normal; }
.data.compact td { white-space: nowrap; }
/* Top campaigns / ad groups / creatives: one below the other, full width */
.top3 { grid-template-columns: 1fr !important; gap: 18px; }
.top3 .data.compact { font-size: 12.5px; }
.top3 .data.compact td:first-child { min-width: 220px; }
.top3 .data.compact .bar-cell .track { width: 56px; }

/* Columns picker groups */
.colpick .menu { max-height: 60vh; overflow-y: auto; min-width: 230px; }
.cp-group { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); padding: 8px 8px 2px; }
.top-table .card-head h3 { margin: 0; }
.bar-cell .track { display: none; }

/* Insights category buttons */
.cat-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.cat-btn { font: inherit; font-size: 12.5px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); border-radius: 999px; padding: 4px 10px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.cat-btn:hover { border-color: var(--accent); color: var(--text); }
.cat-btn.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.cat-btn .cnt { font-size: 11px; background: var(--surface-2); color: var(--text-2); border-radius: 999px; padding: 0 6px; font-weight: 600; }
.cat-btn .cnt.bad { background: #fbeaea; color: var(--critical); }
.cat-btn.on .cnt { background: rgba(255, 255, 255, 0.25); color: #fff; }

/* Target vs achieved / Projection tracker */
.kpis.six { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1200px) { .kpis.six { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .kpis.six { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.targets-form summary { cursor: pointer; list-style: none; }
.targets-form summary::-webkit-details-marker { display: none; }
.tf-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-top: 10px; }
.tf-row input { font: inherit; font-size: 13px; border: 1px solid var(--border); border-radius: 8px; padding: 6px 8px; width: 150px; }
.tbar { position: relative; height: 10px; border-radius: 5px; background: var(--surface-2); overflow: visible; margin: 2px 0 4px; }
.tbar i { display: block; height: 100%; border-radius: 5px; }
.tbar i.good { background: var(--good); }
.tbar i.warn { background: var(--warning); }
.tbar i.bad { background: var(--critical); }
.tbar b { position: absolute; top: -3px; width: 2px; height: 16px; background: var(--text); border-radius: 1px; }
.chip { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.chip.good { background: #e6f4e6; color: var(--good-text); }
.chip.warn { background: #fdf3dc; color: #8a5a00; }
.chip.bad { background: #fbeaea; color: var(--critical); }
.data.tv td { vertical-align: middle; }

/* Projection tracker */
.overspend { background: #fbeaea; color: var(--critical); border: 1px solid #f3c5c5; border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; font-size: 13.5px; }
.chip-btn { font: inherit; font-size: 12px; border: 1px dashed var(--accent); color: var(--accent-ink); background: var(--accent-soft); border-radius: 999px; padding: 3px 10px; cursor: pointer; }
.chip-btn:hover { background: #dbe9fa; }
.x { font: inherit; border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 14px; line-height: 1; padding: 0 3px; border-radius: 4px; }
.x:hover { color: var(--critical); background: #fbeaea; }

.tva-alert { border: 1px solid #f3dca6; background: #fdf8ec; border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; font-size: 13px; }
.tva-alert-h { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: #8a5a00; }
.tva-alert-h span { color: var(--text-2); }
.tva-alert-h .btn { margin-left: auto; }
.tva-alert-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tva-miss { display: inline-flex; gap: 6px; align-items: center; background: var(--surface); border: 1px solid #f3dca6; border-radius: 999px; padding: 2px 10px; font-size: 12px; }
.tva-miss .linkish { font-size: 12px; text-decoration: none; font-weight: 600; }
.tva-ok { color: var(--good-text); font-size: 12.5px; margin: -4px 0 12px; }

/* Target vs achieved (dashboard layout) */
.tva-top { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 12px; margin-bottom: 12px; }
.tva-ctl { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 18px; padding: 14px 16px; margin: 0; }
.fld { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--text-2); }
.fld select { font: inherit; font-size: 13.5px; border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px; background: var(--surface); min-width: 170px; }
.tva-seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px; padding: 3px; gap: 2px; }
.tva-seg button { font: inherit; font-size: 13px; border: 0; background: none; color: var(--text-2); padding: 6px 16px; border-radius: 7px; cursor: pointer; white-space: nowrap; }
.tva-seg button:hover { color: var(--text); }
.tva-seg button[aria-selected="true"] { background: var(--accent); color: #fff; font-weight: 600; box-shadow: 0 1px 2px rgba(42, 120, 214, 0.35); }
.tva-when { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; margin: 0; font-size: 12px; }
.tva-when .lbl { color: var(--text-2); }
.tva-when .rng { font-size: 13.5px; font-weight: 600; color: var(--text); margin: 3px 0; }
.tva-cal { width: 34px; height: 34px; border-radius: 9px; background: var(--surface-2); display: grid; place-items: center; flex: none; }
.tva-cal svg, .tva-ico svg, .h-ico, .hi, .t-ico svg, .tva-addbtn svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tva-cal svg { width: 18px; height: 18px; color: var(--text-2); }

.tva-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 12px; }
.tva-card { display: flex; align-items: center; gap: 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); padding: 16px; box-shadow: var(--shadow); }
.tva-ico { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; flex: none; align-self: flex-start; }
.tva-ico svg { width: 22px; height: 22px; }
.tva-card-b { flex: 1; min-width: 0; }
.tva-card .lbl { font-size: 12.5px; color: var(--text-2); font-weight: 500; }
.tva-card .val { font-size: clamp(19px, 1.7vw, 24px); font-weight: 700; letter-spacing: -0.01em; margin: 2px 0; white-space: nowrap; }
.tva-card .tgt { font-size: 12px; color: var(--muted); }
.tva-ring { position: relative; width: 64px; height: 64px; flex: none; }
.tva-ring svg { width: 64px; height: 64px; }
.tva-ring span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 12px; font-weight: 700; }

.tva-perf { padding: 0; }
.tva-perf-h { display: flex; align-items: center; gap: 10px; padding: 14px 16px 10px; flex-wrap: wrap; }
.tva-perf-h h2, .tva-ir-h h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 15px; }
.h-ico { width: 18px; height: 18px; color: var(--text-2); }
.h-ico.bulb { color: #e6a100; } .h-ico.bolt { color: var(--accent); }
.hi { width: 13px; height: 13px; vertical-align: -2px; color: var(--muted); margin-left: 2px; }
.tva-sum { margin-left: auto; display: inline-flex; gap: 4px; flex-wrap: wrap; font-size: 12px; }
.tva-perf .tva-add { margin: 0; }
.tva-addbtn { display: inline-flex; align-items: center; gap: 5px; color: var(--accent-ink); border-color: #cfe0f6; background: var(--accent-soft); font-weight: 600; }
.tva-addbtn svg { width: 14px; height: 14px; }
.tva-perf > .table-wrap { margin: 0; border-top: 1px solid var(--border); }
.tva-perf > .empty { padding: 16px; }

table.tva3 { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tva3 th { background: var(--surface-2); color: var(--text-2); font-weight: 500; font-size: 12px; text-align: left; padding: 9px 10px; white-space: nowrap; border-bottom: 1px solid var(--border); }
table.tva3 td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: middle; white-space: nowrap; }
table.tva3 tr:last-child td { border-bottom: 0; }
table.tva3 tbody tr:hover td { background: #fafaf8; }
table.tva3 .c { text-align: center; }
table.tva3 td .sub { display: block; font-size: 11.5px; color: var(--muted); margin-top: 1px; }
table.tva3 td.drag { width: 18px; padding-right: 0; }
.grip { cursor: grab; color: #bdbcb5; letter-spacing: -3px; font-size: 13px; user-select: none; }
tr.dragging td { opacity: 0.45; }
tr.drop-at td { box-shadow: inset 0 2px 0 var(--accent); }
.tva-inwrap { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 7px; background: var(--surface-2); padding: 0 8px; }
.tva-inwrap:focus-within { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px var(--accent-soft); }
.tva-inwrap .u { color: var(--muted); font-size: 12px; }
.tva-in { width: 86px; font: inherit; font-size: 13px; font-weight: 600; border: 0; background: transparent; padding: 6px 2px; text-align: center; outline: none; }
td > .tva-in { border: 1px solid var(--border); border-radius: 7px; background: var(--surface-2); }
.nodata { font-size: 12px; }
.pos { color: #0a8a3a; } .neg { color: var(--critical); } .warn-t { color: #b76e00; }
.tva-bar0 { width: 110px; height: 7px; border-radius: 4px; background: #ecebe6; overflow: hidden; }
.tva-bar0 i { display: block; height: 100%; border-radius: 4px; }
.tva-bar0 i.good { background: #17a34a; } .tva-bar0 i.warn { background: #f59a0b; } .tva-bar0 i.bad { background: var(--critical); }
td.gap { font-size: 12.5px; color: var(--text-2); }
.st-pill { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); white-space: nowrap; border: 1px solid transparent; }
.st-pill.good { background: #e7f6ec; color: #0a7a33; border-color: #c7ead3; }
.st-pill.warn { background: #fff4e0; color: #a36100; border-color: #f8dfb0; }
.st-pill.bad { background: #fdecec; color: var(--critical); border-color: #f5caca; }
.kebab-c { position: relative; width: 28px; text-align: center; }
.kebab { font: inherit; font-size: 17px; line-height: 1; border: 0; background: none; color: var(--text-2); cursor: pointer; padding: 3px 7px; border-radius: 6px; }
.kebab:hover, .kebab[aria-expanded="true"] { background: var(--surface-2); color: var(--text); }
.tva-menu { position: absolute; right: 6px; top: calc(100% - 6px); z-index: 30; background: var(--surface); border: 1px solid var(--border); border-radius: 9px; box-shadow: 0 8px 24px rgba(16, 16, 16, 0.14); padding: 4px; min-width: 130px; text-align: left; }
.tva-menu button { display: block; width: 100%; font: inherit; font-size: 13px; background: none; border: 0; text-align: left; padding: 6px 10px; border-radius: 6px; cursor: pointer; color: var(--text); }
.tva-menu button:hover:not(:disabled) { background: var(--surface-2); }
.tva-menu button:disabled { color: var(--muted); cursor: default; }
.tva-menu .danger { color: var(--critical); }

.tva-add { position: relative; }
#view > .tva-add { margin-bottom: 12px; }
.tva-pop { position: absolute; z-index: 25; top: calc(100% + 4px); left: 0; width: 330px; max-width: calc(100vw - 32px); background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 28px rgba(16, 16, 16, 0.14); padding: 8px; }
.tva-pop.right { left: auto; right: 0; }
.tva-sec-b .tva-pop.right { left: 0; right: auto; }
.tva-search { width: 100%; font: inherit; font-size: 13px; border: 1px solid var(--border); border-radius: 7px; padding: 6px 9px; margin-bottom: 6px; box-sizing: border-box; }
.tva-list { max-height: 280px; overflow: auto; }
.tva-grp-h { font-size: 10.5px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); padding: 6px 6px 2px; }
.tva-opt { display: block; width: 100%; text-align: left; font: inherit; font-size: 13px; background: none; border: 0; border-radius: 6px; padding: 5px 8px; cursor: pointer; color: var(--text); }
.tva-opt:hover:not(:disabled) { background: var(--accent-soft); }
.tva-opt:disabled { color: var(--muted); cursor: default; }
.tva-opt .muted { font-size: 11.5px; }
.tva-custom { border-top: 1px solid var(--border); margin-top: 6px; padding-top: 4px; display: flex; flex-wrap: wrap; gap: 6px; }
.tva-custom .tva-grp-h { width: 100%; }
.tva-custom input, .tva-custom select { font: inherit; font-size: 12.5px; border: 1px solid var(--border); border-radius: 6px; padding: 4px 7px; }
.tva-custom input { flex: 1 1 100%; }

.tva-sec { padding: 0; margin-bottom: 12px; }
.tva-sec > summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 12px 16px; cursor: pointer; }
.tva-sec > summary::-webkit-details-marker { display: none; }
.tva-sec > summary .caret-s { color: var(--muted); transition: transform 0.15s; font-size: 11px; }
.tva-sec[open] > summary .caret-s { transform: rotate(90deg); }
.tva-sec[open] > summary { border-bottom: 1px solid var(--border); }
.tva-sec-b > .tva-add { margin: 10px 16px 14px; }
.tva-sec-b > .empty { padding: 14px 16px 0; }
.tva-subline { padding: 10px 16px 0; font-size: 12.5px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.tva-sec-b > .tva-subline + .table-wrap { margin-top: 10px; }
.tva-contains { font: inherit; font-size: 12.5px; border: 1px solid var(--border); border-radius: 6px; padding: 3px 8px; width: 150px; }

.tva-ir { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 12px 0; }
.tva-ir > .card { margin: 0; }
.tva-ir-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.tva-ir-h h2 { white-space: nowrap; }
.tva-ir-h select { width: auto; flex: none; font: inherit; font-size: 12.5px; border: 1px solid var(--border); border-radius: 7px; padding: 4px 8px; background: var(--surface); }
.tva-tile { display: flex; gap: 12px; align-items: flex-start; border-radius: 10px; padding: 11px 13px; margin-bottom: 8px; font-size: 13px; border: 1px solid transparent; }
.tva-tile .t-h { font-weight: 500; color: var(--text); }
.tva-tile .t-s { font-size: 12.5px; color: var(--text-2); margin-top: 2px; }
.tva-tile .t-ico { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none; background: #fff; }
.tva-tile .t-ico svg { width: 16px; height: 16px; }
.tva-tile.good { background: #eef8f1; border-color: #d6efdd; } .tva-tile.good .t-ico { color: #0a7a33; }
.tva-tile.bad { background: #fdf1f1; border-color: #f6d6d6; } .tva-tile.bad .t-ico { color: var(--critical); }
.tva-tile.warn { background: #fff7e8; border-color: #f8e3bb; } .tva-tile.warn .t-ico { color: #a36100; }
.tva-tile.info { background: var(--surface-2); }
.tva-tile.rec { background: #f1f6fd; border-color: #dce8f8; } .tva-tile.rec .t-ico { color: #0a7a33; }
.tva-tile .t-ico.num { background: var(--accent); color: #fff; font-size: 12.5px; font-weight: 700; width: 24px; height: 24px; }

.tva-trends { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.tva-trends.compact { margin: 4px 16px 16px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.tva-trend { margin: 0; padding: 14px 16px; }
.tva-trends.compact .tva-trend { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; }
.tva-trend .lbl { font-size: 12.5px; color: var(--text-2); }
.tva-trend .val { font-size: 17px; margin-top: 2px; }
.tva-trend .val .muted { font-size: 13px; font-weight: 500; }
.tva-trend .sub2 { font-size: 12px; color: var(--text-2); }
.tva-spark { position: relative; height: 70px; margin: 6px -4px 4px; }
.tva-leg { display: flex; gap: 14px; font-size: 11.5px; color: var(--text-2); }
.tva-leg i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; }
.tva-leg i.dash { width: 14px; height: 0; border-radius: 0; border-top: 2px dashed #9a9993; vertical-align: 3px; }

@media (max-width: 900px) {
  .tva-top, .tva-ir { grid-template-columns: 1fr; }
  .tva-seg button { padding: 6px 10px; }
}

/* Performance table view (campaigns, ad groups, ads) */
.perf { padding: 0; overflow: visible; }
.perf-h { display: flex; align-items: center; gap: 12px; padding: 16px 18px 12px; flex-wrap: wrap; }
.perf-ico { width: 38px; height: 38px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.perf-ico svg, .perf-tools svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.perf-ico svg { width: 20px; height: 20px; }
.perf-t { min-width: 180px; }
.perf-t h2 { margin: 0; font-size: 18px; letter-spacing: -0.01em; }
.perf-t .muted { font-size: 12.5px; }
.perf-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.perf-tools svg { width: 15px; height: 15px; }
.perf-range, .perf-search, .perf-cols > summary, .perf-export { display: inline-flex; align-items: center; gap: 7px; height: 34px; box-sizing: border-box; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); font: inherit; font-size: 12.5px; color: var(--text); padding: 0 11px; cursor: pointer; }
.perf-range:hover, .perf-cols > summary:hover, .perf-export:hover { border-color: #cfcec8; background: var(--surface-2); }
.perf-search { cursor: text; color: var(--muted); padding-right: 6px; }
.perf-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.perf-search input { border: 0; outline: none; font: inherit; font-size: 12.5px; width: 170px; background: transparent; color: var(--text); padding: 0; }
.perf-cols { position: relative; }
.perf-cols > summary { list-style: none; }
.perf-cols > summary::-webkit-details-marker { display: none; }
.perf-export { font-weight: 600; }

.perf-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; padding: 0 18px 14px; }
.perf-kpi { display: flex; gap: 11px; align-items: flex-start; border: 1px solid var(--border); border-radius: 12px; padding: 12px; background: var(--surface); min-width: 0; }
.pk-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.pk-ico svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pk-l { font-size: 12px; color: var(--text-2); white-space: nowrap; }
.pk-v { font-size: clamp(16px, 1.45vw, 21px); font-weight: 700; letter-spacing: -0.01em; margin: 1px 0 3px; white-space: nowrap; }
.pk-c { font-size: 11px; display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.chg-pill { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.chg-pill.up { background: #e7f6ec; color: #0a7a33; }
.chg-pill.down { background: #fdecec; color: var(--critical); }

.perf > .table-wrap { border-top: 1px solid var(--border); margin: 0; }
table.perf-t2 { width: 100%; border-collapse: collapse; font-size: 13px; }
table.perf-t2 th { background: var(--surface-2); color: var(--text-2); font-weight: 500; font-size: 12px; padding: 9px 8px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--border); }
table.perf-t2 th.sortable { cursor: pointer; user-select: none; }
table.perf-t2 th.sortable:hover { color: var(--text); }
table.perf-t2 th[aria-sort] { color: var(--text); font-weight: 700; }
table.perf-t2 th .arr { color: var(--accent); }
table.perf-t2 td { padding: 9px 8px; text-align: right; border-bottom: 1px solid var(--border); vertical-align: middle; white-space: nowrap; }
table.perf-t2 tbody tr:last-child td { border-bottom: 0; }
table.perf-t2 th:nth-child(-n+4), table.perf-t2 td:nth-child(-n+4) { text-align: left; }
table.perf-t2 .rk { width: 26px; color: var(--muted); text-align: center !important; font-variant-numeric: tabular-nums; }
table.perf-t2 td.nm-cell { display: table-cell; max-width: 320px; }
table.perf-t2 .nmc { display: flex; align-items: center; gap: 6px; }
table.perf-t2 td.nm-cell .nm-wrap { min-width: 0; }
table.perf-t2 td.nm-cell .nm { font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; display: block; max-width: 240px; }
table.perf-t2 td.nm-cell .sub { display: block; font-size: 11px; color: var(--muted); }
table.perf-t2 tr.lvl-1 td.nm-cell { padding-left: 26px; }
table.perf-t2 tr.lvl-2 td.nm-cell { padding-left: 46px; }
table.perf-t2 tr.lvl-1 td, table.perf-t2 tr.lvl-2 td { background: #fbfbf9; }
table.perf-t2 tr.lvl-1 .nm, table.perf-t2 tr.lvl-2 .nm { font-weight: 500; }
table.perf-t2 td.pc { color: var(--text-2); font-size: 12.5px; max-width: 170px; overflow: hidden; text-overflow: ellipsis; }
table.perf-t2 td.sorted { font-weight: 600; }
table.perf-t2 tr.row-click { cursor: pointer; }
table.perf-t2 tbody tr:hover td { background: #f7f9fc; }
table.perf-t2 tr.selected td { background: var(--accent-soft) !important; }
table.perf-t2 .sub2 { display: block; font-size: 11px; margin-top: 1px; }
table.perf-t2 .caret.sm { width: 18px; height: 18px; font-size: 10px; flex: none; }
table.perf-t2 .child-note td { text-align: left; color: var(--muted); font-size: 12px; background: #fbfbf9; padding-left: 46px; }
.chg-in { font-weight: 600; color: var(--muted); }
.chg-in.up { color: #0a8a3a; } .chg-in.down { color: var(--critical); }
.status-pill { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 2px 10px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); }
.status-pill.on { background: #e7f6ec; color: #0a7a33; }
.status-pill.off { background: #ececea; color: #5d5c57; }
.status-pill.rm { background: #fdecec; color: var(--critical); }
td.tr-c { width: 84px; }
.spark { width: 80px; height: 26px; display: block; margin-left: auto; }
.perf-more { padding: 10px 18px 14px; margin: 0; font-size: 12.5px; border-top: 1px solid var(--border); }

@media (max-width: 1200px) { .perf-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .perf-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .perf-tools { margin-left: 0; width: 100%; }
  .perf-search input { width: 120px; }
}

/* ---- Home page (signed out): an account audit, marked up by hand ---- */
.lp {
  --paper: #fcfcfa; --tint: #f3f2ed; --ink: #141413; --ink-2: #4a4944; --muted: #86857e; --rule: #dcdbd3; --rule-2: #ebeae4;
  --marker: #ffe14d; --red: #cf3a2a; --green: #0f7a50;
  --grot: 'Schibsted Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Consolas, monospace;
  background: var(--paper); color: var(--ink); font-family: var(--grot); -webkit-font-smoothing: antialiased;
}
.lp a { color: inherit; }
.lp-wrap { max-width: 1200px; margin: 0 auto; padding-inline: 28px; }
.lp h1, .lp h2, .lp h3 { text-wrap: balance; color: var(--ink); }
.lp-mono { font-family: var(--mono); font-size: 12px; letter-spacing: 0; }
.lp mark { background: linear-gradient(transparent 12%, var(--marker) 12%, var(--marker) 88%, transparent 88%); color: inherit; padding: 0 0.12em; margin: 0 -0.04em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.lp code { font-family: var(--mono); font-size: 0.88em; background: none; padding: 0; }

/* Buttons: square-ish, ink */
.lp-btn { display: inline-flex; align-items: center; justify-content: center; font: inherit; font-weight: 700; font-size: 15px; border-radius: 4px; padding: 11px 18px; text-decoration: none; border: 1.5px solid transparent; cursor: pointer; white-space: nowrap; transition: background 0.15s, color 0.15s, box-shadow 0.15s; }
.lp-btn:focus-visible { outline: 3px solid var(--marker); outline-offset: 2px; }
.lp-btn-ink { background: var(--ink); color: #fff !important; box-shadow: 3px 3px 0 var(--marker); }
.lp-btn-ink:hover { box-shadow: 5px 5px 0 var(--marker); }
.lp-btn-line { background: transparent; color: var(--ink) !important; border-color: var(--ink); }
.lp-btn-line:hover { background: var(--ink); color: #fff !important; }
.lp-btn-marker { background: var(--marker); color: var(--ink) !important; }
.lp-btn-marker:hover { background: #fff; }
.lp-btn-lg { padding: 14px 24px; font-size: 16px; }
.lp-btn-sm { padding: 8px 14px; font-size: 14px; box-shadow: 2px 2px 0 var(--marker); }
.lp-textlink { font-weight: 600; font-size: 15px; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; color: var(--ink) !important; }
.lp-textlink:hover { text-decoration-color: var(--marker); text-decoration-thickness: 4px; }
.lp-textlink.light { color: #fff !important; }

/* Nav */
.lp-nav { position: sticky; top: 0; z-index: 50; background: var(--paper); border-bottom: 1px solid transparent; transition: border-color 0.2s; }
.lp-nav.scrolled { border-bottom-color: var(--rule); }
.lp-nav-in { display: flex; align-items: center; gap: 36px; height: 66px; }
.lp-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: -0.02em; text-decoration: none; color: var(--ink) !important; }
.lp-mark { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 3px; background: var(--ink); color: var(--marker); font-family: var(--mono); font-size: 13px; font-weight: 500; letter-spacing: -0.04em; }
.lp-links { display: flex; gap: 28px; }
.lp-links a { text-decoration: none; font-size: 14.5px; font-weight: 500; color: var(--ink-2); }
.lp-links a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--marker); text-decoration-thickness: 3px; text-underline-offset: 5px; }
.lp-nav-cta { margin-left: auto; display: flex; align-items: center; gap: 20px; }
.lp-signin { font-weight: 600; font-size: 14.5px; text-decoration: none; white-space: nowrap; }
.lp-signin:hover { text-decoration: underline; }
.lp-signin[aria-disabled="true"] { opacity: 0.4; pointer-events: none; }

/* Hero */
.lp-hero { padding: 64px 0 88px; border-bottom: 1px solid var(--rule); }
.lp-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 64px; align-items: center; }
.lp-kicker { font-family: var(--mono); font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-2); margin: 0 0 20px; padding-left: 14px; border-left: 3px solid var(--marker); }
.lp-hero h1 { font-size: clamp(40px, 5.2vw, 66px); line-height: 1.02; letter-spacing: -0.035em; font-weight: 800; margin: 0 0 22px; }
.lp-lead { font-size: 18.5px; line-height: 1.55; color: var(--ink-2); margin: 0 0 30px; max-width: 520px; }
.lp-cta { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.lp-small { font-size: 13.5px; color: var(--muted); margin: 22px 0 0; max-width: 460px; line-height: 1.5; }
.lp-hero .alert, .lp-note { margin-top: 16px; max-width: 520px; }

/* The audit sheet */
.lp-sheet { margin: 0; background: #fff; border: 1px solid var(--rule); border-radius: 6px; box-shadow: 0 1px 0 var(--rule-2), 14px 14px 0 -1px var(--tint), 14px 14px 0 0 var(--rule); position: relative; }
.lp-sheet-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 16px 20px 12px; font-size: 14px; border-bottom: 1.5px solid var(--ink); flex-wrap: wrap; }
.lp-sheet-head .lp-mono { color: var(--muted); }
.lp-sheet-cols { display: grid; grid-template-columns: minmax(0, 1fr) 76px 48px 150px; gap: 10px; padding: 8px 20px; color: var(--muted); text-transform: uppercase; font-size: 10.5px; letter-spacing: 0.06em; border-bottom: 1px solid var(--rule-2); }
.lp-sheet-cols span:nth-child(n+2) { text-align: right; }
.lp-sheet-cols::after { content: ''; }
.lp-sheet-rows { list-style: none; margin: 0; padding: 0; }
.lp-sheet-rows li { display: grid; grid-template-columns: minmax(0, 1fr) 76px 48px 150px; gap: 10px; align-items: center; padding: 11px 20px; border-bottom: 1px solid var(--rule-2); font-size: 14.5px; }
.lp-sheet-rows .t { font-weight: 600; min-width: 0; }
.lp-sheet-rows .t small { display: block; font-family: var(--mono); font-size: 11.5px; font-weight: 400; color: var(--muted); margin-top: 2px; }
.lp-sheet-rows .t small i { font-style: normal; }
.lp-sheet-rows .n { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--mono); font-size: 13px; }
.lp-sheet-rows s { text-decoration: line-through; text-decoration-color: var(--red); text-decoration-thickness: 2px; color: var(--ink-2); }
.lp-sheet-rows .cut .n { color: var(--muted); }
.lp-sheet-rows .note { font-family: var(--mono); font-size: 11.5px; text-align: right; }
.lp-sheet-rows .note.bad { color: var(--red); }
.lp-sheet-rows .note.ok { color: var(--green); }
.lp-sheet-rows .note.ok::before { content: '✓ '; }
.lp-sheet-rows .note.bad::before { content: '− '; }
.lp-sheet-foot { display: grid; grid-template-columns: 1fr 1fr; border-top: 1.5px solid var(--ink); }
.lp-sheet-foot div { padding: 14px 20px 16px; display: grid; gap: 4px; }
.lp-sheet-foot div + div { border-left: 1px solid var(--rule-2); }
.lp-sheet-foot span { font-size: 12.5px; color: var(--ink-2); }
.lp-sheet-foot b { font-size: 24px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.lp-sheet-foot b.red { color: var(--red); }
.lp-sheet-foot b small { display: block; font-size: 12px; font-weight: 500; color: var(--muted); letter-spacing: 0; }

/* Sections */
.lp-section { padding: 96px 0; scroll-margin-top: 66px; }
.lp-tint { background: var(--tint); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.lp-h2, .lp-split-head h2 { font-size: clamp(30px, 3.6vw, 44px); line-height: 1.05; letter-spacing: -0.03em; font-weight: 800; margin: 0 0 14px; }
.lp-split { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 64px; align-items: start; }
.lp-split-head { position: sticky; top: 96px; }
.lp-split-head p { color: var(--ink-2); font-size: 17px; line-height: 1.55; margin: 0; max-width: 380px; }
.lp-split-head a { text-decoration: underline; text-decoration-color: var(--marker); text-decoration-thickness: 3px; text-underline-offset: 3px; }

.lp-checks { margin: 0; border-top: 1.5px solid var(--ink); }
.lp-checks div { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: 24px; padding: 20px 0; border-bottom: 1px solid var(--rule); }
.lp-checks dt { font-weight: 700; font-size: 17.5px; letter-spacing: -0.01em; }
.lp-checks dd { margin: 0; color: var(--ink-2); font-size: 15.5px; line-height: 1.55; }

.lp-month { list-style: none; padding: 0; margin: 36px 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1.5px solid var(--ink); }
.lp-month li { padding: 20px 24px 8px 0; position: relative; }
.lp-month li + li { padding-left: 24px; border-left: 1px solid var(--rule); }
.lp-month li::before { content: ''; position: absolute; top: -6px; left: 0; width: 10px; height: 10px; background: var(--marker); border: 1.5px solid var(--ink); }
.lp-month li + li::before { left: 24px; }
.lp-month .lp-mono { color: var(--ink-2); text-transform: uppercase; letter-spacing: 0.06em; }
.lp-month h3 { font-size: 20px; letter-spacing: -0.015em; margin: 8px 0 8px; }
.lp-month p { margin: 0; color: var(--ink-2); font-size: 15px; line-height: 1.55; }

.lp-principles { padding: 88px 0; }
.lp-principles-in { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 64px; align-items: start; }
.lp-statement { font-size: clamp(28px, 3.2vw, 40px); line-height: 1.15; font-weight: 800; letter-spacing: -0.03em; margin: 0; }
.lp-statement span { color: var(--muted); }
.lp-principles ul { list-style: none; margin: 0; padding: 0; border-top: 1.5px solid var(--ink); }
.lp-principles li { padding: 16px 0; border-bottom: 1px solid var(--rule); color: var(--ink-2); font-size: 15.5px; line-height: 1.55; }
.lp-principles li b { color: var(--ink); }

.lp-price-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; margin-bottom: 36px; }
.lp-price-head .lp-h2 { margin: 0; max-width: 560px; }
.lp-price-head p { margin: 0; color: var(--ink-2); font-size: 15.5px; max-width: 380px; line-height: 1.5; }
.lp-table-wrap { overflow-x: auto; }
.lp-prices { width: 100%; border-collapse: collapse; min-width: 640px; background: var(--paper); border: 1px solid var(--rule); }
.lp-prices th, .lp-prices td { padding: 14px 20px; border-bottom: 1px solid var(--rule); text-align: left; font-size: 15px; vertical-align: middle; }
.lp-prices thead th { font-size: 20px; font-weight: 800; letter-spacing: -0.015em; border-bottom: 1.5px solid var(--ink); padding-top: 26px; vertical-align: bottom; position: relative; }
.lp-prices thead th small { display: block; font-size: 13px; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-top: 2px; }
.lp-prices tbody th { font-weight: 500; color: var(--ink-2); font-size: 14.5px; width: 30%; }
.lp-prices tr.big td { font-size: 34px; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.lp-prices .pick { background: #fffbe0; }
.lp-prices thead .pick { border-top: 3px solid var(--ink); }
.lp-prices tr.cta td, .lp-prices tr.cta th { border-bottom: 0; padding-bottom: 22px; }
.lp-flag { position: absolute; top: 6px; left: 20px; font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.02em; background: var(--marker); padding: 1px 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.lp-faq { border-top: 1.5px solid var(--ink); }
.lp-faq details { border-bottom: 1px solid var(--rule); }
.lp-faq summary { cursor: pointer; list-style: none; padding: 20px 0; font-weight: 700; font-size: 17px; display: flex; justify-content: space-between; gap: 20px; }
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq summary::after { content: '+'; font-family: var(--mono); font-weight: 400; font-size: 20px; line-height: 1; }
.lp-faq details[open] summary::after { content: '−'; }
.lp-faq summary:hover { text-decoration: underline; text-decoration-color: var(--marker); text-decoration-thickness: 3px; text-underline-offset: 4px; }
.lp-faq p { margin: 0 0 22px; color: var(--ink-2); font-size: 15.5px; line-height: 1.6; max-width: 640px; }

.lp-close { background: var(--ink); color: #fff; padding: 80px 0; }
.lp-close-in { display: grid; gap: 30px; }
.lp-close p { margin: 0; font-size: clamp(30px, 4.2vw, 54px); line-height: 1.05; font-weight: 800; letter-spacing: -0.035em; max-width: 900px; color: #fff; }

.lp-foot { padding: 28px 0; border-top: 1px solid var(--rule); }
.lp-foot-in { display: flex; align-items: center; gap: 32px; flex-wrap: wrap; }
.lp-foot nav { display: flex; gap: 22px; flex-wrap: wrap; font-size: 14px; }
.lp-foot nav a { text-decoration: none; color: var(--ink-2); }
.lp-foot nav a:hover { color: var(--ink); text-decoration: underline; }
.lp-foot .lp-mono { margin-left: auto; color: var(--muted); }

@media (prefers-reduced-motion: reduce) { .lp-btn, .lp-nav { transition: none; } }
@media (max-width: 1020px) {
  .lp-hero-grid, .lp-split, .lp-principles-in { grid-template-columns: 1fr; gap: 44px; }
  .lp-split-head { position: static; }
  .lp-month { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lp-month li:nth-child(3) { padding-left: 0; border-left: 0; }
  .lp-month li:nth-child(3)::before { left: 0; }
}
@media (max-width: 720px) {
  .lp-wrap { padding-inline: 16px; }
  .lp-links { display: none; }
  .lp-nav-cta { gap: 14px; }
  .lp-hero { padding: 40px 0 64px; }
  .lp-hero h1 { font-size: 40px; }
  .lp-sheet { box-shadow: 8px 8px 0 -1px var(--tint), 8px 8px 0 0 var(--rule); }
  .lp-sheet-cols, .lp-sheet-rows li { grid-template-columns: minmax(0, 1fr) 70px 36px; padding-inline: 14px; }
  .lp-sheet-cols::after { display: none; }
  .lp-sheet-rows .note { grid-column: 1 / -1; text-align: left; margin-top: -4px; }
  .lp-sheet-foot { grid-template-columns: 1fr; }
  .lp-sheet-foot div + div { border-left: 0; border-top: 1px solid var(--rule-2); }
  .lp-checks div { grid-template-columns: 1fr; gap: 6px; }
  .lp-month { grid-template-columns: 1fr; }
  .lp-month li, .lp-month li + li { padding-left: 0; border-left: 0; padding-right: 0; padding-bottom: 20px; }
  .lp-month li + li::before { left: 0; }
  .lp-section { padding: 64px 0; }
  .lp-foot .lp-mono { margin-left: 0; }
}

/* Metric tiles: Columns picker */
.kpi-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 8px; font-size: 12.5px; }

/* ---- Date range button + picker (Google Ads style) ---- */
.dr-field { margin-left: auto; }
.dr-btn { display: grid; justify-items: start; gap: 1px; min-width: 200px; text-align: left; font: inherit; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 5px 12px; cursor: pointer; color: var(--text); }
.dr-btn:hover, .dr-btn[aria-expanded="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.dr-btn .dr-l { font-size: 11px; color: var(--text-2); }
.dr-btn .dr-v { font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.dr-btn .dr-v b { font-size: 10px; color: var(--muted); margin-left: 4px; }
.dr-btn .dr-c { font-size: 11px; color: var(--muted); white-space: nowrap; }
.dr-btn.sm { min-width: 0; padding: 4px 10px; }

.dp { position: fixed; z-index: 100; display: flex; width: 600px; max-width: calc(100vw - 16px); height: 590px; max-height: calc(100vh - 16px); background: var(--surface); border-radius: 12px; box-shadow: 0 12px 40px rgba(16, 24, 40, 0.22), 0 0 0 1px rgba(16, 24, 40, 0.06); overflow: hidden; font-size: 14px; }
.dp-left { width: 250px; flex: none; border-right: 1px solid var(--border); display: flex; flex-direction: column; overflow-y: auto; overflow-x: hidden; padding: 6px 0; }
.dp-pres { display: flex; flex-direction: column; }
.dp-pre { text-align: left; font: inherit; font-size: 14px; color: var(--text); background: none; border: 0; padding: 9px 18px; cursor: pointer; }
.dp-pre:hover { background: var(--surface-2); }
.dp-pre.on { background: #e8f0fe; color: #174ea6; }
.dp-pre:disabled { cursor: default; }
.dp-sep { height: 1px; background: var(--border); margin: 8px 0; flex: none; }
.dp-n { display: flex; align-items: center; gap: 8px; padding: 8px 18px; color: var(--text); cursor: text; }
.dp-n input { width: 52px; font: inherit; font-size: 14px; border: 1px solid #c4c7c5; border-radius: 4px; padding: 5px 6px; }
.dp-n input:focus { outline: none; border-color: #1a73e8; box-shadow: 0 0 0 1px #1a73e8; }
.dp-n.on { background: #e8f0fe; }
.dp-cmp { display: flex; align-items: center; justify-content: space-between; padding: 10px 18px; cursor: pointer; }
.dp-cmp input { position: absolute; opacity: 0; pointer-events: none; }
.dp-cmp i { position: relative; width: 34px; height: 14px; border-radius: 7px; background: #bdc1c6; transition: background 0.15s; }
.dp-cmp i::after { content: ''; position: absolute; top: -3px; left: -2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35); transition: transform 0.15s, background 0.15s; }
.dp-cmp input:checked + i { background: #8ab4f8; }
.dp-cmp input:checked + i::after { transform: translateX(18px); background: #1a73e8; }
.dp-cmp input:focus-visible + i { outline: 2px solid #1a73e8; outline-offset: 3px; }
.dp-cmpmode { margin: 0 18px 10px; font: inherit; font-size: 13.5px; border: 1px solid #c4c7c5; border-radius: 4px; padding: 6px 8px; background: var(--surface); }

.dp-right { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dp-ins { display: flex; align-items: center; gap: 8px; padding: 18px 16px 6px; }
.dp-ins.cmp { padding-top: 6px; }
.dp-ins .dash { color: var(--text-2); }
.dp-box { position: relative; flex: 1; min-width: 0; border: 1px solid #80868b; border-radius: 4px; padding: 7px 8px 5px; }
.dp-box span { position: absolute; top: -8px; left: 8px; background: var(--surface); padding: 0 3px; font-size: 11.5px; color: var(--text-2); }
.dp-box input { width: 100%; border: 0; font: inherit; font-size: 14px; padding: 0; background: transparent; color: var(--text); outline: none; }
.dp-box:focus-within { border-color: #1a73e8; box-shadow: 0 0 0 1px #1a73e8; }
.dp-box:focus-within span { color: #1a73e8; }
.dp-ins.cmp .dp-box { border-color: #e37400; }
.dp-ins.cmp .dp-box:focus-within { box-shadow: 0 0 0 1px #e37400; }
.dp-ins.cmp .dp-box span { color: #b06000; }
.dp-cmpnote { font-size: 12.5px; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.dp-cmpnote i { width: 12px; height: 12px; border-radius: 3px; border: 2px solid #e37400; }
.dp-bar { display: flex; align-items: center; gap: 4px; padding: 10px 12px 4px 18px; }
.dp-ml { font-size: 13px; font-weight: 600; color: var(--text-2); letter-spacing: 0.02em; }
.dp-bar .grow { flex: 1; }
.dp-nav { width: 32px; height: 32px; border-radius: 50%; border: 0; background: none; font-size: 22px; line-height: 1; color: var(--text-2); cursor: pointer; }
.dp-nav:hover { background: var(--surface-2); }
.dp-dow, .dp-g { display: grid; grid-template-columns: repeat(7, 1fr); padding: 0 10px; }
.dp-dow { border-bottom: 1px solid var(--border); padding-bottom: 6px; }
.dp-dow span { text-align: center; font-size: 12px; color: var(--text-2); }
.dp-cal { flex: 1; overflow-y: auto; padding-bottom: 8px; overscroll-behavior: contain; }
.dp-m { padding-top: 4px; }
.dp-mh { font-size: 12.5px; font-weight: 700; color: var(--text-2); padding: 8px 18px 4px; border-top: 1px dashed var(--border); }
.dp-m:first-child .dp-mh { border-top: 0; }
.dp-g { row-gap: 2px; }
.dp-d { position: relative; height: 34px; font: inherit; font-size: 13.5px; border: 0; background: none; color: var(--text); cursor: pointer; padding: 0; }
.dp-d::before { content: ''; position: absolute; inset: 1px 0; z-index: 0; }
.dp-d.in::before { background: #e8f0fe; }
.dp-d.s::before { left: 50%; } .dp-d.e::before { right: 50%; } .dp-d.s.e::before { display: none; }
.dp-d.cin { box-shadow: inset 0 -2px 0 #e37400; }
.dp-d > span { position: relative; z-index: 1; display: grid; place-items: center; width: 32px; height: 32px; margin: 0 auto; border-radius: 50%; }
.dp-d.s > span, .dp-d.e > span { background: #1a73e8; color: #fff; font-weight: 600; }
.dp-d.now:not(.s):not(.e) > span { box-shadow: inset 0 0 0 1px #5f6368; }
.dp-d:hover:not(.s):not(.e):not(:disabled) > span { background: #f1f3f4; }
.dp-d.off { color: #c4c7c5; cursor: default; }
.dp-foot { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--border); }
.dp-sum { margin-right: auto; font-size: 12.5px; color: var(--text-2); }

@media (max-width: 640px) {
  .dp { flex-direction: column; height: calc(100vh - 16px); }
  .dp-left { width: auto; max-height: 34%; border-right: 0; border-bottom: 1px solid var(--border); }
  .dr-field { margin-left: 0; }
}

/* Prospecting vs remarketing (Overview) */
.pr-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.pr-head h2 { margin: 0 0 2px; font-size: 18px; }
.pr-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pr-tools select { width: auto; }
.prc-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.prc { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--border); border-radius: 12px; padding: 14px 12px; background: var(--surface); min-width: 0; }
.prc-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.prc-ico svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.prc-b { flex: 1; min-width: 0; }
.prc-t { font-size: 12.5px; font-weight: 600; margin-bottom: 6px; }
.prc-row { display: flex; gap: 10px; align-items: stretch; }
.prc-div { width: 1px; background: var(--border); flex: none; }
.prc-side { display: grid; gap: 1px; flex: 1 1 auto; }
.prc-side b { font-size: clamp(14px, 1.2vw, 19px); letter-spacing: -0.01em; white-space: nowrap; }
.prc-side .prc-sh { font-size: 11.5px; font-weight: 600; color: var(--text-2); }
.prc-side .muted { font-size: 11.5px; }
.pr-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.pr-panel { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; min-width: 0; }
.pr-ph { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.pr-ph h3 { margin: 0; font-size: 14.5px; }
.pr-ph .muted { font-size: 12px; }
.pr-leg { margin: 0; }
.pr-panel .split-row { grid-template-columns: 120px 1fr; margin-bottom: 12px; }
.pr-panel .split-bar { height: 24px; }
.pr-chart-box { height: 260px; }
.pr-more { margin-top: 12px; font-size: 13px; }
.pr-more summary, .pr-card .pr-list summary { cursor: pointer; color: var(--accent-ink); font-size: 12.5px; }
@media (max-width: 1100px) { .prc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pr-two { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .prc-grid { grid-template-columns: 1fr; } }

/* Search query report + keyword comparisons */
.chips-row { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.chip-f { font: inherit; font-size: 12.5px; font-weight: 600; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); border-radius: 999px; padding: 4px 12px; cursor: pointer; }
.chip-f span { color: var(--muted); font-weight: 500; margin-left: 2px; }
.chip-f:hover { border-color: #c9c8c1; color: var(--text); }
.chip-f.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip-f.on span { color: rgba(255, 255, 255, 0.8); }
.sq-filters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 14px; font-size: 12.5px; }
.kw-filter { margin: 8px 0 10px; }
.sq-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.sq-tile { border: 1px solid var(--border); border-left-width: 4px; border-radius: 10px; padding: 11px 13px; display: grid; gap: 2px; min-width: 0; }
.sq-tile.relevant { border-left-color: #1baf7a; } .sq-tile.partial { border-left-color: #eda100; } .sq-tile.irrelevant { border-left-color: #e5484d; }
.sq-tile.waste { border-left-color: #e5484d; background: #fdf1f1; }
.sq-l { font-size: 12px; color: var(--text-2); font-weight: 600; }
.sq-tile b { font-size: 19px; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.sq-s, .sq-c { font-size: 11.5px; color: var(--muted); }
.sq-h { font-size: 14px; margin: 6px 0 8px; }
.sq-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 18px 0 8px; }
.sq-search { margin-left: auto; font: inherit; font-size: 13px; border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; min-width: 240px; }
.sq-t td { vertical-align: top; }
.sq-t th:nth-child(-n+4), .sq-t td:nth-child(-n+4), .sq-t th:last-child, .sq-t td:last-child { text-align: left; }
.sq-t td { white-space: nowrap; }
.sq-t td.sq-term { white-space: normal; min-width: 180px; max-width: 240px; }
.sq-t td.sq-kw { white-space: normal; min-width: 130px; max-width: 180px; }
.sq-t td.sq-act { white-space: normal; min-width: 170px; max-width: 230px; }
.sq-t td.sq-act code { white-space: normal; word-break: break-word; }
.sq-t td.sq-score { min-width: 130px; white-space: normal; }
.score { display: flex; align-items: center; gap: 8px; }
.score b { font-size: 14px; min-width: 26px; font-variant-numeric: tabular-nums; }
.score i { flex: 1; max-width: 70px; height: 6px; border-radius: 3px; background: #ecebe6; overflow: hidden; }
.score i span { display: block; height: 100%; border-radius: 3px; }
.score.good b { color: #0a7a33; } .score.good i span { background: #1baf7a; }
.score.warn b { color: #a36100; } .score.warn i span { background: #eda100; }
.score.bad b { color: var(--critical); } .score.bad i span { background: #e5484d; }
.cmp-t th:first-child, .cmp-t td:first-child { text-align: left; }
.sq-t .sub { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.sq-act { font-size: 12.5px; }
.sq-act code, .cmp-t code { font-size: 11.5px; }
.mt { display: inline-block; font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px; margin-left: 4px; vertical-align: 1px; }
.mt-exact { background: #e6f4e6; color: #0a7a33; } .mt-phrase { background: #eaf2fc; color: #1c5cab; } .mt-broad { background: #fff4e0; color: #a36100; }
.cmp-t td:first-child { white-space: nowrap; }
.grp-dot { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 7px; vertical-align: 0; }
.rlsa { margin-top: 12px; border: 1px solid #cfe0f6; background: #f1f6fd; border-radius: 10px; padding: 11px 14px; font-size: 13.5px; line-height: 1.55; }
.rlsa.warn { border-color: #f8dfb0; background: #fff7e8; }
.kw-rules input { min-width: 180px; }
@media (max-width: 900px) { .sq-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sq-search { margin-left: 0; min-width: 0; width: 100%; } }

/* Manage accounts */
.ws-plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.ws-plan-s { font-size: 12px; color: var(--text-2); margin-top: 4px; }
.ah-over { margin: 0 0 12px; }
@media (max-width: 1000px) { .ws-plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ws-plan { display: grid; gap: 2px; text-align: left; font: inherit; background: var(--surface); border: 1.5px solid var(--border); border-radius: 12px; padding: 14px 16px; cursor: pointer; color: var(--text); }
.ws-plan:hover { border-color: #c9c8c1; }
.ws-plan.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ws-plan-n { font-weight: 700; font-size: 15px; }
.ws-plan-l { font-size: 13px; color: var(--text-2); }
.ws-plan-p { font-size: 20px; font-weight: 700; margin-top: 6px; }
.ws-plan-p small { font-size: 12px; color: var(--muted); font-weight: 500; margin-left: 3px; }
.ws-trial { grid-column: 1 / -1; margin: 2px 0 0; font-size: 12.5px; }
.ws-count { font-size: 13px; color: var(--text-2); background: var(--surface-2); border-radius: 999px; padding: 4px 12px; }
.ws-count b { color: var(--text); }
.ws-count.over { background: #fdecec; color: var(--critical); }
.ws-search { width: 100%; box-sizing: border-box; font: inherit; font-size: 13.5px; border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; margin-bottom: 10px; }
.ws-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.ws-list label { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--border); border-radius: 10px; padding: 11px 13px; cursor: pointer; }
.ws-list label.on { border-color: var(--accent); background: var(--accent-soft); }
.ws-list label.off { opacity: 0.5; cursor: not-allowed; }
.ws-list input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--accent); }
.ws-an { display: grid; gap: 1px; min-width: 0; }
.ws-an b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-an small { font-size: 12px; color: var(--muted); }
.ws-err { color: var(--critical); font-size: 13px; margin: 12px 0 0; }
.ws-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.btn[disabled] { opacity: 0.5; pointer-events: none; }

/* All accounts home */
.ah-plan { font-size: 13px; color: var(--text-2); }
.ah-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 14px; }
.ah-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; display: grid; gap: 14px; cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s; }
.ah-card:hover, .ah-card:focus-visible { border-color: var(--accent); box-shadow: 0 6px 20px -10px rgba(42, 120, 214, 0.45); outline: none; }
.ah-card.loading { cursor: default; }
.ah-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.ah-head b { font-size: 16px; display: block; }
.ah-head small { font-size: 12px; color: var(--muted); }
.ah-lbl { display: block; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-2); margin-bottom: 6px; }
.ah-lbl em { font-style: normal; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--muted); }
.ah-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.ah-m { display: grid; gap: 1px; min-width: 0; background: var(--surface-2); border-radius: 8px; padding: 8px 10px; }
.ah-m span { font-size: 11.5px; color: var(--text-2); }
.ah-m b { font-size: 15.5px; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.ah-m b small { font-size: 11px; font-weight: 500; color: var(--muted); }
.ah-m em { font-style: normal; font-size: 11px; }
.ah-budget { margin-top: 10px; display: grid; gap: 5px; }
.ah-bar { position: relative; height: 8px; border-radius: 4px; background: #ecebe6; }
.ah-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: var(--accent); }
.ah-bar b { position: absolute; top: -4px; width: 2px; height: 16px; background: var(--text); transform: translateX(-1px); }
.ah-budget span { font-size: 12px; color: var(--text-2); }
.ah-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; border-top: 1px solid var(--border); padding-top: 10px; }
.ah-spark { width: 180px; height: 36px; }
.ah-open { font-size: 13px; font-weight: 600; color: var(--accent-ink); white-space: nowrap; }
.ah-err { margin: 0; font-size: 13px; color: var(--text-2); }
.ah-skel { display: grid; gap: 10px; }
.ah-skel i { display: block; height: 44px; border-radius: 8px; background: linear-gradient(90deg, var(--surface-2), #ecebe6, var(--surface-2)); background-size: 200% 100%; animation: ahShimmer 1.2s linear infinite; }
@keyframes ahShimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .ah-skel i { animation: none; } }
.ah-more { margin-top: 14px; font-size: 13px; }
@media (max-width: 700px) { .ah-cards { grid-template-columns: 1fr; } .ah-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ws-plans { grid-template-columns: 1fr; } }

.ah-ins { list-style: none; margin: -4px 0 0; padding: 0; display: grid; gap: 6px; }
.ah-ins li { display: flex; gap: 9px; align-items: flex-start; font-size: 13px; line-height: 1.45; padding: 7px 10px; border-radius: 8px; background: var(--surface-2); }
.ah-ins li > span:first-child { flex: none; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; font-weight: 800; color: #fff; margin-top: 1px; }
.ah-ins li.bad { background: #fdf1f1; } .ah-ins li.bad > span:first-child { background: var(--critical); }
.ah-ins li.warn { background: #fff7e8; } .ah-ins li.warn > span:first-child { background: #eda100; }
.ah-ins li.good { background: #eef8f1; } .ah-ins li.good > span:first-child { background: #1baf7a; }
.ah-ins li.info > span:first-child { background: var(--muted); }

/* Account context in the top bar: All accounts / <account ▾> */
.crumb { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; align-self: center; }
.tb-brand { display: none; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; text-decoration: none; color: var(--text); }
.crumb-all { font-size: 13.5px; color: var(--text-2); text-decoration: none; white-space: nowrap; }
.crumb-all:hover { color: var(--accent-ink); text-decoration: underline; }
.crumb-sep { color: var(--muted); }
#accountSelect { appearance: none; -webkit-appearance: none; width: auto; min-width: 0; max-width: min(460px, 100%); font-size: 16px; font-weight: 700; color: var(--text); border: 1px solid transparent; border-radius: 8px; padding: 6px 30px 6px 8px; cursor: pointer; text-overflow: ellipsis;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5L6 8l3.5-3.5' fill='none' stroke='%2352514e' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 9px center; }
#accountSelect:hover, #accountSelect:focus-visible { background-color: var(--surface-2); border-color: var(--border); outline: none; }
.side-back { display: flex; align-items: center; gap: 6px; margin: -6px 0 0; padding: 7px 8px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--text-2); text-decoration: none; }
.side-back:hover { background: var(--surface-2); color: var(--accent-ink); }

/* All accounts + Manage accounts: their own screen, no report sidebar */
body.pf .shell { grid-template-columns: minmax(0, 1fr); }
body.pf .sidebar { display: none; }
body.pf .tb-brand { display: inline-flex; }
body.pf .crumb-all, body.pf .crumb-sep, body.pf #accountSelect { display: none; }
body.pf .profile { margin-left: auto; }
body.pf .view { max-width: 1280px; margin-inline: auto; width: 100%; box-sizing: border-box; }

/* Home page: morning brief sheet + USP band */
.lp-sheet.brief .lp-sheet-cols, .lp-sheet.brief .lp-sheet-rows li { grid-template-columns: minmax(0, 1fr) 108px 128px; }
.lp-sheet.brief .lp-sheet-cols span:last-child { text-align: right; }
.lp-sheet.brief .lp-sheet-rows li { padding-block: 13px; }
.lp-sheet.brief .t { font-size: 15px; }
.lp-sheet.brief .t i { font-style: normal; }
.lp-sheet.brief .t i.r { color: var(--red); } .lp-sheet.brief .t i.g { color: var(--green); }
.lp-sheet.brief .n { font-weight: 500; color: var(--ink); }
.lp-sheet.brief .n small { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.lp-usps { border-bottom: 1px solid var(--rule); }
.lp-usps-in { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.lp-usps-in > div { padding: 40px 32px 44px 0; }
.lp-usps-in > div + div { padding-left: 32px; border-left: 1px solid var(--rule); }
.lp-usps .lp-mono { color: var(--ink-2); text-transform: uppercase; letter-spacing: 0.06em; padding-left: 10px; border-left: 3px solid var(--marker); }
.lp-usps h3 { font-size: clamp(22px, 2.2vw, 28px); line-height: 1.15; letter-spacing: -0.025em; font-weight: 800; margin: 10px 0 10px; }
.lp-usps p { margin: 0; color: var(--ink-2); font-size: 15.5px; line-height: 1.55; }
@media (max-width: 1020px) { .lp-usps-in { grid-template-columns: 1fr; } .lp-usps-in > div, .lp-usps-in > div + div { padding: 28px 0; border-left: 0; } .lp-usps-in > div + div { border-top: 1px solid var(--rule); } }
@media (max-width: 720px) { .lp-sheet.brief .lp-sheet-cols, .lp-sheet.brief .lp-sheet-rows li { grid-template-columns: minmax(0, 1fr) 100px; } .lp-sheet.brief .lp-sheet-cols span:last-child { display: none; } }

/* Home page: How the platform works */
.lp-sub { margin: -4px 0 0; color: var(--ink-2); font-size: 17px; }
.lp-steps2 { list-style: none; margin: 40px 0 0; padding: 0; display: grid; gap: 0; border-top: 1.5px solid var(--ink); }
.lp-step { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 56px; align-items: center; padding: 36px 0; border-bottom: 1px solid var(--rule); }
.lp-step-copy .lp-mono { display: inline-block; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink); background: var(--marker); padding: 1px 7px; }
.lp-step-copy h3 { font-size: clamp(22px, 2.3vw, 30px); line-height: 1.1; letter-spacing: -0.025em; font-weight: 800; margin: 12px 0 10px; }
.lp-step-copy p { margin: 0; color: var(--ink-2); font-size: 16px; line-height: 1.6; max-width: 460px; }
.lp-mini { background: #fff; border: 1px solid var(--rule); border-radius: 6px; padding: 4px 0 8px; box-shadow: 10px 10px 0 -1px var(--paper), 10px 10px 0 0 var(--rule); }
.lp-mini-h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 18px 10px; border-bottom: 1.5px solid var(--ink); font-size: 14px; }
.lp-mini-h .lp-mono { color: var(--muted); font-size: 11.5px; }
.lp-pick { list-style: none; margin: 0; padding: 6px 0 0; }
.lp-pick li { display: flex; align-items: center; gap: 10px; padding: 9px 18px; font-weight: 600; font-size: 14.5px; border-bottom: 1px solid var(--rule-2); }
.lp-pick li:last-child { border-bottom: 0; }
.lp-pick i { font-style: normal; width: 18px; height: 18px; display: grid; place-items: center; background: var(--ink); color: var(--marker); font-size: 11px; border-radius: 3px; }
.lp-pick small { margin-left: auto; font-family: var(--mono); font-size: 11.5px; font-weight: 400; color: var(--muted); }
.lp-rowx { display: grid; grid-template-columns: minmax(0, 1fr) auto 120px; gap: 12px; align-items: center; padding: 10px 18px; border-bottom: 1px solid var(--rule-2); font-size: 14.5px; }
.lp-rowx span { font-family: var(--mono); font-size: 13px; }
.lp-rowx em { font-family: var(--mono); font-size: 12px; text-align: right; }
.lp-rowx em.up { color: var(--green); } .lp-rowx em.down { color: var(--red); } .lp-rowx em.flat { color: var(--muted); }
.lp-obs { margin: 10px 18px 4px; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.lp-obs mark { font-family: var(--mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.04em; margin-right: 6px; color: var(--ink); }
.lp-proj2 { display: block; width: calc(100% - 36px); height: 90px; margin: 14px 18px 6px; }
.lp-kv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--rule-2); }
.lp-kv div { padding: 10px 18px 6px; display: grid; gap: 2px; }
.lp-kv div + div { border-left: 1px solid var(--rule-2); }
.lp-kv span { font-size: 12px; color: var(--ink-2); }
.lp-kv b { font-size: 19px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.lp-kv b.g { color: var(--green); }
.lp-recs2 { list-style: none; margin: 0; padding: 4px 0 0; counter-reset: r; }
.lp-recs2 li { counter-increment: r; position: relative; padding: 10px 18px 10px 50px; border-bottom: 1px solid var(--rule-2); }
.lp-recs2 li:last-child { border-bottom: 0; }
.lp-recs2 li::before { content: counter(r); position: absolute; left: 18px; top: 11px; width: 20px; height: 20px; display: grid; place-items: center; background: var(--marker); border: 1.5px solid var(--ink); font-family: var(--mono); font-size: 11px; }
.lp-recs2 b { display: block; font-size: 14.5px; }
.lp-recs2 small { font-family: var(--mono); font-size: 11.5px; color: var(--green); }
.lp-sheet.brief .note:not(.ok):not(.bad) { color: var(--muted); }
@media (max-width: 1020px) { .lp-step { grid-template-columns: 1fr; gap: 24px; } }
@media (max-width: 560px) { .lp-rowx { grid-template-columns: minmax(0, 1fr) auto; } .lp-rowx em { grid-column: 1 / -1; text-align: left; margin-top: -6px; } .lp-kv { grid-template-columns: 1fr; } .lp-kv div + div { border-left: 0; border-top: 1px solid var(--rule-2); } }

/* Home page slideshow */
.lp-show { display: grid; gap: 14px; min-width: 0; }
.lp-show-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.lp-show-tabs button { font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--ink); background: transparent; border: 1.5px solid var(--ink); border-radius: 3px; padding: 5px 10px; cursor: pointer; }
.lp-show-tabs button:hover { background: #fff; }
.lp-show-tabs button[aria-selected="true"] { background: var(--ink); color: var(--marker); }
.lp-show-tabs button:focus-visible, .lp-show-btn:focus-visible { outline: 3px solid var(--marker); outline-offset: 2px; }
.lp-slides { display: grid; }
.lp-slide { grid-area: 1 / 1; opacity: 0; transform: translateY(8px); transition: opacity 0.35s ease, transform 0.35s ease; pointer-events: none; }
.lp-slide.is-on { opacity: 1; transform: none; pointer-events: auto; }
.lp-show-ctl { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.lp-show-btn { width: 32px; height: 32px; display: grid; place-items: center; font: inherit; font-size: 15px; color: var(--ink); background: transparent; border: 1.5px solid var(--ink); border-radius: 3px; cursor: pointer; }
.lp-show-btn:hover { background: var(--ink); color: var(--marker); }
.lp-show-ctl .lp-mono { color: var(--ink-2); min-width: 38px; text-align: center; }
.lp-show-bar { flex: 1; height: 3px; background: var(--rule); position: relative; overflow: hidden; }
.lp-show-bar i { position: absolute; inset: 0; background: var(--ink); transform: scaleX(0); transform-origin: left; }
.lp-show.run .lp-show-bar i { animation: lpBar 6s linear forwards; }
.lp-show.paused .lp-show-bar i { animation-play-state: paused; }
@keyframes lpBar { to { transform: scaleX(1); } }
.lp-slide-chart { padding: 16px 20px 8px; }
.lp-slide-chart svg { display: block; width: 100%; height: 120px; }
.lp-slide-leg { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 8px; font-size: 11px; color: var(--muted); }
.lp-slide-leg i { display: inline-block; width: 14px; height: 0; margin-right: 6px; vertical-align: 3px; border-top: 2.4px solid var(--ink); }
.lp-slide-leg i.d { border-top-style: dashed; border-top-width: 2px; }
.lp-sheet .lp-kv div { padding-inline: 20px; }
.lp-cols3 { grid-template-columns: minmax(0, 1fr) auto 120px !important; }
.lp-sheet .lp-rowx { padding-inline: 20px; }
.lp-ins2 { list-style: none; margin: 0; padding: 8px 20px 10px; border-bottom: 1px solid var(--rule-2); display: grid; gap: 6px; }
.lp-ins2 li { font-size: 14px; line-height: 1.45; padding-left: 18px; position: relative; }
.lp-ins2 li::before { position: absolute; left: 0; font-family: var(--mono); font-size: 11px; top: 2px; }
.lp-ins2 li.g::before { content: '▲'; color: var(--green); }
.lp-ins2 li.r::before { content: '▼'; color: var(--red); }
.lp-sheet .lp-recs2 li { padding-left: 52px; }
.lp-sheet .lp-recs2 li::before { left: 20px; }
@media (prefers-reduced-motion: reduce) { .lp-slide { transition: none; } .lp-show.run .lp-show-bar i { animation: none; } }

/* Channels & placements */
.ch-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.ch-leg { margin: 0 0 12px; flex-wrap: wrap; }
.ch-grid .split-row { grid-template-columns: 110px 1fr; margin-bottom: 10px; }
.ch-grid .split-bar { height: 24px; }
.ch-best { border-left: 1px solid var(--border); padding-left: 20px; display: grid; gap: 8px; }
.ch-rank { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.ch-rank .n { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); font-size: 12px; font-weight: 700; }
.ch-rank i { width: 10px; height: 10px; border-radius: 3px; }
.ch-rank span:last-child { margin-left: auto; color: var(--text-2); font-variant-numeric: tabular-nums; }
.ch-t td:first-child, .ch-t th:first-child, .ch-ct td, .ch-ct th, .ch-pt td:nth-child(-n+3), .ch-pt th:nth-child(-n+3) { text-align: left; }
.ch-ct td:nth-child(3), .ch-ct th:nth-child(3) { text-align: right; }
.split-bar.mini { height: 14px; min-width: 220px; }
.ch-pt td { vertical-align: top; }
.ch-pt .sub, .ch-ct .sub { display: block; font-size: 11.5px; color: var(--muted); }
.ch-ptypes { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-bottom: 12px; }
@media (max-width: 900px) { .ch-grid { grid-template-columns: 1fr; } .ch-best { border-left: 0; padding-left: 0; } }

.card-head .table-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.card-head .table-tools .chips-row { flex-wrap: nowrap; }
.card-head .table-tools select { width: auto; }

/* Placements page */
.pl-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 16px; margin-bottom: 16px; }
.pl-top > .card { margin: 0; }
.pl-top h2 { margin: 0 0 12px; font-size: 16px; }
.pl-vs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.pl-vs > div { display: grid; gap: 2px; border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; }
.pl-vs .lbl { font-size: 12.5px; color: var(--text-2); }
.pl-vs b { font-size: 26px; letter-spacing: -0.02em; }
.pl-vs .muted { font-size: 12px; }
.pl-dot { width: 10px; height: 10px; border-radius: 3px; }
.pl-bar { height: 26px; }
.pl-h3 { font-size: 13px; margin: 18px 0 8px; color: var(--text-2); }
.pl-top10 .rank { margin: 0; }
.pl-top10 .nm2 > span { display: flex; align-items: center; gap: 4px; min-width: 0; }
.pl-sep { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--border); }
@media (max-width: 1000px) { .pl-top { grid-template-columns: 1fr; } }

.pl-filter { display: flex; align-items: flex-end; gap: 14px; margin: -4px 0 14px; }
.pl-filter select { width: auto; min-width: 260px; font-size: 13.5px; padding: 7px 10px; }
.pl-filter .linkish { font-size: 13px; margin-bottom: 8px; }

.pl-vs b small { font-size: 12px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.pl-top-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.pl-top-h h2 { margin: 0 !important; }
.pl-top-h .muted { font-size: 12px; }
.pl-top10 .chips-row { margin-bottom: 12px; }
.pl-top10 .rank .v { display: grid; justify-items: end; line-height: 1.15; }
.pl-top10 .rank .v small { font-size: 10.5px; font-weight: 500; color: var(--muted); }
.pl-scroll { max-height: 520px; overflow-y: auto; padding-right: 6px; }
.pl-more { margin-top: 10px; font-size: 13px; font-weight: 600; }

/* Columns vs Tiles pickers */
.colpick .cp-head { display: grid; gap: 1px; padding: 4px 8px 8px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.colpick .cp-head b { font-size: 13px; }
.colpick .cp-head span { font-size: 11.5px; color: var(--muted); }
.colpick.is-tiles .menu.tiles-menu { min-width: 340px; }
.cp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 2px 4px 6px; }
.colpick label.cp-tile { padding: 0; }
.colpick label.cp-tile:hover { background: none; }
.cp-tile input { position: absolute; opacity: 0; pointer-events: none; }
.cp-tile-b { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 9px; border: 1px solid var(--border); border-radius: 8px; font-size: 12.5px; background: var(--surface); transition: border-color .12s, background .12s; }
.cp-tile-b i { width: 14px; height: 10px; border-radius: 3px; border: 1.5px solid var(--muted); flex: none; }
.cp-tile:hover .cp-tile-b { border-color: var(--accent); }
.cp-tile input:checked + .cp-tile-b { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 9%, var(--surface)); font-weight: 600; }
.cp-tile input:checked + .cp-tile-b i { background: var(--accent); border-color: var(--accent); }
.cp-tile input:focus-visible + .cp-tile-b { outline: 2px solid var(--accent); outline-offset: 1px; }
@media (max-width: 600px) { .colpick.is-tiles .menu.tiles-menu { min-width: 260px; } .cp-grid { grid-template-columns: 1fr; } }

/* Top-bar filters: always just left of the date range */
.tb-filters { margin-left: auto; display: flex; align-items: flex-end; gap: 10px; }
.tb-filters[hidden] { display: none !important; }
.tb-filters:not([hidden]) + .dr-field { margin-left: 0; }
.tb-filters select { width: auto; min-width: 150px; max-width: 220px; font-size: 13px; padding: 6px 8px; }
.scope-on { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin: -6px 0 16px; font-size: 13px; color: var(--muted); }
.scope-on b { color: var(--text); }
.scope-on .linkish { font-size: 13px; }
@media (max-width: 900px) { .tb-filters { margin-left: 0; flex-wrap: wrap; } .tb-filters select { min-width: 0; max-width: 46vw; } }

/* Home: platform features as a compact grid of cards (title over text) */
.lp-feat .lp-split-head { position: static; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: end; margin-bottom: 28px; }
.lp-feat .lp-split-head h2 { margin: 0; }
.lp-checks.lp-cards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1.5px solid var(--ink); counter-reset: feat; }
.lp-checks.lp-cards div { display: block; padding: 18px 18px 20px 0; border-bottom: 1px solid var(--rule); counter-increment: feat; }
.lp-checks.lp-cards div + div { padding-left: 18px; }
.lp-checks.lp-cards div:nth-child(5n + 1) { padding-left: 0; }
.lp-checks.lp-cards div:not(:nth-child(5n)) { border-right: 1px solid var(--rule); }
.lp-checks.lp-cards dt { font-size: 15.5px; margin-bottom: 8px; }
.lp-checks.lp-cards dt::before { content: counter(feat, decimal-leading-zero); display: block; font-family: 'IBM Plex Mono', monospace; font-size: 11.5px; font-weight: 500; color: var(--ink-2); margin-bottom: 10px; }
.lp-checks.lp-cards dd { font-size: 13.5px; line-height: 1.5; }
@media (max-width: 1100px) {
  .lp-checks.lp-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lp-checks.lp-cards div, .lp-checks.lp-cards div + div { padding: 18px 16px 20px; border-right: 1px solid var(--rule); }
  .lp-checks.lp-cards div:nth-child(3n + 1) { padding-left: 0; }
  .lp-checks.lp-cards div:nth-child(3n) { border-right: 0; }
}
@media (max-width: 700px) {
  .lp-feat .lp-split-head { grid-template-columns: 1fr; gap: 12px; }
  .lp-checks.lp-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lp-checks.lp-cards div, .lp-checks.lp-cards div + div, .lp-checks.lp-cards div:nth-child(3n + 1) { padding: 16px 12px 18px; border-right: 1px solid var(--rule); }
  .lp-checks.lp-cards div:nth-child(2n + 1) { padding-left: 0; }
  .lp-checks.lp-cards div:nth-child(2n) { border-right: 0; }
}

/* Top bar: one row, every control the same height, centred. The date range is the only date filter. */
.toolbar { align-items: center; min-height: 64px; }
.toolbar #granField > span, .toolbar #rangeField > span, .tb-filters .field > span { display: none; }
.toolbar .seg { height: 40px; box-sizing: border-box; align-items: center; }
.toolbar .dr-btn { height: auto; min-height: 40px; box-sizing: border-box; align-content: center; padding: 4px 12px; }
.tb-filters { align-items: center; }
.tb-filters select { height: 40px; box-sizing: border-box; }

/* Comparison cells: this period / comparison period / % change */
.cmp { display: grid; justify-items: end; gap: 1px; line-height: 1.2; }
.cmp .cmp-p { font-size: 11.5px; color: var(--muted); font-weight: 400; }
.cmp .chg-in { font-size: 11px; font-weight: 600; }
.chg-in.up { color: #1a8f5c; }
.chg-in.down { color: #d93636; }
.chg-in.new { color: var(--muted); font-weight: 500; }
.cmp-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12px; color: var(--muted); margin: 4px 0 10px; }
.cmp-legend b { color: var(--text); }
.cmp-legend i.cmp-p { font-style: normal; color: var(--muted); text-decoration: underline dotted; }
.toolbar .dr-btn { gap: 0; line-height: 1.25; padding: 3px 12px; }

/* All accounts: up to 3 accounts sit in one row; tiles go 2 x 2 when a card gets narrow */
.ah-card { container-type: inline-size; }
@media (min-width: 1100px) {
  .ah-cards.fit-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ah-cards.fit-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@container (max-width: 470px) {
  .ah-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Daily budget column and Segment rows */
.perf-t2 td.bud { white-space: nowrap; }
.perf-t2 td.bud .sub2 { display: block; font-size: 11px; color: var(--muted); }
.perf-t2 td.bud .sub2.over { color: #d93636; }
.perf-t2 td.bud .sub2.under { color: #b7791f; }
.perf-seg { display: inline-flex; align-items: center; gap: 6px; height: 34px; box-sizing: border-box; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); padding: 0 4px 0 10px; font-size: 12.5px; }
.perf-seg select { border: 0; background: transparent; font: inherit; font-size: 12.5px; padding: 0 4px; height: 30px; width: auto; }
.perf-seg:focus-within { border-color: var(--accent); }
.perf-t2 tr.seg-row td { background: var(--surface-2); font-size: 12.5px; padding-top: 6px; padding-bottom: 6px; color: var(--text-2); }
.perf-t2 tr.seg-row .seg-lbl { padding-left: 30px; font-variant-numeric: tabular-nums; }

/* Insights & recommendations: two cards */
.ir-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-bottom: 18px; align-items: start; }
.ir-card { margin: 0; padding: 16px 18px 14px; }
.ir-recs { background: #f7faff; border-color: #dbe7f7; }
.ir-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.ir-head h2 { display: flex; align-items: center; gap: 9px; margin: 0; font-size: 15.5px; }
.ir-hi { width: 22px; height: 22px; display: grid; place-items: center; color: #e2a400; }
.ir-hi.rec { color: var(--accent); }
.ir-hi svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ir-hi:not(.rec) svg { fill: #ffd54a; stroke: #b98300; }
.ir-all { font-size: 12.5px; font-weight: 600; color: var(--accent); white-space: nowrap; text-decoration: none; }
.ir-all:hover { text-decoration: underline; }
.ir-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.ir-i, .ir-r { display: grid; grid-template-columns: 26px 22px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 10px; }
.ir-i.bad { background: #fdf1f1; }
.ir-i.info { background: #fdf7ea; }
.ir-i.good { background: #eef8f1; }
.ir-r { background: transparent; padding: 10px 4px; border-radius: 0; border-bottom: 1px solid #e3ebf5; }
.ir-r:last-child { border-bottom: 0; }
.ir-n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.ir-i.bad .ir-n { background: #fbdcdc; color: #c02b2b; }
.ir-i.info .ir-n { background: #fbe9c2; color: #9a6a00; }
.ir-i.good .ir-n, .ir-r .ir-n { background: #d9f1e1; color: #1a7f4f; }
.ir-ic svg { width: 18px; height: 18px; display: block; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ir-i.bad .ir-ic svg { stroke: #d93636; }
.ir-i.info .ir-ic svg { stroke: #c98a00; }
.ir-i.good .ir-ic svg, .ir-r .ir-ic svg { stroke: #1a8f5c; }
.ir-r .ic-pause svg, .ir-r .ic-minus svg { stroke: #d93636; }
.ir-r .ic-up svg { stroke: #1a8f5c; }
.ir-r .ic-bids svg, .ir-r .ic-move svg, .ir-r .ic-fix svg { stroke: #2a78d6; }
.ir-tx { min-width: 0; }
.ir-h { font-size: 13.5px; font-weight: 600; line-height: 1.4; color: var(--text); }
.ir-h b { font-weight: 700; }
.ir-i.good .ir-h b { color: #1a7f4f; }
.ir-s { font-size: 12.5px; color: var(--text-2); line-height: 1.45; margin-top: 2px; }
.ir-s b { color: #1a7f4f; }
.ir-tag { font-size: 11.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.ir-tag.tag-hi { background: #fbdcdc; color: #b42323; }
.ir-tag.tag-md { background: #fbeec9; color: #8a5d00; }
.ir-tag.tag-op { background: #d9f1e1; color: #1a7f4f; }
.ir-btn { font: inherit; font-size: 12.5px; font-weight: 600; color: var(--accent); background: #fff; border: 1px solid #c9dcf3; border-radius: 8px; padding: 6px 12px; white-space: nowrap; cursor: pointer; text-decoration: none; }
.ir-btn:hover { border-color: var(--accent); background: #f0f6fe; }
.ir-assume { font-size: 11.5px; color: var(--muted); margin: 10px 0 0; line-height: 1.45; }
.ir-empty { font-size: 13px; color: var(--muted); padding: 8px 4px; }
@media (max-width: 1100px) { .ir-wrap { grid-template-columns: 1fr; } }
@media (max-width: 600px) {
  .ir-i, .ir-r { grid-template-columns: 24px minmax(0, 1fr); }
  .ir-ic { display: none; }
  .ir-tag, .ir-btn { grid-column: 2; justify-self: start; }
}

/* Insights & recommendations: compact, one line each (full text on hover) */
.ir-wrap { gap: 12px; margin-bottom: 14px; }
.ir-card { padding: 11px 14px 10px; }
.ir-head { margin-bottom: 7px; }
.ir-head h2 { font-size: 13.5px; gap: 7px; }
.ir-hi, .ir-hi svg { width: 16px; height: 16px; }
.ir-all { font-size: 11.5px; }
.ir-list { gap: 4px; }
.ir-i, .ir-r { grid-template-columns: 20px 16px minmax(0, 1fr) auto; gap: 8px; padding: 5px 9px; border-radius: 8px; }
.ir-r { padding: 5px 2px; }
.ir-n { width: 18px; height: 18px; font-size: 10.5px; }
.ir-ic svg { width: 15px; height: 15px; }
.ir-h, .ir-s { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ir-h { font-size: 12.5px; line-height: 1.35; }
.ir-s { font-size: 11.5px; line-height: 1.35; margin-top: 0; }
.ir-tag { font-size: 10.5px; padding: 2px 8px; }
.ir-btn { font-size: 11.5px; padding: 3px 9px; border-radius: 7px; }
.ir-note { font-size: 12px; color: var(--muted); cursor: help; font-weight: 400; }
/* Show the full text (wraps), still compact */
.ir-h, .ir-s { white-space: normal; overflow: visible; text-overflow: clip; }
.ir-i, .ir-r { align-items: start; }
.ir-i .ir-n, .ir-r .ir-n, .ir-ic { margin-top: 1px; }
.ir-tag, .ir-btn { align-self: center; }

/* Ask Specialist */
.ask-card { display: grid; grid-template-rows: minmax(0, 1fr) auto auto; height: calc(100vh - 230px); min-height: 460px; padding: 0; overflow: hidden; }
.ask-log { overflow-y: auto; padding: 20px 22px 8px; display: grid; align-content: start; gap: 14px; }
.ask-m { display: flex; gap: 10px; align-items: flex-start; max-width: 780px; }
.ask-m.me { justify-self: end; }
.ask-m.me .ask-b { background: var(--accent); color: #fff; border-radius: 14px 14px 4px 14px; padding: 9px 14px; font-size: 14px; white-space: pre-wrap; }
.ask-av { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #2a78d6, #1baf7a); color: #fff; font-size: 13px; font-weight: 700; }
.ask-av.big { width: 40px; height: 40px; font-size: 18px; }
.ask-m.bot .ask-b { background: var(--surface-2); border: 1px solid var(--border); border-radius: 4px 14px 14px 14px; padding: 10px 14px; font-size: 14px; line-height: 1.55; color: var(--text); }
.ask-m.bot .ask-b p { margin: 0 0 6px; }
.ask-m.bot .ask-b p:last-child, .ask-m.bot .ask-b ul:last-child { margin-bottom: 0; }
.ask-m.bot .ask-b ul { margin: 2px 0 6px; padding-left: 18px; display: grid; gap: 3px; }
.ask-m.err .ask-b { background: #fdf1f1; border-color: #f3caca; color: #a12626; }
.ask-src { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin-top: 8px; font-size: 11.5px; color: var(--muted); }
.ask-src span { background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 1px 8px; }
.ask-typing { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 12.5px; }
.ask-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: askDot 1s infinite ease-in-out; }
.ask-typing i:nth-child(2) { animation-delay: .15s; } .ask-typing i:nth-child(3) { animation-delay: .3s; margin-right: 6px; }
@keyframes askDot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .ask-typing i { animation: none; } }
.ask-empty { display: grid; gap: 18px; padding: 16px 0; max-width: 760px; }
.ask-hello { display: flex; gap: 12px; align-items: center; }
.ask-hello b { display: block; font-size: 16px; }
.ask-hello span:not(.ask-av) { font-size: 13px; color: var(--text-2); }
.ask-sugs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ask-sug { text-align: left; font: inherit; font-size: 13px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; cursor: pointer; color: var(--text); }
.ask-sug:hover { border-color: var(--accent); background: #f5f9ff; }
.ask-in { display: flex; gap: 10px; align-items: flex-end; padding: 12px 16px; border-top: 1px solid var(--border); background: var(--surface); }
.ask-in textarea { flex: 1; resize: none; font: inherit; font-size: 14px; line-height: 1.45; padding: 9px 12px; border: 1px solid var(--border); border-radius: 10px; min-height: 40px; max-height: 160px; }
.ask-in textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ask-in .btn { height: 40px; padding: 0 18px; }
.ask-foot { margin: 0; padding: 0 16px 10px; font-size: 11.5px; color: var(--muted); background: var(--surface); }
@media (max-width: 700px) { .ask-sugs { grid-template-columns: 1fr; } .ask-card { height: calc(100vh - 180px); } .ask-log { padding: 14px; } }

/* Ask Specialist: minimal empty state */
.ask-card { grid-template-rows: minmax(0, 1fr) auto; }
.ask-empty { align-self: center; justify-items: center; text-align: center; gap: 14px; margin: 0 auto; padding: 40px 0; }
.ask-empty b { font-size: 18px; font-weight: 600; }
.ask-sugs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; grid-template-columns: none; }
.ask-sug { border-radius: 999px; padding: 6px 14px; font-size: 12.5px; color: var(--text-2); }
.ask-log:has(.ask-empty) { align-content: center; }

/* Projection tracker: summary cards + month-end table */
.pj-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.pj-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; row-gap: 8px; align-items: start; }
.pj-card .pj-extra, .pj-card .pj-bar, .pj-card .pj-cap { grid-column: 1 / -1; }
.pj-ico { width: 24px; height: 24px; border-radius: 7px; display: inline-grid; place-items: center; flex: none; }
.pj-ico svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.pj-ico.big { width: 44px; height: 44px; border-radius: 12px; }
.pj-ico.big svg { width: 23px; height: 23px; }
.pj-body { display: grid; gap: 1px; min-width: 0; }
.pj-l { font-size: 12.5px; color: var(--text-2); }
.pj-v { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; }
.pj-vs { font-size: 12px; color: var(--muted); }
.pj-vs span { margin-left: 4px; font-weight: 600; }
.pj-extra { font-size: 11.5px; color: var(--muted); margin-top: -2px; }
.pj-bar { display: block; height: 7px; border-radius: 99px; background: #eceae4; overflow: hidden; }
.pj-bar i { display: block; height: 100%; border-radius: 99px; }
.pj-bar.empty { background: repeating-linear-gradient(90deg, #eceae4 0 6px, transparent 6px 10px); }
.pj-cap { font-size: 12px; color: var(--text-2); }
.pj-cap a { color: var(--accent); }
.pj-st { font-weight: 600; }
.pj-st.good { color: #1a7f4f; } .pj-st.warn { color: #9a6a00; } .pj-st.bad { color: #c02b2b; }
.pj-table td.pj-m { display: flex; align-items: center; gap: 9px; font-weight: 600; white-space: nowrap; }
.pj-table td.pj-prog { min-width: 150px; }
.pj-table td.pj-prog .pj-bar { display: inline-block; width: 110px; vertical-align: middle; margin-right: 8px; }
.pj-table td.pj-prog span:last-child { font-size: 12px; color: var(--text-2); }
.pj-i { color: var(--muted); cursor: help; font-weight: 400; }
@media (max-width: 1100px) { .pj-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .pj-cards { grid-template-columns: 1fr; } }

/* Campaign projections table */
.pj-camps .table-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pj-camps .table-tools select { width: auto; height: 34px; font-size: 12.5px; padding: 0 8px; border-radius: 8px; }
.pj-ctable th, .pj-ctable td { text-align: right; white-space: nowrap; vertical-align: middle; }
.pj-ctable th:first-child, .pj-ctable td:first-child { text-align: left; }
.pj-ctable th:last-child, .pj-ctable td:last-child { text-align: center; }
.pj-cn { max-width: 300px; }
.pj-cn b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.pj-cn span { display: block; font-size: 11.5px; color: var(--muted); }
.pj-sub { display: block; font-size: 11px; color: var(--muted); }
.pj-sub.bad { color: #c02b2b; } .pj-sub.warn { color: #9a6a00; }
.pj-more { margin: 10px 0 0; font-size: 12.5px; }
.pj-camps .perf-search svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; flex: none; }

/* Column pickers look the same wherever they sit */
.colpick .menu input[type=checkbox] { width: auto; margin: 0; padding: 0; border: 0; flex: none; }
.pj-camps .table-tools .perf-search input[data-pj-q] { border: 0; padding: 0; width: 170px; }

/* Target vs Achieved (overview) */
.tv2-head .head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.tv2-sel { display: inline-flex; align-items: center; gap: 6px; height: 36px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); padding: 0 6px 0 10px; }
.tv2-sel svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; color: var(--text-2); }
.tv2-sel select { border: 0; background: transparent; font: inherit; font-size: 13px; height: 32px; max-width: 220px; width: auto; }
.tv2-head .btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; vertical-align: -2px; }
.tv2-big { width: 38px; height: 38px; border-radius: 10px; background: #eaf2fc; color: #2a78d6; display: grid; place-items: center; flex: none; }
.tv2-big.bad { background: #fdecec; color: #d93636; } .tv2-big.warn { background: #fdf6e0; color: #c98a00; }
.tv2-big svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.tv2-sum { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px; align-items: center; }
.tv2-sum-h { display: flex; gap: 12px; align-items: flex-start; }
.tv2-sum-h h2 { margin: 0 0 2px; font-size: 16px; }
.tv2-sum-h .muted { font-size: 12.5px; }
.tv2-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 0; }
.tv2-tile { display: grid; gap: 3px; padding: 4px 14px; border-left: 1px solid var(--border); min-width: 0; }
.tv2-th { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); }
.tv2-ico { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex: none; }
.tv2-ico svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.tv2-v { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; margin-top: 4px; }
.tv2-t { font-size: 12px; color: var(--muted); margin-top: -2px; }
.tv2-bar { display: block; height: 6px; border-radius: 99px; background: #eceae4; overflow: hidden; margin-top: 6px; }
.tv2-bar i { display: block; height: 100%; border-radius: 99px; }
.tv2-p { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.tv2-p.good, .tv2-t2 .good { color: #1a8f5c; } .tv2-p.warn { color: #b7791f; } .tv2-p.bad { color: #d93636; }
.tv2-h { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.tv2-h h2 { margin: 0 0 2px; font-size: 16px; }
.tv2-h .muted { font-size: 12.5px; }
.tv2-h > .ir-all, .tv2-tools { margin-left: auto; }
.tv2-tools { display: flex; align-items: center; gap: 8px; }
.tv2-tools .perf-search svg, .tv2-tools summary svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; vertical-align: -3px; }
.tv2-tools .perf-search input[data-tva-q] { border: 0; padding: 0; width: 170px; }
.tv2-tools .colpick summary { height: 34px; display: inline-flex; align-items: center; gap: 6px; }
.tv2-t { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.5px; }
.tv2-t th { background: var(--surface-2); color: var(--text-2); font-weight: 600; font-size: 11.5px; padding: 7px 8px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--border); }
.tv2-t thead tr:first-child th { font-size: 12px; color: var(--text); }
.tv2-t th.grp { text-align: center; border-left: 1px solid var(--border); }
.tv2-t th:nth-child(-n+3), .tv2-t td:nth-child(-n+3) { text-align: left; }
.tv2-t td { padding: 9px 8px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--grid, #efeee9); }
.tv2-t td.lt { border-left: 1px solid var(--grid, #efeee9); color: var(--text-2); }
.tv2-t td.pc { font-weight: 600; }
.tv2-t td.pc.good { color: #1a8f5c; } .tv2-t td.pc.warn { color: #b7791f; } .tv2-t td.pc.bad { color: #d93636; }
.tv2-t td.c, .tv2-t th.c { text-align: center; }
.tv2-t tr.tv2-all td { background: #f3f7fd; font-weight: 600; }
.tv2-t .rk { width: 26px; color: var(--muted); }
.tv2-cn { display: flex; align-items: center; gap: 8px; max-width: 260px; }
.tv2-nm { overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.tv2-sig { width: 22px; height: 22px; border-radius: 6px; background: #dce9fa; color: #2a78d6; display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.tv2-ci svg { width: 16px; height: 16px; display: block; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tv2-st { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.tv2-st i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tv2-st.good { background: #e3f5ea; color: #1a7f4f; } .tv2-st.warn { background: #fdf1d6; color: #9a6a00; } .tv2-st.bad { background: #fde3e3; color: #b42323; }
.tv2-go { width: 26px; height: 26px; border-radius: 7px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font-size: 16px; line-height: 1; color: var(--text-2); }
.tv2-go:hover { border-color: var(--accent); color: var(--accent); }
.tv2-bottom { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.tv2-rt { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.tv2-rt th { text-align: left; font-size: 11.5px; color: var(--text-2); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.tv2-rt td { padding: 9px 8px; border-bottom: 1px solid var(--grid, #efeee9); }
.tv2-rt td.bad { color: #d93636; font-weight: 600; } .tv2-rt td.warn { color: #b7791f; font-weight: 600; }
.tv2-rt td .muted { font-weight: 400; }
.tv2-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 7px; background: #d93636; }
.tv2-dot.warn { background: #e2a400; }
.tv2-rl { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tv2-rl li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; }
.tv2-rl li b { display: block; font-size: 13px; }
.tv2-rl li span { display: block; font-size: 12px; color: var(--text-2); margin-top: 2px; }
.tv2-n { width: 28px; height: 28px; border-radius: 50%; display: grid !important; place-items: center; background: #fde8e8; color: #c02b2b; font-weight: 700; font-size: 13px; margin: 0 !important; }
.tv2-rl li:nth-child(2) .tv2-n { background: #e3f5ea; color: #1a7f4f; } .tv2-rl li:nth-child(3) .tv2-n { background: #fdf1d6; color: #9a6a00; }
.tv2-act { font: inherit; font-size: 12px; font-weight: 600; padding: 6px 12px; border-radius: 8px; border: 0; cursor: pointer; white-space: nowrap; text-decoration: none; }
.tv2-act.red { background: #fde8e8; color: #c02b2b; } .tv2-act.green { background: #e3f5ea; color: #1a7f4f; } .tv2-act.amber { background: #fdf1d6; color: #8a5d00; } .tv2-act.blue { background: #e6effb; color: #2a78d6; }
.tv2-editor { border: 1.5px solid #cfe0f6; background: #fbfdff; }
.tv2-ed-h h2 { margin: 0 0 2px; }
.tv2-ed-h .muted { font-size: 12.5px; }
.tva-ctl-row { display: flex; align-items: flex-end; gap: 16px; margin: 12px 0; flex-wrap: wrap; }
.tv2-editor .tva-perf { box-shadow: none; }
@media (max-width: 1100px) { .tv2-sum { grid-template-columns: 1fr; } .tv2-bottom { grid-template-columns: 1fr; } .tv2-tile { border-left: 0; padding: 8px 0; } }

/* Creative gallery: whole image visible, where it runs, full-size viewer */
.creative .thumb { aspect-ratio: 4 / 3; background: repeating-conic-gradient(#f3f2ee 0 25%, #fbfaf7 0 50%) 0 0 / 16px 16px; }
.creative .thumb img { object-fit: contain; }
.thumb.zoomable { cursor: zoom-in; }
.thumb .zoom-ico { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 7px; background: rgba(20, 20, 20, 0.6); color: #fff; display: grid; place-items: center; font-size: 14px; opacity: 0; transition: opacity .15s; }
.thumb.zoomable:hover .zoom-ico, .thumb.zoomable:focus-visible .zoom-ico { opacity: 1; }
.cr-where { font-size: 11.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 2px 0 4px; }
body.lb-open { overflow: hidden; }
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(12, 14, 18, 0.82); display: grid; place-items: center; padding: 24px; }
.lb-inner { position: relative; max-width: min(1200px, 94vw); max-height: 92vh; display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 10px; }
.lb-media { display: grid; place-items: center; min-height: 0; }
.lb-media img { max-width: 94vw; max-height: 80vh; object-fit: contain; border-radius: 10px; background: #fff; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45); }
.lb-media.video iframe { width: min(960px, 92vw); aspect-ratio: 16 / 9; border: 0; border-radius: 10px; background: #000; }
.lb-cap { color: #fff; font-size: 13px; display: grid; gap: 4px; text-align: center; }
.lb-cap span { color: rgba(255, 255, 255, 0.75); font-size: 12px; line-height: 1.5; }
.lb-cap a { color: #9cc6ff; font-size: 12px; }
.lb-x { position: absolute; top: -14px; right: -14px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: #fff; color: #111; font-size: 15px; cursor: pointer; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3); z-index: 1; }
/* Target vs achieved header: controls in one row */
.tv2-head .head-actions { flex-direction: row; }
.creative .thumb img, .thumb.zoomable img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }

/* Creative thumbnails: blurred backdrop of the same image, the image itself framed on top */
.creative .thumb { background: linear-gradient(160deg, #eef3fb, #e3e9f3); }
.creative .thumb img.thumb-bg, .thumb.zoomable img.thumb-bg { position: absolute; inset: -12%; width: 124%; height: 124%; object-fit: cover; filter: blur(22px) saturate(1.25); opacity: 0.55; transform: scale(1.05); pointer-events: none; }
.creative .thumb img.thumb-img { position: absolute; inset: 10px; width: calc(100% - 20px); height: calc(100% - 20px); object-fit: contain; filter: drop-shadow(0 6px 14px rgba(20, 30, 50, 0.22)); border-radius: 4px; }
.thumb .play, .thumb .zoom-ico { z-index: 1; }

/* Click-to-sort headers on every table */
th.dsort { cursor: pointer; user-select: none; }
th.dsort:hover { color: var(--text); }
th.ds-asc::after, th.ds-desc::after { font-size: 10px; margin-left: 4px; color: var(--accent); }
th.ds-desc::after { content: '↓'; }
th.ds-asc::after { content: '↑'; }
th.ds-asc, th.ds-desc { color: var(--text); }

/* Keyword planner */
.kp-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; margin-bottom: 12px; }
.kp-form .field input, .kp-form .field select { height: 36px; font-size: 13px; }
.kp-form .kp-seeds { flex: 1 1 320px; }
.kp-form .kp-seeds input { width: 100%; }
.kp-form .field em { font-style: normal; }
.kp-note { display: grid; gap: 4px; padding: 12px 14px; border-radius: 10px; font-size: 13px; margin-bottom: 10px; }
.kp-note.bad { background: #fdf1f1; border: 1px solid #f3caca; color: #8a1f1f; }
.kp-note span { color: var(--text-2); }
.kp-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 10px; }
.kp-bar .seg button .muted { font-size: 11px; margin-left: 3px; }
.kp-bar .perf-search svg, .kp-bar .btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; vertical-align: -3px; }
.kp-bar .perf-search input[data-kp-q] { border: 0; padding: 0; width: 170px; }
.kp-bar .perf-search { margin-left: auto; }
.kp-t td code { font-size: 12px; background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }
.kp-t td .sub { display: block; font-size: 11px; color: var(--muted); }
.kp-foot { font-size: 11.5px; margin: 10px 0 0; line-height: 1.5; }
/* Reach planner */
.rp-in { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; }
.rp-in .field input, .rp-in .field select { height: 38px; font-size: 14px; min-width: 150px; }
.rp-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.rp-cards .pj-card { grid-template-columns: 1fr; }
.rp-split { display: flex; height: 12px; border-radius: 99px; overflow: hidden; background: #eceae4; margin: 2px 0 14px; }
.rp-split i { display: block; height: 100%; }
.rp-dot { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 8px; vertical-align: 0; }
.rp-pct { width: 64px; height: 30px; text-align: right; font: inherit; font-size: 13px; border: 1px solid var(--border); border-radius: 7px; padding: 0 6px; }
.rp-t td .sub { display: block; font-size: 11px; color: var(--muted); }
.rp-t td.muted { font-size: 11.5px; white-space: nowrap; }
