:root {
  color-scheme: light;
  --forest: #18392f;
  --forest-deep: #0d2922;
  --moss: #65806d;
  --sage: #b9c8b4;
  --sea: #5c8f98;
  --clay: #c86e48;
  --sand: #eee8da;
  --paper: #f8f6f0;
  --ink: #17231f;
  --muted: #64706b;
  --line: rgba(24, 57, 47, .14);
  --soft-line: rgba(24, 57, 47, .09);
  --shadow: 0 24px 70px rgba(20, 47, 38, .13);
}

* { box-sizing: border-box; }

html { min-width: 320px; }

body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 88% 10%, rgba(185, 200, 180, .2), transparent 24rem),
    var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button { color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  background: white;
  transform: translateY(-150%);
}

.skip-link:focus { transform: translateY(0); }

.app-header {
  min-height: 74px;
  padding: 0 clamp(20px, 4vw, 64px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(248, 246, 240, .88);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--forest);
  font-size: 15px;
  font-weight: 760;
  letter-spacing: -.025em;
  text-decoration: none;
}

.brand-mark { width: 32px; height: 32px; overflow: visible; }
.brand-mark path:first-child { fill: var(--forest); }
.brand-mark path:nth-child(2) { fill: var(--paper); }
.brand-mark path:last-child { fill: none; stroke: var(--forest); stroke-width: 1.5; }

.app-header-tools { display: flex; align-items: center; gap: 16px; }
.workspace-name { color: var(--muted); font-size: 12px; font-weight: 650; }
.prototype-badge {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--forest);
  background: rgba(255,255,255,.55);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

main { flex: 1; }

.start-view,
.confirm-view {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(56px, 8vw, 100px) 0 96px;
}

.start-intro { max-width: 700px; }
.eyebrow {
  margin: 0 0 15px;
  color: var(--clay);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 18px;
  color: var(--forest-deep);
  font: 400 clamp(44px, 5vw, 66px)/1 Georgia, "Times New Roman", serif;
  letter-spacing: -.045em;
}

.start-intro > p:last-child,
.confirm-heading > p:last-child {
  max-width: 660px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

.start-layout {
  margin-top: 50px;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, .78fr);
  gap: 22px;
  align-items: start;
}

.project-card,
.option-card,
.trust-card,
.parcel-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.78);
  box-shadow: 0 16px 55px rgba(20, 47, 38, .06);
}

.project-card { padding: clamp(26px, 4vw, 42px); }

.card-heading {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: start;
}

.step-number {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--forest);
  color: white;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
}

.card-heading h2,
.option-card h2,
.parcel-card h2,
.studio-sidebar h2 {
  margin-bottom: 8px;
  color: var(--forest-deep);
  font: 400 27px/1.1 Georgia, "Times New Roman", serif;
  letter-spacing: -.025em;
}

.card-heading p,
.option-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }

.search-tabs {
  width: fit-content;
  margin: 34px 0 24px 56px;
  padding: 4px;
  display: flex;
  gap: 3px;
  border-radius: 9px;
  background: #eceee9;
}

.search-tab {
  min-height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #69736f;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.search-tab.is-active {
  background: white;
  color: var(--forest);
  box-shadow: 0 2px 8px rgba(24,57,47,.09);
}

.property-search { margin-left: 56px; }
.property-search label {
  display: block;
  margin-bottom: 8px;
  color: var(--forest);
  font-size: 11px;
  font-weight: 750;
}

.search-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; }

.search-row input {
  width: 100%;
  min-height: 49px;
  padding: 0 15px;
  border: 1px solid rgba(24,57,47,.22);
  border-radius: 9px;
  outline: 0;
  background: white;
  color: var(--ink);
  font-size: 14px;
  transition: border-color .2s, box-shadow .2s;
}

.search-row input:focus {
  border-color: var(--moss);
  box-shadow: 0 0 0 4px rgba(101,128,109,.12);
}

