:root { color-scheme: light; --ink: #1d3533; --muted: #536661; --paper: #f5f5ef; --line: #d8dfd7; --accent: #226151; --danger: #9c342e; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.55 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: var(--accent); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
button, input, select, textarea { font: inherit; }
button, .button { display: inline-block; background: var(--accent); border: 1px solid var(--accent); color: white; padding: .7rem 1.15rem; border-radius: .5rem; font-weight: 650; text-decoration: none; cursor: pointer; text-align: center; }
button:hover, .button:hover { filter: brightness(.92); }
button:disabled { opacity: .55; cursor: not-allowed; }
.secondary { background: white; color: var(--accent); }
.quiet { color: var(--muted); background: transparent; border-color: transparent; font-weight: 500; }
.danger { background: var(--danger); border-color: var(--danger); }
.danger-link { color: var(--danger); }
:focus-visible { outline: 3px solid #ab7d24; outline-offset: 3px; }
.skip-link { position: absolute; left: .5rem; top: -100px; background: white; padding: 1rem; z-index: 2; }
.skip-link:focus { top: .5rem; }
.site-header { background: #fff; border-bottom: 1px solid var(--line); padding: 1rem max(1rem, calc((100% - 1100px) / 2)); display: flex; gap: 1rem; align-items: center; justify-content: space-between; }
.brand { display: flex; gap: .7rem; align-items: center; color: var(--ink); text-decoration: none; font-size: 1.1rem; font-weight: 700; letter-spacing: .015em; }
.brand small { display: block; font-size: .75rem; font-weight: 500; color: var(--muted); }
.brand-mark { background: var(--ink); color: #e9d8a8; border-radius: .4rem; padding: .25rem .7rem; font: 700 1.6rem Georgia, serif; }
.site-header nav, .actions, .form-actions { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.site-header nav form { margin: 0; }
.small { font-size: .875rem; padding: .5rem .8rem; }
.container { width: min(1100px, calc(100% - 2rem)); margin: 0 auto; }
main.container { min-height: 68vh; padding-top: 2rem; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.15; letter-spacing: -.035em; margin-bottom: .7rem; }
h2 { font-size: 1.25rem; margin-bottom: 1rem; }
h3 { font-size: .9rem; margin-bottom: .35rem; }
.eyebrow { color: var(--muted); text-transform: uppercase; letter-spacing: .12em; font-size: .73rem; font-weight: 700; margin-bottom: .7rem; }
.muted, .hint { color: var(--muted); }
.hint { font-size: .85rem; margin: .5rem 0 1rem; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin: .5rem 0 1.5rem; }
.page-heading p:last-child { margin-bottom: 0; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: .8rem; padding: 1.5rem; margin-bottom: 1.1rem; }
.login-panel { max-width: 460px; margin: 3rem auto; padding: 2rem; }
.login-panel button { width: 100%; }
.login-panel .hint { margin: 1.5rem 0 0; }
.narrow { max-width: 680px; margin: 2rem auto; }
.back-link { display: inline-block; margin-bottom: 1.2rem; }
.field { margin-bottom: 1rem; min-width: 0; }
.field > label { display: block; margin-bottom: .4rem; font-size: .9rem; font-weight: 600; }
input:not([type=checkbox]):not([type=hidden]), select, textarea { width: 100%; max-width: 100%; min-height: 46px; border: 1px solid #aab8ae; border-radius: .4rem; padding: .6rem .7rem; background: white; color: var(--ink); }
textarea { resize: vertical; }
input[type=checkbox] { width: 1.2rem; height: 1.2rem; accent-color: var(--accent); vertical-align: middle; margin-right: .45rem; }
.choices { border: 0; padding: 0; margin: 0 0 1.25rem; }
.choices legend { font-size: .9rem; font-weight: 600; margin-bottom: .5rem; }
.choices label { display: inline-block; padding: .45rem 0; }
.two-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.addition-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1.5fr) auto; gap: .75rem; padding: 1rem 0; border-top: 1px solid var(--line); align-items: start; }
.addition-row .field { margin-bottom: 0; }
.remove-item { padding-top: 2.1rem; font-size: .85rem; white-space: nowrap; }
.remove-item label { cursor: pointer; padding: .5rem 0; }
.addition-row:has(input[name$="-DELETE"]:checked) { opacity: .6; background: #faf2ef; }
.form-actions { margin: 1.5rem 0 3rem; }
.filters summary { cursor: pointer; font-weight: 600; }
.filters[open] summary { margin-bottom: 1rem; }
.filter-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem 1rem; }
.list-toolbar, .entry-heading, .detail-footer { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.list-toolbar { font-size: .875rem; margin: 1rem 0; }
.list-toolbar p { margin: 0; }
.entry-heading h2 { margin-bottom: .3rem; }
.entry-heading h2 a { text-decoration: none; color: var(--ink); }
.entry-heading h2 a:hover { text-decoration: underline; }
.time { color: var(--muted); font-size: .9rem; font-weight: 500; margin-left: .4rem; }
.entry-heading p { font-size: .875rem; }
.detail-link { white-space: nowrap; font-size: .875rem; }
.additions { list-style: none; padding: 0; margin: 0 0 1.25rem; border-top: 1px solid var(--line); }
.additions li { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.additions li span { text-align: right; }
.observation-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.observation-grid p { margin-bottom: .4rem; font-size: .9rem; }
.observation-grid h3, .entry-notes h3 { color: var(--muted); text-transform: uppercase; font-size: .7rem; letter-spacing: .08em; }
.badge { display: inline-block; background: #eef2ec; border-radius: .3rem; padding: .1rem .4rem; font-size: .8rem; }
.entry-notes { border-top: 1px solid var(--line); padding-top: 1rem; margin-top: 1rem; }
.entry-notes p { margin-bottom: 0; font-size: .9rem; }
.free-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.notice { padding: 1rem; border-radius: .5rem; background: #e8f1e9; border: 1px solid #afc9b4; }
.notice p:last-child { margin-bottom: 0; }
.notice.error { background: #fff1ee; border-color: #dca79e; }
.errorlist { color: var(--danger); padding-left: 1.2rem; margin: .4rem 0 1rem; font-size: .9rem; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--danger); }
.voided { border-left: 4px solid var(--danger); }
.empty-state { text-align: center; padding: 3rem 1.5rem; }
.pagination { display: flex; gap: 1.5rem; justify-content: center; margin: 2rem 0; }
.site-footer { border-top: 1px solid var(--line); padding: 1.5rem 0; margin-top: 3rem; color: var(--muted); font-size: .8rem; display: flex; justify-content: space-between; gap: 1rem; }
@media (max-width: 700px) {
  .site-header { flex-wrap: wrap; }
  .site-header nav { gap: .65rem; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .panel { padding: 1.1rem; }
  .two-columns, .observation-grid { grid-template-columns: 1fr; gap: .65rem; }
  .filter-grid { grid-template-columns: 1fr 1fr; }
  .addition-row { grid-template-columns: 1fr 1fr; }
  .addition-row .field:first-of-type { grid-column: 1 / -1; }
  .remove-item { padding-top: 0; grid-column: 1 / -1; }
  .entry-heading { flex-wrap: wrap; gap: 0; }
  .detail-link { margin-bottom: .8rem; }
  .list-toolbar { flex-wrap: wrap; }
  .site-footer { flex-direction: column; gap: .4rem; }
  .form-actions button { flex: 1; }
  .login-panel { margin-top: 1rem; }
}
