/* The remodelers' estimate inside the quiz (/audit?v=rem, js/audit.js walk / pick / text / estimate steps).
   The concept (DESIGN-remodelers.md): for once, someone writes YOU the estimate. A sheet with a job address, ruled line
   items, scope of work, total and a warranty stamp. Everything "filled in" is JetBrains Mono, like it was typed onto the
   form; labels are small caps; values write in from the left. Tokens from css/audit.css. */
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 500; font-display: optional;
  src: url(/assets/fonts/jetbrains-mono-500.woff2) format('woff2'); }
:root { --est-mono: 'JetBrains Mono', ui-monospace, Menlo, monospace; --est-ease: cubic-bezier(0.16, 1, 0.3, 1); }

.est-mono { font-family: var(--est-mono); font-weight: 500; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.est-lab { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-2); }

.est-sheet { position: relative; margin-top: 20px; padding: 20px 20px 18px; background: var(--card); border: 1px solid var(--line-2);
  border-radius: 14px; box-shadow: 0 1px 0 var(--line), 0 28px 48px -36px rgba(26, 26, 26, 0.45); }
@media (min-width: 640px) { .est-sheet { padding: 26px 28px 22px; } }
.est-top { display: grid; gap: 6px; padding-bottom: 14px; border-bottom: 2px solid var(--ink); }
.est-addr { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 20px; line-height: 1.2; color: var(--ink); overflow-wrap: anywhere; }
.est-addr--long { font-size: 16px !important; }
.est-addr--xlong { font-size: 14px !important; }
@media (min-width: 640px) { .est-addr { font-size: 22px; } }
.est-fav { flex: none; width: 20px; height: 20px; border-radius: 4px; }
.est-status { margin: 14px 0 2px; font-family: var(--est-mono); font-size: 14px; color: var(--ink-2); }
.est-status::after { content: '▌'; margin-left: 2px; color: var(--accent); animation: est-caret 1s steps(2) infinite; }
@keyframes est-caret { 50% { opacity: 0; } }

/* the findings: one ruled line each, written in left to right */
.est-items { margin: 0; padding: 0; list-style: none; }
.est-item { display: grid; grid-template-columns: 18px minmax(0, 1fr); column-gap: 10px; row-gap: 2px; align-items: baseline;
  padding: 12px 0; border-bottom: 1px solid var(--line); position: relative; }
.est-item::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--ink);
  transform: scaleX(0); transform-origin: left; }
