:root {
  color-scheme: dark;
  --primary: #57d7e5;
  --on-primary: #06232e;
  --background: #091b2b;
  --navigation: #0c2233;
  --surface: #142f43;
  --surface-raised: #1d3d52;
  --field: #0d2537;
  --text: #e8f2f8;
  --muted: #a8c0ce;
  --border: #355568;
  --outline: #648398;
  --accent: #50d6b9;
  --focus: #57d7e5;
  --danger: #ffb4ac;
  --danger-surface: #5f2627;
  --on-danger: #591e1e;
  --warning: #e7b36b;
  --warning-surface: #4a3522;
  --on-warning: #ffe3b7;
  --success-surface: #174a43;
  --on-success: #d1f8ec;
  --info-surface: #184653;
  --on-info: #d3f5fc;
  --brand-mark-background: #92afc2;
  --radius: 12px;
  --card-radius: 14px;
  --dialog-radius: 18px;
  --button-face: linear-gradient(180deg, #b9f4f8 0%, #88e8ef 3.5%, #43c7d6 94%, #2ba8b7 100%);
  --button-face-hover: linear-gradient(180deg, #d1fafc 0%, #a2eef3 3.5%, #57d7e5 94%, #37bdcb 100%);
  --button-face-pressed: linear-gradient(180deg, #60d3de 0%, #49c5d2 3.5%, #50ccd8 94%, #3fb4c0 100%);
  --secondary-face: linear-gradient(180deg, #41657a 0%, #294d63 3.5%, #1d3d52 94%, #102c3f 100%);
  --secondary-face-hover: linear-gradient(180deg, #476d82 0%, #345d73 3.5%, #254b61 94%, #17394e 100%);
  --secondary-face-pressed: linear-gradient(180deg, #24485d 0%, #173448 3.5%, #1b3b50 94%, #102c3f 100%);
  --button-shadow: 0 5px 10px #00080f70, inset 0 1px 0 #ffffff38;
  --button-shadow-hover: 0 7px 14px #00080f80, inset 0 1px 0 #ffffff45;
  --button-shadow-pressed: 0 1px 3px #00080f80, inset 0 1px 2px #06232e30;
  --panel-shadow: 0 4px 12px #00080f35;
  --scroll-track: #0d2537;
  --scroll-thumb: #7896a8;
  --scroll-hover: #a8c0ce;
  font-family: 'Segoe UI', Inter, sans-serif;
  color: var(--text);
  background: var(--background);
  font-synthesis: none;
  line-height: 1.5;
  scrollbar-color: var(--scroll-thumb) var(--scroll-track);
  scrollbar-width: auto;
}
* { box-sizing: border-box; scrollbar-color: var(--scroll-thumb) var(--scroll-track); scrollbar-width: auto; }
::selection { background: #57d7e54d; color: var(--text); }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--scroll-track); }
::-webkit-scrollbar-thumb { background: var(--scroll-thumb); border: 3px solid var(--scroll-track); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--scroll-hover); }
::-webkit-scrollbar-thumb:active { background: var(--primary); }
body { margin: 0; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { touch-action: manipulation; }
button, a { -webkit-tap-highlight-color: transparent; }
button, .button-link, .reset-button {
  cursor: pointer; min-height: 54px; border: 1px solid #9cebf2;
  border-radius: var(--radius); padding: 12px 18px; background: var(--button-face);
  color: var(--on-primary); font-weight: 700; box-shadow: var(--button-shadow);
  transition: box-shadow .12s ease-out, border-color .12s ease-out;
}
button:hover, .button-link:hover, .reset-button:hover { background: var(--button-face-hover); color: var(--on-primary); box-shadow: var(--button-shadow-hover); }
button:active, .button-link:active, .reset-button:active { background: var(--button-face-pressed); box-shadow: var(--button-shadow-pressed); transform: translateY(1px); }
button:disabled, .reset-button:disabled {
  opacity: 1; color: #7896a8; background: #1d3443; border-color: var(--border);
  cursor: not-allowed; transform: none; box-shadow: none;
}
a { color: var(--primary); text-underline-offset: 3px; }
a:hover { color: #b9f4f8; }
a:active { color: var(--accent); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
[hidden] { display: none !important; }
.secondary, .activity-stepper button, .agency-jump button {
  color: var(--text); background: var(--secondary-face); border-color: var(--outline);
}
.secondary:hover, .activity-stepper button:hover, .agency-jump button:hover { color: var(--text); background: var(--secondary-face-hover); }
.secondary:active, .activity-stepper button:active, .agency-jump button:active { background: var(--secondary-face-pressed); }
.text-button { background: transparent; color: var(--primary); border-color: transparent; padding-inline: 12px; box-shadow: none; }
.text-button:hover { background: var(--info-surface); color: var(--on-info); box-shadow: none; }
.text-button:active { background: var(--info-surface); box-shadow: none; }
.danger { background: linear-gradient(180deg, #ffd7d2, #ffb4ac 12%, #ed9189 94%, #df9088); color: var(--on-danger); border-color: #ffdad6; }
.danger:hover { background: linear-gradient(180deg, #ffe9e6, #ffc7bf 12%, #ffb4ac 94%, #df9088); color: var(--on-danger); }
.danger:active { background: #ed9189; }
.danger-text { color: var(--danger); }
.danger-text:hover { color: #ffe7e3; background: var(--danger-surface); }
.actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.actions.separate { justify-content: space-between; }
.skip { position: fixed; top: -100px; left: 20px; z-index: 100; background: var(--primary); color: var(--on-primary); padding: 14px; border-radius: var(--radius); }
.skip:focus { top: 12px; }
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100dvh; }
.sidebar { background: var(--navigation); color: var(--muted); padding: 34px 20px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100dvh; overflow-y: auto; border-right: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-size: 24px; font-weight: 750; letter-spacing: .04em; line-height: 1.2; min-width: 0; min-height: 48px; }
.brand:hover { color: var(--text); }
.brand small { display: block; font-size: 13px; letter-spacing: .04em; font-weight: 500; color: var(--muted); margin-top: 6px; }
.brand-mark { display: block; width: 48px; height: 48px; object-fit: contain; flex: none; background: var(--brand-mark-background); border-radius: 10px; }
.brand-wordmark { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 6px; min-width: 0; }
.brand-ldx { color: var(--primary); font-size: 14px; font-weight: 700; letter-spacing: .1em; }
.brand-comet { color: var(--text); font-size: 22px; font-weight: 800; letter-spacing: .055em; }
.mobile-brand { display: none; }
.nav-label { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; margin: 46px 12px 10px; color: var(--muted); }
nav { display: flex; flex-direction: column; gap: 6px; }
nav a { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 12px 15px; text-decoration: none; border-radius: var(--radius); color: inherit; font-weight: 550; font-size: 14px; }
nav a:hover { background: var(--surface-raised); color: var(--text); }
nav a[aria-current=page] { background: #184c58; color: var(--text); box-shadow: inset 3px 0 var(--primary); }
nav a .nav-icon { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; flex: none; font-size: 19px; text-align: center; color: var(--primary); }
nav a .nav-icon svg { display: block; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-foot { display: flex; gap: 9px; font-size: 13px; margin-top: auto; padding: 48px 12px 0; color: var(--muted); }
.connected-dot { background: var(--accent); border-radius: 50%; height: 7px; width: 7px; flex-shrink: 0; margin-top: 5px; }
.workspace { min-width: 0; }
.topbar { background: var(--navigation); border-bottom: 1px solid var(--border); min-height: 80px; padding: 14px 36px; display: flex; gap: 16px; align-items: center; box-shadow: 0 3px 10px #00080f30; }
.workspace-label { text-transform: uppercase; letter-spacing: .09em; font-size: 13px; color: var(--muted); margin-right: auto; }
.topbar #identity { text-align: right; font-size: 13px; font-weight: 600; min-width: 0; }
.topbar #identity small { display: block; font-weight: 400; color: var(--muted); font-size: 13px; }
.menu-toggle { display: none; }
main { padding: 34px 36px; max-width: 1540px; margin: auto; min-height: calc(100dvh - 145px); }
/* Route focus announces the landmark; only interactive controls need a ring. */
main#content:focus { outline: none; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: 28px; line-height: 1.2; letter-spacing: -.025em; margin-bottom: 10px; }
h2 { font-size: 19px; line-height: 1.3; margin-bottom: 10px; }
h3 { font-size: 15px; }
p { margin-bottom: 16px; }
.eyebrow { color: var(--accent); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; font-size: 13px; margin-bottom: 8px; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.page-heading p:last-child { color: var(--muted); font-size: 14px; max-width: 700px; margin-bottom: 0; }
.page-footer { display: flex; justify-content: space-between; gap: 16px; padding: 20px 36px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--border); }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--card-radius); padding: 24px; margin-bottom: 22px; box-shadow: var(--panel-shadow); }
.panel-title { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; }
.panel-title h2 { margin-bottom: 0; }
.muted { color: var(--muted); font-size: 13px; }
.mono { font-family: Consolas, monospace; }
.tag { display: inline-block; font-size: 13px; font-weight: 650; line-height: 1.4; padding: 5px 9px; background: var(--surface-raised); color: var(--text); border-radius: 6px; white-space: nowrap; }
.tag.open, .tag.active { background: var(--success-surface); color: var(--on-success); }
.tag.closed, .tag.deleted, .tag.inactive, .tag.voided { background: var(--danger-surface); color: #ffe7e3; }
.tag.urgent { color: #ffe7e3; background: var(--danger-surface); }
.tag.high { background: var(--warning-surface); color: var(--on-warning); }
.case-number { font-family: Consolas, monospace; font-weight: 700; letter-spacing: .01em; }
.case-rail { border-left: 1px solid var(--accent); }
.filters, .form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.filters { grid-template-columns: 2fr repeat(2, minmax(120px, 1fr)); align-items: end; margin-bottom: 22px; }
.filters .actions { align-self: end; }
.form-grid .wide { grid-column: 1/-1; }
label.field { display: flex; flex-direction: column; gap: 7px; font-size: 13px; font-weight: 600; min-width: 0; }
input, select, textarea { min-height: 48px; border: 1px solid var(--outline); border-radius: var(--radius); padding: 11px 12px; color: var(--text); background: var(--field); max-width: 100%; width: 100%; caret-color: var(--primary); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
select { cursor: pointer; }
option, optgroup { color: var(--text); background: var(--surface-raised); }
option:checked { color: var(--on-primary); background: var(--primary); }
select[multiple] { min-height: 136px; }
textarea { resize: none; min-height: 112px; field-sizing: content; }
input:hover, select:hover, textarea:hover { border-color: var(--muted); }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--primary); }
input[aria-invalid=true], select[aria-invalid=true], textarea[aria-invalid=true] { border-color: var(--danger); }
input:disabled, select:disabled, textarea:disabled { background: #1d3443; color: #7896a8; border-color: var(--border); cursor: not-allowed; }
input[readonly], textarea[readonly] { color: var(--muted); }
input[type=checkbox], input[type=radio] { accent-color: var(--primary); }
input[type=file]::file-selector-button { font: inherit; background: var(--surface-raised); color: var(--text); border: 1px solid var(--outline); border-radius: 8px; padding: 10px 12px; margin-right: 12px; cursor: pointer; }
input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:focus { -webkit-text-fill-color: var(--text); caret-color: var(--primary); box-shadow: 0 0 0 1000px var(--field) inset; }
.field-help { font-size: 13px; font-weight: 400; color: var(--muted); min-height: 16px; }
.field-error { font-size: 13px; font-weight: 500; color: var(--danger); }
.form-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; border-top: 1px solid var(--border); padding-top: 22px; }
.form-error { padding: 14px 16px; border: 1px solid var(--danger); background: var(--danger-surface); color: #ffe7e3; border-radius: var(--radius); margin: 18px 0; }
.notice { padding: 15px 18px; background: var(--info-surface); border: 1px solid var(--outline); border-radius: var(--radius); color: var(--on-info); font-size: 13px; margin: 16px 0; }
.notice.warning { background: var(--warning-surface); border-color: #a7783d; color: var(--on-warning); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; font-weight: 400; padding: 8px 0; }
.check input { width: 20px; min-height: 20px; margin-top: 1px; accent-color: var(--primary); }
fieldset { border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; min-width: 0; }
legend { font-size: 13px; font-weight: 600; padding: 0 5px; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 4px 18px; }
.search-control { display: flex; gap: 6px; }
.search-control input { min-width: 0; }
.search-control button { flex-shrink: 0; padding-inline: 12px; }
.password-control { display: flex; gap: 6px; }
.password-control input { min-width: 0; }
.password-control button { font-size: 13px; padding-inline: 12px; }
.table-wrap { overflow-x: auto; scrollbar-gutter: stable; min-height: 210px; }
table { border-collapse: collapse; width: 100%; text-align: left; font-size: 13px; }
th { font-size: 13px; color: var(--muted); background: var(--field); text-transform: uppercase; letter-spacing: .045em; font-weight: 650; }
th, td { padding: 15px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
td { line-height: 1.6; }
tbody tr:hover { background: #1a394e; }
td small { display: block; color: var(--muted); font-size: 13px; }
td a { font-weight: 650; }
.number { text-align: right; font-variant-numeric: tabular-nums; }
.table-actions { display: flex; gap: 5px; flex-wrap: wrap; }
.table-actions button { font-size: 13px; padding: 7px 10px; }
.table-actions a { display: inline-flex; align-items: center; min-height: 48px; padding: 7px 8px; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 18px; font-size: 13px; color: var(--muted); }
.pager div { display: flex; gap: 8px; }
.pager button { padding-inline: 16px; }
.empty { padding: 48px 16px; text-align: center; color: var(--muted); }
.empty h3 { color: var(--text); font-size: 17px; margin-bottom: 7px; }
.loading { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 230px; color: var(--muted); font-size: 14px; }
.spinner { width: 19px; height: 19px; border: 2px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.detail-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.detail-grid dt { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .035em; }
.detail-grid dd { margin: 6px 0 0; font-size: 14px; overflow-wrap: anywhere; }
.narrative { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }
.stats { display: flex; gap: 24px; flex-wrap: wrap; margin: 18px 0; }
.stat strong { display: block; font-family: Consolas, monospace; font-size: 25px; }
.stat span { color: var(--muted); font-size: 13px; }
.split { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, 1fr); gap: 22px; }
.file-input { border: 1px dashed var(--outline); padding: 24px; background: var(--field); }
.file-input input { border: 0; background: transparent; padding: 0; }
.steps { font-size: 13px; padding-left: 21px; color: var(--muted); }
.steps li { margin: 10px 0; }
.code-block { padding: 14px; background: var(--field); color: var(--text); border-radius: var(--radius); font-family: Consolas, monospace; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.reason { white-space: pre-wrap; }
.button-link { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; font-size: 14px; }
.reset-button { width: auto; }
.offline { position: sticky; top: 0; z-index: 20; background: var(--warning-surface); color: var(--on-warning); text-align: center; padding: 12px; font-size: 13px; border-bottom: 1px solid var(--warning); }
.notifications { position: fixed; right: 24px; bottom: 24px; z-index: 50; max-width: min(450px, calc(100vw - 32px)); border-radius: var(--radius); box-shadow: 0 6px 24px #00080f80; background: var(--success-surface); color: var(--on-success); font-size: 14px; border: 1px solid var(--accent); }
.notifications:empty { border: 0; }
.notifications:not(:empty) { padding: 17px 22px; }
.notifications.error { background: var(--danger-surface); color: #ffe7e3; border-color: var(--danger); }
dialog { color: var(--text); background: var(--surface); border: 1px solid var(--outline); border-radius: var(--dialog-radius); width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); padding: 26px; overflow: auto; box-shadow: 0 20px 60px #00080fb3; }
dialog::backdrop { background: #000a12dd; }
dialog h2 { font-size: 21px; }
dialog .form-actions { justify-content: flex-end; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 22px; }
#drawer { margin: 0; height: 100dvh; max-height: 100dvh; width: min(350px, 90vw); border-radius: 0; background: var(--navigation); color: var(--text); }
#drawer .secondary { color: var(--text); background: var(--secondary-face); border-color: var(--outline); }
#drawer .dialog-head strong { font-size: 17px; }
.login-layout { display: grid; grid-template-columns: minmax(300px, .8fr) 1fr; min-height: 100dvh; }
.login-intro { padding: 64px; display: flex; flex-direction: column; background: var(--navigation); color: var(--text); border-right: 1px solid var(--border); }
.login-intro h1 { font-size: 40px; max-width: 460px; margin-top: auto; padding-top: 100px; letter-spacing: -.035em; line-height: 1.15; }
.login-intro p { font-size: 16px; line-height: 1.8; color: var(--muted); max-width: 400px; }
.login-intro .intro-foot { margin-top: auto; padding-top: 100px; text-transform: uppercase; letter-spacing: .12em; font-size: 13px; color: var(--muted); }
.login-form-wrap { padding: 50px 32px; display: flex; align-items: center; justify-content: center; }
.login-card { width: 100%; max-width: 420px; }
.login-card h2 { font-size: 27px; margin-bottom: 12px; }
.login-card form { display: flex; flex-direction: column; gap: 18px; margin-top: 32px; }
.login-card .form-actions { margin-top: 4px; }
.login-card .form-actions button { width: 100%; }
.print-only { display: none; }
.login-card .account-help { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }
.login-card .account-help p:last-child { margin-bottom: 0; }
.auth-enrollment { min-width: 0; }
.auth-enrollment > p:first-child { margin-top: 0; }
.auth-qr-figure { margin: 20px 0 16px; text-align: center; }
.auth-qr { display: block; width: 264px; max-width: 100%; height: auto; margin: 0 auto; border: 1px solid var(--border); }
.auth-qr-figure figcaption { margin-top: 10px; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.auth-manual { border: 1px solid var(--border); border-radius: var(--radius); padding: 0 14px; background: var(--field); }
.auth-manual summary { min-height: 48px; align-content: center; padding: 12px 0; cursor: pointer; font-size: 13px; font-weight: 600; }
.auth-manual summary:hover { color: var(--primary); }
.auth-manual summary:active { color: var(--accent); }
.auth-manual summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 3px; }
.auth-manual[open] { padding-bottom: 14px; }
.auth-manual > p { margin-top: 0; }
.auth-setup-privacy { margin: 12px 0 0; }
.session-notice { margin: 16px 24px 0; padding: 16px 20px; border: 1px solid var(--outline); border-radius: var(--radius); background: var(--info-surface); color: var(--on-info); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.session-notice[hidden] { display: none; }
.session-notice p { margin: 0; }
.license-usage { font-size: 1.25rem; }
table caption { text-align: left; padding: 0 0 12px; color: var(--muted); font-size: .9rem; }
.download-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 24px; margin: 24px 0; }
.download-options article { padding: 20px; border: 1px solid var(--border); border-radius: var(--card-radius); background: var(--surface); }
.download-options details { margin-top: 16px; }
.download-options summary { cursor: pointer; min-height: 48px; display: list-item; }
.download-options summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.download-hash { overflow-wrap: anywhere; font-family: Consolas, monospace; font-size: .875rem; }
.agency-jump { display: flex; flex-direction: row; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.agency-jump button { font-size: .875rem; }
.agency-jump button[aria-pressed=true] { background: var(--button-face); border-color: #9cebf2; color: var(--on-primary); }
.agency-field .panel-title { margin-bottom: 12px; }
.field-info { display: inline-flex; align-items: center; justify-content: center; width: 48px; min-height: 48px; padding: 10px; flex: none; border-radius: 50%; }
.field-info[aria-expanded=true] { background: var(--info-surface); border-color: var(--primary); color: var(--on-info); }
.agency-help { max-width: 75ch; }
.agency-field .field, .choice-list label { font-size: .875rem; }
.agency-choice-editor { margin-top: 24px; }
.choice-transfer { display: grid; grid-template-columns: minmax(0, 1fr) 170px minmax(0, 1fr); gap: 20px; align-items: stretch; }
.choice-list { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.choice-list label { font-weight: 600; }
.choice-list select { min-height: 252px; height: 100%; padding: 8px; }
.choice-list option { padding: 8px; overflow-wrap: anywhere; }
.transfer-actions { display: flex; flex-direction: column; gap: 8px; justify-content: center; padding-top: 28px; }
.transfer-actions button { display: flex; align-items: center; justify-content: flex-start; gap: 8px; padding-inline: 10px; font-size: .875rem; white-space: nowrap; }
.transfer-actions svg { flex: none; }
.choice-edit-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; border-top: 1px solid var(--border); padding-top: 24px; margin-top: 20px; }
.choice-edit-tools > div { min-width: 0; }
.choice-edit-tools button { margin-top: 12px; font-size: .875rem; }
.choice-feedback { min-height: 24px; margin: 20px 0 0; font-size: .875rem; color: var(--text); }
.status-default { max-width: 480px; margin-top: 24px; }
.historical-filters { grid-column: 1/-1; min-width: 0; }
.historical-filters summary { cursor: pointer; min-height: 48px; padding-block: 12px; font-size: .875rem; font-weight: 600; }
.historical-filters .form-grid { margin-block: 12px; }
.agency-choice-editor > .field-help { font-size: .875rem; margin-top: 10px; }
.agency-jump + * { scroll-margin-top: 20px; }
.remember-device .check { min-height: 48px; align-items: center; font-size: .875rem; }
.remember-device .check input { margin-top: 0; }
.remember-device .field-help { font-size: .8125rem; line-height: 1.6; margin-bottom: 0; }
.topbar #identity .agency-name { font-size: .875rem; font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
.access-disclosure { min-height: 48px; padding-block: 12px; font-weight: 600; font-size: .875rem; cursor: pointer; }
.access-disclosure:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.agency-profile-details { margin-top: 24px; }
.sharing-permissions { margin-block: 20px; }
.sharing-permissions .check { min-height: 48px; align-items: center; font-size: .875rem; }
.sharing-permissions .check input { margin-top: 0; }
.recent-users-heading { margin-top: 28px; }
.shared-source { font-size: .875rem; align-self: center; margin: 0; }
.activity-context { background: var(--field); border: 1px solid var(--border); border-radius: var(--card-radius); padding: 20px; margin-bottom: 24px; overflow-wrap: anywhere; }
.activity-context h2 { color: var(--primary); font-family: Consolas, monospace; font-size: 22px; }
.activity-issue { font-weight: 650; margin-bottom: 10px; }
.activity-location-summary { color: var(--text); margin-bottom: 12px; }
.activity-description { color: var(--muted); max-width: 75ch; max-height: 9em; overflow-y: auto; white-space: pre-wrap; padding-right: 10px; }
.activity-description:last-child { margin-bottom: 0; }
.activity-counts { grid-column: 1/-1; padding: 20px; }
.activity-count-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.activity-counter { min-width: 0; }
.activity-counter > label, .activity-counter > span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.activity-stepper { display: grid; grid-template-columns: 48px minmax(60px, 1fr) 48px; align-items: center; gap: 10px; }
.activity-stepper button { width: 48px; min-height: 48px; padding: 8px; font-size: 24px; line-height: 1; }
.activity-stepper input { text-align: center; font-family: Consolas, monospace; font-size: 22px; font-weight: 700; color: var(--text); min-width: 0; padding-inline: 6px; }
.activity-stepper input::placeholder { font-family: 'Segoe UI', Inter, sans-serif; font-size: 13px; font-weight: 400; }
.stat strong small { display: block; font-family: 'Segoe UI', Inter, sans-serif; font-size: 13px; font-weight: 400; color: var(--muted); }
.activity-stepper input::-webkit-inner-spin-button, .activity-stepper input::-webkit-outer-spin-button { appearance: none; margin: 0; }
.activity-stepper input[type=number] { appearance: textfield; }
.activity-picker { cursor: pointer; }
.activity-draft-status { color: var(--muted); font-size: 13px; min-height: 1.5em; margin-top: 14px; }
#clear-activity-totals { margin-top: 20px; }
.legacy-details { margin-block: 12px; min-width: 0; }
.legacy-details > .form-grid { margin-top: 12px; }
.internal-comments { margin-block: 20px; padding: 16px; background: var(--field); border: 1px solid var(--outline); border-radius: var(--radius); min-width: 0; }
.internal-comments > .field, .internal-comments [data-internal-content] { margin-top: 16px; }
.internal-comments [data-internal-status] { margin-top: 12px; }
button:disabled, button:disabled:hover, button:disabled:active,
input.reset-button:disabled, input.reset-button:disabled:hover, input.reset-button:disabled:active {
  color: #7896a8; background: #1d3443; border-color: var(--border);
  cursor: not-allowed; transform: none; box-shadow: none;
}
@media (max-width: 1100px) {
  main { padding: 28px 24px; }
  .topbar { padding-inline: 24px; }
  .filters { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr 1fr; }
  .login-intro { padding: 40px; }
  .choice-transfer { grid-template-columns: minmax(0, 1fr) 150px minmax(0, 1fr); gap: 12px; }
  .transfer-actions button { font-size: .8125rem; }
  .choice-edit-tools { grid-template-columns: 1fr; }
}
@media (max-width: 800px) {
  .shell { display: block; }
  .sidebar { display: none; }
  .menu-toggle { display: block; }
  .topbar { padding: 12px 16px; min-height: 72px; gap: 10px; flex-wrap: wrap; }
  .mobile-brand { display: flex; flex: 1; min-width: 120px; gap: 8px; }
  .mobile-brand .brand-mark { width: 36px; height: 36px; border-radius: 8px; }
  .mobile-brand .brand-wordmark { flex-direction: column; gap: 2px; }
  .mobile-brand .brand-ldx { font-size: 13px; }
  .mobile-brand .brand-comet { font-size: 18px; }
  .workspace-label { display: none; }
  .topbar #identity { flex-basis: 100%; order: 2; text-align: left; }
  .topbar #identity small { max-width: none; overflow-wrap: anywhere; }
  .topbar #menu-slot, .topbar #signout-slot { flex: none; }
  .topbar #menu-slot button, .topbar #signout-slot button { min-height: 48px; }
  .topbar #signout { font-size: 13px; padding-inline: 8px; }
  main { padding: 24px 16px; }
  .page-heading { flex-direction: column; gap: 18px; }
  h1 { font-size: 25px; }
  .panel { padding: 18px; }
  .form-grid { gap: 16px; }
  .filters { gap: 12px; }
  .page-footer { padding-inline: 16px; }
  .login-layout { grid-template-columns: 1fr; }
  .login-intro { padding: 24px; border-right: 0; border-bottom: 1px solid var(--border); }
  .login-intro h1 { font-size: 27px; margin-top: 30px; padding: 0; }
  .login-intro p { margin-bottom: 0; font-size: 14px; max-width: 100%; }
  .login-intro .intro-foot { display: none; }
  .login-form-wrap { padding: 32px 24px; }
  .login-card form { margin-top: 20px; }
  .table-wrap { margin-inline: -6px; }
  .page-footer span { display: none; }
}
@media (max-width: 600px) {
  .session-notice { margin: 12px; display: block; }
  .session-notice button { margin-top: 12px; }
  .choice-transfer { grid-template-columns: 1fr; }
  .choice-list select { height: 190px; min-height: 190px; }
  .transfer-actions { display: grid; grid-template-columns: 1fr 1fr; padding-top: 0; }
  .transfer-actions button { justify-content: center; font-size: .8125rem; }
  .transfer-actions svg { transform: rotate(90deg); }
  .agency-jump { gap: 6px; }
  .agency-jump button { padding-inline: 12px; }
  .choice-edit-tools { gap: 24px; }
  .agency-field .panel-title h2 { overflow-wrap: anywhere; }
}
@media (max-width: 480px) {
  .form-grid, .filters, .detail-grid, .activity-count-grid { grid-template-columns: 1fr; }
  .form-grid .wide { grid-column: auto; }
  .stats { gap: 18px; }
  .panel-title { flex-wrap: wrap; }
  .pager { align-items: flex-start; flex-direction: column; }
  .check-grid { grid-template-columns: 1fr; }
  .notifications { right: 16px; bottom: 16px; }
  .page-heading .actions { width: 100%; }
  .page-heading .actions button { flex: 1; }
  .activity-context, .activity-counts { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  button:active, .button-link:active, .reset-button:active { transform: none; }
}
@media (forced-colors: active) {
  * { scrollbar-color: auto; }
  button, .button-link, .reset-button { background: ButtonFace; color: ButtonText; border: 1px solid ButtonText; box-shadow: none; }
  button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid Highlight; }
  nav a[aria-current=page] { outline: 2px solid Highlight; }
  .tag { border: 1px solid CanvasText; }
}
@media print {
  :root { color-scheme: light; --background: #fff; --surface: #fff; --surface-raised: #fff; --field: #fff; --text: #111; --muted: #444; --border: #bbb; --primary: #004d63; --accent: #00584b; }
  .sidebar, .topbar, nav, .page-footer, .actions, .filters, .pager, .form-actions, .notifications, .offline, .no-print { display: none !important; }
  .shell { display: block; }
  main { padding: 0; max-width: none; }
  .panel { border: 0; padding: 0; box-shadow: none; }
  .table-wrap { overflow: visible; min-height: 0; }
  body, th, td { background: #fff; color: #111; }
  th, td { padding: 7px; }
  .print-only { display: block; }
  h1 { font-size: 23px; }
}

