:root {
  color-scheme: light;
  --bg: #f6f7f8;
  --ink: #111827;
  --muted: #697586;
  --line: #e2e6ea;
  --panel: #ffffff;
  --soft: #f8fafc;
  --accent: #0b6f6a;
  --accent-soft: #e8f5f3;
  --gold: #a16207;
  --danger: #b42318;
  --danger-soft: #fff4f2;
  --good: #047857;
  --good-soft: #edfdf5;
  --warn: #b45309;
  --warn-soft: #fff8ec;
  --blue: #2563eb;
  --blue-soft: #eff6ff;
  --shadow: 0 1px 2px rgba(17, 24, 39, 0.04), 0 10px 30px rgba(17, 24, 39, 0.05);
  --topbar-height: 132px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: clip;
  background:
    linear-gradient(180deg, #ffffff 0, var(--bg) 260px),
    var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

h1, h2, h3, p {
  margin: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
}

.topbar-main {
  max-width: 1680px;
  margin: 0 auto;
  padding: 16px 24px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.brand {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  align-items: center;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: white;
  background: #111827;
  font-weight: 800;
}

h1 {
  font-size: 19px;
  line-height: 1.2;
}

.brand p,
.page-heading p,
.panel-note {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

.dot {
  display: inline-block;
  width: 4px;
  height: 4px;
  margin: 0 8px 2px;
  border-radius: 50%;
  background: #aab4bf;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.tab,
.ghost-button {
  height: 38px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

.tab {
  padding: 0 14px;
}

.tab.active,
.tab:hover,
.ghost-button:hover {
  background: white;
  border-color: var(--line);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.06);
}

.filterbar {
  max-width: 1680px;
  margin: 0 auto;
  padding: 0 24px 12px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 170px));
  gap: 8px;
  align-items: end;
  justify-content: start;
}

.filterbar.lifecycle-fixed-snapshot > :not(.period-hint) {
  display: none;
}

.period-hint {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

.period-hint.has-pending {
  padding: 8px 10px;
  border: 1px solid rgba(11, 111, 106, 0.22);
  border-radius: 8px;
  background: #eefbf8;
  color: #31524f;
}

.pending-period {
  color: var(--accent);
  font-weight: 800;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

label small {
  color: #8a96a3;
  font-size: 11px;
  font-weight: 500;
}

select,
input[type="date"] {
  width: 100%;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
}

.apply-time-button {
  height: 34px;
  border: 1px solid #0b6f6a;
  border-radius: 8px;
  padding: 0 16px;
  align-self: end;
  background: var(--accent);
  color: white;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.apply-time-button.has-pending {
  border-color: #0f766e;
  background: #0f766e;
  box-shadow: 0 0 0 3px rgba(11, 111, 106, 0.18);
}

.apply-time-button:hover {
  background: #075e59;
}

.multi-select {
  position: relative;
  min-width: 0;
}

.creative-content-toolbar {
  margin: 12px 0 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
}

.creative-content-toolbar-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.creative-content-toolbar-heading > div {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.creative-content-toolbar-heading strong {
  color: var(--ink);
  font-size: 13px;
}

.creative-content-toolbar-heading span {
  color: var(--muted);
  font-size: 11px;
}

.creative-content-filter-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.creative-content-filter-grid label,
.creative-content-filter-grid .multi-select {
  min-width: 0;
}

.creative-content-filter-grid .multi-select {
  display: block;
}

.creative-content-filter-grid select {
  width: 100%;
  height: 34px;
}

.creative-content-filter-empty {
  margin: 8px;
  color: var(--muted);
  font-size: 12px;
}

.creative-content-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 12px;
}

.creative-content-summary > div {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.creative-content-summary strong {
  display: block;
  margin-top: 3px;
  font-size: 18px;
}

.creative-selling-point-panel > header {
  align-items: center;
  gap: 10px;
}

.creative-selling-point-audit {
  flex: 0 0 auto;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.creative-selling-point-panel .table-wrap {
  overflow-x: hidden;
  overflow-y: auto;
  max-height: 520px;
}

.creative-selling-point-guide,
.creative-selling-point-material-detail {
  margin: 0 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
}

.creative-selling-point-guide > summary,
.creative-selling-point-material-detail > summary {
  padding: 9px 12px;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.creative-selling-point-principles {
  display: grid;
  gap: 4px;
  padding: 0 12px 10px;
  color: #475569;
  font-size: 11px;
  line-height: 1.55;
}

.creative-selling-point-definitions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0 12px 12px;
}

.creative-selling-point-definitions section {
  min-width: 0;
}

.creative-selling-point-definitions h4 {
  margin: 0 0 5px;
  color: #0f766e;
  font-size: 11px;
}

.creative-selling-point-definition-list {
  display: grid;
  gap: 5px;
}

.creative-selling-point-definition-list > div {
  display: grid;
  grid-template-columns: minmax(84px, 22%) minmax(0, 1fr);
  gap: 2px 8px;
  padding-bottom: 5px;
  border-bottom: 1px solid #e2e8f0;
}

.creative-selling-point-definition-list strong {
  grid-row: 1 / span 2;
  color: #334155;
  font-size: 11px;
}

.creative-selling-point-definition-list p,
.creative-selling-point-definition-list small {
  margin: 0;
  font-size: 10px;
  line-height: 1.45;
}

.creative-selling-point-definition-list p {
  color: #475569;
}

.creative-selling-point-definition-list small {
  color: #64748b;
}

.creative-selling-point-material-list {
  display: grid;
  max-height: 560px;
  overflow-y: auto;
  border-top: 1px solid var(--line);
}

.creative-selling-point-material {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.creative-selling-point-material:hover,
.creative-selling-point-material:focus-visible {
  background: #f0fdfa;
}

.creative-selling-point-material > img,
.creative-selling-point-material > .creative-selling-point-placeholder {
  width: 76px;
  height: 76px;
  object-fit: contain;
  border: 1px solid #dbe3ea;
  border-radius: 5px;
  background: #f1f5f9;
}

.creative-selling-point-material > .creative-selling-point-placeholder {
  line-height: 76px;
}

.creative-selling-point-material-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.creative-selling-point-material-copy > span:first-child {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.creative-selling-point-material-copy strong {
  color: #0f172a;
  font-size: 12px;
}

.creative-selling-point-material-copy em {
  padding: 2px 5px;
  border: 1px solid #99f6e4;
  border-radius: 4px;
  background: #f0fdfa;
  color: #0f766e;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
}

.creative-selling-point-material-copy small,
.creative-selling-point-material-copy p,
.creative-selling-point-material-meta {
  margin: 0;
  font-size: 10px;
  line-height: 1.45;
}

.creative-selling-point-material-copy small {
  color: #0f766e;
  font-weight: 700;
}

.creative-selling-point-material-copy p {
  color: #475569;
}

.creative-selling-point-material-meta {
  color: #64748b;
}

#creativeSellingPointTable {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

#creativeSellingPointTable th,
#creativeSellingPointTable td {
  box-sizing: border-box;
  padding-inline: 8px;
  vertical-align: middle;
  white-space: normal;
  overflow-wrap: anywhere;
}

#creativeSellingPointTable th:first-child,
#creativeSellingPointTable td:first-child {
  width: 17%;
}

.creative-selling-point-link {
  display: grid;
  width: 100%;
  gap: 2px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #0f766e;
  text-align: left;
  cursor: pointer;
}

.creative-selling-point-link:hover strong,
.creative-selling-point-link:focus-visible strong,
.creative-selling-point-link:hover,
.creative-selling-point-link:focus-visible {
  color: #075e59;
  text-decoration: underline;
}

.creative-selling-point-link strong,
.creative-selling-point-summary strong {
  color: inherit;
  font-size: 12px;
  line-height: 1.3;
}

.creative-selling-point-link small,
.creative-selling-point-summary small {
  color: #64748b;
  font-size: 10px;
  line-height: 1.3;
}

.creative-selling-point-summary,
.creative-selling-point-decision {
  display: grid;
  gap: 2px;
}

.creative-selling-point-decision strong {
  color: #334155;
  font-size: 11px;
}

.creative-selling-point-decision small {
  color: #64748b;
  font-size: 10px;
  line-height: 1.35;
}

.creative-selling-point-decision.conversion strong,
.creative-selling-point-decision.potential strong {
  color: #0f766e;
}

.creative-selling-point-decision.weak strong,
.creative-selling-point-decision.fatigue strong {
  color: #b45309;
}

.creative-selling-point-example {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.creative-selling-point-example img,
.creative-selling-point-placeholder {
  display: block;
  width: 48px;
  height: 48px;
  border: 1px solid #dbe3ea;
  border-radius: 5px;
  background: #f1f5f9;
  object-fit: contain;
}

.creative-selling-point-placeholder {
  color: #94a3b8;
  font-size: 10px;
  line-height: 48px;
  text-align: center;
}

.creative-selling-point-example span:last-child {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.creative-selling-point-example strong,
.creative-selling-point-example small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.creative-selling-point-example strong {
  color: #334155;
  font-size: 10px;
}

.creative-selling-point-example small {
  color: #64748b;
  font-size: 9px;
}

@media (max-width: 760px) {
  .creative-content-toolbar-heading,
  .creative-content-toolbar-heading > div {
    align-items: flex-start;
  }

  .creative-content-toolbar-heading > div {
    flex-direction: column;
    gap: 2px;
  }

  .creative-content-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .creative-content-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .creative-selling-point-panel > header {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .creative-selling-point-audit {
    width: 100%;
    white-space: normal;
  }

  .creative-selling-point-panel .table-wrap {
    max-height: none;
  }

  .creative-selling-point-definitions {
    grid-template-columns: 1fr;
  }

  .creative-selling-point-definition-list > div {
    grid-template-columns: minmax(80px, 30%) minmax(0, 1fr);
  }

  .creative-selling-point-material {
    grid-template-columns: 64px minmax(0, 1fr);
    padding: 8px;
  }

  .creative-selling-point-material > img,
  .creative-selling-point-material > .creative-selling-point-placeholder {
    width: 64px;
    height: 64px;
  }

  .creative-selling-point-material > .creative-selling-point-placeholder {
    line-height: 64px;
  }

  #creativeSellingPointTable,
  #creativeSellingPointTable tbody {
    display: block;
    width: 100%;
  }

  #creativeSellingPointTable thead {
    display: none;
  }

  #creativeSellingPointTable tbody > tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 8px 0;
    border: 1px solid var(--line);
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
  }

  #creativeSellingPointTable tbody > tr > td {
    display: grid;
    grid-template-columns: minmax(68px, 38%) minmax(0, 1fr);
    align-items: start;
    gap: 6px;
    width: 100% !important;
    min-width: 0;
    padding: 7px 8px;
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  #creativeSellingPointTable tbody > tr > td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
  }

  #creativeSellingPointTable tbody > tr > td:first-child,
  #creativeSellingPointTable tbody > tr > td:nth-child(2) {
    grid-column: 1 / -1;
  }

  #creativeSellingPointTable tbody > tr > td:first-child {
    display: block;
  }

  #creativeSellingPointTable tbody > tr > td:first-child::before {
    display: none;
  }

  #creativeSellingPointTable .creative-selling-point-example {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  #creativeSellingPointTable .creative-selling-point-example img,
  #creativeSellingPointTable .creative-selling-point-placeholder {
    width: 64px;
    height: 64px;
  }

  #creativeSellingPointTable .creative-selling-point-placeholder {
    line-height: 64px;
  }
}

@media (min-width: 761px) and (max-width: 1180px) {
  .creative-content-filter-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.channel-scope-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.segmented-control {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(72px, 1fr);
  width: max-content;
  min-height: 34px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f4f6f8;
}

.segmented-control button {
  height: 28px;
  border: 0;
  border-radius: 5px;
  padding: 0 10px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.segmented-control button[aria-pressed="true"] {
  background: white;
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(24, 33, 44, 0.12);
}

.channel-country-filters {
  min-width: 0;
  flex: 1 1 360px;
}

.channel-country-filters .multi-select {
  width: min(100%, 420px);
}

.filter-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.multi-trigger {
  width: 100%;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 32px 0 10px;
  background: white;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  position: relative;
}

.multi-trigger::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid #7b8794;
  border-bottom: 2px solid #7b8794;
  transform: translateY(-70%) rotate(45deg);
}

.multi-trigger.has-selection {
  border-color: #95d5cd;
  background: var(--accent-soft);
  color: #075e59;
  font-weight: 700;
}

.multi-panel {
  display: none;
  position: absolute;
  z-index: 40;
  top: calc(100% + 6px);
  left: 0;
  width: min(360px, 92vw);
  max-height: 360px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 18px 45px rgba(24, 33, 44, 0.16);
  overflow: hidden;
}

.multi-select.open .multi-panel {
  display: block;
}

.multi-actions {
  height: 38px;
  padding: 0 10px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #f8fafb;
  color: var(--muted);
  font-size: 12px;
}

.multi-actions button {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.multi-options {
  max-height: 320px;
  overflow: auto;
  padding: 6px;
}

.multi-search {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  background: white;
}

.multi-search input {
  width: 100%;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 9px;
  background: #fbfcfd;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
}

.multi-search input:focus {
  outline: 2px solid rgba(11, 111, 106, 0.18);
  border-color: #95d5cd;
}

.check-option {
  min-height: 32px;
  padding: 6px 8px;
  border-radius: 6px;
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.check-option:hover {
  background: #f1f5f7;
}

.check-option input {
  width: 14px;
  height: 14px;
  margin-top: 2px;
  accent-color: var(--accent);
}

.select-all-option {
  position: sticky;
  z-index: 2;
  top: -6px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: white;
  font-weight: 750;
}

.select-all-option:hover {
  background: #f1f5f7;
}

.filter-option-group + .filter-option-group {
  border-top: 1px solid var(--line);
}

.filter-option-group.hidden,
.filter-option-group.collapsed .filter-group-children {
  display: none;
}

.filter-group-header {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
}

.filter-group-toggle {
  width: 24px;
  height: 28px;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transform: rotate(90deg);
  transition: transform 120ms ease;
}

.filter-option-group.collapsed .filter-group-toggle {
  transform: rotate(0deg);
}

.filter-group-option {
  grid-template-columns: 16px minmax(0, 1fr) auto;
  font-weight: 750;
}

.filter-group-count {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.filter-group-only {
  min-width: 38px;
  height: 26px;
  border: 0;
  padding: 0 6px;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.filter-group-only:hover,
.filter-group-only:focus-visible {
  background: #eaf6f4;
  outline: none;
}

.filter-group-children {
  padding-left: 24px;
}

.select-all-option input:indeterminate {
  accent-color: var(--accent);
}

.check-option span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.ghost-button {
  border-color: var(--line);
  background: white;
  padding: 0 14px;
  width: 100%;
}

.app {
  width: 100%;
  max-width: 1680px;
  margin-inline: auto;
  padding: 20px 24px 32px;
  padding-inline: 24px;
  overflow-x: clip;
}

.context-filterbar {
  position: sticky;
  top: calc(var(--topbar-height) + 8px);
  z-index: 16;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(126px, 176px));
  gap: 8px;
  align-items: end;
  margin: -4px 0 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.06);
}

.context-filterbar .ghost-button {
  align-self: end;
}

.active-filter-note {
  align-self: end;
  min-height: 34px;
  padding: 8px 10px;
  border: 1px solid #d9e8ff;
  border-radius: 8px;
  background: var(--blue-soft);
  color: #1e3a8a;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
}

.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 16px;
}

h2 {
  font-size: 24px;
  letter-spacing: 0;
}

.period-badge {
  padding: 8px 12px;
  border-radius: 999px;
  background: #eef2f7;
  color: #3f4c5a;
  font-size: 13px;
  font-weight: 700;
}

.insight-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}

.insight-summary article,
.comparison-item,
.kpi,
.insight-card,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.insight-summary article {
  padding: 9px 12px;
}

.insight-summary span,
.comparison-item span,
.kpi span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.insight-summary strong {
  display: block;
  margin-top: 5px;
  font-size: 15px;
  line-height: 1.25;
}

.insight-summary strong small {
  margin-left: 6px;
  font-size: 13px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}

.kpi {
  min-height: 62px;
  padding: 8px 10px;
}

.kpi strong {
  display: block;
  margin-top: 5px;
  font-size: 18px;
  line-height: 1.05;
}

.kpi small {
  display: block;
  color: var(--muted);
  margin-top: 5px;
  font-size: 11px;
  font-weight: 800;
}

.kpi small.up {
  color: var(--good);
}

.kpi small.down {
  color: var(--danger);
}

.kpi small.flat {
  color: var(--muted);
}

.kpi em {
  display: none;
  color: var(--muted);
  margin-top: 6px;
  font-size: 12px;
  font-style: normal;
}

.comparison-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.comparison-strip:empty {
  display: none;
}

.comparison-item {
  min-height: 66px;
  padding: 10px 12px;
}

.comparison-item strong {
  display: block;
  margin-top: 5px;
  font-size: 16px;
}

.action-insights {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.insight-card {
  min-height: 82px;
  padding: 9px 11px;
  border-left: 3px solid var(--line);
}

.insight-card.positive {
  border-left-color: var(--good);
}

.insight-card.negative {
  border-left-color: var(--danger);
}

.insight-card.neutral {
  border-left-color: var(--blue);
}

.insight-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.insight-card strong {
  display: block;
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.25;
}

.insight-card p {
  margin-top: 6px;
  color: #4b5563;
  font-size: 12px;
  line-height: 1.45;
}

.comparison-item small {
  display: block;
  margin-top: 3px;
}

.up {
  color: var(--good);
}

.down {
  color: var(--danger);
}

.flat {
  color: var(--muted);
}

.view-shell {
  display: grid;
  min-width: 0;
  overflow-x: clip;
  gap: 12px;
}

.view-shell.has-render-error > :not(.page-error-state) {
  display: none !important;
}

body.has-page-render-error #insightSummary,
body.has-page-render-error #kpis,
body.has-page-render-error #comparison,
body.has-page-render-error #actionInsights {
  display: none !important;
}

.page-error-state {
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 1px solid #f5c2c7;
  border-left: 4px solid var(--danger);
  border-radius: 8px;
  background: #fff5f5;
  color: #7a271a;
}

.page-error-state strong {
  font-size: 14px;
}

.page-error-state span {
  overflow-wrap: anywhere;
  font-size: 12px;
  line-height: 1.5;
}

.creative-segment-module {
  display: grid;
  gap: 12px;
}

.page-structure-anchor {
  display: none;
}

.metric-info {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  cursor: help;
}

.metric-info:hover,
.metric-info:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
}

.table-conclusion {
  margin: 0 0 8px;
  padding: 7px 9px;
  border-left: 3px solid var(--accent);
  background: var(--surface-muted);
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.45;
}

.overview-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.split-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.landing-detail-stack {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.rank-grid,
.creative-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.operator-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  gap: 12px;
}

.onsite-top {
  display: grid;
  grid-template-columns: 1fr;
}

.panel {
  min-width: 0;
  overflow: hidden;
}

.panel header {
  min-height: 46px;
  padding: 10px 13px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

h3 {
  font-size: 15px;
  letter-spacing: 0;
}

.compact-select {
  width: 92px;
  flex: 0 0 92px;
}

.trend-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
  gap: 0;
  align-items: stretch;
}

.trend-body .chart {
  min-width: 0;
}

.chart-conclusion {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 14px;
  border-left: 1px solid var(--line);
  background: #fbfcfd;
}

.chart-conclusion strong {
  font-size: 13px;
}

.chart-conclusion p {
  color: #445160;
  font-size: 12.5px;
  line-height: 1.55;
}

.quick-filter-row {
  padding: 9px 13px;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.quick-filter-row span {
  margin-right: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.quick-filter-row button {
  max-width: 180px;
  height: 26px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 9px;
  background: white;
  color: #344054;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-filter-row button:hover {
  border-color: #95d5cd;
  background: var(--accent-soft);
  color: #075e59;
}

.chart {
  position: relative;
  height: 340px;
  padding: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-gutter: stable;
}

.chart.small {
  height: 330px;
}

.chart.onsite-chart {
  height: 420px;
}

.onsite-trend-body {
  grid-template-columns: minmax(0, 1fr) minmax(250px, 290px);
}

.onsite-conclusion {
  background: #f8fafc;
}

.bars {
  padding: 14px;
  display: grid;
  gap: 13px;
}

#countryBars,
#productBars {
  max-height: 282px;
  overflow: auto;
  scrollbar-gutter: stable;
  align-content: start;
}

.overview-product-rank-panel {
  grid-column: 1 / -1;
}

#productBars .bar-row {
  grid-template-columns: minmax(180px, 1.2fr) minmax(330px, 1fr);
  align-items: center;
  column-gap: 20px;
}

#productBars .bar-meta {
  min-width: 0;
}

#productBars .bar-sub {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#productBars .bar-track {
  grid-column: 1 / -1;
}

