:root {
  --ink: #17181c;
  --muted: #5e6572;
  --paper: #fbfaf6;
  --panel: #ffffff;
  --line: #d9ddd7;
  --teal: #124f59;
  --teal-dark: #0b343b;
  --green: #39735a;
  --amber: #c98724;
  --clay: #c05f46;
  --blue-soft: #e8f2f4;
  --amber-soft: #fff3d8;
  --shadow: 0 18px 50px rgba(23, 24, 28, 0.12);
}

:root[data-theme="dark"] {
  --ink: #f4f1e8;
  --muted: #bdc5c4;
  --paper: #101614;
  --panel: #18211e;
  --line: #33423d;
  --teal: #71c2ca;
  --teal-dark: #d2f2ef;
  --green: #9bd0be;
  --amber: #e6ad55;
  --clay: #e48a73;
  --blue-soft: #18333a;
  --amber-soft: #332713;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

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

:root[data-theme="dark"] .site-header {
  background: rgba(16, 22, 20, 0.92);
}

:root[data-theme="dark"] .button-secondary,
:root[data-theme="dark"] .metric-grid div,
:root[data-theme="dark"] .decision-panel,
:root[data-theme="dark"] .included-section,
:root[data-theme="dark"] .included-grid article,
:root[data-theme="dark"] .intake-panel,
:root[data-theme="dark"] .results-panel,
:root[data-theme="dark"] .offer-card,
:root[data-theme="dark"] .sources-section,
:root[data-theme="dark"] .site-footer,
:root[data-theme="dark"] .legal-page,
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea,
:root[data-theme="dark"] input[type="email"],
:root[data-theme="dark"] input[type="tel"],
:root[data-theme="dark"] input[type="text"] {
  background: var(--panel);
}

:root[data-theme="dark"] .offer-section {
  background: #121b18;
}

:root[data-theme="dark"] .button-primary {
  color: #092327;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 0 48px;
  background: rgba(251, 250, 246, 0.92);
  border-bottom: 1px solid rgba(217, 221, 215, 0.72);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 760;
  text-decoration: none;
}

.brand-mark {
  width: 28px;
  height: 28px;
  background:
    linear-gradient(90deg, transparent 42%, var(--paper) 42% 58%, transparent 58%),
    linear-gradient(var(--teal), var(--teal));
  border: 2px solid var(--teal-dark);
  border-radius: 7px;
}

nav {
  display: flex;
  gap: 22px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

nav a {
  text-decoration: none;
}

nav a:hover {
  color: var(--ink);
}

.theme-toggle {
  min-height: 38px;
  padding: 0 13px;
  color: var(--teal-dark);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-size: 13px;
  font-weight: 760;
  cursor: pointer;
}

main {
  overflow: hidden;
}

.hero-copy,
.decision-preview,
.section-heading,
.workspace > *,
.offer-card,
.boundary-section > * {
  min-width: 0;
}

.hero-section {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(360px, 0.96fr);
  align-items: stretch;
  gap: 32px;
  min-height: calc(100vh - 72px);
  padding: 64px 48px 34px;
  background:
    linear-gradient(120deg, rgba(18, 79, 89, 0.08), rgba(201, 135, 36, 0.12)),
    var(--paper);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 790px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 13px;
  font-weight: 760;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(40px, 6vw, 74px);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.16;
}

.lead {
  max-width: 700px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 19px;
}

.hero-actions,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  font: inherit;
  font-size: 15px;
  font-weight: 760;
  line-height: 1;
  text-decoration: none;
  text-align: center;
  white-space: normal;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  color: #ffffff;
  background: var(--teal);
}

.button-primary:hover {
  background: var(--teal-dark);
}

.button-secondary {
  color: var(--teal-dark);
  background: #ffffff;
  border-color: var(--line);
}

.button-tertiary {
  color: var(--teal-dark);
  background: var(--blue-soft);
  border-color: rgba(18, 79, 89, 0.2);
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 34px;
}

.trust-row span {
  padding: 8px 11px;
  color: var(--teal-dark);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(217, 221, 215, 0.9);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 680;
}

.decision-preview {
  align-self: center;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 560px;
  padding: 32px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(232, 242, 244, 0.88)),
    var(--panel);
  border: 1px solid rgba(18, 79, 89, 0.16);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.preview-header {
  display: grid;
  gap: 9px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.preview-header span,
.preview-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.preview-header strong {
  color: var(--teal-dark);
  font-size: 28px;
}

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

.metric-grid div {
  display: grid;
  gap: 8px;
  min-height: 112px;
  padding: 18px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.metric-grid strong {
  font-size: 22px;
  line-height: 1.05;
}

.decision-panel {
  display: grid;
  gap: 12px;
  padding: 18px;
  background: #ffffff;
  border: 1px solid rgba(18, 79, 89, 0.16);
  border-radius: 8px;
}

.decision-panel ul {
  padding-left: 18px;
}

.decision-panel li {
  color: var(--ink);
  font-weight: 660;
}

.decision-steps {
  display: grid;
  gap: 10px;
  margin-top: auto;
}

.decision-steps div {
  display: grid;
  grid-template-columns: 34px minmax(0, 0.5fr) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 14px;
  background: var(--amber-soft);
  border: 1px solid rgba(201, 135, 36, 0.35);
  border-radius: 8px;
}

.decision-steps span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  color: #ffffff;
  background: var(--teal);
  border-radius: 50%;
  font-weight: 820;
}

.decision-steps strong {
  color: var(--teal-dark);
}

.decision-steps p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.doc-lines {
  display: grid;
  gap: 14px;
  margin-top: 8px;
}

.doc-lines span {
  display: block;
  height: 16px;
  background: linear-gradient(90deg, rgba(18, 79, 89, 0.24), rgba(201, 135, 36, 0.18));
  border-radius: 999px;
}

.doc-lines span:nth-child(2) {
  width: 78%;
}

.doc-lines span:nth-child(3) {
  width: 90%;
}

.doc-lines span:nth-child(4) {
  width: 62%;
}

.preview-footer {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: auto;
}

.preview-footer span {
  padding: 12px;
  color: var(--teal-dark);
  background: var(--amber-soft);
  border: 1px solid rgba(201, 135, 36, 0.35);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 740;
}

.workspace-section,
.included-section,
.offer-section,
.providers-section,
.latest-insights-section,
.boundary-section,
.sources-section {
  padding: 76px 48px;
}

.section-heading {
  max-width: 820px;
  margin-bottom: 28px;
}

.section-heading p:not(.eyebrow) {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.included-section {
  background: #ffffff;
}

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

.included-grid article {
  display: grid;
  gap: 12px;
  min-height: 260px;
  padding: 22px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(23, 24, 28, 0.06);
}

.included-grid span {
  width: fit-content;
  padding: 5px 8px;
  color: #ffffff;
  background: var(--teal);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 820;
}

.included-grid p {
  margin: 0;
  color: var(--muted);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: 24px;
  align-items: start;
}

.intake-panel,
.results-panel,
.offer-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 10px 32px rgba(23, 24, 28, 0.07);
}

.intake-panel {
  display: grid;
  gap: 20px;
  padding: 26px;
}

.precheck-panel {
  gap: 16px;
}

.precheck-progress {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 4px;
}

.precheck-progress span {
  height: 6px;
  background: var(--line);
  border-radius: 999px;
}

.precheck-progress span.is-active {
  background: var(--teal);
}

.question-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 16px;
  background: rgba(232, 242, 244, 0.55);
  border: 1px solid rgba(18, 79, 89, 0.12);
  border-radius: 8px;
}

:root[data-theme="dark"] .question-card {
  background: rgba(24, 51, 58, 0.6);
}

.question-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.form-step {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  color: #ffffff;
  background: var(--teal);
  border-radius: 50%;
  font-weight: 800;
}

label,
legend {
  color: var(--ink);
  font-weight: 720;
}

select,
input[type="text"] {
  width: 100%;
  min-height: 46px;
  margin-top: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid #cdd2d5;
  border-radius: 7px;
  font: inherit;
}

.optional-field {
  display: block;
}

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

.checkbox-group {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.checkbox-group label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
  font-weight: 600;
}

input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--teal);
  flex: 0 0 auto;
}

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

