/* Official UW Brown var(--mavroon) and UW Gold var(--gold). https://www.uwyo.edu/web/branding/index.html */




*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size:var(--type-14);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}


.hidden         { display: none !important; }
.subtle         { color: var(--text-muted); font-size:var(--type-12); letter-spacing:0; }
.error          { color: var(--danger); font-size:var(--type-13); margin-top: 16px; }
.u-num          { font-variant-numeric: tabular-nums; }

.login-screen {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 12%, var(--mavroon-dim) 0%, transparent 45%),
    radial-gradient(circle at 80% 88%, var(--gold-dim) 0%, transparent 50%),
    var(--bg);
  position: relative;
}


.login-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence baseFrequency='0.85'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.04 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

.login-screen > * { position: relative; z-index: 1; }

.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-18);
  padding: 48px 44px 32px;
  width: 100%;
  max-width: 420px;
  text-align: center;
  position: relative;
  box-shadow:
    var(--shadow-xs);
}


.login-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--mavroon);
  border-radius: var(--radius-18) var(--radius-18) 0 0;
}

.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-bottom: 32px;
}

.login-brand img.brand-logo {
  height: 36px;
  width: auto;
  object-fit: contain;
  margin-bottom: 16px;
  opacity: 0.95;
}

.login-title {
  font-size:var(--type-24);
  font-weight: 700;
  letter-spacing:0;
  color: var(--text);
  line-height: 1.15;
}

.login-sub {
  font-size:var(--type-11);
  font-weight: 600;
  text-transform: none;
  letter-spacing:0;
  color: var(--text-muted);
  margin-top: 4px;
}

.brand-logo {
  max-height: 80px;
  width: auto;
  object-fit: contain;
  margin-bottom: 8px;
}

.subtitle {
  color: var(--text-muted);
  font-size:var(--type-11);
  font-weight: 600;
  margin-bottom: 32px;
  letter-spacing:0;
  text-transform: none;
}

#login-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.login-btn {
  background: var(--mavroon);
  color: var(--bg);
  border: 0;
  padding: 12px 16px;
  border-radius: var(--radius-8);
  font-size:var(--type-14);
  font-weight: 600;
  letter-spacing:0;
  cursor: pointer;
  transition:
    background var(--duration-base) var(--ease-in-out),
    transform 120ms ease,
    box-shadow var(--duration-base) var(--ease-in-out);
  margin-top: 4px;
}
.login-btn:hover { background: var(--mavroon-dark); box-shadow: var(--shadow-xs); }
.login-btn:active { transform: translateY(1px); }
.login-btn:focus-visible {
  outline: 2px solid var(--mavroon);
  outline-offset: 2px;
}

.login-error {
  color: var(--pause);
  font-size:var(--type-12);
  min-height: 16px;
  margin-top: 4px;
  text-align: left;
}

.login-back {
  display: inline-block;
  margin-top: 24px;
  font-size:var(--type-12);
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing:0;
  transition: color var(--duration-base) var(--ease-in-out);
}
.login-back:hover { color: var(--mavroon); }

input[type="password"],
input[type="date"],
select {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 16px;
  border-radius: var(--radius-8);
  font-family: var(--font);
  font-size:var(--type-14);
  outline: none;
  transition:
    border-color var(--duration-base) var(--ease-in-out),
    box-shadow var(--duration-base) var(--ease-in-out);
  width: 100%;
}
input:hover { border-color: var(--text-disabled); }
input:focus,
select:focus {
  border-color: var(--mavroon);
  box-shadow: var(--shadow-xs);
}

input[type="date"] {
  color-scheme: light;
}

button {
  background: var(--mavroon);
  color: var(--bg);
  border: none;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size:var(--type-14);
  font-weight: 600;
  cursor: pointer;
  transition:
    background var(--duration-fast) var(--ease-in-out),
    opacity var(--duration-fast) var(--ease-in-out),
    transform var(--duration-fast) var(--ease-out),
    box-shadow var(--duration-base) var(--ease-in-out);
  will-change: transform;
}

button:hover {
  transform:none;
  box-shadow: var(--shadow-xs);
}

button:active {
  transform: translateY(0);
}


.ghost-btn {
  background: transparent;
  color: var(--band-rule);
  border: 1px solid var(--band-rule);
  padding: 8px 12px;
  font-size:var(--type-12);
  font-weight: 500;
  letter-spacing:0;
  border-radius: var(--radius-sm);
}

.ghost-btn:hover {
  background: var(--band-rule);
  color: var(--bg);
  border-color: var(--band-rule);
  transform: none;
  box-shadow:var(--shadow-xs);
}

.dashboard {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding-bottom: 64px;
}


:focus-visible {
  outline: 2px solid var(--mavroon);
  outline-offset: 2px;
}
.header :focus-visible {
  outline-color: var(--band-rule);
}

.header {
  background: var(--mavroon);
  color: var(--bg);
  
  width: 100vw;
  margin-left: calc(50% - 50vw);
  padding: 0 clamp(16px, 4vw, 64px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 64px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}


.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1368px;  
  margin: 0 auto;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}


.header-logo {
  height: 40px;
  width: auto;
  object-fit: contain;
  
  filter: brightness(0) invert(1);
}


.header-titleblock {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}


.header-descriptor {
  color: var(--tooltip-bg);
  font-size:var(--type-12);
  font-weight: 700;
  letter-spacing:0;
  text-transform: none;
  line-height: 1;
}


.header-poweredby {
  font-size:var(--type-11);
  font-weight: 500;
  letter-spacing:0;
  color: var(--bg);               
  line-height: 1;
}

.traffik-wordmark {
  color: var(--bg);               
  font-weight: 800;
  letter-spacing:0;
}

#last-updated {
  font-size:var(--type-11);
  color: var(--text-muted);
  letter-spacing:0;
}

.dashboard > *:not(.header) {
  max-width: 1440px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: 32px;
  padding-right: 32px;
  box-sizing: border-box;
}

.controls {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  padding-top: 8px;
}


.preset-group {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-8);
  padding: 4px;
  gap: 4px;
}

.preset {
  background: transparent;
  color: var(--text-muted);
  padding: 4px 12px;
  border-radius: var(--radius-8);
  font-size:var(--type-12);
  font-weight: 600;
  letter-spacing:0;
  white-space: nowrap;
  transition:
    color var(--duration-fast) var(--ease-in-out),
    background var(--duration-fast) var(--ease-in-out);
}

.preset:hover {
  color: var(--text-secondary);
  background: var(--surface-3);
  transform: none;
  box-shadow:var(--shadow-xs);
  opacity: 1;
}

.preset.active {
  background: var(--mavroon);
  color: var(--bg);
  box-shadow:var(--shadow-xs);
  transform: none;
  opacity: 1;
}

.preset.active:hover {
  background: var(--mavroon-dark);
}


.custom-range {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-8);
  padding: 4px 8px 4px 4px;
}

.custom-range input {
  padding: 4px 8px;
  font-size:var(--type-12);
  background: transparent;
  border: none;
  box-shadow:var(--shadow-xs);
  width: auto;
  color: var(--text);
}

.custom-range input:focus {
  box-shadow:var(--shadow-xs);
  border-color: transparent;
}