@media (max-width: 760px) {
  #productBars .bar-row {
    grid-template-columns: minmax(0, 1fr);
    column-gap: 0;
  }

  #productBars .bar-sub {
    grid-column: 1;
    grid-row: auto;
    overflow: visible;
    text-align: left;
    text-overflow: clip;
    white-space: normal;
  }

  #productBars .bar-track {
    grid-column: 1;
  }
}

.bar-row {
  display: grid;
  gap: 6px;
}

.bar-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
}

.bar-meta span,
.link-filter {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-filter {
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
}

.cell-filter-button {
  max-width: 100%;
  min-width: 0;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.link-filter:hover,
.cell-filter-button:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.bar-track {
  height: 7px;
  background: #edf1f5;
  border-radius: 999px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: inherit;
}

.bar-sub {
  color: var(--muted);
  font-size: 12px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.compact-compare-row {
  padding: 10px 13px;
}

.heatmap {
  padding: 13px;
  overflow: hidden;
}

.heatmap-grid {
  display: grid;
  grid-template-columns: minmax(70px, 0.95fr) repeat(var(--heatmap-cols), minmax(0, 1fr));
  gap: 5px;
  align-items: stretch;
}

.heatmap-row {
  display: contents;
}

.heatmap-head,
.heatmap-side,
.heatmap-cell {
  min-width: 0;
  border-radius: 7px;
  text-decoration: none;
}

.heatmap-head,
.heatmap-side {
  display: flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 7px;
  color: #334155;
  background: #f8fafc;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.heatmap-head {
  justify-content: center;
  text-align: center;
}

.heatmap-cell {
  display: grid;
  place-items: center;
  min-height: 42px;
  padding: 5px;
  text-align: center;
  box-shadow: inset 0 0 0 1px rgba(17, 24, 39, 0.04);
}

.heatmap-cell b {
  font-size: 11px;
  line-height: 1.1;
}

.heatmap-cell small {
  font-size: 10px;
  line-height: 1.1;
  opacity: 0.82;
}

.heatmap-head:hover,
.heatmap-side:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.quadrant-chart {
  height: 360px;
  padding: 12px;
  overflow: hidden;
}

.quadrant-chart svg {
  width: 100%;
  height: 100%;
}

.quadrant-point {
  fill: rgba(11, 111, 106, 0.24);
  stroke: var(--accent);
  stroke-width: 2;
  transition: fill 0.15s ease, stroke-width 0.15s ease;
}

.quadrant-point-link {
  color: #344054;
  cursor: pointer;
  text-decoration: none;
}

.quadrant-point-link:hover .quadrant-point {
  fill: rgba(37, 99, 235, 0.24);
  stroke-width: 3;
}

.quadrant-point-link text,
.axis-label,
.quadrant-label {
  fill: #475467;
  font-size: 12px;
  font-weight: 800;
  paint-order: stroke;
  stroke: #ffffff;
  stroke-width: 3px;
  stroke-linejoin: round;
}

.quadrant-label {
  fill: var(--muted);
  font-size: 11px;
}

.alerts,
.creative-list {
  padding: 12px;
  display: grid;
  gap: 8px;
}

.inline-alerts {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.overview-alert-panel .alerts {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.efficiency-chip {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.efficiency-chip.good {
  color: var(--good);
  background: var(--good-soft);
}

.efficiency-chip.warn {
  color: var(--warn);
  background: var(--warn-soft);
}

.efficiency-chip.bad {
  color: var(--danger);
  background: var(--danger-soft);
}

.compare-bars,
.stacked-bars {
  padding: 14px;
  display: grid;
  gap: 12px;
}

.compare-bar-row,
.stacked-bar-row {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.compare-bar-head,
.stacked-bar-head {
  min-width: 0;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.compare-bar-head strong,
.stacked-bar-head strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.stacked-bar-head span,
.compare-bar-row p,
.stacked-bar-row p {
  color: var(--muted);
  font-size: 12px;
}

.compare-line {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 48px;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  color: #475467;
}

.compare-track,
.stacked-track {
  height: 9px;
  border-radius: 999px;
  overflow: hidden;
  background: #edf1f5;
}

.compare-track i,
.stacked-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.spend-bar {
  background: #a16207;
}

.sales-bar {
  background: var(--accent);
}

.stacked-track {
  display: flex;
  height: 14px;
}

.stacked-track i {
  border-radius: 0;
}

.stacked-track i:first-child {
  border-top-left-radius: 999px;
  border-bottom-left-radius: 999px;
}

.stacked-track i:last-child {
  border-top-right-radius: 999px;
  border-bottom-right-radius: 999px;
}

.stacked-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.stacked-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.stacked-legend i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.alert-item {
  padding: 11px 12px;
  border-radius: 8px;
  background: white;
  border: 1px solid #f1d7b8;
  border-left: 3px solid var(--warn);
}

.alert-item.good-alert {
  background: white;
  border-color: #bdeed0;
  border-left-color: var(--good);
}

.alert-item strong {
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
}

.alert-item span,
.empty {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.creative-card {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: white;
}

.creative-card.good {
  border-color: #bdeed0;
  background: white;
}

.creative-card.bad {
  border-color: #f5c2bd;
  background: white;
}

.creative-card.warn {
  border-color: #f1d7b8;
  background: white;
}

.creative-card-head,
.creative-metrics {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.creative-card-head {
  align-items: flex-start;
}

.tag-row {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.creative-card p {
  margin: 9px 0;
  color: #2c3744;
  font-size: 13px;
  line-height: 1.38;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.creative-metrics {
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
}

.table-wrap {
  --dashboard-table-visible-rows: 10;
  width: 100%;
  overflow-x: hidden;
  overflow-x: clip;
  overflow-y: auto;
  height: var(--dashboard-table-viewport-height, auto);
  max-height: var(--dashboard-table-viewport-height, none);
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.table-copy-button {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--muted);
  font: 18px/1 sans-serif;
  cursor: pointer;
}

.table-copy-button:hover,
.table-copy-button:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
}

.table-copy-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.table-wrap.compact {
  max-height: var(--dashboard-table-viewport-height, none);
}

.tree-node {
  display: inline-flex;
  align-items: center;
  width: 100%;
  min-height: 32px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  overflow-wrap: anywhere;
}

.tree-node.depth-1 {
  padding-left: 20px;
  font-weight: 600;
}

.tree-node.depth-2 {
  padding-left: 40px;
  color: var(--muted);
}

.tree-chevron {
  width: 18px;
  flex: 0 0 18px;
}

.tree-leaf {
  display: inline-block;
}

.new-product-mark {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  margin-left: 7px;
  padding: 0 5px;
  border: 1px solid #b8d8cb;
  border-radius: 999px;
  background: #eef9f3;
  color: #277052;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

.is-highlighted-product td {
  background: #f4fbf7;
}

.tree-row-depth-1 td {
  background: #f8fafc;
}

.tree-row-depth-2 td {
  background: #fbfcfe;
}

.drilldown-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  flex-wrap: wrap;
  font-size: 12px;
}

.drilldown-breadcrumb button {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  cursor: pointer;
  overflow-wrap: anywhere;
}

#landingView .table-wrap {
  overflow-x: hidden;
  overflow-x: clip;
  overflow-y: auto;
}

#landingView table {
  min-width: 0;
  table-layout: fixed;
  font-size: 12px;
}

#landingView th,
#landingView td {
  min-width: 0;
  padding: 7px 8px;
}

#landingView .name-cell,
#landingView .sticky-col {
  max-width: none;
}

#landingView .metric-stack strong,
#landingView .metric-stack small,
#landingView .tag,
#landingView .cell-filter-button {
  max-width: 100%;
}

table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
}

th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #f8fafc;
  color: var(--muted);
  text-align: left;
  font-size: 12px;
  white-space: nowrap;
}

th, td {
  padding: 7px 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  min-width: 0;
  overflow-wrap: anywhere;
}

tbody tr:hover td {
  background: #fbfcfd;
}

tbody tr.material-child-row td {
  background: #fbfcfd;
}

tbody tr.material-child-row:hover td {
  background: #f5f8fb;
}

tbody tr.material-child-row td:first-child {
  position: relative;
}

tbody tr.material-child-row td:first-child::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #d8e1ea;
}

.material-label {
  display: inline-flex;
  align-items: center;
}

.child-material-label {
  position: relative;
  padding-left: 22px;
}

.child-material-label::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 50%;
  width: 14px;
  height: 2px;
  background: #d8e1ea;
}

tfoot td {
  position: sticky;
  bottom: 0;
  z-index: 2;
  border-top: 1px solid #cfd7df;
  border-bottom: 0;
  background: #f8fafc;
  color: #111827;
  font-weight: 800;
}

tfoot td.sticky-col {
  z-index: 7;
  background: #f8fafc;
}

.summary-label {
  color: #111827;
}

td.num, th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.metric-stack {
  display: inline-grid;
  gap: 3px;
  justify-items: end;
  line-height: 1.15;
  white-space: nowrap;
}

.metric-stack strong {
  font-size: 12.5px;
  font-weight: 800;
}

.metric-stack small {
  font-size: 10.5px;
  font-weight: 800;
}

.sticky-col {
  position: sticky;
  left: 0;
  z-index: 6;
  background: inherit;
  box-shadow: 1px 0 0 var(--line);
}

td.sticky-col {
  background: white;
}

th.sticky-col {
  background: #f8fafc;
}

.name-cell {
  min-width: 220px;
  max-width: 460px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.creative-line {
  margin-bottom: 6px;
  color: #334155;
}

.tag {
  display: inline-block;
  max-width: 100%;
  padding: 1px 6px;
  border-radius: 6px;
  background: #eef2f7;
  color: #3f4c5a;
  font-size: 11.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: top;
}

.material-tag {
  background: #e4f4f1;
  color: #0b5f59;
}

.click-cell {
  cursor: pointer;
}

.table-insight {
  margin: 0;
  padding: 9px 13px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfd;
  color: #475467;
  font-size: 12.5px;
  line-height: 1.45;
}

.hidden {
  display: none;
}

svg {
  display: block;
  width: 100%;
  height: 100%;
}

.chart svg {
  width: 100%;
  max-width: 100%;
}

.axis text {
  fill: var(--muted);
  font-size: 11px;
}

.axis text.x-tick {
  font-size: 10px;
}

.axis {
  pointer-events: none;
}

.grid-line {
  stroke: #e7ecf0;
  stroke-width: 1;
}

.line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  pointer-events: none;
}

.meta-line {
  stroke: var(--blue);
}

.shopify-line {
  stroke: var(--good);
}

.hover-guide {
  opacity: 0;
  stroke: #9aa6b2;
  stroke-dasharray: 4 4;
  stroke-width: 1;
  pointer-events: none;
}

.point-hit {
  fill: transparent;
  stroke: transparent;
  cursor: crosshair;
  pointer-events: all;
}

.point-dot {
  fill: white;
  stroke: var(--accent);
  stroke-width: 2;
  opacity: 0;
  pointer-events: none;
}

.meta-point {
  stroke: var(--blue);
}

.shopify-point {
  stroke: var(--good);
}

.chart-tooltip {
  opacity: 0;
  pointer-events: none;
}

.chart-tooltip rect {
  fill: rgba(17, 24, 39, 0.92);
}

.chart-tooltip text {
  fill: white;
  font-size: 11px;
  font-weight: 700;
}

.chart-point:hover .hover-guide,
.chart-point:focus .hover-guide,
.chart-point:hover .point-dot,
.chart-point:focus .point-dot,
.chart-point:hover .chart-tooltip,
.chart-point:focus .chart-tooltip {
  opacity: 1;
}

.viz-grid {
  padding: 14px 14px 6px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.compact-viz {
  padding-bottom: 12px;
}

.donut-card {
  min-height: 156px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 12px;
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.single-donut {
  margin: 14px;
  min-height: 300px;
  grid-template-columns: minmax(170px, 220px) minmax(0, 1fr);
  align-items: center;
}

.single-donut .donut-visual {
  width: 190px;
  height: 190px;
}

.single-donut .donut-copy > strong {
  font-size: 15px;
}

.single-donut .donut-legend {
  gap: 9px;
}

.single-donut .donut-legend-row {
  font-size: 13px;
}

.single-donut .empty {
  padding: 14px;
}

.donut-visual {
  width: 132px;
  height: 132px;
}

.donut-bg {
  fill: none;
  stroke: #edf1f5;
  stroke-width: 15;
}

.donut-segment {
  fill: none;
  stroke-width: 15;
  transform: rotate(-90deg);
  transform-origin: 50px 50px;
  transition: stroke-width 0.16s ease;
}

.donut-segment:hover {
  stroke-width: 18;
}

.donut-visual text:first-of-type {
  fill: var(--ink);
  font-size: 10px;
  font-weight: 800;
}

.donut-visual text:last-of-type {
  fill: var(--muted);
  font-size: 8px;
  font-weight: 700;
}

.donut-copy {
  min-width: 0;
}

.donut-copy > strong {
  display: block;
  margin-bottom: 10px;
  font-size: 13px;
}

.donut-legend {
  display: grid;
  gap: 7px;
}

.donut-legend-row {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  color: #4b5563;
  font-size: 12px;
}

.donut-legend-row i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.donut-legend-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.donut-legend-row strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.dual-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  padding: 0 2px 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.legend-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 6px;
  border-radius: 50%;
}

.meta-dot {
  background: var(--blue);
}

.shopify-dot {
  background: var(--good);
}

.onsite-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 8px;
}

.onsite-summary article {
  min-height: 64px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}

.onsite-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.onsite-summary strong {
  display: block;
  margin-top: 5px;
  font-size: 16px;
  line-height: 1.1;
}

.onsite-summary small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.source-health-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.source-health-card,
.attribution-kpi-grid article {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}

.source-health-card {
  padding: 10px 11px;
  border-top-width: 3px;
}

.source-health-card.health-good { border-top-color: var(--good); }
.source-health-card.health-warn { border-top-color: var(--warn); }
.source-health-card.health-bad { border-top-color: var(--danger); }

.source-health-card > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.source-health-card > div span {
  padding: 2px 6px;
  border-radius: 999px;
  background: #eef2f7;
  color: #475467;
  font-size: 11px;
  font-weight: 800;
}

.source-health-card p,
.source-health-card small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.source-health-card p { color: #344054; }

.attribution-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.attribution-kpi-grid article {
  min-height: 88px;
  padding: 11px 12px;
}

.attribution-kpi-grid span,
.attribution-kpi-grid small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.attribution-kpi-grid strong {
  display: block;
  margin: 7px 0 6px;
  font-size: 18px;
  line-height: 1;
}

.attribution-layout {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(220px, 1fr);
  gap: 12px;
}

.attribution-trend-panel .compact-select {
  width: 150px;
  flex-basis: 150px;
}

.attribution-chart {
  height: 370px;
}

.google-attribution-detail {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.google-detail-panel {
  width: 100%;
}

.google-detail-panel header {
  align-items: end;
}

.google-detail-filter {
  width: min(220px, 100%);
}

.google-detail-scroll {
  max-height: 520px;
  overflow-y: auto;
  overflow-x: hidden;
}

.google-detail-panel table {
  width: 100%;
  table-layout: fixed;
}

.google-detail-panel th,
.google-detail-panel td {
  padding: 7px 5px;
}

.google-detail-panel th:first-child,
.google-detail-panel td:first-child {
  width: 16%;
}

.google-detail-panel th:nth-child(n + 2),
.google-detail-panel td:nth-child(n + 2) {
  width: 12%;
}

.panel-summary {
  padding: 9px 13px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfd;
  color: #475467;
  font-size: 12px;
  line-height: 1.45;
}

.google-share-bars {
  display: grid;
  gap: 8px;
  padding: 12px 13px;
}

.google-share-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(100px, 0.8fr) minmax(180px, 1.2fr);
  gap: 8px;
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  padding: 6px 8px 15px;
  overflow: hidden;
  background: #f8fafc;
  color: #344054;
  font: inherit;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}

.google-share-row:hover {
  background: var(--accent-soft);
}

.google-share-row span,
.google-share-row b {
  position: relative;
  z-index: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.google-share-row b {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-align: right;
}

.google-share-row i {
  position: absolute;
  left: 8px;
  bottom: 5px;
  height: 4px;
  border-radius: 999px;
}

.google-spend-share { background: var(--accent); }
.google-gmv-share { bottom: 0; background: var(--blue); }

.google-market-scatter {
  width: 100%;
  min-height: 320px;
  aspect-ratio: 43 / 16;
  padding: 8px 13px 2px;
  overflow: hidden;
}

.google-market-scatter svg {
  width: 100%;
  height: 100%;
}

.google-scatter-axis line {
  stroke: #e2e8f0;
  stroke-width: 1;
}

.google-scatter-axis text,
.google-scatter-title,
.google-scatter-point text {
  fill: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.google-scatter-title {
  fill: #475467;
}

.google-scatter-point {
  cursor: pointer;
}

.google-scatter-point circle {
  fill: rgba(11, 111, 106, 0.24);
  stroke: var(--accent);
  stroke-width: 2;
}

.google-scatter-point:hover circle,
.google-scatter-point:focus circle {
  fill: rgba(37, 99, 235, 0.28);
  stroke: var(--blue);
  stroke-width: 3;
}

.google-scatter-unknown circle {
  fill: rgba(180, 83, 9, 0.2);
  stroke: var(--warn);
}

.google-sort-button {
  display: inline-flex;
  width: 100%;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

th:not(.num) .google-sort-button {
  justify-content: flex-start;
}

.google-sort-button.active,
.google-sort-button:hover {
  color: var(--accent);
}

.coverage-stack,
.attribution-issues {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.attribution-coverage-panel .coverage-stack {
  gap: 7px;
  padding: 8px;
}

.attribution-coverage-panel .coverage-item {
  padding: 8px;
}

.coverage-item {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.coverage-item > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
}

.coverage-definition > div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
  font-size: 12px;
}

.coverage-track {
  height: 6px;
  margin: 9px 0 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7ecf0;
}

.coverage-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--good);
}

.coverage-risk .coverage-track i { background: var(--danger); }
.coverage-item small { color: var(--muted); font-size: 11px; line-height: 1.4; }

.evidence-badge {
  display: inline-flex;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.evidence-good { background: var(--good-soft); color: var(--good); }
.evidence-warn { background: var(--warn-soft); color: var(--warn); }
.evidence-info { background: var(--blue-soft); color: var(--blue); }

.evidence-note {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.issue-card {
  display: grid;
  grid-template-columns: minmax(190px, 0.8fr) minmax(220px, 1fr) minmax(300px, 1.4fr);
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--warn);
  border-radius: 8px;
  background: #fbfcfd;
}

.issue-card.issue-high { border-left-color: var(--danger); }
.issue-card > div { display: grid; gap: 5px; }
.issue-card > div span { color: var(--danger); font-size: 10px; font-weight: 800; }
.issue-card strong { font-size: 13px; }
.issue-card p,
.issue-card small { color: #475467; font-size: 11.5px; line-height: 1.5; }
.issue-card b { color: #344054; }

#attributionView table {
  font-size: 11.5px;
}

#attributionView th,
#attributionView td {
  padding: 7px 6px;
}

#attributionEfficiencyTable {
  width: 100%;
  table-layout: fixed;
}

#attributionEfficiencyTable th:first-child,
#attributionEfficiencyTable td:first-child {
  width: 12%;
}

.attribution-diagnostics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.attribution-diagnostics > div {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.attribution-diagnostics span,
.attribution-diagnostics small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.attribution-diagnostics strong {
  display: block;
  margin-top: 4px;
  font-size: 16px;
}

.attribution-diagnostics > small {
  grid-column: 1 / -1;
  padding: 0 2px;
}

.onsite-note {
  grid-column: 1 / -1;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--blue-soft);
  color: #1e3a8a;
  font-size: 12px;
  line-height: 1.45;
}

.onsite-source-notes {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 10px;
  margin: 10px 0 14px;
}

.onsite-source-card {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  box-shadow: var(--shadow);
}

.onsite-source-card strong {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
}

.onsite-source-card p {
  margin: 0;
  color: var(--text);
  font-size: 12px;
  line-height: 1.5;
}

.onsite-source-card code {
  font-size: 11px;
}

.onsite-source-card.compat {
  background: #fff9eb;
  border-color: #f5d48f;
}

.onsite-source-card.compat strong {
  color: #9a6700;
}

.status-tag {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.status-good {
  background: var(--good-soft);
  color: var(--good);
}

.status-bad {
  background: var(--danger-soft);
  color: var(--danger);
}

.status-blue {
  background: var(--blue-soft);
  color: var(--blue);
}

.status-warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.status-neutral {
  background: #eef2f7;
  color: #4b5563;
}

.area {
  fill: rgba(15, 118, 110, 0.12);
}

@media (max-width: 1180px) {
  .topbar-main,
  .page-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .filterbar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .context-filterbar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .overview-layout,
  .split-grid,
  .operator-layout,
  .rank-grid,
  .creative-groups,
  .viz-grid {
    grid-template-columns: 1fr;
  }

  .source-health-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .attribution-kpi-grid,
  .attribution-diagnostics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .attribution-layout {
    grid-template-columns: 1fr;
  }

  .kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .insight-summary,
  .comparison-strip,
  .action-insights {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .trend-body {
    grid-template-columns: 1fr;
  }

  .chart-conclusion {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .overview-alert-panel .alerts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .inline-alerts {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .topbar-main,
  .filterbar {
    padding-left: 14px;
    padding-right: 14px;
  }

  .app {
    padding-inline: 16px;
  }

  .filterbar,
  .kpi-grid,
  .context-filterbar,
  .insight-summary,
  .comparison-strip,
  .action-insights,
  .overview-alert-panel .alerts,
  .inline-alerts,
  .onsite-summary {
    grid-template-columns: 1fr;
  }

  .source-health-grid,
  .attribution-kpi-grid {
    grid-template-columns: 1fr;
  }

  .attribution-diagnostics {
    grid-template-columns: 1fr;
  }

  .tabs {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .tab {
    padding: 0 8px;
    text-align: center;
  }

  .table-wrap {
    height: var(--dashboard-table-viewport-height, auto);
    max-height: var(--dashboard-table-viewport-height, none);
    overflow-x: hidden;
    overflow-x: clip;
    overflow-y: auto;
    scrollbar-gutter: stable;
    scroll-padding-top: 150px;
    scroll-padding-bottom: 210px;
  }

  .table-wrap.compact,
  .table-wrap.google-detail-scroll,
  .table-wrap.channel-detail-scroll {
    max-height: var(--dashboard-table-viewport-height, none);
  }

  table,
  thead,
  tfoot,
  tbody,
  tr,
  th,
  td {
    display: block;
    min-width: 0;
  }

  thead {
    display: block;
    position: sticky;
    top: 0;
    z-index: 9;
    border-bottom: 1px solid var(--border-strong);
    background: #f5f7fa;
  }

  thead tr {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    margin: 0;
    padding: 6px;
    border: 0;
    border-radius: 0;
    background: #f5f7fa;
    overflow: visible;
  }

  thead th,
  thead th.sticky-col {
    display: block;
    position: static;
    min-height: 28px;
    padding: 4px 6px;
    border: 1px solid #dfe4eb;
    border-radius: 4px;
    background: white;
    font-size: 10px;
    line-height: 1.25;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  thead .google-sort-button {
    min-height: 28px;
    justify-content: flex-start;
    white-space: normal;
  }

  tfoot {
    display: block;
    position: sticky;
    bottom: 0;
    z-index: 9;
    border-top: 1px solid var(--border-strong);
    background: #f2f4f7;
  }

  tfoot tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0;
    border: 0;
    border-radius: 0;
    background: #f2f4f7;
    overflow: hidden;
  }

  tfoot td,
  tfoot td.sticky-col {
    position: relative;
    display: grid;
    grid-template-columns: minmax(62px, 40%) minmax(0, 1fr);
    gap: 6px;
    min-height: 34px;
    padding: 6px 8px;
    background: #f2f4f7;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  tr {
    margin: 10px 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    overflow: hidden;
  }

  td {
    display: grid;
    grid-template-columns: minmax(82px, 34%) minmax(0, 1fr);
    gap: 10px;
    border-bottom: 1px solid #edf1f5;
    min-width: 0;
    font-size: 12px;
    overflow-wrap: anywhere;
  }

  td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
  }

  td.num {
    text-align: left;
    white-space: normal;
  }

  .metric-stack {
    justify-items: start;
    white-space: normal;
  }

  .tag {
    white-space: normal;
    overflow-wrap: anywhere;
    text-overflow: clip;
  }

  tbody .sticky-col,
  tbody td.sticky-col {
    position: static;
  }

  .name-cell {
    min-width: 0;
    max-width: none;
  }

  .donut-card {
    grid-template-columns: 112px minmax(0, 1fr);
  }

  .donut-visual {
    width: 112px;
    height: 112px;
  }

  .single-donut {
    margin: 12px;
    min-height: 0;
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .single-donut .donut-visual {
    width: 150px;
    height: 150px;
  }

  .single-donut .donut-copy {
    width: 100%;
  }

  .onsite-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .issue-card {
    grid-template-columns: 1fr;
  }

  .google-detail-panel header {
    align-items: stretch;
  }

  .google-detail-filter {
    width: 100%;
  }

  .google-detail-scroll {
    max-height: 520px;
    overflow-x: hidden;
  }

  .google-detail-panel th:first-child,
  .google-detail-panel td:first-child,
  .google-detail-panel th:nth-child(n + 2),
  .google-detail-panel td:nth-child(n + 2) {
    width: auto;
  }

  #attributionEfficiencyTable th:first-child,
  #attributionEfficiencyTable td:first-child {
    width: auto;
  }

  .google-market-scatter {
    min-height: 255px;
    aspect-ratio: 1 / 1;
    padding: 8px 2px 2px;
  }

  .google-share-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .google-share-row b {
    text-align: left;
  }
}

.creative-view-control {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 16px;
}

.country-view-control {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 6px;
}

.country-view-mode {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.country-view-mode.hidden {
  display: none;
}

.country-product-performance-panel .table-wrap {
  width: 100%;
  min-width: 0;
}

.country-product-performance-panel th:first-child,
.country-product-performance-panel td:first-child {
  width: 20%;
}

#countryDetailTable {
  width: 100%;
  table-layout: fixed;
}

#countryDetailTable th:not(:first-child),
#countryDetailTable td:not(:first-child) {
  width: 20%;
}

.product-region-label {
  display: grid;
  justify-items: start;
  gap: 8px;
  min-width: 0;
}

.product-region-label .tag {
  max-width: 100%;
  overflow-wrap: anywhere;
  text-align: left;
}

.product-region-total {
  display: grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  gap: 2px 6px;
  font-variant-numeric: tabular-nums;
}

.product-region-total small {
  grid-column: 1 / -1;
  color: #718096;
  font-size: 10px;
  font-weight: 750;
}

.product-region-total strong {
  color: #172033;
  font-size: 15px;
  font-weight: 850;
  white-space: nowrap;
}

.product-region-total > span:last-child {
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.region-performance-cell {
  display: grid;
  gap: 7px;
  width: 100%;
  min-width: 0;
  padding: 2px 0;
  font-variant-numeric: tabular-nums;
}

.region-contribution-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.region-contribution-head > span:first-child {
  display: grid;
  justify-items: start;
  gap: 1px;
}

.region-contribution-head small {
  color: #718096;
  font-size: 10px;
  font-weight: 750;
}

.region-contribution-head strong {
  color: #172033;
  font-size: 19px;
  font-weight: 900;
  line-height: 1.05;
  white-space: nowrap;
}

.region-contribution-head > span:last-child {
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.region-contribution-track {
  display: block;
  width: 100%;
  height: 5px;
  overflow: hidden;
  border-radius: 3px;
  background: #e8edf4;
}

.region-contribution-track i {
  display: block;
  min-width: 0;
  height: 100%;
  border-radius: inherit;
  background: #3b82f6;
}

#countryDetailTable td:nth-child(2) .region-contribution-track i {
  background: #0f9f8f;
}

#countryDetailTable td:nth-child(3) .region-contribution-track i {
  background: #376fd0;
}

#countryDetailTable td:nth-child(4) .region-contribution-track i {
  background: #c58a22;
}

#countryDetailTable td:nth-child(5) .region-contribution-track i {
  background: #c65b72;
}

.region-support-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.region-support-metric {
  display: grid;
  justify-items: start;
  gap: 1px;
  min-width: 0;
}

.region-support-metric small {
  color: #7b8798;
  font-size: 9px;
  font-weight: 750;
}

.region-support-metric strong {
  max-width: 100%;
  overflow: hidden;
  color: #334155;
  font-size: 11px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.region-support-metric > span:last-child {
  max-width: 100%;
  overflow: hidden;
  font-size: 9px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#countryDetailTable tfoot .region-contribution-head strong,
#countryDetailTable tfoot .region-support-metric strong {
  color: #111827;
}

.all-channels-mode-control {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 16px;
}

.all-channels-view.hidden {
  display: none;
}

.all-channels-view {
  display: grid;
  gap: 16px;
}

.creative-view-mode {
  display: grid;
  gap: 16px;
}

.creative-view-mode.hidden {
  display: none;
}

.creative-audit-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid #d8e0ea;
  background: #f7f9fc;
  color: #475569;
  font-size: 12px;
}

.creative-audit-bar strong {
  color: #172033;
  font-size: 13px;
}

.creative-audit-bar .decision-data-ready {
  color: #08765a;
}

.creative-audit-bar .decision-data-warning {
  color: #b45309;
  font-weight: 700;
}

.creative-audit-bar .ghost-button {
  flex: 0 0 auto;
  width: auto;
  margin-left: auto;
}

.creative-decision-guide,
.creative-decision-supplement {
  border: 1px solid #d8e0ea;
  border-radius: 6px;
  background: #fff;
}

.creative-decision-guide > summary,
.creative-decision-supplement > summary {
  display: flex;
  min-height: 40px;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.creative-decision-guide > summary::-webkit-details-marker,
.creative-decision-supplement > summary::-webkit-details-marker {
  display: none;
}

.creative-decision-guide > summary::before,
.creative-decision-supplement > summary::before {
  content: "+";
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  color: #475569;
  font-size: 13px;
  line-height: 1;
}

.creative-decision-guide[open] > summary::before,
.creative-decision-supplement[open] > summary::before {
  content: "−";
}

.creative-decision-guide-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 18px;
  padding: 0 13px 12px 39px;
  border-top: 1px solid #edf1f5;
}

.creative-decision-guide-body p {
  margin: 10px 0 0;
  color: #526174;
  font-size: 11px;
  line-height: 1.55;
}

.creative-decision-guide-body strong {
  color: #172033;
}

.creative-decision-supplement[open] > summary {
  border-bottom: 1px solid #edf1f5;
}

.creative-decision-grid-secondary {
  padding: 14px;
}

.creative-decision-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.creative-decision-panel {
  min-width: 0;
}

.creative-decision-panel header p,
.creative-content-panel header p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 12px;
}

.creative-content-panel > header {
  flex-wrap: nowrap;
}

.creative-content-panel > header > div {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  gap: 6px 12px;
  min-width: 0;
  flex: 1 1 auto;
}

.creative-content-panel > header h3 {
  white-space: nowrap;
}

.creative-content-panel > header p {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#creativeImageContentTable {
  width: calc(100% - 1px);
  min-width: 0;
  table-layout: fixed;
}

#creativeImageContentTable th,
#creativeImageContentTable td {
  padding-inline: 6px;
}

#creativeImageContentTable th:first-child,
#creativeImageContentTable td:first-child {
  width: 12%;
}

#creativeImageContentTable th:nth-child(2),
#creativeImageContentTable td:nth-child(2) {
  width: 7%;
}