.est-mark { grid-row: 1 / span 2; display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px;
  margin-top: 1px; border-radius: 50%; color: #fff; background: var(--ink); }
.est-item--gap .est-mark { background: var(--accent); }
.est-item--info .est-mark { background: var(--accent-soft); color: var(--accent); font-family: 'EB Garamond', Georgia, serif; font-size: 20px; line-height: 1; padding-top: 6px; }
.est-k { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.est-v { grid-column: 2; font-size: 15px; line-height: 1.45; color: var(--ink); overflow-wrap: anywhere; }
.est-item--gap .est-v { color: #a8391f; }
@media (min-width: 640px) {
  .est-item { grid-template-columns: 18px minmax(0, 0.9fr) minmax(0, 1.1fr); row-gap: 0; }
  .est-mark { grid-row: auto; }
  .est-v { grid-column: auto; text-align: right; }
}

/* written in: the line draws, then the value types on (clip from the left). Off under reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  .est-item { animation: est-in 0.42s var(--est-ease) both; animation-delay: calc(var(--i, 0) * 110ms); }
  /* their own results arrive whole (no typewriter), row by row */
  .est-item::after { animation: est-rule 0.5s var(--est-ease) both; animation-delay: calc(var(--i, 0) * 110ms); }
  .est-mark { animation: est-tick 0.26s var(--est-ease) both; animation-delay: calc(var(--i, 0) * 110ms + 200ms); }
}
@keyframes est-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes est-type { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes est-rule { 0% { transform: scaleX(0); opacity: 1; } 70% { transform: scaleX(1); opacity: 1; } 100% { transform: scaleX(1); opacity: 0; } }
@keyframes est-tick { from { transform: scale(0.4); } 70% { transform: scale(1.06); } to { transform: scale(1); } }

/* jobs you want more of */
.est-note { margin: 4px 0 0; }
.est-chips { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.est-chip { display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: center; gap: 2px 10px; min-height: 56px; padding: 10px 14px; font: inherit; font-size: 16px;
  text-align: left; font-weight: 600; color: var(--ink); background: var(--card); border: 1px solid var(--line-2); border-radius: 12px; cursor: pointer;
  transition: background 180ms ease-out, color 180ms ease-out, border-color 180ms ease-out, transform 180ms var(--est-ease); }
.est-chip:hover { border-color: var(--ink); transform: translateY(-1px); }
.est-chip:active { transform: scale(0.97); }
.est-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.est-chip__tick { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%;
  border: 1.5px solid var(--line-2); color: transparent; transition: inherit; }
.est-chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.est-chip[aria-pressed="true"] .est-chip__tick { background: var(--accent); border-color: var(--accent); color: #fff; }
.est-chip__found { grid-column: 2; font-family: var(--est-mono); font-size: 11px; font-weight: 500; letter-spacing: 0; opacity: 0.7; }
.est-err { min-height: 22px; margin: 12px 0 0; font-size: 15px; font-weight: 700; color: #a8391f; }

/* the estimate itself */
.est-sheet--final { padding-bottom: 0; overflow: hidden; }
.est-scope { padding: 16px 0 6px; }
.est-lines { margin: 10px 0 0; padding: 0; list-style: none; counter-reset: est; }
.est-lines li { counter-increment: est; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 6px; padding: 10px 0;
  border-bottom: 1px solid var(--line); font-size: 16px; line-height: 1.45; }
.est-lines li::before { content: counter(est, decimal-leading-zero); font-family: var(--est-mono); font-size: 13px; color: var(--ink-2); padding-top: 2px; }
.est-total { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 16px 0 18px; border-top: 2px solid var(--ink); margin-top: 6px; }
.est-total .est-lab { flex-basis: 100%; }
.est-price { font-family: 'EB Garamond', 'EB Garamond Fallback', Georgia, serif; font-size: 64px; line-height: 0.9; letter-spacing: -0.03em; color: var(--ink); }
.est-per { font-family: var(--est-mono); font-size: 14px; color: var(--ink-2); }
.est-warranty { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: center; margin: 0 -20px; padding: 16px 20px 18px;
  background: var(--accent-soft); border-top: 1px solid var(--line); }
@media (min-width: 640px) { .est-warranty { margin: 0 -28px; padding: 18px 28px 20px; } }
.est-warranty p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ink); }
.est-stamp { display: inline-flex; align-items: center; justify-content: center; width: 88px; height: 88px; border: 2.5px solid var(--accent);
  border-radius: 50%; color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase;
  transform: rotate(-8deg); box-shadow: inset 0 0 0 4px var(--card), inset 0 0 0 5.5px var(--accent); background: var(--card); }
@media (prefers-reduced-motion: no-preference) {
  .est-stamp { animation: est-stamp 0.5s var(--est-ease) 0.35s both; }
}
@keyframes est-stamp { from { transform: rotate(-8deg) scale(1.6); opacity: 0; } 60% { opacity: 1; } to { transform: rotate(-8deg) scale(1); opacity: 1; } }

/* what the walk found, at the top of the estimate */
.est-from { margin: 14px 0 0; padding: 12px 14px; background: var(--accent-soft); border-left: 3px solid var(--accent); border-radius: 0 10px 10px 0; }
.est-from__list { margin: 6px 0 0; padding: 0; list-style: none; }
.est-from__list li { padding: 4px 0; font-size: 15px; line-height: 1.5; color: var(--ink); }

/* /remodelers -> here: the estimate sheet carries over (cross-document view transition, css/remodelers.css) */
@view-transition { navigation: auto; }
.est-sheet { view-transition-name: estimate; }
::view-transition-group(estimate) { animation-duration: 0.55s; animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }

/* the remodelers' variant looks like the landing page's paperwork: ink buttons with the coral rule, one action bar at the
   bottom of the screen on every step (the thumb never moves) */
.qz-v-rem .qz-next { position: relative; background: var(--ink); color: #fffdf4; overflow: hidden; isolation: isolate; box-shadow: none; }
.qz-v-rem .qz-next::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--accent);
  transform: scaleX(0); transform-origin: left; transition: transform 0.45s var(--est-ease); z-index: -1; }
.qz-v-rem .qz-next:hover, .qz-v-rem .qz-next:focus-visible { background: var(--ink); }
.qz-v-rem .qz-next:focus-visible::after { transform: scaleX(1); }
@media (hover: hover) and (pointer: fine) { .qz-v-rem .qz-next:hover::after { transform: scaleX(1); } }
@media (max-width: 1023px) {
  /* one place for the action on every step: pinned to the bottom of the phone, on a cream band with a short fade */
  /* the step fills the screen and its action sits at the foot; on a long step it sticks to the bottom while it scrolls
     (sticky, not fixed: each step slides in with a transform, which would pin a fixed bar to the step instead) */
  .qz-v-rem .qz-stage { display: flex; flex-direction: column; min-height: calc(100svh - 150px); }
  .qz-v-rem .qz-stage > form { display: flex; flex-direction: column; flex: 1 1 auto; }
  .qz-v-rem .qz-actions { position: sticky; bottom: 0; z-index: 20; margin-top: auto; padding: 22px 0 calc(14px + env(safe-area-inset-bottom));
    background: linear-gradient(rgba(255, 253, 244, 0), var(--bg) 22px); }
  .qz-v-rem .qz-actions .qz-next { width: 100%; }
}
.est-item--fact .est-mark { background: transparent; }
.est-item--fact .est-mark::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--ink-2); }
.est-addr { view-transition-name: job-address; }

/* the move from /remodelers: the logo travels, the dark side panel wipes in from the left, the estimate morphs */
.qz-v-rem .qz-logo { view-transition-name: brand; }
.qz-v-rem .qz-side { view-transition-name: side; }
::view-transition-new(side) { animation: 520ms cubic-bezier(0.16, 1, 0.3, 1) both est-wipe; }
@keyframes est-wipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
::view-transition-old(root) { animation: 160ms ease-out both est-vt-out; }
::view-transition-new(root) { animation: 280ms 120ms ease-out both est-vt-in; }
@keyframes est-vt-out { to { opacity: 0; } }
@keyframes est-vt-in { from { opacity: 0; } }
.qz-v-rem .qz-side__num { font-family: 'EB Garamond', 'EB Garamond Fallback', Georgia, serif; font-weight: 400; letter-spacing: -0.03em; }
.qz-v-rem .qz-side__num b { font-weight: 400; }

/* small coral text gets the darker coral (AA on cream); the bright one stays for fills, rules and the stamp */
.qz-v-rem .qz-kicker { color: #a8391f; }
.qz-v-rem .qz-who__me img { object-position: 35% 20%; }
::view-transition-old(estimate), ::view-transition-old(job-address) { animation: 110ms ease-out both est-vt-out; }
::view-transition-new(estimate), ::view-transition-new(job-address) { animation: 260ms 90ms ease-out both est-vt-in; }

/* real paper and the real stamp (generated photos: assets/rm-paper.webp, assets/rm-stamp.webp) */
.qz-v-rem .est-sheet { background: #fffdf8; border-color: rgba(36, 34, 30, 0.16); isolation: isolate; }
.qz-v-rem .est-sheet::before { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; opacity: 0.32;
  background: url(/assets/rm-paper.webp) top center / cover no-repeat; pointer-events: none; }
.qz-v-rem .est-v, .qz-v-rem .est-addr { color: #1d3fae; }
.est-stamp-img { width: 96px; height: 96px; mix-blend-mode: multiply; transform: rotate(-9deg); }

/* jobs: "Other" opens a field; area: state dropdown, a cities switch, city chips filled from their site */
.est-other { margin-top: 14px; }
.est-other[hidden], .est-cities[hidden] { display: none; }
.est-select { appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14'%3E%3Cpath d='M2 5l5 5 5-5' fill='none' stroke='%231a1a1a' stroke-width='2'/%3E%3C/svg%3E") right 16px center no-repeat; padding-right: 44px; }
.est-toggle { display: flex; align-items: center; gap: 12px; margin: 18px 0 4px; font-size: 16px; font-weight: 600; cursor: pointer; min-height: 44px; }
.est-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.est-toggle__ui { position: relative; flex: none; width: 46px; height: 28px; border-radius: 999px; background: var(--line-2); transition: background 0.2s; }
.est-toggle__ui::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform 0.25s var(--est-ease); }
.est-toggle input:checked + .est-toggle__ui { background: var(--ink); }
.est-toggle input:checked + .est-toggle__ui::after { transform: translateX(18px); }
.est-toggle input:focus-visible + .est-toggle__ui { outline: 2px solid var(--accent); outline-offset: 3px; }
.est-chips--cities { grid-template-columns: 1fr 1fr; }
.est-cities .qz-field { margin-top: 12px; }
/* the step stays put while the site walk fills in: pinned to the top, the card grows downward (critic pass 8) */
@media (min-width: 1024px) { .qz-v-rem .qz-main { justify-content: flex-start; } }

/* ---------- the funnel on paper (Noah 2026-11-16): choices are tick rows on an estimate sheet, fields are form lines */
.qz-v-rem .est-chips, .qz-v-rem .qz-fields { position: relative; isolation: isolate; padding: 6px 18px 10px; border-radius: 2px;
  background: linear-gradient(rgba(255, 253, 248, 0.6), rgba(255, 253, 248, 0.6)), url(/assets/rm-paper.webp) top center / cover; background-color: #fffdf8;
  box-shadow: 0 1px 1px rgba(40, 34, 24, 0.16), 0 4px 8px -3px rgba(40, 34, 24, 0.16), 0 30px 44px -34px rgba(40, 34, 24, 0.45); }
.qz-v-rem .est-chips { gap: 0 22px; }
.qz-v-rem .est-chip { min-height: 52px; padding: 12px 2px; background: transparent; border: 0; border-bottom: 1px dotted rgba(36, 34, 30, 0.35);
  border-radius: 0; color: #24221e; font-weight: 500; transform: none; }
.qz-v-rem .est-chip:hover { background: rgba(29, 63, 174, 0.05); transform: none; }
.qz-v-rem .est-chip:active { transform: none; background: rgba(29, 63, 174, 0.09); }
.qz-v-rem .est-chip__tick { width: 18px; height: 18px; border-radius: 2px; border: 1.5px solid #24221e; background: transparent; color: transparent; }
.qz-v-rem .est-chip[aria-pressed="true"] { background: transparent; color: #24221e; border-color: rgba(36, 34, 30, 0.35); }
.qz-v-rem .est-chip[aria-pressed="true"] .est-chip__tick { background: transparent; border-color: #24221e; color: #1d3fae; }
.qz-v-rem .est-chip__tick svg { width: 16px; height: 16px; transform: rotate(-6deg) scale(1.25); }
.qz-v-rem .est-chip__found { color: #1d3fae; opacity: 1; }
.qz-v-rem .qz-fields { padding: 14px 18px 16px; gap: 18px; }
.qz-v-rem .qz-label { font-size: 12px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: #57534b; margin-bottom: 4px; }
.qz-v-rem .qz-label small { text-transform: none; letter-spacing: 0; }
.qz-v-rem .qz-field { height: 50px; padding: 0 2px; background-color: transparent; border: 0; border-bottom: 2px solid #24221e; border-radius: 0;
  font-family: var(--est-mono); font-size: 18px; font-weight: 500; color: #1d3fae; box-shadow: none; }
.qz-v-rem .qz-field::placeholder { color: #8a877e; font-family: var(--est-mono); }
.qz-v-rem .qz-field:focus { border-bottom-color: var(--accent); box-shadow: none; }
.qz-v-rem .qz-field[aria-invalid="true"] { border-bottom-color: #a8391f; box-shadow: none; }
.qz-v-rem .est-select { background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14'%3E%3Cpath d='M2 5l5 5 5-5' fill='none' stroke='%2324221e' stroke-width='2'/%3E%3C/svg%3E") right 4px center no-repeat; padding-right: 28px; }
/* the cities switch becomes a ticked box like the rows */
.qz-v-rem .est-toggle__ui { width: 22px; height: 22px; border-radius: 2px; background: transparent; border: 1.5px solid #24221e; }
.qz-v-rem .est-toggle__ui::after { top: 1px; left: 6px; width: 7px; height: 13px; border-radius: 0; background: transparent; box-shadow: none;
  border: solid #1d3fae; border-width: 0 2.5px 2.5px 0; transform: rotate(40deg) scale(0); transition: transform 0.2s var(--est-ease); }
.qz-v-rem .est-toggle input:checked + .est-toggle__ui { background: transparent; }
.qz-v-rem .est-toggle input:checked + .est-toggle__ui::after { transform: rotate(40deg) scale(1); }
/* fields that sit alone (Other job, add a city, the state) are lines on the page's paper, no sheet of their own */
.qz-v-rem .est-other .qz-field, .qz-v-rem .est-cities > .qz-field, .qz-v-rem .est-select { background-color: transparent; }

@media (prefers-reduced-motion: reduce) { .est-status::after { animation: none; } }
