:root {
  --ink: #171815;
  --ink-soft: #252720;
  --forest: #293227;
  --cream: #f4f0e7;
  --paper: #fbf9f4;
  --gold: #c7a86b;
  --gold-dark: #8a6a34;
  --muted: #6f716a;
  --line: rgba(28, 31, 25, 0.15);
  --danger: #a34335;
  --shadow: 0 28px 80px rgba(14, 16, 12, 0.24);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 14% 12%, rgba(199, 168, 107, 0.16), transparent 25rem),
    linear-gradient(135deg, #181a16 0%, #2b3028 55%, #151713 100%);
  font-family: "Segoe UI", Arial, sans-serif;
  min-height: 100vh;
}

button, input, textarea { font: inherit; }
button { cursor: pointer; }

.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
  left: 1rem;
  top: 1rem;
  z-index: 100;
  color: var(--ink);
  background: var(--cream);
  border-radius: 0.25rem;
}
.skip-link:focus {
  position: fixed;
  width: auto;
  height: auto;
  padding: 0.75rem 1rem;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

.site-header {
  width: min(1180px, calc(100% - 40px));
  min-height: 94px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand img {
  display: block;
  width: 190px;
  max-height: 58px;
  object-fit: contain;
  object-position: left center;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.28));
}

.preview-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: #f5f1e8;
  font-size: 0.76rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.preview-pill span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 5px rgba(199, 168, 107, 0.12);
}

.planner-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

#app {
  min-height: 680px;
  background: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.landing {
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(380px, 0.97fr);
  min-height: 680px;
}

.landing-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(3rem, 7vw, 7rem);
  background: var(--cream);
}

.eyebrow {
  margin: 0 0 1.15rem;
  color: var(--gold-dark);
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

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

h1, h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: -0.035em;
}

h1 {
  margin-bottom: 1.4rem;
  max-width: 690px;
  font-size: clamp(3rem, 6vw, 5.85rem);
  line-height: 0.98;
}

.landing-copy > p:not(.eyebrow) {
  max-width: 590px;
  margin-bottom: 2rem;
  color: #575a52;
  font-size: 1.08rem;
  line-height: 1.7;
}

.landing-visual {
  position: relative;
  min-height: 520px;
  background:
    linear-gradient(180deg, rgba(12, 15, 10, 0.06), rgba(12, 15, 10, 0.58)),
    url("../images/UltimateBackyardPage_Function-scaled-1920x1280.webp") center / cover;
}

.visual-note {
  position: absolute;
  left: 2rem;
  right: 2rem;
  bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  color: white;
  font-size: 0.75rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.visual-note::before {
  content: "";
  width: 42px;
  height: 1px;
  background: var(--gold);
}

.primary-button, .secondary-button, .text-button, .choice-card, .edit-button {
  border: 0;
}

.primary-button {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  min-height: 56px;
  padding: 0 1.55rem;
  color: #171815;
  background: var(--gold);
  font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: 2px;
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease;
}

.primary-button::after { content: "→"; font-size: 1.2rem; }
.primary-button:hover { transform: translateY(-2px); background: #d3b77f; }
.primary-button:focus-visible, .secondary-button:focus-visible, .text-button:focus-visible,
.choice-card:focus-visible, .edit-button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(199, 168, 107, 0.48);
  outline-offset: 3px;
}

.privacy-note {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 1.2rem 0 0;
  color: #73766e;
  font-size: 0.79rem;
}
.privacy-note svg { width: 16px; height: 16px; }

.step-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  min-height: 680px;
}

.step-rail {
  display: flex;
  flex-direction: column;
  padding: 2.4rem 2rem;
  color: #f2eee4;
  background:
    linear-gradient(180deg, rgba(24, 27, 22, 0.94), rgba(24, 27, 22, 0.98)),
    url("../images/UltimateBackyardPage_Function-scaled-1920x1280.webp") center / cover;
}

.rail-mark {
  width: 145px;
  margin-bottom: 4rem;
}

