:root {
  color-scheme: light;
  --panel-inset: 24px;
  --page: #f4f6f9;
  --surface: #fff;
  --soft: #f5f7fa;
  --ink: #19252f;
  --muted: #687581;
  --line: #e1e6ec;
  --accent: #357abd;
  --accent-soft: #e6f0fb;
  --good: #287559;
  --good-bg: #e7f4ed;
  --warn: #9b5e18;
  --warn-bg: #fff1dc;
  --bad: #b34742;
  --bad-bg: #fcebea;
  --shadow: 0 16px 60px #15233320;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: var(--page);
  color: var(--ink);
  font-size: 14px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #111315;
  --surface: #212428;
  --soft: #282c31;
  --ink: #f0f2f5;
  --muted: #a7b0ba;
  --line: #33383e;
  --accent: #a0c9ff;
  --accent-soft: #2a3e56;
  --good: #a5d6bc;
  --good-bg: #24392f;
  --warn: #edc493;
  --warn-bg: #423426;
  --bad: #edafa7;
  --bad-bg: #452d2c;
  --shadow: 0 20px 65px #0006;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  line-height: 1.5;
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
a {
  color: var(--accent);
  text-decoration: none;
}
button,
input,
select {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}
button:hover {
  filter: brightness(0.97);
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 29px;
  font-weight: 650;
  letter-spacing: -1px;
  line-height: 1.3;
}
h2 {
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.3px;
}
h3 {
  font-size: 14px;
  font-weight: 600;
}
small,
.muted {
  color: var(--muted);
}
svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.7;
  flex-shrink: 0;
}
[hidden] {
  display: none !important;
}
.skip {
  position: fixed;
  top: -90px;
  left: 20px;
  padding: 12px;
  background: var(--surface);
  z-index: 200;
}
.skip:focus {
  top: 15px;
}
.shell {
  display: grid;
  grid-template-columns: 226px minmax(0, 1fr);
  min-height: 100dvh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: var(--surface);
  padding: 30px 15px 20px;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 0 12px 35px;
  color: var(--ink);
}
.brand-symbol {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 12px;
}
.brand-symbol svg {
  width: 23px;
  height: 23px;
}
.brand small {
  display: block;
  font-size: 12px;
  letter-spacing: 0.2px;
  margin-bottom: 4px;
}
.brand strong {
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.6px;
}
.workspace-label,
.ecosystem-label {
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--muted);
  font-weight: 600;
  margin: 0 13px 14px;
}
.sidebar nav {
  display: grid;
  gap: 5px;
}
.sidebar nav a {
  padding: 12px 13px;
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--muted);
  font-size: 12px;
  border-radius: 10px;
  min-height: 43px;
}
.sidebar nav a:hover {
  background: var(--soft);
  color: var(--ink);
}
.sidebar nav a[aria-current="page"] {
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 600;
}
.sidebar nav b {
  background: var(--warn-bg);
  color: var(--warn);
  padding: 3px 6px;
  margin-left: auto;
  border-radius: 6px;
  font-size: 12px;
}
.sidebar nav b:empty {
  display: none;
}
.sidebar-bottom {
  margin-top: auto;
}
.ecosystem {
  padding: 0 12px;
  display: grid;
  gap: 12px;
  margin-bottom: 25px;
}
.ecosystem a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
}
.ecosystem svg {
  width: 13px;
  height: 13px;
}
.sidebar-account {
  border-top: 1px solid var(--line);
  padding: 18px 0 0;
  display: flex;
  gap: 9px;
  align-items: center;
}
.account-avatar {
  width: 32px;
  height: 32px;
  background: var(--soft);
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.sidebar-account strong {
  font-size: 12px;
  display: block;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar-account > span:nth-child(2) {
  min-width: 0;
  flex: 1;
}
.sidebar-account .account-avatar,
.sidebar-account .icon-button {
  flex-shrink: 0;
}
.sidebar-account small {
  font-size: 12px;
  display: block;
  margin-top: 4px;
}
.sidebar-account .icon-button {
  margin-left: auto;
  width: 27px;
}
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 7px;
}
.icon-button:hover {
  background: var(--soft);
  color: var(--ink);
}
.topbar {
  height: 72px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 32px;
  background: var(--surface);
}
.section-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.section-heading h1 {
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: -0.4px;
}
.sidebar-heading {
  position: relative;
}
.menu-toggle,
.menu-close,
.menu-backdrop {
  display: none;
}
.date-filter {
  position: relative;
}
.date-filter > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 12px;
  background: var(--surface);
  min-height: 36px;
}
.date-filter > summary::-webkit-details-marker {
  display: none;
}
.date-filter > summary svg {
  width: 14px;
  height: 14px;
}
.date-filter[open] > summary {
  border-color: var(--accent);
}
.date-popover {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(330px, calc(100vw - 24px));
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
  z-index: 35;
}
.date-popover .date-range {
  padding: 0;
  border: 0;
  width: 100%;
  gap: 6px;
}
.date-popover .date-range > svg {
  display: none;
}
.date-popover .date-range input {
  flex: 1;
  min-width: 0;
  width: 110px;
}
.date-popover .comparison {
  display: block;
  margin: 10px 0 0;
  font-size: 12px;
}
.panel-head > div:first-child {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}
.panel-help {
  font-size: 12px;
  color: var(--muted);
}
.panel-help summary {
  display: flex;
  cursor: pointer;
  list-style: none;
  padding: 6px;
  margin: -6px;
}
.panel-help summary::-webkit-details-marker {
  display: none;
}
.panel-help summary svg {
  width: 14px;
  height: 14px;
}
.panel-help[open] {
  flex-basis: 100%;
}
.panel-help[open] summary {
  width: max-content;
  margin-bottom: 4px;
}
.panel-help p {
  max-width: 640px;
}
.explanation {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}
.explanation summary {
  cursor: pointer;
  padding: 8px 0;
}
.explanation p {
  padding: 0 0 8px;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 35px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 500;
}
.button.primary {
  background: var(--accent);
  color: var(--surface);
  border-color: var(--accent);
}
.button.subtle {
  background: var(--surface);
}
.freshness {
  color: var(--muted);
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.freshness:before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--good);
  border-radius: 50%;
}
.freshness.warn:before {
  background: var(--warn);
}
main {
  padding: 30px 32px 0;
  max-width: 1700px;
  margin: auto;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 26px;
}
.eyebrow {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 1.4px;
  font-weight: 600;
  margin-bottom: 9px;
}
.page-heading p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
}
.market-picker {
  display: flex;
  align-items: center;
  padding: 4px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 12px;
}
.market-picker button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 9px 15px;
  white-space: nowrap;
  font-size: 12px;
  border-radius: 8px;
}
.market-picker button[aria-pressed="true"] {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}
.filters {
  display: flex;
  align-items: center;
  gap: 13px;
  flex-wrap: wrap;
  margin-bottom: 25px;
}
.period-presets {
  display: flex;
  padding: 3px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.period-presets button {
  border: 0;
  background: none;
  font-size: 12px;
  padding: 7px 11px;
  border-radius: 6px;
  color: var(--muted);
}
.period-presets button.active {
  background: var(--soft);
  color: var(--ink);
  font-weight: 600;
}
.date-range {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 37px;
  padding: 0 5px 0 11px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
}
.date-range > svg {
  width: 14px;
}
.date-range input {
  font-size: 12px;
  padding: 7px 3px;
  width: 106px;
  border: 0;
  background: transparent;
  min-width: 0;
}
.date-range .icon-button {
  width: 25px;
  height: 29px;
}
.date-range .icon-button svg {
  width: 14px;
}
.comparison {
  margin-left: auto;
  font-size: 12px;
  color: var(--muted);
}
.notice {
  display: flex;
  gap: 10px;
  align-items: center;
  background: var(--warn-bg);
  color: var(--warn);
  border-radius: 12px;
  padding: 12px 15px;
  margin-bottom: 20px;
  font-size: 12px;
  line-height: 1.6;
}
.notice a {
  color: inherit;
  text-decoration: underline;
}
.kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  margin-bottom: 22px;
}
.kpi {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 19px;
  border-radius: 16px;
  min-width: 0;
}
.kpi-label {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}
.kpi-label svg {
  width: 16px;
  color: var(--accent);
}
.kpi-value {
  font-size: 29px;
  letter-spacing: -1px;
  font-weight: 630;
  line-height: 1.2;
  margin: 15px 0 11px;
  font-variant-numeric: tabular-nums;
}
.kpi-value .unit {
  font-size: 20px;
  font-weight: 450;
  margin-left: 4px;
}
.kpi-context {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.delta {
  font-size: 12px;
  padding: 3px 5px;
  border-radius: 5px;
  font-weight: 550;
  white-space: nowrap;
}
.delta.good {
  color: var(--good);
  background: var(--good-bg);
}
.delta.bad {
  color: var(--bad);
  background: var(--bad-bg);
}
.delta.neutral {
  color: var(--muted);
  background: var(--soft);
}
.kpi-note {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.5;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(280px, 1fr);
  gap: 20px;
  margin-bottom: 22px;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.panel-head {
  padding: 22px 22px 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.panel-head p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.panel-body {
  padding: 22px;
}
.panel-head .text-button {
  white-space: nowrap;
  margin-top: 0;
}
.text-button {
  border: 0;
  padding: 3px;
  background: none;
  color: var(--accent);
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-align: left;
}
.text-button svg {
  width: 13px;
  height: 13px;
}
.chart-tabs {
  display: flex;
  gap: 4px;
  padding: 0 22px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.chart-tabs button {
  font-size: 12px;
  padding: 7px 9px;
  color: var(--muted);
  border: 0;
  background: var(--soft);
}
.chart-tabs button.active {
  background: var(--accent-soft);
  color: var(--accent);
}
.chart-wrap {
  height: 241px;
  margin: 18px 18px 8px;
  position: relative;
}
.chart-note {
  font-size: 12px;
  color: var(--muted);
  padding: 6px 22px 18px;
  line-height: 1.6;
}
.funnel-compact {
  display: grid;
  gap: 19px;
  padding: 25px 22px 10px;
}
.funnel-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 9px;
}
.funnel-row-head strong {
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.4px;
}
.funnel-bar {
  height: 7px;
  background: var(--soft);
  border-radius: 8px;
  overflow: hidden;
}
.funnel-bar span {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 8px;
}
.funnel-row:nth-child(2) .funnel-bar span {
  opacity: 0.7;
}
.funnel-row:nth-child(3) .funnel-bar span {
  background: var(--good);
}
.funnel-next {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  margin-top: 8px;
}
.coverage-note {
  border-top: 1px solid var(--line);
  margin: 15px 22px 0;
  padding: 16px 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.65;
}
.coverage-note strong {
  color: var(--warn);
  font-weight: 550;
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 27px 0 14px;
}
.section-title h2 {
  font-size: 16px;
}
.advice-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}
.advice-card {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 19px;
  border-radius: 14px;
  display: flex;
  gap: 13px;
  align-items: flex-start;
}
.advice-icon {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border-radius: 10px;
  background: var(--warn-bg);
  color: var(--warn);
  flex-shrink: 0;
}
.advice-icon svg {
  width: 16px;
  height: 16px;
}
.advice-card h3 {
  font-size: 12px;
  line-height: 1.5;
}
.advice-card p {
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
  margin: 7px 0 9px;
}
.advice-card small {
  font-size: 12px;
  display: block;
  margin-top: 5px;
}
.advice-card .text-button {
  font-size: 12px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  border-radius: 6px;
  background: var(--soft);
  color: var(--muted);
  padding: 5px 7px;
  font-size: 12px;
  font-weight: 500;
}
.badge.good {
  color: var(--good);
  background: var(--good-bg);
}
.badge.warn {
  color: var(--warn);
  background: var(--warn-bg);
}
.badge.bad {
  color: var(--bad);
  background: var(--bad-bg);
}
.badge.info {
  color: var(--accent);
  background: var(--accent-soft);
}
.table-scroll {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
  white-space: nowrap;
}
th {
  text-align: left;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  background: var(--soft);
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}
td {
  padding: 17px 16px;
  border-bottom: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover {
  background: var(--soft);
}
.numeric {
  text-align: right;
}
.campaign-name {
  display: block;
  font-size: 12px;
  font-weight: 550;
  color: var(--ink);
  border: 0;
  background: none;
  padding: 0;
  text-align: left;
  max-width: 235px;
  white-space: normal;
  line-height: 1.5;
}
.campaign-name:hover {
  color: var(--accent);
}
.campaign-sub {
  font-size: 12px;
  display: block;
  color: var(--muted);
  margin-top: 5px;
}
.table-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 18px;
  flex-wrap: wrap;
}
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 9px;
  min-width: 0;
  flex: 1 1 200px;
  padding: 0 11px;
}
.search svg {
  width: 15px;
  color: var(--muted);
}
.search input {
  background: none;
  border: 0;
  padding: 10px 0;
  width: 100%;
  font-size: 12px;
  outline-offset: 0;
}
.table-toolbar select {
  padding: 10px;
  font-size: 12px;
  max-width: 230px;
}
.table-footer {
  border-top: 1px solid var(--line);
  padding: 13px 18px;
  color: var(--muted);
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
}
.creatives-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.creative-comparison-panel {
  overflow: hidden;
}
.creative-toolbar {
  padding-bottom: 12px;
}
.creative-switch {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--soft);
}
.creative-switch button {
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  padding: 7px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}
.creative-switch button[aria-pressed="true"] {
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 1px 3px #0000000d;
}
.creative-switch svg {
  width: 14px;
  height: 14px;
}
.creative-comparison-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 0 18px 16px;
}
.creative-groups {
  border: 0;
}
.creative-order {
  display: flex;
  gap: 7px;
  align-items: center;
}
.creative-order select {
  max-width: 155px;
  padding: 7px 9px;
  font-size: 12px;
}
.creative-order .icon-button {
  width: 30px;
  height: 30px;
}
.creative-comparison-scroll {
  isolation: isolate;
  border-top: 1px solid var(--line);
}
.creative-comparison-table {
  border-collapse: separate;
  border-spacing: 0;
}
.creative-comparison-table th,
.creative-comparison-table td {
  padding: 13px 12px;
}
.creative-comparison-table thead th {
  vertical-align: top;
}
.creative-comparison-table thead button {
  border: 0;
  background: none;
  padding: 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 550;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.creative-comparison-table thead button svg {
  height: 11px;
  width: 11px;
  color: var(--accent);
}
.creative-comparison-table thead small {
  display: block;
  font-size: 12px;
  font-weight: 400;
  margin-top: 5px;
}
.creative-comparison-table .creative-identity,
.creative-comparison-table .creative-identity-heading {
  position: sticky;
  left: 0;
  z-index: 1;
  border-right: 1px solid var(--line);
  min-width: 245px;
  width: 245px;
  white-space: normal;
}
.creative-comparison-table .creative-identity {
  background: var(--surface);
}
.creative-identity-content {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}
.creative-thumb {
  width: 64px;
  height: 80px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0;
  background: var(--soft);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
}
.creative-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.creative-row-title {
  display: block;
  text-align: left;
  font-size: 12px;
  font-weight: 550;
  line-height: 1.45;
  border: 0;
  padding: 0;
  color: var(--ink);
  background: none;
  overflow-wrap: anywhere;
}
.creative-row-title:hover {
  color: var(--accent);
}
.creative-row-campaign,
.creative-row-group {
  display: block;
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
  margin-top: 3px;
  color: var(--muted);
}
.creative-row-group {
  font-size: 12px;
}
.creative-identity .badge {
  margin-top: 7px;
  font-size: 12px;
}
.creative-comparison-table td {
  font-size: 12px;
  min-width: 85px;
}
.creative-comparison-table .creative-sorted {
  background: var(--accent-soft);
}
.creative-comparison-table tr:last-child th {
  border-bottom: 0;
}
.creative-comparison-cards {
  padding: 0 18px 18px;
}
.creative-preview-missing {
  font-size: 12px;
  line-height: 1.3;
}
@media (max-width: 740px) {
  .creative-comparison-tools {
    padding: 0 12px 12px;
    gap: 9px;
  }
  .creative-toolbar .creative-switch {
    flex: 1;
  }
  .creative-toolbar .creative-switch button {
    flex: 1;
    padding: 8px;
  }
  .creative-comparison-table .creative-identity,
  .creative-comparison-table .creative-identity-heading {
    width: 146px;
    min-width: 146px;
    max-width: 146px;
    padding: 10px;
  }
  .creative-identity-content {
    grid-template-columns: 1fr;
    gap: 7px;
  }
  .creative-thumb {
    width: 44px;
    height: 52px;
    border-radius: 6px;
  }
  .creative-row-title {
    font-size: 12px;
  }
  .creative-row-campaign {
    font-size: 12px;
  }
  .creative-row-group {
    display: none;
  }
  .creative-comparison-table td {
    font-size: 12px;
  }
  .creative-comparison-cards {
    padding: 0 12px 12px;
  }
}
.creative-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  overflow: hidden;
}
.creative-image {
  height: 230px;
  background: var(--soft);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.creative-image img {
  height: 100%;
  width: 100%;
  object-fit: contain;
}
.creative-image > .badge {
  position: absolute;
  top: 12px;
  left: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.creative-image button {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.creative-image .no-image {
  font-size: 12px;
  color: var(--muted);
}
.creative-copy {
  padding: 18px;
}
.creative-copy h3 {
  font-size: 13px;
  margin-bottom: 5px;
  overflow-wrap: anywhere;
}
.creative-copy > p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}
.creative-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px 10px;
  margin-top: 19px;
}
.creative-metrics small {
  font-size: 12px;
  display: block;
  line-height: 1.4;
}
.creative-metrics strong {
  font-size: 14px;
  font-weight: 550;
  margin-top: 6px;
  display: block;
}
.creative-foot {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin-top: 16px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}
.empty {
  padding: 50px 20px;
  text-align: center;
  color: var(--muted);
}
.empty h3 {
  color: var(--ink);
  margin: 12px 0 8px;
}
.empty p {
  font-size: 12px;
  line-height: 1.7;
  max-width: 440px;
  margin: auto;
}
.empty > svg {
  width: 28px;
  height: 28px;
}
.loading {
  display: grid;
  place-items: center;
  min-height: 420px;
  align-content: center;
  gap: 15px;
  color: var(--muted);
}
.loading h2 {
  color: var(--ink);
}
.loading p {
  font-size: 12px;
}
.loading svg {
  width: 28px;
  height: 28px;
  animation: spin 1.5s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.page-footer {
  display: flex;
  gap: 15px;
  align-items: center;
  justify-content: space-between;
  padding: 28px 0;
  font-size: 12px;
  color: var(--muted);
}
.page-footer > span:first-child {
  font-weight: 600;
}
.page-footer .text-button {
  font-size: 12px;
}
.source-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 23px;
}
.source-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  padding: 20px;
}
.source-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 13px;
}
.source-head h3 {
  font-size: 12px;
}
.source-card p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
}
.source-card .source-error {
  color: var(--bad);
}
.quality-list {
  padding: 0 22px;
}
.quality-row {
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 20px;
}
.quality-row:last-child {
  border-bottom: 0;
}
.quality-row h3 {
  font-size: 12px;
  margin-bottom: 5px;
}
.quality-row p {
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 680px;
}
.quality-row > strong {
  font-size: 19px;
  color: var(--warn);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.definitions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 35px;
  padding: 5px 22px 20px;
}
.definition {
  padding-top: 20px;
}
.definition h3 {
  font-size: 12px;
  margin-bottom: 7px;
}
.definition p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
}
.definition code {
  font-family: inherit;
  font-size: 12px;
  background: var(--soft);
  padding: 3px 5px;
  border-radius: 5px;
  color: var(--ink);
}
.journey {
  display: grid;
  grid-template-columns: 1.2fr 24px 1fr 24px 1fr 24px 1fr;
  align-items: center;
  gap: 12px;
  padding: 26px;
}
.journey-step {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px 15px;
  min-height: 127px;
}
.journey-step > span {
  font-size: 12px;
  color: var(--muted);
}
.journey-step strong {
  font-size: 25px;
  display: block;
  letter-spacing: -0.7px;
  margin: 10px 0;
}
.journey-step p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}
.journey-step.converted {
  background: var(--good-bg);
  border-color: transparent;
}
.journey-step.converted strong {
  color: var(--good);
}
.journey > svg {
  width: 19px;
  color: var(--muted);
}
.journey-gap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin: 0 26px 25px;
  padding: 15px;
  background: var(--warn-bg);
  color: var(--warn);
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.7;
}
.flow-meta {
  padding: 0 26px 22px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
}
.lead-table th:first-child {
  min-width: 150px;
}
.lead-table td {
  font-size: 12px;
}
.assistant-intro {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 23px;
  border-radius: 16px;
  margin-bottom: 20px;
  display: flex;
  gap: 16px;
}
.assistant-intro > svg {
  width: 25px;
  height: 25px;
  color: var(--accent);
}
.assistant-intro p {
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
  margin-top: 8px;
  max-width: 820px;
}
.recommendation-list {
  display: grid;
  gap: 14px;
}
.recommendation-list .advice-card {
  padding: 24px;
}
.recommendation-list .advice-card p {
  font-size: 12px;
  max-width: 800px;
}
.recommendation-list .advice-card h3 {
  font-size: 14px;
}
.recommendation-list .advice-card .text-button {
  font-size: 12px;
}
.campaign-focus {
  padding: 12px 15px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 10px;
  font-size: 12px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.campaign-focus button {
  border: 0;
  background: none;
  color: inherit;
  font-size: 12px;
}
dialog {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 20px;
  padding: 0;
  width: min(850px, calc(100vw - 36px));
  max-height: 90dvh;
  box-shadow: var(--shadow);
}
dialog::backdrop {
  background: #080d1866;
  backdrop-filter: blur(3px);
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 22px 25px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 1;
}
.dialog-head h2 {
  font-size: 17px;
  overflow-wrap: anywhere;
}
#detail-body {
  padding: 25px;
}
.detail-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 20px 0;
}
.detail-kpis > div {
  background: var(--soft);
  border-radius: 12px;
  padding: 15px;
}
.detail-kpis small {
  display: block;
  font-size: 12px;
}
.detail-kpis strong {
  font-size: 21px;
  margin-top: 9px;
  display: block;
}
.detail-text {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.9;
}
.detail-text p {
  margin-bottom: 13px;
}
.detail-image {
  width: 100%;
  max-height: 550px;
  object-fit: contain;
  background: var(--soft);
  border-radius: 12px;
}
.detail-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.detail-actions a {
  font-size: 12px;
}
.toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  padding: 13px 21px;
  color: var(--surface);
  background: var(--ink);
  box-shadow: var(--shadow);
  z-index: 100;
  border-radius: 12px;
  font-size: 12px;
  max-width: 90vw;
}
.small-note {
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
  margin: 12px 0 22px;
}
.margin-bottom {
  margin-bottom: 22px;
}
.salon-name {
  font-size: 12px;
  white-space: normal;
  line-height: 1.5;
}
.metric-warning {
  color: var(--warn);
}
@media (min-width: 1550px) {
  .shell {
    grid-template-columns: 248px minmax(0, 1fr);
  }
  main {
    padding: 36px 42px 0;
  }
  .topbar {
    padding: 0 42px;
  }
  .chart-wrap {
    height: 280px;
  }
  .creative-image {
    height: 285px;
  }
}
@media (max-width: 1180px) {
  .shell {
    grid-template-columns: 200px minmax(0, 1fr);
  }
  .sidebar {
    padding: 26px 10px 15px;
  }
  .brand {
    padding-left: 9px;
  }
  .workspace-label {
    font-size: 12px;
  }
  .sidebar-account strong {
    font-size: 12px;
  }
  .account-avatar {
    display: none;
  }
  main {
    padding: 25px 24px 0;
  }
  .topbar {
    padding: 0 24px;
  }
  .comparison {
    width: 100%;
    margin-left: 0;
  }
  .kpi {
    padding: 16px;
  }
  .kpi-value {
    font-size: 26px;
  }
  .dashboard-grid {
    grid-template-columns: minmax(0, 1.3fr) minmax(260px, 1fr);
    gap: 15px;
  }
  .panel-head {
    padding: 20px 18px 0;
  }
  .creatives-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .journey {
    gap: 8px;
    padding: 20px;
    grid-template-columns: 1fr 15px 1fr 15px 1fr 15px 1fr;
  }
  .journey-step {
    padding: 15px 11px;
  }
  .freshness {
    display: none;
  }
}
@media (max-width: 900px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .kpi-note {
    min-height: 14px;
  }
  .page-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .market-picker {
    align-self: flex-start;
  }
  .advice-strip {
    grid-template-columns: 1fr;
  }
  .source-grid {
    grid-template-columns: 1fr;
  }
  .chart-wrap {
    height: 260px;
  }
  .funnel-compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
  }
  .funnel-row-head {
    font-size: 12px;
  }
  .funnel-next {
    font-size: 12px;
    flex-wrap: wrap;
  }
  .page-footer > span:nth-child(2) {
    display: none;
  }
  .journey {
    grid-template-columns: 1fr 20px 1fr;
    gap: 15px;
  }
  .journey > svg:nth-child(4) {
    display: none;
  }
  .definitions {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 740px) {
  .shell {
    display: block;
  }
  body.menu-open {
    overflow: hidden;
  }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(296px, calc(100vw - 44px));
    height: 100dvh;
    padding: 16px 12px max(16px, env(safe-area-inset-bottom));
    z-index: 60;
    border-right: 1px solid var(--line);
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateX(-100%);
    visibility: hidden;
    transition:
      transform 180ms ease,
      visibility 180ms;
  }
  .menu-open .sidebar {
    transform: translateX(0);
    visibility: visible;
  }
  .menu-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 50;
    border: 0;
    border-radius: 0;
    background: #080d1680;
    backdrop-filter: blur(3px);
  }
  .menu-toggle,
  .menu-close {
    display: inline-flex;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
  }
  .sidebar-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0 0 20px;
  }
  .brand {
    padding: 0;
    gap: 9px;
  }
  .brand small {
    display: none;
  }
  .brand strong {
    font-size: 17px;
  }
  .brand-symbol {
    width: 30px;
    height: 30px;
    border-radius: 9px;
  }
  .brand-symbol svg {
    width: 20px;
    height: 20px;
  }
  .workspace-label {
    display: none;
  }
  .sidebar nav {
    display: grid;
    gap: 4px;
    overflow: visible;
  }
  .sidebar nav a {
    font-size: 13px;
    min-height: 44px;
    padding: 11px 12px;
    gap: 11px;
  }
  .sidebar nav a svg {
    width: 18px;
    height: 18px;
  }
  .sidebar-bottom {
    position: static;
    margin-top: auto;
    padding-top: 24px;
  }
  .ecosystem-label {
    display: block;
    font-size: 12px;
  }
  .ecosystem {
    display: grid;
    gap: 12px;
    margin-bottom: 18px;
  }
  .sidebar-account {
    padding-top: 14px;
    border-top: 1px solid var(--line);
  }
  .sidebar-account > span:nth-child(2) {
    display: block;
  }
  .sidebar-account strong {
    font-size: 12px;
  }
  .sidebar-account .icon-button {
    width: 36px;
    height: 40px;
  }
  .topbar {
    position: sticky;
    top: 0;
    height: 56px;
    z-index: 30;
    padding: 0 12px;
    gap: 8px;
  }
  .section-heading {
    gap: 6px;
  }
  .section-heading h1 {
    font-size: 18px;
  }
  .top-actions {
    gap: 0;
  }
  .topbar .button {
    min-height: 40px;
    width: 40px;
    border: 0;
    padding: 9px;
  }
  .topbar .button svg {
    width: 18px;
    height: 18px;
  }
  .topbar .button span {
    display: none;
  }
  main {
    padding: 12px 12px 0;
  }
  .page-heading {
    margin-bottom: 8px;
    gap: 0;
  }
  .market-picker {
    width: 100%;
    justify-content: center;
  }
  .market-picker button {
    flex: 1;
    padding: 7px 10px;
    font-size: 12px;
  }
  .filters {
    gap: 8px;
    margin-bottom: 14px;
    flex-wrap: nowrap;
    align-items: flex-start;
  }
  .period-presets {
    flex: 1;
    min-width: 0;
  }
  .period-presets button {
    flex: 1;
    padding: 7px 5px;
    font-size: 12px;
    min-height: 32px;
    white-space: nowrap;
  }
  .period-unit {
    display: none;
  }
  .date-filter {
    flex: 1;
    min-width: 0;
  }
  .date-filter > summary {
    gap: 5px;
    justify-content: space-between;
    padding: 8px;
    font-size: 12px;
    min-height: 36px;
    white-space: nowrap;
  }
  .date-filter > summary > svg:first-child {
    display: none;
  }
  .date-filter > summary > svg:last-child {
    width: 12px;
    height: 12px;
  }
  .date-range input {
    font-size: 12px;
  }
  .date-range .icon-button {
    width: 32px;
    flex-shrink: 0;
  }
  .kpis {
    gap: 10px;
    margin-bottom: 17px;
  }
  .kpi {
    padding: 14px;
    border-radius: 13px;
  }
  .kpi-label {
    font-size: 12px;
    line-height: 1.35;
    min-height: 15px;
  }
  .kpi-label svg {
    display: none;
  }
  .kpi-value {
    font-size: 24px;
    margin: 6px 0;
  }
  .kpi-value .unit {
    font-size: 16px;
  }
  .kpi-context,
  .kpi-note {
    font-size: 12px;
  }
  .delta {
    font-size: 12px;
  }
  .panel {
    border-radius: 14px;
  }
  .panel-head {
    padding: 19px 17px 0;
  }
  .panel-head h2 {
    font-size: 15px;
  }
  .panel-head p {
    font-size: 12px;
  }
  .panel-head .text-button {
    font-size: 12px;
  }
  .chart-tabs {
    padding: 0 15px;
  }
  .chart-tabs button {
    font-size: 12px;
  }
  .chart-wrap {
    height: 230px;
    margin: 16px 10px 5px;
  }
  .chart-note {
    padding: 5px 17px 17px;
  }
  .funnel-compact {
    display: grid;
    grid-template-columns: 1fr;
    padding: 23px 18px 8px;
  }
  .funnel-row-head {
    font-size: 12px;
  }
  .funnel-next {
    font-size: 12px;
  }
  .funnel-bar {
    height: 7px;
  }
  .coverage-note {
    margin: 15px 18px 0;
  }
  .section-title {
    margin-top: 22px;
  }
  .section-title h2 {
    font-size: 15px;
  }
  .advice-card {
    padding: 17px;
    gap: 10px;
  }
  .advice-card p {
    font-size: 12px;
  }
  .campaign-name {
    max-width: 190px;
    font-size: 12px;
  }
  .table-toolbar {
    padding: 13px;
    gap: 8px;
  }
  .table-toolbar select {
    font-size: 12px;
    flex: 1;
    max-width: 100%;
  }
  .table-footer {
    font-size: 12px;
  }
  .creatives-grid {
    gap: 14px;
    grid-template-columns: 1fr;
  }
  .creative-image {
    height: 330px;
  }
  .creative-copy {
    padding: 18px;
  }
  .creative-metrics {
    gap: 20px 10px;
  }
  .creative-metrics strong {
    font-size: 16px;
  }
  .source-card {
    padding: 13px;
  }
  .source-head h3 {
    font-size: 12px;
  }
  .journey {
    padding: 17px;
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .journey > svg {
    transform: rotate(90deg);
    justify-self: center;
  }
  .journey > svg:nth-child(4) {
    display: block;
  }
  .journey-step {
    min-height: 0;
    padding: 16px;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
  }
  .journey-step > span {
    font-size: 12px;
  }
  .journey-step strong {
    font-size: 25px;
    margin: 0;
    grid-column: 2;
    grid-row: 1/3;
  }
  .journey-step p {
    margin-top: 8px;
  }
  .journey-gap {
    margin: 0 17px 18px;
    font-size: 12px;
  }
  .flow-meta {
    padding: 0 17px 18px;
    font-size: 12px;
  }
  .quality-list {
    padding: 0 17px;
  }
  .quality-row {
    gap: 13px;
  }
  .quality-row h3 {
    font-size: 12px;
  }
  .quality-row p {
    font-size: 12px;
  }
  .quality-row > strong {
    font-size: 17px;
  }
  .definitions {
    padding: 0 17px 20px;
  }
  .assistant-intro {
    padding: 18px;
    gap: 12px;
  }
  .assistant-intro h2 {
    font-size: 15px;
  }
  .assistant-intro p {
    font-size: 12px;
  }
  .recommendation-list .advice-card {
    padding: 18px;
  }
  .recommendation-list .advice-card h3 {
    font-size: 12px;
  }
  .recommendation-list .advice-card p {
    font-size: 12px;
  }
  dialog {
    width: 100vw;
    max-height: 100dvh;
    height: 100dvh;
    border-radius: 0;
    margin: 0;
  }
  .dialog-head {
    padding: 19px;
  }
  .dialog-head h2 {
    font-size: 16px;
  }
  #detail-body {
    padding: 19px;
  }
  .detail-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }
  .detail-kpis strong {
    font-size: 21px;
  }
  .detail-kpis small {
    font-size: 12px;
  }
  .detail-text {
    font-size: 12px;
  }
  .page-footer {
    padding: 24px 0;
  }
  .notice {
    font-size: 12px;
    align-items: flex-start;
    padding: 12px;
  }
  .notice svg {
    width: 16px;
    height: 16px;
  }
  .toast {
    font-size: 12px;
    width: max-content;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
.creative-title {
  border: 0;
  padding: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  text-align: left;
  cursor: pointer;
}
.creative-title:hover,
.campaign-name:hover {
  color: var(--accent);
  text-decoration: underline;
}
.lead-split {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 15px;
  margin-top: 7px;
  font-size: 12px;
  font-weight: 400;
}
.lead-split span {
  display: inline-flex;
  gap: 6px;
  align-items: baseline;
}
.lead-split b {
  font-size: 13px;
  color: var(--ink);
}
.journey-step .lead-split {
  grid-column: 1 / -1;
}
.source-method {
  font-size: 12px;
  margin-top: 10px;
  line-height: 1.6;
  color: var(--muted);
}
.source-method summary {
  cursor: pointer;
}
dialog.analytics-dialog {
  width: min(1120px, calc(100vw - 48px));
  max-width: 1120px;
}
.entity-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
}
.analytics-dialog .detail-kpis {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.analytics-dialog .detail-kpis .delta {
  display: inline-block;
  margin-top: 9px;
  font-size: 12px;
}
.entity-section {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  margin-top: 26px;
}
.entity-section h2 {
  font-size: 17px;
  margin-bottom: 14px;
}
.entity-section .panel-head {
  padding: 0 0 20px;
}
.entity-section .chart-tabs {
  padding: 0;
  flex-wrap: wrap;
}
.entity-section .chart-wrap {
  margin-left: 0;
  margin-right: 0;
  height: 270px;
}
.entity-section .small-note {
  line-height: 1.7;
}
.entity-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  font-size: 12px;
}
.entity-meta div {
  min-width: 0;
}
.entity-meta dt {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}
.entity-meta dd {
  margin: 0;
  overflow-wrap: anywhere;
  line-height: 1.6;
}
.creative-presentation {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
}
.creative-presentation .detail-image {
  width: 100%;
  max-height: 600px;
  object-fit: contain;
  margin: 0;
}
.site-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.site-heading h2 {
  margin-top: 7px;
  font-size: 26px;
}
.site-heading p {
  color: var(--muted);
  font-size: 12px;
  margin-top: 8px;
}
.site-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 18px;
  margin-bottom: 22px;
}
.site-filters label {
  display: flex;
  flex: 1;
  min-width: 200px;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}
