:root {
  --canvas: #000000;
  --card: #0b0b0c;
  --surface-2: #151517;
  --surface-3: #1c1c1f;
  --hover: rgba(255, 255, 255, 0.05);
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.18);
  --ink: #f5f5f5;
  --ink-2: #c8c8cc;
  --muted: #8e8e93;
  /* The accent: change these two lines to recolour the app (tints and outlines follow). */
  --accent: #e8622a;
  --accent-button: #c8501c; /* the accent a step darker under white button text: 4.55:1 for 13px text */
  --accent-deep: #f39a6b;
  --accent-tint: color-mix(in srgb, var(--accent) 14%, transparent);
  --accent-line: color-mix(in srgb, var(--accent) 45%, transparent);
  --thumb-line: var(--accent);
  --blue: #4c9bff;
  --blue-tint: rgba(76, 155, 255, 0.14);
  --blue-line: rgba(76, 155, 255, 0.4);
  --green: #34c77b;
  --red: #ff5a4a;
  --amber: #f4a46f;
  --quiet-mark: #4a4a50;
  --tile: #1c1c1f;
  --tile-label: #9ec2ff;
  --radius: 16px;
  --radius-sm: 8px;
  --radius-xs: 5px;
  --font: Inter, "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: "SFMono-Regular", Menlo, Consolas, monospace;
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 20px;
  --s6: 24px;
  --s8: 32px;
}

/* The hidden attribute always hides: a component's own display rule must never show what a page hid (RES-02, RES-09). */
[hidden] {
  display: none !important;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  overflow-x: clip;
}

html,
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
}

button,
select {
  font: inherit;
  color: inherit;
}

.app {
  max-width: 1480px;
  margin: 0 auto;
  padding: var(--s6) var(--s6) var(--s8);
  display: flex;
  flex-direction: column;
  gap: var(--s4);
}

/* Hero ---------------------------------------------------------------- */

.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s4);
  flex-wrap: wrap;
}

.hero[hidden] {
  display: none; /* pages with their own h1 (app.js ownHead) */
}

/* The title takes its own row, so the controls sit in the same place before and after the brand and
   model names arrive: no jump when data loads. */
.heroText {
  flex: 1 1 100%;
  min-width: 0;
}

.heroText h1 {
  margin: 0;
  font-size: 36px;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.heroText p {
  margin: var(--s1) 0 0;
  color: var(--muted);
  font-size: 13px;
}

.controls {
  display: flex;
  align-items: center;
  gap: var(--s2);
  flex-wrap: wrap;
}

.pill,
.targetPick,
.toggle,
.ghost {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  min-height: 36px;
  padding: 0 var(--s3);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  font-size: 13px;
}

.pillKey,
.targetPick span {
  color: var(--muted);
}

.pill b {
  font-weight: 700;
}

.status i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
}

.status.is-live i {
  animation: pulse 1.2s ease-in-out infinite;
}

.status.is-done i {
  background: var(--green);
}

.status.is-failed i {
  background: var(--red);
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.25;
  }
}

.targetPick select {
  border: 0;
  background: transparent;
  font-weight: 700;
  min-width: 0;
  /* The widest option sets a select's width; the label, its padding and the page gutters need the rest. */
  max-width: calc(100vw - 140px);
  text-overflow: ellipsis;
}

/* A long brand name in the list can't push the picker past a phone's edge. */
.targetPick {
  max-width: 100%;
  min-width: 0;
}

.toggle {
  padding: 3px;
  gap: 2px;
}

.toggle button {
  border: 0;
  border-radius: 999px;
  padding: 6px 12px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
}

.toggle button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--canvas);
}

.ghost {
  cursor: pointer;
  font-weight: 700;
}

.ghost:hover {
  border-color: var(--line-strong);
}

button:focus-visible,
select:focus-visible,
[tabindex="0"]:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

.crumbs {
  display: flex;
  align-items: center;
  gap: var(--s3);
  color: var(--muted);
  font-size: 13px;
}

/* Hidden, the breadcrumb bar keeps its empty slot in the column (the gap the page has always had above the totals),
   but shows nothing: RES-09's stale "← Overview" never shows again. */
.crumbs[hidden] {
  display: flex !important;
  visibility: hidden;
  height: 0;
  overflow: hidden;
}

.crumbs button {
  min-height: 32px;
  padding: 0 var(--s3);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card);
  font-weight: 700;
  cursor: pointer;
}

/* Stat tiles ----------------------------------------------------------- */

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s3);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding: var(--s4) var(--s5);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  transition: background-color 180ms ease, border-color 180ms ease;
}

.stat p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.stat strong {
  font-size: 34px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.stat span {
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat.inverse {
  background: var(--tile);
  border-color: var(--line-strong);
  color: #fff;
}

.stat.inverse p {
  color: var(--tile-label);
}

.stat.inverse span {
  color: #b9b9b9;
}

.stat.focus {
  background: var(--accent-tint);
  border-color: var(--accent-line);
}

.stat.focus strong {
  color: var(--accent-deep);
}

/* Layout --------------------------------------------------------------- */

.columns {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.85fr);
  gap: var(--s3);
  align-items: start;
}

.columns.three {
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.8fr) minmax(280px, 0.85fr);
}

.card {
  min-width: 0;
  padding: var(--s4) var(--s5) var(--s5);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}

.cardHead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s3);
}

.cardHead h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
}

.cardHead small {
  color: var(--muted);
  font-size: 12px;
}

.counter {
  color: var(--blue);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
}

.muted {
  color: var(--muted);
  margin: 0;
}

.empty {
  padding: var(--s8);
  text-align: center;
  color: var(--muted);
}

.skeleton {
  min-height: 260px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

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

/* Pills ---------------------------------------------------------------- */

.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--blue-tint);
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.tag.accent {
  background: var(--accent-tint);
  color: var(--accent-deep);
}

/* Thumbnails ----------------------------------------------------------- */

.thumb {
  position: relative;
  display: block;
  overflow: hidden;
  border: 2px solid var(--thumb-line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  aspect-ratio: 1 / 1;
}

.thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb.sm {
  width: 20px;
  border-width: 1px;
  border-radius: 4px;
}

.thumb.lg {
  aspect-ratio: 4 / 3;
  border-radius: 12px;
}

.thumb.pending {
  border-color: var(--line);
  border-style: dashed;
  opacity: 0.45;
}

.thumb.selected {
  border-color: var(--ink);
  box-shadow: 0 0 0 2px var(--blue);
}

.tile {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  height: 100%;
  padding: 8%;
  color: var(--ink);
}

.tile strong {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 11px;
  line-height: 1.25;
  font-weight: 700;
}

.thumb.lg .tile strong {
  font-size: 16px;
  -webkit-line-clamp: 4;
}

.tile i {
  align-self: flex-end;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid var(--ink-2);
  position: relative;
}

.tile i.video::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 2.5px;
  border-left: 5px solid var(--ink-2);
  border-top: 3.5px solid transparent;
  border-bottom: 3.5px solid transparent;
}

.thumb.sm .tile {
  padding: 0;
}

.thumb.sm .tile strong,
.thumb.sm .tile i {
  display: none;
}

/* Ad grid (live) -------------------------------------------------------- */

.adGrid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s2);
  max-height: 580px;
  overflow-y: auto;
  padding-right: var(--s1);
}

.cell {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--s1);
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  border-radius: var(--radius-sm);
}

.cell .tag {
  position: absolute;
  left: 6px;
  bottom: 6px;
  max-width: calc(100% - 12px);
  overflow: hidden;
  text-overflow: ellipsis;
}

.scan {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  height: 2px;
  background: var(--blue);
  box-shadow: 0 0 10px rgba(76, 184, 255, 0.55);
}

