:root {
  color-scheme: light;
  --ink: #0f131f;
  --muted: #5d6678;
  --line: #d9dee7;
  --line-strong: #c4ccd8;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --base: #eef2f6;
  --teal: #04c5fe;
  --teal-dark: #00a9dc;
  --teal-soft: #e8f9fe;
  --amber: #a15c00;
  --amber-soft: #fff5db;
  --red: #b42318;
  --red-soft: #fff0ee;
  --green: #137a48;
  --shadow: 0 10px 30px rgba(15, 19, 31, 0.07);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }

body {
  margin: 0;
  min-width: 320px;
  overflow: hidden;
  background: var(--base);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  letter-spacing: 0;
}

button, input, select { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
h1, h2, p { margin: 0; }

.app-header {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 8px clamp(18px, 2.5vw, 38px);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.brand-block { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark { width: 96px; height: 44px; flex: 0 0 96px; }
.brand-mark img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: left center; }
h1 { font-size: 16px; line-height: 1.2; }
.brand-block p { margin-top: 2px; color: var(--muted); font-size: 11px; }

.header-tools { display: flex; align-items: center; justify-content: flex-end; gap: 14px; }
.language-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 210px;
  min-height: 34px;
  padding: 3px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #eef1f5;
}
.language-option { min-width: 0; border: 0; border-radius: 4px; background: transparent; color: var(--muted); font-size: 11px; font-weight: 750; white-space: nowrap; }
.language-option.active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(15, 19, 31, 0.12); }
.header-state { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }

