:root {
  color-scheme: light;
  font-family: system-ui, sans-serif;
  color: #182d29;
  background: #eaf0eb;
  line-height: 1.55;
  --ink: #173f35;
  --muted: #4f645b;
  --line: #d6e1d8;
}
* { box-sizing: border-box; }
body { margin: 0; }
main { width: min(100% - 2rem, 58rem); margin: 0 auto; padding: 3rem 0 2rem; }
header, .section-head, .row, .actions, .pair {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
header { margin-bottom: 2rem; }
h1, h2, h3, p { margin: 0; }
h1 { font: 700 clamp(2.15rem, 6vw, 3.7rem)/1.05 Georgia, serif; margin: .45rem 0 .65rem; letter-spacing: -.045em; }
h2 { font: 700 1.65rem/1.2 Georgia, serif; }
h3 { font-size: 1.06rem; }
p, .foot { color: var(--muted); }
.brand { color: var(--ink); font-size: .875rem; font-weight: 700; text-underline-offset: .2em; }
.panel, dialog { background: #fff; border: 1px solid var(--line); border-radius: 1rem; padding: clamp(1rem, 3vw, 1.6rem); }
.panel + .panel { margin-top: 1rem; }
.section-head { margin-bottom: 1rem; }
.rows { list-style: none; padding: 0; margin: 0; }
.row { border-top: 1px solid var(--line); padding: 1rem 0; align-items: start; }
.row > div:first-child { min-width: 0; overflow-wrap: anywhere; }
.row p { white-space: pre-wrap; }
.row .meta { font-size: .875rem; }
.overdue { color: #a12822; font-weight: 700; }
.soon { color: #795219; font-weight: 700; }
.calendar { display: flex; align-items: center; gap: 1rem; border-top: 1px solid var(--line); padding-top: 1rem; margin-top: 1rem; }
.calendar p, .foot { font-size: .875rem; }
.foot, #status:not(:empty) { margin-top: 1rem; }
button, input, textarea, select { font: inherit; }
button, input, textarea, select {
  border: 1px solid #91a89a;
  border-radius: .5rem;
  color: var(--ink);
  background: #fff;
  padding: .48rem .75rem;
}
button { cursor: pointer; font-weight: 650; flex-shrink: 0; }
button:hover { background: #edf4ee; }
button:disabled { opacity: .55; cursor: default; }
.primary { background: var(--ink); color: white; border-color: var(--ink); }
.primary:hover { background: #275b4e; }
.danger { color: #922923; margin-right: auto; }
:focus-visible { outline: 3px solid #278267; outline-offset: 2px; }
dialog { color: inherit; width: min(34rem, calc(100% - 2rem)); }
dialog::backdrop { background: #182d2970; }
form { display: grid; gap: .9rem; }
form label { display: grid; gap: .25rem; min-width: 0; font-weight: 600; }
form input, form textarea, form select { width: 100%; }
.pair > * { flex: 1; }
.actions { justify-content: flex-end; flex-wrap: wrap; gap: .45rem; }
@media (max-width: 40rem) {
  main { padding-top: 1.6rem; }
  header, .section-head, .row, .calendar { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 28rem) { .pair { display: grid; gap: .9rem; } }

[role="alert"]:empty { display: none; }
