.brand-mark { font-family: Bahnschrift, "Segoe UI", sans-serif; font-weight: 700; }
.startup { margin: 3rem auto; padding: 0 24px; max-width: 1260px; }
#desk { max-width: 1392px; margin: 0 auto 60px; padding: 0 clamp(14px, 3vw, 40px); }
.desk-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; padding: 30px 0 24px; }
.desk-heading h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin: 0; letter-spacing: -.035em; }
.deal-picker { max-width: 100%; }
.deal-picker label, .catalog-filters label { font-size: .8rem; color: var(--muted); margin-bottom: 4px; }
.desk-columns { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); align-items: start; gap: clamp(16px, 2vw, 32px); }
.catalog-panel, .quote-panel { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: clamp(16px, 2.2vw, 30px); }
.quote-panel { border-top: 4px solid var(--forest); }
.desk-columns h2, #preview h2 { font-size: 1.55rem; margin: 0 0 18px; }
.catalog-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.catalog-results, .quote-lines { padding: 0; margin: 0; list-style: none; }
.catalog-results { max-height: min(65vh, 820px); overflow-y: auto; overscroll-behavior-y: contain; scrollbar-gutter: stable; }
.catalog-row { padding: 14px 6px 14px 0; border-top: 1px solid var(--line); }
.catalog-row strong, .quote-line strong, .history button { overflow-wrap: anywhere; }
.catalog-row .field-help, .quote-line .field-help { margin: 4px 0; }
.row-action, .quote-heading, .line-math, .quote-total, .version-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.row-action { margin-top: 8px; }
.row-price, .quote-total strong, .line-math output { font-variant-numeric: tabular-nums; white-space: nowrap; }
.row-price { font-weight: 650; }
.catalog-row summary { cursor: pointer; color: var(--muted); font-size: .78rem; line-height: 1.5; width: fit-content; }
.catalog-row details { margin: 6px 0; }
.catalog-row details p { margin: 4px 0 0; color: var(--muted); font-size: .79rem; overflow-wrap: anywhere; }
.catalog-row .issue { color: #7b5314; }
.quote-heading { align-items: baseline; flex-wrap: wrap; }
.quote-heading h2 { margin-bottom: 8px; }
.quote-empty { padding: 26px 0; color: var(--muted); margin: 0; }
.quote-line { padding: 15px 0; border-bottom: 1px solid var(--line); }
.line-math { margin-top: 8px; flex-wrap: wrap; }
.line-math label, .manual-fields label { font-size: .8rem; margin: 0; }
.line-math input { width: 86px; margin: 0 5px; min-height: 40px; padding: 6px; }
.manual-fields { background: #faf5e9; border-radius: 6px; padding: 10px; margin: 10px 0; display: grid; gap: 8px; }
.manual-fields input { display: block; margin-top: 3px; }
.quote-total { padding: 22px 0 12px; }
.quote-total strong { font-size: clamp(1.35rem, 3vw, 1.9rem); }
.quote-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.history { border-top: 1px solid var(--line); margin-top: 25px; padding-top: 18px; }
.history h3 { margin-bottom: 8px; }
.version-row { justify-content: flex-start; }
#notice, #catalog-count { min-height: 1.3em; }
#more { margin-top: 12px; }
.local-nav { display: none; }
.local-nav a { color: var(--forest); font-weight: 600; }
#preview-meta { margin-top: 10px; }
@media (max-width: 820px) {
  .desk-columns { grid-template-columns: minmax(0, 1fr); }
  .desk-heading { align-items: stretch; flex-direction: column; gap: 10px; padding: 20px 0 12px; }
  .local-nav { display: flex; gap: 20px; padding: 4px 0 16px; }
  .catalog-results { max-height: 43vh; }
  .account { flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
  .catalog-filters { grid-template-columns: repeat(auto-fit, minmax(min(135px, 100%), 1fr)); }
  .site-header { flex-wrap: wrap; }
}
@media print {
  body:has(#preview[open]) > :not(#preview) { display: none !important; }
  #preview[open] { position: static; width: 100%; max-width: none; max-height: none; border: 0; overflow: visible; margin: 0; }
  #preview::backdrop, #preview .dialog-actions { display: none; }
  #preview .quote-line { break-inside: avoid; }
}
@media (max-width: 460px) {
  .catalog-filters { grid-template-columns: minmax(0, 1fr); }
  .row-action { flex-wrap: wrap; }
  .row-price { white-space: normal; }
}