.compact-checks legend {
  grid-column: 1 / -1;
}

.microcopy {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.results-panel {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 18px;
  padding: 24px;
}

.results-header {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.results-header strong {
  display: block;
  font-size: 23px;
  line-height: 1.15;
}

.results-header p:not(.eyebrow) {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.decision-results {
  gap: 16px;
}

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

.signal-strip div {
  min-height: 86px;
  padding: 14px;
  background: #f6f4ee;
  border: 1px solid var(--line);
  border-radius: 8px;
}

:root[data-theme="dark"] .signal-strip div {
  background: #101614;
}

.signal-strip span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
}

.signal-strip strong {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  line-height: 1.15;
}

.result-block {
  display: grid;
  gap: 8px;
}

.result-block > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
  text-transform: uppercase;
}

.result-block p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.preview-cta-box {
  display: grid;
  gap: 4px;
  padding: 16px;
  color: #ffffff;
  background: var(--teal);
  border-radius: 8px;
}

.preview-cta-box span {
  font-size: 30px;
  font-weight: 860;
  line-height: 1;
}

.preview-cta-box p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
}

ul {
  margin: 0;
  padding-left: 20px;
}

li + li {
  margin-top: 6px;
}

.offer-section {
  background: #f1efe8;
}

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

.offer-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 300px;
  padding: 24px;
}

