:root {
  --bg: #0b0b0c;
  --fg: #e6e6e6;
  --muted: #9aa0a6;
  --card: #141416;
  --panel: #111317;
  --border: #26272b;
  --accent: #6aa3ff;
  --ok: #2a9d7a;
  --danger: #c45c5c;
  --warn: #c9a227;
  --up: #5cbaa4;
  --down: #d6666a;
  --sidebar-w: 220px;
  --chart-tooltip-bg: #141416;
  --chart-tooltip-fg: #e6e6e6;
  --chart-tooltip-border: rgba(255, 255, 255, 0.12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font: 14px/1.45 system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--fg);
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(11, 11, 12, 0.9);
  backdrop-filter: blur(8px);
}
.topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.topbar-status {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.brand-link { display: flex; align-items: center; gap: 10px; }
.brand-link img { height: 24px; width: auto; display: block; }
.brand-tool {
  display: inline-flex;
  align-items: center;
  height: 24px;
  font-size: 15px;
  font-weight: 550;
  line-height: 1;
  color: var(--muted);
  letter-spacing: 0.01em;
  border-left: 1px solid var(--border);
  padding-left: 10px;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--fg);
  cursor: pointer;
}
.nav-toggle svg { width: 16px; height: 16px; fill: currentColor; }

.shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: calc(100vh - 57px);
}

.sidebar {
  border-right: 1px solid var(--border);
  background: #0e0e10;
  padding: 18px 12px;
  position: sticky;
  top: 57px;
  height: calc(100vh - 57px);
  overflow: auto;
}

.sidebar .nav-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 0 10px 10px;
}

.sidebar a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  color: #cbd5e1;
  margin-bottom: 4px;
  border: 1px solid transparent;
}
.sidebar a:hover { background: rgba(255, 255, 255, 0.03); }
.sidebar a.active {
  background: rgba(106, 163, 255, 0.1);
  border-color: rgba(106, 163, 255, 0.25);
  color: #e8f0ff;
}
.sidebar a .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3a3b40;
}
.sidebar a.active .dot { background: var(--accent); }

.content {
  padding: 18px 20px 48px;
  max-width: 1200px;
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.page-head h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 650;
  letter-spacing: 0.01em;
}
.page-head .subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--fg);
  cursor: pointer;
  font-size: 13px;
}
.btn:hover { border-color: #3a3b40; background: #16181b; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn.primary { border-color: rgba(106, 163, 255, 0.35); background: rgba(106, 163, 255, 0.12); }
.btn svg { width: 14px; height: 14px; fill: currentColor; }

.select, .date-input {
  height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--fg);
  font-size: 13px;
}
.date-input {
  color-scheme: dark;
  padding-right: 8px;
}
/* Replace native black calendar glyph with an explicit light icon. */
.date-input::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 1;
  width: 16px;
  height: 16px;
  margin: 0;
  padding: 0;
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 16px 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e6e6e6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M16 3v4M8 3v4M3 11h18'/%3E%3C/svg%3E");
  /* Hide the browser's own bitmap so only our SVG shows. */
  color: transparent;
  filter: none !important;
  -webkit-appearance: none;
  appearance: none;
}

