:root {
  --navy: #0a1628;
  --navy-soft: #172b4a;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --ink: #172033;
  --muted: #526071;
  --canvas: #f4f7fb;
  --surface: #ffffff;
  --border: #d7dee8;
  --border-strong: #aeb9c8;
  --success: #166534;
  --success-bg: #ecfdf3;
  --warning: #92400e;
  --warning-bg: #fff7ed;
  --danger: #b42318;
  --danger-bg: #fff1f0;
  --shadow: 0 18px 50px rgba(10, 22, 40, 0.08);
  --radius: 14px;
  --focus: 0 0 0 4px rgba(37, 99, 235, 0.24);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--canvas); color: var(--ink); font-size: 16px; line-height: 1.55; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--blue-dark); text-underline-offset: 0.18em; }
a:hover { color: var(--blue); }
button, [href] { cursor: pointer; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0.55rem; color: var(--navy); font-size: clamp(2rem, 4vw, 3.1rem); line-height: 1.08; letter-spacing: -0.035em; }
h2 { margin-bottom: 0.55rem; color: var(--navy); font-size: clamp(1.35rem, 2vw, 1.75rem); line-height: 1.2; letter-spacing: -0.018em; }
h3 { margin-bottom: 0.45rem; color: var(--navy); font-size: 1.05rem; }
code { overflow-wrap: anywhere; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 999; top: 0.65rem; left: 0.65rem; transform: translateY(-160%); padding: 0.7rem 1rem; border-radius: 8px; color: #fff; background: var(--blue-dark); }
.skip-link:focus { transform: translateY(0); }
.shell { width: min(1180px, calc(100% - 2rem)); margin-inline: auto; }
.estimate-shell { width: min(1040px, calc(100% - 2rem)); margin-inline: auto; }
.narrow-main { max-width: 920px; }
.page-main { min-height: calc(100vh - 150px); padding-block: clamp(2rem, 5vw, 4rem); }
.estimate-main { padding-block: 1.25rem 4rem; }
.confirmation-main { display: grid; min-height: calc(100vh - 170px); padding-block: 3rem; place-items: center; }
.eyebrow { margin-bottom: 0.45rem; color: var(--blue-dark); font-size: 0.75rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.subtle, .optional, .help-text { color: var(--muted); font-size: 0.875rem; }

.app-header, .estimate-header { border-bottom: 1px solid rgba(255,255,255,0.1); background: var(--navy); color: #fff; }
.estimate-header { background: #fff; border-color: var(--border); color: var(--ink); }
.header-row { display: flex; min-height: 72px; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; min-height: 44px; align-items: baseline; gap: 0.75rem; color: #fff; text-decoration: none; }
.brand:hover { color: #fff; }
.brand-dark { color: var(--navy); }
.brand-dark:hover { color: var(--navy); }
.brand-name { font-size: 1.27rem; font-weight: 900; letter-spacing: 0.06em; }
.brand-name span { color: #60a5fa; }
.brand-dark .brand-name span { color: var(--blue); }
.brand-product { color: #cbd5e1; font-size: 0.88rem; }
.brand-dark .brand-product { color: var(--muted); }
.admin-nav { display: flex; align-items: center; gap: 0.35rem; }
.admin-nav > a { display: inline-flex; min-height: 44px; align-items: center; padding-inline: 0.85rem; border-radius: 8px; color: #dbeafe; text-decoration: none; }
.admin-nav > a[aria-current="page"], .admin-nav > a:hover { color: #fff; background: rgba(255,255,255,0.1); }
.secure-label { color: var(--muted); font-size: 0.82rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }
.site-footer { border-top: 1px solid var(--border); background: #fff; color: var(--muted); font-size: 0.78rem; }
.footer-row { display: flex; min-height: 72px; align-items: center; justify-content: space-between; gap: 1rem; }

.page-heading { margin-bottom: 1.8rem; }
.page-heading > p:last-child { max-width: 720px; margin-bottom: 0; color: var(--muted); }
.split-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; }
.back-link { display: inline-flex; min-height: 44px; align-items: center; margin-bottom: 0.5rem; font-weight: 700; }
.button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; gap: 0.45rem; padding: 0.65rem 1rem; border: 1px solid transparent; border-radius: 9px; font-weight: 750; line-height: 1.2; text-decoration: none; transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease; }
.button:hover { text-decoration: none; }
.button:active { transform: translateY(1px); }
.button:disabled { cursor: not-allowed; opacity: 0.5; }
.button-primary { background: var(--blue); color: #fff; }
.button-primary:hover { background: var(--blue-dark); color: #fff; }
.button-secondary { border-color: var(--border-strong); background: #fff; color: var(--navy); }
.button-secondary:hover { border-color: var(--blue); background: #eff6ff; color: var(--blue-dark); }
.button-quiet { border-color: transparent; background: transparent; color: #dbeafe; }
.button-quiet:hover { background: rgba(255,255,255,0.1); color: #fff; }
.action-bar .button-quiet { color: var(--muted); }
.action-bar .button-quiet:hover { background: #f1f5f9; color: var(--navy); }
.button-danger { background: var(--danger); color: #fff; }
.button-danger:hover { background: #8f1d14; color: #fff; }
.button-danger-outline { border-color: #f3b4ad; background: #fff; color: var(--danger); }
.button-danger-outline:hover { background: var(--danger-bg); color: #8f1d14; }
.button-small { min-height: 38px; padding: 0.48rem 0.7rem; font-size: 0.84rem; }
.button-wide { width: 100%; }
.inline-form { display: inline-flex; margin: 0; }
.action-bar, .card-actions, .decision-actions { display: flex; flex-wrap: wrap; gap: 0.65rem; }
.action-bar { margin-bottom: 1.4rem; padding: 0.8rem; border: 1px solid var(--border); border-radius: 12px; background: #fff; }

.alert, .error-summary, .notice, .preview-banner { margin-bottom: 1.25rem; padding: 1rem 1.1rem; border: 1px solid; border-radius: 10px; }
.alert-success { border-color: #86efac; background: var(--success-bg); color: var(--success); }
.alert-error, .error-summary { border-color: #f3b4ad; background: var(--danger-bg); color: #7f1d1d; }
.alert strong { display: block; }
.error-summary h2 { color: #7f1d1d; font-size: 1.05rem; }
.error-summary ul { margin-bottom: 0; }
.notice, .preview-banner { border-color: #fed7aa; background: var(--warning-bg); color: var(--warning); }
.preview-banner { font-weight: 750; text-align: center; }
.copy-field { display: grid; grid-template-columns: 1fr auto; gap: 0.5rem; margin-top: 0.8rem; }
.copy-field label { grid-column: 1 / -1; }
.hash { display: grid; gap: 0.25rem; margin: 0.8rem 0 0; color: var(--muted); font-size: 0.78rem; }
.hash span { font-weight: 750; text-transform: uppercase; letter-spacing: 0.06em; }

.panel, .form-section, .auth-card, .decision-card, .confirmation-card, .estimate-document, .empty-state { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.panel { margin-bottom: 1.35rem; padding: clamp(1.15rem, 3vw, 1.75rem); }
.panel-heading, .line-items-heading, .version-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.summary-total { color: var(--navy); font-size: 1.65rem; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.8fr); gap: 1.35rem; align-items: start; }
.publish-panel { position: sticky; top: 1rem; }
.definition-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 1.2rem 0 1.5rem; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.definition-grid > div { min-width: 0; padding: 0.85rem; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.definition-grid > div:nth-child(3n) { border-right: 0; }
.definition-grid > div:nth-last-child(-n+3) { border-bottom: 0; }
.definition-grid dt { color: var(--muted); font-size: 0.75rem; font-weight: 750; letter-spacing: 0.04em; text-transform: uppercase; }
.definition-grid dd { margin: 0.2rem 0 0; overflow-wrap: anywhere; font-weight: 650; }
.compact-definitions { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-block: 0.9rem; }
.compact-definitions > div { border-bottom: 0; }
.compact-definitions > div:nth-child(3n) { border-right: 1px solid var(--border); }
.compact-definitions > div:last-child { border-right: 0; }

.status { display: inline-flex; width: fit-content; min-height: 28px; align-items: center; padding: 0.22rem 0.58rem; border-radius: 999px; background: #e8edf4; color: #354052; font-size: 0.76rem; font-weight: 800; letter-spacing: 0.03em; text-transform: uppercase; }
.status-large { min-height: 36px; padding-inline: 0.8rem; }
.status-accepted { background: var(--success-bg); color: var(--success); }
.status-declined, .status-revoked { background: var(--danger-bg); color: var(--danger); }
.status-sent { background: #eff6ff; color: #1d4ed8; }
.status-viewed { background: #eef2ff; color: #4338ca; }
.status-expired, .status-superseded { background: var(--warning-bg); color: var(--warning); }

.search-bar { display: flex; align-items: end; gap: 0.85rem; margin-bottom: 1.25rem; padding: 1rem; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.grow { flex: 1; }
.field { min-width: 0; margin-bottom: 1rem; }
.field label, .copy-field label { display: block; margin-bottom: 0.35rem; color: var(--ink); font-size: 0.9rem; font-weight: 750; }
.field input, .field textarea, .field select, .copy-field input { width: 100%; min-height: 46px; padding: 0.68rem 0.78rem; border: 1px solid var(--border-strong); border-radius: 8px; background: #fff; color: var(--ink); }
.field textarea { resize: vertical; line-height: 1.5; }
.field input:hover, .field textarea:hover { border-color: #7d8ca0; }
.field input:focus, .field textarea:focus, .copy-field input:focus { outline: none; border-color: var(--blue); box-shadow: var(--focus); }
.field-grid { display: grid; gap: 0 1rem; }
.two-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.compact-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.check-line, .acceptance-check { display: flex; min-height: 44px; align-items: flex-start; gap: 0.7rem; color: var(--ink); }
.check-line input, .acceptance-check input { flex: 0 0 auto; width: 20px; height: 20px; margin-top: 0.18rem; accent-color: var(--blue); }
.compact-check { align-items: center; white-space: nowrap; }
.compact-check input { margin-top: 0; }
.stack-form { display: grid; gap: 0.25rem; }

.estimate-form { display: grid; gap: 1.2rem; }
.form-section { padding: clamp(1.15rem, 3vw, 1.8rem); }
.section-heading { display: flex; align-items: flex-start; gap: 0.9rem; margin-bottom: 1.3rem; }
.section-heading > span { display: grid; flex: 0 0 34px; height: 34px; place-items: center; border-radius: 999px; background: var(--navy); color: #fff; font-weight: 800; }
.section-heading h2 { margin-bottom: 0.15rem; }
.section-heading p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.line-items { display: grid; gap: 0.65rem; }
.line-item { display: flex; align-items: flex-end; gap: 0.7rem; padding: 0.8rem; border: 1px solid var(--border); border-radius: 10px; background: #f8fafc; }
.line-item .field { margin-bottom: 0; }
.amount-field { flex: 0 0 160px; }
.icon-button { min-height: 46px; padding: 0.55rem 0.7rem; border: 1px solid #f3b4ad; border-radius: 8px; background: #fff; color: var(--danger); font-size: 0.82rem; font-weight: 750; }
.sticky-actions { position: sticky; z-index: 10; bottom: 0.75rem; display: flex; justify-content: flex-end; gap: 0.65rem; padding: 0.75rem; border: 1px solid var(--border); border-radius: 12px; background: rgba(255,255,255,0.96); box-shadow: 0 12px 30px rgba(10,22,40,0.15); backdrop-filter: blur(10px); }

.table-wrap { max-width: 100%; overflow-x: auto; }
.data-table, .estimate-table { width: 100%; border-collapse: collapse; background: #fff; }
.data-table th, .data-table td, .estimate-table th, .estimate-table td { padding: 0.85rem 0.9rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.data-table thead th { color: var(--muted); font-size: 0.75rem; letter-spacing: 0.05em; text-transform: uppercase; }
.data-table td > span:not(.status) { display: block; color: var(--muted); font-size: 0.84rem; }
.data-table td:nth-child(4), .data-table th:nth-child(4), .estimate-table td:last-child, .estimate-table th:last-child { text-align: right; white-space: nowrap; }
.data-table tbody tr:hover { background: #f8fafc; }
.data-table tfoot th { border-top: 2px solid var(--navy); border-bottom: 0; color: var(--navy); }
.row-action { width: 1%; }
.compact-table { margin-top: 0.7rem; }
.version-list { display: grid; gap: 0.9rem; }
.version-card { padding: 1rem; border: 1px solid var(--border); border-radius: 11px; background: #fbfcfe; }
.version-card p { margin-bottom: 0; color: var(--muted); }
.activity-list { display: grid; gap: 0; margin: 1rem 0 0; padding: 0; list-style: none; }
.activity-list li { position: relative; display: flex; gap: 0.8rem; padding: 0.2rem 0 1rem; }
.activity-list li:not(:last-child)::before { position: absolute; top: 15px; bottom: -2px; left: 5px; width: 2px; background: var(--border); content: ''; }
.activity-dot { position: relative; z-index: 1; flex: 0 0 12px; width: 12px; height: 12px; margin-top: 0.35rem; border: 3px solid #bfdbfe; border-radius: 999px; background: var(--blue); }
.activity-list strong { display: block; text-transform: capitalize; }
.activity-list span { color: var(--muted); font-size: 0.84rem; }
.empty-state { padding: 3rem 1rem; text-align: center; }

.auth-main { display: grid; min-height: calc(100vh - 145px); padding-block: 3rem; place-items: center; }
.auth-card { width: min(460px, 100%); padding: clamp(1.4rem, 5vw, 2.3rem); }
.auth-card-wide { width: min(880px, 100%); }
.auth-card > p:not(.eyebrow) { color: var(--muted); }
.setup-grid { display: grid; grid-template-columns: minmax(220px, 0.75fr) minmax(300px, 1.25fr); gap: 2rem; align-items: start; }
.mfa-qr { display: block; width: min(260px, 100%); height: auto; margin-inline: auto; border: 1px solid var(--border); border-radius: 10px; }
.manual-key { overflow-wrap: anywhere; }
.recovery-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.55rem; padding: 1rem; list-style: none; border: 1px solid var(--border); border-radius: 10px; background: #f8fafc; }
.payment-panel { margin-block: 1.2rem; padding: 1rem; border: 1px solid var(--border); border-radius: 10px; background: #f8fafc; }

.client-page { background: #eef2f7; }
.client-toolbar { display: flex; min-height: 56px; align-items: center; justify-content: space-between; gap: 1rem; color: var(--muted); font-size: 0.83rem; font-weight: 700; }
.client-toolbar > div { display: flex; gap: 0.5rem; }
.estimate-document { padding: clamp(1.2rem, 5vw, 3.6rem); border-radius: 4px; box-shadow: 0 24px 70px rgba(10,22,40,0.12); }
.document-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 2rem; padding-bottom: 1.4rem; border-bottom: 2px solid var(--navy); }
.document-heading h1 { max-width: 690px; font-size: clamp(1.8rem, 4vw, 2.85rem); }
.total-block { display: grid; flex: 0 0 auto; gap: 0.15rem; text-align: right; }
.total-block span { color: var(--muted); font-size: 0.76rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.total-block strong { color: var(--navy); font-size: clamp(1.55rem, 3vw, 2.15rem); }
.estimate-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; border-bottom: 1px solid var(--border); }
.estimate-meta > div { min-width: 0; padding: 1rem 0.8rem; border-right: 1px solid var(--border); }
.estimate-meta > div:first-child { padding-left: 0; }
.estimate-meta > div:last-child { padding-right: 0; border-right: 0; }
.estimate-meta dt { color: var(--muted); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; }
.estimate-meta dd { display: grid; gap: 0.1rem; margin: 0.2rem 0 0; overflow-wrap: anywhere; }
.estimate-meta dd span { color: var(--muted); font-size: 0.78rem; }
.document-section { padding-top: 1.7rem; }
.document-section .lead { max-width: 850px; font-size: 1.08rem; line-height: 1.65; }
.scope-list { display: grid; gap: 0.65rem; padding: 0; list-style: none; }
.scope-list li { display: grid; grid-template-columns: 24px 1fr; gap: 0.45rem; }
.scope-list li span { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 999px; background: var(--success-bg); color: var(--success); font-size: 0.76rem; font-weight: 900; }
.estimate-table { border: 1px solid var(--border); }
.estimate-table thead th { background: var(--navy); color: #fff; }
.estimate-table tfoot th { border-top: 2px solid var(--navy); background: #edf4e8; color: #153d25; font-size: 1.08rem; }
.terms-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
.terms-grid > div { padding: 1.1rem; border: 1px solid var(--border); border-radius: 10px; background: #f8fafc; }
.plain-list { columns: 2; padding-left: 1.2rem; }
.plain-list li { margin-bottom: 0.35rem; break-inside: avoid; }
.snapshot-footer { display: grid; gap: 0.25rem; margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.7rem; }
.decision-card { margin-top: 1.25rem; padding: clamp(1.2rem, 5vw, 2.2rem); }
.decision-card > p:not(.eyebrow) { color: var(--muted); }
.acceptance-check { margin: 0.3rem 0 1rem; padding: 1rem; border: 1px solid #bfdbfe; border-radius: 10px; background: #eff6ff; font-weight: 650; }
.decision-actions { margin-top: 0.3rem; }
.decision-actions .button { flex: 1 1 210px; }
.confirmation-card { width: min(650px, 100%); padding: clamp(1.5rem, 6vw, 3rem); text-align: center; }
.confirmation-mark { display: grid; width: 60px; height: 60px; margin: 0 auto 1rem; place-items: center; border-radius: 999px; font-size: 1.8rem; font-weight: 900; }
.confirmation-accepted { background: var(--success-bg); color: var(--success); }
.confirmation-declined, .confirmation-unavailable { background: var(--danger-bg); color: var(--danger); }
.confirmation-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 1.5rem 0; border: 1px solid var(--border); border-radius: 10px; text-align: left; overflow: hidden; }
.confirmation-details > div { padding: 0.9rem; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.confirmation-details > div:nth-child(2n) { border-right: 0; }
.confirmation-details > div:nth-last-child(-n+2) { border-bottom: 0; }
.confirmation-details dt { color: var(--muted); font-size: 0.72rem; font-weight: 800; text-transform: uppercase; }
.confirmation-details dd { margin: 0.2rem 0 0; overflow-wrap: anywhere; font-weight: 700; }
.confirmation-actions { justify-content: center; }

@media (max-width: 880px) {
  .detail-grid { grid-template-columns: 1fr; }
  .publish-panel { position: static; }
  .compact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .estimate-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .estimate-meta > div:nth-child(2) { border-right: 0; }
  .estimate-meta > div:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .estimate-meta > div:nth-child(3) { padding-left: 0; }
}

@media (max-width: 700px) {
  .setup-grid, .recovery-codes { grid-template-columns: 1fr; }
  .shell, .estimate-shell { width: min(100% - 1rem, 1180px); }
  .header-row { min-height: 64px; }
  .brand-product, .secure-label { display: none; }
  .admin-nav { gap: 0; }
  .split-heading, .document-heading, .client-toolbar, .footer-row { align-items: stretch; flex-direction: column; }
  .split-heading { gap: 1rem; }
  .page-main { padding-block: 1.5rem 3rem; }
  .search-bar { align-items: stretch; flex-direction: column; }
  .two-columns, .compact-grid, .terms-grid { grid-template-columns: 1fr; }
  .line-item { align-items: stretch; flex-direction: column; }
  .amount-field { flex-basis: auto; }
  .line-item .icon-button { align-self: flex-start; }
  .definition-grid, .compact-definitions { grid-template-columns: 1fr 1fr; }
  .definition-grid > div, .compact-definitions > div { border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
  .definition-grid > div:nth-child(2n), .compact-definitions > div:nth-child(2n) { border-right: 0; }
  .definition-grid > div:nth-last-child(-n+2), .compact-definitions > div:nth-last-child(-n+2) { border-bottom: 0; }
  .responsive-table, .responsive-table tbody, .responsive-table tr, .responsive-table td { display: block; width: 100%; }
  .responsive-table thead { display: none; }
  .responsive-table tbody { display: grid; gap: 0.75rem; }
  .responsive-table tr { padding: 0.75rem; border: 1px solid var(--border); border-radius: 10px; }
  .responsive-table td { display: grid; grid-template-columns: minmax(90px, 0.45fr) 1fr; padding: 0.45rem; border: 0; text-align: left !important; white-space: normal !important; }
  .responsive-table td::before { color: var(--muted); content: attr(data-label); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
  .responsive-table .row-action { display: block; margin-top: 0.35rem; }
  .responsive-table .row-action::before { content: none; }
  .responsive-table .row-action .button { width: 100%; }
  .client-toolbar > div { flex-wrap: wrap; }
  .document-heading { gap: 0.7rem; }
  .total-block { text-align: left; }
  .estimate-meta { grid-template-columns: 1fr; }
  .estimate-meta > div { padding-inline: 0; border-right: 0; border-bottom: 1px solid var(--border); }
  .estimate-meta > div:last-child { border-bottom: 0; }
  .plain-list { columns: 1; }
  .estimate-table th, .estimate-table td { padding: 0.75rem 0.55rem; }
  .estimate-table td:first-child { min-width: 190px; }
  .confirmation-details { grid-template-columns: 1fr; }
  .confirmation-details > div { border-right: 0; border-bottom: 1px solid var(--border); }
  .confirmation-details > div:nth-last-child(-n+2) { border-bottom: 1px solid var(--border); }
  .confirmation-details > div:last-child { border-bottom: 0; }
  .copy-field { grid-template-columns: 1fr; }
  .copy-field label { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}

@media print {
  @page { size: letter; margin: 0.5in; }
  :root, body, .client-page { background: #fff; }
  body { color: #000; font-size: 10pt; }
  .no-print, .site-footer, .estimate-header { display: none !important; }
  .estimate-shell { width: 100%; }
  .estimate-main { padding: 0; }
  .estimate-document { padding: 0; border: 0; box-shadow: none; }
  .document-heading h1 { font-size: 23pt; }
  .document-section { break-inside: avoid; padding-top: 14pt; }
  .estimate-table { break-inside: avoid; }
  .scope-list li, .plain-list li { break-inside: avoid; }
  .snapshot-footer { overflow-wrap: anywhere; }
  a { color: inherit; text-decoration: none; }
}