.custom-range button {
  padding: 4px 12px;
  font-size:var(--type-12);
  border-radius: var(--radius-8);
  transform: none;
}

.custom-range button:hover {
  transform: none;
}

.view-nav {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--mavroon);
  border-radius: var(--radius-12);
  padding: 4px;
  gap: 4px;
  align-self: flex-start;
  box-shadow:var(--shadow-xs);
}

.view-nav-btn {
  background: transparent;
  color: var(--text-muted);
  padding: 8px 24px;
  border-radius: var(--radius-8);
  font-size:var(--type-14);
  font-weight: 700;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  letter-spacing:0;
  transition:
    color var(--duration-base) var(--ease-out),
    background var(--duration-base) var(--ease-out);
}

.view-nav-btn:hover {
  color: var(--text-secondary);
  background: var(--surface-3);
}

.view-nav-btn.active {
  background: var(--mavroon);
  color: var(--bg);
  box-shadow: var(--shadow-xs);
}

.view-nav-btn.active:hover {
  background: var(--mavroon-dark);
}

.exec-overview {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.exec-hero {
  text-align: center;
}

.exec-hero .card {
  padding: 32px 32px;
  border-top: 4px solid var(--mavroon);
}

.exec-hero .card-value {
  font-size: var(--text-hero);
  font-weight: 800;
  letter-spacing:0;
  color: var(--mavroon);
}

.exec-hero .card-label {
  font-size: var(--text-caption);
  font-weight: 700;
  text-transform: none;
  letter-spacing:0;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.exec-hero .card-details {
  margin-top: 8px;
  font-size: var(--text-caption);
  color: var(--text-muted);
}

.exec-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.exec-kpi-grid .card {
  text-align: center;
  padding: 24px 16px;
}

.exec-kpi-grid .card-value {
  font-size: var(--text-secondary-kpi);
  font-weight: 700;
}

.exec-kpi-grid .card-label {
  font-size: var(--text-micro);
  font-weight: 700;
  text-transform: none;
  letter-spacing:0;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.exec-channels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.exec-channel-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 20px;
  box-shadow:var(--shadow-xs);
}


.exec-charts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.exec-charts .chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 20px 16px;
  box-shadow:var(--shadow-xs);
}

.chart-card-title {
  margin: 0 0 4px;
  font-size:var(--type-15);
  font-weight: 700;
  color: var(--text);
  letter-spacing:0;
}

.chart-card-sub {
  margin: 0 0 12px;
  font-size:var(--type-12);
  color: var(--text-muted);
}

.chart-wrap {
  position: relative;
  height: 240px;
}

@media (max-width: 720px) {
  .exec-charts {
    grid-template-columns: 1fr;
  }
}

.benchmark-charts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.benchmark-chart-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 20px 16px;
  box-shadow:var(--shadow-xs);
}

.benchmark-chart-card .chart-wrap {
  height: 190px;
}

.benchmark-verdict {
  align-self: flex-start;
  margin-top: 12px;
  font-size:var(--type-11);
  font-weight: 700;
  padding: 4px 8px;
  border-radius: var(--r-pill);
}

.benchmark-verdict.v-good { background: var(--gold-dim); color:var(--mavroon); }
.benchmark-verdict.v-bad { background: var(--border-subtle); color: var(--text-secondary); }
.benchmark-verdict.v-neutral { background: var(--mavroon-dim); color: var(--text-muted); }

@media (max-width: 720px) {
  .benchmark-charts {
    grid-template-columns: 1fr;
  }
}

.exec-channel-card .channel-name {
  font-size: var(--text-micro);
  font-weight: 700;
  text-transform: none;
  letter-spacing:0;
  margin-bottom: 12px;
}

.exec-channel-card .channel-name.google { color:var(--mavroon); }
.exec-channel-card .channel-name.meta-ads { color: var(--meta); }

.exec-channel-metrics {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.exec-channel-metric {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: var(--text-caption);
}

.exec-channel-metric .label {
  color: var(--text-muted);
}

.exec-channel-metric .value {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.benchmarks-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow:var(--shadow-xs);
}

.benchmarks-title {
  font-size:var(--type-18);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.benchmarks-subtitle {
  font-size: var(--text-caption);
  color: var(--text-muted);
  margin-bottom: 24px;
}

.benchmarks-table {
  width: 100%;
  border-collapse: collapse;
}

.benchmarks-table thead tr {
  background: var(--mavroon);
  color: var(--bg);
}

.benchmarks-table thead th {
  padding: 12px 20px;
  font-size:var(--type-13);
  font-weight: 700;
  text-align: left;
  border: none;
}

.benchmarks-table thead th.num {
  text-align: right;
}

.benchmarks-table tbody td {
  padding: 16px 20px;
  font-size:var(--type-14);
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text);
}

.benchmarks-table tbody td.num {
  text-align: right;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.benchmarks-table tbody tr:last-child td {
  border-bottom: none;
}

.benchmark-gold {
  color:var(--mavroon) !important;
  font-weight: 800 !important;
}

.ga4-callout {
  margin-top: 12px;
  font-size: var(--text-caption);
  color: var(--text-muted);
  font-style: normal;
  grid-column: 1 / -1;
}

.ga4-history-callout {
  grid-column: 1 / -1;
  margin-top: 12px;
  padding: 12px 16px;
  background: var(--gold-dim);
  border: 1px solid var(--gold-dim);
  border-left: 3px solid var(--status-warn);
  border-radius: var(--radius-8);
  font-size:var(--type-12);
  color: var(--text);
  line-height: 1.5;
}
.ga4-history-callout strong {
  color: var(--text);
  font-weight: 700;
}

.data-freshness-footer {
  margin-top: 32px;
  padding: 12px 16px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.data-freshness-footer:empty { display: none; }

.freshness-footer-label {
  font-size:var(--type-11);
  font-weight: 700;
  letter-spacing:0;
  text-transform: none;
  color: var(--text-muted);
  opacity: 1;
}

.freshness-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.freshness-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-pill);
  font-size:var(--type-11);
  color: var(--text-muted);
  cursor: default;
  transition: border-color 0.15s ease;
}
.freshness-pill:hover {
  border-color: var(--border);
}

.freshness-pill-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--r-pill);
  background: var(--text-muted);
  flex-shrink: 0;
}
.freshness-pill-dot.freshness-dot--fresh   { background: var(--status-good); }
.freshness-pill-dot.freshness-dot--current { background: var(--status-warn); }
.freshness-pill-dot.freshness-dot--stale   { background: var(--status-bad); }

.freshness-pill-label {
  font-weight: 600;
  color: var(--text);
}

.freshness-pill-time {
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
}

.benchmarks-callout {
  margin-top: 20px;
  font-size: var(--text-caption);
  color: var(--text-muted);
  font-style: normal;
}

.table-footnote {
  margin: 8px 4px 0;
}

.news-section {
  margin-top: 24px;
}

.news-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow:var(--shadow-xs);
}

.news-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.news-title {
  font-size:var(--type-18);
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.news-refresh-tag {
  font-size:var(--type-11);
  font-weight: 600;
  letter-spacing:0;
  text-transform: none;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border-subtle);
  padding: 4px 8px;
  border-radius: var(--r-pill);
}