#creativeImageContentTable th:nth-child(3),
#creativeImageContentTable td:nth-child(3) {
  width: 15%;
}

#creativeImageContentTable th:nth-child(4),
#creativeImageContentTable td:nth-child(4) {
  width: 13%;
}

#creativeImageContentTable th:nth-child(5),
#creativeImageContentTable td:nth-child(5) {
  width: 5%;
}

#creativeImageContentTable th:nth-child(6),
#creativeImageContentTable td:nth-child(6) {
  width: 7%;
}

#creativeImageContentTable th:nth-child(7),
#creativeImageContentTable td:nth-child(7) {
  width: 8%;
}

#creativeImageContentTable th:nth-child(8),
#creativeImageContentTable td:nth-child(8),
#creativeImageContentTable th:nth-child(9),
#creativeImageContentTable td:nth-child(9),
#creativeImageContentTable th:nth-child(10),
#creativeImageContentTable td:nth-child(10) {
  width: 7%;
}

#creativeImageContentTable th:last-child,
#creativeImageContentTable td:last-child {
  width: 5%;
}

#creativeImageContentTable .creative-content-parent-row td {
  background: #f8fafc;
  font-weight: 600;
}

#creativeImageContentTable .creative-content-child-row td {
  background: #fff;
  color: #475569;
}

