/* TMH "Build your home". Brand from context/clients/tiny-mountain-houses.md: navy #1b3050, orange #c85a20 (white text
   needs the darker #a84818), green #6b9e3d, cream #f5f2eb, border #d4c9b8, Bungee headings. Phone first. */
@font-face { font-family: "Bungee"; src: url("/fonts/bungee-latin.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
:root {
  --navy: #1b3050; --orange: #a84818; --orange-hi: #8f3d14; --orange-soft: #fceee5; --green: #3f6a1f; --green-soft: #e6efdc; --green-text: #4e7a2a;
  --cream: #f5f2eb; --sand: #ede8de; --line: #d4c9b8; --line-strong: #8a7f72; --muted: #5e554c; --muted2: #6b6056; --white: #ffffff;
  --head: "Bungee", Impact, "Arial Black", sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --r: 8px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--navy); font-family: var(--body); font-size: 16px; line-height: 1.5; }
a { color: var(--orange); }
a:hover { color: var(--orange-hi); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
h1, h2 { font-family: var(--head); font-weight: 400; letter-spacing: 0.2px; line-height: 1.15; margin: 0; }
h1 { font-size: 26px; }
h1:focus { outline: none; }
h2 { font-size: 20px; }
.ico { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--white); padding: 10px 14px; z-index: 50; }
.skip:focus { left: 8px; top: 8px; }
.loading { padding: 40px 20px; color: var(--muted); }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: 12px; }
.pad { padding: 20px; }
.eyebrow { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--green-text); }
.lede { margin: 6px 0 0; color: var(--muted); }
.fine { margin: 14px 0 0; font-size: 13px; color: var(--muted2); }
.strong { font-weight: 700; }
.muted { color: var(--muted); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: var(--r);
  border: 2px solid var(--orange); background: var(--orange); color: var(--white); font-weight: 700; text-decoration: none; text-align: center; }
.btn:hover { background: var(--orange-hi); border-color: var(--orange-hi); color: var(--white); }
.btn.big { min-height: 54px; font-size: 17px; padding: 0 26px; }
.btn.ghost { background: var(--white); color: var(--navy); border-color: var(--navy); }
.btn.ghost:hover { background: var(--sand); color: var(--navy); }
.btn[disabled] { opacity: 0.6; cursor: default; }

/* Header */
.top { background: var(--white); border-bottom: 1px solid var(--line); }
.toprow { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding-top: 10px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--navy); text-decoration: none; min-width: 0; }
.brand img { width: 46px; height: auto; }
.brandtext { display: flex; flex-direction: column; min-width: 0; }
.bt1 { font-family: var(--head); font-size: 17px; line-height: 1.15; }
.bt2 { font-size: 13px; color: var(--muted); }
.help { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border: 2px solid var(--navy); border-radius: var(--r);
  color: var(--navy); font-weight: 700; text-decoration: none; white-space: nowrap; font-size: 15px; }
