/* 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; }
/* a hyphenated word of a heading or a day label stays on one line ("check-up") */
.nb { 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), .95) 0%, rgba(var(--scrim), .9) 20%, rgba(var(--scrim), .74) 31%, rgba(var(--scrim), .3) 41%, rgba(var(--scrim), 0) 52%),
    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); }
/* (the before/after divider is part of the picture, not of the guide: it stays, with its labels and drag-anywhere) */
#app.ui-hidden #ui > *:not(.unhide):not(.toast):not(.live):not(.hid-nav):not(.split):not(.split-area) { opacity: 0 !important; pointer-events: none !important; }
#app.ui-hidden .split-lab { opacity: .6; }
#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; }
/* The name and license line come from the company's settings: a long one is cut short, never run under the buttons. */
.brand-name, .brand-lic { overflow-x: clip; text-overflow: ellipsis; }
.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); }
.icon-btn[hidden] { display: none; }
/* pause / skip: only there while a step's build sequence plays; "paused" keeps a brass ring until it goes on */
.icon-btn.seq-btn[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.ic { width: 18px; height: 18px; flex: none; }

/* ============================================================ intro hero */
/* touch-action as on #panel: a sideways swipe on the title screen is ours (next / previous), not the browser's */
/* The hero stands over the bottom bar (--hero-b) and never starts above the line the step panel starts at (max-height):
   the top bar with the company's name stays clear. When its text is taller than that room, js/ui-layout.js fitHero()
   tightens it in stages until it fits:
     .onerow     the two facts stay beside the button where they had dropped under it (see .hero-facts)
     .tight      the headline a size down (on a laptop: its two lines instead of three)
     .tighter    closer spacing, the text and the rows a size down;  .tightest, .min: the same again, twice
     .scroll     a window too short even for that: the hero scrolls, and fades at the edge it continues past
   Nothing is hidden. A stage sets four factors: --hk the headline, --hg the gaps, --hr the rows (the button, the six
   steps), --hf the text. At rest each is 1 (set on the guide itself, so a part drawn outside the hero has them too). */
#ui { --hk: 1; --hg: 1; --hr: 1; --hf: 1; }
.hero { --hero-b: calc(var(--bot-h) + 5.5vh); position: absolute; left: calc(var(--gut) + var(--sa-l)); bottom: var(--hero-b); width: min(930px, 60vw); max-height: calc(100% - var(--top-h) - var(--sa-t) - var(--hero-b)); pointer-events: auto; touch-action: pan-y; }
.hero.tight { --hk: .88; }
.hero.tighter { --hk: .8; --hg: .7; --hr: .94; --hf: .945; }
.hero.tightest { --hk: .72; --hg: .52; --hr: .88; --hf: .89; }
.hero.min { --hk: .64; --hg: .4; --hr: .82; --hf: .86; }
/* (the padding keeps the button's glow and the focus rings inside the scrolling box) */
.hero.scroll { overflow-y: auto; scrollbar-width: none; overscroll-behavior: contain; scroll-padding: 6px 0; padding: 0 28px 6px; margin: 0 -28px; width: calc(min(930px, 60vw) + 56px); }
.hero.scroll::-webkit-scrollbar { display: none; }
.hero.fade-t { -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 28px); mask-image: linear-gradient(180deg, transparent 0, #000 28px); }
.hero.fade-b { -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 44px), transparent 100%); mask-image: linear-gradient(180deg, #000 calc(100% - 44px), transparent 100%); }
.hero.fade-t.fade-b { -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 28px, #000 calc(100% - 44px), transparent 100%); mask-image: linear-gradient(180deg, transparent 0, #000 28px, #000 calc(100% - 44px), transparent 100%); }
.hero-kicker { margin: 0 0 calc(22px * var(--hg)); 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: max(26px, calc(clamp(46px, 6.5vw, 108px) * var(--hk))); 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: max(26px, calc(clamp(46px, 5.2vw, 108px) * var(--hk))); } }
.hero-sub { margin: calc(26px * var(--hg)) 0 0; max-width: 30em; font-size: max(14.5px, calc(18px * var(--hf))); line-height: 1.5; color: var(--ink-soft); }
.hero-note { margin: calc(8px * var(--hg)) 0 0; max-width: 38em; font-size: max(12px, calc(14px * var(--hf))); line-height: 1.5; color: var(--ink-2); }
.hero-row { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; margin-top: calc(28px * var(--hg)); }
/* the six steps: a small index under the headline; each one jumps to its chapter */
.six { list-style: none; margin: calc(26px * var(--hg)) 0 0; padding: calc(12px * var(--hg)) 0 0; border-top: 1px solid var(--rule); display: grid; grid-template-columns: repeat(3, minmax(0, auto)); justify-content: start; gap: 0 clamp(18px, 2.4vw, 38px); max-width: min(100%, 780px); }
.six-b { display: flex; align-items: baseline; gap: 9px; padding: calc(7px * var(--hg)) 0; min-height: calc(32px * var(--hr)); background: none; border: 0; text-align: left; cursor: pointer; color: var(--ink-soft); font: 500 14px/1.25 var(--f-body); transition: color .25s; }
.six-n { font: 500 11px/1 var(--f-mono); letter-spacing: .08em; color: var(--accent); flex: none; }
.six-t { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .35s var(--ease); padding-bottom: 2px; }
#app.coarse .six-b { min-height: calc(38px * var(--hr)); }
.six-b:hover { color: var(--ink); }
.six-b:hover .six-t { background-size: 100% 1px; }
.btn-cta { height: max(44px, calc(56px * var(--hr, 1))); 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; min-width: 0; }
.hero-facts div { display: flex; flex-direction: column; gap: 6px; max-width: 17em; }
/* .onerow: the facts give way to the button instead of dropping under it (they are set narrower and their lines wrap);
   they still drop where the row is too narrow for both (a phone). The list stays as wide as its text: the camera
   frames the house right of the text (js/ui.js freeRect), not right of an empty box. */
.hero.onerow .hero-facts { flex: 1 1 330px; max-width: max-content; }
.hero.onerow .hero-facts div { max-width: 12.75em; }
.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.25 var(--f-body); font-size: max(13px, calc(15px * var(--hf))); text-wrap: balance; }

/* 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; }
/* "BUILD — AFTER THE OLD SIDING IS OFF": the day label can be a whole phrase, so the line may wrap */
.p-eyebrow { font: 500 12px/1.45 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); min-height: 14px; text-wrap: balance; }
.p-eyebrow .grp { color: var(--accent); }
.p-eyebrow .sep { display: inline-block; vertical-align: middle; width: 22px; height: 1px; margin: 0 11px 2px; background: var(--rule-2); }
/* a day label too long for one line (ui.js measures it): set tighter, so the longest one takes two lines, not three */
.p-eyebrow.long { font-size: 11px; letter-spacing: .08em; line-height: 1.5; }
.p-eyebrow.long .sep { width: 16px; margin: 0 8px 2px; }
.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 chapter's first digit comes from the step data: only a zero is slashed) */
.n0.plain .slash { display: none; }
/* 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); }
.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); text-wrap: pretty; }
.fact:last-child:nth-child(odd) { grid-column: 1 / -1; }
/* a fact the 3D points at (the price of a replaced sheet): one soft wash behind it */
@keyframes factflash { 0% { background-color: var(--accent-soft); box-shadow: 0 0 0 6px var(--accent-soft); } 100% { background-color: transparent; box-shadow: 0 0 0 6px transparent; } }
.fact.flash { animation: factflash 1.6s var(--ease) 1; border-radius: 4px; }
.fact.flash dd { color: var(--accent); transition: color .3s; }

