/* ════════════════════════════════════════════════════════════════════
   STARBRIDGE
   Design system: Solara aesthetic, light mode, Starbridge purple accent
   Typography: Newsreader serif titles · Geist sans · Geist Mono data
   ════════════════════════════════════════════════════════════════════ */

:root {
  --bg: #ffffff;
  --bg-soft: #fafafa;
  --bg-warm: #faf8f4;
  --bg-card: #ffffff;
  --bg-card-2: #fafafa;
  --bg-card-3: #f5f5f5;

  --text: #0a0a0a;
  --text-muted: #525252;
  --text-faint: #737373;
  --text-quiet: #a3a3a3;
  --text-fainter: #d4d4d4;

  --border: #e8e8e8;
  --border-strong: #d4d4d4;
  --border-soft: #f1f1f0;

  --accent: #3B2FC7;
  --accent-soft: #ECEAFF;
  --accent-deep: #2D22A8;
  --accent-glow: rgba(59, 47, 199, 0.08);

  --green: #16a34a;
  --warn: #d97706;
  --danger: #dc2626;
  --blue: #2563eb;
  --violet: #7c3aed;
  --purple-soft: #f5f3ff;

  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --sans: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', 'SF Mono', Monaco, Consolas, monospace;

  --radius: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;

  --pad-x: 32px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
*::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; -moz-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg-soft);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv01', 'cv11', 'ss01';
}

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea { font-family: inherit; outline: none; border: none; background: none; color: inherit; }
a { color: inherit; text-decoration: none; }
table { border-collapse: collapse; }


/* ════════════════════════════════════════════════════════════════════
   BROWSER CHROME BAR
   ════════════════════════════════════════════════════════════════════ */

.chrome {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 14px 24px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 30;
}

.chrome-dots { display: flex; gap: 7px; }
.chrome-dots span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--border);
  border: 1px solid var(--border-strong);
}
.chrome-dots span:nth-child(1) { background: #ff5f57; border-color: #e0443e; }
.chrome-dots span:nth-child(2) { background: #febc2e; border-color: #d89e24; }
.chrome-dots span:nth-child(3) { background: #28c840; border-color: #13a82f; }

.chrome-url {
  justify-self: center;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.01em;
  padding: 6px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chrome-url .emph { color: var(--text); font-weight: 500; }
.chrome-url .slash { color: var(--text-quiet); margin: 0 6px; }

.chrome-version {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--text-faint);
  text-transform: uppercase;
}


/* ════════════════════════════════════════════════════════════════════
   TAB NAVIGATION
   ════════════════════════════════════════════════════════════════════ */

.tabnav {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 49px;
  z-index: 25;
}

.tabnav-inner {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 24px;
  overflow-x: auto;
  scrollbar-width: none;
  position: relative;
}
.tabnav-inner::-webkit-scrollbar { display: none; }

.tab-mobile-btn {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 22px;
  height: 16px;
  margin-right: 12px;
}
.tab-mobile-btn span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
}
.tab-mobile-current { display: none; }

.tabnav-list {
  display: flex;
  align-items: center;
  gap: 0;
}

.tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 14px 18px;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  border-bottom: 2px solid transparent;
  transition: color 140ms ease, border-color 140ms ease;
  white-space: nowrap;
}

.tab:hover { color: var(--text); }

.tab-active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

.tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 16px;
  padding: 0 6px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0;
  background: var(--accent);
  color: white;
  border-radius: 8px;
}
.tab-badge-warn { background: var(--warn); }


/* ════════════════════════════════════════════════════════════════════
   PAGE LAYOUT
   ════════════════════════════════════════════════════════════════════ */

.canvas {
  background: var(--bg);
  min-height: calc(100vh - 100px);
}

.page {
  display: none;
  padding: 40px var(--pad-x) 60px;
  max-width: 1440px;
  margin: 0 auto;
}

.page-active { display: block; }


/* ════════════════════════════════════════════════════════════════════
   HERO HEADER
   ════════════════════════════════════════════════════════════════════ */

