@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');
:root { --red:#b7193f; --ink:#162d3a; --muted:#4c5e68; --line:#dbe3e0; --green:#286b52; color-scheme:light; }
* { box-sizing:border-box; }
html { scroll-padding-top:24px; -webkit-text-size-adjust:100%; }
body { margin:0; background:#f5f7f5; color:var(--ink); font:1.125rem/1.6 'DM Sans',sans-serif; }
button,input,select,textarea { font:inherit; }
button,a,input,select,textarea,summary { touch-action:manipulation; }
button,summary { cursor:pointer; }
button,a,summary { -webkit-tap-highlight-color:transparent; }
[hidden] { display:none !important; }
a { color:var(--red); }
button:focus-visible,a:focus-visible,summary:focus-visible { outline:3px solid var(--red); outline-offset:4px; }
header { min-height:96px; background:#fff; display:flex; align-items:center; justify-content:space-between; gap:24px; padding:16px max(24px,calc((100vw - 960px)/2)); border-bottom:1px solid var(--line); }
.official-logo { width:146px; height:auto; display:block; }
.header-right { font-size:1rem; color:var(--muted); }
.badge { display:inline-block; background:#f4e8dc; color:#68421d; padding:5px 10px; font-size:.875rem; font-weight:700; margin-left:12px; border-radius:5px; }
.demo { text-align:center; background:#edf1ec; padding:10px 20px; color:#405047; font-size:1rem; }
main { max-width:1000px; margin:auto; padding:36px 32px 0; }
.heading { margin:0 0 24px; }
h1 { font:800 clamp(1.875rem,4vw,2.375rem)/1.25 Manrope,sans-serif; letter-spacing:-.035em; margin:0 0 12px; }
h2 { font:700 1.5rem/1.4 Manrope,sans-serif; margin:0; overflow-wrap:anywhere; }
h3 { font-size:1.1875rem; line-height:1.4; margin:0 0 16px; overflow-wrap:anywhere; }
p { color:var(--muted); line-height:1.7; margin:8px 0 20px; }
.heading p { margin:0; }
#workflowProgress { margin:28px 0; scroll-margin-top:24px; }
.coach-progress { margin-bottom:14px; }
.progress-heading { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px; margin-bottom:12px; }
.progress-heading strong { font-size:1.1875rem; }
.draft-status { font-size:1rem; color:var(--muted); }
.coach-progress progress { display:block; appearance:none; -webkit-appearance:none; width:100%; height:10px; border:0; border-radius:10px; overflow:hidden; background:#dbe3e0; color:var(--red); }
.coach-progress progress::-webkit-progress-bar { background:#dbe3e0; border-radius:10px; }
.coach-progress progress::-webkit-progress-value { background:var(--red); border-radius:10px; }
.coach-progress progress::-moz-progress-bar { background:var(--red); border-radius:10px; }
.coach-progress p { font-size:1rem; margin:12px 0 0; line-height:1.6; }
.coach-progress + .stepper li { border-bottom:0; padding-bottom:0; }
.stepper { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); list-style:none; margin:0; padding:0; gap:12px; }
.stepper.two-steps { grid-template-columns:repeat(2,minmax(0,1fr)); }
.stepper.four-steps { grid-template-columns:repeat(4,minmax(0,1fr)); }
.stepper li { min-width:0; border-bottom:3px solid var(--line); padding-bottom:12px; }
.stepper li.current { border-color:var(--red); }
.stepper li.done { border-color:#aac5b5; }
.stepper button,.stepper li>div { display:flex; gap:10px; align-items:center; min-height:48px; padding:0; width:100%; border:0; background:none; color:var(--muted); text-align:left; font-size:1rem; line-height:1.4; }
.stepper .current button,.stepper .current>div { color:var(--ink); font-weight:700; }
.step-dot { display:grid; place-items:center; width:30px; height:30px; flex-shrink:0; border-radius:50%; border:1px solid #b8c5c0; font-size:1rem; }
.current .step-dot { border-color:var(--red); background:var(--red); color:#fff; }
.done .step-dot { border-color:#d7e7dd; background:#e5efe8; color:var(--green); }
.card { background:#fff; border:1px solid var(--line); border-radius:14px; overflow:hidden; margin-bottom:24px; }
.section { padding:28px 32px; border-top:1px solid #e6ece8; }
.section-title { margin-bottom:20px; }
.step-panel { padding:32px; }
.step-heading { margin-bottom:28px; }
.step-heading p:last-child { margin:10px 0 0; }
.step-label { font-size:1rem; font-weight:700; color:var(--red); margin:0 0 8px; }
.sender-line { display:flex; flex-wrap:wrap; align-items:center; gap:4px 12px; font-size:1rem; padding:16px 20px; background:#f4f7f4; border-radius:8px; margin-bottom:28px; overflow-wrap:anywhere; }
.sender-line span { color:var(--muted); }
.grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; }
.grid.three { grid-template-columns:repeat(3,minmax(0,1fr)); }
label { font-size:1rem; line-height:1.6; font-weight:600; display:block; min-width:0; }
.required { color:var(--red); }
label input,label select,label textarea { display:block; margin-top:8px; width:100%; min-width:0; min-height:52px; padding:12px 14px; border:1px solid #a6b5b1; border-radius:7px; background:#fff; color:var(--ink); font-size:1.125rem; line-height:1.5; }
input:focus,select:focus,textarea:focus { outline:2px solid var(--red); outline-offset:2px; }
textarea { resize:vertical; }
.funding-editor { margin-top:32px; padding-top:28px; border-top:1px solid var(--line); }
.fund-row { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:18px; margin-bottom:20px; padding:20px; border:1px solid var(--line); border-radius:9px; background:#fafbf9; }
.fund-heading,.fund-source { grid-column:1/-1; }
.fund-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.fund-heading strong { font-size:1rem; }
.fund-heading .text-button { margin:-8px 0; }
.funding-total { display:flex; justify-content:space-between; align-items:center; gap:16px; border-top:1px solid var(--line); padding-top:20px; margin:24px 0 0; }
.funding-total strong { color:var(--ink); }
.empty-funding { padding:20px; background:#f4f7f4; border-radius:8px; }
.primary,.secondary { display:inline-flex; align-items:center; justify-content:center; min-height:52px; padding:12px 20px; border-radius:7px; font-size:1.125rem; font-weight:600; line-height:1.5; text-align:center; text-decoration:none; }
.primary { background:var(--red); border:1px solid var(--red); color:#fff; }
.primary:hover { background:#941333; border-color:#941333; }
.secondary { background:#fff; border:1px solid #a6b5b1; color:var(--ink); }
.secondary:hover { background:#f0f4f1; }
button:disabled { cursor:wait; opacity:.65; }
.text-button { min-height:48px; background:none; border:0; color:var(--red); font-size:1rem; font-weight:600; text-decoration:underline; text-underline-offset:3px; padding:10px 8px; }
.wizard-actions { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:16px; padding:24px 32px; border-top:1px solid var(--line); background:#fafbf9; }
.wizard-actions>div { display:flex; flex-wrap:wrap; align-items:center; gap:12px; }
.save-note { padding:0 32px 16px; margin:0; text-align:right; background:#fafbf9; font-size:1rem; }
.actions { display:flex; flex-wrap:wrap; align-items:center; gap:16px; }
.plain-actions { padding:8px 0; margin:16px 0; }
.note { font-size:1rem; color:var(--muted); line-height:1.7; }
.review-step { padding:0; }
.review-step>.step-heading { padding:32px 32px 0; }
.send-summary { margin:0 32px 28px; padding:20px; background:#f2f6f2; border-radius:9px; display:grid; grid-template-columns:1fr 1fr; gap:24px; font-size:1rem; overflow-wrap:anywhere; }
.send-summary .datum { margin-bottom:0; }
.next-note { margin:24px 32px 28px; padding:20px; background:#f4f7f4; border-radius:8px; }
.next-note h3 { margin-bottom:6px; }
.next-note p { margin:0; }
.data { font-size:1.1875rem; line-height:1.55; font-weight:500; margin-top:6px; color:var(--ink); overflow-wrap:anywhere; }
.datum { min-width:0; font-size:1rem; color:var(--muted); }
.status-card { padding:32px; }
.status-card>p { margin-top:16px; }
.status-card .next-note { margin:24px 0; }
.status { font-size:.9375rem; font-weight:700; padding:7px 11px; border-radius:5px; background:#f7eddf; color:#72501f; display:inline-block; margin-bottom:20px; }
.status-facts { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; padding:24px 0; border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.notification-note { margin-top:24px; padding-top:24px; border-top:1px solid var(--line); font-size:1rem; }
.notification-note p { margin:8px 0; }
blockquote { margin:24px 0; padding:16px 20px; border-left:3px solid #b7193f; background:#fdf4f5; overflow-wrap:anywhere; }
summary { min-height:52px; padding:16px 20px; font-size:1rem; font-weight:600; }
.report-preview,.completed-preview,.tracking-details { margin:24px 0; border:1px solid var(--line); border-radius:10px; background:#fff; overflow:hidden; }
.tracking-details>summary { padding:20px 24px; }
.tracking-details>summary span { display:inline; margin-left:16px; font-weight:400; color:var(--muted); }
.tracking-details .card { border:0; border-top:1px solid var(--line); border-radius:0; margin:0; }
.secondary-options { border-top:1px solid var(--line); margin-top:24px; padding-top:8px; }
.secondary-options>summary { padding-left:0; }
.client-review>.step-heading,.signature-card>.step-heading { padding:32px 32px 0; }
.correction-container { padding:0 32px; }
.correction-container:has(form:not([hidden])) { padding-bottom:28px; }
.signature-section { border-top:0; padding-top:0; }
.acknowledgment { padding:20px; background:#f4f7f4; border-radius:9px; }
.acknowledgment h3 { margin-bottom:12px; }
.acknowledgment p:last-child { margin-bottom:0; }
.check { display:flex; gap:14px; align-items:flex-start; min-height:52px; padding:16px 0; font-size:1.125rem; font-weight:400; line-height:1.7; margin:12px 0; cursor:pointer; }
.check input { width:26px; height:26px; min-height:26px; margin:3px 0 0; padding:0; accent-color:var(--red); flex-shrink:0; }
.optional-permission { margin:8px 0 28px; padding:0 18px; border:1px solid var(--line); border-radius:8px; }
label input.signature { font-family:Georgia,serif; font-style:italic; font-size:1.5rem; }
#signatureHelp { margin-top:14px; }
#signForm>.wizard-actions { margin:28px -32px 0; }
.correction-link { display:block; margin:12px auto -8px; }
.correction-form { border-top:1px solid var(--line); padding-top:24px; }
.correction-form label { margin-top:18px; }
.success { display:flex; align-items:center; gap:16px; margin-bottom:20px; }
.success-icon { width:44px; height:44px; flex-shrink:0; border-radius:50%; background:#e3f0e7; color:var(--green); display:grid; place-items:center; font-size:1.5rem; }
table { border-collapse:collapse; width:100%; font-size:1rem; }
th { text-align:left; color:var(--muted); font-weight:600; background:#f6f8f5; }
td,th { padding:14px 10px; border-bottom:1px solid #dfe6e2; overflow-wrap:anywhere; }
.funding-amount { text-align:right; font-variant-numeric:tabular-nums; }
.funding-date { white-space:nowrap; }
tfoot th,tfoot td { background:#f6f8f5; font-weight:700; color:var(--ink); }
.paper { background:#fff; padding:32px; border-top:1px solid var(--line); overflow-wrap:anywhere; }
.paper-top { display:flex; justify-content:space-between; align-items:center; gap:20px; border-bottom:3px solid var(--red); padding-bottom:20px; margin-bottom:25px; }
.paper-logo { width:155px; max-width:100%; height:auto; display:block; }
.paper h2 { font-size:1.625rem; margin:14px 0; }
.paper .grid { gap:12px 20px; }
.paper h3 { margin-top:28px; border-bottom:1px solid var(--line); padding-bottom:12px; }
.paper p { font-size:1rem; }
.paper .sig { font:italic 1.875rem/1.5 Georgia,serif; margin-top:20px; }
.paper .watermark,.eyebrow { font-size:.9375rem; color:var(--red); }
.message,.setup,.error-banner { padding:18px 22px; border-radius:8px; margin-bottom:24px; font-size:1rem; line-height:1.7; overflow-wrap:anywhere; }
.message { background:#eef3ed; }
.setup { background:#fff4dc; color:#604916; border:1px solid #d6bd7f; }
.error-banner { background:#fff0f2; color:#8f1834; border:1px solid #d9a2b1; }
#toast { position:fixed; bottom:max(20px,env(safe-area-inset-bottom)); left:50%; transform:translateX(-50%); width:max-content; max-width:calc(100% - 32px); background:var(--ink); color:#fff; padding:16px 22px; border-radius:8px; display:none; z-index:5; font-size:1rem; overflow-wrap:anywhere; }
.report-list { display:flex; flex-wrap:wrap; align-items:center; gap:14px; margin-bottom:24px; }
.report-list label { font-weight:600; font-size:1rem; }
.report-list select { flex:1 1 240px; min-width:0; max-width:100%; min-height:52px; padding:12px; border:1px solid #a6b5b1; border-radius:7px; color:var(--ink); background:#fff; font-size:1rem; }
.report-list .secondary { font-size:1rem; }
.signin-card { padding:32px; background:#fff; border:1px solid var(--line); border-radius:10px; }
.signin-card .note { margin:24px 0 0; }
.audit-heading { display:flex; justify-content:space-between; align-items:center; gap:18px; margin-bottom:12px; }
.audit-list { list-style:none; padding:0; margin:24px 0; }
.audit-event { padding:20px 0 20px 18px; border-left:3px solid #b7d0c0; border-bottom:1px solid var(--line); }
.audit-event.audit-warning { border-left-color:var(--red); }
.audit-top { display:flex; flex-wrap:wrap; justify-content:space-between; gap:8px 16px; align-items:baseline; }
.audit-top strong { font-size:1.125rem; }
.audit-top time,.audit-actor,.audit-detail,.audit-integrity { font-size:1rem; color:var(--muted); overflow-wrap:anywhere; }
.audit-actor { margin:8px 0; }
.audit-integrity code { display:block; overflow-wrap:anywhere; }
footer { color:var(--muted); font-size:1rem; padding:28px 0; margin-top:40px; border-top:1px solid var(--line); }
.sba-disclaimer { font-size:1rem; line-height:1.7; margin:0 0 20px; color:var(--muted); }
.footer-meta { display:flex; flex-wrap:wrap; justify-content:space-between; gap:16px; }
.paper .sba-disclaimer { border-top:1px solid var(--line); padding-top:18px; margin-top:26px; }
@media(max-width:700px) {
 header { min-height:86px; padding:14px 20px; }
 .official-logo { width:128px; }
 .header-right>span:first-child { display:none; }
 .badge { margin:0; }
 .demo { text-align:left; padding:12px 20px; }
 main { padding:28px 16px 0; }
 .stepper { gap:10px; }
 .stepper button,.stepper li>div { flex-direction:column; align-items:flex-start; gap:8px; font-size:1rem; }
 .stepper.four-steps { gap:8px; }
 h2 { font-size:1.375rem; }
 .grid,.grid.three,.status-facts,.send-summary { grid-template-columns:minmax(0,1fr); gap:20px; }
 .section,.step-panel,.status-card,.paper { padding:24px 20px; }
 .review-step { padding:0; }
 .step-heading { margin-bottom:24px; }
 .review-step>.step-heading,.client-review>.step-heading,.signature-card>.step-heading { padding:24px 20px 0; }
 .sender-line { padding:14px 16px; }
 .sender-line span:last-child { width:100%; }
 .send-summary { margin:0 20px 24px; padding:18px; }
 .next-note { margin:24px 20px; }
 .wizard-actions { padding:20px; display:flex; flex-direction:column-reverse; align-items:stretch; }
 .wizard-actions>.primary { width:100%; }
 .wizard-actions>div { justify-content:space-between; }
 .save-note { padding:0 20px 20px; text-align:left; }
 .fund-row { padding:16px; grid-template-columns:minmax(0,1fr); }
 .fund-source,.fund-heading { grid-column:auto; }
 .fund-heading { align-items:flex-start; }
 .funding-total { flex-wrap:wrap; }
 .report-list { gap:10px; }
 .report-list label { width:100%; }
 .report-list select { width:100%; flex-basis:100%; }
 .report-list .secondary { margin-left:auto; }
 .status-card .plain-actions { flex-direction:column; align-items:stretch; }
 .tracking-details>summary { padding:18px 20px; }
 .tracking-details>summary span { display:block; margin:8px 0 0; }
 .correction-container { padding:0 20px; }
 .signature-section { padding-top:0; }
 .acknowledgment { padding:18px; }
 .optional-permission { padding:0 14px; }
 #signForm>.wizard-actions { margin:28px -20px 0; }
 .correction-form .plain-actions { flex-direction:column; align-items:stretch; }
 .funding-table thead { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
 .funding-table tbody,.funding-table tfoot { display:block; }
 .funding-table tbody tr { display:block; border:1px solid var(--line); border-radius:8px; padding:8px 16px; margin-bottom:16px; }
 .funding-table tbody td { display:flex; justify-content:space-between; align-items:baseline; gap:16px; padding:12px 0; text-align:right; }
 .funding-table tbody td::before { content:attr(data-label); font-size:1rem; font-weight:600; color:var(--muted); text-align:left; flex:0 0 64px; }
 .funding-table tbody td:last-child { border-bottom:0; }
 .funding-table tbody td>span { min-width:0; overflow-wrap:anywhere; }
 .funding-table tfoot tr { display:flex; flex-wrap:wrap; justify-content:space-between; gap:8px 16px; padding:16px; background:#f6f8f5; border:1px solid var(--line); border-radius:8px; }
 .funding-table tfoot th,.funding-table tfoot td { display:block; border:0; padding:0; }
 .funding-date { white-space:normal; }
 .paper-top { align-items:flex-start; flex-wrap:wrap; }
 .audit-heading { align-items:flex-start; flex-direction:column; gap:12px; }
 .audit-heading button { width:100%; }
 .success { align-items:flex-start; }
 footer { padding-bottom:calc(28px + env(safe-area-inset-bottom)); }
}
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { scroll-behavior:auto !important; } }

/* Keep monetary entry free of accidental spinner adjustments. */
input[data-key="amount"]::-webkit-inner-spin-button,
input[data-key="amount"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[data-key="amount"] { -moz-appearance: textfield; appearance: textfield; }

.coach-note-field { margin-top:24px; }
.instruction-note { margin:20px 28px; padding:20px; background:#f1f4f7; border-left:3px solid var(--ink); }
.instruction-note h3 { margin-top:0; }
.instruction-note .note-text { white-space:pre-wrap; overflow-wrap:anywhere; }
@media(max-width:600px) { .instruction-note { margin:16px; padding:16px; } }

/* Coach report browsing */
.report-browser { padding:24px; margin-bottom:24px; background:#fff; border:1px solid var(--line); border-radius:12px; }
.report-browser-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:16px; }
.report-browser-heading h2 { margin:0; font-size:1.2rem; }
.report-views { display:flex; gap:8px; margin-bottom:18px; }
.report-views button { border:1px solid #a6b5b1; border-radius:7px; padding:10px 18px; background:#fff; color:var(--ink); font:inherit; cursor:pointer; }
.report-views button[aria-pressed="true"] { background:var(--ink); color:#fff; border-color:var(--ink); }
.report-search { display:flex; align-items:flex-end; gap:12px; flex-wrap:wrap; }
.report-search label:first-child { flex:1 1 240px; }
.report-search label:nth-child(2) { flex:0 1 130px; }
.report-search label { min-width:0; }
.report-search input { width:100%; }
.report-search button { min-height:48px; }
.report-count { font-size:.9rem; margin:16px 0 12px; }
.report-browser .report-list { margin-bottom:12px; }
.report-year-help { margin-top:8px; }
@media(max-width:600px) { .report-browser { padding:18px; } .report-browser-heading { align-items:flex-start; } .report-browser-heading .secondary { padding:10px 12px; font-size:.9rem; } .report-search label:first-child { flex-basis:100%; } .report-search label:nth-child(2) { flex:1 1 100px; } }

/* Report browsing stays out of the form until the coach opens it. */
.header-right { display:flex; align-items:center; gap:16px; }
dialog.report-browser { width:min(760px,calc(100vw - 32px)); max-height:calc(100dvh - 48px); margin:auto; overflow:auto; color:var(--ink); }
dialog.report-browser::backdrop { background:rgba(22,45,58,.5); }
.reports-close { display:flex; justify-content:flex-end; margin:-12px -4px 4px; }
#salesYearField .note { margin:6px 0 0; font-weight:400; }
@media(max-width:600px) { .header-right>span { display:none; } #reportsButton { padding:10px 14px; font-size:1rem; } dialog.report-browser { padding:18px; } }