.meta-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 14px;
}
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  height: auto;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #111317;
  color: #cbd5e1;
  font-size: 12px;
  line-height: 1.25;
  box-sizing: border-box;
}
.pill.warn { border-color: rgba(201, 162, 39, 0.4); color: #e8d48b; }
.pill.err { border-color: rgba(196, 92, 92, 0.4); color: #f0b4b4; }
.pill.ok { border-color: rgba(42, 157, 122, 0.4); color: #9fd9c4; }

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 22px;
  padding: 0 10px 0 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #111317;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: default;
  white-space: nowrap;
}
.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6b7078;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.04);
}
.live-live {
  border-color: rgba(42, 157, 122, 0.4);
  color: #9fd9c4;
}
.live-live .live-dot {
  background: #2a9d7a;
  box-shadow: 0 0 8px rgba(42, 157, 122, 0.55);
}
.live-degraded {
  border-color: rgba(201, 162, 39, 0.45);
  color: #e8d48b;
}
.live-degraded .live-dot {
  background: #c9a227;
  box-shadow: 0 0 8px rgba(201, 162, 39, 0.45);
}
.live-error {
  border-color: rgba(196, 92, 92, 0.45);
  color: #f0b4b4;
}
.live-error .live-dot {
  background: #c45c5c;
  box-shadow: 0 0 8px rgba(196, 92, 92, 0.45);
}
.live-unknown { color: #9aa3b2; }
.live-unknown .live-dot { background: #6b7078; }

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 1100px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .metric-grid { grid-template-columns: 1fr; }
}

.metric-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 14px 12px;
  min-height: 118px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.metric-card .label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.metric-card .value {
  font-size: 28px;
  font-weight: 650;
  letter-spacing: 0.02em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  line-height: 1.1;
}
.metric-card .comps {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
  color: var(--muted);
  margin-top: auto;
}
.metric-card .comps .delta.up { color: var(--up); }
.metric-card .comps .delta.down { color: var(--down); }
.metric-card .comps .delta.flat { color: var(--muted); }
.metric-card.unavailable .value { color: var(--muted); font-size: 18px; font-weight: 500; }
.source-tip {
  font-size: 11px;
  color: #7a8088;
  border-bottom: 1px dotted #4a4e55;
  cursor: help;
}

.product-group { margin-bottom: 16px; }
.product-group:last-of-type { margin-bottom: 0; }
.product-group-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 8px;
}
.product-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 1100px) {
  .product-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .product-card-grid { grid-template-columns: 1fr; }
}
.product-card {
  display: flex;
  gap: 12px;
  align-items: stretch;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  min-height: 88px;
}
.product-thumb {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
  background: #1a1b1f;
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.product-thumb.placeholder {
  background:
    linear-gradient(135deg, rgba(106, 163, 255, 0.12), transparent 55%),
    #1a1b1f;
}
.product-card-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.product-card-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
}
.product-stats {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  margin-top: auto;
}
.product-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.product-stat-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.product-stat-value {
  font-size: 18px;
  font-weight: 650;
  letter-spacing: 0.01em;
  line-height: 1.1;
}
.product-stat.primary .product-stat-value {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--fg);
}
.product-stat.secondary .product-stat-label {
  color: #6b7078;
}
.product-stat.secondary .product-stat-value {
  font-size: 14px;
  font-weight: 550;
  color: var(--muted);
}

.module {
  margin-top: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.module > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.module-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.hourly-compare {
  gap: 14px;
}
.module > header.orders-today-header {
  align-items: flex-start;
}
.orders-tip {
  padding: 8px 10px;
  min-width: 160px;
  font-size: 12px;
  line-height: 1.35;
  color: #e8edf5;
}
.orders-tip-hour {
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 6px;
}
.orders-tip-incomplete {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #9eb6d8;
}
.orders-tip-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 3px;
}
.orders-tip-row span { color: #9aa3b2; }
.orders-tip-row strong { font-weight: 650; color: #f1f5f9; }
.orders-tip-row.muted span,
.orders-tip-row.muted strong { color: #8b93a1; font-weight: 500; }
.orders-tip-posts {
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: grid;
  gap: 4px;
}
.orders-tip-post {
  display: flex;
  gap: 8px;
  align-items: baseline;
  justify-content: space-between;
  font-size: 11px;
  color: #c5cad3;
}
.orders-tip-post-main {
  display: flex;
  gap: 6px;
  align-items: baseline;
  min-width: 0;
}
.orders-tip-post-plat {
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.04em;
  min-width: 1.6em;
}
.orders-tip-post-link {
  flex-shrink: 0;
  font-size: 11px;
  color: var(--accent);
  text-decoration: none;
}
.orders-tip-post-link:hover { text-decoration: underline; }
.orders-tip-post-link.muted {
  color: #6b7078;
  cursor: default;
}
.orders-tip-hint {
  margin-top: 6px;
  font-size: 10px;
  color: #8b93a1;
}
.apexcharts-tooltip.orders-tip-wrap,
.apexcharts-tooltip.apexcharts-active {
  pointer-events: none !important;
}
.orders-publish-panel {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
}
.orders-publish-panel-head {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin-bottom: 8px;
}
.orders-publish-panel-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 3px 0;
  font-size: 12px;
  color: #d7dde8;
}
.orders-publish-panel-main {
  display: flex;
  gap: 7px;
  align-items: baseline;
  min-width: 0;
}
.orders-publish-panel-plat {
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.04em;
  min-width: 1.6em;
}
.orders-publish-panel-link {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--accent);
  text-decoration: none;
}
.orders-publish-panel-link:hover { text-decoration: underline; }
.orders-publish-panel-link.muted {
  color: #6b7078;
  cursor: default;
}
.orders-publish-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin-top: 10px;
}
.orders-publish-legend-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin-right: 2px;
}
a.orders-publish-chip {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
a.orders-publish-chip:hover {
  border-color: color-mix(in srgb, var(--pub) 70%, transparent);
  background: color-mix(in srgb, var(--pub) 22%, transparent);
}
.orders-publish-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px 3px 6px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--pub) 45%, transparent);
  background: color-mix(in srgb, var(--pub) 14%, transparent);
  font-size: 11px;
  color: #d7dde8;
  line-height: 1;
}
.orders-publish-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--pub);
  flex-shrink: 0;
}
.orders-publish-code {
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--pub);
}
.orders-publish-time {
  color: #b7bfcb;
}