.offer-card p {
  margin: 0;
  color: var(--muted);
}

.plan-label {
  width: fit-content;
  padding: 6px 9px;
  color: var(--teal-dark);
  background: var(--blue-soft);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.price {
  color: var(--teal);
  font-size: 40px;
  font-weight: 860;
  line-height: 1;
}

.primary-offer {
  border-color: rgba(18, 79, 89, 0.35);
  box-shadow: 0 18px 44px rgba(18, 79, 89, 0.15);
}

.offer-card .button {
  margin-top: auto;
}

.provider-list {
  display: grid;
  border-top: 1px solid var(--line);
}

.provider-row {
  display: grid;
  grid-template-columns: minmax(220px, 0.42fr) minmax(0, 1fr);
  gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.provider-row strong {
  font-size: 19px;
}

.provider-row span {
  color: var(--muted);
}

.boundary-section {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
  gap: 28px;
  color: #ffffff;
  background: var(--teal-dark);
}

.boundary-section .eyebrow {
  color: #9bd0be;
}

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

.boundary-grid div {
  padding: 22px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
}

.boundary-grid h3 {
  margin-bottom: 12px;
}

.sources-section {
  background: #ffffff;
}

.latest-insights-section {
  background: var(--paper);
}

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

.sources-section h2 {
  max-width: 760px;
  margin-bottom: 18px;
}

.sources-section a {
  color: var(--teal);
  font-weight: 700;
}

.content-hero {
  display: grid;
  gap: 18px;
  padding: 74px 48px 44px;
  background:
    linear-gradient(120deg, rgba(18, 79, 89, 0.08), rgba(201, 135, 36, 0.12)),
    var(--paper);
}

.content-hero > * {
  max-width: 900px;
}

.content-hero p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 19px;
}

.insights-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding: 42px 48px 80px;
  background: var(--paper);
}

.insight-card {
  display: grid;
  gap: 14px;
  min-height: 330px;
  padding: 24px;
  color: inherit;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 10px 32px rgba(23, 24, 28, 0.07);
  text-decoration: none;
}

.insight-card span {
  width: fit-content;
  color: var(--green);
  font-size: 12px;
  font-weight: 820;
  text-transform: uppercase;
}