.scan em,
.scanRow em {
  position: relative;
  top: -17px;
  padding: 1px 8px;
  border-radius: 4px;
  background: var(--blue);
  color: var(--canvas);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Cards ---------------------------------------------------------------- */

.hero2 {
  position: relative;
}

.chip {
  position: absolute;
  top: var(--s2);
  left: var(--s2);
  padding: 3px 9px;
  border-radius: 6px;
  background: rgba(17, 17, 17, 0.85);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.chip.right {
  left: auto;
  right: var(--s2);
}

.rows {
  display: grid;
  gap: var(--s2);
  margin: 0;
}

.rows div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
}

.rows dt {
  color: var(--muted);
  font-size: 13px;
}

.rows dd {
  margin: 0;
  font-weight: 700;
  text-align: right;
  font-size: 13px;
}

.rows dd.accent {
  color: var(--accent-deep);
}

.quote {
  margin: 0;
  padding-left: var(--s3);
  border-left: 3px solid var(--accent);
  font-size: 15px;
  line-height: 1.35;
  font-weight: 700;
}

.copy strong {
  display: block;
  font-size: 15px;
  line-height: 1.35;
}

.copy p {
  margin: var(--s2) 0 0;
  color: var(--ink-2);
  font-size: 13px;
}

.log {
  margin: 0;
  padding: var(--s3) 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
  max-height: 300px;
  overflow-y: auto;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.75;
  color: var(--muted);
}

.log li {
  display: flex;
  gap: var(--s2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.log em {
  color: var(--blue);
  font-style: normal;
}

.log li:nth-child(n + 9) {
  opacity: 0.75;
}

.log li:nth-child(n + 17) {
  opacity: 0.5;
}

.log li:nth-child(n + 25) {
  opacity: 0.3;
}

/* Run-length chart ------------------------------------------------------ */

.callout {
  align-self: flex-end;
  max-width: 380px;
  padding: var(--s3) var(--s4);
  border: 0;
  border-radius: 12px;
  background: var(--tile);
  color: #fff;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

.callout small {
  display: block;
  color: var(--amber);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.callout strong {
  display: block;
  margin-top: 2px;
  font-size: 16px;
}

.callout p {
  margin: var(--s1) 0 0;
  color: #d9d9d9;
  font-size: 13px;
}

.runChart {
  position: relative;
  height: 440px;
  margin: 0 var(--s2);
  overflow: hidden;
}

.grid {
  position: absolute;
  top: 0;
  bottom: 0;
  border-left: 1px dashed var(--line-strong);
}

.grid small {
  position: absolute;
  bottom: 0;
  left: var(--s1);
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.grid small.end {
  left: auto;
  right: var(--s1);
}

.dot {
  position: absolute;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  transition: transform 120ms ease;
}

.dot:hover,
.dot:focus-visible,
.dot.selected {
  transform: scale(1.7);
  z-index: 2;
}

.marker {
  position: absolute;
  top: 0;
  bottom: 24px;
  border-left: 2px solid var(--accent);
  pointer-events: none;
}

.marker em {
  position: absolute;
  top: 0;
  left: var(--s1);
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--accent);
  color: var(--canvas);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

/* Gantt ---------------------------------------------------------------- */

.gantt {
  margin: 0;
  padding: var(--s3);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.gantt svg {
  display: block;
  width: 100%;
  height: 92px;
}

.gantt rect {
  fill: var(--red);
  opacity: 0.85;
}

.gantt figcaption {
  display: flex;
  justify-content: space-between;
  margin-top: var(--s2);
  color: var(--muted);
  font-size: 11px;
}

.gantt figcaption em {
  color: var(--accent-deep);
  font-style: normal;
  font-weight: 700;
}

/* Dense grid ------------------------------------------------------------ */

.dense {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: var(--s1);
  max-height: 580px;
  overflow-y: auto;
}

/* SEO lists ------------------------------------------------------------- */

.pageList {
  margin: 0;
  padding: 0;
  list-style: none;
  max-height: 580px;
  overflow-y: auto;
}

.pageList li {
  position: relative;
}

.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: var(--s3);
  width: 100%;
  min-height: 30px;
  padding: 2px var(--s2);
  border: 0;
  border-radius: var(--radius-xs);
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-size: 12px;
}

.pageList.bars .row {
  grid-template-columns: 24px minmax(0, 1fr) minmax(120px, 0.7fr) auto;
}

.row:hover {
  background: var(--hover);
}

.row.selected {
  background: var(--accent-tint);
  box-shadow: inset 0 0 0 1.5px var(--accent);
}

.row code {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 11px;
}

.row .rank {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.row strong {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.scanRow {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  display: flex;
  justify-content: flex-end;
  height: 2px;
  background: var(--blue);
}

.bar {
  display: block;
  height: 8px;
  border-radius: 4px;
  background: var(--surface-2);
  overflow: hidden;
}

.bar b {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: var(--accent);
}

.pageHero strong {
  display: block;
  font-size: 16px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.pageHero p {
  margin: var(--s1) 0 0;
  color: var(--muted);
  font-size: 12px;
}

.pageTags {
  display: flex;
  align-items: center;
  gap: var(--s2);
  flex-wrap: wrap;
  margin-top: var(--s2);
  color: var(--muted);
  font-size: 12px;
}

.big {
  display: block;
  margin-top: var(--s3);
  color: var(--accent-deep);
  font-size: 44px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.keywords {
  margin: 0;
  padding: 0;
  list-style: none;
  max-height: 520px;
  overflow-y: auto;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.9;
}

.keywords li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: var(--s2);
}

.keywords code {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.keywords span {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.keywords em {
  color: var(--accent-deep);
  font-style: normal;
}

/* Traffic chart --------------------------------------------------------- */

.traffic svg {
  display: block;
  width: 100%;
  height: auto;
}

.tick line {
  stroke: var(--line-strong);
  stroke-dasharray: 3 4;
}

.tick text {
  fill: var(--muted);
  font-size: 12px;
  text-anchor: middle;
}

.pdot circle {
  fill: var(--quiet-mark);
  opacity: 0.85;
  cursor: pointer;
}

.pdot .hit {
  fill: transparent;
  opacity: 1;
}

.pdot.tool circle {
  fill: var(--accent);
  stroke: var(--canvas);
  stroke-width: 1;
}

.pdot:hover circle,
.pdot.selected circle {
  stroke: var(--ink);
  stroke-width: 2;
}

.pdot:focus-visible {
  outline: none;
}

.pdot:focus-visible .hit {
  stroke: var(--blue);
  stroke-width: 3;
}

/* Share card ------------------------------------------------------------ */

.shares {
  display: grid;
  gap: var(--s3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.shares li div {
  display: flex;
  align-items: baseline;
  gap: var(--s2);
  margin-bottom: var(--s1);
  font-size: 13px;
}

.shares strong {
  font-weight: 700;
}

.shares span {
  color: var(--muted);
  font-size: 12px;
}

.shares em {
  margin-left: auto;
  font-style: normal;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.shares li.lead strong,
.shares li.lead em {
  color: var(--accent-deep);
}

.shares li:not(.lead) .bar b {
  background: var(--quiet-mark);
}

.minis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s2);
}

.mini {
  padding: var(--s3);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.mini strong {
  display: block;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.mini span {
  color: var(--muted);
  font-size: 11px;
}

.mini.focus {
  background: var(--accent-tint);
  border-color: var(--accent-line);
}

.mini.focus strong {
  color: var(--accent-deep);
}

.error {
  margin: 0;
  padding: var(--s3) var(--s4);
  border: 1px solid rgba(255, 93, 115, 0.35);
  border-radius: var(--radius-sm);
  background: rgba(255, 93, 115, 0.08);
  color: var(--red);
}

/* Motion & responsive --------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .status.is-live i {
    animation: none;
  }

  .dot {
    transition: none;
  }
}

@media (max-width: 1180px) {
  .columns,
  .columns.three {
    grid-template-columns: minmax(0, 1fr);
  }

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

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

@media (max-width: 760px) {
  .app {
    padding: var(--s4) var(--s4) var(--s6);
  }

  .heroText h1 {
    font-size: 26px;
  }

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

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

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

  .callout {
    align-self: stretch;
    max-width: none;
  }

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

  .pageList.bars .row {
    grid-template-columns: 24px minmax(0, 1fr) auto;
  }

  .pageList.bars .bar {
    display: none;
  }
}

/* Full ad ------------------------------------------------------------- */

.ghost.small {
  min-height: 28px;
  padding: 0 var(--s2);
  font-size: 12px;
}

a.ghost {
  color: var(--ink);
  text-decoration: none;
}

.heroOpen {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  border-radius: var(--radius-sm);
}

.adDialog {
  width: min(1120px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
  overflow: auto;
}

.adDialog::backdrop {
  background: rgba(2, 3, 8, 0.78);
}

.fullHead {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s3);
  padding: var(--s4) var(--s5);
  border-bottom: 1px solid var(--line);
  background: var(--card);
}

.fullHead h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
}

.fullHead p {
  margin: var(--s1) 0 0;
  color: var(--muted);
  font-size: 13px;
}

.fullBody {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: var(--s5);
  padding: var(--s5);
}

.fullLeft,
.fullRight {
  display: flex;
  flex-direction: column;
  gap: var(--s4);
  min-width: 0;
}

.fullMedia {
  display: block;
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  background: var(--tile);
}

.fullMedia.none {
  padding: var(--s8) var(--s4);
  color: #fff;
  text-align: center;
}

.fullActions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
}

.fullPart {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  padding-top: var(--s3);
  border-top: 1px solid var(--line);
}

.fullPart h3 {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.hookLine {
  margin: 0;
  padding-left: var(--s3);
  border-left: 3px solid var(--accent);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
}

.bodyFull {
  margin: 0;
  color: var(--ink-2);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.landing {
  margin: 0;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.landing a {
  color: var(--blue);
}

.landing b {
  color: var(--accent-deep);
}

.linkShare {
  display: grid;
  gap: var(--s1);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
}

.linkShare li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: var(--s3);
  align-items: baseline;
  padding: 3px var(--s2);
  border-radius: var(--radius-xs);
}

.linkShare li.current {
  background: var(--accent-tint);
}

.linkShare span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.linkShare b {
  font-variant-numeric: tabular-nums;
}

.linkShare em {
  color: var(--muted);
  font-style: normal;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 760px) {
  .fullBody {
    grid-template-columns: 1fr;
    padding: var(--s4);
  }

  .fullHead {
    padding: var(--s3) var(--s4);
  }
}


/* The chosen ad, shown in full beside the chart ------------------------ */

.adDetail {
  display: flex;
  flex-direction: column;
  gap: var(--s4);
}

.adDetail .fullMedia {
  max-height: 460px;
}

.adDetail .heroOpen {
  cursor: zoom-in;
}

/* Beside the chart, the details scroll on their own so the chart stays in view. */
@media (min-width: 1181px) {
  .detailCard {
    position: sticky;
    top: var(--s4);
    max-height: calc(100vh - var(--s8));
    overflow-y: auto;
  }
}

/* Interactive ad wall ------------------------------------------------- */

.toggle.small {
  min-height: 30px;
  font-size: 12px;
}

.toggle.small button {
  padding: 4px 10px;
}

.wallBar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
  flex-wrap: wrap;
}

.wallZoom {
  display: flex;
  gap: var(--s1);
}

.wallBar .toggle {
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}

.toggle.small button {
  white-space: nowrap;
}

.wallZoom .ghost.small {
  min-width: 30px;
  justify-content: center;
}

/* Over the wall the winning pattern is a slim strip, so it never hides a column of ads. */
.wallCard .callout {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 2px var(--s3);
  align-self: stretch;
  max-width: none;
  padding: var(--s2) var(--s3);
  box-shadow: none;
}

.wallCard .callout strong {
  margin: 0;
  font-size: 14px;
}

.wallCard .callout p {
  margin: 0;
  font-size: 12px;
}

.wallHost {
  position: relative;
  height: 480px;
  border-radius: var(--radius-sm);
  background: #050506;
  overflow: hidden;
}

.wallRoot {
  position: absolute;
  inset: 0;
}

.wallCanvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: pan-y;
  outline: none;
}

.wallRoot.dragging .wallCanvas {
  cursor: grabbing;
}

.wallCanvas:focus-visible {
  box-shadow: inset 0 0 0 3px var(--blue);
  border-radius: var(--radius-sm);
}

.wallLabels {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.wallLabel,
.wallTick {
  position: absolute;
  top: 0;
  left: 0;
  will-change: transform;
}

.wallLabel {
  display: flex;
  flex-direction: column;
  padding-top: 2px;
  overflow: hidden;
}

.wallLabel strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.wallLabel span {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wallLabel.tight span {
  display: none;
}

.wallLabel.rest strong {
  color: var(--muted);
}

.wallTip[hidden],
.wallLabel[hidden],
.wallTick[hidden] {
  display: none;
}

.wallTick {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.wallTip {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 1px;
  max-width: 280px;
  padding: var(--s2) var(--s3);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-3);
  pointer-events: none;
  font-size: 12px;
}

.wallTip span {
  color: var(--ink-2);
}

.wallRoot.used .wallHint {
  display: none;
}

.wallHint {
  position: absolute;
  right: var(--s3);
  bottom: var(--s2);
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  pointer-events: none;
}

@media (max-width: 760px) {
  .wallHost {
    height: 380px;
  }

  .wallHint {
    display: none;
  }
}

/* Tracked brands: the Facebook pages each brand advertises from ------------ */

.brandPagesCard {
  margin-top: var(--s3);
}

.brandPages {
  margin: 0;
  padding: 0;
  list-style: none;
}

.brandPages li,
.brandList summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 84px 92px;
  align-items: center;
  gap: var(--s3);
  min-height: 32px;
  padding: 2px var(--s2);
  border-radius: var(--radius-xs);
  font-size: 12px;
}

.brandPages li:hover,
.brandList summary:hover {
  background: var(--hover);
}

.brandPages a {
  overflow: hidden;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brandPages a:hover,
.brandPages a:focus-visible {
  color: var(--accent-deep);
  text-decoration: underline;
}

.pageAds {
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.pageStatus {
  color: var(--muted);
  font-weight: 700;
  text-align: right;
}

.reading > .pageStatus,
.reading > summary .pageStatus {
  color: var(--accent-deep);
}

.done > .pageStatus,
.done > summary .pageStatus,
.owndone > summary .pageStatus {
  color: var(--green);
}

.brandList {
  max-height: 560px;
  overflow-y: auto;
}

.brandList details + details {
  border-top: 1px solid var(--line);
}

.brandList summary {
  grid-template-columns: minmax(0, 1fr) 64px 84px 92px;
  cursor: pointer;
  list-style: none;
}

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

.brandList summary b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brandList summary b::before {
  content: "▸";
  display: inline-block;
  width: 14px;
  color: var(--muted);
}

.brandList details[open] summary b::before {
  content: "▾";
}

.brandList summary > span:first-of-type {
  color: var(--muted);
  text-align: right;
}

.brandList .brandPages {
  padding: 0 0 var(--s2) var(--s4);
}

@media (max-width: 760px) {
  .brandPages li {
    grid-template-columns: minmax(0, 1fr) auto;
    row-gap: 0;
  }

  .brandPages li .pageAds {
    text-align: left;
  }

  .brandList summary {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  .brandList summary > span:first-of-type {
    display: none;
  }
}

/* Evidence row: strongest ideas (WPS), survival by label, launches per week. */
.columns.evidence {
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 0.9fr);
  margin-top: 16px;
}

.cardNote {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.families {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}

.families button {
  width: 100%;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto 44px;
  gap: 10px;
  align-items: center;
  padding: 8px 6px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.families button:hover,
.families button[aria-pressed="true"] {
  background: var(--hover);
}

.families button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.families .rank {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.famText {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.famText strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
}

.famText small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 11px;
}

.parts {
  display: flex;
  gap: 3px;
}

.part {
  position: relative;
  width: 18px;
  height: 22px;
  display: grid;
  place-items: end center;
  border-radius: 3px;
  background: var(--surface-3);
  color: var(--ink-2);
  font-size: 9px;
  line-height: 12px;
  overflow: hidden;
}

.part i {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--v);
  background: var(--accent-tint);
  border-top: 1px solid var(--accent-line);
}

.part.missing {
  background: transparent;
  outline: 1px dashed var(--line-strong);
  outline-offset: -1px;
  color: var(--muted);
}

.wps {
  justify-self: end;
  display: grid;
  justify-items: end;
  font-size: 18px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: var(--accent-deep);
}

.wps em {
  font-style: normal;
  font-size: 9px;
  font-weight: 500;
  color: var(--muted);
}

.wps.provisional {
  color: var(--ink-2);
}

.survivalCard .toggle {
  margin-bottom: 10px;
}

.survival {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.survival th,
.survival td {
  padding: 7px 4px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  font-weight: 500;
}

.survival thead th {
  color: var(--muted);
  font-size: 11px;
}

.survival th[scope="row"],
.survival thead th:first-child {
  text-align: left;
  color: var(--ink);
}

.survival small {
  color: var(--muted);
  font-size: 10px;
}

.launches {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.launches li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px 32px;
  gap: 10px;
  align-items: center;
  font-size: 12px;
}

.lbName {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spark {
  height: 20px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 2px;
  align-items: end;
}

.spark i {
  height: var(--h);
  border-radius: 1px;
  background: var(--quiet-mark);
}

.spark i:last-child {
  background: var(--accent);
}

.launches b {
  text-align: right;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 1180px) {
  .columns.evidence {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .families button {
    grid-template-columns: 18px minmax(0, 1fr) 40px;
  }

  .families .parts {
    display: none;
  }
}

/* Wall controls: group and colour pickers, select-area mode, colour legend. */
.wallPicks {
  display: flex;
  align-items: center;
  gap: var(--s2);
  flex-wrap: wrap;
}

.wallPick {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.wallPick select {
  min-height: 32px;
  padding: 4px 28px 4px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
}

.wallPick select:focus-visible,
[data-wall-brush]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

[data-wall-brush][aria-pressed="true"] {
  border-color: var(--accent-line);
  background: var(--accent-tint);
  color: var(--ink);
}

.legend {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.legend .swatch,
.legend .ramp {
  position: static;
  display: inline-block;
  flex: none;
}

.legend .swatch {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.legend .swatch.green {
  background: var(--green);
}

.legend .swatch.red {
  margin-left: 6px;
  background: var(--red);
}

.legend .ramp {
  width: 44px;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--quiet-mark), var(--accent));
}

.wallBrush {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  border: 1px solid var(--accent);
  border-radius: 3px;
  background: var(--accent-tint);
  pointer-events: none;
}

.wallRoot.brushing .wallCanvas {
  cursor: crosshair;
}

/* Selection summary beside the wall. */
.selPart {
  margin-top: var(--s3);
}

.selPart h3 {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.selBars {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}

.selBars li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 70px 44px 64px;
  gap: 8px;
  align-items: center;
  font-size: 12px;
}

.selBars span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selBars i {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent) var(--w), var(--surface-3) var(--w));
}

.selBars b {
  text-align: right;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.selBars em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.selBars em.up {
  color: var(--accent-deep);
}

.dense.small {
  max-height: 220px;
}

.shared {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}

.shared button {
  width: 100%;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 6px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.shared button:hover,
.shared button[aria-pressed="true"] {
  background: var(--hover);
}

.shared button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.preLine {
  white-space: pre-line;
}

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

@media (max-width: 1180px) {
  .columns.evidence {
    grid-template-columns: minmax(0, 1fr);
  }
}

.wallHost.tall {
  height: 680px;
}

@media (max-width: 760px) {
  /* On a phone, grouped walls grow tall so groups stack instead of squeezing their names. */
  .wallHost.tall {
    height: 1150px;
  }

  .wallHost.tall.grid {
    height: 900px;
  }
}

/* WPS winner boards */
.winners button {
  grid-template-columns: 20px 44px minmax(0, 1fr) auto;
  align-items: start;
}

.winners .famText strong {
  white-space: normal;
}

.wpsHead,
.winners .famText small {
  white-space: normal !important;
}

.wpsHead {
  color: var(--accent-deep) !important;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 2px;
}

.reason {
  padding: 1px 6px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 10px;
}

.thumbGap {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-xs);
  background: var(--surface-3);
}

.blocked {
  margin: 0 0 12px;
  padding: 8px 10px;
  border: 1px solid var(--red);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-size: 12px;
}

.familiesCard .toggle,
.survivalCard .toggle {
  margin-bottom: 10px;
  flex-wrap: wrap;
}

@media (max-width: 760px) {
  .winners button {
    grid-template-columns: 18px 40px minmax(0, 1fr);
  }
}

.sameNote {
  margin: 0 0 12px;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.45;
}

/* Landing pages open in a new tab wherever they are named. */
.linkShare a,
.wallLabel strong a,
.fullPart dd a {
  overflow: hidden;
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 3px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.linkShare a:hover,
.wallLabel strong a:hover,
.fullPart dd a:hover {
  color: var(--accent-deep);
  text-decoration-color: currentColor;
}

.linkShare a:focus-visible,
.wallLabel strong a:focus-visible,
.fullPart dd a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.wallLabel strong a {
  pointer-events: auto;
}

.fullPart dd a {
  white-space: normal;
}

/* Grid column names standing upright when there are many columns. */
.wallLabel.vertical {
  flex-direction: row;
  align-items: flex-end;
  padding: 0 0 4px;
}

.wallLabel.vertical strong {
  display: block;
  max-height: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 12px;
}

.wallLabel.vertical span {
  display: none;
}

.wallHost.tall.grid {
  height: 820px;
}

@media (max-width: 760px) {
  .wallHost.tall.grid {
    height: 900px;
  }
}

/* Winners formula */
.sectionHead {
  margin: 28px 0 12px;
  font-size: 20px;
  font-weight: 800;
}

.columns.formulaTop {
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.85fr);
}

.evidenceTag {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.evidenceTag.proxy {
  border: 1px solid var(--amber);
  color: var(--amber);
}

.evidenceTag.settled {
  border: 1px solid var(--green);
  color: var(--green);
}

.briefs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.brief {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.brief p {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.45;
}

.brief em {
  color: var(--muted);
  font-style: normal;
}

.briefHead {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}

.briefHead strong {
  color: var(--accent-deep);
  font-size: 14px;
}

.briefHead small,
.brief .brands {
  color: var(--muted);
  font-size: 11px;
}

.recipe {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.ingredient {
  display: grid;
  padding: 6px 10px;
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-sm);
  background: var(--accent-tint);
  font-size: 13px;
  font-weight: 650;
}

.ingredient small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.opening {
  color: var(--ink-2);
  font-style: italic;
}

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

.usedNote.open {
  color: var(--green);
}

.briefAds {
  margin-top: 10px;
}

.briefAds small {
  color: var(--muted);
  font-size: 11px;
}

.dense.tiny {
  grid-template-columns: repeat(8, 44px);
  max-height: none;
  margin-top: 4px;
}

.subHead {
  margin: 14px 0 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.lifts,
.flight {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 5px;
}

.lifts li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 80px 46px;
  gap: 8px;
  align-items: center;
  font-size: 12px;
}

.lifts li small {
  grid-column: 1 / -1;
  margin-top: -3px;
  color: var(--muted);
  font-size: 10px;
}

.lifts span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lifts i {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--green) var(--w), var(--surface-3) var(--w));
}

.lifts li.down i {
  background: linear-gradient(90deg, var(--red) var(--w), var(--surface-3) var(--w));
}

.lifts em,
.flight em {
  text-align: right;
  font-style: normal;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.flight li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
}

.conceptForm {
  display: grid;
  gap: 8px;
}

.conceptForm label {
  color: var(--muted);
  font-size: 12px;
}

.conceptForm textarea {
  width: 100%;
  min-height: 130px;
  padding: 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  resize: vertical;
}

.conceptForm textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.conceptResult p {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.45;
}

.conceptScore strong {
  font-size: 34px;
  font-weight: 800;
  color: var(--accent-deep);
}

.conceptScore span {
  margin-left: 6px;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 1180px) {
  .columns.formulaTop {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .dense.tiny {
    grid-template-columns: repeat(5, 44px);
  }
}

.conceptForm button {
  justify-self: start;
  min-height: 36px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.conceptForm button:hover {
  background: var(--accent-deep);
}

.conceptForm button:disabled {
  opacity: 0.6;
  cursor: progress;
}

/* Pages: a sidebar on desktop, a tab bar on phones ------------------------- */
.app {
  max-width: 1680px;
  display: grid;
  grid-template-columns: 188px minmax(0, 1fr);
  align-items: start;
  gap: var(--s6);
}

.page {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s4);
}

.pageNav {
  position: sticky;
  top: var(--s6);
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}

.pageNav[hidden] {
  display: none;
}

.app:has(.pageNav[hidden]) {
  grid-template-columns: minmax(0, 1fr);
}

.navBrand {
  margin: 4px 0 6px 12px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.gateLogo img {
  display: block;
  width: 240px;
  max-width: 100%;
  height: auto;
}

.navBrand img {
  display: block;
  width: 160px;
  max-width: 100%;
  height: auto;
}

.navBrand .navMark {
  display: none;
}

.pageNav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}

.pageNav a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.pageNav a:hover {
  background: var(--hover);
  color: var(--ink);
}

.pageNav a[aria-current="page"] {
  background: var(--accent-tint);
  color: var(--ink);
  box-shadow: inset 2px 0 0 var(--accent);
}

.pageNav a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.pageNav svg {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pageHead h1,
.pageHead h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.pageHead h1:focus,
.pageHead h2:focus {
  outline: none;
}

.pageHead p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.stats[hidden] {
  display: none;
}

/* Overview */
.columns.overviewTop {
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--s4);
  min-width: 0;
}

.weekNumbers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s3);
}

.weekNumbers div {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.weekNumbers strong {
  font-size: 26px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.weekNumbers strong small {
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
}

.weekNumbers span {
  color: var(--muted);
  font-size: 12px;
}

.miniWinners {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}

.miniWinners button {
  width: 100%;
  display: grid;
  grid-template-columns: 18px 44px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 6px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.miniWinners button:hover {
  background: var(--hover);
}

.miniWinners button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

a.ghost.small {
  text-decoration: none;
}

/* The full ad opens as a panel from the right on every page. */
.adDialog {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(860px, 100vw);
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  margin: 0;
  border-width: 0 0 0 1px;
  border-radius: var(--radius) 0 0 var(--radius);
}

.adDialog[open] {
  animation: panelIn 180ms ease-out;
}

@keyframes panelIn {
  from {
    transform: translateX(24px);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .adDialog[open] {
    animation: none;
  }

  .pageNav,
  .scrim {
    transition: none !important;
  }
}

.mobileBar,
.scrim {
  display: none;
}

@media (max-width: 1180px) {
  .app {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  /* The narrow rail has no room for the wordmark: it shows the logo's toggle. */
  .navBrand {
    margin: 4px 0 12px;
  }

  .navBrand .navLogo {
    display: none;
  }

  .navBrand .navMark {
    display: block;
    width: 44px;
    margin: 0 auto;
  }

  .pageNav span {
    display: none;
  }

  .pageNav a {
    justify-content: center;
    padding: 0;
  }

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

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

@media (max-width: 760px) {
  .app {
    grid-template-columns: minmax(0, 1fr);
  }

  /* Phones: a top bar with the menu button; the page list slides in from the left as a drawer. */
  .mobileBar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: var(--s2);
    min-height: calc(56px + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) var(--s4) 0 calc(var(--s2) + env(safe-area-inset-left));
    border-bottom: 1px solid var(--line);
    background: rgba(11, 11, 12, 0.96);
    backdrop-filter: blur(8px);
  }

  .menuButton {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--ink);
    cursor: pointer;
  }

  .menuButton svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
  }

  .mobileLogo {
    display: flex;
    flex: none;
    align-items: center;
    min-height: 44px;
  }

  .mobileLogo img {
    display: block;
    width: 152px;
    height: auto;
  }

  .mobileTitle {
    min-width: 0;
    margin: 0 0 0 auto;
    overflow: hidden;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .pageNav {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 40;
    width: min(300px, 84vw);
    padding: calc(var(--s4) + env(safe-area-inset-top)) var(--s3) calc(var(--s4) + env(safe-area-inset-bottom)) calc(var(--s3) + env(safe-area-inset-left));
    overflow-y: auto;
    overscroll-behavior: contain;
    border-right: 1px solid var(--line);
    background: var(--card);
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform 240ms cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s linear 240ms;
  }

  .navOpen .pageNav {
    transform: none;
    visibility: visible;
    box-shadow: 12px 0 40px rgba(0, 0, 0, 0.6);
    transition: transform 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
  }

  .scrim {
    position: fixed;
    inset: 0;
    z-index: 35;
    display: block;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 240ms ease;
  }

  .navOpen .scrim {
    opacity: 1;
    pointer-events: auto;
  }

  .navOpen,
  .navOpen body {
    overflow: hidden;
  }

  .navBrand {
    margin: 4px 0 6px 12px;
  }

  .navBrand .navLogo {
    display: block;
  }

  .navBrand .navMark {
    display: none;
  }

  .pageNav span,
  .navWorkspace {
    display: block;
  }

  .pageNav a {
    justify-content: flex-start;
    min-height: 48px;
    padding: 0 12px;
    font-size: 15px;
  }

  .pageNav .navMe {
    margin-top: auto;
    padding-bottom: var(--s2);
    font-size: 14px;
  }

  .pageNav .navMe a,
  .pageNav .navMe .linkButton {
    display: flex;
    align-items: center;
    min-height: 44px;
  }

  .app[data-hero="off"] .hero {
    display: none;
  }

  /* 16px fields: iOS Safari zooms the page into anything smaller when it is tapped. */
  input:not([type="checkbox"]):not([type="radio"]),
  select,
  textarea {
    font-size: 16px;
  }

  .adDialog {
    width: 100vw;
    border-radius: 0;
    border-width: 0;
  }
}

/* Grid row names: one line, the ad count beside the name. */
.wallLabel.rowLabel {
  flex-direction: row;
  align-items: baseline;
  gap: 6px;
  padding-top: 0;
}

.wallLabel.rowLabel strong {
  display: block;
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  -webkit-line-clamp: unset;
}

.wallLabel.rowLabel span {
  flex: none;
}

/* Who owns what */
.ownToggles {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  margin-bottom: 10px;
}

.ownRows {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.ownHead {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}

.ownHead strong {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
}

.ownHead small {
  color: var(--muted);
  font-size: 12px;
}

.ownTag {
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 600;
}

.ownTag.owned {
  border-color: var(--accent-line);
  color: var(--accent-deep);
}

.ownTag.contested {
  border-color: var(--blue-line);
  color: var(--blue);
}

.ownTag.open {
  border-color: var(--green);
  color: var(--green);
}

.ownBar {
  display: flex;
  height: 12px;
  margin-top: 6px;
  overflow: hidden;
  border-radius: 6px;
  background: var(--surface-3);
}

.ownBar .seg {
  flex: 0 0 var(--w);
  min-width: 2px;
  padding: 0;
  border: 0;
  border-right: 1px solid var(--card);
  background: var(--c);
  cursor: pointer;
}

.ownBar .seg:hover {
  filter: brightness(1.25);
}

.ownBar .seg:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: -2px;
}

.ownNames {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-top: 6px;
}

.ownName {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-2);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.ownName:hover {
  color: var(--ink);
  text-decoration: underline;
}

.ownName.more {
  color: var(--muted);
}

.ownName i,
.ownHead i {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--c);
}

.playbooks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 12px;
}

.playbook {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.playbook ol {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 4px;
}

.playbook button {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 70px 44px;
  gap: 8px;
  align-items: center;
  padding: 3px 4px;
  border: 0;
  border-radius: 4px;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}

.playbook button:hover {
  background: var(--hover);
}

.playbook button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.playbook button i {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--c) var(--w), var(--surface-3) var(--w));
}

.playbook button b {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.listBody {
  padding: var(--s4) var(--s5);
}

.dense.listGrid {
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  max-height: none;
}

.backList {
  margin-right: auto;
}

.fullHead:has(.backList) {
  flex-wrap: wrap;
}

/* Landing pages */
.landingCard {
  margin-top: var(--s4);
}

.landingList {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
  display: grid;
  gap: 2px;
}

.landingRow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
  gap: 16px;
  align-items: center;
  padding: 8px 6px;
  border-bottom: 1px solid var(--line);
}

.landingMain {
  min-width: 0;
}

.landingMain a {
  display: grid;
  gap: 1px;
  color: var(--ink);
  text-decoration: none;
}

.landingMain a strong {
  overflow: hidden;
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.landingMain a small {
  color: var(--muted);
  font-size: 11px;
}

.landingMain a:hover strong {
  color: var(--accent-deep);
  text-decoration: underline;
}

.landingMain a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.landingMain p {
  margin: 3px 0 0;
  overflow: hidden;
  color: var(--ink-2);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.landingStats {
  display: grid;
  gap: 1px;
  padding: 6px 8px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  text-align: right;
  cursor: pointer;
}

.landingStats b {
  color: var(--ink);
  font-size: 14px;
}

.landingStats:hover {
  background: var(--hover);
  color: var(--ink-2);
}

.landingStats:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

@media (max-width: 760px) {
  .landingRow {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .landingStats {
    text-align: left;
    padding: 4px 0;
  }

  .landingMain p {
    white-space: normal;
  }
}

/* Charts */
svg.chart {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 6px;
  font-family: var(--font);
}

svg.chart [data-tip] {
  cursor: pointer;
  outline: none;
}

svg.chart [data-tip]:hover,
svg.chart [data-tip]:focus-visible {
  filter: brightness(1.3);
}

svg.chart rect[data-tip]:focus-visible,
svg.chart circle[data-tip]:focus-visible {
  stroke: var(--ink);
  stroke-width: 2;
}

.chartLegend {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  font-size: 12px;
  color: var(--ink-2);
}

.chartLegend li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chartLegend i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.chartTip {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50;
  max-width: 320px;
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-3);
  color: var(--ink);
  font-size: 12px;
  pointer-events: none;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.chartTable,
.chartMore {
  margin-top: 8px;
  font-size: 12px;
}

.chartTable summary,
.chartMore summary {
  color: var(--muted);
  cursor: pointer;
}

.chartTable summary:hover,
.chartMore summary:hover {
  color: var(--ink);
}

.chartMore[open] summary {
  margin-bottom: 12px;
}

.tableScroll {
  max-height: 320px;
  margin-top: 8px;
  overflow: auto;
}

.chartTable table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.chartTable th,
.chartTable td {
  padding: 4px 6px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  white-space: nowrap;
  font-weight: 500;
}

.chartTable th[scope="row"],
.chartTable thead th:first-child {
  text-align: left;
}

.chartTable thead th {
  position: sticky;
  top: 0;
  background: var(--card);
  color: var(--muted);
}

.chartEmpty {
  display: grid;
  place-items: center;
  gap: 4px;
  min-height: 200px;
  padding: 20px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  text-align: center;
}

.chartEmpty p {
  max-width: 420px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.chartCard .toggle {
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.columns.evidence + .columns.evidence,
.ownCard + .columns.evidence,
.landingCard + .columns.evidence {
  margin-top: var(--s4);
}

/* Pies */
svg.chart.pie {
  width: auto;
  flex: none;
  margin: 0;
}

.pieFigure,
.pieSmall {
  margin: 0;
}

.pieFigure figcaption,
.pieSmall figcaption {
  margin-bottom: 8px;
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 600;
}

.pieRow {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.pieLegend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
  min-width: 170px;
  flex: 1;
  font-size: 12px;
}

.pieLegend li {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 2px 4px;
  border-radius: 4px;
  color: var(--ink-2);
}

.pieLegend li[data-chart-click] {
  cursor: pointer;
}

.pieLegend li[data-chart-click]:hover,
.pieLegend li[data-chart-click]:focus-visible {
  background: var(--hover);
  color: var(--ink);
  outline: none;
}

.pieLegend i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.pieLegend span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pieLegend b {
  color: var(--ink);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.pieLead {
  max-width: 640px;
}

.pieSet {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-top: 6px;
}

.pieGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
}

.pieSmall {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 12px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  text-align: center;
}

.pieSmall figcaption {
  display: grid;
  justify-items: center;
  gap: 4px;
  width: 100%;
  margin: 0;
}

.pieSmall figcaption strong {
  max-width: 100%;
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pieSmall figcaption small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.pieSmall p {
  margin: 0;
  color: var(--ink-2);
  font-size: 11px;
  line-height: 1.5;
}

.pieSmall p i {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 5px;
  border-radius: 2px;
  vertical-align: 0;
}

@media (max-width: 760px) {
  .pieGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .pieSmall svg.chart.pie {
    width: 110px;
    height: 110px;
  }
}

/* Market pulse ------------------------------------------------------------ */
.pulseHead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.pulseFocus select {
  min-width: 200px;
}

.kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.kpi {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card);
}

.kpi span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.kpi strong {
  overflow: hidden;
  font-size: 24px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kpi small {
  color: var(--muted);
  font-size: 11px;
}

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

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

.sectionLabel {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.insights {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.insight {
  display: grid;
  align-content: start;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.insight:hover {
  background: var(--surface-2);
}

.insight:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.insight small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.insight strong {
  font-size: 16px;
  font-weight: 800;
}

.insight span {
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.45;
}

.insight.up {
  border-left-color: var(--green);
}

.insight.up small {
  color: var(--green);
}

.insight.down {
  border-left-color: var(--red);
}

.insight.down small {
  color: var(--red);
}

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

.insight.open small {
  color: var(--blue);
}

.pulseTabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.pulseTabs button {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.pulseTabs button:hover {
  background: var(--hover);
  color: var(--ink);
}

.pulseTabs button[aria-selected="true"] {
  border-color: var(--accent-line);
  background: var(--accent-tint);
  color: var(--ink);
}

.pulseGrid {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr) minmax(260px, 320px);
  gap: 20px;
  align-items: start;
}

.pulseDonut {
  display: grid;
  justify-items: center;
}

.pulseTable {
  max-height: 460px;
  overflow: auto;
}

.pulseTable table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.pulseTable th,
.pulseTable td {
  padding: 7px 8px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  font-weight: 500;
  white-space: nowrap;
}

.pulseTable thead th {
  position: sticky;
  top: 0;
  background: var(--card);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.pulseTable th[scope="row"],
.pulseTable thead th:first-child {
  max-width: 260px;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
}

.pulseTable th[scope="row"] i {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 8px;
  border-radius: 2px;
  vertical-align: 0;
}

.pulseTable td small {
  color: var(--muted);
}

.pulseTable tbody tr {
  cursor: pointer;
}

.pulseTable tbody tr:hover,
.pulseTable tbody tr:focus-visible {
  background: var(--hover);
  outline: none;
}

.pulseTable tbody tr.picked {
  background: var(--accent-tint);
}

.pulseTable td.up {
  color: var(--green);
}

.pulseTable td.down {
  color: var(--red);
}

.pulsePick {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.pulsePick h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
}

.pulsePick > p {
  margin: -6px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.pulseExamples {
  display: grid;
  gap: 6px;
}

.pulseExamples small {
  color: var(--muted);
  font-size: 11px;
}

.pulseExamples .dense.tiny {
  grid-template-columns: repeat(4, 44px);
}

.pulseExamples .ghost {
  justify-self: start;
}

.pulsePick .pieRow {
  gap: 10px;
}

.pulsePick .pieLegend {
  min-width: 0;
}

.pricePanel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 220px);
  gap: 16px;
  align-items: start;
}

.priceLadder {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
  max-height: 260px;
  overflow: auto;
  font-size: 12px;
}

.priceLadder li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 3px 6px;
  border-radius: 4px;
  color: var(--ink-2);
}

.priceLadder li[data-chart-click] {
  cursor: pointer;
}

.priceLadder li[data-chart-click]:hover {
  background: var(--hover);
  color: var(--ink);
}

.priceLadder li.us {
  background: var(--accent-tint);
  color: var(--ink);
  font-weight: 700;
}

.priceLadder b {
  font-variant-numeric: tabular-nums;
}

@media (max-width: 1400px) {
  .pulseGrid {
    grid-template-columns: 200px minmax(0, 1fr);
  }

  .pulsePick {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1180px) {
  .kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (max-width: 760px) {
  .kpis,
  .insights {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kpi strong {
    font-size: 20px;
  }

  .pulseGrid,
  .pricePanel {
    grid-template-columns: minmax(0, 1fr);
  }

  .pulseTabs {
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .pulseTabs button {
    flex: none;
  }
}

.briefNote {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.evidenceTag {
  cursor: help;
}

.evidenceTag:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Briefs led by a real ad -------------------------------------------- */

.briefV2 {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: var(--s4);
  align-items: start;
}

.briefHero {
  display: block;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.briefHero .thumb.lg {
  aspect-ratio: 4 / 5;
}

.briefHero:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 12px;
}

.briefTitle {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--s2);
}

.briefTitle h3 {
  flex: 1 1 240px;
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
}

.brief .briefWhy {
  margin-top: var(--s1);
  color: var(--ink-2);
}

.briefWhy b {
  color: var(--accent-deep);
}

.heroLine {
  margin: var(--s3) 0 0;
  padding: var(--s2) var(--s3);
  border-left: 2px solid var(--accent);
  background: var(--accent-tint);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}

.heroLine span,
.heroLine small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.heroLine span {
  margin-bottom: 2px;
  color: var(--accent-deep);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.heroLine small {
  margin-top: 2px;
}

.brief .briefProof {
  margin-top: var(--s3);
  color: var(--ink-2);
}

.briefSteps {
  display: grid;
  gap: var(--s2);
  margin: var(--s3) 0 0;
}

.briefSteps div {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: var(--s2);
  font-size: 13px;
  line-height: 1.45;
}

.briefSteps dt {
  color: var(--muted);
  font-weight: 700;
}

.briefSteps dd {
  margin: 0;
  color: var(--ink);
}

@media (max-width: 640px) {
  .briefV2 {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s3);
  }

  .briefHero {
    width: 140px;
  }

  .briefTitle {
    flex-wrap: nowrap;
  }

  .briefTitle h3 {
    flex-basis: 0;
    font-size: 16px;
  }
}

.detailSkeleton {
  min-height: 180px;
  margin-top: var(--s4);
}

.wallLoading {
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

/* A side card's media keeps one shape while the image or video loads. */
.adDetail .fullMedia {
  aspect-ratio: 4 / 5;
  height: auto;
}

/* Primary action: one per region (Build this, Save, Continue). ------------ */

.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  min-height: 36px;
  padding: 0 var(--s4);
  border: 0;
  border-radius: 999px;
  background: var(--accent-button);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: filter 140ms ease, transform 140ms ease;
}

.primary:hover {
  filter: brightness(0.94); /* darker, so hover keeps the text contrast */
}

.primary:active {
  transform: translateY(1px);
}

.primary:disabled {
  opacity: 0.5;
  cursor: default;
}

.primary:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

.primary.small {
  min-height: 32px;
  padding: 0 var(--s3);
}

/* Build page ------------------------------------------------------------ */

.briefBuild {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s3);
  margin-top: var(--s3);
}

.briefBuild small {
  color: var(--muted);
  font-size: 12px;
}

.buildSide {
  display: grid;
  gap: var(--s3);
}

/* Video remakes sit above the still builds in the main column. */
.buildMain {
  display: grid;
  gap: var(--s4);
  align-content: start;
  min-width: 0;
}

.remakeVideo video {
  display: block;
  width: 100%;
  max-width: 300px;
  height: auto;
  aspect-ratio: 9 / 16;
  border-radius: var(--radius-sm);
  background: var(--tile);
}

.voiceCheck {
  display: grid;
  gap: var(--s2);
  margin-top: var(--s3);
  padding: var(--s3);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.voiceCheck p {
  margin: 0;
  font-size: 13px;
  color: var(--ink-2);
}

.voiceCheck audio,
.voicePick audio {
  width: 100%;
  max-width: 360px;
  height: 36px;
}

.voicePick {
  margin-top: var(--s3);
  font-size: 13px;
}

.voicePick summary {
  cursor: pointer;
  color: var(--ink-2);
}

.voicePick ul {
  display: grid;
  gap: var(--s2);
  margin: var(--s2) 0;
  padding: 0;
  list-style: none;
}

.voicePick li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s2) var(--s3);
}

.voicePick small,
.voiceCheck small {
  color: var(--muted);
  font-size: 12px;
}

.remakeLines {
  display: grid;
  gap: var(--s1);
  margin: var(--s2) 0;
  padding-left: var(--s5);
  font-size: 13px;
}

.remakeLines small {
  display: block;
  color: var(--muted);
}

.buildList {
  display: grid;
  gap: var(--s4);
  margin: 0;
  padding: 0;
  list-style: none;
}

.buildItem {
  padding: var(--s4);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.buildHead {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s3);
}

/* A long pill (a voice's name) wraps under the heading instead of squeezing it to a word per line. */
.buildHead h3 {
  flex: 1 1 14ch;
  min-width: 0;
  margin: 0;
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
}

.statusPill {
  flex: none;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--blue-tint);
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
}

.statusPill.done {
  background: color-mix(in srgb, var(--green) 16%, transparent);
  color: var(--green);
}

.statusPill.needs_you {
  background: var(--accent-tint);
  color: var(--accent-deep);
}

.buildMeta {
  margin: var(--s1) 0 0;
  color: var(--muted);
  font-size: 12px;
}

.buildSteps {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  margin: var(--s3) 0 0;
  padding: 0;
  list-style: none;
}

.buildSteps li {
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
}

.buildSteps li.done {
  color: var(--ink-2);
}

.buildSteps li.done::before {
  content: "✓ ";
  color: var(--green);
}

.buildSteps li.now {
  border-color: var(--accent-line);
  color: var(--ink);
}

.buildNote {
  margin: var(--s3) 0 0;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.45;
}

.buildNote.warn {
  color: var(--accent-deep);
}

.builtAds {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s4);
  margin-top: var(--s4);
}

.builtAd {
  display: grid;
  gap: var(--s2);
  margin: 0;
}

.builtAd figcaption {
  display: flex;
  align-items: baseline;
  gap: var(--s2);
  font-size: 13px;
}

.builtAd figcaption b {
  color: var(--ink);
  font-size: 15px;
}

.builtAd figcaption span {
  color: var(--muted);
}

.builtAd img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-sm);
  background: var(--tile);
}

.checksLine {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
}

.checksLine.good {
  color: var(--green);
}

.checksLine.bad {
  color: var(--accent-deep);
}

.builtCopy summary {
  color: var(--ink-2);
  font-size: 13px;
  cursor: pointer;
}

.builtCopy p {
  margin: var(--s2) 0 0;
  font-size: 13px;
  line-height: 1.45;
}

.formActions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  margin-top: var(--s3);
}

.emptyState {
  display: grid;
  justify-items: start;
  gap: var(--s3);
  padding: var(--s5) 0;
}

.emptyState p {
  margin: 0;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.5;
}

.spendLine {
  display: flex;
  align-items: baseline;
  gap: var(--s2);
  margin: 0;
}

.spendLine strong {
  color: var(--ink);
  font-size: 28px;
  font-variant-numeric: tabular-nums;
}

.spendLine span {
  color: var(--muted);
  font-size: 13px;
}

.meter {
  height: 6px;
  margin-top: var(--s3);
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
}

.meter i {
  display: block;
  width: var(--w);
  height: 100%;
  background: var(--accent);
}

.limitForm,
.factsForm {
  display: grid;
  gap: var(--s3);
}

.limitForm .cardNote {
  margin: 0;
}

.field {
  display: grid;
  gap: var(--s1);
  font-size: 12px;
  color: var(--muted);
}

.field input {
  width: 100%;
  min-height: 36px;
  padding: 0 var(--s3);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
}

.field input:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 1px;
}

.money {
  display: flex;
  align-items: center;
  gap: var(--s2);
}

.money b {
  color: var(--ink-2);
  font-size: 15px;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: var(--s2);
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.4;
}

.check input {
  margin-top: 2px;
}

.limitForm:not(:has(input[name="unlimited"]:checked)) .check.ack {
  display: none;
}

.limitForm:has(input[name="unlimited"]:checked) .money input {
  opacity: 0.4;
}

.lineSet {
  display: grid;
  gap: var(--s2);
  margin: 0;
  padding: var(--s3);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.lineSet legend {
  padding: 0 var(--s1);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.factsBrand {
  display: flex;
  align-items: baseline;
  gap: var(--s2);
  margin: 0;
}

.factsBrand strong {
  color: var(--ink);
  font-size: 16px;
}

.factsBrand span {
  color: var(--muted);
  font-size: 13px;
}

.factsLines {
  display: grid;
  gap: var(--s2);
  margin: var(--s3) 0 0;
  padding: 0;
  list-style: none;
}

.factsLines li {
  display: grid;
  gap: 2px;
  font-size: 13px;
}

.factsLines li span {
  color: var(--muted);
}

.factsLines li b {
  color: var(--ink);
  font-weight: 600;
}

.factsLines li.missing b {
  color: var(--accent-deep);
}

@media (max-width: 760px) {
  .builtAds {
    grid-template-columns: minmax(0, 1fr);
  }
}

.buildPrediction {
  margin: var(--s2) 0 0;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.45;
}

.buildPrediction span {
  color: var(--muted);
}

.launchLine {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s3);
  margin: var(--s4) 0 0;
  padding-top: var(--s3);
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.launchLine small {
  color: var(--muted);
  font-size: 12px;
}

.launchLine.good {
  color: var(--green);
}

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

.launchLine a,
.launchLine.good .ghost {
  color: var(--ink);
}

.navMe {
  display: grid;
  gap: var(--s1);
  margin-top: var(--s4);
  padding-top: var(--s3);
  border-top: 1px solid var(--line);
  font-size: 12px;
}

.navMe small {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.navMe .navAccount {
  color: var(--ink-2);
  font-weight: 600;
}

.navMe a,
.linkButton {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-2);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.navMe a:hover,
.linkButton:hover {
  color: var(--ink);
}

.resultsLine {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s2) var(--s4);
  margin: var(--s2) 0 0;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.resultsLine.muted,
.resultsLine .muted {
  color: var(--muted);
}

.resultsLine .rejected {
  color: var(--accent-deep);
  font-style: normal;
}

/* Results ------------------------------------------------------------- */

.resultsBar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s3);
  margin-bottom: var(--s3);
}

.resultsFresh {
  font-size: 12px;
}

.resultsStats .stat strong {
  font-size: 26px;
}

.dayBars {
  display: block;
  width: 100%;
  height: 120px;
  fill: var(--accent);
}

.resultsTable .tableScroll {
  max-height: 480px;
}

.resultsTable th[scope="row"] {
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.resultsTable .tag {
  margin-left: var(--s1);
}

.resultsPage {
  display: grid;
  gap: var(--s3);
}

.resultsPage .stats,
.resultsPage .resultsBar {
  margin: 0;
}

@media (max-width: 760px) {
  .resultsPage .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .resultsStats .stat strong {
    font-size: 22px;
  }
}

/* A tile note ("all time: since Nov 2023 (Meta keeps 37 months)") wraps rather than being cut off, at every width. */
.resultsStats .stat span {
  white-space: normal;
}

/* Workspace switcher in the sidebar (the narrow layouts use the one on the Launch, Performance and Settings pages). */
.navWorkspace select {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
}

@media (max-width: 1180px) {
  .navWorkspace {
    display: none;
  }
}

/* Recreate top winners (web/build.js recreateCard, recreateItem; decode_engine/recreate.py) */
.winnerList {
  display: grid;
  gap: var(--s2);
  margin: var(--s3) 0 var(--s2);
  padding: 0;
  list-style: none;
}

.winnerRow {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--s3);
  padding: var(--s2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.winnerRow img {
  display: block;
  width: 64px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--radius-xs);
  background: var(--tile);
}

.winnerRow div {
  display: grid;
  gap: 2px;
  min-width: 0;
  font-size: 13px;
}

.winnerRow b {
  color: var(--ink);
}

.winnerRow span,
.winnerRow small {
  color: var(--muted);
  font-size: 12px;
}

.winnerRow small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recreateMany {
  align-items: end;
}

.field.inline {
  display: flex;
  align-items: center;
  gap: var(--s2);
}

.field.inline input {
  width: 72px;
}

.freshForm {
  display: grid;
  gap: var(--s3);
  margin-top: var(--s4);
  padding-top: var(--s4);
  border-top: 1px solid var(--line);
}

.freshForm h3 {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
}

.freshForm select {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--ink);
  font: inherit;
}

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

.sourceAd img {
  aspect-ratio: auto;
  object-fit: contain;
}

.refStack {
  display: grid;
  gap: var(--s2);
}

.refStack img {
  aspect-ratio: 2 / 3;
}

.slotList {
  margin: var(--s2) 0;
  padding-left: 18px;
  font-size: 13px;
}

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

@media (max-width: 760px) {
  .recreateAds {
    grid-template-columns: minmax(0, 1fr);
  }

  .winnerRow {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .winnerRow img {
    width: 48px;
    height: 60px;
  }

  .winnerRow button {
    grid-column: 1 / -1;
  }
}

.styleTag {
  margin-left: var(--s1);
  padding: 1px 8px;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  color: var(--accent-deep);
  font-size: 11px;
  font-weight: 600;
}

/* Sub-tabs: the pages inside a tab. On Launch they read as a pipeline, step by step. */
.subTabs {
  display: flex;
  gap: var(--s1);
  overflow-x: auto;
  scrollbar-width: none;
}

.subTabs[hidden] {
  display: none;
}

.subTabs a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 var(--s4);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.subTabs a:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

.subTabs a[aria-current="page"] {
  border-color: var(--accent-line);
  background: var(--accent-tint);
  color: var(--ink);
}

.subTabs.pipeline {
  counter-reset: step;
}

.subTabs.pipeline a::before {
  counter-increment: step;
  content: counter(step);
  margin-right: var(--s2);
  color: var(--accent-deep);
  font-variant-numeric: tabular-nums;
}

.subTabs.pipeline {
  gap: var(--s6);
}

.subTabs.pipeline a {
  position: relative;
}

.subTabs.pipeline a:not(:last-child)::after {
  content: "→";
  position: absolute;
  right: -19px;
  color: var(--muted);
}

/* Home: today at one glance */
.today {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s3);
  margin-bottom: var(--s3);
}

.todayTile {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 112px;
  padding: var(--s4) var(--s5);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  color: inherit;
  text-decoration: none;
  transition: border-color 160ms ease;
}

.todayTile:hover {
  border-color: var(--line-strong);
}

.todayTile span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.todayTile strong {
  font-size: 28px;
  line-height: 1.15;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.todayTile small {
  color: var(--muted);
  font-size: 12px;
}

.todayTile.good strong {
  color: var(--green);
}

.todayTile.warn strong {
  color: var(--accent-deep);
}

@media (max-width: 760px) {
  .today {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--s2);
  }

  .todayTile {
    padding: var(--s3);
  }
}

/* The competitor ad sits first, so theirs and ours read left to right; wraps on narrow screens. */
.builtAds:has(> .sourceAd) {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.usScope {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 12px;
}
.heldNote { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 12px; }
.unknownList { list-style: none; margin: 8px 0 0; padding: 0; }
.unknownRow { padding: 10px 0; border-top: 1px solid var(--line); }
.unknownRow .formActions { align-items: flex-end; flex-wrap: wrap; }
.unknownRow .field { flex: 1 1 140px; min-width: 0; }

.native-format img { aspect-ratio: auto; }