.news-subtitle {
  font-size: var(--text-caption);
  color: var(--text-muted);
  margin: 0 0 20px;
  line-height: 1.5;
}

.news-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.news-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.news-item:first-child {
  padding-top: 4px;
}

.news-item:last-child {
  border-bottom: none;
  padding-bottom: 4px;
}

.news-item-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size:var(--type-12);
  color: var(--text-muted);
  margin-bottom: 4px;
  font-weight: 500;
}

.news-source {
  color: var(--mavroon);
  font-weight: 700;
  letter-spacing:0;
}

.news-dot {
  color: var(--text-muted);
  opacity: 1;
}

.news-item-title {
  display: block;
  font-size:var(--type-15);
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  line-height: 1.4;
  margin-bottom: 4px;
  transition: color 0.15s ease;
}

.news-item-title:hover,
.news-item-title:focus {
  color: var(--mavroon);
  text-decoration: underline;
}

.news-item-summary {
  font-size:var(--type-13);
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0 0 8px;
}

.news-item-rationale {
  font-size:var(--type-13);
  color: var(--text);
  line-height: 1.55;
  margin: 0 0 8px;
  padding: 8px 12px;
  background: var(--mavroon-dim);
  border-left: 3px solid var(--mavroon);
  border-radius: var(--radius-8);
}

.news-rationale-label {
  display: inline;
  font-weight: 700;
  color: var(--mavroon);
  margin-right: 4px;
  text-transform: none;
  letter-spacing:0;
}

.news-tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.news-tag {
  font-size:var(--type-11);
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border-subtle);
  padding: 4px 8px;
  border-radius: var(--r-pill);
}

.news-callout {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
  font-size: var(--text-caption);
  color: var(--text-muted);
  font-style: normal;
  line-height: 1.5;
}

.channel-tabs {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-12);
  padding: 4px;
  gap: 4px;
  align-self: flex-start;
  box-shadow:var(--shadow-xs);
  margin-bottom: 4px;
}

.channel-tab{
  background: transparent;
  color: var(--text-muted);
  padding: 8px 20px;
  border-radius: var(--radius-8);
  font-size:var(--type-13);
  font-weight: 600;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  letter-spacing:0;
  transition:
    color var(--duration-base) var(--ease-out),
    background var(--duration-base) var(--ease-out),
    box-shadow var(--duration-base) var(--ease-out);
  will-change: background, color;
}

.channel-tab:hover{
  color: var(--text-secondary);
  background: var(--surface-3);
  transform: none;
  box-shadow:var(--shadow-xs);
  opacity: 1;
}


.channel-tab.active{
  background: var(--mavroon);
  color: var(--bg);
  box-shadow:var(--shadow-xs);
  transform: none;
  opacity: 1;
}

.channel-tab.active:hover{
  background: var(--mavroon-dark);
}


.channel-tab[data-channel="google_ads"].active {
  background: var(--google);
  color: var(--text);
}
.channel-tab[data-channel="google_ads"].active:hover {
  background: var(--google-dark);
  color: var(--bg);
}

.campaign-type-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0;
}

.campaign-type-filter select {
  padding: 8px 12px;
  font-size:var(--type-12);
  border-radius: var(--radius-sm);
  width: auto;
}

.totals {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 16px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 4px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 24px 24px 20px;
  transition:
    transform var(--duration-slow) var(--ease-out),
    box-shadow var(--duration-slow) var(--ease-out);
  will-change: transform;
  box-shadow:var(--shadow-xs);
}

.card:hover {
  transform:none;
  box-shadow:var(--shadow-xs);
}


.card-overall {
  border-top-color: var(--mavroon);
}

.card-google {
  border-top-color: var(--mavroon);
}


.card-meta-ads {
  border-top-color: var(--meta);
}


.card-label {
  color: var(--text-muted);
  font-size:var(--type-11);
  font-weight: 700;
  text-transform: none;
  letter-spacing:0;
  margin-bottom: 12px;
}

.card-value {
  font-size:var(--type-28);
  font-weight: 700;
  letter-spacing:0;
  line-height: 1.1;
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}


.card-metric-row {
  display: flex;
  align-items: stretch;
  gap: 20px;
  margin-bottom: 8px;
}
.card-metric {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.card-metric + .card-metric {
  padding-left: 20px;
  border-left: 1px solid var(--border-subtle);
}
.card-metric-value {
  font-size:var(--type-24);
  font-weight: 700;
  letter-spacing:0;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.card-metric-label {
  font-size:var(--type-11);
  font-weight: 700;
  text-transform: none;
  letter-spacing:0;
  color: var(--text-muted);
}


.card-details {
  display: flex;
  gap: 16px;
  font-size:var(--type-12);
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.card-details span {
  display: flex;
  align-items: center;
  gap: 4px;
}


.card-row {
  display: flex;
  gap: 12px 0;
  flex-wrap: wrap;
  font-size:var(--type-12);
  color: var(--text-secondary);
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
  font-variant-numeric: tabular-nums;
}

.card-row span {
  flex: 1 1 auto;
  min-width: 90px;
  padding: 4px 0;
  color: var(--text-secondary);
}

.card-row span strong {
  display: block;
  font-size:var(--type-14);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
  letter-spacing:0;
}

.ga4-sections {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ga4-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.ga4-overview .ga4-charts {
  grid-column: 1 / -1;
  margin-top: 4px;
}


.ga4-tabs {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-8);
  padding: 4px;
  gap: 4px;
  align-self: flex-start;
  box-shadow:var(--shadow-xs);
  flex-wrap: wrap;
}

.ga4-tab {
  background: transparent;
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: var(--radius-8);
  font-size:var(--type-12);
  font-weight: 600;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition:
    color var(--duration-fast) var(--ease-out),
    background var(--duration-fast) var(--ease-out);
}

.ga4-tab:hover {
  color: var(--text-secondary);
  background: var(--surface-3);
  transform: none;
  box-shadow:var(--shadow-xs);
  opacity: 1;
}

.ga4-tab.active {
  background: var(--mavroon);
  color: var(--bg);
  box-shadow: var(--shadow-xs);
}


.ga4-campaign-panel {
  min-height: 120px;
}

.ga4-panel-inner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
  box-shadow:var(--shadow-xs);
}
.ga4-panel-inner.ga4-grouped {
  background: transparent;
  border: 0;
  box-shadow:var(--shadow-xs);
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 16px;
}
.ga4-group-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  box-shadow:var(--shadow-xs);
}
.ga4-group-title {
  font-size:var(--type-12);
  font-weight: 700;
  text-transform: none;
  letter-spacing:0;
  color: var(--mavroon);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--mavroon-dim);
}

