:root {
    --charcoal: #3a3a3d;
    --dark: #262626;
    --orange: #c9670f;
    --orange-secondary: #bf4e14;
    --orange-dark: #9f4f08;
    --light: #f2f2f2;
    --border: #d9d9d9;
    --text: #262626;
    --white: #ffffff;
    --success: #1f6b3a;
    --danger: #a12727;
    --warning: #8a5b00;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Calibri, Arial, sans-serif;
    color: var(--text);
    background: #f7f7f7;
    line-height: 1.5;
}
a { color: var(--orange-dark); }
.container { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.site-header { background: var(--charcoal); border-bottom: 4px solid var(--orange); color: white; }
.header-inner { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; color: white; text-decoration: none; }
.brand-mark { width: 44px; height: 44px; display: grid; place-items: center; border: 2px solid var(--orange); color: var(--orange); font-weight: 700; }
.brand strong, .brand small { display: block; }
.brand small { color: #ddd; }
.main-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; }
.main-nav a, .link-button { color: white; text-decoration: none; font: inherit; }
.inline-form { display: inline; margin: 0; }
.link-button { background: none; border: 0; padding: 0; cursor: pointer; }
.theme-toggle { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 7px 11px; border: 1px solid #777; border-radius: 999px; color: white; background: #29292b; font: inherit; font-weight: 700; cursor: pointer; }
.theme-toggle:hover, .theme-toggle:focus-visible { border-color: var(--orange); outline: 2px solid transparent; }
.theme-toggle-icon { font-size: 20px; line-height: 1; color: #ffb15f; }
.page-content { min-height: calc(100vh - 140px); padding: 32px 0 48px; }
.site-footer { background: var(--dark); color: #ddd; padding: 18px 0; font-size: 14px; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 24px; }
h1, h2 { margin-top: 0; }
h1 { font-size: 30px; margin-bottom: 4px; }
h2 { font-size: 20px; }
.page-heading p { margin: 0; color: #666; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 44px; padding: 10px 18px; border-radius: 4px; border: 1px solid transparent; text-decoration: none; font-weight: 700; cursor: pointer; }
.button-primary { background: var(--orange); color: white; }
.button-primary:hover { background: var(--orange-dark); }
.button:disabled, .button[aria-disabled="true"] { background: #9a9a9a; border-color: #9a9a9a; color: #f3f3f3; cursor: not-allowed; opacity: .72; }
.button:disabled:hover { background: #9a9a9a; }
.button-secondary { background: white; border-color: var(--border); color: var(--text); }
.panel, .auth-card { background: white; border: 1px solid var(--border); box-shadow: 0 2px 8px rgba(0,0,0,.05); padding: 24px; border-radius: 5px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-card { background: white; border-left: 5px solid var(--orange); padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,.05); }
.stat-card span, .stat-card strong { display: block; }
.stat-card span { color: #666; }
.intake-source { display: block; margin-top: 3px; color: #666; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.stat-card strong { font-size: 32px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 13px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--charcoal); color: white; font-size: 14px; }
.status { display: inline-block; padding: 4px 9px; border-radius: 20px; background: #ececec; font-size: 13px; font-weight: 700; }
.status-completed { background: #dcefe2; color: var(--success); }
.status-draft { background: #e8e8e8; }
.status-email_failed, .status-voided, .status-expired { background: #f6dddd; color: var(--danger); }
.status-sent, .status-opened, .status-awaiting_second, .status-awaiting_adjuster { background: #fff0c9; color: var(--warning); }
.large-status { font-size: 15px; padding: 8px 14px; }
.empty-state { text-align: center; padding: 40px 20px; }
.search-form { display: flex; gap: 10px; margin-bottom: 18px; }
.search-form input { flex: 1; min-height: 44px; border: 1px solid var(--border); padding: 10px 12px; border-radius: 4px; font: inherit; }
.form-panel { padding: 0; overflow: hidden; }
.form-section { padding: 24px; border-bottom: 1px solid var(--border); }
.form-section h2 { padding-bottom: 8px; border-bottom: 3px solid var(--orange); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.field-full { grid-column: 1 / -1; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; }
.field input, .field select, .field textarea, .stacked-form input { width: 100%; min-height: 44px; border: 1px solid #bcbcbc; border-radius: 3px; padding: 10px 12px; font: inherit; background: #fff; }
.field textarea { min-height: 90px; }
.field small { display: block; color: #666; margin-top: 5px; }
.required, .field-error { color: var(--danger); }
.field-error { margin-top: 5px; font-size: 14px; }
.required-fields-message { margin: 0 0 18px; padding: 12px 15px; border: 1px solid #d9a2a2; border-left: 5px solid var(--danger); border-radius: 4px; background: #fff1f1; color: #671c1c; }
.required-fields-message ul { margin: 6px 0 0; padding-left: 22px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 20px 24px; background: var(--light); }
.auth-card { width: min(460px, 100%); margin: 40px auto; }
.stacked-form { display: grid; gap: 10px; }
.stacked-form .button { margin-top: 8px; }
.message { padding: 12px 15px; margin-bottom: 18px; border-radius: 4px; background: #e7eef8; }
.message-success { background: #dcefe2; color: var(--success); }
.message-error { background: #f6dddd; color: var(--danger); }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-bottom: 18px; }
.detail-list { margin: 0; }
.detail-list div { display: grid; grid-template-columns: 150px 1fr; padding: 9px 0; border-bottom: 1px solid var(--border); }
.detail-list dt { font-weight: 700; }
.detail-list dd { margin: 0; }
.next-step-panel { border-top: 5px solid var(--orange); }
.timeline { display: grid; gap: 12px; }
.timeline-item { border-left: 4px solid var(--orange); padding: 8px 12px; background: var(--light); display: grid; grid-template-columns: 1fr auto; }
.timeline-item small { grid-column: 1 / -1; color: #666; }
.claim-action-row, .adjuster-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.claim-action-row form, .adjuster-actions form { margin: 0; }
.documents-panel { margin-bottom: 18px; }
.document-list { display: grid; }
.document-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 13px; padding: 14px 0; border-top: 1px solid var(--border); }
.document-row small { display: block; color: #666; margin-top: 2px; }
.document-check, .answer-complete { width: 27px; height: 27px; display: inline-grid; place-items: center; border-radius: 50%; background: var(--success); color: white; }
.adjuster-actions { justify-content: space-between; margin-bottom: 18px; }
.answer-sections { display: grid; gap: 18px; }
.answer-card h2 { display: flex; align-items: center; gap: 10px; border-bottom: 3px solid var(--orange); padding-bottom: 10px; }
.answer-list { margin: 0; }
.answer-list > div { display: grid; grid-template-columns: minmax(180px, 38%) 1fr; gap: 20px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.answer-list dt { font-weight: 700; }
.answer-list dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.answer-mark { display: block; width: min(260px, 100%); max-height: 100px; object-fit: contain; object-position: left center; border: 1px solid var(--border); }
.next-step-panel input { width: 100%; min-height: 44px; padding: 9px 11px; border: 1px solid var(--border); margin: 7px 0 12px; }
.workspace-panel { grid-column: 1 / -1; }
.workspace-form-list { display: grid; gap: 10px; }
.workspace-form-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px; border: 1px solid var(--border); border-radius: 6px; color: inherit; text-decoration: none; background: white; }
.workspace-form-row.current { border-color: var(--orange); box-shadow: inset 4px 0 0 var(--orange); }
.workspace-form-row small { display: block; margin-top: 3px; color: #666; }
.add-forms { margin-top: 14px; }
.add-forms summary { display: inline-flex; cursor: pointer; list-style: none; }
.add-forms form { margin-top: 12px; padding: 15px; background: var(--light); border-radius: 6px; }
.add-forms ul { list-style: none; padding: 0; }
.add-forms li { margin: 8px 0; }
.policyholder-workspace-list { margin-top: 24px; }
.workspace-form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; flex-wrap: wrap; }
.public-intake-control { width: 100%; min-width: 0; font-size: 18px; }
textarea.public-intake-control { min-height: 96px; resize: vertical; overflow-wrap: anywhere; }
.questionnaire-field-disabled { opacity: .55; }
.questionnaire-field-disabled::after { content: "Not applicable because the building did not flood in the last 7 years."; display: block; margin-top: 7px; color: #555; font-style: italic; }
.form-panel #id_document_types { display: grid; grid-template-columns: 1fr; gap: 0; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.form-panel #id_document_types > div { border-bottom: 1px solid var(--border); }
.form-panel #id_document_types > div:last-child { border-bottom: 0; }
.form-panel #id_document_types label { display: grid; grid-template-columns: 30px 1fr; align-items: center; gap: 12px; min-height: 58px; padding: 10px 14px; cursor: pointer; background: white; }
.form-panel #id_document_types label:hover, .form-panel #id_document_types label:has(input:checked) { background: #fff4eb; }
.form-panel #id_document_types input { width: 22px; height: 22px; margin: 0; justify-self: center; }

/* Optional adjuster-portal theme. Policyholder forms keep their dedicated branded shell. */
html[data-theme="dark"] { color-scheme: dark; }
html[data-theme="dark"] body { color: #eeeeef; background: #181819; }
html[data-theme="dark"] a { color: #f0a45f; }
html[data-theme="dark"] .site-header { background: #202021; }
html[data-theme="dark"] .site-footer { background: #141414; color: #c9c9cb; }
html[data-theme="dark"] .panel,
html[data-theme="dark"] .auth-card,
html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .workspace-form-row { background: #252527; border-color: #464649; box-shadow: 0 2px 10px rgba(0,0,0,.35); }
html[data-theme="dark"] .page-heading p,
html[data-theme="dark"] .stat-card span,
html[data-theme="dark"] .field small,
html[data-theme="dark"] .timeline-item small,
html[data-theme="dark"] .document-row small,
html[data-theme="dark"] .workspace-form-row small { color: #b9b9bc; }
html[data-theme="dark"] .intake-source { color: #b9b9bc; }
html[data-theme="dark"] .field input,
html[data-theme="dark"] .field select,
html[data-theme="dark"] .field textarea,
html[data-theme="dark"] .stacked-form input,
html[data-theme="dark"] .search-form input,
html[data-theme="dark"] .next-step-panel input { color: #f4f4f4; background: #1d1d1f; border-color: #5c5c60; }
html[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="submit"]):not([type="button"]),
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff;
    caret-color: #ffffff;
    background-color: #111214 !important;
    border-color: #85858a !important;
}
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
    color: #c5c5c8;
    -webkit-text-fill-color: #c5c5c8;
    opacity: 1;
}
html[data-theme="dark"] input:-webkit-autofill,
html[data-theme="dark"] input:-webkit-autofill:hover,
html[data-theme="dark"] input:-webkit-autofill:focus,
html[data-theme="dark"] textarea:-webkit-autofill,
html[data-theme="dark"] select:-webkit-autofill {
    -webkit-text-fill-color: #ffffff !important;
    caret-color: #ffffff;
    box-shadow: 0 0 0 1000px #111214 inset !important;
    transition: background-color 9999s ease-out 0s;
}
html[data-theme="dark"] input[readonly],
html[data-theme="dark"] textarea[readonly] { background-color: #29292c !important; }
html[data-theme="dark"] input:disabled,
html[data-theme="dark"] select:disabled,
html[data-theme="dark"] textarea:disabled { color: #d0d0d2 !important; -webkit-text-fill-color: #d0d0d2; background-color: #303033 !important; opacity: 1; }
html[data-theme="dark"] select option { color: #ffffff; background: #111214; }
html[data-theme="dark"] .field input:focus,
html[data-theme="dark"] .field select:focus,
html[data-theme="dark"] .field textarea:focus,
html[data-theme="dark"] .stacked-form input:focus { border-color: var(--orange); outline: 2px solid rgba(201,103,15,.35); }
html[data-theme="dark"] .button-secondary { color: #f3f3f3; background: #303033; border-color: #5a5a5e; }
html[data-theme="dark"] .button-secondary:hover { background: #3b3b3f; border-color: var(--orange); }
html[data-theme="dark"] .button-primary,
html[data-theme="dark"] a.button-primary,
html[data-theme="dark"] a.button-primary:visited,
html[data-theme="dark"] a.button-primary:hover,
html[data-theme="dark"] a.button-primary:focus-visible { color: #ffffff; }
html[data-theme="dark"] .button-primary:disabled,
html[data-theme="dark"] .button-primary[aria-disabled="true"],
html[data-theme="dark"] .button-primary:disabled:hover { background: #66666a; border-color: #77777b; color: #e2e2e2; }
html[data-theme="dark"] .form-actions,
html[data-theme="dark"] .timeline-item,
html[data-theme="dark"] .add-forms form { background: #202022; }
html[data-theme="dark"] th { background: #303033; }
html[data-theme="dark"] th,
html[data-theme="dark"] td,
html[data-theme="dark"] .detail-list div,
html[data-theme="dark"] .document-row,
html[data-theme="dark"] .answer-list > div,
html[data-theme="dark"] .form-section { border-color: #464649; }
html[data-theme="dark"] .status { background: #3a3a3d; color: #ededed; }
html[data-theme="dark"] .status-completed { background: #193d27; color: #9bdfad; }
html[data-theme="dark"] .status-email_failed,
html[data-theme="dark"] .status-voided,
html[data-theme="dark"] .status-expired { background: #4a2020; color: #ffb0b0; }
html[data-theme="dark"] .status-sent,
html[data-theme="dark"] .status-opened,
html[data-theme="dark"] .status-awaiting_second,
html[data-theme="dark"] .status-awaiting_adjuster { background: #493b1d; color: #ffd98a; }
html[data-theme="dark"] .message { background: #25364b; color: #dce9fa; }
html[data-theme="dark"] .message-success { background: #193d27; color: #a8e3b7; }
html[data-theme="dark"] .message-error { background: #4a2020; color: #ffc0c0; }
html[data-theme="dark"] .form-panel #id_document_types,
html[data-theme="dark"] .form-panel #id_document_types > div { border-color: #4c4c50; }
html[data-theme="dark"] .form-panel #id_document_types label { background: #252527; }
html[data-theme="dark"] .form-panel #id_document_types label:hover,
html[data-theme="dark"] .form-panel #id_document_types label:has(input:checked) { background: #46301f; }
html[data-theme="dark"] .answer-mark { background: white; }

@media (max-width: 760px) {
    .theme-toggle-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .theme-toggle { width: 42px; padding: 7px; justify-content: center; }
}

/* Policyholder questionnaire intentionally has its own shell and no adjuster navigation. */
.questionnaire-body { background: #f3f5f7; }
.questionnaire-container { width: min(760px, calc(100% - 32px)); margin: 0 auto; }
.questionnaire-header { background: var(--charcoal); border-bottom: 5px solid var(--orange); color: white; padding: 14px 0; }
.questionnaire-header .questionnaire-container { display: flex; align-items: center; gap: 16px; }
.questionnaire-header strong, .questionnaire-header small { display: block; }
.questionnaire-header strong { font-size: 22px; line-height: 1.1; }
.questionnaire-header small { color: #ddd; margin-top: 2px; }
.questionnaire-logo { width: 74px; height: 60px; object-fit: contain; }
.questionnaire-brand-copy { min-width: 0; }
.questionnaire-header-claim { margin-left: auto; text-align: right; font-weight: 700; }
.questionnaire-header-claim small { font-weight: 400; }
.questionnaire-dashboard-link { margin-left: auto; min-height: 42px; display: inline-flex; align-items: center; padding: 8px 15px; border: 2px solid var(--orange); border-radius: 6px; color: white; text-decoration: none; font-weight: 700; }
.questionnaire-dashboard-link:hover, .questionnaire-dashboard-link:focus { background: var(--orange); color: white; }
.questionnaire-dashboard-link + .questionnaire-header-claim { margin-left: 0; }
.questionnaire-theme-toggle { margin-left: auto; flex: 0 0 auto; }
.questionnaire-dashboard-link + .questionnaire-theme-toggle { margin-left: 0; }
.questionnaire-theme-toggle + .questionnaire-header-claim { margin-left: 0; }
.questionnaire-main { min-height: calc(100vh - 160px); padding: 25px 0 45px; }
.questionnaire-progress { margin-bottom: 17px; }
.progress-copy { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; margin-bottom: 7px; }
.progress-track { height: 12px; background: #d6d9dd; border-radius: 20px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--orange); }
.save-status { display: flex; align-items: center; gap: 8px; margin: -4px 0 17px; color: var(--success); font-size: 14px; font-weight: 700; }
.save-status span { width: 22px; height: 22px; display: inline-grid; place-items: center; border-radius: 50%; color: white; background: var(--success); }
.questionnaire-card { background: white; border: 1px solid var(--border); border-radius: 7px; padding: 30px; box-shadow: 0 3px 12px rgba(0,0,0,.07); }
.questionnaire-card h1 { font-size: 28px; border-bottom: 3px solid var(--orange); padding-bottom: 12px; }
.questionnaire-field { margin: 0 0 22px; }
.questionnaire-field > label, .signature-wrap > label { display: block; font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.questionnaire-control:not([type="radio"]):not([type="checkbox"]) { width: 100%; min-height: 52px; padding: 12px; font: inherit; font-size: 17px; border: 1px solid #999; border-radius: 5px; background: white; }
textarea.questionnaire-control { min-height: 110px; }
.questionnaire-field ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.questionnaire-field ul label, .checkbox-field > label { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 14px; border: 2px solid #bbb; border-radius: 7px; font-size: 17px; font-weight: 700; cursor: pointer; background: var(--white); }
.questionnaire-field ul label:hover, .questionnaire-field ul label:focus-within, .checkbox-field > label:hover { border-color: var(--orange); background: #fff8f1; }
.questionnaire-field ul label:has(input:checked), .checkbox-field > label:has(input:checked) { border-color: var(--orange-secondary); background: #fff1e8; box-shadow: inset 0 0 0 1px var(--orange-secondary); }
.questionnaire-field input[type="radio"], .questionnaire-field input[type="checkbox"] { width: 23px; height: 23px; flex: 0 0 23px; }
.notice { background: #fff4d5; border-left: 5px solid var(--orange); padding: 16px; margin: 20px 0; }
.questionnaire-actions { display: flex; justify-content: space-between; gap: 14px; margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--border); }
.questionnaire-actions .button { min-height: 56px; min-width: 160px; font-size: 18px; border-radius: 6px; }
.review-section { border: 1px solid var(--border); border-radius: 5px; margin: 18px 0; overflow: hidden; }
.review-heading { background: var(--light); display: flex; justify-content: space-between; padding: 13px 16px; }
.review-heading h2 { margin: 0; display: flex; align-items: center; gap: 9px; }
.review-complete { width: 25px; height: 25px; display: inline-grid; place-items: center; border-radius: 50%; background: var(--success); color: white; font-size: 15px; }
.review-edit { font-weight: 700; padding: 5px 8px; }
.review-section dl { margin: 0; padding: 5px 16px; }
.review-section dl div { padding: 10px 0; border-bottom: 1px solid #eee; }
.review-section dt { font-weight: 700; }
.review-section dd { margin: 3px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.review-mark { display: block; width: min(220px, 100%); max-height: 90px; object-fit: contain; object-position: left center; border: 1px solid var(--border); background: white; }
.signature-wrap { margin-top: -5px; }
.drawing-pad { display: block; width: 100%; height: 180px; border: 2px solid #777; border-radius: 5px; background: white; touch-action: none; margin-bottom: 10px; }
.drawing-pad[data-mark-type="signature"] { height: 280px; }
.drawing-tools { display: flex; gap: 10px; flex-wrap: wrap; }
.upload-button { position: relative; overflow: hidden; }
.upload-button input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.confirmation-mark { width: 72px; height: 72px; display: grid; place-items: center; border-radius: 50%; background: var(--success); color: white; font-size: 42px; margin: 0 auto 20px; }
.confirmation-logo { display: block; width: 130px; height: auto; margin: 0 auto 18px; }
.confirmation-lead { text-align: center; font-size: 20px; }
.confirmation-details { margin: 24px 0; border: 1px solid var(--border); border-radius: 6px; }
.confirmation-details div { display: grid; grid-template-columns: 150px 1fr; gap: 15px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.confirmation-details div:last-child { border-bottom: 0; }
.confirmation-details dt { font-weight: 700; }
.confirmation-details dd { margin: 0; }
.confirmation-received { padding: 16px; border-left: 5px solid var(--orange); background: var(--light); font-weight: 700; }
.confirmation-dashboard-link { margin: 24px 0 0; }
.confirmation-dashboard-link .button { width: 100%; min-height: 54px; }
.not-ready-card { text-align: center; margin-top: 40px; }
.not-ready-mark { width: 64px; height: 64px; display: grid; place-items: center; margin: 0 auto 18px; border-radius: 50%; background: var(--orange); color: white; font-size: 40px; font-weight: 700; }
.questionnaire-footer { background: var(--dark); color: #ddd; text-align: center; padding: 16px 0; font-size: 13px; }

html[data-theme="dark"] .questionnaire-body { color: #f4f4f5; background: #151516; }
html[data-theme="dark"] .questionnaire-card { background: #252527; border-color: #55555a; box-shadow: 0 3px 14px rgba(0,0,0,.4); }
html[data-theme="dark"] .progress-track { background: #454549; }
html[data-theme="dark"] .save-status { color: #a8e3b7; }
html[data-theme="dark"] .questionnaire-control:not([type="radio"]):not([type="checkbox"]) { color: #fff; background: #111214; border-color: #85858a; }
html[data-theme="dark"] .questionnaire-field ul label,
html[data-theme="dark"] .checkbox-field > label { color: #f4f4f5; background: #303033; border-color: #69696e; }
html[data-theme="dark"] .questionnaire-field ul label:hover,
html[data-theme="dark"] .questionnaire-field ul label:focus-within,
html[data-theme="dark"] .checkbox-field > label:hover { background: #3b3028; border-color: var(--orange); }
html[data-theme="dark"] .questionnaire-field ul label:has(input:checked),
html[data-theme="dark"] .checkbox-field > label:has(input:checked) { background: #4a3020; border-color: #ee8b35; }
html[data-theme="dark"] .notice { color: #fff1dc; background: #3c3020; }
html[data-theme="dark"] .questionnaire-actions,
html[data-theme="dark"] .review-section,
html[data-theme="dark"] .confirmation-details,
html[data-theme="dark"] .confirmation-details div { border-color: #55555a; }
html[data-theme="dark"] .review-heading,
html[data-theme="dark"] .confirmation-received { color: #f4f4f5; background: #303033; }
html[data-theme="dark"] .review-section dl div { border-color: #49494d; }
html[data-theme="dark"] .questionnaire-footer { background: #101011; }

@media (max-width: 800px) {
    .header-inner, .page-heading { align-items: flex-start; flex-direction: column; padding-top: 16px; padding-bottom: 16px; }
    .main-nav { gap: 12px; }
    .stat-grid, .detail-grid, .form-grid { grid-template-columns: 1fr; }
    .field-full { grid-column: auto; }
    .search-form { flex-direction: column; }
    .button { width: 100%; }
    .form-actions { flex-direction: column-reverse; }
    .document-row { grid-template-columns: auto 1fr; }
    .document-row .status, .document-row .button { grid-column: 2; width: 100%; }
    .answer-list > div { grid-template-columns: 1fr; gap: 3px; }
    .questionnaire-card { padding: 21px 17px; }
    .questionnaire-card h1 { font-size: 24px; }
    .questionnaire-actions { flex-direction: column-reverse; }
    .questionnaire-actions .button { width: 100%; }
    .questionnaire-header .questionnaire-container { align-items: flex-start; flex-wrap: wrap; }
    .questionnaire-header-claim { width: 100%; margin-left: 90px; text-align: left; }
    .questionnaire-dashboard-link { margin-left: auto; }
    .questionnaire-dashboard-link + .questionnaire-header-claim { margin-left: 90px; }
    .workspace-form-actions { width: 100%; }
    .workspace-form-actions .button { width: 100%; }
    .progress-copy { align-items: flex-start; }
    .progress-copy span { max-width: 70%; }
    .review-heading { align-items: flex-start; }
    .confirmation-details div { grid-template-columns: 1fr; gap: 3px; }
    .drawing-pad[data-mark-type="signature"] { height: 240px; }
}

/* InFlow Claim Forms Portal branding */
.brand-logo {
    height: 60px;
    width: auto;
    display: block;
    flex: 0 0 auto;
}

.brand-copy {
    display: block;
    min-width: 0;
}

.brand-copy strong {
    display: block;
    color: var(--white);
    font-size: 22px;
    line-height: 1.1;
    letter-spacing: .2px;
}

.brand-copy small {
    display: block;
    margin-top: 4px;
    color: #e6e6e6;
    font-size: 14px;
}

.login-brand {
    text-align: center;
    padding-bottom: 18px;
    margin-bottom: 20px;
    border-bottom: 3px solid var(--orange);
}

.login-logo {
    width: min(250px, 80%);
    height: auto;
    display: block;
    margin: 0 auto 12px;
}

.login-product-name {
    color: var(--charcoal);
    font-size: 28px;
    font-weight: 700;
    line-height: 1.15;
}

.login-byline {
    margin-top: 5px;
    color: #666;
    font-size: 16px;
    font-weight: 700;
}

.auth-card h1,
.auth-card > p {
    text-align: center;
}

@media (max-width: 800px) {
    .brand-logo {
        height: 52px;
    }

    .brand-copy strong {
        font-size: 19px;
    }

    .login-product-name {
        font-size: 24px;
    }
}