.site-filters select {
  min-width: 0;
  width: 100%;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--page);
  color: var(--ink);
  font: inherit;
  font-size: 12px;
}
.site-kpis {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.site-kpis .kpi-value {
  font-size: 28px;
}
.site-quality-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 22px 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.site-quality-strip > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.site-quality-strip span {
  font-size: 12px;
  color: var(--muted);
}
.site-quality-strip strong {
  font-size: 20px;
}
.site-dimension {
  white-space: normal;
  min-width: 180px;
  max-width: 320px;
  overflow-wrap: anywhere;
}
.site-method {
  padding: 20px;
}
.site-method > summary,
.site-daily > summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
}
.site-method[open] > summary {
  margin-bottom: 22px;
}
.site-daily {
  padding: 20px;
}
.site-daily[open] > summary {
  margin-bottom: 15px;
}
.site-table-note {
  padding: 16px 22px;
}
#website-content[aria-busy="true"] {
  opacity: 0.55;
  pointer-events: none;
}
@media (max-width: 740px) {
  dialog.analytics-dialog {
    width: 100vw;
    max-width: 100vw;
  }
  .analytics-dialog .detail-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .entity-meta,
  .creative-presentation {
    grid-template-columns: 1fr;
  }
  .site-heading {
    align-items: center;
    flex-direction: row;
    gap: 8px;
    margin-bottom: 10px;
  }
  .site-heading h2 {
    font-size: 18px;
    margin: 0;
  }
  .site-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .site-kpis .kpi {
    padding: 12px;
  }
  .site-kpis .kpi-value {
    font-size: 24px;
  }
  .site-quality-strip {
    gap: 8px;
    padding: 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .entity-section .chart-wrap {
    height: 220px;
  }
  .lead-split {
    font-size: 12px;
  }
}

.detail-kpis .muted {
  font-size: 12px;
  line-height: 1.4;
}

@media (max-width: 740px) {
  .kpi-context > span:last-child:not(.delta):not(.muted) {
    display: none;
  }
  .kpi-context .delta,
  .delta {
    font-size: 12px;
  }
  .panel-head {
    padding: 14px 14px 0;
  }
  .panel-head h2 {
    font-size: 14px;
  }
  .site-filters {
    padding: 12px;
    gap: 8px;
    margin-bottom: 12px;
  }
  .site-filters label {
    min-width: 0;
    flex: 1 1 200px;
    gap: 4px;
    font-size: 12px;
  }
  .site-filters select {
    padding: 7px 9px;
    font-size: 12px;
    min-height: 34px;
  }
  .site-quality-strip > div {
    display: grid;
    gap: 5px;
    align-content: start;
  }
  .site-quality-strip span {
    font-size: 12px;
  }
  .site-quality-strip strong {
    font-size: 18px;
  }
  .site-method,
  .site-daily {
    padding: 14px;
  }
  .site-method > summary,
  .site-daily > summary {
    font-size: 12px;
  }
  .source-grid {
    gap: 10px;
  }
  .source-card > p {
    margin: 7px 0 0;
  }
  .source-method {
    font-size: 12px;
    margin-top: 8px;
  }
  .source-method p {
    line-height: 1.6;
  }
  .entity-heading {
    font-size: 12px;
    gap: 7px;
  }
  .entity-updated {
    margin: 8px 0 12px;
  }
  #detail-body {
    padding: 14px;
  }
  .dialog-head {
    padding: 12px 14px;
    min-height: 56px;
  }
  .entity-section {
    margin-top: 18px;
    padding-top: 18px;
  }
  .creative-image {
    height: 260px;
  }
  .creative-copy {
    padding: 14px;
  }
}

