.quote-page .quote-intro {
  padding: clamp(24px, 3.5vw, 42px) 0;
}

.quote-page .quote-intro > .container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 28px;
}

.quote-page .quote-intro h1 {
  max-width: none;
  margin: 4px 0 8px;
  font-size: clamp(2rem, 3.6vw, 3rem);
}

.quote-intro__copy .lede {
  max-width: 760px;
  margin: 0;
}

.quote-page .quote-flow {
  width: min(430px, 100%);
  border: 1px solid #465058;
  background: transparent;
}

.quote-page .quote-flow__step {
  grid-template-columns: 24px auto;
  align-items: center;
  padding: 11px 13px;
}

.quote-page .quote-flow__step span {
  font-size: 0.78rem;
  white-space: nowrap;
}

.quote-section {
  padding-top: clamp(34px, 5vw, 58px);
}

.quote-auth-gate {
  max-width: 720px;
  margin: 0 auto;
  border: 1px solid var(--color-border);
  border-top: 5px solid var(--color-primary);
  border-radius: var(--radius-md);
  background: white;
  padding: clamp(24px, 4vw, 42px);
  box-shadow: var(--shadow-sm);
}

.quote-auth-gate h2 {
  margin: 5px 0 10px;
}

.quote-auth-gate p:not(.eyebrow) {
  color: var(--color-text-muted);
}

.quote-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr);
  align-items: start;
  gap: clamp(24px, 3vw, 38px);
}

.quote-items {
  display: grid;
  gap: 14px;
}

.quote-item {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  gap: 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: white;
  padding: 12px;
}

.quote-item__image {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  background: var(--color-surface);
}

.quote-item__image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
}

.quote-item h3 {
  margin-bottom: 5px;
  font-size: 1rem;
}

.quote-item__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.quote-item__controls input[type="number"] {
  width: 86px;
}

.quote-item textarea {
  min-height: 52px;
  margin-top: 8px;
}

.quote-sidebar {
  position: sticky;
  top: 150px;
}

.quote-summary {
  margin-bottom: 12px;
  border-radius: var(--radius-md);
  background: var(--color-graphite);
  color: white;
  padding: 18px 20px;
}

.quote-summary h2 {
  color: white;
  font-size: 1.25rem;
}

.quote-total-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid #4a535c;
  padding: 8px 0;
}

.quote-total-row strong small,
.quote-totals__row strong small {
  display: block;
  margin-top: 3px;
  color: var(--color-primary);
  font-size: 0.78rem;
  font-weight: 750;
}

.quote-rate-note {
  grid-column: 1 / -1;
  margin: 7px 0 0;
  color: var(--color-text-muted);
  font-size: 0.75rem;
}

.quote-page .form-card {
  gap: 13px;
  padding: clamp(18px, 2vw, 24px);
}

.form-card__heading h2,
.form-card__heading p {
  margin: 0;
}

.form-card__heading h2 {
  margin-top: 3px;
  font-size: clamp(1.45rem, 2vw, 1.85rem);
}

.quote-page .form-section {
  gap: 12px;
  padding-top: 15px;
}

.quote-page .form-section textarea {
  min-height: 58px;
}

.quote-customer {
  display: grid;
  gap: 10px;
}

.quote-customer dl {
  display: grid;
  margin: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 16px;
}

.quote-customer dl div {
  min-width: 0;
}

.quote-customer dt,
.quote-customer dd {
  margin: 0;
}

