:root {
    color-scheme: light;
    --ink: #1e282c;
    --subtle: #526368;
    --edge: #d9e1df;
    --paper: #fff;
    --background: #f0f4f2;
    --brand: #124a3e;
    --brand-deep: #103733;
    --soft: #e5f1ec;
    --warn: #77410d;
    --warn-bg: #fff0d9;
}
*, *::before, *::after { box-sizing: border-box; }
html { font-family: "Segoe UI", system-ui, sans-serif; }
body { margin: 0; color: var(--ink); background: var(--background); font-size: .94rem; line-height: 1.45; }
a { color: var(--brand); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
button, input, select { font: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid #11785d; outline-offset: 3px; }
.site-header { color: #fafffc; background: var(--brand-deep); border-bottom: 1px solid #32635a; }
.header-inner, .shell { max-width: 1400px; margin-inline: auto; padding-inline: clamp(1rem, 3.4vw, 3rem); }
.header-inner { min-height: 69px; align-items: center; display: flex; gap: 1.5rem; }
.brand { display: inline-flex; align-items: center; gap: .7rem; color: #fff; text-decoration: none; white-space: nowrap; font-size: 1.1rem; font-weight: 700; }
.brand-mark { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: .5rem; color: var(--brand-deep); background: #bce7c9; font-size: .72rem; letter-spacing: -.02em; }
.header-inner nav { flex: 1; display: flex; gap: clamp(.7rem, 2vw, 1.5rem); }
.header-inner nav a, .site-header .button { color: #e1f0ea; text-decoration-color: #70918a; }
.site-header .button:hover { color: #fff; background: #27524b; }
main.shell { min-height: calc(100vh - 140px); padding-block: 2rem 3rem; }
.footer { display: flex; gap: 1rem; justify-content: space-between; border-top: 1px solid var(--edge); padding-block: 1rem; color: var(--subtle); font-size: .82rem; }
h1,h2,h3,p { margin-top: 0; }
h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); letter-spacing: -.045em; line-height: 1.12; margin-bottom: .45rem; overflow-wrap: anywhere; }
h2 { font-size: 1.16rem; letter-spacing: -.02em; margin-bottom: .55rem; }
h3 { font-size: 1rem; margin-bottom: .5rem; }
p:last-child { margin-bottom: 0; }
.heading { display: flex; justify-content: space-between; gap: 1rem; align-items: end; margin-bottom: 1.45rem; }
.eyebrow { color: var(--brand); font-weight: 650; font-size: .81rem; margin-bottom: .45rem; }
.dot { margin: 0 .2rem; }
.muted, .secondary { color: var(--subtle); }
.secondary { display: block; font-size: .78rem; margin-top: .28rem; }
.panel, .metric { background: var(--paper); border: 1px solid var(--edge); border-radius: .75rem; }
.button { display: inline-flex; justify-content: center; align-items: center; cursor: pointer; min-height: 2.3rem; padding: .44rem .76rem; border-radius: .43rem; border: 1px solid #bfcfca; color: var(--brand); background: #fff; font-weight: 620; text-decoration: none; text-align: center; }
.button:hover { background: var(--soft); }
.button:disabled { cursor: wait; opacity: .66; }
.button.primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.button.primary:hover { background: var(--brand-deep); }
.button.plain { background: transparent; border-color: transparent; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(114px, 1fr)); gap: .55rem; margin-bottom: .75rem; }
.metric { padding: .7rem .75rem; text-decoration: none; min-height: 5.05rem; color: var(--ink); }
.metric:hover { border-color: #67988b; background: #fafffc; }
.metric strong { display: block; color: var(--brand-deep); font-variant-numeric: tabular-nums; font-size: 1.45rem; letter-spacing: -.035em; font-weight: 690; }
.metric span { display: block; color: var(--subtle); font-size: .77rem; margin-top: .18rem; }
.sync-line { display: flex; flex-wrap: wrap; gap: .45rem 2rem; align-items: baseline; padding: .72rem .9rem; }
.sync-line span { font-size: .79rem; margin-right: .5rem; }
.sync-line strong { font-size: .86rem; }
.sync-line .warning { width: 100%; }
.priority-strip { display: flex; flex-wrap: wrap; gap: .45rem; margin-block: .95rem; }
.priority { display: inline-flex; gap: .5rem; padding: .28rem .6rem; background: var(--soft); border-radius: .4rem; text-decoration: none; font-size: .82rem; color: var(--brand-deep); }
.priority span { color: var(--subtle); font-variant-numeric: tabular-nums; }
.priority.selected { outline: 2px solid var(--brand); }
.filters-panel { margin-bottom: 1rem; padding: .92rem; }
.filters { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: .72rem; align-items: end; }
.filters label, .login label, .upload label { color: var(--subtle); display: grid; gap: .26rem; font-weight: 580; font-size: .82rem; }
.filters .search-field { grid-column: span 2; }
input:not([type=checkbox]), select { min-height: 2.25rem; width: 100%; padding: .38rem .52rem; background: #fcfefd; color: var(--ink); border: 1px solid #bdccca; border-radius: .4rem; font-weight: 400; }
input[type=checkbox] { accent-color: var(--brand); min-width: 1rem; min-height: 1rem; }
.filter-actions, .export-tools, .source-links { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.filter-actions { grid-column: span 2; justify-content: end; }
.list-header { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .8rem; padding: .9rem; align-items: center; }
.list-header h2 { margin: 0; }
.table-scroller { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
.results table { min-width: 830px; }
th { background: #f4f7f6; color: var(--subtle); font-size: .78rem; padding: .62rem .75rem; }
td { border-top: 1px solid var(--edge); vertical-align: top; padding: .66rem .75rem; font-size: .88rem; }
.results tbody tr:hover { background: #f9fcfa; }
.results td:nth-child(2) { width: 37%; }
.results td:nth-child(3), .results td:nth-child(5) { min-width: 125px; }
.lot-title { font-weight: 650; text-decoration: none; overflow-wrap: anywhere; }
.lot-title:hover { text-decoration: underline; }
.numeric { white-space: nowrap; font-variant-numeric: tabular-nums; }
.badge { display: inline-block; background: var(--soft); color: var(--brand-deep); font-size: .73rem; padding: .17rem .42rem; border-radius: .3rem; margin: .15rem .15rem .15rem 0; }
.badge.land { color: #4e552e; background: #eaf0dc; }
.badge.warn, .warning { color: var(--warn); background: var(--warn-bg); }
.notice { padding: .65rem .85rem; border-radius: .45rem; margin-block: 0 .85rem; color: var(--brand-deep); background: var(--soft); overflow-wrap: anywhere; }
.notice.warning { color: var(--warn); background: var(--warn-bg); }
.notice p:not(:last-child) { margin-bottom: .35rem; }
.notice.error { color: #802c26; background: #ffe9e4; }
.pagination { display: flex; justify-content: center; align-items: center; gap: .9rem; padding: .86rem; border-top: 1px solid var(--edge); }
.queue-links { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem 1rem; margin: .75rem 0 1rem; }
.queue-links form { margin-left: auto; }
.empty { padding: .9rem; color: var(--subtle); }
.detail-grid, .attachment-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.detail-card { margin-bottom: .8rem; padding: .95rem 1rem; }
.facts { margin: .55rem 0; }
.facts div { display: grid; grid-template-columns: 1fr 1fr; gap: .45rem; padding: .34rem 0; border-bottom: 1px solid var(--edge); }
.facts dt { color: var(--subtle); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.long-text { white-space: pre-wrap; overflow-wrap: anywhere; max-width: 90ch; }
.source-links { margin-bottom: .8rem; }
.attachment-columns ul, .detail-card ul { padding-left: 1.1rem; overflow-wrap: anywhere; }
.photo-links { display: flex; flex-wrap: wrap; gap: .4rem 1rem; list-style: none; }
.back { margin-bottom: .85rem; display: inline-block; }
.detail-title { font-size: clamp(1.4rem, 3vw, 2.15rem); }
.login { margin: clamp(1rem, 7vh, 5rem) auto; max-width: 390px; padding: 1.5rem; }
.login h1 { font-size: 1.65rem; }
.login form, .upload { display: grid; gap: .6rem; }
.login .button, .upload .button { justify-self: start; }
.assessment { border: 1px solid var(--edge); padding: .65rem; border-radius: .45rem; margin: .55rem 0; }
.assessment summary { cursor: pointer; font-weight: 650; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 1050px) { .filters { grid-template-columns: repeat(4,minmax(0,1fr)); } }
@media (max-width: 620px) {
    .header-inner { flex-wrap: wrap; gap: .55rem 1rem; padding-block: .65rem; }
    .header-inner nav { order: 3; flex-basis: 100%; }
    .header-inner form { margin-left: auto; }
    .heading { flex-wrap: wrap; align-items: start; }
    main.shell { padding-top: 1.25rem; }
    .filters { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .filter-actions { justify-content: start; }
    .detail-grid, .attachment-columns { grid-template-columns: 1fr; }
    .queue-links form { width: 100%; margin: 0; }
    .results td, .results th { padding-inline: .5rem; }
}