.ga4-primary-multi {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.ga4-primary-multi .ga4-primary-item {
  padding: 12px 0;
}
.ga4-primary-metric {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.ga4-primary-value {
  font-size:var(--type-28);
  font-weight: 700;
  color: var(--mavroon);
  letter-spacing:0;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.ga4-primary-label {
  font-size:var(--type-13);
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 500;
}

.ga4-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}

.ga4-metric-card {
  padding: 16px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.ga4-metric-value {
  font-size:var(--type-24);
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.ga4-metric-label {
  font-size:var(--type-11);
  color: var(--text-muted);
  margin-top: 4px;
  text-transform: none;
  letter-spacing:0;
  font-weight: 600;
}

.drilldown-sections {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
}


.drilldown-tabs {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-8);
  padding: 4px;
  gap: 4px;
  align-self: flex-start;
  box-shadow:var(--shadow-xs);
}

.drilldown-tab {
  background: transparent;
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: var(--radius-8);
  font-size:var(--type-12);
  font-weight: 600;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition:
    color var(--duration-fast) var(--ease-out),
    background var(--duration-fast) var(--ease-out);
}

.drilldown-tab:hover {
  color: var(--text-secondary);
  background: var(--surface-3);
  transform: none;
  box-shadow:var(--shadow-xs);
  opacity: 1;
}

.drilldown-tab.active {
  background: var(--mavroon);
  color: var(--bg);
  box-shadow: var(--shadow-xs);
}


.drilldown-panel {
  display: none;
}

.drilldown-panel.active {
  display: block;
}

.drilldown-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}


.table-wrap-fixed {
  max-height: min(480px, 55vh);
  overflow-y: auto;
}


.table-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}


.pagination {
  display: flex;
  align-items: center;
  gap: 4px;
}

.page-btn {
  background: var(--surface);
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 4px 8px;
  border-radius: var(--radius-8);
  font-size:var(--type-11);
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  transition:
    color var(--duration-fast) var(--ease-out),
    background var(--duration-fast) var(--ease-out);
}

.page-btn:hover {
  background: var(--surface-3);
  color: var(--text-secondary);
  transform: none;
  box-shadow:var(--shadow-xs);
}

.page-btn.active {
  background: var(--mavroon-dim);
  color: var(--mavroon);
  border-color: var(--mavroon-border);
  font-weight: 700;
}

.page-info {
  font-size:var(--type-11);
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 768px) {
  .drilldown-tabs { width: 100%; display: flex; }
  .drilldown-tab { flex: 1; text-align: center; font-size:var(--type-11); padding: 8px 8px; }
  .table-wrap-fixed { max-height: 360px; }
}

.table-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow:var(--shadow-xs);
}

.table-header {
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

.table-header h2 {
  font-size:var(--type-14);
  font-weight: 700;
  letter-spacing:0;
  color: var(--text);
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size:var(--type-13);
}


#campaigns-table,
#location-table,
#keyword-table,
#search-term-table,
#impression-share-table {
  min-width: 900px;
}


td:first-child,
th:first-child {
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 16px;
}


thead {
  position: sticky;
  top: 0;
  z-index: 2;
}

th {
  text-align: left;
  padding: 12px 12px;
  background: var(--surface-4);
  color: var(--text-muted);
  font-weight: 700;
  font-size:var(--type-11);
  text-transform: none;
  letter-spacing:0;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
  transition: color var(--duration-fast) var(--ease-in-out);
}

th:first-child { padding-left: 24px; }
th:last-child  { padding-right: 24px; }

th:hover { color: var(--text-secondary); }

th.sort-asc::after  { content: " \2191"; color: var(--mavroon); }
th.sort-desc::after { content: " \2193"; color: var(--mavroon); }

th.num,
td.num { text-align: right; }


tbody tr {
  border-top: 1px solid var(--border-subtle);
  transition: background var(--duration-fast) var(--ease-in-out);
}


tbody tr:nth-child(even) {
  background: var(--border-subtle);
}

tbody tr:hover {
  background: var(--mavroon-dim);
}

td {
  padding: 12px 12px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
  font-size:var(--type-13);
}

td:first-child {
  color: var(--text);
  font-weight: 500;
  padding-left: 24px;
}

td:last-child {
  padding-right: 24px;
}

td.empty {
  text-align: center;
  color: var(--text-muted);
  padding: 56px 24px;
  white-space: normal;
  font-size:var(--type-13);
}

.creative-cell {
  width: 84px;
  padding: 4px;
}
.creative-thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: var(--radius-8);
  background: var(--surface-3);
  border: 1px solid var(--border);
  display: block;
}
.creative-thumb--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size:var(--type-14);
}
.meta-drilldown-panel {
  display: none;
}
.meta-drilldown-panel.active {
  display: block;
}

.table-wrap::-webkit-scrollbar {
  height: 5px;
}

.table-wrap::-webkit-scrollbar-track {
  background: var(--surface-2);
}

.table-wrap::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: var(--radius-8);
}

