.quote {
  position: fixed;
  inset: 0;
  z-index: 11000;
}

.quote[hidden] {
  display: none;
}

.quote__overlay {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(57, 38, 21, 0.46);
}

body.is-quote-open .quote input,
body.is-quote-open .quote textarea {
  caret-color: var(--brown);
}

body.is-quote-open,
body.is-quote-open .quote,
body.is-quote-open .quote * {
  cursor: auto !important;
}

body.is-quote-open .quote button,
body.is-quote-open .quote a,
body.is-quote-open .quote label,
body.is-quote-open .quote-pill,
body.is-quote-open .quote__overlay {
  cursor: pointer !important;
}

body.is-quote-open .quote input,
body.is-quote-open .quote textarea,
body.is-quote-open .quote select {
  cursor: text !important;
}

body.is-quote-open .cursor,
body.is-quote-open .cursor-dot {
  opacity: 0 !important;
  visibility: hidden;
}

.quote__panel {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  width: min(540px, 100%);
  height: 100%;
  background: #f7f4f0;
  color: var(--brown);
  box-shadow: -18px 0 40px rgba(57, 38, 21, 0.16);
  transform: translateX(16px);
  opacity: 0;
  transition: transform 0.22s var(--ease), opacity 0.22s var(--ease);
}

.quote.is-open .quote__panel {
  transform: none;
  opacity: 1;
}

.quote__head,
.quote__foot {
  padding: 1.15rem 1.25rem;
}

.quote__head {
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.quote__kicker,
.quote__sub,
.quote-foot__note,
.quote-disclaimer,
.quote-note,
.quote-live__hint,
.quote-viz figcaption,
.quote-file small,
.quote-file em {
  margin: 0;
  color: var(--brown-soft);
  font-size: 0.82rem;
  letter-spacing: -0.03em;
  font-style: normal;
}

.quote__head-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.35rem;
}

.quote__head h2,
.quote-sent h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3vw, 2rem);
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 1.05;
}

.quote__sub {
  margin-top: 0.45rem;
  max-width: 38rem;
  line-height: 1.4;
}

.quote__close {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--brown);
  font-size: 1.4rem;
  line-height: 1;
}

.quote__steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.4rem;
  margin: 0.9rem 0 0;
  padding: 0;
  list-style: none;
}

.quote__steps button {
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: var(--brown-soft);
  font-size: 0.72rem;
  letter-spacing: -0.03em;
  text-align: left;
}

.quote__steps button span {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-right: 0.2rem;
  border-radius: 50%;
  border: 1px solid var(--line);
  font-size: 0.68rem;
}

.quote__steps .is-current button,
.quote__steps .is-done button {
  color: var(--brown);
}

.quote__steps .is-current button span,
.quote__steps .is-done button span {
  background: var(--brown);
  color: #f6f6f6;
  border-color: var(--brown);
}

.quote__body {
  flex: 1;
  overflow: auto;
  padding: 1rem 1.25rem 1.4rem;
}

.quote__foot {
  display: flex;
  justify-content: space-between;
  gap: 0.7rem;
  border-top: 1px solid var(--line);
  background: #fff;
  padding-bottom: calc(1rem + env(safe-area-inset-bottom));
}

.quote-products {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
}

.quote-product {
  display: grid;
  gap: 0.35rem;
  min-height: 112px;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
  color: var(--brown);
  text-align: left;
}

.quote-product svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--brown);
  stroke-width: 1.4;
}

.quote-product strong {
  font-size: 0.98rem;
  font-weight: 560;
  letter-spacing: -0.04em;
}

.quote-product span {
  color: var(--brown-soft);
  font-size: 0.78rem;
  line-height: 1.3;
}

.quote-product.is-selected,
.quote-product:hover {
  border-color: var(--brown);
}

.quote-set {
  margin: 0 0 1rem;
  padding: 0;
  border: 0;
}

.quote-set legend {
  margin-bottom: 0.65rem;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brown-soft);
}

.quote-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
}

.quote-field,
.quote-file {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
}

.quote-field--wide,
.quote-uploads,
.quote-live,
.quote-summary,
.quote-sent {
  grid-column: 1 / -1;
}

.quote-field span,
.quote-file span {
  font-size: 0.78rem;
  color: var(--brown-mid);
}

.quote-field input,
.quote-field select,
.quote-field textarea,
.quote-file input {
  width: 100%;
  min-height: 46px;
  padding: 0.7rem 0.75rem;
  border: 1px solid rgba(57, 38, 21, 0.16);
  border-radius: 10px;
  background: #fff;
  color: var(--brown);
  font: inherit;
  letter-spacing: -0.03em;
}

.quote-field textarea {
  min-height: 88px;
  resize: vertical;
}

.quote-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.quote-pill {
  min-height: 36px;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--brown);
  font-size: 0.8rem;
}

.quote-pill.is-selected {
  background: var(--brown);
  color: #f6f6f6;
  border-color: var(--brown);
}

.quote-uploads {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.8rem;
}

.quote-file em {
  font-weight: 400;
}

.quote-live {
  margin: 0.4rem 0 1rem;
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
}

.quote-viz svg {
  display: block;
  width: 100%;
  max-height: 220px;
  background: #efe6dc;
  border-radius: 10px;
}

.quote-viz__deck {
  fill: #c2bbb5;
}

.quote-viz rect:not(.quote-viz__deck) {
  fill: #efe4d4;
  stroke: #392615;
  stroke-width: 8;
}

.quote-metrics,
.quote-summary dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem 0.8rem;
  margin: 0.8rem 0 0;
}

.quote-metrics div,
.quote-summary dl div {
  min-width: 0;
}

.quote-metrics dt,
.quote-summary dt {
  color: var(--brown-soft);
  font-size: 0.75rem;
}

.quote-metrics dd,
.quote-summary dd {
  margin: 0.15rem 0 0;
  overflow-wrap: anywhere;
  font-size: 0.98rem;
  letter-spacing: -0.04em;
}

.quote-summary {
  padding: 0.2rem 0 0.4rem;
}

.quote-summary__price dd {
  font-family: var(--font-display);
  font-size: 1.25rem;
}

.quote-note,
.quote-disclaimer {
  margin-top: 0.8rem;
  line-height: 1.4;
}

.quote-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 1rem;
  border: 0;
  border-radius: 10px;
  background: var(--brown);
  color: #f6f6f6;
  font: inherit;
  font-size: 0.9rem;
  letter-spacing: -0.04em;
}

.quote-btn--ghost {
  background: transparent;
  color: var(--brown);
  border: 1px solid var(--line);
}

.quote-link {
  display: inline-flex;
  margin-top: 0.8rem;
  color: var(--brown);
  text-decoration: underline;
  text-underline-offset: 3px;
}

body.is-quote-open {
  overflow: hidden;
}

@media (max-width: 809px) {
  body {
    padding-bottom: calc(72px + env(safe-area-inset-bottom));
  }

  .quote__panel {
    width: 100%;
  }

  .quote-products,
  .quote-grid,
  .quote-metrics,
  .quote-summary dl {
    grid-template-columns: 1fr;
  }

  .quote__steps button {
    font-size: 0.68rem;
  }
}

@media (max-width: 430px) {
  .quote__head,
  .quote__body,
  .quote__foot {
    padding-left: 0.9rem;
    padding-right: 0.9rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .quote__panel {
    transition: none;
  }
}