.search-row input::placeholder { color: #9aa39e; }

.primary-button,
.secondary-button,
.text-button {
  border-radius: 9px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 760;
}

.primary-button {
  min-height: 45px;
  padding: 0 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid var(--forest);
  background: var(--forest);
  color: white;
  box-shadow: 0 9px 21px rgba(24,57,47,.16);
  transition: transform .18s, background .18s;
}

.primary-button:hover:not(:disabled) { transform: translateY(-1px); background: var(--forest-deep); }
.primary-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.primary-button:disabled { cursor: not-allowed; opacity: .42; }

.secondary-button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.8);
  color: var(--forest);
}
.secondary-button:hover:not(:disabled) { background: white; border-color: rgba(24,57,47,.28); }
.secondary-button:disabled { cursor: not-allowed; opacity: .5; }
.wide { width: 100%; }

.field-help { margin: 8px 0 0; color: #87918c; font-size: 10px; }
.form-message { min-height: 17px; margin: 7px 0 0; color: #a94f32; font-size: 11px; }
.form-message.is-loading { color: var(--moss); }

.search-results {
  margin: 22px 0 0 56px;
  border-top: 1px solid var(--soft-line);
  padding-top: 14px;
}

.results-label { margin: 0 0 8px; color: #87918c; font-size: 9px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.result-list { display: grid; gap: 5px; }
.result-button {
  width: 100%;
  padding: 12px 13px;
  display: flex;
  align-items: center;
  gap: 13px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  cursor: pointer;
  text-align: left;
}
.result-button:hover,
.result-button:focus-visible { border-color: var(--line); background: #f4f4ef; outline: 0; }
.result-pin { width: 27px; height: 27px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: #e9eee8; color: var(--forest); }
.result-pin svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.result-main { min-width: 0; }
.result-main strong { display: block; overflow: hidden; color: var(--forest-deep); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.result-main span { display: block; margin-top: 3px; color: #78827d; font-size: 10px; }
.result-chevron { width: 15px; height: 15px; margin-left: auto; fill: none; stroke: #8c9691; stroke-width: 1.8; }

.start-options { display: grid; gap: 16px; }
.option-card { min-height: 190px; padding: 27px; display: grid; grid-template-columns: 54px 1fr; gap: 17px; }
.option-icon { width: 52px; height: 52px; position: relative; border-radius: 12px; background: #e9eee8; }
.survey-icon span { position: absolute; border: 1.5px solid var(--forest); background: transparent; }
.survey-icon span:first-child { inset: 13px 11px 11px 14px; transform: rotate(-5deg); }
.survey-icon span:nth-child(2) { width: 16px; left: 20px; top: 20px; }
.survey-icon span:last-child { width: 12px; left: 20px; top: 27px; }
.option-status { color: var(--clay); font-size: 9px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.option-card h2 { margin-top: 8px; font-size: 22px; }
.trust-card { padding: 25px 27px; background: var(--sand); }
.trust-card strong { color: var(--forest); font-size: 12px; }
.trust-card p { margin: 9px 0 14px; color: #69736f; font-size: 11px; line-height: 1.55; }
.trust-card a { color: var(--forest); font-size: 10px; font-weight: 750; text-underline-offset: 3px; }

.confirm-view { padding-top: 50px; }
.confirm-heading { max-width: 650px; }
.confirm-heading h1 { font-size: clamp(38px, 4vw, 56px); }
.text-button { margin: 0 0 30px; padding: 0; display: inline-flex; gap: 7px; align-items: center; border: 0; background: transparent; color: var(--muted); }
.text-button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.text-button:hover { color: var(--forest); }

.confirm-grid { margin-top: 40px; display: grid; grid-template-columns: minmax(0, 1.55fr) 340px; gap: 20px; }
.map-frame { position: relative; overflow: hidden; background: #eef0e9; }
.preview-map { min-height: 500px; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.parcel-card { padding: 28px; }
.parcel-heading { padding-bottom: 23px; border-bottom: 1px solid var(--soft-line); }
.parcel-heading > span { color: var(--clay); font-size: 9px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.parcel-heading h2 { margin: 10px 0 5px; font-size: 25px; }
.parcel-heading p { margin: 0; color: var(--muted); font-size: 11px; }
.parcel-facts, .sidebar-facts { margin: 0; }
.parcel-facts > div, .sidebar-facts > div { padding: 12px 0; display: flex; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--soft-line); }
.parcel-facts dt, .sidebar-facts dt { color: #7d8782; font-size: 10px; }
.parcel-facts dd, .sidebar-facts dd { margin: 0; color: var(--forest); font-size: 10px; font-weight: 720; text-align: right; }
.accuracy-note { margin: 20px 0; padding: 13px; display: grid; grid-template-columns: 22px 1fr; gap: 10px; border-radius: 10px; background: #f5ede7; color: #76513e; }
.accuracy-note svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.accuracy-note p { margin: 0; font-size: 10px; line-height: 1.5; }
.accuracy-note strong { display: block; }
.parcel-card .secondary-button { margin-top: 8px; }

.studio-view { height: calc(100vh - 74px); min-height: 650px; display: flex; flex-direction: column; background: #e8eae4; }
.studio-toolbar { min-height: 66px; padding: 0 22px; display: flex; align-items: center; gap: 26px; border-bottom: 1px solid var(--line); background: white; }
.toolbar-label { display: block; margin-bottom: 3px; color: #8a948f; font-size: 8px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.studio-toolbar strong { color: var(--forest); font-size: 13px; }
.toolbar-status { margin-left: auto; display: flex; align-items: center; gap: 7px; color: #5f7265; font-size: 10px; }
.toolbar-status span { width: 7px; height: 7px; border-radius: 50%; background: #78a276; box-shadow: 0 0 0 4px rgba(120,162,118,.12); }
.toolbar-actions { display: flex; gap: 8px; }
.toolbar-actions .primary-button { min-height: 40px; }

.studio-shell { min-height: 0; flex: 1; display: grid; grid-template-columns: 268px minmax(0, 1fr); }
.studio-sidebar { overflow: auto; border-right: 1px solid var(--line); background: #f8f7f2; }
.sidebar-section { padding: 23px; border-bottom: 1px solid var(--soft-line); }
.sidebar-kicker { margin: 0 0 10px; color: var(--clay); font-size: 8px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.studio-sidebar h2 { margin-bottom: 8px; font-size: 21px; }
.source-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 999px; background: #eee7df; color: #75513f; font-size: 8px; font-weight: 750; }
.source-pill i { width: 5px; height: 5px; border-radius: 50%; background: var(--clay); }
.sidebar-facts { margin-top: 20px; }
.layer-row { min-height: 41px; display: flex; align-items: center; justify-content: space-between; gap: 15px; border-bottom: 1px solid var(--soft-line); color: #54625c; font-size: 10px; }
.layer-row > span { display: flex; align-items: center; gap: 8px; }
.layer-row input { accent-color: var(--forest); }
.layer-row.is-muted { color: #a0a7a3; }
.layer-swatch { width: 17px; height: 4px; border-radius: 3px; }
.parcel-swatch { background: var(--forest); }
.setback-swatch { height: 0; border-top: 2px dashed var(--clay); }
.contour-swatch { height: 0; border-top: 2px solid var(--sea); }
.next-section h3 { margin: 0 0 7px; color: var(--forest); font: 400 18px Georgia, serif; }
.next-section > p:not(.sidebar-kicker) { color: var(--muted); font-size: 10px; line-height: 1.5; }

.workspace { min-width: 0; min-height: 0; position: relative; padding: 18px; display: flex; flex-direction: column; }
.workspace-map { min-height: 0; flex: 1; border: 1px solid rgba(24,57,47,.12); border-radius: 13px; background: #f2f1eb; box-shadow: 0 13px 40px rgba(24,57,47,.08); }
.workspace-controls { position: absolute; z-index: 4; top: 31px; left: 31px; padding: 4px; display: flex; align-items: center; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.92); box-shadow: 0 6px 20px rgba(24,57,47,.1); }
.workspace-controls button { min-width: 32px; height: 30px; border: 0; border-radius: 6px; background: transparent; cursor: pointer; color: var(--forest); font-size: 12px; font-weight: 750; }
.workspace-controls button:hover { background: #edf0eb; }
.workspace-controls span { min-width: 48px; color: var(--muted); font-size: 9px; text-align: center; }
.north-arrow { position: absolute; z-index: 4; top: 31px; right: 32px; width: 45px; padding: 7px 7px 5px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.92); color: var(--forest); text-align: center; box-shadow: 0 6px 20px rgba(24,57,47,.1); }
.north-arrow span { display: block; font: 700 12px Georgia, serif; }
.north-arrow svg { width: 24px; height: 31px; }
.north-arrow svg path:first-child { fill: var(--forest); stroke: var(--forest); stroke-width: 1.2; }
.north-arrow svg path:last-child { fill: none; stroke: white; stroke-width: 1.2; }
.map-source-line { margin: 9px 4px 0; color: #7e8883; font-size: 8px; line-height: 1.35; }

.parcel-map { display: block; width: 100%; height: 100%; }
.map-background { fill: #f2f1eb; }
.map-grid-minor { stroke: #dfe2da; stroke-width: .55; vector-effect: non-scaling-stroke; }
.map-grid-major { stroke: #d2d7ce; stroke-width: .85; vector-effect: non-scaling-stroke; }
.map-parcel-shadow { fill: rgba(24,57,47,.12); }
.map-parcel-fill { fill: rgba(255,255,255,.76); stroke: var(--forest); stroke-width: 3; vector-effect: non-scaling-stroke; }
.map-parcel-fill.is-hidden { fill: rgba(255,255,255,.3); stroke: transparent; }
.map-center-mark { fill: var(--clay); stroke: white; stroke-width: 2; vector-effect: non-scaling-stroke; }
.map-label-box { fill: rgba(255,255,255,.94); stroke: rgba(24,57,47,.15); stroke-width: 1; vector-effect: non-scaling-stroke; }
.map-label-title { fill: var(--forest); font: 700 11px Inter, sans-serif; text-anchor: middle; }
.map-label-subtitle { fill: #77817c; font: 9px Inter, sans-serif; text-anchor: middle; }
.map-scale-line { stroke: var(--forest); stroke-width: 2; vector-effect: non-scaling-stroke; }
.map-scale-text { fill: var(--forest); font: 700 9px Inter, sans-serif; text-anchor: middle; }
.map-watermark { fill: #a5ada8; font: 8px Inter, sans-serif; letter-spacing: .08em; }
.map-loading { height: 100%; display: grid; place-items: center; color: var(--muted); font-size: 12px; }

.app-footer { min-height: 54px; padding: 0 clamp(20px, 4vw, 64px); display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); color: #7a847f; font-size: 9px; }
.app-footer a { color: var(--forest); text-underline-offset: 3px; }
body.studio-is-open .app-footer { display: none; }

@media (max-width: 880px) {
  .start-layout, .confirm-grid { grid-template-columns: 1fr; }
  .start-options { grid-template-columns: 1fr 1fr; }
  .preview-map { min-height: 430px; }
  .studio-shell { grid-template-columns: 224px minmax(0, 1fr); }
}

@media (max-width: 680px) {
  .app-header { min-height: 64px; }
  .workspace-name { display: none; }
  .start-view, .confirm-view { width: min(100% - 28px, 1180px); padding-top: 48px; }
  .start-layout { margin-top: 34px; }
  .start-options { grid-template-columns: 1fr; }
  .card-heading { grid-template-columns: 1fr; }
  .step-number { display: none; }
  .search-tabs, .property-search, .search-results { margin-left: 0; }
  .search-row { grid-template-columns: 1fr; }
  .search-row .primary-button { width: 100%; }
  .preview-map { min-height: 350px; }
  .studio-view { height: auto; min-height: calc(100vh - 64px); }
  .studio-toolbar { min-height: 70px; padding: 10px 14px; flex-wrap: wrap; }
  .toolbar-status { display: none; }
  .toolbar-actions { margin-left: auto; }
  .studio-shell { display: flex; flex-direction: column; }
  .studio-sidebar { overflow: visible; border-right: 0; border-bottom: 1px solid var(--line); }
  .studio-sidebar .layers-section, .studio-sidebar .next-section { display: none; }
  .sidebar-section { padding: 15px; }
  .sidebar-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
  .workspace { min-height: 520px; padding: 10px; }
  .workspace-controls { top: 22px; left: 22px; }
  .north-arrow { top: 22px; right: 22px; }
  .app-footer { align-items: flex-start; flex-direction: column; justify-content: center; gap: 3px; }
}

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