/* ============================================
   GET ESTIMATE: hero phone bar, finish dock and the estimate card
   (js/estimate.js runs it; js/estimate-scene.js draws the 3D selector)
   ============================================ */

:root {
    --est-ink: #161616;
    --est-ink-soft: #4a4a4a;
    --est-ink-faint: #8a8780;
    --est-paper: #faf9f6;
    --est-paper-2: #f2efe9;
    --est-line: rgba(22, 22, 22, 0.1);
    --est-line-strong: rgba(22, 22, 22, 0.18);
    --est-gold: var(--gold, #b8965a);
    --est-gold-light: var(--gold-light, #d4b07a);
    --est-gold-wash: rgba(184, 150, 90, 0.12);
    --est-error: #b4472f;
    --est-radius: 14px;
    --est-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Hero layout: ticker sits higher, the estimate bar takes the old toggle's place ---------- */
.immersive-hero .hero-sub { margin-bottom: 28px; text-wrap: balance; }
.immersive-hero .hero-ticker-wrapper { margin-bottom: 40px; }
.immersive-hero .immersive-container { padding-bottom: 150px; }

/* ---------- Hero estimate bar ---------- */
.estimate-bar {
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.estimate-bar-pill {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 40px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.estimate-bar-pill:focus-within {
    border-color: rgba(212, 176, 122, 0.7);
    background: rgba(255, 255, 255, 0.09);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35), 0 0 0 4px rgba(184, 150, 90, 0.14);
}

.estimate-bar.is-invalid .estimate-bar-pill {
    border-color: rgba(232, 128, 104, 0.8);
    animation: estShake 0.42s ease;
}

@keyframes estShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(5px); }
    60% { transform: translateX(-3px); }
    80% { transform: translateX(2px); }
}

.estimate-bar-field {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-left: 18px;
    cursor: text;
}

.estimate-bar-icon {
    width: 18px;
    height: 18px;
    flex: none;
    color: var(--est-gold-light);
    opacity: 0.9;
}

.estimate-bar-field input {
    flex: 1;
    min-width: 0;
    height: 46px;
    background: transparent;
    border: 0;
    outline: none;
    color: var(--pure-white, #fff);
    font-family: var(--font-body);
    font-size: 1.02rem;
    font-weight: 400;
    letter-spacing: 0.02em;
}

.estimate-bar-field input::placeholder { color: rgba(255, 255, 255, 0.55); }

.estimate-bar-btn {
    position: relative;
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 46px;
    padding: 0 26px;
    border: 0;
    border-radius: 30px;
    background: var(--est-gold);
    color: var(--black, #0a0a0a);
    font-family: var(--font-body);
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s var(--est-ease), box-shadow 0.3s ease;
}

.estimate-bar-btn:hover {
    background: var(--est-gold-light);
    box-shadow: 0 10px 28px rgba(184, 150, 90, 0.35);
}

.estimate-bar-btn:active { transform: scale(0.97); }
.estimate-bar-btn:focus-visible { outline: 2px solid var(--pure-white, #fff); outline-offset: 3px; }

.estimate-bar-arrow {
    width: 17px;
    height: 17px;
    transition: transform 0.35s var(--est-ease), opacity 0.25s ease;
}

.estimate-bar-btn:hover .estimate-bar-arrow { transform: translateX(3px); }

@keyframes estDraw { to { stroke-dashoffset: 0; } }

.estimate-bar-msg {
    min-height: 0;
    height: 0;
    margin: 0;
    font-size: 0.84rem;
    line-height: 1.4;
    color: var(--est-gold-light);
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8);
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.estimate-bar-msg.is-shown { height: auto; opacity: 1; transform: none; }
.estimate-bar.is-invalid .estimate-bar-msg { color: #f2a48f; }

.estimate-bar-link {
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    font-weight: 600;
    color: #fff;
    text-decoration: underline;
    text-decoration-color: var(--est-gold-light);
    text-underline-offset: 3px;
    cursor: pointer;
}

.estimate-bar-link:focus-visible { outline: 2px solid var(--est-gold-light); outline-offset: 2px; border-radius: 2px; }

.estimate-bar-note {
    margin: -6px 0 0;
    font-size: 0.74rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.6);
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8);
}

.estimate-bar-note a { color: rgba(255, 255, 255, 0.82); text-decoration: underline; text-underline-offset: 2px; }

/* The button is a link wherever ArrowHit edits its words: the arrow is drawn here, so the words stay plain text. */
a.estimate-bar-btn { text-decoration: none; white-space: nowrap; }
a.estimate-bar-btn::after {
    content: '';
    width: 15px;
    height: 15px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
    transition: transform 0.35s var(--est-ease);
}
a.estimate-bar-btn:hover { color: var(--black, #0a0a0a); }
a.estimate-bar-btn:hover::after { transform: translateX(3px); }

/* ---------- Phone bars beyond the hero: call-to-action boxes, side cards, the footer, the guide strip ---------- */
.estimate-bar--inline { margin: 0 auto; gap: 8px; }
.estimate-bar--inline .estimate-bar-pill { box-shadow: 0 14px 40px rgba(0, 0, 0, 0.28); }
.estimate-bar--inline .estimate-bar-msg { text-align: center; }
.estimate-bar .estimate-bar-note { margin: -2px 0 0; }

/* Narrow places: the number on one row, the button under it */
.estimate-bar--stack { max-width: 380px; align-items: stretch; gap: 8px; }
.estimate-bar--stack .estimate-bar-pill { flex-direction: column; align-items: stretch; gap: 8px; padding: 0; background: none; border: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.estimate-bar--stack .estimate-bar-field {
    padding: 0 16px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.05);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.estimate-bar--stack .estimate-bar-field:focus-within { border-color: rgba(212, 176, 122, 0.7); box-shadow: 0 0 0 4px rgba(184, 150, 90, 0.14); }
.estimate-bar--stack.is-invalid .estimate-bar-pill { border: 0; }
.estimate-bar--stack.is-invalid .estimate-bar-field { border-color: rgba(232, 128, 104, 0.8); }
.estimate-bar--stack .estimate-bar-btn { width: 100%; }
.estimate-bar--stack .estimate-bar-msg,
.estimate-bar--stack .estimate-bar-note { text-align: left; text-shadow: none; }
.estimate-bar--stack .estimate-bar-msg:not(.is-shown) { min-height: 0; height: 0; }
.estimate-bar--stack .estimate-bar-icon { display: block; }

/* Section paragraph styles (a call-to-action's big text) never reach the bar's small print */
.estimate-bar p.estimate-bar-note { margin-bottom: 0; font-size: 0.74rem; font-weight: 400; line-height: 1.5; }
.estimate-bar p.estimate-bar-msg { margin-bottom: 0; font-size: 0.84rem; font-weight: 400; }

/* Article and card link styles never reach the button */
form.estimate-bar a.estimate-bar-btn.estimate-bar-btn { color: var(--black, #0a0a0a); text-decoration: none; border-bottom: 0; }

/* On a phone the number sits above the button, so the box is never cut short */
@media (max-width: 520px) {
    .estimate-bar--inline { align-items: stretch; }
    .estimate-bar--inline .estimate-bar-pill { flex-direction: column; align-items: stretch; gap: 8px; padding: 0; background: none; border: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
    .estimate-bar--inline .estimate-bar-field {
        padding: 0 16px;
        border: 1px solid rgba(255, 255, 255, 0.18);
        border-radius: 30px;
        background: rgba(255, 255, 255, 0.05);
    }
    .estimate-bar--inline .estimate-bar-field:focus-within { border-color: rgba(212, 176, 122, 0.7); box-shadow: 0 0 0 4px rgba(184, 150, 90, 0.14); }
    .estimate-bar--inline.is-invalid .estimate-bar-pill { border: 0; }
    .estimate-bar--inline.is-invalid .estimate-bar-field { border-color: rgba(232, 128, 104, 0.8); }
    .estimate-bar--inline .estimate-bar-btn { width: 100%; }
    .estimate-bar--inline .estimate-bar-icon { display: block; }
    .estimate-bar--inline .estimate-bar-msg,
    .estimate-bar--inline .estimate-bar-note { text-align: left; }
    .estimate-bar--inline .estimate-bar-msg:not(.is-shown) { min-height: 0; height: 0; }
}

/* Where the bar sits in each kind of box */
.cta-actions:has(.estimate-bar) { flex-wrap: wrap; row-gap: 14px; }
.cta-actions .estimate-bar { flex: 0 0 100%; max-width: none; }
.cta-actions .estimate-bar-pill { max-width: 560px; margin: 0 auto; }
.cta-actions .estimate-bar ~ .btn { padding: 11px 22px; font-size: 0.8rem; }
@media (max-width: 768px) {
    /* Email, call and text share one row under the bar */
    .cta-actions:has(.estimate-bar) { flex-direction: row; align-items: center; column-gap: 8px; }
    .cta-actions .estimate-bar ~ .btn { flex: 1 1 0; min-width: 0; padding: 11px 6px; white-space: nowrap; }
}
.sp-actions:has(.estimate-bar) { flex-wrap: wrap; row-gap: 12px; }
.sp-actions .estimate-bar { flex: 0 0 100%; max-width: 520px; margin: 0; align-items: stretch; }
.sp-actions .estimate-bar-msg,
.art-cta .estimate-bar-msg,
.sp-actions .estimate-bar-note,
.art-cta .estimate-bar-note { text-align: left; }
.art-cta .estimate-bar { max-width: 520px; margin: 22px 0 14px; align-items: stretch; }
.art-cta .art-cta-more { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
.art-cta .art-cta-more .btn { margin: 0; padding: 10px 20px; font-size: 0.8rem; }
.fx-card .estimate-bar,
.sp-aside-card .estimate-bar { margin: 0; }
.footer .estimate-bar { margin: 0 0 22px; max-width: 320px; }
.footer .estimate-bar-btn { height: 44px; }

/* ---------- The strip under a guide's hero (shared section site.estimate) ---------- */
.estimate-strip {
    position: relative;
    background: linear-gradient(180deg, var(--charcoal, #141414) 0%, #18140f 100%);
    border-top: 1px solid rgba(184, 150, 90, 0.18);
    border-bottom: 1px solid rgba(184, 150, 90, 0.18);
    padding: 22px 0;
}
.estimate-strip-inner { display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.estimate-strip-text { min-width: 0; }
.estimate-strip-title { margin: 0 0 4px; font-family: var(--font-display, inherit); font-size: 1.12rem; font-weight: 400; color: var(--pure-white, #fff); letter-spacing: -0.01em; }
.estimate-strip-sub { margin: 0; font-size: 0.88rem; line-height: 1.5; color: var(--silver, #b0b0b0); }
.estimate-strip .estimate-bar { flex: 0 1 470px; margin: 0; gap: 6px; }
.estimate-strip .estimate-bar-msg { text-align: left; min-height: 0; }
.estimate-strip .estimate-bar-msg:not(.is-shown) { height: 0; }
.estimate-strip .estimate-bar-note { text-align: left; margin: 0; }

@media (max-width: 860px) {
    .estimate-strip { padding: 20px 0 18px; }
    .estimate-strip-inner { flex-direction: column; align-items: stretch; gap: 14px; }
    .estimate-strip .estimate-bar { flex: none; max-width: none; }
}

/* ---------- Step 0 in the card: the phone number, when the card opens from a link ---------- */
.est-step--phone { display: grid; place-items: center; padding: 40px 24px; }
.est-phone-step { width: 100%; max-width: 440px; text-align: center; }
.est-phone-step .est-field { text-align: left; margin-top: 26px; }
.est-phone-step .est-input { font-size: 1.1rem; height: 54px; }
.est-phone-icon {
    display: inline-grid;
    place-items: center;
    width: 58px;
    height: 58px;
    margin-bottom: 18px;
    border-radius: 50%;
    background: var(--est-gold-wash);
    color: var(--est-gold);
}
.est-phone-icon svg { width: 26px; height: 26px; }

/* ---------- Finish toggle, now at the bottom of the hero ---------- */
.hero-finish-dock {
    position: absolute;
    left: 50%;
    bottom: 34px;
    z-index: 3;
    flex-direction: row;
    gap: 14px;
    margin: 0;
    translate: -50% 0;
}

.hero-finish-dock { justify-content: center; }
.hero-finish-dock .finish-btn { width: 140px; font-size: 0.76rem; padding: 8px 0; }
.hero-finish-dock .finish-glider { width: 140px; }
.hero-finish-dock .finish-toggle-wrapper.satin-active .finish-glider { transform: translateX(146px); }

@media (max-width: 768px) {
    .immersive-hero .hero-sub { margin-bottom: 26px; }
    .immersive-hero .hero-ticker-wrapper { margin-bottom: 30px; }
    .immersive-hero .immersive-container { padding-bottom: 130px; }

    .estimate-bar-field { padding-left: 14px; gap: 8px; }
    .estimate-bar-field input { font-size: 1rem; }
    .estimate-bar-btn { padding: 0 18px; font-size: 0.86rem; }
    .estimate-bar-arrow { display: none; }

    .hero-finish-dock { bottom: 26px; }
    .hero-finish-dock .finish-btn { width: 128px; font-size: 0.72rem; }
    .hero-finish-dock .finish-glider { width: 128px; }
    .hero-finish-dock .finish-toggle-wrapper.satin-active .finish-glider { transform: translateX(134px); }
}

@media (max-width: 380px) {
    .estimate-bar-field input { font-size: 0.95rem; }
    .estimate-bar-icon { display: none; }
}

/* ============================================
   The estimate card
   ============================================ */
html.est-locked, html.est-locked body { overflow: hidden !important; }

.est-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: grid;
    place-items: center;
    padding: clamp(10px, 3vh, 32px) clamp(10px, 3vw, 32px);
}

.est-overlay[hidden] { display: none; }

.est-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 8, 8, 0.62);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.45s ease;
}

.est-overlay.is-open .est-backdrop { opacity: 1; }

.est-card {
    position: relative;
    width: min(1360px, 100%);
    height: min(860px, 100%);
    display: grid;
    grid-template-rows: auto 1fr auto;
    background: var(--est-paper);
    color: var(--est-ink);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 40px 120px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.06);
    transform-origin: top left;
    font-family: var(--font-body);
}

.est-card > * { transition: opacity 0.35s ease; }
.est-card.is-morphing > * { opacity: 0; }

/* ---------- Header ---------- */
.est-head {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 16px 20px 16px 26px;
    border-bottom: 1px solid var(--est-line);
    background: var(--est-paper);
    position: relative;
    z-index: 3;
}

.est-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.est-brand svg { width: 22px; height: 22px; color: var(--est-gold); }

.est-steps {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
    margin: 0 auto;
    padding: 0;
    font-size: 0.8rem;
    color: var(--est-ink-faint);
}

.est-steps li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    transition: color 0.3s ease;
}

.est-steps li + li::before {
    content: '';
    width: 34px;
    height: 1px;
    margin-right: 4px;
    background: var(--est-line-strong);
}

.est-steps .est-step-num {
    display: inline-grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid var(--est-line-strong);
    font-size: 0.72rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.est-steps li.is-current { color: var(--est-ink); }
.est-steps li.is-current .est-step-num { background: var(--est-ink); border-color: var(--est-ink); color: var(--est-paper); }
.est-steps li.is-done .est-step-num { background: var(--est-gold); border-color: var(--est-gold); color: #fff; }

.est-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-width: 104px;
    justify-content: flex-end;
    font-size: 0.76rem;
    color: var(--est-ink-faint);
    white-space: nowrap;
}

.est-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--est-line-strong);
    transition: background 0.3s ease;
}

.est-status[data-state="saving"] .est-status-dot { background: var(--est-gold); animation: estPulse 1s ease-in-out infinite; }
.est-status[data-state="saved"] .est-status-dot { background: #5f9a6b; }
.est-status[data-state="error"] .est-status-dot { background: var(--est-error); }

@keyframes estPulse { 50% { opacity: 0.35; } }

.est-close {
    flex: none;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: rgba(22, 22, 22, 0.06);
    color: var(--est-ink);
    cursor: pointer;
    transition: background 0.25s ease, transform 0.25s ease;
}

.est-close:hover { background: rgba(22, 22, 22, 0.12); transform: rotate(90deg); }
.est-close svg { width: 16px; height: 16px; }

/* ---------- Body and steps ---------- */
.est-body {
    position: relative;
    min-height: 0;
    overflow: hidden;
}

.est-step {
    position: absolute;
    inset: 0;
    opacity: 1;
    transform: none;
    transition: opacity 0.45s var(--est-ease), transform 0.55s var(--est-ease);
}

.est-step[hidden] { display: none; }
.est-step.is-leaving { opacity: 0; transform: translateX(-28px); pointer-events: none; }
.est-step.is-entering { opacity: 0; transform: translateX(28px); }
.est-step.is-entering.is-back { transform: translateX(-28px); }
.est-step.is-leaving.is-back { transform: translateX(28px); }

.est-eyebrow {
    margin: 0 0 10px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--est-gold);
}

.est-title {
    margin: 0 0 10px;
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 2.6vw, 2.25rem);
    font-weight: 400;
    line-height: 1.12;
    letter-spacing: -0.02em;
    color: var(--est-ink);
}

.est-sub {
    margin: 0 0 22px;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--est-ink-soft);
}

/* ---------- Step 1: areas ---------- */
.est-step--areas {
    display: grid;
    grid-template-columns: 300px 1fr;
}

.est-areas-side {
    display: flex;
    flex-direction: column;
    padding: 30px 28px 24px;
    border-right: 1px solid var(--est-line);
    overflow-y: auto;
    background: var(--est-paper);
    position: relative;
    z-index: 2;
}

.est-mode {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 4px;
    margin-bottom: 22px;
    border-radius: 40px;
    background: var(--est-paper-2);
    border: 1px solid var(--est-line);
}

.est-mode button {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 40px;
    border: 0;
    border-radius: 30px;
    background: transparent;
    font-family: var(--font-body);
    font-size: 0.86rem;
    font-weight: 500;
    color: var(--est-ink-soft);
    cursor: pointer;
    transition: color 0.35s ease;
}

.est-mode button svg { width: 16px; height: 16px; }
.est-mode button[aria-checked="true"] { color: var(--est-paper); }
.est-mode button:focus-visible { outline: 2px solid var(--est-gold); outline-offset: 2px; }

.est-mode-glider {
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 4px;
    width: calc(50% - 4px);
    border-radius: 30px;
    background: var(--est-ink);
    transition: transform 0.5s var(--est-ease);
}

.est-mode[data-mode="commercial"] .est-mode-glider { transform: translateX(100%); }

.est-picked-title {
    margin: 0 0 10px;
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--est-ink-faint);
}

.est-picked {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 34px;
    margin-bottom: 14px;
}

.est-picked-empty { font-size: 0.86rem; color: var(--est-ink-faint); line-height: 1.5; }

.est-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 32px;
    padding: 0 12px 0 10px;
    border-radius: 20px;
    border: 1px solid rgba(184, 150, 90, 0.45);
    background: var(--est-gold-wash);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--est-ink);
    animation: estChipIn 0.4s var(--est-ease);
}

.est-chip svg { width: 13px; height: 13px; color: var(--est-gold); }

@keyframes estChipIn { from { opacity: 0; transform: scale(0.85); } }

.est-areas-tip {
    margin-top: auto;
    padding-top: 18px;
    font-size: 0.8rem;
    line-height: 1.55;
    color: var(--est-ink-faint);
}

.est-error {
    min-height: 1.2em;
    margin: 4px 0 0;
    font-size: 0.82rem;
    color: var(--est-error);
}

/* The 3D stage */
.est-stage {
    position: relative;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    background:
        radial-gradient(120% 90% at 50% 38%, #fbfaf7 0%, #f1ede5 55%, #e6e0d5 100%);
}

.est-stage canvas {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    display: block;
    outline: none;
}

.est-stage.is-hovering canvas { cursor: pointer; }

.est-leaders {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: visible;
}

.est-leaders line {
    stroke: rgba(22, 22, 22, 0.35);
    stroke-width: 1;
    transition: stroke 0.3s ease, opacity 0.35s ease;
}

.est-leaders line.is-on { stroke: var(--est-gold); }
.est-leaders circle { fill: var(--est-ink); transition: fill 0.3s ease, opacity 0.35s ease; }
.est-leaders circle.is-on { fill: var(--est-gold); }
.est-leaders circle.est-ring { fill: none; stroke: var(--est-gold); stroke-width: 1.2; opacity: 0; }
.est-leaders circle.est-ring.is-on { animation: estRing 2.4s ease-out infinite; }

@keyframes estRing {
    0% { opacity: 0.9; r: 3; }
    70%, 100% { opacity: 0; r: 14; }
}

.est-labels { position: absolute; inset: 0; pointer-events: none; }

.est-pin {
    position: absolute;
    top: 0;
    left: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 34px;
    padding: 0 14px 0 8px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(22, 22, 22, 0.08);
    box-shadow: 0 8px 22px rgba(30, 24, 14, 0.14), 0 1px 2px rgba(30, 24, 14, 0.08);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    font-size: 0.84rem;
    font-weight: 500;
    color: var(--est-ink);
    white-space: nowrap;
    cursor: pointer;
    pointer-events: auto;
    user-select: none;
    opacity: 0;
    will-change: transform;
    transition: opacity 0.35s ease, background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, color 0.25s ease;
}

.est-pin.is-visible { opacity: 1; }
.est-pin.is-visible.is-faded { opacity: 0.2; }
.est-leaders .is-faded { opacity: 0.12 !important; }
.est-pin:not(.is-visible) { pointer-events: none; }
.est-pin:hover,
.est-pin.is-hover { border-color: rgba(184, 150, 90, 0.7); box-shadow: 0 10px 26px rgba(30, 24, 14, 0.18), 0 0 0 3px rgba(184, 150, 90, 0.16); }
.est-pin input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.est-pin:focus-within { outline: 2px solid var(--est-gold); outline-offset: 2px; }

.est-box {
    position: relative;
    flex: none;
    width: 20px;
    height: 20px;
    border-radius: 6px;
    border: 1.5px solid rgba(22, 22, 22, 0.3);
    background: #fff;
    transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s var(--est-ease);
}

.est-box svg {
    position: absolute;
    inset: 2px;
    width: 13px;
    height: 13px;
    color: #fff;
}

.est-box svg path { stroke-dasharray: 22; stroke-dashoffset: 22; transition: stroke-dashoffset 0.35s 0.05s ease; }

.est-pin.is-on { background: var(--est-ink); color: #fff; border-color: var(--est-ink); }
.est-pin.is-on .est-box { background: var(--est-gold); border-color: var(--est-gold); transform: scale(1.05); }
.est-pin.is-on .est-box svg path { stroke-dashoffset: 0; }

.est-stage-loading {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 14px;
    font-size: 0.85rem;
    color: var(--est-ink-faint);
    transition: opacity 0.5s ease;
}

.est-stage-loading.is-done { opacity: 0; pointer-events: none; }

.est-spinner {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid rgba(184, 150, 90, 0.2);
    border-top-color: var(--est-gold);
    animation: estSpin 0.9s linear infinite;
}

@keyframes estSpin { to { transform: rotate(360deg); } }

.est-stage-hint {
    position: absolute;
    left: 50%;
    bottom: 18px;
    translate: -50% 0;
    padding: 7px 14px;
    border-radius: 20px;
    background: rgba(22, 22, 22, 0.78);
    color: #fff;
    font-size: 0.76rem;
    letter-spacing: 0.02em;
    white-space: nowrap;
    pointer-events: none;
    transition: opacity 0.6s ease;
}

.est-stage-hint.is-hidden { opacity: 0; }

/* No 3D: the same checkboxes as a tidy grid */
.est-stage.is-flat { display: grid; align-content: center; padding: 28px; }
.est-stage.is-flat .est-labels {
    position: static;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 12px;
    pointer-events: auto;
}
.est-stage.is-flat .est-pin { position: relative; opacity: 1; height: 52px; border-radius: 12px; padding: 0 16px 0 12px; transform: none !important; }
.est-stage.is-flat .est-leaders,
.est-stage.is-flat .est-stage-hint { display: none; }

/* ---------- Step 2: details ---------- */
.est-step--details {
    overflow-y: auto;
    overscroll-behavior: contain;
}

.est-details {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: 0;
    min-height: 100%;
}

.est-col { padding: 30px 32px 34px; }
.est-col + .est-col { border-left: 1px solid var(--est-line); background: #fcfbf9; }

.est-h3 {
    margin: 0 0 6px;
    font-family: var(--font-display);
    font-size: 1.12rem;
    font-weight: 500;
    color: var(--est-ink);
}

.est-h3 span { font-family: var(--font-body); font-size: 0.8rem; font-weight: 400; color: var(--est-ink-faint); }

.est-hint { margin: 0 0 16px; font-size: 0.84rem; line-height: 1.55; color: var(--est-ink-soft); }

.est-field { position: relative; margin-bottom: 14px; }

.est-field label,
.est-legend {
    display: block;
    margin-bottom: 6px;
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--est-ink-soft);
}

.est-input,
.est-textarea {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border: 1px solid var(--est-line-strong);
    border-radius: 10px;
    background: #fff;
    font-family: var(--font-body);
    font-size: 0.98rem;
    color: var(--est-ink);
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.est-textarea { height: auto; min-height: 110px; padding: 12px 14px; resize: vertical; line-height: 1.55; }
.est-input:focus,
.est-textarea:focus { border-color: var(--est-gold); box-shadow: 0 0 0 4px rgba(184, 150, 90, 0.15); }
.est-input::placeholder,
.est-textarea::placeholder { color: #a9a49b; }
.est-field.is-invalid .est-input { border-color: var(--est-error); box-shadow: 0 0 0 4px rgba(180, 71, 47, 0.1); }
.est-field-error { min-height: 0; margin: 5px 0 0; font-size: 0.78rem; color: var(--est-error); }
.est-field-error:empty { display: none; }

/* Finish cards */
.est-finish { margin: 24px 0 0; padding: 0; border: 0; min-width: 0; }

.est-finish-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.est-finish-card {
    position: relative;
    display: flex;
    flex-direction: column;
    border-radius: 14px;
    border: 1.5px solid var(--est-line);
    background: #fff;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.35s var(--est-ease);
}

.est-finish-card:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(30, 24, 14, 0.1); }
.est-finish-card input { position: absolute; opacity: 0; pointer-events: none; }
.est-finish-card:has(input:focus-visible) { outline: 2px solid var(--est-gold); outline-offset: 2px; }
.est-finish-card.is-on { border-color: var(--est-gold); box-shadow: 0 0 0 3px rgba(184, 150, 90, 0.18), 0 14px 30px rgba(30, 24, 14, 0.1); }

.est-finish-media {
    position: relative;
    aspect-ratio: 4 / 3;
    background: #cfc9bf;
    overflow: hidden;
}

.est-finish-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s var(--est-ease);
}

.est-finish-card:hover .est-finish-media img { transform: scale(1.04) rotate(-0.6deg); }

.est-finish-card[data-finish="gloss"] .est-finish-media::after {
    content: '';
    position: absolute;
    inset: -40%;
    background: linear-gradient(115deg, transparent 42%, rgba(255, 255, 255, 0.35) 50%, transparent 58%);
    transform: translateX(-60%);
    pointer-events: none;
}

.est-finish-card[data-finish="gloss"]:hover .est-finish-media::after,
.est-finish-card[data-finish="gloss"].is-on .est-finish-media::after { animation: estSheen 1.4s ease forwards; }

@keyframes estSheen { to { transform: translateX(60%); } }

.est-finish-text { padding: 12px 14px 14px; }
.est-finish-name { display: block; font-family: var(--font-display); font-size: 1.05rem; font-weight: 500; color: var(--est-ink); }
.est-finish-desc { display: block; margin-top: 2px; font-size: 0.8rem; line-height: 1.45; color: var(--est-ink-soft); }

.est-finish-tick {
    position: absolute;
    top: 10px;
    right: 10px;
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(22, 22, 22, 0.22);
    border: 1.5px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
    color: #fff;
    transition: all 0.3s var(--est-ease);
}

.est-finish-tick svg { width: 14px; height: 14px; opacity: 0; transform: scale(0.5); transition: all 0.3s var(--est-ease); }
.est-finish-card.is-on .est-finish-tick { background: var(--est-gold); border-color: var(--est-gold); }
.est-finish-card.is-on .est-finish-tick svg { opacity: 1; transform: none; }

.est-unsure {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    font-size: 0.86rem;
    color: var(--est-ink-soft);
    cursor: pointer;
}

.est-unsure input,
.est-sizing-option input { position: absolute; opacity: 0; pointer-events: none; }
.est-radio {
    flex: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1.5px solid rgba(22, 22, 22, 0.3);
    background: #fff;
    transition: all 0.25s ease;
}
.est-unsure.is-on .est-radio,
.est-sizing-option.is-on .est-radio { border: 5px solid var(--est-gold); }
.est-unsure:has(input:focus-visible) .est-radio,
.est-sizing-option:has(input:focus-visible) .est-radio { outline: 2px solid var(--est-gold); outline-offset: 2px; }

/* Sizes: enter them, have us call, or have us measure */
.est-sizing { margin: 0 0 6px; padding: 0; border: 0; min-width: 0; }
.est-sizing > legend { float: left; width: 100%; padding: 0; }
.est-sizing > legend + * { clear: both; }

.est-sizing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.est-sizing-option {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 13px 14px;
    border: 1.5px solid var(--est-line);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.est-sizing-option:hover { border-color: rgba(184, 150, 90, 0.55); }
.est-sizing-option.is-on { border-color: var(--est-gold); background: #fffdf8; box-shadow: 0 0 0 3px rgba(184, 150, 90, 0.14); }
.est-sizing-option .est-radio { margin-top: 1px; }
.est-sizing-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.est-sizing-label { font-size: 0.9rem; font-weight: 600; line-height: 1.3; color: var(--est-ink); }
.est-sizing-desc { font-size: 0.78rem; line-height: 1.4; color: var(--est-ink-soft); }

.est-dims-wrap { animation: estFadeUp 0.45s var(--est-ease); }
.est-dims-wrap[hidden] { display: none; }

@keyframes estFadeUp { from { opacity: 0; transform: translateY(8px); } }

.est-dims { display: flex; flex-direction: column; gap: 14px; margin-bottom: 14px; }

.est-dim-group {
    border: 1px solid var(--est-line);
    border-radius: var(--est-radius);
    background: #fff;
    overflow: hidden;
    animation: estChipIn 0.45s var(--est-ease);
}

.est-dim-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 16px;
    background: var(--est-paper-2);
    border-bottom: 1px solid var(--est-line);
}

.est-dim-name { font-family: var(--font-display); font-size: 0.98rem; font-weight: 500; }
.est-dim-sum { font-size: 0.8rem; color: var(--est-ink-soft); font-variant-numeric: tabular-nums; }

.est-dim-row {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 14px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--est-line);
}

.est-dim-row:last-of-type { border-bottom: 0; }

.est-slab { width: 74px; height: 62px; overflow: visible; }
.est-slab .est-slab-top { fill: #f4f1ea; stroke: rgba(22, 22, 22, 0.3); stroke-width: 1; transition: d 0.4s var(--est-ease); }
.est-slab .est-slab-side { fill: #d9d2c4; stroke: rgba(22, 22, 22, 0.3); stroke-width: 1; }
.est-slab .est-slab-front { fill: #e7e1d5; stroke: rgba(22, 22, 22, 0.3); stroke-width: 1; }
.est-slab .est-slab-film { fill: url(#est-film-grad); opacity: 0; transition: opacity 0.4s ease; }
.est-slab.has-size .est-slab-film { opacity: 1; }
.est-slab .est-slab-empty { fill: none; stroke: rgba(22, 22, 22, 0.25); stroke-dasharray: 3 3; }

.est-dim-fields { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.est-dim-top { display: flex; align-items: center; gap: 8px; }

.est-dim-label {
    flex: 1;
    min-width: 0;
    height: 38px;
    padding: 0 12px;
    border: 1px solid var(--est-line-strong);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--est-ink);
    background: #fff;
    outline: none;
}

.est-dim-label:focus { border-color: var(--est-gold); box-shadow: 0 0 0 3px rgba(184, 150, 90, 0.14); }

.est-qty {
    display: inline-flex;
    align-items: center;
    height: 38px;
    border: 1px solid var(--est-line-strong);
    border-radius: 8px;
    overflow: hidden;
    flex: none;
}

.est-qty button {
    width: 30px;
    height: 100%;
    border: 0;
    background: transparent;
    color: var(--est-ink-soft);
    font-size: 1rem;
    cursor: pointer;
}

.est-qty button:hover { background: var(--est-paper-2); color: var(--est-ink); }
.est-qty output { min-width: 34px; text-align: center; font-size: 0.86rem; font-variant-numeric: tabular-nums; }

.est-dim-remove {
    flex: none;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--est-ink-faint);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.est-dim-remove:hover { background: rgba(180, 71, 47, 0.08); color: var(--est-error); }
.est-dim-remove[hidden],
.est-dim-add[hidden] { display: none; }
.est-dim-remove svg { width: 14px; height: 14px; }

.est-dim-size { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.est-num {
    position: relative;
    display: inline-flex;
    align-items: center;
    height: 40px;
    border: 1px solid var(--est-line-strong);
    border-radius: 8px;
    background: #fff;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.est-num:focus-within { border-color: var(--est-gold); box-shadow: 0 0 0 3px rgba(184, 150, 90, 0.14); }
.est-num.is-invalid { border-color: var(--est-error); }

.est-num-tag {
    padding-left: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--est-ink-faint);
}

.est-num input {
    width: 64px;
    height: 100%;
    padding: 0 4px 0 8px;
    border: 0;
    background: transparent;
    outline: none;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--est-ink);
    font-variant-numeric: tabular-nums;
}

.est-num-unit { padding-right: 10px; font-size: 0.82rem; color: var(--est-ink-faint); }
.est-times { color: var(--est-ink-faint); font-size: 0.9rem; }

.est-dim-area {
    margin-left: auto;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--est-ink);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.est-dim-area.is-empty { font-weight: 400; color: var(--est-ink-faint); }

.est-dim-add {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    border: 0;
    border-top: 1px dashed var(--est-line-strong);
    background: transparent;
    font-family: var(--font-body);
    font-size: 0.86rem;
    font-weight: 500;
    color: #8a6d3b;
    cursor: pointer;
    transition: background 0.2s ease;
}

.est-dim-add:hover { background: var(--est-gold-wash); }
.est-dim-add svg { width: 15px; height: 15px; }

.est-total {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 14px 18px;
    margin-bottom: 22px;
    border-radius: var(--est-radius);
    background: var(--est-ink);
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.84rem;
}

.est-total strong { font-family: var(--font-display); font-size: 1.25rem; font-weight: 500; color: #fff; font-variant-numeric: tabular-nums; }

/* Photos, plans and drawings */
.est-files-field { margin-top: 4px; }

.est-files-label {
    margin-bottom: 6px;
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--est-ink-soft);
}

.est-drop {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 82px;
    padding: 16px 18px;
    border: 1.5px dashed var(--est-line-strong);
    border-radius: 12px;
    background: #fff;
    color: var(--est-ink-soft);
    font-size: 0.88rem;
    line-height: 1.45;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.est-drop:hover,
.est-drop.is-over { border-color: var(--est-gold); background: var(--est-gold-wash); color: var(--est-ink); }
.est-drop:focus-visible { outline: 2px solid var(--est-gold); outline-offset: 2px; }
.est-drop.is-disabled { opacity: 0.5; cursor: default; }
.est-drop.is-disabled:hover { border-color: var(--est-line-strong); background: #fff; color: var(--est-ink-soft); }
.est-drop-icon { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--est-gold-wash); color: #8a6d3b; }
.est-drop-icon svg { width: 20px; height: 20px; }
.est-drop u { text-decoration-color: var(--est-gold); text-underline-offset: 3px; }

.est-files-note { margin: 8px 0 0; font-size: 0.76rem; line-height: 1.5; color: var(--est-ink-faint); }
.est-files-note.is-error { color: var(--est-error); }

.est-files { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.est-files:empty { display: none; }

.est-file {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 8px 8px 8px 8px;
    border: 1px solid var(--est-line);
    border-radius: 10px;
    background: #fff;
}

.est-file-thumb { width: 44px; height: 44px; border-radius: 7px; object-fit: cover; background: var(--est-paper-2); }
.est-file-thumb.is-doc { display: grid; place-items: center; color: var(--est-ink-soft); }
.est-file-thumb.is-doc svg { width: 20px; height: 20px; }
.est-file-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.est-file-name { overflow: hidden; font-size: 0.86rem; color: var(--est-ink); white-space: nowrap; text-overflow: ellipsis; }
.est-file-meta { font-size: 0.74rem; line-height: 1.4; color: var(--est-ink-faint); font-variant-numeric: tabular-nums; }
.est-file.is-error { border-color: rgba(180, 71, 47, 0.35); }
.est-file.is-error .est-file-meta { color: var(--est-error); }
.est-file-bar { display: block; height: 3px; margin-top: 4px; border-radius: 2px; background: var(--est-line); overflow: hidden; }
.est-file-bar span { display: block; height: 100%; background: var(--est-gold); transition: width 0.2s ease; }

.est-file-remove {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--est-ink-faint);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.est-file-remove:hover { background: rgba(180, 71, 47, 0.08); color: var(--est-error); }
.est-file-remove svg { width: 14px; height: 14px; }

/* Editing after sending */
.est-edit-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 20px;
    padding: 12px 14px;
    border: 1px solid rgba(184, 150, 90, 0.35);
    border-radius: 12px;
    background: var(--est-gold-wash);
    color: #6f5730;
    font-size: 0.86rem;
    line-height: 1.5;
}

.est-edit-note[hidden] { display: none; }
.est-edit-note svg { flex: none; width: 18px; height: 18px; margin-top: 1px; }
.est-edit-note strong { font-weight: 600; }

/* ---------- Step 3: sent ---------- */
.est-step--done {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 34px 30px 30px;
    text-align: center;
}

.est-done {
    width: min(920px, 100%);
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.est-done-title { margin-bottom: 30px; animation: estFadeUp 0.5s var(--est-ease); }

/* What happens next: received (ticked), then each stage in turn */
.est-track {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    width: 100%;
    margin: 0 0 34px;
    padding: 0;
    list-style: none;
}

.est-track-step {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 0 6px;
    opacity: 0;
    transform: translateY(10px);
    animation: estTrackIn 0.55s var(--est-ease) forwards;
    animation-delay: calc(var(--i) * 110ms + 150ms);
}

@keyframes estTrackIn { to { opacity: 1; transform: none; } }

.est-track-dot {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1.5px solid var(--est-line-strong);
    border-radius: 50%;
    background: var(--est-paper);
    color: var(--est-ink-faint);
    font-size: 0.86rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.est-track-step.is-done .est-track-dot { border: 0; }
.est-track-dot svg { width: 100%; height: 100%; overflow: visible; }

.est-track-ring {
    fill: var(--est-gold);
    fill-opacity: 0;
    stroke: var(--est-gold);
    stroke-width: 2.5;
    stroke-dasharray: 114;
    stroke-dashoffset: 114;
    transform: rotate(-90deg);
    transform-box: fill-box;
    transform-origin: center;
    animation: estDraw 0.7s 0.35s var(--est-ease) forwards, estRingFill 0.35s 0.95s ease forwards;
}

@keyframes estRingFill { to { fill-opacity: 1; } }

.est-track-tick {
    fill: none;
    stroke: #fff;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 23;
    stroke-dashoffset: 23;
    animation: estDraw 0.4s 1.15s ease forwards;
}

.est-track-step.is-next .est-track-dot { border-color: var(--est-gold); color: #8a6d3b; }

.est-track-step.is-next .est-track-dot::after {
    content: '';
    position: absolute;
    inset: -1.5px;
    border: 2px solid var(--est-gold);
    border-radius: 50%;
    opacity: 0;
    animation: estTrackHalo 2.4s 2s ease-out infinite;
}

@keyframes estTrackHalo {
    0% { opacity: 0.55; transform: scale(1); }
    80%, 100% { opacity: 0; transform: scale(1.55); }
}

/* the line to the next stage; the live one fills, then a pulse runs along it */
.est-track-line {
    position: absolute;
    top: 21px;
    left: calc(50% + 30px);
    right: calc(-50% + 30px);
    height: 2px;
    border-radius: 2px;
    background: repeating-linear-gradient(90deg, var(--est-line-strong) 0 5px, transparent 5px 10px);
}

.est-track-line.is-live { background: var(--est-line); }

.est-track-line.is-live::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--est-gold), var(--est-gold-light));
    transform: scaleX(0);
    transform-origin: left center;
    animation: estTrackFill 0.8s 1.4s var(--est-ease) forwards;
}

.est-track-line.is-live::after {
    content: '';
    position: absolute;
    top: -5px;
    left: -6px;
    width: 100%;
    height: 12px;
    background: radial-gradient(circle 6px at 6px 50%, #fff 0, var(--est-gold-light) 2.5px, rgba(212, 176, 122, 0.45) 4px, rgba(212, 176, 122, 0) 6px) no-repeat;
    opacity: 0;
    animation: estTrackRun 2.4s 2.2s ease-in-out infinite;
}

@keyframes estTrackFill { to { transform: none; } }

@keyframes estTrackRun {
    0% { opacity: 0; transform: translateX(0); }
    15%, 80% { opacity: 1; }
    100% { opacity: 0; transform: translateX(100%); }
}

.est-track-label {
    max-width: 130px;
    font-size: 0.8rem;
    line-height: 1.35;
    color: var(--est-ink-soft);
    text-wrap: balance;
}

.est-track-step.is-done .est-track-label { font-weight: 600; color: var(--est-ink); }
.est-track-step.is-next .est-track-label { color: var(--est-ink); }

.est-summary {
    width: 100%;
    max-width: 560px;
    margin: 0 0 20px;
    padding: 16px 20px;
    border-radius: var(--est-radius);
    background: var(--est-paper-2);
    text-align: left;
    font-size: 0.88rem;
    opacity: 0;
    animation: estTrackIn 0.55s 0.9s var(--est-ease) forwards;
}

.est-summary div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 6px 0; }
.est-summary div + div { border-top: 1px solid var(--est-line); }
.est-summary dt { color: var(--est-ink-faint); }
.est-summary dd { margin: 0; color: var(--est-ink); white-space: pre-line; overflow-wrap: anywhere; }

.est-edit {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 18px;
    padding: 11px 18px;
    border: 1px solid var(--est-line-strong);
    border-radius: 30px;
    background: #fff;
    font-family: var(--font-body);
    font-size: 0.86rem;
    line-height: 1.4;
    color: var(--est-ink-soft);
    cursor: pointer;
    transition: border-color 0.25s ease, background 0.25s ease;
}

.est-edit:hover { border-color: var(--est-gold); background: var(--est-gold-wash); }
.est-edit:focus-visible { outline: 2px solid var(--est-gold); outline-offset: 3px; }
.est-edit svg { flex: none; width: 16px; height: 16px; color: #8a6d3b; }
.est-edit strong { font-weight: 600; color: var(--est-ink); text-decoration: underline; text-decoration-color: var(--est-gold); text-underline-offset: 3px; }

.est-edit-limit { margin: 0 0 18px; font-size: 0.86rem; color: var(--est-ink-soft); }
.est-edit-limit a { color: var(--est-ink); text-decoration: underline; text-decoration-color: var(--est-gold); text-underline-offset: 3px; }

/* ---------- Footer ---------- */
.est-foot {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px 14px 26px;
    border-top: 1px solid var(--est-line);
    background: var(--est-paper);
    position: relative;
    z-index: 3;
}

.est-foot[hidden] { display: none; }

.est-send-error {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: calc(100% + 10px);
    margin: 0;
    padding: 11px 14px;
    border: 1px solid rgba(180, 71, 47, 0.35);
    border-radius: 10px;
    background: #fff5f2;
    box-shadow: 0 10px 30px rgba(30, 24, 14, 0.12);
    color: var(--est-error);
    font-size: 0.85rem;
    line-height: 1.45;
    animation: estFadeUp 0.35s var(--est-ease);
}

.est-send-error:empty { display: none; }

.est-foot-note { flex: 1; margin: 0; font-size: 0.78rem; line-height: 1.45; color: var(--est-ink-faint); }
.est-foot-note a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

.est-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 46px;
    padding: 0 14px;
    border: 0;
    border-radius: 30px;
    background: transparent;
    font-family: var(--font-body);
    font-size: 0.88rem;
    color: var(--est-ink-soft);
    cursor: pointer;
}

.est-back:hover { color: var(--est-ink); background: rgba(22, 22, 22, 0.05); }
.est-back svg { width: 16px; height: 16px; }
.est-back[hidden] { display: none; }

.est-next {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 48px;
    padding: 0 28px;
    border: 0;
    border-radius: 30px;
    background: var(--est-ink);
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s var(--est-ease), box-shadow 0.3s ease, opacity 0.3s ease;
}

.est-next:hover { background: #000; box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22); transform: translateY(-1px); }
.est-next:focus-visible { outline: 2px solid var(--est-gold); outline-offset: 3px; }
.est-next.is-submit { background: var(--est-gold); color: var(--black, #0a0a0a); }
.est-next.is-submit:hover { background: var(--est-gold-light); }
.est-next.is-dim { opacity: 0.45; }
.est-next svg { width: 17px; height: 17px; }
.est-next.is-busy { pointer-events: none; opacity: 0.7; }

/* ---------- Small screens: the card becomes a full-screen sheet ---------- */
@media (max-width: 900px) {
    .est-overlay { padding: 0; }
    .est-card { width: 100%; height: 100%; border-radius: 0; }
    .est-head { padding: 12px 12px 12px 18px; gap: 10px; }
    .est-brand span { display: none; }
    .est-steps { font-size: 0.74rem; }
    .est-steps li + li::before { width: 16px; }
    .est-status { min-width: 0; }
    .est-status-text { display: none; }

    .est-step--areas { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
    .est-areas-side { padding: 18px 18px 12px; border-right: 0; border-bottom: 1px solid var(--est-line); overflow: visible; }
    .est-areas-side .est-title { font-size: 1.45rem; margin-bottom: 4px; }
    .est-areas-side .est-sub { margin-bottom: 14px; font-size: 0.88rem; }
    .est-areas-side .est-eyebrow { display: none; }
    .est-mode { margin-bottom: 0; }
    .est-picked-title,
    .est-picked,
    .est-areas-tip { display: none; }

    .est-details { grid-template-columns: 1fr; }
    .est-col { padding: 22px 18px 26px; }
    .est-col + .est-col { border-left: 0; border-top: 1px solid var(--est-line); }

    .est-foot { padding: 10px 12px 10px 14px; padding-bottom: max(10px, env(safe-area-inset-bottom)); }
    .est-foot-note { display: none; }
    .est-next { flex: 1; justify-content: center; }
    .est-pin { height: 30px; font-size: 0.78rem; padding: 0 11px 0 6px; gap: 6px; }
    .est-box { width: 18px; height: 18px; }
    .est-box svg { inset: 1.5px; }
    .est-stage.is-flat { align-content: start; padding: 18px; }
    .est-stage.is-flat .est-labels { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 700px) {
    .est-step--done { padding: 26px 18px 24px; }
    .est-done-title { margin-bottom: 22px; }
    .est-track { display: flex; flex-direction: column; width: auto; align-self: stretch; margin: 0 0 24px; text-align: left; }
    .est-track-step { flex-direction: row; gap: 14px; padding: 0 0 22px; }
    .est-track-step:last-child { padding-bottom: 0; }
    .est-track-dot { flex: none; width: 38px; height: 38px; }
    /* centre to centre, behind the dots, so the whole gap between two stages shows the line */
    .est-track-line {
        top: 19px;
        bottom: -19px;
        left: 18px;
        right: auto;
        width: 2px;
        height: auto;
        background: repeating-linear-gradient(180deg, var(--est-line-strong) 0 5px, transparent 5px 10px);
    }
    .est-track-line.is-live::before { transform: scaleY(0); transform-origin: center top; }
    .est-track-line.is-live::after {
        top: -6px;
        left: -5px;
        width: 12px;
        height: 100%;
        background: radial-gradient(circle 6px at 50% 6px, #fff 0, var(--est-gold-light) 2.5px, rgba(212, 176, 122, 0.45) 4px, rgba(212, 176, 122, 0) 6px) no-repeat;
        animation-name: estTrackRunDown;
    }
    .est-track-label { max-width: none; font-size: 0.92rem; }
    .est-summary div { grid-template-columns: 84px 1fr; }
}

@keyframes estTrackRunDown {
    0% { opacity: 0; transform: translateY(0); }
    15%, 80% { opacity: 1; }
    100% { opacity: 0; transform: translateY(100%); }
}

@media (max-width: 420px) {
    .est-finish-grid { gap: 8px; }
    .est-finish-text { padding: 10px 11px 12px; }
    .est-dim-row { grid-template-columns: 1fr; }
    .est-slab { display: none; }
    .est-num input { width: 54px; }
}

@media (prefers-reduced-motion: reduce) {
    .estimate-bar.is-invalid .estimate-bar-pill { animation: none; }
    .est-step,
    .est-backdrop,
    .est-card > *,
    .est-pin { transition-duration: 0.01s; }
    .est-leaders circle.est-ring.is-on { animation: none; }
    .est-finish-card[data-finish="gloss"] .est-finish-media::after { display: none; }
    .est-done-title,
    .est-dims-wrap { animation: none; }
    .est-track-step,
    .est-summary { opacity: 1; transform: none; animation: none; }
    .est-track-ring { stroke-dashoffset: 0; fill-opacity: 1; animation: none; }
    .est-track-tick { stroke-dashoffset: 0; animation: none; }
    .est-track-line.is-live::before { transform: none; animation: none; }
    .est-track-line.is-live::after,
    .est-track-step.is-next .est-track-dot::after { display: none; }
}

/* A bar's message takes no room until it has something to say, so the small print sits right under the bar */
.estimate-bar-msg:not(.is-shown) { display: none; }
#estimate-bar { gap: 8px; }
#estimate-bar .estimate-bar-note { margin-top: 0; }

/* Pictures carry their own width and height (no layout shift); any size set in CSS still wins */
:where(img[width][height]) { height: auto; }
