:root {
  color-scheme: light;
  --paper: #f4f1e9;
  --ink: #191b18;
  --muted: #686b64;
  --line: rgba(25, 27, 24, 0.14);
  --card: rgba(255, 255, 255, 0.72);
  --accent: #244f3d;
  --accent-soft: #dce7dd;
  --warm: #d98f55;
  --radius: 26px;
  --shadow: 0 20px 70px rgba(31, 38, 32, 0.12);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
  background: var(--paper);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 95% 4%, rgba(217, 143, 85, 0.18), transparent 27rem),
    radial-gradient(circle at 5% 70%, rgba(36, 79, 61, 0.12), transparent 32rem),
    var(--paper);
}

button, a { font: inherit; }
button { color: inherit; }

.shell {
  width: min(100%, 1120px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(22px, env(safe-area-inset-top)) clamp(20px, 5vw, 72px)
    max(24px, env(safe-area-inset-bottom));
  display: grid;
  grid-template-rows: auto auto 1fr auto;
}

.topbar, .section-heading, .footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 700;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: white;
  background: var(--accent);
}

.icon-button, .close-button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.48);
  border-radius: 50%;
  cursor: pointer;
}

.icon-button {
  width: 38px;
  height: 38px;
  font-weight: 700;
}

.hero {
  padding: clamp(70px, 12vw, 150px) 0 clamp(58px, 8vw, 105px);
  max-width: 770px;
}

.eyebrow, .step-label {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 12px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 24px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(48px, 8vw, 88px);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.hero-copy {
  max-width: 570px;
  margin-bottom: 32px;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.5;
}

.primary-button, .secondary-button, .text-button, .back-button {
  border: 0;
  cursor: pointer;
}

.primary-button {
  min-height: 58px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
  border-radius: 18px;
  color: white;
  background: var(--accent);
  font-weight: 750;
  box-shadow: 0 12px 28px rgba(36, 79, 61, 0.18);
}

.primary-button:hover { background: #173f2e; }
.primary-button:focus-visible, button:focus-visible { outline: 3px solid var(--warm); outline-offset: 3px; }

.connections {
  padding: clamp(24px, 4vw, 44px);
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.section-heading h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 5vw, 50px);
  font-weight: 500;
  letter-spacing: -0.035em;
}

.count {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 800;
}

.empty-state {
  min-height: 300px;
  padding: 50px 16px 20px;
  display: grid;
  justify-items: center;
  align-content: center;
  text-align: center;
}

.empty-symbol {
  height: 50px;
  display: flex;
  align-items: end;
  gap: 7px;
  margin-bottom: 22px;
}

.empty-symbol span {
  width: 8px;
  border-radius: 8px;
  background: var(--accent);
}

.empty-symbol span:nth-child(1) { height: 18px; opacity: 0.42; }
.empty-symbol span:nth-child(2) { height: 32px; opacity: 0.68; }
.empty-symbol span:nth-child(3) { height: 48px; }

.empty-state h3 { margin-bottom: 10px; font-size: 22px; }
.empty-state p { max-width: 440px; color: var(--muted); line-height: 1.55; }
.text-button { padding: 8px; color: var(--accent); background: transparent; font-weight: 800; }

.footer {
  padding-top: 28px;
  color: var(--muted);
  font-size: 13px;
}

.footer button {
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

dialog { color: var(--ink); }

.sheet {
  width: min(100% - 24px, 620px);
  max-height: calc(100vh - 24px);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 30px;
  background: #fbfaf6;
  box-shadow: var(--shadow);
}

.sheet::backdrop, .help-dialog::backdrop {
  background: rgba(16, 19, 16, 0.48);
  backdrop-filter: blur(5px);
}

.sheet-inner { padding: clamp(24px, 5vw, 44px); }
.sheet-header { display: flex; justify-content: space-between; gap: 18px; }
.sheet-header h2, .help-card h2, .result-step h2 {
  margin-bottom: 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(30px, 5vw, 42px);
  line-height: 1.08;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.close-button {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  font-size: 24px;
}

.progress {
  height: 4px;
  margin: 24px 0 30px;
  overflow: hidden;
  border-radius: 4px;
  background: #e4e1d9;
}

.progress span {
  display: block;
  width: 33.333%;
  height: 100%;
  background: var(--accent);
  transition: width 220ms ease;
}

.step { display: none; }
.step.is-active { display: block; animation: enter 180ms ease both; }

@keyframes enter {
  from { opacity: 0; transform: translateY(6px); }
}

.choice-grid, .provider-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.choice {
  min-height: 92px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  text-align: left;
  background: white;
  cursor: pointer;
  transition: border-color 150ms ease, transform 150ms ease, background 150ms ease;
}

.choice:hover { transform: translateY(-2px); border-color: var(--accent); }
.choice.is-selected { border-color: var(--accent); background: var(--accent-soft); }
.choice strong, .choice span { display: block; }
.choice strong { margin-bottom: 6px; font-size: 16px; }
.choice span { color: var(--muted); font-size: 13px; line-height: 1.35; }
.choice.compact { min-height: 58px; text-align: center; font-weight: 700; }

.back-button {
  margin-top: 24px;
  padding: 8px 0;
  color: var(--muted);
  background: transparent;
}

.result-step { text-align: center; }
.result-mark {
  width: 58px;
  height: 58px;
  margin: 0 auto 24px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  color: white;
  background: var(--accent);
  font-size: 24px;
}

.result-step > p:not(.eyebrow, .prototype-note) { color: var(--muted); line-height: 1.55; }
.summary {
  margin: 28px 0;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  text-align: left;
  background: white;
}

.summary div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; font-weight: 750; text-align: right; }
.full { width: 100%; justify-content: center; }
.prototype-note { min-height: 22px; margin: 14px 0 0; color: var(--accent); font-size: 13px; }

.help-dialog {
  width: min(100% - 32px, 470px);
  padding: 0;
  border: 0;
  border-radius: 26px;
  background: #fbfaf6;
}

.help-card { position: relative; padding: 38px; }
.help-card .close-button { position: absolute; top: 18px; right: 18px; }
.help-card p:not(.eyebrow) { color: var(--muted); line-height: 1.55; }
.secondary-button {
  min-height: 48px;
  padding: 0 20px;
  border-radius: 15px;
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 800;
}

@media (max-width: 600px) {
  .shell { padding-left: 16px; padding-right: 16px; }
  .hero { padding-top: 72px; }
  .choice-grid { grid-template-columns: 1fr; }
  .provider-list { grid-template-columns: 1fr 1fr; }
  .footer { align-items: flex-start; gap: 16px; }
  .sheet { width: 100%; max-height: 94vh; margin: auto 0 0; border-radius: 28px 28px 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