.check-opt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}
.check-opt input {
  width: 14px;
  height: 14px;
  accent-color: var(--accent);
  cursor: pointer;
}
.check-opt:hover { color: var(--fg); }

.acq-summary {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
}
.acq-summary-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.acq-summary-value {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.acq-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 1100px) {
  .acq-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .acq-card-grid { grid-template-columns: 1fr; }
}

.acq-card {
  display: flex;
  gap: 14px;
  align-items: stretch;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  min-height: 112px;
}
.acq-icon {
  width: 88px;
  min-height: 88px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  align-self: stretch;
  border: 1px solid var(--border);
}
.acq-icon svg { width: 48px; height: 48px; display: block; }
.acq-icon-meta svg { width: 52px; height: 52px; }
.acq-icon-meta { color: #8ab4ff; background: rgba(24, 119, 242, 0.16); }
.acq-icon-google { color: #9fd0a8; background: rgba(66, 133, 244, 0.12); }
.acq-icon-tiktok { color: #e8e8e8; background: rgba(255, 255, 255, 0.07); }
.acq-icon-klaviyo { color: #c9a0ff; background: rgba(150, 90, 255, 0.14); }
.acq-icon-organic { color: #7dcea0; background: rgba(46, 160, 110, 0.14); }
.acq-icon-direct { color: #b0bac8; background: rgba(154, 167, 184, 0.16); }
.acq-icon-snap { color: #f5e36c; background: rgba(255, 252, 0, 0.09); }
.acq-icon-other { color: #c5cad3; background: rgba(255, 255, 255, 0.08); }

.acq-card-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}
.acq-card-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.acq-card-sales {
  font-size: 40px;
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-top: 6px;
}
.acq-roas {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 4px;
}
.acq-roas-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6b7078;
}
.acq-roas-value {
  font-size: 13px;
  font-weight: 550;
  color: var(--muted);
}
.module > header h2 {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  font-weight: 600;
}
.module .body { padding: 14px; }

.placeholder-panel {
  border: 1px dashed var(--border);
  border-radius: 10px;
  background: var(--panel);
  padding: 28px 20px;
  text-align: left;
}
.placeholder-panel h3 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 600;
}
.placeholder-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  max-width: 52ch;
  line-height: 1.5;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
}
table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
th, td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}
thead th {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  background: #0f1012;
  position: sticky;
  top: 0;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: rgba(255, 255, 255, 0.02); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.group-row td {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(255, 255, 255, 0.015);
  padding-top: 12px;
}

.chart-mount { min-height: 280px; }
.chart-mount .apexcharts-canvas,
.chart-mount .apexcharts-svg,
.chart-mount .apexcharts-inner,
.chart-mount .apexcharts-graphical { background: transparent !important; }
.chart-mount .apexcharts-tooltip,
.chart-mount .apexcharts-tooltip.apexcharts-theme-light,
.chart-mount .apexcharts-tooltip.apexcharts-theme-dark {
  background: var(--chart-tooltip-bg) !important;
  border: 1px solid var(--chart-tooltip-border) !important;
  color: var(--chart-tooltip-fg) !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45) !important;
}

.skeleton {
  background: linear-gradient(90deg, #16181b 0%, #1c1f24 50%, #16181b 100%);
  background-size: 200% 100%;
  animation: shimmer 1.2s ease-in-out infinite;
  border-radius: 8px;
  min-height: 18px;
}
@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.note { color: var(--muted); font-size: 12px; line-height: 1.4; }
.err { color: var(--danger); }
.ok { color: var(--ok); }

/* Content Driving Today */
.module > header.content-driving-header {
  align-items: center;
  gap: 10px;
}
.content-driving-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
  flex: 1;
}
.module-sub {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
}
.content-partial {
  margin: 0 0 10px;
  color: #e8d48b;
}
.content-platform-mount {
  margin-bottom: 0;
}
.content-platform-divider {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 14px 0 16px;
}
.platform-summary-head {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 4px 10px 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(106, 163, 255, 0.28);
  background: linear-gradient(90deg, rgba(106, 163, 255, 0.16), rgba(106, 163, 255, 0.08));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  line-height: 1;
}
.platform-summary-head-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #9eb6d8;
  line-height: 1;
}
.platform-summary-head-value {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #d7e8ff;
  line-height: 1;
}
.platform-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 1100px) {
  .platform-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .platform-summary-grid { grid-template-columns: 1fr; }
}
.platform-summary-card {
  display: flex;
  gap: 14px;
  align-items: stretch;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  min-height: 96px;
}
.platform-summary-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  flex: 1;
}
.platform-summary-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.platform-summary-views {
  font-size: 32px;
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1;
}
.platform-summary-skel {
  height: 148px;
  border-radius: 12px;
  margin-bottom: 0;
}
.content-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 1100px) {
  .content-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .content-card-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
}
.content-skel {
  aspect-ratio: 9 / 16;
  min-height: 220px;
  border-radius: 12px;
}
.content-card {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  min-width: 0;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.content-card:hover,
.content-card:focus-visible {
  border-color: #3a3f48;
  outline: none;
}
.content-thumb {
  position: relative;
  aspect-ratio: 9 / 16;
  background: #1a1b1f;
  overflow: hidden;
}
.content-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.content-thumb-ph {
  width: 100%;
  height: 100%;
  background:
    linear-gradient(145deg, #1c1f24 0%, #14161a 55%, #1a1d22 100%);
}
.platform-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  width: 60px;
  height: 60px;
  padding: 0;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
/* Must follow .platform-badge so position:static wins over absolute. */
.platform-badge--inline {
  position: static;
  top: auto;
  left: auto;
  z-index: auto;
  flex-shrink: 0;
  align-self: stretch;
  width: 72px;
  min-width: 72px;
  min-height: 72px;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}
.platform-badge svg {
  width: 32px;
  height: 32px;
  display: block;
  flex-shrink: 0;
}
.platform-tiktok {
  background: #000000;
  border-color: rgba(255, 255, 255, 0.2);
}
.platform-facebook {
  background: #1877F2;
  border-color: rgba(255, 255, 255, 0.2);
}
.platform-facebook svg {
  width: 34px;
  height: 34px;
}
.platform-instagram {
  background: radial-gradient(circle at 30% 110%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
  border-color: rgba(255, 255, 255, 0.25);
}
.platform-youtube {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.12);
}
.platform-youtube svg {
  width: 44px;
  height: 44px;
}

.content-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  padding: 14px 12px;
  background: linear-gradient(180deg, rgba(8, 9, 11, 0.2) 0%, rgba(8, 9, 11, 0.92) 45%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}
.content-card:hover .content-overlay,
.content-card:focus-visible .content-overlay {
  opacity: 1;
}
@media (hover: none) {
  .content-overlay { display: none; }
}
.content-overlay-caption {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  max-height: 5.4em;
  overflow: hidden;
}
.content-overlay-meta {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
}
.content-spark,
.content-spark-spacer {
  margin-top: auto;
  min-height: 0;
}
.content-spark {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 9px 7px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background: rgba(8, 10, 14, 0.45);
}
.content-spark-spacer {
  flex: 1 1 auto;
}
.content-spark-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.62);
}
.content-spark-head .mono {
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
  color: #9fd0ff;
  font-weight: 650;
}
.content-spark-svg {
  width: 100%;
  height: 48px;
  display: block;
  overflow: visible;
}
.content-spark-area {
  fill: rgba(96, 165, 250, 0.22);
}
.content-spark-line {
  stroke: #7eb6ff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.content-spark-dot {
  fill: #cfe6ff;
  stroke: #7eb6ff;
  stroke-width: 1.25;
}
.content-overlay-stats {
  display: grid;
  gap: 4px;
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}
.content-overlay-stats div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.content-overlay-stats strong { color: var(--fg); font-weight: 600; }
.content-overlay-cta {
  display: inline-flex;
  align-self: flex-start;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
}

