/* Tokens: the Elevation Drawing App's own values (elevation-drawing-app/css/app.css :root), so the two tools match. */
:root {
  --cream: #fcfaf6; --warm: #f5f3eb; --ink: #35312e; --ink2: #60605e; --rust: #af5a3c; --rust-dk: #96492f; --rust-weak: #af5a3c22; --copper: #b8866e;
  --steel: #5c707e; --navy: #465561; --olive: #6d684e; --line: #e2ddd2; --bad: #b3261e; --ok: #2e7d4f; --glow: #f2c14e;
  --stage: #ebe8e0;
  --heading: "ITC Cheltenham Std", "ITC Cheltenham", Georgia, "Times New Roman", serif;
  --body: Figtree, -apple-system, "Segoe UI", sans-serif;
  --r-sm: 4px; --r-md: 8px; --r-lg: 8px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 16px/1.5 var(--body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; }
a { color: var(--navy); }
.kp { max-width: 1120px; margin: 0 auto; padding: 20px 20px 32px; }
.muted { color: var(--ink2); }
.small { font-size: 14px; }
em { font-style: normal; color: var(--ink2); font-weight: 400; font-size: .85em; }

/* hero + stepper */
.hero { text-align: center; padding: 8px 0 14px; }
.eyebrow { margin: 0 0 6px; font: 600 11px/1.2 var(--body); letter-spacing: .07em; text-transform: uppercase; color: var(--rust); }
h1 { font: 400 36px/1.15 var(--heading); margin: 0 0 8px; }
.hero .sub { margin: 0 auto; max-width: 620px; color: var(--ink2); font-size: 17px; }
.stepper { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 0; margin: 10px 0 18px; }
.stepper button { width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; background: #fff; border: 1.5px solid var(--line); border-radius: var(--r-md); padding: 10px 12px; cursor: pointer; font: inherit; color: var(--ink2); min-height: 56px; }
.stepper .num { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--warm); color: var(--ink); font-weight: 700; }
.stepper .st { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.stepper b { color: var(--ink); font-size: 15px; }
.stepper small { font-size: 13px; }
.stepper .on button { border-color: var(--rust); background: #fbf1ec; }
.stepper .on .num { background: var(--rust); color: #fff; }
.stepper .done .num { background: var(--navy); color: #fff; }
@media (hover: hover) { .stepper li:not(.on) button:hover { border-color: var(--copper); } }

/* sections */
main:focus { outline: none; }
h2 { font: 400 30px/1.2 var(--heading); margin: 0 0 6px; }
h2:focus { outline: none; }
h3 { font: 600 19px/1.3 var(--body); margin: 0 0 6px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
h4 { font: 600 16px/1.3 var(--body); margin: 0 0 6px; }
.intro { margin: 4px 0 14px; }
/* step 1 on a desktop: a tighter title block, so the drawing and the style cards clear the pinned Next bar */
@media (min-width: 1000px) {
  [data-step="1"] .hero { padding: 4px 0 8px; }
  [data-step="1"] .hero h1 { font-size: 32px; margin-bottom: 4px; }
  [data-step="1"] .hero .sub { font-size: 15px; max-width: none; }
  [data-step="1"] .intro { margin: 0 0 10px; }
  [data-step="1"] .intro h2 { font-size: 26px; margin: 0 0 2px; }
  [data-step="1"] .intro .lead { margin: 0; font-size: 16px; }
  [data-step="1"] .workspace { padding-bottom: 8px; }
}
.lead { font-size: 17px; margin: 0 0 12px; max-width: 760px; }
.help { color: var(--ink2); margin: 0 0 12px; }
.help.small { font-size: 14px; margin-top: 8px; }
.q { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; margin: 0 0 16px; }
.qn { display: inline-grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: var(--r-sm); background: var(--rust-weak); color: var(--rust); font-size: 13px; font-weight: 700; }
.quick { margin-top: 2px; }

/* buttons: the Elevation Drawing App's (sentence case, 1px line border, 4px corners, rust primary) */
.kbtn { font: 600 15px/20px var(--body); display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 16px; border-radius: var(--r-sm); border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; text-decoration: none; text-align: center; }
.kbtn.primary { background: var(--rust); border-color: var(--rust); color: #fff; }
@media (hover: hover) { .kbtn.primary:hover { background: var(--rust-dk); border-color: var(--rust-dk); } }
.kbtn.secondary { background: var(--navy); color: #fff; }
.kbtn.secondary:hover { background: #3a4751; }
.kbtn.outline { background: #fff; color: var(--ink); border-color: var(--line); }
@media (hover: hover) { .kbtn.outline:hover { border-color: var(--copper); } }
.kbtn.ghost { background: #fff; color: var(--ink); border: 1px solid #d8d2c6; }
.kbtn.ghost:hover { border-color: var(--rust); color: var(--rust); }
.kbtn.sm { min-height: 40px; padding: 6px 12px; font-size: 14px; font-weight: 500; }
.kbtn:disabled { opacity: .4; cursor: default; }
.kbtn.danger { color: var(--bad); border-color: var(--bad); }
button.link { background: none; border: 0; padding: 4px; font: inherit; font-size: 14px; color: var(--navy); text-decoration: underline; cursor: pointer; }
button.link.danger { color: var(--bad); margin-left: auto; }
:focus-visible { outline: 3px solid var(--steel); outline-offset: 2px; }
.nav { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin: 20px 0 8px; }
.nav .kbtn.primary { min-width: 260px; font-size: 15px; min-height: 52px; }
/* steps 1 and 2: Next (and the running total) stay in reach at the bottom of the screen */
.nav.sticky { position: sticky; bottom: 0; z-index: 5; background: var(--cream); border-top: 1px solid var(--line); box-shadow: 0 -6px 12px -8px rgba(53, 49, 46, .25); padding: 10px 0; margin-bottom: 0; }
.card .whybest { color: var(--navy); font-weight: 600; }
.shoplist .brand { font-size: 12px; color: var(--ink2); }
.draghint { margin: 0 0 4px; }
.draghint b { color: var(--navy); }

/* steps 2 and 3: a smaller title block */
[data-step="2"] .hero, [data-step="3"] .hero { padding: 0 0 4px; }
[data-step="2"] .hero h1, [data-step="3"] .hero h1 { font-size: 22px; margin: 0; }
[data-step="2"] .hero .sub, [data-step="3"] .hero .sub { display: none; }
.term { white-space: nowrap; }
.term .tip p { white-space: normal; }
.tip p { max-width: min(520px, 82vw); }
.runtotal { color: var(--ink2); font-size: 15px; margin-left: auto; }
.runtotal b { color: var(--ink); font-size: 18px; }
.nav.end .resets { display: flex; flex-wrap: wrap; gap: 4px 16px; justify-content: flex-end; }

/* (i) tips */
.tip { display: inline-block; font-size: 14px; font-weight: 400; vertical-align: middle; }
.tip summary { list-style: none; cursor: pointer; display: inline-flex; }
.tip summary::-webkit-details-marker { display: none; }
.tip .i { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--steel); color: var(--steel); font: italic 700 13px/1 Georgia, serif; }
.tip[open] .i { background: var(--steel); color: #fff; }
.tip p { margin: 6px 0 0; padding: 10px 12px; background: #eef1f4; border-radius: var(--r-md); color: var(--ink); max-width: 520px; line-height: 1.45; }
h3 .tip[open] { flex-basis: 100%; }
h3 .tip[open] summary { margin-left: 0; }

/* choice cards */
.cards { display: grid; gap: 12px; }
.cards.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards.lights { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.card.pick { position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 4px; text-align: left; background: #fff; border: 1px solid #d8d2c6; border-radius: var(--r-sm); padding: 14px; cursor: pointer; font: inherit; color: inherit; min-height: 48px; }
@media (hover: hover) { .card.pick:not(.on):hover { border-color: var(--copper); } }
.card.pick.on { border-color: var(--rust); box-shadow: 0 0 0 1.5px var(--rust) inset; background: #fffaf7; }
.card.pick.on::after { content: "✓"; position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 50%; background: var(--rust); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.card .ill svg { width: 88px; height: 66px; display: block; margin-bottom: 4px; }
.card .ill .ib { fill: #f3efe8; stroke: #8a837b; stroke-width: 1.5; }
.card .ill .if { stroke: #c8b29f; }
.card .ill .id { fill: #fff; stroke: #8a837b; stroke-width: 1.5; }
.card .nm { font-weight: 700; font-size: 16px; padding-right: 26px; }
.card .nm .brand { display: block; font-size: 12px; font-weight: 600; color: var(--ink2); letter-spacing: .02em; }
/* step 1 cabinet fronts: compact, picture beside the name, so the wall drawing is near the top */
.cards.styles .card.pick { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-content: start; }
.cards.styles .card .ill { grid-row: span 2; }
.cards.styles .card .ill svg { width: 64px; height: 48px; margin: 0; }
.cards.styles .card .ln { grid-column: 1 / -1; font-size: 13px; }
.card .tag { font-size: 13px; color: var(--ink2); font-weight: 500; line-height: 1.35; }
.card .ln { font-size: 14px; color: var(--ink2); line-height: 1.4; }
.card .warnln { color: #8a5a00; }
.card .price { font-size: 14px; margin-top: auto; padding-top: 6px; }
.card .price small { display: block; color: var(--ink2); font-size: 13px; }
.card.light .ph { position: relative; display: block; margin: -14px -14px 6px; border-radius: 11px 11px 0 0; overflow: hidden; background: #f6f2ea; border-bottom: 1px solid var(--line); }
.card.light .ph svg { width: 100%; height: auto; display: block; }
.cw { display: flex; flex-direction: column; gap: 6px; }
.cw > .card { flex: 1; }
.cw.none { grid-column: 1 / -1; }
.photos { font-size: 14px; color: var(--navy); padding: 2px 4px; align-self: flex-start; }
/* light options: the card and its "Photos and details" link are one box */
.cards.lights .cw:not(.none) { background: #fff; border: 1px solid #d8d2c6; border-radius: var(--r-sm); gap: 0; overflow: hidden; }
.cards.lights .cw:not(.none) > .card.pick { border: 0; border-radius: 0; box-shadow: none; background: transparent; }
.cards.lights .cw.on:not(.none) { border-color: var(--rust); box-shadow: 0 0 0 1.5px var(--rust) inset; background: #fffaf7; }
.cards.lights .cw:not(.none):has(.offfit) { background: #f7f5f1; }
@media (hover: hover) { .cards.lights .cw:not(.none):not(.on):hover { border-color: var(--copper); } }
.cards.lights .cw > .photos { padding: 0 14px 10px; font-size: 13px; }
.moreopts { grid-column: 1 / -1; }
.moreopts > summary { cursor: pointer; color: var(--navy); text-decoration: underline; font-size: 14px; padding: 4px 0; list-style: none; }
.moreopts > summary::-webkit-details-marker { display: none; }
.moreopts > summary small { color: var(--ink2); text-decoration: none; display: inline-block; }
.moreopts[open] > summary { margin-bottom: 8px; }
/* step 2: toe-kick and switch fold into one line until opened */
.extras { margin: 18px 0 0; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.extras > summary { list-style: none; cursor: pointer; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 14px 18px; }
.extras > summary::-webkit-details-marker { display: none; }
.extras .xt { font-weight: 700; font-size: 17px; }
.extras .xs { color: var(--ink2); font-size: 14px; }
.extras .xc { margin-left: auto; color: var(--navy); text-decoration: underline; font-size: 14px; }
.extras[open] .xc { display: none; }
.extras > .q { border: 0; border-top: 1px solid var(--line); border-radius: 0; margin: 0; box-shadow: none; }
/* step 3 on smaller screens: the total and the cart stay in reach */
.buybar { display: none; }
@media (max-width: 999px) {
  .buybar { display: flex; align-items: center; gap: 10px; position: sticky; bottom: 0; z-index: 5; background: var(--cream); border-top: 1px solid var(--line); box-shadow: 0 -6px 12px -8px rgba(53, 49, 46, .25); padding: 10px 0; }
  .buybar .runtotal { margin: 0; display: flex; flex-direction: column; line-height: 1.2; font-size: 12px; flex: none; }
  .buybar .kbtn.primary { flex: 1 1 auto; min-height: 48px; font-size: 14px; }
}
button.link.quick { padding: 0; }
.buybar.away { display: none !important; }
.print-only { display: none; }
/* step 2: a small picture of their own wall with the picked lights, so the choice isn't abstract */
.preview { max-width: 620px; margin: 0 0 14px; padding: 10px 12px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.preview .pv-t { margin: 0 0 6px; font-size: 14px; font-weight: 600; color: var(--ink2); }
.preview .draw { pointer-events: none; }
@media (min-width: 721px) { .card.light .ph svg { max-height: 112px; } }
/* desktop: the preview sits beside the intro, so the light cards stay near the top */
@media (min-width: 900px) {
  .s2top { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 20px; align-items: start; margin-bottom: 12px; }
  .s2top .intro { margin: 0; }
  .s2top .preview { margin: 0; max-width: none; padding: 8px 10px; }
}
@media print { .print-only { display: inline; } }
.seltag, .card .cap, .plain-m { display: none; }
/* desktop: the light options fill the row however many there are (--n is set on the row) */
@media (min-width: 721px) { .cards.lights { grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); } }
.headsup { margin: 6px 0 0; padding: 8px 12px; background: #fdf3e2; border: 1px solid #ecd3a4; border-radius: var(--r-sm); font-size: 14px; }
.headsup .link { font-size: 14px; padding: 0 2px; }
.extras .xh { flex-basis: 100%; color: var(--ink2); font-size: 13px; }
.card.light.none { background: #fff; }
.badge-rec { position: absolute; left: 8px; bottom: 8px; background: var(--navy); color: #fff; font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 999px; }
/* "No lights here": a normal choice with a radio circle, not a greyed bar */
.card.light.none { grid-column: 1 / -1; justify-self: start; min-height: 44px; padding: 10px 18px 10px 42px; background: #fff; }
.card.light.none::before { content: ""; position: absolute; left: 14px; top: 50%; width: 16px; height: 16px; margin-top: -8px; border: 2px solid #b8b0a4; border-radius: 50%; background: #fff; }
.card.light.none.on::before { border-color: var(--rust); box-shadow: inset 0 0 0 3px #fff; background: var(--rust); }
.card.light.none.on::after { display: none; }
.card.light.none .nm { font-weight: 600; color: var(--ink); font-size: 15px; padding-right: 0; }
.warnln { color: #8a5a00; font-size: 14px; margin: 8px 0 0; }
.sub { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.qty { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.qty b { min-width: 20px; text-align: center; font-size: 18px; }

/* wall editor */
.wallcard { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin: 0 0 12px; background: var(--cream); }
.wallhead { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.wallhead .muted { font-size: 14px; }
.draw { width: 100%; margin: 0 0 10px; touch-action: pan-y; }
.draw svg { display: block; height: auto; margin: 0 auto; }
.tiles { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tile { position: relative; min-width: 66px; min-height: 58px; padding: 6px 8px; border: 1.5px solid var(--line); border-radius: var(--r-md); background: #fff; cursor: pointer; font: inherit; color: var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.2; }
.tile b { font-size: 16px; }
.tile small { font-size: 12px; color: var(--ink2); }
/* open spaces and appliances: a solid tile (dashed read as disabled), a slightly warmer fill to tell them apart */
.tile.k-gap { background: #faf7f1; border-style: solid; }
.tile.k-glass { background: #eef4f7; }
.tile.on { border-color: var(--rust); box-shadow: 0 0 0 1.5px var(--rust) inset; }
.tile i { position: absolute; top: 2px; right: 4px; font-style: normal; color: var(--ok); font-size: 12px; font-weight: 700; }
.tile.add { color: var(--rust); border: 1px solid #d8d2c6; font-weight: 600; }
.editor { margin-top: 12px; background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--rust); border-radius: var(--r-sm); padding: 14px 16px; box-shadow: 0 2px 10px rgba(53, 49, 46, .08); }
.ed-row { margin-bottom: 12px; }
.lbl { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; margin-bottom: 6px; flex-wrap: wrap; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip { min-height: 40px; min-width: 44px; padding: 6px 12px; border-radius: var(--r-sm); border: 1px solid #d8d2c6; background: #fff; font: inherit; font-size: 14px; color: var(--ink); cursor: pointer; }
@media (hover: hover) { .chip:not(.on):hover { border-color: var(--copper); } }
.chips details.more > summary { list-style: none; display: inline-flex; align-items: center; color: var(--navy); }
.chips details.more > summary::-webkit-details-marker { display: none; }
.chips details.more[open] { flex-basis: 100%; }
.chips details.more[open] > summary { display: none; }
.chip.on {background: var(--rust); border-color: var(--rust); color: #fff; }
.other, .meas { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink2); }
.other input, .meas input { width: 116px; min-height: 40px; font: inherit; font-size: 16px; padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; color: var(--ink); transition: border-color .15s; }
.other input:focus, .meas input:focus { outline: none; border-color: var(--rust); box-shadow: 0 0 0 3px var(--rust-weak); }
.meas input::placeholder { color: #9a948c; }
.ed-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.ed-acts .primary { margin-left: auto; }

/* step 1: four cabinet styles, the stage, appliances, measured openings */
.cards.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cw.style { position: relative; }
.cw.style > .tip { position: absolute; top: 8px; right: 8px; z-index: 2; }
.cw.style > .tip[open] { left: 8px; right: 8px; }
.cw.style > .tip[open] summary { margin-left: auto; }
.cards.four .card.pick { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 12px 10px; height: 100%; }
.cards.four .card .ill svg { width: 96px; height: 94px; margin: 0 auto 4px; }
.cards.four .card .nm { padding-right: 0; }
.cards.four .card.pick.on::after { left: 8px; right: auto; }
.card .ill .ip { fill: none; stroke: #c9bfb1; stroke-width: 1; }
.card .ill .if3 { fill: #e9e2d6; }
.card .ill .if2 { fill: #d9cfc0; }
.card .ill .is { fill: #b9ad9c; }
.card .ill .inset { fill: #fff; }
.card.pick.offfit { background: #faf8f4; }
.card.pick.offfit .ph, .card.pick.offfit .nm, .card.pick.offfit .price { opacity: .6; }
.card .ill .ifr { fill: #b98a5e; stroke: #6b5440; stroke-width: 1.2; }
.card .ill .iin { fill: #f6f2ea; stroke: #a99b89; stroke-width: .8; }
.card .ill .ishelf { stroke: #cfc5b6; stroke-width: 1; }
.card .ill .open { fill: #fbfaf7; }
.framenote { margin: 12px 0 0; padding: 10px 14px; border-left: 3px solid var(--copper); background: var(--warm); border-radius: 0 var(--r-md) var(--r-md) 0; font-size: 14px; color: var(--ink); }
.framenote.conf { border-color: var(--navy); background: #eef1f4; }
.framenote p { margin: 0; }
.framenote .nums { margin-top: 4px; font-size: 13px; color: var(--ink2); }
.framenote .nums summary { cursor: pointer; color: var(--navy); text-decoration: underline; text-underline-offset: 2px; width: max-content; }
.framenote .nums p { margin-top: 4px; }
.stage { background: var(--stage); border-radius: var(--r-md); padding: 12px; margin: 0 0 8px; }
.stage .draw { margin: 0; }
.stage .wallsvg { background: #fff; box-shadow: 0 1px 3px #35312e1f, 0 6px 18px #35312e14; }
.openkey { margin: 0 0 10px; font-size: 13px; color: var(--ink2); }
.openkey p { margin: 0 0 4px; }
.openkey b { color: var(--ink); }
.okkey { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 12px; }
.okkey span { display: inline-flex; align-items: center; gap: 6px; }
.sw-k { display: inline-block; width: 22px; height: 12px; border-radius: 999px; background: #fff; border: 1px dashed #8a837b; }
.sw-k.meas { border: 1px solid var(--ok); background: #eaf5ee; }
.otag-k { display: inline-block; padding: 1px 8px; border-radius: 999px; border: 1px dashed #8a837b; background: #fff; color: var(--ink2); font-size: 12px; font-weight: 600; }
.otag-k.meas { border: 1px solid var(--ok); background: #eaf5ee; color: var(--ok); }
.wallcard .sub { margin-top: 12px; padding-top: 0; border-top: 0; }
.wallcard .sub h4, .sub h4 { font: 600 11px/1.2 var(--body); letter-spacing: .06em; text-transform: uppercase; color: var(--ink2); margin: 0 0 6px; }
.addappl { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }
.addappl .lbl { margin: 0 4px 0 0; font-size: 13px; color: var(--ink2); }
.addappl .chip { color: var(--rust); font-weight: 600; }
.tile.appl { background: #f1f3f4; }
.addpick { position: relative; }
.addpick > summary { list-style: none; height: 100%; }
.addpick > summary::-webkit-details-marker { display: none; }
.addpick .pickmenu { position: absolute; z-index: 5; top: calc(100% + 4px); right: 0; display: flex; flex-direction: column; gap: 4px; min-width: 160px; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm); box-shadow: 0 4px 16px rgba(53, 49, 46, .14); }
.addpick .pickmenu .chip { text-align: left; }
.tile i.m { color: var(--ok); }
/* "typical" / "no light": a small line of its own under the cabinet name, clear of the size */
.tile i.t { position: static; display: block; order: 3; color: #6f6860; font-weight: 600; font-size: 10.5px; line-height: 1.2; margin-top: 1px; }
.editor .eyebrow { margin-bottom: 8px; }
.measgrid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 14px; align-items: start; margin-top: 8px; }
.measrow .help.small { margin: 4px 0 2px; }
/* the how-to-measure drawing always shows, small, beside the box */
.measline { display: flex; gap: 12px; align-items: flex-start; }
.measthumb .measart { width: 124px; }
.howmeas .measgrid { display: block; margin-top: 4px; }
.howmeas > summary { cursor: pointer; color: var(--navy); text-decoration: underline; font-size: 14px; display: inline-block; padding: 4px 0; }
.measart { width: 220px; height: auto; display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); }
.measrow .help { margin-top: 6px; }
.okc { color: var(--ok); }
.alignhint { margin: 0 0 8px; padding: 8px 12px; border-left: 3px solid #c99a1e; background: #fdf6e3; border-radius: 0 var(--r-md) var(--r-md) 0; font-size: 14px; }

/* the drawing */
.wallsvg text { font-family: var(--body); }
.wallsvg .wallbg { fill: #fff; }
.wallsvg .scene { pointer-events: none; }
.wallsvg .dim rect { fill: #fff; stroke: var(--ink); stroke-width: 1; vector-effect: non-scaling-stroke; }
.wallsvg .dim text { fill: var(--ink); font-weight: 600; }
.wallsvg .otag rect { fill: #fff; stroke: #8a837b; stroke-width: 1; stroke-dasharray: 3 2; vector-effect: non-scaling-stroke; }
.wallsvg .otag text { fill: var(--ink2); font-weight: 600; }
.wallsvg .otag.meas rect { fill: #eaf5ee; stroke: var(--ok); stroke-dasharray: none; }
.wallsvg .otag.meas text { fill: var(--ok); }
.wallsvg .selbox { fill: var(--rust-weak); stroke: var(--rust); stroke-width: 2.5; vector-effect: non-scaling-stroke; pointer-events: none; }
[data-mode="cab"] .wallsvg .up, [data-mode="cab"] .wallsvg .bs { cursor: pointer; }
@media (hover: hover) { [data-mode="cab"] .wallsvg .up:hover .hit, [data-mode="cab"] .wallsvg .bs:hover .hit { fill: #b8866e22; } }
.wallsvg .up.dark .hit { fill: #35312e14; }
.wallsvg .floor { stroke: #b9b0a4; stroke-width: 2; vector-effect: non-scaling-stroke; }
.wallsvg .box { fill: #fff; stroke: #7d766e; stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.wallsvg .box.filler { fill: #efe9df; }
.wallsvg .door { fill: #fdfcfa; stroke: #b5ada2; stroke-width: 1; vector-effect: non-scaling-stroke; }
.wallsvg .door.glass { fill: #dfeaf0; }
.wallsvg .gapbox { fill: none; stroke: #cfc6b9; stroke-width: 1; stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; }
.wallsvg .hood { fill: #ebe6de; stroke: #b5ada2; stroke-width: 1; vector-effect: non-scaling-stroke; }
.wallsvg .window { fill: #e4eef3; stroke: #b5c6cf; stroke-width: 1; vector-effect: non-scaling-stroke; }
.wallsvg .shelf { fill: #d9cdbd; stroke: #a99b89; stroke-width: 1; vector-effect: non-scaling-stroke; }
.wallsvg .hit { fill: transparent; }
.wallsvg .base rect:first-child { fill: #f3efe8; stroke: #a69e93; stroke-width: 1; vector-effect: non-scaling-stroke; }
.wallsvg .base .toe { fill: #ddd6cb; }
.wallsvg .counter { fill: #cfc3b3; }
.wallsvg .wlabel { fill: var(--ink); font-weight: 700; }
.wallsvg .muted { fill: #7d766e; }
.wallsvg .up { cursor: default; }
[data-mode="cab"] .wallsvg .up { cursor: pointer; }
[data-mode="cab"] .wallsvg .up:hover .box, [data-mode="cab"] .wallsvg .up:hover .gapbox { stroke: var(--copper); stroke-width: 2; }
.wallsvg .up.sel .box, .wallsvg .up.sel .gapbox { stroke: var(--rust); stroke-width: 3; }
.wallsvg .lamp { fill: var(--glow); stroke: #c99a1e; stroke-width: 1; vector-effect: non-scaling-stroke; }
.wallsvg .cones { opacity: .42; }
.wallsvg .cone { fill: url(#cone-fade); }
.wallsvg .joint { fill: var(--ink); }
.wallsvg .light { cursor: pointer; }
.wallsvg [data-drag] { cursor: grab; touch-action: none; }
/* the tapped light (and the others in its list row): a brighter light with a dark outline and a glow ring on its
   number, not red, which reads as an error next to the yellow lights */
.wallsvg .light.sel .lamp { fill: #ffd76a; filter: drop-shadow(0 0 4px #f2b531); }
.wallsvg .badge circle { fill: var(--ink); }
.wallsvg .badge text { fill: #fff; font-weight: 700; }
.wallsvg .badge.sel circle { fill: var(--ink); stroke: #f2b531; stroke-width: 3; vector-effect: non-scaling-stroke; }
.wallsvg .wire { fill: none; stroke: var(--rust); stroke-width: 3; stroke-dasharray: 7 4; vector-effect: non-scaling-stroke; opacity: 1; }
.wallsvg .hubbox { fill: var(--navy); }
.wallsvg .link { stroke: var(--ink); stroke-width: 3; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.wallsvg .tag rect { fill: #fff; stroke: var(--rust); stroke-width: 1; vector-effect: non-scaling-stroke; }
.wallsvg .tag text { fill: var(--rust); font-weight: 700; }
.wallsvg .hublabel { fill: var(--navy); font-weight: 700; }

/* plan page */
.summary { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; background: #fff; border: 1.5px solid var(--copper); border-radius: var(--r-lg); padding: 18px 20px; margin-bottom: 16px; }
.summary > div:first-child { display: flex; flex-direction: column; }
.summary .big { font: 400 34px/1.1 var(--heading); }
.summary small { font-size: 13px; }
.summary .warnln { flex-basis: 100%; margin: 0; }
.summary .acts .sm-only { display: none; }
.summary .basis { flex-basis: 100%; margin: 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink2); }
.summary .basis b { color: var(--ink); }
.summary .basis .link { padding: 0 2px; font-weight: 600; }

/* Workspace: like the Elevation Drawing App, the drawing is the big thing on the left and the settings sit in a
   panel on the right (desktop). On a phone the drawing comes first on the plan page. */
.panel { border-radius: var(--r-sm); }
.panel > .eyebrow { margin-bottom: 2px; }
.panel > h3 { font: 400 22px/1.2 var(--heading); }
@media (min-width: 1000px) {
  .workspace { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 16px; align-items: start; margin-bottom: 16px; }
  .workspace > .side { grid-column: 2; grid-row: 1; position: sticky; top: 12px; margin: 0; }
  .workspace > .mainc { grid-column: 1; grid-row: 1; margin: 0; min-width: 0; }
  .workspace > .mainc > .q:last-child { margin-bottom: 0; }
  /* step 1: the cabinet style is the first question, so it sits on the left where reading starts */
  .workspace:not(.plan) { grid-template-columns: 330px minmax(0, 1fr); }
  .workspace:not(.plan) > .side { grid-column: 1; }
  .workspace:not(.plan) > .mainc { grid-column: 2; }
  .workspace .panel .cards.four { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .workspace .panel .cards.four .card.pick { padding: 10px 8px; }
  .workspace .panel .cards.four .card .ill svg { width: 60px; height: 58px; }
  .workspace .panel .cards.four .card .nm { font-size: 14px; }
  .workspace .panel .cards.four .card .tag { font-size: 12px; line-height: 1.3; }
  .summary.side { flex-direction: column; align-items: stretch; gap: 12px; padding: 16px; }
  .summary.side .acts { display: flex; flex-direction: column; gap: 8px; }
  .summary.side .acts .kbtn { width: 100%; }
  .summary.side .basis { padding-top: 10px; }
}
@media (max-width: 999px) {
  .workspace.plan { display: flex; flex-direction: column; }
  .workspace.plan > .mainc { order: -1; }
}
@media print { .workspace { display: block !important; } .workspace > .side { position: static; } }
.acts { display: flex; flex-wrap: wrap; gap: 8px; }
.notes .noteg { border-left: 4px solid; border-radius: 0 var(--r-md) var(--r-md) 0; padding: 10px 14px; margin-bottom: 10px; }
.notes .noteg ul { margin: 0; padding-left: 18px; }
.notes .noteg li { margin: 4px 0; }
.notes .noteg li .kbtn { margin: 6px 0 2px; }
.noteg.warn { border-color: var(--bad); background: #fdeeec; }
.noteg.conf { border-color: var(--navy); background: #eef1f4; }
.noteg.tipn { border-color: var(--copper); background: var(--warm); }
.flow { list-style: none; padding: 0; margin: 4px 0 6px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; counter-reset: f; }
.flow li { position: relative; background: var(--cream); border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.flow li span { font-size: 13px; color: var(--ink2); }
.flow li b { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 15px; }
.flow li:not(:last-child)::after { content: "→"; position: absolute; right: -9px; top: 50%; transform: translateY(-50%); color: var(--rust); font-weight: 700; z-index: 1; }
.wallplan .draw { margin: 6px 0 4px; }
.lightlist { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; }
.lightlist li { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--cream); }
.lightlist li.on { border-color: var(--rust); background: #fffaf7; }
.lrow { width: 100%; display: flex; gap: 10px; align-items: center; text-align: left; background: none; border: 0; padding: 8px 10px; min-height: 44px; font: inherit; color: inherit; cursor: pointer; }
.lrow { align-items: flex-start; }
.lrow .lt { display: flex; flex-direction: column; gap: 2px; }
.lrow .lt b { font-weight: 600; }
.lrow .lt small { font-size: 14px; color: var(--ink2); line-height: 1.4; }
.lrow .ns { flex: none; display: flex; gap: 4px; }
.lrow .verdict { font-size: 14px; color: var(--ok); font-weight: 600; }
.lrow .verdict.warn { color: #8a5a00; }
.lrow .verdict.typ { color: var(--ink); }
.lrow .verdict.typ::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 6px; border: 1.5px dashed #8a837b; border-radius: 50%; vertical-align: -1px; }
.lightlist .why { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.lrow .math { display: none; }
.lightlist li.on .math { display: block; margin-top: 2px; }
.lrow .more { font-size: 13px; color: var(--navy); text-decoration: underline; }
.lightlist li.on .more { display: none; }
.why { padding: 0 12px 8px 46px !important; }
.legend { list-style: none; padding: 0; margin: 4px 0 0; display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 14px; color: var(--ink2); }
.legend li { display: flex; align-items: center; gap: 6px; }
.legend .sw { display: inline-block; flex: none; width: 22px; height: 8px; }
.legend .sw.lamp { background: var(--glow); border: 1px solid #c99a1e; border-radius: 3px; }
.legend .sw.hub { width: 16px; height: 10px; background: var(--navy); border-radius: 2px; }
.legend .sw.wire { height: 0; border-top: 2px dashed var(--rust); }
/* linked panels: a yellow light with the small dark join mark in the middle, as in the drawing */
.legend .sw.link { height: 8px; background: linear-gradient(90deg, var(--glow) 42%, var(--ink) 42% 58%, var(--glow) 58%); border: 1px solid #c99a1e; border-radius: 3px; }
.shoplist .set { font-size: 14px; font-weight: 600; color: var(--olive); }
.lrow .n { flex: 0 0 26px; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.lightlist li.on .n { background: var(--ink); box-shadow: 0 0 0 3px #f2b531; }
.why { padding: 0 12px 10px 46px; font-size: 15px; }
.why p { margin: 0 0 8px; }
.darkrow { font-size: 14px; color: var(--ink2); margin: 10px 0 0; }
.shoplist { list-style: none; padding: 0; margin: 0; }
.shoplist li { display: grid; grid-template-columns: 80px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.shoplist .thumb { position: relative; display: block; width: 80px; height: 80px; border-radius: var(--r-md); overflow: hidden; background: var(--warm); text-decoration: none; }
.shoplist .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shoplist .ph-fallback { display: none; }
.shoplist .thumb.noimg img { display: none; }
.shoplist .thumb.noimg .ph-fallback { display: grid; place-items: center; height: 100%; padding: 6px; text-align: center; font-size: 11px; line-height: 1.25; color: var(--ink2); border: 1px dashed var(--copper); border-radius: var(--r-md); }
.shoplist .info { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.shoplist .pname { font-weight: 700; color: var(--ink); text-decoration: underline; text-decoration-color: var(--copper); text-underline-offset: 3px; }
.shoplist .pname::after { content: "\00a0↗"; color: var(--rust); font-size: 13px; }
.shoplist .opt { font-size: 14px; }
.shoplist .for { font-size: 13px; color: var(--ink2); }
.lnum { display: inline-grid; place-items: center; width: 20px; height: 20px; margin-right: 3px; border-radius: 50%; background: var(--ink); color: #fff; font: 700 11px/1 var(--body); font-style: normal; vertical-align: 1px; }
.shoplist .sku { display: none; overflow-wrap: anywhere; }
@media print { .shoplist .sku { display: inline; } }
.shoplist .brand { color: #8a837b; }
.shoplist .thumb .szt { position: absolute; left: 0; right: 0; bottom: 0; padding: 2px 4px; background: rgba(53, 49, 46, .82); color: #fff; font-size: 11px; font-weight: 700; text-align: center; line-height: 1.3; }
.shoplist .thumb .settag { position: absolute; left: 4px; bottom: 4px; padding: 1px 6px; border-radius: 4px; background: rgba(53, 49, 46, .82); color: #fff; font-size: 11px; font-weight: 700; }
.shoplist .amt { display: flex; flex-direction: column; align-items: flex-end; white-space: nowrap; }
.shoplist .amt .each { font-size: 14px; color: var(--ink2); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.shoplist .amt b { font-size: 17px; }
.askus { margin: 14px 0 0; padding: 12px 14px; background: #eef1f4; border-radius: var(--r-md); }
.askus ul { margin: 0; padding-left: 18px; }
.shoptotal { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0; font-size: 18px; }
.shoptotal b { font: 400 30px/1 var(--heading); }
.fine ul { margin: 0; padding-left: 18px; color: var(--ink2); }
.fine li { margin: 4px 0; }
.printhead { display: none; }
.embed .hero h1 { display: none; }
.embed .kp { padding-top: 4px; }
.foot { text-align: center; color: var(--ink2); font-size: 13px; padding: 16px 0 0; }

/* phones */
@media (max-width: 720px) {
  .kp { padding: 12px 12px 24px; }
  h1 { font-size: 24px; margin-bottom: 0; }
  .hero { padding: 0 0 6px; }
  .hero .sub { display: none; }
  h2 { font-size: 25px; }
  .q { padding: 14px; border-radius: 12px; }
  .stepper { gap: 6px; }
  .stepper button { flex-direction: column; text-align: center; gap: 4px; padding: 8px 4px; }
  .stepper small { display: none; }
  .stepper b { font-size: 13px; }
  .cards.three { grid-template-columns: 1fr; }
  .cards.four { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .cards.four .card .ill svg { width: 80px; height: 78px; }
  .cards.four .card .tag { font-size: 12px; }
  .wallcard { padding: 10px 6px; }
  .wallcard > :not(.stage) { margin-left: 4px; margin-right: 4px; }
  .stage { padding: 4px; margin: 0 0 8px; }
  .measgrid { grid-template-columns: 1fr; gap: 8px; }
  .measart { width: 100%; max-width: 260px; }
  .measthumb .measart { width: 104px; }
  .measline .meas input { width: 100px; }
  .cards.three .card.pick { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; }
  .cards.three .card .ill { grid-row: span 3; }
  .cards.three .card .ill svg { width: 64px; height: 48px; }
  .cards.three .card .ln { grid-column: 1 / -1; }
  /* light options: one per row, the drawing as a short strip across the top at a readable size */
  .cards.lights { grid-template-columns: 1fr; gap: 10px; }
  /* compact rows: small picture on the left, name, one line and the price on the right of it */
  .card.light:not(.none) { display: grid !important; grid-template-columns: 104px minmax(0, 1fr); column-gap: 10px; row-gap: 2px; padding: 8px 34px 8px 10px; align-items: start; }
  .card.light:not(.none) > * { grid-column: 2; }
  .card.light .ph { grid-column: 1; grid-row: 1 / span 6; margin: 0; border: 1px solid var(--line); border-radius: var(--r-sm); background: #f6f2ea; }
  .card.light .ph svg { height: 70px; width: 102px; }
  .card.light .ph .badge-rec { position: static; display: block; border-radius: 0; font-size: 10px; padding: 2px 4px; text-align: center; }
  .card .nm { font-size: 15px; }
  .card.light .ln { font-size: 13px; }
  .card .price { padding-top: 4px; }
  /* cabinet styles: four small picture tiles in one row; how to tell the picked one apart goes on one line under
     them, so the kitchen drawing shows on the first screen */
  .cards.four.styles { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .cards.four.styles .card.pick { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 6px 2px 8px; min-height: 0; gap: 2px; }
  .cards.four.styles .card .ill svg { width: 54px; height: 52px; margin: 0 auto; }
  .cards.four.styles .card .nm { font-size: 12px; line-height: 1.2; padding: 0; }
  .cards.four.styles .card .tag, .cw.style > .tip { display: none; }
  .cards.four.styles .card.pick.on::after { display: none; }
  .seltag { display: inline !important; }
  /* phone: the style note is one line (how to tell); what it means for the lights opens under "How we size it",
     except for inset and frameless, where the "send us your plan" note stays in view */
  .framenote:not(.conf) .plain { display: none; }
  .framenote:not(.conf) .plain-m { display: inline; }
  .cards.four.styles .card .cap { display: block; font-size: 10.5px; line-height: 1.25; color: var(--ink2); }
  .side h3 { font-size: 22px; }
  .side .eyebrow { display: none; }
  .framenote .nums { margin-top: 2px; }
  /* light pictures are small on the phone: the line under the name says the same, so drop the tiny caption */
  .card.light .ph svg text { display: none; }
  .nav .kbtn.primary { flex: 1 1 100%; min-width: 0; order: -1; }
  .nav .kbtn.outline { flex: 1; }
  /* the sticky bar on steps 1 and 2: just the total and Next (Back is in the steps at the top) */
  .nav.sticky .kbtn.outline, .nav.sticky > span:empty { display: none; }
  [data-step="2"] > .nav.sticky { flex-wrap: nowrap; }
  [data-step="2"] > .nav.sticky .kbtn.primary { flex: 1 1 auto; order: 2; min-height: 48px; font-size: 13px; padding: 8px 10px; }
  [data-step="2"] > .nav.sticky .runtotal { margin: 0; display: flex; flex-direction: column; line-height: 1.2; font-size: 12px; flex: none; }
  .summary { padding: 14px; }
  .summary .acts .kbtn.primary { flex: 1 1 100%; }
  .summary .acts .kbtn.outline { flex: 1 1 40%; min-height: 40px; font-size: 12px; padding: 6px 8px; white-space: nowrap; }
  .summary .acts .lg { display: none; }
  .summary .acts .sm-only { display: inline; }
  .card.pick.on::after { top: 6px; right: 6px; }
  .flow { grid-template-columns: 1fr; gap: 14px; }
  .flow li:not(:last-child)::after { content: "↓"; right: auto; left: 50%; top: auto; bottom: -15px; transform: translateX(-50%); }
  .shoplist li { grid-template-columns: 64px minmax(0, 1fr); gap: 10px; }
  .shoplist .thumb { width: 64px; height: 64px; }
  .shoplist .amt { grid-column: 2; flex-direction: row; justify-content: space-between; align-items: baseline; }
  .shop .acts .kbtn { flex: 1 1 100%; }
  .ed-acts .kbtn { flex: 1 1 0; min-width: 0; padding: 8px 6px; font-size: 13px; }
  .ed-acts .primary { margin-left: 0; flex-basis: 100%; font-size: 15px; }
}

/* print: a clean plan on paper or PDF */
@media print {
  @page { margin: 14mm; }
  body { background: #fff; font-size: 12px; }
  .kp { max-width: none; padding: 0; }
  .hero, nav, .nav, .hide-print, .acts, .summary .acts, .tip, .quick, .foot, .why, .notes .kbtn, .noteg .kbtn, .photos { display: none !important; }
  .kp { padding: 0 2mm; }
  h2 { font-size: 20px; }
  .printhead { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--ink2); border-bottom: 2px solid var(--rust); padding: 0 0 8px; margin-bottom: 10px; }
  .printhead .wordmark { font: 400 22px/1.1 var(--heading); color: var(--ink); }
  .lightlist li.on { border-color: var(--line); background: var(--cream); }
  .lightlist li.on .n { background: var(--ink); box-shadow: none; }
  .wallsvg .light.sel .lamp { fill: var(--glow); stroke: #c99a1e; stroke-width: 1; filter: none; }
  .wallsvg .badge.sel circle { fill: var(--ink); stroke: none; }
  .lightlist { grid-template-columns: 1fr !important; }
  .lrow .lt b, .shoplist .pname { font-size: 13px; }
  .lrow .lt small, .shoplist .opt, .shoplist .set, .shoplist .for, .shoplist .amt .each, .legend, .help, .fine li, .noteg li { font-size: 12px; }
  .lrow { min-height: 0; padding: 5px 8px; }
  .lrow .math { display: block !important; }
  .lrow .verdict { font-size: 12px; }
  .q, .summary { border: 1px solid #ddd; box-shadow: none; padding: 10px 12px; margin: 0 0 10px; break-inside: avoid; }
  .shop { break-inside: auto; }
  .shoplist li { break-inside: avoid; grid-template-columns: 48px minmax(0, 1fr) auto; padding: 6px 0; }
  .shoplist .thumb { width: 48px; height: 48px; }
  .shoplist .pname::after { content: "\A" attr(data-short); white-space: pre-wrap; font-size: 10px; color: var(--ink2); font-weight: 400; }
  .flow { grid-template-columns: repeat(4, 1fr); }
  a { color: var(--ink); }
  .wallsvg .cones { opacity: .38; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