.rail-kicker {
  margin-bottom: 0.7rem;
  color: var(--gold);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.rail-count {
  margin-bottom: 1rem;
  font-family: Georgia, serif;
  font-size: 1.55rem;
}

.progress-track {
  width: 100%;
  height: 2px;
  background: rgba(255,255,255,0.17);
  overflow: hidden;
}

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

.rail-footnote {
  margin: auto 0 0;
  color: rgba(255,255,255,0.58);
  font-size: 0.73rem;
  line-height: 1.5;
}

.step-panel {
  display: flex;
  flex-direction: column;
  padding: clamp(2rem, 5vw, 4.5rem) clamp(1.4rem, 6vw, 6rem) 2.2rem;
}

.step-content { flex: 1; }

.step-content h2 {
  margin-bottom: 0.8rem;
  font-size: clamp(2.25rem, 4vw, 4rem);
  line-height: 1.04;
}

.step-intro {
  max-width: 690px;
  margin-bottom: 2rem;
  color: var(--muted);
  line-height: 1.6;
}

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

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

.choice-card {
  position: relative;
  min-height: 74px;
  padding: 1rem 3.2rem 1rem 1rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 3px;
  text-align: left;
  line-height: 1.35;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.choice-card:hover { transform: translateY(-1px); border-color: rgba(138, 106, 52, 0.6); }

.choice-card::after {
  content: "";
  position: absolute;
  right: 1rem;
  top: 50%;
  width: 19px;
  height: 19px;
  border: 1px solid #aaa99f;
  border-radius: 50%;
  transform: translateY(-50%);
}

.choice-card.multi::after { border-radius: 3px; }
.choice-card.selected { background: #f3ecdd; border-color: var(--gold-dark); }
.choice-card.selected::after {
  content: "✓";
  display: grid;
  place-items: center;
  color: white;
  background: var(--gold-dark);
  border-color: var(--gold-dark);
  font-size: 0.72rem;
}

.validation {
  margin: 1rem 0 0;
  color: var(--danger);
  font-size: 0.88rem;
  font-weight: 600;
}

.budget-note {
  margin: -0.8rem 0 1.5rem;
  padding-left: 0.8rem;
  color: #777269;
  border-left: 2px solid var(--gold);
  font-size: 0.82rem;
}

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

.field { display: grid; gap: 0.45rem; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.03em; }
.field label span { color: #7b7e76; font-weight: 400; }

.field input {
  width: 100%;
  min-height: 52px;
  padding: 0.75rem 0.85rem;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: 2px;
}

.followup-label { margin: 1.6rem 0 0.75rem; font-size: 0.78rem; font-weight: 700; }
.followup-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.step-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 2.2rem;
  border-top: 1px solid var(--line);
}

.text-button {
  min-height: 45px;
  padding: 0 0.5rem;
  color: #696b64;
  background: transparent;
  font-weight: 600;
}
.text-button::before { content: "←"; margin-right: 0.55rem; }

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin-bottom: 1.4rem;
}

.summary-card {
  min-height: 118px;
  padding: 1.1rem;
  background: white;
  border: 1px solid var(--line);
  border-radius: 3px;
}

.summary-card.wide { grid-column: 1 / -1; }
.summary-card-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.summary-card h3 {
  margin: 0;
  color: var(--gold-dark);
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.summary-card p { margin: 0.85rem 0 0; line-height: 1.5; }
.summary-card .muted-detail { color: var(--muted); font-size: 0.86rem; }

.edit-button {
  padding: 0.35rem 0;
  color: #54574f;
  background: transparent;
  border-bottom: 1px solid #b8a477;
  font-size: 0.74rem;
  font-weight: 700;
}

.review-disclosure {
  padding: 0.9rem 1rem;
  color: #686b63;
  background: #efe9dc;
  border-radius: 3px;
  font-size: 0.8rem;
  line-height: 1.5;
}

.consent-panel {
  display: grid;
  gap: 0.9rem;
  margin-top: 1rem;
  padding: 1rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 3px;
}

.consent-choice {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 0.75rem;
  align-items: start;
  color: #4f524b;
  font-size: 0.8rem;
  line-height: 1.55;
}

.consent-choice input {
  width: 20px;
  height: 20px;
  margin: 0.1rem 0 0;
  accent-color: var(--gold-dark);
}

.consent-links,
.submission-status {
  margin: 0;
  font-size: 0.8rem;
}

.consent-links a { color: var(--gold-dark); }
.submission-status { color: var(--danger); font-weight: 600; }
.primary-button:disabled { cursor: wait; opacity: 0.68; }

.completion {
  display: grid;
  place-items: center;
  min-height: 680px;
  padding: 2rem;
  text-align: center;
  background:
    linear-gradient(135deg, rgba(18, 21, 16, 0.96), rgba(35, 42, 32, 0.94)),
    url("../images/UltimateBackyardPage_Function-scaled-1920x1280.webp") center / cover;
  color: #f5f1e7;
}

.completion-inner { max-width: 650px; }
.completion-mark {
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  margin: 0 auto 1.7rem;
  color: var(--ink);
  background: var(--gold);
  border-radius: 50%;
  font-size: 1.65rem;
}
.completion h2 { margin-bottom: 1rem; font-size: clamp(2.7rem, 6vw, 5rem); }
.completion p { color: rgba(255,255,255,0.72); line-height: 1.65; }
.completion-boundary { font-size: 0.86rem; }
.completion-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}
.completion .primary-button { margin: 0; }
.completion .consultation-link::after { content: "↗"; }
.completion .restart-button { color: rgba(255,255,255,0.78); }
.native-submit {
  min-height: 760px;
  background: var(--paper);
}
.native-submit-head {
  padding: clamp(2rem, 5vw, 4rem);
  border-bottom: 1px solid var(--line);
}
.native-submit-head h2 {
  max-width: 820px;
  margin: 0 0 1rem;
  font-size: clamp(2.35rem, 5vw, 4.4rem);
}
.native-submit-head > p:not(.eyebrow) {
  max-width: 760px;
  color: var(--muted);
  line-height: 1.65;
}
.native-submit-head .text-button { margin-top: 1rem; }
.native-boundary { font-size: 0.86rem; }
.native-submit-frame {
  display: block;
  width: 100%;
  height: 720px;
  border: 0;
  background: #fff;
}

.site-footer {
  width: min(1180px, calc(100% - 40px));
  min-height: 100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: rgba(255,255,255,0.55);
  font-size: 0.75rem;
}
.site-footer p { margin: 0; }
.site-footer a { display: flex; align-items: center; gap: 0.65rem; color: inherit; text-decoration: none; }
.site-footer img { width: 78px; max-height: 26px; object-fit: contain; }
.noscript { padding: 2rem; }

@media (max-width: 900px) {
  .landing { grid-template-columns: 1fr; }
  .landing-copy { min-height: 530px; }
  .landing-visual { min-height: 360px; }
  .step-layout { grid-template-columns: 1fr; }
  .step-rail { display: block; padding: 1.2rem 1.4rem; }
  .rail-mark, .rail-footnote { display: none; }
  .rail-count { margin-bottom: 0.7rem; font-size: 1rem; }
  .rail-kicker { margin-bottom: 0.4rem; }
  .choice-grid.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .site-header, .planner-shell, .site-footer { width: min(100% - 24px, 1180px); }
  .site-header { min-height: 78px; }
  .brand img { width: 148px; max-height: 46px; }
  .preview-pill { font-size: 0; }
  .preview-pill::after { content: "Planner"; font-size: 0.67rem; }
  #app { min-height: calc(100vh - 156px); }
  .landing { min-height: calc(100vh - 156px); }
  .landing-copy { min-height: 500px; padding: 3rem 1.5rem; }
  .landing-visual { min-height: 260px; }
  h1 { font-size: clamp(2.65rem, 14vw, 4.1rem); }
  .step-layout { min-height: calc(100vh - 156px); }
  .step-panel { padding: 2.4rem 1.25rem 1.2rem; }
  .step-content h2 { font-size: 2.45rem; }
  .choice-grid, .choice-grid.compact, .field-grid, .summary-grid { grid-template-columns: 1fr; }
  .followup-grid { grid-template-columns: 1fr; }
  .summary-card.wide, .field.full { grid-column: auto; }
  .step-actions { position: sticky; bottom: 0; margin: 1.5rem -1.25rem -1.2rem; padding: 1rem 1.25rem; background: rgba(251, 249, 244, 0.96); backdrop-filter: blur(10px); }
  .step-actions .primary-button { min-height: 50px; }
  .site-footer { min-height: 116px; align-items: flex-start; justify-content: center; flex-direction: column; padding: 1.2rem 0; }
}

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