/*
 * Cumulus Digital Marketing Suite — Design System v2
 * Style: Data-Dense Dashboard | Light Mode
 * Palette: Navy/Blue + Amber accent | Satoshi
 * Rebuilt: March 2026
 */

/* ─── Fonts ────────────────────────────────────────────────── */
/* Inter is self-hosted: see the @font-face in the Shell v4 block at the end. */

/* ─── Tokens ───────────────────────────────────────────────── */
:root {
  /* Surfaces */
  --bg:          #f5f7fc;
  --surface-1:   #ffffff;
  --surface-2:   #f8fafc;
  --surface-3:   #eef2ff;
  --surface-4:   #e2e8f0;

  /* Borders */
  --border-1:    #e5e7eb;
  --border-2:    #d1d5db;
  --border-3:    #cbd5e1;

  /* Brand */
  --blue-900:    #1E3A8A;
  --blue-700:    #4361EE;
  --blue-500:    #3B82F6;
  --blue-400:    #60A5FA;
  --blue-300:    #93C5FD;
  --amber-500:   #F59E0B;
  --amber-400:   #FBBF24;

  /* Semantic */
  --color-primary:   var(--blue-700);
  --color-secondary: var(--blue-500);
  --color-accent:    var(--amber-500);
  --color-green:     #10B981;
  --color-green-dim: rgba(16,185,129,0.15);
  --color-red:       #DC2626;
  --color-red-dim:   rgba(220,38,38,0.12);
  --color-amber-dim: rgba(245,158,11,0.16);
  --color-blue-dim:  rgba(59,130,246,0.14);

  /* Text */
  --text-1:    #0f172a;
  --text-2:    #475569;
  --text-3:    #64748b;
  --text-4:    #334155;

  /* Typography */
  --font-body: 'Satoshi', -apple-system, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;

  /* Spacing */
  --gap-xs:  4px;
  --gap-sm:  8px;
  --gap-md:  16px;
  --gap-lg:  24px;
  --gap-xl:  32px;
  --gap-2xl: 48px;

  /* Radius */
  --r-sm:  6px;
  --r-md:  10px;
  --r-lg:  14px;
  --r-xl:  20px;
  --r-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(15,23,42,0.04), 0 6px 20px rgba(15,23,42,0.06), 0 0 0 1px var(--border-1);
  --shadow-md: 0 4px 8px rgba(15,23,42,0.06), 0 16px 40px rgba(15,23,42,0.1), 0 0 0 1px var(--border-1);
  --shadow-glow-blue: 0 0 20px rgba(59,130,246,0.18);
  --shadow-glow-amber: 0 0 20px rgba(245,158,11,0.18);

  /* Layout */
  --header-h:  56px;

  /* Transitions */
  --t-fast: 120ms ease;
  --t-base: 200ms ease;
  --t-slow: 300ms ease;
}

/* ─── Reset ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font-body); background: var(--bg); color: var(--text-1); line-height: 1.6;
  background-image:
    radial-gradient(circle at top left, rgba(59,130,246,0.12), transparent 26%),
    radial-gradient(circle at bottom right, rgba(245,158,11,0.08), transparent 22%);
}
a { color: inherit; text-decoration: none; }
button { font-family: var(--font-body); cursor: pointer; }
input, select, textarea { font-family: var(--font-body); }

/* ─── Stats grid ───────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.stats-grid-3 { grid-template-columns: repeat(3, 1fr); }
.stats-grid-4 { grid-template-columns: repeat(4, 1fr); }
.stats-grid-5 { grid-template-columns: repeat(5, 1fr); }

.dashboard-spotlight {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) auto;
  gap: 18px;
  align-items: center;
  padding: 24px 26px;
  margin-bottom: 18px;
  background:
    radial-gradient(circle at top right, rgba(59,130,246,0.14), transparent 28%),
    linear-gradient(135deg, rgba(255,255,255,0.96), rgba(248,251,255,1));
  border: 1px solid rgba(59,130,246,0.18);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-sm);
}
.dashboard-spotlight__content {
  display: grid;
  gap: 8px;
}
.dashboard-spotlight__eyebrow {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--blue-700);
}
.dashboard-spotlight__title {
  font-family: var(--font-body);
  font-size: 1.3rem;
  line-height: 1.25;
  color: var(--text-1);
}
.dashboard-spotlight__body {
  max-width: 58ch;
  color: var(--text-2);
  font-size: 0.92rem;
}
.dashboard-spotlight__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}


.stat-meta {
  margin-top: 10px;
  color: var(--text-3);
  font-size: 0.77rem;
  line-height: 1.45;
}

/* ─── Two-col ──────────────────────────────────────────────── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.three-col {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.chart-wrap-donut {
  position: relative;
  height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.article-pipeline-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 16px;
  margin-bottom: 20px;
}
.article-list {
  display: grid;
  gap: 14px;
}
.article-list-compact {
  display: grid;
  gap: 12px;
}
.article-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--border-1);
  border-radius: var(--r-xl);
  padding: 16px;
  background: #ffffff;
}
.article-row-title {
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 6px;
}
.article-row-link {
  color: inherit;
  text-decoration: none;
}
.article-row-link:hover {
  color: var(--blue-500);
}
.article-row-meta {
  font-size: 0.82rem;
  color: var(--text-3);
}
.calendar-layout {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 16px;
  margin-bottom: 20px;
}
.calendar-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.calendar-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}
.calendar-weekday,
.calendar-day-number {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-3);
}
.calendar-weekday {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding-bottom: 8px;
}
.calendar-day {
  min-height: 120px;
  border: 1px solid var(--border-1);
  border-radius: var(--r-xl);
  padding: 12px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.calendar-day.empty {
  background: var(--surface-3);
  border-color: var(--border-2);
}
.calendar-day-number {
  color: var(--text-2);
}
.calendar-event-count {
  font-size: 0.78rem;
  color: var(--blue-500);
  font-weight: 700;
}
.calendar-event-stack {
  display: grid;
  gap: 6px;
}
.calendar-event-pill {
  border-radius: var(--r-lg);
  padding: 8px 10px;
  background: var(--surface-3);
  font-size: 0.78rem;
  color: var(--text-2);
}

/* ─── Google Ads workspace ───────────────────────────────── */
.ads-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.ads-side-rail {
  display: grid;
  gap: 14px;
  position: sticky;
  top: 28px;
}

.ads-side-rail__card {
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(246,249,255,1));
  border: 1px solid rgba(59,130,246,0.14);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-sm);
  padding: 18px;
}

.ads-side-rail__title {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-1);
  margin-bottom: 8px;
}

.ads-side-rail__text {
  font-size: 0.84rem;
  color: var(--text-2);
  line-height: 1.6;
}

.ads-nav-list {
  display: grid;
  gap: 8px;
}

.ads-nav-list__item {
  display: block;
  padding: 12px 14px;
  border-radius: var(--r-lg);
  color: var(--text-2);
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform var(--t-fast), border-color var(--t-fast), background var(--t-fast);
}

.ads-nav-list__item:hover,
.ads-nav-list__item.active {
  background: rgba(59,130,246,0.1);
  border-color: rgba(59,130,246,0.18);
  color: var(--blue-700);
  transform: translateX(1px);
}

.ads-side-kpis {
  display: grid;
  gap: 10px;
}

.ads-side-kpi {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--r-lg);
  background: rgba(255,255,255,0.75);
  border: 1px solid var(--border-1);
}

.ads-side-kpi__label {
  font-size: 0.78rem;
  color: var(--text-3);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ads-side-kpi__value {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-1);
}

.ads-main {
  display: grid;
  gap: 18px;
}

.ads-header-card {
  background:
    radial-gradient(circle at top right, rgba(59,130,246,0.16), transparent 22%),
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(247,250,255,1));
}

.ads-header-card__top {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.ads-header-card__title,
.ads-analytics-card__title {
  font-family: var(--font-body);
  font-size: 1.8rem;
  line-height: 1.15;
  color: var(--text-1);
  margin-bottom: 8px;
}

.ads-header-card__text {
  max-width: 64ch;
  color: var(--text-2);
  font-size: 0.92rem;
}

.ads-window-pill,
.ads-panel-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--r-full);
  border: 1px solid rgba(59,130,246,0.18);
  background: rgba(255,255,255,0.8);
  color: var(--text-2);
  font-size: 0.82rem;
  font-weight: 700;
}

.ads-filter-bar {
  display: grid;
  grid-template-columns: minmax(260px, 1.2fr) 220px;
  gap: 14px;
}

.ads-filter-card {
  border-radius: var(--r-xl);
  border: 1px solid rgba(59,130,246,0.14);
  background: rgba(255,255,255,0.78);
  padding: 14px 16px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.65);
}

.ads-filter-card__label {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--text-3);
  margin-bottom: 8px;
}

.ads-filter-card__select {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text-1);
  font-size: 0.98rem;
  font-weight: 600;
  outline: none;
}

.ads-sync-note {
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(251,252,255,1));
}

.ads-analytics-card__header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.ads-metric-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border: 1px solid var(--border-1);
  border-radius: var(--r-xl);
  overflow: hidden;
  background: #ffffff;
}

.ads-metric-strip--compact {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 16px;
}

.ads-metric-tile {
  padding: 18px 18px 16px;
  border-right: 1px solid var(--border-1);
  min-height: 108px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}

.ads-metric-tile:last-child {
  border-right: none;
}

.ads-metric-tile--blue {
  background: linear-gradient(135deg, rgba(59,130,246,0.88), rgba(96,165,250,0.92));
  color: #ffffff;
}

.ads-metric-tile--violet {
  background: linear-gradient(135deg, rgba(124,58,237,0.9), rgba(139,92,246,0.94));
  color: #ffffff;
}

.ads-metric-tile--green {
  background: linear-gradient(135deg, rgba(16,185,129,0.88), rgba(45,212,191,0.9));
  color: #ffffff;
}

.ads-metric-tile__label {
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  color: inherit;
  opacity: 0.92;
}

.ads-metric-tile__value {
  font-family: var(--font-body);
  font-size: 1.6rem;
  line-height: 1.1;
  color: inherit;
}

.ads-improvement-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.85fr);
  gap: 18px;
}

.ads-panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.ads-callout-group,
.ads-improvement-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.ads-callout,
.ads-insight-card,
.ads-priority-card {
  border-radius: var(--r-xl);
  border: 1px solid var(--border-1);
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(249,251,255,1));
  padding: 18px;
}

.ads-callout--critical {
  border-color: rgba(220,38,38,0.18);
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(255,246,246,1));
}

.ads-callout--success {
  border-color: rgba(16,185,129,0.18);
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(244,255,251,1));
}

/* Google Ads audit engine (1.23.0) */
.ads-audit-score { display: flex; align-items: baseline; gap: 6px; padding: 10px 16px; border-radius: var(--r-xl); border: 1px solid var(--border-1); }
.ads-audit-score strong { font-size: 2rem; line-height: 1; }
.ads-audit-score--a, .ads-audit-score--b { color: #047857; border-color: rgba(16,185,129,0.3); }
.ads-audit-score--c, .ads-audit-score--d { color: #b45309; border-color: rgba(245,158,11,0.3); }
.ads-audit-score--f { color: #b91c1c; border-color: rgba(220,38,38,0.3); }
.ads-audit-bars { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px 20px; margin-bottom: 16px; }
.ads-audit-bar__label { display: flex; justify-content: space-between; gap: 8px; font-size: 0.85rem; margin-bottom: 4px; }
.ads-audit-h3 { margin: 16px 0 8px; font-size: 1rem; }
.ads-audit-group { margin-bottom: 12px; }
.ads-audit-finding { border: 1px solid var(--border-1); border-left-width: 4px; border-radius: var(--r-md, 8px); padding: 10px 14px; margin-bottom: 8px; }
.ads-audit-finding p { margin: 4px 0 0; }
.ads-audit-finding--fail { border-left-color: #dc2626; }
.ads-audit-finding--warn { border-left-color: #f59e0b; }
.ads-audit-finding__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ads-audit-status { font-size: 0.7rem; font-weight: 800; padding: 2px 7px; border-radius: var(--r-full); color: #fff; }
.ads-audit-status--fail { background: #dc2626; }
.ads-audit-status--warn { background: #d97706; }
.ads-audit-status--info { background: #2563eb; }
.ads-audit-section { border-top: 1px solid var(--border-1); padding: 12px 0; }
.ads-audit-section summary { cursor: pointer; font-weight: 700; margin-bottom: 8px; }
.ads-audit-negatives { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.ads-audit-textarea { width: 100%; font-family: var(--font-mono, monospace); font-size: 0.8rem; resize: vertical; }

.ads-callout--neutral {
  border-color: rgba(59,130,246,0.18);
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(244,248,255,1));
}

.ads-callout h3,
.ads-insight-card h3,
.ads-priority-card h3 {
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--text-1);
  margin-bottom: 12px;
}

.ads-bullet-list {
  display: grid;
  gap: 10px;
  padding-left: 18px;
  color: var(--text-2);
  font-size: 0.88rem;
  line-height: 1.55;
}

.ads-chip-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ads-chip {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: var(--r-full);
  background: rgba(59,130,246,0.08);
  border: 1px solid rgba(59,130,246,0.14);
  color: var(--blue-700);
  font-size: 0.8rem;
  font-weight: 600;
}

.ads-priority-list {
  display: grid;
  gap: 14px;
}

.ads-priority-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid rgba(148,163,184,0.16);
  font-size: 0.84rem;
  color: var(--text-2);
}

.ads-priority-row:first-of-type {
  border-top: none;
  padding-top: 0;
}

.ads-priority-row strong {
  color: var(--text-1);
  max-width: 70%;
}

/* ─── Tables ───────────────────────────────────────────────── */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 12px;
  font-size: 0.85rem;
}
.data-table th {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-2);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.data-table td {
  padding: 14px 14px;
  border-bottom: 1px solid rgba(148,163,184,0.16);
  vertical-align: middle;
  color: var(--text-2);
  background: #ffffff;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr { transition: background var(--t-fast); }
.data-table tbody tr:hover td { background: var(--surface-3); color: var(--text-1); }
.data-table tbody tr.row-unread td { background: rgba(30,64,175,0.06); }
.table-scroll { overflow-x: auto; }

/* ─── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--r-md);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--t-fast);
  white-space: nowrap;
  letter-spacing: 0.01em;
}
.btn:focus-visible { outline: 2px solid var(--blue-500); outline-offset: 2px; }
.btn svg { width: 14px; height: 14px; }

.btn-primary {
  background: linear-gradient(135deg, var(--blue-700) 0%, var(--blue-500) 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 12px 28px rgba(59,130,246,0.18);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #60a5fa 100%);
  box-shadow: 0 16px 38px rgba(59,130,246,0.22);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border-color: var(--border-2);
}
.btn-ghost:hover { background: var(--surface-3); color: var(--text-1); border-color: var(--border-3); }

/* A paused keyword target is still listed (so Resume is reachable) but must not
   read as part of the active set. */
.row-paused { opacity: .55; }
.row-paused:hover { opacity: 1; }
.tag-paused { background: var(--surface-3); color: var(--text-2); }

/* Destructive actions. Quiet until hovered — a Delete sitting in every row of
   a long table should not shout, but must be unmistakable once reached for. */
.btn-danger {
  background: transparent;
  color: #dc2626;
  border-color: #fecaca;
}
.btn-danger:hover { background: #dc2626; color: #fff; border-color: #dc2626; }
.btn-danger:active { transform: translateY(0); }

.btn-sm { padding: 4px 10px; font-size: 0.75rem; }
.btn-full { width: 100%; justify-content: center; }
.btn[disabled] { opacity: 0.4; cursor: not-allowed; pointer-events: none; }

.accent-btn {
  background: var(--color-green-dim);
  color: var(--color-green);
  border-color: rgba(16,185,129,0.3);
}
.accent-btn:hover { background: rgba(16,185,129,0.2); }

/* ─── Forms ────────────────────────────────────────────────── */
.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-3);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  background: #f8fafc;
  border: 1px solid var(--border-2);
  border-radius: var(--r-xl);
  color: var(--text-1);
  font-size: 0.95rem;
  padding: 12px 14px;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  outline: none;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 4px rgba(59,130,246,0.16);
  background: #ffffff;
}
.field input::placeholder { color: var(--text-4); }
.field textarea { resize: vertical; min-height: 80px; }
.field select { cursor: pointer; }

.select-sm {
  background: var(--surface-3);
  border: 1px solid var(--border-2);
  border-radius: var(--r-md);
  color: var(--text-1);
  font-size: 0.77rem;
  padding: 5px 10px;
  cursor: pointer;
  outline: none;
  transition: border-color var(--t-fast);
}
.select-sm:focus { border-color: var(--blue-500); }

.form-actions {
  display: flex;
  gap: 8px;
  margin-top: 18px;
  align-items: center;
}
.filter-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.filter-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.section-eyebrow {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--blue-700);
  margin-bottom: 8px;
}

.context-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.context-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: var(--r-full);
  border: 1px solid var(--border-2);
  background: var(--surface-3);
  color: var(--text-2);
  font-size: 0.76rem;
  font-weight: 600;
}
.context-pill--amber {
  background: rgba(245,158,11,0.12);
  border-color: rgba(245,158,11,0.2);
  color: #b45309;
}
.context-pill--green {
  background: rgba(16,185,129,0.12);
  border-color: rgba(16,185,129,0.2);
  color: #047857;
}

/* ─── Badges & Tags ────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--r-full);
  font-size: 0.65rem;
  font-weight: 800;
  background: var(--color-red);
  color: #fff;
  letter-spacing: 0.02em;
}
.tag {
  display: inline-flex;
  padding: 2px 7px;
  border-radius: var(--r-sm);
  font-size: 0.7rem;
  font-family: var(--font-body);
  background: var(--surface-3);
  border: 1px solid var(--border-2);
  color: var(--text-3);
  letter-spacing: 0.02em;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: var(--r-full);
  font-size: 0.7rem;
  font-weight: 600;
}
.status::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.status-active { background: var(--color-green-dim); color: var(--color-green); }
.status-generating { background: var(--color-blue-dim); color: var(--blue-500); }
.status-inactive { background: var(--surface-3); color: var(--text-3); }

.article-review-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.75fr);
  gap: 16px;
  align-items: start;
}
.article-review-content {
  display: grid;
  gap: 16px;
}
.article-review-sidebar {
  display: grid;
  gap: 16px;
}
.article-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.article-meta-item {
  padding: 12px 14px;
  border: 1px solid var(--border-1);
  border-radius: var(--r-lg);
  background: var(--surface-2);
}
.article-meta-label {
  font-size: 0.72rem;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}
.article-meta-value {
  font-size: 0.92rem;
  color: var(--text-1);
  word-break: break-word;
}
.article-content {
  display: grid;
  gap: 12px;
}
.tab-strip {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.tab-pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: var(--r-full);
  border: 1px solid var(--border-2);
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 0.8rem;
  font-weight: 700;
}
.tab-pill.active {
  background: var(--color-blue-dim);
  color: var(--blue-700);
  border-color: rgba(59,130,246,0.25);
}
.article-body {
  display: grid;
  gap: 12px;
  color: var(--text-2);
}
.article-body h1,
.article-body h2,
.article-body h3,
.article-body h4 {
  font-family: var(--font-body);
  color: var(--text-1);
  line-height: 1.3;
}
.article-body p,
.article-body li {
  color: var(--text-2);
}
.article-body ul,
.article-body ol {
  padding-left: 1.25rem;
}
.article-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.article-body th,
.article-body td {
  border: 1px solid var(--border-1);
  padding: 10px 12px;
  text-align: left;
}
.article-body th {
  background: var(--surface-2);
  color: var(--text-1);
}
.article-sidebar-list {
  display: grid;
  gap: 10px;
}
.article-sidebar-item {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--border-1);
  border-radius: var(--r-lg);
  background: #ffffff;
}
.article-sidebar-item a {
  font-weight: 700;
  color: var(--text-1);
}
.article-sidebar-item a:hover {
  color: var(--blue-500);
}
.article-sidebar-meta {
  font-size: 0.8rem;
  color: var(--text-3);
}
.article-html-editor {
  min-height: 520px;
  font-family: var(--font-body);
  font-size: 0.82rem;
  line-height: 1.6;
  white-space: pre;
}

/* ─── Alert tags ───────────────────────────────────────────── */
.tag-entered_top_3    { background: rgba(245,158,11,0.12); color: var(--amber-400); border-color: rgba(245,158,11,0.25); }
.tag-entered_top_10   { background: var(--color-blue-dim); color: var(--blue-400); border-color: rgba(59,130,246,0.2); }
.tag-dropped_3_or_more { background: var(--color-red-dim); color: #f87171; border-color: rgba(239,68,68,0.2); }
.tag-url_changed      { background: rgba(139,92,246,0.12); color: #a78bfa; border-color: rgba(139,92,246,0.2); }
.tag-ranking_lost     { background: var(--color-red-dim); color: #f87171; border-color: rgba(239,68,68,0.2); }

/* ─── Priority tags ────────────────────────────────────────── */
.tag-priority-high   { background: var(--color-red-dim); color: #f87171; border-color: rgba(239,68,68,0.2); }
.tag-priority-medium { background: var(--color-amber-dim); color: var(--amber-400); border-color: rgba(245,158,11,0.2); }
.tag-priority-low    { background: var(--surface-3); color: var(--text-3); border-color: var(--border-2); }

.tag-score { background: var(--color-blue-dim); color: var(--blue-400); border-color: rgba(59,130,246,0.2); font-weight: 600; }
.tag-pipeline-suggested { background: var(--surface-3); color: var(--text-3); border-color: var(--border-2); }
.tag-pipeline-targeted { background: var(--color-amber-dim); color: var(--amber-400); border-color: rgba(245,158,11,0.2); }
.tag-pipeline-active { background: var(--color-green-dim); color: var(--color-green); border-color: rgba(16,185,129,0.2); }
.tag-pipeline-archived { background: var(--color-red-dim); color: #f87171; border-color: rgba(239,68,68,0.2); }

.sort-link { color: inherit; text-decoration: none; }
.sort-link:hover { color: var(--text-1); }

/* ─── Meta campaign status ─────────────────────────────────── */
.tag-meta-draft       { background: var(--surface-3); color: var(--text-3); border-color: var(--border-2); }
.tag-meta-copy_review,
.tag-meta-copy_pending { background: var(--color-amber-dim); color: var(--amber-400); border-color: rgba(245,158,11,0.2); }
.tag-meta-ready,
.tag-meta-copy_approved { background: var(--color-green-dim); color: var(--color-green); border-color: rgba(16,185,129,0.2); }
.tag-meta-deploying   { background: rgba(139,92,246,0.12); color: #a78bfa; border-color: rgba(139,92,246,0.2); }
.tag-meta-deployed,
.tag-meta-active,
.tag-meta-uploaded    { background: var(--color-green-dim); color: var(--color-green); border-color: rgba(16,185,129,0.2); }
.tag-meta-pending     { background: var(--surface-3); color: var(--text-3); border-color: var(--border-2); }
.tag-meta-error       { background: var(--color-red-dim); color: #f87171; border-color: rgba(239,68,68,0.2); }
.tag-status-ok   { background: var(--color-green-dim); color: var(--color-green); border-color: rgba(16,185,129,0.2); }
.tag-status-fail { background: var(--color-red-dim); color: #f87171; border-color: rgba(239,68,68,0.2); }
.tag-status-warn { background: var(--color-amber-dim); color: var(--amber-400); border-color: rgba(245,158,11,0.2); }

/* ─── Colour utilities ─────────────────────────────────────── */
.accent-amber { color: var(--amber-400); }
.accent-blue  { color: var(--blue-400); }
.accent-green { color: var(--color-green); }
.accent-red   { color: #f87171; }
.text-muted   { color: var(--text-3); }
.mono         { font-family: var(--font-mono); }

/* ─── Alerts ───────────────────────────────────────────────── */
.alert {
  padding: 10px 14px;
  border-radius: var(--r-md);
  font-size: 0.82rem;
  margin-bottom: 14px;
}
.alert-error {
  background: var(--color-red-dim);
  border: 1px solid rgba(239,68,68,0.25);
  color: #fca5a5;
}
.alert-success {
  background: rgba(16,185,129,0.12);
  border: 1px solid rgba(16,185,129,0.25);
  color: var(--color-green);
}

/* ─── Login ────────────────────────────────────────────────── */
.login-body {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(30,64,175,0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(59,130,246,0.05) 0%, transparent 50%);
}

/* ─── Misc utilities ───────────────────────────────────────── */
.link { color: var(--blue-400); transition: color var(--t-fast); }
.link:hover { color: var(--blue-300); text-decoration: underline; }
.empty-state { color: var(--text-3); font-size: 0.85rem; padding: 20px 0; }
.help-text { font-size: 0.8rem; color: var(--text-3); margin-bottom: 10px; line-height: 1.6; }
.help-text code {
  font-family: var(--font-body);
  background: var(--surface-3);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--blue-400);
}
.mb-4 { margin-bottom: 16px; }
.flex-wrap { flex-wrap: wrap; }
.definition-list { display: grid; grid-template-columns: 120px 1fr; gap: 8px 16px; font-size: 0.82rem; }
.definition-list dt { color: var(--text-3); font-weight: 600; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; }
pre { background: var(--surface-3); border: 1px solid var(--border-2); border-radius: var(--r-md); padding: 14px; font-size: 0.78rem; overflow-x: auto; }

/* ─── Loading spinner ──────────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2px solid var(--border-2);
  border-top-color: var(--blue-500);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Dashboard ────────────────────────────────────────────── */
.card-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}
.card-header-row .card-title { margin-bottom: 0; }
.chart-wrap {
  position: relative;
  height: 170px;
  background: linear-gradient(180deg, rgba(59,130,246,0.08), rgba(255,255,255,0.85));
  border: 1px solid rgba(59,130,246,0.16);
  border-radius: var(--r-xl);
  padding: 18px;
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.7);
}

.alert-stack { display: flex; flex-direction: column; }
.alert-row {
  display: grid;
  grid-template-columns: 110px 1fr 2fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-1);
  font-size: 0.78rem;
}
.alert-row:last-child { border-bottom: none; }
.alert-row--unread { background: rgba(30,64,175,0.04); margin: 0 -20px; padding: 8px 20px; }
.alert-kw { font-family: var(--font-mono); font-size: 0.74rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-1); }
.alert-msg { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-3); }
.alert-time { white-space: nowrap; color: var(--text-4); font-size: 0.72rem; }

.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  padding: 2px 7px;
  border-radius: var(--r-sm);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  background: var(--surface-3);
  color: var(--text-2);
}
.rank-top3  { background: rgba(245,158,11,0.15); color: var(--amber-400); }
.rank-top10 { background: var(--color-blue-dim); color: var(--blue-400); }

.delta { font-family: var(--font-mono); font-size: 0.78rem; font-weight: 700; white-space: nowrap; }
.delta--up   { color: var(--color-green); }
.delta--down { color: #f87171; }
.delta--flat { color: var(--text-3); }

.kw-cell { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-1); font-family: var(--font-mono); font-size: 0.78rem; }
.url-cell { max-width: 220px; }
.url-truncate { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.74rem; color: var(--blue-400); }
.perf-table { min-width: 860px; }

/* ─── Tabs ─────────────────────────────────────────────────── */
.tabs {
  display: flex;
  flex-direction: column;
}

.tabs input[type="radio"] {
  display: none;
}

.tabs label {
  padding: 12px 20px;
  background: var(--surface-2);
  border: 1px solid var(--border-1);
  border-bottom: none;
  cursor: pointer;
  font-weight: 500;
  color: var(--text-2);
  transition: background var(--t-fast), color var(--t-fast);
}

.tabs label:hover {
  background: var(--surface-3);
  color: var(--text-1);
}

.tabs input[type="radio"]:checked + label {
  background: var(--surface-1);
  color: var(--text-1);
  border-color: var(--border-2);
}

.tabs .tab-content {
  display: none;
  padding: 20px;
  background: var(--surface-1);
  border: 1px solid var(--border-1);
  border-top: none;
}

#tab-general:checked ~ #general,
#tab-content:checked ~ #content,
#tab-automation:checked ~ #automation,
#tab-integrations:checked ~ #integrations {
  display: block;
}

.settings-tabs {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border-1);
  border-radius: var(--r-xl);
  overflow: hidden;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
}

.settings-tabs .tab-header {
  display: flex;
  width: 100%;
  background: var(--surface-2);
}

.settings-tabs label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-width: 140px;
  padding: 14px 18px;
  color: var(--text-3);
  font-weight: 700;
  border-right: 1px solid var(--border-1);
  background: var(--surface-2);
}

.settings-tabs label:last-of-type {
  border-right: none;
}

#tab-general:checked ~ .tab-header label[for="tab-general"],
#tab-content:checked ~ .tab-header label[for="tab-content"],
#tab-automation:checked ~ .tab-header label[for="tab-automation"],
#tab-integrations:checked ~ .tab-header label[for="tab-integrations"] {
  background: #ffffff;
  color: var(--text-1);
  box-shadow: inset 0 -2px 0 var(--blue-500);
}

.settings-tabs .tab-content {
  padding: 28px;
  background: #ffffff;
  border-top: none;
  border-radius: 0 0 var(--r-xl) var(--r-xl);
}

.settings-tabs .tab-content + .tab-content {
  margin-top: 16px;
}

/* ─── Portfolio ────────────────────────────────────────────── */
.portfolio-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }

.portfolio-card {
  background: var(--surface-2);
  border: 1px solid var(--border-1);
  border-radius: var(--r-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color var(--t-base), transform var(--t-base);
  cursor: pointer;
}
.portfolio-card:hover { border-color: var(--border-3); transform: translateY(-1px); }

.portfolio-card-header { display: flex; align-items: flex-start; gap: 10px; }
.portfolio-card-meta { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.portfolio-status {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 5px;
}
.portfolio-status--green  { background: var(--color-green); box-shadow: 0 0 8px rgba(16,185,129,0.5); }
.portfolio-status--amber  { background: var(--amber-400); box-shadow: 0 0 8px rgba(245,158,11,0.5); }
.portfolio-status--red    { background: var(--color-red); box-shadow: 0 0 8px rgba(239,68,68,0.5); }
.portfolio-status--no_data { background: var(--text-4); }
.portfolio-client-link {
  font-size: 0.68rem;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}
.portfolio-client-link:hover { color: var(--blue-700); }
.portfolio-project-link {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-1);
  line-height: 1.45;
}
.portfolio-project-link:hover { color: var(--blue-700); }

.portfolio-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; border-top: 1px solid var(--border-1); padding-top: 12px; }
.pstat { text-align: center; }
.pstat-value { font-family: var(--font-mono); font-size: 1.15rem; font-weight: 700; color: var(--text-1); }
.pstat-label { font-size: 0.62rem; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 2px; }

.portfolio-movers { display: flex; gap: 8px; align-items: center; font-size: 0.75rem; }
.portfolio-recs { }
.recs-badge {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--color-blue-dim);
  color: var(--blue-400);
  border: 1px solid rgba(59,130,246,0.2);
}
.recs-badge--high { background: var(--color-red-dim); color: #f87171; border-color: rgba(239,68,68,0.2); }
.portfolio-actions { display: flex; gap: 6px; margin-top: auto; }

/* ─── Project activity hub ────────────────────────────────── */
.activity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.activity-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 174px;
  padding: 18px 18px 20px;
  border-radius: var(--r-lg);
  border: 1px solid var(--border-1);
  background: linear-gradient(180deg, rgba(255,255,255,1), rgba(248,251,255,0.98));
  box-shadow: 0 10px 30px rgba(15,23,42,0.07), 0 0 0 1px rgba(226,232,240,0.9);
  transition: transform var(--t-base), border-color var(--t-base), box-shadow var(--t-base);
  position: relative;
  overflow: hidden;
}
.activity-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(15,23,42,0.12), 0 0 0 1px rgba(59,130,246,0.12);
}
.activity-card::before {
  content: '';
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  opacity: 0.95;
}
.activity-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.activity-card__icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid transparent;
}
.activity-card__icon svg {
  width: 20px;
  height: 20px;
}
.activity-card--performance::before,
.activity-card--primary::before {
  background: linear-gradient(90deg, #2563eb, #60a5fa);
}
.activity-card--search::before {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}
.activity-card--paid::before {
  background: linear-gradient(90deg, #0f766e, #2dd4bf);
}
.activity-card--content::before {
  background: linear-gradient(90deg, #7c3aed, #c084fc);
}
.activity-card--action::before {
  background: linear-gradient(90deg, #059669, #34d399);
}
.activity-card--setup::before {
  background: linear-gradient(90deg, #475569, #94a3b8);
}
.activity-card--primary,
.activity-card--performance {
  border-color: rgba(59,130,246,0.16);
  background: linear-gradient(180deg, rgba(239,246,255,0.95), rgba(255,255,255,1));
}
.activity-card__icon--performance,
.activity-card__icon--primary {
  background: rgba(59,130,246,0.12);
  color: var(--blue-700);
  border-color: rgba(59,130,246,0.12);
}
.activity-card__icon--search {
  background: rgba(245,158,11,0.14);
  color: #b45309;
  border-color: rgba(245,158,11,0.16);
}
.activity-card__icon--paid {
  background: rgba(20,184,166,0.14);
  color: #0f766e;
  border-color: rgba(20,184,166,0.16);
}
.activity-card__icon--content {
  background: rgba(168,85,247,0.12);
  color: #7c3aed;
  border-color: rgba(168,85,247,0.16);
}
.activity-card__icon--action {
  background: rgba(16,185,129,0.14);
  color: #059669;
  border-color: rgba(16,185,129,0.16);
}
.activity-card__icon--setup {
  background: rgba(100,116,139,0.14);
  color: #475569;
  border-color: rgba(100,116,139,0.16);
}
.activity-card__eyebrow {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
  font-weight: 700;
}
.activity-card__title {
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-1);
}
.activity-card__body {
  font-size: 0.84rem;
  line-height: 1.6;
  color: var(--text-2);
}

.project-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) auto;
  gap: 18px;
  align-items: center;
  padding: 24px 26px;
  margin-bottom: 20px;
  background:
    radial-gradient(circle at top right, rgba(245,158,11,0.1), transparent 24%),
    radial-gradient(circle at left center, rgba(59,130,246,0.12), transparent 30%),
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,251,255,1));
  border: 1px solid rgba(59,130,246,0.16);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-sm);
}
.project-hero__content {
  display: grid;
  gap: 8px;
}
.project-hero__eyebrow {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--blue-700);
}
.project-hero__title {
  font-family: var(--font-body);
  font-size: 1.35rem;
  line-height: 1.22;
  color: var(--text-1);
}
.project-hero__body {
  max-width: 64ch;
  color: var(--text-2);
  font-size: 0.92rem;
  line-height: 1.65;
}
.project-hero__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.mini-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}
.mini-kpi {
  padding: 12px 14px;
  border-radius: var(--r-lg);
  border: 1px solid var(--border-1);
  background: var(--surface-3);
}
.mini-kpi__label {
  font-size: 0.72rem;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
  font-weight: 700;
}
.mini-kpi__value {
  font-family: var(--font-body);
  font-size: 1.15rem;
  color: var(--text-1);
}