.insight-card p {
  margin: 0;
  color: var(--muted);
}

.insight-card strong {
  margin-top: auto;
  color: var(--teal);
}

.article-page {
  display: grid;
  justify-items: center;
  padding: 58px 48px 82px;
  background: var(--paper);
}

.article-body {
  width: min(860px, 100%);
  padding: 34px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 10px 32px rgba(23, 24, 28, 0.07);
}

.article-body h1 {
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1;
}

.article-body h2 {
  margin-top: 34px;
  font-size: 30px;
}

.article-body p,
.article-body li {
  color: var(--muted);
  font-size: 17px;
}

.article-body a {
  color: var(--teal);
  font-weight: 720;
}

.article-cta {
  display: grid;
  gap: 14px;
  margin-top: 34px;
  padding: 22px;
  background: var(--blue-soft);
  border: 1px solid rgba(18, 79, 89, 0.2);
  border-radius: 8px;
}

.article-cta p {
  margin: 0;
}

.intake-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.78fr);
  gap: 24px;
  align-items: start;
  padding: 58px 48px 82px;
  background: var(--paper);
}

.intake-copy,
.intake-form,
.intake-summary {
  min-width: 0;
}

.intake-copy {
  display: grid;
  gap: 18px;
}

.intake-copy p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

.intake-form,
.intake-summary {
  display: grid;
  gap: 18px;
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 10px 32px rgba(23, 24, 28, 0.07);
}

.intake-form fieldset {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.intake-form label {
  display: grid;
  gap: 8px;
}

.intake-form textarea,
.intake-form input[type="email"],
.intake-form input[type="tel"] {
  width: 100%;
  min-height: 46px;
  padding: 12px;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid #cdd2d5;
  border-radius: 7px;
  font: inherit;
}

.intake-form textarea {
  min-height: 112px;
  resize: vertical;
}

.intake-summary {
  position: sticky;
  top: 92px;
}

.intake-summary pre {
  min-height: 260px;
  max-height: 520px;
  margin: 0;
  padding: 16px;
  overflow: auto;
  color: var(--ink);
  background: var(--blue-soft);
  border: 1px solid rgba(18, 79, 89, 0.2);
  border-radius: 8px;
  font: 13px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
}

.thank-you-page {
  display: grid;
  justify-items: center;
  padding: 78px 48px;
  background: var(--paper);
}

.thank-you-panel {
  display: grid;
  gap: 18px;
  width: min(860px, 100%);
  padding: 34px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.thank-you-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

.status-steps {
  display: grid;
  gap: 12px;
  padding: 0;
  list-style: none;
}

.status-steps li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px;
  background: var(--blue-soft);
  border: 1px solid rgba(18, 79, 89, 0.18);
  border-radius: 8px;
}

.status-steps span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  color: #ffffff;
  background: var(--teal);
  border-radius: 50%;
  font-weight: 820;
}

.guided-page {
  padding: 58px 48px 82px;
  background: var(--paper);
}

.guided-shell {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.guided-sidebar,
.guided-card,
.guided-review {
  min-width: 0;
}

.guided-sidebar {
  display: grid;
  gap: 18px;
  padding: 26px 0;
}

.guided-sidebar p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

.guided-sidebar h1 {
  font-size: clamp(38px, 6vw, 68px);
}

.guided-status {
  display: grid;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 740;
}

.progress-track {
  width: 100%;
  height: 10px;
  overflow: hidden;
  background: var(--blue-soft);
  border: 1px solid rgba(18, 79, 89, 0.16);
  border-radius: 999px;
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--teal);
  border-radius: inherit;
  transition: width 180ms ease;
}

.guided-card,
.guided-review {
  display: grid;
  gap: 22px;
  min-height: 520px;
  padding: 30px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.guided-question {
  display: grid;
  gap: 8px;
}

.guided-question label {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.08;
}

.guided-question p {
  margin: 0;
  color: var(--muted);
}

#question-control {
  display: grid;
  gap: 14px;
}