.table-wrap::-webkit-scrollbar-thumb:hover {
  background: var(--text-disabled);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 900px) {
  .dashboard > *:not(.header) {
    padding-left: 24px;
    padding-right: 24px;
  }

  .totals {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .header {
    padding: 12px 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    min-height: auto;
  }

  .header-right {
    width: 100%;
    justify-content: space-between;
  }

  .dashboard > *:not(.header) {
    padding-left: 16px;
    padding-right: 16px;
  }

  .dashboard {
    gap: 12px;
  }

  .controls {
    flex-direction: column;
    align-items: stretch;
  }

  .preset-group {
    width: 100%;
  }

  .preset {
    flex: 1;
    text-align: center;
    padding: 8px 8px;
  }

  .view-nav {
    width: 100%;
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .view-nav-btn {
    flex-shrink: 0;
    text-align: center;
    padding: 8px 12px;
    font-size:var(--type-12);
  }

  .channel-tabs {
    width: 100%;
    display: flex;
    align-self: auto;
  }

  .channel-tab{
    flex: 1;
    text-align: center;
    padding: 8px 8px;
    font-size:var(--type-12);
    letter-spacing:0;
  }

  .exec-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .exec-channels {
    grid-template-columns: 1fr;
  }

  .exec-hero .card-value {
    font-size: var(--text-primary-kpi);
  }

  .totals {
    grid-template-columns: 1fr;
  }

  .card-value {
    font-size:var(--type-24);
  }

  .card {
    padding: 20px 20px 16px;
  }

  th:first-child,
  td:first-child {
    padding-left: 16px;
  }

  th:last-child,
  td:last-child {
    padding-right: 16px;
  }
}

@media (max-width: 480px) {
  .custom-range {
    flex-wrap: wrap;
    gap: 4px;
  }

  .custom-range input {
    flex: 1;
  }
}

.loc-cohort {
  padding: 8px 0;
}
.loc-cohort-title {
  padding: 12px 24px 8px;
  font-size:var(--type-11);
  font-weight: 800;
  letter-spacing:0;
  text-transform: none;
  color: var(--mavroon);
  margin: 0;
}
.loc-cohort + .loc-cohort {
  border-top: 1px solid var(--border-subtle);
}

.loc-table tr.loc-row-subtotal {
  background: var(--mavroon-dim);
  font-weight: 600;
}
.loc-table tr.loc-row-subtotal td {
  border-top: 1px solid var(--border-subtle);
}

.yoy-pill {
  display: inline-block;
  font-size:var(--type-11);
  font-weight: 700;
  padding: 4px 4px;
  border-radius: var(--r-pill);
  margin-left: 4px;
  font-variant-numeric: tabular-nums;
  letter-spacing:0;
  vertical-align: middle;
}
.yoy-pill.yoy-up { background: var(--mavroon-dim); color: var(--status-good); }
.yoy-pill.yoy-down { background: var(--mavroon-dim); color: var(--status-bad); }
.yoy-pill.yoy-flat { background: var(--surface-3); color: var(--text-muted); }


.tier-row-clickable,
.tier-market-row { cursor: pointer; }
.tier-row-clickable:focus-visible,
.tier-market-row:focus-visible {
  outline: 2px solid var(--mavroon, var(--mavroon));
  outline-offset: -2px;
}
.cm-back {
  margin-top: 16px;
  padding: 8px 12px;
  font-size:var(--type-13);
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-8);
  cursor: pointer;
}
.cm-back:hover { background: var(--surface-3); color: var(--text); }

.location-filter { margin: 0; }


.campaign-modal { position: fixed; inset: 0; z-index: 9000; display: flex; align-items: stretch; justify-content: flex-end; }
.campaign-modal.hidden { display: none; }
.campaign-modal-overlay { position: absolute; inset: 0; background: var(--scrim); backdrop-filter: blur(4px); }
.campaign-modal-panel {
  position: relative; background: var(--surface, var(--bg)); width: min(1080px, 95vw); max-width: 100%; height: 100vh; overflow-y: auto;
  box-shadow:var(--shadow-xs); display: flex; flex-direction: column;
}
.campaign-modal-header {
  position: sticky; top: 0; background: var(--surface, var(--bg)); border-bottom: 1px solid var(--border, var(--surface-4));
  padding: 16px 28px; display: flex; align-items: center; justify-content: space-between; z-index: 1;
}
.campaign-modal-eyebrow { font-size:var(--type-11); letter-spacing:0; text-transform: none; color: var(--text-muted, var(--text-muted)); font-weight: 700; }
.campaign-modal-title { font-size:var(--type-24); font-weight: 700; margin: 4px 0 0; color: var(--text, var(--text-secondary)); }
.campaign-modal-close {
  background: transparent; border: 1px solid var(--border, var(--surface-4)); width: 36px; height: 36px; border-radius: var(--radius-8); font-size:var(--type-24); line-height: 1;
  cursor: pointer; color: var(--text-secondary, var(--text-muted));
  display: flex; align-items: center; justify-content: center; padding: 0;
}
.campaign-modal-close:hover { background: var(--surface-3, var(--surface-2)); }
.campaign-modal-body { padding: 24px 28px 48px; }

.cm-section { margin-bottom: 32px; }
.cm-section-header {
  background: var(--mavroon); color: var(--bg); padding: 8px 16px; border-radius: var(--radius-8) var(--radius-8) 0 0;
  display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size:var(--type-14);
}

.cm-section-body { background: var(--surface-2, var(--bg)); border: 1px solid var(--border, var(--surface-4)); border-top: none; border-radius: 0 0 var(--radius-8) var(--radius-8); padding: 20px; }

.cm-kpi-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 16px; margin-bottom: 20px; }
.cm-kpi { background: var(--surface, var(--bg)); padding: 12px 12px; border-radius: var(--radius-8); border: 1px solid var(--border-subtle, var(--surface-3)); }
.cm-kpi-label { font-size:var(--type-11); color: var(--text-muted); text-transform: none; letter-spacing:0; font-weight: 700; }
.cm-kpi-value { font-size:var(--type-24); font-weight: 700; color: var(--text); margin-top: 4px; }

.cm-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.cm-card { background: var(--surface, var(--bg)); border: 1px solid var(--border-subtle, var(--surface-3)); border-radius: var(--radius-8); padding: 16px; }
.cm-card-title { font-size:var(--type-13); font-weight: 700; color: var(--text); margin-bottom: 12px; }

.cm-chart { width: 100%; height: 220px; display: block; }
.cm-pie { width: 100%; height: 240px; display: block; }
.cm-pie-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; font-size:var(--type-12); }
.cm-pie-legend-item { display: flex; align-items: center; gap: 4px; }
.cm-pie-legend-swatch { width: 10px; height: 10px; border-radius: var(--radius-8); }

.cm-bar-row { display: grid; grid-template-columns: 110px 1fr 60px; align-items: center; gap: 8px; padding: 4px 0; font-size:var(--type-12); }
.cm-bar-track { background: var(--surface-3, var(--surface-2)); height: 18px; border-radius: var(--radius-8); position: relative; overflow: hidden; }
.cm-bar-fill { background: var(--mavroon); height: 100%; }
.cm-bar-val { text-align: right; color: var(--text-secondary); font-variant-numeric: tabular-nums; }

.cm-ads-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.cm-ad-card { background: var(--surface, var(--bg)); border: 1px solid var(--border-subtle, var(--surface-3)); border-radius: var(--radius-8); overflow: hidden; }
.cm-ad-thumb { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--surface-3, var(--surface-2)); display: block; }
.cm-ad-meta { padding: 8px 8px; font-size:var(--type-11); color: var(--text-secondary); }
.cm-ad-name { color: var(--text); font-weight: 600; font-size:var(--type-12); line-height: 1.3; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

.cm-empty { color: var(--text-muted); text-align: center; padding: 20px; font-size:var(--type-13); }


.benchmarks-callout { color: var(--text-muted); font-size:var(--type-11); font-style: normal; padding: 4px 4px 0; }

.campaign-row:hover { background: var(--surface-3, var(--surface-2)); }


.campaign-filter { display: flex; align-items: center; gap: 8px; margin: 0; }
.campaign-filter-label {
  font-size:var(--type-11); font-weight: 700; letter-spacing:0;
  text-transform: none; color: var(--text-muted);
}
.campaign-filter select {
  padding: 4px 12px; font-size:var(--type-12); border-radius: var(--radius-sm);
  width: auto; max-width: 240px;
}


.col-action { width: 46px; text-align: right; padding-right: 12px !important; }
.row-chevron {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: var(--r-pill);
  background: var(--mavroon-dim);
  color: var(--mavroon);
  transition: background .14s ease, color .14s ease, transform .14s ease, box-shadow .14s ease;
}
.campaign-row.is-clickable:hover { background: var(--mavroon-dim); }
.campaign-row.is-clickable:hover .row-chevron {
  background: var(--mavroon); color: var(--bg);
  transform: translateX(2px);
  box-shadow: var(--shadow-xs);
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.section-head h2 {
  font-size:var(--type-24);
  line-height: 1.15;
  letter-spacing:0;
  margin: 4px 0 4px;
}
.section-eyebrow {
  color: var(--mavroon);
  font-size:var(--type-11);
  font-weight: 800;
  letter-spacing:0;
  text-transform: none;
}
.snapshot-callout {
  flex: none;
  max-width: 320px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--mavroon);
  border-radius: var(--radius-8);
  color: var(--text-secondary);
  font-size:var(--type-12);
  line-height: 1.45;
  padding: 8px 12px;
  box-shadow:var(--shadow-xs);
}
.stagecard { padding: 16px 16px; }
.stagecard .stagename {
  color: var(--text-muted);
  font-size:var(--type-11);
  font-weight: 800;
  letter-spacing:0;
  text-transform: none;
}
.stagecard .stageval {
  color: var(--mavroon);
  font-size:var(--type-28);
  font-weight: 800;
  line-height: 1.1;
  margin-top: 8px;
}
.stagecard .stagesub {
  color: var(--text-muted);
  font-size:var(--type-12);
  line-height: 1.5;
  margin-top: 4px;
}
.stagecard .stagesub b { color: var(--text-secondary); font-weight: 800; }
.stagecard .stage-next {
  border-top: 1px solid var(--border-subtle);
  color: var(--text-muted);
  margin-top: 8px;
  padding-top: 8px;
}
.stagecard .stage-next b {
  color: var(--text);
  font-size:var(--type-18);
  font-weight: 800;
}
.funnel { display: flex; flex-direction: column; gap: 8px; }
.funnel-row {
  display: grid;
  grid-template-columns: 120px 1fr 190px;
  align-items: center;
  gap: 12px;
}
.funnel-label { color: var(--text); font-size:var(--type-13); font-weight: 700; }
.funnel-track {
  position: relative;
  height: 26px;
  background: var(--surface-3);
  border-radius: var(--radius-8);
  overflow: hidden;
}
.funnel-fill,
.funnel-touched {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: var(--radius-8);
}
.funnel-fill { background: var(--mav); }
.funnel-touched { background: var(--gold); }
.funnel-meta {
  color: var(--text-secondary);
  font-size:var(--type-12);
  text-align: right;
  white-space: nowrap;
}
.funnel-meta b,
.trans-chan .chan-count { color: var(--text); font-variant-numeric: tabular-nums; }
.funnel-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--text-secondary);
  font-size:var(--type-12);
  margin-top: 12px;
}
.funnel-legend span { display: inline-flex; align-items: center; gap: 4px; }
.funnel-legend i { display: inline-block; width: 12px; height: 12px; border-radius: var(--radius-8); }
.filter-basis-line { font-weight: 600; color: var(--text-secondary); }


