:root {
  color-scheme: light;
  font: 15px/1.55 "Instrument Sans", "Segoe UI", sans-serif;
  color: #1b282d;
  background: #f6f5f1;
  --ink: #1b282d;
  --quiet: #59666a;
  --line: #d9dfdd;
  --paper: #fff;
  --accent: #a23e27;
  --accent-dark: #832c1c;
  --rail: #18292f;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 0; }
button, input, select, textarea { font: inherit; }
a { color: inherit; }
button, .button {
  min-height: 42px;
  border: 1px solid #becac7;
  border-radius: 8px;
  padding: 8px 14px;
  background: #fff;
  color: var(--ink);
  font-weight: 650;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
button:hover, .button:hover { background: #f2f5f3; }
button:disabled { opacity: .55; cursor: not-allowed; }
button.primary { background: var(--accent); color: white; border-color: var(--accent); }
button.primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
button.quiet { background: transparent; color: #214f50; border-color: transparent; }
button.quiet:hover { background: #edf2ef; }
:focus-visible { outline: 3px solid #197177; outline-offset: 3px; }
p, h1, h2, dl, ul, ol { margin: 0; }
svg { display: block; width: 20px; height: 20px; flex-shrink: 0; }
.skip { position: fixed; z-index: 5; inset: 10px auto auto 10px; transform: translateY(-150%); background: white; padding: 10px 16px; border-radius: 6px; }
.skip:focus { transform: none; }
.shell { display: grid; grid-template-columns: 228px minmax(0, 1fr); min-height: 100vh; }
.sidebar { display: flex; flex-direction: column; padding: 24px 16px; min-height: 100vh; background: var(--rail); color: #e9f0ed; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 750; letter-spacing: -.035em; text-decoration: none; white-space: nowrap; }
.brand img { border-radius: 8px; background: #fff8ee; padding: 4px; }
.sidebar-label { color: #a8bfbb; font-size: 12px; margin: 32px 10px 10px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.sidebar nav { display: grid; gap: 5px; }
.sidebar nav a { display: flex; align-items: center; gap: 11px; min-height: 44px; padding: 8px 11px; text-decoration: none; border-radius: 8px; color: #e1eae7; font-weight: 600; }
.sidebar nav a:hover { background: #2b4147; }
.sidebar nav a[aria-current] { color: #fff; background: #344c52; }
.sidebar nav a[aria-current] svg { color: #f2a891; }
.sidebar a:focus-visible, .sidebar button:focus-visible { outline-color: #f8beaa; }
.sidebar-footer { display: grid; justify-items: start; gap: 8px; margin-top: auto; padding-top: 26px; }
.sidebar-footer a { font-size: 13px; text-underline-offset: 3px; }
.sidebar .reset { background: transparent; color: #e7eeec; border-color: #607780; }
.sidebar .reset:hover { background: #344c52; }
.work-area { min-width: 0; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 14px; min-height: 59px; padding: 12px max(24px, 3.2vw); background: #fff; border-bottom: 1px solid var(--line); color: #47565b; font-size: 14px; }
.practice-label { display: inline-flex; align-items: center; gap: 7px; color: #77512d; font-weight: 650; }
.practice-label span { width: 8px; height: 8px; border-radius: 50%; background: #ad6a27; }
main { max-width: 1440px; margin: auto; padding: 26px max(24px, 3.2vw) 42px; outline: 0; }
.notice { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 10px; padding: 9px 14px; border: 1px solid #e8d6b9; border-radius: 8px; background: #fff6e7; color: #634825; font-size: 14px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 13px 22px; margin: 27px 0 24px; }
h1 { font-size: clamp(29px, 4vw, 44px); font-weight: 750; line-height: 1.1; letter-spacing: -.055em; }
h1:focus { outline: 0; }
.page-heading p { margin-top: 7px; max-width: 660px; color: var(--quiet); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 13px; margin-bottom: 20px; }
.stats > div { display: flex; flex-direction: column; padding: 14px 16px; min-width: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; }
.stats span { color: var(--quiet); font-size: 13px; }
.stats strong { margin-top: 2px; font-size: 30px; font-weight: 740; color: #263c40; letter-spacing: -.045em; }
.panel { min-width: 0; margin-bottom: 17px; padding: 17px 19px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.panel-heading { margin-bottom: 12px; }
.panel-heading h2, .panel h2 { font-size: 20px; font-weight: 750; letter-spacing: -.025em; }
.panel-heading p { margin-top: 3px; color: var(--quiet); }
.panel > p + form, .panel > dl + p, .panel > p + .actions, .panel > .table-scroll + button { margin-top: 14px; }
.panel .empty + button { margin-top: 8px; }
.table-scroll { position: relative; overflow-x: auto; }
table { width: 100%; min-width: 520px; border-collapse: collapse; text-align: left; }
th { color: #485b60; background: #eef2ef; padding: 10px 12px; font-size: 12px; font-weight: 750; white-space: nowrap; }
td { padding: 11px 12px; vertical-align: middle; border-bottom: 1px solid #e7ebe8; }
td strong, td small { display: block; }
td strong { color: #263a40; }
small { display: block; color: #56696c; font-size: 13px; }
td:last-child:has(button) { width: 1%; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
.pill { display: inline-flex; align-items: center; width: fit-content; max-width: 100%; min-height: 25px; padding: 2px 9px; border-radius: 15px; background: #edf1ef; color: #40585a; font-size: 12px; font-weight: 700; }
.pill.warn { background: #fff0d6; color: #76501f; }
.pill.green { background: #e5f3e8; color: #27563c; }
.pill.danger { background: #f7e8e4; color: #9c3425; }
.pill.blue { background: #dfeceb; color: #25595a; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.details { display: grid; grid-template-columns: repeat(auto-fit,minmax(155px,1fr)); gap: 10px; }
.details > div { padding: 10px 13px; background: #f2f5f2; border-radius: 7px; }
dt { color: var(--quiet); font-size: 13px; }
dd { margin: 2px 0 0; color: #223639; font-weight: 650; overflow-wrap: anywhere; }
.field { display: grid; align-content: start; gap: 5px; min-width: 0; color: #33464c; font-weight: 650; }
.field > span { font-size: 13px; }
.field input, .field select, .field textarea { width: 100%; min-width: 0; min-height: 42px; padding: 7px 10px; border: 1px solid #bfcac7; border-radius: 6px; color: var(--ink); background: white; font-weight: 450; }
.field input:disabled { background: #eef2ef; color: #4e5e60; }
.field textarea { resize: vertical; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px 16px; }
form > .field, form > .actions, form > .hint, form > .check-label { margin-top: 12px; }
.toolbar { margin-bottom: 12px; }
.toolbar form, .inline-form { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 8px; }
.toolbar form .field, .inline-form .field { flex: 1 1 180px; max-width: 480px; }
.toolbar form .field { margin-top: 0; }
.records { display: grid; gap: 0; list-style: none; margin: 0 0 11px; padding: 0; }
.records li, .record-summary { display: flex; align-items: center; justify-content: space-between; gap: 7px 15px; flex-wrap: wrap; padding: 11px 0; border-top: 1px solid #e4e9e6; }
.record-summary { justify-content: flex-start; }
.records strong { color: #263a40; }
.records .preserved { margin-top: 4px; }
.empty, .hint, .archive-confirmation { color: var(--quiet); }
.hint, .archive-confirmation { font-size: 13px; }
.preserved { white-space: pre-wrap; overflow-wrap: anywhere; }
.status { min-height: 20px; font-weight: 650; color: #255954; }
.status:not(:empty) { margin-top: 16px; padding: 9px 12px; border-left: 3px solid #56948f; background: #e9f3ef; }
.map-panel { padding: 0; overflow: hidden; }
.map-canvas { position: relative; isolation: isolate; min-height: 270px; aspect-ratio: 2; background: #e5e9dc; overflow: hidden; }
.map-base { position: absolute; width: 100%; height: 100%; inset: 0; }
.map-marker { position: absolute; top: var(--y); left: var(--x); transform: translate(-50%,-50%); display: grid; place-items: center; width: 40px; height: 40px; min-height: 40px; border: 2px solid white; border-radius: 50%; box-shadow: 0 2px 6px #0e2a3255; padding: 0; color: white; }
.map-marker.property { background: #1f656b; }
.map-marker.symbol { background: #a4412a; }
.map-marker.selected { outline: 3px solid #183f46; outline-offset: 3px; z-index: 2; }
.map-marker.provisional { pointer-events: none; background: #5e6f72; border-style: dashed; }
.map-caption { position: absolute; inset: auto 8px 8px auto; font-size: 12px; padding: 3px 7px; border-radius: 4px; background: #fff; }
.map-info { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 15px; padding: 12px 17px; }
.map-info .tags { margin-right: auto; }
.inspection-summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 9px; background: #fff; margin-bottom: 12px; }
.inspection-summary .pill { margin-right: 6px; }
.inspection-summary p { color: var(--quiet); font-size: 13px; }
.check-group { min-width: 0; border: 1px solid var(--line); border-radius: 9px; margin: 0 0 11px; padding: 4px 13px; background: white; }
.check-group legend { padding: 3px 8px; font-weight: 750; color: #2e494d; }
.check-item { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(110px,.75fr) minmax(0,1.1fr); align-items: center; gap: 11px; padding: 10px 0; }
.check-item + .check-item { border-top: 1px solid #e7ebe8; }
.check-item textarea { min-height: 46px; max-height: 165px; }
.check-label { display: flex; gap: 8px; align-items: center; color: #2f484c; font-weight: 650; min-height: 42px; }
.check-label input { width: 20px; height: 20px; accent-color: #236367; }
.report-kicker { margin-bottom: 8px; color: #82432e; font-size: 13px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.printable > .details, .printable > .table-scroll, .printable > .hint, .printable > .preserved { margin-top: 15px; }
dialog { max-width: min(440px,calc(100% - 32px)); padding: 21px 24px; color: var(--ink); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 20px 60px #14232646; }
dialog::backdrop { background: #101c23a8; }
dialog h2 { margin-bottom: 7px; font-size: 21px; }
dialog .actions { justify-content: flex-end; }
@media(max-width:880px) {
  .shell { grid-template-columns: 177px minmax(0,1fr); }
  .sidebar { padding-inline: 11px; }
  .brand { gap: 6px; font-size: 17px; }
  .brand img { width: 30px; height: 30px; }
  .stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .check-item { grid-template-columns: 1fr 1fr; }
  .check-item > div { grid-column: 1/-1; }
}
@media(max-width:620px) {
  .shell { display: block; }
  .sidebar { min-height: 0; padding: 12px 12px 9px; }
  .sidebar-label { display: none; }
  .sidebar nav { display: flex; overflow-x: auto; gap: 4px; margin-top: 9px; padding-bottom: 4px; }
  .sidebar nav a { font-size: 13px; white-space: nowrap; padding-inline: 8px; }
  .sidebar nav svg { width: 17px; height: 17px; }
  .sidebar-footer { padding-top: 0; }
  .sidebar-footer a { display: none; }
  .sidebar .reset { position: absolute; top: 8px; right: 12px; min-height: 35px; padding-inline: 8px; font-size: 12px; }
  .topbar { padding: 8px 12px; min-height: 45px; }
  main { padding: 15px 12px 24px; }
  .page-heading { margin: 20px 0 16px; }
  .panel { padding: 13px 12px; }
  .map-panel { padding: 0; }
  .map-canvas { min-height: 260px; }
  .map-marker { width: 34px; height: 34px; min-height: 34px; }
  .field input, .field select, .field textarea { font-size: 16px; }
}
@media(max-width:390px) {
  .form-grid, .check-item { grid-template-columns: minmax(0,1fr); }
}
@media print {
  .sidebar, .topbar, .notice, .page-heading, .archive-confirmation, .status, .skip { display: none; }
  .shell { display: block; }
  main { padding: 0; }
  body { background: white; }
  .printable { padding: 0; border: 0; }
  .printable table { min-width: 0; }
  .printable tr { break-inside: avoid; }
}
