:root {
  --paper: #f6f4ef;
  --surface: #ffffff;
  --surface-2: #edeae2;
  --ink: #111512;
  --soft: #4e5851;
  --faint: #7b847d;
  --line: #ddd8ce;
  --accent: #19422e;
  --accent-bright: #246143;
  --accent-soft: #e2efe7;
  --ember: #c24130;
  --ember-soft: #fae7e4;
  --gold: #a86814;
  --gold-soft: #f9eed9;
  --obsidian: #0f1411;
  --obsidian-2: #18201b;
  --obsidian-line: rgba(255, 255, 255, 0.1);
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.16, 0.84, 0.24, 1);

  /* Compat aliases for /app */
  --bg: var(--paper);
  --good: #1f7a55;
  --bad: #b23b2e;
  --bad-bg: var(--ember-soft);
  --warn: #9a5b13;
  --warn-bg: var(--gold-soft);
  --shift: #6d3fa8;
  --pill: #f3f0e8;
  --cuebg: #f8f6f0;
  --mark: #fff3c9;
  --radius: 16px;
  --shadow: 0 20px 60px rgba(17, 21, 18, 0.06);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 15.5px/1.6 var(--sans);
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
::selection { background: var(--accent); color: #fff; }

/* Navigation */
.nav-wrap {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(246, 244, 239, 0.84);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(17, 21, 18, 0.07);
}
.nav {
  max-width: 1140px;
  margin: 0 auto;
  padding: 15px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.5px;
  white-space: nowrap;
  flex-shrink: 0;
}
.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: #f6f4ef;
  display: grid;
  place-items: center;
  font: italic 21px/1 var(--serif);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  color: var(--soft);
  font-size: 14px;
}
.nav-links a { transition: color 150ms ease; }
.nav-links a:hover { color: var(--ink); }
.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.nav-actions .btn {
  white-space: nowrap;
  flex-shrink: 0;
}
#nav-user-email {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: transform 180ms var(--ease), background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}
.btn:active:not(:disabled) { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn-primary {
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 8px 24px rgba(17, 21, 18, 0.14);
}
.btn-primary:hover:not(:disabled) {
  background: var(--accent);
  box-shadow: 0 12px 28px rgba(25, 66, 46, 0.24);
  transform: translateY(-1px);
}
.btn-secondary {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}
.btn-secondary:hover:not(:disabled) {
  border-color: var(--ink);
  transform: translateY(-1px);
}
.btn-ghost { background: transparent; color: var(--soft); }
.btn-ghost:hover:not(:disabled) { color: var(--ink); background: rgba(17, 21, 18, 0.05); }
.btn-danger { background: var(--ember-soft); color: var(--ember); }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-lg { padding: 15px 28px; font-size: 15px; }

/* Layout */
.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.eyebrow {
  font: 600 11px/1 var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--accent);
  margin: 0 0 16px;
}
h1, h2, h3 { margin: 0; font-weight: 400; }
h1 {
  font: 400 clamp(46px, 6.2vw, 76px)/0.98 var(--serif);
  letter-spacing: -0.02em;
  margin-bottom: 22px;
}
h1 em, h2 em { font-style: italic; color: var(--accent); }
h2 {
  font: 400 clamp(34px, 4.4vw, 52px)/1.04 var(--serif);
  letter-spacing: -0.015em;
  margin-bottom: 16px;
}
h3 { font: 600 17px/1.35 var(--sans); letter-spacing: -0.01em; margin-bottom: 8px; }
.lead {
  font-size: 17.5px;
  color: var(--soft);
  line-height: 1.62;
  max-width: 48ch;
  margin: 0 0 30px;
}
.muted { color: var(--soft); }
.small { font-size: 13px; color: var(--faint); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

/* Hero */
.hero-wrap {
  position: relative;
  overflow: hidden;
  padding: 72px 0 88px;
  background:
    radial-gradient(900px 460px at 82% 20%, rgba(25, 66, 46, 0.08), transparent 65%),
    radial-gradient(640px 380px at 12% 88%, rgba(194, 65, 48, 0.06), transparent 62%);
}
.hero {
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: 52px;
  align-items: center;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: 13px;
  color: var(--faint);
}
.hero-meta span { display: inline-flex; align-items: center; gap: 6px; }
.hero-meta span::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.7;
}

