:root {
  color-scheme: light;
  --ink: #24211f;
  --muted: #6f6760;
  --line: #ded6cd;
  --paper: #fbfaf8;
  --surface: #ffffff;
  --rose: #b76366;
  --moss: #68765b;
  --clay: #c48f64;
  --focus: #2d5b86;
  --shadow: 0 18px 50px rgba(42, 35, 28, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

.page-header {
  background:
    linear-gradient(135deg, rgba(183, 99, 102, 0.14), transparent 36%),
    linear-gradient(220deg, rgba(104, 118, 91, 0.16), transparent 42%),
    var(--paper);
  border-bottom: 1px solid var(--line);
}

.topbar {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1160px;
  padding: 20px;
}

.brand,
.topbar-link {
  align-items: center;
  color: var(--ink);
  display: inline-flex;
  gap: 10px;
  text-decoration: none;
}

.brand {
  font-weight: 760;
}

.brand-mark {
  align-items: center;
  background: var(--ink);
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  height: 38px;
  justify-content: center;
  letter-spacing: 0;
  width: 38px;
}

.topbar-link {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
}

.hero {
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  margin: 0 auto;
  max-width: 1160px;
  padding: 70px 20px 84px;
}

.hero-copy h1 {
  font-size: clamp(2.2rem, 5vw, 4.9rem);
  letter-spacing: 0;
  line-height: 0.98;
  margin: 0;
  max-width: 980px;
}

.hero-copy p:not(.context) {
  color: var(--muted);
  font-size: 1.14rem;
  margin: 24px 0 0;
  max-width: 700px;
}

.context {
  color: var(--rose);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin: 0 0 18px;
  text-transform: uppercase;
}

.summary-panel {
  align-self: end;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 24px;
}

.summary-panel h2,
.summary-panel p {
  margin-top: 0;
}

.summary-panel p,
.summary-panel li {
  color: var(--muted);
}

.summary-panel ul {
  margin: 18px 0 0;
  padding-left: 20px;
}

main {
  margin: 0 auto;
  max-width: 1160px;
  padding: 44px 20px 72px;
}

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

.form-section,
.result {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(42, 35, 28, 0.06);
  padding: 26px;
}

.section-heading {
  align-items: flex-start;
  display: flex;
  gap: 16px;
  margin-bottom: 22px;
}

.section-number {
  background: var(--moss);
  border-radius: 999px;
  color: #fff;
  flex: 0 0 auto;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 8px 10px;
}

h2 {
  font-size: 1.32rem;
  letter-spacing: 0;
  line-height: 1.2;
  margin: 0;
}

.section-heading p,
.result p {
  color: var(--muted);
  margin: 6px 0 0;
}

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

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

.wide,
fieldset {
  grid-column: 1 / -1;
}

label,
fieldset {
  color: var(--ink);
  display: grid;
  font-size: 0.95rem;
  font-weight: 720;
  gap: 8px;
}

fieldset {
  border: 1px solid var(--line);
  border-radius: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 18px;
}

legend {
  color: var(--ink);
  font-weight: 800;
  padding: 0 8px;
}

.choice {
  align-items: center;
  background: #f7f4ef;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  display: flex;
  font-weight: 650;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
}

.choice:has(input:checked) {
  background: rgba(183, 99, 102, 0.12);
  border-color: rgba(183, 99, 102, 0.32);
  color: var(--ink);
}

input,
select,
textarea {
  background: #fff;
  border: 1px solid #cfc5bb;
  border-radius: 8px;
  color: var(--ink);
  min-height: 46px;
  outline: none;
  padding: 11px 12px;
  width: 100%;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 4px rgba(45, 91, 134, 0.12);
}

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

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
  padding: 6px 0 0;
}

button {
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  min-height: 48px;
  padding: 12px 18px;
}

button.secondary {
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
}

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

.result {
  margin-top: 32px;
}

pre {
  background: #28231f;
  border-radius: 8px;
  color: #f7f1e9;
  margin: 20px 0 0;
  max-height: 520px;
  overflow: auto;
  padding: 18px;
  white-space: pre-wrap;
  word-break: break-word;
}

@media (max-width: 820px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero,
  .field-grid,
  .field-grid.two,
  fieldset {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 42px;
  }

  .hero-copy h1 {
    font-size: 2.35rem;
    line-height: 1.05;
  }

  .form-section,
  .result {
    padding: 20px;
  }

  .section-heading {
    display: grid;
  }

  .form-actions {
    justify-content: stretch;
  }

  button {
    flex: 1 1 100%;
  }
}
