:root {
  color-scheme: light;
  font: 16px/1.5 system-ui, sans-serif;
  color: #172b23;
  background: #f3f5f0;
  --green: #18543c;
  --muted: #4e6258;
  --line: #d6dfd7;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
.wrap { width: min(1100px, calc(100% - 2rem)); margin-inline: auto; }
.masthead { background: #153c2f; color: #fff; }
.brand { display: flex; align-items: center; gap: .85rem; padding-block: 1rem; }
.brand strong, .brand div span { display: block; }
.brand div span { color: #d6e5d9; font-size: .85rem; }
.mark { display: grid; place-items: center; width: 2.65rem; aspect-ratio: 1; border: 1px solid #a2c1a8; border-radius: 50%; font-weight: 750; }
main { padding-block: 2rem 4rem; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); line-height: 1.12; letter-spacing: -.045em; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.1rem; }
.eyebrow { color: var(--green); font-size: .77rem; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; margin-bottom: .4rem; }
.intro { margin: .65rem 0 1.5rem; }
.intro, .muted, .empty { color: var(--muted); }
.card { background: #fff; border: 1px solid var(--line); border-radius: 1rem; padding: clamp(.9rem, 3vw, 1.5rem); }
.event-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(10rem, .45fr) auto; align-items: end; gap: .8rem; margin-top: .8rem; }
label { display: grid; gap: .25rem; font-size: .9rem; font-weight: 650; min-width: 0; }
input, select, button { font: inherit; border: 1px solid #a9baae; border-radius: .5rem; min-height: 2.75rem; }
input, select { width: 100%; min-width: 0; background: #fff; color: inherit; padding: .5rem .6rem; }
button { padding: .45rem .75rem; color: var(--green); background: #fff; font-weight: 650; cursor: pointer; }
button:hover { background: #e9f1ea; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #578f67; outline-offset: 2px; }
.primary { background: var(--green); border-color: var(--green); color: white; }
.primary:hover { background: #103d2b; }
.danger { color: #922b22; }
.danger:hover { background: #fdf1ee; }
.event-list { margin-top: 1.75rem; }
.section-head, .service-head, .actions, .status { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; }
.section-head, .service-head { justify-content: space-between; }
.event-list > .muted { margin-top: .45rem; }
.status { min-height: 2rem; margin-block: .25rem; font-size: .9rem; color: var(--green); }
.status .error, #service-error { color: #922b22; }
.picker { max-width: 32rem; margin-bottom: .8rem; }
.event-actions { margin-top: .8rem; }
.service { margin-top: 1rem; }
.service-head { margin-bottom: .6rem; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: .45rem; vertical-align: top; }
thead { background: #edf3ee; }
tbody tr + tr { border-top: 1px solid var(--line); }
td input[type="time"] { min-width: 7rem; }
td input[type="number"] { width: 5rem; }
.names { display: grid; gap: .35rem; }
.names input { min-width: 9rem; }
.names label { grid-template-columns: 2ch minmax(0, 1fr); align-items: center; }
dialog { width: min(31rem, calc(100% - 2rem)); max-height: calc(100% - 2rem); color: inherit; border: 1px solid var(--line); border-radius: 1rem; padding: 1.25rem; }
dialog::backdrop { background: #0c261f99; }
fieldset { padding: 0; border: 0; margin: .8rem 0; }
.check { grid-template-columns: auto 1fr; align-items: center; padding: .3rem .55rem; border-radius: .4rem; min-height: 2.65rem; gap: .55rem; }
.check:hover { background: #edf3ee; }
.check input { width: 1.2rem; min-height: auto; height: 1.2rem; accent-color: var(--green); }
.dialog-actions { justify-content: flex-end; margin-top: .8rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 720px) {
  .event-form { grid-template-columns: 1fr; }
  .event-form > button { justify-self: start; }
  table, tbody, tr, td { display: block; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding-block: .45rem; }
  td { min-width: 0; }
  td[data-label]::before { content: attr(data-label); display: block; font-size: .8rem; font-weight: 700; }
  td:nth-child(n+3) { grid-column: 1 / -1; }
  td input[type="time"], .names input { min-width: 0; }
}