/* Interactive Moment Stage */
.stage-frame {
  background: var(--obsidian);
  color: #f3f5f2;
  border-radius: 24px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow:
    0 32px 80px rgba(15, 20, 17, 0.28),
    0 2px 10px rgba(15, 20, 17, 0.14);
  position: relative;
}
.stage-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.live-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 500;
  color: #c8ddd0;
  background: rgba(255, 255, 255, 0.06);
  padding: 5px 12px;
  border-radius: 999px;
}
.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ecb83;
  box-shadow: 0 0 0 0 rgba(78, 203, 131, 0.7);
  animation: pulse 2.2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(78, 203, 131, 0.65); }
  70% { box-shadow: 0 0 0 8px rgba(78, 203, 131, 0); }
  100% { box-shadow: 0 0 0 0 rgba(78, 203, 131, 0); }
}

.scenario-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.scenario-pill {
  background: transparent;
  color: #8f9e93;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 6px 13px;
  font-size: 12px;
  cursor: pointer;
  transition: all 180ms ease;
}
.scenario-pill:hover { color: #eef3ee; border-color: rgba(255, 255, 255, 0.28); }
.scenario-pill.active {
  background: #f6f4ef;
  color: var(--obsidian);
  border-color: #f6f4ef;
  font-weight: 600;
}

.call-canvas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.person-tile {
  border-radius: 16px;
  padding: 16px;
  min-height: 172px;
  background: linear-gradient(155deg, #1b241e 0%, #121714 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transition: border-color 260ms ease, box-shadow 260ms ease;
}
.person-tile.highlight-bad {
  border-color: rgba(235, 111, 96, 0.55);
  box-shadow: inset 0 0 42px rgba(194, 65, 48, 0.18);
}
.person-tile.highlight-good {
  border-color: rgba(78, 203, 131, 0.5);
  box-shadow: inset 0 0 42px rgba(46, 155, 96, 0.18);
}
.person-tile.highlight-warn {
  border-color: rgba(240, 178, 84, 0.52);
  box-shadow: inset 0 0 42px rgba(208, 138, 34, 0.16);
}
.tile-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.tile-name { font-size: 13px; font-weight: 500; color: #e4ebe6; }
.state-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
}
.tag-good { background: rgba(78, 203, 131, 0.18); color: #8be8b3; }
.tag-bad { background: rgba(235, 111, 96, 0.22); color: #ffa89c; }
.tag-warn { background: rgba(240, 178, 84, 0.2); color: #fad089; }
.tag-calm { background: rgba(255, 255, 255, 0.09); color: #b9c5bc; }

.portrait {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  margin: 14px auto;
  display: grid;
  place-items: center;
  font: italic 24px/1 var(--serif);
  color: #f4f6f2;
  background: radial-gradient(circle at 30% 25%, #375744, #1c2c22);
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.portrait.p2 { background: radial-gradient(circle at 30% 25%, #5b3b36, #251918); }

.wave {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  height: 18px;
  opacity: 0.8;
}
.wave i {
  display: block;
  width: 3px;
  border-radius: 3px;
  background: currentColor;
  animation: eq 1.4s ease-in-out infinite;
}
.wave i:nth-child(2) { animation-delay: 0.18s; }
.wave i:nth-child(3) { animation-delay: 0.34s; }
.wave i:nth-child(4) { animation-delay: 0.52s; }
.wave i:nth-child(5) { animation-delay: 0.25s; }
@keyframes eq {
  0%, 100% { height: 4px; opacity: 0.45; }
  50% { height: 16px; opacity: 1; }
}
.wave.quiet i { animation: none; height: 3px; opacity: 0.3; }

.subtext-card {
  margin-top: 12px;
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  transition: opacity 180ms ease;
}
.said-line {
  font: italic 19px/1.3 var(--serif);
  color: #ffffff;
  margin-bottom: 8px;
}
.felt-line {
  font-size: 13.5px;
  line-height: 1.55;
  color: #b7c4ba;
}
.felt-line strong { color: #f6f4ef; font-weight: 600; }

/* Contrast Band: Transcript vs Emodia */
.band { padding: 92px 0; }
.band-surface {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.contrast-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 24px;
  margin-top: 36px;
  align-items: stretch;
}
.plain-sheet {
  background: var(--paper);
  border: 1px dashed var(--line);
  border-radius: 20px;
  padding: 28px;
  color: var(--faint);
}
.plain-sheet .sheet-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.transcript-lines { display: grid; gap: 14px; font-size: 14.5px; }
.transcript-lines div { display: grid; grid-template-columns: 48px 1fr; gap: 12px; }
.transcript-lines span { font-variant-numeric: tabular-nums; opacity: 0.65; }

.emodia-sheet {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px;
  box-shadow: var(--shadow);
}
.emodia-sheet .sheet-label {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}
.insight-item {
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--paper);
  border-left: 3px solid var(--accent);
  margin-bottom: 12px;
}
.insight-item:last-child { margin-bottom: 0; }
.insight-item.ember { border-left-color: var(--ember); }
.insight-item.gold { border-left-color: var(--gold); }
.insight-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.insight-head strong { font-size: 14.5px; color: var(--ink); }
.insight-time {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--faint);
}
.insight-item p { margin: 0; font-size: 13.5px; color: var(--soft); }

/* Editorial Feature Rows */
.pillars {
  margin-top: 40px;
  border-top: 1px solid var(--line);
}
.pillar-row {
  display: grid;
  grid-template-columns: 80px 1fr 1.2fr;
  gap: 24px;
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.pillar-num {
  font: italic 30px/1 var(--serif);
  color: var(--accent);
}
.pillar-row h3 {
  font: 400 28px/1.15 var(--serif);
  margin: 0;
}
.pillar-row p {
  margin: 0;
  color: var(--soft);
  font-size: 15.5px;
  line-height: 1.65;
}

/* Pricing */
.pricing-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 34px;
}
.billing-switch {
  display: inline-flex;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px;
  gap: 4px;
}
.billing-switch button {
  border: 0;
  background: transparent;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--soft);
  cursor: pointer;
  transition: all 160ms ease;
}
.billing-switch button.active { background: var(--ink); color: var(--paper); font-weight: 500; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px;
  box-shadow: var(--shadow);
}
.card p { margin: 0; color: var(--soft); }
.price-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}
.price-card h3 { padding-right: 112px; }
.price-card.featured {
  background: var(--obsidian);
  color: #f6f4ef;
  border-color: var(--obsidian);
  box-shadow: 0 28px 70px rgba(15, 20, 17, 0.2);
}
.price-card.featured .small,
.price-card.featured .price-amount span,
.price-card.featured .feature-list { color: #b4c2b8; }
.price-card.featured .feature-list li::before { color: #67d698; }
.price-card.featured .btn-primary {
  background: #f6f4ef;
  color: var(--obsidian);
}
.price-card.featured .btn-primary:hover:not(:disabled) { background: #ffffff; }
.price-card.featured .btn-primary:disabled {
  background: rgba(246, 244, 239, 0.16);
  color: #dce5df;
  border-color: rgba(246, 244, 239, 0.2);
  box-shadow: none;
  opacity: 1;
}
.popular-pill,
.price-badge {
  position: absolute;
  top: 22px;
  right: 22px;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 999px;
}
.popular-pill {
  background: rgba(103, 214, 152, 0.16);
  color: #84e5ae;
}
.price-badge {
  background: var(--accent-soft);
  color: var(--accent);
}
.price-card.featured .price-badge {
  background: rgba(103, 214, 152, 0.18);
  color: #84e5ae;
}
.price-badge.warn {
  background: var(--gold-soft);
  color: var(--gold);
}
.price-card.featured .price-badge.warn {
  background: rgba(240, 178, 84, 0.22);
  color: #fad089;
}
.price-badge.danger {
  background: var(--ember-soft);
  color: var(--ember);
}
.price-card.featured .price-badge.danger {
  background: rgba(235, 111, 96, 0.24);
  color: #ffa89c;
}
.price-amount {
  font: 400 48px/1 var(--serif);
  margin: 18px 0 8px;
  letter-spacing: -0.02em;
}
.price-amount span { font: 400 14px/1 var(--sans); color: var(--faint); letter-spacing: 0; }
.feature-list {
  list-style: none;
  padding: 0;
  margin: 22px 0 28px;
  display: grid;
  gap: 11px;
  font-size: 14px;
  color: var(--soft);
}
.feature-list li::before { content: "✓  "; color: var(--accent); font-weight: 700; }

/* Final Closer Band */
.closer {
  text-align: center;
  padding: 96px 0 84px;
}
.closer h2 {
  font-size: clamp(40px, 5.5vw, 66px);
  max-width: 15ch;
  margin: 0 auto 18px;
}
.closer .lead { margin: 0 auto 30px; text-align: center; }
.closer-cta { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }
.install-drawer {
  max-width: 560px;
  margin: 24px auto 0;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 24px;
}
.install-drawer ol { margin: 10px 0 0; padding-left: 20px; color: var(--soft); font-size: 14px; display: grid; gap: 6px; }
.waitlist-bar {
  max-width: 460px;
  margin: 40px auto 0;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.waitlist-inline {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.input-field {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
}
.app-shell .input-field,
.auth-shell .input-field { border-radius: 10px; }
.input-field:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
label.field-label { display: block; font-size: 12.5px; font-weight: 500; color: var(--soft); margin: 14px 0 6px; }
.status-msg { margin-top: 10px; font-size: 13px; min-height: 20px; color: var(--accent); }
.status-msg.error { color: var(--ember); }

/* Footer */
footer.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 44px;
  color: var(--faint);
  font-size: 13px;
}
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; }

/* App Workspace (`/app`) */
.copy-row {
  display: flex;
  gap: 8px;
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  margin-top: 10px;
}
.copy-row code { flex: 1; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auth-shell { max-width: 440px; margin: 56px auto; }
.btn-google {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  font-weight: 500;
}
.btn-google:hover { background: var(--surface-2); }
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 14px;
  color: var(--faint);
  font-size: 12px;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.tabs-bar { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.tab-btn {
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 10px 14px;
  color: var(--soft);
  font-weight: 500;
  cursor: pointer;
}
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.app-shell { padding: 32px 0 72px; }
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 24px;
}
.plan-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  background: var(--accent-soft);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.plan-pill.stub,
.plan-pill.warn { background: var(--gold-soft); color: var(--gold); }
.plan-pill.danger { background: var(--ember-soft); color: var(--ember); }
.meter { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin-top: 10px; }
.meter > span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.list-clean { list-style: none; padding: 0; margin: 12px 0 0; }
.list-clean li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.list-clean li:first-child { border-top: 0; }
.row-title { font-weight: 600; color: var(--ink); }
.row-sub { font-size: 12.5px; color: var(--faint); }
.moment-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  padding: 14px 16px;
  margin-top: 12px;
}
.moment-card.kind-mismatch { border-left-color: var(--ember); }
.moment-card.kind-state_shift { border-left-color: var(--shift); }
.moment-card.kind-delivery { border-left-color: var(--gold); }
.pill-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.mini-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--soft);
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 20, 17, 0.58);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 100;
}
.modal-backdrop[hidden] { display: none; }
.modal-card {
  width: 100%;
  max-width: 460px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 32px 84px rgba(0, 0, 0, 0.3);
}
.stripe-card-box {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  margin: 14px 0;
  font-size: 13px;
}

/* Rich Notes & Share UI (`/app` and `/s/:id`) — Golden v2 editorial layout */
.calls-layout {
  display: grid;
  grid-template-columns: minmax(250px, 310px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
.calls-sidebar {
  position: sticky;
  top: 78px;
  min-width: 0;
}
.calls-detail-card {
  padding: 32px 36px;
  min-width: 0;
}
.call-row {
  display: flex !important;
  flex-direction: column;
  align-items: stretch !important;
  gap: 8px;
  border-radius: 10px;
  padding: 12px 12px !important;
  margin: 0 -10px;
  cursor: pointer;
  transition: background 140ms ease;
}
.call-row:hover { background: var(--paper); }
.call-row.active { background: var(--surface-2); }
.call-row-top {
  line-height: 1.35;
}
.call-row-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.call-row-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}
.btn-xs {
  padding: 4px 10px;
  font-size: 12px;
}
.mini-pill.shared-pill {
  background: var(--accent-soft);
  border-color: transparent;
  color: var(--accent);
}
.notes-head-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.notes-call-title {
  font: 600 clamp(22px, 2.6vw, 28px)/1.2 var(--sans);
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 4px 0 8px;
}
.notes-toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.share-panel {
  margin: 14px 0 18px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--accent-soft);
  border: 1px solid rgba(46, 125, 82, 0.22);
}
.share-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.share-panel-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.notes-lede {
  font-size: 16.5px;
  line-height: 1.62;
  color: var(--soft);
  margin: 8px 0 12px;
}
.notes-people-legend {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-size: 13.5px;
  color: var(--soft);
}
.notes-people-legend li {
  display: inline-flex;
  align-items: center;
}
.speaker-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 7px;
  flex: none;
}
.notes-section {
  margin-top: 34px;
}
.notes-sec-title {
  font: 600 12.5px/1.2 var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--faint);
  margin: 0 0 12px;
}
.notes-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 12px;
  margin: 14px 0 0;
}
.notes-subcard {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
}
.notes-subcard h4 {
  margin: 0 0 6px;
  font: 600 16px/1.3 var(--sans);
  color: var(--ink);
}
.notes-subcard p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--soft);
}
.notes-timeline-wrap {
  margin: 18px 0 0;
  padding: 12px 14px 10px;
  background: var(--cuebg);
  border: 1px solid var(--line);
  border-radius: 12px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}
.notes-timeline-fig {
  margin: 0;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.notes-timeline-fig svg {
  display: block;
  width: 100%;
  min-width: 0;
  height: auto;
}
.tl-marker {
  cursor: pointer;
}
.tl-marker circle {
  transition: transform 140ms ease, opacity 140ms ease;
  transform-box: fill-box;
  transform-origin: center;
}
.tl-marker:hover circle,
.tl-marker:focus-visible circle {
  transform: scale(1.16);
}
.notes-timeline-legend {
  margin: 6px 0 0;
  font-size: 12.5px;
  color: var(--faint);
}
.notes-moments {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: grid;
  gap: 14px;
}
.notes-moment {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  transition: box-shadow 220ms ease, background 220ms ease;
}
.notes-moment.kind-mismatch { border-left-color: var(--bad); }
.notes-moment.kind-state_shift { border-left-color: var(--shift); }
.notes-moment.kind-reaction { border-left-color: var(--good); }
.notes-moment.kind-delivery { border-left-color: var(--warn); }
.notes-moment.moment-flash {
  animation: momentFlash 1.4s ease;
}
@keyframes momentFlash {
  0% { background: var(--mark); box-shadow: 0 0 0 3px rgba(25, 66, 46, 0.16); }
  100% { background: var(--surface); box-shadow: none; }
}
.moment-when {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  padding-top: 2px;
  font-variant-numeric: tabular-nums;
  color: var(--faint);
  font-size: 13px;
}
.moment-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}
.moment-clock {
  color: var(--faint);
  font-size: 12.5px;
  line-height: 1.3;
  white-space: nowrap;
}
.moment-clock-btn {
  all: unset;
  cursor: pointer;
  color: var(--ink);
  font-weight: 600;
  font-size: 12.5px;
  border-bottom: 1px dotted var(--faint);
  white-space: nowrap;
}
.moment-clock-btn:hover { border-bottom-style: solid; }
.moment-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 6px;
}
.notes-pill {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--pill);
  color: var(--soft);
}
.notes-pill.kind-mismatch { color: var(--bad); }
.notes-pill.kind-state_shift { color: var(--shift); }
.notes-pill.kind-reaction { color: var(--good); }
.notes-pill.kind-delivery { color: var(--warn); }
.notes-pill.pol-pos { color: var(--good); }
.notes-pill.pol-neg { color: var(--bad); }
.notes-pill.pol-mix { color: var(--warn); }
.notes-pill.pol-neu { color: var(--soft); }
.moment-tag {
  font-size: 12px;
  color: var(--faint);
}
.moment-tag .strength-subtle { opacity: 0.78; }
.moment-title {
  margin: 0 0 6px;
  font: 600 16.5px/1.35 var(--sans);
  color: var(--ink);
  letter-spacing: -0.01em;
}
.moment-text {
  margin: 0 0 10px;
  font-size: 15px;
  line-height: 1.58;
  color: var(--ink);
}
.cues-box {
  margin: 10px 0 0;
  padding: 10px 13px;
  border-radius: 9px;
  background: var(--cuebg);
  border: 1px solid var(--line);
  display: grid;
  gap: 5px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--soft);
}
.cues-box b {
  color: var(--ink);
  font-weight: 600;
}
.cues-box .mismatch-line b {
  color: var(--bad);
}
.notes-empty-note {
  color: var(--soft);
  font-size: 14.5px;
  margin: 8px 0 0;
}
.notes-topic {
  margin: 0 0 18px;
}
.notes-topic h4 {
  margin: 0 0 6px;
  font: 600 16.5px/1.35 var(--sans);
  color: var(--ink);
}
.notes-topic ul,
.notes-plain-list,
.notes-list {
  margin: 4px 0 0;
  padding-left: 20px;
}
.notes-topic li,
.notes-plain-list li,
.notes-list li {
  margin: 4px 0;
  color: var(--soft);
  font-size: 15px;
  line-height: 1.55;
}
.notes-plain-list strong {
  color: var(--ink);
  font-weight: 600;
}