.creative-content-material-panel .table-wrap {
  max-height: 680px;
  overflow: auto;
}

#creativeImageMaterialTable {
  width: 100%;
  min-width: 1080px;
}

.creative-coverage-details {
  position: relative;
  min-width: 0;
}

.creative-coverage-details summary {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  color: #2563a8;
  cursor: pointer;
  list-style: none;
  white-space: nowrap;
}

.creative-coverage-details summary::-webkit-details-marker {
  display: none;
}

.creative-coverage-details summary span {
  color: #64748b;
  font-size: 13px;
}

.creative-coverage-details[open] summary {
  color: #172033;
}

.creative-coverage-details > div {
  position: absolute;
  z-index: 5;
  top: calc(100% + 6px);
  right: 0;
  display: grid;
  grid-template-columns: max-content minmax(160px, 1fr);
  gap: 5px 9px;
  width: min(330px, 42vw);
  padding: 10px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
  font-size: 11px;
  font-weight: 400;
  white-space: normal;
}

.creative-coverage-details > div strong {
  color: #64748b;
  font-weight: 600;
}

.creative-coverage-details > div span {
  min-width: 0;
  color: #172033;
  overflow-wrap: anywhere;
}

.creative-dimension-details {
  position: relative;
  min-width: 0;
}

.creative-dimension-details summary {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  color: #2563a8;
  cursor: pointer;
  list-style: none;
  white-space: normal;
}

.creative-dimension-details summary::-webkit-details-marker {
  display: none;
}

.creative-dimension-details summary span {
  color: #64748b;
}

.creative-dimension-details[open] summary {
  color: #172033;
}

.creative-dimension-breakdown {
  position: absolute;
  z-index: 6;
  top: calc(100% + 6px);
  left: 0;
  display: grid;
  gap: 12px;
  width: min(430px, 48vw);
  max-height: min(560px, 70vh);
  padding: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
  font-size: 12px;
  font-weight: 400;
  overflow-y: auto;
}

.creative-dimension-breakdown-section {
  display: grid;
  gap: 6px;
}

.creative-dimension-breakdown-section h4 {
  margin: 0;
  color: #64748b;
  font-size: 11px;
}

.creative-dimension-breakdown-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px;
  gap: 8px;
  align-items: stretch;
}

.creative-dimension-filter,
.creative-dimension-example {
  min-width: 0;
  border: 1px solid #dbe3ec;
  border-radius: 4px;
  background: #fff;
  color: #172033;
  cursor: pointer;
}

.creative-dimension-filter {
  display: grid;
  gap: 3px;
  padding: 7px 8px;
  text-align: left;
}

.creative-dimension-filter:hover,
.creative-dimension-example:hover {
  border-color: #2563a8;
  background: #f8fbff;
}

.creative-dimension-filter strong {
  font-size: 12px;
}

.creative-dimension-filter span {
  color: #64748b;
  font-size: 11px;
  overflow-wrap: anywhere;
}

.creative-dimension-example {
  display: grid;
  grid-template-rows: 42px auto;
  padding: 3px;
}

.creative-dimension-example img,
.creative-dimension-example-placeholder {
  width: 100%;
  height: 42px;
  object-fit: cover;
  border-radius: 2px;
}

.creative-dimension-example-placeholder {
  display: grid;
  place-items: center;
  background: #eef2f6;
  color: #64748b;
  font-size: 10px;
}

.creative-dimension-example small {
  padding-top: 2px;
  overflow: hidden;
  color: #475569;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.creative-dimension-breakdown-empty {
  margin: 0;
  color: #64748b;
  font-size: 11px;
}

#creativeImageMaterialTable th:first-child,
#creativeImageMaterialTable td:first-child {
  width: 235px;
  min-width: 235px;
}