.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: flex-end;
  gap: 24px;
  padding-bottom: 32px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.hero-left {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  flex-wrap: wrap;
}
.hero-eyebrow .sep { color: var(--text-quiet); }
.hero-eyebrow .quiet { color: var(--text-faint); font-weight: 500; }
.hero-eyebrow a { color: var(--text-faint); font-weight: 500; transition: color 120ms ease; }
.hero-eyebrow a:hover { color: var(--accent); }

.hero-title-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-mark {
  width: 44px;
  height: 44px;
  background: var(--accent);
  color: white;
  border-radius: 8px;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.hero-title {
  font-family: var(--serif);
  font-size: 44px;
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text);
}

.hero-status {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 11px 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(22, 163, 74, 0.25);
  background: rgba(22, 163, 74, 0.08);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
  font-weight: 600;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.18);
  animation: livepulse 2s ease-in-out infinite;
}
@keyframes livepulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.18); }
  50% { box-shadow: 0 0 0 5px rgba(22, 163, 74, 0.06); }
}

.hero-meta {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}
.hero-meta .sep { color: var(--text-quiet); margin: 0 6px; }

.hero-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.lp-avatar-hero {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: 0.01em;
  flex-shrink: 0;
}


/* ════════════════════════════════════════════════════════════════════
   BUTTONS
   ════════════════════════════════════════════════════════════════════ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.005em;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  transition: background 120ms ease, border 120ms ease;
  white-space: nowrap;
}
.btn:hover { background: var(--bg-soft); border-color: var(--text-quiet); }

.btn-primary {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
.btn-primary:hover { background: #1a1a1a; border-color: #1a1a1a; }

.btn-accent {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.btn-accent:hover { background: var(--accent-deep); border-color: var(--accent-deep); }

.btn-ghost {
  background: transparent;
  color: var(--text-faint);
  border-color: transparent;
}
.btn-ghost:hover { background: var(--bg-soft); color: var(--text); border-color: transparent; }

.btn-sm { padding: 6px 12px; font-size: 12px; }

.arrow { font-family: var(--sans); font-weight: 400; }


/* ════════════════════════════════════════════════════════════════════
   KPI STRIP
   ════════════════════════════════════════════════════════════════════ */

.kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}