.share-shell { max-width: 880px; padding: 36px 0 72px; }
.share-card { padding: 36px 40px; min-width: 0; }
.share-title {
  font: 600 clamp(24px, 3.6vw, 32px)/1.2 var(--sans);
  letter-spacing: -0.02em;
  margin: 4px 0 12px;
  color: var(--ink);
}
.share-foot { text-align: center; margin-top: 18px; }
@media print {
  .nav-wrap, .share-foot { display: none !important; }
  .share-shell { max-width: 100%; padding: 0; }
  .share-card { border: 0; box-shadow: none; padding: 0; }
}

@media (max-width: 920px) {
  .hero, .contrast-grid, .pillar-row, .grid-3, .grid-2, .calls-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .calls-sidebar { position: static; }
  .calls-detail-card, .share-card { padding: 24px 20px; }
  .pillar-row { gap: 10px; }
  .nav-links { display: none; }
}
@media (max-width: 640px) {
  .container { padding: 0 14px; }
  .nav { padding: 12px 14px; gap: 10px; }
  .brand { font-size: 17px; gap: 8px; }
  .brand-mark { width: 26px; height: 26px; font-size: 18px; }
  .nav-actions { gap: 6px; }
  .nav-actions .btn-sm { padding: 7px 11px; font-size: 12.5px; }
  #nav-user-email { display: none; }
  #share-print { display: none; }

  .app-shell { padding: 18px 0 48px; }
  .app-header { margin-bottom: 16px; gap: 12px; }
  .app-header h2 { font-size: 30px; }
  .tabs-bar {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 0;
    margin-bottom: 16px;
  }
  .tabs-bar::-webkit-scrollbar { display: none; }
  .tab-btn {
    white-space: nowrap;
    flex-shrink: 0;
    padding: 10px 8px;
    font-size: 12.5px;
  }

  .card, .calls-detail-card, .share-card {
    padding: 18px 16px;
    border-radius: 16px;
  }
  .share-shell { padding: 16px 0 48px; }
  .share-title, .notes-call-title {
    font-size: 22px;
    line-height: 1.24;
    overflow-wrap: anywhere;
  }
  .notes-lede { font-size: 15px; line-height: 1.58; }
  .notes-section { margin-top: 26px; }
  .notes-cols { grid-template-columns: minmax(0, 1fr); }
  .notes-subcard { padding: 13px 14px; }
  .notes-timeline-wrap { padding: 10px 10px 8px; }
  .notes-timeline-legend { font-size: 12px; }
  .notes-moments { gap: 12px; }
  .notes-moment {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    padding: 14px;
  }
  .moment-when {
    flex-direction: row;
    align-items: center;
    gap: 8px;
  }
  .moment-title { font-size: 15.5px; }
  .moment-text { font-size: 14.5px; }
  .cues-box { padding: 9px 11px; font-size: 13.5px; }
  .notes-topic li, .notes-plain-list li, .notes-list li { font-size: 14.5px; }

  .copy-row { flex-wrap: wrap; gap: 6px; }
  .copy-row code { flex: 1 1 100%; min-width: 0; padding: 2px 2px 4px; }
  .copy-row .btn { flex: 1 1 auto; }
  .share-panel { padding: 12px 13px; }
  .billing-switch { width: 100%; }
  .billing-switch button { flex: 1; padding: 8px 10px; font-size: 12.5px; }
  .call-canvas { grid-template-columns: 1fr; }
  .waitlist-inline { flex-direction: column; }
}
