:root {
  color-scheme: light;
  --bg: #f6f3ed;
  --surface: #fffaf2;
  --surface-strong: #ffffff;
  --text: #1f2528;
  --muted: #627078;
  --line: #d8d3c8;
  --accent: #0f766e;
  --accent-dark: #115e59;
  --warm: #b45309;
  --rose: #be123c;
  --ink: #172033;
  --shadow: 0 18px 45px rgba(31, 37, 40, 0.12);
}

:root.dark {
  color-scheme: dark;
  --bg: #121413;
  --surface: #1b1f1d;
  --surface-strong: #232925;
  --text: #f2f4ee;
  --muted: #aeb8b1;
  --line: #323a35;
  --accent: #2dd4bf;
  --accent-dark: #5eead4;
  --warm: #f59e0b;
  --rose: #fb7185;
  --ink: #f8fafc;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

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

img {
  display: block;
  max-width: 100%;
}

button,
input,
select {
  font: inherit;
}

.app-shell,
main > section {
  padding-inline: clamp(18px, 4vw, 56px);
}

.topbar {
  align-items: center;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  min-height: 72px;
}

.brand,
.topbar-actions,
.hero-actions,
.card-topline,
.section-heading,
.card-meta {
  align-items: center;
  display: flex;
}

.brand {
  font-weight: 760;
  gap: 10px;
}

.brand-mark {
  align-items: center;
  aspect-ratio: 1;
  background: var(--ink);
  border-radius: 8px;
  color: var(--surface);
  display: grid;
  font-size: 0.95rem;
  height: 34px;
  place-items: center;
}

.topbar-actions {
  gap: 10px;
}

.icon-button,
.ghost-link,
.primary-link,
.button {
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  min-height: 40px;
}

.icon-button {
  aspect-ratio: 1;
  background: var(--surface);
  color: var(--text);
  width: 40px;
}

.ghost-link,
.primary-link,
.button {
  align-items: center;
  display: inline-flex;
  font-weight: 720;
  justify-content: center;
  padding: 0 15px;
}

.primary-link,
.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.ghost-link,
.button.secondary {
  background: var(--surface);
  color: var(--text);
}

.button.small {
  min-height: 34px;
  padding-inline: 12px;
}

.hero {
  display: grid;
  gap: clamp(24px, 4vw, 48px);
  grid-template-columns: minmax(0, 0.88fr) minmax(320px, 1.12fr);
  min-height: min(680px, calc(100vh - 74px));
  padding-block: clamp(34px, 7vw, 86px);
}

.hero-copy {
  align-self: center;
  max-width: 660px;
  position: relative;
  z-index: 1;
}

.eyebrow {
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 820;
  letter-spacing: 0;
  margin: 0 0 10px;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(3.2rem, 8vw, 7rem);
  letter-spacing: 0;
  line-height: 0.92;
  margin-bottom: 22px;
}

h2 {
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  letter-spacing: 0;
  line-height: 1.08;
  margin-bottom: 0;
}

h3 {
  font-size: 1.05rem;
  letter-spacing: 0;
  line-height: 1.24;
}

.hero-lede {
  color: var(--muted);
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  max-width: 590px;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-media {
  align-self: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-media img {
  aspect-ratio: 16 / 10;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.metrics-band {
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding-block: 12px 34px;
}

.metrics-band article {
  background: var(--surface);
  border: 1px solid var(--line);
  min-height: 112px;
  padding: 22px;
}

.metrics-band article:first-child {
  border-radius: 8px 0 0 8px;
}

.metrics-band article:last-child {
  border-radius: 0 8px 8px 0;
}

.metrics-band span {
  display: block;
  font-size: 2rem;
  font-weight: 830;
  line-height: 1;
}

.metrics-band p,
.card-audience,
.card-pain,
.playbook p,
.empty-state {
  color: var(--muted);
}

.workspace {
  align-items: start;
  display: grid;
  gap: 22px;
  grid-template-columns: 280px minmax(0, 1fr);
  padding-block: 28px 56px;
}

.control-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  position: sticky;
  top: 14px;
}

.panel-section {
  border-bottom: 1px solid var(--line);
  padding: 18px;
}

.panel-section:last-child {
  border-bottom: 0;
}

.panel-section h2 {
  font-size: 1rem;
  margin-bottom: 12px;
}

.field-label {
  color: var(--muted);
  display: block;
  font-size: 0.82rem;
  font-weight: 720;
  margin-bottom: 7px;
}

.input {
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  min-height: 40px;
  padding: 0 11px;
  width: 100%;
}

.range-readout {
  color: var(--muted);
  font-size: 0.84rem;
  margin-top: 6px;
}

.score-list {
  color: var(--muted);
  margin: 0;
  padding-left: 20px;
}

.opportunity-panel,
.experiment-lab,
.playbook {
  min-width: 0;
}

.section-heading {
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 18px;
}

.card-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.opportunity-card,
.experiment-detail,
.experiment-item,
.playbook-grid article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.opportunity-card {
  display: flex;
  flex-direction: column;
  min-height: 300px;
  padding: 18px;
}

.card-topline,
.card-meta {
  flex-wrap: wrap;
  gap: 8px;
}

.stage-badge,
.score-chip,
.status-pill,
.meta-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 760;
  padding: 5px 9px;
}

.score-chip.hot {
  background: rgba(15, 118, 110, 0.12);
  border-color: rgba(15, 118, 110, 0.28);
  color: var(--accent-dark);
}

.score-chip.watch {
  background: rgba(180, 83, 9, 0.12);
  border-color: rgba(180, 83, 9, 0.28);
  color: var(--warm);
}

.score-chip.stop {
  background: rgba(190, 18, 60, 0.1);
  border-color: rgba(190, 18, 60, 0.22);
  color: var(--rose);
}

.opportunity-card h3 {
  margin: 16px 0 9px;
}

.card-pain {
  flex: 1;
}

.card-action {
  margin-top: 18px;
  width: 100%;
}

.experiment-lab,
.playbook {
  padding-block: 34px 58px;
}

.experiment-layout {
  display: grid;
  gap: 16px;
  grid-template-columns: 360px minmax(0, 1fr);
}

.experiment-list {
  display: grid;
  gap: 10px;
}

.experiment-item {
  cursor: pointer;
  padding: 14px;
  text-align: left;
}

.experiment-item.active {
  border-color: var(--accent);
  box-shadow: inset 4px 0 0 var(--accent);
}

.experiment-item h3 {
  margin-bottom: 5px;
}

.experiment-detail {
  min-height: 400px;
  padding: 22px;
}

.detail-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.detail-block {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.detail-block.full {
  grid-column: 1 / -1;
}

.detail-block h4 {
  margin: 0 0 7px;
}

.detail-block p,
.detail-block li {
  color: var(--muted);
}

.playbook-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.playbook-grid article {
  min-height: 220px;
  padding: 20px;
}

.playbook-grid span {
  color: var(--accent-dark);
  font-weight: 840;
}

@media (max-width: 1120px) {
  .hero,
  .workspace,
  .experiment-layout {
    grid-template-columns: 1fr;
  }

  .control-panel {
    position: static;
  }

  .card-grid,
  .playbook-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .topbar,
  .topbar-actions,
  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar-actions {
    display: grid;
    grid-template-columns: 40px 1fr 1fr;
  }

  .hero {
    min-height: auto;
  }

  .metrics-band,
  .card-grid,
  .detail-grid,
  .playbook-grid {
    grid-template-columns: 1fr;
  }

  .metrics-band article,
  .metrics-band article:first-child,
  .metrics-band article:last-child {
    border-radius: 8px;
  }
}
