/* SubMac — Free quotation generator (/quotation-generator).
   Loaded after ui.css. The journey is the site's iOS language with motion tied
   to real state: the progress bar fills as steps are completed, and a step
   fades in only when it is actually shown. The document stays paper. */

/* ===== journey ===== */
.q-main { padding-bottom: clamp(48px, 6vw, 88px); }
.q-main .crumbs { margin: clamp(18px, 4vw, 38px) 0 0; }
.q-main .display { margin: 0.35rem 0 0; }
.q-main .lede { margin: 0.75rem 0 1.75rem; }

.q-journey { padding: 1.25rem 1.4rem; background: var(--ios-surface-bg); border: 1px solid transparent; border-radius: var(--r-lg); box-shadow: var(--ios-ring), var(--ios-shadow); }
.q-journey-head { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.8125rem; font-weight: 600; color: var(--ios-label-2); }
.q-track { height: 4px; margin: 0.75rem 0 1.25rem; border-radius: 999px; background: var(--ios-fill); overflow: hidden; }
.q-track-fill { width: 0; height: 100%; border-radius: 999px; background: var(--ios-tint); transition: width var(--ios-dur-2) var(--ios-ease-out); }
.q-steps { display: flex; flex-wrap: wrap; gap: 0.35rem 1.25rem; margin: 0; padding: 0; list-style: none; }
.q-steps button { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0; border: 0; background: transparent; font: 600 0.875rem/1 var(--ios-font); color: var(--ios-label-3); cursor: pointer; }
.q-steps button:hover { color: var(--ios-label); }
.q-dot { position: relative; width: 1.6rem; height: 1.6rem; flex: none; display: grid; place-items: center; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--ios-edge); color: var(--ios-label-3); font-size: 0.75rem; font-weight: 700; }
.q-check { position: absolute; width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.q-steps li.is-done .q-n { opacity: 0; }
.q-steps li.is-done .q-check { opacity: 1; }
.q-steps li.is-done .q-dot { background: var(--ios-tint); color: #fff; box-shadow: none; }
.q-steps li.is-active .q-dot { background: var(--ios-label); color: var(--ios-card); box-shadow: inset 0 1px 0 var(--ios-gloss-soft); }
.q-steps li.is-active button { color: var(--ios-label); }

/* ===== layout and editor ===== */
.q-layout { display: grid; gap: clamp(1.25rem, 3vw, 2.5rem); grid-template-columns: minmax(0, 1fr); align-items: start; margin-top: 1.75rem; }
.q-preview-col { min-width: 0; }
@media (min-width: 940px) { .q-layout { grid-template-columns: minmax(0, 1fr) minmax(360px, 0.92fr); } .q-preview-col { position: sticky; top: 84px; } }
.q-editor { display: grid; gap: 1rem; }
.q-step { display: grid; gap: 0.9rem; padding: clamp(1.1rem, 1rem + 1vw, 1.6rem); background: var(--ios-surface-bg); border: 1px solid transparent; border-radius: var(--r-lg); box-shadow: var(--ios-ring), var(--ios-shadow); }
.q-step[hidden] { display: none; }
.q-step.is-active { animation: qIn var(--ios-dur-2) var(--ios-ease-out) both; }
@keyframes qIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.q-step > h2 { margin: 0; }
.q-field { display: grid; gap: 0.35rem; min-width: 0; }
.q-field > span { font-size: 0.8125rem; font-weight: 600; color: var(--ios-label-2); }
.q-optional { font-weight: 500; color: var(--ios-label-3); }
.q-field input, .q-field select, .q-field textarea { width: 100%; min-height: 46px; padding: 10px 12px; }
.q-field textarea { min-height: 64px; resize: vertical; }
.q-two { display: grid; gap: 0.75rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 520px) { .q-two { grid-template-columns: 1fr; } }
.q-color { display: inline-flex; }
.q-field .q-color input[type="color"] { width: 46px; height: 46px; padding: 3px; border: 0; border-radius: var(--r); background: var(--ios-fill); box-shadow: var(--ios-field); cursor: pointer; }
.q-field .q-color input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.q-field .q-color input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 5px; }
.q-field .q-color input[type="color"]::-moz-color-swatch { border: 0; border-radius: 5px; }
.q-logo-row { display: flex; align-items: center; gap: 0.9rem; }
.q-logo-thumb { width: 64px; height: 64px; flex: none; display: grid; place-items: center; overflow: hidden; border-radius: var(--r); background: var(--ios-fill); box-shadow: var(--ios-field); color: var(--ios-label-3); }
.q-logo-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.q-logo-thumb svg { width: 22px; height: 22px; }
.q-logo-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.q-items { display: grid; gap: 0.75rem; }
.q-item { display: grid; gap: 0.5rem; padding: 0.75rem; border-radius: var(--r); background: var(--ios-fill); }
.q-item-row { display: grid; grid-template-columns: 1fr 1fr 1.1fr auto; gap: 0.5rem; align-items: end; }
@media (max-width: 560px) { .q-item-row { grid-template-columns: 1fr 1fr; } }
.q-mini { display: grid; gap: 0.25rem; }
.q-mini > span { font-size: 0.75rem; font-weight: 600; color: var(--ios-label-2); }
.q-mini input, .q-mini output { width: 100%; min-height: 42px; padding: 8px 10px; }
.q-mini output { display: flex; align-items: center; padding: 0 4px; font-variant-numeric: tabular-nums; font-weight: 600; }
.q-i-del { width: 42px; height: 42px; display: grid; place-items: center; border: 0; border-radius: var(--r); background: var(--ios-fill-2); color: var(--ios-label-2); cursor: pointer; }
.q-i-del:hover { color: var(--red-ink); }
.q-i-del svg { width: 18px; height: 18px; }
.q-add { display: inline-flex; align-items: center; gap: 0.5rem; justify-self: start; border: 0; border-radius: 10px; background: var(--ios-fill); color: var(--ios-label); font: 600 0.9375rem/1 var(--ios-font); padding: 11px 15px; cursor: pointer; }
.q-add:hover { background: var(--ios-fill-2); }
.q-check { display: flex; align-items: center; gap: 0.625rem; font-weight: 600; cursor: pointer; }
.q-check input { width: 20px; height: 20px; accent-color: var(--ios-tint); }
.q-extra { display: grid; gap: 0.75rem; }
.q-nav { display: flex; justify-content: space-between; gap: 0.75rem; }
.q-nav .btn { border-radius: 10px; }
.q-saved { margin: 0; min-height: 1.2em; color: var(--ios-label-2); font-size: 0.875rem; }
.q-clear { justify-self: start; padding: 6px 0; border: 0; background: transparent; color: var(--ios-label-2); font: 600 0.875rem/1 var(--ios-font); text-decoration: underline; cursor: pointer; }
.q-clear:hover { color: var(--red-ink); }

/* ===== preview ===== */
.q-preview-head { margin-bottom: 0.6rem; }
.q-preview-label { font-size: 0.8125rem; font-weight: 600; color: var(--ios-label-2); }
.q-tpl { display: flex; flex-wrap: wrap; gap: 3px; padding: 3px; border-radius: 10px; background: var(--ios-fill); }
.q-tpl-btn { border: 0; border-radius: 6px; background: transparent; color: var(--ios-label-2); font: 600 0.875rem/1 var(--ios-font); padding: 8px 12px; cursor: pointer; }
.q-tpl-btn[aria-pressed="true"] { background: var(--ios-card); color: var(--ios-label); box-shadow: var(--ios-shadow); }
.q-tpl-note { margin: 0.6rem 0; color: var(--ios-label-2); font-size: 0.8125rem; }
.q-preview-frame { position: relative; max-width: 100%; overflow: hidden; border-radius: var(--r-lg); background: var(--ios-fill); box-shadow: var(--ios-ring); }
.q-scale { position: relative; transform-origin: top left; }
.q-actions { display: flex; flex-wrap: wrap; gap: 0.625rem; margin-top: 0.875rem; }
.q-actions .btn { flex: 1 1 auto; border-radius: 10px; }
.q-privacy { margin: 0.75rem 0 0; color: var(--ios-label-2); font-size: 0.8125rem; }
.q-pdfhost { position: fixed; left: -100000px; top: 0; background: #fff; }
.q-toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 200; padding: 11px 16px; border-radius: 12px; background: var(--ios-action); color: var(--ios-action-ink); font: 600 0.9rem/1.2 var(--ios-font); box-shadow: 0 10px 30px -18px rgba(0,0,0,.5); max-width: calc(100vw - 32px); }

/* ===== the paper document ===== */
.q-sheet { width: 794px; min-height: 1123px; box-sizing: border-box; padding: 52px 56px; background: #fff; color: #1a1a1a; font-family: var(--ios-font); font-size: 13px; line-height: 1.5; --acc: #34618f; --acc-ink: #fff; }
.q-sheet.q-ink-on-light { --acc-ink: #1a1a1a; }
.q-sheet * { box-sizing: border-box; }
.q-sheet.q-page-a4 { width: 794px; min-height: 1123px; }
.q-sheet.q-page-a4l { width: 1123px; min-height: 794px; }
.q-sheet.q-page-letter { width: 816px; min-height: 1056px; }
.q-sheet.q-page-letterl { width: 1056px; min-height: 816px; }
.q-sheet.q-page-a5 { width: 559px; min-height: 794px; }
.q-sheet.q-page-a5l { width: 794px; min-height: 559px; }
.q-sheet.q-page-a5, .q-sheet.q-page-a5l { font-size: 12px; }

.q-mark { width: 54px; height: 54px; flex: none; display: grid; place-items: center; overflow: hidden; border-radius: 13px; background: var(--acc); color: var(--acc-ink); font-weight: 800; font-size: 21px; }
.q-mark-img { background: transparent; border-radius: 8px; }
.q-mark-img img { width: 54px; height: 54px; object-fit: contain; }
.q-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 26px; }
.q-from { display: flex; align-items: center; gap: 14px; min-width: 0; }
.q-biz-name { font-size: 17px; font-weight: 800; letter-spacing: -0.01em; }
.q-biz-meta { color: #5b5b60; font-size: 12px; white-space: pre-line; margin-top: 3px; }
.q-doc { text-align: right; flex: none; }
.q-doc-title { font-size: 27px; font-weight: 800; letter-spacing: -0.02em; }
.q-metas { display: grid; gap: 3px; margin-top: 6px; }
.q-meta { display: flex; gap: 12px; justify-content: flex-end; font-size: 12px; }
.q-meta span { color: #6b6b70; }
.q-meta b { font-weight: 600; }
.q-billto { margin-top: 28px; }
.q-lbl { margin-bottom: 5px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: #8a8a90; }
.q-cust-name { font-weight: 700; font-size: 13.5px; }
.q-cust-meta { color: #5b5b60; font-size: 12px; white-space: pre-line; margin-top: 3px; }
.q-desc { margin-top: 22px; color: #5b5b60; font-size: 12px; white-space: pre-line; }
.q-items { width: 100%; border-collapse: collapse; margin-top: 22px; }
.q-items th { padding: 10px 9px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: #6b6b70; text-align: left; border-bottom: 1.5px solid #1a1a1a; }
.q-items th.r { text-align: right; }
.q-items td { padding: 11px 9px; vertical-align: top; border-bottom: 1px solid #eeeef1; }
.q-items tbody tr:last-child td { border-bottom: 1px solid #e3e3e6; }
.q-items .r { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.q-empty { color: #9a9a9f; font-style: italic; }
.q-totals { width: min(300px, 100%); margin: 18px 0 0 auto; }
.q-row { display: flex; justify-content: space-between; gap: 18px; padding: 6px 0; }
.q-row span { color: #5b5b60; }
.q-row b { font-variant-numeric: tabular-nums; }
.q-row-grand { margin-top: 6px; padding-top: 12px; border-top: 1.5px solid #1a1a1a; }
.q-row-grand span { color: #1a1a1a; font-size: 12px; font-weight: 700; text-transform: uppercase; }
.q-row-grand b { font-size: 19px; font-weight: 800; color: var(--acc); }
.q-notes { margin-top: 26px; padding-top: 14px; border-top: 1px solid #eeeef1; color: #5b5b60; font-size: 12px; white-space: pre-line; }
.q-sigs { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 46px; }
.q-sig > div { border-top: 1px solid #1a1a1a; padding-top: 8px; }
.q-sig span { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #6b6b70; }
.q-sig b { display: block; margin-top: 20px; font-size: 12px; }
.q-ph { color: #b9b9be; }

/* six compositions */
.q-t-band { padding-top: 0; }
.q-t-band .q-top { margin: 0 -56px 30px; padding: 40px 56px; background: var(--acc); color: var(--acc-ink); align-items: center; }
.q-t-band .q-mark { background: var(--acc-ink); color: var(--acc); }
.q-t-band .q-mark-img { background: rgba(255,255,255,.16); }
.q-t-band .q-biz-name, .q-t-band .q-doc-title, .q-t-band .q-meta b, .q-t-band .q-meta span, .q-t-band .q-biz-meta { color: var(--acc-ink); }
.q-t-band .q-meta span, .q-t-band .q-biz-meta { opacity: .8; }
.q-t-band .q-items th { background: var(--acc); color: var(--acc-ink); border-bottom: 0; border-radius: 8px 8px 0 0; }
.q-t-band .q-totals { background: #f5f5f7; border-radius: 12px; padding: 16px 20px; }

.q-t-rail { display: flex; padding: 0; }
.q-t-rail .q-rail { flex: 0 0 230px; align-self: stretch; display: flex; flex-direction: column; gap: 24px; padding: 52px 32px; background: var(--acc); color: var(--acc-ink); }
.q-t-rail .q-rail .q-mark { background: var(--acc-ink); color: var(--acc); }
.q-t-rail .q-rail .q-biz-name, .q-t-rail .q-rail .q-doc-title, .q-t-rail .q-rail .q-meta b { color: var(--acc-ink); }
.q-t-rail .q-rail .q-meta span, .q-t-rail .q-rail .q-biz-meta { color: var(--acc-ink); opacity: .8; }
.q-t-rail .q-rail .q-meta { justify-content: flex-start; }
.q-t-rail .q-rail-meta { margin-top: auto; }
.q-t-rail .q-body { flex: 1; min-width: 0; padding: 52px 46px; }
.q-t-rail .q-items th { background: var(--acc); color: var(--acc-ink); border-bottom: 0; }

.q-t-wordmark .q-top { align-items: flex-end; padding-bottom: 24px; border-bottom: 7px solid var(--acc); }
.q-t-wordmark .q-doc-title { font-size: 56px; font-weight: 900; line-height: .86; text-transform: uppercase; letter-spacing: -0.04em; }
.q-t-wordmark .q-items th { background: #14141a; color: #fff; border-bottom: 0; }
.q-t-wordmark .q-row-grand { border-top: 3px solid #14141a; }

.q-t-ledger { font-size: 12.5px; }
.q-t-ledger .q-mark { border-radius: 8px; background: #141414; color: #fff; }
.q-t-ledger .q-top { padding-bottom: 14px; border-bottom: 1px solid #141414; }
.q-t-ledger .q-doc-title { font-size: 17px; letter-spacing: 0.18em; text-transform: uppercase; }
.q-t-ledger .q-meta b, .q-t-ledger .q-row b, .q-t-ledger .q-items .r { font-family: var(--ios-mono); }
.q-t-ledger .q-items th { background: #f5f5f7; border-top: 1px solid #141414; border-bottom: 1px solid #141414; letter-spacing: .1em; }
.q-t-ledger .q-items td { border-bottom: 1px dotted #c9c9cf; }
.q-t-ledger .q-row-grand { border-top: 2px solid #141414; }

.q-t-soft { padding: 40px; }
.q-t-soft .q-mark { border-radius: 16px; }
.q-t-soft .q-top { padding: 26px 28px; border-radius: 20px; background: #f4f5f7; }
.q-t-soft .q-billto { margin-top: 18px; padding: 20px 24px; border-radius: 20px; background: #f4f5f7; }
.q-t-soft .q-items th { background: var(--acc); color: var(--acc-ink); border-bottom: 0; text-transform: none; letter-spacing: 0; }
.q-t-soft .q-items th:first-child { border-radius: 10px 0 0 10px; }
.q-t-soft .q-items th:last-child { border-radius: 0 10px 10px 0; }
.q-t-soft .q-totals { padding: 18px 22px; border-radius: 20px; background: #f4f5f7; }

.q-t-frame { display: flex; padding: 30px; }
.q-t-frame .q-frame-box { flex: 1; border: 1.5px solid #1a1a1a; padding: 44px 48px; }
.q-t-frame .q-mark { border-radius: 0; background: var(--acc); color: var(--acc-ink); }
.q-t-frame .q-doc-title { color: var(--acc); }

@media print {
  body * { visibility: hidden !important; }
  .q-preview-frame, .q-preview-frame * { visibility: visible !important; }
  .q-preview-frame { position: absolute; inset: 0; overflow: visible; background: #fff; box-shadow: none; border-radius: 0; }
  .q-scale { transform: none !important; margin: 0 !important; }
}
