:root {
  color-scheme: light;
  --bg: #f6f7f4;
  --ink: #14201c;
  --muted: #64706b;
  --line: #dfe5df;
  --panel: #ffffff;
  --primary: #125d4b;
  --primary-ink: #ffffff;
  --accent: #e9f6f0;
  --warn: #fff5d8;
  --hot: #ffe6df;
  --bad: #ffe7e7;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); }
a { color: inherit; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  background: rgba(246, 247, 244, .94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.brand { font-weight: 800; text-decoration: none; }
.topbar-actions { display: flex; align-items: center; gap: 14px; }
.shell { width: min(1120px, 100%); margin: 0 auto; padding: 18px 14px 110px; }
.hero, .panel, .auth-card, .question-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  margin: 0 0 14px;
  box-shadow: 0 10px 30px rgba(20, 32, 28, .06);
}
.hero { background: #fdfefb; }
.panel.accent { background: var(--accent); }
.auth-card { margin-top: 12vh; }
h1, h2, p { margin-top: 0; }
h1 { font-size: 30px; line-height: 1.12; margin-bottom: 14px; letter-spacing: 0; }
h2 { font-size: 22px; line-height: 1.2; margin-bottom: 14px; letter-spacing: 0; }
.lead { font-size: 19px; color: var(--muted); }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 12px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 8px;
}
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stats div, .score {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}
.stats strong { display: block; font-size: 28px; }
.stats span, .muted, dt { color: var(--muted); }
.facts { display: grid; gap: 10px; margin: 14px 0 18px; }
.facts div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
.facts.big div { grid-template-columns: 110px 1fr; }
dt { font-size: 13px; }
dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.primary-button, .secondary-button, .choice, button {
  min-height: 50px;
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.primary-button, .secondary-button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  padding: 14px 16px;
}
.primary-button { background: var(--primary); color: var(--primary-ink); }
.secondary-button { background: #edf0ec; color: var(--ink); }
.link-button { background: transparent; color: var(--muted); min-height: 0; padding: 6px 0; }
.install-button { color: var(--primary); }
.answers, .stack { display: grid; gap: 10px; }
.choice {
  width: 100%;
  padding: 16px;
  background: #eef2ef;
  color: var(--ink);
}
.choice.hot { background: var(--hot); }
.choice.good { background: var(--accent); }
.choice.warn { background: var(--warn); }
.choice.bad { background: var(--bad); }
.checkbox {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
}
.checkbox input { width: 22px; height: 22px; }
label { display: grid; gap: 6px; font-weight: 700; color: var(--muted); }
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 14px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}
textarea { resize: vertical; }
.split-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.inline-field { margin: 4px 0 8px; }
.call-header {
  position: sticky;
  top: 54px;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  margin: -4px 0 12px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.call-header span, .call-header a { display: block; color: var(--muted); text-decoration: none; }
.timer { font-weight: 900; white-space: nowrap; }
.survey-step { color: var(--muted); font-size: 13px; margin: 0 0 8px; }
.call-workspace {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.call-main {
  min-width: 0;
}
.desk-rail {
  position: sticky;
  top: 72px;
  display: grid;
  gap: 12px;
}
.rail-section {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 10px 30px rgba(20, 32, 28, .04);
}
.rail-section.quiet {
  background: #fdfefb;
}
.compact-facts {
  display: grid;
  gap: 9px;
  margin: 0;
}
.compact-facts div {
  display: grid;
  gap: 2px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
}
.phone-link {
  display: inline-flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
}
.answer-chip {
  display: grid;
  gap: 3px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}
.answer-chip span {
  color: var(--muted);
  font-size: 12px;
}
.answer-chip strong {
  font-size: 14px;
}
.sticky-tools {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 8px;
  width: min(1120px, 100%);
  transform: translateX(-50%);
  padding: 10px 12px 14px;
  background: rgba(246, 247, 244, .96);
  border-top: 1px solid var(--line);
}
.sticky-tools > a, .sticky-tools summary, .sticky-tools button {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  list-style: none;
}
.sticky-tools details[open] {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 74px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(20, 32, 28, .18);
}
.sticky-tools details[open] summary { margin-bottom: 10px; }
.sticky-tools details[open] form { display: grid; gap: 8px; }
.history-row {
  display: grid;
  gap: 4px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
}
.history-row span { color: var(--muted); }
.badge {
  display: inline-flex;
  padding: 8px 10px;
  border-radius: 8px;
  background: #edf0ec;
  font-weight: 800;
}
.score { display: flex; justify-content: space-between; align-items: center; margin: 14px 0; }
blockquote {
  margin: 10px 0;
  padding: 12px;
  border-left: 4px solid var(--primary);
  background: #f7faf7;
}
blockquote small { display: block; color: var(--muted); margin-top: 6px; }
.alert { padding: 12px; background: var(--bad); border-radius: 8px; }

@media (max-width: 520px) {
  .shell { padding-inline: 10px; }
  h1 { font-size: 26px; }
  .stats { grid-template-columns: 1fr; }
  .facts div, .facts.big div { grid-template-columns: 1fr; gap: 2px; }
  .split-fields { grid-template-columns: 1fr; }
  .sticky-tools { grid-template-columns: 1fr 1fr 1fr; }
  .sticky-tools > a, .sticky-tools summary { font-size: 12px; }
}

@media (min-width: 860px) {
  .route-call .question-card {
    min-height: calc(100vh - 210px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 34px;
  }
  .route-call .question-card h1 {
    font-size: 36px;
    max-width: 760px;
  }
  .route-call .answers {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .route-call .answers .primary-button,
  .route-call .answers .secondary-button,
  .route-call .answers label,
  .route-call .answers .split-fields {
    grid-column: 1 / -1;
  }
}

@media (max-width: 859px) {
  .shell { width: min(760px, 100%); }
  .call-workspace { display: block; }
  .desk-rail { position: static; margin-bottom: 12px; }
  .rail-section:not(:first-child) { display: none; }
  .sticky-tools { width: min(760px, 100%); }
}