.creative-material-cell {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: #172033;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.creative-material-cell > span:last-child {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.creative-material-cell strong,
.creative-material-cell small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.creative-material-cell strong {
  color: #1e3a8a;
  font-size: 11px;
}

.creative-material-cell small {
  color: #64748b;
  font-size: 10px;
}

.creative-material-thumb {
  width: 52px;
  height: 52px;
  display: block;
  border-radius: 4px;
  object-fit: cover;
  background: #eef2f7;
  color: #94a3b8;
  font-size: 10px;
  line-height: 52px;
  text-align: center;
}

.creative-material-cell:hover strong {
  text-decoration: underline;
}

.creative-content-expand {
  display: grid;
  grid-template-columns: 13px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  width: 100%;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: #172033;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.creative-content-expand strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.creative-content-heading {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.creative-content-heading-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 5px;
  min-width: 0;
}

.creative-content-heading-title strong {
  flex: 1 1 auto;
  white-space: nowrap;
}

.creative-content-subtype-preview {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3px 6px;
  min-width: 0;
  color: #64748b;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.25;
}

.creative-content-subtype-preview.is-four {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.creative-content-subtype-preview span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.creative-content-expand small {
  color: #64748b;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}

.creative-content-expand:focus-visible {
  border-radius: 4px;
  outline: 2px solid #3372c4;
  outline-offset: 3px;
}

.creative-content-child-label {
  display: inline-block;
  position: relative;
  max-width: 100%;
  padding-left: 28px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.creative-content-representatives {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  min-width: 0;
  max-width: 100%;
}

.creative-content-example {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  min-width: 0;
  min-height: 102px;
  max-width: 100%;
  padding: 4px;
  border: 1px solid #d8e0ea;
  border-radius: 4px;
  background: #fff;
  color: #334155;
  text-align: left;
  cursor: pointer;
}

.creative-content-example:hover,
.creative-content-example:focus-visible {
  border-color: #3372c4;
  outline: 2px solid rgba(51, 114, 196, 0.14);
  outline-offset: 1px;
}

.creative-content-example img,
.creative-content-example-placeholder,
.creative-content-example .creative-thumbnail-placeholder {
  display: block;
  width: 78px;
  height: 94px;
  padding: 2px;
  border: 1px solid #e2e8f0;
  border-radius: 3px;
  background: #f4f6f8;
  object-fit: contain;
}

.creative-content-example-placeholder,
.creative-content-example .creative-thumbnail-placeholder {
  display: grid;
  place-items: center;
  padding: 2px;
  background: #eef2f7;
  color: #7b8798;
  font-size: 9px;
  text-align: center;
}

.creative-content-example-meta {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.creative-content-example-meta strong {
  color: #334155;
  font-size: 10px;
  line-height: 1.1;
}

.creative-content-example-meta small {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: #64748b;
  font-size: 9px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.creative-content-no-example {
  color: #94a3b8;
  font-size: 10px;
}

.creative-content-definition,
.creative-content-metric-pair {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.creative-content-definition {
  color: #526174;
  font-size: 11px;
  line-height: 1.4;
  text-align: left;
  max-height: 4.05em;
  overflow: hidden;
}

.creative-content-definition small {
  color: #8a5a18;
  font-size: 9px;
}

.creative-content-metric-pair {
  justify-items: end;
  white-space: nowrap;
}

.creative-content-metric-pair strong,
.creative-content-metric-pair small,
.creative-content-definition > span,
.creative-content-example-meta {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.creative-content-metric-pair strong {
  color: #172033;
  font-size: 13px;
}

.creative-content-metric-pair small {
  color: #64748b;
  font-size: 11px;
}

.creative-content-child-label::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 50%;
  width: 11px;
  height: 1px;
  background: #94a3b8;
}

.creative-content-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 2px 7px;
  border: 1px solid;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.creative-content-status.supported {
  border-color: #9bd1b7;
  background: #edf8f1;
  color: #17643d;
}

.creative-content-status.example {
  border-color: #d8e0ea;
  background: #f7f9fc;
  color: #64748b;
}

@media (max-width: 1050px) and (min-width: 721px) {
  #creativeImageContentTable th,
  #creativeImageContentTable td {
    padding-inline: 4px;
    font-size: 11px;
  }

  #creativeImageContentTable th:first-child,
  #creativeImageContentTable td:first-child {
    width: 14%;
  }

  .creative-content-expand small {
    display: none;
  }

  .creative-content-definition { font-size: 11px; }
}

@media (max-width: 720px) {
  .creative-content-panel > header,
  .creative-selling-point-panel > header {
    height: auto;
    min-height: 0;
    align-content: start;
  }

  .creative-selling-point-panel > header {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .creative-content-panel > header {
    align-items: flex-start;
  }

  .creative-content-panel > header > div,
  .creative-selling-point-panel > header > div {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    align-content: start;
  }

  .creative-selling-point-panel > header > div {
    flex: 1 1 calc(100% - 42px);
  }

  .creative-selling-point-panel .creative-selling-point-audit {
    order: 3;
    flex: 0 0 100%;
    width: auto;
  }

  .creative-selling-point-panel .table-copy-button {
    order: 2;
  }

  .creative-content-panel > header p {
    white-space: normal;
  }

  .creative-content-expand strong,
  .creative-content-child-label {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }

  .creative-content-representatives {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.creative-card-list {
  display: grid;
  gap: 10px;
  max-height: 620px;
  overflow: auto;
  padding: 0 14px 14px;
}

.creative-decision-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  width: 100%;
  min-height: 126px;
  padding: 10px;
  border: 1px solid #d8e0ea;
  border-radius: 6px;
  background: #fff;
  color: #172033;
  text-align: left;
  cursor: pointer;
}

.creative-decision-card:hover,
.creative-decision-card:focus-visible {
  border-color: #3372c4;
  box-shadow: 0 0 0 2px rgba(51, 114, 196, 0.12);
  outline: none;
}

.creative-thumbnail,
.creative-thumbnail-placeholder {
  width: 92px;
  height: 116px;
  object-fit: contain;
  border-radius: 4px;
  background: #f4f6f8;
}

.creative-thumbnail-placeholder {
  display: grid;
  place-items: center;
  padding: 8px;
  color: #7b8798;
  font-size: 11px;
  text-align: center;
}

.creative-card-body,
.creative-card-metrics,
.creative-card-footer {
  display: grid;
}

.creative-card-body {
  min-width: 0;
  gap: 6px;
}

.creative-card-title {
  overflow: hidden;
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.creative-card-context {
  color: #64748b;
  font-size: 11px;
}

.creative-card-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px 8px;
  font-size: 11px;
}

.creative-card-metrics span,
.creative-card-footer span {
  white-space: nowrap;
}

.creative-card-footer {
  grid-template-columns: repeat(3, minmax(0, max-content));
  gap: 6px;
  align-items: end;
  color: #526174;
  font-size: 10px;
}

.decision-tag {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 7px;
  border: 1px solid #d8e0ea;
  border-radius: 4px;
  background: #f7f9fc;
  overflow: hidden;
  text-overflow: ellipsis;
}

.decision-tag-primary {
  border-color: #bfd3ef;
  background: #eef5ff;
  color: #215d9c;
  font-weight: 700;
}

.creative-empty-state {
  margin: 0;
  padding: 28px 12px;
  color: #7b8798;
  font-size: 12px;
  text-align: center;
}

.creative-detail-drawer {
  position: fixed;
  z-index: 80;
  top: 0;
  right: 0;
  width: min(440px, 100vw);
  height: 100vh;
  overflow: auto;
  padding: 20px;
  border-left: 1px solid #d8e0ea;
  background: #fff;
  box-shadow: -16px 0 40px rgba(15, 23, 42, 0.18);
}

.creative-detail-drawer[hidden] {
  display: none;
}

.creative-detail-drawer > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.creative-detail-media .creative-thumbnail,
.creative-detail-media .creative-thumbnail-placeholder {
  width: 100%;
  height: auto;
  max-height: 420px;
  aspect-ratio: 4 / 5;
}

.creative-detail-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 18px 0;
  background: #d8e0ea;
}

.creative-detail-metrics div {
  padding: 10px;
  background: #f7f9fc;
}

.creative-detail-metrics dt {
  color: #64748b;
  font-size: 11px;
}

.creative-detail-metrics dd {
  margin: 3px 0 0;
  font-size: 13px;
  font-weight: 700;
}

.creative-detail-status {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.creative-detail-status span {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px;
  border: 1px solid #d8e0ea;
  border-radius: 4px;
  background: #fff;
}

.creative-detail-status small {
  color: #64748b;
  font-size: 10px;
}

.creative-detail-status strong {
  overflow-wrap: anywhere;
  font-size: 12px;
}

.creative-region-breakdown {
  margin-top: 20px;
}

.creative-region-breakdown h5 {
  margin: 0 0 10px;
  color: #172033;
  font-size: 13px;
}

.creative-region-grid {
  display: grid;
  gap: 8px;
}

.creative-region-item {
  min-width: 0;
  padding: 11px;
  border: 1px solid #d8e0ea;
  border-radius: 4px;
  background: #f7f9fc;
}

.creative-region-item > strong {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
}

.creative-region-item dl {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
}

.creative-region-item dl div {
  min-width: 0;
}

.creative-region-item dt {
  color: #64748b;
  font-size: 9px;
}

.creative-region-item dd {
  margin: 2px 0 0;
  overflow: hidden;
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.creative-region-empty {
  margin: 0;
  padding: 14px;
  background: #f7f9fc;
  color: #64748b;
  font-size: 11px;
  text-align: center;
}

@media (max-width: 900px) {
  .creative-decision-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .creative-decision-guide-body {
    grid-template-columns: 1fr;
    padding-left: 13px;
  }

  .creative-view-control {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .creative-decision-card {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .creative-thumbnail,
  .creative-thumbnail-placeholder {
    width: 76px;
    height: 96px;
  }

  .creative-card-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .creative-card-footer {
    grid-template-columns: 1fr;
  }

  .creative-detail-status {
    grid-template-columns: 1fr;
  }

  .creative-region-item dl {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* cockpit-refresh */
:root {
  --surface: #ffffff;
  --surface-muted: #f7f8fa;
  --canvas: #f3f5f8;
  --accent: #2563eb;
  --accent-soft: #eff6ff;
  --border-strong: #d9dee7;
  --line: #e4e8ef;
  --panel: var(--surface);
  --bg: var(--canvas);
  --ink: #172033;
  --muted: #687386;
  --good: #07835b;
  --danger: #c0362c;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.035);
}

.cockpit-shell-marker {
  border-radius: 8px;
  background: var(--canvas);
  letter-spacing: 0;
}

body {
  background: var(--canvas);
}

.topbar {
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
}

.topbar-main {
  padding-top: 10px;
  padding-bottom: 7px;
}

.brand {
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 7px;
  background: #172033;
  font-size: 14px;
}

h1 {
  font-size: 17px;
}

.brand p {
  margin-top: 2px;
  font-size: 11px;
}

.tabs {
  gap: 2px;
  padding: 2px;
  border-color: var(--border-strong);
  border-radius: 7px;
  background: var(--surface-muted);
}

.tab {
  height: 30px;
  padding: 0 11px;
  border-radius: 6px;
  color: #596579;
  font-size: 12px;
  font-weight: 700;
}

.tab.active {
  border-color: #cfd6e2;
  color: #172033;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
}

.filterbar {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding-top: 0;
  padding-bottom: 9px;
  align-items: flex-end;
}

.filterbar .date-filter,
.filterbar .multi-select {
  flex: 0 1 154px;
  min-width: 126px;
}

.date-presets {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  background: var(--surface-muted);
}

.date-presets button {
  height: 30px;
  border: 0;
  border-radius: 5px;
  padding: 0 9px;
  background: transparent;
  color: #647084;
  font: inherit;
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
}

.date-presets button:hover,
.date-presets button.active {
  background: var(--surface);
  color: var(--accent);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
}

.filterbar label,
.filter-label {
  gap: 4px;
  margin-bottom: 4px;
  font-size: 10px;
  line-height: 1;
}

select,
input[type="date"],
.multi-trigger,
.apply-time-button {
  height: 32px;
  border-radius: 6px;
  font-size: 12px;
}

.multi-trigger.has-selection {
  border-color: #93b4f5;
  background: var(--accent-soft);
  color: #1d4ed8;
}

.apply-time-button {
  border-color: var(--accent);
  background: var(--accent);
  font-size: 12px;
}

.apply-time-button:hover,
.apply-time-button.has-pending {
  border-color: #1d4ed8;
  background: #1d4ed8;
}

.apply-time-button.has-pending {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.period-hint {
  flex: 1 0 100%;
  gap: 4px 14px;
  font-size: 10px;
  line-height: 1.2;
}

.period-hint.has-pending {
  padding: 5px 8px;
  border-color: #bfd2fb;
  border-radius: 6px;
  background: #f2f6ff;
  color: #52627a;
}

.pending-period {
  color: var(--accent);
}

.app {
  padding-top: 14px;
  padding-bottom: 28px;
}

.page-heading {
  align-items: center;
  margin-bottom: 9px;
}

h2 {
  font-size: 20px;
}

.page-heading p {
  margin-top: 2px;
  font-size: 11px;
}

.period-badge {
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  font-size: 11px;
}

.context-filterbar {
  top: calc(var(--topbar-height) + 6px);
  gap: 7px;
  margin: 0 0 9px;
  padding: 7px;
  border-color: var(--border-strong);
  border-radius: 7px;
  background: rgba(247, 248, 250, 0.98);
  box-shadow: 0 3px 12px rgba(16, 24, 40, 0.055);
}

.context-filterbar .ghost-button {
  height: 32px;
  border-radius: 6px;
  font-size: 12px;
}

.active-filter-note {
  min-height: 32px;
  padding: 7px 9px;
  border-radius: 6px;
  font-size: 11px;
}

.insight-summary {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 7px;
  margin-bottom: 7px;
}

.insight-summary article,
.kpi,
.insight-card,
.panel {
  border-color: var(--border-strong);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.insight-summary article {
  min-height: 50px;
  padding: 7px 10px;
}

.insight-summary span,
.kpi span {
  font-size: 10px;
  font-weight: 700;
}

.insight-summary strong {
  margin-top: 3px;
  font-size: 13px;
}

.kpi-grid {
  gap: 7px;
  margin-bottom: 7px;
}

.kpi {
  min-height: 58px;
  padding: 7px 9px;
}

.kpi strong {
  margin-top: 3px;
  font-size: 18px;
}

.kpi small {
  margin-top: 3px;
  font-size: 10px;
}

.comparison-strip {
  display: none;
}

.action-insights {
  gap: 7px;
  margin-bottom: 9px;
}

.insight-card {
  min-height: 66px;
  padding: 7px 9px;
  border-left-width: 2px;
}

.insight-card span {
  font-size: 10px;
}

.insight-card strong {
  margin-top: 4px;
  font-size: 12px;
}

.insight-card p {
  margin-top: 3px;
  font-size: 10.5px;
  line-height: 1.35;
}

.view-shell,
.overview-layout,
.split-grid,
.rank-grid,
.creative-groups,
.operator-layout,
.landing-detail-stack {
  gap: 10px;
}

.overview-layout {
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.75fr);
}

.panel header {
  min-height: 40px;
  padding: 8px 11px;
  gap: 8px;
}

h3 {
  font-size: 13px;
}

.panel-note {
  margin-top: 0;
  font-size: 10px;
}

.compact-select {
  height: 28px;
  font-size: 11px;
}

.chart-conclusion {
  padding: 11px;
  background: var(--surface-muted);
}

.chart-conclusion p {
  font-size: 11px;
  line-height: 1.45;
}

.table-wrap {
  border-color: var(--line);
  overflow-x: hidden;
  overflow-x: clip;
}

.channel-detail-scroll,
.channel-all-products-scroll {
  max-height: calc(10 * 42px + 36px);
  overflow-y: auto;
  overflow-x: hidden;
  overflow-x: clip;
  scrollbar-gutter: stable;
}

.channel-detail-scroll table,
.channel-all-products-scroll table {
  width: 100%;
  table-layout: fixed;
}

.channel-detail-scroll th,
.channel-detail-scroll td,
.channel-all-products-scroll th,
.channel-all-products-scroll td {
  overflow-wrap: anywhere;
  white-space: normal;
}

.channel-detail-scroll th:nth-child(1),
.channel-detail-scroll td:nth-child(1) { width: 14%; }

.channel-detail-scroll th:nth-child(2),
.channel-detail-scroll td:nth-child(2) { width: 34%; }

.channel-detail-scroll th:nth-child(n + 3),
.channel-detail-scroll td:nth-child(n + 3) { width: 17.33%; }

th {
  background: #f5f7fa;
  color: #667085;
  font-size: 10px;
}

td {
  font-size: 12px;
}

tfoot td {
  border-top-color: var(--border-strong);
  background: #f2f4f7;
}

.quick-filter-row {
  padding: 7px 11px;
}

.quick-filter-row button {
  height: 24px;
  border-radius: 6px;
}

.country-page {
  gap: 10px;
}

.country-scope-label {
  flex: 0 0 auto;
  padding: 3px 7px;
  border: 1px solid #b9c7dc;
  border-radius: 6px;
  background: #f5f8fc;
  color: #31527d;
  font-size: 10px;
  font-weight: 700;
}

.country-region-panel tr.is-active-drilldown td {
  background: #edf4ff;
}

.country-region-panel tr.is-active-drilldown td:first-child {
  box-shadow: inset 3px 0 0 #2563eb;
}

@media (max-width: 1180px) {
  .overview-layout {
    grid-template-columns: 1fr;
  }

  .insight-summary,
  .action-insights {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 639px) {
  .context-filterbar {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .channel-detail-scroll th:nth-child(n),
  .channel-detail-scroll td:nth-child(n),
  .channel-all-products-scroll th:nth-child(n),
  .channel-all-products-scroll td:nth-child(n) {
    width: 100%;
  }

  .topbar-main,
  .filterbar {
    padding-left: 10px;
    padding-right: 10px;
  }

  .app {
    padding-inline: 12px;
  }

  .topbar-main {
    gap: 8px;
  }

  .tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .filterbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .date-presets,
  .period-hint,
  .filterbar .top-account-filter {
    grid-column: 1 / -1;
  }

  .date-presets {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .date-presets button {
    padding: 0 4px;
  }

  .filterbar .date-filter,
  .filterbar .multi-select {
    min-width: 0;
  }

  .page-heading {
    gap: 6px;
    margin-bottom: 7px;
  }

  .insight-summary,
  .kpi-grid,
  .action-insights,
  .overview-layout,
  .split-grid,
  .rank-grid,
  .creative-groups,
  .operator-layout {
    grid-template-columns: 1fr;
  }

  .insight-summary article,
  .kpi,
  .insight-card {
    min-height: 0;
  }

  .panel header {
    align-items: flex-start;
  }

  .country-scope-label {
    max-width: 45%;
    overflow-wrap: anywhere;
    text-align: right;
  }
}

.table-wrap[data-dashboard-table-measured="true"] {
  height: var(--dashboard-table-viewport-height);
  max-height: var(--dashboard-table-viewport-height);
  overflow-x: hidden;
  overflow-x: clip;
}

.interactive-series-chart,
.interactive-donut-chart {
  position: relative;
  display: grid;
  gap: 10px;
  height: 100%;
  min-height: 0;
}

.interactive-chart-host {
  min-height: 300px;
  max-width: 100%;
  overflow: clip;
}

.interactive-chart-controls {
  display: grid;
  grid-template-columns: minmax(140px, 220px) minmax(0, 1fr);
  align-items: start;
  gap: 10px;
}

.interactive-chart-controls input[type="search"] {
  width: 100%;
  height: 30px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
}

.interactive-chart-legend {
  display: flex;
  min-width: 0;
  max-width: 100%;
  flex-wrap: wrap;
  gap: 6px 10px;
  max-height: 62px;
  overflow-x: clip;
  overflow-y: auto;
}

.interactive-chart-legend-item {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.interactive-chart-legend-item input {
  margin: 0;
}

.interactive-chart-legend-item i {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
}

.interactive-chart-empty {
  display: grid;
  min-height: 120px;
  place-items: center;
  padding: 24px 12px;
  color: var(--muted);
  text-align: center;
}

.interactive-series-chart svg,
.interactive-donut-chart svg {
  width: 100%;
  height: 100%;
  min-height: 0;
}

.interactive-chart-guide {
  stroke: var(--line);
  stroke-width: 1;
}

.interactive-chart-axis-label {
  fill: var(--muted);
  font-size: 10px;
}

.interactive-series-line {
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.interactive-series-dot {
  pointer-events: none;
}

.interactive-chart-hit,
.interactive-donut-slice {
  cursor: pointer;
  outline: none;
}

.interactive-chart-hit:focus {
  fill: rgba(37, 99, 235, 0.12);
  stroke: #1d4ed8;
  stroke-width: 2;
}

.interactive-donut-slice:focus {
  stroke: var(--ink);
  stroke-width: 3;
}

.interactive-chart-tooltip {
  position: absolute;
  z-index: 3;
  max-width: min(190px, calc(100% - 16px));
  padding: 7px 9px;
  border-radius: 6px;
  background: rgba(17, 24, 39, 0.95);
  color: #fff;
  font-size: 11px;
  line-height: 1.45;
  pointer-events: none;
  overflow-wrap: anywhere;
  opacity: 0;
  transform: none;
  transition: opacity 120ms ease;
}

.interactive-chart-tooltip.is-visible {
  opacity: 1;
}

.interactive-donut-chart {
  place-items: center;
}

.interactive-donut-chart svg {
  max-width: 340px;
}

.interactive-donut-total {
  fill: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.interactive-donut-amount {
  fill: var(--ink);
  font-size: 17px;
  font-weight: 700;
}

@media (max-width: 639px) {
  .interactive-chart-controls {
    grid-template-columns: 1fr;
  }
}

/* table-readable-type-floor */
table th,
table th *,
table td,
table td small,
table td .metric-stack,
table td .metric-stack *,
table .tag,
table td [class*="-meta"] {
  font-size: 12px;
}

/* desktop-workstation-layout */
@media (min-width: 721px) {
  .topbar-main,
  .filterbar,
  .app {
    max-width: 1360px;
  }

  .topbar-main,
  .filterbar {
    padding-left: 28px;
    padding-right: 28px;
  }

  .app {
    padding-inline: 28px;
  }

  .page-heading {
    margin-bottom: 10px;
  }

  .context-filterbar {
    grid-template-columns: repeat(auto-fit, minmax(148px, 188px));
    padding: 9px;
  }

  .insight-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .insight-summary article {
    min-height: 56px;
    padding: 9px 12px;
  }

  .insight-summary span,
  .kpi span {
    font-size: 11px;
  }

  .insight-summary strong {
    font-size: 14px;
  }

  .kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .kpi {
    min-height: 66px;
    padding: 9px 11px;
  }

  .kpi strong {
    font-size: 19px;
  }

  .kpi small {
    font-size: 11px;
  }

  .action-insights {
    display: none;
  }

  .overview-alert-panel .alerts {
    grid-template-columns: 1fr;
  }

  .panel header {
    min-height: 42px;
    padding: 9px 12px;
  }

  h3 {
    font-size: 14px;
  }

  .chart {
    height: 300px;
  }

  .chart.small {
    height: 290px;
  }

  .interactive-chart-controls {
    grid-template-columns: minmax(160px, 200px) minmax(0, 1fr);
    gap: 8px;
  }

  .interactive-chart-host {
    height: 280px;
    min-height: 280px;
  }

  .interactive-chart-legend {
    max-height: 42px;
    gap: 5px 9px;
  }

  .interactive-chart-legend-item {
    font-size: 12px;
  }

  table th,
  table th * {
    font-size: 12px;
  }

  table td,
  table td .metric-stack,
  table td .metric-stack * {
    font-size: 13px;
  }
}

@media (min-width: 1200px) {
  .kpi-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  body:has(#creativeView:not(.hidden)) .context-filterbar {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }

  body:has(#channelsView:not(.hidden)) .kpi-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr)) minmax(240px, 1.5fr);
  }

  body:has(#channelsView:not(.hidden)) .kpi strong {
    font-size: 17px;
    line-height: 1.15;
  }
}

@media (min-width: 1600px) {
  .topbar-main,
  .filterbar {
    padding-left: 32px;
    padding-right: 32px;
  }

  .app {
    padding-inline: 32px;
  }
}

/* compact-mobile-table-grid */
@media (max-width: 720px) {
  .table-wrap tbody > tr,
  .table-wrap tfoot > tr {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    align-items: stretch;
  }

  .table-wrap tbody > tr {
    margin: 8px 0;
  }

  .table-wrap tbody > tr > td,
  .table-wrap tfoot > tr > td {
    position: static;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    gap: 2px;
    min-width: 0;
    min-height: 0;
    padding: 6px 8px;
    font-size: 12px;
    line-height: 1.3;
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .table-wrap tbody > tr > td:first-child,
  .table-wrap tfoot > tr > td:first-child {
    grid-column: 1 / -1;
  }

  .table-wrap td::before {
    display: block;
    font-size: 12px;
    line-height: 1.2;
  }

  .table-wrap td .metric-stack {
    width: 100%;
    justify-items: start;
    white-space: normal;
  }
}

/* creative-segment-intrinsic-flow */
.creative-segment-module {
  grid-auto-rows: max-content;
  align-items: start;
}

.creative-segment-module > .panel {
  display: flex;
  flex-direction: column;
  height: auto;
  min-height: 0;
}

.creative-segment-module > .panel > header,
.creative-segment-module > .panel > .chart,
.creative-segment-module > .panel > .donut-card,
.creative-segment-module > .panel > .drilldown-breadcrumb,
.creative-segment-module > .panel > .table-wrap {
  flex: 0 0 auto;
}

/* creative-product-material-matrix */
#creativeProductMaterialTable {
  --creative-matrix-group-row-height: 28px;
  width: 100%;
  table-layout: fixed;
}

.table-wrap:has(> #creativeProductMaterialTable) {
  overflow-x: hidden;
  overflow-x: clip;
}

#creativeProductMaterialTable th,
#creativeProductMaterialTable td {
  padding-inline: 4px;
  font-size: 11px;
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: anywhere;
}

#creativeProductMaterialTable thead tr:not(.table-group-row) th:first-child,
#creativeProductMaterialTable td:first-child {
  width: 16%;
}

#creativeProductMaterialTable thead tr:not(.table-group-row) th:nth-child(n + 2),
#creativeProductMaterialTable td:nth-child(n + 2) {
  width: 8.4%;
}

#creativeProductMaterialTable .table-group-row th {
  top: 0;
  height: var(--creative-matrix-group-row-height);
  box-sizing: border-box;
  z-index: 8;
  text-align: center;
  border-bottom: 1px solid var(--line);
  color: #475569;
  font-weight: 850;
}

#creativeProductMaterialTable .table-group-row th:first-child {
  position: sticky;
  left: 0;
  z-index: 12;
  width: 16%;
  background: #eef4fb;
  box-shadow: 2px 0 0 #c9d8ea, 8px 0 14px rgba(39, 73, 112, 0.06);
}

#creativeProductMaterialTable .table-group-row th:nth-child(2) {
  width: 8.4%;
  background: #f4f6f9;
}

#creativeProductMaterialTable .table-group-row th:nth-child(n + 3) {
  width: 25.2%;
}

#creativeProductMaterialTable thead tr:not(.table-group-row) th {
  top: var(--creative-matrix-group-row-height);
  z-index: 7;
}

#creativeProductMaterialTable thead tr:not(.table-group-row) th:first-child,
#creativeProductMaterialTable tbody td:first-child,
#creativeProductMaterialTable tfoot td:first-child {
  position: sticky;
  left: 0;
  z-index: 10;
  background: #f8fbff;
  box-shadow: 2px 0 0 #c9d8ea, 8px 0 14px rgba(39, 73, 112, 0.06);
}

#creativeProductMaterialTable thead tr:not(.table-group-row) th:first-child {
  z-index: 11;
  background: #eef4fb;
}

#creativeProductMaterialTable tfoot td:first-child {
  z-index: 12;
  background: #edf4fc;
}

#creativeProductMaterialTable .material-group-image {
  background: #eef5ff;
  color: #2f5f9d;
}

#creativeProductMaterialTable .material-group-video {
  background: #edf8f4;
  color: #26705c;
}

#creativeProductMaterialTable .material-group-cocreate {
  background: #fff5e9;
  color: #94601f;
}

#creativeProductMaterialTable thead tr:not(.table-group-row) th:nth-child(n + 3):nth-child(-n + 5),
#creativeProductMaterialTable tbody td:nth-child(n + 3):nth-child(-n + 5),
#creativeProductMaterialTable tfoot td:nth-child(n + 3):nth-child(-n + 5) {
  background-color: rgba(238, 245, 255, 0.48);
}

#creativeProductMaterialTable thead tr:not(.table-group-row) th:nth-child(n + 6):nth-child(-n + 8),
#creativeProductMaterialTable tbody td:nth-child(n + 6):nth-child(-n + 8),
#creativeProductMaterialTable tfoot td:nth-child(n + 6):nth-child(-n + 8) {
  background-color: rgba(237, 248, 244, 0.5);
}

#creativeProductMaterialTable thead tr:not(.table-group-row) th:nth-child(n + 9),
#creativeProductMaterialTable tbody td:nth-child(n + 9),
#creativeProductMaterialTable tfoot td:nth-child(n + 9) {
  background-color: rgba(255, 245, 233, 0.52);
}

#creativeProductMaterialTable :is(th, td):nth-child(3),
#creativeProductMaterialTable :is(th, td):nth-child(6),
#creativeProductMaterialTable :is(th, td):nth-child(9) {
  border-left: 2px solid #cbd8e7;
}

#creativeProductMaterialTable .metric-stack {
  gap: 1px;
  white-space: normal;
}

#creativeProductMaterialTable .metric-stack strong,
#creativeProductMaterialTable .metric-stack small,
#creativeProductMaterialTable .cell-filter-button {
  font-size: inherit;
  overflow-wrap: anywhere;
}

