:root {
  font: 1rem/1.5 system-ui, sans-serif;
  color: #192c40;
  background: #f8f7f5;
  --navy: #192c40;
  --teal: #006c61;
  --line: #d9d5d6;
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--teal); text-underline-offset: .18em; }
button, input, textarea, select { font: inherit; }
button {
  border: 1px solid transparent;
  border-radius: 6px;
  padding: .55rem .95rem;
  color: white;
  background: var(--teal);
  font-weight: 650;
  cursor: pointer;
}

:focus-visible { outline: 3px solid #a47738; outline-offset: 3px; }
h1, h3 { margin: 0; font-family: Georgia, serif; }
h1 { font-size: clamp(2rem, 4vw, 2.8rem); line-height: 1.1; margin-bottom: 1rem; }
label { display: grid; gap: .35rem; font-weight: 650; }
label :is(input, textarea, select) {
  width: 100%;
  min-width: 0;
  border: 1px solid #9ba4ad;
  border-radius: 6px;
  padding: .54rem .65rem;
  font-weight: 400;
  color: inherit;
  background: white;
}
textarea { resize: vertical; }
.toolbar, .toolbar > div, .record-header, .save-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.toolbar { padding: 1rem clamp(1rem, 3vw, 2.5rem); background: var(--navy); color: white; }
.toolbar a { color: white; }
.toolbar strong span { margin-left: .5rem; color: #d5b483; font-weight: 500; }
.toolbar .secondary { background: transparent; border-color: #72879a; color: white; }
.secondary { background: white; border-color: #95a5a6; color: var(--navy); }
.admin-layout {
  display: grid;
  grid-template-columns: 12rem minmax(0, 52rem);
  justify-content: center;
  gap: 1.4rem;
  padding: clamp(1rem, 3vw, 2.5rem);
}
.admin-layout nav { display: grid; align-content: start; gap: .3rem; }
.admin-layout nav a { padding: .6rem .8rem; text-decoration: none; border-radius: 6px; color: var(--navy); }
.admin-layout nav a[aria-current] { background: #dcebe7; font-weight: 700; }
.card { background: white; border: 1px solid var(--line); border-radius: 10px; padding: clamp(1rem, 3vw, 2rem); }
.login { width: min(100% - 2rem, 27rem); margin: 4rem auto; }
.login h1 { margin-top: 1rem; }
.login button { margin-top: 1rem; }
.fields, .record-fields { display: grid; gap: 1rem; }
.fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fields label:has(textarea) { grid-column: 1 / -1; }
.record-editor { margin-top: 1.5rem; }
.record-header { margin-bottom: 1rem; }
.muted { color: #54616a; }
details { border: 1px solid var(--line); border-radius: 6px; margin: .6rem 0; }
summary { padding: .65rem .85rem; cursor: pointer; font-weight: 650; overflow-wrap: anywhere; }
.record-fields { padding: 0 .85rem .85rem; }
.record-fields button { justify-self: start; }
.notice { background: #dcebe7; padding: .7rem .9rem; border-left: 3px solid var(--teal); }
.error { background: #f8e6e7; border-color: #a5333e; }
.save-bar { position: sticky; bottom: 0; background: white; padding: 1rem 0; margin-top: 1rem; border-top: 1px solid var(--line); }
@media (max-width: 670px) {
  .admin-layout { grid-template-columns: minmax(0, 1fr); gap: .8rem; }
  .admin-layout nav { display: flex; flex-wrap: wrap; }
  .fields { grid-template-columns: minmax(0, 1fr); }
}