.kpi {
  padding: 24px 28px 26px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.kpi:last-child { border-right: none; }

.kpi-label {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.kpi-value {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 44px;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.kpi-value.accent { color: var(--accent); }
.kpi-value .suffix { font-size: 24px; color: var(--text-faint); margin-left: 2px; font-weight: 500; }

.kpi-meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.01em;
  line-height: 1.55;
}
.kpi-meta .up { color: var(--green); font-weight: 500; }
.kpi-meta .quiet { color: var(--text-quiet); }


/* ════════════════════════════════════════════════════════════════════
   COMMON BLOCK PATTERNS
   ════════════════════════════════════════════════════════════════════ */

.block-eyebrow {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.block-eyebrow-sm {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.block-sub {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.55;
}

.accent-text { color: var(--accent); font-weight: 500; }
.up { color: var(--green); }

.block-link {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  transition: color 120ms ease;
}
.block-link:hover { color: var(--accent-deep); }

.block-link-btn { background: none; border: none; cursor: pointer; }


/* ════════════════════════════════════════════════════════════════════
   DATA BLOCK (table or list container)
   ════════════════════════════════════════════════════════════════════ */

.data-block {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
  margin-bottom: 32px;
  overflow: hidden;
}

.block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  gap: 16px;
  flex-wrap: wrap;
}

.block-head-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.block-title {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.block-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 3px;
}

.block-meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 0.04em;
}


/* ════════════════════════════════════════════════════════════════════
   DATA TABLE
   ════════════════════════════════════════════════════════════════════ */

.data-table {
  width: 100%;
}

.data-table thead th {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
  text-align: left;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-soft);
  white-space: nowrap;
}
.data-table thead th.right { text-align: right; }

.data-table tbody tr {
  transition: background 120ms ease;
  cursor: pointer;
}
.data-table tbody tr:hover { background: var(--bg-soft); }

.data-table tbody td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 13px;
  vertical-align: middle;
  color: var(--text);
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody td.right { text-align: right; }
.data-table tbody td.num {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}
.data-table tbody td.muted { color: var(--text-muted); }
.data-table tbody td.faint { color: var(--text-faint); font-family: var(--mono); font-size: 11.5px; }


/* Cell variants */

.cell-with-dot {
  display: flex;
  align-items: center;
  gap: 10px;
}

.row-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-active { background: #65A30D; }
.dot-pending { background: #D97706; }
.dot-sourcing { background: #2563EB; }
.dot-closed { background: #A8A29E; }
.dot-hot { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }

.row-name {
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.row-name.muted { color: var(--text-muted); font-weight: 400; }

.row-sub {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 0.01em;
  margin-top: 2px;
}


/* ════════════════════════════════════════════════════════════════════
   PILLS (status chips)
   ════════════════════════════════════════════════════════════════════ */

.pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.pill-active { background: rgba(22, 163, 74, 0.1); color: var(--green); }
.pill-pending { background: rgba(217, 119, 6, 0.1); color: var(--warn); }
.pill-sourcing { background: rgba(37, 99, 235, 0.1); color: var(--blue); }
.pill-closed { background: var(--bg-card-3); color: var(--text-muted); }
.pill-soft { background: rgba(217, 119, 6, 0.1); color: var(--warn); }
.pill-interested { background: rgba(37, 99, 235, 0.1); color: var(--blue); }
.pill-wired { background: rgba(22, 163, 74, 0.1); color: var(--green); }
.pill-kyc { background: rgba(217, 119, 6, 0.1); color: var(--warn); }
.pill-strong { background: rgba(22, 163, 74, 0.1); color: var(--green); }

.tier {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}


/* ════════════════════════════════════════════════════════════════════
   AVATARS
   ════════════════════════════════════════════════════════════════════ */

.avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.01em;
  flex-shrink: 0;
}
.avatar-sq {
  border-radius: 6px;
}
.avatar-amber { background: #F4E6C9; color: #6B4A0B; }
.avatar-blue { background: #DAE5F7; color: #113A7A; }
.avatar-green { background: #DEEAD0; color: #2F4B10; }
.avatar-pink { background: #F5DDE5; color: #6B233C; }
.avatar-purple { background: var(--accent-soft); color: var(--accent); }


/* ════════════════════════════════════════════════════════════════════
   SPLIT LAYOUTS (side by side blocks)
   ════════════════════════════════════════════════════════════════════ */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 40px;
}

.split-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}


/* ════════════════════════════════════════════════════════════════════
   BRIEF / MORNING CARD
   ════════════════════════════════════════════════════════════════════ */

.brief-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px 32px;
  background: var(--bg);
  margin-bottom: 40px;
}

.brief-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.brief-time {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 0.04em;
}

.brief-query {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-faint);
  padding: 8px 12px 8px 14px;
  background: var(--accent-soft);
  border-left: 2px solid var(--accent);
  border-radius: 0 4px 4px 0;
  margin-bottom: 18px;
  letter-spacing: 0.01em;
  line-height: 1.5;
}
.brief-query .label { color: var(--accent); font-weight: 600; margin-right: 6px; }

.brief-prose {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.55;
  color: var(--text);
  letter-spacing: -0.01em;
  margin-bottom: 0;
}


/* ════════════════════════════════════════════════════════════════════
   SIGNAL / EVENT CARD
   ════════════════════════════════════════════════════════════════════ */

.signal {
  display: flex;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-soft);
  align-items: flex-start;
}
.signal:last-child { border-bottom: none; }

.signal-body { flex: 1; min-width: 0; }
.signal-title {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.005em;
  margin-bottom: 4px;
}
.signal-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
}

.signal-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}
.signal-time {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 0.04em;
}

.signal-expanded { padding: 20px 20px 22px; border-bottom: 1px solid var(--border-soft); background: var(--bg-soft); }
.signal-expanded:last-child { border-bottom: none; }
.signal-expanded .signal { padding: 0; border: none; background: transparent; }

.draft {
  margin-left: 40px;
  margin-top: 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  font-family: var(--serif);
  font-size: 16px;
  color: var(--text);
  line-height: 1.65;
  letter-spacing: -0.005em;
  margin-bottom: 12px;
  white-space: pre-wrap;
}

.draft-label {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-soft);
}

.signal-actions { margin-left: 40px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }


/* ════════════════════════════════════════════════════════════════════
   STAT GRID (deal detail header stats)
   ════════════════════════════════════════════════════════════════════ */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}