/* creative-detail-decision-table */
.table-wrap:has(> #creativeDetailTable) {
  overflow-x: hidden;
  overflow-x: clip;
}

#creativeDetailTable {
  width: 100%;
  table-layout: fixed;
}

#creativeDetailTable th,
#creativeDetailTable td {
  padding-inline: 5px;
  font-size: 11px;
  line-height: 1.25;
  white-space: nowrap;
}

#creativeDetailTable th:nth-child(1),
#creativeDetailTable td:nth-child(1) { width: 13%; }

#creativeDetailTable th:nth-child(2),
#creativeDetailTable td:nth-child(2) { width: 15%; }

#creativeDetailTable th:nth-child(3),
#creativeDetailTable td:nth-child(3) { width: 13%; }

#creativeDetailTable th:nth-child(4),
#creativeDetailTable td:nth-child(4) { width: 8%; }

#creativeDetailTable th:nth-child(5),
#creativeDetailTable td:nth-child(5) { width: 8.5%; }

#creativeDetailTable th:nth-child(6),
#creativeDetailTable td:nth-child(6) { width: 7%; }

#creativeDetailTable th:nth-child(7),
#creativeDetailTable td:nth-child(7) { width: 7%; }

#creativeDetailTable th:nth-child(8),
#creativeDetailTable td:nth-child(8) { width: 8%; }

#creativeDetailTable th:nth-child(9),
#creativeDetailTable td:nth-child(9),
#creativeDetailTable th:nth-child(10),
#creativeDetailTable td:nth-child(10) { width: 6.5%; }

#creativeDetailTable th:nth-child(11),
#creativeDetailTable td:nth-child(11) { width: 7.5%; }

#creativeDetailTable td:first-child,
#creativeDetailTable td:nth-child(2) {
  overflow: hidden;
  text-overflow: ellipsis;
}

#creativeDetailTable .tag,
#creativeDetailTable .cell-filter-button {
  max-width: 100%;
  white-space: nowrap;
}

#creativeDetailTable .creative-detail-classification {
  display: grid;
  justify-items: center;
  gap: 2px;
  min-width: 0;
  white-space: normal;
}

#creativeDetailTable .creative-detail-classification strong,
#creativeDetailTable .creative-detail-classification small {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#creativeDetailTable .creative-detail-classification small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

@media (max-width: 720px) {
  #creativeProductMaterialTable {
    display: block;
    width: 100%;
    max-width: 100%;
  }

  #creativeProductMaterialTable thead {
    display: none;
  }

  #creativeProductMaterialTable tbody,
  #creativeProductMaterialTable tfoot {
    display: block;
  }

  #creativeProductMaterialTable tbody > tr,
  #creativeProductMaterialTable tfoot > tr {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    margin: 8px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: white;
    overflow: hidden;
  }

  #creativeProductMaterialTable td,
  #creativeProductMaterialTable td.sticky-col {
    position: static;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    width: auto;
    min-width: 0;
    min-height: 46px;
    border-radius: 0;
    padding: 6px;
    font-size: 12px;
    line-height: 1.25;
    text-align: left;
    overflow-wrap: normal;
  }

  #creativeProductMaterialTable tbody td:first-child,
  #creativeProductMaterialTable tfoot td:first-child,
  #creativeProductMaterialTable tbody td:nth-child(2),
  #creativeProductMaterialTable tfoot td:nth-child(2) {
    width: auto;
    grid-column: 1 / -1;
    min-height: 0;
    border-bottom: 1px solid var(--line);
  }

  #creativeProductMaterialTable tbody td:nth-child(n + 3),
  #creativeProductMaterialTable tfoot td:nth-child(n + 3) {
    width: auto;
  }

  #creativeProductMaterialTable tbody td:first-child,
  #creativeProductMaterialTable tfoot td:first-child {
    font-size: 13px;
    font-weight: 700;
  }

  #creativeProductMaterialTable td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 10px;
    font-weight: 600;
    line-height: 1.2;
  }

  #creativeProductMaterialTable .cell-filter-button,
  #creativeProductMaterialTable .metric-stack {
    width: 100%;
    justify-items: start;
    text-align: left;
  }

  #creativeProductMaterialTable .metric-stack strong,
  #creativeProductMaterialTable .metric-stack small,
  #creativeProductMaterialTable .cell-filter-button {
    overflow-wrap: normal;
    word-break: normal;
  }

  #creativeDetailTable {
    display: block;
    width: 100%;
    max-width: 100%;
    table-layout: auto;
  }

  #creativeDetailTable thead {
    display: none;
  }

  #creativeDetailTable tbody,
  #creativeDetailTable tfoot {
    display: block;
  }

  #creativeDetailTable tbody > tr,
  #creativeDetailTable tfoot > tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    margin: 8px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: white;
    overflow: hidden;
  }

  #creativeDetailTable tbody > tr > td,
  #creativeDetailTable tfoot > tr > td,
  #creativeDetailTable tbody > tr > td.sticky-col,
  #creativeDetailTable tfoot > tr > td.sticky-col {
    position: static;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    justify-items: center;
    gap: 3px;
    width: auto !important;
    min-width: 0;
    min-height: 44px;
    padding: 6px;
    text-align: center;
    white-space: normal;
    overflow-wrap: normal;
  }

  #creativeDetailTable tbody td:first-child,
  #creativeDetailTable tfoot td:first-child {
    grid-column: 1 / -1;
    min-height: 0;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
    font-weight: 700;
  }

  #creativeDetailTable td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    line-height: 1.2;
  }

  #creativeDetailTable .cell-filter-button,
  #creativeDetailTable .metric-stack,
  #creativeDetailTable .creative-detail-classification {
    width: 100%;
    max-width: 100%;
    justify-items: center;
    text-align: center;
    white-space: normal;
    overflow-wrap: normal;
  }
}

/* compact-trend-and-structure-layout */
.analysis-chart-row {
  display: grid;
  grid-template-columns: minmax(0, 2.25fr) minmax(340px, 0.9fr);
  gap: 14px;
  align-items: stretch;
}

.analysis-chart-row > .panel {
  min-width: 0;
}

.interactive-series-chart {
  height: 400px;
  min-height: 400px;
}

.interactive-series-chart.is-short-period .interactive-series-line {
  stroke-width: 2.8;
}

.interactive-series-chart.is-short-period .interactive-series-dot {
  opacity: 0.82;
}

.interactive-chart-controls {
  position: relative;
  z-index: 4;
  display: flex;
  justify-content: flex-end;
}

.interactive-chart-series-trigger {
  display: inline-flex;
  width: auto;
  min-width: 112px;
  height: 32px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.interactive-chart-series-trigger::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

.interactive-chart-series-trigger[aria-expanded="true"]::after {
  transform: translateY(2px) rotate(225deg);
}

.interactive-chart-series-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 5;
  width: min(340px, calc(100vw - 48px));
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.14);
}

.interactive-chart-series-panel:not([hidden]) {
  display: grid;
}

.interactive-chart-series-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.interactive-chart-series-actions button {
  height: 28px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-muted);
  color: var(--ink);
  font-size: 11px;
  cursor: pointer;
}

.interactive-chart-series-panel .interactive-chart-legend {
  display: grid;
  max-height: 220px;
  grid-template-columns: 1fr;
  gap: 7px;
  overflow-y: auto;
}

.interactive-chart-series-panel .interactive-chart-legend-item {
  font-size: 12px;
}

.interactive-chart-host.interactive-donut-chart {
  height: auto;
  min-height: 0;
}

.interactive-donut-body {
  display: grid;
  min-width: 0;
  align-items: center;
}

.interactive-donut-visual {
  min-width: 0;
  display: grid;
  place-items: center;
}

.interactive-donut-visual svg {
  display: block;
  height: auto;
  max-width: 100%;
}

.interactive-donut-legend {
  display: grid;
  max-height: 260px;
  gap: 8px;
  overflow-y: auto;
}

.interactive-donut-legend-item {
  display: grid;
  min-width: 0;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
}

.interactive-donut-legend-item i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.interactive-donut-legend-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.interactive-donut-legend-item strong {
  color: var(--ink);
  font-size: 11px;
}

.creative-segment-module > .analysis-chart-row,
.creative-segment-module > .creative-hierarchy-panel {
  min-width: 0;
}

#lifecycleView {
  min-width: 0;
  overflow-x: hidden;
  overflow-x: clip;
}

