/* "Build your design" estimator — loaded only on /xx/ai-design. Uses the site tokens from main.css. */
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.est [hidden] { display: none !important; }
/* grid children must be allowed to shrink, or the wide table pushes the page sideways on phones */
.est-top > *, .est-result > *, .est-next > *, .est-result-head > *, .est-drops > * { min-width: 0; }
.est h2 { font-size: clamp(1.5rem, 1rem + 1.6vw, 2.2rem); }
.est h3 { font-size: 1.2rem; }
.est-contact { padding-block-start: 1rem; border-block-start: 1px solid var(--line); }
.est-contact h3 { margin: 0; }
.est-contact .est-tiers .field-err { flex-basis: 100%; }
.est-done { text-align: center; justify-items: center; }
.est-done:focus { outline: 0; }
.est-done p { margin: 0; max-width: 46ch; }
.est-off { padding: 1.2rem 1.4rem; border: 1px solid var(--line); background: var(--sand-2); }

/* upload + how it works */
.est-top { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
@media (max-width: 900px) { .est-top { grid-template-columns: 1fr; } }
.est-form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.2rem, 3vw, 2rem); display: grid; gap: 1.1rem; }
.est-drops { display: grid; grid-template-columns: 1.3fr 1fr; gap: 1rem; }
@media (max-width: 560px) { .est-drops { grid-template-columns: 1fr; } }
.est-drop { display: grid; gap: .35rem; align-content: start; }
.est-drop-label { font-weight: 600; font-size: .88rem; }
.est-drop-zone { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; max-width: 100%; border: 1.5px dashed color-mix(in srgb, var(--clay) 45%, var(--line)); background: var(--sand-2); border-radius: var(--radius); cursor: pointer; overflow: hidden; text-align: center; transition: border-color .15s, background .15s; }
.est-drop-zone:hover, .est-drop-zone.is-over { border-color: var(--clay); background: color-mix(in srgb, var(--sand-2) 70%, #fff); }
.est-drop-zone:focus-within { outline: 3px solid var(--sky-2); outline-offset: 2px; }
.est-drop-zone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.est-drop-zone img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.est-drop-cta { display: grid; justify-items: center; gap: .4rem; padding: 1rem; font-size: .9rem; color: var(--clay-dark); font-weight: 600; }
.est-drop-cta .i { width: 26px; height: 26px; }
.est-drop-zone.has-image .est-drop-cta { position: absolute; inset-inline: .5rem; bottom: .5rem; padding: .3rem .6rem; background: rgb(22 16 11 / .7); color: #fff; font-size: .78rem; grid-auto-flow: column; justify-content: center; }
.est-drop-zone.has-image .est-drop-cta .i { width: 16px; height: 16px; }
.est-drop.has-error .est-drop-zone { border-color: var(--err); }
.est-drop.has-error .field-err { display: block; }
.est-tiers { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.est-tiers legend { font-weight: 600; font-size: .88rem; margin-bottom: .4rem; padding: 0; }
.est-chip { position: relative; }
.est-chip input { position: absolute; opacity: 0; inset: 0; }
.est-chip span, .est-chip-btn { display: inline-block; padding: .5rem 1rem; border: 1.5px solid var(--line); border-radius: 999px; font: inherit; font-size: .9rem; font-weight: 600; background: #fff; color: var(--ink); cursor: pointer; }
.est-chip input:checked + span, .est-chip-btn[aria-pressed="true"] { background: var(--charcoal); border-color: var(--charcoal); color: #fff; }
.est-chip input:focus-visible + span { outline: 3px solid var(--sky-2); outline-offset: 2px; }
.est-progress { display: flex; gap: .6rem; align-items: center; justify-content: center; margin: 0; font-size: .9rem; color: var(--muted); }
.est-spinner { width: 18px; height: 18px; border: 2px solid var(--line); border-top-color: var(--clay); border-radius: 50%; animation: est-spin .8s linear infinite; }
@keyframes est-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .est-spinner { animation-duration: 3s; } }

.est-how { display: grid; gap: 1rem; }
.est-how ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; counter-reset: s; }
.est-how li { display: grid; grid-template-columns: 2.6rem minmax(0, 1fr); gap: .2rem .9rem; counter-increment: s; }
.est-how li::before { content: counter(s); grid-row: span 2; display: grid; place-items: center; width: 2.6rem; height: 2.6rem; background: var(--charcoal); color: var(--gold, #e2b475); font-weight: 700; }
.est-how li span { color: var(--muted); font-size: .93rem; }

/* result */
.est-result { margin-block-start: clamp(2rem, 5vw, 3.5rem); padding-block-start: clamp(2rem, 5vw, 3rem); border-block-start: 1px solid var(--line); display: grid; gap: 1.4rem; }
.est-result:focus { outline: 0; }
.est-quote { margin: 0; padding: 0; border: 0; }
.est-result-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.5rem; align-items: start; }
@media (max-width: 760px) { .est-result-head { grid-template-columns: 1fr; } }
.est-kicker { margin: 0 0 .4rem; font-size: .82rem; letter-spacing: .03em; color: var(--clay); font-weight: 600; }
.est-summary { max-width: 68ch; margin: .6rem 0 0; color: var(--ink); }
.est-style { margin: .4rem 0 0; color: var(--muted); font-size: .92rem; }
.est-thumbs { display: flex; gap: .6rem; }
.est-thumbs figure { margin: 0; width: 150px; max-width: 42vw; }
.est-thumbs img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border: 1px solid var(--line); }
.est-thumbs figcaption { font-size: .78rem; color: var(--muted); margin-top: .25rem; }
.est-controls { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: space-between; align-items: center; }
.est-add select { font: inherit; padding: .5rem .8rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: #fff; max-width: 100%; }

.est-table-wrap { overflow-x: auto; border: 1px solid var(--line); background: #fff; }
.est-table { width: 100%; border-collapse: collapse; min-width: 720px; font-size: .93rem; }
.est-table th, .est-table td { padding: .65rem .75rem; border-bottom: 1px solid var(--line); text-align: start; vertical-align: middle; }
.est-table thead th { font-size: .78rem; font-weight: 600; color: var(--muted); background: var(--sand-2); white-space: nowrap; }
.est-table tbody th { font-weight: 600; }
.est-table tbody tr:last-child > * { border-bottom: 0; }
.est-table .num { text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
.est-basis { display: block; font-weight: 400; font-size: .8rem; color: var(--muted); margin-top: .15rem; max-width: 46ch; }
.est-basis:empty { display: none; }
.est-qty { display: inline-flex; align-items: center; gap: .35rem; }
.est-qty input { width: 5.5rem; padding: .4rem .5rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm); font: inherit; font-variant-numeric: tabular-nums; }
.est-unit { font-size: .82rem; color: var(--muted); }
.est-row-total { font-weight: 600; }
.est-del { border: 0; background: transparent; color: var(--muted); font-size: 1.3rem; line-height: 1; padding: .2rem .45rem; cursor: pointer; border-radius: var(--radius-sm); }
.est-del:hover { color: var(--err); background: #fdecea; }
.est-empty { text-align: center !important; color: var(--muted); padding: 1.5rem !important; }

.est-totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.6fr); gap: .7rem; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) { .est-totals { grid-template-columns: repeat(2, minmax(0, 1fr)); } .est-grand { grid-column: 1 / -1; } }
.est-totals > div { display: grid; gap: .15rem; padding: .9rem 1rem; background: var(--sand-2); }
.est-totals small { font-size: .8rem; color: var(--muted); }
.est-totals strong { font-size: 1.2rem; }
.est-grand { background: var(--charcoal) !important; color: #fff; }
.est-grand small, .est-grand .est-cur { color: rgb(255 255 255 / .7); }
.est-grand strong { font-size: clamp(1.3rem, 1rem + 1vw, 1.7rem); color: var(--gold, #e2b475); }
.est-cur { font-size: .8rem; }
.est-disclaimer { margin: 0; font-size: .85rem; color: var(--muted); max-width: 90ch; }
.est-warnings { padding: 1rem 1.2rem; background: #fff7e8; border-inline-start: 4px solid #c98a1a; }
.est-warnings h3 { margin: 0 0 .5rem; font-size: 1rem; }
.est-warnings ul { margin: 0; padding-inline-start: 1.1rem; display: grid; gap: .35rem; font-size: .92rem; }

.est-next { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 1.4rem; align-items: start; }
@media (max-width: 900px) { .est-next { grid-template-columns: 1fr; } }
.est-book p { margin: 0; }
.est-fee { font-weight: 600; color: var(--clay-dark); }
.est-actions { display: grid; gap: .6rem; }

@media print {
  .site-header, .site-footer, .page-hero, .est-top, .est-controls, .est-del, .est-next, .float, .consent, .skip, dialog { display: none !important; }
  .section { padding: 0 !important; }
  .est-result { border: 0; margin: 0; padding: 0; }
  .est-table { min-width: 0; font-size: 10pt; }
  .est-qty input { border: 0; width: auto; padding: 0; }
  .est-grand { background: #fff !important; color: #000; border: 1px solid #000; }
  .est-grand strong, .est-grand small, .est-grand .est-cur { color: #000; }
  .est-totals > div { background: #fff; border: 1px solid #999; }
}
