.qt-screen {
  --qt-ink: var(--ink, #172e30);
  --qt-muted: var(--muted, #536764);
  --qt-line: var(--line, #dde2da);
  --qt-paper: #fff;
  color: var(--qt-ink);
  width: 100%;
}
.qt-screen *, .qt-screen *::before, .qt-screen *::after { box-sizing: border-box; }
.qt-page-head { display: flex; gap: 14px; justify-content: space-between; align-items: center; margin: 0 0 24px; }
.qt-page-head h1, .qt-doc-head h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); letter-spacing: -.055em; line-height: 1.04; margin: 7px 0 0; color: var(--qt-ink); }
.qt-kicker, .qt-doc-meta > span:first-child { font-size: .77rem; letter-spacing: .095em; font-weight: 680; text-transform: uppercase; color: var(--qt-muted); }
.qt-status { display: inline-flex; align-items: center; justify-content: center; flex: none; padding: 6px 12px; border-radius: 99px; color: #3f5554; background: #e8eeea; font-size: .86rem; font-weight: 650; line-height: 1.25; }
.qt-status.is-apricot { color: #714124; background: #fff0dc; }
.qt-status.is-green { color: #205748; background: #dceee4; }
.qt-layout { display: grid; grid-template-columns: minmax(270px, 1.7fr) minmax(240px, 1fr); gap: 20px; align-items: start; }
.qt-stack, .qt-customer-side { display: grid; gap: 18px; min-width: 0; }
.qt-panel, .qt-document { min-width: 0; border: 1px solid var(--qt-line); background: var(--qt-paper); border-radius: 18px; }
.qt-panel { padding: clamp(18px, 2.5vw, 28px); }
.qt-section-head { margin: 0 0 18px; }
.qt-screen h2 { font-size: clamp(1.15rem, 2vw, 1.4rem); line-height: 1.2; font-weight: 690; letter-spacing: -.032em; margin: 0; }
.qt-screen .qt-job-title { font-size: clamp(1.55rem, 2.6vw, 2rem); line-height: 1.14; margin: 10px 0 20px; overflow-wrap: anywhere; }
.qt-section-head p, .qt-footnote { color: var(--qt-muted); line-height: 1.5; }
.qt-section-head p { font-size: .94rem; margin: 7px 0 0; }
.qt-footnote { font-size: .84rem; margin: 14px 0 0; }
.qt-fields { display: grid; gap: 16px; }
.qt-fields label, .qt-clause-label { display: grid; gap: 6px; color: var(--qt-ink); font-size: .88rem; line-height: 1.4; font-weight: 620; }
.qt-screen input:not([type="checkbox"]), .qt-screen textarea {
  background: #fbfcf9; color: var(--qt-ink); border: 1px solid #bccbc3; border-radius: 9px;
  width: 100%; min-width: 0; padding: 11px 12px; line-height: 1.35;
  font: inherit; font-size: 1rem; font-weight: 460; min-height: 45px;
}
.qt-screen input:not([type="checkbox"]):focus, .qt-screen textarea:focus { border-color: #48766b; outline: 2px solid #9dbbb0; outline-offset: 1px; background: #fff; }
.qt-screen textarea { resize: vertical; line-height: 1.5; }
.qt-fields label.qt-check { display: flex; align-items: center; min-height: 43px; gap: 10px; cursor: pointer; margin: -5px 0; }
.qt-screen input[type="checkbox"] { margin: 0; width: 19px; height: 19px; flex-shrink: 0; accent-color: #285c50; }
.qt-screen :is(summary,button,input[type="checkbox"]):focus-visible { outline: 3px solid #688c80; outline-offset: 3px; }
.qt-scope-panel { padding-bottom: 4px; }
.qt-scope-list { margin: 0 -4px; }
.qt-scope-editor { display: grid; grid-template-columns: 38px minmax(0,1fr); border-top: 1px solid var(--qt-line); align-items: start; }
.qt-inclusion { min-height: 55px; display: flex; align-items: center; justify-content: flex-start; padding-left: 3px; cursor: pointer; }
.qt-screen summary { list-style: none; cursor: pointer; }
.qt-screen summary::-webkit-details-marker { display: none; }
.qt-scope-editor summary, .qt-scope-display summary, .qt-request summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; }
.qt-scope-editor summary { padding: 13px 2px 13px 0; }
.qt-scope-editor summary > span:first-child { min-width: 0; }
.qt-scope-editor summary strong, .qt-scope-display strong { display: block; color: var(--qt-ink); font-size: 1rem; font-weight: 650; line-height: 1.4; }
.qt-scope-editor summary small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; margin-top: 2px; font-size: .875rem; line-height: 1.45; color: var(--qt-muted); }
.qt-scope-editor details[open] summary small { display: none; }
.qt-scope-editor:has(input:not(:checked)) summary strong { color: var(--qt-muted); font-weight: 540; }
.qt-clause-label { margin: 0 0 16px; }
.qt-chevron { display: block; flex: 0 0 auto; width: 8px; height: 8px; border-bottom: 1.75px solid currentColor; border-right: 1.75px solid currentColor; transform: rotate(45deg); margin: -4px 4px 0 auto; }
.qt-screen details[open] > summary .qt-chevron { transform: rotate(225deg); margin-top: 4px; }
.qt-side { position: sticky; top: 20px; min-width: 0; }
.qt-amounts { margin-top: 18px; border-top: 1px solid var(--qt-line); padding-top: 10px; }
.qt-amount-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 0; padding: 5px 0; font-size: .92rem; line-height: 1.45; }
.qt-amount-row > span { color: var(--qt-muted); }
.qt-amount-row strong { color: var(--qt-ink); white-space: nowrap; font-weight: 620; font-variant-numeric: tabular-nums; }
.qt-amount-row.qt-total { padding: 12px 0 6px; border-top: 1px solid var(--qt-line); margin-top: 6px; }
.qt-total > span { font-weight: 650; color: var(--qt-ink); }
.qt-total strong { font-size: clamp(1.35rem,2.2vw,1.85rem); letter-spacing: -.05em; line-height: 1; }
.qt-actions { display: grid; gap: 8px; margin-top: 20px; }
.qt-screen .btn { min-height: 45px; justify-content: center; }
.qt-link-button { min-height: 44px; border: 0; background: transparent; padding: 0; text-decoration: underline; text-underline-offset: 3px; font: inherit; font-size: .9rem; color: #315b52; cursor: pointer; }
.qt-link-button + .qt-footnote { margin-top: 0; }
.qt-notice, .qt-receipt { border: 1px solid #b6d2c4; background: #ebf3eb; border-radius: 12px; padding: 14px 17px; }
.qt-notice { margin-bottom: 18px; }
.qt-notice p, .qt-receipt span { margin: 5px 0 0; font-size: .93rem; line-height: 1.5; display: block; white-space: pre-wrap; overflow-wrap: anywhere; }
.qt-receipt { margin: 20px 0 0; }
.qt-customer { max-width: 1240px; margin-inline: auto; display: grid; grid-template-columns: minmax(0,1.55fr) minmax(270px, 1fr); align-items: start; gap: 22px; }
.qt-document { overflow: hidden; border-top: 5px solid #214c43; }
.qt-letterhead, .qt-doc-head, .qt-doc-body { padding-inline: clamp(20px, 3vw, 36px); }
.qt-letterhead { padding-top: 18px; padding-bottom: 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--qt-line); font-size: .84rem; }
.qt-letterhead .primo-logo { width: clamp(164px, 21vw, 198px); }
.qt-letterhead > span { color: var(--qt-muted); font-weight: 580; font-variant-numeric: tabular-nums; }
.qt-doc-head { padding-block: 25px 22px; background: #f7f9f3; }
.qt-doc-head h1 { font-size: clamp(1.95rem,4vw,3rem); margin: 12px 0 20px; overflow-wrap: anywhere; }
.qt-doc-meta { display: flex; align-items: center; gap: 8px; justify-content: space-between; flex-wrap: wrap; }
.qt-parties { display: flex; gap: 15px 28px; flex-wrap: wrap; }
.qt-parties > div { display: grid; gap: 5px; min-width: 0; }
.qt-parties small, .qt-mobile-summary small { font-size: .8rem; color: var(--qt-muted); }
.qt-parties strong { font-size: .98rem; font-weight: 580; line-height: 1.4; overflow-wrap: anywhere; }
.qt-mobile-summary, .qt-sent-quick { display: none; }
.qt-doc-body { padding-block: 27px 15px; }
.qt-doc-body h2 { margin-bottom: 17px; }
.qt-scope-display { border-top: 1px solid var(--qt-line); }
.qt-scope-display summary { align-items: center; }
.qt-prose { white-space: pre-line; overflow-wrap: anywhere; line-height: 1.63; font-size: .98rem; margin: -1px 0 18px; color: #374d49; }
.qt-print-scope { display: none; }
.qt-customer-side .qt-amounts, .qt-side .qt-section-head + .qt-amounts { margin: 0; }
.qt-reply { border-top: 3px solid #9bb5a4; }
.qt-reply > h2 { margin: 7px 0 16px; }
.qt-request { border-top: 1px solid var(--qt-line); margin-top: 18px; }
.qt-request summary { font-size: .94rem; font-weight: 620; color: #315b52; }
.qt-request form { gap: 10px; }
.qt-details { display: grid; grid-template-columns: auto 1fr; gap: 9px 15px; line-height: 1.45; font-size: .93rem; }
.qt-details dt { color: var(--qt-muted); }
.qt-details dd { margin: 0; font-weight: 600; text-align: right; overflow-wrap: anywhere; }
#quote-response { scroll-margin-top: 22px; }

@media (max-width: 980px) {
  .qt-layout { grid-template-columns: minmax(0,1.4fr) minmax(225px,1fr); gap: 15px; }
  .qt-customer { gap: 16px; }
}
@media (max-width: 760px) {
  .qt-layout, .qt-customer { grid-template-columns: minmax(0,1fr); }
  .qt-side { position: static; }
  .qt-sent-quick { display: grid; margin: -2px 0 16px; }
  .qt-sent-actions > button:first-child { display: none; }
  .qt-sent-actions:has(> button:only-child) { display: none; }
  .qt-sent-layout > .qt-stack, .qt-customer.qt-responded .qt-customer-side { display: contents; }
  .qt-sent-layout > .qt-stack > .qt-panel:first-child { grid-row: 1; }
  .qt-sent-layout > .qt-side { grid-row: 2; }
  .qt-sent-layout > .qt-stack > .qt-panel + .qt-panel { grid-row: 3; }
  .qt-customer.qt-responded #quote-response { grid-row: 1; }
  .qt-customer.qt-responded > .qt-document { grid-row: 2; }
  .qt-page-head { margin: 3px 0 19px; }
  .qt-panel, .qt-document { border-radius: 15px; }
  .qt-page-head h1 { font-size: 2.1rem; }
  .qt-fields { gap: 14px; }
  .qt-stack, .qt-customer-side { gap: 14px; }
  .qt-mobile-summary { margin-top: 17px; padding-top: 16px; border-top: 1px solid var(--qt-line); display: flex; align-items: center; flex-wrap: wrap; gap: 10px 18px; justify-content: space-between; }
  .qt-mobile-summary > div { display: grid; gap: 3px; }
  .qt-mobile-summary strong { font-size: 1.65rem; letter-spacing: -.05em; }
  .qt-mobile-summary .btn { font-size: .85rem; }
  .qt-doc-meta > span:first-child { font-size: .68rem; }
  .qt-doc-head h1 { font-size: 2rem; line-height: 1.07; }
  .qt-letterhead, .qt-doc-head, .qt-doc-body { padding-inline: 18px; }
}
@media print {
  .qt-screen { max-width: none; color: #172e30; }
  .qt-customer, .qt-layout, .qt-customer-side { display: block; }
  .qt-page-head, .qt-sent-quick, .qt-noprint, .qt-actions, .qt-mobile-summary, .qt-screen button, .qt-chevron { display: none !important; }
  .qt-document, .qt-panel, .qt-doc-head { border: 0; background: #fff; padding: 0; box-shadow: none; border-radius: 0; }
  .qt-letterhead, .qt-doc-head, .qt-doc-body { padding-left: 0; padding-right: 0; }
  .qt-scope-display details { display: none; }
  .qt-scope-display .qt-print-scope { display: block; }
  .qt-doc-head, .qt-estimate, .qt-accepted { break-inside: avoid; }
  .qt-screen h1, .qt-screen h2, .qt-print-scope h3 { break-after: avoid; }
  .qt-print-scope h3 { font-size: 11pt; margin: 11pt 0 4pt; }
  .qt-prose, .qt-amount-row, .qt-details { font-size: 10pt; }
  .qt-customer-side { margin-top: 18pt; }
  .qt-document { overflow: visible; }
}