/* Executive overview: same compact shell, visual summary before details. */
.executive-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  margin-bottom: 18px;
}
.executive-grid > .panel {
  min-width: 0;
}
.cost-heading {
  margin: 8px 0 12px;
}
.cost-heading h2 {
  font-size: 16px;
}
.cost-kpis .kpi {
  background: linear-gradient(145deg, var(--surface), var(--accent-soft));
  border-color: var(--line);
}
.cost-kpis .kpi-value {
  font-size: 28px;
}
.cost-kpis {
  margin-bottom: 8px;
}
.cost-method {
  margin: 0 0 20px;
}
.cost-method summary {
  font-size: 12px;
  color: var(--muted);
}
.panel > .table-scroll {
  margin-top: 16px;
}
.cohort-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 26px 0 22px;
}
.cohort-metrics > div {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.cohort-metrics small,
.cohort-metrics span {
  color: var(--muted);
  font-size: 12px;
}
.cohort-metrics strong {
  font-size: 30px;
  letter-spacing: -1px;
}
.cohort-bars > div {
  display: grid;
  grid-template-columns: 65px 1fr;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 12px;
}
.compare-bars {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.compare-bars i {
  height: 9px;
  min-width: 0;
  border-radius: 3px;
  background: var(--accent);
}
.compare-bars i + i {
  background: #9aa6b5;
  opacity: 0.55;
}
.chart-legend {
  display: flex;
  gap: 16px;
  color: var(--muted);
  font-size: 12px;
  margin: 15px 0;
}
.chart-legend span:before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 5px;
  background: var(--accent);
  border-radius: 2px;
  margin: 0 6px 2px 0;
}
.chart-legend span + span:before {
  background: #9aa6b5;
}
.cohort-window {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}
.network-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 18px;
}
.network-card {
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 18px;
}
.network-card > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.network-card h3 {
  font-size: 15px;
}
.network-card .badge {
  font-size: 12px;
}
.network-headline {
  display: flex;
  gap: 13px;
  align-items: center;
  margin: 22px 0;
}
.network-headline > strong {
  font-size: 36px;
  letter-spacing: -1px;
}
.network-headline > span {
  display: flex;
  flex-direction: column;
  font-size: 12px;
  gap: 6px;
  color: var(--muted);
}
.network-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.network-stats > div {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.network-stats small {
  color: var(--muted);
  font-size: 12px;
}
.network-stats strong {
  font-size: 14px;
  white-space: nowrap;
}
.network-track {
  height: 5px;
  background: var(--soft);
  margin: 20px 0;
  border-radius: 4px;
}
.network-track span {
  height: 100%;
  display: block;
  background: var(--accent);
  border-radius: 4px;
}
.studio-bars {
  margin: 24px 0 16px;
  display: grid;
  gap: 18px;
}
.studio-bars > div {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) 30px;
  gap: 18px;
  align-items: center;
  font-size: 12px;
}
.studio-bars strong {
  text-align: right;
}
@media (max-width: 1080px) {
  .network-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .executive-grid {
    gap: 14px;
  }
}
@media (max-width: 740px) {
  .executive-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 12px;
  }
  .cost-heading {
    margin: 6px 0 10px;
  }
  .cost-heading h2 {
    font-size: 15px;
  }
  .cost-heading .badge {
    font-size: 12px;
  }
  .cost-kpis .kpi-value {
    font-size: 24px;
  }
  .cost-method {
    margin-bottom: 14px;
  }
  .cohort-metrics {
    margin: 20px 0;
  }
  .cohort-metrics strong {
    font-size: 27px;
  }
  .network-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .network-card {
    padding: 14px;
  }
  .network-headline {
    margin: 16px 0;
  }
  .network-stats {
    grid-template-columns: repeat(4, 1fr);
    gap: 7px;
  }
  .network-stats strong {
    font-size: 12px;
  }
  .studio-bars > div {
    grid-template-columns: 95px minmax(0, 1fr) 24px;
    gap: 10px;
    font-size: 12px;
  }
  .studio-bars {
    gap: 14px;
  }
  .cost-kpis .kpi-context > span:last-child {
    display: none;
  }
  .overview-counts .kpi-note {
    font-size: 12px;
  }
}
@media (max-width: 359px) {
  .network-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}
