:root {
    --ink: #1c2c3f;
    --navy: #192b40;
    --muted: #586372;
    --paper: #f7f5f0;
    --line: #deded8;
    --copper: #a34526;
    --copper-dark: #793118;
    --gutter: clamp(1rem, 4vw, 3.25rem);
    --width: 82rem;
    --heading-font: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
}
body { margin: 0; background: var(--paper); color: var(--ink); font-family: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: var(--copper); text-underline-offset: .2em; }
a:hover { color: var(--copper-dark); }
.text-secondary, .form-text { color: var(--muted) !important; }
.topbar { background: #fff; border-bottom: 1px solid var(--line); }
.topbar-inner, .topbar-nav, .main-content { max-width: var(--width); margin: auto; padding-inline: var(--gutter); }
.topbar-inner, .topbar-account, .brand { display: flex; align-items: center; }
.topbar-inner { justify-content: space-between; gap: 1rem; padding-block: 1.1rem; }
.brand { color: var(--ink); text-decoration: none; gap: .7rem; }
.brand:hover { color: var(--ink); }
.brand-mark { position: relative; width: 2.5rem; height: 2.5rem; background: var(--navy); border-radius: .55rem; flex: none; }
.brand-mark::before, .brand-mark::after { content: ""; position: absolute; bottom: 24%; width: 18%; transform: skew(-18deg); }
.brand-mark::before { left: 27%; height: 50%; background: #f4c395; }
.brand-mark::after { left: 54%; height: 34%; transform: skew(18deg); background: #fff4e3; }
.brand-type { font: 700 1.7rem/.95 var(--heading-font); letter-spacing: -.055em; }
.brand-name { display: block; margin-top: .35rem; font: 550 .72rem/1.15 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; letter-spacing: .015em; color: var(--muted); }
.topbar-account { gap: 1.25rem; min-width: 0; }
.topbar-account form { flex-shrink: 0; }
.account-name { font-size: .875rem; font-weight: 650; overflow-wrap: anywhere; text-align: end; }
.account-role { display: block; font-size: .72rem; color: var(--muted); font-weight: 500; }
.nav-band { border-top: 1px solid #efeee9; }
.topbar-nav { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.navbar-link { display: flex; align-items: center; min-height: 46px; padding: .55rem 0; border-bottom: 3px solid transparent; font-size: .9rem; font-weight: 550; color: var(--muted); text-decoration: none; }
.navbar-link:hover, .navbar-link[aria-current] { color: var(--copper); border-bottom-color: currentColor; }
.main-content { padding-block: clamp(1.25rem, 3.25vw, 3rem) 4rem; min-width: 0; }
h1 { margin: 0; font: 500 clamp(2.4rem, 4.3vw, 4rem)/1.07 var(--heading-font); letter-spacing: -.045em; overflow-wrap: anywhere; }
h2.h5 { font-size: 1.15rem; font-weight: 700; }
.page-heading { margin-block-end: 1.5rem; }
.page-heading p { margin-top: .65rem; }
.register-banner { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; min-height: clamp(10rem, 16vw, 13.2rem); margin-bottom: 1.5rem; padding: clamp(1.5rem, 3.2vw, 3rem); border-radius: 1rem; background: var(--navy); color: #fffaf2; }
.register-banner::before { content: ""; position: absolute; inset: 0 0 0 auto; z-index: -1; width: 39%; background: url("dispatch.webp") center 50% / cover no-repeat; mask-image: linear-gradient(90deg, transparent, black 18%); }
.banner-copy { width: 59%; }
.banner-copy p { color: #e0e5ea; margin: .7rem 0 0; }
.surface { min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: .85rem; }
.register-tools, .list-toolbar, .detail-section, .section-heading, .empty-state, .page-controls, .total-line { padding: clamp(1rem, 2.4vw, 1.75rem); }
.register-tools { display: flex; align-items: flex-end; flex-wrap: wrap; gap: .65rem 1.3rem; }
.number-search { width: min(100%, 26rem); }
.search-controls, .filter-actions { display: flex; gap: .5rem; }
.form-control, .form-select { min-width: 0; max-width: 100%; min-height: 44px; border: 1px solid #aeb5bc; color: var(--ink); border-radius: .45rem; }
.form-label { font-weight: 600; font-size: .88rem; margin-bottom: .45rem; }
.form-control:focus, .form-select:focus { box-shadow: 0 0 0 .2rem #a3452629; border-color: var(--copper); }
.btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: .55rem 1rem; border-radius: .45rem; font-size: .9rem; font-weight: 600; }
.btn-primary { --bs-btn-bg: var(--copper); --bs-btn-border-color: var(--copper); --bs-btn-hover-bg: var(--copper-dark); --bs-btn-hover-border-color: var(--copper-dark); --bs-btn-active-bg: var(--copper-dark); --bs-btn-active-border-color: var(--copper-dark); }
.btn-outline-secondary { --bs-btn-color: var(--ink); --bs-btn-border-color: #b8bdc2; --bs-btn-hover-bg: var(--navy); --bs-btn-hover-border-color: var(--navy); }
.more-filters summary, .clear-filters { cursor: pointer; padding-block: .65rem; font-size: .9rem; font-weight: 600; }
.more-filters[open] { flex: 1 0 100%; }
.more-filters .document-filters { margin-top: .5rem; }
.document-filters { display: flex; align-items: flex-end; flex-wrap: wrap; gap: .8rem; }
.document-filters > div { flex: 1 1 10rem; min-width: 0; }
.filter-actions { flex-wrap: wrap; }
.errorlist { color: #9b302b; font-size: .875rem; margin: .4rem 0 0; padding-inline-start: 1.1rem; }
.document-table { --bs-table-color: var(--ink); font-size: .95rem; }
.document-table th, .document-table td { padding: .8rem clamp(.75rem, 2vw, 1.75rem); border-color: var(--line); overflow-wrap: anywhere; }
.document-table thead th { background: #f0f0eb; color: #515c66; font-size: .8rem; font-weight: 650; vertical-align: middle; }
.sort-link { display: inline-flex; align-items: center; gap: .3rem; min-height: 28px; color: inherit; text-decoration: none; }
.sort-link:hover { text-decoration: underline; }
[aria-sort] .sort-link { color: var(--ink); }
.document-table tbody tr:last-child > * { border-bottom: 0; }
.table-responsive { border-radius: 0 0 .85rem .85rem; }
.document-number { color: var(--ink); font-variant-numeric: tabular-nums; }
a.document-number { display: inline-flex; gap: .75rem; align-items: center; min-height: 44px; font-weight: 650; text-decoration: none; }
a.document-number:hover { text-decoration: underline; }
.paper-icon { width: 1.05rem; height: 1.28rem; flex: none; border: 1.5px solid #b47a59; border-radius: .15rem; background: linear-gradient(#b47a59, #b47a59) center 42% / 52% 1px no-repeat, linear-gradient(#b47a59, #b47a59) center 64% / 52% 1px no-repeat, #fff5e8; }
.row-action { gap: .55rem; color: var(--copper); border-color: transparent; }
.detail-heading, .page-controls, .total-line { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.back-link { display: inline-block; padding: .5rem 0; margin-bottom: .6rem; }
.document-type { display: block; font: 600 .95rem/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--muted); letter-spacing: 0; }
.transaction-copy, .transaction-download { position: relative; }
.transaction-copy summary, .transaction-download summary { display: list-item; list-style-position: inside; }
.transaction-formats { position: absolute; inset-inline-end: 0; z-index: 2; min-width: 10rem; margin-top: .35rem; padding: .35rem; background: #fff; border: 1px solid var(--line); border-radius: .5rem; box-shadow: 0 .5rem 1.5rem #192b4021; }
.transaction-copy .transaction-formats { inset-inline: 0 auto; min-width: max-content; }
.transaction-formats a, .transaction-formats button { display: block; min-height: 44px; padding: .6rem; color: var(--ink); text-decoration: none; }
.transaction-formats button { width: 100%; border: 0; border-radius: .3rem; background: transparent; text-align: start; }
#transaction-copy-status:not(:empty) { margin-block-end: 1rem; }
#transaction-copy-manual { white-space: pre; overflow: auto; }
.transaction-formats a:hover, .transaction-formats a:focus-visible,
.transaction-formats button:hover, .transaction-formats button:focus-visible { background: var(--paper); }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: 1.2rem; margin-top: 1.2rem; }
.detail-grid dt { color: var(--muted); font-size: .8rem; }
.detail-grid dd { margin: .25rem 0 0; overflow-wrap: anywhere; }
.line-items { margin-top: 1rem; }
.section-heading { margin: 0; }
.serial-list { overflow-wrap: anywhere; }
.page-controls, .total-line { border-top: 1px solid var(--line); justify-content: flex-end; }
.total-line { border-radius: 0 0 .85rem .85rem; color: #fff; background: var(--navy); font-variant-numeric: tabular-nums; }
.total-line dd { font-size: 1.3rem; }
.assignment-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.assignment-actions, .assignment-row-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.assignment-actions { margin-top: 1rem; }
@media (max-width: 720px) {
    .assignment-fields { grid-template-columns: 1fr; }
}
.sign-in { display: grid; grid-template-columns: 42% 1fr; max-width: 52rem; margin: clamp(1rem, 7vh, 5rem) auto; overflow: hidden; }
.sign-in-form { padding: clamp(1.5rem, 4vw, 3rem); }
.sign-in-form h1 { margin-bottom: .7rem; }
.sign-in-art { background: var(--navy) url("dispatch.webp") 67% center / cover no-repeat; }
.skip-link { position: absolute; z-index: 5; padding: .6rem 1rem; background: #fff; }
:focus-visible, .btn:focus-visible, summary:focus-visible { outline: 3px solid #21689f; outline-offset: 2px; }
@media (max-width: 680px) {
    .topbar-inner { flex-wrap: wrap; gap: .65rem; padding-block: .8rem; }
    .topbar-account { gap: .65rem; margin-inline-start: auto; }
    .account-name { max-width: 12rem; }
    .topbar-nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 8.25rem), 1fr)); gap: 0 .85rem; }
    .navbar-link { font-size: .84rem; }
    .register-banner { padding: 1.25rem; min-height: 9rem; }
    .banner-copy { width: 70%; }
    .banner-copy p { font-size: .9rem; }
    .register-banner::before { width: 31%; background-position: 66% center; }
    .document-table th, .document-table td { padding: .65rem .6rem; }
    .register .document-table thead th { font-size: .74rem; }
    .register .row-action { padding-inline: .25rem; }
    .paper-icon { display: none; }
    .register-tools { gap: .2rem .85rem; }
    .number-search { width: 100%; }
    .line-items thead { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
    .line-items table, .line-items tbody, .line-items tr { display: block; }
    .line-items tbody tr { padding: .7rem 1rem; border-top: 1px solid var(--line); }
    .line-items tbody th, .line-items tbody td { display: block; padding: .25rem 0; border: 0; }
    .line-items tbody td[data-label] { display: grid; grid-template-columns: 7rem 1fr; gap: .75rem; text-align: right; }
    .line-items td[data-label]::before { content: attr(data-label); text-align: left; color: var(--muted); }
    .sign-in { grid-template-columns: 1fr; margin-block: .5rem; }
    .sign-in-art { height: 8rem; background-position: center 55%; }
}
@media (max-width: 480px) {
    .topbar-account:has(.account-name) { width: 100%; justify-content: space-between; }
    .account-name { text-align: start; }
    .register .document-table thead th:last-child, .register .document-table tbody td:last-child { display: none; }
    .document-filters > div { flex-basis: 100%; }
    .banner-copy { width: 68%; }
    .register a.document-number { color: var(--copper); text-decoration: underline; }
    .banner-copy h1 { font-size: 2.15rem; }
    .transaction-formats { inset-inline-end: auto; inset-inline-start: 0; }
}
@media (max-width: 680px) {
    .nav-toggle { margin-inline-start: auto; }
    .topbar-account { width: 100%; margin: 0; border-top: 1px solid var(--line); padding-top: .5rem; justify-content: space-between; }
    .topbar-account:not(:has(.account-name)) { justify-content: flex-end; }
    .account-name { max-width: none; text-align: start; }
    .nav-band { background: #faf9f6; }
}
