* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  background: #f6f7f8;
  color: #1a1a1a;
}

.app {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 240px;
  flex-shrink: 0;
  background: #1a1d23;
  color: #d6d9de;
  padding: 20px 0;
  overflow-y: auto;
}

.sidebar .brand {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  padding: 0 20px 20px;
  border-bottom: 1px solid #2c3038;
  margin-bottom: 12px;
}

.sidebar .nav-item {
  display: block;
  padding: 8px 20px;
  cursor: pointer;
  font-size: 13px;
  color: #b8bcc4;
  text-decoration: none;
}

.sidebar .nav-item:hover {
  background: #262a32;
  color: #fff;
}

.sidebar .nav-item.active {
  background: #2f6fed;
  color: #fff;
}

.sidebar .category-label {
  padding: 14px 20px 4px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6b7280;
  font-weight: 600;
}

.sidebar .category-label.sub {
  padding-left: 28px;
  color: #4b5563;
  font-size: 10px;
}

.sidebar .dashboard-link {
  font-weight: 600;
  color: #fff;
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 7px;
}
.status-dot.working { background: #22c55e; }
.status-dot.building { background: #f59e0b; }
.status-dot.planned { background: #6b7280; }

/* Main content */
.main {
  flex: 1;
  padding: 32px 40px;
  max-width: 900px;
}

h1 { font-size: 22px; margin: 0 0 6px; }
h2 { font-size: 17px; margin: 0 0 4px; }
.subtitle { color: #6b7280; margin: 0 0 28px; font-size: 14px; }

/* Dashboard */
.category-block { margin-bottom: 26px; }
.category-title { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: #6b7280; margin-bottom: 10px; font-weight: 600; }

.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }

.tool-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 14px 16px;
  cursor: pointer;
}
.tool-card:hover { border-color: #2f6fed; }
.tool-card .tool-name { font-weight: 600; font-size: 14px; margin-bottom: 6px; }

.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.badge.working { background: #dcfce7; color: #15803d; }
.badge.building { background: #fef3c7; color: #b45309; }
.badge.planned { background: #e5e7eb; color: #4b5563; }

/* Form */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; }
.field .hint { font-size: 12px; color: #6b7280; font-weight: 400; }
.field input[type="text"],
.field textarea,
.field select {
  width: 100%;
  padding: 9px 11px;
  font-size: 14px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-family: inherit;
  background: #fff;
}
.field textarea { min-height: 64px; resize: vertical; }

.radio-group { display: flex; gap: 16px; }
.radio-group label { font-weight: 400; display: flex; align-items: center; gap: 6px; }

.btn {
  background: #2f6fed;
  color: #fff;
  border: none;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
}
.btn:hover { background: #2559c7; }
.btn:disabled { background: #9ca3af; cursor: default; }
.btn-small { padding: 5px 10px; font-size: 11px; margin-left: 6px; }
.btn-secondary { background: #fff; color: #2f6fed; border: 1px solid #bfdbfe; }
.btn-secondary:hover { background: #eff6ff; }
.btn-danger { background: #fff; color: #b91c1c; border: 1px solid #fecaca; }
.btn-danger:hover { background: #fef2f2; }
.btn-link { display: inline-block; text-decoration: none; }

.form-card, .results-card, .placeholder-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 20px;
}

.results-note { font-size: 12px; color: #6b7280; margin-bottom: 16px; }
.result-section { margin-bottom: 22px; }
.result-section h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; color: #6b7280; margin-bottom: 10px; }
.result-item { padding: 10px 12px; background: #f9fafb; border-radius: 6px; margin-bottom: 8px; font-size: 14px; line-height: 1.5; }
.result-item .meta { font-size: 11px; color: #6b7280; margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.04em; }
.result-item .u-score { font-weight: 700; margin-right: 8px; }

.error-box { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; padding: 12px 16px; border-radius: 6px; margin-bottom: 16px; font-size: 14px; }
.loading { color: #6b7280; font-size: 14px; }

/* Project view tabs */
.tab-row {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.tab {
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.tab:hover { color: #1a1a1a; }
.tab.active { color: #2f6fed; border-bottom-color: #2f6fed; }

/* Production workflow */
.production-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}
.production-intro h2 { margin-bottom: 5px; }
.production-intro p { margin: 0; color: #6b7280; font-size: 13px; }
.production-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  padding: 0 9px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 700;
}
.production-empty { text-align: left; }
.production-empty h2 { margin-bottom: 8px; }
.production-empty p { margin: 0 0 16px; color: #6b7280; font-size: 13px; line-height: 1.5; }
.production-list { display: grid; gap: 20px; }
.production-card {
  background: #fff;
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  padding: 24px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.production-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5e7eb;
}
.production-card-header h2 { margin: 3px 0 5px; font-size: 19px; }
.production-card-header p { margin: 0; color: #4b5563; font-size: 13px; }
.production-card-header p span { color: #9ca3af; padding: 0 3px; }
.production-kicker {
  color: #2f6fed;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.production-status-label {
  color: #6b7280;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.production-status-label select {
  display: block;
  min-width: 160px;
  margin-top: 5px;
  padding: 8px 28px 8px 10px;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  background: #eff6ff;
  color: #1d4ed8;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
}
.production-source-metrics {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  padding: 16px 0 6px;
}
.production-metric span {
  display: block;
  margin-bottom: 2px;
  color: #6b7280;
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.production-metric strong { font-size: 16px; }
.production-source-note { margin: 3px 0 20px; color: #9ca3af; font-size: 11px; }
.production-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 16px;
}
.production-form .field label .hint {
  display: block;
  margin-top: 2px;
  line-height: 1.4;
}
.production-form textarea { min-height: 92px; line-height: 1.45; }
.production-form .learning-field textarea { min-height: 78px; }
.production-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.production-save-state { color: #15803d; font-size: 12px; font-weight: 600; }
.production-next-step {
  margin-top: 20px;
  padding: 12px 14px;
  border-radius: 7px;
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
  line-height: 1.5;
}
.production-next-step strong { color: #334155; }
.production-browser-note { color: #6b7280; font-size: 12px; line-height: 1.5; }
.learning-list { display: grid; gap: 12px; margin-bottom: 16px; }
.learning-card {
  padding: 20px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-left: 4px solid #2f6fed;
  border-radius: 8px;
}
.learning-text { margin: 0 0 14px; font-size: 15px; font-weight: 600; line-height: 1.5; }
.learning-source { display: flex; flex-wrap: wrap; gap: 6px 12px; color: #6b7280; font-size: 11px; }
.learning-source strong { color: #374151; }

.library-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.library-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.library-card-error { border-color: #dc2626; border-width: 2px; }
.library-card-img { width: 100%; height: 160px; object-fit: cover; object-position: top; background: #f3f4f6; display: block; }
.library-card-img-empty { display: flex; align-items: center; justify-content: center; color: #9ca3af; font-size: 12px; height: 160px; }
.library-card-body { padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.library-card-header { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 13px; }
.library-status { font-size: 11px; color: #b45309; text-align: right; }
.library-card-error .library-status { color: #dc2626; font-weight: 600; }
.library-headline { font-weight: 600; font-size: 14px; margin: 0; }
.library-copy { font-size: 12px; color: #4b5563; margin: 0; line-height: 1.5; }
.library-angle { font-size: 12px; color: #374151; margin: 0; }
.library-notes { font-size: 12px; color: #6b7280; margin: 0; background: #f8fafc; padding: 8px; border-radius: 6px; line-height: 1.5; }
.library-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.library-tag { font-size: 10px; background: #eef2ff; color: #3730a3; padding: 2px 8px; border-radius: 10px; }
.library-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 11px; color: #6b7280; margin-top: auto; padding-top: 8px; border-top: 1px solid #f3f4f6; }
.library-video-link { display: block; padding: 8px 14px; background: #111827; color: #fff; font-size: 12px; text-decoration: none; text-align: center; }
.library-video-link:hover { background: #1f2937; }
.library-actions { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 4px; }

@media (max-width: 760px) {
  .production-card-header { flex-direction: column; }
  .production-fields { grid-template-columns: 1fr; }
  .production-status-label, .production-status-label select { width: 100%; }
}

/* ---------- Taboola workspace (static/taboola.js) ---------- */
/* Flex children default to min-width:auto, so a wide table pushed the whole page sideways
   instead of scrolling inside its .tb-scroll wrapper. */
.main { min-width: 0; }
.tb-intro { margin-bottom: 16px; }
.tb-intro h2 { margin-bottom: 5px; }
.tb-intro p { margin: 0; color: #6b7280; font-size: 13px; line-height: 1.5; }
.tb-chart-title .hint, .tb-table th .hint { text-transform: none; letter-spacing: 0; font-weight: 400; }
.tb-rangebar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: -8px 0 18px; }
.tb-rangebar .btn-small { margin-left: 0; }
.tb-range-custom { display: inline-flex; align-items: center; gap: 6px; margin-left: 10px; font-size: 13px; }
.tb-range-custom input[type="date"] { padding: 4px 6px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 12px; }
.tb-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 18px; }
.tb-kpi { background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; padding: 12px 14px; }
.tb-kpi-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: #6b7280; }
.tb-kpi-value { font-size: 20px; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; }
.tb-kpi-sub { font-size: 12px; color: #6b7280; margin-top: 2px; }
.tb-good { color: #15803d; }
.tb-warn { color: #b45309; }
.tb-bad { color: #b91c1c; }
.tb-muted { color: #6b7280; }
.tb-callout { border-left: 4px solid #2f6fed; margin-bottom: 16px; font-size: 13px; }
.tb-scroll { overflow-x: auto; }
.tb-table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.tb-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: #6b7280; padding: 8px; border-bottom: 1px solid #e5e7eb; white-space: nowrap; }
.tb-table td { padding: 8px; border-bottom: 1px solid #f1f2f4; vertical-align: top; }
.tb-clickable { cursor: pointer; }
.tb-clickable:hover { background: #f5f8ff; }
.tb-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 12px; }
.tb-toolbar .btn-small { margin-left: 0; }
.tb-toolbar input[type="text"] { padding: 5px 8px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 12px; }
.tb-select { padding: 6px 8px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 13px; max-width: 100%; }
.tb-verdict { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: #f3f4f6; }
.tb-proposal-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.tb-reason { font-size: 13px; color: #374151; margin: 8px 0; }
.tb-applied { opacity: 0.55; }
.tb-edit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px 18px; margin-bottom: 12px; }
.tb-edit-grid .field input[type="text"] { width: calc(100% - 80px); }
.tb-edit-grid .meta { font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: #6b7280; margin-bottom: 3px; }
.tb-thumb { width: 72px; height: 48px; object-fit: cover; border-radius: 4px; background: #f3f4f6; }
.tb-pre { background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 6px; padding: 10px; font-size: 12px; overflow-x: auto; white-space: pre-wrap; }
.tb-pick { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; }
.tb-ad-row { display: grid; grid-template-columns: 2fr 2fr 2fr auto; gap: 10px; align-items: end; border-top: 1px solid #f1f2f4; padding-top: 10px; }
.tb-ad-row .field input[type="text"] { width: 100%; }
@media (max-width: 800px) { .tb-ad-row { grid-template-columns: 1fr; } }
.tb-chart-title { font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; color: #6b7280; margin: 16px 0 6px; }
.tb-chart { position: relative; }
.tb-chart svg { display: block; overflow: visible; }
.tb-grid { stroke: #eef0f3; stroke-width: 1; }
.tb-axis { font-size: 11px; fill: #6b7280; }
.tb-line { fill: none; stroke: #2f6fed; stroke-width: 2; stroke-linejoin: round; }
.tb-dot { fill: #2f6fed; stroke: #fff; stroke-width: 2; }
.tb-bar { fill: #2f6fed; }
.tb-target { stroke: #374151; stroke-width: 1.5; stroke-dasharray: 5 4; }
.tb-marker { fill: #b45309; }
.tb-cross { stroke: #9ca3af; stroke-width: 1; }
.tb-tip { display: none; position: absolute; top: 0; min-width: 150px; background: #1a1d23; color: #fff; font-size: 12px; line-height: 1.5; padding: 8px 10px; border-radius: 6px; pointer-events: none; z-index: 2; }
.tb-delta { font-size: 11px; font-weight: 600; white-space: nowrap; }
.tb-notice-inline { font-size: 12px; color: #6b7280; background: #fffbeb; border: 1px solid #fde68a; border-radius: 6px; padding: 8px 12px; margin-bottom: 14px; }
.tb-crumbs { font-size: 13px; }
.tb-ad-cell { display: flex; gap: 8px; align-items: flex-start; min-width: 260px; }
.tb-dot-partial { fill: #fff; stroke: #2f6fed; }
.tb-bar-partial { fill: #bcd0fb; }
.tb-table td .hint { font-size: 11px; }
.tb-settings-link { margin-left: auto; }
.tb-target-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; }
.tb-target-bar .field { margin-bottom: 0; }
.tb-target-bar .field input[type="text"] { width: 110px; }

/* ---------- Taboola workspace: roomy layout (v2, 2026-09-23) ----------
   The generic app is a 900px reading column; the workspace is a dashboard, so it gets
   the full width, larger type, and bigger hit targets. Scoped to .main.tb-wide so no
   other screen changes. */
.main.tb-wide { max-width: 1440px; padding: 32px 48px 64px; }
.main.tb-wide h1 { font-size: 26px; margin-bottom: 4px; }
.main.tb-wide .subtitle { font-size: 15px; margin-bottom: 20px; }
.main.tb-wide h2 { font-size: 18px; }
.main.tb-wide .tab-row { flex-wrap: nowrap; overflow-x: auto; gap: 2px; margin-bottom: 24px; scrollbar-width: thin; }
.main.tb-wide .tab { font-size: 15px; padding: 12px 16px; white-space: nowrap; }
.main.tb-wide .btn { font-size: 15px; padding: 11px 22px; border-radius: 8px; }
.main.tb-wide .btn-small { font-size: 14px; padding: 8px 14px; margin-left: 0; border-radius: 8px; }
.main.tb-wide .results-card, .main.tb-wide .form-card, .main.tb-wide .placeholder-card { padding: 24px 28px; border-radius: 12px; margin-bottom: 24px; }
.main.tb-wide .hint { font-size: 13px; }
.main.tb-wide .field label { font-size: 14px; }
.main.tb-wide .field input[type="text"], .main.tb-wide .field select, .main.tb-wide .tb-select { font-size: 15px; padding: 9px 12px; border-radius: 8px; }
.main.tb-wide .tb-table { font-size: 14px; }
.main.tb-wide .tb-table th { font-size: 12px; padding: 12px 10px; }
.main.tb-wide .tb-table td { padding: 14px 8px; }
.main.tb-wide .tb-table-lg td:first-child { min-width: 200px; max-width: 280px; font-weight: 500; }
.main.tb-wide .tb-delta { font-size: 12px; }
.main.tb-wide .tb-verdict { font-size: 13px; padding: 4px 10px; }
.main.tb-wide .tb-notice-inline { font-size: 14px; padding: 12px 16px; border-radius: 10px; }

/* Date range: segmented control + custom dates, one line */
.main.tb-wide .tb-rangebar { gap: 10px; margin: 0 0 24px; }
.main.tb-wide .tb-rangebar > .btn-small { border-radius: 0; margin: 0; border: 1px solid #d6dbe4; background: #fff; color: #374151; }
.main.tb-wide .tb-rangebar > .btn-small:not(.btn-secondary) { background: #2f6fed; border-color: #2f6fed; color: #fff; }
.main.tb-wide .tb-rangebar > .btn-small:first-child { border-radius: 8px 0 0 8px; }
.main.tb-wide .tb-rangebar > [data-tb-preset]:nth-of-type(6) { border-radius: 0 8px 8px 0; }
.main.tb-wide .tb-rangebar { gap: 0; }
.main.tb-wide .tb-range-custom { margin-left: 16px; gap: 8px; font-size: 14px; }
.main.tb-wide .tb-range-custom input[type="date"] { font-size: 14px; padding: 7px 10px; border-radius: 8px; }
.main.tb-wide .tb-settings-link { margin-left: auto; }

/* Period header + KPI cards (clickable: they pick the chart metric) */
.tb-period { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; font-size: 16px; margin-bottom: 14px; }
.tb-kpis-lg { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 24px; }
@media (max-width: 1100px) { .tb-kpis-lg { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tb-kpi-btn { text-align: left; font: inherit; color: inherit; cursor: pointer; padding: 16px 18px; border-radius: 12px; border: 1px solid #e5e7eb; background: #fff; position: relative; transition: border-color .12s, box-shadow .12s; }
.tb-kpi-btn:hover { border-color: #9db8f6; }
.tb-kpi-active { border-color: #2f6fed; box-shadow: 0 0 0 3px rgba(47, 111, 237, .12); }
.tb-kpis-lg .tb-kpi-label { font-size: 12px; font-weight: 600; }
.tb-kpis-lg .tb-kpi-value { font-size: 28px; margin-top: 6px; letter-spacing: -0.01em; }
.tb-kpis-lg .tb-kpi-sub { font-size: 13px; margin-top: 4px; min-height: 18px; }
.tb-kpi-spark { margin-top: 10px; height: 34px; }
.tb-spark { fill: none; }
.tb-spark path { stroke: #2f6fed; stroke-width: 2; fill: none; stroke-linejoin: round; stroke-linecap: round; }
.tb-spark circle { fill: #2f6fed; }
.tb-muted { color: #6b7280; }

/* Chart card */
.tb-card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.tb-card-head h2 { margin: 0; }
.tb-card-head a { font-size: 14px; font-weight: 600; color: #2f6fed; text-decoration: none; }
.tb-seg { display: inline-flex; flex-wrap: wrap; border: 1px solid #d6dbe4; border-radius: 10px; overflow: hidden; }
.tb-seg button { font: inherit; font-size: 14px; font-weight: 600; padding: 8px 14px; border: 0; border-right: 1px solid #e5e7eb; background: #fff; color: #4b5563; cursor: pointer; }
.tb-seg button:last-child { border-right: 0; }
.tb-seg button:hover { background: #f3f6fd; }
.tb-seg button.active { background: #2f6fed; color: #fff; }
.tb-legend { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 13px; color: #374151; margin: 4px 0 8px; }
.tb-legend span { display: inline-flex; align-items: center; gap: 8px; }
.tb-key { display: inline-block; width: 22px; height: 0; border-top: 3px solid #2f6fed; border-radius: 2px; }
.tb-key-prev { border-top: 2px dashed #9ca3af; }
.tb-key-target { border-top: 2px dashed #15803d; }
.tb-key-max { border-top: 2px dashed #b91c1c; }
.tb-key-partial { width: 10px; height: 10px; border: 2px solid #2f6fed; border-radius: 50%; background: #fff; }
.tb-chart-lg svg { overflow: visible; }
.tb-line-prev { fill: none; stroke: #9ca3af; stroke-width: 2; stroke-dasharray: 6 5; }
.tb-max { stroke: #b91c1c; stroke-width: 1.5; stroke-dasharray: 5 4; opacity: .7; }
.main.tb-wide .tb-target { stroke: #15803d; }
.tb-ref-label { font-weight: 600; }
.main.tb-wide .tb-axis { font-size: 12px; }
.main.tb-wide .tb-tip { font-size: 13px; min-width: 190px; padding: 10px 12px; border-radius: 8px; }
.tb-tip-prev { color: #cbd5e1; }

/* Trend + scale cards */
.tb-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.tb-grid-2 > .results-card { margin-bottom: 24px; }
@media (max-width: 1000px) { .tb-grid-2 { grid-template-columns: 1fr; } }
.tb-trend-row { display: flex; align-items: center; gap: 24px; margin: 6px 0 14px; }
.tb-big { font-size: 28px; font-weight: 700; margin: 4px 0 2px; }
.tb-arrow { font-size: 26px; color: #9ca3af; }
.tb-trend { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.tb-trend-up { background: #dcfce7; color: #166534; }
.tb-trend-down { background: #fee2e2; color: #991b1b; }
.tb-trend-flat { background: #f1f5f9; color: #334155; }
.tb-trend-none { background: #f8fafc; color: #94a3b8; }
.tb-trend-cell { white-space: nowrap; }
.tb-trend-cell .tb-spark { vertical-align: middle; margin-left: 8px; }
.tb-cta { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 24px; margin-bottom: 24px; background: #eef4ff; border: 1px solid #c7d7fb; border-radius: 12px; color: #1e3a8a; text-decoration: none; font-size: 15px; }
.tb-cta span { font-weight: 700; }
.tb-cta:hover { background: #e3ecff; }
.main.tb-wide .tb-rangebar > .tb-settings-link { border-radius: 8px; margin-left: auto; }
.tb-capped { fill: #b91c1c; }
.tb-max-label { fill: #b91c1c; }
.tb-target-label { fill: #15803d; }
.tb-trend-cell .tb-spark { margin: 6px 0 0; }
.main.tb-wide .tb-trend-cell .tb-spark { margin-left: 0; }

/* Best-practice checks, strategy badges, playbook, launch guidance */
.tb-strat { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .02em; padding: 2px 8px; border-radius: 6px; background: #eef2f7; color: #475569; vertical-align: middle; margin-left: 4px; }
.tb-strat-tcpa { background: #fef3c7; color: #92400e; }
.tb-checks { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 10px; }
.tb-checks-compact { gap: 4px; margin-top: 4px; }
.tb-check { border-left: 3px solid #93c5fd; background: #f8fafc; border-radius: 6px; padding: 10px 12px; }
.tb-checks-compact .tb-check { padding: 4px 10px; background: transparent; }
.tb-check-warn { border-left-color: #f59e0b; }
.tb-check-title { font-weight: 600; font-size: 14px; }
.tb-check-detail { font-size: 13px; color: #374151; margin-top: 4px; line-height: 1.5; }
.tb-check-row { padding: 12px 0; border-top: 1px solid #f1f2f4; }
.tb-check-row-name { font-weight: 600; font-size: 14px; }
.tb-playbook { max-width: 900px; line-height: 1.6; font-size: 15px; }
.tb-playbook h2 { margin-top: 28px; }
.tb-playbook h3 { margin-top: 22px; font-size: 16px; }
.tb-playbook li { margin-bottom: 6px; }
.tb-playbook a { word-break: break-all; }
.tb-launch-guide { background: #f8fafc; border: 1px solid #e5e7eb; border-radius: 10px; padding: 4px 16px; margin: 4px 0 18px; font-size: 14px; color: #334155; }
.tb-launch-guide p { margin: 10px 0; }
.tb-strategy-seg { margin-top: 6px; }

/* Taboola reference: background, never front and center */
.tb-ref { font-size: 12px; font-weight: 500; color: #94a3b8; margin-left: 6px; }
.tb-ref-card { background: #fbfcfd; }
.tb-ref-panel > summary { cursor: pointer; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; font-size: 14px; }
.tb-ref-panel > summary::before { content: "▸"; color: #94a3b8; }
.tb-ref-panel[open] > summary::before { content: "▾"; }
.tb-ref-title { font-weight: 700; color: #475569; }
.tb-check, .tb-check-warn { border-left-color: #cbd5e1; }
.tb-launch-guide { background: transparent; border: 0; padding: 0; color: #64748b; }
.tb-launch-guide summary { cursor: pointer; font-size: 13px; font-weight: 600; color: #64748b; }

/* Market + Studio */
.tb-market-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.tb-market-card { position: relative; display: block; border: 1px solid #e5e7eb; border-radius: 12px; overflow: hidden; background: #fff; cursor: pointer; transition: border-color .12s, box-shadow .12s; }
.tb-market-card:hover { border-color: #9db8f6; }
.tb-market-card.tb-selected { border-color: #2f6fed; box-shadow: 0 0 0 3px rgba(47,111,237,.15); }
.tb-market-card input[type="checkbox"] { position: absolute; top: 10px; left: 10px; width: 18px; height: 18px; z-index: 1; }
.tb-market-img { aspect-ratio: 16 / 9; background: #f1f5f9; }
.tb-market-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tb-market-body { padding: 12px 14px; }
.tb-market-title { font-weight: 600; font-size: 14px; line-height: 1.35; margin-bottom: 4px; }
.tb-market-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; font-size: 13px; }
.tb-ref-strip { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 14px; }
.tb-ref-chip { flex: 0 0 180px; border: 1px solid #e5e7eb; border-radius: 10px; overflow: hidden; font-size: 12px; background: #fff; }
.tb-ref-chip img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.tb-ref-chip span { display: block; padding: 6px 8px 0; }
.tb-ref-chip em { display: block; padding: 2px 8px 8px; color: #15803d; font-style: normal; font-weight: 600; }
.tb-studio-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.tb-studio-card { border: 1px solid #e5e7eb; border-radius: 12px; padding: 14px; background: #fff; }
.tb-studio-img { aspect-ratio: 16 / 9; background: #f1f5f9; border-radius: 8px; display: flex; align-items: center; justify-content: center; overflow: hidden; margin-bottom: 10px; }
.tb-studio-img img { width: 100%; height: 100%; object-fit: cover; }
.tb-studio-card .field { margin-bottom: 10px; }
.tb-studio-card .field input[type="text"], .tb-studio-card textarea { width: 100% !important; }
.tb-studio-card textarea { min-height: 80px; font-size: 13px; }
.tb-studio-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }
.tb-grid-flat > div { background: transparent; }

/* Meta toggle */
.tb-meta-off { background: #fbfcfd; }
.tb-toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; cursor: pointer; }
.tb-toggle input { position: absolute; opacity: 0; }
.tb-toggle span { width: 40px; height: 22px; border-radius: 999px; background: #cbd5e1; position: relative; transition: background .15s; }
.tb-toggle span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .15s; }
.tb-toggle input:checked + span { background: #2f6fed; }
.tb-toggle input:checked + span::after { left: 21px; }

.tb-apx-card { border-color: #c7d7fb; }
.tb-apx-lps { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; font-size: 12px; word-break: break-all; }
.tb-market-card .btn-small { padding: 4px 10px; font-size: 12px; }

/* AdPlexity credit meter */
.tb-credit { margin: 0 0 14px; }
.tb-credit-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; font-size: 14px; }
.tb-credit-bar { height: 6px; border-radius: 999px; background: #eef2f7; overflow: hidden; margin-top: 8px; }
.tb-credit-bar span { display: block; height: 100%; border-radius: 999px; }
.tb-good-bg { background: #22c55e; } .tb-warn-bg { background: #f59e0b; } .tb-bad-bg { background: #dc2626; }
.tb-credit-cal summary { cursor: pointer; font-size: 13px; font-weight: 600; color: #2f6fed; }
.tb-credit-cal form { margin-top: 8px; }
.tb-cost { font-weight: 500; opacity: .8; margin-left: 4px; font-size: 12px; }

/* Adjacent winners */
.tb-adj { border-top: 1px solid #eef0f3; margin-top: 14px; padding-top: 14px; }
.tb-adj.tb-meta-off { background: transparent; }
.tb-adj-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 12px; }
.tb-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid #d6dbe4; border-radius: 999px; font-size: 13px; cursor: pointer; background: #fff; }
.tb-chip input { margin: 0; }
.tb-chip-on { border-color: #2f6fed; background: #eef4ff; }
.tb-strat-adj { background: #ede9fe; color: #5b21b6; margin: 0 0 6px; }

/* Trend radar + legs score */
.tb-trends-card { border-color: #e9d5ff; }
.tb-trend-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin-top: 10px; }
.tb-trend-card { border: 1px solid #e5e7eb; border-radius: 12px; padding: 14px; background: #fff; }
.tb-trend-head { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.tb-trend-pattern { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; background: #f8fafc; border-radius: 6px; padding: 6px 8px; margin-top: 8px; }
.tb-trend-fit { font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.tb-trend-ex { display: flex; gap: 6px; margin-bottom: 10px; }
.tb-trend-ex img { width: 64px; height: 40px; object-fit: cover; border-radius: 4px; background: #f1f5f9; }
.tb-legs { font-size: 13px; margin: 4px 0 2px; }
.tb-legs-num { font-weight: 800; font-size: 15px; }

.tb-products { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0 10px; font-size: 13px; }
.tb-products .tb-chip { cursor: default; }

/* Landers */
.tb-lp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.tb-lp-card { border: 1px solid #e5e7eb; border-radius: 12px; overflow: hidden; background: #fff; }
.tb-lp-card.tb-selected { border-color: #2f6fed; box-shadow: 0 0 0 3px rgba(47,111,237,.15); }
.tb-lp-shot { position: relative; display: flex; align-items: center; justify-content: center; height: 260px; background: #f1f5f9; overflow: hidden; cursor: pointer; }
.tb-lp-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.tb-lp-shot input { position: absolute; top: 10px; left: 10px; width: 18px; height: 18px; }
.tb-lp-hl { font-size: 13px; font-style: italic; margin-top: 6px; color: #334155; }
.tb-lp-breakdown { border-top: 1px solid #eef0f3; margin-top: 18px; padding-top: 16px; }
.tb-lp-breakdown ol { padding-left: 20px; } .tb-lp-breakdown li { margin-bottom: 6px; }

/* Lander editor + save-from-ad */
.tb-lp-row { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.tb-lp-saved { font-size: 12px; font-weight: 600; white-space: nowrap; }
.tb-lp-editor { border-top: 1px solid #eef0f3; margin-top: 18px; padding-top: 18px; }
.tb-lp-editor .field input[type="text"], .tb-lp-editor textarea { width: 100%; }
.tb-lp-sec { border: 1px solid #e5e7eb; border-radius: 12px; padding: 14px 16px; margin: 12px 0; background: #fbfcfd; }
.tb-lp-sec-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.tb-lp-sec-tools { margin-left: auto; display: inline-flex; gap: 6px; }
/* Busy buttons + toasts (base; refined in the UX layer) */
.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -2px; margin-right: 8px; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn.is-busy { opacity: .85; cursor: progress; }
#toast-host { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 1000; }
.toast { background: #111827; color: #fff; padding: 12px 16px; border-radius: 10px; font-size: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.18); max-width: 380px; animation: toast-in .2s ease-out; }
.toast-error { background: #991b1b; }
.toast-out { opacity: 0; transform: translateY(6px); transition: all .4s ease; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
/* Access-key modal (base) */
.modal-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); display: flex; align-items: center; justify-content: center; z-index: 2000; backdrop-filter: blur(2px); }
.modal { background: #fff; border-radius: 14px; padding: 26px 28px; width: min(420px, calc(100vw - 32px)); box-shadow: 0 24px 60px rgba(15, 23, 42, .25); }
.modal h2 { margin: 0 0 6px; font-size: 20px; }
.modal-sub { color: #475569; margin: 0 0 14px; font-size: 14px; }
.modal input { width: 100%; font-size: 16px; padding: 11px 12px; border: 1px solid #cbd5e1; border-radius: 9px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

/* ---------- Meta call-campaign workspace (static/call-workspace.js) ---------- */
.cw-controls { gap: 10px; }
.cw-headline { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
@media (max-width: 1100px) { .cw-headline { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cw-card { display: flex; flex-direction: column; background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 16px 18px 14px; min-width: 0; }
.cw-card-btn { font: inherit; color: inherit; text-align: left; cursor: pointer; transition: border-color .12s, box-shadow .12s; }
.cw-card-btn:hover { border-color: #9db8f6; }
.cw-card-active { border-color: #2f6fed; box-shadow: 0 0 0 3px rgba(47, 111, 237, .12); }
.cw-card .tb-kpi-label { font-size: 12px; font-weight: 600; }
.cw-card-value { font-size: 28px; font-weight: 700; margin-top: 6px; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.cw-card .tb-kpi-sub { font-size: 13px; margin-top: 4px; min-height: 36px; }
.cw-kc-profit .tb-kc-area { fill: rgba(47, 111, 237, .06); }
.tb-kc-scale.cw-kc-scale-low { top: auto; bottom: 2px; left: auto; right: 2px; background: rgba(255, 255, 255, .85); padding: 0 3px; border-radius: 3px; }
.cw-zero { stroke: #9ca3af; stroke-width: 1; }
.cw-max { stroke: #b91c1c; stroke-width: 1.5; stroke-dasharray: 5 4; opacity: .7; }
.cw-max-label { fill: #b91c1c; }
.cw-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1000px) { .cw-grid-2 { grid-template-columns: 1fr; } }
.cw-grid-2 > .results-card { margin-bottom: 16px; }
.cw-funnel-row { display: grid; grid-template-columns: 100px minmax(60px, 1fr) 70px; gap: 2px 10px; align-items: center; padding: 5px 0; font-size: 13px; }
.cw-funnel-note { grid-column: 2 / -1; }
.cw-funnel-label { font-weight: 600; color: #374151; }
.cw-funnel-bar { height: 10px; background: #f1f3f7; border-radius: 5px; overflow: hidden; }
.cw-funnel-bar span { display: block; height: 100%; background: #2f6fed; border-radius: 5px; }
.cw-funnel-num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.cw-funnel-note { font-size: 12px; }
.cw-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 16px; }
.cw-stat-value { font-size: 20px; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; }
.cw-stats-tight { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 14px; padding-top: 12px; border-top: 1px solid #eef1f5; }
.cw-stats-tight .cw-stat-value { font-size: 16px; }
.cw-banner { background: #eef4ff; border: 1px solid #c9dafc; color: #1e40af; border-radius: 8px; padding: 8px 12px; font-size: 13px; margin-bottom: 12px; }
.cw-section-title { font-size: 16px; margin: 18px 0 8px; }
.tb-table td.cw-label { min-width: 170px; }
/* Grouped unit-economics columns (Per connected call / Per billable call). */
.cw-table th.cw-g, .cw-table td.cw-g { background: #f7f9fc; }
.cw-table th.cw-g-head { text-align: center; color: #374151; border-bottom: 1px solid #e5e7eb; }
.cw-table thead th { vertical-align: bottom; }
/* "What a call costs vs what it earns" panel. */
.cw-unit-summary { font-size: 15px; margin: 4px 0 14px; line-height: 1.5; }
.cw-unit-row { display: grid; grid-template-columns: 150px repeat(3, 110px) minmax(120px, 1fr); gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid #eef1f5; }
@media (max-width: 800px) { .cw-unit-row { grid-template-columns: 1fr 1fr 1fr; } .cw-unit-label, .cw-unit-bars { grid-column: 1 / -1; } }
.cw-unit-label { font-weight: 600; color: #374151; }
.cw-unit-num { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cw-unit-k { display: block; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: #6b7280; }
.cw-unit-delta { font-size: 12px; font-weight: 600; margin-top: 2px; }
.cw-unit-bars { display: grid; gap: 4px; }
.cw-unit-bar { height: 10px; background: #f1f3f7; border-radius: 5px; overflow: hidden; }
.cw-unit-bar span { display: block; height: 100%; border-radius: 5px; }
.cw-unit-cost span, .cw-unit-swatch.cw-unit-cost { background: #d9534f; }
.cw-unit-earned span, .cw-unit-swatch.cw-unit-earned { background: #2f6fed; }
.cw-unit-swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.cw-unit-legend { margin-top: 10px; }
/* Library tab (project documents). */
.cw-doc h2 { margin: 2px 0 4px; }
.cw-doc-kind { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #2f6fed; }
.cw-doc-actions { display: flex; gap: 8px; align-items: center; }
a.btn.cw-doc-open, a.btn.cw-doc-open:visited { color: #fff; }
.cw-doc-summary { font-size: 15px; line-height: 1.55; margin: 6px 0 10px; }
.cw-doc-h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: #6b7280; margin: 14px 0 6px; }
.cw-doc-findings { margin: 0; padding-left: 20px; line-height: 1.55; }
.cw-doc-findings li { margin-bottom: 6px; }
.cw-doc-file { font-size: 12px; margin-top: 12px; }
.cw-doc-add summary { cursor: pointer; }
.cw-doc-add form { margin-top: 12px; }
/* Change log + chart markers. */
.cw-marker { fill: #d97706; cursor: help; }
.cw-marker-line { stroke: #f59e0b; stroke-width: 1; stroke-dasharray: 3 4; opacity: .55; }
.cw-marker-key { color: #d97706; font-style: normal; font-size: 12px; }
.cw-tip-change { color: #fcd34d; margin-top: 4px; }
.cw-change-form { display: flex; flex-wrap: wrap; gap: 0 12px; align-items: flex-end; }
.cw-change-form .field { flex: 0 0 auto; }
.cw-change-form .cw-change-text { flex: 1 1 260px; }
.cw-change-form .cw-change-text input { width: 100%; }
.cw-change-form .btn { margin-bottom: 16px; }
.cw-change-date { white-space: nowrap; font-variant-numeric: tabular-nums; }
.cw-kind { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #eef1f5; color: #374151; }
.cw-kind-buyer { background: #e0ecff; color: #1e40af; }
.cw-kind-lander { background: #e7f6ec; color: #15803d; }
.cw-kind-ads { background: #fdf0e1; color: #b45309; }
.cw-kind-routing { background: #f3e8ff; color: #7e22ce; }
.cw-kind-tracking { background: #fde8e8; color: #b91c1c; }
.cw-doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0 14px; }