.refresh-cadence {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 14px;
  margin-top: 16px;
}
.refresh-cadence span {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12px;
  color: var(--muted);
}
.refresh-cadence strong {
  font-size: 17px;
  color: var(--ink);
}
@media (max-width: 740px) {
  .refresh-cadence {
    grid-template-columns: 1fr 1fr;
  }
  .refresh-cadence strong {
    font-size: 15px;
  }
}
.overview-counts .kpi,
.cost-kpis .kpi {
  padding: 16px;
}
.overview-counts .kpi-value,
.cost-kpis .kpi-value {
  margin: 10px 0 8px;
}
@media (max-width: 740px) {
  .overview-counts .kpi,
  .cost-kpis .kpi {
    padding: 12px;
  }
  .overview-counts .kpi-value,
  .cost-kpis .kpi-value {
    margin: 5px 0;
  }
  .overview-counts .lead-split {
    margin-top: 5px;
  }
  .overview-counts .kpi-note,
  .cost-kpis .kpi-note {
    margin-top: 5px;
  }
  .cost-kpis .kpi-note {
    font-size: 12px;
  }
}
.cohort-metrics,
.cohort-bars,
.cohort-panel > .chart-legend,
.studio-bars,
.panel > .chart-legend,
.refresh-cadence {
  padding-left: 22px;
  padding-right: 22px;
}
.cohort-window {
  padding: 0 22px 20px;
}
.network-grid {
  margin: 18px 22px 22px;
}
.refresh-cadence {
  padding-bottom: 22px;
}
@media (max-width: 740px) {
  .cohort-metrics,
  .cohort-bars,
  .cohort-panel > .chart-legend,
  .studio-bars,
  .panel > .chart-legend,
  .refresh-cadence {
    padding-left: 17px;
    padding-right: 17px;
  }
  .cohort-window {
    padding: 0 17px 17px;
  }
  .network-grid {
    margin: 14px 17px 17px;
  }
}