#lifecycleView table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.lifecycle-health,
.lifecycle-page-state {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.lifecycle-health p,
.lifecycle-action-panel header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.lifecycle-status-icon {
  display: inline-flex;
  width: 18px;
  flex: 0 0 18px;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.lifecycle-state-ready {
  border-color: var(--good);
}

.lifecycle-state-blocked,
.lifecycle-state-insufficient {
  border-color: var(--warn);
  background: var(--warn-soft);
}

.lifecycle-state-empty {
  border-style: dashed;
  color: var(--muted);
}

.lifecycle-state-loading {
  border-style: dashed;
  background: var(--surface-muted);
}

.lifecycle-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.lifecycle-kpi {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.lifecycle-kpi span,
.lifecycle-kpi small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.lifecycle-kpi strong {
  display: block;
  margin: 5px 0;
  font-size: 24px;
}

.lifecycle-table-scroll,
.lifecycle-scope-list {
  max-height: 440px;
  overflow-x: hidden;
  overflow-y: auto;
}

.lifecycle-action-panel th:nth-child(2),
.lifecycle-action-panel td:nth-child(2) {
  width: 17%;
}

.lifecycle-link {
  display: inline-block;
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.lifecycle-ellipsis {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lifecycle-badge {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  gap: 3px;
  border-radius: 999px;
  padding: 2px 6px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.lifecycle-badge-good { color: var(--good); background: var(--good-soft); }
.lifecycle-badge-warn { color: var(--warn); background: var(--warn-soft); }
.lifecycle-badge-bad { color: var(--danger); background: var(--danger-soft); }
.lifecycle-badge-muted { color: var(--muted); background: var(--surface-muted); }

.lifecycle-priority {
  font-weight: 800;
  white-space: nowrap;
}

.lifecycle-inline-detail {
  margin-top: 5px;
  color: var(--ink);
  font-weight: 400;
  white-space: normal;
}

.lifecycle-inline-detail summary {
  width: max-content;
  max-width: 100%;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.lifecycle-inline-detail dl {
  display: grid;
  gap: 5px;
  margin: 8px 0 2px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-muted);
}

.lifecycle-inline-detail dl div {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(84px, 0.4fr) minmax(0, 1fr);
  gap: 6px;
}

.lifecycle-inline-detail dt {
  color: var(--muted);
  font-size: 11px;
}

.lifecycle-inline-detail dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 11px;
}

.lifecycle-blocked-content {
  display: none !important;
}

.lifecycle-detail {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 30;
  width: min(620px, calc(100vw - 40px));
  max-height: min(720px, calc(100vh - var(--topbar-height) - 40px));
  overflow-y: auto;
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.2);
}

.lifecycle-detail-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: center;
}

.lifecycle-chart-windows {
  width: max-content;
  max-width: 100%;
  margin: 16px 0 10px;
}

.lifecycle-metric-grid {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.lifecycle-metric-chart {
  min-width: 0;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
}

.lifecycle-metric-chart figcaption {
  display: flex;
  min-width: 0;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
}

.lifecycle-metric-chart figcaption span {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lifecycle-metric-chart svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.lifecycle-metric-line {
  fill: none;
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.5;
}

.lifecycle-metric-chart [data-baseline] {
  stroke: var(--muted);
  stroke-width: 1.2;
}

.lifecycle-hover-line {
  stroke: var(--ink);
  stroke-dasharray: 2 3;
  stroke-width: 1;
  pointer-events: none;
}

.lifecycle-hover-target {
  cursor: crosshair;
}

.lifecycle-hover-target:focus {
  outline: 3px solid var(--accent);
  outline-offset: -3px;
}

.lifecycle-metric-data-wrap {
  grid-column: 1 / -1;
  max-height: 180px;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

#lifecycleView .lifecycle-metric-data {
  width: 100%;
  table-layout: fixed;
  font-size: 11px;
}

.lifecycle-metric-data th,
.lifecycle-metric-data td {
  padding: 5px 6px;
  text-align: right;
}

.lifecycle-metric-data th:first-child {
  text-align: left;
}

.lifecycle-evidence-explanation {
  display: grid;
  margin-top: 14px;
  gap: 8px;
}

.lifecycle-evidence-explanation article {
  padding: 10px 12px;
  border-left: 3px solid var(--line);
  background: var(--surface-muted);
}

.lifecycle-evidence-explanation h4,
.lifecycle-evidence-explanation ul {
  margin: 0;
}

.lifecycle-evidence-explanation ul {
  padding: 5px 0 0 18px;
  color: var(--muted);
  font-size: 12px;
}

.lifecycle-detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}

.lifecycle-detail-actions a {
  text-decoration: none;
}

.lifecycle-detail-actions p {
  flex: 1 1 100%;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.lifecycle-scope-list {
  display: grid;
  gap: 8px;
}

.lifecycle-scope-list article {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.lifecycle-scope-list p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 1050px) {
  .lifecycle-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .lifecycle-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #lifecycleView .lifecycle-secondary {
    display: none;
  }

  .lifecycle-action-panel th:nth-child(2),
  .lifecycle-action-panel td:nth-child(2) {
    width: 28%;
  }

  .lifecycle-detail {
    right: 8px;
    bottom: 8px;
    width: calc(100vw - 16px);
  }

  .lifecycle-metric-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  .analysis-chart-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .interactive-series-chart {
    height: 360px;
    min-height: 360px;
  }
}

@media (max-width: 520px) {
  .interactive-chart-series-panel {
    width: min(320px, calc(100vw - 32px));
  }
}

/* centered-analytical-tables */
table th,
table td {
  text-align: center;
}

/* skintific-reference-language */
:root {
  --canvas: #edf5ff;
  --surface: #ffffff;
  --surface-muted: #f6f9fd;
  --accent: #1265d6;
  --accent-strong: #0b55bd;
  --accent-soft: #eaf3ff;
  --chart-teal: #11877b;
  --chart-amber: #df940f;
  --chart-red: #dc3545;
  --ink: #20242d;
  --muted: #737a88;
  --line: #e1e7ef;
  --border-strong: #d4deea;
  --panel: var(--surface);
  --bg: var(--canvas);
  --good: #0d8a76;
  --danger: #df2d32;
  --warn: #bf730d;
  --shadow: 0 1px 2px rgba(31, 41, 55, 0.04), 0 8px 22px rgba(37, 99, 150, 0.055);
  --topbar-height: 176px;
}

body,
.cockpit-shell-marker {
  background: var(--canvas);
  color: var(--ink);
}

.topbar {
  border-bottom: 0;
  background: rgba(237, 245, 255, 0.97);
  box-shadow: 0 1px 0 rgba(148, 163, 184, 0.22);
  backdrop-filter: blur(14px);
}

.topbar-main,
.filterbar,
.app {
  width: min(100%, 1520px);
  max-width: 1520px;
}

.topbar-main {
  min-height: 60px;
  padding: 12px 26px 8px;
  align-items: center;
}

.brand {
  display: block;
}

.brand-mark {
  display: none;
}

.brand h1 {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
  line-height: 1.15;
}

.brand-name {
  color: #20242d;
  font-size: 24px;
  font-weight: 850;
}

.brand-dashboard-name {
  color: #20242d;
  font-size: 20px;
  font-weight: 800;
}

.brand-context {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.brand p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.tabs {
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
}

.tab {
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.9);
  color: #697180;
  font-size: 12px;
  font-weight: 750;
  box-shadow: none;
}

.tab:hover {
  border-color: #a9c6eb;
  background: #fff;
  color: var(--accent);
}

.tab.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 10px rgba(18, 101, 214, 0.2);
}

.filterbar {
  margin: 0 auto 12px;
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  gap: 9px;
}

.filterbar label,
.filterbar .filter-label,
.context-filterbar .filter-label {
  margin-bottom: 5px;
  color: #747c89;
  font-size: 11px;
  font-weight: 750;
}

.date-presets,
.segmented-control {
  border-color: var(--border-strong);
  background: #f5f7fa;
}

.date-presets button {
  height: 34px;
  padding: 0 11px;
  font-size: 12px;
}

.date-presets button:hover,
.date-presets button.active,
.segmented-control button.active,
.segmented-control button[aria-pressed="true"] {
  background: var(--accent);
  color: #fff;
  box-shadow: none;
}

select,
input[type="date"],
.multi-trigger,
.apply-time-button,
.context-filterbar .ghost-button {
  height: 36px;
  border-radius: 7px;
  font-size: 12px;
}

select,
input[type="date"],
.multi-trigger {
  border-color: var(--border-strong);
  background: #fff;
}

select:hover,
input[type="date"]:hover,
.multi-trigger:hover {
  border-color: #9dbce3;
}

select:focus,
input[type="date"]:focus,
.multi-trigger:focus-visible {
  border-color: var(--accent);
  outline: 3px solid rgba(18, 101, 214, 0.13);
}

.multi-trigger.has-selection {
  border-color: #8fb5e8;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.apply-time-button {
  min-width: 92px;
  border-color: var(--accent);
  background: var(--accent);
  font-weight: 800;
}

.apply-time-button:hover,
.apply-time-button.has-pending {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
}

.period-hint {
  padding-top: 1px;
  color: #7c8492;
  font-size: 11px;
}

.app {
  padding: 18px 26px 38px;
}

.page-heading {
  min-height: 48px;
  margin-bottom: 10px;
  padding: 0 2px;
  align-items: center;
}

.page-heading h2 {
  color: #22262f;
  font-size: 22px;
  font-weight: 850;
}

.page-heading p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.period-badge {
  border-color: #d4e2f4;
  border-radius: 7px;
  background: #f7fbff;
  color: #526176;
  font-size: 11px;
}

.context-filterbar {
  top: calc(var(--topbar-height) + 6px);
  margin-bottom: 12px;
  padding: 10px;
  border-color: var(--border-strong);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
}

.context-filterbar .ghost-button {
  border-color: #d8e1ec;
  background: #f8fafc;
  color: #526176;
}

.active-filter-note {
  min-height: 36px;
  border-color: #c6daf5;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.insight-summary {
  gap: 10px;
  margin-bottom: 10px;
}

.insight-summary article {
  min-height: 64px;
  padding: 11px 14px;
  border-color: var(--border-strong);
  border-left: 3px solid var(--accent);
  background: var(--surface);
}

.insight-summary span {
  color: var(--muted);
  font-size: 11px;
}

.insight-summary strong {
  margin-top: 5px;
  color: #22262f;
  font-size: 15px;
}

.kpi-grid {
  gap: 10px;
  margin-bottom: 12px;
}

.kpi,
.lifecycle-kpi,
.attribution-kpi-grid article,
.onsite-summary article,
.source-health-card {
  min-height: 96px;
  padding: 14px 15px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.kpi span,
.lifecycle-kpi span,
.attribution-kpi-grid article span,
.onsite-summary article span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.kpi strong,
.lifecycle-kpi strong,
.attribution-kpi-grid article strong,
.onsite-summary article strong {
  margin-top: 9px;
  color: #20242d;
  font-size: 27px;
  font-weight: 850;
  line-height: 1.05;
}

.kpi small,
.lifecycle-kpi small,
.attribution-kpi-grid article small,
.onsite-summary article small {
  margin-top: 9px;
  font-size: 12px;
  font-weight: 750;
}

.panel {
  border-color: var(--border-strong);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel > header {
  min-height: 54px;
  padding: 11px 15px;
  border-bottom-color: var(--line);
  background: #fff;
}

.panel > header h3 {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  color: #242832;
  font-size: 16px;
  font-weight: 850;
  line-height: 1.25;
}

.panel > header h3::before {
  content: "";
  width: 4px;
  height: 22px;
  flex: 0 0 4px;
  margin-right: 9px;
  border-radius: 2px;
  background: var(--accent);
}

/* Low-frequency detail tables stay available without dominating the page. */
.collapsible-data-panel {
  overflow: hidden;
}

.collapsible-data-panel > details > summary {
  display: block;
  min-height: 54px;
  padding: 0;
  border-bottom: 0;
  background: #fff;
  cursor: pointer;
  list-style: none;
}

.collapsible-data-panel > details > summary::-webkit-details-marker {
  display: none;
}

.collapsible-panel-heading {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 15px;
}

.collapsible-panel-title {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.collapsible-panel-title h3 {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  margin: 0;
  color: #242832;
  font-size: 16px;
  font-weight: 850;
  line-height: 1.25;
}

.collapsible-panel-title h3::before {
  content: "";
  width: 4px;
  height: 22px;
  flex: 0 0 4px;
  margin-right: 9px;
  border-radius: 2px;
  background: var(--accent);
}

.collapsible-panel-title .metric-info {
  display: inline-grid;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  place-items: center;
  border: 1px solid #d6e1ee;
  border-radius: 50%;
  background: #f5f9ff;
  color: #67809f;
  font-size: 12px;
  font-weight: 800;
}

.collapsible-panel-action {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.collapsible-panel-action::before {
  content: "展开明细";
}

.collapsible-panel-action::after {
  content: "";
  display: grid;
  width: 7px;
  height: 7px;
  margin: 0 4px 4px 2px;
  border-right: 1.5px solid #64748b;
  border-bottom: 1.5px solid #64748b;
  transform: rotate(45deg);
  transition: transform 140ms ease, margin 140ms ease;
}

.collapsible-data-panel > details[open] > summary {
  border-bottom: 1px solid var(--line);
}

.collapsible-data-panel > details[open] .collapsible-panel-action::before {
  content: "收起明细";
}

.collapsible-data-panel > details[open] .collapsible-panel-action::after {
  margin: 4px 4px 0 2px;
  transform: rotate(225deg);
}

.collapsible-panel-body {
  min-width: 0;
}

.panel-note,
.panel > header p {
  color: var(--muted);
  font-size: 11px;
}

.metric-info {
  border-color: #d6e1ee;
  background: #f5f9ff;
  color: #67809f;
}

.overview-layout {
  grid-template-columns: minmax(0, 2fr) minmax(280px, 0.82fr);
  gap: 14px;
}

.view-shell,
.analysis-chart-row,
.split-grid,
.rank-grid,
.creative-segment-module,
.landing-detail-stack {
  gap: 14px;
}

.analysis-chart-row {
  grid-template-columns: minmax(0, 2.25fr) minmax(290px, 0.9fr);
}

.trend-body {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 270px);
}

.chart,
.chart.small {
  height: 360px;
}

.interactive-series-chart {
  height: 360px;
  min-height: 360px;
}

.interactive-chart-host {
  min-height: 320px;
}

.interactive-chart-host.interactive-donut-chart {
  min-height: 0;
  place-items: stretch;
}

.chart-conclusion {
  padding: 18px 16px;
  border-left-color: var(--line);
  background: #f8fbff;
}

.chart-conclusion strong {
  color: #242832;
  font-size: 13px;
}

.chart-conclusion p {
  color: #596579;
  font-size: 12px;
  line-height: 1.6;
}

.interactive-chart-guide,
.grid-line {
  stroke: #e8edf4;
}

.line {
  stroke: var(--accent);
}

.shopify-line {
  stroke: var(--chart-teal);
}

.interactive-chart-axis-label,
.axis text {
  fill: #89909b;
}

.interactive-chart-series-trigger,
.compact-select {
  border-color: var(--border-strong);
  background: #fff;
}

.interactive-donut-legend-item {
  padding: 4px 0;
  font-size: 12px;
}

.bars,
.alerts {
  padding: 14px 16px 16px;
}

.bar-row {
  padding: 9px 0;
}

.bar-track {
  background: #edf1f6;
}

.bar-fill {
  background: var(--accent);
}

.alert-item {
  border-color: #eadcc9;
  border-left: 3px solid var(--warn);
  border-radius: 7px;
  background: #fffdfa;
}

.table-insight,
.table-conclusion {
  margin: 0;
  padding: 10px 14px;
  border-left: 0;
  border-bottom: 1px solid var(--line);
  background: #f8fbff;
  color: #596579;
  font-size: 12px;
}

.table-wrap {
  border-color: var(--line);
  background: #fff;
}

table th {
  min-height: 42px;
  padding: 10px 8px;
  border-bottom-color: #dbe4ef;
  background: #f3f7fd;
  color: #687386;
  font-size: 12px;
  font-weight: 800;
}

table td {
  padding: 10px 8px;
  color: #303743;
  font-size: 13px;
  line-height: 1.35;
}

tbody tr:nth-child(even) td {
  background: #fbfdff;
}

tbody tr:hover td {
  background: #f1f7ff;
}

tfoot td,
tfoot td.sticky-col {
  border-top-color: #cfdbea;
  background: #edf4fc;
}

table .metric-stack {
  gap: 5px;
}

table .metric-stack strong {
  color: #242832;
  font-size: 13px;
}

table .metric-stack small {
  font-size: 12px;
}

.table-copy-button {
  width: 32px;
  height: 32px;
  flex-basis: 32px;
  border-color: #cbd9eb;
  border-radius: 7px;
  background: #f6faff;
  color: var(--accent);
}

.multi-panel,
.interactive-chart-series-panel {
  border-color: var(--border-strong);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(34, 58, 88, 0.16);
}

@media (min-width: 1200px) {
  .kpi-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .attribution-kpi-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  body:has(#channelsView:not(.hidden)) .kpi-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr)) minmax(260px, 1.45fr);
  }

  body:has(#channelsView:not(.hidden)) .kpi:last-child strong {
    font-size: 16px;
    line-height: 1.25;
  }
}

@media (max-width: 1180px) {
  :root {
    --topbar-height: 196px;
  }

  .topbar-main {
    align-items: flex-start;
    flex-direction: column;
  }

  .tabs {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .tab {
    padding-inline: 8px;
  }

  .overview-layout,
  .analysis-chart-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .context-filterbar {
    position: static;
  }

  .trend-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .chart-conclusion {
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}

@media (max-width: 720px) {
  :root {
    --topbar-height: 0px;
  }

  .topbar {
    position: static;
  }

  .topbar-main,
  .filterbar,
  .app {
    padding-left: 12px;
    padding-right: 12px;
  }

  .topbar-main {
    padding-top: 10px;
  }

  .brand h1 {
    flex-wrap: wrap;
    gap: 3px 7px;
  }

  .brand-name {
    font-size: 19px;
  }

  .brand-dashboard-name {
    font-size: 17px;
  }

  .brand-context {
    flex-basis: 100%;
    font-size: 11px;
  }

  .tabs {
    gap: 5px;
  }

  .tab {
    min-width: 0;
    height: 34px;
    padding: 0 4px;
    font-size: 11px;
  }

  .filterbar {
    width: auto;
    margin-inline: 10px;
    padding: 10px;
  }

  .page-heading h2 {
    font-size: 20px;
  }

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

  .kpi,
  .lifecycle-kpi,
  .attribution-kpi-grid article,
  .onsite-summary article {
    min-height: 88px;
    padding: 12px;
  }

  .kpi strong,
  .lifecycle-kpi strong,
  .attribution-kpi-grid article strong,
  .onsite-summary article strong {
    font-size: 22px;
  }

  .panel > header {
    min-height: 48px;
    padding: 10px 12px;
  }

  .panel > header h3 {
    font-size: 14px;
  }

  .panel > header h3::before {
    height: 18px;
  }

  .chart,
  .chart.small,
  .interactive-series-chart {
    height: 320px;
    min-height: 320px;
  }

  .interactive-chart-host {
    min-height: 300px;
  }

  .interactive-chart-host.interactive-donut-chart {
    min-height: 0;
  }

  table th,
  table td,
  table td.num,
  table th.num,
  .table-wrap tbody > tr > td,
  .table-wrap tfoot > tr > td {
    text-align: center;
  }

  .table-wrap td .metric-stack {
    justify-items: center;
  }
}

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

table .google-sort-button {
  justify-content: center;
  text-align: center;
}

table .metric-stack {
  justify-items: center;
}

table .cell-filter-button,
table .tree-node,
table .material-label {
  justify-content: center;
  text-align: center;
}

@media (max-width: 720px) {
  .table-wrap td {
    text-align: center;
  }

  .table-wrap td.num {
    text-align: center;
  }

  .table-wrap .metric-stack {
    justify-items: center;
  }
}

/* chart-visual-refresh */
body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", "Segoe UI", sans-serif;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
}

button,
input,
select,
table {
  font-family: inherit;
}

.brand-name,
.brand-dashboard-name,
.page-heading h2,
.panel > header h3 {
  letter-spacing: 0;
}

.kpi strong,
.interactive-donut-amount,
.donut-visual text,
.axis text,
.interactive-chart-axis-label {
  font-variant-numeric: tabular-nums;
}

.chart,
.chart.small {
  height: 380px;
  padding: 12px 16px 10px;
  overflow: hidden;
}

.interactive-series-chart {
  height: 410px;
  min-height: 410px;
  padding: 10px 14px 12px;
}

.interactive-chart-host {
  min-height: 350px;
}

.interactive-chart-host.interactive-donut-chart {
  min-height: 0;
}

.chart > .dual-legend {
  min-height: 28px;
  padding: 0 4px 8px;
}

.chart > .dual-legend + svg {
  height: calc(100% - 28px);
}

.interactive-chart-guide,
.grid-line {
  stroke: #e5ebf3;
  stroke-width: 1;
}

.interactive-chart-axis-label,
.axis text {
  fill: #7e8797;
  font-size: 11px;
  font-weight: 500;
}

.axis text.x-tick {
  font-size: 11px;
}

.interactive-series-line,
.line {
  fill: none;
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.area {
  fill: rgba(18, 101, 214, 0.035);
}

.interactive-series-dot {
  opacity: 0;
  transition: opacity 120ms ease;
}

.interactive-chart-hit:hover + .interactive-series-dot,
.interactive-chart-hit:focus + .interactive-series-dot {
  opacity: 1;
}

.interactive-chart-tooltip,
.chart-tooltip rect {
  filter: drop-shadow(0 6px 14px rgba(15, 23, 42, 0.18));
}

.interactive-donut-body {
  grid-template-columns: minmax(230px, 0.78fr) minmax(0, 1.22fr);
  align-items: center;
  gap: 16px;
  padding: 12px 14px 16px;
}

.interactive-donut-visual {
  width: 100%;
  justify-self: stretch;
}

.interactive-donut-visual svg {
  width: clamp(208px, 18vw, 248px);
  justify-self: center;
  margin-inline: auto;
}

.interactive-donut-total {
  font-size: 13px;
  font-weight: 650;
}

.interactive-donut-amount {
  font-size: 17px;
  font-weight: 750;
}

.interactive-donut-slice {
  transition: opacity 120ms ease, transform 120ms ease;
  transform-origin: center;
}

.interactive-donut-slice:hover,
.interactive-donut-slice:focus {
  opacity: 0.86;
}

.donut-card {
  grid-template-columns: minmax(152px, 0.72fr) minmax(0, 1.28fr);
}

.donut-visual {
  width: 148px;
  height: 148px;
}

.donut-card .donut-visual {
  justify-self: center;
}

.single-donut .donut-visual {
  width: 176px;
  height: 176px;
}

@media (max-width: 900px) {
  .interactive-series-chart {
    height: 390px;
    min-height: 390px;
  }
}

@media (max-width: 720px) {
  .chart,
  .chart.small,
  .interactive-series-chart {
    height: 340px;
    min-height: 340px;
  }

  .interactive-chart-host {
    min-height: 310px;
  }

  .interactive-chart-host.interactive-donut-chart {
    min-height: 0;
  }

  .interactive-donut-body {
    grid-template-columns: minmax(138px, 0.8fr) minmax(0, 1.2fr);
    gap: 10px;
    padding-inline: 10px;
  }

  .interactive-donut-visual svg {
    width: clamp(146px, 40vw, 160px);
  }

  .donut-card {
    grid-template-columns: minmax(128px, 0.8fr) minmax(0, 1.2fr);
  }
}

/* creative-content-direction-readable-layout */
.table-wrap:has(> #creativeImageContentTable) {
  overflow-x: hidden;
  overflow-y: auto;
}

#creativeImageContentTable th,
#creativeImageContentTable td {
  box-sizing: border-box;
  vertical-align: top;
  overflow-wrap: anywhere;
  white-space: normal;
}

#creativeImageContentTable .creative-content-parent-row td {
  vertical-align: middle;
}

#creativeImageContentTable .creative-content-child-row td:first-child {
  padding-left: 12px;
}

#creativeImageContentTable .creative-content-definition,
#creativeImageContentTable .creative-content-definition > span {
  max-width: 100%;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
}

#creativeImageContentTable .creative-content-expand strong,
#creativeImageContentTable .creative-content-child-label {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
}

@media (max-width: 720px) {
  .table-wrap:has(> #creativeImageContentTable) {
    overflow-x: hidden;
  }

  .creative-content-material-panel .table-wrap:has(> #creativeImageMaterialTable) {
    max-height: none;
    overflow-x: hidden;
  }

  #creativeImageMaterialTable {
    display: block;
    width: 100%;
    min-width: 0;
  }

  #creativeImageMaterialTable thead {
    display: none;
  }

  #creativeImageMaterialTable tbody {
    display: block;
  }

  #creativeImageMaterialTable tbody > tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 8px 0;
    border: 1px solid var(--line);
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
  }

  #creativeImageMaterialTable tbody > tr > td {
    display: grid;
    grid-template-columns: minmax(58px, 42%) minmax(0, 1fr);
    align-items: start;
    gap: 6px;
    min-width: 0;
    width: 100% !important;
    padding: 7px 8px;
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  #creativeImageMaterialTable tbody > tr > td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
  }

  #creativeImageMaterialTable tbody > tr > td:first-child {
    grid-column: 1 / -1;
    display: block;
    width: 100% !important;
    min-width: 0;
    padding: 9px;
  }

  #creativeImageMaterialTable tbody > tr > td:first-child::before {
    display: none;
  }

  #creativeImageMaterialTable .creative-material-cell {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 10px;
  }

  #creativeImageMaterialTable .creative-material-thumb {
    width: 64px;
    height: 64px;
    line-height: 64px;
  }

  #creativeImageMaterialTable .creative-material-cell strong,
  #creativeImageMaterialTable .creative-material-cell small {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  #creativeImageContentTable {
    width: 100%;
    min-width: 0;
    table-layout: auto;
  }

  #creativeImageContentTable thead {
    display: block;
  }

  #creativeImageContentTable thead tr {
    display: block;
    margin: 0;
    border: 0;
  }

  #creativeImageContentTable thead th {
    display: none;
  }

  #creativeImageContentTable tbody,
  #creativeImageContentTable tfoot {
    display: block;
  }

  #creativeImageContentTable tbody > tr,
  #creativeImageContentTable tfoot > tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 8px 0;
    border: 1px solid var(--line);
    border-radius: 6px;
    overflow: hidden;
  }

  #creativeImageContentTable tbody > tr > td,
  #creativeImageContentTable tfoot > tr > td {
    display: grid;
    grid-template-columns: minmax(66px, 36%) minmax(0, 1fr);
    gap: 6px;
    min-width: 0;
    width: 100% !important;
    padding: 7px 8px;
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  #creativeImageContentTable tbody > tr > td:first-child,
  #creativeImageContentTable tfoot > tr > td:first-child {
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr);
    width: 100% !important;
  }

  #creativeImageContentTable tbody > tr > td:nth-child(4),
  #creativeImageContentTable tfoot > tr > td:nth-child(4) {
    grid-column: 1 / -1;
    display: block;
  }

  #creativeImageContentTable tbody > tr > td:nth-child(4)::before,
  #creativeImageContentTable tfoot > tr > td:nth-child(4)::before {
    margin-bottom: 5px;
  }

  #creativeImageContentTable tbody > tr > td:first-child::before,
  #creativeImageContentTable tfoot > tr > td:first-child::before {
    display: none;
  }

  #creativeImageContentTable td::before {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
  }

  #creativeImageContentTable .creative-content-representatives {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #creativeImageContentTable .creative-content-metric-pair {
    justify-items: start;
  }

  #creativeImageContentTable .creative-dimension-breakdown {
    position: static;
    width: 100%;
    max-height: 420px;
    margin-top: 7px;
    box-shadow: none;
  }
}