.help:hover { background: var(--sand); color: var(--navy); }
.helpword, .helpnum { display: none; }
.toprow { flex-wrap: nowrap; }
.steps .short { display: none; }
@media (max-width: 379px) {
  .steps .long { display: none; }
  .steps .short { display: inline; }
  .bt1 { font-size: 15px; }
}
@media (max-width: 899px) {
  .maside .mphoto { display: none; }
  .toprow { flex-wrap: wrap; }
  .brand { flex: 1 1 0; }
}
.steps { order: 3; flex: 1 1 100%; display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.step { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: var(--sand); color: var(--muted);
  font-size: 14px; font-weight: 600; white-space: nowrap; text-decoration: none; }
.step b { display: inline-flex; width: 20px; height: 20px; align-items: center; justify-content: center; border-radius: 50%; background: var(--white); font-size: 12px; }
a.step:hover { background: var(--line); color: var(--navy); }
.step.on { background: var(--orange); color: var(--white); }
.step.on b { color: var(--orange); }
.testbar { margin: 0; padding: 6px 16px; background: #fff4c2; color: #4d3b00; font-size: 14px; text-align: center; }

/* Pages */
.page { padding-top: 24px; padding-bottom: 48px; }
.pagehead { margin-bottom: 22px; }
.pagehead h1 { font-size: 30px; margin-top: 6px; }
.narrow { max-width: 680px; }

/* Models */
.models { display: grid; grid-template-columns: 1fr; gap: 16px; }
.mcard { background: var(--white); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.mphoto { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; background: var(--sand); }
.mbody { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1 1 auto; }
.mbody h2 { font-size: 22px; }
.facts { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.facts span { background: var(--cream); padding: 4px 10px; border-radius: 6px; font-size: 14px; font-weight: 600; }
.from { margin: auto 0 0; display: flex; flex-direction: column; }
.from span { font-size: 13px; color: var(--muted2); }
.from strong { font-size: 22px; }

/* Floor plans */
.plans { display: grid; gap: 10px; margin-bottom: 18px; }
.plan { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 12px 16px; border: 2px solid var(--line); border-radius: 10px;
  background: var(--white); text-align: left; }
.plan:hover { border-color: var(--navy); }
.plan[aria-pressed="true"] { border-color: var(--orange); background: var(--orange-soft); }
.pname { flex: 1 1 auto; font-weight: 700; }
.pprice { font-weight: 700; white-space: nowrap; }

/* Two columns (info, summary) */
.twocol { display: flex; flex-direction: column; gap: 18px; }
.maside { overflow: hidden; }
.maside h2 { font-size: 24px; margin-top: 4px; }
.planline { margin: 6px 0 0; font-weight: 600; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 14px 0 0; }
.tiles div { background: var(--cream); border-radius: 8px; padding: 10px 12px; }
.tiles dt { color: var(--muted2); font-size: 13px; }
.tiles dd { margin: 0; font-weight: 700; }
.asidelinks { margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-weight: 600; font-size: 15px; }
.formcard h1 { font-size: 26px; }
.infoform { margin-top: 20px; display: flex; flex-direction: column; gap: 20px; }
.grid2 { display: grid; grid-template-columns: 1fr; gap: 16px; }
.qs { border-top: 1px solid var(--sand); padding-top: 18px; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 15px; }
.field input, .field select, .field textarea { min-height: 48px; border: 1px solid var(--line-strong); border-radius: var(--r); padding: 10px 12px; font-size: 16px;
  font-weight: 400; background: var(--white); width: 100%; }
.field textarea { min-height: 96px; resize: vertical; }
/* Safari ignores the height of a standard dropdown, so draw our own (arrow from /brand/chevron.svg). */
.field select { -webkit-appearance: none; appearance: none; background: var(--white) url("/brand/chevron.svg") no-repeat right 10px center / 20px 20px; padding-right: 38px; }
.field.bad input, .field.bad select, .choices.bad .chip { border-color: #b3261e; }
.fielderr { color: #b3261e; font-size: 14px; font-weight: 600; margin: 0; }
.formerr { color: #8c1d18; background: #fdecea; border: 1px solid #f3b8b3; border-radius: var(--r); padding: 10px 12px; font-weight: 600; margin: 0 0 14px; }
.choices { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.choices legend { font-weight: 600; font-size: 15px; padding: 0; margin-bottom: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 46px; padding: 0 16px; border-radius: var(--r); border: 1px solid var(--line-strong); background: var(--white); }
.chip[aria-pressed="true"] { border: 2px solid var(--orange); background: var(--orange-soft); font-weight: 700; }
.formfoot { display: flex; flex-direction: column; gap: 14px; border-top: 1px solid var(--sand); padding-top: 18px; }
.formfoot .fine { margin: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Build */
.build { display: flex; flex-direction: column; gap: 16px; padding-bottom: 110px; }
.cats { padding: 12px; }
.catstep { margin: 0 4px 8px; font-weight: 700; font-size: 15px; color: var(--muted); }
.bar { height: 8px; background: var(--sand); border-radius: 999px; overflow: hidden; margin: 0 4px 10px; }
.fill { display: block; height: 8px; background: var(--orange); width: 0; }
.w5{width:5%}.w10{width:10%}.w15{width:15%}.w20{width:20%}.w25{width:25%}.w30{width:30%}.w35{width:35%}.w40{width:40%}.w45{width:45%}.w50{width:50%}
.w55{width:55%}.w60{width:60%}.w65{width:65%}.w70{width:70%}.w75{width:75%}.w80{width:80%}.w85{width:85%}.w90{width:90%}.w95{width:95%}.w100{width:100%}
.cats ol { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 4px; }
.cat { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border-radius: 6px; color: var(--navy); font-weight: 600;
  text-decoration: none; white-space: nowrap; border: 1px solid var(--line); scroll-snap-align: start; }
.cat:hover { background: var(--sand); color: var(--navy); }
.cat .num { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line-strong); display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; flex: 0 0 auto; }
.cat.done .num { background: var(--green); border-color: var(--green); color: var(--white); }
.cat.on { background: var(--navy); color: var(--white); border-color: var(--navy); }
.cat.on .num { background: var(--white); color: var(--navy); border-color: var(--white); }
.catbody { display: flex; flex-direction: column; gap: 16px; min-width: 0; container-type: inline-size; }
/* Option rows go side by side (name, price, button) only when the middle column has room, whatever the screen size. */
@container (min-width: 520px) {
  .orow { grid-template-columns: 1fr auto auto; grid-template-areas: "text price btn"; }
  .addbtn { justify-self: end; }
}
.cathead h1 { font-size: 28px; }
.catnote { margin: 0; padding: 10px 14px; background: var(--orange-soft); border-radius: var(--r); font-weight: 600; }
.catbody h2 { font-size: 18px; margin-bottom: 12px; }
.inclist, .optlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.inc { display: flex; gap: 10px; align-items: flex-start; color: var(--navy); }
.inc > .ico { color: var(--green); margin-top: 3px; }
.inc .onote { display: block; }
.incx { display: block; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.opt { border: 1px solid var(--line-strong); border-radius: 10px; padding: 12px 14px; background: var(--white); }
.opt.on { border: 2px solid var(--orange); background: var(--orange-soft); padding: 11px 13px; }
.orow { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "text price" "btn btn"; gap: 8px 12px; align-items: center; }
.otext { grid-area: text; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.oname { font-weight: 600; overflow-wrap: anywhere; }
.onote { font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.oprice { grid-area: price; font-weight: 700; white-space: nowrap; align-self: start; }
.addbtn { grid-area: btn; justify-self: start; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; min-width: 120px;
  padding: 0 16px; border-radius: var(--r); border: 2px solid var(--navy); background: var(--white); color: var(--navy); font-weight: 700; }
.addbtn:hover { background: var(--sand); }
.addbtn.on { background: var(--orange); border-color: var(--orange); color: var(--white); }
.addbtn.on:hover { background: var(--orange-hi); }
.oextra { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.variants { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.variants legend { font-weight: 700; font-size: 14px; color: var(--muted); margin-bottom: 6px; padding: 0; }
.variants.need legend { color: #8c1d18; }
.vopt { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--white); cursor: pointer; }
.vopt input { width: 20px; height: 20px; accent-color: var(--orange); flex: 0 0 auto; margin: 0; }
.vlabel { flex: 1 1 auto; overflow-wrap: anywhere; }
.vprice { font-weight: 700; white-space: nowrap; }
.vopt:has(input:checked) { border-color: var(--orange); box-shadow: inset 0 0 0 1px var(--orange); }
.qtyrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-weight: 600; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--white); }
.qbtn { width: 46px; height: 46px; border: 0; background: transparent; display: inline-flex; align-items: center; justify-content: center; color: var(--navy); }
.qbtn[disabled] { color: var(--line); cursor: default; }
.qty output { min-width: 34px; text-align: center; font-weight: 700; font-size: 17px; }
.pager { display: flex; flex-direction: column-reverse; gap: 10px; }
.pager .btn { width: 100%; }
.totalbox { display: none; }
.phonebar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--navy); color: var(--white); display: flex; align-items: center;
  justify-content: space-between; gap: 12px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); box-shadow: 0 -4px 16px rgba(27, 48, 80, 0.18); }
.phonebar div { display: flex; flex-direction: column; }
.phonebar span { font-size: 13px; color: #c8d6e8; }
.phonebar strong { font-family: var(--head); font-weight: 400; font-size: 24px; line-height: 1.1; }
.phonebar .btn { min-width: 120px; }

/* Total box (wide screens) */
.tb-head { background: var(--navy); color: var(--white); padding: 16px 20px; border-radius: 11px 11px 0 0; }
.tb-head span { display: block; color: #c8d6e8; font-size: 15px; }
.tb-head strong { font-family: var(--head); font-weight: 400; font-size: 32px; line-height: 1.15; overflow-wrap: anywhere; }
.tb-body { padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 12px; }
.tline, .tlines li, .sline { display: flex; justify-content: space-between; gap: 12px; margin: 0; }
.tline span, .tlines span, .sline span { min-width: 0; overflow-wrap: anywhere; }
.tline b, .tlines b, .sline b { white-space: nowrap; }
.tlines { list-style: none; margin: 0; padding: 12px 0 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; font-size: 15px;
  max-height: 46vh; overflow-y: auto; }
.tnone { margin: 0; color: var(--muted); }
.tfine { margin: 0; font-size: 13px; color: var(--muted); }

/* Summary */
.sumcard h1 { font-size: 28px; }
.sumcard > .sline.strong { padding: 14px 0; margin-top: 18px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sgroup { padding: 14px 0; border-bottom: 1px solid var(--sand); display: flex; flex-direction: column; gap: 8px; }
.sghead { display: flex; justify-content: space-between; align-items: center; }
.sghead a { font-weight: 600; font-size: 15px; min-height: 32px; display: inline-flex; align-items: center; padding: 0 4px; }
.sline.muted { padding: 14px 0 6px; }
.stotal { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 0; padding-top: 14px; border-top: 2px solid var(--navy); }
.stotal span { font-weight: 700; font-size: 18px; }
.stotal strong { font-family: var(--head); font-weight: 400; font-size: 32px; }
.sendcol { display: flex; flex-direction: column; gap: 16px; }
.sendcard { display: flex; flex-direction: column; gap: 14px; }
.sendcard p { margin: 0; color: var(--muted); }
.sendcard .btn { width: 100%; }
.helpcard { background: var(--orange-soft); border-color: transparent; }
.helpcard p { margin: 0 0 6px; }

/* Done */
.donecard { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.donecheck { width: 64px; height: 64px; border-radius: 50%; background: var(--green-soft); color: var(--green); display: inline-flex; align-items: center; justify-content: center; }
.donecard .tiles { width: 100%; max-width: 420px; text-align: left; }
.donebtns { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 420px; margin-top: 6px; }

/* Fixes from the 11/25 phone and laptop QC */
h1, h2 { overflow-wrap: anywhere; hyphens: auto; }
.lede, .sendcard p, .donecard p, .resume p { overflow-wrap: anywhere; }
.oprice { min-width: 6.5em; text-align: right; }
.oprice.need, .tneed b { color: #8c1d18; }
.tneed span { color: #8c1d18; }
.vopt { flex-wrap: wrap; }
.vlabel { flex: 1 1 140px; min-width: 0; }
.vprice { margin-left: auto; }
.biglink, .editlink { display: inline-flex; align-items: center; min-height: 44px; }
.step { min-height: 40px; }
.resume { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; border-color: var(--orange); background: var(--orange-soft); }
.resume p { margin: 0; }
.donecard > .btn.ghost { min-width: 220px; }
@media (max-width: 419px) {
  .steps .long { display: none; }
  .steps .short { display: inline; }
  .step { padding: 6px 10px; font-size: 14px; }
  .cathead h1, .sumcard h1 { font-size: 24px; }
}

@media (min-width: 640px) {
  .helpnum { display: inline; }
  .helpcall { display: none; }
  .wrap { padding-left: 24px; padding-right: 24px; }
  h1 { font-size: 30px; }
  .pad { padding: 26px 28px; }
  .models { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .formfoot { flex-direction: row; align-items: center; justify-content: space-between; }
  .pager { flex-direction: row; justify-content: space-between; }
  .pager .btn { width: auto; }
  .donebtns { flex-direction: row; justify-content: center; max-width: none; }
  .resume { flex-direction: row; align-items: center; justify-content: space-between; }
}
@media (min-width: 900px) {
  .steps { order: 0; flex: 0 1 auto; }
  .models { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .twocol { flex-direction: row; align-items: flex-start; gap: 28px; }
  .maside { flex: 0 0 300px; position: sticky; top: 16px; }
  .twocol > section { flex: 1 1 auto; min-width: 0; }
  .summary .sendcol { flex: 0 0 340px; position: sticky; top: 16px; }
  /* Build page between 900 and 1199: categories as a strip on top, options and the total side by side. */
  .build { display: grid; grid-template-columns: minmax(0, 1fr) 280px; align-items: start; gap: 20px; padding-bottom: 48px; }
  .build .cats { grid-column: 1 / -1; }
  .totalbox { display: block; position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; }
  .totalbox .btn { width: 100%; }
  .tlines { max-height: none; overflow: visible; }
  .phonebar { display: none; }
}
@media (min-width: 900px) and (max-width: 1099px) {
  .twocol .grid2.qs { grid-template-columns: 1fr; }
}
@media (min-width: 1200px) {
  .helpword { display: inline; }
  .maside { flex-basis: 340px; }
  .summary .sendcol { flex-basis: 360px; }
  .build { grid-template-columns: 250px minmax(0, 1fr) 310px; gap: 22px; }
  .build .cats { grid-column: auto; position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; }
  .cats ol { flex-direction: column; overflow: visible; gap: 2px; }
  .cat { border-color: transparent; white-space: normal; min-height: 46px; }
}
@media (min-width: 900px) and (max-width: 1199px) {
  .toprow { flex-wrap: nowrap; }
  .bt1 { font-size: 15px; }
  .step { padding: 7px 10px; font-size: 13px; }
}
@media print {
  .top .help, .steps, .phonebar, .pager, .sendcol, .cats { display: none !important; }
}
