/* Your NM Casita — modern southwestern, warm paper, one accent that earns it. */

:root {
  --sand: #f3ece0;
  --paper: #fbf7f0;
  --paper-2: #f7f1e6;
  --ink: #241d16;
  --ink-2: #4a3f34;
  --ink-3: #7b6d5c;
  --line: #ded3c2;
  --line-2: #cbbda7;
  --clay: #b4552f;
  --clay-deep: #90401f;
  --clay-wash: #f6e5db;
  --sage: #6f7d63;
  --night: #201b16;
  --night-2: #2c251e;
  --shadow-sm: 0 1px 2px rgba(50, 36, 20, .07), 0 2px 8px rgba(50, 36, 20, .05);
  --shadow-md: 0 2px 6px rgba(50, 36, 20, .08), 0 12px 32px rgba(50, 36, 20, .1);
  --shadow-lg: 0 4px 12px rgba(50, 36, 20, .1), 0 30px 70px rgba(50, 36, 20, .16);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Inter, Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --nav-h: 66px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--sand);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; letter-spacing: -.012em; margin: 0; }
h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); line-height: 1.02; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); line-height: 1.1; }
h3 { font-size: 1.28rem; line-height: 1.25; }
p { margin: 0 0 1em; }
a { color: inherit; }
button { font: inherit; color: inherit; }
svg { display: block; width: 100%; height: auto; }

:focus-visible { outline: 2px solid var(--clay); outline-offset: 2px; }

.wrap { width: min(1180px, 100% - 3rem); margin-inline: auto; }
.eyebrow {
  font-size: .72rem; font-weight: 650; letter-spacing: .17em; text-transform: uppercase;
  color: var(--clay); margin: 0 0 1rem;
}
.lede { font-size: clamp(1.05rem, 1.7vw, 1.24rem); color: var(--ink-2); max-width: 62ch; }
.muted { color: var(--ink-3); }
.tnum { font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ buttons */

.btn {
  display: inline-flex; align-items: center; gap: .55rem; justify-content: center;
  padding: .82rem 1.5rem; border-radius: 2px; border: 1px solid transparent;
  font-size: .93rem; font-weight: 600; letter-spacing: .01em; cursor: pointer;
  text-decoration: none; transition: background .16s, color .16s, border-color .16s, transform .12s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--clay); color: #fff; }
.btn-primary:hover { background: var(--clay-deep); }
.btn-ghost { border-color: var(--line-2); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); background: rgba(0, 0, 0, .03); }
.btn-dark { background: var(--ink); color: var(--paper); }
.btn-dark:hover { background: #000; }
.btn-lg { padding: 1rem 1.9rem; font-size: 1rem; }
.btn[disabled] { opacity: .45; pointer-events: none; }

/* ------------------------------------------------------------------ nav */

.nav {
  position: sticky; top: 0; z-index: 60; height: var(--nav-h);
  display: flex; align-items: center;
  background: rgba(243, 236, 224, .82); backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .2s, background .2s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 2rem; }
.brand {
  display: flex; align-items: center; gap: .6rem; text-decoration: none;
  font-weight: 700; font-size: .82rem; letter-spacing: .15em; text-transform: uppercase;
  margin-right: auto; cursor: pointer; background: none; border: 0; padding: 0;
}
.brand-mark { width: 26px; height: 26px; flex: none; }
.nav-links { display: flex; gap: 1.6rem; }
.nav-links button, .nav-links a {
  background: none; border: 0; cursor: pointer; padding: .2rem 0; text-decoration: none;
  font-size: .88rem; color: var(--ink-2); border-bottom: 1px solid transparent;
}
.nav-links button:hover, .nav-links a:hover { color: var(--ink); border-bottom-color: var(--clay); }

/* ------------------------------------------------------------------ hero */

.hero { padding: clamp(1.25rem, 3vw, 2.4rem) 0 0; overflow: hidden; }
.hero-grid { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 0.9fr 1.1fr; } }
.hero h1 em { font-style: normal; color: var(--clay); }
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.hero-art { position: relative; }