.workspace {
  width: min(1580px, 100%);
  height: calc(100dvh - 64px);
  margin: 0 auto;
  padding: 16px clamp(14px, 2.2vw, 32px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
  align-items: stretch;
}

.editor, .summary {
  min-width: 0;
  min-height: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.editor-toolbar {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px 10px;
}
.editor-toolbar h2 { margin-top: 2px; font-size: 17px; line-height: 1.25; }
.eyebrow { color: var(--teal-dark); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.mode-label { padding: 5px 8px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); font-size: 10px; font-weight: 700; }

.workflow-steps {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  overflow: hidden;
}
.workflow-step {
  min-width: 0;
  min-height: 44px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-right: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}
.workflow-step:last-child { border-right: 0; }
.workflow-step:hover { background: var(--teal-soft); color: var(--ink); }
.workflow-step.active { background: var(--ink); color: #fff; }
.workflow-step.completed { color: #12647a; background: var(--teal-soft); }
.workflow-step.completed .step-number { border-color: var(--teal-dark); background: #fff; color: #007fa8; }
.step-number {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 10px;
}
.workflow-step.active .step-number { border-color: var(--teal); background: var(--teal); color: var(--ink); }
.step-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.editor-scroll { min-width: 0; min-height: 0; overflow: auto; padding: 18px; scrollbar-gutter: stable; }
.workflow-panel { display: none; min-width: 0; }
.workflow-panel.active { display: block; }
.panel-heading { margin-bottom: 16px; }
.panel-heading h2 { margin-top: 3px; font-size: 18px; line-height: 1.25; }
.panel-heading-actions { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }

.field-grid { display: grid; gap: 12px; }
.order-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rate-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 14px; }
label { display: grid; align-content: start; gap: 5px; color: #35415b; font-size: 11px; font-weight: 680; line-height: 1.3; }
input, select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
  padding: 8px 10px;
  outline: none;
}
input[type="file"] { padding: 6px 8px; background: var(--surface-soft); }
input:disabled, select:disabled { background: #eef1f5; color: #667085; cursor: not-allowed; }
input::placeholder { color: #98a2b3; }
input:focus, select:focus, button:focus-visible, summary:focus-visible { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(4, 197, 254, 0.18); outline: none; }
.span-2 { grid-column: span 2; }

.intake-panel { padding: 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-soft); }
.segmented-control { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid var(--line-strong); border-radius: 5px; overflow: hidden; }
.source-mode { min-height: 36px; border: 0; border-right: 1px solid var(--line-strong); background: #fff; color: var(--muted); font-size: 11px; font-weight: 750; }
.source-mode:last-child { border-right: 0; }
.source-mode.active { background: var(--ink); color: #fff; }
.intake-controls { display: grid; grid-template-columns: minmax(220px, 2fr) minmax(160px, 1fr) auto; gap: 10px; align-items: end; margin-top: 12px; }
.intake-controls:has(.file-field:not([hidden])) { grid-template-columns: minmax(180px, 1.4fr) minmax(180px, 1fr) minmax(150px, 0.8fr) auto; }
.source-state { margin-top: 9px; }

.item-list { display: grid; gap: 10px; margin-top: 12px; }
.item-row { border: 1px solid var(--line); border-radius: 6px; background: #fbfcfd; overflow: hidden; }
.item-row[open] { border-color: #b8c5d4; background: #fff; }
.item-row-header, .band-title { list-style: none; }
.item-row-header::-webkit-details-marker, .band-title::-webkit-details-marker { display: none; }
.item-row-header {
  min-height: 42px;
  padding: 6px 9px 6px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid transparent;
  cursor: pointer;
}
.item-row[open] .item-row-header { border-bottom-color: var(--line); }
.item-row-content { background: #fff; }
.item-title, .item-row-actions { display: flex; align-items: center; gap: 8px; min-width: 0; }
.item-number { font-size: 12px; }
.item-toggle { color: var(--muted); font-size: 10px; font-weight: 700; }
.item-fields { padding: 12px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.source-fields { grid-template-columns: 1fr 1fr 2fr; padding-bottom: 11px; background: #f3f8fb; border-bottom: 1px solid var(--line); }
.item-source-badge, .source-chip, .source-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 6px;
  border: 1px solid #b7c7d6;
  border-radius: 4px;
  background: #fff;
  color: #445269;
  font-size: 9px;
  font-weight: 750;
}
.item-source-badge.verified, .source-chip.verified { border-color: #92d1b1; background: #e9f8f0; color: var(--green); }
.item-source-badge.captured, .source-chip.captured { border-color: #9cd8e8; background: #eaf8fb; color: #12647a; }
.item-source-badge.needs_review, .source-chip.needs_review, .source-badge.pending { border-color: #e8bd69; background: var(--amber-soft); color: #744500; }
.source-badge.manual { background: #eef1f5; color: var(--muted); }

.disclosure-icon { width: 8px; height: 8px; flex: 0 0 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform 150ms ease; }
details[open] > summary .disclosure-icon { transform: rotate(225deg); }
.icon-button { width: 30px; height: 30px; border: 0; border-radius: 4px; background: transparent; color: var(--muted); font-size: 20px; line-height: 1; }
.icon-button:hover { background: var(--red-soft); color: var(--red); }
.icon-button:disabled { opacity: 0.35; cursor: not-allowed; }

.pricing-band { margin-top: 10px; border: 1px solid var(--line); border-left-width: 4px; background: #fbfcfd; }
.pricing-band[open] { background: #fff; }
.carrier-band { border-left-color: #35415b; }
.markup-band { border-left-color: var(--amber); }
.finance-band { border-left-color: var(--teal); }
.band-title { min-height: 44px; padding: 9px 12px; display: flex; align-items: center; gap: 9px; cursor: pointer; }
.band-title > span { width: 24px; height: 24px; flex: 0 0 24px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: #fff; font-size: 10px; font-weight: 800; }
.band-title strong { font-size: 12px; }
.band-title em { margin-left: auto; color: var(--amber); font-size: 10px; font-style: normal; font-weight: 750; }
.band-title em.confirmed { color: var(--green); }
.pricing-band > .field-grid { padding: 0 12px 12px; }

.check-field, .approval-check { display: flex; align-items: center; gap: 8px; min-height: 38px; padding-top: 15px; }
.check-field input, .approval-check input { width: 17px; min-height: 17px; height: 17px; margin: 0; accent-color: var(--teal); }
.primary-button, .secondary-button {
  min-height: 38px;
  border-radius: 5px;
  padding: 8px 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-weight: 750;
}
.primary-button { border: 1px solid var(--teal); background: var(--teal); color: var(--ink); }
.primary-button:hover { background: var(--teal-dark); }
.secondary-button { border: 1px solid #bfc9d5; background: #fff; color: var(--ink); }
.secondary-button:hover { border-color: var(--teal-dark); color: #007fa8; }
.primary-button:disabled, .secondary-button:disabled { cursor: not-allowed; opacity: 0.48; }
.compact-button { min-height: 34px; padding: 6px 10px; font-size: 11px; }

.workflow-actions {
  min-height: 58px;
  padding: 9px 18px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--line);
  background: var(--surface-soft);
}
.workflow-status { color: var(--muted); font-size: 10px; font-weight: 750; text-align: center; }
.workflow-action-group { display: flex; justify-content: flex-end; gap: 8px; }
.navigation-button { justify-self: start; }

.summary { display: flex; flex-direction: column; overflow: hidden; padding: 17px; }
.summary-hero { flex: 0 0 auto; }
.summary-topline { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.review-badge { padding: 4px 7px; border-radius: 5px; background: #eef1f5; color: var(--muted); font-size: 10px; font-weight: 750; }
.review-badge.ready { background: var(--amber-soft); color: var(--amber); }
.review-badge.approved { background: var(--teal-soft); color: var(--green); }
.review-badge.blocked { background: var(--red-soft); color: var(--red); }
.grand-total { display: flex; align-items: flex-start; gap: 3px; margin-top: 12px; color: var(--teal-dark); }
.grand-total span { margin-top: 7px; font-size: 16px; font-weight: 700; }
.grand-total strong { font-size: 42px; line-height: 1; font-variant-numeric: tabular-nums; }
.quote-id { margin-top: 6px; color: var(--muted); font-size: 11px; }
.summary-toggle { display: none; }
.summary-content { min-height: 0; overflow: auto; margin-top: 12px; padding-right: 2px; scrollbar-gutter: stable; }
.summary-context { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 34px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-soft); }
.summary-context span { color: var(--muted); font-size: 10px; font-weight: 700; }
.summary-context strong { font-size: 12px; font-variant-numeric: tabular-nums; }
.currency-switch { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 10px; padding: 3px; border: 1px solid var(--line-strong); border-radius: 6px; background: #eef1f5; }
.currency-option { min-width: 0; min-height: 34px; border: 0; border-radius: 4px; background: transparent; color: var(--muted); font-size: 10px; font-weight: 800; }
.currency-option span { font-size: 12px; }
.currency-option.active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(15, 19, 31, 0.12); }
.currency-panel { display: none; margin-top: 10px; }
.currency-panel.active { display: block; }
.currency-panel-heading { min-height: 44px; display: flex; align-items: center; gap: 10px; padding-bottom: 7px; border-bottom: 2px solid var(--line); }
.currency-panel-heading .currency-symbol { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 5px; background: var(--ink); color: #fff; font-size: 16px; font-weight: 800; }
.currency-panel-heading div { display: grid; gap: 1px; }
.currency-panel-heading strong { font-size: 11px; }
.currency-panel-heading small { color: var(--muted); font-size: 9px; font-weight: 750; }
.total-breakdown { margin: 0; }
.total-breakdown div { display: flex; justify-content: space-between; gap: 14px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.total-breakdown dt { color: var(--muted); }
.total-breakdown dd { margin: 0; font-weight: 750; text-align: right; }
.total-breakdown .breakdown-divider { margin-top: 3px; border-top: 2px solid var(--line); }
.review-block { margin-top: 14px; padding: 13px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.approval-check { align-items: flex-start; margin-top: 8px; padding-top: 0; line-height: 1.4; font-weight: 550; }
.export-actions { margin-top: 12px; display: grid; gap: 8px; }
.export-language-note { color: var(--muted); font-size: 10px; font-weight: 650; line-height: 1.4; }

.message-panel { margin-top: 12px; border-radius: 6px; padding: 10px 12px; font-size: 11px; line-height: 1.45; }
.message-panel ul { margin: 0; padding-left: 17px; }
.error-panel { border: 1px solid #f5b7b1; background: var(--red-soft); color: var(--red); }
.warning-panel { border: 1px solid #f1cf86; background: var(--amber-soft); color: #744500; }
.blocker-panel { border: 1px solid #efb0a9; background: var(--red-soft); color: var(--red); }
.global-message { position: sticky; bottom: 0; z-index: 2; }

.embedded-preview { min-width: 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: #fff; }
.tabs { display: flex; gap: 2px; padding: 0 14px; border-bottom: 1px solid var(--line); background: var(--surface-soft); }
.tab { min-height: 42px; padding: 0 12px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--muted); font-size: 11px; font-weight: 750; }
.tab.active { border-bottom-color: var(--teal); color: #008db8; }
.preview-pane { display: none; min-width: 0; max-width: 100%; padding: 16px; overflow-x: auto; }
.preview-pane.active { display: block; }
.empty-state { min-height: 150px; display: grid; place-items: center; color: var(--muted); text-align: center; }
.quote-table { width: 100%; border-collapse: collapse; min-width: 620px; }
.quote-table th { padding: 9px; background: var(--teal-soft); color: #35415b; text-align: left; font-size: 10px; text-transform: uppercase; }
.quote-table td { padding: 10px 9px; border-bottom: 1px solid var(--line); vertical-align: top; }
.quote-table .number { text-align: right; font-variant-numeric: tabular-nums; }
.preview-footer { display: grid; grid-template-columns: 1fr auto; gap: 16px; margin-top: 15px; align-items: start; }
.preview-note { max-width: 720px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.preview-total { text-align: right; }
.preview-total span { display: block; color: var(--muted); font-size: 10px; text-transform: uppercase; }
.preview-total strong { display: block; margin-top: 3px; color: var(--teal-dark); font-size: 24px; }
.internal-metrics { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 16px; }
.internal-metrics div { display: flex; justify-content: space-between; gap: 10px; padding-bottom: 5px; border-bottom: 1px solid var(--line); }
.internal-metrics dt { color: var(--muted); }
.internal-metrics dd { margin: 0; font-weight: 750; text-align: right; }
.internal-context-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 15px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-soft); }
.internal-context-row span { color: var(--muted); font-size: 10px; }
.internal-context-row strong { font-size: 11px; text-align: right; }
.internal-currency-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 12px; }
.internal-currency-section { min-width: 0; }
.internal-currency-section header { display: flex; align-items: center; gap: 9px; padding-bottom: 8px; border-bottom: 2px solid var(--line); }
.internal-currency-section header > span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 5px; background: var(--ink); color: #fff; font-size: 15px; font-weight: 800; }
.internal-currency-section header div { display: grid; gap: 1px; }
.internal-currency-section header strong { font-size: 11px; }
.internal-currency-section header small { color: var(--muted); font-size: 9px; font-weight: 750; }
.internal-currency-section .internal-metrics { grid-template-columns: 1fr; margin-top: 8px; }
.internal-customer-total { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); }
.preview-brand { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 14px; color: var(--muted); font-size: 10px; }
.preview-brand img { width: 112px; height: 50px; object-fit: contain; object-position: left center; }
.source-reference { max-width: 260px; overflow-wrap: anywhere; color: var(--muted); font-size: 10px; }
.quote-table small { color: var(--muted); font-size: 9px; }

@media (max-width: 1120px) {
  .workspace { grid-template-columns: minmax(0, 1fr) 300px; }
  .order-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rate-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .item-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .intake-controls, .intake-controls:has(.file-field:not([hidden])) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  html, body { height: auto; }
  body { overflow: auto; }
  .app-header { height: auto; min-height: 60px; }
  .workspace { height: auto; min-height: calc(100dvh - 60px); grid-template-columns: 1fr; grid-template-areas: "summary" "editor"; align-items: start; }
  .editor { grid-area: editor; min-height: 640px; }
  .summary { grid-area: summary; position: sticky; top: 0; z-index: 10; padding: 10px 12px; }
  .summary-hero { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .summary-hero > div { flex: 1; min-width: 0; }
  .summary-topline { justify-content: flex-start; }
  .grand-total { display: inline-flex; margin-top: 5px; }
  .grand-total strong { font-size: 30px; }
  .grand-total span { margin-top: 4px; font-size: 13px; }
  .quote-id { display: inline; margin-left: 8px; font-size: 9px; }
  .summary-toggle { min-height: 34px; display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 5px; background: #fff; color: var(--ink); padding: 7px 9px; font-size: 10px; font-weight: 750; }
  .summary-content { display: none; max-height: 62dvh; margin-top: 10px; }
  .summary.expanded .summary-content { display: block; }
  .editor-scroll { overflow: visible; }
  .rate-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .item-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .source-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .app-header { align-items: center; gap: 8px; padding: 7px 10px; }
  .brand-mark { width: 72px; height: 36px; flex-basis: 72px; }
  .brand-block > div:not(.brand-mark) { display: none; }
  .header-tools { gap: 7px; }
  .language-switch { width: 148px; min-height: 32px; }
  .language-option { font-size: 9px; }
  .header-state { gap: 0; }
  .header-state #rulesVersion { display: none; }
  .workspace { padding: 8px; gap: 8px; }
  .editor-toolbar { min-height: 52px; padding: 9px 12px 8px; }
  .editor-toolbar h2 { font-size: 15px; }
  .workflow-steps { margin: 0 10px; }
  .workflow-step { min-height: 42px; padding: 5px 4px; gap: 0; }
  .step-number { width: 20px; height: 20px; flex-basis: 20px; }
  .step-label { display: none; }
  .editor-scroll { padding: 13px 12px; }
  .panel-heading { margin-bottom: 12px; }
  .panel-heading h2 { font-size: 16px; }
  .panel-heading-actions { align-items: center; }
  .panel-heading-actions h2 { max-width: 180px; }
  .order-grid { grid-template-columns: 1fr; }
  .segmented-control { grid-template-columns: repeat(3, minmax(0, 1fr)); border: 0; gap: 5px; }
  .source-mode, .source-mode:last-child { min-height: 34px; border: 1px solid var(--line-strong); border-radius: 4px; }
  .intake-panel { padding: 10px; }
  .intake-controls, .intake-controls:has(.file-field:not([hidden])) { grid-template-columns: 1fr; }
  .item-fields { padding: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 8px; }
  .source-fields { grid-template-columns: 1fr; }
  .span-2 { grid-column: span 2; }
  .source-fields .span-2 { grid-column: span 1; }
  .item-toggle { display: none; }
  .rate-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 8px; }
  .check-field { padding-top: 4px; }
  .band-title { padding: 8px 9px; }
  .band-title em { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .workflow-actions { min-height: 70px; padding: 7px 10px 9px; display: flex; flex-wrap: wrap; justify-content: space-between; }
  .workflow-status { order: -1; width: 100%; font-size: 9px; }
  .navigation-button { min-width: 38px; padding: 7px 9px; }
  .workflow-action-group { margin-left: auto; gap: 6px; }
  #calculate { padding: 7px 9px; font-size: 11px; }
  .summary-topline .eyebrow { display: none; }
  .tabs { padding: 0 8px; }
  .tab { min-height: 40px; padding: 0 9px; }
  .preview-pane { padding: 11px; }
  #customerPreview { overflow-x: hidden; }
  .quote-table:not(.internal-table) { min-width: 0; display: block; }
  .quote-table:not(.internal-table) thead { display: none; }
  .quote-table:not(.internal-table) tbody { display: grid; }
  .quote-table:not(.internal-table) tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .quote-table:not(.internal-table) td { padding: 0; border: 0; }
  .quote-table:not(.internal-table) td:nth-child(1) { grid-column: 1; grid-row: 1; font-weight: 700; }
  .quote-table:not(.internal-table) td:nth-child(2) { grid-column: 2; grid-row: 1; }
  .quote-table:not(.internal-table) td:nth-child(3) { grid-column: 2; grid-row: 2; font-weight: 800; }
  .quote-table:not(.internal-table) td:nth-child(4) { grid-column: 1; grid-row: 2; color: var(--muted); font-size: 10px; }
  .internal-table { min-width: 720px; }
  .preview-footer { grid-template-columns: 1fr; }
  .preview-total { text-align: left; }
  .internal-metrics { grid-template-columns: 1fr; }
  .internal-currency-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .disclosure-icon { transition: none; }
}
