:root {
  color-scheme: light;
  --ink: #111827;
  --muted: #667085;
  --line: #d8dee8;
  --surface: #ffffff;
  --surface-soft: #f7fafb;
  --brand: #0891b2;
  --accent: #16a34a;
  --danger: #dc2626;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--surface-soft);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button { font: inherit; }

.survey-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 340px;
  min-height: 100vh;
}

.sidebar {
  padding: 18px 14px;
  background: #101827;
  color: white;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 26px;
}

.logo {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--brand);
  font-weight: 800;
}

.nav-item {
  width: 100%;
  min-height: 42px;
  margin-bottom: 8px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #cbd5e1;
  cursor: pointer;
  text-align: left;
}

.nav-item.active, .nav-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.workspace {
  padding: 28px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--brand);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 0;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 190px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #94a3b8;
}

.status-dot.ok { background: var(--accent); }
.status-dot.warn { background: var(--danger); }

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

.metrics article,
.survey-builder,
.checkout,
.selection-empty,
.selection-card,
.offer {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.metrics article {
  min-height: 116px;
  padding: 16px;
}

.metrics span,
.question-editor span,
.insight span,
.fine-print,
.offer p {
  color: var(--muted);
}

.metrics strong {
  display: block;
  margin-top: 22px;
  font-size: 2rem;
}

.survey-builder {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  min-height: 430px;
  overflow: hidden;
}

.question-list {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 18px;
  border-right: 1px solid var(--line);
}

.question {
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  cursor: pointer;
  text-align: left;
}

.question.active {
  border-color: var(--brand);
  box-shadow: inset 0 0 0 1px var(--brand);
}

.question-editor {
  padding: 22px;
}

.scale {
  display: grid;
  grid-template-columns: repeat(5, 54px);
  gap: 10px;
  margin: 24px 0;
}

.scale button {
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fdff;
  color: var(--brand);
  cursor: pointer;
  font-weight: 800;
}

.insight {
  max-width: 520px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfc;
}

.checkout {
  position: sticky;
  top: 0;
  align-self: start;
  min-height: 100vh;
  padding: 22px;
  border-top: 0;
  border-right: 0;
  border-bottom: 0;
  border-radius: 0;
}

.offers {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.offer {
  display: grid;
  gap: 8px;
  padding: 14px;
  box-shadow: none;
}

.offer button {
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  background: var(--ink);
  color: white;
  cursor: pointer;
  font-weight: 700;
}

.price {
  color: var(--brand);
  font-weight: 800;
}

.selection-empty,
.selection-card {
  min-height: 110px;
  margin: 14px 0;
  padding: 14px;
  box-shadow: none;
}

.selection-empty {
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  background: var(--surface-soft);
}

.primary-button {
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: var(--brand);
  color: white;
  cursor: pointer;
  font-weight: 800;
}

.primary-button:disabled {
  cursor: not-allowed;
  background: #9ca3af;
}

@media (max-width: 1080px) {
  .survey-shell { grid-template-columns: 190px minmax(0, 1fr); }
  .checkout {
    position: static;
    grid-column: 2;
    min-height: auto;
    margin: 0 28px 28px;
    border: 1px solid var(--line);
    border-radius: 8px;
  }
}

@media (max-width: 820px) {
  .survey-shell, .metrics, .survey-builder { grid-template-columns: 1fr; }
  .sidebar { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .brand-row { grid-column: 1 / -1; margin-bottom: 8px; }
  .workspace { padding: 18px; }
  .topbar { display: grid; }
  .question-list { border-right: 0; border-bottom: 1px solid var(--line); }
  .checkout { grid-column: 1; margin: 18px; }
  .scale { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}


.legal-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: center;
  padding: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: var(--surface);
}

.legal-footer a,
.back-link {
  color: var(--brand);
  font-weight: 700;
  text-decoration: none;
}

.legal-page {
  width: min(720px, calc(100% - 36px));
  margin: 0 auto;
  padding: 48px 0;
  line-height: 1.7;
}

.legal-page h1 {
  margin: 18px 0;
  font-size: 2rem;
}