/* ─── Recommendations ──────────────────────────────────────── */
.recs-list { display: flex; flex-direction: column; gap: 10px; }
.rec-card {
  background: var(--surface-2);
  border: 1px solid var(--border-1);
  border-left: 3px solid var(--border-2);
  border-radius: var(--r-lg);
  padding: 14px 18px;
  display: flex; flex-direction: column; gap: 9px;
}
.rec-card--high   { border-left-color: #f87171; }
.rec-card--medium { border-left-color: var(--amber-400); }
.rec-card--low    { border-left-color: var(--blue-500); }
.rec-card--done   { opacity: 0.45; }
.rec-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px; }
.rec-badges { display: flex; gap: 5px; flex-wrap: wrap; }
.rec-type-badge { display: inline-flex; padding: 2px 7px; border-radius: var(--r-sm); font-size: 0.67rem; font-weight: 700; letter-spacing: 0.06em; font-family: var(--font-body); }
.rec-type--SEO { background: var(--color-blue-dim); color: var(--blue-400); border: 1px solid rgba(59,130,246,0.2); }
.rec-type--AEO { background: var(--color-amber-dim); color: var(--amber-400); border: 1px solid rgba(245,158,11,0.2); }
.rec-priority-badge { display: inline-flex; padding: 2px 7px; border-radius: var(--r-sm); font-size: 0.68rem; font-weight: 600; }
.rec-priority--high   { background: var(--color-red-dim); color: #f87171; }
.rec-priority--medium { background: var(--color-amber-dim); color: var(--amber-400); }
.rec-priority--low    { background: var(--surface-3); color: var(--text-3); }
.rec-action-badge { display: inline-flex; padding: 2px 7px; border-radius: var(--r-sm); font-size: 0.68rem; color: var(--text-3); background: var(--surface-3); border: 1px solid var(--border-2); }
.rec-status { font-size: 0.72rem; font-weight: 600; }
.rec-status--to_do       { color: var(--text-3); }
.rec-status--in_progress { color: var(--blue-400); }
.rec-status--done        { color: var(--color-green); }
.rec-keyword { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; }
.rec-label { font-weight: 600; font-size: 0.84rem; color: var(--text-1); }
.rec-body { font-size: 0.82rem; color: var(--text-2); line-height: 1.65; }
.rec-notes { font-size: 0.78rem; color: var(--text-2); background: var(--surface-3); padding: 8px 12px; border-radius: var(--r-md); border: 1px solid var(--border-2); }
.rec-footer { display: flex; gap: 6px; align-items: center; justify-content: space-between; }
.rec-actions { display: flex; gap: 5px; }

/* ─── Audit ────────────────────────────────────────────────── */
.audit-bars { display: flex; flex-direction: column; gap: 11px; }
.audit-bar-row { display: grid; grid-template-columns: 200px 1fr 38px; gap: 12px; align-items: center; }
.audit-bar-label { display: flex; flex-direction: column; font-size: 0.82rem; font-weight: 500; }
.audit-bar-score { font-family: var(--font-mono); font-weight: 700; font-size: 0.85rem; text-align: right; }
.findings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.finding-section { background: var(--surface-3); border-radius: var(--r-md); padding: 14px; }
.finding-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; }
.finding-label { font-weight: 700; font-size: 0.8rem; color: var(--text-1); }
.finding-summary { font-size: 0.77rem; color: var(--text-3); margin-bottom: 9px; line-height: 1.5; }
.finding-list { list-style: none; display: flex; flex-direction: column; gap: 5px; }
.finding-item { display: flex; gap: 7px; font-size: 0.78rem; line-height: 1.4; align-items: flex-start; color: var(--text-2); }
.finding-dot { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; margin-top: 5px; }
.finding-item--high .finding-dot   { background: #f87171; }
.finding-item--medium .finding-dot { background: var(--amber-400); }
.finding-item--low .finding-dot    { background: var(--blue-500); }

/* ─── Checklist ────────────────────────────────────────────── */
.checklist { display: flex; flex-direction: column; }
.checklist-item { display: flex; align-items: flex-start; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border-1); }
.checklist-item:last-child { border-bottom: none; }
.checklist-icon { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.72rem; font-weight: 800; flex-shrink: 0; margin-top: 1px; }
.checklist-icon--pass { background: var(--color-green-dim); color: var(--color-green); }
.checklist-icon--fail { background: var(--color-red-dim); color: #f87171; }
.checklist-label { font-size: 0.84rem; font-weight: 500; color: var(--text-1); }
.checklist-fix { font-size: 0.75rem; color: #f87171; margin-top: 2px; }

/* ─── Ads cards ────────────────────────────────────────────── */
.ads-list { display: flex; flex-direction: column; gap: 14px; }
.ad-card { background: var(--surface-3); border: 1px solid var(--border-1); border-radius: var(--r-md); padding: 14px; }
.ad-card--approved { border-color: rgba(16,185,129,0.25); }
.ad-card-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.ad-name { font-weight: 700; font-size: 0.875rem; color: var(--text-1); margin-right: 5px; }
.ad-copy-preview { display: flex; flex-direction: column; gap: 9px; }
.copy-field { }
.copy-label { font-size: 0.64rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-3); display: block; margin-bottom: 3px; font-weight: 700; }
.copy-text { font-size: 0.82rem; line-height: 1.5; color: var(--text-1); white-space: pre-line; }

/* ─── Proposal ─────────────────────────────────────────────── */
.proposal-doc { background: var(--surface-2); border: 1px solid var(--border-1); border-radius: var(--r-lg); max-width: 740px; margin: 0 auto; overflow: hidden; }
.proposal-header { display: flex; justify-content: space-between; align-items: flex-start; padding: 24px 28px; border-bottom: 1px solid var(--border-1); background: var(--surface-3); }
.proposal-stats { display: grid; grid-template-columns: repeat(4, 1fr); padding: 18px 28px; border-bottom: 1px solid var(--border-1); gap: 14px; }
.proposal-section { padding: 20px 28px; border-bottom: 1px solid var(--border-1); }
.proposal-section h2 { font-family: var(--font-body); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--blue-400); margin-bottom: 9px; }
.proposal-section p { font-size: 0.875rem; line-height: 1.8; color: var(--text-1); }
.proposal-services { display: flex; flex-direction: column; gap: 10px; }
.proposal-service { background: var(--surface-3); border-radius: var(--r-md); padding: 11px 14px; }
.proposal-service-name { font-weight: 700; font-size: 0.84rem; color: var(--blue-400); margin-bottom: 3px; }
.proposal-service-desc { font-size: 0.8rem; color: var(--text-3); }
.proposal-signoff { padding: 24px 28px; }
.proposal-signoff p { font-size: 0.875rem; line-height: 1.8; font-style: italic; color: var(--text-2); }

/* ─── Email sequence ───────────────────────────────────────── */
.email-card { background: var(--surface-2); border: 1px solid var(--border-1); border-radius: var(--r-lg); overflow: hidden; }
.email-card-header { display: flex; align-items: center; gap: 10px; padding: 11px 14px; background: var(--surface-3); border-bottom: 1px solid var(--border-1); flex-wrap: wrap; }
.email-number { font-family: var(--font-mono); font-size: 0.75rem; font-weight: 700; color: var(--blue-400); }
.email-meta { padding: 10px 14px; border-bottom: 1px solid var(--border-1); display: flex; flex-direction: column; gap: 5px; }
.email-meta-row { display: flex; gap: 10px; align-items: baseline; }
.email-meta-label { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-3); width: 50px; flex-shrink: 0; font-weight: 700; }
.email-meta-value { font-size: 0.82rem; color: var(--text-1); }
.email-body { padding: 14px; font-size: 0.84rem; line-height: 1.8; color: var(--text-1); white-space: pre-wrap; }

/* ─── Filter checkbox ──────────────────────────────────────── */
.filter-checkbox { display: flex; align-items: center; gap: 6px; font-size: 0.82rem; color: var(--text-3); cursor: pointer; }
.filter-checkbox input { cursor: pointer; accent-color: var(--blue-500); }

/* ─── Responsive ───────────────────────────────────────────── */
@media (max-width: 1024px) {
  .two-col { grid-template-columns: 1fr; }
  .findings-grid { grid-template-columns: 1fr; }
  .alert-row { grid-template-columns: 90px 1fr auto; }
  .alert-msg { display: none; }
  .project-hero { grid-template-columns: 1fr; }
  .project-hero__actions { justify-content: flex-start; }
}

@media (max-width: 768px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .stats-grid-5 { grid-template-columns: repeat(2, 1fr); }
  .three-col { grid-template-columns: 1fr !important; }
  .two-col { grid-template-columns: 1fr !important; }
  .portfolio-grid { grid-template-columns: 1fr; }
  .mini-kpi-grid { grid-template-columns: 1fr; }

  /* Google Ads page — hide left rail, single-column layouts */
  .ads-side-rail { display: none; }
  .ads-shell,
  .ads-improvement-grid,
  .ads-callout-group,
  .ads-improvement-columns,
  .ads-filter-bar { grid-template-columns: 1fr !important; }
  .ads-analytics-card__header { flex-wrap: wrap; }

  /* Touch targets — 44px minimum for interactive elements */
  .btn { min-height: 40px; }
  .btn-sm { min-height: 36px; }
  .ads-nav-list__item { min-height: 44px; padding: 12px 14px; }

}

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

/* ─── Copy Generator ───────────────────────────────────────── */
.copy-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 24px;
  align-items: start;
}
.copy-form-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: sticky;
  top: 24px;
}
.copy-output-panel { display: flex; flex-direction: column; gap: 16px; }

/* Channel grid */
.channel-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.channel-option {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 10px 8px; border-radius: var(--radius-md);
  border: 1px solid var(--color-border-2);
  cursor: pointer; transition: all 150ms; text-align: center;
}
.channel-option input { display: none; }
.channel-option:hover { border-color: var(--color-secondary); background: var(--color-surface-2); }
.channel-option--active { border-color: var(--color-secondary); background: rgba(59,130,246,0.08); }
.channel-icon { font-size: 1.2rem; }
.channel-name { font-size: 0.72rem; color: var(--color-text-muted); }

/* Framework list */
.framework-list { display: flex; flex-direction: column; gap: 6px; }
.framework-option {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 12px; border-radius: var(--radius-md);
  border: 1px solid var(--color-border-2);
  cursor: pointer; transition: all 150ms;
}
.framework-option input { display: none; }
.framework-option:hover { border-color: var(--color-secondary); background: var(--color-surface-2); }
.framework-option--active { border-color: var(--color-secondary); background: rgba(59,130,246,0.08); }
.framework-info { flex: 1; }
.framework-name { font-size: 0.82rem; font-weight: 600; color: var(--color-text); }
.framework-desc { font-size: 0.75rem; color: var(--color-text-muted); margin-top: 2px; line-height: 1.4; }
.framework-best { font-size: 0.7rem; color: var(--color-secondary); margin-top: 3px; }
.framework-option--active .framework-name { color: var(--color-secondary); }

/* Output */
.copy-output-header { display: flex; gap: 8px; align-items: center; }
.copy-framework-note {
  font-size: 0.82rem; color: var(--color-text-muted); font-style: italic;
  padding: 10px 14px; background: var(--color-surface);
  border-left: 3px solid var(--color-secondary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

/* Variations */
.copy-variation {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
}
.copy-variation-label {
  font-size: 0.82rem; font-weight: 600; color: var(--color-secondary);
  margin-bottom: 12px;
}
.copy-fields { display: flex; flex-direction: column; gap: 8px; }
.copy-field-row {
  display: grid; grid-template-columns: 120px 1fr 28px;
  gap: 8px; align-items: start;
  padding: 8px 0; border-bottom: 1px solid var(--color-border);
}
.copy-field-row:last-child { border-bottom: none; }
.copy-field-key {
  font-size: 0.7rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--color-text-muted); padding-top: 2px;
}
.copy-field-value {
  font-size: 0.875rem; line-height: 1.5; white-space: pre-line;
  cursor: pointer; border-radius: var(--radius-sm); padding: 2px 4px;
  transition: background 150ms;
}
.copy-field-value:hover { background: var(--color-surface-2); }
.copy-btn {
  background: none; border: none; color: var(--color-text-muted);
  cursor: pointer; font-size: 0.85rem; padding: 2px 4px;
  border-radius: var(--radius-sm); transition: color 150ms;
}
.copy-btn:hover { color: var(--color-text); }
.copy-save-form {
  display: flex; gap: 8px; margin-top: 12px; align-items: center;
  padding-top: 12px; border-top: 1px solid var(--color-border);
}
.copy-save-label {
  flex: 1; background: var(--color-surface-2); border: 1px solid var(--color-border-2);
  border-radius: var(--radius-md); color: var(--color-text);
  font-family: var(--font-body); font-size: 0.82rem; padding: 6px 10px;
}

/* Empty state */
.copy-empty {
  background: var(--color-surface); border: 1px dashed var(--color-border-2);
  border-radius: var(--radius-lg); padding: 48px; text-align: center;
  color: var(--color-text-muted); font-size: 0.9rem;
}

/* Saved library */
.copy-saved-section { margin-top: 8px; }
.copy-saved-title {
  font-family: var(--font-body); font-size: 0.85rem; font-weight: 600;
  color: var(--color-text-muted); text-transform: uppercase;
  letter-spacing: 0.05em; margin-bottom: 12px;
}
.copy-saved-card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); padding: 14px 16px; margin-bottom: 10px;
}
.copy-saved-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.copy-saved-label { font-weight: 600; font-size: 0.875rem; }

@media (max-width: 900px) {
  .copy-layout { grid-template-columns: 1fr; }
  .copy-form-panel { position: static; }
  .channel-grid { grid-template-columns: repeat(3, 1fr); }

  .ads-shell,
  .ads-improvement-grid,
  .ads-callout-group,
  .ads-improvement-columns,
  .ads-filter-bar {
    grid-template-columns: 1fr;
  }

  .ads-side-rail {
    position: static;
  }

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

@media (max-width: 640px) {
  .ads-metric-strip {
    grid-template-columns: 1fr;
  }

  .ads-header-card__title,
  .ads-analytics-card__title {
    font-size: 1.35rem;
  }

  .ads-priority-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ─── Accessibility & focus ────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100px;
  left: 12px;
  z-index: 200;
  padding: 8px 16px;
  background: var(--blue-700);
  color: #fff;
  border-radius: var(--r-md);
  font-size: 0.875rem;
  font-weight: 600;
  transition: top var(--t-fast);
  text-decoration: none;
}
.skip-link:focus { top: 12px; outline: 2px solid var(--blue-500); outline-offset: 2px; }

.nav-item:focus-visible {
  outline: 2px solid var(--blue-500);
  outline-offset: -2px;
}
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--blue-500);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: none;
}