.stat {
  padding: 22px 26px 24px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.stat:last-child { border-right: none; }

.stat-label {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.stat-value {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 32px;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.stat-value .suffix { font-size: 18px; color: var(--text-faint); margin-left: 2px; font-weight: 500; }
.stat-sub {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 0.01em;
}


/* ════════════════════════════════════════════════════════════════════
   MEMO CARD
   ════════════════════════════════════════════════════════════════════ */

.memo-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  letter-spacing: -0.005em;
}


/* ════════════════════════════════════════════════════════════════════
   STEPS (Sydecar execution)
   ════════════════════════════════════════════════════════════════════ */

.steps {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
  overflow: hidden;
}
.step {
  display: flex;
  align-items: center;
  padding: 14px 22px;
  gap: 14px;
  border-bottom: 1px solid var(--border-soft);
}
.step:last-child { border-bottom: none; }

.step-icon { width: 16px; height: 16px; flex-shrink: 0; stroke-width: 2; }
.step-icon.done { color: var(--green); stroke-width: 2.5; }
.step-icon.progress { color: var(--warn); }
.step-icon.pending { color: var(--text-quiet); stroke-width: 1.5; }

.step-text { flex: 1; font-size: 14px; font-weight: 500; letter-spacing: -0.005em; }
.step.pending .step-text { color: var(--text-quiet); font-weight: 400; }

.step-meta { font-family: var(--mono); font-size: 11px; color: var(--text-faint); letter-spacing: 0.04em; }
.step-meta.alert { color: var(--warn); font-weight: 600; }


/* ════════════════════════════════════════════════════════════════════
   TIMELINE
   ════════════════════════════════════════════════════════════════════ */

.timeline {
  border-left: 1px solid var(--border);
  margin-left: 6px;
  padding-left: 24px;
  padding-top: 4px;
}

.tl-item {
  position: relative;
  padding-bottom: 28px;
}
.tl-item:last-child { padding-bottom: 0; }

.tl-dot {
  position: absolute;
  left: -31px;
  top: 4px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--bg);
  border: 1.5px solid var(--border-strong);
}
.tl-dot.hot { border-color: var(--accent); background: var(--accent-soft); }

.tl-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 5px;
  letter-spacing: -0.005em;
}
.tl-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
}
.tl-quote {
  font-family: var(--serif);
  font-size: 15px;
  font-style: italic;
  color: var(--text);
  line-height: 1.6;
  padding: 14px 18px;
  background: var(--bg-soft);
  border-left: 2px solid var(--border-strong);
  border-radius: 0 4px 4px 0;
  margin-top: 10px;
  letter-spacing: -0.005em;
}
.tl-meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-faint);
  margin-top: 8px;
  letter-spacing: 0.04em;
}


/* ════════════════════════════════════════════════════════════════════
   LP PROFILE BLOCKS
   ════════════════════════════════════════════════════════════════════ */

.relation-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px 26px;
  margin-bottom: 28px;
  background: var(--bg);
}
.relation-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.relation-head .block-title { font-size: 13px; }

.relation-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.relation-stat-label {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 500;
  margin-bottom: 6px;
}
.relation-stat-value {
  font-family: var(--sans);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.relation-stat-value .suffix { font-size: 16px; color: var(--text-faint); margin-left: 2px; font-weight: 500; }

.context-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 12.5px;
  color: var(--text-muted);
}
.tag .label {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--text-faint);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}


