:root {
    color-scheme: light;
    --ink: #17344b;
    --muted: #526675;
    --accent: #205f83;
    --accent-hover: #174863;
    --background: #f2f5f8;
    --line: #d9e2e9;
    --surface: #fff;
    --danger: #a12732;
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--background);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; overflow-wrap: anywhere; }
.container { width: min(1120px, calc(100% - 80px)); margin-inline: auto; }
a { color: var(--accent); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-hover); }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button, .button { cursor: pointer; }
:focus-visible { outline: 3px solid #b26200; outline-offset: 4px; }
h1, h2, h3, p { margin: 0 0 16px; }
h1, h2, h3 { line-height: 1.2; }
h1 { font-size: clamp(2rem, 3.5vw, 2.8rem); font-weight: 700; letter-spacing: -.035em; }
h2 { font-size: 1.5rem; letter-spacing: -.02em; }
h3 { font-size: 1.12rem; }
p { max-width: 72ch; }
p:last-child { margin-bottom: 0; }
.muted, .field-hint { color: var(--muted); }
.site-header { background: var(--surface); }
.masthead { min-height: 112px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 22px; }
.brand { color: var(--ink); text-decoration: none; display: flex; flex-direction: column; line-height: 1.3; }
.brand strong { font-size: 1.7rem; letter-spacing: -.03em; }
.brand span { font-size: .95rem; margin-top: 3px; color: var(--muted); }
.account { display: flex; align-items: center; gap: 24px; font-size: .95rem; }
.account > span { max-width: 30ch; overflow-wrap: anywhere; }
.account form { border-left: 1px solid var(--line); padding-left: 24px; flex-shrink: 0; }
.text-button { border: 0; background: none; color: var(--accent); padding: 10px 0; min-height: 44px; text-decoration: underline; text-underline-offset: .2em; }
.text-button:hover { color: var(--accent-hover); }
.header-help { padding-block: 10px; }
.navigation-band { background: var(--ink); color: white; }
.navigation { display: flex; gap: 32px; align-items: stretch; min-height: 58px; }
.navigation a, .navigation > span { display: flex; align-items: center; color: white; text-decoration: none; padding-block: 14px; position: relative; font-size: .98rem; }
.navigation a:hover { text-decoration: underline; }
.navigation :focus-visible { outline-color: #ffdd83; }
.navigation a[aria-current] { font-weight: 650; }
.navigation a[aria-current]::after { content: ""; position: absolute; background: #b9ceda; height: 3px; bottom: 0; inset-inline: 0; }
.main-content { flex: 1; padding-block: 48px 64px; min-width: 0; }
.page-header { margin-bottom: 32px; }
.page-header h1 { margin-bottom: 12px; }
.page-header p { color: var(--muted); font-size: 1.1rem; }
.heading-actions { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 48px; padding: 11px 24px; border: 1px solid var(--accent); border-radius: 6px; background: var(--accent); color: white; font-size: 1rem; line-height: 1.4; font-weight: 600; text-align: center; text-decoration: none; }
.button:hover { color: white; background: var(--accent-hover); border-color: var(--accent-hover); }
.button.secondary { color: var(--accent); background: var(--surface); border-color: #7a8e9d; }
.button.secondary:hover { background: #eaf1f5; border-color: var(--accent); }
.button.danger { background: var(--danger); border-color: var(--danger); }
.button.danger:hover { background: #7f1d26; }
.full-width { width: 100%; }
.document-list { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); overflow: hidden; }
.document-row { display: grid; grid-template-columns: 48px minmax(0, 1fr) 200px; align-items: center; gap: 28px; padding: 30px 32px; }
.document-row + .document-row { border-top: 1px solid var(--line); }
.document-icon { color: var(--ink); }
.document-description { min-width: 0; }
.document-description h2 { font-size: 1.4rem; margin-bottom: 8px; overflow-wrap: anywhere; }
.document-description p { color: var(--muted); }
.document-actions { display: flex; flex-direction: column; align-items: stretch; gap: 6px; text-align: center; }
.document-actions > a:not(.button) { padding: 8px 4px; min-height: 44px; }
.workflow { margin-top: 40px; }
.workflow h2 { font-size: 1.35rem; margin-bottom: 24px; }
.workflow-list { list-style: none; counter-reset: workflow; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.workflow-list li { counter-increment: workflow; position: relative; padding-left: 52px; }
.workflow-list li::before { content: counter(workflow); display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid #718a9c; border-radius: 50%; position: absolute; left: 0; top: 0; font-weight: 600; background: white; }
.workflow-list strong { display: block; padding-block: 2px 6px; }
.workflow-list p { font-size: .95rem; color: var(--muted); margin: 0; }
.site-footer { background: var(--surface); border-top: 1px solid var(--line); }
.footer-content { display: flex; justify-content: space-between; gap: 16px; padding-block: 22px; font-size: .88rem; color: var(--muted); }
.footer-content a { color: inherit; }
.login-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 410px); gap: clamp(32px, 6vw, 80px); align-items: center; padding-block: 36px; }
.login-intro h1 { font-size: clamp(2.25rem, 4vw, 3.3rem); margin-bottom: 24px; }
.login-intro p { max-width: 46ch; font-size: 1.1rem; }
.login-intro .muted { font-size: .95rem; margin-top: 28px; }
.login-panel, .content-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 32px; }
.login-panel h2 { margin-bottom: 28px; }
.login-help { font-size: .9rem; color: var(--muted); margin-top: 24px; }
.field { min-width: 0; margin-bottom: 24px; }
.field label, .field-label { display: block; font-weight: 600; margin-bottom: 8px; line-height: 1.45; }
.field input, .field textarea, .field select { display: block; width: 100%; max-width: 100%; min-height: 48px; border: 1px solid #7a8e9d; border-radius: 5px; background: white; color: var(--ink); padding: 11px 12px; line-height: 1.5; }
.field textarea { resize: vertical; min-height: 112px; }
/* Keep the caret inset without changing the native select menu. */
select:not([multiple]):not([size]), select:not([multiple])[size="1"] {
    -webkit-appearance: none; appearance: none; padding-right: 36px;
    background-image: linear-gradient(45deg, transparent 40%, currentColor 40%, currentColor 60%, transparent 60%), linear-gradient(135deg, transparent 40%, currentColor 40%, currentColor 60%, transparent 60%);
    background-position: right 18px center, right 12px center;
    background-size: 6px 6px; background-repeat: no-repeat;
}
.field input:hover, .field textarea:hover, .field select:hover { border-color: var(--ink); }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); }
.field-hint { display: block; font-size: .9rem; line-height: 1.55; margin: -2px 0 10px; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; font-size: .94rem; color: var(--muted); }
.breadcrumbs span { overflow-wrap: anywhere; min-width: 0; }
.editor { max-width: 920px; margin-inline: auto; }
.steps { display: flex; list-style: none; padding: 0; margin: 0 0 32px; gap: 24px; counter-reset: step; }
.steps li { counter-increment: step; flex: 1; display: flex; gap: 10px; align-items: center; color: var(--muted); border-bottom: 2px solid var(--line); padding-bottom: 16px; font-size: .95rem; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 28px; height: 28px; flex-shrink: 0; border: 1px solid #7a8e9d; border-radius: 50%; font-size: .85rem; }
.steps li[aria-current] { color: var(--ink); font-weight: 600; border-color: var(--accent); }
.steps li[aria-current]::before { color: white; border-color: var(--accent); background: var(--accent); }
.form-section { min-width: 0; margin: 0 0 24px; padding: 32px; border: 1px solid var(--line); border-radius: 8px; background: white; }
.form-section > h2 { margin-bottom: 24px; font-size: 1.5rem; }
.form-section > p { color: var(--muted); }
.form-instructions { padding-block: 20px; }
.form-instructions summary { cursor: pointer; font-weight: 600; line-height: 1.5; }
.form-instructions[open] summary { margin-bottom: 16px; }
.form-section .field:last-child { margin-bottom: 0; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
.field-grid .field:last-child { margin-bottom: 24px; }
.choice { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; padding-block: 10px; cursor: pointer; line-height: 1.5; }
.choice input { width: 21px; height: 21px; flex-shrink: 0; margin: 2px 0 0; accent-color: var(--accent); }
.choice-group { border: 0; padding: 0; margin: 0 0 24px; min-width: 0; }
.choice-group legend { font-weight: 600; padding: 0; margin-bottom: 8px; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding-block: 8px; }
.form-actions p { font-size: .92rem; color: var(--muted); margin: 0; }
.form-actions form { margin: 0; }
.notice { padding: 16px 20px; border-left: 4px solid var(--accent); border-radius: 0 5px 5px 0; background: #e4eef5; margin-bottom: 24px; }
.notice.error { background: #f9eaec; color: #7d1f2a; border-color: var(--danger); }
.notice.success { background: #e8f3ed; color: #205239; border-color: #347650; }
.notice ul { margin: 8px 0 0; padding-left: 24px; }
.narrow { max-width: 640px; }
.empty-state { padding: 48px 32px; }
.empty-state p { color: var(--muted); }
.saved-list { list-style: none; padding: 0; margin: 0; border: 1px solid var(--line); border-radius: 8px; background: white; }
.saved-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px; }
.saved-row + .saved-row { border-top: 1px solid var(--line); }
.saved-description { min-width: 0; overflow-wrap: anywhere; }
.saved-description h2 { font-size: 1.12rem; line-height: 1.45; margin-bottom: 6px; }
.saved-description p { font-size: .92rem; color: var(--muted); }
.row-actions { display: flex; flex-wrap: wrap; gap: 4px 20px; flex-shrink: 0; align-items: center; }
.row-actions a { padding-block: 10px; min-height: 44px; }
.row-actions .delete-link { color: var(--danger); }
.contact-details { margin: 28px 0; }
.contact-details > div { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 16px; padding-block: 12px; border-bottom: 1px solid var(--line); }
.contact-details dt { color: var(--muted); }
.contact-details dd { margin: 0; overflow-wrap: anywhere; }
.document-scroll { overflow: auto; max-height: 75vh; border: 1px solid #bdcbd5; border-radius: 6px; background: #e5ebef; padding: 24px; margin-bottom: 24px; }
.pdf-print { display: none; }
.preview-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 20px; }
.preview-toolbar[hidden], .document-canvas[hidden] { display: none; }
.preview-pagination { display: flex; align-items: center; gap: 16px; }
.preview-pagination output { min-width: 90px; text-align: center; font-size: .95rem; }
.preview-pagination .button { padding-inline: 16px; }
.button:disabled { cursor: default; background: #e8edf1; color: var(--muted); border-color: var(--line); }
.preview-toolbar .field { margin: 0; }
.preview-toolbar .field label { font-size: .9rem; margin-bottom: 4px; }
.document-canvas { width: max-content; min-width: 100%; }
.document-sheet { width: calc(210mm * var(--document-zoom, 1)); height: calc(297mm * var(--document-zoom, 1)); margin-inline: auto; overflow: hidden; background: white; box-shadow: 0 2px 8px #17344b1a; }
.document-frame { display: block; width: 210mm; height: 297mm; border: 0; transform: scale(var(--document-zoom, 1)); transform-origin: top left; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link:focus { position: fixed; top: 12px; left: 12px; padding: 12px 20px; z-index: 10; background: white; border: 2px solid var(--ink); }