/* Evidence and settings stay compact on mobile. */
.outcome-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  padding: 16px 0;
}
.outcome-grid > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.outcome-grid strong {
  font-size: 26px;
  font-weight: 650;
}
.outcome-grid small {
  color: var(--muted);
  font-size: 12px;
}
.targeting-panel > summary,
.target-group > summary {
  cursor: pointer;
  font-weight: 600;
  padding: 12px 0;
}
.target-group {
  border-top: 1px solid var(--line);
}
.target-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.target-grid dt {
  color: var(--muted);
  font-size: 12px;
}
.target-grid dd {
  margin: 6px 0;
}
.target-grid pre {
  font: inherit;
  font-size: 13px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 0;
}
.targeting-panel > summary .muted {
  font-weight: 400;
  margin-left: 8px;
}
@media (max-width: 640px) {
  .outcome-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 12px;
  }
  .outcome-grid strong {
    font-size: 23px;
  }
  .target-grid {
    grid-template-columns: 1fr;
  }
}

/* Shared presentation rhythm across all reports, cards and detail views. */
.workspace,
#view,
#website-content,
.panel,
.entity-section {
  min-width: 0;
}
.sidebar {
  overflow-y: auto;
}
.sidebar-bottom {
  padding-top: 28px;
}
.sidebar nav a {
  font-size: 13px;
  min-height: 46px;
}
.workspace-label,
.ecosystem-label {
  letter-spacing: 0.7px;
  font-size: 10px;
}
.sidebar-account strong,
.sidebar-account small {
  font-size: 11px;
}
.sidebar-account .icon-button {
  width: 32px;
}
.brand small {
  font-size: 12px;
}
.button,
.text-button,
.market-picker button,
.period-presets button,
.chart-tabs button,
.creative-switch button {
  min-height: 40px;
}
.icon-button {
  flex-shrink: 0;
}
.panel-head {
  padding: var(--panel-inset) var(--panel-inset) 0;
  align-items: center;
}
.panel-head h2 {
  font-size: 17px;
  line-height: 1.4;
}
.panel-head > div:first-child {
  gap: 8px;
}
.panel-head .text-button {
  white-space: normal;
  flex-shrink: 0;
}
.panel-body {
  padding: var(--panel-inset);
}
.panel-help summary {
  align-items: center;
  justify-content: center;
  min-width: 28px;
  min-height: 32px;
  padding: 4px;
  margin: 0;
}
.panel-help summary svg {
  width: 16px;
  height: 16px;
}
.panel-help p {
  font-size: 13px;
  line-height: 1.65;
  padding-bottom: 6px;
}
.panel > .explanation:not(.flow-meta) {
  margin: 0 var(--panel-inset);
  padding: 8px 0 12px;
  border-top: 1px solid var(--line);
}
.explanation,
.small-note,
.source-method {
  font-size: 13px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.explanation summary,
.source-method summary {
  padding: 10px 0;
  min-height: 40px;
}
.explanation[open] summary {
  color: var(--ink);
}
.explanation p + p {
  margin-top: 8px;
}
.outcome-grid {
  padding: 20px var(--panel-inset);
  gap: 16px;
}
.outcome-grid > div {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--soft);
  gap: 10px;
}
.outcome-grid > div > span {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
  min-height: 2.9em;
}
.outcome-grid strong {
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: -0.6px;
  font-variant-numeric: tabular-nums;
}
.outcome-grid small {
  line-height: 1.6;
}
.kpis {
  gap: 16px;
}
.kpi,
.overview-counts .kpi,
.cost-kpis .kpi {
  padding: 20px;
}
.kpi-label {
  font-size: 13px;
  line-height: 1.4;
  min-height: 2.8em;
  align-items: flex-start;
}
.kpi-label svg {
  margin-top: 2px;
}
.kpi-value {
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: -0.8px;
}
.kpi-context {
  row-gap: 6px;
}
.kpi-note {
  line-height: 1.6;
}
.delta {
  font-size: 12px;
  padding: 3px 6px;
}
.badge {
  line-height: 1.4;
  white-space: normal;
}
.chart-tabs {
  padding-inline: var(--panel-inset);
  gap: 6px;
}
.chart-wrap {
  margin-inline: 16px;
}
.chart-note {
  padding: 8px var(--panel-inset) 20px;
}
.funnel-compact {
  padding: 24px var(--panel-inset) 12px;
}
.funnel-row-head {
  font-size: 13px;
  gap: 12px;
}
.funnel-row-head strong {
  font-size: 20px;
}
.coverage-note {
  margin-inline: var(--panel-inset);
}
.cohort-metrics,
.cohort-bars,
.cohort-panel > .chart-legend,
.studio-bars,
.panel > .chart-legend,
.refresh-cadence {
  padding-inline: var(--panel-inset);
}
.cohort-window {
  padding: 0 var(--panel-inset) 22px;
}
.chart-legend {
  flex-wrap: wrap;
  gap: 8px 16px;
}
.network-grid {
  margin: 20px var(--panel-inset) var(--panel-inset);
}
.network-stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.network-stats > div {
  min-width: 0;
}
.network-stats strong {
  font-size: 16px;
}
.network-stats small {
  min-height: 3em;
}
.network-headline {
  flex-wrap: wrap;
}
.network-card > div:first-child {
  flex-wrap: wrap;
}
.table-toolbar {
  padding: 14px var(--panel-inset);
  gap: 8px;
}
.table-toolbar select,
.creative-order select {
  min-height: 40px;
}
.table-toolbar > label:not(.search) {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.search input {
  min-width: 0;
  min-height: 40px;
  font-size: 13px;
}
.table-scroll {
  max-width: 100%;
  isolation: isolate;
  overscroll-behavior-x: contain;
  scrollbar-color: var(--muted) var(--soft);
}
table {
  font-size: 13px;
  line-height: 1.5;
}
th {
  font-size: 12px;
  font-weight: 550;
  padding-block: 15px;
}
td {
  padding-block: 18px;
  vertical-align: middle;
}
th:first-child,
td:first-child {
  padding-left: var(--panel-inset);
}
th:last-child,
td:last-child {
  padding-right: var(--panel-inset);
}
.table-scroll[data-overflow="true"]:not(.creative-comparison-scroll)
  th:first-child,
.table-scroll[data-overflow="true"]:not(.creative-comparison-scroll)
  td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--surface);
  border-right: 1px solid var(--line);
}
.table-scroll[data-overflow="true"]:not(.creative-comparison-scroll)
  thead
  th:first-child {
  background: var(--soft);
}
.table-scroll:focus-visible {
  outline-offset: -3px;
}
.table-footer {
  flex-wrap: wrap;
  font-size: 12px;
  padding-inline: var(--panel-inset);
}
.campaign-name {
  font-size: 13px;
  overflow-wrap: anywhere;
}
.campaign-sub {
  line-height: 1.5;
}
.creative-comparison-tools {
  padding-inline: var(--panel-inset);
}
.creative-comparison-table thead button {
  min-height: 32px;
  font-size: 12px;
}
.creative-comparison-table thead small {
  font-size: 12px;
}
.creative-comparison-table .creative-identity,
.creative-comparison-table .creative-identity-heading {
  min-width: 270px;
  width: 270px;
}
.creative-comparison-table td {
  font-size: 14px;
  padding: 18px 16px;
}
.creative-row-title {
  font-size: 13px;
}
.creative-row-campaign,
.creative-row-group,
.creative-identity .badge {
  font-size: 12px;
}
.creative-comparison-table .creative-sorted {
  background: color-mix(in srgb, var(--accent-soft) 45%, var(--surface));
}
.creative-order {
  flex-wrap: wrap;
}
.creative-copy {
  padding: 20px;
}
.creative-copy h3 {
  overflow-wrap: anywhere;
}
.creative-metrics {
  gap: 20px 12px;
}
.creative-comparison-cards {
  padding-inline: var(--panel-inset);
}
.advice-card {
  padding: 22px;
}
.advice-card > div {
  min-width: 0;
}
.advice-card h3,
.recommendation-list .advice-card h3 {
  font-size: 14px;
  overflow-wrap: anywhere;
}
.advice-card p,
.recommendation-list .advice-card p {
  font-size: 13px;
  line-height: 1.7;
}
.advice-card .badge {
  margin-bottom: 8px;
}
.source-card {
  padding: 20px;
}
.source-head {
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 10px;
}
.source-head h3,
.quality-row h3,
.definition h3 {
  font-size: 14px;
}
.source-card > p,
.quality-row p,
.definition p {
  font-size: 13px;
}
.quality-list {
  padding-inline: var(--panel-inset);
}
.definitions {
  padding-inline: var(--panel-inset);
}
.definition code,
.target-grid dd,
.detail-text {
  overflow-wrap: anywhere;
}
.journey {
  align-items: stretch;
  padding: var(--panel-inset);
}
.journey > svg {
  align-self: center;
}
.journey-step {
  min-width: 0;
}
.journey-step > span {
  font-size: 13px;
}
.journey-gap {
  margin-inline: var(--panel-inset);
  justify-content: flex-start;
}
.journey-gap .text-button {
  margin-left: auto;
}
.flow-meta {
  padding-inline: var(--panel-inset);
}
.lead-table td {
  font-size: 13px;
}
.site-filters {
  padding: var(--panel-inset);
}
.site-filters label {
  font-size: 13px;
}
.site-filters select {
  min-height: 42px;
  font-size: 13px;
}
.site-method,
.site-daily {
  padding: var(--panel-inset);
}
.site-method .definitions {
  padding-inline: 0;
}
.dialog-head {
  z-index: 3;
  padding: 20px var(--panel-inset);
}
.dialog-head h2 {
  line-height: 1.4;
}
.dialog-head .icon-button {
  width: 44px;
  height: 44px;
}
#detail-body {
  padding: var(--panel-inset);
}
.detail-kpis > div {
  min-width: 0;
  padding: 18px;
}
.detail-kpis small {
  font-size: 13px;
  line-height: 1.45;
  min-height: 2.9em;
}
.detail-kpis strong {
  font-variant-numeric: tabular-nums;
}
.detail-text {
  font-size: 14px;
  line-height: 1.8;
}
.entity-section .panel-head {
  padding: 0 0 16px;
}
.target-grid {
  gap: 16px;
}
.target-grid dt,
.entity-meta dt {
  font-size: 13px;
}
.target-grid dd,
.entity-meta dd {
  font-size: 14px;
}
.target-group summary {
  overflow-wrap: anywhere;
}
@media (max-width: 1100px) {
  .outcome-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .executive-grid {
    grid-template-columns: 1fr;
  }
  .funnel-compact {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 740px) {
  :root {
    --panel-inset: 18px;
  }
  main {
    padding: 16px 14px 0;
  }
  .topbar {
    height: 60px;
  }
  .topbar .button,
  .menu-toggle,
  .menu-close,
  .sidebar-account .icon-button {
    width: 44px;
    min-height: 44px;
  }
  .sidebar nav a {
    min-height: 48px;
    font-size: 14px;
  }
  .ecosystem a {
    min-height: 32px;
  }
  .market-picker {
    padding: 4px;
  }
  .market-picker button {
    min-height: 40px;
    font-size: 13px;
  }
  .filters {
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
  }
  .period-presets {
    flex: 1 1 100%;
  }
  .period-presets button {
    flex: 1;
    min-height: 38px;
    font-size: 13px;
  }
  .period-unit {
    display: inline;
  }
  .date-filter {
    flex: 1 1 100%;
  }
  .date-filter > summary {
    min-height: 44px;
    font-size: 13px;
    padding-inline: 12px;
    justify-content: flex-start;
    gap: 8px;
  }
  .date-filter > summary > svg:first-child {
    display: block;
  }
  .date-filter > summary > svg:last-child {
    margin-left: auto;
  }
  .date-popover {
    width: min(362px, calc(100vw - 28px));
    padding: 12px;
  }
  .date-popover .date-range {
    flex-wrap: wrap;
  }
  .date-range input {
    font-size: 16px;
    min-height: 44px;
  }
  .date-range .icon-button {
    width: 40px;
    min-height: 44px;
  }
  .kpis {
    gap: 12px;
  }
  .kpi,
  .overview-counts .kpi,
  .cost-kpis .kpi,
  .site-kpis .kpi {
    padding: 16px;
  }
  .kpi-label {
    font-size: 13px;
  }
  .kpi-value,
  .overview-counts .kpi-value,
  .cost-kpis .kpi-value,
  .site-kpis .kpi-value {
    font-size: clamp(22px, 6.2vw, 28px);
    margin: 10px 0;
  }
  .kpi-note,
  .overview-counts .kpi-note,
  .cost-kpis .kpi-note,
  .kpi-context,
  .delta {
    font-size: 12px;
  }
  .kpi-context > span:last-child:not(.delta):not(.muted),
  .cost-kpis .kpi-context > span:last-child {
    display: inline;
  }
  .lead-split {
    gap: 6px 10px;
    font-size: 12px;
  }
  .section-title {
    align-items: flex-start;
  }
  .section-title h2,
  .cost-heading h2 {
    font-size: 16px;
  }
  .section-title .badge {
    font-size: 12px;
    flex-shrink: 0;
  }
  .panel-head {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 8px;
  }
  .panel-head h2 {
    font-size: 16px;
  }
  .panel-head > div:first-child {
    flex: 1;
  }
  .panel-head .text-button {
    font-size: 12px;
    min-height: 32px;
  }
  .chart-tabs {
    gap: 6px;
  }
  .chart-tabs button {
    min-height: 40px;
    font-size: 12px;
  }
  .chart-wrap {
    height: 250px;
    margin-inline: 8px;
  }
  .outcome-grid {
    padding-block: 18px;
    gap: 12px;
  }
  .outcome-grid > div {
    padding: 14px;
  }
  .outcome-grid strong {
    font-size: 28px;
  }
  .outcome-grid small {
    font-size: 12px;
  }
  .cohort-metrics {
    gap: 16px;
  }
  .cohort-metrics strong {
    font-size: 28px;
  }
  .network-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
  .network-stats strong {
    font-size: 16px;
  }
  .studio-bars > div {
    grid-template-columns: 115px minmax(0, 1fr) 26px;
    font-size: 12px;
  }
  .table-toolbar {
    padding: 12px var(--panel-inset);
  }
  .search input,
  .table-toolbar select,
  .creative-order select,
  .site-filters select {
    font-size: 16px;
    min-height: 44px;
  }
  .table-toolbar select {
    width: auto;
    flex: 1 1 140px;
    min-width: 0;
    max-width: 100%;
  }
  .table-toolbar > label:not(.search) {
    max-width: 100%;
    gap: 8px;
  }
  .table-scroll[data-overflow="true"]:not(.creative-comparison-scroll)
    :is(th, td):first-child {
    min-width: 136px;
    max-width: 160px;
    white-space: normal;
    overflow-wrap: anywhere;
    padding-inline: 14px;
  }
  .campaign-name {
    font-size: 13px;
  }
  td,
  th {
    padding-inline: 14px;
  }
  .creative-comparison-tools {
    gap: 12px;
    padding-bottom: 18px;
  }
  .creative-order select {
    flex: 1;
    max-width: calc(100% - 52px);
  }
  .creative-order .icon-button {
    width: 44px;
    height: 44px;
  }
  .creative-switch button {
    min-height: 40px;
    font-size: 12px;
  }
  .creative-groups button {
    flex: 1;
  }
  .creative-comparison-table .creative-identity,
  .creative-comparison-table .creative-identity-heading {
    width: 148px;
    min-width: 148px;
    max-width: 148px;
    padding: 14px;
  }
  .creative-comparison-table td {
    font-size: 14px;
    min-width: 116px;
  }
  .creative-comparison-table thead small {
    white-space: normal;
  }
  .creative-thumb {
    width: 64px;
    height: 76px;
  }
  .creative-row-title {
    font-size: 13px;
  }
  .creative-row-campaign,
  .creative-identity .badge {
    font-size: 12px;
  }
  .creative-copy {
    padding: 18px;
  }
  .creative-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .advice-card,
  .recommendation-list .advice-card {
    padding: 18px;
  }
  .advice-card .text-button {
    min-height: 44px;
  }
  .source-card {
    padding: 18px;
  }
  .source-head h3 {
    font-size: 14px;
  }
  .journey-step {
    padding: 16px;
    gap: 8px 12px;
  }
  .journey-step > span {
    font-size: 13px;
  }
  .journey-step p {
    font-size: 12px;
    margin-top: 0;
  }
  .journey-gap {
    flex-wrap: wrap;
    gap: 8px;
  }
  .journey-gap > span {
    flex: 1;
    min-width: 140px;
  }
  .journey-gap .text-button {
    margin-left: 0;
  }
  .site-filters {
    padding: 18px;
    gap: 14px;
  }
  .site-filters label {
    font-size: 13px;
    gap: 6px;
  }
  .site-quality-strip {
    padding: 16px;
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .site-quality-strip > div {
    display: flex;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
  }
  .site-quality-strip > div:last-child {
    border: 0;
    padding-bottom: 0;
  }
  .site-quality-strip span {
    font-size: 13px;
    margin-right: auto;
  }
  .site-quality-strip .delta {
    margin-right: 0;
  }
  .detail-kpis {
    gap: 12px;
  }
  .detail-kpis > div {
    padding: 14px;
  }
  .detail-kpis small {
    font-size: 13px;
  }
  .detail-kpis strong {
    font-size: 23px;
  }
  .detail-kpis .muted {
    font-size: 12px;
  }
  .dialog-head {
    padding: 12px 18px;
    padding-top: max(12px, env(safe-area-inset-top));
  }
  #detail-body {
    padding-bottom: max(24px, env(safe-area-inset-bottom));
  }
  .refresh-cadence {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .toast {
    font-size: 13px;
    line-height: 1.5;
    bottom: max(20px, env(safe-area-inset-bottom));
  }
}
@media (max-width: 359px) {
  :root {
    --panel-inset: 16px;
  }
  main {
    padding-inline: 10px;
  }
  .outcome-grid {
    grid-template-columns: 1fr;
  }
  .outcome-grid > div > span {
    min-height: 0;
  }
  .kpi,
  .overview-counts .kpi,
  .cost-kpis .kpi,
  .site-kpis .kpi {
    padding: 12px;
  }
  .kpi-value,
  .overview-counts .kpi-value,
  .cost-kpis .kpi-value,
  .site-kpis .kpi-value {
    font-size: 22px;
  }
}
/* Align values even when neighbouring evidence labels wrap differently. */
@supports (grid-template-rows: subgrid) {
  .outcome-grid > div {
    display: grid;
    grid-template-rows: subgrid;
    grid-row: span 3;
  }
  .outcome-grid > div > span {
    min-height: 0;
  }
}
@media (min-width: 360px) and (max-width: 740px) {
  .period-presets {
    flex: 0 0 auto;
  }
  .period-presets button {
    min-width: 36px;
    padding: 8px;
  }
  .period-unit {
    display: none;
  }
  .date-filter {
    flex: 1;
    min-width: 0;
  }
  .date-filter > summary {
    padding-inline: 10px;
    font-size: 12px;
    gap: 5px;
  }
  .date-filter > summary > svg:first-child {
    display: none;
  }
}
/* Keep the account label intact with both production account actions. */
.sidebar-account {
  gap: 7px;
}
.sidebar-account .account-avatar {
  width: 28px;
  height: 28px;
}
.sidebar-account small {
  white-space: nowrap;
}

/* Whole rows/cards share their title action without extra calls to action. */
.detail-target {
  cursor: pointer;
}
.detail-target:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
@media (hover: hover) {
  tr.detail-target:hover > :is(td, th) {
    background: var(--soft);
  }
  article.detail-target:hover {
    border-color: var(--accent);
  }
}
.attribution-note {
  margin-bottom: 8px;
}
.attribution-note + .small-note {
  margin-top: 0;
}

.chart-wrap.site-history-chart {
  height: 150px;
}
.period-presets {
  flex-wrap: wrap;
}
.site-filters label {
  min-width: 160px;
}

/* Keep the website trend close to the selected period and its totals. */
@media (min-width: 1000px) {
  .site-kpis {
    grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  }
  .site-kpis .kpi {
    padding: 16px;
  }
  .site-kpis .kpi-context > span:last-child {
    display: none;
  }
}
@media (max-width: 740px) {
  .site-filters label {
    flex: 1 1 calc(50% - 10px);
    min-width: 0;
  }
  .period-presets:has([data-site-preset]:not([hidden])) {
    flex: 1 1 100%;
  }
}
@media (max-width: 740px) {
  .period-presets:has([data-site-preset]:not([hidden])) {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
  }
  .period-presets [data-site-preset]:not([hidden]) {
    grid-column: span 2;
  }
}

/* Controls occupy explicit rows instead of wrapping one small group at a time. */
.page-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}
.page-controls .page-heading,
.page-controls .filters { margin-bottom: 0; }
.page-controls .filters { min-width: 0; }
@media (max-width: 740px) {
  .page-controls { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
}
.creative-comparison-panel {
  container-type: inline-size;
}
.creative-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "search view" "filters filters" "groups groups";
  gap: 8px;
  padding: 12px var(--panel-inset);
  align-items: stretch;
}
.creative-controls > .search { grid-area: search; }
.creative-controls .search input { min-height: 44px; font-size: 16px; }
.creative-view { grid-area: view; }
.creative-view button { width: 44px; }
.creative-view button span { display: none; }
.creative-controls .creative-switch button { min-height: 44px; }
.creative-controls .creative-groups { grid-area: groups; }
.creative-controls .creative-groups button { flex: 1; }
.creative-filter-row {
  grid-area: filters;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 8px;
}
.creative-filter-row select {
  width: 100%;
  min-width: 0;
  max-width: none;
  min-height: 44px;
  padding: 8px;
  font-size: 16px;
}
.creative-filter-row .creative-order {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 2px;
  min-width: 0;
}
.creative-filter-row .icon-button { width: 44px; height: 44px; }
@container (min-width: 620px) {
  .creative-controls {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "search filters" "groups view";
  }
  .creative-view button { flex: 1; width: auto; }
  .creative-view button span { display: inline; }
}
@container (min-width: 1020px) {
  .creative-controls {
    grid-template-columns: minmax(180px, 1fr) minmax(300px, 1.2fr) auto auto;
    grid-template-areas: "search filters groups view";
  }
  .creative-view button { width: 44px; flex: none; }
  .creative-view button span { display: none; }
}
.campaign-toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(140px, .4fr) minmax(140px, .4fr);
}
.campaign-toolbar select { width: 100%; max-width: none; }
.outcome-toolbar > label:not(.search) { flex-wrap: nowrap; }
.site-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.site-filters:has(> label:nth-child(2):last-child) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.site-filters label { min-width: 0; justify-content: space-between; }
.funnel-journey {
  grid-template-columns: minmax(0, 1fr) 20px minmax(0, 1fr) 20px minmax(0, 1fr);
}
.funnel-journey > svg:nth-child(4) { display: block; }
.funnel-journey > svg { grid-column: auto; }
.funnel-method { padding-bottom: 18px; }
.funnel-site-context {
  display: grid;
  grid-template-columns: minmax(160px, .4fr) minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  margin: 0 var(--panel-inset) var(--panel-inset);
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--soft);
}
.funnel-site-context > div { display: grid; gap: 4px; }
.funnel-site-context span { font-size: 13px; }
.funnel-site-context strong { font-size: 24px; font-variant-numeric: tabular-nums; }
.funnel-site-context small,
.funnel-site-context p { color: var(--muted); font-size: 12px; line-height: 1.6; margin: 0; }
.funnel-sources { margin-bottom: 24px; }
.funnel-sources-heading h2 { font-size: 16px; margin: 0 0 6px; }
.funnel-sources-heading p { font-size: 13px; color: var(--muted); line-height: 1.6; margin: 0 0 14px; }
.funnel-sources .kpis { margin-bottom: 10px; }
.funnel-sources .kpi { padding: 18px; }
.funnel-sources .kpi-value { font-size: 30px; margin-top: 12px; }
.funnel-sources .kpi-note { font-size: 12px; line-height: 1.5; }
.funnel-source-help { font-size: 13px; }
.funnel-source-help summary { min-height: 44px; align-content: center; }
@media (max-width: 1100px) {
  .site-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 740px) {
  .campaign-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .campaign-toolbar .search { grid-column: 1 / -1; }
  .outcome-toolbar > label:not(.search) { width: 100%; }
  .outcome-toolbar select { flex: 1; }
  .funnel-journey { grid-template-columns: minmax(0, 1fr); }
  .funnel-site-context { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .funnel-site-context > div { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .funnel-site-context strong { grid-column: 2; grid-row: 1 / 3; }
  .funnel-sources .kpi { padding: 14px; }
}
@media (max-width: 359px) {
  .creative-controls { padding-inline: 10px; gap: 6px; }
  .creative-controls .search { padding-inline: 8px; }
  .creative-controls .search input { font-size: 16px; }
  .creative-filter-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .site-filters { grid-template-columns: minmax(0, 1fr); }
}

/* The comparison table is a scan of metrics; the full creative opens on tap. */
.creative-comparison-table .creative-identity,
.creative-comparison-table .creative-identity-heading {
  width: 250px;
  min-width: 250px;
  max-width: 250px;
  padding: 9px 12px;
}
.creative-comparison-table tbody td { padding-block: 9px; }
.creative-comparison-table thead th { padding-block: 8px; }
.creative-comparison-table thead small { font-size: 11px; line-height: 1.4; white-space: nowrap; }
.creative-identity-content {
  grid-template-columns: 36px minmax(0, 1fr) 8px;
  gap: 8px;
  min-height: 44px;
  align-items: center;
}
.creative-thumb { width: 36px; height: 44px; border-radius: 5px; }
.creative-row-copy { min-width: 0; }
.creative-row-title,
.creative-row-campaign {
  display: block;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow-wrap: normal;
}
.creative-row-title { font-size: 13px; line-height: 1.5; }
.creative-row-campaign { font-size: 11px; line-height: 1.5; margin-top: 2px; }
.creative-row-state .badge {
  display: block;
  width: 7px;
  height: 7px;
  min-width: 0;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 50%;
  overflow: hidden;
  font-size: 0;
  background: var(--muted);
}
.creative-row-state .badge.good { background: var(--good); }
@media (max-width: 740px) {
  .creative-comparison-table .creative-identity,
  .creative-comparison-table .creative-identity-heading {
    width: 164px;
    min-width: 164px;
    max-width: 164px;
    padding-inline: 10px;
  }
  .creative-identity-content { grid-template-columns: 30px minmax(0, 1fr) 7px; gap: 6px; }
  .creative-thumb { width: 30px; height: 40px; }
  .creative-row-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .creative-row-campaign,
  .creative-campaign-heading { display: none; }
  .creative-comparison-table td { min-width: 108px; }
}

/* Three acquisition costs, each with an explicit result denominator. */
.cost-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 740px) {
  .cost-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cost-kpis > :last-child { grid-column: 1 / -1; }
}
