:root {
    --bg: #f7f4eb;
    --paper: #fff;
    --ink: #203d34;
    --muted: #59645c;
    --line: #d8dbd1;
    --soft: #eaf0e9;
    --gold: #8c6d30;
    --warning: #795024;
    --warning-bg: #f7eddb;
    --danger: #8f3030;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.6 Arial, Helvetica, sans-serif; overflow-wrap: anywhere; }
button, input, select, textarea { font: inherit; }
a { color: var(--ink); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
button, summary, input[type=checkbox], input[type=radio] { cursor: pointer; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
h1, h2 { font-family: Georgia, 'Times New Roman', serif; font-weight: 400; line-height: 1.18; margin: 0 0 16px; }
h1 { font-size: clamp(29px, 4vw, 42px); }
h2 { font-size: clamp(25px, 3vw, 31px); }
h3 { font-size: 17px; font-weight: 600; margin: 0 0 12px; line-height: 1.4; }
h4 { font-size: 14px; font-weight: 600; margin: 20px 0 10px; }
p { margin: 0 0 16px; }
p:last-child { margin-bottom: 0; }
.small { font-size: 12px; line-height: 1.6; color: var(--muted); }
.spaced { margin-top: 15px; }
.eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px; color: #765923; margin-bottom: 10px; font-weight: 600; }
.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: absolute; top: -70px; left: 20px; background: var(--ink); color: #fff; padding: 12px 20px; z-index: 10; }
.skip-link:focus { top: 10px; }
.environment { padding: 8px 18px; text-align: center; color: #fff; background: var(--ink); font-size: 12px; letter-spacing: .2px; }
.brandbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 26px max(24px, calc((100vw - 1100px)/2)); border-bottom: 1px solid var(--line); background: var(--paper); }
.brand { display: flex; align-items: center; gap: 15px; text-decoration: none; flex-shrink: 0; }
.monogram { font-family: Georgia, serif; font-size: 30px; letter-spacing: 1px; line-height: 1; }
.brandname { border-left: 1px solid var(--gold); padding-left: 15px; font-size: 11px; line-height: 1.45; }
.account { display: flex; align-items: center; gap: 22px; font-size: 12px; color: var(--muted); flex-wrap: wrap; justify-content: flex-end; }
.account a { min-height: 44px; display: inline-flex; align-items: center; }
.shell { max-width: 1100px; margin: 0 auto; padding: 44px 24px 60px; min-height: calc(100vh - 210px); }
.shell-auth { max-width: 560px; padding-top: 60px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 30px; }
.page-heading p { margin-bottom: 0; }
.page-heading .badge { flex-shrink: 0; }
.section { margin-top: 40px; }
.section-heading { margin-bottom: 22px; }
.section-heading h2 { margin-bottom: 0; }
.section-nav { display: flex; gap: 10px 28px; flex-wrap: wrap; padding: 10px 0 0; border-bottom: 1px solid var(--line); margin: 28px 0; }
.section-nav a { text-decoration: none; padding: 10px 0 13px; font-size: 14px; border-bottom: 2px solid transparent; }
.section-nav a:hover, .section-nav a:focus-visible { border-bottom-color: var(--gold); }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 7px; padding: 26px; min-width: 0; }
.two-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
.notice { background: var(--soft); border-left: 3px solid var(--gold); padding: 20px 23px; margin: 20px 0 24px; }
.notice h3 { font-size: 16px; margin-bottom: 6px; }
.notice p { font-size: 14px; margin-bottom: 0; }
.notice-warning { background: var(--warning-bg); border-left-color: var(--warning); }
.flash { border: 1px solid var(--line); border-left: 4px solid var(--ink); background: var(--soft); padding: 16px 20px; margin: 0 0 25px; }
.flash-error { border-left-color: var(--danger); color: #702a2a; background: #fff0ed; }
.badge { display: inline-flex; gap: 5px; padding: 5px 10px; background: #f0f1ec; color: var(--muted); border-radius: 3px; font-size: 11px; line-height: 1.5; }
.badge-good { background: var(--soft); color: #244b38; }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
button, .button, input[type=submit] { display: inline-flex; justify-content: center; align-items: center; min-height: 44px; background: var(--ink); border: 1px solid var(--ink); color: #fff; border-radius: 4px; font-size: 14px; font-weight: 400; line-height: 1.4; padding: 12px 18px; text-decoration: none; max-width: 100%; cursor: pointer; text-align: center; }
button:hover, .button:hover, input[type=submit]:hover { background: #315344; border-color: #315344; }
button:disabled, fieldset:disabled button { opacity: .5; cursor: not-allowed; }
.secondary { background: transparent; color: var(--ink); border-color: var(--line); }
.secondary:hover { background: var(--soft); color: var(--ink); border-color: var(--line); }
form { margin: 20px 0 0; }
fieldset { min-width: 0; padding: 0; border: 0; margin: 0; }
.field { display: flex; flex-direction: column; gap: 7px; margin: 0 0 18px; min-width: 0; font-size: 13px; }
input:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=hidden]), select, textarea { width: 100%; max-width: 100%; min-width: 0; min-height: 44px; border: 1px solid #b9c2b7; border-radius: 4px; background: #fcfcf9; color: var(--ink); font-size: 16px; line-height: 1.5; padding: 11px 12px; }
input[type=file] { font-size: 13px !important; padding: 9px !important; overflow: hidden; }
input[type=file]::file-selector-button { border: 1px solid var(--line); background: var(--soft); color: var(--ink); padding: 8px 10px; border-radius: 3px; margin-right: 10px; font: inherit; cursor: pointer; }
textarea { resize: vertical; }
textarea[readonly] { background: var(--bg); }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.choice { display: flex; align-items: flex-start; gap: 11px; min-height: 44px; padding: 9px 0; margin: 0 0 5px; font-size: 14px; }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; flex: 0 0 18px; margin: 3px 0 0; accent-color: var(--ink); }
.fiscal-fields { margin: 20px 0; padding-top: 16px; border-top: 1px solid var(--line); }
.fiscal-fields legend { font-size: 12px; color: var(--muted); padding: 0 0 10px; }
.fiscal-fields .fields { grid-template-columns: 1fr; }
.payment-instructions { white-space: normal; overflow-wrap: anywhere; font-size: 14px; line-height: 1.75; margin: 20px 0; padding: 18px; background: var(--bg); border-radius: 4px; }
.key-values { margin: 20px 0; }
.key-values > div { display: flex; justify-content: space-between; align-items: baseline; gap: 18px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.key-values dt { font-size: 13px; color: var(--muted); }
.key-values dd { margin: 0; font-size: 14px; text-align: right; max-width: 66%; }
.key-values .amount { font-family: Georgia, serif; font-size: 24px; }
.doclist { margin: 22px 0; background: var(--paper); border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.docrow { padding: 25px; border-bottom: 1px solid var(--line); }
.docrow:last-child { border-bottom: 0; }
.dochead { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 15px; }
.dochead h3 { margin-bottom: 0; font-size: 16px; }
.file-link { display: inline-block; font-size: 14px; padding: 3px 0; overflow-wrap: anywhere; }
.file-list { list-style: none; padding: 0; margin: 15px 0; }
.file-list li { padding: 9px 0; border-bottom: 1px solid var(--line); }
.file-list li:last-child { border-bottom: 0; }
.file-list .small { display: block; }
.compact-details { margin: 14px 0; }
summary { min-height: 44px; padding: 10px 0; font-size: 14px; }
details[open] > summary { margin-bottom: 12px; }
.compact-details form { max-width: 660px; margin-top: 6px; }
.review-file + .review-file { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 20px; }
.absence { padding: 17px 20px; margin-top: 18px; background: var(--bg); }
.absence h4 { margin-top: 0; }
.checklist { list-style: none; padding: 0; margin: 20px 0; }
.checklist li { margin: 10px 0; font-size: 14px; }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; margin-bottom: 25px; }
.metrics > div { display: flex; flex-direction: column; padding: 22px 25px; background: var(--paper); font-size: 12px; color: var(--muted); }
.metric-number { font-family: Georgia, serif; font-size: 31px; color: var(--ink); line-height: 1.2; margin-bottom: 6px; }
.case-list { background: var(--paper); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.case-row { display: grid; grid-template-columns: 1fr 1.2fr auto; gap: 18px; align-items: center; padding: 22px 25px; border-bottom: 1px solid var(--line); }
.case-row:last-child { border-bottom: 0; }
.case-row h3 { margin-bottom: 5px; font-size: 16px; }
.case-row h3 a { text-decoration: none; }
.case-row h3 a:hover { text-decoration: underline; }
.case-row p { margin: 0; }
.case-pending { display: flex; gap: 5px; flex-wrap: wrap; }
.back-link { display: inline-flex; min-height: 44px; align-items: center; margin-bottom: 18px; font-size: 13px; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { position: relative; padding: 0 0 20px 23px; border-left: 1px solid var(--line); display: flex; flex-direction: column; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); position: absolute; top: 8px; left: -4px; }
.timeline strong { font-size: 14px; font-weight: 500; }
.settings { margin-top: 30px; }
.settings > summary { font-size: 16px; }
.privacy { border-top: 1px solid var(--line); margin-top: 35px; padding-top: 14px; }
.legal-text { font-size: 13px; line-height: 1.7; margin-bottom: 15px; }
.contact-note { margin-top: 30px; font-size: 13px; color: var(--muted); }
.footer { padding: 20px max(24px, calc((100vw - 1052px)/2)); border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 15px 30px; flex-wrap: wrap; color: var(--muted); font-size: 11px; }
.auth { padding: 32px; }
.auth h1 { font-size: 34px; }
.auth #loginform label { display: block; font-size: 13px; margin-bottom: 7px; }
.auth #loginform .login-remember label { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.auth #loginform .login-submit input { width: 100%; }
.auth #loginform p { margin-bottom: 20px; }
.invitation { margin-bottom: 28px; }
.invitation h2 { font-size: 25px; }
@media (max-width: 760px) {
    .brandbar { padding: 21px 20px; }
    .two-columns { grid-template-columns: 1fr; }
    .page-heading { align-items: flex-start; flex-direction: column; }
    .case-row { grid-template-columns: 1fr auto; gap: 14px; }
    .case-pending { grid-column: 1 / -1; grid-row: 2; }
    .metrics > div { padding: 18px 14px; }
    .account { gap: 5px 15px; }
}
@media (max-width: 480px) {
    .brandbar { align-items: flex-start; flex-direction: column; gap: 10px; padding: 20px 17px 12px; }
    .account { width: 100%; justify-content: space-between; }
    .shell { padding: 28px 16px 40px; }
    .shell-auth { padding-top: 30px; }
    .card, .auth, .docrow { padding: 21px 17px; }
    .notice { padding: 17px; }
    .fields { grid-template-columns: 1fr; }
    .metrics { grid-template-columns: 1fr; }
    .metrics > div { flex-direction: row; align-items: baseline; gap: 14px; padding: 13px 18px; }
    .metric-number { min-width: 30px; font-size: 25px; margin: 0; }
    .section-nav { gap: 5px 17px; }
    .section-nav a { font-size: 12px; }
    .case-row { padding: 20px 17px; }
    .key-values > div { gap: 12px; flex-wrap: wrap; }
    .key-values dd { max-width: 100%; text-align: left; }
    .key-values .amount { font-size: 22px; }
    .footer { padding: 20px 17px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print {
    .environment, .account, .section-nav, form, .back-link, .skip-link, .settings { display: none !important; }
    body { background: white; }
    .shell { max-width: none; padding: 20px 0; }
    .card, .docrow { break-inside: avoid; }
}