.content-card-body {
  padding: 10px 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 0;
}
.content-caption {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.content-age {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}
.content-views {
  margin-top: 4px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--fg);
}
.content-eng {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.2;
}
.content-eng .eng-stat {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.content-eng .eng-ico {
  font-size: 13px;
  line-height: 1;
  opacity: 0.92;
}
.content-eng .eng-num {
  font-size: 12px;
  font-weight: 600;
  color: var(--fg);
}
.placeholder-panel .btn { margin-top: 10px; }

.pulse-bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 860px) {
  .pulse-bottom-grid { grid-template-columns: 1fr; }
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1500;
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .shell { grid-template-columns: 1fr; }
  #updatedPill { display: none; }
  .sidebar {
    position: fixed;
    left: 0;
    top: 57px;
    bottom: 0;
    width: min(280px, 86vw);
    z-index: 1600;
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    height: auto;
  }
  body.nav-open .sidebar { transform: translateX(0); }
  body.nav-open .sidebar-backdrop { display: block; }
  .content { padding: 16px 14px 40px; }
  .module > header {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .module-header-actions .pill {
    max-width: min(100%, 220px);
    white-space: normal;
    text-align: left;
  }
  /* Mobile: Updated first, then views (title stays on its own row). */
  .content-driving-header {
    flex-wrap: wrap;
  }
  .content-driving-title-row {
    display: contents;
  }
  .content-driving-header h2 {
    order: 1;
    flex: 1 0 100%;
  }
  .content-driving-header .module-header-actions {
    order: 2;
  }
  .content-driving-header .platform-summary-head {
    order: 3;
  }
}