.jtl-row.matches-filter { background: var(--mavroon-dim); border-radius: var(--radius-8); }
.jtl-row.matches-filter .jtl-dot { box-shadow: var(--shadow-xs); }

.contact-filters,
.contact-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.contact-filters { margin-bottom: 12px; }
.contact-tools { justify-content: space-between; margin-bottom: 12px; }
.filter-pill-wrap { display: flex; align-items: center; gap: 8px; }
.filter-lbl {
  color: var(--text-muted);
  font-size:var(--type-11);
  font-weight: 800;
  letter-spacing:0;
  text-transform: none;
  white-space: nowrap;
}
.filter-pill,
.contact-search {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-8);
  color: var(--text);
  font: inherit;
}
.filter-pill { cursor: pointer; font-size:var(--type-13); max-width: 220px; padding: 8px 8px; }
.contact-search { font-size:var(--type-14); min-width: 280px; padding: 8px 12px; }
.contact-tools .basis { color: var(--text-secondary); font-size:var(--type-12); }
.lead-type-breakdown-card { margin-top: 12px; overflow-x: auto; }
.lead-type-breakdown-head {
  color: var(--text);
  font-size:var(--type-13);
  font-weight: 800;
  margin-bottom: 8px;
}
.lead-type-breakdown-table { min-width: 760px; }
.lead-type-breakdown-table th,
.lead-type-breakdown-table td { white-space: nowrap; }
.lead-type-total-row td {
  background: var(--surface-2);
  color: var(--text);
  font-weight: 800;
}
.contact-row { cursor: pointer; }
.contact-row:hover { background: var(--mavroon-dim); }
.contact-row td:last-child {
  color: var(--mavroon);
  font-size:var(--type-18);
  text-align: right;
}
.stage-pill {
  display: inline-block;
  border-radius: var(--r-pill);
  background: var(--surface-3);
  color: var(--text-secondary);
  font-size:var(--type-11);
  font-weight: 800;
  padding: 4px 8px;
}
.stage-pill.app_submit { background: var(--mavroon-dim); color: var(--mavroon); }
.stage-pill.app_start { background: var(--stale-amber-dim); color: var(--stale-amber); }
.lead-type-pill {
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  display: inline-block;
  border-radius: var(--r-pill);
  font-size:var(--type-11);
  font-weight: 800;
  padding: 4px 8px;
  white-space: nowrap;
}
.chan-chip,
.sesh-badge {
  display: inline-block;
  border-radius: var(--r-pill);
  font-size:var(--type-11);
  font-weight: 800;
  margin: 4px 4px 4px 0;
  padding: 4px 8px;
  white-space: nowrap;
}
.chan-chip { background: var(--surface-3); color: var(--text-secondary); }
.chan-chip.google{ background: var(--google-dim); color:var(--mavroon); }
.chan-chip.meta { background: var(--meta-dim); color: var(--meta); }
.sesh-badge.referral {}
.chan-chip.microsoft { background: var(--google-dim); color:var(--mavroon); }
.chan-chip.email,
.sesh-badge.email,
.sesh-badge.paid { background: var(--mavroon-dim); color: var(--mavroon); }
.chan-chip.sms,
.sesh-badge.sms { background: var(--stale-amber-dim); color: var(--stale-amber); }
.chan-chip.event { background: var(--journey-event-dim); color: var(--journey-event-dark); }
.table-toggle-wrap { display: flex; justify-content: center; margin-top: 12px; }
.table-toggle {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-8);
  color: var(--mavroon);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: inherit;
  font-size:var(--type-13);
  font-weight: 800;
  padding: 8px 16px;
}
.table-toggle:hover { background: var(--surface-3); }
.table-toggle .chev { display: inline-block; font-size:var(--type-11); transition: transform .2s var(--ease-in-out); }
.table-toggle.expanded .chev { transform: rotate(180deg); }