/* 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 typed card drawn as a panel block (js/ui-dom.js, place: 'panel'): plain rows, terms or a table under the block's rule */
.blk-h + .li, .blk-h + .terms-set, .blk-h + .ptab, .blk-h + .closeout { margin-top: 12px; }
.blk > .li li { font-size: 14px; }
/* 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%); }
/* each part can be tapped: a small chevron on its title line says so; the pinned one is unmistakable */
.part::after { content: ''; position: absolute; right: 3px; top: 15px; width: 6px; height: 6px; border-top: 1.5px solid var(--ink-3); border-right: 1.5px solid var(--ink-3); transform: rotate(45deg); transition: border-color .3s, transform .3s var(--ease); }
.part.on::after { border-color: var(--accent); }
.part[aria-pressed="true"] { background: linear-gradient(90deg, var(--accent-soft), transparent 86%); }
.part[aria-pressed="true"]::before { transform: scaleY(1); width: 3px; top: 6px; bottom: 6px; }
.part[aria-pressed="true"]::after { border-color: var(--accent); transform: translateX(2px) rotate(45deg); }
.part[aria-pressed="true"] .pn { color: var(--accent); }
.part[aria-pressed="true"] .pt { color: var(--ink); }

/* layer by layer (house wrap and flashing): a row lights up as its layer goes on, and stays lit once it is down */
.layers { list-style: none; margin: 0; padding: 0; }
.layer { position: relative; display: grid; grid-template-columns: 26px 1fr; gap: 12px; align-items: start; padding: 8px 0; border-bottom: 1px solid var(--rule); }
.layer::before { content: ''; position: absolute; left: -14px; top: 10px; bottom: 10px; width: 2px; background: var(--accent); transform: scaleY(0); transition: transform .45s var(--ease); }
.card .layer::before, .card .part::before { left: -10px; }
.card .layer:last-child, .card .parts li:last-child, .card .ck:last-child { border-bottom: 0; padding-bottom: 0; }
.ly-n { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--rule-2); display: grid; place-items: center; font: 500 11.5px/1 var(--f-mono); color: var(--ink-3); transition: background .4s, border-color .4s, color .4s, box-shadow .4s; }
.ly-t { font: 500 14px/1.4 var(--f-body); color: var(--ink-2); padding-top: 2px; transition: color .35s; text-wrap: pretty; }
.layer.on .ly-n { border-color: var(--accent); color: var(--accent); }
.layer.on .ly-t { color: var(--ink-soft); }
.layer.cur .ly-n { background: var(--accent); color: var(--on-accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.layer.cur .ly-t { color: var(--ink); }
.layer.cur::before { transform: scaleY(1); }

/* ready to build (schedule) */
.rdy { list-style: none; margin: 0; padding: 12px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.rdy li { display: flex; flex-direction: column; gap: 8px; font: 500 13.5px/1.3 var(--f-body); }
.rdy-ck { width: 22px; height: 22px; border-radius: 50%; background: var(--accent-soft); border: 1px solid var(--accent); display: grid; place-items: center; color: var(--accent); }
.rdy-ic { width: 12px; height: 12px; stroke-width: 2.4; }
.rdy-note { color: var(--ink-soft); }

/* color chooser ("Try a color"): a card beside the house; one row of four swatches for the siding, one for the trim */
.cfg-card { padding: 15px 18px 14px; }
.cfg-h { padding-bottom: 10px; }
.cfg { display: grid; gap: 13px; margin-top: 13px; }
.cfg-row { display: grid; gap: 8px; }
.cfg-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; min-height: 18px; }
.cfg-k { display: inline-flex; align-items: center; gap: 8px; font: 500 10.5px/1 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); }
/* a quiet qualifier beside a row label: always on screen, never a hover text */
.tag-q { display: inline-flex; align-items: center; padding: 3px 7px; border-radius: 999px; border: 1px solid var(--rule); font: 500 9.5px/1 var(--f-mono); letter-spacing: .06em; text-transform: none; color: var(--ink-2); white-space: nowrap; }
.cfg-val { font: 500 13.5px/1.2 var(--f-body); color: var(--ink); transition: color .2s; white-space: nowrap; }
.cfg-val.pv { color: var(--accent); }
.cfg-cap { margin: 12px 0 0; font-size: 12.5px; line-height: 1.4; color: var(--ink-soft); min-height: 0; }
.cfg-cap + .cfg-cap { margin-top: 2px; }
.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; }
.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); }
/* The swatches print no name and carry no tooltip: the face is the whole swatch (js/ui-dom.js swatch()). Four share a
   row; the siding row and the trim row line up as a grid. */
