@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --violet: #6C4DFF;
  --violet-deep: #5A3DE6;
  --violet-tint: #EFEAFF;
  --blue: #64C8EF;
  --blue-tint: #E8F6FC;
  --grad: linear-gradient(135deg, #7A5CFF 0%, #62C7EE 100%);
  --ink: #111111;
  --ink-2: #2B3142;
  --ink-3: #6B7280;
  --ink-4: #9AA1AE;
  --surface: #FFFFFF;
  --surface-alt: #F6F7FB;
  --surface-2: #EEF1F7;
  --border: #E7EAF3;
  --border-2: #DDE2EC;
  --success: #22C55E;
  --success-tint: #E8F8EE;
  --warning: #F59E0B;
  --warning-tint: #FEF4E2;
  --danger: #EF4444;
  --danger-tint: #FDECEC;
  --ca-male: #6C4DFF;
  --ca-male-tint: #ECE7FF;
  --ca-female: #D24594;
  --ca-female-tint: #FBE7F2;
  --ca-blue: #64C8EF;
  --ca-blue-tint: #E8F6FC;
  --ca-amber-deep: #B0700C;
  --ca-amber-tint: #FEF4E2;
  --font: 'Inter', -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --r-card: 18px;
  --r-lg: 14px;
  --r-sm: 10px;
  --r-md: 12px;
  --r-pill: 999px;
  /* Spacing scale — 4px base. Use these instead of magic numbers. */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;  /* tight stack: cards within a group */
  --s-5: 20px;
  --s-6: 24px;  /* default: between sections on the canvas */
  --s-7: 32px;
  --s-8: 40px;
  /* Semantic aliases */
  --gap-section: var(--s-6);  /* canvas-level rhythm */
  --gap-stack:   var(--s-4);  /* tight stack within a section */
  --pad-card:    20px 22px;   /* default card padding */
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--font); background: var(--surface-alt); color: var(--ink-2); font-size: 14px; font-weight: 500; line-height: 1.5; -webkit-font-smoothing: antialiased; letter-spacing: -0.005em; }
a { color: inherit; text-decoration: none; }