.quote-customer dt {
  color: var(--color-text-muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.quote-customer dd {
  margin-top: 2px;
  font-size: 0.88rem;
  font-weight: 720;
  overflow-wrap: anywhere;
}

.quote-customer > a {
  justify-self: start;
  font-size: 0.82rem;
}

.quote-actions {
  align-items: center;
}

.quote-more-actions {
  position: relative;
}

.quote-more-actions summary {
  cursor: pointer;
  color: var(--color-text-muted);
  font-size: 0.84rem;
  font-weight: 750;
}

.quote-more-actions > div {
  display: grid;
  margin-top: 9px;
  gap: 8px;
}

@media (max-width: 980px) {
  .quote-page .quote-intro > .container {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .quote-page .quote-flow {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .quote-page .quote-flow {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .quote-page .quote-flow__step {
    grid-template-columns: 1fr;
    align-content: start;
    gap: 3px;
  }

  .quote-page .quote-flow__step span {
    white-space: normal;
  }

  .quote-customer dl {
    grid-template-columns: 1fr;
  }
}


.quote-preview {
  margin-top: 40px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: white;
  padding: clamp(22px, 5vw, 52px);
  box-shadow: var(--shadow-sm);
  color: var(--color-text);
}

.quote-preview__header {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 28px;
  border-top: 6px solid var(--color-primary);
  border-bottom: 1px solid var(--color-border);
  padding: 22px 0;
}

.quote-preview__identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 18px;
}

.quote-preview__identity img {
  width: 58px;
  height: 72px;
  flex: 0 0 auto;
  object-fit: contain;
}

.quote-preview__identity h2,
.quote-preview__identity p {
  margin: 0;
}

.quote-preview__identity h2 {
  margin: 2px 0 4px;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
}

.quote-preview__identity > div > p:last-child {
  color: var(--color-text-muted);
  font-size: 0.92rem;
}

.quote-preview__kicker {
  color: var(--color-primary);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.quote-preview__document {
  display: grid;
  min-width: 220px;
  margin: 0;
  border-left: 4px solid var(--color-primary);
  background: var(--color-surface);
  padding: 14px 18px;
  align-content: center;
  gap: 10px;
}

.quote-preview__document div {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
}

.quote-preview__document dt,
.quote-preview__document dd {
  margin: 0;
}

.quote-preview__document dt {
  color: var(--color-text-muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.quote-preview__document dd {
  font-weight: 760;
  text-align: right;
  overflow-wrap: anywhere;
}

.quote-detail {
  display: grid;
  margin: 22px 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.quote-detail article {
  min-width: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 16px;
}

.quote-detail h3 {
  margin: 0 0 10px;
  color: var(--color-primary);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.quote-detail p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.quote-table {
  width: 100%;
  margin: 24px 0;
  border-collapse: collapse;
  table-layout: fixed;
}

.quote-table th,
.quote-table td {
  border-bottom: 1px solid var(--color-border);
  padding: 13px 12px;
  text-align: left;
  vertical-align: top;
}

.quote-table th {
  border-bottom: 0;
  background: var(--color-graphite);
  color: white;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.quote-table th:first-child {
  width: 55%;
}

.quote-table th:nth-child(2) {
  width: 9%;
}

.quote-table th:nth-child(3),
.quote-table th:nth-child(4) {
  width: 18%;
}

.quote-table td:not(:first-child) {
  font-weight: 700;
  white-space: nowrap;
}

.quote-table__product > strong {
  display: block;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.quote-table__brand {
  display: block;
  margin-bottom: 4px;
  color: var(--color-primary);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.quote-table__meta {
  display: flex;
  flex-wrap: wrap;
  margin: 9px 0 0;
  gap: 5px 18px;
}

.quote-table__meta div {
  display: flex;
  gap: 5px;
}

.quote-table__meta dt,
.quote-table__meta dd {
  margin: 0;
  font-size: 0.76rem;
}

.quote-table__meta dt {
  color: var(--color-text-muted);
  font-weight: 800;
  text-transform: uppercase;
}

.quote-table__note {
  margin: 9px 0 0;
  border-left: 3px solid var(--color-border);
  padding-left: 9px;
  color: var(--color-text-muted);
  font-size: 0.78rem;
}

.quote-totals {
  display: grid;
  margin: 8px 0 0 auto;
  max-width: 500px;
  border: 1px solid var(--color-border);
  border-right: 5px solid var(--color-primary);
  background: var(--color-surface);
  padding: 16px 18px;
  grid-template-columns: minmax(0, 1fr) minmax(150px, auto);
  align-items: center;
  gap: 18px;
}

.quote-totals__label {
  display: block;
  font-weight: 800;
}

.quote-totals small {
  display: block;
  margin-top: 3px;
  color: var(--color-text-muted);
}

.quote-totals__row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.quote-totals__row + .quote-totals__row {
  margin-top: 5px;
  border-top: 1px solid var(--color-border);
  padding-top: 5px;
}

.quote-totals__row span {
  color: var(--color-text-muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.quote-price-note {
  margin: 10px 0 0;
  color: var(--color-text-muted);
  text-align: right;
}

.quote-payments {
  margin-top: 24px;
  border: 1px solid var(--color-border);
  background: linear-gradient(135deg, #f7f8f9 0%, #fff 72%);
  padding: 18px;
}

.quote-payments__header {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(260px, 1.2fr);
  align-items: end;
  gap: 24px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 12px;
}

.quote-payments__header h3,
.quote-payments__header p {
  margin: 0;
}

.quote-payments__header h3 {
  font-size: 1.15rem;
}

.quote-payments__header > p {
  color: var(--color-text-muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.quote-payments__kicker {
  color: var(--color-primary);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.quote-payment-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(240px, 0.65fr);
  gap: 12px;
}

.quote-payment-card {
  min-width: 0;
  border-left: 4px solid var(--color-primary);
  background: white;
  padding: 14px 16px;
  box-shadow: inset 0 0 0 1px var(--color-border);
}

.quote-payment-card__heading {
  display: flex;
  align-items: center;
  gap: 10px;
}

.quote-payment-card__heading > span {
  color: var(--color-primary);
  font-size: 0.72rem;
  font-weight: 900;
}

.quote-payment-card__heading h4,
.quote-payment-card__heading p {
  margin: 0;
}

.quote-payment-card__heading h4 {
  font-size: 0.92rem;
}

.quote-payment-card__heading p {
  color: var(--color-text-muted);
  font-size: 0.76rem;
}

.quote-payment-data {
  display: grid;
  margin: 14px 0 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.quote-payment-data div {
  min-width: 0;
  border-top: 1px solid var(--color-border);
  padding-top: 9px;
}

.quote-payment-data dt,
.quote-payment-data dd {
  margin: 0;
}

.quote-payment-data dt {
  color: var(--color-text-muted);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.quote-payment-data dd {
  margin-top: 3px;
  font-size: 0.82rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.quote-payment-card--qr {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: 10px;
}

.quote-payment-qr {
  display: flex;
  align-items: center;
  gap: 10px;
}

.quote-payment-qr img {
  width: 104px;
  height: auto;
  flex: 0 0 auto;
  background: white;
}

.quote-payment-qr p {
  max-width: 150px;
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.72rem;
  line-height: 1.4;
}

.quote-notes {
  margin-top: 20px;
  border-left: 4px solid var(--color-graphite);
  background: var(--color-surface);
  padding: 14px 16px;
}

.quote-notes h3,
.quote-notes p {
  margin: 0;
}

.quote-notes h3 {
  margin-bottom: 6px;
  font-size: 0.9rem;
}

.quote-disclaimer {
  margin-top: 24px;
  border: 1px solid #edc9c5;
  background: var(--color-primary-soft);
  padding: 16px 18px;
  font-size: 0.88rem;
}

.quote-disclaimer h3 {
  margin: 0 0 8px;
  font-size: 0.92rem;
}

.quote-disclaimer ul {
  display: grid;
  margin: 0;
  padding-left: 18px;
  gap: 4px;
}

.quote-brand-footer {
  margin-top: 24px;
  border-top: 1px solid var(--color-border);
  padding-top: 16px;
  text-align: center;
}

.quote-brand-footer > p {
  margin: 0 0 12px;
  color: var(--color-text-muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.quote-brand-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  align-items: center;
}

.quote-brand-logo {
  display: block;
  height: 42px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: white;
  padding: 5px;
}

.quote-brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.quote-brand-logo--crop img {
  object-fit: cover;
}

.quote-brand-footer > small {
  display: block;
  margin-top: 10px;
  color: var(--color-text-muted);
  font-size: 0.68rem;
}

@media (max-width: 720px) {
  .quote-preview__header,
  .quote-totals,
  .quote-payments__header,
  .quote-payment-grid {
    grid-template-columns: 1fr;
  }

  .quote-payment-data {
    grid-template-columns: 1fr;
  }

  .quote-preview__header {
    display: grid;
  }

  .quote-preview__document {
    min-width: 0;
  }

  .quote-brand-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .quote-table,
  .quote-table tbody,
  .quote-table tr,
  .quote-table td {
    display: block;
    width: 100%;
  }

  .quote-table {
    table-layout: auto;
  }

  .quote-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .quote-table tr {
    margin-bottom: 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
  }

  .quote-table td {
    border-bottom: 1px solid var(--color-border);
  }

  .quote-table td:last-child {
    border-bottom: 0;
  }

  .quote-table td:not(:first-child) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    white-space: normal;
  }

  .quote-table td:not(:first-child)::before {
    color: var(--color-text-muted);
    content: attr(data-label);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }
}