/* ════════════════════════════════════════════════════════════════════
   WEEKLY DIGEST DOC
   ════════════════════════════════════════════════════════════════════ */

.digest-layout {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 32px;
  align-items: start;
}

.digest-doc {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 40px 48px 48px;
  background: var(--bg);
}

.digest-doc-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 12px;
}

.digest-doc-title {
  font-family: var(--serif);
  font-size: 36px;
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 14px;
}

.digest-doc-meta {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-faint);
  letter-spacing: 0.04em;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
}

.digest-section { margin-bottom: 32px; }

.digest-section-label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 14px;
}

.digest-summary {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  letter-spacing: -0.005em;
}

.digest-deal {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-soft);
}
.digest-deal:last-child { border-bottom: none; }
.digest-deal-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; margin-top: 7px; }

.digest-deal-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.digest-deal-title {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.digest-deal-body {
  font-family: var(--serif);
  font-size: 15px;
  color: var(--text);
  line-height: 1.6;
  letter-spacing: -0.005em;
}

.digest-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 8px 0;
}
.digest-metric { padding: 16px 18px; border-right: 1px solid var(--border); }
.digest-metric:last-child { border-right: none; }
.digest-metric-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
  font-weight: 600;
  margin-bottom: 6px;
}
.digest-metric-value {
  font-family: var(--sans);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.digest-metric-value.positive { color: var(--green); }
.digest-metric-value .suffix { font-size: 14px; color: var(--text-faint); margin-left: 1px; }

.digest-archive {
  position: sticky;
  top: 130px;
}
.digest-archive-label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
  font-weight: 600;
  margin-bottom: 14px;
}
.archive-item {
  display: block;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-soft);
  cursor: pointer;
  transition: opacity 120ms ease;
}
.archive-item:hover { opacity: 0.7; }
.archive-week {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--text-faint);
  margin-bottom: 3px;
}
.archive-headline { font-size: 13px; color: var(--text); letter-spacing: -0.005em; line-height: 1.4; }
.archive-item.current .archive-headline { color: var(--accent); font-weight: 600; }


/* ════════════════════════════════════════════════════════════════════
   SETTINGS BLOCKS (integrations, toggles)
   ════════════════════════════════════════════════════════════════════ */

.integration-list { padding: 4px 22px; }
.integration {
  display: grid;
  grid-template-columns: 44px 1fr auto auto;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border-soft);
}
.integration:last-child { border-bottom: none; }

.int-mark {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--bg-card-3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.01em;
}

.int-info { min-width: 0; }
.int-name { font-size: 14px; font-weight: 600; letter-spacing: -0.005em; }
.int-desc { font-family: var(--mono); font-size: 11.5px; color: var(--text-muted); margin-top: 2px; letter-spacing: 0.01em; }

.int-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.int-status.connected { background: rgba(22, 163, 74, 0.1); color: var(--green); }
.int-status.disconnected { background: var(--bg-card-3); color: var(--text-faint); }


/* Toggle switch */

.toggle-list { padding: 4px 22px; }
.toggle-row {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border-soft);
}
.toggle-row:last-child { border-bottom: none; }

.toggle-info { flex: 1; min-width: 0; }
.toggle-name { font-size: 14px; font-weight: 600; letter-spacing: -0.005em; }
.toggle-desc { font-family: var(--mono); font-size: 11.5px; color: var(--text-muted); margin-top: 2px; letter-spacing: 0.01em; line-height: 1.5; }

.toggle {
  position: relative;
  width: 36px;
  height: 20px;
  background: var(--border-strong);
  border-radius: 999px;
  cursor: pointer;
  transition: background 160ms ease;
  flex-shrink: 0;
}
.toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: white;
  border-radius: 50%;
  transition: transform 160ms ease;
}
.toggle.on { background: var(--accent); }
.toggle.on::after { transform: translateX(16px); }


/* ════════════════════════════════════════════════════════════════════
   FOOTER SYNC BAR
   ════════════════════════════════════════════════════════════════════ */

.syncbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 12px;
}