.app-loading {
  min-height: 100vh;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(900px 600px at 50% -10%, #F2EEFF 0%, transparent 60%),
    var(--surface-alt);
}
.content-loading {
  min-height: calc(100vh - 130px);
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 18px;
  background:
    radial-gradient(720px 440px at 50% -12%, #F2EEFF 0%, transparent 62%),
    var(--surface);
}
.ld-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(560px 420px at 50% 46%, #000 0%, transparent 78%);
  mask-image: radial-gradient(560px 420px at 50% 46%, #000 0%, transparent 78%);
  opacity: 0.55;
}
.ld-sheen {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(380px 380px at 50% 46%, rgba(108, 77, 255, 0.08), transparent 70%);
}
.content-loading .ld-grid,
.content-loading .ld-sheen {
  position: absolute;
  inset: 0;
}
.content-loading .ld-grid {
  -webkit-mask-image: radial-gradient(520px 360px at 50% 48%, #000 0%, transparent 80%);
  mask-image: radial-gradient(520px 360px at 50% 48%, #000 0%, transparent 80%);
}
.content-loading .ld-sheen {
  background: radial-gradient(340px 300px at 50% 48%, rgba(108, 77, 255, 0.08), transparent 72%);
}
.ld-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.ld-mark {
  position: relative;
  width: 76px;
  height: 76px;
  margin-bottom: 26px;
}
.ld-mark .badge {
  position: absolute;
  inset: 0;
  border-radius: 20px;
  background: var(--grad);
  display: grid;
  place-items: center;
  box-shadow: 0 16px 40px rgba(108, 77, 255, 0.34);
  animation: ld-bob 2.6s ease-in-out infinite;
}
.ld-mark .badge svg {
  width: 38px;
  height: 38px;
}
.ld-mark .ring {
  position: absolute;
  inset: 0;
  border-radius: 20px;
  border: 2px solid var(--violet);
  opacity: 0;
  animation: ld-ring 2.6s ease-out infinite;
}
.ld-mark .ring.r2 {
  animation-delay: 1.3s;
}
@keyframes ld-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes ld-ring {
  0% { transform: scale(1); opacity: 0.55; }
  100% { transform: scale(1.7); opacity: 0; }
}
.ld-lockup {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1;
}
.ld-lockup .ai {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.ld-status {
  margin-top: 16px;
  font-size: 14px;
  font-weight: 650;
  color: var(--ink-3);
  letter-spacing: -0.005em;
}
.ld-status .dots span {
  animation: ld-blink 1.4s ease-in-out infinite;
}
.ld-status .dots span:nth-child(2) {
  animation-delay: 0.2s;
}
.ld-status .dots span:nth-child(3) {
  animation-delay: 0.4s;
}
@keyframes ld-blink {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .ld-mark .badge,
  .ld-mark .ring,
  .ld-status .dots span {
    animation: none;
  }
  .ld-mark .ring {
    display: none;
  }
}

.app { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; min-width: 1320px; }

.rail { background: var(--surface); border-right: 1px solid var(--border); padding: 22px 16px; display: flex; flex-direction: column; gap: 24px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 6px; }
.lockup { font-size: 24px; font-weight: 800; letter-spacing: -0.03em; color: var(--ink); display: flex; align-items: baseline; line-height: 1; }
.lockup .ai { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.workspace { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r-sm); }
.ws-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--grad); display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 13px; flex: none; }
.ws-name { font-size: 13px; font-weight: 700; color: var(--ink); }
.ws-meta { font-size: 11px; font-weight: 500; color: var(--ink-3); font-family: var(--mono); }
.nav-eyebrow { font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-4); padding: 0 12px; margin-bottom: 6px; }
.nav-section { display: flex; flex-direction: column; gap: 2px; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: var(--r-sm); color: var(--ink-2); font-size: 13.5px; font-weight: 750; cursor: pointer; text-decoration: none; }
.nav-item:hover { background: var(--surface-alt); }
.nav-item.active { background: var(--violet-tint); color: var(--violet-deep); }
.nav-item.active svg { color: var(--violet); }
.nav-item svg { width: 18px; height: 18px; color: var(--ink-3); flex: none; }
.nav-item .badge { margin-left: auto; font-size: 11px; font-weight: 600; font-family: var(--mono); color: var(--ink-3); background: var(--surface-alt); padding: 1px 6px; border-radius: var(--r-pill); }
.nav-item.active .badge { background: #fff; color: var(--violet-deep); }
.rail-foot { margin-top: auto; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface-alt); display: flex; align-items: center; gap: 10px; }
.rail-foot .av { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, #FFC1A0, #E8855E); flex: none; }
.rail-foot-id { min-width: 0; flex: 1; }
.rail-foot .name { font-size: 13px; font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-foot .role { font-size: 11px; font-weight: 600; color: var(--ink-3); }
.rail-foot-logout { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border: 0; border-radius: 6px; background: transparent; color: var(--ink-3); text-decoration: none; cursor: pointer; transition: background 0.12s, color 0.12s; }
.rail-foot-logout:hover { background: var(--surface); color: var(--danger); }

.canvas { padding: 26px 32px 80px; display: flex; flex-direction: column; gap: 24px; min-width: 0; max-width: 1640px; }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--ink-3); }
.crumbs .sep { color: var(--ink-4); }
.crumbs .here { color: var(--ink); font-weight: 800; }
.search { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm); width: 320px; font-size: 13px; color: var(--ink-3); }
.search svg { width: 14px; height: 14px; }
.search .kbd { margin-left: auto; font-size: 11px; font-family: var(--mono); padding: 1px 6px; border: 1px solid var(--border); border-radius: 4px; color: var(--ink-4); }
.top-actions { display: flex; gap: 8px; align-items: center; }

.title-block { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.ca-statusline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.ca-statusline .live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
  animation: pulse 2.2s ease-in-out infinite;
}
.crumb-row { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--ink-3); margin-bottom: 10px; }
.pulse-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 oklch(from var(--success) l c h / 0.55); } 70% { box-shadow: 0 0 0 8px oklch(from var(--success) l c h / 0); } 100% { box-shadow: 0 0 0 0 oklch(from var(--success) l c h / 0); } }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 14px; font-family: var(--font); font-size: 13px; font-weight: 750; border-radius: var(--r-sm); border: 1px solid var(--border-2); background: var(--surface); color: var(--ink); cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--surface-alt); border-color: var(--ink-4); }
.btn svg { width: 15px; height: 15px; }
.btn.primary { background: var(--grad); color: #fff; border-color: transparent; font-weight: 800; }
.btn.primary:hover { filter: brightness(1.05); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--ink-3); font-weight: 700; }
.btn.ghost:hover { color: var(--ink); background: var(--surface-alt); }
.btn.sm { padding: 6px 10px; font-size: 12.5px; font-weight: 750; }
.btn.sm svg { width: 13px; height: 13px; }
.btn.tiny { padding: 4px 8px; font-size: 12px; font-weight: 700; }
.btn.success { background: var(--success-tint); color: #157C3F; border-color: transparent; }
.btn.danger { background: var(--surface); color: var(--danger); border-color: var(--border-2); }
.btn:disabled { cursor: wait; opacity: 0.72; }
.btn.act-accept { --bL:#2F6BEB; --bT:#B9D0FB; --bH:#ECF2FD; color:#2F6BEB; }
.btn.act-skip { --bL:#1B2030; --bT:#C9CDD6; --bH:#EAEBEC; color:#1B2030; }
.btn.act-reject { --bL:#DA2F3A; --bT:#F6C2C5; --bH:#FCECED; color:#DA2F3A; }
.btn.sl-note { --bL:#E5851A; --bT:#F5D9AE; --bH:#FDF4EA; color:#E5851A; }
.btn.sl-open { --bL:#1B9152; --bT:#BDE3CE; --bH:#EAF5EF; color:#1B9152; }
.btn.act-accept,
.btn.act-skip,
.btn.act-reject,
.btn.sl-note,
.btn.sl-open {
  background: #fff;
  font-size: 12.5px;
  font-weight: 800;
  border-radius: var(--r-sm);
  border: 1px solid var(--bT);
  border-left: 4px solid var(--bL);
  box-shadow: 0 1px 2px rgba(9, 13, 36, 0.06);
  height: 32px;
  padding: 0 10px;
  line-height: 1;
  transition: background .14s ease, border-color .14s ease;
}
.btn.act-accept:hover,
.btn.act-skip:hover,
.btn.act-reject:hover,
.btn.sl-note:hover,
.btn.sl-open:hover {
  background: var(--bH);
  filter: none;
}

/* Overlay stacking scale (single source of truth):
 *   page/sidebar/base ............ < 100
 *   page modals (vc/pim backdrop)  110–121
 *   insight drawer backdrop ...... 200
 *   insight drawer ............... 201
 *   decision modal / note / confirm scrim + sheet ... 220  ← shared `.scrim`
 *   toasts (undo / action) ....... 240–250 (topmost)
 * The decision modal must sit ABOVE the insight drawer so Skip/Reject/Accept
 * opened from inside the drawer are clickable; `.scrim` is a sibling of the
 * drawer in the render root, so a z-index above 201 is sufficient (no portal). */
.scrim {
  position: fixed;
  inset: 0;
  background: rgba(17, 17, 17, 0.42);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  display: grid;
  place-items: center;
  z-index: 220;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}
.scrim.open { opacity: 1; pointer-events: auto; }
.scrim.drawer-scrim { place-items: stretch; justify-items: end; }

/* Decision modal — ia-modal design (Insights & Impacts v2 handoff). */
.modal {
  background: var(--surface);
  border-radius: 22px;
  width: 560px;
  max-width: calc(100vw - 40px);
  box-shadow: 0 40px 100px rgba(9, 13, 36, 0.30), 0 4px 14px rgba(9, 13, 36, 0.10);
  transform: translateY(8px) scale(0.98);
  transition: transform 0.2s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.scrim.open .modal { transform: translateY(0) scale(1); }
.modal-head {
  padding: 26px 28px 0;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.modal-icon {
  width: 48px;
  height: 48px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  flex: none;
}
.modal-icon svg { width: 23px; height: 23px; }
.modal-icon.accept { background: #E4F6EC; color: #1F9D57; }
.modal-icon.skip { background: var(--surface-2, #EEF0F6); color: var(--ink-2); }
.modal-icon.reject { background: #FDE7EA; color: #E5484D; }
.modal-title {
  font-size: 23px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 5px;
}
.modal-sub {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-3);
  font-family: var(--mono);
  letter-spacing: -0.01em;
}
.modal-close {
  margin-left: auto;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: none;
  background: transparent;
  color: var(--ink-3);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.modal-close:hover { background: var(--surface-alt); color: var(--ink); }
.modal-close svg { width: 19px; height: 19px; }
.modal-body {
  padding: 20px 28px 0;
  font-size: 16px;
  font-weight: 550;
  color: var(--ink-2);
  line-height: 1.5;
  letter-spacing: -0.01em;
}
.modal-body p { margin: 0 0 10px; }
.modal-body p:last-child { margin-bottom: 0; }
.modal-body p b { font-weight: 750; color: var(--ink); }
.modal-what {
  margin-top: 20px;
  padding: 18px 20px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 14px;
}
.modal-what .w-key {
  font-size: 11.5px;
  font-weight: 850;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 14px;
}
.modal-what ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.modal-what li {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 13px;
  font-size: 15px;
  font-weight: 550;
  color: var(--ink-2);
  line-height: 1.4;
  letter-spacing: -0.01em;
}
.modal-what li svg {
  width: 18px;
  height: 18px;
  color: var(--violet-deep);
  margin-top: 1px;
}
.modal-what li b { font-weight: 750; color: var(--ink); }
/* One-tap reason chips inside the skip/reject modals (ia-chips). Single-
   select, toggle to deselect; reject's selected chip goes danger-red. */
.ia-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.ia-chip {
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border-2);
  background: var(--surface);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-2);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}
.ia-chip:hover { border-color: var(--ink-4); }
.ia-chip.sel { background: var(--ink); border-color: var(--ink); color: #fff; }
.ia-chip.sel.rej { background: var(--danger); border-color: var(--danger); }
.modal-foot {
  padding: 22px 28px 24px;
  margin-top: 22px;
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: flex-end;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.modal-foot .modal-hint {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-3);
  align-self: center;
  font-family: var(--mono);
  line-height: 1.35;
  letter-spacing: -0.01em;
}
.modal-foot .btn {
  height: 50px;
  padding: 0 20px;
  border-radius: 13px;
  font-size: 15px;
  font-weight: 750;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  white-space: nowrap;
}
.modal-foot .btn svg { width: 18px; height: 18px; }
.modal-foot .btn.primary {
  border-color: transparent;
  background: linear-gradient(95deg, #6C4DFF 0%, #5AA8F0 55%, #62C7EE 100%);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(108, 77, 255, 0.28);
}
.modal-foot .btn.primary:hover { filter: brightness(1.04); }
.modal-foot .btn.neutral {
  border-color: transparent;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
}
.modal-foot .btn.neutral:hover { filter: brightness(1.12); background: var(--ink); }
.modal-foot .btn.danger {
  background: var(--danger);
  color: white;
  border-color: transparent;
  font-weight: 800;
}
.modal-foot .btn.danger:hover {
  filter: brightness(1.04);
  background: var(--danger);
}

.vc-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(14, 18, 40, 0.50);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease;
}
.vc-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}
.vc-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  width: min(400px, calc(100vw - 36px));
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-optical-sizing: auto;
  font-feature-settings: "cv05" 1, "cv08" 1, "cv11" 1, "ss01" 1;
  z-index: 121;
  overflow: hidden;
  background: var(--surface);
  border-radius: 18px;
  box-shadow: 0 36px 90px rgba(9, 13, 36, 0.30), 0 4px 12px rgba(9, 13, 36, 0.10);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -46%) scale(0.97);
  transition: opacity 0.16s ease, transform 0.18s ease;
}
.vc-modal.open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}
.vc-body {
  padding: 26px 26px 0;
  text-align: center;
}
.vc-ico {
  width: 52px;
  height: 52px;
  border-radius: 15px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  background: var(--violet-tint);
  color: var(--violet);
}
.vc-ico svg {
  width: 25px;
  height: 25px;
}
.vc-modal.danger .vc-ico {
  background: var(--danger-tint);
  color: var(--danger);
}
.vc-title {
  margin: 0;
  color: var(--ink);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.2;
}
.vc-msg {
  margin: 8px 0 0;
  color: var(--ink-3);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.5;
}
.vc-acts {
  display: flex;
  gap: 10px;
  padding: 22px 26px 24px;
}
.vc-acts button {
  flex: 1;
  height: 50px;
  border-radius: 13px;
  border: 1px solid transparent;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 750;
  letter-spacing: -0.005em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s ease, border-color 0.12s ease, filter 0.12s ease;
}
.vc-acts button.vc-cancel {
  background: var(--surface);
  border-color: var(--border-2);
  color: var(--ink);
}
.vc-acts button.vc-cancel:hover {
  background: var(--surface-alt);
}
.vc-confirm {
  background: var(--grad);
  color: #fff;
}
.vc-confirm:hover {
  filter: brightness(1.05);
}
.vc-modal.danger .vc-confirm {
  background: var(--danger);
}
.vc-modal.danger .vc-confirm:hover {
  filter: brightness(1.04);
}

.drawer {
  background: var(--surface);
  width: 460px;
  max-width: calc(100vw - 48px);
  height: 100%;
  box-shadow: -18px 0 60px -20px rgba(15, 12, 41, 0.22);
  transform: translateX(24px);
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.scrim.open .drawer { transform: translateX(0); }
.drawer-head {
  padding: 22px 24px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.drawer-head .d-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--violet-deep);
  letter-spacing: 0.04em;
  font-weight: 600;
}
.drawer-head .d-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.015em;
  line-height: 1.3;
  margin-top: 4px;
}
.drawer-head .d-context {
  font-size: 12.5px;
  color: var(--ink-3);
  margin-top: 6px;
  line-height: 1.45;
}
.drawer-head .d-context b { color: var(--ink-2); font-weight: 500; }
.drawer-body {
  flex: 1;
  padding: 20px 24px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.drawer-body .field-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.drawer-body .field-label .count {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-4);
  letter-spacing: 0;
}
.drawer-body textarea {
  width: 100%;
  min-height: 140px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  font-family: var(--font);
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink);
  resize: vertical;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.drawer-body textarea:focus {
  outline: none;
  border-color: var(--violet);
  box-shadow: 0 0 0 3px rgba(108, 77, 255, 0.12);
}
.drawer-body textarea::placeholder { color: var(--ink-4); }
.note-templates {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.note-templates .chip-template {
  padding: 5px 10px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  font-size: 11.5px;
  color: var(--ink-2);
  cursor: pointer;
  font-family: var(--font);
  transition: all 0.12s ease;
}
.note-templates .chip-template:hover {
  background: var(--violet-tint);
  border-color: transparent;
  color: var(--violet-deep);
}
.drawer-meta {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 10px 12px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  font-size: 11.5px;
  color: var(--ink-3);
  font-family: var(--mono);
  letter-spacing: 0.02em;
}
.drawer-meta .av-sm {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FFC1A0, #E8855E);
  flex: none;
}
.drawer-meta b { color: var(--ink); font-weight: 500; font-family: var(--font); }
.drawer-foot {
  padding: 14px 24px 18px;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  border-top: 1px solid var(--border);
}
.drawer-foot .kbd-hint {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-4);
  align-self: center;
  margin-right: 4px;
}
.drawer-foot .kbd-hint .k {
  padding: 1px 5px;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--ink-3);
}

.snapshot { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: 22px 24px; display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center; }
.snap-id { display: flex; align-items: center; gap: 14px; }
.snap-av { width: 56px; height: 56px; border-radius: 14px; background: linear-gradient(135deg, #1a1a1f, #2c1810); display: grid; place-items: center; color: #FFD68A; font-size: 22px; font-weight: 800; letter-spacing: -0.02em; flex: none; }
.snap-name { font-size: 18px; font-weight: 700; letter-spacing: -0.015em; color: var(--ink); }
.snap-meta { font-size: 12px; color: var(--ink-3); margin-top: 3px; display: flex; gap: 10px; }
.snap-meta b { color: var(--ink-2); font-weight: 500; }
.snap-stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0; border-left: 1px solid var(--border); padding-left: 24px; }
.snap-stat { padding: 0 14px; border-right: 1px solid var(--border); }
.snap-stat:last-child { border-right: 0; }
.snap-stat .k { font-size: 10px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.snap-stat .v { font-size: 20px; font-weight: 700; letter-spacing: -0.025em; color: var(--ink); margin-top: 4px; line-height: 1.1; }
.snap-stat .v .unit { font-size: 12px; font-weight: 500; color: var(--ink-3); margin-left: 1px; }
/* C-001: KPI prior-period delta uses true green/red — Cenk feedback
   distinguishes improvement (green) from decline (red, NOT amber). */
.snap-stat .d { font-size: 11px; font-family: var(--mono); margin-top: 2px; color: var(--success); font-weight: 500; }
.snap-stat .d.down { color: var(--danger); }
.snap-counts { display: flex; gap: 8px; }
.snap-count { display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--surface-alt); font-size: 12px; color: var(--ink-2); }
.snap-count b { color: var(--violet-deep); font-weight: 700; }
.snap-count.warn b { color: #B0700C; }

.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.section-head h2 { margin: 0; font-size: 24px; font-weight: 750; letter-spacing: -0.015em; color: var(--ink); }
.section-head .h-sub { font-size: 15px; font-weight: 600; color: var(--ink-3); margin-top: 6px; }

.main-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; }
.col { display: flex; flex-direction: column; gap: 24px; min-width: 0; }

.priorities { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.prio { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: 20px 22px; display: flex; flex-direction: column; gap: 10px; position: relative; overflow: hidden; }
.prio.opp { border-color: #DDD3FF; border-left: 5px solid var(--violet); }
.prio.risk { border-color: #FAE0B0; border-left: 5px solid var(--warning); }
.prio::before { content: none; }
.prio .p-eyebrow { font-size: 12px; font-weight: 950; letter-spacing: 0.08em; text-transform: uppercase; line-height: normal; color: #70788D; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.prio.opp .p-eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--violet); }
.prio.risk .p-eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warning); }
.prio .p-eyebrow .cid { margin-left: 8px; padding: 3px 10px; border-radius: 6px; background: var(--surface-alt); color: var(--ink-4); border: 0; font-size: 11px; font-family: var(--mono); font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.prio .p-direction { display: inline-flex; align-items: center; gap: 5px; align-self: flex-start; padding: 8px 12px; border-radius: var(--r-pill); font-size: 13px; font-weight: 850; font-family: var(--font); }
.prio.opp .p-direction { background: var(--success-tint); color: #157C3F; }
.prio.risk .p-direction { background: var(--warning-tint); color: #B0700C; }
.prio .p-acts { display: flex; gap: 8px; margin-top: auto; padding-top: 6px; align-items: center; }
.prio .p-acts .open-insight { margin-left: auto; }
.prio .p-acts .btn { min-height: 31px; padding: 6px 10px; font-size: 12.5px; font-weight: 750; }
.prio .p-acts .btn.primary { font-weight: 800; }
.prio .p-acts .btn.act-accept,
.prio .p-acts .btn.act-skip,
.prio .p-acts .btn.act-reject,
.prio .p-acts .btn.sl-open {
  height: 32px;
  min-height: 0;
  padding: 0 10px;
  font-weight: 800;
  line-height: 1;
}

.feed-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); overflow: hidden; }
.feed-card.lead { border-left: 5px solid #2F6BFF; }
.feed-card.lead.learn { border-left-color: rgb(24, 169, 109); }
.feed-head,
.home-panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; padding: 26px 28px 22px; background: var(--surface); border-bottom: 0; }
.feed-head h2,
.home-panel-head h2,
.morning-brief .rc-title { margin: 0; color: var(--ink); font-size: 26px; line-height: 1.15; font-weight: 800; letter-spacing: -0.02em; }
.feed-head .h-sub,
.home-panel-head .h-sub { margin-top: 8px; color: var(--ink-3); font-size: 15px; line-height: 1.42; font-weight: 600; max-width: 64ch; }
.feed-head .btn,
.home-panel-head .btn { flex: none; margin-top: 0; height: auto; padding: 6px 10px; font-size: 12.5px; font-weight: 750; }
.home-action-panel .feed-toolbar,
.home-learning-panel .feed-toolbar { padding: 14px 22px; background: var(--surface-alt); border-bottom: 1px solid var(--border); }
.home-action-panel .fchip,
.home-learning-panel .fchip { min-height: 30px; padding: 0 12px; font-size: 12.5px; font-weight: 800; }
.home-action-panel .in-card .action-row .btn { min-height: 31px; padding: 6px 10px; font-size: 12.5px; font-weight: 750; }
.home-action-panel .in-card .action-row .btn.primary { font-weight: 800; }
.home-action-panel .in-card .action-row .btn.act-accept,
.home-action-panel .in-card .action-row .btn.act-skip,
.home-action-panel .in-card .action-row .btn.act-reject {
  height: 32px;
  min-height: 0;
  padding: 0 10px;
  font-weight: 800;
  line-height: 1;
}
/* Pagination footer — maps to meta.pagination on Insights. Ported
   from docs/.../Insights.html lines 54–60. */
.feed-pager { display: flex; align-items: center; justify-content: space-between; padding: 12px 22px; border-top: 1px solid var(--border); background: var(--surface-alt); }
.feed-pager .pg-meta { font-size: 11.5px; color: var(--ink-2); font-family: var(--mono); display: inline-flex; gap: 14px; align-items: center; }
.feed-pager .pg-meta .sep { width: 1px; height: 11px; background: var(--border-2, var(--border)); }
.feed-pager .pg-meta .pg-page { color: var(--ink-3); }
.feed-pager .pg-controls { display: inline-flex; gap: 6px; align-items: center; }
.feed-pager .btn[disabled], .feed-pager .btn:disabled { color: var(--ink-4, var(--ink-3)); opacity: 0.55; cursor: not-allowed; pointer-events: none; }
.feed-tabs { display: flex; gap: 0; padding: 0 22px; border-bottom: 1px solid var(--border); }
.feed-tab { padding: 14px 0 13px; margin-right: 22px; font-size: 13px; font-weight: 500; color: var(--ink-3); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; align-items: center; gap: 7px; }
.feed-tab .ct { font-size: 11px; font-family: var(--mono); padding: 1px 6px; background: var(--surface-alt); border-radius: var(--r-pill); color: var(--ink-3); }
.feed-tab:hover { color: var(--ink); }
.feed-tab.active { color: var(--violet-deep); border-bottom-color: var(--violet); font-weight: 600; }
.feed-tab.active .ct { background: var(--violet-tint); color: var(--violet-deep); }
.feed-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 22px; border-bottom: 1px solid var(--border); background: var(--surface-alt); }
.fchip svg { width: 13px; height: 13px; flex: none; color: currentColor; opacity: 0.85; }

/* Videos page filter dropdown */
.vid-filter-menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  width: 360px; padding: 14px; z-index: 30;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-card); box-shadow: 0 18px 40px -16px rgba(15, 12, 41, 0.18), 0 4px 12px -6px rgba(15, 12, 41, 0.08);
  display: none; flex-direction: column; gap: 4px;
}
.vid-filter-menu.open { display: flex; }
.fmenu-eyebrow { font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); padding: 2px 8px 8px; }
.fmenu-item {
  display: flex; gap: 11px; align-items: flex-start; text-align: left;
  padding: 11px 10px; border-radius: var(--r-md);
  background: transparent; border: 1px solid transparent; color: var(--ink); cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.fmenu-item:hover { background: var(--surface-alt); border-color: var(--border); }
.fmenu-item.active { background: var(--violet-tint); border-color: rgba(108, 77, 255, 0.18); }
.fmenu-mark { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex: none; }
.fmenu-mark.amber { background: var(--warn); }
.fmenu-mark.violet { background: var(--violet); }
.fmenu-mark.green { background: var(--ok); }
.fmenu-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.fmenu-title { font-size: 13px; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.fmenu-count { font-size: 10.5px; font-family: var(--mono); color: var(--ink-3); padding: 1px 7px; background: var(--surface-alt); border-radius: var(--r-pill); }
.fmenu-desc { font-size: 11.5px; color: var(--ink-2); line-height: 1.45; }
.fmenu-q { font-size: 10.5px; font-family: var(--mono); color: var(--ink-4); margin-top: 2px; }
.fmenu-foot { padding: 8px 4px 0; border-top: 1px solid var(--border); margin-top: 6px; }
.fmenu-clear { width: 100%; text-align: center; padding: 7px 10px; font-size: 11.5px; color: var(--ink-3); background: transparent; border: 0; cursor: pointer; border-radius: var(--r-md); }
.fmenu-clear:hover { background: var(--surface-alt); color: var(--ink); }
.kind-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--ink-3); font-family: var(--mono); }
.kind-tag svg { width: 12px; height: 12px; opacity: 0.8; }
.feed-list { display: flex; flex-direction: column; }

.in-card { display: grid; grid-template-columns: 178px minmax(0, 1fr) 320px; gap: 24px; padding: 24px 26px; border-bottom: 1px solid var(--border); align-items: start; }
.in-card:last-child { border-bottom: 0; }
.in-card:hover { background: var(--surface-alt); }
.in-target { display: flex; flex-direction: column; gap: 6px; }
.in-target .vthumb { aspect-ratio: 16/9; border-radius: 9px; background: linear-gradient(135deg, #1a1a1f, #2c1810); position: relative; overflow: hidden; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #FFD68A; text-shadow: 0 1px 3px rgba(0,0,0,0.5); }
.in-target .vthumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.in-target .vthumb.ch { background: var(--violet-tint); color: var(--violet-deep); font-weight: 700; font-size: 9px; }
.in-target .vthumb .dur { position: absolute; right: 4px; bottom: 4px; background: rgba(0,0,0,0.78); color: #fff; font-family: var(--mono); font-size: 9px; padding: 1px 4px; border-radius: 3px; z-index: 1; }
.in-target .vmeta { font-size: 12px; color: var(--ink-3); font-family: var(--mono); font-weight: 650; }

.in-body { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.in-tags { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.in-tag { font-size: 11.5px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); padding: 3px 8px; border-radius: var(--r-pill); background: var(--surface-alt); border: 1px solid var(--border); }
.in-tag.violet { color: var(--violet-deep); background: var(--violet-tint); border-color: transparent; }
.in-tag.blue { color: #2B7FAA; background: var(--blue-tint); border-color: transparent; }
.in-tag.warning { color: #B0700C; background: var(--warning-tint); border-color: transparent; }
.in-tag.success { color: #157C3F; background: var(--success-tint); border-color: transparent; }
.in-tag.id { font-family: var(--mono); font-weight: 500; letter-spacing: 0.02em; text-transform: none; color: var(--ink-3); background: var(--surface-alt); border-color: var(--border); }
.in-tag.with-icon { display: inline-flex; align-items: center; gap: 4px; padding-left: 7px; }
.in-tag.with-icon svg { display: block; flex: none; opacity: 0.85; }
.in-tag.intelligence-cue {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  overflow: visible;
}
.tag-help {
  width: 13px;
  height: 13px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid currentColor;
  background: rgba(255,255,255,0.56);
  color: currentColor;
  cursor: help;
  font-size: 8.5px;
  font-weight: 850;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
  opacity: 0.76;
}
.tag-tooltip {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  width: min(230px, 70vw);
  padding: 8px 10px;
  border: 1px solid rgba(17,20,38,0.12);
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  box-shadow: 0 14px 34px rgba(17,20,38,0.18);
  font-family: var(--font);
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0;
  text-transform: none;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 140ms ease, transform 140ms ease;
  z-index: 40;
}
.tag-tooltip::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 100%;
  border: 6px solid transparent;
  border-top-color: var(--ink);
}
.intelligence-cue:hover .tag-tooltip,
.intelligence-cue:focus-within .tag-tooltip {
  opacity: 1;
  transform: translateY(0);
}

/* Filter pill with InsightType icon inline (Insights page filter
   strip). The base .fchip rule is display:inline-flex already, so we
   only need icon-specific styling here. */
.fchip.with-icon { gap: 6px; padding-left: 9px; }
.fchip.with-icon > svg { flex: none; opacity: 0.85; }

/* Actions page header parity (design ref: Actions.html):
   crumb-row carries the LIVE status line; title-block carries the
   shared page h1.
   The earlier .page-h1 override has been removed — the h1 lives
   inside .title-block now and inherits the shared dashboard
   typography primitive. */
.crumb-row .status-line { font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; }
.title-block h1 .cid { margin-left: 8px; font-size: 11px; font-weight: 500; color: var(--ink-3); font-family: var(--mono); letter-spacing: 0.04em; vertical-align: middle; }
/* Actions page: tighten the gap between the LIVE status line and the
   big Actions h1. The global .crumb-row has margin-bottom:10px which
   plus the h1's natural ascent gap produces dead vertical space on
   this page specifically. Scoped override only. */
.crumb-row[data-cid="actions.page"] { margin-bottom: 2px; }

/* Videos-row status pill — ported from docs/.../dashboard.css .vid-sub. */
.vid-sub { display: flex; gap: 10px; align-items: center; font-size: 11.5px; color: var(--ink-3); font-family: var(--mono); margin-top: 3px; }
.vid-sub .label { display: inline-flex; align-items: center; gap: 4px; font-family: var(--font); padding: 1px 7px; border-radius: var(--r-pill); font-size: 10.5px; font-weight: 600; }
.vid-sub .label.top { background: var(--success-tint); color: #157C3F; }
.vid-sub .label.opp { background: var(--violet-tint); color: var(--violet-deep); }
.vid-sub .label.attn { background: var(--warning-tint); color: #B0700C; }
.vid-sub .label.avg { background: var(--surface-alt); color: var(--ink-3); }
.in-tag.scope { color: var(--ink-3); }
.in-tag.unverif { color: var(--ink-3); background: var(--surface-alt); }

.in-rec { font-size: 21px; font-weight: 750; letter-spacing: -0.015em; color: var(--ink); line-height: 1.28; }
.in-reason { font-size: 15.5px; font-weight: 620; color: #414a61; line-height: 1.5; }
.in-card .in-reason-wide { display: none; }
.in-evd { display: flex; gap: 16px; font-size: 13px; font-family: var(--mono); font-weight: 600; color: var(--ink-3); flex-wrap: wrap; }
.in-evd b { color: var(--ink-2); font-weight: 750; }

/* Evidence footprint chip — "Built from" trust cue */
.in-evidence { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 7px 10px; border: 1px dashed var(--border-2); border-radius: var(--r-sm); background: var(--surface-alt); margin-top: 4px; }
.in-evidence .lab { font-size: 9.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.in-evidence b { font-size: 11px; font-weight: 600; color: var(--ink-2); font-family: var(--mono); padding: 2px 7px; background: var(--surface); border-radius: var(--r-pill); border: 1px solid var(--border); white-space: nowrap; }
.in-direction { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; padding: 3px 8px; border-radius: var(--r-pill); font-family: var(--mono); }
.in-direction.up { background: var(--success-tint); color: #157C3F; }
.in-direction.down { background: var(--warning-tint); color: #B0700C; }

.in-cta { display: flex; flex-direction: column; gap: 6px; }
.in-cta .row1 { display: flex; gap: 6px; }
.in-cta .row1 .btn { flex: 1; }
.in-cta .row2 { display: flex; gap: 6px; align-items: center; justify-content: space-between; }
.in-note-btn { font-size: 11.5px; color: var(--ink-3); background: transparent; border: 0; padding: 4px 6px; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
.in-note-btn:hover { color: var(--violet); }

.stamp { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: var(--r-pill); letter-spacing: -0.005em; }
.stamp .dot { width: 6px; height: 6px; border-radius: 50%; }
.stamp.accepted { background: var(--violet-tint); color: var(--violet-deep); }
.stamp.accepted .dot { background: var(--violet); }
.stamp.committed { background: var(--blue-tint); color: #2B7FAA; }
.stamp.committed .dot { background: var(--blue); }
.stamp.executed { background: var(--success-tint); color: #157C3F; }
.stamp.executed .dot { background: var(--success); }
.stamp.audited { background: var(--success-tint); color: #157C3F; }
.stamp.audited .dot { background: var(--success); }
.stamp.later { background: var(--surface-2); color: var(--ink-2); }
.stamp.later .dot { background: var(--ink-3); }
.stamp.rejected { background: var(--danger-tint); color: var(--danger); }
.stamp.rejected .dot { background: var(--danger); }
.stamp.expired { background: var(--warning-tint); color: #B0700C; }
.stamp.expired .dot { background: var(--warning); }
.stamp.unverif { background: var(--surface-alt); color: var(--ink-3); border: 1px dashed var(--border-2); }
.stamp.pending { background: var(--surface-alt); color: var(--ink-2); }
.stamp.pending .dot { background: var(--ink-3); }
.stamp.superseded { background: var(--surface-2); color: var(--ink-3); }
.stamp.superseded .dot { background: var(--ink-4); }

.in-card.accepted .in-cta { background: var(--violet-tint); border-radius: var(--r-md); padding: 12px; border: 1px solid #DDD3FF; }
.in-card.accepted .accepted-meta { display: flex; flex-direction: column; gap: 4px; }
.in-card.accepted .am-row { display: flex; align-items: center; justify-content: space-between; font-size: 11px; color: var(--violet-deep); }
.in-card.accepted .am-row b { color: var(--ink); font-weight: 600; }

.videos { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); overflow: hidden; }
.vid-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 16px 22px; border-bottom: 1px solid var(--border); }
.vid-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.vid-row { display: grid; grid-template-columns: 72px minmax(0, 1fr) repeat(4, 64px) 90px auto; gap: 12px; align-items: center; padding: 14px 22px; border-bottom: 1px solid var(--border); }
.vid-row:last-child { border-bottom: 0; }
.vid-row:hover { background: var(--surface-alt); }
.vid-row.clickable { cursor: pointer; transition: background 0.12s ease; }
.vid-row.clickable:focus-visible { outline: 2px solid var(--violet); outline-offset: -2px; }
.vid-row.head { background: var(--surface-alt); padding-top: 10px; padding-bottom: 10px; }
.vid-thumb { aspect-ratio: 16/9; border-radius: 7px; position: relative; overflow: hidden; background: linear-gradient(135deg, #1a1a1f, #2c1810); display: grid; place-items: center; color: #FFD68A; font-size: 10px; font-weight: 800; text-align: center; padding: 4px; text-shadow: 0 1px 3px rgba(0,0,0,0.5); }
.vid-thumb.b { background: linear-gradient(135deg, #1f1a3b, #321b59); color: #DDD3FF; }
.vid-thumb.c { background: linear-gradient(135deg, #2a1a05, #4a2c0a); color: #FFD151; }
.vid-thumb.d { background: linear-gradient(135deg, #0a3528, #073d20); color: #95E1B7; }
.vid-thumb.e { background: linear-gradient(135deg, #311a45, #531c70); color: #E8C2FF; }
.vid-thumb.f { background: linear-gradient(135deg, #051a3d, #0c2c66); color: #B6D4FF; }
.vid-thumb .dur { position: absolute; right: 3px; bottom: 3px; background: rgba(0,0,0,0.78); color: #fff; font-family: var(--mono); font-size: 9px; padding: 1px 4px; border-radius: 3px; }
.vid-meta { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.vid-title { font-size: 13.5px; font-weight: 600; color: var(--ink); letter-spacing: -0.005em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vid-sub { display: flex; gap: 10px; font-size: 11.5px; color: var(--ink-3); font-family: var(--mono); }
.vid-sub .label { display: inline-flex; align-items: center; gap: 4px; font-family: var(--font); padding: 1px 7px; border-radius: var(--r-pill); font-size: 10.5px; font-weight: 600; }
.vid-sub .label.top { background: var(--success-tint); color: #157C3F; }
.vid-sub .label.opp { background: var(--violet-tint); color: var(--violet-deep); }
.vid-sub .label.attn { background: var(--warning-tint); color: #B0700C; }
.vid-sub .label.avg { background: var(--surface-alt); color: var(--ink-3); }

.vid-num { font-size: 13.5px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.vid-num .d { display: block; font-size: 10.5px; font-weight: 500; color: var(--ink-3); font-family: var(--mono); margin-top: 1px; }
.vid-num .d.up { color: var(--success); }
.vid-num .d.down { color: var(--warning); }
.vid-actbar { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.vid-actbar .pillct { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-family: var(--mono); padding: 2px 8px; border-radius: var(--r-pill); background: var(--surface-alt); color: var(--ink-3); }
.vid-actbar .pillct.has { background: var(--violet-tint); color: var(--violet-deep); font-weight: 600; }

.video-table {
  position: relative;
}

.competitor-video-list {
  position: relative;
}

.video-table.is-loading .vid-row:not(.head),
.video-table.is-loading .feed-pager,
.competitor-video-list.is-loading > :not(.video-table-loading):not(.video-table-error) {
  opacity: 0.42;
}

.video-table-loading,
.video-table-error {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.08);
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 800;
  padding: 10px 16px;
}

.video-table-error {
  color: var(--danger);
}

.s-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.s-card h3 { margin: 0; font-size: 17px; font-weight: 750; letter-spacing: -0.01em; color: var(--ink); }
.s-card .h-sub { font-size: 13px; font-weight: 600; color: var(--ink-3); margin-top: 4px; }
.s-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }

/* Home v2 right-column modules: Morning Brief, Channel Health, Competitor Intelligence. */
.home-module { gap: 16px; }
.morning-brief { background: linear-gradient(135deg, #F5FFF9, #FFF); border-color: #CFEEDD; padding: 20px 22px; gap: 16px; }
.morning-brief .rc-eyebrow { display: inline-flex; align-items: center; width: max-content; min-height: 28px; padding: 0 12px; border-radius: 999px; background: var(--success-tint); color: #157C3F; font-family: var(--mono); font-size: 12px; font-weight: 850; letter-spacing: 0; text-transform: none; margin-bottom: 0; }
.morning-brief .rc-title { margin: 12px 0 0; }
.morning-brief .rc-eyebrow + .rc-title { margin-top: 12px; }
.morning-brief .rc-sub { display: none; }
.channel-health .rc-title,
.home-ci .rc-title { font-size: 26px; line-height: 1.15; font-weight: 800; letter-spacing: -0.02em; }
.channel-health .rc-sub,
.home-ci .rc-sub { margin: 8px 0 0; font-size: 15px; line-height: 1.45; font-weight: 600; color: var(--ink-3); max-width: 42ch; }
.rc-eyebrow {
  display: flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 10px;
  padding: 5px 11px;
  border-radius: var(--r-pill);
  background: var(--success-tint);
  color: #157C3F;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.rc-eyebrow + .rc-title { margin-top: 0; }
.rc-title {
  margin: 14px 0 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.12;
}
.rc-sub {
  margin: 7px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-3);
  line-height: 1.45;
}
.module-empty {
  border: 1px dashed var(--border-2);
  border-radius: var(--r-md);
  background: var(--surface-alt);
  padding: 14px;
  color: var(--ink-3);
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.45;
}
.module-foot {
  margin-top: -4px;
  color: var(--ink-4);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 650;
}
.home-module-link { align-self: flex-start; }

/* Home Pre-Publish Intelligence. */
.ppi {
  padding: 0;
  overflow: hidden;
  position: relative;
  background:
    linear-gradient(118deg, rgba(12, 10, 40, 0.95) 0%, rgba(34, 22, 86, 0.82) 46%, rgba(20, 52, 92, 0.55) 100%),
    url('login-bg.png') center / cover no-repeat,
    #0B0A2A;
}
.ppi::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(560px 280px at 12% 116%, rgba(124, 92, 255, 0.26), transparent 70%);
}
.ppi > * {
  position: relative;
  z-index: 1;
}
.ppi-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.ppi-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 32px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
}
.ppi-eyebrow .ic {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  flex: none;
}
.ppi-eyebrow .ic svg,
.ppi-reset svg,
.ppi-go svg {
  width: 15px;
  height: 15px;
}
.ppi-reset {
  display: none;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 13px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(255, 255, 255, 0.30);
  background: rgba(255, 255, 255, 0.10);
  color: #fff;
  font-family: var(--font);
  font-size: 12.5px;
  font-weight: 750;
  cursor: pointer;
}
.ppi-reset:hover {
  background: rgba(255, 255, 255, 0.20);
  border-color: rgba(255, 255, 255, 0.55);
}
.ppi[data-state="result"] .ppi-reset,
.ppi[data-state="error"] .ppi-reset {
  display: inline-flex;
}
.ppi-pane {
  display: none;
}
.ppi[data-state="input"] .ppi-pane-input {
  display: block;
}
.ppi[data-state="loading"] .ppi-pane-loading {
  display: flex;
}
.ppi[data-state="result"] .ppi-pane-result {
  display: block;
}
.ppi[data-state="error"] .ppi-pane-error {
  display: flex;
}
.ppi-pane-input {
  padding: 12px 28px 38px;
}
.ppi-h {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.15;
}
.ppi-pane-input .ppi-h {
  color: #fff;
}
.ppi-sub {
  margin: 8px 0 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-3);
  line-height: 1.5;
  max-width: 64ch;
}
.ppi-pane-input .ppi-sub {
  color: rgba(255, 255, 255, 0.82);
}
.ppi-field {
  display: flex;
  gap: 10px;
  align-items: stretch;
}
.ppi-field input {
  flex: 1;
  min-width: 0;
  height: 50px;
  border: 1px solid var(--border-2);
  border-radius: var(--r-md);
  background: var(--surface);
  padding: 0 16px;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 650;
  color: var(--ink);
  letter-spacing: -0.01em;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.ppi-field input::placeholder {
  color: var(--ink-4);
  font-weight: 500;
}
.ppi-field input:focus {
  outline: none;
  border-color: var(--violet);
  box-shadow: 0 0 0 3px var(--violet-tint);
}
.ppi-go {
  flex: none;
  height: 50px;
  padding: 0 20px;
  border: 0;
  border-radius: var(--r-md);
  background: var(--grad);
  color: #fff;
  font-family: var(--font);
  font-size: 14.5px;
  font-weight: 800;
  letter-spacing: -0.005em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(108, 77, 255, 0.26);
  transition: filter .15s ease;
}
.ppi-go:hover {
  filter: brightness(1.05);
}
.ppi-hint {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.64);
}
.ppi-hint svg {
  width: 13px;
  height: 13px;
  flex: none;
}
.ppi-inline-err {
  display: none;
  align-items: center;
  gap: 9px;
  margin-top: 12px;
  padding: 11px 13px;
  border: 1px solid var(--danger);
  border-radius: var(--r-sm);
  background: var(--danger-tint);
  color: var(--danger);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.35;
}
.ppi-inline-err.show {
  display: flex;
}
.ppi-inline-err svg {
  width: 16px;
  height: 16px;
  flex: none;
}
.ppi-pane-loading {
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 46px 22px 50px;
}
.ppi-orb {
  position: relative;
  width: 64px;
  height: 64px;
  margin-bottom: 22px;
}
.ppi-orb .core {
  position: absolute;
  inset: 0;
  border-radius: 18px;
  background: var(--grad);
  display: grid;
  place-items: center;
  box-shadow: 0 14px 36px rgba(108, 77, 255, 0.34);
  animation: ppi-bob 2.4s ease-in-out infinite;
}
.ppi-orb .core svg {
  width: 30px;
  height: 30px;
}
.ppi-orb .ring {
  position: absolute;
  inset: 0;
  border-radius: 18px;
  border: 2px solid var(--violet);
  opacity: 0;
  animation: ppi-ring 2.4s ease-out infinite;
}
.ppi-orb .ring.r2 {
  animation-delay: 1.2s;
}
@keyframes ppi-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
@keyframes ppi-ring {
  0% { transform: scale(1); opacity: .5; }
  100% { transform: scale(1.7); opacity: 0; }
}
.ppi-load-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: #fff;
  max-width: 52ch;
  line-height: 1.3;
}
.ppi-load-step {
  margin-top: 10px;
  font-size: 13.5px;
  font-weight: 650;
  color: rgba(255, 255, 255, 0.72);
  min-height: 19px;
}
.ppi-load-bar {
  margin-top: 22px;
  width: min(360px, 80%);
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  overflow: hidden;
  position: relative;
}
.ppi-load-bar span {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -40%;
  width: 40%;
  border-radius: 999px;
  background: var(--grad);
  animation: ppi-slide 1.25s ease-in-out infinite;
}
@keyframes ppi-slide {
  0% { left: -42%; }
  100% { left: 102%; }
}
.ppi-pane-error {
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 44px 22px 46px;
}
.ppi-err-ic {
  width: 52px;
  height: 52px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: rgba(234, 77, 95, 0.20);
  color: #FFB3BD;
  margin-bottom: 16px;
}
.ppi-err-ic svg {
  width: 25px;
  height: 25px;
}
.ppi-pane-error h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: #fff;
}
.ppi-pane-error p {
  margin: 8px 0 0;
  font-size: 13.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.5;
  max-width: 46ch;
}
.ppi-err-acts {
  margin-top: 20px;
  display: flex;
  gap: 10px;
}
.ppi-err-acts button {
  height: 42px;
  padding: 0 18px;
  border-radius: var(--r-md);
  font-family: var(--font);
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
}
.ppi-err-acts .retry {
  border: 0;
  background: var(--grad);
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.ppi-err-acts .retry svg {
  width: 15px;
  height: 15px;
}
.ppi-err-acts .over {
  border: 1px solid rgba(255, 255, 255, 0.30);
  background: rgba(255, 255, 255, 0.10);
  color: #fff;
}
.ppi-err-acts .over:hover {
  background: rgba(255, 255, 255, 0.20);
}
.ppi-pane-result {
  padding: 22px;
}
.ppi-rbody {
  background: var(--surface);
  border-radius: 16px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 14px 34px rgba(9, 13, 36, 0.20);
}
.ppi-lbl {
  display: block;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-4);
  margin-bottom: 7px;
}
.ppi-rhead {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.ppi-rhead h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.25;
}
.ppi-verdict {
  flex: none;
  padding: 6px 13px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: -0.005em;
}
.ppi-verdict.good {
  background: var(--success-tint);
  color: #157C3F;
}
.ppi-verdict.warn {
  background: var(--warning-tint);
  color: #B0700C;
}
.ppi-verdict.bad {
  background: var(--danger-tint);
  color: var(--danger);
}
.ppi-verdict.neutral {
  background: var(--surface-2);
  color: var(--ink-3);
}
.ppi-scores {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.ppi-score {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-alt);
  padding: 13px 14px;
}
.ppi-score .num {
  display: block;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  margin: 5px 0 7px;
  font-variant-numeric: tabular-nums;
}
.ppi-score .num .max {
  font-size: 13px;
  font-weight: 750;
  color: var(--ink-4);
}
.ppi-score .desc {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-3);
  line-height: 1.45;
}
.ppi-score.good .num {
  color: #1F9D57;
}
.ppi-score.warn .num {
  color: var(--warning);
}
.ppi-score.bad .num {
  color: var(--danger);
}
.ppi-reason,
.ppi-evidence {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-alt);
  padding: 14px 16px;
}
.ppi-reason p {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  line-height: 1.55;
}
.ppi-reason .relied {
  margin-top: 9px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  font-style: italic;
  color: var(--ink-4);
  line-height: 1.4;
}
.ppi-reco {
  border: 1px solid var(--violet);
  border-radius: var(--r-md);
  background: var(--violet-tint);
  padding: 15px 17px;
}
.ppi-reco .lbl-v {
  color: var(--violet-deep);
}
.ppi-reco h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--ink);
  line-height: 1.3;
}
.ppi-reco .meta {
  margin-top: 11px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.ppi-reco .meta span {
  background: var(--surface);
  color: var(--violet-deep);
  font-size: 11.5px;
  font-weight: 800;
  padding: 4px 11px;
  border-radius: var(--r-pill);
}
.ppi-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.ppi-box {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  padding: 14px 16px;
}
.ppi-alts,
.ppi-beats,
.ppi-ev-items {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ppi-alts li .t,
.ppi-ev-items li .t {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.3;
}
.ppi-alts li .angle {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 850;
  color: var(--violet-deep);
}
.ppi-alts li .d,
.ppi-ev-items li .d {
  margin: 4px 0 0;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-3);
  line-height: 1.45;
}
.ppi-thumbs {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.ppi-thumb-rec {
  background: var(--ink);
  color: #FFD54F;
  padding: 11px 12px;
  border-radius: var(--r-sm);
  font-weight: 950;
  font-size: 15px;
  text-align: center;
  letter-spacing: 0.04em;
}
.ppi-thumb-opt {
  background: var(--surface-alt);
  border-left: 3px solid var(--violet);
  border-radius: var(--r-sm);
  padding: 9px 12px;
}
.ppi-thumb-opt .t {
  display: block;
  font-size: 12.5px;
  font-weight: 850;
  color: var(--ink);
}
.ppi-thumb-opt .role {
  display: block;
  margin-top: 2px;
  font-size: 10.5px;
  font-weight: 800;
  color: var(--violet-deep);
}
.ppi-thumb-opt .d {
  margin: 4px 0 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-3);
  line-height: 1.4;
}
.ppi-hook {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
  line-height: 1.55;
  margin: 0 0 12px;
}
.ppi-length {
  display: flex;
  align-items: baseline;
  gap: 9px;
  flex-wrap: wrap;
}
.ppi-length b {
  background: var(--violet-tint);
  color: var(--violet-deep);
  padding: 4px 11px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 850;
}
.ppi-length span {
  font-size: 11px;
  font-weight: 600;
  font-style: italic;
  color: var(--ink-3);
  line-height: 1.4;
  flex: 1;
  min-width: 140px;
}
.ppi-beats li {
  display: flex;
  gap: 9px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-2);
  line-height: 1.45;
}
.ppi-beats li .time {
  flex: none;
  background: var(--ink);
  color: #fff;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 5px;
  height: fit-content;
}
.ppi-call {
  margin-top: 12px;
  background: var(--success-tint);
  border-left: 4px solid var(--success);
  border-radius: var(--r-sm);
  padding: 11px 13px;
}
.ppi-call.warn {
  background: var(--warning-tint);
  border-left-color: var(--warning);
}
.ppi-call.bad {
  background: var(--danger-tint);
  border-left-color: var(--danger);
}
.ppi-call.neutral {
  background: var(--surface-2);
  border-left-color: var(--ink-3);
}
.ppi-call .t {
  display: block;
  font-size: 12px;
  font-weight: 900;
  color: #157C3F;
}
.ppi-call.warn .t {
  color: #B0700C;
}
.ppi-call.bad .t {
  color: var(--danger);
}
.ppi-call.neutral .t {
  color: var(--ink-3);
}
.ppi-call p {
  margin: 5px 0 0;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
  line-height: 1.45;
}
.ppi-footprint {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.ppi-fp {
  background: var(--surface-2);
  color: var(--ink-3);
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
}

.mb-list { margin-top: 0; display: flex; flex-direction: column; gap: 16px; }
.mb-row { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 14px; align-items: start; padding: 18px; border: 1px solid var(--border); border-radius: 14px; background: linear-gradient(135deg, #FFFFFF, #FBFFFD); }
.mb-row:first-child { border-top: 1px solid var(--border); padding-top: 18px; }
.mb-row:last-child { padding-bottom: 18px; }
.mb-ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex: none; font-size: 24px; font-weight: 900; line-height: 1; }
.mb-ico svg { width: 22px; height: 22px; }
.mb-ico.up { background: var(--success-tint); color: #18A96D; box-shadow: inset 0 0 0 1px rgba(24, 169, 109, .16); }
.mb-ico.down { background: var(--warning-tint); color: #E0901F; box-shadow: inset 0 0 0 1px rgba(240, 162, 58, .20); }
.mb-ico.neutral { background: var(--violet-tint); color: var(--violet); box-shadow: inset 0 0 0 1px rgba(101, 84, 246, .16); }
.mb-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 5px; flex-wrap: wrap; }
.mb-h { min-width: 0; font-size: 17px; font-weight: 800; letter-spacing: -0.01em; color: var(--ink); line-height: 1.3; }
.mb-delta { flex: none; min-height: 24px; display: inline-flex; align-items: center; padding: 0 9px; border-radius: 999px; font-size: 11px; font-weight: 900; font-family: var(--font); white-space: nowrap; }
.mb-delta.pos { background: var(--success-tint); color: #157C3F; }
.mb-delta.neg { background: var(--warning-tint); color: #B0700C; }
.mb-delta.neu { background: var(--surface-2); color: var(--ink-2); }
.mb-body { margin: 0; font-size: 15px; font-weight: 650; color: #566078; line-height: 1.42; }

.chs-list { display: flex; flex-direction: column; gap: 14px; }
.chs-card { border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-alt); padding: 16px; }
.chs-eyebrow { display: flex; align-items: center; gap: 9px; }
.chs-eyebrow .ico { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex: none; }
.chs-eyebrow .ico svg { width: 15px; height: 15px; }
.chs-eyebrow .ico.mom { background: var(--success-tint); color: #1F9D57; }
.chs-eyebrow .ico.rev { background: var(--warning-tint); color: var(--warning); }
.chs-eyebrow .ico.upl { background: var(--violet-tint); color: var(--violet); }
.chs-eyebrow .lbl { font-size: 11px; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.chs-top { display: grid; grid-template-columns: 92px 1fr; gap: 14px; align-items: center; margin-top: 12px; }
.chs-headtext h4 { margin: 0; font-size: 16px; font-weight: 800; letter-spacing: -0.015em; color: var(--ink); line-height: 1.2; }
.chs-headtext p { margin: 5px 0 0; font-size: 12.5px; font-weight: 700; line-height: 1.4; }
.chs-headtext p.warn { color: var(--danger); }
.chs-headtext p.neu { color: var(--ink-3); font-weight: 600; }
.chs-headtext p.good { color: #157C3F; }
.gauge { position: relative; width: 92px; height: 56px; }
.gauge svg { width: 92px; height: 56px; display: block; }
.gauge .score { position: absolute; left: 0; right: 0; bottom: -2px; text-align: center; font-size: 23px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); }
.chs-chips { display: flex; flex-wrap: wrap; gap: 7px 14px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.chs-chip { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11px; white-space: nowrap; }
.chs-chip .k { color: var(--ink-3); font-weight: 700; }
.chs-chip .v { padding: 2px 8px; border-radius: var(--r-pill); font-weight: 850; }
.chs-chip .v.pos { background: var(--success-tint); color: #157C3F; }
.chs-chip .v.neg { background: var(--danger-tint); color: var(--danger); }
.chs-chip .v.neu { background: var(--surface-2); color: var(--ink-2); }

.ci-list { display: flex; flex-direction: column; gap: 14px; }
.ci-card { border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-alt); padding: 16px; }
.ci-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ci-rank { background: var(--ink); color: #fff; font-family: var(--mono); font-size: 11.5px; font-weight: 800; padding: 2px 9px; border-radius: var(--r-pill); }
.ci-snap { font-family: var(--mono); font-size: 11.5px; font-weight: 700; color: var(--ink-3); }
.ci-snap b { color: var(--ink-2); font-weight: 800; }
.ci-vod { font-size: 10.5px; font-weight: 850; letter-spacing: 0.04em; padding: 2px 8px; border-radius: var(--r-pill); background: var(--violet-tint); color: var(--violet-deep); }
.ci-meta { margin-top: 11px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ci-meta .nm { font-size: 13.5px; font-weight: 800; color: var(--ink); }
.ci-meta .dt { font-family: var(--mono); font-size: 11.5px; font-weight: 600; color: var(--ink-3); }
.ci-views { font-family: var(--mono); font-size: 11.5px; font-weight: 850; padding: 2px 8px; border-radius: var(--r-pill); background: var(--success-tint); color: #157C3F; }
.ci-vtitle { margin: 9px 0 0; font-size: 14.5px; font-weight: 800; letter-spacing: -0.01em; color: var(--ink); line-height: 1.32; }
.ci-ever { margin-top: 12px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface); padding: 12px 13px; }
.ci-ever .lab { font-size: 13px; font-weight: 800; color: var(--ink); }
.ci-ever .lab .lvl { color: #1F9D57; }
.ci-ever .lab .lvl.medium { color: #B0700C; }
.ci-ever .lab .lvl.low { color: var(--danger); }
.ci-ever .lab .lvl.unknown { color: var(--ink-3); }
.ci-ever .desc { margin: 6px 0 0; font-size: 12.5px; font-weight: 650; color: var(--ink-2); line-height: 1.45; }
.ci-ever .basis { margin: 8px 0 0; font-size: 11.5px; font-weight: 600; font-style: italic; color: var(--ink-3); line-height: 1.45; }
.ci-angle { margin-top: 10px; border-radius: var(--r-sm); background: var(--violet-tint); padding: 12px 13px; }
.ci-angle .lab { font-size: 10.5px; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; color: var(--violet-deep); }
.ci-angle .at { margin: 6px 0 0; font-size: 14px; font-weight: 800; letter-spacing: -0.01em; color: var(--ink); line-height: 1.3; }
.ci-angle .ar { margin: 6px 0 0; font-size: 12.5px; font-weight: 600; color: var(--ink-2); line-height: 1.45; }

.impact-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.impact-stat { background: var(--surface-alt); border: 1px solid var(--border); border-radius: var(--r-md); padding: 11px 13px; }
.impact-stat .v { font-size: 22px; font-weight: 700; letter-spacing: -0.025em; color: var(--ink); line-height: 1; }
.impact-stat .k { font-size: 11px; color: var(--ink-3); margin-top: 5px; letter-spacing: -0.005em; }
.impact-rows { display: flex; flex-direction: column; gap: 8px; }
.impact-row { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; background: var(--surface-alt); border-radius: var(--r-md); border: 1px solid var(--border); }
.impact-row .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; margin-top: 5px; }
.impact-row.executed .dot { background: var(--success); }
.impact-row.committed .dot { background: var(--blue); }
.impact-row.expired .dot { background: var(--warning); }
.impact-row.unverif .dot { background: var(--ink-3); }
.impact-row .b { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.impact-row .t { font-size: 12.5px; font-weight: 600; color: var(--ink); letter-spacing: -0.005em; }
.impact-row .s { font-size: 11px; color: var(--ink-3); font-family: var(--mono); }
.impact-row .delta { font-size: 11.5px; font-weight: 600; font-family: var(--mono); color: var(--success); }

.comp-list { display: flex; flex-direction: column; gap: 8px; }
.comp-row { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-alt); }
.comp-av { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, #95E1B7, #2B7FAA); flex: none; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 12px; }
.comp-av.b { background: linear-gradient(135deg, #FFC1A0, #E8855E); }
.comp-av.c { background: linear-gradient(135deg, #DDD3FF, #6C4DFF); }
.comp-av.d { background: linear-gradient(135deg, #B6D4FF, #2B7FAA); }
.comp-name { font-size: 13px; font-weight: 600; color: var(--ink); }
.comp-meta { font-size: 11px; color: var(--ink-3); font-family: var(--mono); }

.metric-tabs { display: flex; flex-wrap: wrap; gap: 4px; background: var(--surface-alt); padding: 3px; border-radius: var(--r-sm); border: 1px solid var(--border); }
.metric-tabs button { flex: 1; font: inherit; font-size: 11.5px; font-weight: 500; background: transparent; border: 0; padding: 5px 9px; border-radius: 7px; color: var(--ink-3); cursor: pointer; }
.metric-tabs button.active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 0 var(--border); font-weight: 600; }

.empty { font-size: 12px; color: var(--ink-3); padding: 8px 0; text-align: center; }

/* Page-specific helpers */
.ca-kpi-grid,
.kpi-strip-full { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.ca-kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; min-height: 112px; }
.ca-kpi .k { font-size: 10px; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.ca-kpi .v { font-size: 25px; font-weight: 750; letter-spacing: -0.02em; color: var(--ink); line-height: 1; font-variant-numeric: tabular-nums; }
.ca-kpi .v .unit { font-size: 14px; font-weight: 650; color: var(--ink-3); margin-left: 2px; }
.ca-kpi .d { font-size: 12px; font-weight: 800; font-family: var(--mono); color: var(--success); }
.ca-kpi .d.down { color: var(--danger); }
.ca-kpi .d.flat { color: var(--ink-3); }
.kpi-tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.kpi-tile .k { font-size: 10px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.kpi-tile .v { font-size: 26px; font-weight: 700; letter-spacing: -0.025em; color: var(--ink); line-height: 1.1; margin-top: 2px; }
.kpi-tile .v .unit { font-size: 13px; font-weight: 500; color: var(--ink-3); margin-left: 2px; }
.kpi-tile .d { font-size: 11px; font-family: var(--mono); color: var(--success); }
.kpi-tile .d.down { color: var(--danger); }
.kpi-tile .spark { margin-top: 6px; }

.chart-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; }
.chart-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.chart-area { aspect-ratio: 24 / 6; width: 100%; }
.chart-legend { display: flex; gap: 16px; font-size: 11.5px; color: var(--ink-3); font-family: var(--mono); }
.chart-legend .lg { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend .sw { width: 10px; height: 10px; border-radius: 2px; }

.dist-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.dist-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.dist-card h3 { margin: 0; font-size: 14px; font-weight: 600; color: var(--ink); }
.dist-row { display: grid; grid-template-columns: 1fr 60px 70px; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px dashed var(--border); }
.dist-row:last-child { border-bottom: 0; }
.dist-row .lbl { font-size: 12.5px; color: var(--ink-2); }
.dist-row .lbl .sub { display: block; font-size: 10.5px; color: var(--ink-4); font-family: var(--mono); }
.dist-row .bar { height: 6px; border-radius: var(--r-pill); background: var(--surface-2); position: relative; overflow: hidden; }
.dist-row .bar::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; background: var(--grad); border-radius: var(--r-pill); width: var(--pct, 60%); }
.dist-row .pct { font-size: 11px; font-family: var(--mono); color: var(--ink-3); text-align: right; }

/* Impact page — missed-opportunity 4-stat micro-card */
.miss-stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; align-items: end; background: var(--surface-alt); border-radius: var(--r-sm); padding: 12px 14px; }

/* INSIGHT DETAIL PANEL pieces */
.in-detail { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: 24px 26px; display: flex; flex-direction: column; gap: 20px; }
.in-detail h2 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -0.015em; color: var(--ink); line-height: 1.25; }
.in-pipe { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--border); }
.in-pipe-step { padding: 14px 16px; background: var(--surface-alt); border-right: 1px solid var(--border); position: relative; }
.in-pipe-step:last-child { border-right: 0; }
.in-pipe-step::after { content: ""; position: absolute; right: -7px; top: 50%; width: 14px; height: 14px; transform: translateY(-50%) rotate(45deg); background: var(--surface-alt); border-top: 1px solid var(--border); border-right: 1px solid var(--border); z-index: 2; }
.in-pipe-step:last-child::after { display: none; }
.in-pipe-step .num { font-family: var(--mono); font-size: 10px; color: var(--ink-3); }
.in-pipe-step .label { font-size: 10px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); margin-top: 4px; }
.in-pipe-step .val { font-size: 13px; color: var(--ink); margin-top: 4px; line-height: 1.35; }

/* Action card states */
.act-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: 18px 20px; display: grid; grid-template-columns: 80px 1fr 220px; gap: 18px; align-items: stretch; }
.act-list { display: flex; flex-direction: column; gap: 12px; }
/* renderActions wraps cards in a generic `.list` (not `.act-list`), so
   .list .act-card rows would render edge-to-edge with no breathing room
   AND no breathing room from the surrounding .feed-card container.
   Pad the .list when it holds act-cards (per-card breathing + outer
   padding to the .feed-card frame), and use a 12px between-card gap. */
.list:has(> .act-card) { padding: 14px 16px; }
.list > .act-card { margin-top: 12px; }
.list > .act-card:first-child { margin-top: 0; }
.act-card .body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.act-card .meta { display: flex; gap: 16px; font-size: 11.5px; color: var(--ink-3); font-family: var(--mono); flex-wrap: wrap; }
.act-card .meta b { color: var(--ink-2); font-weight: 500; }
.act-card .stamps { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.act-card .stage { display: flex; flex-direction: column; gap: 6px; padding: 12px; background: var(--surface-alt); border: 1px solid var(--border); border-radius: var(--r-md); }
.act-card .stage .row { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--ink-3); }
.act-card .stage .row b { color: var(--ink); font-weight: 600; }

.timeline { display: flex; flex-direction: column; gap: 0; padding: 6px 0 0; }
.tl-row { display: grid; grid-template-columns: 110px 18px 1fr; gap: 10px; padding: 10px 0; position: relative; }
.tl-row::before { content: ""; position: absolute; left: 119px; top: 0; bottom: 0; width: 2px; background: var(--border); }
.tl-row:first-child::before { top: 16px; }
.tl-row:last-child::before { bottom: 18px; }
.tl-row .when { font-size: 11.5px; color: var(--ink-3); font-family: var(--mono); padding-top: 1px; }
.tl-row .pin { width: 18px; display: grid; place-items: center; position: relative; z-index: 2; }
.tl-row .pin .blob { width: 10px; height: 10px; border-radius: 50%; background: var(--ink-3); border: 2px solid var(--surface); margin-top: 4px; }
.tl-row.violet .pin .blob { background: var(--violet); }
.tl-row.success .pin .blob { background: var(--success); }
.tl-row.warning .pin .blob { background: var(--warning); }
.tl-row.blue .pin .blob { background: var(--blue); }
.tl-row .what { display: flex; flex-direction: column; gap: 2px; }
.tl-row .what .t { font-size: 13px; color: var(--ink); font-weight: 500; }
.tl-row .what .s { font-size: 11.5px; color: var(--ink-3); }

/* COMPETITOR specific */
.comp-snapshot-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
.comp-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.comp-card .head { display: flex; align-items: center; gap: 12px; }
.comp-card .av-lg { width: 44px; height: 44px; border-radius: 50%; flex: none; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 16px; background: linear-gradient(135deg, #95E1B7, #2B7FAA); }
.comp-card .av-lg.b { background: linear-gradient(135deg, #FFC1A0, #E8855E); }
.comp-card .av-lg.c { background: linear-gradient(135deg, #DDD3FF, #6C4DFF); }
.comp-card .av-lg.d { background: linear-gradient(135deg, #B6D4FF, #2B7FAA); }
.comp-card .nm { font-size: 16px; font-weight: 700; color: var(--ink); letter-spacing: -0.015em; }
.comp-card .hd { margin-top: 2px; }
.comp-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.comp-stat { padding: 8px 10px; border: 1px solid var(--border); background: var(--surface-alt); border-radius: var(--r-md); }
.comp-stat .k { font-size: 10px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.comp-stat .v { font-size: 16px; font-weight: 700; color: var(--ink); margin-top: 2px; }
.comp-mix { display: flex; gap: 4px; height: 6px; border-radius: var(--r-pill); overflow: hidden; }
.comp-mix .seg { height: 100%; }
.comp-mix .vod { background: var(--violet); }
.comp-mix .short { background: var(--blue); }
.comp-mix .live { background: var(--warning); }
.comp-mix-legend { display: flex; gap: 10px; font-size: 10.5px; color: var(--ink-3); font-family: var(--mono); }
.comp-mix-legend .lg { display: inline-flex; align-items: center; gap: 4px; }
.comp-mix-legend .sw { width: 8px; height: 8px; border-radius: 2px; }

.gap-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.gap-card h3 { margin: 0; font-size: 14px; font-weight: 600; color: var(--ink); }
.gap-row { padding: 10px 12px; background: var(--surface-alt); border: 1px solid var(--border); border-radius: var(--r-md); display: flex; flex-direction: column; gap: 4px; }
.gap-row .h { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.gap-row .b { font-size: 12px; color: var(--ink-2); line-height: 1.45; }

/* donut distribution cards */
.donut-card { gap: 8px; }
.donut-cap { font-size: 12px; color: var(--ink-3); margin-top: -4px; }
.donut-body { display: grid; grid-template-columns: 130px 1fr; gap: 14px; align-items: center; margin-top: 6px; }
.donut-svg { width: 100%; height: auto; display: block; }
.donut-svg .donut-h { font-size: 18px; font-weight: 600; fill: var(--ink); letter-spacing: -0.02em; font-family: var(--sans, inherit); }
.donut-svg .donut-s { font-size: 8px; fill: var(--ink-3); font-family: var(--mono); letter-spacing: 0.04em; text-transform: uppercase; }
.donut-legend { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.dl-row { display: grid; grid-template-columns: 10px 1fr auto; gap: 8px; align-items: center; font-size: 12px; min-width: 0; }
.dl-sw { width: 10px; height: 10px; border-radius: 2px; }
.dl-lbl { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.dl-lbl .dl-sub { display: block; font-size: 10px; color: var(--ink-4); font-family: var(--mono); }
.dl-pct { font-size: 11px; font-family: var(--mono); color: var(--ink-3); text-align: right; }

/* component IDs — handoff labels */
.cid { display: inline-block; font-family: var(--mono); font-size: 10px; font-weight: 500; color: var(--ink-4); background: var(--surface-alt); padding: 2px 6px; border-radius: 4px; letter-spacing: 0.02em; vertical-align: middle; margin-left: 8px; user-select: all; }
.cid::before { content: "id "; color: var(--ink-4); opacity: 0.55; }
h1 .cid, h2 .cid, h3 .cid, h4 .cid { font-weight: 500; }
.cid-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* Dynamic binding aliases.
   The exported dashboard.css above is the visual source of truth. These rules only
   map API-rendered helper classes onto the same spacing, typography, and surfaces. */
button,
input,
textarea { font: inherit; }
.feed-tab {
  appearance: none;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  font-family: var(--font);
}
.live-row { display: flex; gap: 10px; align-items: center; font-size: 12px; color: var(--ink-3); margin-bottom: 8px; }
.pulse { width: 7px; height: 7px; background: var(--success); border-radius: 50%; box-shadow: 0 0 0 0 rgba(34,197,94,.5); animation: pulse 2s infinite; }
.sub { color: var(--ink-3); margin-top: 6px; max-width: 780px; }
.card,
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); }
.panel,
.side-card { padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.list { display: flex; flex-direction: column; }
.mono { font-family: var(--mono); }
.muted { color: var(--ink-3); }
.small { font-size: 12px; }
.tiny-text { font-size: 11px; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: var(--r-pill);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  background: var(--surface-alt);
  color: var(--ink-3);
}
.pill.good { background: var(--success-tint); color: #157C3F; }
.pill.warn { background: var(--warning-tint); color: #B0700C; }
.pill.violet { background: var(--violet-tint); color: var(--violet-deep); }
.pill.blue { background: var(--blue-tint); color: #2B7FAA; }
.side-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mini-stat { background: var(--surface-alt); border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px; }
.mini-stat b { color: var(--ink); font-size: 20px; display: block; }
.change,
.competitor,
.queue-row,
.video-row,
.data-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}
.change:first-child,
.competitor:first-child,
.queue-row:first-child,
.video-row:first-child,
.data-row:first-child { border-top: 0; }
.video-row.clickable { cursor: pointer; transition: background 0.12s ease; }
.video-row.clickable:hover { background: var(--surface-alt); }
.video-row.clickable:focus-visible { outline: 2px solid var(--violet); outline-offset: -2px; }
.queue-row .bar { height: 7px; width: 86px; border-radius: var(--r-pill); background: var(--surface-2); overflow: hidden; }
.queue-row .bar i { height: 100%; display: block; background: var(--grad); }
.video-table,
.data-table { overflow: hidden; }
.table-head,
.video-row,
.data-row {
  display: grid;
  /* C-006: 6 metric columns now (Views / CTR / Retention / Watch / RPM / Insights). */
  grid-template-columns: minmax(0, 1.7fr) repeat(6, minmax(64px, .5fr));
  gap: 12px;
  align-items: center;
}
.table-head {
  padding: 12px 18px;
  color: var(--ink-3);
  font-size: 10px;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: .08em;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
}
.video-row,
.data-row { padding: 13px 18px; }
.video-title { display: flex; gap: 12px; align-items: center; min-width: 0; }
.video-title .thumb {
  /* Pin both dimensions in pixels (instead of width + aspect-ratio) so
     the thumb renders at exactly the same size regardless of the parent
     row's intrinsic height. aspect-ratio inside a flex item can get
     resolved against the FLEX cross-axis size when the row is taller
     than 40.5px, producing visibly different thumb widths between rows.
     flex: none locks it against shrink/grow as the row content widens. */
  width: 96px;
  height: 54px;
  flex: none;
  border-radius: 7px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #1a1a1f, #2c1810);
  display: grid;
  place-items: center;
  color: #FFD68A;
  font-size: 10px;
  font-weight: 800;
}
.video-title .thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.page-empty,
.error {
  padding: 18px 22px;
  border: 1px dashed var(--border-2);
  border-radius: var(--r-md);
  color: var(--ink-3);
  background: var(--surface);
}
.error { color: var(--danger); background: var(--danger-tint); }
.note { border: 1px dashed var(--border-2); background: var(--surface-alt); color: var(--ink-3); border-radius: var(--r-sm); padding: 8px 10px; font-size: 12px; }
.cta-row { display: flex; gap: 6px; }
.cta-row .btn { flex: 1; }
.analytics-kpi small {
  display: block;
  color: var(--success);
  font-family: var(--mono);
  font-weight: 700;
  margin-top: 8px;
}
.analytics-kpi small.down { color: var(--warning); }

.analytics-hero, .analytics-panel {
  padding: 22px;
}
.analytics-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}
.analytics-grid {
  display: grid;
  gap: 18px;
}
.analytics-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.analytics-grid.two, .analytics-grid.lower { grid-template-columns: minmax(0, 1.65fr) minmax(360px, .9fr); }

.line-chart {
  position: relative;
  background: linear-gradient(180deg, #ffffff 0%, #f8faff 100%);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
}
.line-chart svg { display: block; width: 100%; height: auto; }
.grid-line { stroke: #e8ecf5; stroke-width: 1; }
.area-path { fill: url(#areaFill); }
.line-path {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.line-path.primary { stroke: var(--violet); }
.line-path.secondary { stroke: var(--blue); opacity: .9; }
.line-dot { fill: var(--violet); stroke: white; stroke-width: 3; }
.axis-label {
  fill: var(--ink-4);
  font: 11px var(--mono);
}
.legend {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-3);
  font-size: 12px;
  font-family: var(--mono);
}
.swatch {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  display: inline-block;
}
.swatch.violet { background: var(--violet); }
.swatch.blue { background: var(--blue); }
.chart-empty {
  border: 1px dashed var(--border-2);
  border-radius: var(--r-md);
  padding: 42px;
  color: var(--ink-3);
  background: var(--surface-alt);
  text-align: center;
}
.annotation-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.annotation-strip span {
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--ink-3);
  border-radius: var(--r-pill);
  padding: 5px 9px;
  font-family: var(--mono);
  font-size: 11px;
}

.donut-layout {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  margin-top: 16px;
}
.donut {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  background: conic-gradient(var(--donut));
  display: grid;
  place-items: center;
  position: relative;
  box-shadow: inset 0 0 0 1px var(--border);
}
.donut::after {
  content: "";
  position: absolute;
  inset: 31px;
  border-radius: 50%;
  background: white;
  box-shadow: inset 0 0 0 1px var(--border);
}
.donut div {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 74px;
}
.donut b {
  color: var(--ink);
  display: block;
  font-size: 24px;
  line-height: 1;
}
.donut span {
  color: var(--ink-3);
  display: block;
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.2;
  margin-top: 5px;
  text-transform: uppercase;
}
.rank-list, .share-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rank-row {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}
.rank-row i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}
.rank-row b, .share-row b {
  display: block;
  color: var(--ink-2);
  font-size: 13px;
}
.rank-row span, .share-row span {
  display: block;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 10.5px;
}
.rank-row strong, .share-row strong {
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 12px;
}
/* C-007: prior-period delta chips on distribution rows.
   Green for improvement, red for decline, neutral grey for flat /
   unavailable. Sits inline next to the share %, monospace + small. */
.delta-chip { display: inline-block; margin-left: 6px; font-family: var(--mono); font-size: 10.5px; font-weight: 500; padding: 1px 5px; border-radius: 4px; background: var(--surface-alt); color: var(--ink-3); }
.delta-chip.delta-up { background: var(--success-tint); color: #157C3F; }
.delta-chip.delta-down { background: var(--danger-tint, #FDE7E7); color: var(--danger); }
.delta-chip.delta-flat { background: var(--surface-alt); color: var(--ink-3); }

/* C-009: subheader inside the revenue panel above the by-content-type
   list. Same visual weight as `.section-head .sub` but inline. */
.revenue-section-head { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; color: var(--ink-3); margin: 12px 0 6px; padding-top: 6px; border-top: 1px solid var(--border); }

.id-chip {
  color: var(--ink-4);
  background: var(--surface-alt);
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 10px;
  padding: 2px 6px;
  margin-left: 6px;
  vertical-align: middle;
}
.share-row {
  display: grid;
  grid-template-columns: minmax(160px, .8fr) minmax(120px, 1fr) 52px;
  gap: 12px;
  align-items: center;
}
.share-bar {
  height: 9px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  overflow: hidden;
}
.share-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
}
.revenue-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.revenue-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  border-radius: var(--r-md);
  padding: 12px 14px;
}
.revenue-row b,
.revenue-row strong {
  color: var(--ink);
}
.revenue-row span {
  display: block;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 11px;
}

.crumb-row { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--ink-3); margin-bottom: 10px; }
.pulse-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); animation: pulse 2s infinite; }
.vid-thumb { aspect-ratio: 16/9; border-radius: 7px; position: relative; overflow: hidden; background: linear-gradient(135deg, #1a1a1f, #2c1810); display: grid; place-items: center; color: #FFD68A; font-size: 10px; font-weight: 800; text-align: center; padding: 4px; text-shadow: 0 1px 3px rgba(0,0,0,0.5); }
.vid-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vid-thumb.b { background: linear-gradient(135deg, #1f1a3b, #321b59); color: #DDD3FF; }
.vid-thumb.c { background: linear-gradient(135deg, #2a1a05, #4a2c0a); color: #FFD151; }
.vid-thumb.d { background: linear-gradient(135deg, #0a3528, #073d20); color: #95E1B7; }
.vid-thumb.e { background: linear-gradient(135deg, #311a45, #531c70); color: #E8C2FF; }
.vid-thumb.f { background: linear-gradient(135deg, #051a3d, #0c2c66); color: #B6D4FF; }
.vid-thumb .dur { position: absolute; right: 3px; bottom: 3px; background: rgba(0,0,0,0.78); color: #fff; font-family: var(--mono); font-size: 9px; padding: 1px 4px; border-radius: 3px; z-index: 1; }
.dist-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.comp-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.comp-card .head { display: flex; align-items: center; gap: 12px; }
.comp-card .av-lg { width: 44px; height: 44px; border-radius: 50%; flex: none; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 16px; background: linear-gradient(135deg, #95E1B7, #2B7FAA); }
.comp-card .av-lg.b { background: linear-gradient(135deg, #FFC1A0, #E8855E); }
.comp-card .av-lg.c { background: linear-gradient(135deg, #DDD3FF, #6C4DFF); }
.comp-card .av-lg.d { background: linear-gradient(135deg, #B6D4FF, #2B7FAA); }
.comp-card .av-lg.e { background: linear-gradient(135deg, #E8C2FF, #8B5CF6); }
.comp-card .av-lg.f { background: linear-gradient(135deg, #B6D4FF, #0C2C66); }
.comp-card .nm { font-size: 16px; font-weight: 700; color: var(--ink); letter-spacing: -0.015em; }
.comp-card .hd { margin-top: 2px; }
.comp-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.comp-stat { padding: 8px 10px; border: 1px solid var(--border); background: var(--surface-alt); border-radius: var(--r-md); }
.comp-stat .k { font-size: 10px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.comp-stat .v { font-size: 16px; font-weight: 700; color: var(--ink); margin-top: 2px; }
.comp-mix { display: flex; gap: 4px; height: 6px; border-radius: var(--r-pill); overflow: hidden; }
.comp-mix .seg { height: 100%; }
.comp-mix .vod { background: var(--violet); }
.comp-mix .short { background: var(--blue); }
.comp-mix .live { background: var(--warning); }
.comp-mix-legend { display: flex; gap: 10px; font-size: 10.5px; color: var(--ink-3); font-family: var(--mono); }
.comp-mix-legend .lg { display: inline-flex; align-items: center; gap: 4px; }
.comp-mix-legend .sw { width: 8px; height: 8px; border-radius: 2px; }
.gap-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.gap-card h3 { margin: 0; font-size: 14px; font-weight: 600; color: var(--ink); }
.gap-row { padding: 10px 12px; background: var(--surface-alt); border: 1px solid var(--border); border-radius: var(--r-md); display: flex; flex-direction: column; gap: 4px; }
.gap-row .h { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.gap-row .b { font-size: 12px; color: var(--ink-2); line-height: 1.45; }
.cid { display: inline-block; font-family: var(--mono); font-size: 10px; font-weight: 500; color: var(--ink-4); background: var(--surface-alt); padding: 2px 6px; border-radius: 4px; letter-spacing: 0.02em; vertical-align: middle; margin-left: 8px; user-select: all; }
.cid::before { content: "id "; color: var(--ink-4); opacity: 0.55; }
h1 .cid, h2 .cid, h3 .cid, h4 .cid { font-weight: 500; }
.cid-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* Actions page (redesigned) — augments existing .act-card / .timeline /
   .tl-row / .stage rules above with the per-card bits introduced by the
   Actions.html design: avatar+short-id column, body title, meta-row link
   styling + ExpectedActual pair, button stack inside .stage. The
   existing .tl-row + connector-line + .pin/.blob coloring rules are
   reused without modification. */
/* Avatar column: small 48x48 with short-id below — matches the
   reference Actions card "TH / A-2103" inline layout.
   C-010: when the action targets a real video with a thumbnail, the
   inner element is an <img> instead of initial text. Same dimensions
   either way; the .snap-av-thumb modifier removes the dark gradient
   background and clips the image to the rounded corners. */
.act-av { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.act-av .snap-av,
.snap-av-sm { width: 48px; height: 48px; font-size: 13px; border-radius: 12px; }
.snap-av-thumb { background: var(--surface-alt); padding: 0; overflow: hidden; }
.snap-av-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.act-av-id { font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); letter-spacing: 0.02em; }

/* Card title — reference uses 16px / 600 / -0.015em letter-spacing
   for the single-line action headline. */
.act-card .body .act-title { font-size: 16px; font-weight: 600; color: var(--ink); letter-spacing: -0.015em; line-height: 1.3; }
.act-card .body .meta a { color: var(--violet-deep); text-decoration: none; }
.act-card .body .meta a:hover { text-decoration: underline; }
.act-card .body .stamps .sep { color: var(--ink-4); font-size: 11px; }
.act-card .body .stamps .video-label { font-size: 11px; color: var(--ink-3); }

/* Stage column — Current state row (label left, bold colored
   value right), single-line window text, button stack pinned to
   bottom. Matches the reference Actions.html stage exactly. */
.act-card .stage { justify-content: flex-start; }
.act-card .stage .stage-window { font-size: 12px; color: var(--ink-2); }
.stage-buttons { display: flex; flex-direction: column; gap: 6px; margin-top: auto; }
.stage-buttons .btn { justify-content: center; text-align: center; text-decoration: none; padding: 6px 10px; font-size: 11.5px; }
.stage-buttons .btn.success { background: var(--success); color: #fff; border-color: var(--success); }
.stage-buttons .btn.ghost { color: var(--ink-4, var(--ink-3)); }
.stage-buttons .btn[disabled], .stage-buttons .btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* ============================== INSIGHT DETAIL ==============================
   Ported from docs/.../Insight Detail.html. Class names are prefixed `i*`
   (hero=ihero, target=it, evidence=iev, analysis-depth=iad, how-measured=ihm,
   side rail=iside/ihist/irel/inotes) so they cannot collide with shared
   styles. var(--ok, var(--success)) tolerates the design's --ok token
   that doesn't ship in our :root.
*/
.id-back { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; color: var(--ink-3); text-decoration: none; transition: color 0.12s ease; }
.id-back:hover { color: var(--violet-deep); }
.id-back svg { width: 14px; height: 14px; }

.ihero { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: 26px 28px 24px; box-shadow: 0 1px 0 rgba(15, 12, 41, 0.02); }
.ihero-meta { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 11px; color: var(--ink-3); letter-spacing: 0.04em; }
.ihero-meta .pulse-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok, var(--success)); box-shadow: 0 0 0 4px rgba(0, 168, 107, 0.13); animation: none; }
.ihero-meta .id-num { color: var(--violet-deep); font-weight: 600; }
.ihero-meta .sep { color: var(--ink-4); }
.ihero-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: flex-start; margin-top: 14px; }
.ihero-h1 { font-size: 26px; line-height: 1.2; font-weight: 600; color: var(--ink); letter-spacing: -0.02em; margin: 12px 0 10px; max-width: 820px; }
.ihero-rec { font-size: 14px; line-height: 1.55; color: var(--ink-2); max-width: 760px; margin: 0; }
.ihero-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 14px; }
.ihero-chips .id-cat-icon { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 7px; background: var(--violet-tint); color: var(--violet-deep); border-radius: var(--r-pill); font-size: 11px; font-weight: 600; letter-spacing: 0.02em; }
.ihero-chips .chip-scope { padding: 4px 10px; background: var(--surface-alt); color: var(--ink-2); border: 1px solid var(--border); border-radius: var(--r-pill); font-size: 11px; font-weight: 500; }
.ihero-chips .chip-state { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; background: rgba(255, 184, 60, 0.10); color: #B0700C; border: 1px solid rgba(255, 184, 60, 0.32); border-radius: var(--r-pill); font-size: 11px; font-weight: 600; }
.ihero-chips .chip-state .dot { width: 6px; height: 6px; border-radius: 50%; background: #FFB83C; }
.ihero-chips .chip-verify { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; background: rgba(0, 168, 107, 0.08); color: var(--ok, var(--success)); border: 1px solid rgba(0, 168, 107, 0.26); border-radius: var(--r-pill); font-size: 11px; font-weight: 600; }
.ihero-chips .chip-verify svg { width: 11px; height: 11px; }
.ihero-cta { display: flex; gap: 8px; flex: none; flex-wrap: wrap; justify-content: flex-end; }

.it-card { display: grid; grid-template-columns: 160px 1fr auto; gap: 22px; align-items: center; background: linear-gradient(180deg, rgba(108, 77, 255, 0.04) 0%, var(--surface) 100%); border: 1px solid var(--border); border-radius: var(--r-card); padding: 18px 22px; }
.it-thumbwrap { position: relative; width: 160px; height: 90px; border-radius: 8px; overflow: hidden; background: var(--surface-alt); display: grid; place-items: center; color: var(--ink-3); font-family: var(--mono); font-size: 11px; }
.it-thumbwrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.it-dur { position: absolute; right: 6px; bottom: 6px; background: rgba(0,0,0,0.78); color: #fff; font-family: var(--mono); font-size: 10px; font-weight: 500; padding: 2px 6px; border-radius: 4px; pointer-events: none; }
.it-title { font-size: 15.5px; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; line-height: 1.3; }
.it-meta { font-family: var(--mono); font-size: 11px; color: var(--ink-3); margin-top: 5px; letter-spacing: 0.03em; }
.it-stats { display: flex; gap: 22px; margin-top: 11px; font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); flex-wrap: wrap; }
.it-stat { display: inline-flex; gap: 6px; align-items: baseline; }
.it-stat-k { color: var(--ink-3); }
.it-stat-v { color: var(--ink); font-weight: 600; }

.id-body { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; }
.id-main { display: flex; flex-direction: column; gap: 18px; }
.id-rail { display: flex; flex-direction: column; gap: 12px; }

.iev-card, .ihm-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.iev-section { display: flex; flex-direction: column; gap: 12px; }
.iev-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.iev-compare-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }
.iev-attr-tile { padding: 12px 14px; background: var(--surface-alt); border: 1px solid var(--border); border-radius: var(--r-md); }
.iev-attr-tile .a-key { font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 4px; }
.iev-attr-tile .a-val { font-size: 13px; color: var(--ink); font-weight: 500; line-height: 1.45; }
.iev-attr-tile .a-sub { font-size: 11px; color: var(--ink-3); margin-top: 3px; }
.iev-empty { padding: 18px; background: var(--surface-alt); border: 1px dashed var(--border); border-radius: var(--r-md); display: flex; gap: 12px; align-items: flex-start; color: var(--ink-3); font-size: 13px; line-height: 1.55; }
.iev-empty svg { color: var(--violet-deep); flex: none; margin-top: 2px; }

.iad-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.iad-tile { padding: 16px 14px; background: var(--surface-alt); border: 1px solid var(--border); border-radius: var(--r-md); display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.iad-tile .d-num { font-size: 22px; font-weight: 600; color: var(--ink); letter-spacing: -0.02em; line-height: 1; }
.iad-tile .d-key { font-size: 11px; color: var(--ink-3); line-height: 1.35; }
.iad-banner { padding: 10px 14px; background: rgba(108, 77, 255, 0.04); border: 1px solid rgba(108, 77, 255, 0.15); border-radius: var(--r-md); font-size: 11.5px; color: var(--ink-2); line-height: 1.5; display: flex; gap: 8px; align-items: flex-start; }
.iad-banner svg { width: 13px; height: 13px; color: var(--violet-deep); flex: none; margin-top: 2px; }

.ihm-step { display: grid; grid-template-columns: 28px 1fr; gap: 12px; padding: 14px 16px; background: var(--surface-alt); border: 1px solid var(--border); border-radius: var(--r-md); }
.ihm-step.active { background: var(--surface); border-color: var(--violet); box-shadow: 0 0 0 3px rgba(108, 77, 255, 0.10); }
.ihm-step-n { width: 24px; height: 24px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border); color: var(--ink-3); font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.ihm-step.active .ihm-step-n { background: var(--violet); color: white; border-color: var(--violet); }
.ihm-step-body .v-title { font-size: 13px; font-weight: 600; color: var(--ink); }
.ihm-step-body .v-detail { font-size: 12px; color: var(--ink-2); line-height: 1.5; margin-top: 4px; }
.ihm-causal { padding: 11px 14px; background: var(--surface-alt); border: 1px solid var(--border); border-radius: var(--r-md); font-size: 11.5px; color: var(--ink-3); line-height: 1.5; display: flex; gap: 8px; align-items: flex-start; }
.ihm-causal b { color: var(--ink); font-weight: 600; }
.ihm-causal svg { flex: none; margin-top: 1px; color: var(--ink-3); }

.iside { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.iside-section .s-head { display: flex; align-items: flex-start; gap: 8px; }
.iside-section .s-head h3 { margin: 0; font-size: 14px; font-weight: 600; color: var(--ink); }
.iside-section .s-head .h-sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; }

.ihist-row { display: grid; grid-template-columns: 18px 1fr; gap: 10px; align-items: flex-start; padding: 8px 0; position: relative; }
.ihist-row:not(:last-child)::after { content: ""; position: absolute; left: 8px; top: 22px; bottom: -8px; width: 1.5px; background: var(--border); }
.ihist-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--ink-3); margin-top: 5px; z-index: 1; }
.ihist-dot.done { background: var(--ink); border-color: var(--ink); }
.ihist-dot.pending { background: var(--surface); border-color: var(--ink-4); border-style: dashed; }
.ihist-dot.violet  { background: var(--violet);  border-color: var(--violet); }
.ihist-dot.blue    { background: var(--blue);    border-color: var(--blue); }
.ihist-dot.success { background: var(--success); border-color: var(--success); }
.ihist-dot.warning { background: var(--warning); border-color: var(--warning); }
.ihist-dot.danger  { background: var(--danger);  border-color: var(--danger); }
.ihist-dot.neutral { background: var(--ink-3);   border-color: var(--ink-3); }
.ihist-when { font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); letter-spacing: 0.02em; text-transform: uppercase; font-weight: 600; }
.ihist-what { font-size: 12.5px; color: var(--ink); margin-top: 2px; line-height: 1.4; }
.ihist-who { font-size: 11px; color: var(--ink-3); margin-top: 2px; }

.irel-row { display: grid; grid-template-columns: 24px 1fr auto; gap: 10px; align-items: center; padding: 11px 12px; background: var(--surface-alt); border: 1px solid var(--border); border-radius: var(--r-md); text-decoration: none; transition: border-color 0.12s ease, transform 0.12s ease; color: inherit; }
.irel-row:hover { border-color: var(--violet); transform: translateY(-1px); }
.irel-row .rel-icon { width: 24px; height: 24px; border-radius: var(--r-sm); display: grid; place-items: center; }
.irel-row .rel-icon.violet { background: var(--violet-tint); color: var(--violet-deep); }
.irel-row .rel-icon svg { width: 13px; height: 13px; }
.irel-row .rel-meta { font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.irel-row .rel-text { font-size: 13px; color: var(--ink); margin-top: 2px; line-height: 1.35; }
.irel-row .rel-state { font-size: 10px; padding: 2px 6px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-pill); color: var(--ink-3); font-family: var(--mono); }
.irel-row .rel-state.accepted { background: rgba(0, 168, 107, 0.10); color: var(--ok, var(--success)); border-color: transparent; }

.inotes-row { display: flex; flex-direction: column; gap: 8px; }
.inotes-row .note { background: var(--surface-alt); border: 1px solid var(--border); border-radius: var(--r-md); padding: 10px 12px; font-size: 12.5px; line-height: 1.55; color: var(--ink-2); }
.notes-empty { display: flex; flex-direction: column; gap: 10px; padding: 18px; background: var(--surface-alt); border: 1px dashed var(--border); border-radius: var(--r-md); text-align: center; align-items: center; }
.notes-empty .n-text { font-size: 12px; color: var(--ink-2); line-height: 1.45; }
.notes-empty .n-text b { color: var(--ink); font-weight: 600; }
.notes-empty .btn { width: 100%; }

/* === Core Analysis v2 ============================================== */
/* Additive utilities for the v2 Core Analysis page (#analytics route).
   Existing analytics blocks above (.analytics-hero, .analytics-panel,
   .donut, .rank-row, .share-row, .revenue-row, .line-chart, .chart-empty,
   .annotation-strip) are preserved unchanged and may be reused. */

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
.section-head h2 { margin: 0; font-size: 24px; font-weight: 750; letter-spacing: -0.015em; color: var(--ink); }
.section-head .h-sub { font-size: 15px; font-weight: 600; color: var(--ink-3); }

.metric-tabs { display: inline-flex; gap: 4px; padding: 4px; background: var(--surface-alt); border-radius: var(--r-pill); }
.metric-tabs button { padding: 6px 12px; border: 0; border-radius: var(--r-pill); background: transparent; color: var(--ink-3); font-family: var(--font); font-size: 12.5px; font-weight: 700; cursor: pointer; }
.metric-tabs button:hover { color: var(--ink); }
.metric-tabs button.active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(15,18,40,0.06); }

.chart-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: var(--pad-card); display: flex; flex-direction: column; gap: 14px; }
.chart-card .chart-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.chart-card .chart-area { min-height: 240px; }

.vidos-diagnosis-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.vidos-diagnosis-card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 16px 18px 16px 22px; display: flex; flex-direction: column; gap: 8px; }
.vidos-diagnosis-card::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 4px; border-radius: 0 4px 4px 0; background: var(--ink-4); }
.vidos-diagnosis-card.sev-positive::before { background: var(--success); }
.vidos-diagnosis-card.sev-neutral::before  { background: var(--ink-3); }
.vidos-diagnosis-card.sev-warning::before  { background: var(--warning); }
.vidos-diagnosis-card.sev-negative::before { background: var(--danger); }
.vidos-diagnosis-card .eyebrow { font-size: 10.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.vidos-diagnosis-card.sev-positive .eyebrow { color: var(--success); }
.vidos-diagnosis-card.sev-warning  .eyebrow { color: var(--warning); }
.vidos-diagnosis-card.sev-negative .eyebrow { color: var(--danger); }
.vidos-diagnosis-card h3 { margin: 0; font-size: 15px; font-weight: 750; color: var(--ink); line-height: 1.3; }
.vidos-diagnosis-card p { margin: 0; font-size: 13px; line-height: 1.55; color: var(--ink-2); }
.vidos-diagnosis-card .refs { display: flex; gap: 6px; flex-wrap: wrap; font-family: var(--mono); font-size: 11px; color: var(--ink-3); }
.vidos-diagnosis-card .refs span { padding: 1px 8px; background: var(--surface-alt); border-radius: var(--r-pill); }

.traffic-diag-list { display: flex; flex-direction: column; gap: 8px; }
.traffic-diag-row { display: grid; grid-template-columns: 120px 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); }
.traffic-diag-row .src { font-family: var(--mono); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink); }
.traffic-diag-row .summary { font-size: 13px; line-height: 1.45; color: var(--ink-2); min-width: 0; }
.traffic-diag-row .summary .label { display: block; font-weight: 600; color: var(--ink); margin-bottom: 2px; }
.traffic-diag-row .verdict { flex: none; }

.cohort-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.cohort-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.cohort-card .ck { font-family: var(--mono); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); }
.cohort-card h3 { margin: 0; font-size: 14.5px; font-weight: 750; color: var(--ink); line-height: 1.3; }
.cohort-card .desc { font-size: 13px; line-height: 1.5; color: var(--ink-2); margin: 0; }
.cohort-card .summary { font-size: 12.5px; line-height: 1.5; color: var(--ink-3); margin: 0; }
.cohort-card .vids { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.cohort-card .vids span { font-family: var(--mono); font-size: 11px; font-weight: 600; padding: 2px 8px; background: var(--surface-alt); color: var(--ink-3); border-radius: var(--r-pill); }

.geo-table { display: flex; flex-direction: column; gap: 6px; }
.geo-row { display: grid; grid-template-columns: 1fr 80px auto; gap: 14px; align-items: center; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); }
.geo-row .geo-name { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.geo-row .geo-share { font-family: var(--mono); font-size: 12.5px; font-weight: 600; color: var(--ink-3); text-align: right; }
.geo-row .geo-diag { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.geo-row .geo-summary { grid-column: 1 / -1; font-size: 12.5px; color: var(--ink-3); line-height: 1.45; margin-top: 4px; }

.age-gender-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.age-gender-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.age-gender-card .seg { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: 0.04em; color: var(--ink-3); }
.age-gender-card .pct { font-size: 18px; font-weight: 800; color: var(--ink); }
.age-gender-card .diag { font-size: 12.5px; color: var(--ink-2); line-height: 1.45; margin: 0; }
.age-gender-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.age-gender-summary .block { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.age-gender-summary .block .eyebrow { font-size: 10.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.age-gender-summary .block h4 { margin: 0; font-size: 14px; font-weight: 750; color: var(--ink); }
.age-gender-summary .block p { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--ink-2); }

.diag-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; font-size: 11px; font-weight: 700; border-radius: var(--r-pill); background: var(--surface-alt); color: var(--ink-3); white-space: nowrap; }
.diag-chip.sev-positive { background: var(--success-tint); color: #157C3F; }
.diag-chip.sev-neutral  { background: var(--surface-alt); color: var(--ink-3); }
.diag-chip.sev-warning  { background: var(--warning-tint); color: #8A5A0E; }
.diag-chip.sev-negative { background: var(--danger-tint); color: #B43030; }

.section-empty { padding: 18px 20px; background: var(--surface-alt); border: 1px dashed var(--border); border-radius: var(--r-md); font-size: 12.5px; color: var(--ink-3); text-align: center; }

/* === Core Analysis v2 handoff components ============================ */
.ca-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.ca-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  overflow: hidden;
  min-width: 0;
}
.ca-pill-available {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: var(--success-tint);
  color: var(--success);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.ca-pill-available.warn {
  background: var(--warning-tint);
  color: #8A5A0E;
}
.ca-pill-available .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.ca-row-trend {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(340px, 0.85fr);
  gap: 16px;
  align-items: start;
}
.ca-row-trend:has(> :only-child) {
  grid-template-columns: minmax(0, 1fr);
}
.ca-trend-head {
  padding: 20px 22px 14px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.ca-trend-tabs {
  justify-content: flex-end;
}
.ca-chart {
  margin: 0 22px;
  height: 296px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  position: relative;
  overflow: hidden;
}
.ca-chart svg.plot {
  position: absolute;
  inset: 22px 28px 50px;
  width: calc(100% - 56px);
  height: calc(100% - 72px);
  overflow: visible;
}
.ca-chart-points {
  position: absolute;
  inset: 22px 28px 50px;
  pointer-events: none;
  z-index: 2;
}
.ca-chart-point {
  position: absolute;
  top: 0;
  bottom: -24px;
  width: var(--hit-width, 22px);
  min-width: 22px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  transform: translateX(-50%);
  pointer-events: auto;
  cursor: crosshair;
}
.ca-chart-point::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 24px;
  width: 1px;
  background: rgba(108, 77, 255, 0.22);
  opacity: 0;
  transform: translateX(-50%);
  transition: opacity 0.12s ease;
}
.ca-chart-point:hover::before,
.ca-chart-point:focus-visible::before {
  opacity: 1;
}
.ca-chart-point .dot {
  position: absolute;
  left: 50%;
  top: var(--point-top, 50%);
  width: 8px;
  height: 8px;
  border-radius: var(--r-pill);
  background: var(--violet);
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(108, 77, 255, 0.22);
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.12s ease, width 0.12s ease, height 0.12s ease;
}
.ca-chart-point:hover .dot,
.ca-chart-point:focus-visible .dot {
  width: 11px;
  height: 11px;
  opacity: 1;
}
.ca-point-popover {
  position: absolute;
  left: 50%;
  top: clamp(8px, calc(var(--point-top, 50%) - 58px), calc(100% - 72px));
  min-width: 138px;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: 0 16px 38px rgba(17, 20, 38, 0.14);
  color: var(--ink-2);
  transform: translateX(-50%) translateY(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease, transform 0.12s ease;
  z-index: 4;
}
.ca-chart-point.edge-left .ca-point-popover {
  left: 0;
  transform: translateX(0) translateY(4px);
}
.ca-chart-point.edge-right .ca-point-popover {
  left: auto;
  right: 0;
  transform: translateX(0) translateY(4px);
}
.ca-chart-point:hover .ca-point-popover,
.ca-chart-point:focus-visible .ca-point-popover {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.ca-chart-point.edge-left:hover .ca-point-popover,
.ca-chart-point.edge-left:focus-visible .ca-point-popover,
.ca-chart-point.edge-right:hover .ca-point-popover,
.ca-chart-point.edge-right:focus-visible .ca-point-popover {
  transform: translateX(0) translateY(0);
}
.ca-point-popover .date,
.ca-point-popover span {
  display: block;
  font-size: 10.5px;
  font-weight: 750;
  color: var(--ink-3);
  line-height: 1.25;
}
.ca-point-popover b {
  display: block;
  margin: 2px 0;
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 850;
  line-height: 1.1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.ca-chart .x-axis {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 28px;
  display: flex;
  justify-content: space-between;
  color: var(--ink-4);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
}
.ca-chart .legend {
  position: absolute;
  left: 28px;
  bottom: 8px;
  display: flex;
  gap: 14px;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-3);
}
.ca-chart .legend .sw {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-right: 5px;
  background: var(--violet);
}
.ca-chart .legend .sw.prior {
  background: var(--blue);
  opacity: 0.85;
}
.ca-trend-panel.no-annotations .ca-chart {
  margin-bottom: 22px;
}
.ca-chart .chart-empty {
  position: absolute;
  inset: 22px 28px 50px;
  display: grid;
  place-items: center;
  margin: 0;
}
.ca-trend-panel.is-refreshing .ca-chart::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(1px);
  z-index: 2;
}
.ca-trend-panel.is-refreshing .ca-chart-points {
  pointer-events: none;
}
.ca-trend-panel.is-refreshing .ca-point-popover {
  display: none;
}
.ca-trend-panel.is-refreshing .ca-chart::after {
  content: "Loading trend...";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 8px 22px rgba(17, 17, 17, 0.08);
}
.ca-trend-error {
  margin: 12px 22px 0;
  padding: 10px 12px;
  border: 1px solid var(--danger-tint);
  border-radius: var(--r-md);
  background: var(--danger-tint);
  color: var(--danger);
  font-size: 12px;
  font-weight: 700;
}
.ca-event-chips {
  padding: 16px 22px 20px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.ca-chip {
  height: 26px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ca-chip .ev-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--violet);
}
.ca-diagnosis-list {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ca-diagnosis {
  border: 1px solid var(--border);
  border-left: 4px solid var(--success);
  border-radius: var(--r-md);
  background: var(--surface-alt);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ca-diagnosis.warn { border-left-color: var(--warning); }
.ca-diagnosis.bad { border-left-color: var(--danger); }
.ca-diagnosis .kicker {
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
}
.dashboard-panel-row-header {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.005em;
  color: var(--ink);
  /* Debug color: red !important; */
  line-height: 1.28;
}
.dashboard-panel-row-subtitle {
  font-size: 11.5px;
  font-weight: 650;
  line-height: 1.35;
  color: var(--ink-3);
  /* Debug color: orange !important; */
}
.ca-diagnosis .body { margin: 0; }
.ca-diagnosis-placeholder {
  min-height: 360px;
}
.ca-diagnosis-skel {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-alt);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.ca-diagnosis-skel span,
.ca-diagnosis-skel b,
.ca-diagnosis-skel i {
  display: block;
  height: 10px;
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, #eef1f7 0%, #f7f8fb 48%, #eef1f7 100%);
  background-size: 220% 100%;
  animation: caSkeleton 1.2s ease-in-out infinite;
}
.ca-diagnosis-skel span { width: 34%; }
.ca-diagnosis-skel b { width: 82%; height: 14px; }
.ca-diagnosis-skel i { width: 96%; height: 28px; }
@keyframes caSkeleton {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
.ca-meter {
  height: 10px;
  background: #EDF0F6;
  border-radius: var(--r-pill);
  overflow: hidden;
}
.ca-meter span {
  display: block;
  height: 100%;
  background: var(--violet);
  border-radius: inherit;
}
.ca-meter.cyan span { background: #64C8EF; }
.ca-meter.violet2 span { background: #8D73EA; }
.ca-meter.amber span { background: #E8950C; }
.ca-meter.mute span { background: #C5CAD6; }
.ca-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: var(--success-tint);
  color: var(--success);
  width: max-content;
}
.ca-tag.warn { background: var(--warning-tint); color: #8A5A0E; }
.ca-tag.bad { background: var(--danger-tint); color: var(--danger); }
.ca-tag.neutral { background: var(--surface-alt); color: var(--ink-3); border: 1px solid var(--border); }

/* Traffic Source Diagnosis — v2 handoff table with LLM narrative cell. */
.ca-traffic-head {
  display: grid;
  grid-template-columns: 1.05fr .58fr .58fr .62fr .58fr 1.6fr;
  gap: 8px;
  align-items: center;
  padding: 11px 22px;
  background: var(--surface-alt);
  border-top: 1px solid var(--border);
}
.ca-traffic-row {
  display: grid;
  grid-template-columns: 1.05fr .58fr .58fr .62fr .58fr 1.6fr;
  gap: 8px;
  align-items: center;
  padding: 14px 22px;
  border-top: 1px solid var(--border);
}
.ca-traffic-row .src h3 {
  margin: 0 0 3px;
}
.ca-traffic-row .src p {
  margin: 0;
}
.ca-cell .num {
  display: block;
  font-family: var(--mono);
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.ca-cell .num.up { color: var(--success); }
.ca-cell .num.down { color: var(--danger); }
.ca-cell .delta {
  display: block;
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-3);
}
.ca-cell .delta.up { color: var(--success); }
.ca-cell .delta.down { color: var(--danger); }
.ca-diag-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.ca-diag-note {
  margin: 0;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-3);
  line-height: 1.42;
  text-wrap: pretty;
}

.ca-row-traffic {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(340px, 0.85fr);
  gap: 16px;
  align-items: stretch;
}
.ca-row-traffic:has(> :only-child) {
  grid-template-columns: minmax(0, 1fr);
}
.ca-rev-body {
  padding: 18px 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ca-rev-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.ca-rev-tile {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-alt);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ca-rev-tile .k {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-3);
  letter-spacing: -0.005em;
}
.ca-rev-tile .v {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.ca-kicker {
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--ink-3);
  margin: 4px 0 0;
}
.ca-rev-row {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-alt);
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.ca-rev-row .share {
  display: block;
  margin-top: 2px;
}
.ca-rev-row b {
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.ca-api-note {
  border: 1px dashed var(--border-2);
  border-radius: var(--r-md);
  background: var(--surface);
  padding: 12px 14px;
}

/* Device Impact — copied to the live renderer from the v2 handoff. */
.ca-row-cohort {
  display: grid;
  grid-template-columns: minmax(340px, 0.85fr) minmax(0, 1.5fr);
  gap: 16px;
  align-items: stretch;
}
.ca-row-cohort:has(> :only-child) {
  grid-template-columns: minmax(0, 1fr);
}
.ca-device-list {
  padding: 18px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.ca-device-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(140px, 1.4fr) 50px;
  align-items: center;
  gap: 14px;
}
.ca-device-row .meta {
  display: block;
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  color: var(--ink-3);
}
.ca-device-row .pct {
  text-align: right;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 850;
  line-height: 1;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
}
.ca-cohort-panel {
  min-height: 100%;
}
.ca-cohort-list {
  border-top: 1px solid var(--border);
}
.ca-cohort-head {
  display: grid;
  grid-template-columns: minmax(220px, 1.35fr) .65fr .55fr minmax(180px, 1fr);
  gap: 12px;
  align-items: center;
  padding: 11px 22px;
  background: var(--surface-alt);
  border-top: 1px solid var(--border);
}
.ca-cohort-item {
  border-top: 1px solid var(--border);
}
.ca-cohort-item:first-child {
  border-top: 0;
}
.ca-cohort-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.35fr) .65fr .55fr minmax(180px, 1fr);
  gap: 12px;
  align-items: center;
  padding: 14px 22px;
  cursor: pointer;
  list-style: none;
}
.ca-cohort-row::-webkit-details-marker {
  display: none;
}
.ca-cohort-row:hover {
  background: rgba(108, 77, 255, 0.025);
}
.ca-cohort-row .name h3 {
  margin: 0;
}
.ca-cohort-row .name p {
  margin: 4px 0 0;
}
.ca-cohort-diagnosis {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.module-drill-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--violet-deep);
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 850;
  line-height: 1;
  letter-spacing: 0;
}

.module-drill-button:hover,
.ca-cohort-row:hover .module-drill-button {
  border-color: rgba(108, 77, 255, 0.35);
  background: var(--violet-tint);
}

.ca-cohort-toggle {
  margin-top: 7px;
}

.ca-cohort-toggle .open {
  display: none;
}
.ca-cohort-toggle .chev {
  width: 6px;
  height: 6px;
  border-right: 1.8px solid currentColor;
  border-bottom: 1.8px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  transition: transform 0.12s ease;
}
.ca-cohort-item[open] .ca-cohort-toggle .closed {
  display: none;
}
.ca-cohort-item[open] .ca-cohort-toggle .open {
  display: inline;
}
.ca-cohort-item[open] .ca-cohort-toggle .chev {
  transform: rotate(225deg) translateY(-1px);
}
.ca-cohort-detail {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 22px 18px;
}
.ca-cohort-item:not([open]) .ca-cohort-detail,
.ca-cohort-item:not([open]) .ca-cohort-empty {
  display: none;
}
.ca-cohort-video {
  display: grid;
  grid-template-columns: 74px minmax(180px, 1fr) minmax(250px, 1.2fr);
  gap: 12px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-alt);
  padding: 8px 10px;
}
.ca-cohort-thumb {
  width: 74px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 8px;
  background: var(--surface-2);
}
.ca-cohort-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ca-cohort-video-title b {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.25;
}
.ca-cohort-video-title span {
  display: block;
  margin-top: 3px;
  font-family: var(--mono);
  color: var(--ink-3);
  font-size: 10.5px;
  font-weight: 700;
}
.ca-cohort-video-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(68px, 1fr));
  gap: 6px;
}
.ca-cohort-video-metrics span {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  padding: 5px 7px;
  min-width: 0;
}
.ca-cohort-video-metrics em {
  display: block;
  font-style: normal;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  color: var(--ink-4);
}
.ca-cohort-video-metrics b {
  display: block;
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.ca-cohort-empty {
  margin: 0 22px 18px;
  border: 1px dashed var(--border-2);
  border-radius: var(--r-md);
  background: var(--surface-alt);
  padding: 12px 14px;
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 700;
}
@media (max-width: 1050px) {
  .ca-cohort-row,
  .ca-cohort-head {
    grid-template-columns: minmax(0, 1fr);
  }
  .ca-cohort-video {
    grid-template-columns: 74px minmax(0, 1fr);
  }
  .ca-cohort-video-metrics {
    grid-column: 1 / -1;
  }
}

/* Audience Geography — copied to the live renderer from the v2 handoff. */
.ca-geo-head {
  display: grid;
  grid-template-columns: minmax(170px, 1.25fr) minmax(160px, 1.05fr) .82fr .8fr .7fr .8fr minmax(180px, 1fr);
  gap: 12px;
  align-items: center;
  padding: 11px 22px;
  background: var(--surface-alt);
  border-top: 1px solid var(--border);
}
.ca-geo-row {
  display: grid;
  grid-template-columns: minmax(170px, 1.25fr) minmax(160px, 1.05fr) .82fr .8fr .7fr .8fr minmax(180px, 1fr);
  gap: 12px;
  align-items: center;
  padding: 14px 22px;
  border-top: 1px solid var(--border);
}
.ca-geo-row .ctry .sub {
  display: block;
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-3);
}
.ca-share-bar {
  display: grid;
  grid-template-columns: minmax(72px, 1fr) 40px;
  align-items: center;
  gap: 10px;
}
.ca-share-bar b {
  text-align: right;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 800;
  color: var(--ink-2);
}
.ca-geo-cell {
  font-family: var(--mono);
  font-size: 13.5px;
  font-weight: 750;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.ca-geo-cell .sub {
  display: block;
  margin-top: 3px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ink-3);
}
.ca-geo-diag {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

/* Audience Age + Gender — handoff tokens with Cenk's data layout. */
.ca-age-body {
  padding: 18px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ca-age-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.ca-age-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-alt) 100%);
  padding: 15px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  overflow: hidden;
  transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}
.ca-age-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--ca-male);
  opacity: 0.9;
}
.ca-age-card.female::before {
  background: var(--ca-female);
}
.ca-age-card:hover {
  border-color: var(--ink-4);
  box-shadow: 0 8px 22px -12px rgba(17, 17, 17, 0.28);
  transform: translateY(-1px);
}
.ca-age-top {
  display: flex;
  align-items: center;
  gap: 9px;
}
.ca-gender-chip {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ca-male-tint);
  color: var(--ca-male);
  flex: none;
}
.ca-age-card.female .ca-gender-chip {
  background: var(--ca-female-tint);
  color: var(--ca-female);
}
.ca-gender-chip svg {
  width: 15px;
  height: 15px;
}
.ca-age-card .k {
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink-3);
}
.ca-age-headline {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.ca-age-card .v {
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.ca-age-card .d {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--success);
}
.ca-age-card .d.down { color: var(--danger); }
.ca-age-card .body {
  margin: 0;
}
/* UT-UI-07: age/gender card expands into a cohort-style video list. Reuses the
   Video Cohorts drill (.ca-cohort-toggle), detail (.ca-cohort-detail) and rows
   (.ca-cohort-video). On open the card spans the full grid width so the rows
   render at the same proportions as the cohort list (designer's layout). */
.ca-age-card.ca-age-expand { cursor: pointer; }
.ca-age-expand > summary {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.ca-age-expand > summary::-webkit-details-marker { display: none; }
.ca-age-expand[open] { grid-column: 1 / -1; }
.ca-age-expand[open]:hover { transform: none; box-shadow: none; }
.ca-age-expand .ca-cohort-toggle { margin-top: 2px; align-self: flex-start; }
.ca-age-expand[open] .ca-cohort-toggle .closed { display: none; }
.ca-age-expand[open] .ca-cohort-toggle .open { display: inline; }
.ca-age-expand[open] .ca-cohort-toggle .chev { transform: rotate(225deg) translateY(-1px); }
.ca-age-expand:not([open]) .ca-cohort-detail { display: none; }
.ca-age-expand .ca-cohort-detail { padding: 12px 0 2px; }
.ca-age-diag {
  border: 1px dashed var(--border-2);
  border-radius: var(--r-md);
  background: var(--surface-alt);
  padding: 16px 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.ca-age-diag > div {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.ca-age-diag .dk {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ca-diag-ico {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  flex: none;
}
.ca-diag-ico svg {
  width: 14px;
  height: 14px;
}
.ca-diag-ico.main { background: var(--ca-male-tint); color: var(--ca-male); }
.ca-diag-ico.alloc { background: var(--ca-blue-tint); color: var(--ca-blue); }
.ca-diag-ico.risk { background: var(--ca-amber-tint); color: var(--ca-amber-deep); }
.ca-age-diag .k {
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
}
.ca-age-diag .b {
  margin: 0;
}

.h2h-trend {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.h2h-trend .ico {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
}

.h2h-trend .ico svg {
  width: 13px;
  height: 13px;
}

.h2h-trend .lbl {
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: -0.005em;
}

.h2h-trend.up .ico {
  background: var(--ca-green-tint, #E9F8EF);
  color: var(--success);
}

.h2h-trend.up .lbl {
  color: var(--success);
}

.h2h-trend.down .ico {
  background: var(--ca-red-tint, #FDECEE);
  color: var(--danger);
}

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

.h2h-trend.flat .ico {
  background: var(--surface-alt);
  color: var(--ink-3);
}

.h2h-trend.flat .lbl {
  color: var(--ink-3);
}

.competitor-h2h-head {
  display: grid;
  grid-template-columns: 1.4fr 1fr 0.8fr 0.8fr 0.8fr;
  gap: 14px;
  padding: 10px 22px;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
}

.competitor-h2h-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 0.8fr 0.8fr 0.8fr;
  gap: 14px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--border);
  align-items: center;
}

.competitor-h2h-row.last {
  border-bottom: 0;
}

.competitor-main-grid {
  grid-template-columns: 1.4fr 1fr;
  align-items: start;
}

.competitor-h2h-panel,
.ts-panel {
  height: 690px;
  overflow: hidden;
}

.ts-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.competitor-h2h-panel {
  overflow-y: auto;
}

.ts-subbar {
  padding: 12px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  background: var(--surface-alt);
}

.ts-tabs {
  gap: 8px;
}

.component-pill.ts-tab {
  min-height: 34px;
  padding: 0 12px;
  font-size: 12.5px;
  gap: 7px;
}

.ts-tab svg {
  width: 15px;
  height: 15px;
  flex: none;
}

.ts-tab .n {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 850;
  padding: 1px 7px;
  border-radius: var(--r-pill);
  background: var(--surface-alt);
  color: var(--ink-3);
}

.ts-tab.all svg { color: var(--ink-3); }
.ts-tab.act svg { color: var(--success); }
.ts-tab.learn svg { color: #B0700C; }
.ts-tab.all.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.ts-tab.all.active svg { color: #fff; }
.ts-tab.all.active .n { background: rgba(255, 255, 255, 0.22); color: #fff; }
.ts-tab.act.active { background: var(--ca-green-tint, #E9F8EF); border-color: var(--success); color: var(--success); }
.ts-tab.act.active .n { background: var(--success); color: #fff; }
.ts-tab.learn.active { background: var(--ca-amber-tint, #FDF3E1); border-color: #E8950C; color: #B0700C; }
.ts-tab.learn.active .n { background: #B0700C; color: #fff; }

.ts-source {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 650;
}

.ts-source svg {
  width: 13px;
  height: 13px;
  color: var(--ink-4);
  flex: none;
}

.ts-list {
  padding: 18px 22px 22px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.ts-card {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.ts-card-top {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.ts-thumb {
  width: 116px;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-md);
  overflow: hidden;
  position: relative;
  display: grid;
  place-items: center;
  padding: 5px;
  color: #fff;
  font-size: 10px;
  font-weight: 850;
  line-height: 1.15;
  text-align: center;
}

.ts-thumb.b { background: linear-gradient(135deg, #1f1a3b, #321b59); color: #DDD3FF; }
.ts-thumb.c { background: linear-gradient(135deg, #2a1a05, #4a2c0a); color: #FFD151; }
.ts-thumb.d { background: linear-gradient(135deg, #0a3528, #073d20); color: #95E1B7; }
.ts-thumb.e { background: linear-gradient(135deg, #311a45, #531c70); color: #E8C2FF; }
.ts-thumb.f { background: linear-gradient(135deg, #051a3d, #0c2c66); color: #B6D4FF; }

.ts-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ts-thumb .dur {
  position: absolute;
  right: 4px;
  bottom: 4px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  padding: 1px 4px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
}

.ts-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 7px;
}

.component-chip.ts-signal,
.component-chip.ts-metric {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border-radius: var(--r-pill);
  font-size: 10px;
  line-height: 1;
}

.component-chip.ts-signal {
  background: var(--ca-green-tint, #E9F8EF);
  color: var(--success);
  font-weight: 900;
  letter-spacing: 0.01em;
}

.component-chip.ts-signal.learning {
  background: var(--ca-amber-tint, #FDF3E1);
  color: #B0700C;
}

.component-chip.ts-metric {
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--ink-3);
  font-family: var(--mono);
  font-weight: 850;
  letter-spacing: 0;
}

.ts-card h3 {
  margin: 0;
}

.ts-meta {
  margin: 5px 0 0;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 650;
}

.ts-evergreen {
  border: 1px dashed var(--border-2);
  border-radius: var(--r-md);
  background: var(--surface-alt);
  padding: 11px 12px;
  display: grid;
  gap: 6px;
}

.ts-evergreen .row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.ts-evergreen .row span:first-child {
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.ts-ev-level {
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ts-ev-level.high { color: var(--success); }
.ts-ev-level.medium { color: #B0700C; }
.ts-ev-level.low { color: var(--danger); }
.ts-ev-level.unknown { color: var(--ink-4); }

.ts-evergreen p {
  margin: 0;
}

.ts-summary {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-alt);
  padding: 11px 12px;
  display: grid;
  gap: 7px;
}

.ts-summary .srow {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 10px;
  font-size: 12px;
  line-height: 1.4;
}

.ts-summary .srow b {
  color: var(--ink-3);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding-top: 1px;
}

.ts-angle {
  border-radius: var(--r-md);
  background: var(--violet-tint);
  color: var(--violet-deep);
  padding: 11px 12px;
  font-size: 12.5px;
  line-height: 1.4;
  font-weight: 750;
}

.ts-angle b {
  display: block;
  margin-bottom: 4px;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  opacity: 0.75;
}

.ts-angle-title {
  font-weight: 800;
}

.ts-angle p {
  margin: 4px 0 0;
  color: #7c6fbd;
  font-size: 11.5px;
  line-height: 1.45;
  font-weight: 650;
}

.ts-foot {
  display: flex;
  justify-content: flex-end;
}

.ts-readmore {
  cursor: pointer;
  font-family: var(--sans);
}

.ts-readmore svg {
  width: 10px;
  height: 10px;
  flex: none;
}

.ts-empty {
  padding: 48px 22px;
  text-align: center;
}

.ts-empty .ic {
  width: 46px;
  height: 46px;
  border-radius: var(--r-pill);
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  background: var(--surface-alt);
  color: var(--ink-3);
}

.ts-empty .ic svg {
  width: 22px;
  height: 22px;
}

.ts-empty h3 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 750;
}

.ts-empty p {
  margin: 6px 0 0;
  color: var(--ink-3);
  font-size: 13px;
  font-weight: 600;
}

.ts-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(12, 16, 36, 0.55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
  z-index: 110;
}

.ts-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.ts-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  width: min(820px, calc(100vw - 56px));
  max-height: min(86vh, 840px);
  transform: translate(-50%, -50%) scale(0.97);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.2s ease;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 32px 90px rgba(9, 13, 36, 0.28);
  z-index: 111;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.ts-modal.open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.ts-modal-head {
  padding: 22px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.ts-modal-head h2 {
  margin: 9px 0 6px;
  color: var(--ink);
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.ts-modal-head p {
  margin: 0;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 650;
}

.ts-modal-close {
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-3);
  cursor: pointer;
  font-size: 18px;
  display: grid;
  place-items: center;
}

.ts-modal-close:hover {
  background: var(--surface-alt);
  color: var(--ink);
}

.ts-modal-body {
  padding: 20px 24px 24px;
  overflow-y: auto;
  display: grid;
  gap: 12px;
}

.ts-sc {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-alt);
  padding: 14px 16px;
}

.ts-sc h4 {
  margin: 0 0 6px;
  color: var(--ink-3);
  font-size: 10.5px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.ts-sc p {
  margin: 0;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
}

.ts-sc.angle {
  background: var(--violet-tint);
  border-color: transparent;
}

.ts-sc.angle h4 {
  color: var(--violet-deep);
  opacity: 0.8;
}

.ts-sc.angle p {
  color: var(--violet-deep);
  font-weight: 700;
}

.ts-modal-note {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  border: 1px dashed var(--border-2);
  border-radius: var(--r-md);
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 650;
  line-height: 1.4;
}

.ts-modal-note svg {
  width: 14px;
  height: 14px;
  color: var(--ink-4);
  flex: none;
}

/* === Shared Dashboard Typography Primitives ==========================
   Core Analysis is the visual source of truth. New pages/components should
   use these classes instead of inline title/subtitle/tab/pill styles. */
.title-block h1,
.page-title {
  margin: 0;
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.08;
}

.title-block .h-sub,
.page-subtitle {
  margin-top: 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink-3);
  max-width: 720px;
  line-height: 1.5;
}

.component-head,
.ca-panel-head,
.intel-head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.component-title,
.component-head h2,
.ca-panel-head h2,
.ca-trend-head h2,
.intel-head h2 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ink);
  line-height: 1.1;
}

.component-subtitle,
.component-head .component-subtitle,
.ca-panel-head .sub,
.ca-trend-head .sub,
.intel-head p {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-3);
  line-height: 1.4;
}

.ca-panel-head h2,
.ca-trend-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: 26px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.ca-panel-head .component-subtitle,
.ca-panel-head .sub,
.ca-trend-head .component-subtitle,
.ca-trend-head .sub {
  margin-top: 8px;
  color: var(--ink-3);
  font-size: 15px;
  line-height: 1.42;
  font-weight: 600;
  max-width: 64ch;
}

.component-tabs,
.feed-filters,
.ca-trend-tabs,
.intel-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.component-pill,
.fchip,
.ca-trend-tabs button,
.intel-tab {
  min-height: 30px;
  padding: 0 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-3);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}

.component-pill:hover,
.fchip:hover,
.ca-trend-tabs button:hover,
.intel-tab:hover {
  color: var(--ink);
}

.component-pill.active,
.fchip.active,
.ca-trend-tabs button.active,
.intel-tab.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.ca-trend-tabs button:disabled,
.component-pill:disabled {
  cursor: wait;
  opacity: 0.72;
}

.component-table-head {
  color: var(--ink-3);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.in-tag,
.diag-chip,
.ca-tag,
.component-chip,
.signal,
.evergreen-pill,
.ca-pill-available {
  font-family: var(--font);
  font-size: 10.5px;
  font-weight: 850;
  letter-spacing: 0.04em;
}

.pi-title {
  margin-bottom: 0;
}

.pi-title h1 {
  margin: 0;
}

.pi-title .h-sub {
  max-width: 70ch;
}

.pi-wrap {
  display: flex;
  flex-direction: column;
  gap: 22px;
  max-width: 1180px;
}

.pih {
  padding: 0;
  overflow: hidden;
}

.pih-head {
  padding: 20px 22px 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.pih-head h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.pih-head p {
  margin: 6px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-3);
  line-height: 1.45;
  max-width: 60ch;
}

.pih-count {
  flex: none;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-3);
  white-space: nowrap;
}

.pih-count b {
  color: var(--ink);
  font-size: 15px;
  font-weight: 850;
}

.pih-table {
  width: 100%;
}

.pih-row {
  display: grid;
  grid-template-columns: minmax(230px, 2fr) 140px minmax(180px, 1.1fr) 130px 118px 140px 26px;
  gap: 14px;
  align-items: center;
  padding: 14px 22px;
  text-align: left;
}

.pih-h {
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
  color: var(--ink-3);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pih-data {
  width: 100%;
  border: 0;
  border-top: 1px solid var(--border);
  background: var(--surface);
  color: inherit;
  font-family: var(--font);
  cursor: pointer;
  transition: background .14s ease;
}

.pih-h + .pih-data {
  border-top: 0;
}

.pih-data:hover {
  background: var(--surface-alt);
}

.pih-title {
  min-width: 0;
}

.pih-title .t,
.pih-title .reco {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pih-title .t {
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.pih-title .reco {
  margin-top: 3px;
  color: var(--violet-deep);
  font-size: 11.5px;
  font-weight: 650;
}

.pih-title .reco.muted {
  color: var(--ink-4);
  font-style: italic;
  font-weight: 600;
}

.pih-verdict {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: -0.005em;
  white-space: nowrap;
}

.pih-verdict.good {
  background: var(--success-tint);
  color: #157C3F;
}

.pih-verdict.warn {
  background: var(--warning-tint);
  color: #B0700C;
}

.pih-verdict.bad {
  background: var(--danger-tint);
  color: var(--danger);
}

.pih-verdict.neutral {
  background: var(--surface-2);
  color: var(--ink-3);
}

.pih-chips {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.pih-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: var(--r-pill);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 750;
}

.pih-chip b {
  font-weight: 850;
}

.pih-chip.good {
  background: var(--success-tint);
  color: #157C3F;
}

.pih-chip.warn {
  background: var(--warning-tint);
  color: #B0700C;
}

.pih-chip.bad {
  background: var(--danger-tint);
  color: var(--danger);
}

.pih-chip.neutral {
  background: var(--surface-2);
  color: var(--ink-3);
}

.pih-thumb {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pih-dash {
  color: var(--ink-4);
  font-weight: 700;
}

.pih-created {
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 650;
  white-space: nowrap;
}

.pih-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.pih-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.pih-status.ok {
  background: var(--success-tint);
  color: #157C3F;
}

.pih-status.warn {
  background: var(--warning-tint);
  color: #B0700C;
}

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

.pih-status.neutral {
  background: var(--surface-2);
  color: var(--ink-3);
}

.pih-chev {
  color: var(--ink-4);
  display: grid;
  place-items: center;
}

.pih-chev svg {
  width: 14px;
  height: 14px;
}

.pih-data:hover .pih-chev {
  color: var(--violet-deep);
}

.pih-empty {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 22px;
  color: var(--ink-3);
  font-size: 13px;
  font-weight: 700;
}

.pih-empty svg {
  width: 16px;
  height: 16px;
  flex: none;
}

.pih-skel span {
  height: 22px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--surface-2), var(--surface-alt), var(--surface-2));
  background-size: 220% 100%;
  animation: pih-skel 1.1s ease-in-out infinite;
}

@keyframes pih-skel {
  0% { background-position: 0% 50%; }
  100% { background-position: 220% 50%; }
}

.pih-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 22px;
  border-top: 1px solid var(--border);
}

.pih-pager span {
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 700;
}

.pim-backdrop {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: rgba(12, 16, 36, 0.55);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}

.pim-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.pim.ppi {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 111;
  width: min(880px, calc(100vw - 48px));
  max-height: 88vh;
  overflow: auto;
  border-radius: 18px;
  box-shadow: 0 40px 100px rgba(9, 13, 36, 0.34);
  transform: translate(-50%, -46%) scale(.98);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .2s ease;
}

.pim.ppi.open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.pim .ppi-bar {
  position: sticky;
  top: 0;
  z-index: 3;
  background: rgba(14, 12, 42, 0.72);
  backdrop-filter: blur(8px);
}

.pim .ppi-pane-error {
  padding: 48px 26px 52px;
}

/* ── V2 decision toasts (Insights & Impacts v2 handoff design) ────────── */
/* Bottom-left skip toast with Undo (sk-toast). */
.sk-toast {
  position: fixed; left: 24px; bottom: 24px; z-index: 250;
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px 12px 16px; border-radius: 13px;
  background: var(--ink); color: #fff;
  box-shadow: 0 18px 50px rgba(9, 13, 36, 0.34);
  overflow: hidden;
  animation: vd-toast-in 200ms ease-out;
}
.sk-toast .skt-ic {
  width: 26px; height: 26px; border-radius: 7px; flex: none;
  background: rgba(255, 255, 255, 0.16);
  display: grid; place-items: center;
}
.sk-toast.accept .skt-ic { background: linear-gradient(95deg, #6C4DFF, #5AA8F0); }
.sk-toast .skt-ic svg { width: 15px; height: 15px; }
.sk-toast .skt-text { display: flex; flex-direction: column; }
.sk-toast .skt-msg { font-size: 13.5px; font-weight: 750; letter-spacing: -0.01em; }
.sk-toast .skt-sub { font-size: 11px; font-weight: 550; color: rgba(255, 255, 255, 0.6); margin-top: 1px; }
/* countdown progress bar — drains over the server-driven undo window */
.sk-toast .skt-bar {
  position: absolute; left: 0; bottom: 0; height: 2.5px; width: 100%;
  transform-origin: left; border-radius: 0 0 13px 13px;
  background: linear-gradient(90deg, #6C4DFF, #62C7EE);
  animation: skt-bar var(--undo-ms, 10000ms) linear forwards;
}
@keyframes skt-bar { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.sk-toast .skt-undo {
  margin-left: 4px; height: 32px; padding: 0 14px; border-radius: 9px; border: 0;
  background: rgba(255, 255, 255, 0.14); color: #fff;
  font-family: var(--font); font-size: 12.5px; font-weight: 800; letter-spacing: -0.01em;
  cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  transition: background 0.12s ease;
}
.sk-toast .skt-undo:hover { background: rgba(255, 255, 255, 0.26); }
.sk-toast .skt-undo:disabled { opacity: 0.5; cursor: default; }
.sk-toast .skt-undo svg { width: 14px; height: 14px; }

/* Bottom-center accept/reject confirmation toast (ia-toast). */
.ia-toast {
  position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%); z-index: 240;
  display: flex; align-items: center; gap: 11px;
  padding: 13px 18px; border-radius: 13px;
  background: var(--ink); color: #fff;
  box-shadow: 0 18px 50px rgba(9, 13, 36, 0.34);
  font-size: 13.5px; font-weight: 750;
  animation: vd-toast-in 200ms ease-out;
}
.ia-toast .tk {
  width: 22px; height: 22px; border-radius: 7px; flex: none;
  display: grid; place-items: center;
}
.ia-toast .tk svg { width: 13px; height: 13px; }
.ia-toast.accept .tk { background: rgba(124, 92, 255, 0.34); }
.ia-toast.reject .tk { background: rgba(239, 72, 77, 0.34); }
@keyframes vd-toast-in { from { transform: translate(var(--toast-x, 0), 14px); opacity: 0; } to { transform: translate(var(--toast-x, 0), 0); opacity: 1; } }
.ia-toast { --toast-x: -50%; }

/* ── V2 Insights & Impacts — 3-lane board (1:1 port of the v2 handoff) ─── */
.board {
  display: grid;
  /* fr-only (0 min) so the 3 lanes always fit the canvas — no horizontal
     clipping at laptop widths. Proportions follow the handoff. */
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.05fr) minmax(0, 1.35fr);
  gap: 18px;
  align-items: start;
}
@media (max-width: 920px) { .board { grid-template-columns: 1fr; } }

.board .lane {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  display: flex; flex-direction: column;
  overflow: hidden;
  /* Board Paging: cap each lane so lane bodies scroll independently instead
     of the page growing with the longest column. The 1250px floor keeps
     2-3 insight cards visible (lane-head ~240px + ~355px cards) on common
     laptop heights — the page may scroll a little, by design. min() keeps
     the floor below the cap on short viewports so it can't double-scroll. */
  min-height: min(600px, calc(100vh - 150px));
  max-height: max(1250px, calc(100vh - 150px));
}
/* Single-column layout: the page is the scroller again — lanes grow with
   content. Must come AFTER the .board .lane block (same specificity; media
   queries add no cascade weight, source order decides). */
@media (max-width: 920px) { .board .lane { min-height: 600px; max-height: none; } }
.board .lane.lane-impact { border-color: #DDD3FF; }
.board .lane.lane-impact .lane-head { background: linear-gradient(180deg, #FAF8FF, var(--surface)); }
.board .lane.lane-tracking .lane-head { background: linear-gradient(180deg, #F5FAFE, var(--surface)); }

.board .lane-head {
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 10px;
}
.board .lane-head .title-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.board .lane-head h2 {
  margin: 0; font-size: 18px; font-weight: 750; letter-spacing: -0.015em; color: var(--ink);
  display: flex; align-items: center; gap: 10px;
}
.board .lane-num {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 14px; letter-spacing: -0.01em; flex: none; font-family: var(--font);
}
.board .lane-insights .lane-num { background: linear-gradient(145deg, #8A6CFF, #5A3DE6); }
.board .lane-tracking .lane-num { background: linear-gradient(145deg, #5BB5E5, #2B7FAA); }
.board .lane-impact .lane-num { background: linear-gradient(145deg, #FF8B4E, #E85F24); }
.board .lane-head h2 .count {
  font-size: 12px; font-family: var(--mono); font-weight: 700;
  background: var(--surface-alt); color: var(--ink-3);
  padding: 1px 8px; border-radius: var(--r-pill); border: 1px solid var(--border);
}
.board .lane.lane-tracking .lane-head h2 .count { background: var(--blue-tint); color: #2B7FAA; border-color: transparent; }
.board .lane.lane-impact .lane-head h2 .count { background: var(--violet-tint); color: var(--violet-deep); border-color: transparent; }
.board .lane-head .h-sub { font-size: 13px; font-weight: 600; color: var(--ink-3); line-height: 1.5; max-width: 460px; margin-top: 10px; }

.board .lane-filters { display: flex; gap: 4px; flex-wrap: wrap; padding-top: 2px; }
.board .lane-filters .fchip { padding: 3px 9px; font-size: 11.5px; font-weight: 800; }

.board .lane-body {
  padding: 14px; display: flex; flex-direction: column; gap: 14px; flex: 1;
  background: linear-gradient(180deg, var(--surface) 0%, #FBFCFE 100%);
  overflow-y: auto;
  scrollbar-gutter: stable;
}

/* Board Paging: per-group "Show more" footer (idle state; the loading and
   retry states arrive with the Phase 2 per-group fetch). */
.board .board-more {
  width: 100%; margin-top: 2px; padding: 9px 12px;
  border: 1px dashed var(--border); border-radius: 10px;
  background: transparent; color: var(--violet);
  font-family: inherit; font-size: 12.5px; font-weight: 800;
  cursor: pointer;
}
.board .board-more:hover { background: var(--violet-tint); border-color: var(--violet); }

/* Group sub-header */
.board .group-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 4px 6px; font-size: 11.5px; font-weight: 900;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3);
  border-bottom: 1px dashed var(--border); cursor: pointer; user-select: none;
}
.board .group-head .left { display: flex; align-items: center; gap: 7px; }
.board .group-head .left .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); }
.board .group-head.pending .left .dot { background: var(--violet); }
.board .group-head.advisory .left .dot { background: var(--ink-4); }
.board .group-head.waiting .left .dot { background: var(--violet); }
.board .group-head.committed .left .dot { background: #2B7FAA; }
.board .group-head.executed .left .dot { background: var(--success); }
.board .group-head.audited .left .dot { background: var(--success); }
.board .group-head.pending-v .left .dot { background: var(--violet); }
.board .group-head.expired .left .dot { background: var(--warning); }
.board .group-head.unverifiable .left .dot { background: var(--ink-4); }
.board .group-head .ct {
  font-family: var(--mono); font-weight: 700; color: var(--ink-3);
  letter-spacing: 0; text-transform: none; background: var(--surface-alt);
  padding: 1px 6px; border-radius: var(--r-pill); border: 1px solid var(--border); font-size: 11px;
}
.board .group-head .right { display: flex; align-items: center; gap: 6px; }
.board .group-head .chev { width: 14px; height: 14px; display: grid; place-items: center; color: var(--ink-4); transition: transform .15s ease; }
.board .group-head .chev svg { width: 14px; height: 14px; }
.board .group-head.collapsed .chev { transform: rotate(-90deg); }
.board .group-body { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.board .group-head.collapsed + .group-body { display: none; }
.board .board-empty { font-size: 12px; color: var(--ink-3); padding: 8px 4px; }
/* Lane-level empty state — one placeholder for a whole empty column (e.g. a
   freshly-onboarded channel) instead of stacked "Nothing here." blocks. */
.board .lane-empty { padding: 30px 20px 34px; text-align: center; }
.board .lane-empty .le-h { font-size: 13px; font-weight: 700; color: var(--ink-2); letter-spacing: -0.01em; }
.board .lane-empty .le-s { margin-top: 6px; font-size: 12px; font-weight: 500; color: var(--ink-4); line-height: 1.5; }

/* Lane-1 compact insight card — overrides the wide base .in-card */
.board .in-card {
  display: grid; grid-template-columns: minmax(0, 1fr); padding: 12px; gap: 10px;
  border: 1px solid var(--border); border-radius: var(--r-md);
  background: var(--surface); box-shadow: 0 1px 0 rgba(17,17,17,0.02);
}
.board .in-card:hover { background: var(--surface); border-color: var(--border-2); }
.board .in-card .in-target { display: grid; grid-template-columns: 76px 1fr; gap: 10px; align-items: flex-start; }
.board .in-card .vthumb {
  width: 76px; aspect-ratio: 16/9; border-radius: 8px; position: relative; overflow: hidden;
  display: grid; place-items: center; color: rgba(255,255,255,0.55);
  background: linear-gradient(135deg, #1a1a1f, #2c1810);
}
.board .in-card .vthumb img { width: 100%; height: 100%; object-fit: cover; }
.board .in-card .vthumb svg { width: 22px; height: 22px; }
.board .in-card .vthumb.ch { background: var(--violet-tint); color: var(--violet-deep); }
.board .vthumb .dur {
  position: absolute; right: 3px; bottom: 3px; background: rgba(0,0,0,0.78); color: #fff;
  font-family: var(--mono); font-size: 9px; font-weight: 600; padding: 1px 4px; border-radius: 3px;
}
.board .in-card .target-meta { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.board .in-card .target-meta .target-name {
  font-size: 13px; font-weight: 750; color: var(--ink); line-height: 1.32;
  overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.board .in-card .target-meta .target-sub { font-size: 11.5px; font-weight: 650; color: var(--ink-3); font-family: var(--mono); }
.board .in-card .in-tags { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; }
.board .in-card .in-tag {
  font-size: 11px; font-weight: 800; padding: 2px 8px; letter-spacing: 0; text-transform: none;
  border-radius: var(--r-pill); color: var(--ink-3); background: var(--surface-alt); border: 1px solid var(--border);
}
.board .in-card .in-tag.violet { color: var(--violet-deep); background: var(--violet-tint); border-color: transparent; }
.board .in-card .in-tag.scope { color: var(--ink-3); }
.board .in-card .in-rec { font-size: 15px; line-height: 1.32; font-weight: 750; letter-spacing: -0.015em; color: var(--ink); }
.board .in-card .in-reason { font-size: 12.5px; line-height: 1.5; font-weight: 600; color: var(--ink-2); }
.board .in-card .in-note-line { font-size: 12px; font-weight: 600; color: var(--ink-3); }

/* Actionability + verification pills */
.board .pill-action, .board .pill-verif {
  display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 800;
  letter-spacing: -0.005em; padding: 2px 8px; border-radius: var(--r-pill); border: 1px solid transparent;
}
.board .pill-action .pa-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.board .pill-action.actionable { background: var(--violet-tint); color: var(--violet-deep); }
.board .pill-action.advisory { background: var(--surface-alt); color: var(--ink-3); border-color: var(--border); }
.board .pill-verif.auto { background: var(--success-tint); color: #157C3F; }
.board .pill-verif.auditable { background: var(--warning-tint); color: #B0700C; }
.board .pill-verif.advisory { background: var(--surface-alt); color: var(--ink-3); border-color: var(--border); border-style: dashed; }

/* CTA row */
.board .card-cta { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: 5px; align-items: center; }
.board .card-cta.advisory { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.board .card-cta .btn { width: 100%; padding: 6px 10px; font-size: 12.5px; font-weight: 750; }
.board .card-cta .btn.act-accept,
.board .card-cta .btn.act-skip,
.board .card-cta .btn.act-reject,
.board .card-cta .btn.sl-note {
  height: 32px;
  padding: 0 10px;
  font-weight: 800;
  line-height: 1;
}
/* BF-123 follow-up: icon-only Add-note button (the `auto` column) — collapses to
   a square so Accept/Skip/Reject reclaim row width and their icons stop clipping. */
.board .card-cta .btn.sl-note.icon-only { width: 32px; padding: 0; gap: 0; justify-content: center; }
.board .card-cta .btn.sl-note.icon-only svg { width: 15px; height: 15px; }
.board .card-cta .note {
  background: transparent; border: 0; cursor: pointer; color: var(--ink-3);
  font-size: 12px; font-weight: 650; padding: 4px 6px; display: inline-flex; align-items: center; gap: 4px;
}
.board .card-cta .note:hover { color: var(--violet); }
.board .card-cta > .pill {
  grid-column: 1 / -1; font-size: 11.5px; font-weight: 700; color: var(--ink-3);
  background: var(--surface-alt); border: 1px solid var(--border); border-radius: var(--r-pill); padding: 4px 10px; text-align: center;
}

/* Video-scope filter banner */
.board-video-filter {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 0 0 14px; padding: 9px 14px; border-radius: var(--r-md);
  background: var(--violet-tint); border: 1px solid #DDD3FF; font-size: 12.5px; color: var(--violet-deep);
}
.board-video-filter b { font-weight: 800; }
.bvf-clear { background: transparent; border: 0; cursor: pointer; color: var(--violet-deep); font-weight: 800; font-size: 12px; }

/* ── Lane 2 (tracking) + Lane 3 (impact) cards — 1:1 port of the handoff ─ */
.board .lane .stamp { font-size: 11px; font-weight: 800; letter-spacing: 0; text-transform: none; padding: 2px 8px; }
.board .lane .stamp .dot { width: 5px; height: 5px; }

/* Tracking card (lane 2) */
.board .trk-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 12px; display: flex; flex-direction: column; gap: 10px; cursor: pointer;
  transition: box-shadow .12s ease, transform .12s ease;
}
.board .trk-card:hover { box-shadow: 0 6px 18px rgba(9,13,36,0.08); transform: translateY(-1px); }
.board .trk-card .trk-head { display: grid; grid-template-columns: 76px 1fr; gap: 10px; align-items: flex-start; }
.board .trk-card .vthumb {
  width: 76px; aspect-ratio: 16/9; border-radius: 7px; position: relative; overflow: hidden;
  display: grid; place-items: center; color: rgba(255,255,255,0.55);
  background: linear-gradient(135deg, #1a1a1f, #2c1810);
}
.board .trk-card .vthumb img { width: 100%; height: 100%; object-fit: cover; }
.board .trk-card .vthumb svg { width: 20px; height: 20px; }
.board .trk-card .vthumb.ch { background: var(--violet-tint); color: var(--violet-deep); }
.board .trk-meta { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.board .trk-title { font-size: 14px; font-weight: 750; line-height: 1.32; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.board .trk-sub { font-size: 11.5px; font-weight: 650; color: var(--ink-3); font-family: var(--mono); display: flex; gap: 8px; flex-wrap: wrap; }
.board .trk-ref { font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--violet-deep);
  background: var(--surface-alt); border: 1px solid var(--border); padding: 1px 6px; border-radius: 4px; }
.board .trk-tags { display: flex; gap: 5px; margin-top: 2px; flex-wrap: wrap; align-items: center; }
.board .trk-tags .pill-verif { font-size: 10.5px; font-weight: 700; color: var(--ink-3); background: var(--surface-alt); border: 1px solid var(--border); border-radius: 6px; padding: 2px 7px; }

/* Verification block */
.board .verif-block {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 8px;
  border-radius: var(--r-sm); background: var(--surface-alt); border: 1px solid var(--border);
}
.board .verif-block .vb { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.board .verif-block .k { font-size: 10px; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.board .verif-block .v { font-size: 12px; font-weight: 700; color: var(--ink); line-height: 1.35; }

/* Mini lifecycle timeline */
.board .mini-tl { display: flex; flex-direction: column; }
.board .mini-tl-row { display: grid; grid-template-columns: 12px 1fr auto; gap: 8px; padding: 5px 0; align-items: center; position: relative; font-size: 12px; }
.board .mini-tl-row::before { content: ""; position: absolute; left: 5px; top: 0; bottom: 0; width: 2px; background: var(--border); }
.board .mini-tl-row:first-child::before { top: 12px; }
.board .mini-tl-row:last-child::before { bottom: 12px; }
.board .mini-tl-row .pin { width: 12px; height: 12px; border-radius: 50%; background: var(--ink-3); border: 2px solid var(--surface); position: relative; z-index: 1; }
.board .mini-tl-row.violet .pin { background: var(--violet); }
.board .mini-tl-row.blue .pin { background: var(--blue); }
.board .mini-tl-row.success .pin { background: var(--success); }
.board .mini-tl-row.warning .pin { background: var(--warning); }
.board .mini-tl-row .what { color: var(--ink-2); display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.board .mini-tl-row .what .t { font-size: 12.5px; color: var(--ink); font-weight: 700; line-height: 1.32; }
.board .mini-tl-row .what .s { font-size: 11px; font-weight: 600; color: var(--ink-3); font-family: var(--mono); }
.board .mini-tl-row .when { font-size: 11px; font-weight: 700; color: var(--ink-4); font-family: var(--mono); white-space: nowrap; }
.board .mini-tl-row.dim { opacity: 0.55; }

/* Audit / tracking window progress meter */
.board .audit-bar { display: flex; flex-direction: column; gap: 4px; padding: 7px 9px; background: var(--surface-alt); border: 1px solid var(--border); border-radius: var(--r-sm); }
.board .audit-bar .row { display: flex; justify-content: space-between; font-size: 11.5px; font-weight: 650; color: var(--ink-3); }
.board .audit-bar .row b { color: var(--ink); font-weight: 800; }
.board .audit-bar .track { height: 4px; background: var(--border); border-radius: var(--r-pill); overflow: hidden; position: relative; }
.board .audit-bar .track .fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--blue); border-radius: var(--r-pill); }
.board .audit-bar.warn .track .fill { background: var(--warning); }
.board .audit-bar.exec .track .fill { background: var(--success); }

/* Tracking footer */
.board .trk-foot { display: flex; align-items: center; gap: 8px; }
.board .trk-foot .trk-note { flex: 1; font-size: 11px; font-weight: 600; color: var(--ink-3); line-height: 1.4; }
.board .trk-foot .btn { padding: 5px 10px; font-size: 12px; font-weight: 750; }

/* Impact cards (lane 3) — status-specific treatments */
.board .imp-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px; display: flex; flex-direction: column; gap: 10px; cursor: pointer; transition: box-shadow .12s ease, transform .12s ease; }
.board .imp-card:hover { box-shadow: 0 6px 18px rgba(9,13,36,0.08); transform: translateY(-1px); }
.board .imp-card.audited { border-left: 3px solid var(--success); }
.board .imp-card.pending-v { border-left: 3px solid var(--violet); }
.board .imp-card.expired { border-left: 3px dashed var(--warning); opacity: 0.92; }
.board .imp-card.unverif { border-left: 3px dashed var(--ink-4); opacity: 0.85; background: var(--surface-alt); }
.board .imp-head { display: grid; grid-template-columns: 80px 1fr auto; gap: 10px; align-items: flex-start; }
.board .imp-card .vthumb {
  width: 80px; aspect-ratio: 16/9; border-radius: 7px; position: relative; overflow: hidden;
  display: grid; place-items: center; color: rgba(255,255,255,0.55);
  background: linear-gradient(135deg, #1a1a1f, #2c1810);
}
.board .imp-card .vthumb img { width: 100%; height: 100%; object-fit: cover; }
.board .imp-card .vthumb svg { width: 20px; height: 20px; }
.board .imp-card .vthumb.ch { background: var(--violet-tint); color: var(--violet-deep); }
.board .imp-meta { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.board .imp-title { font-size: 14px; font-weight: 750; line-height: 1.32; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.board .imp-sub { font-size: 11.5px; font-weight: 650; color: var(--ink-3); font-family: var(--mono); display: flex; gap: 8px; flex-wrap: wrap; }
.board .imp-note { font-size: 12px; font-weight: 600; color: var(--ink-2); line-height: 1.45; }
.board .imp-foot { display: flex; justify-content: flex-end; gap: 6px; }
.board .imp-foot .btn { padding: 5px 10px; font-size: 12px; font-weight: 750; }
.board .result-stamp { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: var(--r-pill); letter-spacing: 0.04em; flex: none; }
.board .result-stamp .dot { width: 6px; height: 6px; border-radius: 50%; }
.board .result-stamp.audited { background: var(--success-tint); color: #157C3F; }
.board .result-stamp.audited .dot { background: var(--success); }
.board .result-stamp.pending { background: var(--violet-tint); color: var(--violet-deep); }
.board .result-stamp.pending .dot { background: var(--violet); }
.board .result-stamp.expired { background: var(--surface-alt); color: var(--ink-2); border: 1px dashed var(--border-2); }
.board .result-stamp.expired .dot { background: var(--warning); }
.board .result-stamp.unverif { background: var(--surface-alt); color: var(--ink-3); border: 1px dashed var(--border-2); }
.board .result-stamp.unverif .dot { background: var(--ink-4); }

/* ── Audited card measured before/after (PR-C) ───────────────────────────
   Surfaced only on audited lane-3 cards. Result-tinted left borders override
   the generic .audited green border via later source order. */
.board .imp-card.hit { border-left: 3px solid var(--success); }
.board .imp-card.partial { border-left: 3px solid var(--warning); }
.board .imp-card.miss { border-left: 3px solid var(--danger); }
.board .result-stamp.hit { background: var(--success-tint); color: #157C3F; }
.board .result-stamp.hit .dot { background: var(--success); }
.board .result-stamp.partial { background: var(--warning-tint); color: #B0700C; }
.board .result-stamp.partial .dot { background: var(--warning); }
.board .result-stamp.miss { background: var(--danger-tint); color: var(--danger); }
.board .result-stamp.miss .dot { background: var(--danger); }

/* before → after grid: 2 metric cells + a window cell */
.board .ba-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; background: var(--surface-alt); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 8px; }
.board .ba-cell { display: flex; flex-direction: column; gap: 3px; padding: 4px 6px; min-width: 0; }
.board .ba-cell + .ba-cell { border-left: 1px solid var(--border); }
.board .ba-cell .k { font-size: 10px; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.board .ba-cell .move { font-size: 14px; font-weight: 800; font-family: var(--mono); color: var(--success); }
.board .ba-cell .move.down { color: var(--danger); }
.board .ba-cell .move.warn { color: #B0700C; }
.board .ba-cell .move.muted { color: var(--ink-3); }
.board .ba-cell .ba-pair { font-size: 11px; font-weight: 650; color: var(--ink-3); font-family: var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.board .ba-cell .ba-pair b { color: var(--ink-2); font-weight: 700; }

/* expected-vs-measured / measured-movement-only proof line */
.board .proof-line { display: flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 600; color: var(--ink-3); padding: 6px 8px; background: var(--surface); border: 1px dashed var(--border-2); border-radius: var(--r-sm); line-height: 1.45; }
.board .proof-line svg { width: 13px; height: 13px; color: var(--success); flex: none; }
.board .proof-line b { color: var(--ink-2); font-weight: 750; }
.board .proof-line.warn svg { color: var(--warning); }
.board .proof-line.muted svg { color: var(--ink-4); }

/* ── Audited results in the insight detail drawer Overview ───────────────
   Ported 1:1 from the Claude Design insight-drawer.js. Verdict/movement hex
   literals are semantic (not themeable); structural colors use deployed tokens. */
.idr-sec + .idr-sec { margin-top: 18px; }
.idr-k { font-size: 11px; font-weight: 800; color: var(--ink-4); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 9px; }

.idr-verdict { display: flex; align-items: center; gap: 13px; padding: 15px 16px; border-radius: 14px; border: 1px solid var(--border); }
.idr-verdict .vbadge { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; flex: none; color: #fff; }
.idr-verdict .vbadge svg { width: 21px; height: 21px; }
.idr-verdict .vtext { flex: 1; min-width: 0; }
.idr-verdict .vtext b { font-size: 17px; font-weight: 850; letter-spacing: -0.01em; display: block; line-height: 1.15; }
.idr-verdict .vtext span { font-size: 12.5px; font-weight: 600; margin-top: 2px; display: block; line-height: 1.35; }
.idr-verdict .vwin { font-size: 10.5px; font-weight: 800; font-family: var(--mono); padding: 4px 9px; border-radius: 999px; flex: none; text-transform: uppercase; letter-spacing: 0.03em; white-space: nowrap; }
.idr-verdict.hit { background: #EAF7EF; border-color: #BDE3CE; } .idr-verdict.hit .vbadge { background: #1F8A5B; } .idr-verdict.hit .vtext b { color: #176844; } .idr-verdict.hit .vtext span { color: #3f7a5d; } .idr-verdict.hit .vwin { background: #d3eede; color: #176844; }
.idr-verdict.partial { background: #FCF4E6; border-color: #F2D49A; } .idr-verdict.partial .vbadge { background: #D9912B; } .idr-verdict.partial .vtext b { color: #9A6B12; } .idr-verdict.partial .vtext span { color: #9c7836; } .idr-verdict.partial .vwin { background: #f6e6c4; color: #9A6B12; }
.idr-verdict.miss { background: #FCECED; border-color: #F6C2C5; } .idr-verdict.miss .vbadge { background: #DA2F3A; } .idr-verdict.miss .vtext b { color: #B0212B; } .idr-verdict.miss .vtext span { color: #a84e54; } .idr-verdict.miss .vwin { background: #f7d4d6; color: #B0212B; }
.idr-verdict.neutral { background: var(--surface-alt, #f6f7fb); border-color: var(--border); } .idr-verdict.neutral .vbadge { background: #5b6478; } .idr-verdict.neutral .vtext b { color: var(--ink); } .idr-verdict.neutral .vtext span { color: var(--ink-3); } .idr-verdict.neutral .vwin { background: var(--surface-2, #eef0f6); color: var(--ink-3); }

/* BF-126 / A1: a legacy range is a forecast/tolerance, not a success target.
   within / outside / NoVerdict render GENUINELY NEUTRAL (no green, no success
   tint, no violet); only miss (below expected) is danger. These selectors are
   defined AFTER .imp-card.audited / .result-stamp.audited so neutral wins. */
/* board card left border */
.board .imp-card.within, .board .imp-card.outside, .board .imp-card.noverdict { border-left: 3px solid var(--border); }
.board .imp-card.miss { border-left: 3px solid var(--danger); }
/* board card verdict stamp (impactResultStamp → cls) */
.board .result-stamp.neutral { background: var(--surface-alt); color: var(--ink-3); }
.board .result-stamp.neutral .dot { background: var(--ink-4); }
/* impact-page row stamp (impactRowStamp → kind, rendered as .stamp.<kind>) */
.stamp.neutral { background: var(--surface-alt); color: var(--ink-3); }
.stamp.neutral .dot { background: var(--ink-4); }
.stamp.miss { background: var(--danger-tint); color: var(--danger); }
.stamp.miss .dot { background: var(--danger); }
/* insight-drawer verdict banner (drawerVerdictHTML → idr-verdict.<result>) */
.idr-verdict.within, .idr-verdict.outside { background: var(--surface-alt); border-color: var(--border); }
.idr-verdict.within .vbadge, .idr-verdict.outside .vbadge { background: var(--ink-4); }
.idr-verdict.within .vtext b, .idr-verdict.outside .vtext b { color: var(--ink); }
.idr-verdict.within .vtext span, .idr-verdict.outside .vtext span { color: var(--ink-3); }
.idr-verdict.within .vwin, .idr-verdict.outside .vwin { background: var(--surface-alt); color: var(--ink-3); }
/* proof-line default icon must NOT be green for neutral verdicts (base is green;
   within/outside use the muted icon variant — pin muted to a neutral tone). */
.board .proof-line svg { color: var(--ink-4); }
/* BF-126 / A1: a "miss" (below expected range) proof line is DANGER/red, never amber. */
.board .proof-line.miss svg { color: var(--danger); }

.idr-ea { display: flex; flex-wrap: wrap; align-items: stretch; gap: 10px; }
.idr-ea .ea-col { flex: 1; min-width: 140px; border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; background: var(--surface, #fff); }
.idr-ea .eak { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-4); margin-bottom: 5px; }
.idr-ea .eav { font-size: 16px; font-weight: 800; letter-spacing: -0.01em; color: var(--ink); line-height: 1.32; overflow-wrap: anywhere; }
.idr-ea .eav.exp { color: var(--ink-2); }
.idr-ea .eav.success { color: #1F8A5B; } .idr-ea .eav.warning { color: #C4791A; } .idr-ea .eav.danger { color: #DA2F3A; } .idr-ea .eav.neutral { color: var(--ink); }
.idr-ea .ea-pct { flex-basis: 100%; font-size: 12.5px; font-weight: 700; color: #9A6B12; background: #FCF4E6; border: 1px solid #F2D49A; border-radius: 10px; padding: 8px 12px; }

.idr-mv { border: 1px solid var(--border); border-radius: 13px; overflow: hidden; }
.idr-mv-row { display: flex; align-items: center; gap: 14px; padding: 13px 15px; }
.idr-mv-row + .idr-mv-row { border-top: 1px solid var(--border); }
.idr-mv-row .mvl { flex: 1; font-size: 14px; font-weight: 750; color: var(--ink); letter-spacing: -0.01em; }
.idr-mv-row .mvc { display: flex; align-items: center; gap: 9px; font-variant-numeric: tabular-nums; }
.idr-mv-row .mvc .b { font-size: 14px; font-weight: 650; color: var(--ink-3); }
.idr-mv-row .mvc .arw { color: var(--ink-4); font-weight: 800; }
.idr-mv-row .mvc .a { font-size: 15px; font-weight: 850; color: var(--ink); }
.idr-mv-row .mvc.none { font-size: 12px; font-weight: 600; color: var(--ink-4); font-style: italic; }
.idr-mv-row .mvd { flex: none; min-width: 66px; text-align: right; font-size: 13px; font-weight: 850; font-variant-numeric: tabular-nums; }
.idr-mv-row .mvd.up { color: #1F8A5B; } .idr-mv-row .mvd.down { color: #DA2F3A; } .idr-mv-row .mvd.neutral { color: var(--ink-4); }

.idr-note { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 13px; border: 1px solid var(--border); background: var(--surface-alt, #f6f7fb); }
.idr-note svg { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--ink-3); }
.idr-note p { margin: 0; font-size: 13px; font-weight: 550; line-height: 1.55; color: var(--ink-2); }
.idr-note b { font-weight: 800; color: var(--ink); }
.idr-auditmeta { margin-top: 16px; font-size: 12px; font-weight: 700; font-family: var(--mono); color: var(--ink-4); letter-spacing: -0.005em; }
.drw-reslink { display: inline-block; margin-top: 12px; background: transparent; border: 0; color: var(--violet-deep, #5A3DE6); font-size: 13.5px; font-weight: 800; letter-spacing: -0.01em; cursor: pointer; padding: 0; }
.drw-reslink:hover { text-decoration: underline; }

/* ── Board drag-to-accept chrome (1:1 port of insight-dnd.js) ─────────── */
.board .in-card.dnd-able { position: relative; cursor: grab; }
.board .in-card.dnd-able:active { cursor: grabbing; }
/* grip handle with expanding "Drag to accept" label */
.board .in-card.dnd-able .dnd-grip {
  position: absolute; top: 9px; right: 9px; height: 26px; padding: 0 8px; border-radius: 8px;
  display: inline-flex; align-items: center; gap: 6px; color: var(--ink-4);
  background: var(--surface); border: 1px solid var(--border);
  opacity: 0; transform: translateY(-2px);
  transition: opacity .14s ease, transform .14s ease, color .12s ease, background .12s ease, border-color .12s ease, box-shadow .12s ease;
  cursor: grab; z-index: 4; touch-action: none;
}
.board .in-card.dnd-able .dnd-grip svg { width: 16px; height: 16px; flex: none; }
.board .in-card.dnd-able .dnd-grip .gl {
  max-width: 0; overflow: hidden; white-space: nowrap; font-family: var(--font);
  font-size: 11.5px; font-weight: 800; letter-spacing: -0.01em; color: var(--violet-deep);
  opacity: 0; transition: max-width .18s ease, opacity .14s ease;
}
.board .in-card.dnd-able:hover .dnd-grip {
  opacity: 1; transform: translateY(0); color: var(--violet-deep);
  border-color: var(--violet); background: #F1EEFE; box-shadow: 0 4px 12px rgba(108,77,255,0.18);
}
.board .in-card.dnd-able:hover .dnd-grip .gl { max-width: 90px; opacity: 1; }
/* left violet accent bar + hover lift */
.board .in-card.dnd-able::before {
  content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 3px;
  background: var(--violet); opacity: 0; transform: scaleY(.4); transform-origin: center;
  transition: opacity .16s ease, transform .16s ease;
}
.board .in-card.dnd-able:hover { box-shadow: 0 0 0 1px rgba(108,77,255,0.30), 0 12px 30px rgba(108,77,255,0.12); transform: translateY(-1px); }
.board .in-card.dnd-able:hover::before { opacity: 1; transform: scaleY(1); }
/* source placeholder left behind while dragging */
.board .in-card.dnd-source { opacity: .45; }
.board .in-card.dnd-source::after {
  content: ""; position: absolute; inset: 0; border: 2px dashed var(--violet);
  border-radius: var(--r-md); background: rgba(108,77,255,0.05); pointer-events: none;
}
/* floating ghost — host wraps it in `.board` so `.board .in-card` compact CSS applies */
.dnd-ghost-host {
  position: fixed; z-index: 240; left: 0; top: 0; pointer-events: none;
  display: block !important; grid-template-columns: none !important; gap: 0 !important;
  padding: 0 !important; background: transparent !important; border: 0 !important;
  border-radius: 0 !important; overflow: visible !important; min-height: 0 !important; box-shadow: none !important;
}
.dnd-ghost {
  border-radius: var(--r-md); box-shadow: 0 26px 70px rgba(9,13,36,0.28), 0 6px 16px rgba(9,13,36,0.12);
  transform: translate(-50%, -50%) scale(1.03); opacity: .97; background: var(--surface);
}
.dnd-ghost .dnd-grip { display: none !important; }
/* lanes during a drag — dim the others, highlight the drop lane */
.board.dnd-active .lane-impact, .board.dnd-active .lane-insights { transition: opacity .16s ease; }
.board.dnd-active .lane-impact { opacity: .5; }
.lane-tracking.dnd-target .lane-body { outline: 2px dashed var(--violet); outline-offset: -2px; border-radius: var(--r-card); background: rgba(108,77,255,0.045); transition: background .16s ease; }
.lane-tracking.dnd-target.dnd-over .lane-body { background: rgba(108,77,255,0.10); }
/* drop point */
.dnd-drop {
  margin: 0 0 10px; border: 2px dashed var(--violet); border-radius: 14px; background: rgba(108,77,255,0.05);
  padding: 18px 16px; display: flex; align-items: center; justify-content: center; gap: 10px;
  color: var(--violet-deep); font-family: var(--font); font-size: 13.5px; font-weight: 800; letter-spacing: -0.01em; text-align: center;
  transition: background .14s ease, border-color .14s ease, transform .14s ease;
  /* Lane bodies scroll (Board Paging): pin the drop slot to the visible top
     of the scrollport so it can't hide above a scrolled lane during a drag. */
  position: sticky; top: 0; z-index: 5;
}
.dnd-drop .dd-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--violet); color: #fff; flex: none; }
.dnd-drop .dd-ico svg { width: 17px; height: 17px; }
.lane-tracking.dnd-over .dnd-drop { border-style: solid; background: rgba(108,77,255,0.12); transform: scale(1.012); }
/* loading card (post-drop, awaiting backend) */
.dnd-loading {
  margin: 0 0 10px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface);
  padding: 14px 15px; display: flex; align-items: center; gap: 12px; box-shadow: 0 8px 22px rgba(9,13,36,0.08);
}
.dnd-loading .dl-sp { width: 22px; height: 22px; flex: none; border-radius: 50%; border: 2.5px solid rgba(108,77,255,0.25); border-top-color: var(--violet); animation: dndspin .7s linear infinite; }
@keyframes dndspin { to { transform: rotate(360deg); } }
.dnd-loading .dl-tx { min-width: 0; display: flex; flex-direction: column; }
.dnd-loading .dl-tx .a { font-size: 13px; font-weight: 800; letter-spacing: -0.01em; color: var(--ink); }
.dnd-loading .dl-tx .b { font-size: 11.5px; font-weight: 550; color: var(--ink-3); font-family: var(--mono); margin-top: 1px; }
body.dnd-dragging { user-select: none; -webkit-user-select: none; cursor: grabbing; }
/* ── V2 Insight Detail Drawer (centered 1080px modal, PR-C) ───────────── */
.drawer-backdrop {
  position: fixed; inset: 0; z-index: 200; background: rgba(9, 13, 36, 0.42);
  backdrop-filter: blur(1.5px); animation: drw-fade 160ms ease-out;
}
@keyframes drw-fade { from { opacity: 0; } to { opacity: 1; } }
.insight-drawer {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: min(1080px, calc(100vw - 48px)); height: min(86vh, 880px);
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  box-shadow: 0 32px 90px rgba(9, 13, 36, 0.28); z-index: 201;
  display: flex; flex-direction: column; overflow: hidden;
  animation: drw-pop 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes drw-pop { from { opacity: 0; transform: translate(-50%, -46%) scale(0.97); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
.drawer-state { flex: 1; display: grid; place-items: center; gap: 12px; color: var(--ink-3); font-size: 13.5px; font-weight: 650; }
.drawer-state.error { color: var(--danger); flex-direction: column; }
.drawer-state .dl-sp { width: 24px; height: 24px; border-radius: 50%; border: 2.5px solid rgba(108,77,255,0.25); border-top-color: var(--violet); animation: dndspin .7s linear infinite; }

.drawer-head { padding: 20px 24px 16px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; flex: none; }
.drawer-head .dh-line { display: flex; align-items: center; gap: 10px; }
.drawer-head .dh-ref { font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--ink-3); }
.drawer-head .dh-title { margin: 8px 0 0; font-size: 21px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.28; color: var(--ink); }
.drawer-head .dh-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.drawer-head .dh-tags span:not(.pill-verif) { display: inline-flex; align-items: center; min-height: 24px; padding: 3px 10px; border-radius: var(--r-pill); background: var(--surface-alt); border: 1px solid var(--border); color: var(--ink-3); font-size: 11.5px; font-weight: 800; }
.drawer-close { background: var(--surface-alt); border: 1px solid var(--border); border-radius: 9px; width: 34px; height: 34px; font-size: 20px; line-height: 1; color: var(--ink-3); cursor: pointer; flex: none; }
.drawer-close:hover { color: var(--ink); border-color: var(--ink-4); }

.drawer-body { padding: 18px 24px 8px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 16px; }
.drawer-video { display: grid; grid-template-columns: 116px 1fr; gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-alt); }
.drawer-video .dv-thumb { width: 116px; aspect-ratio: 16/9; border-radius: 8px; overflow: hidden; position: relative; display: grid; place-items: center; color: rgba(255,255,255,0.55); background: linear-gradient(135deg, #1a1a1f, #2c1810); }
.drawer-video .dv-thumb.ch { background: var(--violet-tint); color: var(--violet-deep); }
.drawer-video .dv-thumb img { width: 100%; height: 100%; object-fit: cover; }
.drawer-video .dv-thumb svg { width: 26px; height: 26px; }
.drawer-video .dv-thumb .dur { position: absolute; right: 4px; bottom: 4px; background: rgba(0,0,0,0.78); color: #fff; font-family: var(--mono); font-size: 10px; font-weight: 600; padding: 1px 5px; border-radius: 3px; }
.drawer-video .dv-meta { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.drawer-video .dv-meta strong { font-size: 14px; font-weight: 750; color: var(--ink); line-height: 1.32; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.drawer-video .dv-sub { font-size: 11.5px; font-weight: 650; color: var(--ink-3); font-family: var(--mono); }

.drawer-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); }
.drawer-tab { background: transparent; border: 0; border-bottom: 2px solid transparent; padding: 8px 14px; font-family: var(--font); font-size: 13px; font-weight: 750; color: var(--ink-3); cursor: pointer; margin-bottom: -1px; }
.drawer-tab:hover { color: var(--ink); }
.drawer-tab.active { color: var(--violet-deep); border-bottom-color: var(--violet); }
.drawer-tabbody { display: flex; flex-direction: column; gap: 16px; padding-bottom: 8px; }

.drw-sec h3 { margin: 0 0 8px; font-size: 11px; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.drw-hero-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(260px, .8fr); gap: 12px; }
.drw-panel,
.drw-source-card,
.drw-action-card { border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-alt); padding: 14px 15px; }
.drw-panel.primary { background: var(--surface); }
.drw-rec { margin: 0; font-size: 16px; font-weight: 750; line-height: 1.4; color: var(--ink); }
.drw-sum { margin: 8px 0 0; font-size: 13.5px; font-weight: 600; line-height: 1.55; color: var(--ink-2); }
.drw-muted { margin: 0; font-size: 13px; font-weight: 600; color: var(--ink-3); line-height: 1.5; }
.drw-muted.small { font-size: 11.5px; margin-top: 8px; }
.drw-note { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); line-height: 1.5; padding: 10px 12px; background: var(--surface-alt); border: 1px solid var(--border); border-radius: var(--r-sm); }
.drw-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.drw-metrics > div { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; background: var(--surface-alt); border: 1px solid var(--border); border-radius: var(--r-sm); }
.drw-metrics .k { font-size: 10.5px; font-weight: 900; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.drw-metrics b { font-size: 17px; font-weight: 800; color: var(--ink); font-family: var(--mono); }
.drw-evd-line { display: flex; flex-wrap: wrap; gap: 6px 10px; padding: 7px 0; border-bottom: 1px dashed var(--border); font-size: 13px; }
.drw-evd-line .k { font-weight: 800; color: var(--ink-3); }
.drw-evd-line .v { font-weight: 700; color: var(--ink); }
.drw-evd-line .c { width: 100%; font-size: 11.5px; color: var(--ink-3); }
.drw-source-list { display: flex; flex-direction: column; gap: 10px; }
.drw-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.drw-source-card { background: #f8f9fc; }
.drw-source-card .k { display: block; margin-bottom: 6px; font-size: 10.5px; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.drw-source-card p { margin: 0; font-size: 13px; line-height: 1.5; font-weight: 650; color: var(--ink-2); }
.drw-source-card small { display: block; margin-top: 7px; font-size: 11.5px; line-height: 1.35; font-weight: 650; color: var(--ink-4); font-family: var(--mono); }
.drw-action-card { background: linear-gradient(180deg, #fff, #fafbff); }
.drw-steps { margin: 10px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 7px; counter-reset: drwstep; }
.drw-steps li { counter-increment: drwstep; display: grid; grid-template-columns: 24px 1fr auto; gap: 9px; align-items: center; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface-alt); font-size: 12.5px; font-weight: 650; color: var(--ink-2); }
.drw-steps li::before { content: counter(drwstep); width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; background: var(--violet-tint); color: var(--violet-deep); font-size: 12px; font-weight: 900; }
.drw-steps li b { font-size: 10px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: var(--violet-deep); }
.built-from { display: flex; flex-wrap: wrap; gap: 7px; }
.built-from .source-pill { font-size: 11.5px; font-weight: 700; color: var(--ink-2); background: var(--surface-alt); border: 1px solid var(--border); border-radius: var(--r-pill); padding: 4px 11px; }
.built-from .source-pill b { color: var(--ink); font-family: var(--mono); margin-right: 2px; }
.insight-drawer .verif-block { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 10px; border-radius: var(--r-sm); background: var(--surface-alt); border: 1px solid var(--border); margin-top: 10px; }
.insight-drawer .verif-block .vb { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.insight-drawer .verif-block .k { font-size: 10px; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.insight-drawer .verif-block .v { font-size: 12.5px; font-weight: 700; color: var(--ink); }
.insight-drawer .pill-verif { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 800; padding: 4px 11px; border-radius: var(--r-pill); border: 1px solid transparent; }
.insight-drawer .pill-verif.auto { background: var(--success-tint); color: #157C3F; }
.insight-drawer .pill-verif.auditable { background: var(--warning-tint); color: #B0700C; }
.insight-drawer .pill-verif.advisory { background: var(--surface-alt); color: var(--ink-3); border-color: var(--border); border-style: dashed; }

/* Learning Signal detail drawer — read-only variant of the shared drawer shell. */
.insight-drawer.learning .drawer-tab.active { color: #157C3F; border-bottom-color: var(--success); }
.insight-drawer.learning .drawer-head .dh-tags .ld-cat { background: var(--success-tint); color: #157C3F; border-color: transparent; }
.insight-drawer.learning .drawer-video .dv-thumb.ch { background: var(--success-tint); color: #157C3F; }
.insight-drawer.learning .dh-badge.success { background: var(--success-tint); color: #157C3F; border-color: transparent; }
.ld-lead { margin-top: 0; }
.ld-scorebar { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid #BDE3CE; border-radius: var(--r-md); background: var(--success-tint); }
.ld-ring { --score: 0; position: relative; width: 56px; height: 56px; border-radius: 50%; flex: none; display: grid; place-items: center; background: conic-gradient(var(--success) calc(var(--score) * 1%), #cfe7da 0); color: #157C3F; }
.ld-ring::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--surface); }
.ld-ring b { position: relative; z-index: 1; font-size: 16px; font-weight: 900; letter-spacing: -0.02em; }
.ld-scoretx .a { font-size: 14.5px; font-weight: 850; color: var(--ink); letter-spacing: -0.01em; }
.ld-scoretx .b { margin-top: 2px; font-size: 12.5px; font-weight: 750; color: #157C3F; }
.ld-scoretx p { margin: 6px 0 0; font-size: 12.5px; font-weight: 600; line-height: 1.45; color: var(--ink-3); }
.ld-readonly { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; align-items: start; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-alt); }
.ld-ro-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: var(--ink); color: #fff; font-family: var(--mono); font-weight: 850; }
.ld-readonly b { display: block; font-size: 13.5px; font-weight: 850; color: var(--ink); }
.ld-readonly p { margin: 4px 0 0; color: var(--ink-3); font-size: 13px; font-weight: 600; line-height: 1.5; }
.ld-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ld-panel { border: 1px solid var(--border); border-radius: var(--r-md); padding: 16px 17px; background: var(--surface); }
.ld-panel.held { border-color: #F2D49A; background: #FEF8EC; }
.ld-panel.next { border-color: #BDE3CE; background: var(--success-tint); }
.ld-ph { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; font-size: 13px; font-weight: 900; letter-spacing: 0.03em; text-transform: uppercase; color: var(--ink-3); }
.ld-pic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex: none; color: #fff; }
.ld-pic svg { width: 16px; height: 16px; }
.ld-pic.warn { background: #D9912B; }
.ld-pic.green { background: var(--success); }
.ld-panel p { margin: 0; color: var(--ink-2); font-size: 14px; font-weight: 600; line-height: 1.6; }
.ld-pills { display: flex; flex-wrap: wrap; gap: 7px; }
.ld-pill { display: inline-flex; align-items: center; gap: 3px; min-height: 26px; padding: 4px 11px; border-radius: var(--r-pill); border: 1px solid var(--border); background: var(--surface-alt); color: var(--ink-2); font-size: 12px; font-weight: 750; }
.ld-pill b { color: var(--ink); font-family: var(--mono); }
.insight-drawer.learning .ld-tl .mini-tl-row.success .pin { background: var(--success); }
.ld-footer .drawer-actions { min-width: 0; }
/* History timeline reuses the board .mini-tl rules (scoped .board); restate for the drawer */
.insight-drawer .mini-tl { display: flex; flex-direction: column; }
.insight-drawer .mini-tl-row { display: grid; grid-template-columns: 12px 1fr auto; gap: 10px; padding: 7px 0; align-items: center; position: relative; }
.insight-drawer .mini-tl-row::before { content: ""; position: absolute; left: 5px; top: 0; bottom: 0; width: 2px; background: var(--border); }
.insight-drawer .mini-tl-row:first-child::before { top: 14px; }
.insight-drawer .mini-tl-row:last-child::before { bottom: 14px; }
.insight-drawer .mini-tl-row .pin { width: 12px; height: 12px; border-radius: 50%; background: var(--ink-3); border: 2px solid var(--surface); position: relative; z-index: 1; }
.insight-drawer .mini-tl-row.violet .pin { background: var(--violet); }
.insight-drawer .mini-tl-row.blue .pin { background: var(--blue); }
.insight-drawer .mini-tl-row.success .pin { background: var(--success); }
.insight-drawer .mini-tl-row.warning .pin { background: var(--warning); }
.insight-drawer .mini-tl-row.danger .pin { background: var(--danger); }
.insight-drawer .mini-tl-row .what { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.insight-drawer .mini-tl-row .what .t { font-size: 13px; color: var(--ink); font-weight: 700; }
.insight-drawer .mini-tl-row .what .s { font-size: 11.5px; font-weight: 600; color: var(--ink-3); font-family: var(--mono); }
.insight-drawer .mini-tl-row .when { font-size: 11.5px; font-weight: 700; color: var(--ink-4); font-family: var(--mono); white-space: nowrap; }
.insight-drawer .mini-tl-row.dim { opacity: 0.55; }

.drawer-footer { padding: 14px 24px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; gap: 12px; flex: none; background: var(--surface); }
.drawer-footer .drawer-actions { display: flex; gap: 8px; align-items: center; }
.drawer-footer .drawer-actions .btn { padding: 9px 16px; font-size: 13px; }
.drawer-footer .drawer-actions .btn.act-accept,
.drawer-footer .drawer-actions .btn.act-skip,
.drawer-footer .drawer-actions .btn.act-reject,
.drawer-footer .drawer-actions .btn.sl-note,
.drawer-footer .drawer-actions .btn.sl-open {
  height: 32px;
  padding: 0 10px;
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1;
}
.drawer-footer .drawer-actions .pill { font-size: 12.5px; font-weight: 700; color: var(--ink-3); background: var(--surface-alt); border: 1px solid var(--border); border-radius: var(--r-pill); padding: 6px 14px; }

@media (max-width: 720px) {
  .insight-drawer { width: 100vw; height: 100vh; border-radius: 0; top: 0; left: 0; transform: none; }
  .insight-drawer.dummy { } /* keep specificity */
  .drw-metrics { grid-template-columns: 1fr 1fr; }
  .drw-hero-grid,
  .drw-two,
  .ld-panels { grid-template-columns: 1fr; }
}
.dh-badge { display: inline-flex; align-items: center; font-size: 11.5px; font-weight: 800; letter-spacing: 0.01em; padding: 3px 10px; border-radius: var(--r-pill); background: var(--surface-alt); color: var(--ink-3); border: 1px solid var(--border); }
.dh-badge.violet { background: var(--violet-tint); color: var(--violet-deep); border-color: transparent; }
.dh-badge.blue { background: var(--blue-tint); color: #2B7FAA; border-color: transparent; }
.dh-badge.success { background: var(--success-tint); color: #157C3F; border-color: transparent; }
.dh-badge.warning { background: var(--warning-tint); color: #B0700C; border-color: transparent; }
.dh-badge.danger { background: var(--danger-tint, #FDECEC); color: var(--danger); border-color: transparent; }

/* ── Home: Learning Signals module (2-piece split) ───────────────────── */
.section-head-ls { margin-top: 26px; }
.section-head-ls h2 .ls-count { font-size: 12px; font-family: var(--mono); font-weight: 700; color: var(--ink-3); background: var(--surface-alt); border: 1px solid var(--border); border-radius: var(--r-pill); padding: 1px 8px; margin-left: 6px; vertical-align: middle; }
.feed-card-ls { border-left: 3px solid var(--warning); }

/* ── Home/Learning insight card CTA column (Creator Dashboard v2 handoff) ─ */
.in-card .in-cta { display: flex; flex-direction: column; gap: 8px; }
.in-card .in-cta .action-row { display: flex; gap: 6px; }
.in-card .in-cta .action-row .btn { flex: 1; }
.in-card .in-cta .action-row .pill { flex: 1; text-align: center; }
.btn.sm.ghost.danger { color: var(--danger); }
.btn.sm.ghost.danger:hover { background: var(--danger-tint, #FDECEC); border-color: var(--danger); color: var(--danger); }
.in-card .evidence-box { display: flex; flex-direction: column; gap: 11px; background: var(--surface-alt); border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px 13px; }
.in-card .evidence-block { display: flex; flex-direction: column; gap: 6px; }
.in-card .evidence-label,
.lrn-video .built-from-box .evidence-label { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 900; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-3); }
.in-card .evidence-icon,
.lrn-video .built-from-box .evidence-icon { width: 16px; height: 16px; border-radius: 5px; display: grid; place-items: center; font-size: 11px; font-weight: 900; background: var(--violet-tint); color: var(--violet-deep); }
.in-card .evidence-icon.green,
.lrn-video .built-from-box .evidence-icon.green { background: var(--success-tint); color: #157C3F; }
.in-card .reasoning-text { margin: 0; font-size: 12.5px; font-weight: 550; color: var(--ink-2); line-height: 1.46; }
.in-card .built-from { display: flex; flex-wrap: wrap; gap: 5px; }
.in-card .src-pill,
.lrn-video .built-from-box .src-pill { font-size: 10.5px; font-weight: 700; font-family: var(--mono); color: var(--ink-3); background: var(--surface); border: 1px solid var(--border); padding: 2px 7px; border-radius: var(--r-pill); }
.in-target .built-from-box,
.lrn-video .built-from-box {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 5px;
  padding: 9px 10px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.in-target .built-from-box .evidence-label,
.lrn-video .built-from-box .evidence-label { font-size: 9.5px; gap: 5px; }
.in-target .built-from-box .evidence-icon,
.lrn-video .built-from-box .evidence-icon { width: 14px; height: 14px; border-radius: 4px; font-size: 10px; }
.in-target .built-from-box .built-from,
.lrn-video .built-from-box .built-from { display: grid; grid-template-columns: 1fr; gap: 5px; }
.in-target .built-from-box .src-pill,
.lrn-video .built-from-box .src-pill { min-width: 0; }
.in-card .side-link-row,
.lrn-card .side-link-row { display: flex; gap: 6px; align-items: center; padding: 0 2px; flex-wrap: wrap; }
.in-card .side-link-row .sl-note,
.in-card .side-link-row .sl-open,
.lrn-card .side-link-row .sl-note,
.lrn-card .side-link-row .sl-open { letter-spacing: -0.01em; }
.home-action-panel .in-card { row-gap: 0; align-content: start; }
.home-action-panel .in-card .in-body > .in-reason {
  display: block;
  margin-left: -202px;
  padding-left: 202px;
  width: calc(100% + 202px);
  box-sizing: border-box;
}
.home-action-panel .in-card .in-reason-wide { display: none; }
.home-action-panel .in-card .in-cta { grid-column: 3; grid-row: 1; }
@media (max-width: 1240px) {
  .in-card { grid-template-columns: 150px minmax(0, 1fr); }
  .in-card .in-cta { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: stretch; gap: 12px; padding-top: 4px; }
  .in-card .in-cta .action-row { flex: 0 0 168px; flex-direction: column; align-self: flex-start; }
  .in-card .in-cta .action-row .btn { flex: none; }
  .in-card .in-cta .evidence-box { flex: 1 1 280px; }
  .in-card .in-cta .side-link-row { flex-basis: 100%; }
}
@media (max-width: 1440px) {
  .home-action-panel .in-card { grid-template-columns: 160px minmax(0, 1fr); }
  .home-action-panel .in-card .in-body > .in-reason {
    display: none;
    margin-left: 0;
    padding-left: 0;
    width: auto;
  }
  .home-action-panel .in-card .in-reason-wide { display: block; grid-column: 1 / -1; }
  .home-action-panel .in-card .in-reason-wide { margin-top: 0; }
  .home-action-panel .in-card .in-cta { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: stretch; gap: 12px; padding-top: 4px; }
  .home-action-panel .in-card .in-cta .action-row { flex: 0 0 280px; align-self: flex-start; }
  .home-action-panel .in-card .in-cta .evidence-box { flex: 1 1 320px; }
  .home-action-panel .in-card .in-cta .side-link-row { flex-basis: 100%; }
}
@media (max-width: 760px) {
  .in-card { grid-template-columns: 120px minmax(0, 1fr); gap: 14px; }
  .in-card .in-cta .action-row { flex-basis: 100%; flex-direction: row; align-self: stretch; }
}

/* ── /#learning rich Learning Signal cards (Creator Dashboard v2 handoff) ─ */
.lrn-list { display: flex; flex-direction: column; }
.lrn-card { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 22px; padding: 20px 22px; border-bottom: 1px solid var(--border); align-items: start; cursor: pointer; }
.lrn-card:last-child { border-bottom: 0; }
.lrn-card:hover { background: var(--surface-alt); }
.lrn-video { display: flex; flex-direction: column; gap: 10px; }
.lrn-video .vthumb { width: 100%; max-width: 210px; aspect-ratio: 16/9; border-radius: 9px; position: relative; overflow: hidden; display: grid; place-items: center; color: rgba(255,255,255,0.6); font-size: 12px; font-weight: 800; background: linear-gradient(135deg, #1a1a1f, #2c1810); }
.lrn-video .vthumb.ch { background: var(--violet-tint); color: var(--violet-deep); }
.lrn-video .vthumb img { width: 100%; height: 100%; object-fit: cover; }
.lrn-video .vthumb .dur { position: absolute; right: 5px; bottom: 5px; background: rgba(0,0,0,0.78); color: #fff; font-family: var(--mono); font-size: 9px; padding: 1px 5px; border-radius: 3px; }
.lrn-date { font-size: 12px; font-weight: 700; color: var(--ink-3); font-family: var(--mono); }
.lrn-date .lrn-ref { display: block; color: var(--ink-2); white-space: nowrap; }
.lrn-main { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.lrn-main h3 { margin: 0; }
.lrn-desc { margin: 0; }
.home-insight-learning-card-title {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.home-insight-learning-card-subtitle {
  margin: 0;
  color: #414a61;
  font-size: 15.5px;
  font-weight: 620;
  line-height: 1.5;
}
.lrn-card .lrn-reasoning {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 10px 11px;
}
.lrn-card .evidence-label { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 900; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-3); }
.lrn-card .evidence-icon { width: 16px; height: 16px; border-radius: 5px; display: grid; place-items: center; font-size: 11px; font-weight: 900; background: var(--violet-tint); color: var(--violet-deep); }
.lrn-card .reasoning-text { margin: 0; font-size: 12.5px; font-weight: 550; color: var(--ink-2); line-height: 1.46; }
.in-tag.learning { color: #157C3F; background: var(--success-tint); border-color: transparent; }
.in-tag.neutral { color: var(--ink-3); background: var(--surface-alt); border-color: var(--border); }
@media (max-width: 1240px) { .lrn-card { grid-template-columns: 190px minmax(0, 1fr); } }
@media (max-width: 860px) { .lrn-card { grid-template-columns: 1fr; gap: 16px; } .lrn-video .vthumb { max-width: 280px; } }

/* lrn-card: handoff lesson-box styling (single real lesson + tag stack) */
.lrn-tag-stack { display: flex; flex-wrap: wrap; gap: 5px; }
.lrn-main { gap: 12px; }
.lesson-box { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 1px; }
.lesson-box.single { grid-template-columns: 1fr; }
.lesson-row { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; align-items: start; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-alt); padding: 11px 12px; }
.lesson-icon { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex: none; }
.lesson-icon svg { width: 15px; height: 15px; }
.lesson-icon.warn { background: var(--warning-tint); color: #B0700C; }
.lesson-icon.green { background: var(--success-tint); color: #157C3F; }
.lesson-row strong { display: block; font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 4px; font-weight: 900; }
.lesson-row span { display: block; color: var(--ink); font-size: 13px; line-height: 1.4; font-weight: 650; }
.lrn-foot { display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin-top: 2px; }
.lrn-open { display: inline-flex; align-items: center; gap: 6px; }
.lrn-open svg { width: 15px; height: 15px; }
.lrn-future { font-size: 11.5px; font-weight: 650; color: var(--ink-3); font-family: var(--mono); }


/* Home card "Built from" — compact 2-up pills, capped to 4 + "+N more" */
.in-card .built-from,
.lrn-card .built-from { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.in-card .src-pill,
.lrn-card .src-pill { font-size: 10px; padding: 2px 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.in-card .src-pill.more,
.lrn-card .src-pill.more { color: var(--violet-deep); font-weight: 800; text-align: center; }
.in-card .evidence-box { padding: 10px 11px; gap: 9px; }

/* lrn-card: learning-value ring + Built-from pills (handoff) */
.lrn-score { display: grid; grid-template-columns: 50px minmax(0, 1fr); gap: 11px; align-items: center; border: 1px dashed var(--border-2); border-radius: 12px; background: var(--surface-alt); padding: 10px 11px; }
.lrn-ring { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--success) calc(var(--score) * 1%), var(--border) 0); position: relative; color: #157C3F; font-size: 14px; font-weight: 900; }
.lrn-ring::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--surface-alt); }
.lrn-ring span { position: relative; z-index: 1; }
.lrn-score strong { display: block; font-size: 12.5px; font-weight: 800; color: var(--ink); line-height: 1.2; letter-spacing: -0.01em; }
.lrn-score small { display: block; margin-top: 3px; color: var(--ink-3); font-size: 10px; font-weight: 850; text-transform: uppercase; letter-spacing: 0.05em; }
/* Home compact Learning card — preview density only; the full rich card
   (standalone /#learning) is untouched. Reuses .lrn-card tokens. */
.lrn-card.home-compact { grid-template-columns: 128px minmax(0, 1fr); gap: 16px; padding: 14px 16px; }
.lrn-card.home-compact .lrn-video { gap: 8px; }
.lrn-card.home-compact .lrn-video .vthumb { max-width: 128px; }
.lrn-card.home-compact .lrn-date { font-size: 11px; }
.lrn-card.home-compact .lrn-score { grid-template-columns: 40px minmax(0, 1fr); gap: 9px; padding: 8px 9px; }
.lrn-card.home-compact .lrn-ring { width: 40px; height: 40px; font-size: 12px; }
.lrn-card.home-compact .lrn-ring::before { inset: 5px; }
.lrn-card.home-compact .lrn-score strong { font-size: 11.5px; }
.lrn-card.home-compact .lrn-score small { font-size: 9px; }
.lrn-card.home-compact .built-from-box .src-pill { font-size: 9.5px; padding: 2px 6px; }
.lrn-card.home-compact .built-from-box .src-pill.more { color: var(--violet-deep); font-weight: 800; }
.lrn-card.home-compact .lrn-main { gap: 8px; }
.lrn-card.home-compact .home-insight-learning-card-title { font-size: 15px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lrn-card.home-compact .in-tags { gap: 5px; }
.lrn-card.home-compact .lesson-box { gap: 8px; margin-top: 0; }
.lrn-card.home-compact .lesson-row { padding: 8px 9px; grid-template-columns: 24px minmax(0, 1fr); gap: 8px; }
.lrn-card.home-compact .lesson-icon { width: 24px; height: 24px; }
.lrn-card.home-compact .lesson-icon svg { width: 12px; height: 12px; }
.lrn-card.home-compact .lesson-row strong { font-size: 10px; margin-bottom: 2px; }
.lrn-card.home-compact .lesson-row span { font-size: 12px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lrn-card.home-compact .lrn-foot { margin-top: 2px; }
@media (max-width: 860px) { .lrn-card.home-compact { grid-template-columns: 1fr; } }

/* "+N more learning signals" footer link on the Home module */
.lrn-more { display: block; width: 100%; text-align: center; padding: 11px; border: 0; border-top: 1px solid var(--border); background: transparent; color: var(--violet-deep); font-family: var(--font); font-size: 12.5px; font-weight: 750; cursor: pointer; }
.lrn-more:hover { background: var(--surface-alt); }

/* ── Production Intelligence Suite tabs (design: alt2) ────────────────── */
.suite-tabs { display: flex; align-items: flex-end; gap: 6px; border-bottom: 1px solid var(--border); margin-top: 22px; flex-wrap: wrap; }
.suite-tab { position: relative; display: inline-flex; align-items: center; gap: 9px; white-space: nowrap; padding: 11px 17px; border: 1px solid transparent; border-bottom: 0; background: transparent; font-family: var(--font); font-size: 14px; font-weight: 750; letter-spacing: -0.01em; color: var(--ink-3); cursor: pointer; border-radius: 11px 11px 0 0; margin-bottom: -1px; overflow: hidden; transition: color .14s ease, background .14s ease; }
.suite-tab .ti { width: 17px; height: 17px; flex: none; }
.suite-tab .ti svg { width: 17px; height: 17px; }
.suite-tab:not(.active):hover { background: var(--surface-alt); color: var(--ink-2); }
.suite-tab.active { color: var(--violet-deep); background: var(--surface); border-color: var(--border); font-weight: 850; }
.suite-tab.active::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--grad); }
.suite-tab .live { font-family: var(--mono); font-size: 9.5px; font-weight: 800; letter-spacing: 0.04em; padding: 2px 6px; border-radius: var(--r-pill); background: var(--success-tint); color: #157C3F; text-transform: uppercase; }
.suite-tab .q { font-family: var(--mono); font-size: 9.5px; font-weight: 800; letter-spacing: 0.04em; padding: 2px 6px; border-radius: var(--r-pill); background: var(--surface-alt); color: var(--ink-3); text-transform: uppercase; }

/* Coming-soon pane for roadmap labs */
.suite-soon { margin-top: 22px; border: 1px solid var(--border); border-radius: var(--r-card); background: linear-gradient(180deg, var(--surface) 0%, #FBFCFE 100%); padding: 48px 28px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; }
.suite-soon .ss-ic { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--violet-tint); color: var(--violet-deep); }
.suite-soon .ss-ic svg { width: 26px; height: 26px; }
.suite-soon h2 { margin: 4px 0 0; font-size: 22px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); }
.suite-soon .ss-badge { font-family: var(--mono); font-size: 11px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); background: var(--surface-alt); border: 1px solid var(--border); border-radius: var(--r-pill); padding: 3px 11px; }
.suite-soon p { margin: 2px 0 0; max-width: 460px; font-size: 14px; font-weight: 600; line-height: 1.55; color: var(--ink-2); }
.suite-soon .ss-note { margin-top: 8px; max-width: 480px; font-size: 12px; font-weight: 600; line-height: 1.5; color: var(--ink-3); }

/* BF-126 A1.1: grouped legacy-observation card + drawer. Neutral, responsive.
   A legacy observation carries NO success/verdict signal, so the card and its
   group header must never inherit the green `.audited` treatment: a neutral
   ink-3 left border on the card and a neutral ink-3 dot on the "observation"
   group header (NOT var(--success)). The result-stamp is neutral too. */
.board .group-head.observation .left .dot { background: var(--ink-3); }
/* BF-126 Phase 1.2 — "Historical performance": ONE card per video, built on the
   shared components. The few helper classes below map ONLY to values already in
   the design system (no invented tokens): 11/11.5/12px sizes, existing weights,
   var(--mono), var(--ink-*). Metrics are NEUTRAL (no red/green outcome styling).
   Drawer = .drawer-head/.dh-badge/.dh-title + .drawer-body/.drawer-video +
   .drawer-tabs + .idr-mv (neutral) + .irel-row. */
/* ── Insights & Impacts V2.1 — Column 3 (Historical performance) visual polish ──
   Everything below is scoped to the lane-3 card (.imp-card.perf-card / .perf-*)
   and the performance drawer (.perf-drawer …). It shares the dashboard's design
   tokens and does NOT restyle any Column-1/2 shared class. Card CHROME is NEUTRAL
   (no verdict/status color); red/green appears ONLY on the metric-direction pill
   as factual movement. Two accent literals (#0E7490 retention tag, #157C3F up
   text) come verbatim from the approved v2.1 handoff; all else is tokenized. */
.board .imp-card.perf-card { border-left: 3px solid var(--ink-3);            /* neutral, matches --ink-3 */
  display: flex; flex-direction: column; gap: 11px; transition: background .15s ease; }
.board .imp-card.perf-card:hover { background: #FCFBFF; }
.board .imp-card.perf-card .imp-title {                                     /* video title, 2-line clamp (font unchanged: 14/750/1.32) */
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; }
.board .perf-sub { margin-top: 6px; font-family: var(--mono); font-size: 11px; font-weight: 650; color: var(--ink-3); display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.board .perf-sub b { color: var(--violet-deep); font-weight: 800; }
/* date/window badge (mono uppercase pill + calendar icon) */
.board .perf-latest { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; background: var(--violet-tint); color: var(--violet-deep); border-radius: 8px; padding: 6px 11px; font-family: var(--mono); font-size: 10.5px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.board .perf-latest svg { width: 13px; height: 13px; flex: none; }
.board .perf-latest .dt { font-family: var(--mono); }
/* metric rows: tag · before → after · directional pill (shared by card + drawer) */
.board .perf-metrics { display: flex; flex-direction: column; gap: 6px; }
.perf-metric { display: flex; align-items: center; gap: 10px; padding: 8px 11px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface-alt); flex-wrap: wrap; }
.perf-metric .pm-k { font-size: 10px; font-weight: 900; letter-spacing: 0.07em; text-transform: uppercase; min-width: 70px; color: var(--ink-3); }
.perf-metric .pm-k.ctr { color: var(--violet-deep); }
.perf-metric .pm-k.ret { color: #0E7490; }                                  /* handoff retention-tag accent */
.perf-metric .pm-v { flex: 1 1 auto; min-width: 0; display: flex; align-items: baseline; }
/* before → after is ONE unit — it never splits across lines (V2.1 fix). */
.perf-metric .pm-cmp { display: inline-flex; align-items: baseline; gap: 7px; white-space: nowrap; font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 13px; font-weight: 650; color: var(--ink-3); }
.perf-metric .pm-cmp .pm-arw { color: var(--ink-4); }
.perf-metric .pm-cmp .pm-to { color: var(--ink); font-weight: 800; font-size: 14.5px; }
.perf-metric .pm-d { display: inline-flex; align-items: center; gap: 4px; font-family: var(--font); font-variant-numeric: tabular-nums; font-size: 11px; font-weight: 750; padding: 3px 8px; border-radius: var(--r-pill); flex: none; white-space: nowrap; color: var(--ink-2); background: var(--surface-2); }
.perf-metric .pm-d svg { width: 9px; height: 9px; flex: none; }
.perf-metric .pm-d.up { background: var(--success-tint); color: #157C3F; }  /* factual: metric rose */
.perf-metric .pm-d.down { background: var(--danger-tint); color: var(--danger); }  /* factual: metric fell */
.perf-metric.none { background: var(--surface); }
.perf-metric.none .pm-cmp { font-family: var(--font); color: var(--ink-4); }
/* full culture-safe ppDelta kept for assistive tech (compact text is aria-hidden) */
.perf-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ── performance drawer (scoped: never touches the insight drawer) ── */
/* Both tab panes stay mounted; switching toggles `.active` (no re-render, no
   entrance-animation replay). The active pane keeps the V2.1 column spacing. */
.perf-drawer .drawer-tabbody { display: block; }
.perf-drawer .perf-pane { display: none; }
.perf-drawer .perf-pane.active { display: flex; flex-direction: column; gap: 14px; }
.perf-drawer .drw-sec { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; padding: 0; margin: 0; }
.perf-drawer .drw-sec.latest { border-color: #DDD3FF; }                     /* handoff latest-period accent */
.perf-drawer .drw-sec > h3 { display: flex; align-items: center; gap: 8px; padding: 10px 14px; margin: 0; background: var(--surface-alt); border-bottom: 1px solid var(--border); border-radius: 0; }
.perf-drawer .drw-sec.latest > h3 { background: #FAF8FF; }
.perf-drawer .drw-sec > h3 .pw { font-family: var(--mono); font-size: 11px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-2); }
.perf-drawer .perf-latest-chip { font-family: var(--font); font-size: 9.5px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; background: var(--violet); color: #fff; border-radius: var(--r-pill); padding: 2px 7px; }
.perf-drawer .perf-windows { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 0; border-bottom: 1px solid var(--border); }
.perf-drawer .perf-windows > div { padding: 9px 14px; display: flex; flex-direction: column; gap: 2px; }
.perf-drawer .perf-windows > div + div { border-left: 1px solid var(--border); }
.perf-drawer .perf-windows .wk { font-size: 9.5px; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-4); }
.perf-drawer .perf-windows .dt { font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--ink-2); }
.perf-drawer .perf-pm { display: flex; flex-direction: column; }
.perf-drawer .perf-pm .perf-metric { border: 0; border-radius: 0; background: var(--surface); }
.perf-drawer .perf-pm .perf-metric + .perf-metric { border-top: 1px solid var(--border); }
/* Related recommendations — actionable rows (id chip · title · chevron) */
.perf-drawer .perf-recs { display: flex; flex-direction: column; }
.perf-drawer .perf-rec { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 11px 8px; border: 0; border-bottom: 1px solid var(--border); width: 100%; text-align: left; background: transparent; font-family: var(--font); cursor: pointer; border-radius: 10px; transition: background .12s ease; }
.perf-drawer .perf-rec:hover { background: var(--surface-alt); }
.perf-drawer .perf-rec:focus-visible { outline: 2px solid var(--violet); outline-offset: -2px; }
.perf-drawer .perf-rec:last-child { border-bottom: 0; }
.perf-drawer .perf-rec .rid { font-family: var(--mono); font-size: 10.5px; font-weight: 750; color: var(--violet-deep); background: var(--violet-tint); padding: 3px 7px; border-radius: 6px; }
.perf-drawer .perf-rec .rt { font-size: 13px; font-weight: 650; color: var(--ink-2); line-height: 1.4; min-width: 0; overflow-wrap: anywhere; }
.perf-drawer .perf-rec .rchev { width: 16px; height: 16px; color: var(--ink-4); flex: none; transition: color .12s ease, transform .12s ease; }
.perf-drawer .perf-rec:hover .rchev { color: var(--violet-deep); transform: translateX(2px); }
/* footer: preserved disclaimer + Close */
.perf-drawer .perf-foot { display: flex; align-items: center; gap: 12px; padding: 13px 20px; border-top: 1px solid var(--border); background: var(--surface-alt); }
.perf-drawer .perf-foot .note { flex: 1; font-size: 11.5px; font-weight: 600; color: var(--ink-3); line-height: 1.45; }
/* Narrow screens: the spelled-out ppDelta phrase ("Down 1.37 percentage points")
   is longer than the fixed .mvd slot, so on mobile let the drawer metric row wrap
   the delta onto its own full-width line instead of clipping it. */
@media (max-width: 480px) {
  .idr-mv-row { flex-wrap: wrap; }
  .idr-mv-row .mvd { min-width: 0; text-align: left; flex: 1 1 100%; margin-top: 2px; }
}
