/* ---------- Proposal ---------- */

.proposal-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-bottom: 1rem; }
.proposal {
    background: #fff;
    color: #1f2937;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 2rem;
    max-width: 1100px;
}
.proposal h2 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--brand-text, var(--brand)); font-weight: 700; margin-bottom: 0.5rem; }
.proposal-header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem; padding-bottom: 1.25rem; border-bottom: 3px solid var(--brand-line, var(--brand)); }
.proposal-brand .brand-logo { max-height: 72px; max-width: 280px; }
.proposal-brand .brand-name { font-size: 1.6rem; font-weight: 700; color: var(--brand-text, var(--brand)); }
.proposal-company-name { font-weight: 700; margin-top: 0.4rem; }
.proposal-contact { color: #4b5563; font-size: 0.9rem; margin-top: 0.25rem; }
.proposal-meta { text-align: right; }
.proposal-title { font-size: 1.8rem; font-weight: 300; letter-spacing: 0.04em; text-transform: uppercase; color: var(--brand-text, var(--brand)); }
.proposal-meta dl { display: grid; grid-template-columns: auto auto; gap: 0.1rem 0.75rem; margin: 0.25rem 0 0; justify-content: end; font-size: 0.9rem; }
.proposal-meta dt { font-weight: 400; color: #6b7280; }
.proposal-meta dd { margin: 0; text-align: right; }
.proposal-section { padding: 1.25rem 0; border-bottom: 1px solid var(--border); }
.proposal-section:last-child { border-bottom: 0; padding-bottom: 0; }
.proposal-parties { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }
.proposal-load { display: grid; grid-template-columns: auto 1fr; gap: 0.15rem 1rem; margin: 0; }
.proposal-load dt { font-weight: 400; color: #6b7280; }
.proposal-load dd { margin: 0; font-variant-numeric: tabular-nums; }
.proposal-note { font-size: 0.8rem; color: #6b7280; margin: 0.5rem 0 0; }
.pre-line { white-space: pre-line; }

.proposal-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; align-items: stretch; }
.proposal-option {
    border: 1px solid var(--border);
    border-top: 6px solid #94a3b8;
    border-radius: 10px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    break-inside: avoid;
}
.proposal-option.tier-good { border-top-color: #64748b; }
.proposal-option.tier-better { border-top-color: var(--brand-line, var(--brand)); }
.proposal-option.tier-best { border-top-color: #b45309; }
.proposal-option.selected { border-color: #16a34a; box-shadow: 0 0 0 3px #16a34a33; }
/* After signing, an option that wasn't chosen has a lighter border and a "Not chosen" label, never a fade: opacity dropped its
   text to 2.3-4.0:1 (WCAG 1.4.3). */
.proposal-option.not-selected { border-color: #cbd5e1; box-shadow: none; }
.proposal-not-chosen { background: #f3f4f6; color: #374151; border: 1px solid #9ca3af; }
.proposal-option-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.4rem; }
.proposal-option-head h3 { font-size: 1.15rem; margin: 0; flex: 1 1 auto; }
.proposal-tier { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; color: #6b7280; width: 100%; }
.proposal-option-desc { font-size: 0.9rem; color: #4b5563; margin: 0.4rem 0 0; }
.proposal-items { list-style: none; padding: 0; margin: 0.75rem 0; font-size: 0.88rem; }
.proposal-items li { padding: 0.35rem 0; border-top: 1px dashed var(--border); }
.proposal-eff { font-weight: 400; font-size: 0.75rem; color: #6b7280; white-space: nowrap; margin-left: 0.25rem; }
.proposal-item-desc { color: #4b5563; }
.proposal-totals { display: grid; grid-template-columns: 1fr auto; gap: 0.2rem 0.75rem; margin: auto 0 0; padding-top: 0.6rem; border-top: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.proposal-totals dt { font-weight: 400; color: #4b5563; }
.proposal-totals dd { margin: 0; text-align: right; }
.proposal-totals .incentive { color: #15803d; }
.proposal-totals .total { font-weight: 700; font-size: 1.25rem; color: #111827; }
.proposal-totals .monthly { font-weight: 600; color: var(--brand-text, var(--brand)); }
.proposal-totals .proposal-plan { grid-column: 1 / -1; font-size: 0.75rem; color: #6b7280; }
.proposal-recommended { background: var(--brand); color: var(--brand-contrast, #fff); }
.proposal-ahri { font-size: 0.75rem; color: #6b7280; margin: -0.4rem 0 0.6rem; }
.proposal-feature-list { columns: 2 16rem; padding-left: 1.1rem; margin: 0; font-size: 0.9rem; }
.proposal-feature-list li { break-inside: avoid; margin-bottom: 0.2rem; }
.proposal-warranty-list { list-style: none; padding: 0; margin: 0; font-size: 0.9rem; }
.proposal-warranty-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.25rem 1rem; padding: 0.3rem 0; border-top: 1px dashed var(--border); }
.proposal-warranty-name { font-weight: 600; }
.proposal-warranty-value { color: #4b5563; font-variant-numeric: tabular-nums; }
.proposal-accepted { color: #166534; }
/* N36: a typed signature in the reader's own script face (no download), then the record. Fixed dark text on the page's white. */
.typed-signature { margin-top: 0.75rem; max-width: 28rem; }
.typed-signature-name {
    font-family: "Snell Roundhand", "Apple Chancery", "Segoe Script", "Brush Script MT", "URW Chancery L", cursive, serif;
    font-size: 1.9rem; line-height: 1.2; color: #111827; margin: 0; padding: 0 0.25rem 0.15rem; border-bottom: 1px solid #111827;
    overflow-wrap: anywhere;
}
/* Read by screen readers only ("Signature: "), never shown or printed. */
.typed-signature-label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.typed-signature-note { font-size: 0.85rem; color: #374151; margin: 0.35rem 0 0; }
.proposal-signature-record { font-size: 0.85rem; color: #374151; }
.proposal-signature-record dl { display: grid; grid-template-columns: max-content 1fr; gap: 0.15rem 1rem; margin: 0; }
.proposal-signature-record dt { font-weight: 600; color: #1f2937; }
.proposal-signature-record dd { margin: 0; overflow-wrap: anywhere; }
.signature-grid { display: grid; grid-template-columns: 2fr 2fr 1fr; gap: 1.5rem; font-size: 0.8rem; color: #6b7280; padding-top: 1.5rem; }
.signature-line { border-bottom: 1px solid #111827; height: 2rem; margin-bottom: 0.25rem; }
.proposal-terms { font-size: 0.8rem; color: #4b5563; }
.print-only { display: none; }

@media (max-width: 600px) {
    .proposal { padding: 1rem; }
    .proposal-meta { text-align: left; }
    .proposal-meta dl { justify-content: start; }
    .proposal-signature-record dl { grid-template-columns: 1fr; }
    .proposal-signature-record dd { margin-bottom: 0.35rem; }
}

@media print {
    @page { margin: 0.5in; }
    body, .app-shell { background: #fff !important; }
    .app-header, .no-print, #blazor-error-ui { display: none !important; }
    main.container { max-width: none; padding: 0 !important; }
    .print-only { display: block; }
    .proposal { border: 0; padding: 0; max-width: none; font-size: 11pt; }
    .proposal-options { grid-template-columns: repeat(3, 1fr); }
    .proposal-option { box-shadow: none !important; }
    * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