/* The blank the hero art used to sit under: who actually picks up the phone. */
.builder-card {
  margin-bottom: clamp(1.4rem, 3vw, 2.4rem);
  padding-left: 1.1rem; border-left: 3px solid var(--clay);
}
.builder-line {
  margin: 0; font-family: var(--serif); font-size: clamp(1.25rem, 2vw, 1.6rem);
  line-height: 1.15;
}
.builder-phone {
  display: inline-block; margin-top: .15rem; text-decoration: none;
  font-family: var(--serif); font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 1.1;
  color: var(--clay); font-variant-numeric: tabular-nums;
}
.builder-phone:hover { color: var(--clay-deep); }
.builder-cred {
  margin: .35rem 0 0; font-size: .82rem; letter-spacing: .04em; color: var(--ink-3);
  text-transform: uppercase; font-weight: 600; max-width: 42ch;
}
.hero-art .frame {
  background: linear-gradient(#e9f0f4, #f6ece0);
  border: 1px solid var(--line); box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.hero-note {
  margin-top: .9rem; font-size: .78rem; color: var(--ink-3);
  display: flex; justify-content: space-between; gap: 1rem; font-family: var(--mono);
}

.statband {
  margin-top: clamp(3rem, 7vw, 5rem); border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.statband .wrap { display: grid; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 760px) { .statband .wrap { grid-template-columns: repeat(4, 1fr); } }
.stat { padding: 1.6rem 1.2rem 1.6rem 0; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat b { display: block; font-family: var(--serif); font-size: 1.9rem; line-height: 1; }
.stat span { font-size: .8rem; color: var(--ink-3); display: block; margin-top: .5rem; }

/* ------------------------------------------------------------------ sections */

.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.section-dark { background: var(--night); color: #e9e0d2; }
.section-dark h2, .section-dark h3 { color: #f6efe2; }
.section-dark .muted, .section-dark .lede { color: #b0a595; }
.section-dark .eyebrow { color: #d08e5f; }
.section-head { max-width: 60ch; margin-bottom: clamp(2rem, 4vw, 3.2rem); }

/* ------------------------------------------------------------------ models */

.models { display: grid; gap: 1.4rem; }
/* Five cards, so the column counts are the ones that divide five without
   stranding a lone card on a row of its own: 1, 2 (3 + 2), 3 (3 + 2), then 5.
   A four-column row was right for four models and leaves an orphan now. */
@media (min-width: 700px) { .models { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1060px) { .models { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1480px) { .models { grid-template-columns: repeat(5, 1fr); } }
.model-card {
  background: var(--paper); border: 1px solid var(--line); display: flex; flex-direction: column;
  text-align: left; cursor: pointer; padding: 0; transition: box-shadow .2s, transform .2s, border-color .2s;
}
.model-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: var(--line-2); }
.model-card .art {
  background: linear-gradient(#e6eef3, #f3e9dc); border-bottom: 1px solid var(--line);
  aspect-ratio: 16 / 9; display: block; overflow: hidden;
}
.model-card .art svg { width: 100%; height: 100%; display: block; }
.model-card .body { padding: 1.25rem 1.3rem 1.4rem; display: flex; flex-direction: column; flex: 1; }
.model-card .top { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
.model-card .sf { font-family: var(--mono); font-size: .8rem; color: var(--ink-3); }
.model-card .tag { font-size: .82rem; color: var(--clay); margin: .15rem 0 .7rem; }
.model-card p { font-size: .88rem; color: var(--ink-2); line-height: 1.5; }
.model-card .foot {
  margin-top: auto; padding-top: .9rem; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: baseline;
  gap: .6rem; font-size: .78rem;
}
.model-card .foot span { color: var(--ink-3); }
.model-card .foot b {
  font-family: var(--serif); font-size: 1.02rem; font-weight: 400;
  white-space: nowrap; margin-left: auto; text-align: right;
}
.model-card .foot b small {
  display: block; font-family: var(--sans); font-size: .66rem; font-weight: 400;
  color: var(--ink-3); letter-spacing: .01em; margin-top: .1rem;
}
.model-card .tag { min-height: 2.4em; }
.badge {
  display: inline-block; font-size: .66rem; letter-spacing: .12em; text-transform: uppercase;
  background: var(--clay-wash); color: var(--clay-deep); padding: .2rem .5rem; font-weight: 650;
  /* Its own margin, not a "·" in the markup: in a narrow card the badge wraps
     to the next line and the separator is left dangling at the end of the one
     above it. A chip does not need a separator to read as separate. */
  margin-left: .45rem;
}

/* ------------------------------------------------------------------ generic grids */

.cols { display: grid; gap: 1.6rem; }
@media (min-width: 780px) { .cols-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 780px) { .cols-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 980px) { .cols-4 { grid-template-columns: repeat(4, 1fr); } }

.included { columns: 2; column-gap: 2.4rem; }
@media (max-width: 700px) { .included { columns: 1; } }
.included li {
  break-inside: avoid; list-style: none; padding: .55rem 0 .55rem 1.6rem; position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, .08); font-size: .93rem;
}
.included li::before {
  content: ""; position: absolute; left: 0; top: 1.05rem; width: .5rem; height: .5rem;
  background: var(--clay);
}

.timeline { border-top: 1px solid var(--line); }
.tl-row {
  display: grid; gap: .4rem 2rem; padding: 1.5rem 0; border-bottom: 1px solid var(--line);
  align-items: start;
}
@media (min-width: 820px) { .tl-row { grid-template-columns: 3rem 1fr 9rem 1.4fr; } }
.tl-num { font-family: var(--mono); font-size: .8rem; color: var(--clay); padding-top: .25rem; }
.tl-weeks { font-family: var(--mono); font-size: .82rem; color: var(--ink-3); padding-top: .3rem; }
.tl-row p { margin: 0; font-size: .92rem; color: var(--ink-2); }

.rules { display: grid; gap: 0; border-top: 1px solid var(--line); }
@media (min-width: 780px) { .rules { grid-template-columns: repeat(2, 1fr); column-gap: 3rem; } }
.rule { padding: 1.05rem 0; border-bottom: 1px solid var(--line); }
.rule b { font-weight: 600; font-size: .96rem; }
.rule span { display: block; color: var(--ink-3); font-size: .87rem; }

details.faq { border-bottom: 1px solid var(--line); }
details.faq summary {
  cursor: pointer; padding: 1.15rem 2rem 1.15rem 0; font-weight: 600; list-style: none;
  position: relative; font-size: 1rem;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: "+"; position: absolute; right: .3rem; top: 1rem; color: var(--clay);
  font-size: 1.3rem; line-height: 1; transition: transform .2s;
}
details.faq[open] summary::after { transform: rotate(45deg); }
details.faq p { padding-right: 2rem; color: var(--ink-2); font-size: .94rem; max-width: 70ch; }

/* ------------------------------------------------------------------ studio */

.studio { display: none; }
body.view-studio .studio { display: block; }
body.view-studio .home { display: none; }
body.view-studio { background: var(--paper-2); }

.studio-grid { display: grid; gap: 0; }
@media (min-width: 1000px) { .studio-grid { grid-template-columns: 1.15fr .85fr; } }

.stage {
  background: var(--paper); border-right: 1px solid var(--line);
  padding: 1.4rem clamp(1rem, 3vw, 2.2rem) 2rem;
}
@media (min-width: 1000px) {
  .stage { position: sticky; top: var(--nav-h); height: calc(100vh - var(--nav-h)); overflow-y: auto; }
}
.viewtabs { display: flex; gap: .3rem; margin-bottom: 1rem; }
.viewtabs button {
  border: 1px solid var(--line); background: transparent; padding: .45rem 1rem;
  font-size: .8rem; cursor: pointer; color: var(--ink-3); border-radius: 2px;
}
.viewtabs button[aria-selected="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
/* The elevation draws its own sky and ground, so it runs to the edge of the
   frame like a photograph. The plan and site views are drawings on paper and
   keep their margin. */
/* No min-height on the elevation: the frame hugs the drawing so no band of
   page background shows above the sky on a narrow screen. */
.canvas .gl {
  display: block; width: 100%; height: auto; border-radius: 6px;
  /* The sky lives here rather than in the scene, so the renderer can stay
     transparent and its distance haze blends into a real gradient. */
  background: linear-gradient(#6ea6d6 0%, #9dc4e2 42%, #cfd6d4 72%, #ddd0b6 100%);
}
.canvas {
  background: linear-gradient(#e9f0f4, #f6ece0); border: 1px solid var(--line);
  display: flex; align-items: center; overflow: hidden; border-radius: 3px;
  box-shadow: var(--shadow-sm);
}
.canvas.plan, .canvas.site { background: #fbf7f0; padding: .5rem; min-height: 240px; }
.canvas svg { max-height: min(56vh, 500px); width: 100%; display: block; }
.canvas.plan svg, .canvas.site svg { max-height: min(58vh, 560px); }
.stage-meta {
  display: flex; flex-wrap: wrap; gap: 1.4rem; margin-top: 1rem;
  font-family: var(--mono); font-size: .76rem; color: var(--ink-3);
}
.stage-meta b { color: var(--ink); font-weight: 500; }
.link-warning {
  background: var(--clay-wash); border-left: 3px solid var(--clay);
  border-radius: 0 5px 5px 0; padding: .6rem .8rem; margin-bottom: 1rem;
  font-size: .84rem; color: var(--ink-2); line-height: 1.5;
}
/* The three per-foot rates read as one sentence, so they wrap as one block and
   never leave a lone number stranded on its own line. */
.stage-meta .meta-rate {
  flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: baseline; gap: .45rem;
  border-top: 1px solid var(--line); padding-top: .7rem; margin-top: .1rem;
}
.stage-meta .meta-rate > span { color: var(--line-2); }
.stage-meta .meta-rate small {
  flex-basis: 100%; font-family: var(--sans); font-size: .74rem;
  color: var(--ink-3); line-height: 1.5; margin-top: .15rem;
}

.spec { margin-top: 1.6rem; border-top: 1px solid var(--line); padding-top: 1.1rem; }
.spec h4 {
  font-family: var(--sans); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 650; margin: 0 0 .7rem;
}
.spec dl { margin: 0 0 1rem; display: grid; gap: .35rem 1.6rem; }
@media (min-width: 620px) { .spec dl { grid-template-columns: repeat(2, 1fr); } }
.spec dl div { display: flex; gap: .6rem; border-bottom: 1px dotted var(--line); padding-bottom: .3rem; }
.spec dt { color: var(--ink-3); font-size: .82rem; min-width: 6.5rem; }
.spec dd { margin: 0; font-size: .82rem; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.chip {
  font-size: .74rem; padding: .22rem .55rem; border: 1px solid var(--line-2);
  border-radius: 999px; color: var(--ink-2); background: var(--paper-2);
}
.chip.base { border-color: var(--sage); color: var(--sage); }
.chip.site { border-color: var(--clay); color: var(--clay-deep); background: var(--clay-wash); }

.panel { padding: 1.6rem clamp(1rem, 3vw, 2.2rem) 8rem; }
.step { border-bottom: 1px solid var(--line); padding: 1.7rem 0; }
.step:first-child { padding-top: .4rem; }
.step-head { display: flex; align-items: baseline; gap: .8rem; margin-bottom: 1rem; }
.step-num {
  font-family: var(--mono); font-size: .74rem; color: var(--clay); flex: none;
  border: 1px solid var(--clay); width: 1.55rem; height: 1.55rem; display: grid;
  place-items: center; border-radius: 50%;
}
.step-head h3 { font-size: 1.15rem; }
.step-head .hint { font-size: .82rem; color: var(--ink-3); margin-left: auto; }

.choices { display: grid; gap: .55rem; }
.choices.two { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 560px) { .choices.three { grid-template-columns: repeat(3, 1fr); } }
.choice {
  display: block; text-align: left; width: 100%; cursor: pointer; background: var(--paper);
  border: 1px solid var(--line); padding: .8rem .95rem; border-radius: 2px;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.choice:hover { border-color: var(--line-2); }
.choice[aria-pressed="true"] {
  border-color: var(--clay); background: var(--clay-wash);
  box-shadow: inset 0 0 0 1px var(--clay);
}
.choice .row { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; }
.choice .name { font-weight: 600; font-size: .93rem; }
.choice .price { font-family: var(--mono); font-size: .8rem; color: var(--ink-3); white-space: nowrap; }
.choice[aria-pressed="true"] .price { color: var(--clay-deep); }
.choice .desc { font-size: .82rem; color: var(--ink-3); line-height: 1.45; margin-top: .3rem; }

.swatches { display: flex; flex-wrap: wrap; gap: .55rem; }
.swatch {
  width: 2.6rem; height: 2.6rem; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .18);
  cursor: pointer; padding: 0; position: relative; transition: transform .12s;
}
.swatch:hover { transform: scale(1.07); }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--clay); }
.swatch-label { font-size: .82rem; color: var(--ink-3); margin-top: .6rem; }

.optgroup { margin-bottom: 1.2rem; }
.optgroup > h4 {
  font-family: var(--sans); font-size: .72rem; letter-spacing: .13em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 650; margin: 0 0 .5rem;
}
.opt {
  display: flex; gap: .8rem; align-items: flex-start; width: 100%; text-align: left;
  background: transparent; border: 0; border-bottom: 1px solid var(--line); padding: .7rem 0;
  cursor: pointer;
}
.opt:hover .opt-name { color: var(--clay-deep); }
.tick {
  flex: none; width: 1.15rem; height: 1.15rem; border: 1px solid var(--line-2);
  margin-top: .18rem; display: grid; place-items: center; border-radius: 2px;
  background: var(--paper); transition: background .14s, border-color .14s;
}
.opt[aria-pressed="true"] .tick { background: var(--clay); border-color: var(--clay); }
.tick svg { width: .7rem; height: .7rem; stroke: #fff; fill: none; stroke-width: 3; opacity: 0; }
.opt[aria-pressed="true"] .tick svg { opacity: 1; }
.opt-body { flex: 1; }
.opt-name { font-size: .92rem; font-weight: 600; }
.opt-desc { font-size: .81rem; color: var(--ink-3); line-height: 1.45; }
.opt-price { font-family: var(--mono); font-size: .82rem; color: var(--ink-2); white-space: nowrap; margin-top: .1rem; }

.site-q { margin-bottom: 1.3rem; }
.site-q .q { font-size: .93rem; font-weight: 600; margin-bottom: .15rem; }
.site-q .help { font-size: .81rem; color: var(--ink-3); margin-bottom: .55rem; }
.seg { display: flex; flex-wrap: wrap; gap: .4rem; }
.seg button {
  border: 1px solid var(--line); background: var(--paper); padding: .48rem .8rem;
  font-size: .84rem; cursor: pointer; border-radius: 2px; color: var(--ink-2);
}
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.seg button .plus { font-family: var(--mono); font-size: .76rem; opacity: .7; margin-left: .35rem; }

/* ------------------------------------------------------------------ estimate */

.breakdown { border-top: 1px solid var(--line); margin-top: .4rem; }
.bd-section { padding: 1rem 0 .3rem; }
.bd-section > h4 {
  font-family: var(--sans); font-size: .72rem; letter-spacing: .13em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 650; margin: 0 0 .35rem;
  display: flex; justify-content: space-between;
}
.bd-line { display: flex; justify-content: space-between; gap: 1rem; padding: .42rem 0; font-size: .89rem; }
.bd-line .l { color: var(--ink-2); }
.bd-line .l small { display: block; color: var(--ink-3); font-size: .78rem; line-height: 1.4; }
.bd-line .v { font-family: var(--mono); font-size: .85rem; white-space: nowrap; }
.bd-line.free .v { color: var(--sage); }
/* The lot section when it carries nothing. Flagged, not hidden. */
.bd-assume {
  background: var(--clay-wash, rgba(180, 85, 47, .07));
  border-left: 2px solid var(--clay);
  margin: .3rem 0; padding: .55rem .7rem; border-radius: 0 4px 4px 0;
}
.bd-assume .v { color: var(--clay); }
.bd-compare {
  border: 1px solid var(--line-2); border-radius: 8px;
  padding: .85rem 1rem; margin-top: 1rem; background: var(--paper-2, transparent);
}
.bd-compare b { font-size: .9rem; }
.bd-compare p { margin: .35rem 0 0; font-size: .84rem; color: var(--ink-2); line-height: 1.55; }
.bd-total {
  display: flex; justify-content: space-between; align-items: baseline;
  border-top: 1px solid var(--ink); margin-top: .8rem; padding-top: .8rem;
}
.bd-total .v { font-family: var(--serif); font-size: 1.5rem; }

/* ------------------------------------------------- site plan legend (narrow) */
/* On a wide stage the site plan carries its own legend inside the drawing. Below
   the studio breakpoint that column costs 38% of the width and renders at about
   six pixels, so casita-svg.js drops it and these are the same facts as text. */
.site-legend:empty { display: none; }
.site-legend {
  display: grid; gap: 1.1rem; margin-top: 1rem; padding: 1.1rem 1.2rem;
  border: 1px solid var(--line); background: var(--paper); border-radius: 2px;
}
.site-legend b { display: block; font-size: .9rem; margin-bottom: .3rem; }
.site-legend span { font-size: .82rem; color: var(--ink-2); line-height: 1.5; }
.site-legend ul { list-style: none; margin: 0; padding: 0; }
.sl-key li {
  display: flex; align-items: center; gap: .6rem; font-size: .86rem;
  padding: .28rem 0; color: var(--ink-2);
}
.sl-key i { width: 1.1rem; height: .9rem; border: 1px solid; flex: none; }
.sl-check li {
  font-size: .82rem; color: var(--ink-2); padding: .26rem 0 .26rem .9rem;
  position: relative; line-height: 1.45;
}
.sl-check li::before {
  content: ''; position: absolute; left: 0; top: .72em;
  width: .3rem; height: .3rem; background: var(--clay);
}
.sl-cover { border: 1px solid #7F8F6B; background: #EDF1E4; padding: .8rem .9rem; border-radius: 2px; }
.sl-cover.over { border-color: var(--clay); background: #F6E5DB; }
.sl-cover p { margin: .1rem 0 .3rem; font-size: .84rem; color: var(--ink-2); }
.sl-cover strong { font-family: var(--serif); font-size: 1.45rem; color: #5C6B4A; margin-right: .35rem; }
.sl-cover.over strong { color: var(--clay); }
.sl-cover span { font-size: .78rem; color: var(--ink-3); }

.pricebar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 55;
  background: var(--night); color: #f0e7d8; border-top: 1px solid #3a3128;
  /* A phone's home indicator sits over the bottom of the viewport, and the
     reserve button is the last thing that should end up under it. */
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
body:not(.view-studio) .pricebar { display: none; }
.pricebar .wrap {
  display: flex; align-items: center; gap: 1.2rem; padding: .85rem 0; flex-wrap: wrap;
}
.pb-label { font-size: .72rem; letter-spacing: .13em; text-transform: uppercase; color: #a89b88; }
.pb-range { font-family: var(--serif); font-size: clamp(1.3rem, 2.6vw, 1.85rem); line-height: 1.1; }
.pb-sub { font-size: .76rem; color: #a89b88; font-family: var(--mono); }
/* The lot assumption travels with the number everywhere a number appears
   (docs/PRICING.md). The model and midpoint are detail and can go on a narrow
   screen; the assumption is not detail and cannot. */
.pb-lot { color: #c3a68c; }
.pb-actions { margin-left: auto; display: flex; gap: .6rem; flex-wrap: wrap; }
.pb-actions .btn-ghost { border-color: #574a3c; color: #e9dfd0; }
.pb-actions .btn-ghost:hover { border-color: #a89b88; background: rgba(255, 255, 255, .06); }

/* ------------------------------------------------------------------ dialog */

dialog {
  border: 1px solid var(--line); background: var(--paper); color: var(--ink);
  padding: 0; width: min(660px, calc(100% - 2rem)); box-shadow: var(--shadow-lg);
  border-radius: 3px;
}
dialog::backdrop { background: rgba(32, 27, 22, .55); backdrop-filter: blur(3px); }
.dlg-head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem;
  padding: 1.5rem 1.7rem 1rem; border-bottom: 1px solid var(--line);
}
.dlg-body { padding: 1.4rem 1.7rem; max-height: 66vh; overflow-y: auto; }
.dlg-foot {
  padding: 1.1rem 1.7rem; border-top: 1px solid var(--line); display: flex;
  gap: .7rem; align-items: center; flex-wrap: wrap; background: var(--paper-2);
}
.x { background: none; border: 0; cursor: pointer; font-size: 1.5rem; line-height: 1; color: var(--ink-3); }
.x:hover { color: var(--ink); }

.field { margin-bottom: 1rem; }
.field label { display: block; font-size: .84rem; font-weight: 600; margin-bottom: .3rem; }
.field input, .field textarea, .field select {
  width: 100%; padding: .65rem .8rem; border: 1px solid var(--line-2); background: #fff;
  font: inherit; font-size: .93rem; border-radius: 2px; color: var(--ink);
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: 2px solid var(--clay); outline-offset: -1px; border-color: var(--clay);
}
.field textarea { min-height: 5rem; resize: vertical; }
.field-row { display: grid; gap: 1rem; }
@media (min-width: 520px) { .field-row { grid-template-columns: 1fr 1fr; } }

.notice {
  background: var(--clay-wash); border-left: 3px solid var(--clay); padding: .85rem 1rem;
  font-size: .86rem; color: var(--clay-deep); line-height: 1.5;
}
.notice b { font-weight: 700; }
.err { color: var(--clay-deep); font-size: .86rem; min-height: 1.2rem; }

.code-badge {
  font-family: var(--mono); font-size: 1.5rem; letter-spacing: .1em; background: var(--ink);
  color: var(--paper); padding: .5rem 1rem; display: inline-block;
}

/* ------------------------------------------------------------------ footer */

.footer { background: var(--night-2); color: #a89b88; padding: 3.5rem 0 2.5rem; font-size: .87rem; }
/* The price bar is fixed, so in studio view the last thing on the page sits
   under it. On a phone that was the fine print about this not being a bid.
   `--pricebar-h` is measured in app.js; the fallback covers a first paint. */
body.view-studio .footer { padding-bottom: calc(var(--pricebar-h, 7rem) + 1.6rem); }
.footer .wrap { display: grid; gap: 2rem; }
@media (min-width: 780px) { .footer .wrap { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer h4 { font-family: var(--sans); font-size: .72rem; letter-spacing: .13em;
  text-transform: uppercase; color: #6f6555; margin: 0 0 .7rem; font-weight: 650; }
.footer a { color: #cdbfa9; }
.footer .fine { border-top: 1px solid #3a3128; margin-top: 2.2rem; padding-top: 1.4rem;
  font-size: .78rem; color: #7d7263; line-height: 1.6; grid-column: 1 / -1; }

/* ------------------------------------------------------ plan pages (pages.py) */

.crumbs { font-size: .8rem; color: var(--ink-3); margin: 0 0 1.4rem; }
.crumbs a { color: var(--ink-3); text-decoration: none; border-bottom: 1px solid var(--line-2); }
.crumbs a:hover { color: var(--clay); }

.plan-head { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (min-width: 900px) { .plan-head { grid-template-columns: 1fr 1.05fr; } }
.plan-head h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); }
.plan-head .frame {
  background: linear-gradient(#e9f0f4, #f6ece0);
  border: 1px solid var(--line); box-shadow: var(--shadow-lg);
  overflow: hidden; margin-top: clamp(1.4rem, 3vw, 2.2rem); min-height: 180px;
}
.plan-head .hero-note { margin-top: .9rem; }

.pricebox { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
@media (min-width: 700px) { .pricebox { grid-template-columns: 1fr 1fr; } }
.pricebox > div { background: var(--paper); padding: 1.6rem 1.5rem; }
.pricebox-alt { background: var(--paper-2) !important; }
.pricebox b {
  display: block; font-family: var(--serif); font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1.05; margin: .5rem 0 .6rem;
}
.pricebox span.muted { font-size: .86rem; line-height: 1.5; display: block; max-width: 44ch; }

.plan-links { display: grid; gap: .9rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 780px) { .plan-links { grid-template-columns: repeat(4, 1fr); } }
.plan-link {
  display: block; padding: 1rem 1.1rem; text-decoration: none;
  border: 1px solid var(--line); background: var(--paper); transition: border-color .15s;
}
.plan-link:hover { border-color: var(--clay); }
.plan-link b { display: block; font-family: var(--serif); font-size: 1.15rem; }
.plan-link span { display: block; font-size: .8rem; color: var(--ink-2); }
.plan-link span.muted { color: var(--ink-3); margin-top: .2rem; }

.plan-cards { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.plan-card {
  display: flex; flex-direction: column; gap: .5rem; padding: 1.5rem 1.4rem;
  border: 1px solid var(--line); background: var(--paper); text-decoration: none;
  box-shadow: var(--shadow-sm); transition: border-color .15s, transform .12s;
}
.plan-card:hover { border-color: var(--clay); transform: translateY(-2px); }
.plan-card .top { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
.plan-card h3 { font-size: 1.5rem; }
.plan-card .sf { font-family: var(--mono); font-size: .74rem; color: var(--ink-3); text-align: right; }
.plan-card p { margin: 0; font-size: .88rem; color: var(--ink-2); }
.plan-card .meta { font-size: .78rem; font-family: var(--mono); flex: 1; }
.plan-card .foot {
  display: flex; justify-content: space-between; align-items: baseline;
  border-top: 1px solid var(--line); padding-top: .7rem; margin-top: .3rem;
}
.plan-card .foot b { font-family: var(--serif); font-size: 1.3rem; color: var(--clay); }

/* ------------------------------------------------------------------ mobile */

/* Hard breaks are composition, and composition is a width. Below this the line
   is already wrapping on its own, so forcing a second break strands a two-word
   line ("second home," alone under a full-width first line). */
@media (max-width: 700px) {
  br.wide-only { display: none; }
}

@media (max-width: 900px) {
  .nav-links { display: none; }
  .brand { font-size: .74rem; letter-spacing: .1em; }
  .nav .wrap { gap: 1rem; }
  .nav .btn { padding: .6rem 1rem; font-size: .82rem; }
  .hero-note { flex-direction: column; gap: .2rem; }
}

@media (max-width: 999px) {
  .stage { border-right: 0; border-bottom: 1px solid var(--line); }
}

@media (max-width: 620px) {
  .wrap { width: min(1180px, 100% - 2rem); }
  .stat { padding: 1.1rem 1rem 1.1rem 0; }
  .stat b { font-size: 1.5rem; }
  .statband .wrap > .stat:nth-child(2n) { border-right: 0; }
  .choices.two, .choices.three { grid-template-columns: 1fr; }
  /* The three rates each take a full line at this width, so the dots between
     them have nothing to separate and land as a dangling "·" at a line end. */
  .stage-meta .meta-rate { gap: .15rem .45rem; }
  .stage-meta .meta-rate > span { display: none; }
  .stage-meta .meta-rate > b { flex-basis: 100%; }
  .pricebar .wrap { padding: .6rem 0; gap: .6rem; }
  .pb-range { font-size: 1.22rem; }
  .pb-detail { display: none; }
  .pb-actions { width: 100%; margin-left: 0; }
  .pb-actions .btn { flex: 1; padding: .6rem .7rem; font-size: .82rem; }
  .panel { padding-bottom: 12rem; }
  .stage { padding-bottom: 1.2rem; }
  .dlg-head, .dlg-body, .dlg-foot { padding-inline: 1.1rem; }
}

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