:root {
    color-scheme: light;
    font: 100%/1.5 "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    --text: #25283a; --muted: #575e72; --line: #d9deeb; --border: #8e98ac;
    --surface: #fff; --bg: #f4f6fb; --canvas: #f6f8fc; --surface-alt: #eef2ff;
    --accent: #1a34e8; --action: #1937ff; --on-action: #fff; --action-hover: #1a32d1;
    --positive: #16603b; --danger: #a72430; --warning: #795000;
    --good-bg: #e6f5eb; --danger-bg: #fff0ef; --warning-bg: #fff4dc;
    --gap: clamp(1rem, 4vw, 3.75rem);
    --control-inset: .875rem;
    --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='m1 1.5 5 5 5-5' fill='none' stroke='%23575e72' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    --postmark: url("./postmark.svg"); --postmark-loader: url("./postmark-loader.svg");
    --stamp: url("./resource-stamp.svg"); --stamp-loader: url("./resource-stamp-loader.svg");
    --pin: url("./inspection-pin.svg"); --pin-loader: url("./inspection-pin-loader.svg");
    color: var(--text); background: var(--bg);
}
:root[data-theme=dark] {
    color-scheme: dark; --text: #f2f6fe; --muted: #b6bed2; --line: #38425a; --border: #7f8ba5;
    --surface: #1b2031; --bg: #101322; --canvas: #191e2d; --surface-alt: #283358;
    --accent: #acbaff; --action: #a9b8ff; --on-action: #101738; --action-hover: #c5ceff;
    --positive: #a5e1b7; --danger: #ffb6b6; --warning: #ffd38b;
    --good-bg: #1c3629; --danger-bg: #44252d; --warning-bg: #393023;
    --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='m1 1.5 5 5 5-5' fill='none' stroke='%23b6bed2' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    --postmark: url("./postmark-white.svg"); --postmark-loader: url("./postmark-loader-white.svg");
    --stamp: url("./resource-stamp-white.svg"); --stamp-loader: url("./resource-stamp-loader-white.svg");
    --pin: url("./inspection-pin-white.svg"); --pin-loader: url("./inspection-pin-loader-white.svg");
}
* {box-sizing:border-box}
body {margin:0}
button,input,select,textarea {font:inherit;color:inherit}
button,select,summary {cursor:pointer}
button:disabled,[disabled] {cursor:default}
button,a {touch-action:manipulation}
a,.text-link {color:var(--accent);text-underline-offset:.19em}
:focus-visible {outline:3px solid var(--accent);outline-offset:3px}
h1,h2,h3,p,dl {margin:0}
h1,h2,h3 {line-height:1.15;overflow-wrap:anywhere}
h1 {font-size:clamp(1.85rem,3.4vw,2.65rem);font-weight:650;line-height:1.13;letter-spacing:-.035em}
h2 {font-size:1.23rem;letter-spacing:-.024em}
h3 {font-size:1.03rem}
small,.hint,.muted,.empty {color:var(--muted)}
.hint,small {font-size:.875rem}
.empty {padding:.7rem 0}
.boot {max-width:33rem;margin:5rem auto;padding:1rem}
.site-header {background:var(--surface);border-top:3px solid #1937ff;border-bottom:1px solid var(--line)}
.header-top,.header-sections,.content,.session-feedback,.login-site {width:min(100%,84rem);margin-inline:auto;padding-inline:var(--gap)}
.header-top,.login-site {display:flex;align-items:center;gap:.9rem;min-height:68px}
.brand {display:inline-flex;align-items:center;gap:.55rem;font-size:1.34rem;font-weight:720;letter-spacing:-.045em;white-space:nowrap}
.brand-mark {width:2.25rem;height:2.25rem;flex:none;background:var(--postmark) center / contain no-repeat}
.content:is([data-section=registry],[data-section=works]) {--section-mark:var(--pin);--section-loader:var(--pin-loader)}
.content:is([data-section=readings],[data-section=reports]) {--section-mark:var(--stamp);--section-loader:var(--stamp-loader)}
.content:is([data-section=registry],[data-section=works],[data-section=readings],[data-section=reports]) .page-heading h1::before {
    content:"";display:inline-block;width:.85em;height:.85em;margin-inline-end:.28em;
    background:var(--section-mark) center / contain no-repeat;vertical-align:-.015em;
}
.boot[role=status],.notice.loading {display:flex;align-items:center;gap:.6rem}
.boot[role=status]::before,.notice.loading::before {
    content:"";flex:0 0 1.5rem;height:1.5rem;background:var(--section-loader,var(--postmark-loader)) center / contain no-repeat;
}
.preferences {margin-inline-start:auto;display:flex;align-items:center;gap:.35rem}
.preferences button,.logout,.menu-toggle {border:1px solid var(--line);border-radius:5px;font-size:.875rem;font-weight:600;background:var(--surface);min-height:44px;padding:.4rem .7rem}
.preferences button:hover,.logout:hover,.menu-toggle:hover {background:var(--surface-alt);border-color:var(--border)}
.theme-control > span {display:inline-flex;gap:.45rem;align-items:center}
.theme-glyph {font:1.35rem/1 Georgia,serif;color:var(--accent)}
:root[data-theme=dark] .to-dark,:root:not([data-theme=dark]) .to-light {display:none}
.identity {display:grid;border-inline-start:1px solid var(--line);padding-inline-start:.95rem;line-height:1.3}
.identity strong,.identity span {font-size:.84rem}
.identity span {color:var(--muted)}
.logout {color:var(--muted);border-color:transparent}
.section-nav,.subnavigation {display:flex;align-items:stretch;gap:0 clamp(.82rem,2.35vw,2rem);flex-wrap:wrap}
.section-link,.subnavigation a {display:inline-flex;align-items:center;min-height:44px;padding:.4rem 0;color:var(--muted);font-size:.95rem;font-weight:590;text-decoration:none;border-bottom:3px solid transparent}
.section-link:hover,.subnavigation a:hover {color:var(--accent);text-decoration:underline}
.section-link[aria-current=page],.subnavigation a[aria-current=page] {color:var(--accent);border-color:var(--accent)}
.mobile-current,.menu-toggle {display:none}
.content {padding-block:clamp(1.5rem,3.2vw,2.85rem) 4rem;display:flex;flex-direction:column;gap:1.1rem;min-width:0}
.content:focus {outline:none}
.page-heading {display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:.8rem;margin-bottom:.3rem}
.page-heading p {margin-top:.55rem;color:var(--muted)}
.breadcrumbs ol {display:flex;flex-wrap:wrap;gap:.35rem .5rem;margin:0;padding:0;list-style:none;color:var(--muted);font-size:.875rem}
.breadcrumbs li+li::before {content:"/";margin-inline-end:.5rem;color:var(--border)}
.breadcrumbs a {color:inherit}
.subnavigation {border-bottom:1px solid var(--line)}
.panel {min-width:0;padding:clamp(1rem,2vw,1.55rem);border:1px solid var(--line);border-radius:6px;background:var(--surface)}
.stack {display:grid;gap:1rem;min-width:0;align-content:start}
.row,.actions,.pagination {display:flex;flex-wrap:wrap;gap:.55rem;align-items:center}
.row {justify-content:space-between}
.form-grid,.grid-2 {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.85rem 1.1rem}
.field {display:flex;flex-direction:column;gap:.3rem;min-width:0}
.field-label,legend {font-weight:600;font-size:.9rem}
input:not([type=checkbox]):not([type=radio]),select,textarea {border:1px solid var(--border);border-radius:5px;background:var(--surface);color:var(--text);min-width:0;max-width:100%;min-height:44px;padding:.48rem .62rem}
select:not([multiple]):not([size]) {
    appearance:none;text-overflow:ellipsis;padding-inline:var(--control-inset) calc(var(--control-inset) + 1.25rem);
    background-image:var(--select-arrow);background-repeat:no-repeat;background-size:.75rem .5rem;
    background-position:right var(--control-inset) center;
}
select:not([multiple]):not([size]):dir(rtl) {background-position:left var(--control-inset) center}
@media (forced-colors:active) {
    select:not([multiple]):not([size]) {appearance:auto;background-image:none;padding-inline-end:var(--control-inset)}
}
input::placeholder,textarea::placeholder {color:var(--muted)}
input[type=checkbox],input[type=radio] {width:18px;height:18px;accent-color:var(--accent)}
.check-label {display:inline-flex;align-items:center;gap:.4rem}
textarea {min-height:5rem;resize:vertical}
button:disabled,input:disabled,select:disabled {opacity:.58}
.btn {display:inline-flex;align-items:center;justify-content:center;gap:.4rem;min-height:44px;border:1px solid var(--border);border-radius:5px;background:var(--surface);color:var(--text);padding:.45rem .86rem;font-size:.9rem;font-weight:600;line-height:1.4;text-decoration:none}
.btn:hover:enabled,a.btn:hover {background:var(--surface-alt);border-color:var(--muted)}
.btn-primary {background:var(--action);border-color:var(--action);color:var(--on-action)}
.btn-primary:hover:enabled,a.btn-primary:hover {background:var(--action-hover);border-color:var(--action-hover);color:var(--on-action)}
.btn-small {min-height:36px;padding:.3rem .6rem;font-size:.86rem}
.text-link {background:transparent;border:0;padding:.1rem 0;font-weight:620;text-align:start;text-decoration:underline;text-decoration-color:transparent}
.text-link:hover,.text-link:focus-visible {text-decoration-color:currentColor}
.tag,.notice {background:var(--surface-alt);color:var(--text)}
.tag {display:inline-flex;padding:.18rem .48rem;border-radius:4px;font-size:.83rem;font-weight:600}
.notice {padding:.7rem .9rem;border-inline-start:3px solid var(--accent);border-radius:2px}
.notice.success {border-color:var(--positive);color:var(--positive);background:var(--good-bg)}
.notice.error,.notice.danger {border-color:var(--danger);color:var(--danger);background:var(--danger-bg)}
.notice.warning {border-color:var(--warning);color:var(--warning);background:var(--warning-bg)}
.error-text {color:var(--danger)}
.table-wrap {width:100%;min-width:0;overflow-x:auto;overscroll-behavior-inline:contain}
.data-table {width:100%;border-collapse:collapse;text-align:left;font-size:.95rem}
.data-table th,.data-table td {padding:.75rem .65rem;vertical-align:middle;overflow-wrap:anywhere;border-bottom:1px solid var(--line)}
.data-table th {text-align:start;font-weight:620;background:var(--canvas);color:var(--muted);font-size:.85rem}
.data-table tr:last-child td {border:0}
.data-table tbody tr:hover {background:var(--canvas)}
.data-table time {white-space:nowrap;font-variant-numeric:tabular-nums}
.form-feedback:empty,.session-feedback:empty {display:none}
.registry-filters {display:grid;grid-template-columns:minmax(12rem,1.5fr) repeat(2,minmax(8rem,1fr)) auto;align-items:end;gap:.7rem}
.registry-filters > .actions {justify-content:flex-end}
.registry-filters input[type=search] {padding-inline:var(--control-inset)}
.registry-identity {display:flex;align-items:center;gap:.65rem;min-width:10rem}
.registry-code {font: .81rem/1.4 ui-monospace,monospace}
.registry-thumb {width:40px;height:40px;object-fit:cover;border-radius:4px}
.form-controls {margin:0;padding:0;min-width:0;border:0;display:grid;gap:.9rem}
.pagination {justify-content:space-between}
.entry-details > summary {font-weight:600;color:var(--accent);min-height:36px}
.entry-details[open] > summary {margin-bottom:.75rem}
.branch-facts {display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:1rem}
.branch-facts dt {font-size:.875rem;color:var(--muted)}
.branch-facts dd {margin:.2rem 0 0;font-variant-numeric:tabular-nums}
.photo-grid {display:flex;gap:.75rem;flex-wrap:wrap}
.photo-grid figure {margin:0}
.photo-grid img,img.branch-photo {display:block;width:115px;height:85px;object-fit:cover;border-radius:4px}
.previous-reading {border-inline-start:3px solid var(--accent);padding:.6rem .75rem;background:var(--surface-alt)}
.skip-link {position:fixed;z-index:100;top:-80px;left:.5rem;padding:.5rem 1rem;background:var(--surface)}
.skip-link:focus {top:.5rem}
.login-page {min-height:100dvh;border-top:3px solid #1937ff}
.login-site {border-bottom:1px solid var(--line)}
.login-card {width:min(calc(100% - 2rem),30rem);margin:clamp(2rem,9vh,5rem) auto;background:var(--surface);border:1px solid var(--line);border-radius:6px}
.login-card.with-demo {display:grid;grid-template-columns:1.1fr 1fr;width:min(calc(100% - 2rem),58rem)}
.login-form,.demo-panel {padding:clamp(1.2rem,3.4vw,2.8rem)}
.login-form h1 {font-size:clamp(2rem,3.1vw,2.8rem);margin-bottom:1.6rem}
.login-fields,.demo-list {display:grid;gap:.9rem}
.login-fields > div:empty {display:none}
.demo-panel {border-inline-start:1px solid var(--line);background:var(--canvas)}
.demo-panel p {margin:.5rem 0 1rem;color:var(--muted)}
.demo-list {gap:0}
.demo-role {color:var(--text);border:0;border-top:1px solid var(--line);background:transparent;display:block;text-align:start;padding:.75rem .2rem}
.demo-role:hover {color:var(--accent)}
.demo-role strong,.demo-role small {display:block}
@media (max-width:860px) {
 .registry-filters {grid-template-columns:repeat(2,minmax(0,1fr))}
 .identity {display:none}
}
@media (max-width:700px) {
 .section-nav {display:none}
 .nav-open .section-nav {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;gap:.1rem .8rem}
 .section-link {min-height:44px}
 .menu-toggle,.mobile-current {display:inline-flex;align-items:center}
 .mobile-current {font-size:.88rem;color:var(--muted)}
 .header-sections {display:flex;flex-wrap:wrap;align-items:center;gap:.45rem .85rem;padding-block:.35rem}
 .header-top,.login-site {gap:.3rem;min-height:58px}
 .brand {font-size:1.1rem}
 .theme-label {position:absolute;clip-path:inset(50%);width:1px;height:1px;overflow:hidden;white-space:nowrap}
 .theme-control {min-width:44px}
 .login-card.with-demo,.form-grid,.grid-2 {grid-template-columns:minmax(0,1fr)}
 .demo-panel {border-inline-start:0;border-top:1px solid var(--line)}
 .login-card {margin-top:1.4rem}
 .btn-small {min-height:44px}
}
@media (max-width:480px) {
 .header-top {flex-wrap:wrap}
 .header-top .logout {padding-inline:.3rem}
 .registry-filters {grid-template-columns:minmax(0,1fr)}
 .registry-filters > .actions .btn {flex:1}
 .data-table th,.data-table td {padding:.55rem .45rem}
 .preferences button {padding-inline:.46rem}
 .brand-mark {width:1.75rem;height:1.75rem}
}
.postal-search {display:flex;align-items:flex-end;gap:.65rem;flex-wrap:wrap}
.postal-search .field {width:min(100%,32rem)}
.postal-facts {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,18rem),1fr));gap:1.25rem 2rem}
.postal-facts dt {font-size:.87rem;color:var(--muted)}
.postal-facts dd {margin:.25rem 0 0;overflow-wrap:anywhere}
.fact-source {display:block;margin-top:.25rem;font-size:.79rem}
.postal-table .data-table :is(td,th):first-child {white-space:nowrap;font-variant-numeric:tabular-nums}
.postal-table .data-table :is(td,th):nth-child(2) {min-width:9rem}
.mobile-column-label {display:none}
@media (max-width:660px) {
 :is(.registry-table,.postal-table) .data-table,:is(.registry-table,.postal-table) tbody {display:block}
 :is(.registry-table,.postal-table) thead {position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 .registry-table tbody tr {display:grid;gap:.4rem;padding:.85rem .2rem;border-top:1px solid var(--line)}
 .registry-table .data-table td {display:block;padding:0;border:0}
 .registry-table .registry-cell {display:grid;grid-template-columns:6rem minmax(0,1fr);gap:.5rem;align-items:baseline}
 .postal-table tbody tr {display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.45rem .7rem;padding:.82rem 0;border-top:1px solid var(--line)}
 .postal-table tbody td {display:block;padding:0;border:0;overflow-wrap:break-word;background:transparent}
 .postal-table tbody td:first-child {grid-column:2;grid-row:1;color:var(--muted)}
 .postal-table tbody td:nth-child(2) {grid-column:1;grid-row:1;min-width:0}
 .postal-table tbody td:nth-child(n+3) {grid-column:1/-1}
 .mobile-column-label {display:inline;color:var(--muted);margin-inline-end:.5rem}
}
.fill-method {color:var(--muted);font-weight:550;line-height:1.35}