.sw-lap, .sw-trim { flex: 1 1 0; width: auto; min-width: 44px; }
/* siding swatch: a lap-board face in the example color (--c): smooth courses, the shadow line under each lap */
.sw-lap { height: 48px; }
.sw-lap .sw-face { background:
  linear-gradient(180deg, rgba(255,255,255,.10), rgba(0,0,0,.12)),
  repeating-linear-gradient(180deg, rgba(255,255,255,.13) 0 1px, transparent 1px 9px, rgba(0,0,0,.34) 9px 10.5px),
  var(--c, #c9c8c2); }
/* trim swatch: a flat painted face in the example color, with the soft sheen of a painted board */
.sw-trim { height: 40px; }
.sw-trim .sw-face { background: linear-gradient(158deg, color-mix(in srgb, var(--c, #eee) 84%, #fff) 0%, var(--c, #eee) 46%, color-mix(in srgb, var(--c, #eee) 90%, #000) 100%); box-shadow: inset 0 0 0 1px rgba(0,0,0,.22), inset 0 -2px 4px rgba(0,0,0,.10); }

/* style chooser (first visit): three style thumbnails and the two-option finish toggle, on top of the "Style and
   finish" list. One control, drawn here; its buttons are radios:
     .sty                        the control          .sty-k   a small label over a row ("Style", "Finish")
     .sty-list                   the three styles (role="radiogroup")
     .sty-b[aria-checked]        one style: .sty-th, its drawn thumbnail (.sty-lap | .sty-bb | .sty-sh), and .sty-nm, its name
     .seg                        the finish toggle (role="radiogroup"); .seg-b[aria-checked] one option
   The thumbnails are drawn in one neutral color: no color name, no product name. */
.sty { display: grid; gap: 10px; margin: 0 0 12px; padding-bottom: 12px; border-bottom: 1px solid var(--rule); }
.sty-k { font: 500 10.5px/1 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); }
.sty-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.sty-b { display: grid; gap: 6px; padding: 3px 3px 6px; border-radius: 10px; border: 1px solid var(--rule-2); background: none; cursor: pointer; text-align: center; min-width: 0; transition: border-color .25s, transform .25s var(--ease); }
.sty-b:hover { transform: translateY(-1px); border-color: var(--ink-2); }
.sty-b[aria-checked="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.sty-th { display: block; height: 44px; border-radius: 7px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.2); --c: #bdbbb4; }
.sty-nm { font: 500 11.5px/1.2 var(--f-body); color: var(--ink-soft); text-wrap: balance; overflow-wrap: anywhere; }
.sty-b[aria-checked="true"] .sty-nm { color: var(--ink); }
/* lap: horizontal boards, each row over the one below */
.sty-lap { background:
  linear-gradient(180deg, rgba(255,255,255,.10), rgba(0,0,0,.12)),
  repeating-linear-gradient(180deg, rgba(255,255,255,.14) 0 1px, transparent 1px 9.5px, rgba(0,0,0,.36) 9.5px 11px),
  var(--c); }
/* board and batten: flat panels with a narrow batten over every vertical joint */
.sty-bb { background:
  linear-gradient(180deg, rgba(255,255,255,.08), rgba(0,0,0,.12)),
  repeating-linear-gradient(90deg, transparent 0 9px, rgba(0,0,0,.30) 9px 10px, rgba(255,255,255,.16) 10px 14px, rgba(0,0,0,.34) 14px 15.5px, transparent 15.5px 24px),
  var(--c); }
/* shingle look: short pieces in rows, their joints offset from row to row */
.sty-sh { background:
  linear-gradient(180deg, rgba(255,255,255,.08), rgba(0,0,0,.12)),
  repeating-linear-gradient(180deg, rgba(255,255,255,.12) 0 1px, transparent 1px 9.5px, rgba(0,0,0,.38) 9.5px 11px),
  linear-gradient(90deg, rgba(0,0,0,.34) 0 1px, transparent 1px) 4px 0 / 13px 11px repeat-x,
  linear-gradient(90deg, rgba(0,0,0,.34) 0 1px, transparent 1px) 10px 11px / 16px 11px repeat-x,
  linear-gradient(90deg, rgba(0,0,0,.34) 0 1px, transparent 1px) 1px 22px / 12px 11px repeat-x,
  linear-gradient(90deg, rgba(0,0,0,.34) 0 1px, transparent 1px) 7px 33px / 15px 11px repeat-x,
  var(--c); }
.seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 3px; gap: 3px; border-radius: 999px; border: 1px solid var(--rule-2); }
.seg-b { min-height: 34px; padding: 6px 4px; border-radius: 999px; border: 0; background: none; color: var(--ink-soft); font: 500 12.5px/1.15 var(--f-body); white-space: nowrap; cursor: pointer; text-align: center; transition: background .25s, color .25s; }
.seg-b:hover { color: var(--ink); }
.seg-b[aria-checked="true"] { background: var(--accent); color: var(--on-accent); font-weight: 600; }
#app.coarse .seg-b { min-height: 40px; font-size: 13px; }
#app.coarse .sty-nm { font-size: 12.5px; }

/* check-ups: any number of rows, each with a state mark (later, next, now, pass). No count and no numbering. A state
   word (.ck-st) is there only when the card's data gives one. */
.checks { list-style: none; margin: 0; padding: 0; }
.ck { display: grid; grid-template-columns: 26px minmax(0, 1fr); grid-auto-columns: auto; grid-auto-flow: column; 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); }

/* payments (next): the rule as three moments on a line, signing to the last payment */
.pay { list-style: none; margin: 0; padding: 12px 0 0; }
.pay li { position: relative; display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; padding-bottom: 12px; }
.pay li::before { content: ''; position: absolute; left: 10.5px; top: 24px; bottom: 2px; width: 1px; background: var(--rule-2); }
.pay li:last-child { padding-bottom: 2px; }
.pay li:last-child::before { display: none; }
.pay-n { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--rule-2); display: grid; place-items: center; }
.pay li.first .pay-n { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.pay li.mid .pay-n { width: 10px; height: 10px; margin: 6px; border-color: var(--ink-2); }
.pay li.last .pay-n { border-color: var(--ok); color: var(--ok); }
.pay-ic { width: 12px; height: 12px; stroke-width: 2.4; }
.pay-t { font: 500 14px/1.4 var(--f-body); padding-top: 1px; text-wrap: pretty; }
.pay li.first .pay-t { font-weight: 600; }
.pay-each { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--rule); }
.pay-cap { margin-top: 6px; color: var(--ink); font-weight: 500; }
.pay-opts { margin-top: 0; }
.safe { display: flex; gap: 8px; align-items: center; color: var(--ink-soft); font-weight: 500; }
.safe::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; }
.inl { color: var(--ink); text-decoration: underline; text-decoration-color: var(--rule-2); text-underline-offset: 3px; overflow-wrap: anywhere; }
.inl:hover { text-decoration-color: var(--accent); }

/* ============================================================ right-side cards */
/* The column sits at the bottom when it fits (the first card's auto margin) and scrolls from its first card when it
   does not; ui.js folds the lower cards to their headings before that happens (fitAside). */
#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; gap: 10px; pointer-events: none; overflow-y: auto; scrollbar-width: none; touch-action: pan-y; overscroll-behavior: contain; }
#aside::-webkit-scrollbar { display: none; }
#aside > * { pointer-events: auto; flex: none; }
#aside > :first-child { margin-top: auto; }
/* scrolled: the cards fade out at the edge they continue past */
#aside.fade-t { -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 30px); mask-image: linear-gradient(180deg, transparent 0, #000 30px); }
#aside.fade-b { -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 54px), transparent 100%); mask-image: linear-gradient(180deg, #000 calc(100% - 54px), transparent 100%); }
#aside.fade-t.fade-b { -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 30px, #000 calc(100% - 54px), transparent 100%); mask-image: linear-gradient(180deg, transparent 0, #000 30px, #000 calc(100% - 54px), transparent 100%); }
.card { margin: 0; background: var(--card); border: 1px solid var(--card-line); border-radius: 14px; padding: 15px 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); transition: border-color .4s; }
.card-h { margin: 0 0 11px; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 5px 12px; font: 500 10.5px/1.25 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.card-h2 { font: 500 10.5px/1.25 var(--f-mono); letter-spacing: .05em; text-transform: none; color: var(--ink-2); }
/* a card that folds down to its heading */
.card.fold .card-h { margin: -15px -18px 0; display: block; }
.fold-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 15px 18px 11px; background: none; border: 0; border-radius: 14px; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; text-align: left; cursor: pointer; }
.fold-t { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px 12px; text-wrap: balance; }
.fold-ic { width: 15px; height: 15px; flex: none; color: var(--ink-2); transform: rotate(180deg); transition: transform .35s var(--ease), color .25s; }
.fold-h:hover .fold-ic { color: var(--ink); }
.card.fold.shut { padding-bottom: 0; }
.card.fold.shut .fold-h { padding-bottom: 15px; }
.card.fold.shut .card-b { display: none; }
.card.fold.shut .fold-ic { transform: none; }
.card.fold.shut { box-shadow: 0 14px 34px -22px rgba(0, 0, 0, .6); }
/* one soft flash when the 3D points at a card or a row */
@keyframes flash { 0% { box-shadow: 0 0 0 0 rgba(201, 164, 103, .55); } 100% { box-shadow: 0 0 0 14px rgba(201, 164, 103, 0); } }
.flash { animation: flash 1.5s var(--ease) 1; }
.ck.flash { border-radius: 8px; }
/* lists inside cards */
.li { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.li li { position: relative; padding-left: 15px; font-size: 13.5px; line-height: 1.42; color: var(--ink-soft); text-wrap: pretty; }
.li li::before { content: ''; position: absolute; left: 0; top: .68em; width: 6px; height: 1px; background: var(--accent); }
.card-p { margin: 10px 0 0; padding-left: 12px; border-left: 2px solid var(--accent); font: 500 13.5px/1.42 var(--f-body); color: var(--ink); text-wrap: pretty; }
.card-p.first { margin-top: 0; }
.card-note { margin: 10px 0 0; font-size: 12px; line-height: 1.42; color: var(--ink-2); text-wrap: pretty; }
/* plain words: a term and what it means */
.terms { margin: 0; display: grid; }
.terms > div { display: grid; grid-template-columns: minmax(84px, 34%) 1fr; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.terms > div:first-child { padding-top: 0; }
.terms > div:last-child { border-bottom: 0; padding-bottom: 0; }
.terms dt { font: 600 13.5px/1.3 var(--f-body); color: var(--ink); }
.terms dd { margin: 0; font-size: 13px; line-height: 1.38; color: var(--ink-soft); text-wrap: pretty; }
/* what each city office publishes: the place, then its own wording */
.terms.city > div { grid-template-columns: 1fr; gap: 2px; padding: 6px 0; }
.terms.city > div:first-child { padding-top: 0; }
.terms.city dt { font: 600 13px/1.3 var(--f-body); }
.terms.city dd { font-size: 12.5px; }
/* a row with no term spans both columns; the term rows before and after it keep their rules */
.terms-set { display: grid; }
.terms-p { margin: 0; padding: 7px 0; border-bottom: 1px solid var(--rule); font: 500 13px/1.4 var(--f-body); color: var(--ink); text-wrap: pretty; }
.terms-set > :not(:last-child).terms > div:last-child { border-bottom: 1px solid var(--rule); padding-bottom: 7px; }
.terms-set > * + .terms > div:first-child { padding-top: 7px; }
.terms-set > .terms-p:first-child { padding-top: 0; }
.terms-set > .terms-p:last-child { border-bottom: 0; padding-bottom: 0; }
/* price table (rotted framing): three columns with tabular numerals and a note row. It fits a 268 px card. */
.ptab { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums lining-nums; }
/* (the numerals are also set on the cells themselves, after their `font`: that shorthand resets font-variant-numeric,
   so the table's value alone never reaches a cell that sets its own font. Every digit is one width: the decimal points
   of a column stand on one line.) */
.ptab th, .ptab td { padding: 6px 0 6px 10px; border-bottom: 1px solid var(--rule); text-align: right; white-space: nowrap; font: 500 13.5px/1.3 var(--f-body); font-variant-numeric: tabular-nums lining-nums; color: var(--ink-soft); }
.ptab th:first-child, .ptab td:first-child { padding-left: 0; text-align: left; }
/* (a column's head may take two lines in a narrow card; a price never breaks) */
.ptab thead th { padding-top: 0; vertical-align: bottom; white-space: normal; text-wrap: balance; font: 500 10px/1.3 var(--f-mono); font-variant-numeric: tabular-nums lining-nums; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.ptab tbody th { font-weight: 600; color: var(--ink); }
.ptab tbody tr:last-child > * { border-bottom: 0; }
.ptab tfoot td { padding: 9px 0 0; border-top: 1px solid var(--rule); border-bottom: 0; white-space: normal; text-align: left; font-size: 12px; line-height: 1.42; color: var(--ink-2); text-wrap: pretty; }
/* a card the 3D has pointed at keeps a lit edge while its moment lasts */
.card.lit { border-color: var(--accent); }
.kv-line { margin: 8px 0 0; font: 500 13px/1.4 var(--f-body); color: var(--ink-soft); }
.kv-after { margin-top: 10px; border-top: 1px solid var(--rule); }
.more.more-r { left: auto; right: calc(var(--gut) + var(--sa-r)); width: var(--aside-w); bottom: calc(var(--bot-h) + 4px); height: 46px; background: none; }
.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; }
.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); }
.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); text-wrap: pretty; }
.alert-card p + p { margin-top: 6px; }