.dscrim {
  position: fixed;
  inset: 0;
  z-index: 8990;
  background: color-mix(in srgb, var(--text) 55%, transparent);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--duration-slow) var(--ease-out);
}
.dscrim.open { opacity: 1; visibility: visible; }
.ddrawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 9000;
  width: min(560px, 95vw);
  height: 100vh;
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow:var(--shadow-xs);
  overflow-y: auto;
  overscroll-behavior: contain;
  transform: translateX(101%);
  transition: transform var(--duration-slow) var(--ease-out);
}
.ddrawer.open { transform: translateX(0); }
body.drawer-open { overflow: hidden; }
.dhead {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 20px 24px 16px;
}
.dhead-main { flex: 1; min-width: 0; }
.dhead .dt {
  color: var(--text);
  font-size:var(--type-24);
  font-weight: 800;
  line-height: 1.16;
}
.dhead .dt small {
  display: block;
  color: var(--text-secondary);
  font-size:var(--type-12);
  font-weight: 500;
  margin-top: 4px;
}
.dclose {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-8);
  color: var(--text-secondary);
  cursor: pointer;
  font-size:var(--type-24);
  line-height: 1;
  padding: 0;
}
.dclose:hover { background: var(--surface-3); }
.dbody { padding: 20px 24px 46px; }
.dorigin {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  color: var(--text-secondary);
  font-size:var(--type-12);
}
.dorigin b { color: var(--text); font-weight: 800; }
.origin-label { color: var(--text-secondary); }
.dstat4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 12px;
}
.dmini {
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-8);
  padding: 12px;
}
.dmini .lab {
  color: var(--text-muted);
  font-size:var(--type-11);
  font-weight: 800;
  letter-spacing:0;
  text-transform: none;
}
.dmini .big { color: var(--text); font-size:var(--type-18); font-weight: 800; margin-top: 4px; }
.journey-note,
.tz-note,
.drawer-empty { color: var(--text-muted); font-size:var(--type-12); line-height: 1.5; }
.journey-note { margin: 16px 0 4px; }
.tz-note { margin-top: 16px; }
.drawer-empty { padding: 16px 0; }
.narrative {
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  margin: 16px 0 4px;
  padding: 16px 0 12px;
}
.narrative .overline {
  color: var(--mavroon);
  font-size:var(--type-11);
  font-weight: 800;
  letter-spacing:0;
  text-transform: none;
  margin-bottom: 4px;
}
.narrative h3 { font-size:var(--type-18); line-height: 1.25; }
.narrative p,
.phase-narrative,
.jtl-caption { color: var(--text-secondary); font-size:var(--type-12); line-height: 1.5; }
.narrative p { margin-top: 8px; }
.phase-narrative {
  background: var(--surface-2);
  border-radius: var(--radius-8);
  margin: 4px 0 8px;
  padding: 8px 12px;
}
.narrative strong,
.phase-narrative strong { color: var(--text); font-weight: 800; }
.jtl { display: flex; flex-direction: column; }
.phase-head {
  color: var(--text-muted);
  font-size:var(--type-11);
  font-weight: 800;
  letter-spacing:0;
  margin-top: 16px;
  text-transform: none;
}
.jtl-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border-bottom: 1px solid var(--border-subtle);
  padding: 12px 0;
}
.jtl-row:last-child { border-bottom: 0; }
.jtl-dot {
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: var(--r-pill);
  background: var(--text-muted);
  margin-top: 4px;
}
.jtl-row.touch .jtl-dot { background: var(--mavroon); }
.jtl-row.milestone .jtl-dot { background: var(--mavroon-dark); }
.jtl-row.email .jtl-dot { background: var(--gold); }
.jtl-row.event .jtl-dot { background: var(--journey-event); }

.event-status-pill {
  display: inline-flex;
  align-items: center;
  background: var(--surface-3);
  color: var(--text-secondary);
  border-radius: var(--r-pill);
  font-size:var(--type-11);
  font-weight: 700;
  letter-spacing:0;
  text-transform: none;
  margin-left: 4px;
  padding: 4px 8px;
  vertical-align: 1px;
  white-space: nowrap;
}
.event-status-pill.registered { background: var(--surface-3); color: var(--text-secondary); }
.event-status-pill.attended { background: var(--mavroon-dim); color: var(--status-good); }
.event-status-pill.cancelled,
.event-status-pill.no-show { background: var(--danger-dim); color: var(--danger); }
.event-status-pill.waitlist { background: var(--stale-amber-dim); color: var(--stale-amber); }
.jtl-sub.event-source { font-style: normal; }
.jtl-row.event .event-camp-chip {
  display: inline-block;
  background: var(--journey-event-dim);
  color: var(--journey-event-dark);
  border-radius: var(--r-pill);
  font-size:var(--type-11);
  font-weight: 700;
  margin-left: 4px;
  padding: 4px 8px;
  vertical-align: 1px;
  white-space: nowrap;
}
.jtl-row.milestone {
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-8);
  margin: 8px 0 4px;
  padding: 8px 12px;
}
.jtl-main { flex: 1; min-width: 0; }
.jtl-date { color: var(--text-muted); font-size:var(--type-11); font-variant-numeric: tabular-nums; }
.jtl-title { color: var(--text); font-size:var(--type-14); font-weight: 800; margin-top: 4px; }
.jtl-row.email .jtl-title { overflow-wrap: anywhere; }
.jtl-sub { color: var(--text-secondary); font-size:var(--type-12); margin-top: 4px; }
.jtl-row.touch,
.jtl-row.cluster { padding: 0; }
.jtl-row.touch,
.jtl-row.touch > summary { min-width: 0; max-width: 100%; }

.jtl-row.touch { flex-wrap: wrap; }
.jtl-row.touch > summary { flex: 1 1 100%; }
.jtl-row.touch > .jtl-body { flex: 1 1 100%; }
.jtl-row.touch.notable,
.jtl-row.email.notable {
  border-left: 2px solid var(--mavroon-border);
  margin-left: -10px;
  padding-left: 8px;
}
.jtl-row.touch > summary,
.jtl-row.cluster > summary {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  list-style: none;
  cursor: pointer;
  padding: 12px 0;
}
.jtl-row.touch > summary::-webkit-details-marker,
.jtl-row.cluster > summary::-webkit-details-marker { display: none; }
.jtl-row.touch > summary::marker,
.jtl-row.cluster > summary::marker { display: none; }
.jtl-chev {
  flex: none;
  color: var(--text-muted);
  display: inline-block;
  font-size:var(--type-11);
  margin-left: 8px;
  transition: transform .2s var(--ease-in-out);
}
.jtl-row.touch[open] > summary .jtl-chev,
.jtl-row.cluster[open] > summary .jtl-chev { transform: rotate(180deg); }
.jtl-body { padding: 0 0 12px; min-width: 0; max-width: 100%; }
.sesh-badge {
  letter-spacing:0;
  margin-right: 4px;
  text-transform: none;
  vertical-align: 1px;
}
.sesh-badge.direct { background: var(--surface-3); color: var(--text-secondary); }
.sesh-ref { color: var(--text-secondary); font-weight: 400; }

.sesh-panel { padding-top: 4px; }
.sesh-panel-block { margin-top: 8px; }
.sesh-panel-block:first-child { margin-top: 4px; }
.sesh-panel-label {
  color: var(--text-muted);
  font-size:var(--type-11);
  font-weight: 700;
  letter-spacing:0;
  text-transform: none;
  margin-bottom: 4px;
}
.sesh-pages { display: flex; flex-direction: column; gap: 4px; list-style: none; margin: 0; padding: 0; min-width: 0; }
.sesh-page {
  color: var(--text-secondary);
  font-family: var(--font-text);
  font-size:var(--type-11);
  overflow-wrap: anywhere;
  word-break: break-word;
  min-width: 0;
}
.sesh-more { color: var(--text-muted); font-size:var(--type-11); font-style: normal; margin-top: 4px; }
.sesh-key-events { display: flex; flex-direction: column; gap: 4px; list-style: none; margin: 0; padding: 0; }
.sesh-key-event { color: var(--text-secondary); font-size:var(--type-12); }
.sesh-key-event-label {
  display: inline-block;
  background: var(--journey-event-dim);
  color: var(--journey-event-dark);
  border-radius: var(--r-pill);
  font-size:var(--type-11);
  font-weight: 700;
  padding: 4px 8px;
  margin-right: 4px;
  vertical-align: 1px;
  white-space: nowrap;
}
.sesh-key-event-time { color: var(--text-muted); font-variant-numeric: tabular-nums; }
.sesh-key-event-path { font-family: var(--font-text); font-size:var(--type-11); }
.sesh-no-events { color: var(--text-muted); font-size:var(--type-12); font-style: normal; }
.jtl-row.cluster .jtl-dot { background: var(--text-muted); }
.jtl-row.cluster > .jtl-body { padding-left: 20px; }
.jtl-row.cluster > .jtl-body .jtl-row.touch { border-bottom: 1px solid var(--border-subtle); }
.jtl-row.cluster > .jtl-body .jtl-row.touch:last-child { border-bottom: 0; }

