/* Bid cost calculator (/bid-cost-calculator). Loaded after site.css and editorial.css.
   One question per screen inside a rounded gradient panel, in the style of the page heroes. */

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.calc-section { padding: clamp(24px, 3vw, 40px) 0 clamp(16px, 2vw, 24px); }
.calc-section .crumbs { margin-bottom: 16px; }

.calc-panel { position: relative; isolation: isolate; overflow: hidden; margin: 0 clamp(10px, 2vw, 28px); border-radius: 36px; background: linear-gradient(160deg, #F1E9F6 0%, #E4D4EE 55%, #F3E6B8 100%); padding: clamp(48px, 8vw, 112px) var(--gutter); min-height: min(640px, 78vh); display: grid; place-items: center; }
.calc-panel::before, .calc-panel::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; filter: blur(64px); will-change: transform; }
.calc-panel::before { width: 40vmax; height: 40vmax; right: -12vmax; top: -20vmax; background: #C9A0D8; opacity: .8; animation: ed-drift-a 28s ease-in-out infinite alternate; }
.calc-panel::after { width: 32vmax; height: 32vmax; left: -8vmax; bottom: -22vmax; background: #F2CF62; opacity: .6; animation: ed-drift-b 24s ease-in-out infinite alternate; }

.calc { width: 100%; max-width: 760px; color: var(--plum-900); }
.calc [hidden] { display: none !important; }
.calc-step { text-align: left; }
.calc-eyebrow { font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--plum-800); }
.ed .calc-q { display: block; margin-top: 16px; font-family: var(--serif); font-weight: 420; font-variation-settings: 'opsz' 60; color: var(--plum-900); font-size: clamp(2rem, 1.2rem + 3vw, 3.5rem); line-height: 1.08; letter-spacing: -0.025em; text-wrap: balance; }
.ed .calc-q:focus { outline: none; }
.calc-intro { margin-top: 20px; font-size: clamp(1.1875rem, 1.05rem + 0.5vw, 1.375rem); line-height: 1.5; max-width: 46ch; }
.calc-help { margin-top: 14px; font-size: 1.0625rem; color: var(--plum-800); max-width: 52ch; }

.calc-progress { display: flex; align-items: center; gap: 14px; font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--plum-800); }
.calc-bar { flex: 1; max-width: 220px; height: 3px; border-radius: 3px; background: rgba(46,29,51,.14); overflow: hidden; }
.calc-bar i { display: block; height: 100%; background: var(--plum-900); border-radius: 3px; }

/* Inputs: big and easy on a phone */
.calc-field, .calc-stepper { margin-top: 28px; display: flex; align-items: center; gap: 12px; }
.calc-field { max-width: 420px; background: #fff; border: 1.5px solid rgba(46,29,51,.25); border-radius: 18px; padding: 0 20px; transition: border-color 150ms, box-shadow 150ms; }
.calc-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(110,63,119,.18); }
.calc-input { font-family: var(--font); font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem); font-weight: 500; color: var(--plum-900); background: transparent; border: 0; min-height: 76px; width: 100%; min-width: 0; padding: 0; font-variant-numeric: tabular-nums; -moz-appearance: textfield; appearance: textfield; }
.calc-input::-webkit-outer-spin-button, .calc-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.calc-input:focus { outline: none; }
.calc-cur, .calc-unit { font-size: 1.125rem; color: var(--muted); white-space: nowrap; }
.calc-cur { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); color: var(--plum-800); }
.calc-stepper .calc-input { width: 4.5ch; text-align: center; background: #fff; border: 1.5px solid rgba(46,29,51,.25); border-radius: 18px; padding: 0 8px; flex: none; box-sizing: content-box; }
.calc-stepper .calc-input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(110,63,119,.18); }
.calc-pm { width: 64px; height: 64px; flex: none; border-radius: 50%; border: 1.5px solid var(--plum-900); background: transparent; color: var(--plum-900); font-size: 1.75rem; line-height: 1; cursor: pointer; transition: background 150ms, color 150ms; }
.calc-pm:hover { background: var(--plum-900); color: #fff; }
.calc [aria-invalid="true"] { border-color: var(--stop) !important; }
.calc-field:has([aria-invalid="true"]) { border-color: var(--stop); }
.calc-error { margin-top: 12px; font-size: 0.9375rem; font-weight: 500; color: var(--stop); }
.calc-error:empty { display: none; }

.calc-picks { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 10px; }
.calc-pick { min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1.5px solid rgba(46,29,51,.3); background: rgba(255,255,255,.6); color: var(--plum-900); font-size: 0.9375rem; font-weight: 500; cursor: pointer; transition: background 150ms, border-color 150ms, color 150ms; }
.calc-pick:hover { border-color: var(--plum-900); }
.calc-pick[aria-pressed="true"] { background: var(--plum-900); border-color: var(--plum-900); color: #fff; }
.calc-picks + .calc-field { margin-top: 16px; }

/* Back / Next: full pills in plum */
.calc-nav { margin-top: 40px; display: flex; gap: 12px; flex-wrap: wrap; }
.calc-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 0 32px; border-radius: 999px; border: 1.5px solid var(--plum-900); background: var(--plum-900); color: #fff; font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; cursor: pointer; transition: background 150ms, color 150ms, opacity 150ms; }
.calc-btn:hover { background: var(--plum-800); }
.calc-btn .icon { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.calc-btn.calc-back { background: transparent; color: var(--plum-900); }
.calc-btn.calc-back:hover { background: rgba(255,255,255,.6); }
.calc-btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }

/* Last step: name and email */
.calc-contact { margin-top: 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; max-width: 640px; }
.calc-contact .field label { color: var(--plum-900); }
.calc-contact .field input { min-height: 56px; border-radius: 14px; font-size: 1.0625rem; }
.calc-consent { grid-column: 1 / -1; display: flex; gap: 10px; align-items: flex-start; font-size: 0.9375rem; color: var(--plum-900); cursor: pointer; }
.calc-consent input { width: 18px; height: 18px; margin-top: 3px; flex: none; accent-color: var(--accent); }

/* Result */
.ed .calc-big { margin-top: 16px; font-family: var(--serif); font-weight: 420; color: var(--plum-900); font-size: clamp(2rem, 1.1rem + 3.4vw, 3.75rem); line-height: 1.1; letter-spacing: -0.025em; max-width: none; }
.ed .calc-big:focus { outline: none; }
.calc-gold { white-space: nowrap; background-image: linear-gradient(var(--gold), var(--gold)); background-repeat: no-repeat; background-size: 100% 4px; background-position: 0 100%; padding-bottom: 4px; }
.calc-lines { list-style: none; padding: 0; margin-top: 32px; display: grid; gap: 0; border-top: 1px solid rgba(46,29,51,.18); }
.calc-lines li { font-family: var(--serif); font-weight: 420; font-size: clamp(1.25rem, 1rem + 0.9vw, 1.75rem); line-height: 1.3; letter-spacing: -0.012em; padding: 18px 0; border-bottom: 1px solid rgba(46,29,51,.18); }
.calc-lines li:empty { display: none; }
.calc-fit { margin-top: 32px; padding: 24px 28px; border-radius: 24px; background: rgba(255,255,255,.72); }
.ed .calc-fit h3 { font-family: var(--serif); font-size: 1.375rem; }
.calc-fit p { margin-top: 10px; font-size: 1.0625rem; }
.calc-two { margin-top: 28px; display: grid; grid-template-columns: 1fr; gap: 20px; }
.calc-note { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-2); font-weight: 500; color: var(--ink); }
.calc-two > div { background: var(--lilac); border-radius: 24px; padding: 24px 28px; }
.ed .calc-two h3 { font-family: var(--serif); font-size: 1.375rem; }
.calc-two ul { margin-top: 14px; }
.calc-sum { margin-top: 28px; font-size: 1.125rem; max-width: 58ch; }
.calc-actions { margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.calc-again { background: none; border: 0; padding: 8px 0; color: var(--plum-900); font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; text-decoration: underline; text-underline-offset: 0.3em; cursor: pointer; }
.calc-again:hover { color: var(--accent); }
.calc-fine { margin-top: 24px; font-size: 0.8125rem; color: var(--plum-800); }

.calc-how { max-width: 860px; }
.ed .calc-how h2 { font-size: clamp(1.75rem, 1.3rem + 1.2vw, 2.25rem); }
.calc-how ul { margin-top: 20px; padding-left: 1.2em; display: grid; gap: 8px; }
.calc-how p { margin-top: 20px; }

@media (prefers-reduced-motion: reduce) { .calc-panel::before, .calc-panel::after { animation: none; } }
@media (max-width: 560px) {
  .calc-panel { border-radius: 24px; padding: 40px 20px 44px; min-height: 0; place-items: start stretch; }
  .calc-nav .calc-btn { flex: 1; }
  .calc-nav .calc-back { flex: 0 0 auto; padding: 0 24px; }
  .calc-pm { width: 56px; height: 56px; }
  .calc-actions .btn { width: 100%; }
  .calc-unit { font-size: 1rem; }
  .calc-fit, .calc-two > div { padding: 20px; border-radius: 20px; }
  .calc-two { grid-template-columns: 1fr; }
  .calc-contact { grid-template-columns: 1fr; }
}