/* ─── Sortable table headers ───────────────────────────────── */
.data-table th.sortable {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.data-table th.sortable:hover { color: var(--text-1); }
.sort-icon {
  display: inline-block;
  margin-left: 5px;
  opacity: 0.3;
  font-style: normal;
  font-size: 0.8em;
  transition: opacity var(--t-fast);
  vertical-align: middle;
}
.data-table th.sort-asc .sort-icon,
.data-table th.sort-desc .sort-icon {
  opacity: 1;
  color: var(--blue-700);
}

/* ─── Layout & readability improvements ───────────────────── */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ─── Local SEO geo-grid ───────────────────────────────────── */
.grid-pin {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(15,23,42,0.35);
  font-size: 0.8rem;
  font-weight: 800;
  color: #fff;
}
.grid-pin-green { background: #16a34a; }
.grid-pin-amber { background: #d97706; }
.grid-pin-red   { background: #dc2626; }
.grid-pin-grey  { background: #64748b; font-size: 0.65rem; }


/* ═══ Run progress (Sept 2026) ══════════════════════════════════════════════
   Every Run / Sync / Scan / Check button used to leave the page looking
   untouched until the server answered — up to a minute. Now the button shows
   it's working and a card tracks the run with an estimated progress bar.
   Modelled on the shadcn Progress component the team chose.
   ═══════════════════════════════════════════════════════════════════════════ */
.progress-track {
  position: relative; width: 100%; height: 10px; overflow: hidden;
  border-radius: 9999px; background: #eef2ff;
}
.progress-fill {
  height: 100%; width: 100%; border-radius: 9999px; background: var(--blue-700, #4361ee);
  transform: translateX(-100%); transition: transform 0.6s ease-out;
}
.progress-fill::after {
  /* a soft moving sheen so a slow stretch still reads as alive */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.45), transparent);
  animation: progress-sheen 1.6s linear infinite;
}
@keyframes progress-sheen { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.progress-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.progress-title { font-size: 0.9rem; font-weight: 600; color: var(--ink); }
.progress-status { font-size: 0.75rem; color: var(--ink-3); white-space: nowrap; }
.progress-value { margin-top: 6px; text-align: right; font-size: 0.75rem; font-weight: 600; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.progress-note { margin-top: 10px; font-size: 0.78rem; color: var(--ink-3); }

.run-progress {
  position: fixed; inset: 0; z-index: 120; display: none;
  align-items: center; justify-content: center; padding: 16px;
  background: rgba(17,24,39,0.18); backdrop-filter: blur(2px);
}
.run-progress.active { display: flex; }
.run-progress__card {
  width: 100%; max-width: 420px; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; padding: 22px 24px; box-shadow: 0 20px 40px rgba(17,24,39,0.18);
}

/* The button that was pressed */
.btn.is-running { position: relative; pointer-events: none; opacity: 0.85; }
.btn.is-running::before {
  content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 8px; vertical-align: -1px;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
  .progress-fill::after, .btn.is-running::before { animation: none; }
}
/* ─────────────────────────────────────────────────────────────────────────────
   Client onboarding checklist (projects/onboarding.html)
   ───────────────────────────────────────────────────────────────────────────── */
.onboard { max-width: 760px; }
.onboard__head { padding: 18px 20px; margin-bottom: 16px; }
.onboard__count { font-size: 14px; color: var(--text-2); }
.onboard__count strong { color: var(--text-1); }
.onboard__all-done { font-weight: 600; color: #047857; }
.onboard__steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.onboard-step {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--surface-1); border: 1px solid var(--border-1); border-radius: 10px;
  padding: 14px 16px; transition: border-color .15s, background .15s;
}
.onboard-step.is-active { border-color: rgba(67,97,238,.35); background: #f7f9ff; box-shadow: 0 1px 2px rgba(15,23,42,.04); }
.onboard-step__marker {
  flex-shrink: 0; width: 28px; height: 28px; margin-top: 1px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--surface-4); color: var(--text-3);
  font-size: 12px; font-weight: 600;
}
.onboard-step.is-active .onboard-step__marker { background: var(--color-primary); color: #fff; }
.onboard-step.is-done .onboard-step__marker { background: none; color: var(--color-green); }
.onboard-step__marker svg { width: 28px; height: 28px; }
.onboard-step__body { flex: 1; min-width: 0; }
.onboard-step__title { font-weight: 600; color: var(--text-1); line-height: 1.5; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.onboard-step:not(.is-active):not(.is-done) .onboard-step__title { color: var(--text-2); }
.onboard-step.is-done .onboard-step__title { color: var(--text-3); }
.onboard-step__tag {
  font-size: 11px; font-weight: 500; color: var(--text-3);
  border: 1px solid var(--border-2); border-radius: 999px; padding: 0 7px; line-height: 18px;
}
.onboard-step__desc { margin: 2px 0 0; font-size: 13px; line-height: 1.5; color: var(--text-3); }
.onboard-step.is-active .onboard-step__desc { color: var(--text-2); }
.onboard-step.is-done .onboard-step__desc { display: none; }
.onboard-step__status {
  margin-top: 4px; font-size: 12.5px; color: #047857; word-break: break-word;
}
.onboard-step:not(.is-done) .onboard-step__status { color: #b45309; }
.onboard-step__cta { margin-top: 10px; display: inline-flex; align-items: center; gap: 6px; }
.onboard-step__cta-icon svg { width: 15px; height: 15px; display: block; }
.onboard-step__link { display: inline-block; margin-top: 6px; font-size: 13px; }
.onboard-step__link--quiet { color: var(--text-3); }
.onboard-step__icon { flex-shrink: 0; color: var(--border-3); margin-top: 3px; }
.onboard-step.is-active .onboard-step__icon { color: var(--color-primary); }
.onboard-step__icon svg { width: 20px; height: 20px; display: block; }
@media (max-width: 600px) {
  .onboard-step { padding: 12px; gap: 10px; }
  .onboard-step__icon { display: none; }
}
.onboard-banner {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 14px 18px; margin-bottom: 20px; text-decoration: none; color: inherit;
  border-left: 4px solid var(--color-primary);
}
.onboard-banner:hover { border-color: var(--color-primary); }
.onboard-banner__text { flex: 1; min-width: 200px; }

/* Ranking summary on the audit pages (_rank_overview.html) */
.rank-overview__charts { grid-template-columns: 2fr 1fr; }
/* A chart's canvas sets its own width before it resizes; without this a grid
   column grows to fit it and the card runs off a phone screen. */
.rank-overview__charts > .card { min-width: 0; }
@media (max-width: 900px) { .rank-overview__charts { grid-template-columns: 1fr; } }

/* Local Services page: type/status card beside the leads table */
.lsa-split { grid-template-columns: 1fr 2fr; }
.lsa-split > .card { min-width: 0; }
@media (max-width: 900px) { .lsa-split { grid-template-columns: 1fr; } }

/* Privacy Policy link under every page's content (always visible, unlike the sidebar footer when collapsed) */
.page-footer { margin-top: 32px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 0.75rem; text-align: center; }
.page-footer a { color: var(--text-3); }
/* App chrome, not part of a printed report or proposal (their print styles hide the rest of the shell). */
@media print { .page-footer { display: none !important; } }

/* ═══════════════════════════════════════════════════════════════════════════
   Shell v4, Pane style, Oct 2026 (1.32.0 pilot)
   A floating glass sidebar and toolbar on one flat wall colour, translucent
   cards, solid table surfaces, pill buttons and tinted chips. Light mode
   only. Written fresh for this app (clean room: style facts only, nothing
   taken from any template's source). Every colour in this block goes through
   a custom property defined below, so a later theme only redefines :root.
   The single definition of the app shell (Phase 2 folded the v2 and v3
   shell rules into it).
   ═══════════════════════════════════════════════════════════════════════════ */

/* Inter, self-hosted (rsms/inter 4.1, SIL OFL 1.1: app/static/fonts/Inter-LICENSE.txt). */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/static/fonts/InterVariable.woff2") format("woff2");
}

:root {
  /* Base */
  --wall:          #e4e4e7;
  --text:          #0f1017;
  --text-muted:    rgba(15,16,23,.62);
  --text-faint:    rgba(15,16,23,.45);
  --glass-card:    rgba(255,255,255,.32);
  --glass-chrome:  rgba(255,255,255,.26);
  --glass-field:   rgba(255,255,255,.55);
  --glass-hover:   rgba(255,255,255,.5);
  --surface-solid: #f3f5fa;
  --surface-white: #ffffff;
  --rim:           rgba(255,255,255,.7);
  --line:          rgba(15,16,23,.08);
  --tint-hover:    rgba(15,16,23,.035);
  --tint-neutral:  rgba(15,16,23,.06);
  --shade:         rgba(15,16,23,.06);
  --shade-strong:  rgba(15,16,23,.12);
  --scrim:         rgba(15,16,23,.22);
  --tooltip:       rgba(15,16,23,.92);
  --print-line:    #e5e7eb;   /* card edges on paper, as before the restyle */

  /* Accent: the Cumulus brand blue (Ed, 26 Oct). White on it is 5.0:1. */
  --accent:        #4361ee;
  --accent-ink:    #ffffff;
  --accent-text:   #1f42eb;   /* accent as text on glass: 4.6:1 on the bare wall */
  --accent-top:    #4a67ef;   /* 3% lighter */
  --accent-bottom: #415ee7;   /* 3% darker */
  --accent-shadow: rgba(67,97,238,.28);
  --accent-tint:   rgba(67,97,238,.12);
  /* Sign-in page (batch 1.38). */
  --accent-light:  #4b69ef;   /* gradient start: white on it is 4.6:1 (blue-400 would be 2.5:1) */
  --accent-ring:   rgba(67,97,238,.5);
  --field-edge:    #85858f;   /* a field's border on white: 3.6:1 */
  --grid-line:     rgba(30,58,138,.5);   /* the decorative corner grid */
  /* Sign-in brand panel (1.41.0): a fixed dark surface made from the text
     and accent tokens, and the text on it (white is 18:1 on it). */
  --signin-night:     var(--text);   /* plain fallback; the mix below where supported */
  --signin-night-ink: var(--accent-ink);

  /* Semantic colours, a 14% tint of each for chips, and an ink: the same hue
     darkened until it reads at 4.5:1 on its tint over the bare wall, with the
     unread-alert row tint under it too (the darkest place a chip sits). */
  --c-blue:   #2f7cf6;  --c-blue-tint:   rgba(47,124,246,.14);  --c-blue-ink:   #084bb7;
  --c-purple: #8b5cf6;  --c-purple-tint: rgba(139,92,246,.14);  --c-purple-ink: #530df0;
  --c-pink:   #e9468f;  --c-pink-tint:   rgba(233,70,143,.14);  --c-pink-ink:   #9d1351;
  --c-orange: #f2711c;  --c-orange-tint: rgba(242,113,28,.14);  --c-orange-ink: #8a3c08;
  --c-green:  #22a559;  --c-green-tint:  rgba(34,165,89,.14);   --c-green-ink:  #146034;
  --c-teal:   #0ea5a4;  --c-teal-tint:   rgba(14,165,164,.14);  --c-teal-ink:   #085e5d;
  --c-yellow: #e3a008;  --c-yellow-tint: rgba(227,160,8,.16);   --c-yellow-ink: #715004;
  --c-danger: #d92d3a;  --c-danger-tint: rgba(217,45,58,.12);   --c-danger-ink: #9b1c26;
  --c-slate:  #64748b;               /* grid pin "not found": white on it 4.76:1 */
  --c-blue-soft: #9cc0fb;          /* rank 11–20 in the distribution chart */
  --chart-rest:  rgba(15,16,23,.12); /* rank 21+ */

  /* Shape, glass, motion, spacing */
  --r-12: 12px; --r-18: 18px; --r-24: 24px; --r-30: 30px; --r-pill: 999px;
  --blur: blur(14px) saturate(175%);
  --ease: cubic-bezier(.22,.8,.24,1);
  --t: .2s;
  --gap: clamp(12px, 1.2vw, 20px);
  --gutter: clamp(14px, 1.6vw, 28px);
  --inset: 14px;
  --toolbar-h: 56px;
  --tabbar-h: 64px;
  --sidebar-w: 256px;
  --sidebar-collapsed-w: 64px;
  --shadow-chrome: 0 1px 2px var(--shade), 0 12px 32px var(--shade-strong);
  --shadow-card: 0 1px 2px var(--shade), 0 10px 28px var(--shade);

  --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, sans-serif;

  /* Old names, pointed at the new tokens (v2, v3 and the templates use them) */
  --bg: var(--wall);
  --canvas: var(--wall);
  --surface-1: var(--surface-solid);
  --text-1: var(--text);
  --ink: var(--text);
  --text-2: var(--text);
  --ink-2: var(--text);
  --color-text: var(--text);
  --text-3: var(--text-muted);
  --ink-3: var(--text-muted);
  --color-text-muted: var(--text-muted);
  --border-1: var(--line);
  --blue-700: var(--accent);
  --color-primary: var(--accent);
  --active-ink: var(--accent);
  --color-green: var(--c-green);
  --color-red: var(--c-danger);
  --amber-500: var(--c-yellow);
  --color-accent: var(--c-yellow);
  /* Names some templates and rules used but nothing defined until now */
  --color-blue: var(--c-blue);
  --color-purple: var(--c-purple);
  --color-border: var(--line);
  --color-border-2: var(--border-2);
  --color-surface: var(--surface-solid);
  --color-surface-2: var(--surface-2);
  --radius-sm: var(--r-12);
  --radius-md: var(--r-12);
  --radius-lg: var(--r-18);
}
/* The sign-in panel's dark surface where color-mix is supported (1.41.0). */
@supports (color: color-mix(in srgb, red, blue)) {
  :root { --signin-night: color-mix(in srgb, var(--text) 94%, var(--accent)); }
}

/* ── Base ── */
body {
  background: var(--wall);
  background-image: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
}
.layout { display: block; margin-top: 0; min-height: 100vh; background: var(--wall) !important; }

/* ── Glass: chrome (sidebar, toolbar, tab bar) and cards ── */
.sidebar, .top-header, .tabbar {
  background: var(--glass-chrome) !important;
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--rim);
  box-shadow: var(--shadow-chrome);
}
.card, .stat-card, .run-progress__card {
  background: var(--glass-card);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--rim);
  box-shadow: var(--shadow-card);
}
/* Tables sit on a solid surface: easier to read than glass. */
.card:has(> .table-scroll), .card:has(> table), .card--solid {
  background: var(--surface-solid);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
/* A wide table scrolls in its wrapper (or, unwrapped, in its card) rather
   than widening the page: the same set of cards as the solid rule above. */
.card > .table-scroll, .card:has(> table) { overflow-x: auto; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .sidebar, .top-header, .tabbar { background: var(--surface-solid) !important; }
  .card, .stat-card, .run-progress__card { background: var(--surface-solid); }
}
@media (prefers-reduced-transparency: reduce) {
  .sidebar, .top-header, .tabbar { background: var(--surface-solid) !important; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .card, .stat-card, .run-progress__card { background: var(--surface-solid); backdrop-filter: none; -webkit-backdrop-filter: none; }
}

/* ── Sidebar: a floating glass panel ── */
/* The width is CSS only: 256px, or the 64px rail when body has
   .sidebar-collapsed (main.js sets the class and remembers the choice).
   .sidebar-animate is set only while a click toggles it, so a remembered
   rail does not animate on page load. */
.sidebar {
  position: fixed;
  top: var(--inset); left: var(--inset); bottom: var(--inset);
  height: auto;
  width: var(--sidebar-w);
  border-right: 1px solid var(--rim);
  border-radius: var(--r-30);
  padding: 12px;
  z-index: 40;
  display: flex; flex-direction: column;
  overflow: hidden;
  transition: none;
}
body.sidebar-animate .sidebar { transition: width 0.28s ease; }
.sidebar-brand { display: flex; align-items: center; flex-shrink: 0; margin: 0 0 8px; padding: 6px 6px 12px; gap: 12px; border-bottom: none; }
.brand-icon {
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden;
  width: 40px; height: 40px; border-radius: var(--r-12); box-shadow: 0 1px 2px var(--shade-strong);
}
.brand-icon img { display: block; width: 40px; height: 40px; border-radius: var(--r-12) !important; }
.brand-text { display: flex; flex-direction: column; }
.brand-name { font-size: 1rem; font-weight: 650; line-height: 1.2; color: var(--text); letter-spacing: -0.01em; }
.brand-sub { font-size: 0.8rem; color: var(--text-muted); letter-spacing: 0; }

/* Only the menu scrolls; the brand stays at the top and Hide at the bottom. */
.sidebar-nav {
  display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-height: 0;
  overflow-y: auto; overflow-x: hidden; scrollbar-width: thin;
}
.nav-section { margin-bottom: 6px; }
.nav-section-summary {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px 4px; margin: 0; border-radius: 6px;
  font-size: 0.73rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-muted);
  list-style: none; cursor: pointer; user-select: none;
  transition: background var(--t-fast);
}
.nav-section-summary::-webkit-details-marker { display: none; }
.nav-section-summary:hover { color: var(--text); }
.nav-section-title { display: inline-flex; flex: 1; }
.nav-section-icon { width: 12px; height: 12px; flex-shrink: 0; color: var(--text-muted); transition: transform var(--t-fast); }
.nav-section[open] > .nav-section-summary .nav-section-icon { transform: rotate(180deg); }
.nav-section > .nav-item:first-of-type { margin-top: 2px; }
.nav-section[open] .nav-item { animation: slideDown 0.2s ease; }
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-2px); }
  to { opacity: 1; transform: translateY(0); }
}

.nav-item {
  position: relative; display: flex; align-items: center; gap: 0;
  height: 44px; padding: 0 12px 0 0; margin: 1px 0;
  border: none; border-left: none; border-radius: var(--r-18);
  color: var(--text); font-size: 0.94rem; font-weight: 500;
  white-space: nowrap; overflow: hidden; cursor: pointer;
  transition: background var(--t) var(--ease), color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; margin: 0 12px 0 14px; color: var(--text-muted); opacity: 1; }
.nav-item:hover { background: var(--glass-hover); color: var(--text); transform: none; }
.nav-item:hover svg { color: var(--text); }
.nav-item.active {
  background: var(--surface-white); color: var(--text); font-weight: 600;
  border: none; border-left: none;
  box-shadow: 0 1px 2px var(--shade), 0 6px 16px var(--shade-strong);
}
.nav-item.active svg { color: var(--accent); }
.nav-badge {
  display: inline-flex; align-items: center; justify-content: center;
  margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 9999px; background: var(--tint-neutral); color: var(--text);
  font-size: 0.7rem; font-weight: 600; line-height: 1;
}

/* Footer: the build stamp, then the Hide toggle pinned to the bottom */
.sidebar-footer {
  display: flex; flex-direction: column; align-items: stretch; justify-content: space-between;
  gap: 6px; flex-shrink: 0;
  margin: 8px 0 0; padding: 8px 0 0; border-top: 1px solid var(--line);
}
.sidebar-version {
  width: 100%; margin: 0; padding: 0 12px; text-align: left;
  font-size: 0.7rem; letter-spacing: 0.04em; color: var(--text-muted); opacity: 1;
}
.sidebar-collapse-btn {
  display: flex; align-items: center; justify-content: flex-start; flex-shrink: 0; gap: 0;
  width: 100%; height: 44px; margin: 0; padding: 0;
  border: none; border-radius: var(--r-18); background: transparent;
  color: var(--text); font-size: 0.875rem; font-weight: 500;
  transition: color var(--t-fast), background var(--t-fast), transform var(--t-slow);
}
.sidebar-collapse-btn:hover { background: var(--glass-hover); color: var(--text); }
.sidebar-collapse-icon { width: 48px; display: grid; place-content: center; flex-shrink: 0; }
.sidebar-collapse-icon svg { display: block; width: 16px; height: 16px; transform: rotate(180deg); transition: transform var(--t-slow); }

/* Collapsed: the 64px rail of centred icons; section headers become thin
   dividers. */
body.sidebar-collapsed .sidebar { width: var(--sidebar-collapsed-w); padding: 12px 8px; }
body.sidebar-collapsed .brand-text,
body.sidebar-collapsed .nav-section-title,
body.sidebar-collapsed .nav-section-icon,
body.sidebar-collapsed .nav-item .nav-label,
body.sidebar-collapsed .sidebar-collapse-btn .nav-label,
body.sidebar-collapsed .sidebar-version { display: none; }
body.sidebar-collapsed .sidebar-brand { justify-content: center; padding: 10px 0 14px; gap: 0; }
body.sidebar-collapsed .sidebar-nav { padding: 10px 6px; }
body.sidebar-collapsed .nav-section-summary {
  justify-content: center; height: 9px; padding: 0; margin: 6px 10px;
  font-size: 0; border-top: 1px solid var(--line); border-radius: 0;
}
body.sidebar-collapsed .nav-item { justify-content: center; padding: 0; border-radius: var(--r-12); }
body.sidebar-collapsed .nav-item svg { width: 18px; height: 18px; margin: 0; }
body.sidebar-collapsed .nav-badge {
  position: absolute; top: 6px; right: 6px; min-width: 16px; height: 16px; padding: 0 4px; font-size: 0.6rem;
}
body.sidebar-collapsed .sidebar-footer { align-items: center; padding: 10px 8px; gap: 8px; }
body.sidebar-collapsed .sidebar-collapse-btn { justify-content: center; }
body.sidebar-collapsed .sidebar-collapse-icon svg { transform: none; }

/* ── Toolbar: a floating pill, top right ── */
.top-header {
  position: fixed; display: flex; align-items: center; justify-content: space-between;
  top: var(--inset); right: var(--inset); left: auto;
  height: var(--toolbar-h); width: auto; max-width: calc(100vw - var(--sidebar-w) - 4 * var(--inset));
  padding: 0 8px; gap: 8px;
  border-radius: var(--r-pill);
  border-bottom: 1px solid var(--rim);
  z-index: 45;
}
.header-left { display: none; }
.header-right { display: flex; align-items: center; flex-shrink: 0; gap: 8px; min-width: 0; }
.context-switcher { display: flex; align-items: center; margin-right: 0; gap: 6px; min-width: 0; }
.context-select {
  max-width: 220px; height: 40px; padding: 0 12px; border: none; border-radius: var(--r-pill);
  background: var(--glass-field); color: var(--text); font-size: 0.87rem; font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--rim);
  transition: background var(--t) var(--ease);
}
.context-select:hover { background: var(--surface-white); }
.context-select--site { max-width: 180px; }
@media (max-width: 720px) { .context-select--site { display: none; } }
.icon-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border: none; border-radius: var(--r-pill);
  background: transparent; color: var(--text);
  transition: background var(--t) var(--ease);
}
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover { background: var(--glass-hover); color: var(--text); }
.icon-btn__dot { position: absolute; border-radius: 50%; top: 7px; right: 8px; width: 9px; height: 9px; background: var(--c-danger); border: 2px solid var(--surface-white); }
.user-pill {
  display: flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 6px 0 14px; border: none; border-radius: var(--r-pill);
  background: var(--glass-field); box-shadow: inset 0 0 0 1px var(--rim);
}
.user-pill__name { color: var(--text); font-size: 0.87rem; font-weight: 600; letter-spacing: 0; }
.user-pill__logout {
  display: flex; align-items: center; padding: 6px;
  background: none; border: none; border-radius: var(--r-pill); color: var(--text-muted);
  transition: color var(--t-fast), background var(--t-fast);
}
.user-pill__logout svg { width: 14px; height: 14px; }
.user-pill__logout:hover { color: var(--c-danger-ink); background: var(--c-danger-tint); }

/* ── Main column ── */
.main-content {
  margin-left: calc(var(--sidebar-w) + 2 * var(--inset));
  padding: calc(var(--inset) + var(--toolbar-h) + 18px) var(--gutter) var(--gutter);
  background: transparent;
  min-height: 100vh;
  transition: margin-left var(--t) var(--ease);
}
body.sidebar-collapsed .main-content { margin-left: calc(var(--sidebar-collapsed-w) + 2 * var(--inset)); }

.page-header {
  display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap;
  gap: 12px var(--gap); margin-bottom: calc(var(--gap) + 6px);
}
.page-title {
  font-size: clamp(34px, 2.2vw + 14px, 58px); font-weight: 700; line-height: 1.08;
  letter-spacing: -0.02em; color: var(--text);
}
.page-subtitle { margin-top: 6px; color: var(--text-muted); font-size: 1rem; }
.page-title-sub { margin-left: 8px; font-size: 0.72rem; font-weight: 400; color: var(--text-muted); }
.page-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.page-footer { border-top: none; margin-top: 28px; padding-bottom: 4px; }
.page-footer a { color: var(--text-muted); }
.page-footer a:hover { color: var(--text); }

/* ── Cards ── */
.card { border-radius: var(--r-30); padding: 22px 24px; margin-bottom: var(--gap); }
.card:last-child { margin-bottom: 0; }
.card-title { display: flex; align-items: center; gap: 10px; font-size: 1.134rem; font-weight: 650; color: var(--text); letter-spacing: -0.01em; margin-bottom: 14px; }
.card-title-hint { font-size: 0.87rem; font-weight: 500; color: var(--text-muted); margin-left: 4px; }
.card-title-link { margin-left: auto; font-size: 0.87rem; font-weight: 600; color: var(--accent-text); transition: color var(--t-fast); }
.card-title-link:hover { color: var(--accent); }
.card--warn { border-left: 4px solid var(--c-yellow); }
.card--danger { border-left: 4px solid var(--c-danger); }
.card-header-row { margin-bottom: 14px; }
.chart-wrap {
  height: 190px; padding: 6px 2px 0; border: none; border-radius: 0;
  background: none; box-shadow: none;
}
.chart-wrap-donut { height: 170px; }
.two-col, .three-col { gap: var(--gap); margin-bottom: var(--gap); }
.two-col > .card, .three-col > .card { margin-bottom: 0; min-width: 0; }
.help-text { color: var(--text-muted); font-size: 0.87rem; }
.text-muted { color: var(--text-muted); }
.empty-state { color: var(--text-muted); font-size: 0.93rem; text-align: center; padding: 28px 12px; }

/* ── Stat pills ── */
.stats-grid { gap: var(--gap); }
.stat-card {
  position: relative; overflow: hidden;
  border-radius: var(--r-24); padding: 16px 18px;
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.stat-card:hover { transform: translateY(-1px); border-color: var(--rim); box-shadow: 0 1px 2px var(--shade), 0 14px 32px var(--shade-strong); }
.stat-label { font-size: 0.87rem; font-weight: 500; color: var(--text-muted); text-transform: none; letter-spacing: 0; margin-bottom: 2px; }
.stat-value { font-size: 28px; font-weight: 700; line-height: 1.15; color: var(--text); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.stat-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.stat-icon { display: inline-grid; place-content: center; width: 36px; height: 36px; border-radius: var(--r-12); margin-bottom: 12px; }
.stat-icon svg { width: 18px; height: 18px; }
.stat-icon--blue   { background: var(--c-blue-tint);   color: var(--c-blue-ink); }
.stat-icon--green  { background: var(--c-green-tint);  color: var(--c-green-ink); }
.stat-icon--purple { background: var(--c-purple-tint); color: var(--c-purple-ink); }
.stat-icon--amber  { background: var(--c-yellow-tint); color: var(--c-yellow-ink); }
.stat-icon--red    { background: var(--c-danger-tint); color: var(--c-danger-ink); }
.stat-value--up   { color: var(--c-green-ink); }
.stat-value--down { color: var(--c-danger-ink); }

/* ── Buttons: pills ── */
.btn {
  min-height: 40px; padding: 0 18px; gap: 8px; justify-content: center;
  border-radius: var(--r-pill); font-size: 0.93rem; font-weight: 600; letter-spacing: 0;
  transition: background var(--t) var(--ease), box-shadow var(--t) var(--ease), transform var(--t) var(--ease), color var(--t) var(--ease);
}
.btn-sm { min-height: 32px; padding: 0 11px; font-size: 0.87rem; }
.btn-primary {
  background: linear-gradient(180deg, var(--accent-top), var(--accent-bottom));
  color: var(--accent-ink); border-color: transparent;
  box-shadow: 0 6px 16px var(--accent-shadow);
}
.btn-primary:hover {
  background: linear-gradient(180deg, var(--accent-top), var(--accent-bottom));
  box-shadow: 0 8px 22px var(--accent-shadow);
  transform: translateY(-1px);
}
.btn-ghost {
  background: var(--glass-field); color: var(--text);
  border-color: transparent; box-shadow: inset 0 0 0 1px var(--rim), 0 1px 2px var(--shade);
}
.btn-ghost:hover { background: var(--surface-white); color: var(--text); border-color: transparent; }
.select-sm {
  height: 36px; padding: 0 12px; border: none; border-radius: var(--r-pill);
  background: var(--glass-field); color: var(--text); font-size: 0.87rem; font-weight: 500;
  box-shadow: inset 0 0 0 1px var(--rim), 0 1px 2px var(--shade);
  transition: background var(--t) var(--ease);
}
.select-sm:hover, .select-sm:focus { background: var(--surface-white); }

/* ── Chips: badges, tags, rank and movement ── */
.badge, .tag, .context-pill, .rank-badge, .delta {
  display: inline-flex; height: auto; align-items: center; justify-content: center; gap: 4px;
  min-height: 22px; padding: 0 9px; border: none; border-radius: var(--r-pill);
  font-family: var(--font-body); font-size: 12px; font-weight: 600; line-height: 1; letter-spacing: 0;
  white-space: nowrap;
}
.badge       { background: var(--c-danger-tint); color: var(--c-danger-ink); }
.badge-red   { background: var(--c-danger); color: var(--accent-ink); }
.badge-green { background: var(--c-green-tint); color: var(--c-green-ink); }
.tag         { background: var(--tint-neutral); color: var(--text); }
.tag-entered_top_3     { background: var(--c-yellow-tint); color: var(--c-yellow-ink); }
.tag-entered_top_10    { background: var(--c-blue-tint);   color: var(--c-blue-ink); }
.tag-dropped_3_or_more { background: var(--c-danger-tint); color: var(--c-danger-ink); }
.tag-url_changed       { background: var(--c-purple-tint); color: var(--c-purple-ink); }
.tag-ranking_lost      { background: var(--c-danger-tint); color: var(--c-danger-ink); }
/* The older status chips keep their meaning on the new tints: they come after
   the generic .tag above, which would otherwise turn them all grey. */
.tag-paused,
.tag-priority-low,
.tag-pipeline-suggested,
.tag-meta-draft,
.tag-meta-pending       { background: var(--tint-neutral);  color: var(--text-muted); }
.tag-priority-high,
.tag-pipeline-archived,
.tag-meta-error,
.tag-status-fail        { background: var(--c-danger-tint); color: var(--c-danger-ink); }
.tag-priority-medium,
.tag-pipeline-targeted,
.tag-meta-copy_review,
.tag-meta-copy_pending,
.tag-status-warn        { background: var(--c-yellow-tint); color: var(--c-yellow-ink); }
.tag-pipeline-active,
.tag-meta-ready,
.tag-meta-copy_approved,
.tag-meta-deployed,
.tag-meta-active,
.tag-meta-uploaded,
.tag-status-ok          { background: var(--c-green-tint);  color: var(--c-green-ink); }
.tag-meta-deploying     { background: var(--c-purple-tint); color: var(--c-purple-ink); }
.tag-score              { background: var(--c-blue-tint);   color: var(--c-blue-ink); }
.context-pill        { background: var(--tint-neutral); color: var(--text); }
.context-pill--amber { background: var(--c-yellow-tint); color: var(--c-yellow-ink); }
.context-pill--green { background: var(--c-green-tint); color: var(--c-green-ink); }
.rank-badge  { min-width: 32px; font-size: 13px; font-variant-numeric: tabular-nums; background: var(--tint-neutral); color: var(--text); }
.rank-top3   { background: var(--c-yellow-tint); color: var(--c-yellow-ink); }
.rank-top10  { background: var(--c-blue-tint); color: var(--c-blue-ink); }
.delta       { font-variant-numeric: tabular-nums; }
.delta--up   { background: var(--c-green-tint);  color: var(--c-green-ink); }
.delta--down { background: var(--c-danger-tint); color: var(--c-danger-ink); }
.delta--flat { background: var(--tint-neutral);  color: var(--text-muted); }

/* ── Tables: plain rows on a solid surface ── */
.data-table { border-collapse: collapse; border-spacing: 0; font-size: 14px; }
.data-table th {
  padding: 10px; font-size: 12px; font-weight: 600; color: var(--text-muted);
  text-transform: none; letter-spacing: 0; border-bottom: 1px solid var(--line); background: transparent;
}
.data-table td {
  padding: 12px 10px; font-size: 14px; color: var(--text); background: transparent;
  border-bottom: 1px solid var(--line);
}
.data-table tbody tr { transition: background var(--t) var(--ease); }
.data-table tbody tr:hover td { background: var(--tint-hover); color: var(--text); }
.data-table tr:last-child td { border-bottom: none; }
.data-table th.sortable:hover { color: var(--text); }
.data-table th .sort-icon { margin-left: 3px; }
.data-table th.sort-asc .sort-icon, .data-table th.sort-desc .sort-icon { color: var(--accent-text); }
.kw-cell { color: var(--text); }
.url-truncate, .link { color: var(--accent-text); }

/* ── Dashboard alerts list ── */
/* Two lines per alert: the chip, keyword and date, then the message under the
   keyword, so the keyword keeps its width in the narrow dashboard column. */
.alert-row {
  grid-template-columns: max-content minmax(0, 1fr) auto;
  grid-template-areas: "kind kw time" "kind msg msg";
  row-gap: 2px; align-items: center;
  border-bottom: 1px solid var(--line); font-size: 13px; padding: 10px 0;
}
.alert-row > .tag { grid-area: kind; align-self: start; }
.alert-row > .alert-kw { grid-area: kw; }
.alert-row > .alert-msg { grid-area: msg; display: block; font-size: 12px; }
.alert-row > .alert-time { grid-area: time; }
.alert-row--unread { background: var(--accent-tint); margin: 0 -12px; padding: 10px 12px; border-radius: var(--r-12); }
.alert-kw { color: var(--text); }
.alert-msg, .alert-time { color: var(--text-muted); }

/* ── Onboarding banner and progress bars ── */
.onboard-banner { border-left: 4px solid var(--accent); }
.onboard-banner__progress {
  -webkit-appearance: none; appearance: none; display: block;
  width: 160px; height: 6px; border: none; border-radius: var(--r-pill);
  overflow: hidden; background: var(--tint-neutral); color: var(--c-green);
}
.onboard-banner__progress::-webkit-progress-bar { background: var(--tint-neutral); border-radius: var(--r-pill); }
.onboard-banner__progress::-webkit-progress-value { background: var(--c-green); border-radius: var(--r-pill); }
.onboard-banner__progress::-moz-progress-bar { background: var(--c-green); border-radius: var(--r-pill); }
@media (max-width: 600px) { .onboard-banner__progress { width: 100%; } }
.progress-track { background: var(--tint-neutral); }
.progress-fill { background: var(--accent); }
.run-progress { background: var(--scrim); }
.run-progress__card { border-radius: var(--r-24); }

/* ── Utilities (the dashboard's former inline styles) ── */
.m-0 { margin: 0; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-5 { margin-bottom: 20px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.d-inline { display: inline; }
.d-block { display: block; }
.empty-block { text-align: center; padding: 48px 20px; }
.empty-block--sm { padding: 36px 16px; }
.empty-block__icon { font-size: 2rem; line-height: 1; margin-bottom: 12px; opacity: .35; }
.empty-block__title { color: var(--text); font-size: 1rem; font-weight: 600; margin-bottom: 8px; }
.empty-block__text { color: var(--text-muted); font-size: 0.93rem; margin: 0; }
.empty-block__text + .btn-row { margin-top: 18px; }
.btn-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.dash-top { grid-template-columns: 2fr 1fr 1.4fr; }
.stats-grid--rank { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); margin-bottom: 24px; }
.card-title--up { color: var(--c-green-ink); }
.card-title--down { color: var(--c-danger-ink); }
.card-title__icon { width: 14px; height: 14px; flex-shrink: 0; }
.setup-card { padding: 14px 18px; }
.setup-card > summary { cursor: pointer; }
.setup-card__note { margin: 0 0 0 6px; }
.setup-group { margin-top: 12px; }
.setup-group + .setup-group { margin-top: 14px; }
.setup-list { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 10px; }
.setup-issue { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
.setup-group .setup-issue { margin-top: 8px; }
.setup-issue > .badge { flex-shrink: 0; }
.setup-issue__body { flex: 1; min-width: 220px; }
.sub-line { display: block; margin: 2px 0 0; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 8px; margin-top: 10px; justify-content: center; }
.legend__item { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.swatch--yellow { background: var(--c-yellow); }
.swatch--accent { background: var(--accent); }
.swatch--blue-soft { background: var(--c-blue-soft); }
.swatch--rest { background: var(--chart-rest); }
@media (max-width: 1100px) { .dash-top { grid-template-columns: 1fr 1fr; } .dash-top > .card:first-child { grid-column: 1 / -1; } }

/* ── Motion: cards rise in, staggered ── */
@keyframes rise { from { opacity: 0; translate: 0 6px; } to { opacity: 1; translate: none; } }
/* Fill mode "backwards" only: once it has run, no translate is left on the
   card (a lasting transform would trap fixed-position children). */
.card, .stat-card { animation: rise var(--t) var(--ease) backwards; }
:is(.card, .stat-card):nth-child(2) { animation-delay: 40ms; }
:is(.card, .stat-card):nth-child(3) { animation-delay: 80ms; }
:is(.card, .stat-card):nth-child(4) { animation-delay: 120ms; }
:is(.card, .stat-card):nth-child(5) { animation-delay: 160ms; }
:is(.card, .stat-card):nth-child(6) { animation-delay: 200ms; }
:is(.card, .stat-card):nth-child(7) { animation-delay: 240ms; }
:is(.card, .stat-card):nth-child(n+8) { animation-delay: 280ms; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-delay: 0s !important; transition-delay: 0s !important; }
  .card, .stat-card, .nav-section[open] .nav-item { animation: none !important; }
}

/* ── Phone tab bar (shown under 769px) ── */
.tabbar { display: none; }

@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }
  .main-content {
    margin-left: 0 !important;
    padding: 12px var(--inset) calc(var(--tabbar-h) + 2 * var(--inset) + 12px);
  }
  body.sidebar-collapsed .main-content { margin-left: 0; }

  /* Toolbar: in the page flow; the bell and user top right, the company
     selects on their own row beneath. Each piece is its own glass pill. */
  .top-header {
    position: relative; top: auto; right: auto; left: auto;
    height: auto; max-width: none; margin: var(--inset) var(--inset) 0; padding: 0;
    background: transparent !important; border: none; box-shadow: none;
    -webkit-backdrop-filter: none; backdrop-filter: none;
  }
  .header-right { flex: 1; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
  .context-switcher { order: 3; flex: 1 0 100%; display: flex; gap: 8px; }
  .context-switcher .context-select { flex: 1 1 0; max-width: none; min-width: 0; }
  .icon-btn, .user-pill {
    height: 44px; background: var(--glass-chrome); box-shadow: inset 0 0 0 1px var(--rim), var(--shadow-card);
    -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  }
  .icon-btn { width: 44px; }
  .context-select { height: 44px; background: var(--glass-field); }
  .page-header { margin-bottom: 16px; }
  .page-actions { width: 100%; }
  .page-actions .filter-form { width: 100%; }
  .page-actions .select-sm { flex: 1 1 140px; min-width: 0; height: 40px; }
  .dash-top { grid-template-columns: 1fr; }
  .stats-grid--rank { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card { padding: 18px; border-radius: var(--r-24); }

  /* The full menu, as a sheet from the bottom */
  .sidebar {
    position: fixed !important;
    top: auto !important; bottom: var(--inset); left: var(--inset); right: var(--inset);
    width: auto !important; height: auto !important; max-height: calc(100vh - 6 * var(--inset));
    transform: translateY(calc(100% + 2 * var(--inset)));
    visibility: hidden;
    transition: transform .3s var(--ease), visibility 0s linear .3s;
    border-radius: var(--r-30);
    z-index: 60;
    background: var(--surface-solid) !important;
  }
  .sidebar.open { transform: translateY(0); visibility: visible; transition: transform .3s var(--ease); }
  .sidebar-collapse-btn { display: none; }
  .nav-item, .nav-section-summary { min-height: 44px; }
  .mobile-overlay { display: none; position: fixed; inset: 0; background: var(--scrim); z-index: 55; }
  .mobile-overlay.active { display: block; }

  .tabbar {
    display: flex; position: fixed; z-index: 50;
    left: var(--inset); right: var(--inset); bottom: var(--inset);
    height: var(--tabbar-h); padding: 6px; gap: 2px;
    border-radius: var(--r-pill);
  }
  .tabbar__item {
    position: static; flex: 1 1 0; min-width: 0; min-height: 44px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    border: none; border-radius: var(--r-pill); background: transparent; padding: 0;
    color: var(--text); font: 600 11px/1.1 var(--font-body);
    transition: background var(--t) var(--ease), color var(--t) var(--ease);
  }
  .tabbar__item svg { width: 20px; height: 20px; color: var(--text-muted); }
  .tabbar__item:hover { background: var(--glass-hover); }
  .tabbar__item[aria-current="page"] {
    background: var(--surface-white); color: var(--accent-text);
    box-shadow: 0 1px 2px var(--shade), 0 4px 12px var(--shade-strong);
  }
  .tabbar__item[aria-current="page"] svg { color: var(--accent-text); }
  .tabbar__label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* ── Print: none of the app around the document, plain white cards ── */
@media print {
  .sidebar, .top-header, .tabbar, .mobile-overlay { display: none !important; }
  .card, .stat-card {
    background: var(--surface-white) !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
    box-shadow: none !important; animation: none !important; border-radius: var(--r-12);
    border: 1px solid var(--print-line);
  }
  .main-content { margin-left: 0; padding: 0; }
  html, body, .layout, .main-content { background: var(--surface-white) !important; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Batch 3.A (Oct 2026): keywords, import, projects, onboarding, portfolio,
   alerts. Their inline styles are gone; what they need from Phase 2.2 is
   pulled forward here (Ed, 26 Oct) as single v4 definitions: form fields,
   alerts and notices, the settings tabs as a segmented control (no sliding
   indicator: that needs script, Phase 2), status chips, portfolio cards,
   onboarding steps, the plain and secondary buttons, the danger button and
   the accent text colours. Then one named block per page.
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  /* A field's edge: at least 3:1 (WCAG 1.4.11) against its fill and against
     the card or wall around it, worst case the bare wall (3.04:1). */
  --field-line: rgba(15,16,23,.5);
}

/* ── Buttons: plain (no variant), secondary and danger ── */
/* :where keeps a plain .btn at zero specificity, so every variant wins. */
:where(.btn) {
  background: var(--glass-field); color: var(--text);
  box-shadow: inset 0 0 0 1px var(--rim), 0 1px 2px var(--shade);
}
:where(.btn):hover { background: var(--surface-white); color: var(--text); }
.btn-secondary {
  background: var(--glass-field); color: var(--text); border-color: transparent;
  box-shadow: inset 0 0 0 1px var(--rim), 0 1px 2px var(--shade);
}
.btn-secondary:hover { background: var(--surface-white); }
.btn-danger {
  background: var(--c-danger-tint); color: var(--c-danger-ink); border-color: transparent; box-shadow: none;
}
.btn-danger:hover { background: var(--c-danger); color: var(--accent-ink); border-color: transparent; }

/* ── Accent text colours (darker inks, readable on glass) ── */
.accent-amber { color: var(--c-yellow-ink); }
.accent-blue  { color: var(--c-blue-ink); }
.accent-green { color: var(--c-green-ink); }
.accent-red   { color: var(--c-danger-ink); }
.section-eyebrow { color: var(--accent-text); font-size: 11px; letter-spacing: .1em; }
.stat-meta { color: var(--text-muted); font-size: 12px; margin-top: 6px; }
.definition-list { font-size: 0.93rem; }
.definition-list dt { color: var(--text-muted); font-size: 12px; }
.help-text code { background: var(--accent-tint); color: var(--accent-text); }

/* ── Form fields ── */
.field { margin-bottom: 16px; }
.field label {
  display: block; margin-bottom: 6px;
  font-size: 13px; font-weight: 600; color: var(--text);
  text-transform: none; letter-spacing: 0;
}
.field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.field select,
.field textarea {
  width: 100%; min-height: 40px; height: auto; padding: 9px 14px;
  border: none; border-radius: var(--r-12);
  background: var(--glass-field); color: var(--text);
  font-family: var(--font-body); font-size: 0.93rem; font-weight: 400; line-height: 1.4;
  box-shadow: inset 0 0 0 1px var(--field-line);
  transition: box-shadow var(--t) var(--ease), background var(--t) var(--ease);
}
.field select { height: 40px; padding-top: 0; padding-bottom: 0; cursor: pointer; }
.field textarea { min-height: 88px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; background: var(--surface-white);
  box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 4px var(--accent-tint);
}
.field input::placeholder, .field textarea::placeholder { color: var(--text-muted); }
.field input[type="checkbox"], .field input[type="radio"] { width: auto; margin-right: 8px; accent-color: var(--accent); }
.field input[type="file"] {
  width: 100%; padding: 8px; border-radius: var(--r-12);
  background: var(--glass-field); box-shadow: inset 0 0 0 1px var(--field-line); font-size: 0.87rem;
}
.field .help-text { display: block; margin: 6px 0 0; }
.form-card { max-width: 760px; margin-left: auto; margin-right: auto; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 20px; }
.filter-checkbox { color: var(--text); font-size: 13px; }
.filter-checkbox input { accent-color: var(--accent); }

/* ── Alerts (auto-dismissed by main.js unless an error) and notices (kept) ── */
.alert, .notice {
  padding: 12px 16px; margin-bottom: 14px; border: none; border-radius: var(--r-18);
  font-size: 0.93rem; line-height: 1.5;
}
.alert ul, .notice ul { margin: 6px 0 0 18px; }
.alert.is-dismissing { opacity: 0; max-height: 0; overflow: hidden; transition: opacity 400ms, max-height 400ms; }
.alert-error, .notice--error     { background: var(--c-danger-tint); color: var(--c-danger-ink); }
.alert-success, .notice--success { background: var(--c-green-tint);  color: var(--c-green-ink); }
.alert-warning, .notice--warning { background: var(--c-yellow-tint); color: var(--c-yellow-ink); }
.alert-info, .notice--info       { background: var(--c-blue-tint);   color: var(--c-blue-ink); }

/* ── Status chips ── */
.status { min-height: 22px; padding: 0 9px; font-size: 12px; }
.status-active     { background: var(--c-green-tint); color: var(--c-green-ink); }
.status-generating { background: var(--c-blue-tint);  color: var(--c-blue-ink); }
.status-inactive   { background: var(--tint-neutral); color: var(--text-muted); }

/* ── Settings tabs: a segmented control ── */
.settings-tabs { background: none; border: none; border-radius: 0; overflow: visible; margin-bottom: 0; }
.settings-tabs .tab-header {
  display: inline-flex; width: auto; max-width: 100%; align-self: flex-start;
  gap: 4px; padding: 4px; margin-bottom: var(--gap); overflow-x: auto;
  border-radius: var(--r-pill); background: var(--tint-neutral);
}
.settings-tabs .tab-header label {
  display: inline-flex; align-items: center; justify-content: center;
  flex: none; min-width: 0; height: 36px; padding: 0 18px;
  border: none; border-radius: var(--r-pill); background: transparent; box-shadow: none;
  color: var(--text); font-size: 0.93rem; font-weight: 600; white-space: nowrap; cursor: pointer;
  transition: background var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.settings-tabs .tab-header label:hover { background: var(--glass-hover); }
#tab-general:checked ~ .tab-header label[for="tab-general"],
#tab-content:checked ~ .tab-header label[for="tab-content"],
#tab-automation:checked ~ .tab-header label[for="tab-automation"],
#tab-integrations:checked ~ .tab-header label[for="tab-integrations"] {
  background: var(--surface-white); color: var(--text);
  box-shadow: 0 1px 2px var(--shade), 0 4px 12px var(--shade-strong);
}
.settings-tabs input[type="radio"]:focus-visible + label,
.settings-tabs .tab-header label:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* The old .tabs/.settings-tabs label rules reached every label in the panel. */
.settings-tabs .tab-content label { display: block; flex: none; min-width: 0; padding: 0; border: none; background: none; box-shadow: none; }
.settings-tabs .tab-content {
  padding: 0; margin: 0; background: none; border: none; border-radius: 0;
}
.settings-tabs .tab-content > *, .settings-tabs .tab-content > form > .card { max-width: 860px; margin-left: 0; margin-right: 0; }
@media (max-width: 768px) {
  .settings-tabs .tab-header { display: flex; width: 100%; }
  .settings-tabs .tab-header label { flex: 1 1 auto; padding: 0 10px; font-size: 13px; }
}
.settings-subtitle { margin-top: 20px; }
.link-state { margin: 0 0 8px; }
.link-state__value { font-size: 0.87rem; margin-left: 6px; }
.link-state__note { margin-left: 6px; }

/* ── Keywords (keywords/list.html) ── */
.kw-add {
  padding: 14px 18px; margin-bottom: 16px; border-radius: var(--r-18);
  background: var(--glass-field); box-shadow: inset 0 0 0 1px var(--rim);
  -webkit-backdrop-filter: none; backdrop-filter: none; animation: none;
}
.kw-add__summary { cursor: pointer; font-weight: 600; }
.kw-add__form { margin-top: 14px; }
.kw-add__fixed { padding: 8px 0; font-weight: 500; }
.card--ok { border-left: 4px solid var(--c-green); }
.kw-fail__title, .kw-fail__bad { color: var(--c-danger-ink); }
.kw-fail__ok { color: var(--c-green-ink); }
.kw-fail__list { margin: 8px 0 0; padding-left: 20px; font-size: 0.87rem; }
.kw-fail__account { margin: 10px 0 0; font-size: 0.87rem; }
.kw-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.kw-toolbar__count { margin: 0; font-size: 13px; }
/* The keyword reads on one or two lines; a wider table scrolls in its wrapper. */
.kw-targets__keyword { min-width: 160px; }
.kw-targets__when { min-width: 64px; white-space: normal; }
/* Two-word headers may wrap here, so the table fits at desktop widths. */
.kw-targets th, .kw-targets th.sortable { white-space: normal; vertical-align: bottom; }
/* The actions stay reachable when the table scrolls: pinned to the right
   edge of the wrapper on the card's solid surface. */
.kw-targets td.kw-targets__actions { white-space: nowrap; position: sticky; right: 0; background: var(--surface-solid); box-shadow: -10px 0 10px -10px var(--shade-strong); }
.kw-targets thead th:last-child { position: sticky; right: 0; background: var(--surface-solid); }
.kw-targets tbody tr:hover td.kw-targets__actions { background: linear-gradient(var(--tint-hover), var(--tint-hover)), var(--surface-solid); }
.kw-targets__actions .btn + .btn, .kw-targets__actions form + form { margin-left: 4px; }
/* On a phone the three actions stack, so the pinned cell stays narrow and
   the keyword column keeps most of the width. */
@media (max-width: 768px) {
  .kw-targets td.kw-targets__actions { padding-left: 6px; padding-right: 6px; }
  .kw-targets td.kw-targets__actions form { display: block; }
  .kw-targets td.kw-targets__actions form + form { margin: 4px 0 0; }
  .kw-targets td.kw-targets__actions .btn { width: 100%; min-width: 64px; padding: 0 8px; }
}

/* ── Import CSV (keywords/import.html) ── */
.import-grid { align-items: start; }
.import-grid > .form-card { max-width: none; margin: 0; }
.import-errors__title { font-size: 0.87rem; color: var(--c-danger-ink); margin-bottom: 8px; }
.import-errors__list { font-size: 0.87rem; color: var(--text-muted); padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.import-guide__table { margin-top: 12px; }
.import-guide__table th, .import-guide__table td { font-size: 13px; }
.import-guide__notes { padding-left: 16px; margin-top: 4px; display: flex; flex-direction: column; gap: 3px; }

/* ── New project (projects/form.html) ── */
.domain-row { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.domain-row__input { flex: 1; min-width: 240px; }
.domain-row__action { flex: none; }

/* ── Projects list (projects/list.html) ── */
.row-actions { white-space: nowrap; }
.row-actions .btn + .btn { margin-left: 6px; }

/* ── Project overview (projects/detail.html) ── */
.project-hero {
  background: var(--glass-card); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 1px solid var(--rim); border-radius: var(--r-30); box-shadow: var(--shadow-card);
  margin-bottom: var(--gap);
}
.project-hero__eyebrow { color: var(--accent-text); }
.project-hero__title { font-size: 1.5rem; font-weight: 650; color: var(--text); }
.project-hero__body { color: var(--text); }
.activity-grid { gap: var(--gap); }
.activity-card,
.activity-card--primary,
.activity-card--performance {
  background: var(--glass-field); border: 1px solid var(--rim); border-radius: var(--r-24);
  box-shadow: 0 1px 2px var(--shade);
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease), background var(--t) var(--ease);
}
.activity-card:hover { transform: translateY(-1px); background: var(--surface-white); box-shadow: 0 1px 2px var(--shade), 0 12px 28px var(--shade-strong); }
.activity-card::before { height: 3px; opacity: 1; }
.activity-card--performance::before, .activity-card--primary::before { background: var(--accent); }
.activity-card--search::before  { background: var(--c-yellow); }
.activity-card--paid::before    { background: var(--c-teal); }
.activity-card--content::before { background: var(--c-purple); }
.activity-card--action::before  { background: var(--c-green); }
.activity-card--setup::before   { background: var(--text-faint); }
.activity-card__icon { border: none; border-radius: var(--r-12); }
.activity-card__icon--performance, .activity-card__icon--primary { background: var(--accent-tint); color: var(--accent-text); }
.activity-card__icon--search  { background: var(--c-yellow-tint); color: var(--c-yellow-ink); }
.activity-card__icon--paid    { background: var(--c-teal-tint);   color: var(--c-teal-ink); }
.activity-card__icon--content { background: var(--c-purple-tint); color: var(--c-purple-ink); }
.activity-card__icon--action  { background: var(--c-green-tint);  color: var(--c-green-ink); }
.activity-card__icon--setup   { background: var(--tint-neutral);  color: var(--text); }
.activity-card__eyebrow { color: var(--text-muted); font-size: 11px; }
.activity-card__title { font-size: 1rem; font-weight: 650; color: var(--text); }
.activity-card__body { color: var(--text-muted); font-size: 0.87rem; }
.mini-kpi { border: none; border-radius: var(--r-18); background: var(--tint-neutral); }
.mini-kpi__label { color: var(--text-muted); font-size: 11px; }
.mini-kpi__value { font-size: 1.4rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.audit-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.audit-score { display: flex; align-items: center; gap: 18px; margin-top: 18px; }
.audit-score__value { font-size: 2.6rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.audit-score__value--good { color: var(--c-green-ink); }
.audit-score__value--fair, .audit-score__value--aeo { color: var(--c-yellow-ink); }
.audit-score__value--poor { color: var(--c-danger-ink); }
.audit-score__label { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.audit-score__summary { font-size: 0.93rem; line-height: 1.6; margin-top: 4px; }
.audit-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.todo-list { display: grid; gap: 12px; margin-top: 16px; }
.todo-item { padding: 14px 16px; border-radius: var(--r-18); background: var(--glass-field); box-shadow: inset 0 0 0 1px var(--rim); }
.todo-item__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.todo-item__title { font-weight: 650; }
.todo-item__text { font-size: 0.93rem; line-height: 1.6; margin-top: 8px; }
.todo-item__owner { font-size: 12px; margin-top: 8px; }
.todo-badge--critical { background: var(--c-danger-tint); color: var(--c-danger-ink); }
.todo-badge--high     { background: var(--c-yellow-tint); color: var(--c-yellow-ink); }
.todo-badge--medium   { background: var(--c-blue-tint);   color: var(--c-blue-ink); }

/* ── Onboarding (projects/onboarding.html) ── */
.onboard__count { font-size: 0.93rem; color: var(--text); }
.onboard__all-done { color: var(--c-green-ink); }
.onboard__progress {
  -webkit-appearance: none; appearance: none; display: block;
  height: 8px; border: none; border-radius: var(--r-pill); overflow: hidden;
  background: var(--tint-neutral); color: var(--c-green);
}
.onboard__progress { width: 100%; margin-top: 10px; }
.onboard__progress::-webkit-progress-bar { background: var(--tint-neutral); border-radius: var(--r-pill); }
.onboard__progress::-webkit-progress-value { background: var(--c-green); border-radius: var(--r-pill); }
.onboard__progress::-moz-progress-bar { background: var(--c-green); border-radius: var(--r-pill); }
.onboard__note { margin: 10px 0 0; }
.onboard-step {
  background: var(--glass-card); border: 1px solid var(--rim); border-radius: var(--r-18);
  box-shadow: 0 1px 2px var(--shade);
}
.onboard-step.is-active { background: var(--surface-white); border-color: var(--rim); box-shadow: 0 0 0 3px var(--accent-tint), 0 6px 16px var(--shade); }
.onboard-step__marker { background: var(--tint-neutral); color: var(--text); }
.onboard-step.is-active .onboard-step__marker { background: var(--accent); color: var(--accent-ink); }
.onboard-step.is-done .onboard-step__marker { background: none; color: var(--c-green-ink); }
.onboard-step__title { color: var(--text); }
.onboard-step:not(.is-active):not(.is-done) .onboard-step__title { color: var(--text); }
.onboard-step.is-done .onboard-step__title { color: var(--text-muted); }
.onboard-step__tag { border: none; background: var(--tint-neutral); color: var(--text-muted); }
.onboard-step__desc, .onboard-step.is-active .onboard-step__desc { color: var(--text-muted); }
.onboard-step__status { color: var(--c-green-ink); }
.onboard-step:not(.is-done) .onboard-step__status { color: var(--c-yellow-ink); }
.onboard-step__link--quiet { color: var(--text-muted); }
.onboard-step__icon { color: var(--text-faint); }
.onboard-step.is-active .onboard-step__icon { color: var(--accent); }

/* ── Portfolio (portfolio/index.html) ── */
.portfolio-totals { margin-bottom: 24px; }
.portfolio-grid { gap: var(--gap); }
.portfolio-card {
  background: var(--glass-card); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 1px solid var(--rim); border-radius: var(--r-24); box-shadow: var(--shadow-card);
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.portfolio-card:hover { border-color: var(--rim); transform: translateY(-1px); box-shadow: 0 1px 2px var(--shade), 0 14px 32px var(--shade-strong); }
.portfolio-status--green   { background: var(--c-green); box-shadow: none; }
.portfolio-status--amber   { background: var(--c-yellow); box-shadow: none; }
.portfolio-status--red     { background: var(--c-danger); box-shadow: none; }
.portfolio-status--no_data { background: var(--text-faint); }
.portfolio-client-link { color: var(--text-muted); font-size: 11px; }
.portfolio-client-link:hover, .portfolio-project-link:hover { color: var(--accent-text); }
.portfolio-project-link { color: var(--text); font-size: 1rem; font-weight: 650; }
.portfolio-stats { border-top: 1px solid var(--line); }
.pstat-value { font-family: var(--font-body); font-variant-numeric: tabular-nums; color: var(--text); }
.pstat-label { color: var(--text-muted); font-size: 11px; }
.portfolio-movers { font-size: 12px; flex-wrap: wrap; }
.portfolio-best { font-size: 12px; }
.recs-badge { border: none; background: var(--c-blue-tint); color: var(--c-blue-ink); font-size: 12px; }
.recs-badge--high { background: var(--c-danger-tint); color: var(--c-danger-ink); }

/* ── Alerts (alerts/list.html) ── */
.data-table tbody tr.row-unread td { background: var(--accent-tint); }
.load-more { margin-top: 16px; text-align: center; }

/* ═══════════════════════════════════════════════════════════════════════════
   Batch 3.B (Oct 2026): Local SEO. Overview, reviews, GBP audit, setup,
   protection, citations, the grid map and local alerts. Their inline styles
   are gone; everything else they use is the pilot's and batch 3.A's (cards,
   .setup-card with .card--ok/--warn/--danger for status notes, .empty-block,
   notices and alerts, chips, fields, the accent-* inks, the margin
   utilities). Shared bits first, then one named block per page.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Shared (two or more pages) ── */
.py-3 { padding-top: 12px; padding-bottom: 12px; }
.card--info { border-left: 4px solid var(--c-blue); }
/* A text value (a name, a date) in a stat pill, where a number would sit. */
.stat-value--text { font-size: 1rem; font-weight: 650; line-height: 1.35; overflow-wrap: anywhere; }
/* "was → now" lines: protection's change history, citations' NAP issues. */
.diff-line { margin-bottom: 4px; }
.diff-line:last-child { margin-bottom: 0; }
.diff-line__old { color: var(--c-danger-ink); }
.diff-line__new { color: var(--c-green-ink); }
/* An empty block whose only action follows the title. */
.empty-block__title + .btn-row { margin-top: 18px; }

/* ── Local SEO overview (local/index.html) ── */
.local-kw__intro { margin: -6px 0 14px; }
.local-kw__picks {
  display: flex; flex-wrap: wrap; gap: 6px 14px;
  max-height: 220px; overflow: auto; padding: 4px 0;
}
.field .local-kw__pick {
  display: flex; align-items: center; gap: 6px; margin: 0;
  font-size: 0.87rem; font-weight: 400; cursor: pointer;
}
.field .local-kw__pick input[type="checkbox"] { margin: 0; }
/* The keyword reads on one or two lines; the table scrolls in its wrapper. */
.local-kw-table td:first-child { min-width: 170px; }

/* ── Reviews (local/reviews.html) ── */
.review-item {
  padding: 16px 18px; margin-bottom: 14px; border-radius: var(--r-24);
  background: var(--glass-field); box-shadow: inset 0 0 0 1px var(--rim), 0 1px 2px var(--shade);
  scroll-margin-top: 90px;
}
.review-item:last-child { margin-bottom: 0; }
.review-item__head { margin-bottom: 8px; }
/* Stars carry the rating, so they use the dark amber ink (not the 2:1 gold). */
.review-item__stars { margin-left: 8px; color: var(--c-yellow-ink); letter-spacing: 1px; }
.review-item__date { margin-left: 8px; }
.review-item__answer { border-left: 3px solid var(--c-green); padding-left: 12px; margin-bottom: 8px; }
.review-item__reply { margin-top: 10px; }
.review-item .field.review-item__field { margin-bottom: 8px; }
.review-item .notice { margin-bottom: 12px; }
.review-item > .d-inline + .d-inline { margin-left: 4px; }

/* ── Business Profile audit (local/audit.html) ── */
.gbp-score { text-align: center; }
.gbp-score__value { font-size: 4rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.gbp-dims .audit-bar-row { grid-template-columns: 140px 1fr 36px; }
/* Fills use the dark inks (red is the semantic red) so each bar reads at
   3:1 or more against its track (WCAG 1.4.11). `color` carries the fill
   colour too, for the contrast check in scripts/ui_screenshots.mjs. */
.gbp-dims__bar {
  -webkit-appearance: none; appearance: none; display: block;
  width: 100%; height: 8px; border: none; border-radius: var(--r-pill); overflow: hidden;
  background: var(--tint-neutral); color: var(--c-green-ink);
}
.gbp-dims__bar::-webkit-progress-bar { background: var(--tint-neutral); border-radius: var(--r-pill); }
.gbp-dims__bar::-webkit-progress-value { border-radius: var(--r-pill); background: var(--c-green-ink); }
.gbp-dims__bar::-moz-progress-bar { border-radius: var(--r-pill); background: var(--c-green-ink); }
.gbp-dims__bar--amber { color: var(--c-yellow-ink); }
.gbp-dims__bar--amber::-webkit-progress-value { background: var(--c-yellow-ink); }
.gbp-dims__bar--amber::-moz-progress-bar { background: var(--c-yellow-ink); }
.gbp-dims__bar--red { color: var(--c-danger); }
.gbp-dims__bar--red::-webkit-progress-value { background: var(--c-danger); }
.gbp-dims__bar--red::-moz-progress-bar { background: var(--c-danger); }
.gbp-dims .audit-bar-score { font-family: var(--font-body); font-variant-numeric: tabular-nums; }
.gbp-issues__group { margin-bottom: 14px; }
.gbp-issues__group:last-child { margin-bottom: 0; }
.gbp-issues__label { text-transform: uppercase; letter-spacing: .06em; font-size: 12px; font-weight: 650; }
.gbp-issues__label--critical { color: var(--c-danger-ink); }
.gbp-issues__label--high     { color: var(--c-yellow-ink); }
.gbp-issues__label--medium   { color: var(--text-muted); }
.gbp-issues__list { margin: 6px 0 0 18px; }
.gbp-issues__list li { margin-bottom: 4px; }
.gbp-detail__dim { text-transform: capitalize; }
@media (max-width: 600px) { .gbp-dims .audit-bar-row { grid-template-columns: 110px 1fr 28px; } }

/* ── Local tracking setup (local/setup.html) ── */
.gbp-setup { max-width: 760px; }
.gbp-setup__row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.gbp-setup__row--auto { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
@media (max-width: 600px) { .gbp-setup__row { grid-template-columns: 1fr; } }
/* A hint inside a label stays on the label's line (3.A's ".field .help-text"
   makes field hints blocks), so paired inputs line up. */
.field label .help-text { display: inline; margin: 0 0 0 4px; font-size: 12px; font-weight: 400; }
.gbp-setup__actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.gbp-setup__fine { margin: 8px 0 0; }
.gbp-setup__lookup { margin-top: 12px; }
.gbp-setup__match {
  padding: 12px 14px; border-radius: var(--r-18);
  background: var(--glass-field); box-shadow: inset 0 0 0 1px var(--rim), 0 1px 2px var(--shade);
}
.gbp-setup__rule { margin: 20px 0; border: none; border-top: 1px solid var(--line); }
.gbp-setup__heading { margin-bottom: 12px; font-size: 1.134rem; font-weight: 650; color: var(--text); }
.gbp-setup__centre-note { margin-top: -8px; margin-bottom: 16px; }
.gbp-setup__coverage-line { margin: 4px 0 0; }

/* ── Profile protection (local/protection.html) ── */
.watched-fields td:first-child { width: 200px; color: var(--text-muted); }
.change-history__when { white-space: nowrap; }
@media (max-width: 600px) { .watched-fields td:first-child { width: 40%; } }

/* ── Citations (local/citations.html) ── */
/* On a phone the issues keep a readable width; the table scrolls in its card. */
.citations-table td:nth-child(3) { white-space: nowrap; }
.citations-table td:last-child { min-width: 240px; }

/* ═══ Batch 1.37 (Oct 2026): citations, manual listings ═══
   The "Add listing URL" disclosure and its form inside a citations row. */
.citation-manual { margin-top: 6px; white-space: normal; }
.citation-manual summary { color: var(--text-muted); font-size: 13px; cursor: pointer; }
.citation-manual summary:hover { color: var(--text); }
/* The input takes the shared .field look; the form is a compact row. */
.field.citation-manual__form { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0 0; min-width: 260px; }
.citation-manual__form .citation-manual__label { flex-basis: 100%; margin: 0; color: var(--text-muted); font-size: 12px; font-weight: 500; }
.citation-manual__form input[type="url"] { flex: 1 1 160px; min-width: 0; }

/* ── Grid map (local/map.html): Leaflet themed from the tokens ── */
.grid-map { height: 520px; border-radius: var(--r-18); overflow: hidden; }
@media (max-width: 768px) { .grid-map { height: 420px; } }
/* Leaflet's stylesheet loads after main.css, and its own rules are two
   classes deep (.leaflet-touch .leaflet-bar, .leaflet-container a…), so each
   rule here names the map element twice (.grid-map.leaflet-container) to win. */
.grid-map.leaflet-container { font-family: var(--font-body); font-size: 13px; background: var(--surface-solid); }
.grid-map.leaflet-container .leaflet-popup-content-wrapper {
  border-radius: var(--r-18); background: var(--surface-white); color: var(--text);
  box-shadow: 0 1px 2px var(--shade), 0 12px 28px var(--shade-strong);
}
.grid-map.leaflet-container .leaflet-popup-content { margin: 12px 16px; font-size: 13px; line-height: 1.5; }
.grid-map.leaflet-container .leaflet-popup-tip { background: var(--surface-white); box-shadow: 0 1px 2px var(--shade); }
.grid-map.leaflet-container a.leaflet-popup-close-button { color: var(--text-muted); }
.grid-map.leaflet-container a.leaflet-popup-close-button:hover { color: var(--text); }
.grid-map.leaflet-container .leaflet-bar {
  border: none; border-radius: var(--r-12); overflow: hidden; background-clip: border-box;
  box-shadow: 0 1px 2px var(--shade), 0 4px 12px var(--shade-strong);
}
.grid-map.leaflet-container .leaflet-bar a {
  background: var(--surface-white); color: var(--text); border-bottom: 1px solid var(--line); border-radius: 0;
}
.grid-map.leaflet-container .leaflet-bar a:last-child { border-bottom: none; }
.grid-map.leaflet-container .leaflet-bar a:hover,
.grid-map.leaflet-container .leaflet-bar a:focus { background: var(--surface-solid); color: var(--text); }
.grid-map.leaflet-container .leaflet-control-attribution { background: var(--glass-hover); color: var(--text-muted); }
.grid-map.leaflet-container .leaflet-control-attribution a { color: var(--accent-text); }
/* Pins: each fill is a semantic colour with the text that reads on it
   (dark on green 5.96:1 and amber 8.4:1, white on red 4.79:1 and slate 4.76:1). */
.grid-pin {
  border: 2px solid var(--surface-white); box-shadow: 0 1px 2px var(--shade), 0 4px 10px var(--shade-strong);
  font-family: var(--font-body); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.grid-pin-green { background: var(--c-green);  color: var(--text); }
.grid-pin-amber { background: var(--c-yellow); color: var(--text); }
.grid-pin-red   { background: var(--c-danger); color: var(--accent-ink); }
.grid-pin-grey  { background: var(--c-slate);  color: var(--accent-ink); font-size: 11px; }
.local-trend { position: relative; height: 260px; }
/* The business name keeps its width; the table scrolls in its card on a phone. */
.local-competitors td:first-child { min-width: 160px; }

/* ── Local alerts (local/alerts.html) ── */
.local-alerts td:last-child { white-space: nowrap; text-align: right; }
.local-alerts td:first-child { white-space: nowrap; }
.local-alerts td:nth-child(3) { min-width: 140px; }
.local-alerts td:nth-child(4) { min-width: 220px; }
/* On a phone "Mark read" stays reachable when the table scrolls: pinned to
   the right edge on the solid surface, as on Keywords. (Only there: a sticky
   cell drops its collapsed row border, which shows when the table fits.) */
@media (max-width: 768px) {
  .local-alerts td:last-child, .local-alerts thead th:last-child { position: sticky; right: 0; background: var(--surface-solid); }
  .local-alerts td:last-child:has(form) { box-shadow: -10px 0 10px -10px var(--shade-strong); }
  .local-alerts tbody tr.row-unread td:last-child { background: linear-gradient(var(--accent-tint), var(--accent-tint)), var(--surface-solid); }
  .local-alerts tbody tr:not(.row-unread):hover td:last-child { background: linear-gradient(var(--tint-hover), var(--tint-hover)), var(--surface-solid); }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Batch 3.C (Oct 2026): Google Ads (dashboard, audit, Claude plan, campaign
   detail, accounts), Local Services Ads and Analytics. Their inline styles
   and the dashboard's own <style> are gone. The Ads workspace keeps its
   two-column layout and side rail (Ed, 26 Oct); its v2 rules are themed here
   onto the tokens. Everything else is the pilot's, 3.A's and 3.B's (cards,
   .setup-card with .card--warn, notices, chips, fields, .audit-head, the
   accent-* inks, the margin utilities). Shared bits first, then one named
   block per page.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Shared (two or more pages) ── */
.align-start { align-items: start; }
.two-col.align-start > * { min-width: 0; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
/* A table that keeps its columns readable and scrolls in its wrapper. */
.minw-640 { min-width: 640px; }
.minw-760 { min-width: 760px; }
/* A long search term, page or URL wraps inside its column. */
.cell-wrap { max-width: 300px; overflow-wrap: anywhere; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.card-title--sm { font-size: 0.93rem; }
.data-table tbody tr.row-selected td { background: var(--accent-tint); }
.stat-sub--up   { color: var(--c-green-ink); }
.stat-sub--down { color: var(--c-danger-ink); }
/* The one definition (the v2 rule is folded in here; only the Ads pages use it). */
.section-subtitle { color: var(--text-muted); font-size: 0.87rem; line-height: 1.5; margin: -8px 0 0; }
.data-table td.mono, .ads-audit-textarea, .code-block, .ads-error-detail { font-family: var(--font-mono); }
.sort-link { color: inherit; }
.sort-link:hover { color: var(--accent-text); }
.code-block {
  margin: 0; padding: 14px 16px; border: none; border-radius: var(--r-12);
  background: var(--tint-neutral); color: var(--text);
  font-size: 0.8rem; line-height: 1.6; overflow-x: auto;
}

/* ── The Ads workspace (Google Ads dashboard and Analytics) ── */
/* One column that never grows wider than the page: a wide table scrolls in
   its card instead of stretching the column (the 390px overflow on
   /google-ads and /analytics, and 1583px on /analytics at desktop). */
.ads-shell { gap: var(--gap); }
.ads-main { grid-template-columns: minmax(0, 1fr); gap: var(--gap); }
.ads-main > * { min-width: 0; margin-bottom: 0; }
.ads-side-rail { gap: var(--gap); top: calc(var(--inset) + var(--toolbar-h) + 18px); }
.ads-side-rail__card {
  background: var(--glass-card); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 1px solid var(--rim); border-radius: var(--r-24); box-shadow: var(--shadow-card);
}
.ads-side-rail__title { color: var(--text); font-size: 1rem; font-weight: 650; }
.ads-side-rail__text { color: var(--text-muted); font-size: 0.87rem; }
.ads-nav-list { gap: 2px; }
.ads-nav-list__item {
  padding: 10px 14px; border: none; border-radius: var(--r-18);
  color: var(--text); font-size: 0.93rem; font-weight: 500;
  transition: background var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.ads-nav-list__item:hover { background: var(--glass-hover); color: var(--text); transform: none; }
.ads-nav-list__item.active {
  background: var(--surface-white); color: var(--text); font-weight: 600; transform: none;
  box-shadow: 0 1px 2px var(--shade), 0 6px 16px var(--shade-strong);
}
.ads-side-kpi { border: none; border-radius: var(--r-18); background: var(--tint-neutral); }
.ads-side-kpi__label { color: var(--text-muted); font-size: 11px; font-weight: 600; }
.ads-side-kpi__value { color: var(--text); font-size: 1.1rem; font-weight: 700; font-variant-numeric: tabular-nums; }

.ads-header-card { background: var(--glass-card); }
.ads-header-card__title, .ads-analytics-card__title {
  color: var(--text); font-size: 1.5rem; font-weight: 650; letter-spacing: -0.01em; margin-bottom: 6px;
}
.ads-header-card__text { color: var(--text-muted); font-size: 0.93rem; }
.ads-window-pill, .ads-panel-badge {
  padding: 0 12px; min-height: 30px; border: none; border-radius: var(--r-pill);
  background: var(--tint-neutral); color: var(--text); font-size: 12px; font-weight: 600;
}
/* The filter card is the select's visible edge, so it carries the 3:1 field line. */
.ads-filter-card {
  border: none; border-radius: var(--r-18); padding: 10px 14px;
  background: var(--glass-field); box-shadow: inset 0 0 0 1px var(--field-line);
  transition: box-shadow var(--t) var(--ease), background var(--t) var(--ease);
}
.ads-filter-card:focus-within { background: var(--surface-white); box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 4px var(--accent-tint); }
.ads-filter-card__label { color: var(--text-muted); font-size: 11px; font-weight: 600; margin-bottom: 4px; }
.ads-filter-card__select { color: var(--text); font-family: var(--font-body); font-size: 0.93rem; min-width: 0; max-width: 100%; text-overflow: ellipsis; cursor: pointer; }
.ads-sync-note { background: var(--glass-card); padding: 14px 20px; }
.ads-analytics-card__header { margin-bottom: 14px; }
.ads-analytics-card__header .section-subtitle { margin-top: 0; }

/* Metric strip: plain tiles on the solid surface, the accented ones as tints
   with their ink (the old white-on-gradient text read at 1.8 to 3.9:1). */
.ads-metric-strip { border: 1px solid var(--line); border-radius: var(--r-24); background: var(--surface-solid); }
.ads-metric-tile { border-right: 1px solid var(--line); min-height: 92px; min-width: 0; padding: 14px 12px; color: var(--text); }
.ads-metric-tile__label { color: var(--text-muted); font-size: 11px; font-weight: 600; letter-spacing: .06em; opacity: 1; }
/* Seven tiles share the column beside the rail, so the figures stay compact. */
.ads-metric-tile__value { color: var(--text); font-size: 1.1rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.ads-metric-tile--blue   { background: var(--c-blue-tint); }
.ads-metric-tile--violet { background: var(--c-purple-tint); }
.ads-metric-tile--green  { background: var(--c-green-tint); }
.ads-metric-tile--blue :is(.ads-metric-tile__label, .ads-metric-tile__value)   { color: var(--c-blue-ink); }
.ads-metric-tile--violet :is(.ads-metric-tile__label, .ads-metric-tile__value) { color: var(--c-purple-ink); }
.ads-metric-tile--green :is(.ads-metric-tile__label, .ads-metric-tile__value)  { color: var(--c-green-ink); }
@media (max-width: 900px) {
  .ads-metric-tile { border-bottom: 1px solid var(--line); }
  .ads-metric-tile__value { font-size: 1.3rem; }
  .ads-metric-tile:nth-child(2n) { border-right: none; }
}

/* Panels, callouts and lists */
.ads-improvement-grid { gap: var(--gap); }
.ads-improvement-grid > .card { margin-bottom: 0; min-width: 0; }
.ads-callout, .ads-insight-card, .ads-priority-card {
  border: none; border-radius: var(--r-18); padding: 16px;
  background: var(--glass-field); box-shadow: inset 0 0 0 1px var(--rim), 0 1px 2px var(--shade);
}
.ads-callout--critical { background: var(--c-danger-tint); box-shadow: inset 4px 0 0 var(--c-danger); }
.ads-callout--success  { background: var(--c-green-tint);  box-shadow: inset 4px 0 0 var(--c-green); }
.ads-callout--neutral  { background: var(--c-blue-tint);   box-shadow: inset 4px 0 0 var(--c-blue); }
.ads-callout h3, .ads-insight-card h3, .ads-priority-card h3 { color: var(--text); font-size: 0.93rem; font-weight: 650; }
.ads-callout p { color: var(--text); font-size: 0.87rem; }
.ads-bullet-list { color: var(--text); font-size: 0.87rem; gap: 8px; }
.ads-chip-cloud { gap: 6px; }
.ads-chip {
  padding: 0 10px; min-height: 26px; align-items: center; border: none; border-radius: var(--r-pill);
  background: var(--accent-tint); color: var(--accent-text); font-size: 12px; font-weight: 600;
}
.ads-priority-row { border-top: 1px solid var(--line); color: var(--text-muted); font-size: 0.87rem; }
.ads-priority-row strong { color: var(--text); overflow-wrap: anywhere; }
.ads-priority-row--stack { flex-direction: column; align-items: flex-start; gap: 2px; }

/* ── Google Ads dashboard (google_ads/dashboard.html) ── */
.ads-error-detail { margin-top: 6px; font-size: 0.8rem; overflow-wrap: anywhere; }
.ads-metric-tile--clickable { cursor: pointer; transition: background var(--t) var(--ease), box-shadow var(--t) var(--ease); }
.ads-metric-tile--clickable:hover { box-shadow: inset 0 0 0 2px var(--accent-tint); }
.ads-metric-tile--clickable:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.ads-metric-tile--active, .ads-metric-tile--active:hover { box-shadow: inset 0 0 0 2px var(--accent); }
.ads-metric-chart {
  margin-top: 16px; padding: 16px; border-radius: var(--r-24);
  background: var(--surface-solid); box-shadow: inset 0 0 0 1px var(--line);
}
.ads-metric-chart__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.ads-metric-chart__title { color: var(--text); font-size: 0.93rem; font-weight: 650; }
.ads-metric-chart__close {
  width: 32px; height: 32px; border: none; border-radius: var(--r-pill); background: transparent;
  color: var(--text-muted); font-size: 1rem; line-height: 1; cursor: pointer;
}
.ads-metric-chart__close:hover { background: var(--tint-neutral); color: var(--text); }
.ads-metric-chart__body svg { display: block; width: 100%; height: auto; }
.ads-metric-chart__hint { margin: 8px 0 0; color: var(--text-muted); font-size: 12px; }
.ads-metric-chart__empty { padding: 24px 0; text-align: center; color: var(--text-muted); font-size: 0.87rem; }
.ads-terms-table { min-width: 700px; }

/* ── Audit (google_ads/_audit.html) ── */
.ads-audit-score { border: none; border-radius: var(--r-18); padding: 8px 16px; background: var(--tint-neutral); color: var(--text); }
.ads-audit-score strong { font-size: 1.9rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.ads-audit-score--a, .ads-audit-score--b { background: var(--c-green-tint);  color: var(--c-green-ink); }
.ads-audit-score--c, .ads-audit-score--d { background: var(--c-yellow-tint); color: var(--c-yellow-ink); }
.ads-audit-score--f                      { background: var(--c-danger-tint); color: var(--c-danger-ink); }
.ads-audit-bar__label { color: var(--text); font-size: 0.87rem; }
.ads-audit-bar__label small { color: var(--text-muted); }
/* The category score as a <progress>: an accent fill on a neutral track,
   3:1 or more against both (WCAG 1.4.11). */
.ads-audit-bar__meter {
  -webkit-appearance: none; appearance: none; display: block;
  width: 100%; height: 8px; border: none; border-radius: var(--r-pill); overflow: hidden;
  background: var(--tint-neutral); color: var(--accent);
}
.ads-audit-bar__meter::-webkit-progress-bar { background: var(--tint-neutral); border-radius: var(--r-pill); }
.ads-audit-bar__meter::-webkit-progress-value { background: var(--accent); border-radius: var(--r-pill); }
.ads-audit-bar__meter::-moz-progress-bar { background: var(--accent); border-radius: var(--r-pill); }
.ads-audit-h3 { color: var(--text); font-size: 1rem; font-weight: 650; }
.ads-audit-finding {
  border: none; border-radius: var(--r-18); padding: 12px 16px;
  background: var(--glass-field); box-shadow: inset 4px 0 0 var(--line), inset 0 0 0 1px var(--rim);
}
.ads-audit-finding--fail { box-shadow: inset 4px 0 0 var(--c-danger), inset 0 0 0 1px var(--rim); }
.ads-audit-finding--warn { box-shadow: inset 4px 0 0 var(--c-yellow), inset 0 0 0 1px var(--rim); }
.ads-audit-finding p { color: var(--text); font-size: 0.93rem; }
.ads-audit-finding p.help-text { color: var(--text-muted); font-size: 0.87rem; }
/* Status chips: tint and ink (white on the old amber read at 3.2:1). */
.ads-audit-status {
  display: inline-flex; align-items: center; min-height: 22px; padding: 0 9px; border-radius: var(--r-pill);
  font-size: 11px; font-weight: 700; letter-spacing: .02em;
}
.ads-audit-status--fail { background: var(--c-danger-tint); color: var(--c-danger-ink); }
.ads-audit-status--warn { background: var(--c-yellow-tint); color: var(--c-yellow-ink); }
.ads-audit-status--info { background: var(--c-blue-tint);   color: var(--c-blue-ink); }
.ads-audit-section { border-top: 1px solid var(--line); padding: 12px 0; }
.ads-audit-section summary { color: var(--text); font-weight: 650; min-height: 32px; display: list-item; }
.ads-audit-section:not([open]) summary { margin-bottom: 0; }
.ads-audit-section summary:hover { color: var(--accent-text); }
.ads-audit-section > p { font-size: 0.93rem; }
.ads-audit-negatives { gap: var(--gap); }
.ads-audit-textarea {
  min-height: 120px; padding: 10px 12px; border: none; border-radius: var(--r-12);
  background: var(--surface-white); color: var(--text); box-shadow: inset 0 0 0 1px var(--field-line);
}
.ads-audit-table     { min-width: 560px; }
.ads-audit-table--sm { min-width: 480px; }
.ads-audit-table--lg { min-width: 720px; }
/* Visibility table (1.36.1): two-word headers wrap so it fits the card at
   1440 (it was 788px in a 763px box); a phone still scrolls in the wrapper.
   Paused and removed rows are muted: the account figure pools live ones only. */
.ads-audit-vis th, .ads-audit-vis th.sortable { white-space: normal; vertical-align: bottom; }
.data-table tbody tr.row-muted td, .data-table tbody tr.row-muted:hover td { color: var(--text-muted); }

/* ── Claude action plan (google_ads/_optimiser.html) ── */
/* A grade or a band sets one colour (and its tint) that its parts read. */
.grade--a  { --grade: var(--c-green-ink);  --grade-line: var(--c-green);  --grade-tint: var(--c-green-tint); }
.grade--b  { --grade: var(--c-blue-ink);   --grade-line: var(--c-blue);   --grade-tint: var(--c-blue-tint); }
.grade--c  { --grade: var(--c-yellow-ink); --grade-line: var(--c-yellow); --grade-tint: var(--c-yellow-tint); }
.grade--d  { --grade: var(--c-orange-ink); --grade-line: var(--c-orange); --grade-tint: var(--c-orange-tint); }
.grade--f  { --grade: var(--c-danger-ink); --grade-line: var(--c-danger); --grade-tint: var(--c-danger-tint); }
.grade--na { --grade: var(--text-muted);   --grade-line: var(--text-faint); --grade-tint: var(--tint-neutral); }
.opt-head { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.opt-head--spaced { margin-bottom: 20px; }
.opt-grade {
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 80px; height: 80px; border-radius: 50%;
  background: var(--grade-tint); box-shadow: inset 0 0 0 3px var(--grade-line);
}
.opt-grade__letter { color: var(--grade); font-size: 2.2rem; font-weight: 700; line-height: 1; }
.grade--na .opt-grade__letter { font-size: 1.2rem; }
.opt-head__body { flex: 1; min-width: 0; }
.opt-score { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.opt-score__value { color: var(--grade); font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.opt-score__of { color: var(--text-muted); font-size: 0.87rem; }
.opt-score__label { color: var(--grade); font-size: 0.95rem; font-weight: 650; }
.opt-summary { margin: 0; color: var(--text); font-size: 0.93rem; line-height: 1.55; }
.opt-meta { margin: 6px 0 0; }
.band--good { --band: var(--c-green-ink); }
.band--fair { --band: var(--c-yellow-ink); }
.band--poor { --band: var(--c-danger-ink); }
.band--none { --band: var(--text-muted); }
.opt-dims {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px;
  margin-bottom: 20px; padding-top: 16px; border-top: 1px solid var(--line);
}
.opt-dim__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; }
.opt-dim__name { color: var(--text); font-size: 0.8rem; font-weight: 600; }
.opt-dim__score { color: var(--band); font-size: 0.8rem; font-weight: 700; font-variant-numeric: tabular-nums; }
/* Text and fill share the dark ink of the band: 4.5:1 as text, 3:1 or more as a fill on the track. */
.opt-dim__bar {
  -webkit-appearance: none; appearance: none; display: block;
  width: 100%; height: 6px; border: none; border-radius: var(--r-pill); overflow: hidden;
  background: var(--tint-neutral); color: var(--band);
}
.opt-dim__bar::-webkit-progress-bar { background: var(--tint-neutral); border-radius: var(--r-pill); }
.opt-dim__bar::-webkit-progress-value { background: var(--band); border-radius: var(--r-pill); }
.opt-dim__bar::-moz-progress-bar { background: var(--band); border-radius: var(--r-pill); }
.opt-dim__reason { margin-top: 4px; color: var(--text-muted); font-size: 12px; line-height: 1.35; }
.tier--p1 { --tier: var(--c-danger-ink); --tier-tint: var(--c-danger-tint); }
.tier--p2 { --tier: var(--c-yellow-ink); --tier-tint: var(--c-yellow-tint); }
.tier--p3 { --tier: var(--c-blue-ink);   --tier-tint: var(--c-blue-tint); }
.opt-tier { margin-bottom: 16px; }
.opt-tier:last-child { margin-bottom: 0; }
.opt-tier__title { color: var(--tier); }
.opt-action { padding: 12px 0; border-bottom: 1px solid var(--line); }
.opt-action:last-child { border-bottom: none; }
.opt-action__row { display: flex; align-items: flex-start; gap: 12px; }
.opt-impact {
  display: inline-flex; align-items: center; min-height: 22px; padding: 0 9px; margin-top: 1px; border-radius: var(--r-pill);
  background: var(--tier-tint); color: var(--tier); font-size: 11px; font-weight: 700; white-space: nowrap;
}
.opt-action__body { flex: 1; min-width: 0; }
.opt-action__title { margin-bottom: 4px; color: var(--text); font-weight: 600; }
.opt-action__detail { margin: 0 0 6px; color: var(--text-muted); font-size: 0.87rem; }
.opt-action__terms { display: flex; flex-wrap: wrap; gap: 6px; }
.tag--mono { font-family: var(--font-mono); font-weight: 500; }

/* ── Campaign detail (google_ads/campaign_detail.html) ── */
.ads-keywords-table { min-width: 920px; }

/* ── Accounts (google_ads/accounts.html) ── */
.ads-accounts-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); }
/* "Sync Yesterday" stays in view when the table scrolls: pinned to the
   right edge on the card's solid surface, as on Keywords. */
.ads-accounts td:last-child, .ads-accounts thead th:last-child {
  position: sticky; right: 0; white-space: nowrap; background: var(--surface-solid);
}
.ads-accounts td:last-child { box-shadow: -10px 0 10px -10px var(--shade-strong); }
.ads-accounts tbody tr:hover td:last-child { background: linear-gradient(var(--tint-hover), var(--tint-hover)), var(--surface-solid); }

/* ── Local Services Ads (local_services/index.html) ── */
.lsa-link { max-width: 640px; }
.lsa-projects { margin: 0; padding-left: 18px; }
.lsa-projects li { margin-bottom: 4px; }
.lsa-totals-note { margin: -8px 0 16px; }
.lsa-split { margin-bottom: var(--gap); }
.lsa-account { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; padding: 12px 18px; }
/* Date range and the totals notice (1.59.0) */
.lsa-range { margin-bottom: var(--gap); }
.lsa-range__now { margin: 0; align-self: center; }
.lsa-totals-mismatch { display: flex; gap: 10px 16px; flex-wrap: wrap; align-items: center; justify-content: space-between; margin: 0 0 16px; }
.lsa-totals-exact { display: flex; gap: 8px 16px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
/* Lead detail (1.59.0) */
.lsa-lead { margin-bottom: var(--gap); }
.lsa-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; margin: 0 0 12px; }
.lsa-facts dt { color: var(--text-muted); font-size: 0.87rem; }
.lsa-facts dd { margin: 0; overflow-wrap: anywhere; }
.lsa-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.lsa-conversations { list-style: none; margin: 0; padding: 0; }
.lsa-conversation { display: grid; gap: 4px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.lsa-conversation:last-child { border-bottom: 0; }
.lsa-conversation__head { display: flex; gap: 4px 12px; flex-wrap: wrap; align-items: baseline; }

/* ── Analytics (analytics/dashboard.html) ── */
/* Search Console's two tables sit one above the other until there is room
   for both beside the side rail without hiding columns. */
.two-col.gsc-split { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1600px) { .two-col.gsc-split { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ── Phone ── */
@media (max-width: 768px) {
  /* The old rule forces "1fr" (content-sized minimum) with !important. */
  .ads-shell, .ads-improvement-grid, .ads-callout-group, .ads-improvement-columns, .ads-filter-bar { grid-template-columns: minmax(0, 1fr) !important; }
  .ads-header-card__title, .ads-analytics-card__title { font-size: 1.3rem; }
  .opt-head { gap: 16px; }
  /* Two tiles a row (the old 640px rule stacks them one a row). */
  .ads-metric-strip, .ads-metric-strip--compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* ── Ads audit history (google_ads/_audit_history.html, 1.33.0) ── */
.ads-audit-history { border-top: 1px solid var(--line); padding-top: 12px; margin-bottom: 16px; }
.ads-audit-history__headline { margin: 0 0 8px; font-weight: 600; color: var(--text); }
.ads-audit-history__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ads-audit-history__lists { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 20px; margin-bottom: 8px; }
.ads-audit-history__list { list-style: none; margin: 4px 0 8px; padding: 0; font-size: 0.85rem; }
.ads-audit-history__list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; padding: 3px 0; overflow-wrap: anywhere; }
.ads-audit-history__list small { color: var(--text-muted); }
.ads-audit-trend-wrap { margin: 8px 0 4px; }
.ads-audit-trend { display: block; width: 100%; max-width: 480px; height: auto; overflow: visible; }
.ads-audit-trend__line { fill: none; stroke: var(--c-blue-ink); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.ads-audit-trend__pt { fill: var(--c-blue-ink); stroke: var(--c-blue-ink); stroke-width: 1; }
.ads-audit-trend__pt--est { fill: var(--surface-white); }

/* ═══════════════════════════════════════════════════════════════════════════
   Batch 3.D (Oct 2026): SEO and AEO audits (lists and detail pages, and the
   ranking overview they share), weekly recommendations and competitors.
   Their inline styles are gone; everything else they use is the pilot's,
   3.A's and 3.B's (cards with .card--ok/--warn/--danger, .empty-block,
   notices and alerts, chips and .tag-status-*, fields, the accent-* inks,
   .audit-score__label, the GBP issue groups, the margin utilities). Shared
   bits first, then one named block per page.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Shared (two or more pages) ── */
/* .mb-0, .align-start (with .two-col.align-start > *) and the .band--* tones
   used here are batch 3.C's (its "Shared" and Claude action plan sections). */
.ml-2 { margin-left: 8px; }
/* Body copy in a card: the audits' summaries and alarm messages. */
.card-text { margin: 0; color: var(--text); font-size: 0.93rem; line-height: 1.6; }
/* A background job's progress card (SEO and AEO audits). */
.job-card { padding: 40px 24px; }
/* A score in a list (the SEO and AEO audit lists). */
.score-cell { font-weight: 700; font-variant-numeric: tabular-nums; }

/* The overall score beside its summary (SEO and AEO audit pages). */
.score-card { display: flex; align-items: center; gap: 16px 24px; flex-wrap: wrap; }
.score-card__dial { flex-shrink: 0; text-align: center; }
.score-card__value { font-size: 3.5rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.score-card__value--lg { font-size: 4rem; }
.score-card__dial .audit-score__label { display: block; margin-top: 6px; }
.score-card__verdict { margin-top: 4px; font-size: 13px; font-weight: 650; }
.score-card__body { flex: 1; min-width: 200px; }
.score-card__meta { margin-bottom: 0; font-size: 12px; }

/* Dimension bars (SEO and AEO audit pages). The score is a <progress>; its
   fill and the score text share the band's dark ink, 3:1 or more against the
   track as a fill (WCAG 1.4.11) and 4.5:1 as text. */
.dim-bars { gap: 12px; }
.dim-bars .audit-bar-row { grid-template-columns: 200px minmax(0, 1fr) 40px; gap: 14px; }
.dim-bars .audit-bar-label { color: var(--text); font-size: 0.87rem; font-weight: 500; }
.audit-bar-hint { color: var(--text-muted); font-size: 12px; font-weight: 400; }
.dim-bars .audit-bar-score { color: var(--band, var(--text)); font-family: var(--font-body); font-size: 0.93rem; font-variant-numeric: tabular-nums; }
.dim-bars__meter {
  -webkit-appearance: none; appearance: none; display: block;
  width: 100%; height: 8px; border: none; border-radius: var(--r-pill); overflow: hidden;
  background: var(--tint-neutral); color: var(--band, var(--accent));
}
.dim-bars__meter::-webkit-progress-bar { background: var(--tint-neutral); border-radius: var(--r-pill); }
.dim-bars__meter::-webkit-progress-value { background: var(--band, var(--accent)); border-radius: var(--r-pill); }
.dim-bars__meter::-moz-progress-bar { background: var(--band, var(--accent)); border-radius: var(--r-pill); }
/* On a phone the label and score share a line and the bar runs under them. */
@media (max-width: 600px) {
  .dim-bars .audit-bar-row {
    grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "label score" "bar bar"; row-gap: 6px;
  }
  .dim-bars .audit-bar-label { grid-area: label; }
  .dim-bars__meter { grid-area: bar; }
  .dim-bars .audit-bar-score { grid-area: score; }
}

/* ── Ranking overview on the audit pages (_rank_overview.html) ── */
.rank-overview__eyebrow { margin-bottom: 10px; }

/* ── Site audit (audits/detail.html) ── */
.win-list { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.win-list__item { display: flex; gap: 10px; color: var(--text); font-size: 0.93rem; line-height: 1.5; }
.win-list__arrow { flex-shrink: 0; font-weight: 700; }
/* Two columns of findings; the old rule's "1fr" was content-sized. */
.findings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
@media (max-width: 1024px) { .findings-grid { grid-template-columns: minmax(0, 1fr); } }
.finding-section {
  padding: 14px 16px; border-radius: var(--r-18);
  background: var(--glass-field); box-shadow: inset 0 0 0 1px var(--rim), 0 1px 2px var(--shade);
}
.finding-header { gap: 12px; margin-bottom: 6px; }
.finding-label { color: var(--text); font-size: 0.93rem; font-weight: 650; }
.finding-score { font-weight: 700; font-variant-numeric: tabular-nums; }
.finding-summary { margin-bottom: 10px; color: var(--text-muted); font-size: 0.87rem; line-height: 1.5; }
.finding-list { gap: 6px; margin: 0; padding: 0; }
.finding-item { gap: 8px; color: var(--text); font-size: 0.87rem; line-height: 1.45; }
.finding-item--check { align-items: baseline; }
.finding-item--stack { flex-direction: column; gap: 2px; }
/* The dot is the only mark of a finding's priority, so each reads at 3:1. */
.finding-dot { width: 7px; height: 7px; margin-top: 6px; background: var(--text-faint); }
.finding-item--high .finding-dot   { background: var(--c-danger); }
.finding-item--medium .finding-dot { background: var(--c-yellow-ink); }
.finding-item--low .finding-dot    { background: var(--c-blue-ink); }
.finding-check { flex-shrink: 0; width: 1em; font-weight: 700; text-align: center; }
.suppressed { margin-top: 20px; }
.suppressed__summary { color: var(--text); font-size: 0.93rem; font-weight: 600; cursor: pointer; }
.suppressed__text { color: var(--text-muted); }

/* ── AEO audit (aeo/detail.html) ── */
.aeo-empty__text { max-width: 480px; margin: 0 auto; }
.aeo-steps { max-width: 460px; margin: 14px auto 0; color: var(--text-muted); font-size: 13px; }
.aeo-checks { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.aeo-issue { display: flex; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); color: var(--text); font-size: 0.87rem; }
.aeo-issue:last-child { border-bottom: none; }
.aeo-issue__arrow { flex-shrink: 0; font-weight: 700; }
.fix-files-cta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.fix-files-cta .card-title { margin-bottom: 4px; }
.fix-files-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: var(--gap); }
.fix-file-card {
  display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 16px; border-radius: var(--r-24);
  background: var(--glass-field); box-shadow: inset 0 0 0 1px var(--rim), 0 1px 2px var(--shade);
}
.fix-file-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.fix-file-name { color: var(--text); font-family: var(--font-mono); font-size: 0.93rem; font-weight: 650; }
.fix-file-desc { margin: 0; color: var(--text-muted); font-size: 0.87rem; line-height: 1.5; }
.fix-file-desc code { background: var(--accent-tint); color: var(--accent-text); }
/* The type is shared with the schema output on tools/local_schema.html (a
   <pre>, shown in full); only the AEO cards clip the preview to a scroll box. */
.fix-file-preview {
  margin: 0; padding: 10px 12px; border-radius: var(--r-12);
  background: var(--tint-neutral); color: var(--text);
  font-family: var(--font-mono); font-size: 12px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere;
}
.fix-file-card .fix-file-preview { max-height: 160px; overflow: auto; }
.fix-file-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 4px; }
.btn.is-copied { color: var(--c-green-ink); }

/* ── Weekly recommendations (recommendations/list.html) ── */
.rec-page-title-sub { margin-left: 10px; color: var(--text-muted); font-size: 15px; font-weight: 500; letter-spacing: 0; }
.recs-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 20px; }
.recs-toolbar__note { font-size: 13px; }
.recs-list { gap: 12px; }
.rec-card {
  gap: 10px; padding: 16px 20px; border: 1px solid var(--rim); border-left: 4px solid var(--line); border-radius: var(--r-24);
  background: var(--glass-card); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: var(--shadow-card);
}
.rec-card--high   { border-left-color: var(--c-danger); }
.rec-card--medium { border-left-color: var(--c-yellow); }
.rec-card--low    { border-left-color: var(--c-blue); }
/* Done: a flat card, text at full contrast (the old 45% opacity read at 2:1). */
.rec-card--done { opacity: 1; background: var(--tint-neutral); -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; }
.rec-header { gap: 8px; }
.rec-badges { gap: 6px; }
.rec-type-badge, .rec-priority-badge, .rec-action-badge {
  align-items: center; min-height: 22px; padding: 0 9px; border: none; border-radius: var(--r-pill);
  font-family: var(--font-body); font-size: 12px; font-weight: 600; letter-spacing: 0;
}
.rec-type-badge { font-weight: 700; letter-spacing: .04em; }
.rec-type--SEO   { background: var(--c-blue-tint);   color: var(--c-blue-ink); border: none; }
.rec-type--AEO   { background: var(--c-yellow-tint); color: var(--c-yellow-ink); border: none; }
/* Local recommendations had no chip colour, so their badge was blank. */
.rec-type--LOCAL { background: var(--c-green-tint);  color: var(--c-green-ink); }
.rec-type--OFFSITE { background: var(--c-purple-tint); color: var(--c-purple-ink); }
.rec-priority--high   { background: var(--c-danger-tint); color: var(--c-danger-ink); }
.rec-priority--medium { background: var(--c-yellow-tint); color: var(--c-yellow-ink); }
.rec-priority--low    { background: var(--tint-neutral);  color: var(--text-muted); }
.rec-action-badge { background: var(--tint-neutral); color: var(--text); }
.rec-status { font-size: 12px; font-weight: 650; text-transform: capitalize; }
.rec-status--to_do       { color: var(--text-muted); }
.rec-status--in_progress { color: var(--c-blue-ink); }
.rec-status--done        { color: var(--c-green-ink); }
.rec-keyword { gap: 8px; font-size: 0.93rem; color: var(--text); }
.rec-unranked { font-size: 12px; }
.rec-label { color: var(--text); font-size: 1rem; font-weight: 650; }
.rec-body { color: var(--text); font-size: 0.93rem; line-height: 1.6; }
.rec-notes { padding: 8px 12px; border: none; border-radius: var(--r-12); background: var(--tint-neutral); color: var(--text); font-size: 0.87rem; }
.rec-footer { flex-wrap: wrap; gap: 8px; }
.rec-actions { flex-wrap: wrap; gap: 6px; }
.rec-dismiss { color: var(--text-muted); }
/* "Mark done" (also on the copy generator and Meta campaign pages). */
.accent-btn { background: var(--c-green-tint); color: var(--c-green-ink); border-color: transparent; box-shadow: none; }
.accent-btn:hover { background: var(--c-green); color: var(--accent-ink); }

/* ── Competitors (competitors/list.html) ── */
/* The table column gets the room its four columns need, so the actions stay in view. */
@media (min-width: 1025px) { .two-col.comp-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); } }
/* Discover over Remove, so the four columns fit beside the form at 1440. */
.comp-table td.row-actions { white-space: nowrap; }
.comp-table .row-actions form { display: block; }
.comp-table .row-actions form + form { margin-top: 6px; }
.comp-table .row-actions .btn { width: 100%; }
/* On a phone the actions stay reachable when the table scrolls: pinned to
   the right edge on the card's solid surface, as on Keywords. */
@media (max-width: 768px) {
  .comp-table td.row-actions, .comp-table thead th:last-child { position: sticky; right: 0; background: var(--surface-solid); }
  .comp-table td.row-actions { box-shadow: -10px 0 10px -10px var(--shade-strong); }
}

/* ── Competitor keywords (competitors/keywords.html) ── */
.import-settings { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; }
.import-settings > .field { margin-bottom: 0; min-width: 140px; }
.import-settings__submit { display: flex; align-items: flex-end; }
.comp-kw-table .col-check { width: 32px; }
.comp-kw-table input[type="checkbox"] { accent-color: var(--accent); }

/* ── DataForSEO Labs check (competitors/labs_check.html) ── */
.labs-check { max-width: 540px; }
.labs-check__head { display: flex; align-items: center; gap: 16px; padding: 8px 0 12px; }
.labs-check__icon { font-size: 2.5rem; line-height: 1; }
.labs-check__title { margin-bottom: 4px; color: var(--text); font-size: 1rem; font-weight: 700; }

/* ═══════════════════════════════════════════════════════════════════════════
   Batch 3.E (Oct 2026): the monthly report, the client list and client page,
   and Locations. Their inline styles are gone; everything else they use is
   the pilot's, 3.A's and 3.B's (cards, .card--solid, .setup-card,
   .empty-block, alerts, status chips, the accent-* inks, the margin
   utilities). The monthly report keeps its own <style> and @media print in
   the template (a client-facing document): the rules here only stand in for
   the old inline values, so its printed layout is unchanged. Shared bits
   first, then one named block per page.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Shared ── */
/* .stat-sub--up/--down and the .band--* tones used here are batch 3.C's. */
/* The pilot's ".data-table td { color }" is two classes deep, so it turned
   the coloured and muted cells grey-black (the report's ▲/▼ changes and its
   "Was" column, Locations' codes). The cell's own class wins again, on row
   hover too (the v2 and pilot hover rules also set the text colour). */
.data-table td.accent-green, .data-table tbody tr:hover td.accent-green { color: var(--c-green-ink); }
.data-table td.accent-red,   .data-table tbody tr:hover td.accent-red   { color: var(--c-danger-ink); }
.data-table td.accent-amber, .data-table tbody tr:hover td.accent-amber { color: var(--c-yellow-ink); }
.data-table td.accent-blue,  .data-table tbody tr:hover td.accent-blue  { color: var(--c-blue-ink); }
.data-table td.text-muted,   .data-table tbody tr:hover td.text-muted   { color: var(--text-muted); }

/* ── Monthly report (reports/monthly.html) ── */
.report-brand-note { margin: 10px 0 0; }
.report-empty { text-align: center; padding: 40px; }
.report-lead { font-size: 0.95rem; line-height: 1.7; color: var(--text); }
.report-summary { margin-bottom: 12px; font-size: 0.9rem; line-height: 1.7; color: var(--text); }
.report-actions { margin: 0; padding-left: 1.2rem; }
.report-actions li { margin-bottom: 4px; font-size: 0.875rem; line-height: 1.6; color: var(--text); }
.report-priorities { margin: 0; padding-left: 1.4rem; }
.report-priorities li { margin-bottom: 6px; font-size: 0.9rem; line-height: 1.7; color: var(--text); }
.report-note { font-size: 0.875rem; }
/* Each channel's heading in its colour, as the dark ink (the plain hues read
   at 3.1 to 3.4:1 as 17px text). Print turns every .card-title black. */
.card-title.report-section-title--seo   { color: var(--c-blue-ink); }
.card-title.report-section-title--aeo   { color: var(--c-purple-ink); }
.card-title.report-section-title--amber { color: var(--c-yellow-ink); }
.card-title.report-section-title--ga4   { color: var(--c-green-ink); }
.report-delta { margin-top: 4px; font-size: 0.75rem; }
.stat-value__of { font-size: 0.75rem; color: var(--text-muted); }
.report-chart { position: relative; height: 140px; }
.report-score {
  margin-bottom: 8px; color: var(--band, var(--text));
  font-family: var(--font-mono); font-size: 3rem; font-weight: 800; line-height: 1;
}
.report-score__of { font-size: 1rem; color: var(--text-muted); }
.report-score__summary { font-size: 0.8rem; color: var(--text-muted); }
.report-score__link { font-size: 0.8rem; }
/* AI search visibility (reports/_ai_search.html): a client document, so the
   search is wrapped rather than cut off with an ellipsis. */
.report-ai-search__gaps .kw-cell { max-width: 320px; min-width: 140px; white-space: normal; overflow-wrap: break-word; }

/* ── Clients list and client page (clients/list.html, clients/detail.html) ── */
.client-facts { display: flex; flex-wrap: wrap; gap: 16px 32px; }
.client-facts > * { min-width: 0; }
.client-facts__label {
  margin-bottom: 2px; color: var(--text-muted);
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase;
}
.client-facts__value { font-size: 0.9rem; overflow-wrap: anywhere; }
.client-branding { scroll-margin-top: 90px; }
.client-branding__row { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.client-logo-box {
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 180px; height: 90px; padding: 10px;
  border: 1px dashed var(--text-faint); border-radius: var(--r-12); background: var(--surface-white);
}
.client-logo-box img { max-width: 100%; max-height: 100%; object-fit: contain; }
.client-logo-box__empty { margin: 0; text-align: center; }
.client-branding__body { flex: 1; min-width: min(100%, 240px); }
.client-branding__help { margin: 0 0 10px; }
.client-branding__upload { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.client-branding__upload input[type="file"] { max-width: 100%; font-size: 0.87rem; color: var(--text); }
.client-section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.client-section-title {
  margin: 0; color: var(--text-muted);
  font-size: 0.85rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase;
}
.client-project-pick { display: flex; align-items: center; gap: 8px; }
.client-project-pick label { color: var(--text-muted); font-size: 0.8rem; }
.client-hub { margin-bottom: 24px; }
/* Link cards: the client grid, the workspace hub and the project list. */
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 16px; }
.hub-grid--md   { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.hub-grid--wide { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.hub-link { display: block; min-width: 0; color: inherit; text-decoration: none; border-radius: var(--r-30); }
.hub-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.hub-card {
  display: flex; flex-direction: column; height: 100%; margin-bottom: 0;
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease), background var(--t) var(--ease);
}
.hub-link:hover .hub-card {
  transform: translateY(-1px); background: var(--glass-hover);
  box-shadow: 0 1px 2px var(--shade), 0 14px 32px var(--shade-strong);
}
.hub-card__head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.hub-card__head--lg { margin-bottom: 12px; }
.hub-card__title { margin: 0 0 6px; color: var(--text); font-size: 1rem; font-weight: 600; overflow-wrap: anywhere; }
.hub-card__head .hub-card__title { margin: 0; }
.hub-card__status { flex-shrink: 0; margin-left: 8px; }
.hub-card__text { margin: 0; color: var(--text-muted); font-size: 0.8rem; }
.hub-card__text--spaced { margin-bottom: 12px; }
.hub-card__domain { margin: 0 0 12px; color: var(--text-muted); font-family: var(--font-mono); font-size: 0.8rem; overflow-wrap: anywhere; }
.hub-card__domain--sm { margin-bottom: 8px; }
.hub-card__meta { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--text-muted); font-size: 0.8rem; }
.hub-card__meta--foot { margin-top: auto; }

/* ── Locations (locations/list.html) ── */
.locations-note__lead { margin: 0 0 6px; }

/* ═══════════════════════════════════════════════════════════════════════════
   Batch 3.F (Oct 2026): tools and content. Analytics tracking, copy audit,
   proposal, LocalBusiness schema, email sequence, the ad copy generator and
   the article pipeline, calendar and review pages. Their inline styles are
   gone; everything else they use is the pilot's and 3.A to 3.C's (cards,
   .empty-block, notices and alerts, chips, fields, the accent-* inks,
   .audit-score__label, .code-block, .minw-640, the margin utilities) and
   3.D's (.score-card, .win-list, .card-text, .fix-file-preview, .accent-btn,
   .ml-2). The v2 rules these pages were built on (copy generator, proposal,
   email cards, articles, calendar) are themed here onto the tokens. Shared
   bits first, then one named block per page.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Shared (two or more pages) ── */
/* A tone sets one semantic colour, its tint and its ink, which the parts
   of a flag, a priority chip or a plan group read. */
.tone--danger { --tone: var(--c-danger); --tone-tint: var(--c-danger-tint); --tone-ink: var(--c-danger-ink); }
.tone--warn   { --tone: var(--c-yellow); --tone-tint: var(--c-yellow-tint); --tone-ink: var(--c-yellow-ink); }
.tone--info   { --tone: var(--c-blue);   --tone-tint: var(--c-blue-tint);   --tone-ink: var(--c-blue-ink); }
.tone--ok     { --tone: var(--c-green);  --tone-tint: var(--c-green-tint);  --tone-ink: var(--c-green-ink); }
/* The result column of a tool: cards stacked with the page gap. */
.result-stack { display: flex; flex-direction: column; gap: var(--gap); min-width: 0; }
.result-stack > .card, .result-stack > .two-col { margin-bottom: 0; }
.empty-block__svg { display: block; margin: 0 auto 14px; color: var(--text-faint); }
.empty-block__text--narrow { max-width: 340px; margin: 0 auto; }
/* A button whose label may be long (a domain) wraps instead of clipping. */
.btn-wrap { white-space: normal; text-align: center; overflow-wrap: break-word; padding: 8px 14px; font-size: 0.87rem; }
/* Filter forms whose fields have labels (article pipeline and calendar). */
.filter-form--fields { align-items: flex-end; gap: 12px; }
.filter-form--fields .field { margin-bottom: 0; }
.field--grow { flex: 1; min-width: min(100%, 240px); }
.field--w160 { width: 160px; }
.field--w120 { width: 120px; }
.filter-form--fields .select-sm { width: 100%; height: 40px; }

/* ── Analytics tracking (tools/analytics_tracking.html) ── */
.context-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 20px; }
.context-strip .context-pill { min-height: 28px; padding: 0 12px; white-space: normal; text-align: left; }
.context-pill--accent { background: var(--accent-tint); color: var(--accent-text); }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.tracking-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: var(--gap); align-items: start; }
.tracking-layout > .card { margin-bottom: 0; min-width: 0; }
.tracking-form { position: sticky; top: calc(var(--inset) + var(--toolbar-h) + 18px); }
.tracking-context { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.tracking-context__title { margin-bottom: 10px; color: var(--text-muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.tracking-context__list { display: flex; flex-direction: column; gap: 6px; }
.tracking-context__item { color: var(--text); font-size: 12.5px; line-height: 1.45; }
.tracking-redirect { font-size: 0.8rem; overflow-wrap: anywhere; }
.tracking-guard > summary { cursor: pointer; }
.tracking-guard__list { display: flex; flex-direction: column; gap: 6px; margin: 10px 0 0; padding-left: 18px; font-size: 0.87rem; }
.tracking-summary .score-card__dial { min-width: 72px; padding-right: 24px; border-right: 1px solid var(--line); }
.tracking-summary .score-card__value { font-size: 2.8rem; }
.tracking-summary__head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.tracking-summary__domain { color: var(--text-muted); font-size: 13px; }
.mode-chip--setup { background: var(--c-blue-tint);   color: var(--c-blue-ink); }
.mode-chip--audit { background: var(--c-yellow-tint); color: var(--c-yellow-ink); }
.mode-chip--debug { background: var(--c-danger-tint); color: var(--c-danger-ink); }
/* Flags: a tinted row; the dot and the severity word carry the tone. */
.flag-list { display: flex; flex-direction: column; gap: 10px; }
.flag {
  display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; gap: 12px; align-items: start;
  padding: 12px 14px; border-radius: var(--r-18); background: var(--tone-tint, var(--tint-neutral));
}
.flag__dot { width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: var(--tone-ink, var(--text-muted)); }
.flag__title { margin-bottom: 3px; color: var(--text); font-size: 0.87rem; font-weight: 700; }
.flag__detail { color: var(--text); font-size: 0.87rem; line-height: 1.5; }
.flag__meta { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
.flag__severity { color: var(--tone-ink, var(--text)); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.flag__confidence { color: var(--text-muted); font-size: 11px; }
/* Priority chips (P1 to P3) and the action items they lead. */
.prio-chip {
  display: inline-flex; align-items: center; justify-content: center; min-width: 32px; min-height: 22px; padding: 0 7px;
  border-radius: var(--r-pill); background: var(--tone-tint, var(--tint-neutral)); color: var(--tone-ink, var(--text));
  font-size: 11px; font-weight: 800; font-variant-numeric: tabular-nums;
}
.action-list { display: flex; flex-direction: column; }
.action-item { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; align-items: start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.action-item:last-child { border-bottom: none; padding-bottom: 0; }
.action-item > .prio-chip { margin-top: 1px; }
.action-item__title { margin-bottom: 4px; color: var(--text); font-size: 0.93rem; font-weight: 700; }
.action-item__why { margin-bottom: 6px; color: var(--text-muted); font-size: 0.87rem; line-height: 1.5; }
.action-item__why strong { color: var(--text); }
.action-item__how {
  padding: 8px 12px; border-radius: 0 var(--r-12) var(--r-12) 0; border-left: 3px solid var(--tone, var(--line));
  background: var(--tint-neutral); color: var(--text); font-size: 0.87rem; line-height: 1.5;
}
.event-name { font-size: 0.87rem; }
.chip-list { display: flex; flex-wrap: wrap; gap: 4px; }
.code-chip {
  display: inline-flex; align-items: center; min-height: 20px; padding: 0 7px; border-radius: 8px;
  background: var(--tint-neutral); color: var(--text); font-family: var(--font-mono); font-size: 12px;
}
/* GTM plan groups: the title and items take the group's tone. */
.gtm-group { margin-bottom: 18px; }
.gtm-group:last-child { margin-bottom: 0; }
.gtm-group__title { margin-bottom: 8px; color: var(--tone-ink, var(--text-muted)); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.gtm-group__list { display: flex; flex-direction: column; gap: 6px; }
.gtm-group__list--wrap { flex-direction: row; flex-wrap: wrap; }
.gtm-item { padding: 10px 14px; border-radius: var(--r-12); background: var(--tone-tint, var(--tint-neutral)); color: var(--text); font-size: 0.87rem; overflow-wrap: anywhere; }
.gtm-item--row { display: flex; gap: 10px; }
.gtm-item--chip { padding: 6px 12px; }
.gtm-item__mark { flex-shrink: 0; color: var(--tone-ink); font-weight: 700; }
.gtm-item__title { margin-bottom: 4px; font-weight: 700; }
.gtm-item--chip .gtm-item__title { margin-bottom: 0; }
.gtm-item__meta { color: var(--text-muted); font-size: 0.8rem; }
.gtm-conv { padding: 6px 0; color: var(--text); font-size: 0.87rem; }
.code-block--wrap { white-space: pre-wrap; overflow-wrap: anywhere; }
/* QA checklist: platform, test and expected result in three columns. */
.qa-list { display: flex; flex-direction: column; }
.qa-row {
  display: grid; grid-template-columns: 120px minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: start;
  padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--text); font-size: 0.87rem;
}
.qa-row:last-child { border-bottom: none; }
.qa-row__platform {
  justify-self: start; padding: 2px 8px; border-radius: 8px; background: var(--tint-neutral);
  color: var(--text); font-size: 12px; font-weight: 700;
}
.qa-row__expected { color: var(--c-green-ink); font-size: 0.87rem; }
/* Debug steps: a numbered list. */
.step-list { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.step {
  display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r-12);
  background: var(--glass-field); box-shadow: inset 0 0 0 1px var(--rim);
}
.step__num {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 22px; height: 22px;
  border-radius: 50%; background: var(--accent-tint); color: var(--accent-text); font-size: 11px; font-weight: 800;
}
.step__text { margin: 0; color: var(--text); font-size: 0.87rem; line-height: 1.55; }
@media (max-width: 1024px) {
  .tracking-layout { grid-template-columns: minmax(0, 1fr); }
  .tracking-form { position: static; }
}
@media (max-width: 600px) {
  .tracking-summary .score-card__dial { padding-right: 0; border-right: none; }
  .flag { grid-template-columns: 8px minmax(0, 1fr); }
  .flag__meta { grid-column: 2; flex-direction: row; align-items: baseline; gap: 8px; }
  .qa-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}

/* ── Copy audit (tools/copy_audit.html) ── */
.rewrite-list { display: flex; flex-direction: column; gap: 16px; }
.rewrite { padding: 16px; border-radius: var(--r-18); background: var(--glass-field); box-shadow: inset 0 0 0 1px var(--rim), 0 1px 2px var(--shade); }
.rewrite__element { margin-bottom: 10px; color: var(--text-muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.rewrite__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 8px; }
.rewrite__label { margin-bottom: 4px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.rewrite__before, .rewrite__after { margin: 0; font-size: 0.87rem; line-height: 1.5; }
.rewrite__before { color: var(--text-muted); }
.rewrite__after { color: var(--text); font-weight: 500; }
.rewrite__reason { margin: 0; padding-top: 8px; border-top: 1px solid var(--line); color: var(--text-muted); font-size: 0.8rem; }
@media (max-width: 600px) { .rewrite__grid { grid-template-columns: minmax(0, 1fr); } }

/* ── Proposal (tools/proposal.html; its print rules stay in the template) ── */
.proposal-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.proposal-doc {
  background: var(--surface-solid); border: 1px solid var(--rim); border-radius: var(--r-24);
  box-shadow: var(--shadow-card);
}
.proposal-header { gap: 16px; background: var(--surface-white); border-bottom: 1px solid var(--line); }
.proposal-header__meta { text-align: right; }
.proposal-eyebrow { margin-bottom: 4px; color: var(--text-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.proposal-date { margin-bottom: 4px; color: var(--text-muted); font-size: 12px; }
.proposal-name { color: var(--text); font-size: 1.1rem; font-weight: 700; }
.proposal-domain { color: var(--text-muted); font-size: 0.87rem; }
.proposal-stats, .proposal-section { border-bottom: 1px solid var(--line); }
/* 3.A's .pstat-value colour comes after the accent inks; the stats keep theirs. */
.pstat-value.accent-amber { color: var(--c-yellow-ink); }
.pstat-value.accent-blue  { color: var(--c-blue-ink); }
.pstat-value.accent-green { color: var(--c-green-ink); }
.pstat-value.accent-red   { color: var(--c-danger-ink); }
.proposal-section h2 { color: var(--accent-text); font-size: 12px; font-weight: 700; }
.proposal-section p, .proposal-signoff p { color: var(--text); }
.proposal-service { background: var(--surface-white); border-radius: var(--r-12); box-shadow: inset 0 0 0 1px var(--line); }
.proposal-service-name { color: var(--accent-text); }
.proposal-service-desc { color: var(--text-muted); font-size: 0.87rem; }
.proposal-signoff__sig { margin-top: 24px; }
.proposal-signoff__name { color: var(--text); font-weight: 700; }
/* On paper a section never splits from its heading (the template's own
   print block sets the colours; this only keeps blocks whole). */
@media print {
  .proposal-section, .proposal-signoff, .proposal-service { break-inside: avoid; }
  .proposal-section h2 { break-after: avoid; }
}
@media (max-width: 600px) {
  .proposal-header, .proposal-stats, .proposal-section, .proposal-signoff { padding-left: 18px; padding-right: 18px; }
  .proposal-header { flex-wrap: wrap; }
  .proposal-header__meta { text-align: left; }
  .proposal-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ── LocalBusiness schema (tools/local_schema.html) ── */
.schema-source { margin-bottom: 16px; padding: 12px 14px; border-radius: var(--r-18); background: var(--tint-neutral); }
.schema-source__body { color: var(--text); font-size: 0.87rem; line-height: 1.7; overflow-wrap: anywhere; }

/* ── Email sequence (tools/email_sequence.html) ── */
.email-card {
  background: var(--glass-card); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 1px solid var(--rim); border-radius: var(--r-24); box-shadow: var(--shadow-card);
}
.email-card-header { padding: 12px 18px; background: var(--tint-neutral); border-bottom: 1px solid var(--line); }
.email-number { color: var(--accent-text); font-family: var(--font-body); font-size: 13px; }
.email-timing { color: var(--text-muted); font-size: 12px; }
.email-purpose { margin-left: auto; white-space: normal; text-align: left; }
.email-meta { padding: 12px 18px; border-bottom: 1px solid var(--line); }
.email-meta-label { color: var(--text-muted); font-size: 11px; }
.email-meta-value { color: var(--text); font-size: 0.87rem; min-width: 0; overflow-wrap: anywhere; }
.email-body { padding: 14px 18px; color: var(--text); font-size: 0.87rem; }

/* ── Ad copy generator (copy/generator.html) ── */
/* Columns that never grow past the page ("1fr" was content-sized: 438px at 390). */
.copy-layout { grid-template-columns: 380px minmax(0, 1fr); gap: var(--gap); }
.copy-form-panel {
  background: var(--glass-card); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 1px solid var(--rim); border-radius: var(--r-30); box-shadow: var(--shadow-card);
  padding: 22px 24px; top: calc(var(--inset) + var(--toolbar-h) + 18px);
}
.copy-output-panel { gap: var(--gap); min-width: 0; }
.channel-option, .framework-option {
  border: none; border-radius: var(--r-18); background: var(--glass-field); box-shadow: inset 0 0 0 1px var(--rim);
  transition: background var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.channel-option:hover, .framework-option:hover { border: none; background: var(--surface-white); }
.channel-option--active, .framework-option--active,
.channel-option--active:hover, .framework-option--active:hover {
  background: var(--surface-white); box-shadow: inset 0 0 0 2px var(--accent), 0 4px 12px var(--shade);
}
.channel-option:focus-within, .framework-option:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.channel-name { color: var(--text); font-size: 12px; font-weight: 600; }
.framework-name { color: var(--text); font-size: 0.87rem; }
.framework-option--active .framework-name { color: var(--accent-text); }
.framework-desc { color: var(--text-muted); font-size: 12px; }
.framework-best { color: var(--accent-text); font-size: 12px; }
.copy-output-header { flex-wrap: wrap; }
.copy-framework-note {
  margin: 0; padding: 12px 16px; border-left: 3px solid var(--accent); border-radius: 0 var(--r-18) var(--r-18) 0;
  background: var(--accent-tint); color: var(--text); font-size: 0.87rem;
}
.copy-variation, .copy-saved-card, .copy-empty {
  background: var(--glass-card); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 1px solid var(--rim); border-radius: var(--r-24); box-shadow: var(--shadow-card);
}
.copy-variation { padding: 18px 20px; }
.copy-saved-card { margin-bottom: var(--gap); }
.copy-empty { color: var(--text-muted); }
.copy-empty__note { margin-top: 8px; color: var(--text-muted); font-size: 0.87rem; }
.copy-variation-label { color: var(--accent-text); font-size: 0.93rem; font-weight: 650; }
.copy-field-row { grid-template-columns: 120px minmax(0, 1fr) 32px; border-bottom: 1px solid var(--line); }
.copy-field-key { color: var(--text-muted); font-size: 11px; }
.copy-field-value { color: var(--text); font-size: 0.93rem; overflow-wrap: anywhere; border-radius: 8px; }
.copy-field-value:hover { background: var(--tint-hover); }
.copy-field-value.is-copied { background: var(--c-green-tint); }
.copy-btn { width: 32px; height: 32px; border-radius: var(--r-pill); color: var(--text-muted); }
.copy-btn:hover { background: var(--tint-neutral); color: var(--text); }
.copy-save-form { flex-wrap: wrap; border-top: 1px solid var(--line); }
.copy-save-label {
  min-width: 160px; min-height: 32px; padding: 6px 12px; border: none; border-radius: var(--r-pill);
  background: var(--glass-field); color: var(--text); box-shadow: inset 0 0 0 1px var(--field-line); font-size: 0.87rem;
}
.copy-save-label:focus { outline: none; background: var(--surface-white); box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 4px var(--accent-tint); }
.copy-save-label::placeholder { color: var(--text-muted); }
.copy-saved-title { color: var(--text-muted); font-size: 12px; font-weight: 700; }
.copy-saved-label { color: var(--text); }
.copy-saved-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.copy-saved-date { color: var(--text-muted); font-size: 12px; }
.btn.copy-remove { color: var(--text-muted); font-size: 12px; }
@media (max-width: 900px) {
  .copy-layout { grid-template-columns: minmax(0, 1fr); }
  .channel-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 600px) { .copy-field-row { grid-template-columns: 92px minmax(0, 1fr) 32px; } }

/* ── Articles: pipeline, calendar and review (the content/ templates) ── */
.article-pipeline-grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.9fr); gap: var(--gap); margin-bottom: var(--gap); align-items: start; }
.article-pipeline-grid > .card { margin-bottom: 0; }
.article-pipeline-grid .form-card { max-width: none; }
.article-row {
  border: none; border-radius: var(--r-18); padding: 14px 16px;
  background: var(--glass-field); box-shadow: inset 0 0 0 1px var(--rim), 0 1px 2px var(--shade);
}
.article-row > div:first-child { min-width: 0; }
.article-row-title { color: var(--text); font-weight: 650; overflow-wrap: anywhere; }
.article-row-link:hover { color: var(--accent-text); }
.article-row-meta { color: var(--text-muted); font-size: 13px; }
.article-row-tags { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; }
.article-row__actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.calendar-layout { grid-template-columns: minmax(0, 1fr); gap: var(--gap); margin-bottom: var(--gap); }
/* The queue sits beside the month only where a day is wide enough for titles. */
@media (min-width: 1600px) { .calendar-layout { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); } }
.calendar-layout > .card { margin-bottom: 0; min-width: 0; }
.calendar-grid { gap: 8px; }
.calendar-weekday { color: var(--text-muted); font-size: 11px; }
.calendar-day {
  min-height: 112px; min-width: 0; padding: 10px; gap: 8px; border: none; border-radius: var(--r-18);
  background: var(--glass-field); box-shadow: inset 0 0 0 1px var(--rim);
}
.calendar-day.empty { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.calendar-day-number { color: var(--text); font-size: 12px; }
.calendar-event-count { color: var(--accent-text); font-size: 12px; }
.calendar-event-pill {
  /* Vertical space as a transparent border, so the clamp's overflow (clipped
     at the padding box) never shows a fourth line in the padding. */
  padding: 0 8px; border: solid transparent; border-width: 6px 0; border-radius: var(--r-12);
  background: var(--accent-tint); color: var(--text);
  font-size: 12px; line-height: 1.35; overflow-wrap: break-word;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;
}
.article-review-layout { gap: var(--gap); }
.article-review-content, .article-review-sidebar { gap: var(--gap); min-width: 0; }
.article-review-content > .card, .article-review-sidebar > .card { margin-bottom: 0; }
.article-meta-item { border: none; border-radius: var(--r-18); background: var(--tint-neutral); }
.article-meta-label { color: var(--text-muted); font-size: 11px; }
.article-meta-value { color: var(--text); font-size: 0.93rem; }
.article-meta-value .tag { margin: 0 4px 4px 0; }
.tab-strip { gap: 4px; padding: 4px; margin-bottom: 8px; justify-self: start; border-radius: var(--r-pill); background: var(--tint-neutral); width: max-content; max-width: 100%; }
.tab-pill {
  min-height: 34px; padding: 0 16px; border: none; border-radius: var(--r-pill); background: transparent;
  color: var(--text); font-size: 0.87rem; font-weight: 600;
}
.tab-pill:hover { background: var(--glass-hover); color: var(--text); }
.tab-pill.active { background: var(--surface-white); color: var(--text); border: none; box-shadow: 0 1px 2px var(--shade), 0 4px 12px var(--shade-strong); }
.article-body, .article-body p, .article-body li { color: var(--text); }
.article-body h1, .article-body h2, .article-body h3, .article-body h4 { color: var(--text); }
.article-body th, .article-body td { border: 1px solid var(--line); }
.article-body th { background: var(--tint-neutral); color: var(--text); }
.article-body img { max-width: 100%; height: auto; }
.article-body { min-width: 0; overflow-x: auto; }
.article-sidebar-item { border: none; border-radius: var(--r-18); background: var(--glass-field); box-shadow: inset 0 0 0 1px var(--rim); }
.article-sidebar-item a { color: var(--text); font-weight: 650; overflow-wrap: anywhere; }
.article-sidebar-item a:hover { color: var(--accent-text); }
.article-sidebar-meta { color: var(--text-muted); font-size: 12px; }
.article-html-editor { font-family: var(--font-mono); }
@media (max-width: 1024px) {
  .article-pipeline-grid, .article-review-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .field--w160, .field--w120 { flex: 1 1 120px; width: auto; }
  .article-row { flex-wrap: wrap; }
  .article-row-tags { justify-content: flex-start; }
  .calendar-grid { gap: 4px; }
  .calendar-day { min-height: 64px; padding: 6px 4px; border-radius: var(--r-12); }
  .calendar-weekday { letter-spacing: 0; text-align: center; }
  .calendar-day-number { text-align: center; }
  /* A phone shows the count; the titles are in the queue beside it. */
  .calendar-event-stack { display: none; }
  .calendar-event-count { font-size: 9px; line-height: 1.2; text-align: center; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Batch 3.G (Oct 2026): settings (Google, Business Profile, Claude
   connector), Meta campaigns, the site connection and change queue,
   prospects, the background-job progress partial, and the sign-in page
   (whose layout is login.css; it now loads this file for the tokens and the
   self-hosted Inter). Their inline styles are gone; everything else they use
   is the pilot's and batches 3.A to 3.D's (cards with .card--ok/--warn/
   --danger, .setup-card, notices and alerts, chips and .tag-meta-*, fields,
   .row-actions, .stat-value--text, .sub-line, .ads-error-detail, the
   accent-* inks, .accent-btn, .align-start, .minw-640, .nowrap, the margin
   utilities). Shared bits first, then one named block per page.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Shared (two or more pages) ── */
.mt-1 { margin-top: 4px; }
.text-xs, .data-table td.text-xs { font-size: 12px; }
/* A redirect URI to copy (Google and Business Profile settings). */
.select-all { -webkit-user-select: all; user-select: all; overflow-wrap: anywhere; }
/* A row of buttons and the forms that hold them. */
.action-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.action-row > form { margin: 0; }
/* A value shown to copy, with its Copy button (connector URL, connection key). */
.copy-box { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 16px; }
.copy-box__value {
  min-width: 0; padding: 8px 12px; border-radius: var(--r-12);
  background: var(--tint-neutral); color: var(--text);
  font-size: 0.87rem; overflow-wrap: anywhere;
}
/* Numbered steps and plain bulleted lists (no margin of their own, so the
   margin utilities apply; the global reset zeroes the list margins). */
.steps-list { padding-left: 20px; line-height: 1.7; color: var(--text); }
.link-list { padding-left: 18px; }
.link-list li { margin-bottom: 2px; }
/* A narrow form or checklist card (Meta, site connection). */
.card--narrow { max-width: 640px; }
/* Fields side by side; content-sized columns overflowed a phone. */
.field-grid { display: grid; gap: 0 12px; }
.field-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 600px) { .field-grid--3 { grid-template-columns: minmax(0, 1fr); } }
summary.link { cursor: pointer; white-space: nowrap; }
/* A link inside a notice or alert reads in the message's own ink, underlined. */
:is(.notice, .alert) a.link { color: inherit; font-weight: 600; text-decoration: underline; }
/* A long URL or ID in a definition list wraps instead of widening the page. */
.definition-list { grid-template-columns: 120px minmax(0, 1fr); }
.definition-list dd { min-width: 0; margin: 0; overflow-wrap: anywhere; }

/* ── Claude connector consent (oauth/consent.html; laid out by login.css) ── */
.consent-meta { margin: 0 0 16px; font-size: 0.87rem; }
.consent-list { margin: 12px 0 18px; padding-left: 20px; color: var(--text); font-size: 0.93rem; line-height: 1.55; }
.consent-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.consent-actions button { flex: 1 1 140px; }

/* ── Background job progress (_progress.html) ── */
.job-progress { max-width: 460px; margin: 0 auto; text-align: left; }

/* ── Business Profile connection (settings/google_business.html) ── */
.gbp-locations { min-width: 760px; }
.gbp-locations td { vertical-align: top; }
.gbp-locations td.mono, .gbp-locations .mono { overflow-wrap: anywhere; }
.gbp-locations td:nth-child(2) { min-width: 150px; }
.gbp-locations__error { min-width: 200px; max-width: 320px; overflow-wrap: anywhere; }

/* ── Claude connector (settings/claude_connector.html) ── */
.connector-revoke { text-align: right; }
@media (max-width: 768px) {
  .connector-table td:last-child, .connector-table thead th:last-child { position: sticky; right: 0; background: var(--surface-solid); }
  .connector-table td:last-child { box-shadow: -10px 0 10px -10px var(--shade-strong); }
}

/* ── Meta campaigns list (meta/list.html) ── */
/* A long "company — project" name stays inside the filter card. */
.card > .filter-form .select-sm { max-width: 100%; min-width: 0; text-overflow: ellipsis; }
/* On a phone View and Deploy stay reachable when the table scrolls: pinned
   to the right edge on the solid surface, as on Keywords. */
@media (max-width: 768px) {
  .meta-campaigns td:last-child, .meta-campaigns thead th:last-child { position: sticky; right: 0; background: var(--surface-solid); }
  .meta-campaigns td:last-child { box-shadow: -10px 0 10px -10px var(--shade-strong); }
}

/* ── Meta campaign (meta/campaign.html) ── */
.ads-list { gap: 14px; }
.ad-card {
  padding: 16px 18px; border: none; border-radius: var(--r-24);
  background: var(--glass-field); box-shadow: inset 0 0 0 1px var(--rim), 0 1px 2px var(--shade);
}
.ad-card--approved { border-color: transparent; box-shadow: inset 4px 0 0 var(--c-green), inset 0 0 0 1px var(--rim), 0 1px 2px var(--shade); }
.ad-card-header { gap: 8px 12px; margin-bottom: 12px; }
.ad-card-header .tag { margin: 2px 0; }
.ad-name { margin-right: 6px; color: var(--text); font-size: 0.93rem; font-weight: 650; }
.ad-card__actions { display: flex; flex-wrap: wrap; gap: 6px; }
.ad-card__approved { color: var(--c-green-ink); font-size: 13px; font-weight: 600; }
.ad-copy-preview { gap: 10px; }
.ad-copy-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 600px) { .ad-copy-grid { grid-template-columns: minmax(0, 1fr); } }
/* The old 9.6px labels were too small to read. */
/* Scoped to the ad cards: .copy-text is also the review and GBP audit text
   on the Local SEO pages (batch 3.B), which keep their own size and margins. */
.ad-card .copy-label { margin-bottom: 3px; color: var(--text-muted); font-size: 11px; font-weight: 650; letter-spacing: .06em; }
.ad-card .copy-text { margin: 0; color: var(--text); font-size: 0.93rem; line-height: 1.5; overflow-wrap: anywhere; }
.ad-card .copy-text--url { font-size: 12px; }
.ad-card__empty { margin: 0; padding: 12px 0; font-size: 0.87rem; }
.ad-card__edit { margin-top: 8px; }
.ad-card__edit > summary { color: var(--text-muted); font-size: 13px; font-weight: 500; cursor: pointer; }
.ad-card__edit > summary:hover { color: var(--text); }

/* ── Pre-deploy checklist (meta/checklist.html) ── */
.checklist-item { border-bottom: 1px solid var(--line); }
.checklist-icon { width: 24px; height: 24px; font-size: 12px; font-weight: 700; }
.checklist-icon--pass { background: var(--c-green-tint);  color: var(--c-green-ink); }
.checklist-icon--fail { background: var(--c-danger-tint); color: var(--c-danger-ink); }
.checklist-label { color: var(--text); font-size: 0.93rem; font-weight: 500; }
.checklist-fix { margin-top: 2px; color: var(--c-danger-ink); font-size: 13px; }
.checklist-actions { margin-top: 24px; }
.checklist-actions__note { margin-top: 8px; text-align: center; }
.btn-block { display: flex; width: 100%; min-height: 48px; }
/* The blocked deploy button carries a message, so it stays readable (the
   generic disabled button is 40% opacity). */
.btn-block[disabled] { opacity: 1; background: var(--tint-neutral); color: var(--text-muted); box-shadow: none; }

/* ── Deploy log (meta/log.html) ── */
.tag--lg { min-height: 28px; padding: 0 12px; font-size: 13px; }
.deploy-log__error { color: var(--c-danger-ink); overflow-wrap: anywhere; }
.deploy-log__ids { margin-top: 12px; color: var(--text-muted); font-size: 13px; overflow-wrap: anywhere; }

/* ── Site connection (site_changes/connection.html) ── */
.site-key-card { max-width: 760px; }
.site-pages td { vertical-align: top; }
.site-pages td:nth-child(1) { min-width: 160px; }
.site-pages td:nth-child(2) { min-width: 180px; }
.site-pages td:nth-child(3) { min-width: 220px; }
.site-pages__form { margin-top: 8px; min-width: 280px; }
.pager { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 12px; }

/* ── Change queue (site_changes/queue.html) ── */
.change-card__head { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 12px; }
.change-card__body { flex: 1; min-width: 0; }
.change-card__title { margin-bottom: 4px; }
.change-card__line { margin: 6px 0 0; overflow-wrap: anywhere; }
.change-card__diff { margin-top: 10px; }
.change-diff__field { width: 140px; }
/* Retry on an uncertain draft post: the confirm box sits beside the button. */
.change-card__confirm { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; max-width: 420px; }
.change-value {
  margin: 0; max-height: 260px; overflow: auto; padding: 8px 10px; border-radius: var(--r-12);
  background: var(--tint-neutral); color: var(--text);
  font-family: var(--font-mono); font-size: 12px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere;
}

/* The draft post preview (site_changes/draft_post.html): a sandboxed srcdoc frame on a white surface, as WordPress shows a post. */
.draft-preview { display: block; width: 100%; min-height: 360px; border: 1px solid var(--color-border); border-radius: var(--r-12); background: var(--surface-white); }

/* ── Prospects (prospects/list.html) ── */
/* On a phone the status select stays in view when the table scrolls. */
@media (max-width: 768px) {
  .prospects-table td:last-child, .prospects-table thead th:last-child { position: sticky; right: 0; background: var(--surface-solid); }
  .prospects-table td:last-child { box-shadow: -10px 0 10px -10px var(--shade-strong); }
}
.two-col.field-pair { gap: 0 16px; margin-bottom: 0; }
.prospects-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0; }
.prospects-table { min-width: 760px; }
.prospects-table td { vertical-align: top; }
.prospects-table td:first-child { min-width: 200px; }
.prospects-table td:nth-child(3) { min-width: 200px; }
.prospects-table td:nth-child(4) { white-space: nowrap; }
.prospect-score { font-family: var(--font-mono); font-weight: 700; font-variant-numeric: tabular-nums; }
.prospect-score--strong { color: var(--c-green-ink); }
.prospect-score--fair   { color: var(--c-yellow-ink); }
.prospect-score--weak   { color: var(--text-muted); }
.prospect-signals { margin: 0; padding-left: 16px; font-size: 12px; }

/* ═══════════════════════════════════════════════════════════════════════════
   Batch 1.38 (Oct 2026): citations on a phone.
   .table-stack is a data-label stacked-cell table: from 768px down each row
   is a card and each cell shows its data-label above its value. The column
   headers stay for screen readers. Desktop is untouched.
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .table-stack, .table-stack tbody { display: block; width: 100%; min-width: 0; }
  .table-stack thead {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip-path: inset(50%); white-space: nowrap;
  }
  .table-stack tbody { display: flex; flex-direction: column; gap: 10px; }
  .table-stack tr {
    display: block; padding: 12px 14px; border-radius: var(--r-18);
    background: var(--surface-white); box-shadow: inset 0 0 0 1px var(--line);
  }
  .table-stack td {
    display: block; min-width: 0; padding: 0; border: none; white-space: normal; overflow-wrap: anywhere;
  }
  .table-stack td + td { margin-top: 10px; }
  .table-stack tbody tr:hover td { background: none; }
  .table-stack [data-label]::before {
    content: attr(data-label); display: block; margin-bottom: 2px;
    color: var(--text-muted); font-size: 12px; font-weight: 600;
  }

  /* Citations: the directory and its status chip on top, then the listing
     link, then the NAP issues, then the add or remove listing control. The
     Listing cell's two parts become rows of the card of their own. The chips
     take at most 60% of the card, so two of them never crush the name. */
  .citations-table tr {
    display: grid; grid-template-columns: minmax(0, 1fr) fit-content(60%); gap: 10px 12px; align-items: start;
  }
  .citations-table td + td { margin-top: 0; }
  .citations-table td:nth-child(3), .citations-table td:last-child { white-space: normal; min-width: 0; }
  .citations-table .citations-table__name { font-weight: 600; }
  .citations-table .citations-table__name::before,
  .citations-table .citations-table__status::before { content: none; }
  .citations-table .citations-table__status {
    display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; text-align: right;
  }
  .citations-table .citations-table__listing { display: contents; }
  .citations-table .citation-listing,
  .citations-table .citations-table__nap,
  .citations-table .citation-manual { grid-column: 1 / -1; margin: 0; }
  .citations-table .citations-table__nap { order: 1; }
  .citations-table .citation-manual { order: 2; }
  .citations-table .field.citation-manual__form { min-width: 0; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Batch 1.38 (Oct 2026): the sign-in page (login.html).
   1.41.0 (Nov 2026): a split screen. On the left a dark brand panel (dot
   grid, drifting orbs, a particle canvas from login.js and two
   counter-rotating rings of marketing-channel glyphs round the Cumulus
   hexagon); on the right the form in a glass card over the corner grid.
   Plain CSS, no framework, no external asset. The oauth consent and error
   pages keep login.css. Colours are :root tokens or color-mix of them; white
   text on the button's gradient stays at 4.6:1 or more, the muted text and
   the placeholders are 5.3:1 on white and the field borders 3.6:1. Every
   animation stops under prefers-reduced-motion, and the page works with
   JavaScript off (login.js only adds the canvas, the tilt and the
   show-password button).
   ═══════════════════════════════════════════════════════════════════════════ */
.signin-body {
  position: relative; min-height: 100vh; margin: 0; padding: 0;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  overflow-x: hidden; background: var(--surface-white); color: var(--text);
}
/* Decorative grid in the top-right corner: 32px grid lines (an SVG used as a
   mask, so the colour is a token) fading out towards the column. It never
   takes a click and never widens the page. On the split screen it covers
   exactly the right half, behind the card. */
.signin-grid {
  position: absolute; top: 0; right: 0; z-index: 0;
  width: 50vw; height: 50vw; max-width: 100%;
  pointer-events: none; overflow: hidden;
}
.signin-grid::before, .signin-grid::after { content: ""; position: absolute; inset: 0; }
.signin-grid::before {
  background-color: var(--grid-line);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' stroke='black'%3E%3Cpath d='M0 .5H31.5V32'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' stroke='black'%3E%3Cpath d='M0 .5H31.5V32'/%3E%3C/svg%3E");
  -webkit-mask-size: 32px 32px; mask-size: 32px 32px;
}
.signin-grid::after {
  background-image: radial-gradient(100% 100% at 100% 0%, transparent, var(--surface-white));
}

/* ── The brand panel (left) ─────────────────────────────────────────────── */
.signin-hero {
  position: relative; z-index: 1; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; justify-content: center; gap: 40px;
  min-height: 100vh; box-sizing: border-box; padding: 56px clamp(32px, 5vw, 72px);
  background: var(--text); background: var(--signin-night); color: var(--signin-night-ink);
}
.signin-hero__backdrop { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
/* Dot grid, fading towards the edges (no image: a radial gradient tile). */
.signin-hero__backdrop::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(color-mix(in srgb, var(--accent-ink) 16%, transparent) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, var(--text), transparent);
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, var(--text), transparent);
}
.signin-hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.signin-orb {
  position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.55;
  animation: signin-drift 22s ease-in-out infinite alternate;
}
.signin-orb--one   { width: 420px; height: 420px; top: -120px; left: -100px;
                     background: color-mix(in srgb, var(--accent) 70%, transparent); }
.signin-orb--two   { width: 360px; height: 360px; bottom: -120px; right: -80px;
                     background: color-mix(in srgb, var(--c-purple) 55%, transparent);
                     animation-duration: 26s; animation-delay: -8s; }
.signin-orb--three { width: 260px; height: 260px; top: 42%; left: 46%;
                     background: color-mix(in srgb, var(--c-teal) 40%, transparent);
                     animation-duration: 30s; animation-delay: -14s; }
@keyframes signin-drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(40px, -30px, 0) scale(1.12); }
}

/* The 3D scene: the stage tilts with the pointer (login.js sets --tilt-x
   and --tilt-y on a fine pointer); the rings spin in opposite directions
   and each card turns back the other way so its glyph stays upright. */
.signin-scene {
  /* Sized from the viewport height so the panel fits a short screen:
     392px square at 900px tall and up, smaller below. */
  --orbit-outer: clamp(96px, 19vh, 170px);
  --orbit-inner: calc(var(--orbit-outer) * 0.59);
  --card: clamp(36px, 5.8vh, 52px);
  position: relative; flex: none; align-self: center;
  width: calc(var(--orbit-outer) * 2 + var(--card)); max-width: 100%;
  height: calc(var(--orbit-outer) * 2 + var(--card));
  perspective: 1000px;
}
@supports (aspect-ratio: 1) {
  .signin-scene { height: auto; aspect-ratio: 1; }
}
.signin-stage {
  --tilt-x: 0deg; --tilt-y: 0deg;
  position: absolute; inset: 0; transform-style: preserve-3d;
  transform: rotateX(calc(14deg + var(--tilt-y))) rotateY(var(--tilt-x));
  transition: transform 0.6s var(--ease); will-change: transform;
}
.signin-orbit {
  position: absolute; top: 50%; left: 50%; border-radius: 50%;
  border: 1px dashed color-mix(in srgb, var(--accent-ink) 18%, transparent);
  animation: signin-spin 48s linear infinite;
}
.signin-orbit--outer {
  width: calc(var(--orbit-outer) * 2); height: calc(var(--orbit-outer) * 2);
  margin: calc(var(--orbit-outer) * -1) 0 0 calc(var(--orbit-outer) * -1);
}
.signin-orbit--inner {
  width: calc(var(--orbit-inner) * 2); height: calc(var(--orbit-inner) * 2);
  margin: calc(var(--orbit-inner) * -1) 0 0 calc(var(--orbit-inner) * -1);
  animation-duration: 32s; animation-direction: reverse;
}
.signin-orbit__item {
  position: absolute; top: 50%; left: 50%;
  width: var(--card); height: var(--card);
  margin: calc(var(--card) / -2) 0 0 calc(var(--card) / -2);
}
.signin-orbit--outer .signin-orbit__item { --r: var(--orbit-outer); }
.signin-orbit--inner .signin-orbit__item { --r: var(--orbit-inner); }
.signin-orbit--outer .signin-orbit__item:nth-child(1) { transform: rotate(0deg)   translateY(calc(var(--r) * -1)) rotate(0deg); }
.signin-orbit--outer .signin-orbit__item:nth-child(2) { transform: rotate(72deg)  translateY(calc(var(--r) * -1)) rotate(-72deg); }
.signin-orbit--outer .signin-orbit__item:nth-child(3) { transform: rotate(144deg) translateY(calc(var(--r) * -1)) rotate(-144deg); }
.signin-orbit--outer .signin-orbit__item:nth-child(4) { transform: rotate(216deg) translateY(calc(var(--r) * -1)) rotate(-216deg); }
.signin-orbit--outer .signin-orbit__item:nth-child(5) { transform: rotate(288deg) translateY(calc(var(--r) * -1)) rotate(-288deg); }
.signin-orbit--inner .signin-orbit__item:nth-child(1) { transform: rotate(60deg)  translateY(calc(var(--r) * -1)) rotate(-60deg); }
.signin-orbit--inner .signin-orbit__item:nth-child(2) { transform: rotate(180deg) translateY(calc(var(--r) * -1)) rotate(-180deg); }
.signin-orbit--inner .signin-orbit__item:nth-child(3) { transform: rotate(300deg) translateY(calc(var(--r) * -1)) rotate(-300deg); }
.signin-orbit__card {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%; box-sizing: border-box;
  border: 1px solid color-mix(in srgb, var(--accent-ink) 16%, transparent);
  border-radius: var(--r-12);
  background: var(--signin-night); color: var(--accent-ink);
  background: color-mix(in srgb, var(--signin-night) 70%, var(--accent));
  color: color-mix(in srgb, var(--accent-ink) 88%, var(--accent));
  box-shadow: 0 8px 24px color-mix(in srgb, var(--signin-night) 60%, transparent),
              inset 0 1px 0 color-mix(in srgb, var(--accent-ink) 12%, transparent);
  animation: signin-spin 48s linear infinite reverse;
}
.signin-orbit--inner .signin-orbit__card { animation-duration: 32s; animation-direction: normal; }
@keyframes signin-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
/* The glowing core: a hexagon (clip-path), glow from a drop-shadow on its
   parent so the clip does not cut it off. */
.signin-core {
  position: absolute; top: 50%; left: 50%; width: 116px; height: 116px;
  margin: -58px 0 0 -58px; transform: translateZ(30px);
  filter: drop-shadow(0 0 22px color-mix(in srgb, var(--accent) 75%, transparent));
  animation: signin-pulse 4.5s ease-in-out infinite;
}
.signin-core__hex {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
  clip-path: polygon(25% 6.7%, 75% 6.7%, 100% 50%, 75% 93.3%, 25% 93.3%, 0% 50%);
  background: linear-gradient(145deg, var(--accent-light), color-mix(in srgb, var(--accent) 60%, var(--signin-night)));
}
.signin-core__logo { display: block; width: 56px; height: 56px; }
@keyframes signin-pulse {
  0%, 100% { transform: translateZ(30px) scale(1); }
  50%      { transform: translateZ(30px) scale(1.06); }
}

/* Hero copy: the eyebrow pill, the three-line headline and the tagline. */
.signin-hero__copy { position: relative; max-width: 34rem; }
.signin-hero__eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 20px;
  padding: 6px 14px; border-radius: var(--r-pill);
  border: 1px solid color-mix(in srgb, var(--accent-ink) 20%, transparent);
  background: var(--accent);
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  color: var(--signin-night-ink); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.04em;
}
.signin-hero__eyebrow::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent-light);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent);
}
.signin-hero__headline {
  margin: 0 0 18px; font-size: clamp(2.1rem, 3.4vw, 3.25rem); font-weight: 700;
  line-height: 1.08; letter-spacing: -0.025em;
}
.signin-hero__line { display: block; animation: signin-line 0.9s var(--ease) both; }
.signin-hero__line:nth-child(2) { animation-delay: 0.12s; }
.signin-hero__line:nth-child(3) { animation-delay: 0.24s; }
/* Solid where color-mix or text clipping is missing; the gradient where both work. */
.signin-hero__line--accent { color: var(--accent-light); }
@supports (background: color-mix(in srgb, red, blue)) and ((background-clip: text) or (-webkit-background-clip: text)) {
  .signin-hero__line--accent {
    background: linear-gradient(90deg, var(--accent-light), color-mix(in srgb, var(--accent) 55%, var(--accent-ink)));
    -webkit-background-clip: text; background-clip: text;
    color: transparent; -webkit-text-fill-color: transparent;
  }
}
.signin-hero__tagline {
  margin: 0; max-width: 30rem; font-size: 1.05rem; line-height: 1.6;
  color: var(--accent-ink);
  color: color-mix(in srgb, var(--accent-ink) 75%, transparent);
  animation: signin-line 0.9s var(--ease) 0.36s both;
}
@keyframes signin-line {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* ── The card (right) ───────────────────────────────────────────────────── */
@keyframes signin-rise {
  from { opacity: 0; transform: translateY(25px); }
  to   { opacity: 1; transform: none; }
}
.signin {
  position: relative; z-index: 1; box-sizing: border-box;
  align-self: center; justify-self: center;
  width: calc(100% - 48px); max-width: 30rem; margin: 48px 24px; padding: 36px 32px 28px;
  border: 1px solid var(--line); border-radius: var(--r-24);
  background: var(--surface-white);
  background: color-mix(in srgb, var(--surface-white) 82%, transparent);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  box-shadow: var(--shadow-card);
  animation: signin-rise 1.25s ease-in-out both;
}
/* A 1px accent hairline along the top edge. */
.signin::before {
  content: ""; position: absolute; top: -1px; left: 24px; right: 24px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}
.signin__brand { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 24px; }
.signin__logo { display: block; width: 32px; height: 32px; }
.signin__name { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; }
.signin__title { margin: 0 0 6px; font-size: 1.5rem; font-weight: 600; line-height: 1.25; text-align: center; color: var(--text); }
.signin__subtitle { margin: 0 0 28px; color: var(--text-muted); text-align: center; }
.signin__error { margin: 0 0 20px; }

.signin__form { display: flex; flex-direction: column; gap: 16px; }
.signin__label { display: block; margin-bottom: 6px; color: var(--text-muted); font-size: 0.93rem; font-weight: 500; }
/* The field: a leading icon at 12px, the input padded clear of it, and (from
   login.js) the show-password button at the right. */
.signin__control { position: relative; }
.signin__icon {
  position: absolute; top: 50%; left: 12px; width: 18px; height: 18px;
  transform: translateY(-50%); color: var(--text-muted); pointer-events: none;
  transition: color var(--t) var(--ease);
}
.signin__control:focus-within .signin__icon { color: var(--accent-text); }
.signin__input {
  display: block; box-sizing: border-box; width: 100%; margin: 0;
  padding: 8px 12px 8px 40px; min-height: 44px;
  border: 1px solid var(--field-edge); border-radius: var(--r-sm);
  background: var(--surface-white); color: var(--text);
  font: inherit; font-size: 1rem;
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.signin__control--reveal .signin__input { padding-right: 48px; }
.signin__input::placeholder { color: var(--text-muted); opacity: 1; }
.signin__input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.signin__input:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.signin__reveal {
  position: absolute; top: 50%; right: 4px; transform: translateY(-50%);
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; margin: 0; padding: 0;
  border: none; border-radius: var(--r-sm); background: transparent;
  color: var(--text-muted); cursor: pointer;
  transition: color var(--t) var(--ease), background-color var(--t) var(--ease);
}
.signin__reveal:hover { color: var(--text); background: var(--tint-neutral); }
.signin__reveal[aria-pressed="true"] { color: var(--accent-text); }
.signin__reveal:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.signin__reveal svg { display: block; width: 18px; height: 18px; }

.signin__submit {
  display: block; width: 100%; margin-top: 8px; padding: 8px 16px; min-height: 44px;
  border: none; border-radius: var(--r-sm);
  background: linear-gradient(to bottom right, var(--accent-light), var(--accent));
  color: var(--accent-ink); font: inherit; font-size: 1.125rem; font-weight: 600;
  box-shadow: 0 0 0 2px var(--surface-white), 0 0 0 4px var(--accent-ring);
  cursor: pointer;
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
/* The arrow is decoration: the empty alt text keeps the name "Sign in". */
.signin__submit::after {
  content: "\2192"; content: "\2192" / ""; display: inline-block; margin-left: 8px;
  transition: transform var(--t) var(--ease);
}
.signin__submit:hover { transform: scale(1.02); box-shadow: 0 0 0 2px var(--surface-white), 0 0 0 4px transparent; }
.signin__submit:hover::after { transform: translateX(4px); }
.signin__submit:active { transform: scale(0.98); }
/* Keyboard focus: the ring at full strength plus the shared outline. */
.signin__submit:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 6px; border-radius: var(--r-sm);
  box-shadow: 0 0 0 2px var(--surface-white), 0 0 0 4px var(--accent);
}

.signin__terms { margin: 32px 0 0; color: var(--text-muted); font-size: 12px; line-height: 1.6; }
.signin__terms a { color: var(--accent-text); font-weight: 600; text-decoration: underline; }
.signin__version { margin-top: 12px; color: var(--text-muted); font-size: 12px; letter-spacing: 0.04em; }

/* Short desktop screens: tighter spacing and a smaller headline so the
   panel fits without a page scroll (the scene already shrinks with vh);
   on very short ones the tagline goes. */
@media (min-width: 901px) and (max-height: 860px) {
  .signin-hero { padding-top: 32px; padding-bottom: 32px; gap: 24px; }
  .signin-hero__eyebrow { margin-bottom: 14px; }
  .signin-hero__headline { margin-bottom: 12px; font-size: clamp(1.9rem, 5vh, 2.75rem); }
  .signin-hero__tagline { font-size: 0.95rem; line-height: 1.5; }
  .signin { margin-top: 24px; margin-bottom: 24px; }
}
@media (min-width: 901px) and (max-height: 640px) {
  .signin-hero__tagline { display: none; }
}

/* Narrow screens: one column. Up to 900px the panel is a compact band with
   the eyebrow and the headline (no scene, orbs or canvas) above the card;
   up to 600px it goes, so the form leads. */
@media (max-width: 900px) {
  .signin-body { grid-template-columns: minmax(0, 1fr); align-content: start; }
  .signin-hero { min-height: 0; padding: 32px 24px; gap: 0; }
  .signin-hero__backdrop .signin-orb, .signin-scene, .signin-hero__canvas, .signin-hero__tagline { display: none; }
  .signin-hero__headline { margin: 0; font-size: 1.9rem; }
  .signin-hero__eyebrow { margin-bottom: 14px; }
  .signin-grid { display: none; }
}
@media (max-width: 600px) {
  .signin-hero { display: none; }
  .signin-grid { display: block; }
  .signin { width: auto; max-width: none; margin: 32px 16px; padding: 28px 20px 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .signin { animation: none; }
  .signin-orb, .signin-orbit, .signin-orbit__card, .signin-core,
  .signin-hero__line, .signin-hero__tagline { animation: none; }
  .signin-stage { transition: none; transform: rotateX(14deg); }
  .signin__submit, .signin__input, .signin__icon, .signin__reveal, .signin__submit::after { transition: none; }
  .signin__submit:hover, .signin__submit:active, .signin__submit:hover::after { transform: none; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Batch 1.39 (Oct 2026): prospect outreach (prospects/detail.html and the
   AI fit column on prospects/list.html). Draft chips use the blue (draft)
   and yellow (used) tints; approved reuses .badge-green. The detail page's
   two-col stacks at 768px like every other page, and nothing on it is wider
   than the card: long names, addresses and model text wrap.
   ═══════════════════════════════════════════════════════════════════════════ */
.prospects-table { min-width: 860px; }
.prospects-links { display: flex; flex-wrap: wrap; gap: 8px; }
.prospects-batch { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 12px; }
.prospect-chip { display: flex; width: fit-content; margin-top: 6px; }
.prospect-chip--draft { background: var(--c-blue-tint); color: var(--c-blue-ink); }
.prospect-chip--used  { background: var(--c-yellow-tint); color: var(--c-yellow-ink); }

.prospect-notice .btn { margin-top: 0; }
.prospect-notice p { overflow-wrap: anywhere; }
.prospect-detail__name, .prospect-detail__site, .prospect-angle { overflow-wrap: anywhere; }
.prospect-facts {
  display: grid; grid-template-columns: minmax(0, 11em) minmax(0, 1fr); gap: 6px 14px;
  margin: 0; font-size: 0.9rem;
}
.prospect-facts dt { color: var(--text-muted); font-weight: 600; }
.prospect-facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.prospect-hint { display: block; color: var(--c-blue-ink); }
.prospect-ai-score { display: flex; align-items: baseline; gap: 8px; margin: 0 0 6px; }
.prospect-ai-score .prospect-score { font-size: 1.6rem; }
.prospect-angle { margin: 0 0 8px; font-weight: 600; }
.prospect-warn { color: var(--c-yellow-ink); }

.prospect-drafts__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.prospect-email { min-width: 0; margin: 0 0 18px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-md); }
.prospect-email legend { padding: 0 6px; font-weight: 600; }
.prospect-email .field input, .prospect-email .field textarea { box-sizing: border-box; width: 100%; max-width: 100%; }
.prospect-email textarea { font-family: var(--font-body); line-height: 1.5; }
.prospect-email__copy { display: flex; flex-wrap: wrap; gap: 8px; }
.prospect-subhead { margin: 20px 0 8px; font-size: 1rem; font-weight: 600; }
.prospect-blockers { margin: 6px 0 10px; padding-left: 20px; }
.prospect-blockers li { margin-bottom: 4px; overflow-wrap: anywhere; }
.prospect-status-actions .d-inline + .d-inline { margin-left: 6px; }

@media (max-width: 768px) {
  .prospect-facts { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .prospect-facts dd { margin-bottom: 8px; }
  .prospect-email { padding: 10px; }
  .prospect-email__copy .btn { flex: 1 1 auto; }
}

/* ── Organic Social (1.40.0): /social/ and /settings/social ───────────── */
.social-filters__form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; }
.social-filters__field { margin: 0; flex: 1 1 160px; min-width: 0; }
.social-filters__field--wide { flex: 2 1 260px; }
.social-filters__field .select-sm { width: 100%; max-width: 100%; }
.social-filters__actions { flex: 0 0 auto; }
.social-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.social-sort { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.social-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 14px; }
.social-kpi {
  display: flex; flex-direction: column; gap: 6px; min-width: 0;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-18);
  background: var(--surface-white);
}
.social-kpi__label { font-size: 0.8rem; font-weight: 600; color: var(--text-muted); }
.social-kpi__value { font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.social-kpi__sub { font-size: 0.8rem; color: var(--text-muted); }
.social-charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); margin-bottom: var(--gap); }
.social-charts > .card { margin-bottom: 0; min-width: 0; }
.social-charts .chart-wrap { height: 240px; position: relative; }
.social-badge { text-transform: none; }
.social-badge--facebook { background: var(--c-blue-tint); color: var(--c-blue-ink); }
.social-badge--instagram { background: var(--c-pink-tint); color: var(--c-pink-ink); }
.social-thumb { display: block; width: 48px; height: 48px; object-fit: cover; border-radius: var(--r-12); background: var(--tint-neutral); }
.social-posts { min-width: 900px; }
.social-posts__caption { min-width: 220px; max-width: 360px; overflow-wrap: anywhere; }
.social-accounts__state { max-width: 280px; overflow-wrap: anywhere; }
.social-map { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; }
.social-map .select-sm { max-width: 220px; }
.social-scopes { margin: 0 0 12px 18px; }
.social-scopes li { margin-bottom: 4px; }
.social-command { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0 0 8px; }

@media (max-width: 768px) {
  .social-charts { grid-template-columns: minmax(0, 1fr); }
  .social-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .social-kpi__value { font-size: 1.25rem; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   1.39.1 (Nov 2026): the Prospect Finder's town picker (prospects/list.html,
   bound in main.js by [data-town-picker]). The suggestion list is the solid
   card surface with the chrome shadow, opening under the input; the active
   option uses the accent tint like a hovered table row. The clean-up form
   sits under its warning line.
   ═══════════════════════════════════════════════════════════════════════════ */
.town-picker { position: relative; }
.town-picker__list {
  position: absolute; left: 0; right: 0; z-index: 30;
  margin: 4px 0 0; padding: 4px; list-style: none;
  max-height: 280px; overflow-y: auto;
  background: var(--surface-solid); border: 1px solid var(--line);
  border-radius: var(--r-12); box-shadow: var(--shadow-chrome);
}
.town-picker__list[hidden] { display: none; }
.town-picker__option {
  display: flex; flex-wrap: wrap; gap: 0 6px; align-items: baseline;
  padding: 8px 10px; border-radius: 8px; cursor: pointer; overflow-wrap: anywhere;
}
.town-picker__option[aria-selected="true"], .town-picker__option:hover { background: var(--accent-tint); }
.town-picker__name { font-weight: 600; color: var(--text); }
.town-picker__sep, .town-picker__meta { color: var(--text-muted); font-size: 0.85rem; }
.town-picker__empty { padding: 8px 10px; color: var(--text-muted); font-size: 0.85rem; }
.town-picker__selected { color: var(--c-green-ink); font-weight: 600; }
.prospects-cleanup { margin-top: 10px; }

/* ═══════════════════════════════════════════════════════════════════════════
   1.46.0 (Nov 2026): AI Overview tracking on screen (Phase 2 PR 3). The
   keywords page's AI Overview cell (keywords/_ai_overview_cell.html), the
   dashboard's AI Overviews card and the AEO detail section
   (aeo/_search_features.html) reuse .tag, .mini-kpi and .data-table; these
   rules only lay them out. .sr-only carries the cell's date and meaning to
   screen readers, which do not read a title attribute reliably.
   ═══════════════════════════════════════════════════════════════════════════ */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.aeo-cell { white-space: nowrap; }
/* Positioned, so the .sr-only text inside stays within the table's scroller
   (an absolute box whose containing block is outside it escapes the clip). */
.aeo-cell__state, .aeo-cell__mark { position: relative; }
.aeo-cell__mark { margin-left: 4px; }
.aeo-tile__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 0; }
.aeo-tile__grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.aeo-tile__notes { margin-top: 4px; }
.aeo-gaps__sources { min-width: 260px; max-width: 380px; white-space: normal; overflow-wrap: anywhere; }
.aeo-gaps__when { white-space: nowrap; }
.aeo-tracking-note { margin: 0 0 16px; }

@media (max-width: 900px) {
  .aeo-tile__grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  .aeo-tile__grid, .aeo-tile__grid--4 { grid-template-columns: minmax(0, 1fr); }
}

/* ═══════════════════════════════════════════════════════════════════════════
   1.49.0 (Nov 2026): AI assistants setup (GEO Phase 3 PR 2): the /geo pages,
   the question editor and the businesses list. Layout only; colours and
   fields come from the shared rules above.
   ═══════════════════════════════════════════════════════════════════════════ */
.geo-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.geo-checklist { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.geo-checklist li { display: flex; gap: 10px; align-items: baseline; color: var(--text-muted); }
.geo-checklist li.is-done { color: var(--text); }
.geo-checklist__mark { width: 16px; flex-shrink: 0; text-align: center; font-weight: 700; }
.geo-checklist li.is-done .geo-checklist__mark { color: var(--c-green-ink); }
.geo-prompt-table__text { min-width: 280px; white-space: normal; overflow-wrap: anywhere; }
.geo-issues { margin: 6px 0 0; padding-left: 18px; }
.geo-subtitle { font-size: 0.93rem; font-weight: 650; margin: 18px 0 10px; color: var(--text); }
.geo-rows { margin: 0; padding-left: 22px; display: grid; gap: 4px; }
.geo-rows--new { padding-left: 22px; }
.geo-row { margin-bottom: 8px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; align-items: center; }
.geo-row__controls { display: flex; gap: 10px; align-items: center; width: 340px; }
/* One line on a wide screen; the question wraps instead of scrolling sideways on a phone. */
.field textarea.geo-row__text { min-height: 40px; resize: vertical; field-sizing: content; }
.field .geo-row__controls select { flex: 1; width: auto; min-width: 0; }
.field label.geo-row__remove { display: inline-flex; align-items: center; margin: 0; white-space: nowrap; font-weight: 500; }
.field .geo-row__meta { grid-column: 1 / -1; margin: 0; font-size: 0.8rem; overflow-wrap: anywhere; }
.geo-draft-actions { display: flex; gap: 10px 20px; flex-wrap: wrap; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); margin-top: 20px; }
.geo-suggestions { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.geo-suggestion { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 10px; padding: 8px 4px; border-radius: var(--r-sm); cursor: pointer; }
.geo-suggestion:hover { background: var(--tint-hover); }
.geo-suggestion input { margin-top: 3px; }
.geo-suggestion__text { overflow-wrap: anywhere; }
.geo-suggestion__meta { grid-column: 2; margin: 0; font-size: 0.8rem; overflow-wrap: anywhere; }
.geo-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; margin: 0 0 12px; }
.geo-facts dt { color: var(--text-muted); font-size: 0.87rem; }
.geo-facts dd { margin: 0; overflow-wrap: anywhere; }
.geo-brand-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.geo-brand-list > li { display: flex; gap: 10px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.geo-brand-list > li.geo-brand { display: grid; gap: 4px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.geo-brand__head { display: flex; gap: 4px 10px; flex-wrap: wrap; align-items: baseline; }
.geo-brand__edit { margin-top: 4px; }
.geo-brand__edit form { margin-top: 10px; }
.geo-brand-grid { margin-bottom: var(--gap); }
.geo-manual-form { max-width: 640px; }

@media (max-width: 768px) {
  .geo-row { grid-template-columns: minmax(0, 1fr); }
  .geo-row__controls { width: auto; }
  .geo-rows, .geo-rows--new { padding-left: 0; list-style: none; }
  .geo-hide-narrow { display: none; }
  .geo-prompt-table__text { min-width: 200px; }
}

/* GEO figures (1.51.0): a rate bar (<progress>, no inline width), the answer text */
.geo-bar { width: 120px; height: 8px; vertical-align: middle; accent-color: var(--accent); }
.geo-bar__range { margin-left: 6px; font-size: 0.85rem; white-space: nowrap; }
.geo-answer-text { white-space: pre-wrap; overflow-wrap: anywhere; font-family: inherit; font-size: 0.93rem; margin: 0; max-height: 640px; overflow: auto; }
.geo-url { overflow-wrap: anywhere; }
@media (max-width: 640px) { .geo-bar { width: 80px; } }

/* ═══════════════════════════════════════════════════════════════════════════
   Batch 1.74 (Nov 2026): website preview outreach (prospects/previews.html
   and prospects/preview_detail.html). No inline styles; superuser-only pages.
   ═══════════════════════════════════════════════════════════════════════════ */
input.preview-check, .field input.preview-check { width: auto; margin-right: 6px; }
.preview-shot { max-width: 100%; height: auto; border: 1px solid var(--line); vertical-align: top; }
.preview-thumb { display: block; max-width: 120px; height: auto; border: 1px solid var(--line); border-radius: 4px; }
.preview-frame { width: 100%; height: 600px; border: 1px solid var(--line); background: var(--surface-white); }
.preview-hours-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 8px; align-items: end; }
.preview-hours-row__label { grid-column: 1 / -1; }
textarea.preview-sent-text { width: 100%; }
.preview-sent-pre { white-space: pre-wrap; max-width: 28rem; font: inherit; }
.preview-col-status { min-width: 8rem; }
.preview-col-follow { min-width: 11rem; }
