/* /estimate: the light estimator. Two columns from 960px (inputs left, plan right); stacked on
   phones with the plan first. Brand: black/charcoal type, the cream-to-pale-blue glow used
   sparingly (the CTA band), amber only as an accent (the fitting dots). No animated transitions. */
.page-estimate [hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.est-head { padding-bottom: clamp(16px, 3vw, 32px); }
.est-head h1 { margin-bottom: 0.35em; font-size: clamp(2.1rem, 1.4rem + 3vw, 3.6rem); }
.est-head .lede { margin-bottom: 0; }
.est-nojs { padding-bottom: clamp(32px, 5vw, 56px); }
.est-nojs p:first-child { max-width: 44rem; padding: 18px 20px; background: var(--cream); border: 1px solid var(--warm); border-radius: var(--radius); }

/* Layout */
.est { display: grid; gap: clamp(24px, 4vw, 56px); padding-bottom: clamp(40px, 6vw, 80px); }
.est-result, .est-inputs { min-width: 0; }
@media (min-width: 960px) {
  .est { grid-template-columns: minmax(300px, 0.8fr) minmax(0, 1.2fr); align-items: start; }
  .est-inputs { grid-column: 1; grid-row: 1; }
  .est-result { grid-column: 2; grid-row: 1; position: sticky; top: calc(var(--header-height) + 20px); }
}

/* Inputs */
.est-group { margin: 0 0 24px; padding: 0; border: 0; }
.est-group__title { margin-bottom: 12px; padding: 0; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.est-field { margin-bottom: 16px; }
.est-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 0 14px; }
.est-hint { margin: 6px 0 0; font-size: 0.85rem; color: var(--muted); }
.est-field input[aria-invalid="true"] { border-color: #a3341f; }
.est-error { margin: 0; color: #a3341f; font-size: 0.9rem; }
.est-error:empty { display: none; }

.est-fittings { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 16px; }
.est-fitting { position: relative; display: block; cursor: pointer; }
.est-fitting input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.est-fitting__body { display: flex; align-items: center; gap: 12px; height: 100%; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: #fff; }
.est-fitting__body img { width: 52px; height: 52px; object-fit: contain; mix-blend-mode: multiply; flex: none; }
.est-fitting__name { display: block; font-weight: 600; }
.est-fitting__detail { display: block; font-size: 0.85rem; color: var(--muted); }
.est-fitting input:checked + .est-fitting__body { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: var(--stone); }
.est-fitting input:focus-visible + .est-fitting__body { outline: 2px solid var(--focus); outline-offset: 2px; }

.est-link {
  padding: 0; border: 0; background: none; color: var(--ink); font: inherit; font-weight: 500;
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.est-link:focus-visible, .est-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* Result */
.est-suggest { margin: 0 0 14px; font-size: clamp(1.1rem, 1rem + 0.5vw, 1.4rem); font-weight: 500; line-height: 1.35; }

.est-plan { margin: 0 0 14px; }
.est-plan__frame { display: grid; grid-template-columns: auto auto; justify-content: start; align-items: center; gap: 4px 8px; }
.est-plan__canvas { display: block; max-width: 100%; border-radius: 2px; }
.est-dim { font-size: 0.8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.est-dim--x { grid-column: 1; grid-row: 2; text-align: center; }
.est-dim--y { grid-column: 2; grid-row: 1; writing-mode: vertical-rl; }
.est-plan__caption { margin: 10px 0 8px; font-size: 0.85rem; color: var(--muted); }
.est-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0; padding: 0; list-style: none; font-size: 0.8rem; font-variant-numeric: tabular-nums; }
.est-legend li { display: inline-flex; align-items: center; gap: 6px; }
.est-legend li:last-child::after { content: " lx"; margin-left: -3px; }
.est-swatch { width: 14px; height: 14px; border-radius: 2px; box-shadow: inset 0 0 0 1px rgba(15, 15, 16, 0.15); }

.est-adjust { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-bottom: 18px; }
.est-btn { min-width: 48px; min-height: 44px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: #fff; color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
.est-btn:hover:not(:disabled) { border-color: var(--ink); }
.est-btn:disabled { color: var(--muted); cursor: not-allowed; opacity: 0.6; }
.est-btn--wide { font-weight: 500; }

.est-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 0 0 16px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.est-stat { padding: 12px 14px; background: #fff; }
.est-stat--lux { grid-column: 1 / -1; }
@media (min-width: 560px) { .est-stats { grid-template-columns: 1.3fr 1fr 1fr; } .est-stat--lux { grid-column: auto; } }
.est-stat dt { font-size: 0.8rem; color: var(--muted); }
.est-stat dd { margin: 4px 0 0; font-size: 1.15rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.est-stat--lux dd { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.est-stat__note { flex-basis: 100%; font-size: 0.8rem; font-weight: 400; color: var(--muted); }
.est-badge { padding: 2px 9px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.02em; border: 1px solid currentColor; }
.est-badge[data-badge="on"] { color: #1f5d3a; background: #e6f1ea; }
.est-badge[data-badge="under"] { color: #8c2d1a; background: #f8e7e2; }
.est-badge[data-badge="above"] { color: var(--amber-ink); background: var(--cream); }

.est-job { margin: 0; font-size: 0.95rem; }

/* How this works and the CTA */
.est-how { max-width: 52rem; padding-bottom: clamp(32px, 5vw, 56px); }
.est-how h2, .est-cta h2 { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem); }
.est-how p { color: var(--charcoal); }
.est-cta { margin-bottom: var(--section); padding-block: clamp(32px, 5vw, 56px); padding-inline: clamp(20px, 5vw, 56px); background: var(--glow); border-radius: var(--radius-lg); }
.est-cta h2 { max-width: 30ch; }
.est-cta__email { margin-bottom: 0; font-size: 0.95rem; color: var(--charcoal); }