/* country-product-region-matrix-final */
@media (max-width: 720px) {
  #countryDetailTable tbody > tr,
  #countryDetailTable tfoot > tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
  }

  #countryDetailTable tbody > tr > td,
  #countryDetailTable tfoot > tr > td {
    display: block;
    min-width: 0;
    padding: 9px;
  }

  #countryDetailTable tbody > tr > td:first-child,
  #countryDetailTable tfoot > tr > td:first-child {
    grid-column: 1 / -1;
  }

  #countryDetailTable td::before {
    display: block;
    margin-bottom: 6px;
    text-align: center;
  }

  #countryDetailTable .product-region-label {
    justify-items: center;
  }

  #countryDetailTable .product-region-total {
    justify-content: center;
  }

  #countryDetailTable .region-support-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #countryDetailTable .region-support-metric {
    justify-items: center;
  }
}

@media (max-width: 430px) {
  #countryDetailTable tbody > tr,
  #countryDetailTable tfoot > tr {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* landing-analysis-and-partial-data-polish */
.landing-chart-row {
  grid-template-columns: minmax(0, 2.4fr) minmax(330px, 0.9fr);
}

.landing-chart-row .trend-panel .interactive-series-chart,
.landing-chart-row .trend-panel .chart {
  height: 420px;
  min-height: 420px;
}

.landing-chart-row .compact-structure-panel .interactive-donut-body {
  grid-template-columns: minmax(170px, 0.9fr) minmax(0, 1.1fr);
  gap: 10px;
  padding: 14px 12px 18px;
}

.landing-chart-row .compact-structure-panel .interactive-donut-visual svg {
  width: clamp(176px, 16vw, 224px);
}

.landing-chart-row .compact-structure-panel .interactive-donut-legend {
  max-height: 280px;
}

.partial-period-note {
  color: #9a5d00;
  font-weight: 750;
}

.partial-analysis-note {
  color: #9a5d00 !important;
  font-size: 11px !important;
}

.kpi strong[title] {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1180px) {
  .landing-chart-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .landing-chart-row .compact-structure-panel .interactive-donut-body {
    grid-template-columns: minmax(210px, 0.8fr) minmax(0, 1.2fr);
  }
}

@media (max-width: 720px) {
  .landing-chart-row .trend-panel .interactive-series-chart,
  .landing-chart-row .trend-panel .chart {
    height: 360px;
    min-height: 360px;
  }

  .landing-chart-row .compact-structure-panel .interactive-donut-body {
    grid-template-columns: minmax(138px, 0.8fr) minmax(0, 1.2fr);
  }

  .landing-chart-row .compact-structure-panel .interactive-donut-visual svg {
    width: clamp(146px, 40vw, 168px);
  }
}
/* Customer analysis keeps all metric columns inside the viewport. */
.customer-page section { min-width: 0; margin-block: 16px; }
.customer-page table { width: 100%; table-layout: fixed; font-size: 12px; }
.customer-page th, .customer-page td { overflow-wrap: anywhere; white-space: normal; padding: 6px 4px; }
.customer-page #customerTrend { min-height: 240px; }
.customer-page #customerKpis { padding-block: 12px; line-height: 1.8; }
.customer-page #customerKpis { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.customer-page #customerKpis strong { display:block; font-size:12px; }
.customer-page .metric-stack { display:flex; flex-direction:column; gap:3px; }
.customer-page .metric-stack small { font-size:10px; white-space:normal; color:#647064; }
.customer-page .panel { margin-block:12px; min-width:0; }
.customer-page .table-wrap { min-width:0; max-width:100%; }
.customer-page .customer-structure-layout { display:grid; grid-template-columns:240px minmax(0,1fr); align-items:center; gap:20px; }
.customer-page #customerDonut { min-height:220px; display:grid; place-items:center; }
@media (max-width: 760px) { .customer-page .customer-structure-layout { grid-template-columns:minmax(0,1fr); gap:8px; } }
.customer-page .customer-tree { border:0; background:transparent; cursor:pointer; padding:0; font:inherit; text-align:left; }
.customer-page .customer-method { margin-block:12px; font-size:12px; }
.customer-page pre { white-space:pre-wrap; overflow-wrap:anywhere; max-height:240px; overflow-y:auto; }
@media (max-width: 600px) { .customer-page table { font-size: 10px; } }