.syncbar-left { display: flex; align-items: center; gap: 10px; }
.syncbar-right { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.syncbar-item .label { color: var(--text-faint); margin-right: 6px; }
.syncbar-item .v { color: var(--text); font-weight: 500; }


/* ════════════════════════════════════════════════════════════════════
   UTILITY
   ════════════════════════════════════════════════════════════════════ */

.section { margin-bottom: 40px; }
.hidden { display: none !important; }


/* ════════════════════════════════════════════════════════════════════
   RESPONSIVE: Tablet (up to 1024px)
   ════════════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
  :root { --pad-x: 24px; }

  .hero-title { font-size: 36px; }
  .kpi-value { font-size: 36px; }
  .stat-value { font-size: 26px; }
  .relation-stat-value { font-size: 22px; }

  .kpi-strip { grid-template-columns: repeat(2, 1fr); }
  .kpi:nth-child(2) { border-right: none; }
  .kpi:nth-child(1), .kpi:nth-child(2) { border-bottom: 1px solid var(--border); }

  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: none; }
  .stat:nth-child(1), .stat:nth-child(2) { border-bottom: 1px solid var(--border); }

  .relation-grid { grid-template-columns: repeat(2, 1fr); row-gap: 20px; }

  .split { grid-template-columns: 1fr; gap: 24px; }
  .split-3 { grid-template-columns: 1fr; gap: 20px; }

  .digest-layout { grid-template-columns: 1fr; }
  .digest-doc { padding: 32px 28px; }
  .digest-archive { position: static; }
  .digest-metrics { grid-template-columns: repeat(2, 1fr); }
  .digest-metric:nth-child(2) { border-right: none; }
  .digest-metric:nth-child(1), .digest-metric:nth-child(2) { border-bottom: 1px solid var(--border); }

  .chrome-url { min-width: 0; font-size: 11px; padding: 5px 10px; }
}


/* ════════════════════════════════════════════════════════════════════
   RESPONSIVE: Mobile (up to 768px)
   ════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  :root { --pad-x: 16px; }

  body { font-size: 14px; }

  .chrome { padding: 12px 16px; gap: 10px; }
  .chrome-url { font-size: 10px; padding: 4px 8px; }
  .chrome-version { font-size: 9px; }

  .tabnav-inner { padding: 0 16px; overflow: visible; }

  .tab-mobile-btn { display: flex; }
  .tab-mobile-current {
    display: block;
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text);
    font-weight: 600;
    padding: 14px 0;
    flex: 1;
  }
  .tabnav-list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 12px 32px rgba(0,0,0,0.08);
    flex-direction: column;
    gap: 0;
    z-index: 50;
    padding: 8px 0;
  }
  .tabnav-list.open { display: flex; }
  .tabnav-list { align-items: stretch; }
  .tab {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-soft);
    border-bottom-color: var(--border-soft);
    min-height: 44px;
    justify-content: flex-start;
  }
  .tab-active { border-bottom: 1px solid var(--accent-soft); background: var(--accent-soft); }

  .page { padding: 24px 16px 36px; }

  .hero {
    grid-template-columns: 1fr;
    align-items: stretch;
    padding-bottom: 24px;
    margin-bottom: 24px;
  }
  .hero-title { font-size: 30px; }
  .hero-mark { width: 36px; height: 36px; font-size: 22px; }
  .lp-avatar-hero { width: 44px; height: 44px; font-size: 18px; }
  .hero-actions { width: 100%; }
  .hero-actions .btn {
    flex: 1 1 auto;
    justify-content: center;
    min-height: 40px;
  }

  .kpi-strip { grid-template-columns: 1fr; margin-bottom: 28px; }
  .kpi {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 20px 20px 22px;
  }
  .kpi:last-child { border-bottom: none; }
  .kpi-value { font-size: 32px; }
  .kpi-value .suffix { font-size: 18px; }

  .stat-grid { grid-template-columns: 1fr; }
  .stat {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 18px 20px 20px;
  }
  .stat:last-child { border-bottom: none; }
  .stat-value { font-size: 26px; }

  .relation-grid { grid-template-columns: 1fr 1fr; row-gap: 18px; gap: 20px; }
  .relation-stat-value { font-size: 20px; }

  .data-block { border-radius: var(--radius); }
  .block-head { padding: 14px 16px; }

  /* Tables to card style on mobile: name + amount on top row, pill + time on bottom */
  .data-table thead { display: none; }
  .data-table, .data-table tbody {
    display: block;
    width: 100%;
  }
  .data-table tbody tr {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "name amount"
      "pill time";
    column-gap: 14px;
    row-gap: 6px;
    padding: 16px;
    border-bottom: 1px solid var(--border-soft);
    align-items: center;
  }
  .data-table tbody tr:last-child { border-bottom: none; }

  /* Hide all cells by default, opt-in via specific cell classes */
  .data-table tbody td {
    display: none;
    padding: 0;
    border: none;
    white-space: normal;
  }

  .data-table tbody td.cell-name {
    display: flex;
    grid-area: name;
    font-family: var(--sans);
    font-size: 14px;
    color: var(--text);
    font-weight: 500;
    min-width: 0;
  }
  .data-table tbody td.cell-name .row-name {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .data-table tbody td.cell-amount {
    display: block;
    grid-area: amount;
    text-align: right;
    font-family: var(--mono);
    font-variant-numeric: tabular-nums;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
  }
  .data-table tbody td.cell-amount.muted { color: var(--text-faint); font-weight: 500; }

  .data-table tbody td.cell-pill {
    display: block;
    grid-area: pill;
  }

  .data-table tbody td.cell-time {
    display: block;
    grid-area: time;
    text-align: right;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-faint);
    letter-spacing: 0.04em;
    white-space: nowrap;
  }

  /* Brief card */
  .brief-card { padding: 22px 20px; }
  .brief-prose { font-size: 16px; }
  .brief-time { margin-left: 0; flex-basis: 100%; order: 3; }

  /* Signal */
  .signal { padding: 14px 16px; gap: 10px; }
  .signal-title { font-size: 13.5px; }
  .draft { margin-left: 0; font-size: 14px; padding: 14px 16px; }
  .signal-actions { margin-left: 0; }

  /* Memo card */
  .memo-card { padding: 18px 20px; font-size: 15px; }

  /* Steps */
  .step { padding: 12px 16px; }

  /* Timeline */
  .timeline { padding-left: 18px; }
  .tl-dot { left: -25px; }

  /* Digest */
  .digest-doc { padding: 24px 20px; }
  .digest-doc-title { font-size: 24px; }
  .digest-metrics { grid-template-columns: 1fr; }
  .digest-metric { border-right: none; border-bottom: 1px solid var(--border); }
  .digest-metric:last-child { border-bottom: none; }

  /* Settings */
  .integration {
    grid-template-columns: 40px 1fr auto;
    gap: 12px;
  }
  .integration .btn-sm {
    grid-column: 3;
    grid-row: 2;
    margin-top: 6px;
  }
  .int-status { grid-column: 3; grid-row: 1; }
  .integration-list, .toggle-list { padding: 4px 18px; }

  .toggle-row { gap: 16px; padding: 16px 0; }

  .syncbar { padding: 12px 16px; flex-direction: column; align-items: flex-start; gap: 6px; font-size: 10.5px; }
  .syncbar-right { justify-content: flex-start; }
}


/* ════════════════════════════════════════════════════════════════════
   RESPONSIVE: Small mobile (up to 420px)
   ════════════════════════════════════════════════════════════════════ */

@media (max-width: 420px) {
  .hero-title { font-size: 26px; }
  .kpi-value { font-size: 28px; }
  .stat-value { font-size: 22px; }
  .digest-doc-title { font-size: 20px; }
  .relation-grid { grid-template-columns: 1fr; }
}


/* ════════════════════════════════════════════════════════════════════
   PRINT
   ════════════════════════════════════════════════════════════════════ */

@media print {
  .chrome,
  .tabnav,
  .syncbar,
  .hero-actions { display: none !important; }
  .page { display: none; }
  .page-active { display: block !important; padding: 0; }
}
