/* Page reset (the page is served as a stand-alone document). */
body { margin: 0; font: 14px system-ui, sans-serif; }
img { max-width: 100%; }
[hidden] { display: none !important; }

/* ============================================================ tokens (single, deliberate dark theme) */
:root {
  color-scheme: dark;
  padding: 0;
  --bg-0: #131416;
  --bg-1: #1c1d20;
  --bg-2: #242529;
  --ink: #EEEAE3;
  --ink-soft: rgba(238, 234, 227, .80);
  --ink-2: #9C9A95;
  --ink-3: #8a8883;      /* ~5.3:1 on --bg-0 (small labels stay readable beside the homeowner) */
  --rule: rgba(238, 234, 227, .14);
  --rule-2: rgba(238, 234, 227, .26);
  --brass: #C9A467;
  --brass-soft: rgba(201, 164, 103, .16);
  --ok: #3DBE6A;
  --blue: #2E5E9E;
  --paper: #F3F1EC;
  --accent: var(--brass);
  --accent-soft: var(--brass-soft);
  --on-accent: #17140e;
  --card: rgba(24, 25, 28, .76);
  --card-line: rgba(238, 234, 227, .12);
  --scrim: 19, 20, 22;
  --f-display: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --f-body: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-mono: 'DM Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sa-t: env(safe-area-inset-top, 0px);
  --sa-r: env(safe-area-inset-right, 0px);
  --sa-b: env(safe-area-inset-bottom, 0px);
  --sa-l: env(safe-area-inset-left, 0px);
  --gut: clamp(16px, 2.8vw, 44px);
  --top-h: 78px;
  --bot-h: 112px;
  --panel-w: clamp(330px, 29vw, 440px);
  --aside-w: clamp(268px, 23vw, 340px);
  --num: clamp(68px, 12.6vh, 146px);
  --ease: cubic-bezier(.22, 1, .36, 1);
}
html, body { height: 100%; margin: 0; overflow: hidden; background: var(--bg-0); overscroll-behavior: none; }
body { color: var(--ink); font: 400 16px/1.5 var(--f-body); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; -webkit-tap-highlight-color: transparent; }
*, *::before, *::after { box-sizing: border-box; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ============================================================ stage + atmosphere */
#app { position: fixed; inset: 0; overflow: hidden; background: var(--bg-0); color: var(--ink); isolation: isolate; }
#stage { position: absolute; inset: 0; width: 100%; height: 100%; display: block; outline: none; touch-action: none; z-index: 0; }
#veil { position: absolute; inset: 0; background: var(--bg-0); opacity: 0; visibility: hidden; pointer-events: none; z-index: 1; }
.scrim, .vignette, .grain { position: absolute; inset: 0; pointer-events: none; }
.scrim { z-index: 2; transition: opacity .8s var(--ease);
  background:
    linear-gradient(90deg, rgba(var(--scrim), .92) 0%, rgba(var(--scrim), .80) 22%, rgba(var(--scrim), .34) 38%, rgba(var(--scrim), 0) 50%),
    linear-gradient(0deg, rgba(var(--scrim), .86) 0%, rgba(var(--scrim), 0) 20%),
    linear-gradient(180deg, rgba(var(--scrim), .62) 0%, rgba(var(--scrim), 0) 14%); }
#app[data-step="intro"] .scrim {
  background:
    linear-gradient(72deg, rgba(var(--scrim), .95) 0%, rgba(var(--scrim), .78) 30%, rgba(var(--scrim), .16) 55%, rgba(var(--scrim), 0) 66%),
    linear-gradient(0deg, rgba(var(--scrim), .9) 0%, rgba(var(--scrim), 0) 30%),
    linear-gradient(180deg, rgba(var(--scrim), .6) 0%, rgba(var(--scrim), 0) 14%); }
#app[data-frame="full"] .scrim {
  background:
    linear-gradient(0deg, rgba(var(--scrim), .86) 0%, rgba(var(--scrim), 0) 20%),
    linear-gradient(180deg, rgba(var(--scrim), .78) 0%, rgba(var(--scrim), 0) 26%); }
.vignette { z-index: 2; background: radial-gradient(120% 90% at 62% 46%, rgba(0,0,0,0) 55%, rgba(0,0,0,.34) 100%); }
.grain { z-index: 6; opacity: .075; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .5  0 0 0 0 .5  0 0 0 0 .5  0 0 0 1.1 -.05'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1.2s steps(5) infinite; inset: -60px; }
@keyframes grain { 0% { transform: translate(0, 0); } 20% { transform: translate(-22px, 14px); } 40% { transform: translate(18px, -26px); } 60% { transform: translate(-30px, -8px); } 80% { transform: translate(12px, 28px); } 100% { transform: translate(0, 0); } }
/* the shader already adds film grain; this full-screen blended layer is a laptop-only extra (it re-blends every frame) */
#app.coarse .grain, #app[data-quality="medium"] .grain, #app[data-quality="low"] .grain { display: none; }

/* ============================================================ drawing mood (permit): blueprint ink on paper */
#app[data-mood="drawing"] {
  --ink: #17263a; --ink-soft: rgba(23, 38, 58, .82); --ink-2: #566377; --ink-3: #8a93a0;
  --rule: rgba(46, 94, 158, .20); --rule-2: rgba(46, 94, 158, .36);
  --accent: var(--blue); --accent-soft: rgba(46, 94, 158, .12); --on-accent: #fff;
  --card: rgba(243, 241, 236, .84); --card-line: rgba(46, 94, 158, .22);
  --scrim: 243, 241, 236;
}
#app[data-mood="drawing"] .vignette { opacity: 0; }
#app[data-mood="drawing"] .grain { opacity: .05; mix-blend-mode: multiply; }
#app[data-mood="drawing"] .brand-logo.logo-mark { filter: brightness(0); }
#app[data-mood="drawing"] #veil { background: var(--paper); }

/* ============================================================ UI layer */
#ui { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
#ui > * { transition: opacity .45s var(--ease); }
#app.ui-hidden #ui > *:not(.unhide):not(.toast):not(.live):not(.hid-nav) { opacity: 0 !important; pointer-events: none !important; }
#app.ui-hidden .scrim { opacity: 0; }
#ui button, #ui a { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }

/* top bar */
.topbar { position: absolute; top: calc(var(--sa-t) + 18px); left: calc(var(--gut) + var(--sa-l)); right: calc(var(--gut) + var(--sa-r)); height: 46px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 13px; pointer-events: auto; min-width: 0; }
.brand-logo { height: 40px; width: auto; flex: none; transition: filter .6s; }
/* Company logo from the settings: a transparent logo is drawn as a one-color mark, a solid one sits on a light tile. */
.logo-mark { filter: brightness(0) invert(1); }
.logo-tile { background: #fff; border-radius: 7px; padding: 4px; box-sizing: border-box; }
.brand-txt { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.brand-name { font: 600 14px/1.1 var(--f-body); letter-spacing: .005em; white-space: nowrap; }
.brand-lic { font: 500 11px/1 var(--f-mono); letter-spacing: .08em; color: var(--ink-2); white-space: nowrap; }
.tools { display: flex; gap: 8px; pointer-events: auto; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--rule); background: rgba(var(--scrim), .38); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: var(--ink); display: grid; place-items: center; cursor: pointer; padding: 0; transition: border-color .25s, background .25s, color .25s, transform .2s var(--ease); }
.icon-btn:hover { border-color: var(--rule-2); background: rgba(238, 234, 227, .08); }
.icon-btn:active { transform: scale(.94); }
.ic { width: 18px; height: 18px; flex: none; }

/* ============================================================ intro hero */
.hero { position: absolute; left: calc(var(--gut) + var(--sa-l)); bottom: calc(var(--bot-h) + 5.5vh); width: min(780px, 60vw); pointer-events: auto; }
.hero-kicker { margin: 0 0 22px; font: 500 12px/1 var(--f-mono); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-2); display: flex; align-items: center; gap: 12px; }
.hero-kicker::before { content: ''; width: 28px; height: 1px; background: var(--accent); }
.hero-title { margin: 0; font-family: var(--f-display); font-weight: 800; font-stretch: 125%; font-size: clamp(46px, 6.5vw, 108px); line-height: .9; letter-spacing: -.038em; text-wrap: balance; }
.hero-title .acc { color: var(--accent); }
/* laptops and iPad landscape: the headline stays left of the room (the camera frames the room right of its text) */
@media (max-width: 1280px) and (min-width: 900px) and (min-aspect-ratio: 1/1) { .hero-title { font-size: clamp(46px, 5.2vw, 108px); } }
.hero-sub { margin: 26px 0 30px; max-width: 30em; font-size: 18px; line-height: 1.5; color: var(--ink-soft); }
.hero-row { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.btn-cta { height: 56px; padding: 0 26px 0 28px; border-radius: 999px; border: 0; background: var(--accent); color: var(--on-accent); font: 600 16px/1 var(--f-body); letter-spacing: .01em; display: inline-flex; align-items: center; gap: 14px; cursor: pointer; transition: transform .25s var(--ease), box-shadow .25s, background .25s; box-shadow: 0 10px 40px -12px rgba(201, 164, 103, .55); }
.btn-cta:hover { transform: translateY(-1px); background: #d4b378; }
.btn-cta:active { transform: translateY(0) scale(.98); }
.btn-cta .ic { width: 20px; height: 20px; }
.hero-facts { display: flex; gap: 26px; margin: 0; }
.hero-facts div { display: flex; flex-direction: column; gap: 6px; }
.hero-facts dt { font: 500 10.5px/1 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); }
.hero-facts dd { margin: 0; font: 500 15px/1.2 var(--f-body); }

/* masked words (headline rise) */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding: .08em .02em .1em; margin: -.08em -.02em -.1em; }
.wi { display: inline-block; will-change: transform; }

/* ============================================================ step panel */
#panel { position: absolute; left: calc(var(--gut) + var(--sa-l)); top: calc(var(--top-h) + var(--sa-t)); bottom: var(--bot-h); width: var(--panel-w); display: flex; flex-direction: column; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; pointer-events: none; touch-action: pan-y; }
#panel::-webkit-scrollbar { display: none; }
.p-inner { margin: auto 0; padding: 10px 0 14px; pointer-events: auto; }
#app[data-frame="full"] .p-inner { margin: 0 0 auto; }
.grab { display: none; }
.p-eyebrow { display: flex; align-items: center; gap: 12px; font: 500 12px/1 var(--f-mono); letter-spacing: .18em; text-transform: uppercase; color: var(--ink-2); min-height: 14px; }
.p-eyebrow .grp { color: var(--accent); }
.p-eyebrow .sep { width: 22px; height: 1px; background: var(--rule-2); }
.numeral { display: flex; align-items: flex-start; margin: 14px 0 10px -.05em; font-family: var(--f-display); font-weight: 800; font-stretch: 125%; font-size: var(--num); line-height: 1; letter-spacing: -.05em; font-variant-numeric: tabular-nums lining-nums; color: var(--ink); height: .84em; }
.numeral > span { display: inline-block; height: 1em; margin-top: -.09em; }
.n0 { position: relative; }
.n0 .slash { position: absolute; left: 50%; top: 47%; width: max(1.5px, .012em); height: .9em; background: var(--accent); transform: translate(-50%, -50%) rotate(32deg); border-radius: 2px; }
/* the rolling window is clipped to the digit glyph band (Archivo digits: 0.135–0.855em of the line box),
   so an outgoing digit disappears exactly at the cap line instead of leaving slivers above it */
.n1 { position: relative; overflow: hidden; clip-path: inset(.125em 0 .13em 0); }
.n1 .dg { display: block; }
.ndot { color: var(--ink); }
.p-head.no-num .numeral { display: none; }
.p-head.no-num .p-title { margin-top: 16px; font-size: clamp(34px, 2.6vw + 1.4vh, 56px); }
#app[data-step="compare"] { --panel-w: clamp(300px, 22vw, 340px); }
#app[data-step="compare"] .p-head.no-num .p-title { font-size: clamp(30px, 2vw + 1.2vh, 44px); }
.lead-card { max-width: 290px; align-self: flex-end; padding: 14px 16px; }
.lead-card .kv dd { font-size: 13px; }
.lead-card .kv > div { padding: 7px 0; }
.lead-card .kv > .ready-row { flex-direction: column; gap: 4px; }
.lead-card .ready-row dt { color: var(--accent); }
.lead-card .ready-row dd { text-align: left; font-size: 12.5px; color: var(--ink-soft); }
.p-title { margin: 0 0 16px; font-family: var(--f-display); font-weight: 760; font-stretch: 116%; font-size: clamp(27px, 1.9vw + 1.4vh, 46px); line-height: 1.02; letter-spacing: -.022em; text-wrap: balance; }
.p-lines p { margin: 0 0 9px; font-size: clamp(15px, .5vw + 1vh, 16.5px); line-height: 1.52; color: var(--ink-soft); text-wrap: pretty; }
.p-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; margin: 16px 0 0; }
.fact { border-top: 1px solid var(--rule); padding: 10px 0 8px; }
.fact dt { font: 500 10.5px/1 var(--f-mono); letter-spacing: .15em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 7px; }
.fact dd { margin: 0; font: 500 14px/1.35 var(--f-body); color: var(--ink); }

/* blocks inside the panel */
.blk { margin-top: 20px; }
.blk-h { display: flex; flex-wrap: wrap; row-gap: 4px; align-items: center; justify-content: space-between; gap: 4px 12px; font: 500 11px/1 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--accent); padding-bottom: 10px; border-bottom: 1px solid var(--rule); min-height: 21px; }
.blk-h2 { color: var(--ink-2); letter-spacing: .08em; text-transform: none; font-size: 11.5px; white-space: nowrap; display: inline-flex; align-items: center; gap: 10px; }
.blk-note { margin: 12px 0 0; font-size: 13px; line-height: 1.45; color: var(--ink-2); }
/* a promise placed directly under the step line (never hidden) */
.p-lead { margin: 4px 0 0; padding-left: 12px; border-left: 2px solid var(--accent); font: 500 14px/1.45 var(--f-body); color: var(--ink); text-wrap: pretty; }
.hint { display: flex; align-items: center; gap: 10px; }
.hint-ic { width: 18px; height: 18px; color: var(--accent); }

/* price parts */
.parts { list-style: none; margin: 0; padding: 0; }
.parts li { border-bottom: 1px solid var(--rule); }
.part { width: 100%; text-align: left; display: grid; grid-template-columns: 30px 1fr; gap: 3px 10px; padding: 10px 8px 10px 0; background: none; border: 0; cursor: pointer; position: relative; border-radius: 0; transition: background .3s; }
.part::before { content: ''; position: absolute; left: -14px; top: 10px; bottom: 10px; width: 2px; background: var(--accent); transform: scaleY(0); transition: transform .45s var(--ease); }
.part .pn { font: 500 12px/1.5 var(--f-mono); color: var(--ink-3); transition: color .3s; }
.part .pt { font: 600 15px/1.3 var(--f-body); color: var(--ink-soft); transition: color .3s; }
.part .pd { grid-column: 2; font-size: 13px; line-height: 1.38; color: var(--ink-2); }
.part.on::before { transform: scaleY(1); }
.part.on .pn { color: var(--accent); }
.part.on .pt { color: var(--ink); }
.part:hover { background: linear-gradient(90deg, var(--accent-soft), transparent 80%); }

