/* Hallmark · v2.0.0 · system: DESIGN.md (locked, calm instrument) · genre editorial · round 3 gate pass 2026-11-05 */
/* The estimator: a full-screen instrument. Satellite stage on the left, one question at a time on the right. */

.est { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 24px; visibility: hidden; }
.est.is-open { visibility: visible; }
.est__scrim { position: absolute; inset: 0; background: var(--scrim); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); opacity: 0; transition: opacity .5s var(--ease); }
.est.is-open .est__scrim { opacity: 1; }
.est__panel {
	position: relative; width: min(1200px, 100%); height: min(780px, calc(100dvh - 48px));
	display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
	border-radius: 30px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow-lg), 0 0 0 1px var(--line);
	opacity: 0; transform: translateY(26px) scale(.985); transition: opacity .55s var(--ease), transform .8s var(--ease);
}
.est.is-open .est__panel { opacity: 1; transform: none; }
.est__close { position: absolute; top: 16px; right: 16px; z-index: 5; width: 46px; height: 46px; border-radius: 999px; border: 0; cursor: pointer; background: var(--bg-2); display: grid; place-items: center; transition: transform .5s var(--ease); }
.est__close:hover { transform: rotate(90deg); }
.est__close svg { width: 20px; height: 20px; }

/* Satellite stage */
.stage { position: relative; overflow: hidden; background: var(--stage-bg); color: var(--on-dark); isolation: isolate; }
.stage__tiles { position: absolute; inset: 0; }
.stage__tiles img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform-origin: 50% 50%; will-change: transform, opacity; }
.stage__tiles img.is-shown { opacity: 1; }
.stage__veil { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse 70% 60% at 50% 50%, transparent 40%, var(--shade-1) 100%); /* gate:overlay */ }
.stage__hero { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(.85) brightness(.75); transition: opacity .8s var(--ease); }
.stage.has-tiles .stage__hero { opacity: 0; }
.reticle { position: absolute; left: 50%; top: 50%; width: 132px; height: 132px; translate: -50% -50%; opacity: 0; transition: opacity .6s var(--ease) .2s; pointer-events: none; }
.stage.is-landed .reticle { opacity: 1; }
.reticle i { position: absolute; inset: 0; border-radius: 999px; border: 2px solid var(--accent); box-shadow: 0 0 0 9999px var(--ring-shadow); }
.reticle i + i { border-width: 1.5px; box-shadow: none; animation: ring 2.4s var(--ease) infinite; }
.reticle b { position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 999px; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-line); }
.stage__addr { position: absolute; top: 18px; left: 18px; right: 80px; z-index: 2; display: inline-flex; gap: 10px; align-items: center; max-width: max-content; padding: 10px 16px 10px 12px; border-radius: 999px; background: var(--glass-dark); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); font-size: 14.5px; font-weight: 500; box-shadow: inset 0 0 0 1px var(--glass-line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stage__addr svg { width: 18px; height: 18px; color: var(--accent); flex-shrink: 0; }
.stage__addr span { overflow: hidden; text-overflow: ellipsis; }
.stage__read { position: absolute; left: 18px; right: 18px; bottom: 18px; z-index: 2; display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.chip { display: inline-flex; flex-direction: column; padding: 10px 14px; border-radius: 16px; background: var(--glass-dark); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: inset 0 0 0 1px var(--glass-line); transition: transform .7s var(--ease), opacity .7s var(--ease); }
.js .chip:not(.is-in) { transform: translateY(10px); opacity: 0; }
.chip.is-in { transform: none; opacity: 1; }
.chip small { font-size: 11px; opacity: .7; font-weight: 600; }
.chip b { font-family: var(--f-num); font-size: 20px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.chip--status { flex-direction: row; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; }
.chip--status .bar { width: 46px; height: 4px; border-radius: 9px; background: var(--glass-line); overflow: hidden; position: relative; }
.chip--status .bar::after { content: ""; position: absolute; inset: 0; width: 40%; border-radius: inherit; background: var(--accent); animation: slide 1.3s var(--ease-io) infinite; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
.chip--done .bar { display: none; }
.stage__attr { position: absolute; right: 12px; bottom: 6px; z-index: 1; font-size: 10.5px; color: var(--on-dark-2); }
.stage__3d { position: absolute; top: 18px; right: 18px; z-index: 3; }
.stage__3d .btn { --h: 44px; background: var(--glass-dark); color: var(--on-dark); backdrop-filter: blur(12px); box-shadow: inset 0 0 0 1px var(--glass-line); padding: 0 16px; font-size: 14.5px; }
.stage__3d svg { width: 18px; height: 18px; }
.stage__map3d { position: absolute; inset: 0; z-index: 1; opacity: 0; transition: opacity 1s var(--ease); }
.stage.is-3d .stage__map3d { opacity: 1; }

/* Flow column */
.flow { position: relative; display: flex; flex-direction: column; min-height: 0; background: var(--surface); }
.flow__top { display: flex; align-items: center; gap: 14px; padding: 22px 76px 0 32px; }
.flow__back { width: 42px; height: 42px; border-radius: 999px; border: 0; background: var(--bg-2); display: grid; place-items: center; cursor: pointer; flex-shrink: 0; transition: opacity .3s; }
.flow__back[hidden] { display: grid; visibility: hidden; }
.flow__back svg { width: 18px; height: 18px; }
.progress { flex: 1; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 5px; }
.progress i { height: 4px; border-radius: 9px; background: var(--line-2); overflow: hidden; position: relative; }
.progress i::after { content: ""; position: absolute; inset: 0; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .7s var(--ease); }
.progress i.on::after { transform: none; }
.flow__body { position: relative; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 26px 32px 32px; }
.q { display: none; }
.q.is-on { display: block; animation: qin .65s var(--ease) both; }
.q.is-back { animation-name: qback; }
@keyframes qin { from { opacity: 0; transform: translateX(26px); } to { opacity: 1; transform: none; } }
@keyframes qback { from { opacity: 0; transform: translateX(-26px); } to { opacity: 1; transform: none; } }
.q .q__h { font-family: var(--f-display); font-weight: 800; line-height: 1.05; color: var(--ink); text-wrap: balance; margin-top: 0; font-size: clamp(26px, 2.6vw, 34px); letter-spacing: -.025em; margin-bottom: 8px; }
.q__sub { color: var(--muted); margin: 0 0 22px; font-size: 16px; }
.q__why { margin: 18px 0 0; font-size: 14px; color: var(--muted); display: flex; gap: 8px; }
.q__why svg { width: 17px; height: 17px; flex-shrink: 0; margin-top: 2px; }

.opts { display: grid; gap: 10px; }
.opts--2 { grid-template-columns: 1fr 1fr; }
.opts--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.opt {
	position: relative; display: flex; align-items: center; gap: 14px; width: 100%; min-height: 64px; padding: 14px 18px; text-align: left;
	border: 0; border-radius: 18px; background: var(--bg); cursor: pointer; font-weight: 600; font-size: 16.5px;
	box-shadow: inset 0 0 0 1.5px var(--line); transition: box-shadow .3s var(--ease), transform .4s var(--ease), background-color .3s var(--ease);
}
.opt:hover { box-shadow: inset 0 0 0 1.5px var(--ink-2); }
.opt:active { transform: scale(.985); }
.opt[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--accent); background: var(--accent-soft); }
.opt small { display: block; font-weight: 400; font-size: 14px; color: var(--muted); margin-top: 2px; }
.opt svg { width: 26px; height: 26px; flex-shrink: 0; color: var(--ink-2); }
.opt--img { flex-direction: column; align-items: stretch; padding: 6px 6px 12px; gap: 10px; min-height: 0; }
.opt--img img { aspect-ratio: 1.25; object-fit: cover; border-radius: 13px; width: 100%; }
.opt--img span { padding: 0 6px; font-size: 15px; line-height: 1.25; }
.opt--house { flex-direction: column; justify-content: flex-end; padding: 18px 12px 14px; gap: 10px; text-align: center; min-height: 150px; }
.opt--house svg { width: 64px; height: auto; color: var(--ink-2); }
.opt--house span { font-size: 15.5px; }
.skip-link { display: inline-block; margin-top: 16px; background: none; border: 0; padding: 4px 0; font-weight: 600; font-size: 15px; color: var(--ink-2); border-bottom: 1.5px solid var(--accent); cursor: pointer; }

.confirm-addr { padding: 18px 20px; border-radius: 18px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); margin: 6px 0 22px; }
.confirm-addr b { display: block; font-size: 19px; font-weight: 650; letter-spacing: -.01em; }
.confirm-addr span { color: var(--muted); font-size: 15px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.flow .addr { margin-top: 8px; }

/* Waiting */
.wait { text-align: left; }
.wait__bar { height: 6px; border-radius: 9px; background: var(--line); overflow: hidden; margin: 22px 0 14px; }
.wait__bar i { display: block; height: 100%; width: 100%; background: var(--accent); border-radius: inherit; transform: scaleX(.08); transform-origin: left; transition: transform .9s linear; }
.wait__steps { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; color: var(--muted); font-size: 15.5px; }
.wait__steps li { display: flex; gap: 10px; align-items: center; transition: color .4s; }
.wait__steps li svg { width: 20px; height: 20px; opacity: .35; transition: opacity .4s, color .4s; }
.wait__steps li.done { color: var(--ink); }
.wait__steps li.done svg { opacity: 1; color: var(--ok); }

/* Result */
.res__badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border-radius: 999px; background: var(--bg-2); font-size: 13.5px; font-weight: 600; margin-bottom: 14px; }
.res__badge svg { width: 18px; height: 18px; color: var(--ok); }
.res__badge.is-rough svg { color: var(--accent); }
.res__k { font-size: 14px; color: var(--muted); font-weight: 500; }
.res__range { font-family: var(--f-num); font-weight: 700; font-size: clamp(36px, 4.2vw, 52px); letter-spacing: -.04em; line-height: 1.04; margin: 4px 0 18px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.res__range span { color: var(--muted); font-weight: 500; font-size: .5em; letter-spacing: -.01em; margin: 0 .3em; vertical-align: .32em; }
.res__facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0 16px; }
.res__facts div { padding: 12px 14px; border-radius: 14px; background: var(--bg); }
.res__facts small { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.res__facts b { font-family: var(--f-num); font-weight: 600; font-size: 16.5px; font-variant-numeric: tabular-nums; }
.res__how { border-radius: 16px; box-shadow: inset 0 0 0 1px var(--line); margin-bottom: 14px; }
.res__how summary { cursor: pointer; list-style: none; padding: 14px 16px; font-weight: 600; font-size: 15.5px; display: flex; justify-content: space-between; align-items: center; }
.res__how summary::-webkit-details-marker { display: none; }
.res__how summary svg { width: 18px; height: 18px; transition: transform .4s var(--ease); }
.res__how[open] summary svg { transform: rotate(90deg); }
.res__how ol { margin: 0; padding: 0 16px 16px 34px; font-size: 14.5px; color: var(--ink-2); display: grid; gap: 6px; }
.res__note { font-size: 13.5px; color: var(--muted); margin: 0 0 22px; }
.res__repair { padding: 18px; border-radius: 16px; background: var(--bg); margin: 8px 0 18px; }

/* Lead form */
.lead { margin-top: 6px; padding-top: 22px; border-top: 1px solid var(--line); }
.lead .lead__h { font-family: var(--f-display); font-weight: 700; letter-spacing: -.015em; line-height: 1.15; margin-top: 0; font-size: 23px; margin-bottom: 6px; }
.lead > p { color: var(--muted); font-size: 15.5px; margin: 0 0 18px; }
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: grid; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.field label i { font-style: normal; font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; min-height: 52px; padding: 12px 15px; border-radius: var(--r-in); border: 0; background: var(--bg); box-shadow: inset 0 0 0 1.5px var(--line-2); font-size: 16.5px; transition: box-shadow .25s var(--ease); }
.field textarea { min-height: 84px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; box-shadow: inset 0 0 0 2px var(--accent); }
.field.has-err input, .field.has-err select { box-shadow: inset 0 0 0 2px var(--err); }
.field__err { font-size: 13.5px; color: var(--err); font-weight: 500; min-height: 0; }
.consent { display: grid; grid-template-columns: 26px 1fr; gap: 10px; margin: 16px 0 6px; font-size: 13px; line-height: 1.5; color: var(--ink-2); cursor: pointer; }
.consent input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--accent); cursor: pointer; }
.consent a { color: var(--ink); }
.consent.has-err { color: var(--err); }
.lead .btn { width: 100%; justify-content: space-between; margin-top: 14px; }
.lead__trust { display: flex; gap: 8px; align-items: center; justify-content: center; margin-top: 12px; font-size: 13.5px; color: var(--muted); }
.lead__trust svg { width: 16px; height: 16px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-err { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: color-mix(in srgb, var(--err) 12%, transparent); color: var(--err); font-weight: 500; font-size: 14.5px; }

@media (max-width: 900px) {
	.est { padding: 0; place-items: stretch; }
	.est__panel { width: 100%; height: 100dvh; border-radius: 0; grid-template-columns: minmax(0, 1fr); grid-template-rows: 36dvh minmax(0, 1fr); }
	.est__close { top: 12px; right: 12px; background: var(--glass-dark); color: var(--on-dark); backdrop-filter: blur(10px); }
	.stage__addr { top: 12px; left: 12px; right: 70px; font-size: 13.5px; }
	.stage__3d { top: auto; bottom: 12px; right: 12px; }
	.stage__read { left: 12px; right: 12px; bottom: 12px; }
	.chip { padding: 6px 10px; border-radius: 12px; }
	.chip small { font-size: 9.5px; }
	.chip b { font-size: 14.5px; }
	.chip--status.chip--done { display: none; }
	.stage__read { flex-wrap: nowrap; gap: 6px; }
	.reticle { width: 92px; height: 92px; top: 44%; }
	.flow__top { padding: 16px 20px 0; }
	.flow__body { padding: 18px 20px 28px; }
	.opts--3.opts--img { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.opt--house { min-height: 120px; }
	.res__facts { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 420px) { .fgrid { grid-template-columns: 1fr; } .opts--2 { grid-template-columns: 1fr; } .res__range { font-size: 34px; } }
@media (prefers-reduced-motion: reduce) { .q.is-on { animation: none; } }

.consent__opt { font-style: normal; color: var(--muted); }
.consent__links, .disclose, .notice-collect { font-size: 13px; line-height: 1.5; color: var(--ink-2); margin: 6px 0 0; }
.disclose { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: var(--bg); }
.notice-collect { color: var(--muted); margin-top: 12px; }
.consent__links a, .disclose a, .notice-collect a { color: var(--ink); }
.vet { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13.5px; color: var(--ink-2); }
.vet li { display: inline-flex; align-items: center; gap: 6px; }
.vet svg { width: 15px; height: 15px; color: var(--ok); }
.storm-note { margin: 14px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); font-size: 13px; line-height: 1.5; }
.storm-note a { color: var(--ink); }

/* Round 2: result upgrades */
.res__first { display: flex; align-items: center; gap: 8px; margin: 14px 0 0; font-size: 14.5px; color: var(--ok); }
.res__first svg { width: 17px; height: 17px; flex: none; }
.res__monthly { margin: 6px 0 0; font-size: 14.5px; color: var(--muted); }
.res__small { margin: 10px 0 0; font-size: 14px; color: var(--muted); }
.cmp { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 15px; }
.cmp th, .cmp td { padding: 0; border-bottom: 1px solid var(--line); text-align: left; font-weight: 500; }
.cmp thead th { padding: 8px 0; font-size: 13.5px; color: var(--muted); }
.cmp td { padding: 10px 0; text-align: right; white-space: nowrap; }
.cmp__pick { all: unset; display: block; width: 100%; padding: 10px 8px 10px 0; cursor: pointer; color: var(--ink); }
.cmp__pick:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.cmp__pick:hover { color: var(--accent); }
.cmp tr.is-on .cmp__pick, .cmp tr.is-on td { font-weight: 700; color: var(--ink); }
.scope { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 12px; }
.scope ul { margin: 6px 0 0; padding-left: 1.1em; font-size: 14.5px; color: var(--ink-2); }
.scope li { margin-bottom: 4px; }
.lead__actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.ts { margin: 12px 0; min-height: 65px; }
@media (max-width: 640px) { .scope { grid-template-columns: minmax(0, 1fr); } .lead__actions .btn { width: 100%; justify-content: space-between; } }
/* ZIP or city entry: our own photo, no satellite, so no Google credit */
.est.is-area .stage__attr { display: none; }

/* Round 3: the result step is a gate. Form on one screen, submit always reachable, price only in the email. */
.q.res.is-on { display: flex; flex-direction: column; min-height: 100%; }
.lead { margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; flex: 1; }
.lead__scroll { flex: 1; }
.res .q__h { font-size: clamp(25px, 2.4vw, 32px); }
.res .q__sub { margin-bottom: 14px; font-size: 15.5px; }
.res__facts { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0 0 16px; }
.res__facts[hidden] { display: none; }
.res__facts div { padding: 10px 12px; }
.res__facts b { font-size: 15px; display: block; overflow-wrap: break-word; }
.lead .fgrid { gap: 10px 12px; }
.lead .field input { min-height: 50px; }
.lead .disclose { margin-top: 12px; }
.lead__foot { position: sticky; bottom: -32px; margin: 14px -32px -32px; padding: 12px 32px 16px; background: var(--surface); box-shadow: 0 -1px 0 var(--line); z-index: 2; }
.lead__foot .btn { margin-top: 0; }
.lead__foot .disclose { margin: 0 0 10px; padding: 0; background: none; font-size: 12.5px; line-height: 1.4; color: var(--muted); }
.lead__foot .disclose a { color: var(--muted); }
@media (max-width: 900px) {
	.est[data-at="result"] .est__panel { grid-template-rows: 11dvh minmax(0, 1fr); }
	.est[data-at="result"] .stage__read, .est[data-at="result"] .stage__3d, .est[data-at="result"] .stage__attr { display: none; }
	.lead__foot { bottom: -28px; margin: 12px -20px -28px; padding: 10px 20px 12px; }
	.est[data-at="result"] .flow__top { padding-top: 10px; }
	.res .res__badge { display: none; }
	.res .q__h { font-size: 25px; margin-bottom: 4px; }
	.res .q__sub { font-size: 15px; margin-bottom: 10px; }
	.res__facts { display: flex; flex-wrap: wrap; gap: 2px 14px; margin-bottom: 10px; }
	.res__facts[hidden] { display: none; }
	.res__facts div { padding: 0; background: none; }
	.res__facts small { display: none; }
	.res__facts b { font-size: 14.5px; }
	.lead .fgrid { gap: 8px; }
	.lead .field { gap: 3px; }
	.lead .field label { font-size: 13.5px; }
	.lead .field input { min-height: 46px; }
}
@media (max-width: 420px) { .lead .fgrid { grid-template-columns: minmax(0, 1fr); } }

/* Native selects: WebKit on iPhone ignores height until the appearance is reset. */
.field select { -webkit-appearance: none; appearance: none; padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%2356616c' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 16px; }

/* Round 5: storm history card. Desktop on the confirm step, phone on the intent step (confirm has no room above the fold). */
.near { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; margin-top: 18px; padding: 16px 18px; border-radius: 18px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); }
.near[hidden] { display: none; }
.near > svg { width: 22px; height: 22px; margin-top: 2px; color: var(--ink); }
.near b { display: block; font-size: 15.5px; }
.near p { margin: 4px 0 6px; font-size: 15px; line-height: 1.45; color: var(--ink-2); }
.near small { display: block; font-size: 13px; line-height: 1.4; color: var(--muted); }
.near--intent { display: none; margin: 0 0 16px; }
@media (max-width: 900px) {
	.near--confirm, .near--confirm:not([hidden]) { display: none; }
	.near--intent:not([hidden]) { display: grid; }
}