/* phone mockup (project page); it leaves room under it for one folded card */
.phone { margin: 0; align-self: center; width: min(100%, 292px); height: min(574px, calc(100dvh - var(--top-h) - var(--bot-h) - 72px)); min-height: 452px; 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: 16px; }
.ph-head > div { flex: 1; min-width: 0; }
.ph-prog-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ph-ill { font: 500 8px/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: #6b6a66; border: 1px solid #d4d0c8; border-radius: 999px; padding: 3px 6px; white-space: nowrap; }
.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: 7.5px 0; border-bottom: 1px solid #e3dfd7; }
.ph-row:last-child { border-bottom: 0; }
.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: the warranty card speaks in two voices, kept visibly apart. Voice 1 (.war-own), the company: the big
   numeral block and its own sentence. Under a rule and set smaller, voice 2 (.war-mfr), the manufacturer: its lead
   sentence and its rows. Last, the contact line. Then the closeout list. */
.war { display: flex; align-items: center; gap: 14px; }
.war-own { padding-bottom: 13px; }
.war-own .war-p { font: 500 13.5px/1.42 var(--f-body); color: var(--ink); }
.war-mfr { padding-top: 11px; border-top: 1px solid var(--rule-2); }
.war-lead { margin: 0 0 7px; font: 600 12px/1.4 var(--f-body); color: var(--ink-2); text-wrap: pretty; }
.war-li { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.war-li li { position: relative; padding-left: 13px; font-size: 12px; line-height: 1.4; color: var(--ink-soft); text-wrap: pretty; }
.war-li li::before { content: ''; position: absolute; left: 0; top: .66em; width: 5px; height: 1px; background: var(--ink-3); }
.war-p.war-later { margin-top: 11px; padding-top: 10px; border-top: 1px solid var(--rule); font-size: 12.5px; }
.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: 10px 0 0; font-size: 13px; line-height: 1.45; color: var(--ink-soft); text-wrap: pretty; }
.war-later { color: var(--ink); overflow-wrap: anywhere; }
.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:first-child { border-top: 0; padding-top: 0; }
.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 */
/* Each row is as tall as its button: the small label sits over the value, the actions to the right. (Label, value and
   two buttons do not fit side by side in a 270-340 px card: the e-mail address alone is ~195 px.) The card must stay
   short: the payment protections share this column and are never folded away for it. */
.contact-card { padding: 14px 18px 12px; container-type: inline-size; }
#app[data-step="next"] { --aside-w: clamp(296px, 25vw, 340px); }
/* (the warranty card never folds, and it holds two voices: a wider column keeps it short) */
#app[data-step="handover"] { --aside-w: clamp(300px, 27vw, 350px); }
.ct-head { display: flex; align-items: center; gap: 11px; padding-bottom: 9px; border-bottom: 1px solid var(--rule); }
.ct-logo { width: 34px; height: 34px; 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: minmax(0, 1fr) auto; grid-template-areas: "k act" "v act"; gap: 3px 8px; align-items: center; padding: 4px 0; border-bottom: 1px solid var(--rule); }
.ct-k { grid-area: k; align-self: end; font: 500 9.5px/1 var(--f-mono); letter-spacing: .15em; text-transform: uppercase; color: var(--ink-2); }
.ct-v { grid-area: v; align-self: start; font: 500 14px/1.25 var(--f-body); user-select: all; -webkit-user-select: all; overflow-wrap: anywhere; outline: none; }
.ct-act { grid-area: act; display: flex; gap: 4px; }
.mini-btn { width: 36px; height: 36px; border-radius: 10px; 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; }
#app.coarse .mini-btn { width: 44px; height: 44px; border-radius: 12px; }
.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; }
/* a narrow card: the row's own action (call, write, open) is enough; Copy stays where it is the only one */
@container (max-width: 282px) { .ct-act a.mini-btn + .mini-btn { display: none; } }
@container (max-width: 300px) { #app.coarse .ct-act a.mini-btn + .mini-btn { display: none; } }
/* compact rows (ui.js marks License, then Web, when the column would not fit): label, value and a low button on one line */
.ct-row.ct-x { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "k v act"; gap: 0 9px; padding: 3px 0; }
.ct-row.ct-x .ct-k, .ct-row.ct-x .ct-v { align-self: center; }
.ct-row.ct-x .ct-v { font-size: 13.5px; }
.ct-row.ct-x .mini-btn, #app.coarse .ct-row.ct-x .mini-btn { height: 28px; border-radius: 8px; }
.ct-row.ct-x .mini-btn .ic { width: 15px; height: 15px; }
.ct-row:last-child { border-bottom: 0; }

/* ============================================================ 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; }
/* 17 dots, one per step. The columns are even where every name has room. Where two neighbours would touch (a tablet in
   landscape), js/ui-layout.js sets --cols: each column leans toward its own name's width, so the names keep one line
   and a clear gap, and the dots stay over them (--rail-l / --rail-r: the rail's ends follow the first and last dot). */
.tl-groups, .tl-nodes { display: grid; grid-template-columns: var(--cols, 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: var(--rail-l, calc(50% / var(--n, 17))); right: var(--rail-r, 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.inch .tl-top, .tl-node.cur .tl-top { color: var(--ink); }
/* a short step name under every dot on wide screens */
.tl-nm { position: absolute; top: calc(50% + 9px); left: 50%; transform: translateX(-50%); font: 500 clamp(10.5px, .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); display: block; }
.tl-node.xtra .tl-nm { letter-spacing: .02em; }
@media (min-width: 1100px) {
  .tl-node.has-nm .tl-nm { display: block; }
}
.tl-node.armed .tl-dot { border-color: var(--accent); transform: scale(1.35); }
/* where you are: "05 · Siding days · Siding" (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: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:focus-visible::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:focus-visible::after, .tl-nodes li:nth-last-child(2) .tl-node:focus-visible::after { transform: translate(0, 0); }
/* the hover tooltip only where there is a pointer that hovers (on touch, :hover sticks to the last tapped dot) */
@media (hover: hover) {
  .tl-node:hover::after { opacity: 1; transform: translate(-50%, 0); }
  .tl-nodes li:first-child .tl-node:hover::after { transform: translate(0, 0); }
  .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; width: 226px; 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: 146px; }
.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); }
/* Preparing: the first view stands while the rest of the model is built behind it. Until then Next reads "Preparing the
   3D model" over its progress line (.idle: no figure yet, so a segment travels), and "Start the tour" shows a small
   ring. A press is kept and applied when the model is ready. Nothing moves or resizes. */
.btn-cta { position: relative; }
.btn-cta.busy, .nav-next.busy { cursor: progress; }
.btn-cta.busy > .ic { opacity: 0; transition: opacity .15s .1s; }
.btn-cta.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; }
@keyframes busy-in { from { opacity: 0; } }
@keyframes busy-spin { to { transform: rotate(360deg); } }
.nav-next.busy .nb-ic { display: none; }
.nav-next.busy .nb-txt { flex: 1; padding-bottom: 5px; }
.nav-next.busy .nb-k { font-size: 14.5px; letter-spacing: -.005em; white-space: nowrap; }
.nav-next.busy .nb-prog { opacity: 1; bottom: 12px; }
.nb-prog.idle i { width: 36%; animation: nb-travel 1.25s cubic-bezier(.45, 0, .55, 1) infinite; }
@keyframes nb-travel { from { transform: translateX(-100%); } to { transform: translateX(278%); } }

/* ============================================================ 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: 240px; max-width: 62vw; height: 3px; border-radius: 2px; background: var(--rule-2); overflow: hidden; }
.ld-bar i { display: block; height: 100%; width: 100%; border-radius: 2px; background: var(--accent); transform-origin: left; transform: scaleX(.04); transition: transform .5s var(--ease); will-change: transform; }
.ld-msg { font: 500 13px/1.5 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); max-width: 30em; }
/* a still of the intro view behind the loader (img/poster*.jpg; the boot guard picks the one made for this screen's
   shape): the loader's fade is the cross-fade into the live 3D view */
.ld-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 72% 50%; opacity: 0; transition: opacity .5s; }
.ld-poster.on { opacity: 1; }
.ld-poster.fit { object-position: 50% 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)); } }
/* upright and small screens: the text sits low, where the headline will be; the house (upper half) stays in view */
@media (max-width: 899px), (max-aspect-ratio: 1/1) { #loader:not(.fallback) .ld-poster ~ .ld-in { align-self: end; margin-bottom: 16vh; } }
#loader.fallback .ld-in { padding-top: 7vh; }
#loader.failed .ld-bar { display: none; }
#loader.failed .ld-msg, #loader.waiting .ld-msg { color: var(--ink); }
.ld-reload { margin-top: 2px; }
#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: 16 / 9; max-height: 40vh; object-fit: cover; object-position: 70% 55%; 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"], #app[data-step="roughin"], #app[data-step="check"], #app[data-step="finish"] { --sheet-h: 42dvh; }
  #app[data-step="schedule"], #app[data-step="estimate"] { --sheet-h: 44dvh; }
  #app[data-step="next"], #app[data-step="handover"] { --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 color chooser: the house stays visible above it */
  .cfg-card { padding: 12px 14px; }
  .cfg { gap: 10px; margin-top: 10px; }
  .cfg-row { gap: 6px; }
  .sw { width: 40px; height: 40px; }
  .sw-lap { height: 42px; }
  .sw-trim { height: 36px; }
  .sty-th { 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%); }
  .more-r { display: none; }
  /* in the sheet every card is open; its heading still folds it by hand */
  #aside { gap: 10px; }
  /* a wide sheet (a tablet held upright): the cards sit two abreast */
  @media (min-width: 700px) {
    #aside { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
    #aside > :only-child:not(.phone) { grid-column: 1 / -1; }
    #aside > .phone { justify-self: center; }
  }
  .terms > div { grid-template-columns: minmax(96px, 30%) 1fr; }
  #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; }
  /* (the side column's "sit at the bottom" margin would drop the first card to the foot of its grid cell here) */
  #aside > :first-child { margin-top: 0; }
  #aside > .phone { max-width: 340px; align-self: center; }
  .p-lines p { max-width: 44em; }
  .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-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; width: auto; min-width: 0; }
  .nb-t { max-width: none; }
  .hero { --hero-b: calc(var(--bot-h) + 22px); left: calc(16px + var(--sa-l)); right: calc(16px + var(--sa-r)); width: auto; }
  .hero.scroll { width: auto; }
  .hero-title { font-size: max(26px, calc(clamp(38px, 10.4vw, 76px) * var(--hk))); }
  .hero-kicker { margin-bottom: calc(16px * var(--hg)); font-size: 11px; letter-spacing: .16em; }
  .hero-sub { font-size: max(14.5px, calc(16px * var(--hf))); margin: calc(16px * var(--hg)) 0 0; }
  .hero-note { font-size: max(12px, calc(13px * var(--hf))); margin-top: calc(6px * var(--hg)); }
  .hero-row { gap: 16px 18px; margin-top: calc(18px * var(--hg)); }
  .six { margin-top: calc(16px * var(--hg)); padding-top: calc(8px * var(--hg)); gap: 0 22px; }
  .six-b { font-size: 13px; padding: calc(5px * var(--hg)) 0; min-height: calc(30px * var(--hr)); }
  #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; }
  .icon-btn.skip-btn { display: none; }       /* a phone's top bar: a long press on Next does the same */
  .hero-facts { gap: 16px; }
  .hero-facts dd { font-size: max(13px, calc(14px * var(--hf))); }
  .six { gap: 0 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: calc(12px * var(--hg)); }
  .btn-cta { height: max(44px, calc(50px * var(--hr, 1))); padding: 0 20px 0 22px; }
  /* a phone: this page's kicker and note are long; they are set a size down so the house keeps its place above them */
  .hero-kicker { font-size: 10px; letter-spacing: .1em; gap: 8px; margin-bottom: calc(12px * var(--hg)); }
  .hero-kicker::before { width: 16px; }
  .hero-title { font-size: max(26px, calc(clamp(32px, 9.2vw, 76px) * var(--hk))); }
  .hero-sub { font-size: max(14.5px, calc(15px * var(--hf))); margin-top: calc(12px * var(--hg)); }
  .hero-note { font-size: max(12px, calc(12.5px * var(--hf))); }
  .hero-row { margin-top: calc(14px * var(--hg)); gap: 12px 16px; }
  .rdy { gap: 8px; }
  .rdy li { font-size: 13px; }
}
@media (max-width: 380px) {
  .brand-txt { display: none; }
}
/* the side panel tightens in stages when its content would overflow (ui.js fitPanel):
   .tight: smaller numeral and title, closer spacing; .tighter: compact lists and smaller text;
   .nonotes: the block's optional notes go; .tightest: the facts give way, but only to the step's own block
   (.has-blk); .min: the last few pixels. The step's lines are never hidden. Anything left scrolls, with "More". */
