.quote-page main { padding: clamp(100px, 9vw, 156px) var(--gutter) var(--section-space); }
.quote-heading { padding-bottom: clamp(32px, 5vw, 80px); }
.return-link, .line-action {
  display: inline-flex; align-items: center; min-height: 44px;
  font: inherit; font-size: 14px; padding: 0;
  text-decoration: underline; text-underline-offset: .3em;
  text-decoration-thickness: 1px; text-decoration-color: var(--line);
  transition: text-decoration-color var(--feedback-time) ease;
}
.return-link:hover, .line-action:is(:hover,:focus-visible) { text-decoration-color: currentColor; }
.quote-heading h1 { margin-top: clamp(22px, 3vw, 48px); font-size: clamp(58px, 7.8vw, 150px); line-height: .97; }
.quote-heading h1 span, #receipt-title span { color: #788479; }
.quote-heading > p { margin-top: 20px; font-size: clamp(17px, 1.4vw, 24px); max-width: 44ch; }
.quote-workspace { display: grid; grid-template-columns: minmax(0,.77fr) minmax(0,1.23fr); column-gap: clamp(42px, 8vw, 150px); }
.quote-workspace > *, #receipt { min-width: 0; border-top: 1px solid var(--ink); padding-top: 22px; }
.quote-page :is(.quote-workspace h2, legend, #receipt h2) { font-size: clamp(30px, 3.2vw, 58px); letter-spacing: -.055em; line-height: 1.05; font-weight: 500; }
.quote-page .schedule h3, #receipt h3 { font-size: clamp(21px, 1.9vw, 34px); font-weight: 500; line-height: 1.15; letter-spacing: -.035em; }
.quote-page :is(fieldset,legend) { padding: 0; min-width: 0; margin: 0; border: 0; }
.quote-page fieldset + fieldset { margin-top: clamp(35px, 4vw, 66px); }
.quote-page #contact { scroll-margin-top: 90px; }
.quote-page .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 18px; margin-top: 18px; }
.quote-page .full { grid-column: 1/-1; }
.quote-page label { display: block; font-size: 14px; line-height: 1.45; font-weight: 500; }
.quote-page :is(input, select, textarea) { display: block; width: 100%; min-width: 0; min-height: 46px; padding: 10px 11px; margin-top: 6px; background: #f8f7f2; color: var(--ink); font: inherit; font-size: 16px; font-weight: 400; border: 1px solid #9b9f94; border-radius: 0; }
.quote-page textarea { resize: vertical; }
.quote-page input[type=file] { padding: 9px; }
.quote-page input::file-selector-button { font: inherit; background: var(--ink); color: var(--paper); border: 0; padding: 6px 12px; margin-right: 12px; }
.quote-page .field-help, .status { font-size: 14px; color: #4b584e; margin-top: 8px; }
.quote-page .status:empty { display: none; }
#file-status { overflow-wrap: anywhere; }
.quote-page .finish { margin-top: 30px; padding-top: 16px; border-top: 1px solid var(--line); }
.quote-page .finish p, .schedule-empty { max-width: 42ch; margin-block: 8px 14px; }
.quote-page .finish button { min-height: 46px; padding: 12px 19px; background: var(--ink); color: var(--paper); }
.quote-page .finish button:disabled { opacity: .65; }
.schedule-row { padding: 22px 0 12px; border-bottom: 1px solid var(--line); }
.schedule-row > p { margin-top: 8px; }
.schedule-row details > summary { display: list-item; cursor: pointer; font-size: 14px; padding-block: 10px; min-height: 44px; }
.schedule-row details { margin-top: 2px; }
.schedule-row .item-fields { margin-top: 12px; }
.schedule-actions { display: flex; gap: 18px; flex-wrap: wrap; }
.quote-page dl { margin: 0; }
.quote-page dl > div { display: grid; grid-template-columns: minmax(6rem,.8fr) minmax(0,1.3fr); gap: 1rem; font-size: 14px; line-height: 1.45; padding-block: 7px; border-top: 1px solid var(--line); }
.quote-page dt { color: #4b584e; }
.quote-page dd { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.add-systems { margin-block: 12px; }
.add-systems summary { display: flex; align-items: center; gap: .6rem; min-height: 44px; width: fit-content; cursor: pointer; }
.add-systems summary::-webkit-details-marker { display: none; }
.add-systems summary::before { content: "+"; font-size: 1.2em; }
.add-systems[open] summary::before { content: "−"; }
.add-systems nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(10rem, 100%), 1fr)); gap: 0 1rem; }
.add-systems nav a { border-top: 1px solid var(--line); }
#undo-area p { margin: 0; font-size: 14px; }
#undo-area button { margin-left: 8px; }
#receipt { max-width: 780px; }
#receipt > p { margin-block: 14px 30px; }
#receipt h3 { margin-bottom: 16px; }
#receipt .line-action { margin-right: 18px; }
#record section { margin-block: 20px 26px; }
.quote-page [hidden] { display: none !important; }
@media (max-width: 740px) {
  .quote-page main { padding-top: 75px; }
  .quote-workspace { display: block; }
  #quote-form { margin-top: 40px; }
  .quote-page .form-grid { grid-template-columns: minmax(0,1fr); gap: 14px; }
  .quote-heading h1 { font-size: clamp(52px, 10.5vw, 80px); }
}

.schedule-row .schedule-reference { font-size: 14px; color: #4b584e; }
#discard-draft { margin-top: 16px; }
#discard-draft summary { width: fit-content; min-height: 44px; padding-block: 12px; font-size: 14px; cursor: pointer; }
#discard-draft p { font-size: 14px; }
#discard-draft button + button { margin-left: 16px; }

.selection-heading { display: flex; align-items: center; gap: clamp(12px, 1.4vw, 22px); }
.selection-heading > div { min-width: 0; overflow-wrap: anywhere; }
.selection-heading .schedule-reference { margin: 6px 0 0; line-height: 1.45; }
.image-trigger { flex: 0 0 clamp(92px, 10vw, 150px); padding: 0; position: relative; cursor: zoom-in; }
.selection-image { display: block; width: 100%; height: auto; aspect-ratio: 3/2; object-fit: contain; background: white; }
.image-trigger::after { content: "+"; position: absolute; bottom: 3px; right: 7px; color: #405249; font-size: 15px; }
.receipt-item { display: flex; align-items: center; gap: 1rem; cursor: pointer; }
.receipt-item::-webkit-details-marker { display: none; }
.receipt-item .selection-image { width: clamp(82px, 9vw, 118px); flex: none; }
.receipt-item > span { flex: 1; overflow-wrap: anywhere; }
.receipt-item::after { content: "+"; }
details[open] > .receipt-item::after { content: "−"; }
#record .schedule-row[open] dl { margin-top: 14px; }
#product-image-dialog { background: var(--paper); color: var(--ink); border: 0; margin: auto; padding: clamp(12px, 2vw, 24px); width: min(950px, 95vw); max-height: 92svh; }
#product-image-dialog::backdrop { background: rgb(12 20 18 / 76%); }
#product-image-dialog header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 8px; }
#product-image-dialog h2 { font-size: clamp(20px, 3vw, 32px); line-height: 1.1; }
#product-image-dialog img { width: 100%; max-height: 64svh; display: block; object-fit: contain; background: white; }
#product-image-dialog p { margin-top: 10px; font-size: 15px; }
#product-image-dialog p:empty { display: none; }
