:root {
  font:
    16px/1.5 system-ui,
    sans-serif;
  color: #111;
  background: #f5f5f5;
  color-scheme: light;
  --yellow: #fff000;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
  border: 2px solid #111;
  border-radius: 0;
  background: #fff;
  color: #111;
}
button,
a,
summary {
  touch-action: manipulation;
}
button,
select,
input:not([type="checkbox"]) {
  min-height: 46px;
}
button {
  font: 700 13px monospace;
  padding: 10px 14px;
  cursor: pointer;
}
button:hover:not(:disabled) {
  background: var(--yellow);
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
a {
  color: inherit;
  text-underline-offset: 3px;
}
a,
summary {
  min-height: 44px;
}
a.action {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border: 2px solid #111;
  font: 700 12px monospace;
}
a.action:hover {
  background: var(--yellow);
}
:focus-visible {
  outline: 3px solid #111;
  outline-offset: 4px;
}
button.primary {
  background: var(--yellow);
}
header {
  background: #111;
  color: #fff;
  border-bottom: 5px solid var(--yellow);
}
header > div,
main,
footer {
  max-width: 1020px;
  margin: auto;
  padding: 24px;
}
header .brand {
  font: 900 22px monospace;
  color: var(--yellow);
}
header .eyebrow {
  font: 700 12px monospace;
  letter-spacing: 0.1em;
}
header h1 {
  font: 900 clamp(28px, 6vw, 44px)/1.1 monospace;
  margin: 18px 0;
}
header a.action {
  background: var(--yellow);
  color: #111;
  margin-top: 6px;
}
h2,
h3,
b,
strong,
summary,
legend {
  font-family: monospace;
}
h2 {
  font-size: 20px;
}
h3 {
  font-size: 16px;
}
p {
  margin: 12px 0;
}
header .meta {
  color: #ddd;
  font-size: 14px;
}
.toolbar,
.filters,
.card,
.notice {
  border: 2px solid #111;
  background: #fff;
  padding: 20px;
  margin-bottom: 20px;
}
.toolbar h2,
.card h2 {
  margin-top: 0;
}
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.actions > * {
  flex: 1;
}
.import-label {
  display: block;
  font: 700 12px monospace;
}
.import-label input {
  display: block;
  margin-top: 6px;
  padding: 6px;
  max-width: 100%;
  width: 100%;
  font: 12px monospace;
}
input[type="file"]::file-selector-button {
  min-height: 36px;
  border: 0;
  border-right: 2px solid #111;
  background: var(--yellow);
  font: 700 12px monospace;
  padding: 8px;
  margin-right: 8px;
}
.small {
  font: 12px/1.6 monospace;
  overflow-wrap: anywhere;
  color: #444;
}
.note-count {
  font: 700 12px monospace;
}
.notice {
  border-left: 7px solid #111;
}
.error {
  border: 2px solid #111;
  background: #ffe3e0;
  padding: 12px;
  white-space: pre-wrap;
}
.filters {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.filters .search {
  grid-column: 1/-1;
}
.filters label {
  font: 700 12px monospace;
  display: block;
}
.filters input,
.filters select {
  display: block;
  width: 100%;
  padding: 8px;
  margin-top: 6px;
}
.results {
  font: 700 13px monospace;
}
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.card {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  min-width: 0;
}
.card p {
  margin: 0;
}
.card [data-record] {
  width: 100%;
  margin-top: auto;
}
.card .type {
  font: 700 12px monospace;
  letter-spacing: 0.04em;
}
.card .card-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.notes {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
details {
  border-top: 2px solid #111;
  margin-top: 18px;
  padding-top: 12px;
}
summary {
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  padding: 8px 0;
}
ul {
  padding-left: 22px;
}
#observations-list {
  list-style: none;
  padding: 0;
}
#observations-list li {
  border-top: 1px solid #111;
  padding: 18px 0;
}
footer {
  font-size: 13px;
}
footer p {
  margin-bottom: 18px;
}
.print-observation {
  display: none;
}
dialog {
  border: 3px solid #111;
  border-radius: 0;
  padding: 0;
  width: min(720px, calc(100% - 24px));
  max-height: 92dvh;
  overflow: auto;
  background: #fff;
  color: #111;
}
dialog::backdrop {
  background: #000b;
}
.dialog-head {
  padding: 20px;
  background: var(--yellow);
  border-bottom: 3px solid #111;
}
.dialog-head h2 {
  margin: 4px 0;
}
.dialog-head p {
  margin: 0;
}
form {
  padding: 20px;
}
fieldset {
  border: 0;
  margin: 0 0 20px;
  padding: 0;
}
legend {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 12px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.form-grid label {
  display: block;
  font-size: 14px;
  font-weight: 600;
}
.form-grid input,
.form-grid select,
.form-grid textarea {
  display: block;
  width: 100%;
  padding: 10px;
  margin-top: 6px;
}
.form-grid .wide {
  grid-column: 1/-1;
}
textarea {
  min-height: 90px;
  resize: vertical;
}
.checkbox {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  cursor: pointer;
  padding: 12px 0;
}
.checkbox input {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
.dialog-actions {
  display: flex;
  gap: 12px;
  border-top: 2px solid #111;
  padding-top: 18px;
}
.dialog-actions button {
  flex: 1;
}
.required {
  font: 12px monospace;
}
header a:focus-visible {
  outline-color: var(--yellow);
}
[hidden] {
  display: none !important;
}
@media (max-width: 620px) {
  header > div,
  main,
  footer {
    padding: 18px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .filters {
    grid-template-columns: 1fr 1fr;
  }
  .filters label:last-of-type {
    grid-column: 1/-1;
  }
  .toolbar,
  .filters,
  .notice {
    padding: 16px;
  }
  .actions {
    align-items: stretch;
  }
  .actions > * {
    flex-basis: 40%;
  }
  .actions .import-label {
    flex-basis: 100%;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-grid .wide {
    grid-column: auto;
  }
  .dialog-actions {
    position: sticky;
    bottom: -20px;
    background: #fff;
    padding: 14px 0;
  }
  dialog .small {
    font-size: 11px;
  }
}
@media print {
  header {
    background: #fff;
    color: #111;
  }
  header .brand,
  header .meta {
    color: #111;
  }
  .toolbar,
  .filters,
  .notice,
  dialog,
  button,
  .card-links,
  .results,
  .note-count {
    display: none;
  }
  .grid {
    display: block;
  }
  .card {
    margin-bottom: 16px;
    break-inside: avoid;
  }
  .print-observation {
    display: block;
    font: 13px/2 monospace;
  }
  header h1 {
    font-size: 32px;
  }
}