#panel.tight { --num: clamp(56px, 8.4vh, 84px); }
#panel.tight .numeral { margin: 10px 0 8px -.05em; }
#panel.tight .p-title { margin-bottom: 12px; font-size: clamp(25px, 1.5vw + 1.2vh, 38px); }
#panel.tight .p-head.no-num .p-title { margin: 12px 0 10px; font-size: clamp(30px, 1.8vw + 1.2vh, 44px); }
#panel.tight .p-lines p { margin-bottom: 7px; font-size: 15px; line-height: 1.48; }
#panel.tight .p-facts { margin-top: 12px; }
#panel.tight .fact { padding: 8px 0 6px; }
#panel.tight .fact dt { margin-bottom: 5px; }
#panel.tight .blk { margin-top: 14px; }
#panel.tight .p-inner { padding: 6px 0 8px; }
#panel.tighter { --num: 52px; }
#panel.tighter .numeral { margin: 8px 0 6px -.05em; }
#panel.tighter .p-title { margin-bottom: 9px; font-size: clamp(23px, 1.3vw + 1.1vh, 32px); }
#panel.tighter .p-lines p { margin-bottom: 6px; font-size: 14.5px; line-height: 1.44; }
#panel.tighter .fact dd { font-size: 13.5px; }
#panel.tighter .blk { margin-top: 12px; }
#panel.tighter .blk-h { padding-bottom: 8px; }
#panel.tighter .part { padding: 6px 8px 6px 0; }
#panel.tighter .part .pt { font-size: 14.5px; }
#panel.tighter .part .pd { font-size: 12.5px; line-height: 1.34; }
#panel.tighter .look-row { padding: 7px 0; }
#panel.tighter .layer { padding: 6px 0; }
#panel.tighter .ly-t { font-size: 13.5px; line-height: 1.36; }
#panel.tighter .ck { padding: 7px 0; }
#panel.tighter .pay li { padding-bottom: 8px; }
#panel.tighter .pay-t { font-size: 13.5px; }
#panel.tighter .blk-note { margin-top: 8px; font-size: 12.5px; line-height: 1.4; }
#panel.tighter .p-inner { padding: 4px 0 6px; }
/* .nonotes (between .tighter and .tightest): the block's optional notes (p.blk-note.opt, repeated in a card on the
   right) go before the facts do */