@media (max-width: 900px) {
  .section-head { flex-direction: column; }
  .snapshot-callout { max-width: none; width: 100%; }
  .funnel-row { grid-template-columns: 1fr; gap: 4px; }
  .funnel-meta { text-align: left; }
}
@media (max-width: 640px) {
  .contact-search { min-width: 100%; }
}

.cm-ads-table .cm-ads-thumb-col { width: 60px; }
.cm-ads-thumb { width: 48px; height: 48px; object-fit: cover; border-radius: var(--radius-8); background: var(--surface-3, var(--surface-2)); display: block; }
.cm-ads-thumb--placeholder { display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size:var(--type-14); }
.cm-ads-name { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-chart .chart-hit:hover { fill: var(--mavroon-dim); }


.cm-tooltip {
  position: fixed;
  z-index: 10000;
  background: var(--text-secondary);
  color: var(--bg);
  padding: 8px 12px;
  border-radius: var(--radius-8);
  font-size:var(--type-12);
  line-height: 1.45;
  pointer-events: none;
  white-space: pre-line;
  box-shadow: var(--shadow-xs);
  opacity: 0;
  transition: opacity 80ms ease;
  max-width: 280px;
}
.cm-tooltip.is-visible { opacity: 1; }
.cm-tooltip-title { font-weight: 700; margin-bottom: 4px; color: var(--bg); }
.cm-tooltip-row { color: var(--band-rule); }
.cm-tooltip-row strong { color: var(--bg); margin-left: 4px; }

[data-cm-tip] { cursor: help; }


.tiers-section { display: flex; flex-direction: column; gap: 16px; }

.tiers-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
}
.tiers-title { font-size:var(--type-24); font-weight: 700; letter-spacing:0; margin: 0; color: var(--text); }
.tiers-sub { margin: 4px 0 0; font-size:var(--type-13); color: var(--text-muted); }
.tiers-updated { font-size:var(--type-12); color: var(--text-muted); padding-bottom: 4px; }

.tiers-board {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px; align-items: start;
}
.tier-card { padding: 20px 24px; min-width: 0; }
.tier-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.tier-badge {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: var(--r-pill);
  background: var(--mavroon); color: var(--bg);
  display: inline-flex; align-items: center; justify-content: center;
  font-size:var(--type-15); font-weight: 700;
}
.tier-name { font-size:var(--type-18); font-weight: 700; letter-spacing:0; color: var(--text); line-height: 1.2; }
.tier-strategy { font-size:var(--type-12); font-weight: 600; color: var(--mavroon); letter-spacing:0; }
.tier-desc { font-size:var(--type-13); line-height: 1.55; color: var(--text-secondary); margin: 0 0 16px; }

.tier-block-label {
  font-size:var(--type-11); font-weight: 700; text-transform: none;
  letter-spacing:0; color: var(--text-muted); margin: 0 0 8px;
}
.tier-markets { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.tier-market {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 8px 12px; border-radius: var(--radius-8);
  background: var(--surface-2); border: 0.5px solid var(--border-subtle);
}
.tier-market-dot {
  flex: 0 0 auto; width: 8px; height: 8px; border-radius: var(--r-pill);
  background: var(--tier-color); margin-top: 4px;
}
.tier-market-body { min-width: 0; }
.tier-market-name { font-size:var(--type-13); font-weight: 600; color: var(--text); line-height: 1.3; }
.tier-market-meta { font-size:var(--type-11); color: var(--text-muted); margin-top: 4px; display: flex; flex-wrap: wrap; gap: 4px 4px; align-items: baseline; }
.tier-stat.up { color: var(--status-good); font-weight: 600; }
.tier-stat.down { color: var(--status-bad); font-weight: 600; }
.tier-stat-sep { color: var(--text-disabled, var(--surface-4)); }
.tier-market-note { font-style: normal; }

.tier-messaging {
  border-top: 1px solid var(--border-subtle);
  padding-top: 12px; margin-bottom: 16px;
}
.tier-headline { font-size:var(--type-15); font-weight: 700; color: var(--mavroon); margin-bottom: 4px; letter-spacing:0; }
.tier-positioning { font-size:var(--type-12); line-height: 1.55; color: var(--text-secondary); margin: 0 0 12px; }
.tier-block-text { font-size:var(--type-12); line-height: 1.5; color: var(--text-secondary); margin: 0 0 12px; }

.tier-signals { border-top: 1px solid var(--border-subtle); padding-top: 12px; }
.tier-signal { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.tier-signal-label { font-size:var(--type-12); color: var(--text-secondary); }
.tier-signal-bar { display: inline-flex; gap: 4px; }
.tier-signal-seg {
  width: 22px; height: 6px; border-radius: var(--radius-8);
  background: var(--surface-3);
}
.tier-signal-seg.on { background: var(--tier-color); }
.tier-signals-note { font-size:var(--type-11); color: var(--text-muted); margin-top: 8px; }

.tiers-special { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.tier-special-card { padding: 16px 20px; min-width: 0; }
.tier-special-name { font-size:var(--type-14); font-weight: 700; color: var(--text); margin-bottom: 4px; }
.tier-special-desc { font-size:var(--type-12); line-height: 1.55; color: var(--text-secondary); margin: 0; }

.tiers-why { padding: 20px 24px; }
.tiers-why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.tiers-why-item { min-width: 0; }
.tiers-why-title { font-size:var(--type-13); font-weight: 700; color: var(--text); margin-bottom: 4px; }
.tiers-why-desc { font-size:var(--type-12); line-height: 1.5; color: var(--text-muted); margin: 0; }

@media (max-width: 768px) {
  .tiers-board, .tiers-special { grid-template-columns: 1fr; }
  .tiers-title { font-size:var(--type-18); }
}

.table-section-head { padding: 20px 24px 4px; }
.table-section-head h3 { font-size:var(--type-15); font-weight: 700; color: var(--text); margin: 0 0 4px; }
.table-section-head p { margin: 0 0 12px; }


.data-availability { color: var(--mavroon); background: var(--surface-2); border-left: 4px solid var(--gold); padding: 12px 16px; font-size:var(--type-14); line-height: 1.5; }

/* Temporary plain-text client wordmark, using the fleet header type scale. */
.client-wordmark { color: var(--mavroon); font-family: var(--font); font-size:var(--type-24); font-weight: 700; line-height: 1.15; letter-spacing:0; }
.login-card .client-wordmark { display: block; margin-bottom: 12px; }
.ga4-disconnected { grid-column: 1 / -1; padding: 40px 16px; text-align: center; }

#view-ga4 .ga4-group-head[hidden], #ga4-tabs[hidden] { display: none; }

/* The hidden property must override the date control flex layout. */
#date-controls[hidden] { display: none !important; }

.campaign-filter[hidden] { display: none !important; }

#analytics-nav[hidden], #view-ga4[hidden] { display: none !important; }