/* permit layouts */
.layouts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lay { border: 1px solid var(--rule-2); border-radius: 12px; padding: 14px 14px 12px; display: flex; flex-direction: column; background: rgba(var(--scrim), .35); }
.lay-k { font: 500 10.5px/1 var(--f-mono); letter-spacing: .15em; text-transform: uppercase; color: var(--accent); }
.lay-v { font-family: var(--f-display); font-weight: 800; font-stretch: 125%; font-size: 44px; line-height: 1; letter-spacing: -.04em; margin-top: 12px; }
.lay-u { font: 500 11px/1 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); margin-top: 6px; }
.lay p { margin: 10px 0 0; font-size: 12.5px; line-height: 1.42; color: var(--ink-2); }

/* configurator ("Try a look"): one row per finish — name + current choice on the left, swatches on the right */
.cfg { display: grid; gap: 10px; margin-top: 12px; }
.cfg-row { display: grid; grid-template-columns: minmax(92px, 8.2em) 1fr; align-items: center; gap: 12px; }
.cfg-head { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cfg-k { font: 500 10.5px/1 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); }
.cfg-val { font: 500 13.5px/1.2 var(--f-body); color: var(--ink); transition: color .2s; }
.cfg-val.pv { color: var(--accent); }
.cfg-cap { margin: 10px 0 0; font-size: 12.5px; line-height: 1.4; color: var(--ink-2); min-height: 2.8em; }
.cfg-reset { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 10px 0 8px; margin: -6px 0; border-radius: 999px; border: 1px solid var(--rule-2); background: none; color: var(--ink); font: 500 11px/1 var(--f-mono); letter-spacing: .06em; cursor: pointer; transition: opacity .25s, border-color .25s; }
.cfg-reset:hover:not(:disabled) { border-color: var(--ink-2); }
.cfg-reset:disabled { opacity: .35; cursor: default; }
.cfg-reset-ic { width: 13px; height: 13px; }
.sw-list { display: flex; gap: 8px; margin: 0; flex-wrap: wrap; }
.sw { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--rule-2); padding: 3px; background: none; cursor: pointer; position: relative; transition: border-color .25s, transform .25s var(--ease); }
.sw:hover { transform: translateY(-1px); border-color: var(--ink-2); }
.sw[aria-checked="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.sw-face { display: block; width: 100%; height: 100%; border-radius: 7px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.18); }
.sw-round, .sw-round .sw-face { border-radius: 50%; }
.sw-marble .sw-face { background:
  linear-gradient(118deg, transparent 38%, rgba(128, 118, 104, .55) 39.5%, transparent 41.5%),
  linear-gradient(152deg, transparent 58%, rgba(168, 116, 64, .55) 59%, transparent 60.5%),
  linear-gradient(98deg, transparent 70%, rgba(140, 132, 120, .35) 71%, transparent 73%),
  linear-gradient(135deg, #f6f3ee, #e6e0d7); }
.sw-stone .sw-face { background:
  radial-gradient(circle at 30% 30%, rgba(255,255,255,.12) 0 2px, transparent 3px) 0 0 / 9px 9px,
  linear-gradient(0deg, rgba(0,0,0,.25) 0 1px, transparent 1px) 0 50% / 100% 50%,
  linear-gradient(135deg, #8e8a83, #6f6b65); }
.sw-white .sw-face { background:
  linear-gradient(90deg, rgba(0,0,0,.12) 0 1px, transparent 1px) 0 0 / 50% 12px,
  linear-gradient(90deg, rgba(0,0,0,.12) 0 1px, transparent 1px) 25% 12px / 50% 12px,
  linear-gradient(0deg, rgba(0,0,0,.14) 0 1px, transparent 1px) 0 0 / 100% 12px,
  linear-gradient(180deg, #fdfcfa, #eeebe6); }
.sw-sage .sw-face { background:
  linear-gradient(0deg, rgba(245,242,234,.9) 0 1px, transparent 1px) 0 0 / 100% 10px,
  linear-gradient(90deg, rgba(245,242,234,.9) 0 1px, transparent 1px) 0 0 / 22px 20px,
  radial-gradient(circle at 70% 25%, rgba(255,255,255,.28), transparent 50%),
  linear-gradient(135deg, #9fb49b, #7c947e); }
.sw-walnut .sw-face { background: repeating-linear-gradient(92deg, rgba(0,0,0,.14) 0 1px, transparent 1px 5px), linear-gradient(90deg, #5a3a25, #6f4731 45%, #533420 70%, #6a432d); }
.sw-oak .sw-face { background: repeating-linear-gradient(91deg, rgba(90,60,30,.16) 0 1px, transparent 1px 6px), linear-gradient(90deg, #cdb08a, #d9bf9b 50%, #c4a57d); }
.sw-mwhite .sw-face { background: linear-gradient(160deg, #f1efea, #e2dfd8); }
.sw-navy .sw-face { background: linear-gradient(160deg, #2c4263, #1b2a42); }
.sw-black .sw-face { background: radial-gradient(circle at 35% 30%, #4a4a4a, #161616 65%); }
.sw-brass .sw-face { background: radial-gradient(circle at 35% 30%, #f1dcaa, #c19a58 55%, #8f6c34); }
.sw-chrome .sw-face { background: radial-gradient(circle at 35% 30%, #ffffff, #c9cfd3 40%, #7d858b 75%, #d7dcdf); }

/* check-ups */
.checks { list-style: none; margin: 0; padding: 0; }
.ck { display: grid; grid-template-columns: 26px 1fr auto; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--rule); }
.ck-mark { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--rule-2); display: grid; place-items: center; transition: background .4s, border-color .4s; }
.ck-ic { width: 15px; height: 15px; stroke-width: 2.2; color: #fff; stroke-dasharray: 24; stroke-dashoffset: 24; transition: stroke-dashoffset .5s .15s var(--ease); }
.ck-txt { display: flex; flex-direction: column; gap: 3px; }
.ck-t { font: 600 14.5px/1.2 var(--f-body); }
.ck-d { font-size: 12.5px; color: var(--ink-2); line-height: 1.35; }
.ck-st { font: 500 10.5px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.ck.later .ck-t { color: var(--ink-2); }
.ck.next .ck-mark, .ck.now .ck-mark { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.ck.next .ck-st, .ck.now .ck-st { color: var(--accent); }
.ck.pass .ck-mark { background: var(--ok); border-color: var(--ok); box-shadow: 0 0 0 4px rgba(61, 190, 106, .16); }
.ck.pass .ck-ic { stroke-dashoffset: 0; }
.ck.pass .ck-st { color: var(--ok); }

/* living at home */
.lv { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.lv li { display: flex; flex-direction: column; gap: 5px; padding-top: 12px; }
.lv-ic { width: 18px; height: 18px; color: var(--accent); margin-bottom: 3px; }
.lv-k { font: 500 10px/1.2 var(--f-mono); letter-spacing: .13em; text-transform: uppercase; color: var(--ink-2); }
.lv-v { font: 500 13.5px/1.3 var(--f-body); }

/* payments (next) */
.pay { list-style: none; margin: 0; padding: 0; counter-reset: pay; }
.pay li { display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--rule); }
.pay-n { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--rule-2); display: grid; place-items: center; font: 500 12px/1 var(--f-mono); color: var(--ink-2); }
.pay li:first-child .pay-n { border-color: var(--accent); color: var(--accent); }
.pay-t { font: 500 14px/1.35 var(--f-body); display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.pay-tag { font: 500 11px/1 var(--f-mono); letter-spacing: .06em; color: var(--on-accent); background: var(--accent); padding: 5px 8px; border-radius: 999px; }
.pay-opts { margin-top: 10px; }
.pay-cap { margin-top: 10px; color: var(--ink-soft); }
.safe { display: flex; gap: 8px; align-items: center; }
.safe::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; }

/* ============================================================ right-side cards */
#aside { position: absolute; right: calc(var(--gut) + var(--sa-r)); top: calc(var(--top-h) + var(--sa-t) + 6px); bottom: calc(var(--bot-h) + 4px); width: var(--aside-w); display: flex; flex-direction: column; justify-content: flex-end; gap: 12px; pointer-events: none; overflow-y: auto; scrollbar-width: none; }
#aside::-webkit-scrollbar { display: none; }
#aside > * { pointer-events: auto; flex: none; }
.card { margin: 0; background: var(--card); border: 1px solid var(--card-line); border-radius: 14px; padding: 16px 18px; -webkit-backdrop-filter: blur(18px) saturate(1.15); backdrop-filter: blur(18px) saturate(1.15); box-shadow: 0 24px 60px -24px rgba(0, 0, 0, .65); }
.card-h { margin: 0 0 12px; font: 500 10.5px/1 var(--f-mono); letter-spacing: .17em; text-transform: uppercase; color: var(--accent); }
.kv { margin: 0; display: grid; gap: 0; }
.kv > div { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; border-bottom: 1px solid var(--rule); }
.kv > div:last-child { border-bottom: 0; }
.kv dt { font: 500 10.5px/1.4 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); flex: none; }
.kv dd { margin: 0; font: 500 13.5px/1.35 var(--f-body); text-align: right; }
.kv-stack > div { flex-direction: column; gap: 4px; }
.kv-stack dd { text-align: left; font-weight: 400; color: var(--ink-soft); font-size: 13px; }
.quote { margin: 10px 0 0; font: 600 14px/1.35 var(--f-body); color: var(--ink); padding-left: 12px; border-left: 2px solid var(--accent); }
.down { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--rule); display: flex; flex-direction: column; gap: 5px; }
.down-k { font: 500 10.5px/1 var(--f-mono); letter-spacing: .15em; text-transform: uppercase; color: var(--ink-2); }
.down-v { font-size: 13.5px; line-height: 1.4; }
.down-v b { color: var(--accent); font-weight: 600; }
.down-v + .down-k { margin-top: 8px; }
.war-later { margin-top: -4px; color: var(--ink); }
.q-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.q-list li { display: grid; grid-template-columns: 24px 1fr; gap: 8px; font-size: 14px; line-height: 1.4; }
.q-n { font: 500 11px/1.6 var(--f-mono); color: var(--accent); }
.ready { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); display: flex; flex-direction: column; gap: 5px; font-size: 13px; line-height: 1.35; }
.ready-k { font: 500 10.5px/1 var(--f-mono); letter-spacing: .15em; text-transform: uppercase; color: var(--accent); }
.alert-card { border-left: 2px solid var(--accent); }
.alert-k { font: 500 10.5px/1 var(--f-mono); letter-spacing: .15em; text-transform: uppercase; color: var(--accent); }
.alert-t { margin: 8px 0 6px; font-family: var(--f-display); font-stretch: 112%; font-weight: 720; font-size: 20px; line-height: 1.12; letter-spacing: -.01em; }
.alert-card p { margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--ink-soft); }
.photo-card { padding: 7px; width: min(100%, 212px); align-self: flex-end; }
.ph-img { border-radius: 8px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--bg-2); }
.ph-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-card figcaption { display: flex; flex-direction: column; gap: 4px; padding: 8px 5px 2px; }
.mono-k { font: 500 10px/1 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.ph-cap { font-size: 12px; line-height: 1.3; color: var(--ink-soft); }

/* phone mockup (project page) */
.phone { margin: auto 0; align-self: center; width: min(100%, 292px); height: min(600px, calc(100dvh - var(--top-h) - var(--bot-h) - 24px)); min-height: 470px; border-radius: 42px; padding: 11px; background: linear-gradient(145deg, #2b2c30, #0d0d0f 60%); box-shadow: 0 0 0 1px rgba(255,255,255,.1), 0 40px 80px -30px rgba(0,0,0,.8), inset 0 0 0 1px rgba(255,255,255,.05); position: relative; }
.ph-notch { position: absolute; top: 19px; left: 50%; width: 76px; height: 20px; border-radius: 12px; background: #0b0b0c; transform: translateX(-50%); z-index: 2; }
.ph-screen { width: 100%; height: 100%; border-radius: 32px; background: var(--paper); color: #1b1c1f; overflow: hidden; display: flex; flex-direction: column; padding: 14px 16px 14px; font-family: var(--f-body); }
.ph-status { display: flex; justify-content: space-between; align-items: center; font: 600 12px/1 var(--f-body); padding: 2px 6px 0; height: 18px; }
.ph-sig { display: flex; gap: 2px; align-items: flex-end; }
.ph-sig i { width: 3px; background: #1b1c1f; border-radius: 1px; }
.ph-sig i:nth-child(1) { height: 5px; } .ph-sig i:nth-child(2) { height: 7px; } .ph-sig i:nth-child(3) { height: 9px; }
.ph-sig b { width: 18px; height: 9px; border: 1.5px solid #1b1c1f; border-radius: 3px; margin-left: 4px; background: linear-gradient(90deg, #1b1c1f 70%, transparent 70%); background-clip: content-box; padding: 1px; }
.ph-head { display: flex; align-items: center; gap: 10px; margin-top: 18px; }
.ph-logo { width: 30px; height: 30px; object-fit: contain; }
.ph-logo.logo-mark { filter: brightness(0); }
.ph-logo.logo-tile { padding: 0; }
.ph-head div { display: flex; flex-direction: column; gap: 3px; }
.ph-k { font: 500 9.5px/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: #6b6a66; }
.ph-title { font-family: var(--f-display); font-stretch: 112%; font-weight: 750; font-size: 17px; line-height: 1.1; }
.ph-prog { margin-top: 14px; display: flex; flex-direction: column; gap: 7px; }
.ph-count { font: 500 11px/1 var(--f-mono); color: #4b4a47; }
.ph-bar { height: 4px; border-radius: 3px; background: #dcd8d0; overflow: hidden; display: block; }
.ph-bar i { display: block; height: 100%; width: 100%; background: #1b1c1f; transform-origin: left; transform: scaleX(0); }
.ph-list { list-style: none; margin: 12px 0 0; padding: 0; flex: 1; min-height: 0; overflow: hidden; }
.ph-row { display: grid; grid-template-columns: 22px 1fr; gap: 11px; align-items: center; padding: 8.5px 0; border-bottom: 1px solid #e3dfd7; }
.ph-mark { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid #d4d0c8; background: transparent; transition: background .35s, border-color .35s; position: relative; }
.ph-ck { width: 13px; height: 13px; stroke-width: 2.4; color: #fff; stroke-dasharray: 24; stroke-dashoffset: 24; transition: stroke-dashoffset .45s .1s var(--ease); }
.ph-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ph-t { font: 600 13px/1.2 var(--f-body); }
.ph-sub { font-size: 11px; color: #8a8882; line-height: 1.25; }
.ph-row.done .ph-mark { background: #1b1c1f; border-color: #1b1c1f; }
.ph-row.done .ph-ck { stroke-dashoffset: 0; }
.ph-row.done .ph-sub { color: #4b4a47; }
.ph-row.prog .ph-mark { border-color: #8a8882; }
.ph-row.prog .ph-mark::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #8a8882; animation: pulse 1.6s ease-in-out infinite; }
.ph-row.prog .ph-ck { display: none; }
.ph-row.prog .ph-sub { color: #55534f; font-weight: 500; }
.ph-row.todo .ph-t { color: #8a8882; }
@keyframes pulse { 0%, 100% { transform: scale(.7); opacity: .6; } 50% { transform: scale(1); opacity: 1; } }
.ph-inv { margin-top: 10px; border-radius: 14px; background: #1b1c1f; color: #f3f1ec; padding: 12px 12px 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ph-inv div { display: flex; flex-direction: column; gap: 3px; }
.ph-inv-t { font: 600 13px/1.1 var(--f-body); }
.ph-inv-s { font-size: 11px; color: #b7b3ab; }
.ph-pay { font: 600 11px/1 var(--f-body); letter-spacing: .06em; background: var(--brass); color: #17140e; padding: 9px 11px; border-radius: 999px; white-space: nowrap; }
.ph-foot { margin: 9px 0 0; font-size: 10.5px; color: #8a8882; text-align: center; }

/* handover */
.hand-card { padding: 18px 20px; }
.war { display: flex; align-items: center; gap: 14px; }
.war-n { font-family: var(--f-display); font-weight: 820; font-stretch: 125%; font-size: 76px; line-height: .8; letter-spacing: -.05em; color: var(--accent); }
.war-txt { display: flex; flex-direction: column; gap: 6px; }
.war-u { font-family: var(--f-display); font-weight: 760; font-stretch: 125%; font-size: 20px; line-height: 1; text-transform: uppercase; letter-spacing: .01em; }
.war-k { font: 500 10.5px/1 var(--f-mono); letter-spacing: .15em; text-transform: uppercase; color: var(--ink-2); }
.war-p { margin: 12px 0 10px; font-size: 13px; line-height: 1.45; color: var(--ink-soft); }
.closeout { list-style: none; margin: 0; padding: 0; }
.co { display: grid; grid-template-columns: 26px 1fr 20px; gap: 8px; align-items: center; padding: 8px 0; border-top: 1px solid var(--rule); font-size: 13.5px; line-height: 1.3; }
.co-n { font: 500 11px/1 var(--f-mono); color: var(--ink-3); transition: color .3s; }
.co-ck { width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--rule-2); display: grid; place-items: center; transition: background .35s, border-color .35s; }
.co-ic { width: 12px; height: 12px; stroke-width: 2.4; color: #fff; stroke-dasharray: 24; stroke-dashoffset: 24; transition: stroke-dashoffset .45s .1s var(--ease); }
.co.done .co-ck { background: var(--ok); border-color: var(--ok); }
.co.done .co-ic { stroke-dashoffset: 0; }
.co.done .co-n { color: var(--accent); }
.last-pay { margin: 10px 0 0; padding-top: 10px; border-top: 1px solid var(--rule); font: 600 13px/1.4 var(--f-body); }

/* contact */
.contact-card { padding: 18px 18px 14px; }
.ct-head { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--rule); }
.ct-logo { width: 38px; height: 38px; object-fit: contain; }
.ct-head div { display: flex; flex-direction: column; gap: 4px; }
.ct-name { font: 600 14.5px/1.2 var(--f-body); }
.ct-city { font: 500 11px/1 var(--f-mono); letter-spacing: .06em; color: var(--ink-2); }
.ct-row { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "k act" "v v"; gap: 0 10px; align-items: center; padding: 6px 0 10px; border-bottom: 1px solid var(--rule); }
.ct-k { grid-area: k; font: 500 10px/1 var(--f-mono); letter-spacing: .15em; text-transform: uppercase; color: var(--ink-2); }
.ct-v { grid-area: v; font: 500 15px/1.3 var(--f-body); user-select: all; -webkit-user-select: all; overflow-wrap: anywhere; outline: none; margin-top: -4px; }
.ct-act { grid-area: act; display: flex; gap: 4px; }
.mini-btn { width: 44px; height: 44px; border-radius: 12px; border: 1px solid transparent; background: rgba(238, 234, 227, .06); color: var(--ink); display: grid; place-items: center; cursor: pointer; text-decoration: none; transition: border-color .2s, background .2s, color .2s; padding: 0; }
.mini-btn:hover { border-color: var(--rule-2); background: rgba(238, 234, 227, .06); }
.mini-btn.ok { color: var(--ok); border-color: rgba(61, 190, 106, .5); }
.mini-btn .ic { width: 17px; height: 17px; }
.vr { margin: 12px 0 0; display: flex; align-items: center; gap: 10px; font: 600 14px/1.35 var(--f-body); color: var(--accent); }
.vr-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); flex: none; }

/* ============================================================ bottom bar: timeline + prev/next */
.bottombar { position: absolute; left: calc(var(--gut) + var(--sa-l)); right: calc(var(--gut) + var(--sa-r)); bottom: calc(var(--sa-b) + 16px); height: 80px; display: flex; align-items: flex-end; gap: clamp(18px, 2.4vw, 40px); }
.tl { position: relative; flex: 1; height: 80px; pointer-events: auto; min-width: 0; }
.tl-groups, .tl-nodes { display: grid; grid-template-columns: repeat(var(--n, 17), minmax(0, 1fr)); }
.tl-groups { position: absolute; left: 0; right: 0; top: 0; height: 14px; }
.tl-group { display: flex; align-items: center; gap: 10px; font: 500 10.5px/1 var(--f-mono); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-2); white-space: nowrap; }
.tl-group::after { content: ''; flex: 1; height: 1px; background: var(--rule); }
.tl-rail { position: absolute; top: 48px; height: 1px; background: var(--rule-2); left: calc(50% / var(--n, 17)); right: calc(50% / var(--n, 17)); }
.tl-fill { position: absolute; inset: -0.5px 0; background: var(--accent); transform-origin: left center; transform: scaleX(0); }
.tl-nodes { position: absolute; left: 0; right: 0; top: 24px; height: 48px; list-style: none; margin: 0; padding: 0; }
.tl-nodes li { position: relative; display: flex; justify-content: center; }
.tl-node { position: relative; width: 100%; height: 48px; background: none; border: 0; padding: 0; cursor: pointer; display: grid; place-items: center; }
.tl-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--bg-0); border: 1px solid var(--ink-3); transition: background .35s, border-color .35s, transform .45s var(--ease), box-shadow .45s; }
.tl-node.ch .tl-dot { width: 9px; height: 9px; border-color: var(--ink-2); }
.tl-node.done .tl-dot { background: var(--accent); border-color: var(--accent); }
.tl-node.cur .tl-dot { background: var(--accent); border-color: var(--accent); transform: scale(1.45); box-shadow: 0 0 0 5px var(--accent-soft); }
.tl-node:hover .tl-dot { border-color: var(--ink); }
.tl-top { position: absolute; bottom: calc(50% + 9px); left: 50%; transform: translateX(-50%); font: 500 11.5px/1 var(--f-mono); letter-spacing: .06em; color: var(--ink-2); white-space: nowrap; transition: color .3s; }
.tl-node.xtra .tl-wk { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.tl-node.xtra.cur .tl-wk { color: var(--ink); }
.tl-node.inch .tl-top, .tl-node.cur .tl-top { color: var(--ink); }
.tl-wk { position: absolute; top: calc(50% + 10px); left: 50%; transform: translateX(-50%); font: 500 11px/1 var(--f-mono); color: var(--ink-2); white-space: nowrap; transition: color .3s; }
.tl-node.cur .tl-wk { color: var(--accent); }
/* short step names under the dots on wide screens (instead of repeated week numbers) */
.tl-nm { position: absolute; top: calc(50% + 9px); left: 50%; transform: translateX(-50%); font: 500 clamp(10px, .8vw, 11.5px)/1 var(--f-body); color: var(--ink-2); white-space: nowrap; transition: color .3s; display: none; }
.tl-node.cur .tl-nm, .tl-node.armed .tl-nm { color: var(--accent); }
@media (min-width: 1100px) {
  .tl-node.has-nm .tl-nm { display: block; }
  .tl-node.has-nm:not(.xtra) .tl-wk { display: none; }
  .tl-node.xtra .tl-wk { font-size: clamp(9.5px, .74vw, 10.5px); letter-spacing: .04em; }
}
.tl-node.armed .tl-dot { border-color: var(--accent); transform: scale(1.35); }
/* where you are: "05 · Site week 3 · Water test" (on touch, a tapped dot's name before it navigates) */
.tl-read { position: absolute; right: 2px; bottom: calc(100% + 1px); font: 500 11px/1 var(--f-mono); letter-spacing: .07em; color: var(--ink); white-space: nowrap; max-width: calc(100% + 40px); overflow: hidden; text-overflow: ellipsis; pointer-events: none; transition: color .25s; }
.tl.armed ~ .navbtns .tl-read, .navbtns .tl-read.armed { color: var(--accent); }
.tl-node::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 16px); left: 50%; transform: translate(-50%, 4px); white-space: nowrap; font: 500 12.5px/1 var(--f-body); color: var(--ink); background: var(--bg-1); border: 1px solid var(--rule); padding: 8px 10px; border-radius: 8px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s var(--ease); z-index: 3; }
.tl-node:hover::after, .tl-node:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }
.tl-nodes li:first-child .tl-node::after { left: 0; transform: translate(0, 4px); }
.tl-nodes li:first-child .tl-node:hover::after { transform: translate(0, 0); }
.tl-nodes li:last-child .tl-node::after, .tl-nodes li:nth-last-child(2) .tl-node::after { left: auto; right: 0; transform: translate(0, 4px); }
.tl-nodes li:last-child .tl-node:hover::after, .tl-nodes li:nth-last-child(2) .tl-node:hover::after { transform: translate(0, 0); }
.navbtns { position: relative; display: flex; gap: 10px; pointer-events: auto; flex: none; padding-bottom: 8px; }
.nav-prev { width: 56px; height: 56px; border-radius: 50%; border: 1px solid var(--rule-2); background: rgba(var(--scrim), .4); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); display: grid; place-items: center; cursor: pointer; color: var(--ink); transition: border-color .25s, background .25s, opacity .25s, transform .2s var(--ease); padding: 0; }
.nav-prev:hover { border-color: var(--ink-2); }
.nav-prev:disabled { opacity: .3; cursor: default; }
.nav-prev .ic { width: 20px; height: 20px; }
.nav-next { position: relative; height: 56px; min-width: 212px; padding: 0 20px 0 24px; border-radius: 999px; border: 0; background: var(--accent); color: var(--on-accent); display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; text-align: left; transition: transform .25s var(--ease), background .25s, box-shadow .25s; box-shadow: 0 12px 36px -14px rgba(201, 164, 103, .6); -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
/* in-step progress: a 2 px line inside the pill while the step's build sequence plays; one soft pulse when it ends */
.nb-prog { position: absolute; left: 24px; right: 22px; bottom: 9px; height: 2px; border-radius: 1px; background: rgba(23, 20, 14, .16); overflow: hidden; opacity: 0; transition: opacity .35s; pointer-events: none; }
.nb-prog.on { opacity: 1; }
.nb-prog.done { opacity: 0; transition: opacity .6s .9s; }
.nb-prog i { display: block; height: 100%; width: 100%; background: rgba(23, 20, 14, .62); transform-origin: left center; transform: scaleX(0); }
#app[data-mood="drawing"] .nb-prog { background: rgba(255, 255, 255, .22); }
#app[data-mood="drawing"] .nb-prog i { background: rgba(255, 255, 255, .8); }
@keyframes nbpulse { 0% { box-shadow: 0 12px 36px -14px rgba(201, 164, 103, .6), 0 0 0 0 rgba(201, 164, 103, .55); } 100% { box-shadow: 0 12px 36px -14px rgba(201, 164, 103, .6), 0 0 0 16px rgba(201, 164, 103, 0); } }
.nav-next.pulse { animation: nbpulse 1.3s var(--ease) 1; }
.nav-next.lp { transform: scale(.96); }
.nav-next:hover { transform: translateY(-1px); }
.nav-next:active, .nav-prev:active { transform: scale(.97); }
.nb-txt { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.nb-k { font: 600 15px/1 var(--f-body); }
.nb-t { font: 500 10.5px/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; opacity: .72; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.nb-t:empty { display: none; }
.nb-ic { width: 20px; height: 20px; }
#app[data-mood="drawing"] .nav-next { box-shadow: 0 12px 30px -14px rgba(46, 94, 158, .6); }
/* busy (ui.js setPreparing): a step was asked for while the rest of the 3D model is still warming up. The arrow gives
   way to a small ring in the same spot; the button keeps its size, and none of this applies when it is not busy.
   A wait shorter than 0.1 s shows nothing. */
.btn-cta.busy, .nav-next.busy { cursor: progress; }
.btn-cta.busy { position: relative; }
.btn-cta.busy > .ic, .nav-next.busy > .nb-ic { opacity: 0; transition: opacity .15s .1s; }
.btn-cta.busy::after, .nav-next.busy::after { content: ''; position: absolute; top: calc(50% - 9px); right: 27px; width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; opacity: .85; pointer-events: none; animation: busy-in .2s .1s both, busy-spin .8s linear infinite; }
.nav-next.busy::after { right: 21px; }
@keyframes busy-in { from { opacity: 0; } }
@keyframes busy-spin { to { transform: rotate(360deg); } }

/* ============================================================ before/after split */
.split { position: absolute; top: calc(var(--top-h) + var(--sa-t)); bottom: var(--bot-h); left: 0; width: 0; pointer-events: none; will-change: transform; }
.split-line { position: absolute; top: 0; bottom: 0; left: -0.5px; width: 1px; background: linear-gradient(180deg, transparent, rgba(238, 234, 227, .9) 12%, rgba(238, 234, 227, .9) 88%, transparent); box-shadow: 0 0 18px rgba(0, 0, 0, .5); }
.split-hit { position: absolute; top: 0; bottom: 0; left: -22px; width: 44px; pointer-events: auto; cursor: ew-resize; touch-action: none; }
.split-area { position: absolute; left: 0; right: 0; top: calc(var(--top-h) + var(--sa-t)); bottom: var(--bot-h); pointer-events: auto; cursor: ew-resize; touch-action: none; }
.split-grip { position: absolute; top: 50%; left: 0; width: 56px; height: 56px; border-radius: 50%; transform: translate(-50%, -50%); background: var(--ink); color: #17140e; border: 0; display: grid; place-items: center; cursor: ew-resize; pointer-events: auto; touch-action: none; box-shadow: 0 10px 30px rgba(0, 0, 0, .45), 0 0 0 6px rgba(238, 234, 227, .16); }
.split-grip .ic { width: 22px; height: 22px; stroke-width: 2; }
.split-lab { position: absolute; top: 6px; font: 500 11px/1 var(--f-mono); letter-spacing: .2em; text-transform: uppercase; color: var(--ink); background: rgba(var(--scrim), .6); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border: 1px solid var(--rule); padding: 7px 10px; border-radius: 999px; white-space: nowrap; }
.split-lab.l { right: 14px; }
.split-lab.r { left: 14px; }

/* ============================================================ misc: veil, loader, toast, unhide */
.unhide { position: absolute; top: calc(var(--sa-t) + 18px); right: calc(var(--gut) + var(--sa-r)); display: none; pointer-events: auto; opacity: .5; }
#app.ui-hidden .unhide { display: grid; }
.unhide:hover { opacity: 1; }
/* hidden guide: a quiet prev/next pair in the bottom corners (touch has no keyboard) */
.hid-nav { position: absolute; bottom: calc(var(--sa-b) + 16px); width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--rule-2); background: rgba(var(--scrim), .5); color: var(--ink); display: none; place-items: center; padding: 0; cursor: pointer; pointer-events: auto; opacity: .4; transition: opacity .25s; }
.hid-prev { left: calc(var(--sa-l) + 16px); }
.hid-next { right: calc(var(--sa-r) + 16px); }
#app.ui-hidden .hid-nav { display: grid; }
.hid-nav:hover, .hid-nav:focus-visible { opacity: 1; }
/* after a hand-turn of the model: one tap back to the step's own view */
.guided { position: absolute; left: 50%; width: max-content; bottom: calc(var(--bot-h) + 70px); height: 40px; padding: 0 16px 0 12px; border-radius: 999px; border: 1px solid var(--rule-2); background: rgba(28, 29, 32, .9); color: var(--ink); display: inline-flex; align-items: center; gap: 8px; font: 500 13.5px/1 var(--f-body); cursor: pointer; pointer-events: auto; box-shadow: 0 10px 30px -12px rgba(0, 0, 0, .6); visibility: hidden; }
.guided-ic { width: 17px; height: 17px; color: var(--accent); }
#app[data-mood="drawing"] .guided { background: rgba(243, 241, 236, .94); }
/* "More below": the panel scrolls but its scrollbar is hidden */
.more { position: absolute; left: calc(var(--gut) + var(--sa-l)); width: var(--panel-w); bottom: var(--bot-h); height: 58px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 4px; pointer-events: none; background: linear-gradient(180deg, rgba(var(--scrim), 0), rgba(var(--scrim), .94) 72%); opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; }
.more.on { opacity: 1; visibility: visible; }
.more-btn { pointer-events: auto; display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px 0 12px; border-radius: 999px; border: 1px solid var(--rule-2); background: var(--bg-1); color: var(--ink); font: 500 11px/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; cursor: pointer; }
.more-ic { width: 14px; height: 14px; }
#app[data-mood="drawing"] .more-btn { background: var(--paper); }
.sheet-probe { position: absolute; left: 0; top: 0; width: 0; height: var(--sheet-h, 0px); visibility: hidden; pointer-events: none; }
/* a message on the veil (the 3D view was lost and is being restored) */
.veil-msg { position: absolute; left: 50%; top: 38%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; font: 500 12px/1.5 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); max-width: min(30em, calc(100vw - 32px)); pointer-events: auto; }
.vm-btn, .ld-reload { height: 44px; padding: 0 22px; border-radius: 999px; border: 0; background: var(--accent); color: var(--on-accent); font: 600 15px/1 var(--f-body); letter-spacing: 0; text-transform: none; cursor: pointer; }
.toast { position: absolute; left: 50%; bottom: calc(var(--bot-h) + 18px); transform: translate(-50%, 10px); background: var(--bg-1); color: var(--ink); border: 1px solid var(--rule-2); padding: 11px 16px; border-radius: 999px; font: 500 13.5px/1.2 var(--f-body); opacity: 0; pointer-events: none; transition: opacity .3s, transform .3s var(--ease); white-space: nowrap; max-width: calc(100vw - 32px); overflow: hidden; text-overflow: ellipsis; z-index: 5; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
#loader { position: absolute; inset: 0; z-index: 10; background: var(--bg-0); display: grid; place-items: center; transition: opacity .8s var(--ease), visibility .8s; }
#loader.done { opacity: 0; visibility: hidden; pointer-events: none; }
.ld-in { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 24px; text-align: center; }
.ld-logo { width: 64px; height: auto; opacity: .95; }
.ld-title { font-family: var(--f-display); font-weight: 780; font-stretch: 118%; font-size: 22px; letter-spacing: -.01em; }
.ld-bar { width: 180px; height: 1px; background: var(--rule-2); overflow: hidden; }
.ld-bar i { display: block; height: 100%; width: 100%; background: var(--accent); transform-origin: left; transform: scaleX(.04); transition: transform .5s var(--ease); }
.ld-msg { font: 500 11px/1.5 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); max-width: 30em; }
/* a still of the finished room (img/poster.jpg, when present) behind the loader: the loader's fade is the cross-fade */
.ld-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 72% 50%; }
.ld-poster ~ .ld-in { position: relative; padding: 26px 34px; border-radius: 18px; background: rgba(19, 20, 22, .62); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
/* landscape: the loader text sits left, where the headline will be; the room (right) stays in view */
@media (min-aspect-ratio: 1/1) and (min-width: 900px) { .ld-poster ~ .ld-in { justify-self: start; margin-left: calc(var(--gut) + var(--sa-l)); } }
#loader.fallback .ld-in { padding-top: 7vh; }
#loader.failed .ld-bar { display: none; }
#loader.failed .ld-msg { color: var(--ink); font-size: 12px; }
#loader.fallback { overflow-y: auto; place-items: start center; }
#loader.fallback .ld-poster { display: none; }
.ld-fb { display: grid; gap: 14px; width: min(760px, calc(100vw - 32px)); margin-top: 6px; text-align: left; }
.ld-fb-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.ld-fb-grid figure { margin: 0; }
.ld-fb-grid img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; background: var(--bg-2); }
.ld-fb-grid figcaption { margin-top: 6px; font-size: 12px; color: var(--ink-2); }
.ld-fb-ct { margin: 0; font: 500 13px/1.6 var(--f-body); color: var(--ink-soft); }

/* ============================================================ small screens + portrait tablets: bottom sheet */
@media (max-width: 899px), (max-aspect-ratio: 1/1) {
  :root { --top-h: 66px; --bot-h: calc(96px + var(--sa-b)); --num: 60px; --sheet-h: 38dvh; }
  /* per-step sheet heights (the camera frames the room above the TARGET height, see ui.freeRect) */
  #app[data-step="compare"] { --sheet-h: 21dvh; }
  #app[data-step="choose"] { --sheet-h: 40dvh; }
  #app[data-step="schedule"], #app[data-step="estimate"] { --sheet-h: 44dvh; }
  #app[data-step="next"] { --sheet-h: 48dvh; }
  #app.sheet-open { --sheet-h: 78dvh; }
  /* The sheet's body is one flex column: the step's own block or its compliance / contact card can come right
     under the title (data-sheet-first), before the step text. */
  .p-inner { display: flex; flex-direction: column; }
  .p-bodywrap, .p-body { display: contents; }
  .p-body > * { order: 6; }
  .grab { order: 0; } .p-head { order: 1; }
  .p-lines { order: 3; } .p-lead { order: 4; } .p-facts { order: 5; } #aside { order: 7; }
  #app[data-sheet-first="aside"] #aside { order: 2; margin-top: 14px; }
  #app[data-sheet-first="block"] .p-body > .blk { order: 2; margin-top: 12px; }
  #app[data-sheet-first="block"] .p-lead { order: 3; margin-top: 14px; }
  #app[data-sheet-first="block"] .p-lines { order: 4; }
  /* compact configurator strip: the room stays visible above it */
  .cfg { gap: 8px; margin-top: 10px; }
  .cfg-row { grid-template-columns: minmax(84px, 7.4em) 1fr; gap: 10px; }
  .sw { width: 40px; height: 40px; }
  .cfg-cap { min-height: 0; margin-top: 8px; }
  .more { left: 0; right: 0; width: auto; background: linear-gradient(180deg, rgba(28, 29, 32, 0), rgba(28, 29, 32, .97) 72%); }
  #app[data-mood="drawing"] .more { background: linear-gradient(180deg, rgba(243, 241, 236, 0), rgba(243, 241, 236, .97) 72%); }
  .guided { bottom: calc(var(--bot-h) + var(--sheet-h) + 12px); }
  #app[data-step="intro"] .guided { top: calc(var(--top-h) + 8px); bottom: auto; }
  /* the timeline's dots stay small, their touch targets do not */
  .tl-node::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 44px; transform: translateY(-50%); }
  .tl-nm { display: none !important; }
  .tl-read { display: none; bottom: calc(100% + 44px); right: auto; left: clamp(70px, var(--at, 50%), calc(100% - 70px)); transform: translateX(-50%); padding: 7px 11px; border-radius: 999px; background: var(--bg-1); border: 1px solid var(--rule-2); color: var(--accent); max-width: calc(100vw - 32px); }
  .tl.armed ~ .navbtns .tl-read { display: block; }
  #app[data-mood="drawing"] .tl-read { background: var(--paper); }
  .topbar { top: calc(var(--sa-t) + 12px); }
  .brand-logo { height: 34px; }
  .scrim { background: linear-gradient(180deg, rgba(var(--scrim), .7) 0%, rgba(var(--scrim), 0) 13%) !important; }
  #panel { left: 0; right: 0; top: auto; bottom: var(--bot-h); width: auto; height: var(--sheet-h); background: rgba(28, 29, 32, .96); border-top: 1px solid var(--rule); border-radius: 20px 20px 0 0; pointer-events: auto; transition: height .5s var(--ease); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
  #app[data-mood="drawing"] #panel { background: rgba(243, 241, 236, .97); }
  .p-inner { margin: 0; padding: 0 max(16px, var(--sa-l)) 18px max(16px, var(--sa-r)); }
  .grab { display: flex; justify-content: center; align-items: center; position: sticky; top: 0; z-index: 2; width: calc(100% + 32px); margin: 0 -16px 2px; height: 26px; background: linear-gradient(180deg, rgba(28, 29, 32, 1) 60%, rgba(28, 29, 32, 0)); border: 0; cursor: pointer; padding: 0; }
  #app[data-mood="drawing"] .grab { background: linear-gradient(180deg, rgba(243, 241, 236, 1) 60%, rgba(243, 241, 236, 0)); }
  .grab span { width: 40px; height: 4px; border-radius: 2px; background: var(--rule-2); }
  .p-head { display: grid; grid-template-columns: auto 1fr; column-gap: 14px; align-items: end; }
  .p-eyebrow { grid-column: 1 / -1; font-size: 11px; }
  .numeral { margin: 10px 0 0 -.04em; }
  .p-title { margin: 0 0 2px; font-size: clamp(22px, 5.4vw, 30px); align-self: end; }
  .p-head.no-num .p-title { grid-column: 1 / -1; margin-top: 10px; font-size: clamp(26px, 7vw, 34px); }
  .p-lines { margin-top: 12px; }
  .p-lines p { font-size: 15px; }
  #aside { position: static; width: auto; height: auto; overflow: visible; margin-top: 18px; justify-content: flex-start; }
  #aside > * { width: 100%; max-width: none; align-self: stretch; }
  #aside > .phone { max-width: 340px; align-self: center; }
  .p-lines p { max-width: 44em; }
  .photo-card { display: grid; grid-template-columns: 120px 1fr; gap: 12px; align-items: center; }
  .photo-card figcaption { padding: 0; }
  .phone { width: 100%; max-width: 360px; height: auto; min-height: 0; align-self: center; border-radius: 30px; padding: 8px; }
  .ph-notch { display: none; }
  .ph-screen { border-radius: 24px; }
  .ph-list { overflow: visible; }
  .bottombar { left: 0; right: 0; bottom: 0; height: var(--bot-h); padding: 6px max(16px, var(--sa-r)) calc(var(--sa-b) + 12px) max(16px, var(--sa-l)); background: rgb(28, 29, 32); flex-direction: column; align-items: stretch; gap: 8px; }
  #app[data-mood="drawing"] .bottombar { background: var(--paper); }
  .tl { height: 26px; flex: none; }
  .tl-groups, .tl-top, .tl-wk, .tl-node::after { display: none; }
  .tl-rail { top: 13px; }
  .tl-nodes { top: 0; height: 26px; }
  .tl-node { height: 26px; }
  .tl-dot { width: 6px; height: 6px; }
  .tl-node.ch .tl-dot { width: 7px; height: 7px; }
  .navbtns { padding: 0; gap: 10px; }
  .nav-prev { width: 50px; height: 50px; flex: none; }
  .nav-next { flex: 1; height: 50px; min-width: 0; }
  .nb-t { max-width: none; }
  .hero { left: calc(16px + var(--sa-l)); right: calc(16px + var(--sa-r)); width: auto; bottom: calc(var(--bot-h) + 22px); }
  .hero-title { font-size: clamp(40px, 11vw, 76px); }
  .hero-sub { font-size: 16px; margin: 18px 0 20px; }
  .hero-row { gap: 18px; }
  #app[data-step="intro"] .scrim { background: linear-gradient(0deg, rgba(var(--scrim), .96) 0%, rgba(var(--scrim), .82) 36%, rgba(var(--scrim), 0) 62%), linear-gradient(180deg, rgba(var(--scrim), .7) 0%, rgba(var(--scrim), 0) 13%) !important; }
  .split, .split-area { bottom: calc(var(--bot-h) + var(--sheet-h)); }
  .toast { bottom: calc(var(--bot-h) + 12px); }
}
@media (max-width: 520px) {
  .brand-lic { display: none; }
  .brand-name { font-size: 13px; }
    .tools { gap: 6px; }
  .lv { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .layouts { gap: 8px; }
  .lay-v { font-size: 36px; }
  .hero-facts { gap: 18px; }
  .btn-cta { height: 52px; }
}
@media (max-width: 380px) {
  .brand-txt { display: none; }
}
/* the side panel tightens in stages when its content would overflow (ui.js fitPanel):
   .tight: facts give way to the step's own block; .tighter: smaller numeral and title, compact lists;
   .tightest: first line of text only; .tight-est (estimate only): the note under the price parts goes.
   Anything left scrolls, with the "More" cue. */
#panel.tight .p-facts { display: none; }
#panel.tight .p-lines p { margin-bottom: 6px; }
#panel.tight .blk { margin-top: 14px; }
#panel.tighter { --num: 56px; }
#panel.tighter .numeral { margin: 8px 0 6px -.05em; }
#panel.tighter .p-title { margin-bottom: 10px; font-size: clamp(26px, 1.5vw + 1.2vh, 38px); }
#panel.tightest .p-lines p + p { display: none; }
#panel.tighter .blk { margin-top: 12px; }
#panel.tighter .blk-h { padding-bottom: 8px; }
#panel.tighter .part { padding: 6px 8px 6px 0; }
#panel.tighter .pay li { padding: 4px 0; }
#panel.tighter .pay-n { width: 22px; height: 22px; font-size: 11px; }
#panel.tighter .pay-t { font-size: 13.5px; }
#panel.tighter .kv-stack > div { padding: 5px 0; gap: 2px; }
#panel.tighter .kv-stack dd { font-size: 12.5px; line-height: 1.35; }
#panel.tighter .pay-opts, #panel.tighter .pay-cap { margin-top: 6px; }
#panel.tighter .p-head.no-num .p-title { margin: 12px 0 10px; font-size: clamp(30px, 1.8vw + 1.2vh, 44px); }
#panel.tighter .p-inner { padding: 4px 0 6px; }
#panel.tightest .pay li { padding: 3px 0; }
#panel.tightest .pay-blk { margin-top: 8px; }
#panel.tightest .kv-stack > div { padding: 4px 0; }
#panel.tightest .safe { margin-top: 6px; }
#panel.tightest .p-inner { padding: 2px 0 2px; }
#panel.tighter .ck { padding: 7px 0; }
#panel.tighter .blk-note, #panel.tighter .cfg-cap { margin-top: 8px; }
#panel.tight-est .parts-note { display: none; }
/* short landscape screens (small laptops, iPad landscape) */
@media (min-aspect-ratio: 1/1) and (max-height: 840px) and (min-width: 900px) {
  :root { --num: clamp(64px, 11.2vh, 120px); --bot-h: 106px; }
  .p-lines p { font-size: 15px; }
  .part { padding: 8px 8px 8px 0; }
  .part .pd { font-size: 12.5px; }
  .blk { margin-top: 16px; }
  .cfg { gap: 8px; }
  .cfg-cap { font-size: 12px; }
  .sw { width: 40px; height: 40px; }
}
/* touch-only devices (iPad): opaque cards instead of live backdrop blurs (recomputed every frame over the canvas) */
#app.coarse { --card: rgba(24, 25, 28, .92); }
#app.coarse[data-mood="drawing"] { --card: rgba(243, 241, 236, .95); }
#app.coarse .card, #app.coarse .icon-btn, #app.coarse .nav-prev, #app.coarse .split-lab, #app.coarse #panel { -webkit-backdrop-filter: none; backdrop-filter: none; }
#app.coarse .icon-btn, #app.coarse .nav-prev { background: rgba(var(--scrim), .72); }
@media (prefers-reduced-motion: reduce) {
  .grain { animation: none; }
  *, *::before, *::after { transition-duration: .01s !important; animation-duration: .01s !important; }
  .btn-cta.busy::after, .nav-next.busy::after { animation: none; }   /* a still ring (the rule above would spin it 100 times a second) */
}