#panel.nonotes .blk-note.opt { display: none; }
#panel.tightest.has-blk .p-facts { display: none; }
#panel.tightest .p-inner { padding: 2px 0 2px; }
/* .min (after .tightest; very short screens, e.g. an iPad in landscape inside a browser frame): the step's own list
   must still show whole */
#panel.min { --num: 44px; }
#panel.min .numeral { margin: 6px 0 4px -.05em; }
#panel.min .p-title { margin-bottom: 7px; }
#panel.min .p-lines p { margin-bottom: 4px; font-size: 14px; line-height: 1.4; }
#panel.min .blk { margin-top: 9px; }
#panel.min .blk-h { padding-bottom: 6px; }
#panel.min .part { padding: 5px 8px 5px 0; }
#panel.min .part::after { top: 11px; }
#panel.min .p-inner { padding: 0; }
/* 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: 10px; }
  .cfg-cap { font-size: 12px; }
  .sw { width: 40px; height: 40px; }
  .sw-lap { height: 44px; }
  .sw-trim { height: 38px; }
  .sty-th { height: 38px; }
  .card { padding: 13px 16px; }
  .card.fold .card-h { margin: -13px -16px 0; }
  .fold-h { padding: 13px 16px 10px; }
  .card.fold.shut { padding-bottom: 0; }
  .card.fold.shut .fold-h { padding-bottom: 13px; }
  .li li, .terms dt { font-size: 13px; }
  .terms dd { font-size: 12.5px; }
  .war { gap: 12px; }
  .war-own { padding-bottom: 10px; }
  .war-n { font-size: 60px; }
  .war-u { font-size: 17px; }
  .war-k { letter-spacing: .08em; }
  .war-p, .war-own .war-p { font-size: 12.5px; line-height: 1.4; margin-top: 7px; }
  .war-mfr { padding-top: 9px; }
  .war-lead { margin-bottom: 5px; }
  .war-li { gap: 4px; }
  .war-li li { font-size: 11.5px; line-height: 1.36; }
  .war-p.war-later { margin-top: 9px; padding-top: 8px; font-size: 12px; }
  .ptab th, .ptab td { padding-top: 5px; padding-bottom: 5px; font-size: 13px; }
  .ptab thead th { padding-top: 0; font-size: 10px; }
  .ptab tfoot td { padding: 8px 0 0; font-size: 11.5px; }
  .co { padding: 6px 0; font-size: 13px; }
  .last-pay { margin-top: 8px; padding-top: 8px; font-size: 12.5px; }
  /* the last screen: the payment card (never folded) and the contact card share a ~620 px column */
  .pay-opts > div { padding: 6px 0; }
  .opts-card .card-note { margin-top: 8px; }
  .contact-card { padding: 12px 16px 11px; }
  .ct-head { padding-bottom: 7px; }
  .ct-logo { width: 30px; height: 30px; }
  .ct-row { padding: 3px 0; }
  /* a tablet on the table, two people at arm's length: the cards' text a size up (they fold to make the room) */
  #app.coarse .li li, #app.coarse .terms dt { font-size: 14.5px; }
  #app.coarse .terms dd, #app.coarse .terms-p, #app.coarse .war-own .war-p { font-size: 14px; }
  #app.coarse .terms.city dt { font-size: 14px; }
  #app.coarse .terms.city dd { font-size: 13.5px; }
  #app.coarse .card-h, #app.coarse .fact dt { font-size: 11.5px; }
  #app.coarse .war-li li { font-size: 12.5px; }
  #app.coarse .war-p.war-later { font-size: 13px; }
  #app.coarse .ptab th, #app.coarse .ptab td { font-size: 14px; }
  #app.coarse .ptab thead th { font-size: 10px; }
  #app.coarse .ptab tfoot td { font-size: 12.5px; }
  /* (17 names share the bar: a slightly narrower Next button leaves them room; js/ui-layout.js keeps neighbours apart) */
  #app.coarse .tl-nm { font-size: 11.5px; letter-spacing: -.02em; }
  #app.coarse .nav-next { width: 204px; padding: 0 18px 0 22px; }
  #app.coarse .nb-t { max-width: 128px; }
  #app.coarse .nav-next.busy .nb-k { font-size: 14px; letter-spacing: -.01em; }
  #app.coarse .sw-lap { height: 48px; }
  #app.coarse .sw-trim { height: 44px; }
}
/* touch targets */
#app.coarse .cfg-reset { min-height: 40px; margin: -11px 0; padding: 0 12px 0 10px; }
#app.coarse .more-btn { min-height: 40px; padding: 0 12px 0 14px; }
/* 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; }
  /* a still ring and a still, half-lit line (the rule above would run them a hundred times a second). The line sets
     its own transform: at rest the bar is scaleX(0), and only the travelling animation lifted that. */
  .btn-cta.busy::after { animation: none; }
  .nb-prog.idle i { animation: none; width: 100%; transform: none; opacity: .5; }
}