#question-control input,
#question-control textarea {
  width: 100%;
  min-height: 54px;
  padding: 14px;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid #cdd2d5;
  border-radius: 8px;
  font: inherit;
  font-size: 17px;
}

#question-control textarea {
  min-height: 180px;
  resize: vertical;
}

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

.choice-button {
  min-height: 56px;
  padding: 14px;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-weight: 720;
  text-align: left;
  cursor: pointer;
}

.choice-button:hover,
.choice-button.is-selected {
  color: #ffffff;
  background: var(--teal);
  border-color: var(--teal);
}

.guided-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: auto;
}

.guided-actions .button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.guided-review dl {
  display: grid;
  grid-template-columns: minmax(180px, 0.42fr) minmax(0, 1fr);
  gap: 12px 18px;
  margin: 0;
}

.guided-review dt {
  color: var(--muted);
  font-weight: 760;
}

.guided-review dd {
  margin: 0;
  color: var(--ink);
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 26px 48px;
  color: var(--muted);
  background: #ffffff;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.site-footer a {
  color: var(--teal);
  font-weight: 720;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.legal-page {
  display: grid;
  justify-items: center;
  padding: 72px 48px;
  background: #ffffff;
}

.legal-page section {
  width: min(840px, 100%);
}

.legal-page h1 {
  margin-bottom: 18px;
  font-size: clamp(38px, 6vw, 68px);
}

.legal-page h2 {
  margin-top: 34px;
  font-size: 26px;
}

.legal-page p {
  color: var(--muted);
  font-size: 17px;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 40;
  max-width: min(420px, calc(100vw - 48px));
  padding: 14px 16px;
  color: #ffffff;
  background: var(--teal-dark);
  border-radius: 8px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1040px) {
  .hero-section,
  .workspace,
  .boundary-section,
  .intake-page {
    grid-template-columns: 1fr;
  }

  .decision-preview {
    min-height: auto;
  }

  .results-panel {
    position: static;
  }

  .intake-summary {
    position: static;
  }
}

@media (max-width: 760px) {
  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
    min-height: auto;
    padding: 18px;
  }

  nav {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 13px;
  }

  .hero-section,
  .workspace-section,
  .included-section,
  .offer-section,
  .providers-section,
  .latest-insights-section,
  .boundary-section,
  .sources-section {
    padding: 42px 18px;
  }

  .hero-section {
    min-height: auto;
  }

  h1 {
    font-size: 34px;
    max-width: 100%;
    line-height: 1.07;
  }

  h2 {
    font-size: 30px;
  }

  .lead {
    font-size: 17px;
  }

  .hero-actions .button,
  .form-actions .button {
    width: 100%;
  }

  .decision-preview,
  .intake-panel,
  .results-panel,
  .offer-card,
  .boundary-grid div {
    border-radius: 8px;
  }

  .form-grid,
  .compact-checks,
  .signal-strip,
  .included-grid,
  .offer-grid,
  .boundary-grid,
  .metric-grid,
  .preview-footer,
  .insights-grid,
  .latest-insights-grid {
    grid-template-columns: 1fr;
  }

  .decision-steps div {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .decision-steps p {
    grid-column: 2;
  }

  .provider-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .site-footer {
    padding: 24px 18px;
  }

  .legal-page {
    padding: 42px 18px;
  }

  .content-hero,
  .insights-grid,
  .article-page {
    padding: 42px 18px;
  }

  .article-body {
    padding: 22px;
  }

  .intake-page,
  .guided-page,
  .thank-you-page {
    padding: 42px 18px;
  }

  .thank-you-panel,
  .intake-form,
  .intake-summary,
  .guided-card,
  .guided-review {
    padding: 22px;
  }

  .guided-shell,
  .choice-grid,
  .guided-review dl {
    grid-template-columns: 1fr;
  }

  .guided-card,
  .guided-review {
    min-height: auto;
  }

  .guided-actions .button {
    flex: 1 1 100%;
  }
}
