:root {
  color-scheme: light;
  --ink: #182c27;
  --muted: #51645d;
  --border: #d9e4dd;
  --primary: #21584b;
  --surface: #fff;
  --ground: #f2f5f2;
  --accent: #e2efe7;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 15px/1.5 system-ui, sans-serif; }
.shell { width: min(1280px, calc(100% - 48px)); margin-inline: auto; }
.top { background: #17362f; color: #fff; }
.brandline, .heading, .entry-head { display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.brandline { min-height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; color: white; font-size: 21px; font-weight: 750; text-decoration: none; }
.brand small { color: #bdd6ca; font-size: .65rem; letter-spacing: .06em; }
.brandmark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; background: #d1e8da; color: #16362e; font-size: 16px; }
.identity { display: flex; align-items: center; gap: 12px; text-align: right; }
.identity a, .identity small { color: #e0eee6; }
nav.shell, .tabs { display: flex; gap: 4px; flex-wrap: wrap; }
nav.shell a, .tabs a { padding: 9px 13px; border-radius: 8px 8px 0 0; text-decoration: none; font-weight: 650; }
nav.shell a { color: #d7e6dd; }
nav.shell a[aria-current], nav.shell a:hover { background: #2a5146; color: #fff; }
main { padding: 23px 0 48px; }
.heading { margin: 6px 0 22px; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(24px, 4vw, 36px); line-height: 1.14; letter-spacing: -.035em; }
h2 { font-size: 18px; margin-bottom: 12px; }
p + p { margin-top: 9px; }
.heading p, .hint, small { color: var(--muted); }
.heading p { margin-top: 7px; }
small { display: block; font-size: .8rem; }
a { color: var(--primary); text-underline-offset: .16em; }
section { padding: 20px; margin: 14px 0; border: 1px solid var(--border); border-radius: 13px; background: var(--surface); }
.signin { max-width: 440px; margin: 8vh auto; padding: 28px; }
.signin h1 { margin: 0 0 20px; font-size: 27px; }
label { display: block; font-weight: 630; font-size: .86rem; }
input, select, textarea { display: block; width: 100%; min-height: 40px; margin: 5px 0 12px; border: 1px solid #aabeb4; border-radius: 7px; padding: 8px 10px; color: var(--ink); background: #fff; font: inherit; font-weight: 420; }
textarea { min-height: 74px; resize: vertical; }
[hidden] { display: none !important; }
button, .button { min-height: 40px; display: inline-flex; justify-content: center; align-items: center; background: var(--primary); color: white; border: 1px solid transparent; border-radius: 7px; padding: 8px 13px; cursor: pointer; font: inherit; font-weight: 650; text-decoration: none; }
button:hover, .button:hover { filter: brightness(.93); }
:focus-visible { outline: 3px solid #b27825; outline-offset: 2px; }
.secondary { background: var(--accent); color: #154135; border-color: #bed7c8; }
.quiet { background: transparent; color: #fff; border-color: #66897e; }
.danger { background: #913f37; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 205px), 1fr)); column-gap: 14px; }
.filters { display: grid; grid-template-columns: 2fr 1fr 1.25fr 1fr 1fr auto; gap: 10px; align-items: end; margin-bottom: 15px; }
.filters input, .filters select, .actions input { margin-bottom: 0; }
.counts { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.counts a { display: block; text-decoration: none; border: 1px solid var(--border); border-radius: 10px; background: #fff; color: var(--ink); padding: 10px 14px; }
.counts a[aria-current], .counts a:hover, .tabs a[aria-current], .tabs a:hover { background: var(--accent); }
.counts span { display: block; color: var(--muted); font-weight: 650; font-size: .85rem; }
.counts strong { font-size: 25px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
td, th { border-bottom: 1px solid #e6ece7; padding: 10px 12px; text-align: left; }
th { font-size: .77rem; color: #395a50; text-transform: uppercase; background: #edf4ef; }
tr:last-child td { border-bottom: 0; }
.rowlink { font-weight: 750; white-space: nowrap; }
.badge { display: inline-block; white-space: nowrap; border-radius: 9px; padding: 4px 9px; background: #ebf0ed; color: #254a3f; font-size: .76rem; font-weight: 700; }
.badge.amber { background: #ffefd2; color: #6a4110; }
.badge.green { background: #dceee2; color: #21563b; }
.actions { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; margin-top: 12px; }
.area-choice label { flex: 1 1 260px; }
.spot-picker { min-width: 0; margin: 14px 0; border: 1px solid var(--border); border-radius: 9px; }
.spot-picker legend { font-weight: 650; }
.spot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(68px, 1fr)); gap: 6px; max-height: 250px; overflow: auto; padding: 6px; margin: 6px 0; }
.spot-option { display: flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 6px; border: 1px solid var(--border); border-radius: 6px; cursor: pointer; }
.spot-option input { width: auto; min-height: 0; margin: 0; accent-color: var(--primary); }
.spot-form button:disabled { opacity: .55; cursor: default; }
.heading .actions { margin: 0; }
.metadata { display: grid; grid-template-columns: minmax(110px, 175px) 1fr; gap: 5px 10px; }
dt { font-weight: 650; color: var(--muted); }
dd { margin: 0; overflow-wrap: anywhere; }
summary { cursor: pointer; font-weight: 660; }
details form { margin-top: 12px; }
.entry, .audit, .subsection { padding: 11px 0; border-top: 1px solid var(--border); }
.entry details, .entry form { margin-top: 9px; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; }
pre.mail { padding: 16px; background: var(--ground); border: 1px solid var(--border); border-radius: 9px; font: inherit; }
.file-list { padding-left: 20px; }
.file-list small { display: inline; }
.check { display: flex; gap: 8px; align-items: center; margin: 10px 0; }
.check input { width: auto; min-height: 0; margin: 0; }
#notice, .alert { padding: 10px; border-radius: 7px; background: #ffefd2; margin-bottom: 12px; color: #63400f; }
.empty { padding: 22px 12px; color: var(--muted); }
@media (max-width: 940px) { .filters { grid-template-columns: repeat(3,1fr); } }
@media (max-width: 620px) {
  .shell { width: calc(100% - 24px); }
  section { padding: 13px; }
  .heading { flex-wrap: wrap; }
  .counts { grid-template-columns: repeat(2,1fr); }
  .filters { grid-template-columns: repeat(2,minmax(0,1fr)); }
  nav.shell a { font-size: .82rem; padding: 8px 6px; }
  td, th { padding: 8px; }
  .brand small { font-size: .56rem; }
}
