:root {
  color-scheme: light;
  --ink: #182741;
  --muted: #54617a;
  --line: #d4cbb7;
  --paper: #fffefa;
  --blue: #244b82;
  --blue-light: #eaf1fb;
  --gold: #e0cfaa;
  --focus: #345dc0;
  font: 100%/1.55 system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: #f3efe6; color: var(--ink); }
a { color: var(--blue); }
button, input, textarea, select { font: inherit; }
button, .button {
  min-height: 44px; margin: 0; padding: .48rem .9rem; border: 1px solid var(--line);
  border-radius: .55rem; background: var(--paper); color: var(--ink); cursor: pointer;
  text-decoration: none; display: inline-flex; align-items: center; justify-content: center;
}
button:hover, .button:hover { background: var(--blue-light); }
button.primary, .button.primary { background: var(--blue); color: white; border-color: var(--blue); }
button.danger { color: #8a2526; }
button:disabled { opacity: .55; cursor: wait; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
[hidden] { display: none !important; }
header { background: #142239; color: #faf3dd; border-bottom: 2px solid var(--gold); }
.masthead, nav, main { width: min(100% - 2rem, 68rem); margin-inline: auto; }
.masthead { min-height: 4.25rem; display: flex; justify-content: space-between; align-items: center; gap: .75rem; }
.brand { display: flex; align-items: center; gap: .7rem; color: inherit; text-decoration: none; }
.brand span { color: #a3c5fa; font-size: 1.2rem; }
.brand strong, h1, h2, h3 { font-family: Georgia, serif; }
.brand strong { font-size: 1.35rem; }
.quiet { background: transparent; color: inherit; }
header button:hover { background: #293a57; }
nav { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .9rem; }
nav button[aria-current="page"], .selected { background: var(--blue-light); border-color: var(--blue); color: var(--blue); }
main { padding-block: 1.6rem 4rem; }
h1 { font-size: clamp(1.9rem, 5vw, 3rem); margin: 0 0 1rem; line-height: 1.17; }
h2, h3 { margin: 0 0 .65rem; }
p { margin: 0 0 .85rem; overflow-wrap: anywhere; }
.muted { color: var(--muted); }
.surface {
  padding: clamp(1rem, 3vw, 1.6rem); background: var(--paper);
  border: 1px solid var(--line); border-radius: .8rem; margin-bottom: 1rem;
}
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); gap: 1rem; align-items: start; }
.narrow { max-width: 28rem; margin-inline: auto; }
label { display: grid; gap: .25rem; font-weight: 600; }
label.check { display: flex; align-items: center; gap: .55rem; font-weight: 400; }
input, textarea, select {
  width: 100%; min-height: 44px; border: 1px solid #aaa9a7; border-radius: .45rem;
  padding: .48rem .65rem; background: #fff; color: var(--ink); min-width: 0;
}
input[type="checkbox"] { width: 1.15rem; min-height: 1.15rem; accent-color: var(--blue); }
textarea { min-height: 7rem; resize: vertical; }
form, .stack { display: grid; gap: .75rem; }
.actions, .crumbs, .choices { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.crumbs { margin-bottom: 1rem; }
.crumbs button { padding-inline: .65rem; }
.entries { list-style: none; padding: 0; margin: .8rem 0 0; }
.entries li { display: flex; align-items: center; gap: .4rem; border-top: 1px solid var(--line); }
.entry {
  flex: 1; min-width: 0; justify-content: start; gap: .55rem; text-align: left;
  border: 0; border-radius: 0; padding: .6rem .35rem; overflow-wrap: anywhere;
}
.entry span:last-child { min-width: 0; }
.dots { min-width: 44px; font-weight: 700; padding: .25rem; }
.icon { min-width: 1.2rem; color: var(--blue); }
dialog { width: min(calc(100% - 1.5rem), 40rem); max-height: 88dvh; border: 1px solid var(--line); border-radius: .85rem; padding: 1rem; color: var(--ink); background: var(--paper); }
dialog::backdrop { background: #10182bb0; }
.dialog-head { display: flex; justify-content: space-between; align-items: start; gap: .8rem; margin-bottom: .8rem; }
.prose { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 29rem; overflow: auto; padding: .6rem; background: #f3efe6; border-radius: .5rem; }
.attachment { width: auto; max-width: 100%; max-height: 20rem; object-fit: contain; }
fieldset { border: 1px solid var(--line); border-radius: .5rem; }
#status { position: fixed; z-index: 3; right: 1rem; bottom: 1rem; max-width: min(31rem,calc(100% - 2rem)); padding: .7rem 1rem; background: #142239; color: white; border-radius: .5rem; box-shadow: 0 6px 24px #141f3b30; }
.error { color: #8a2526; }
.skip { position: absolute; top: -5rem; left: .5rem; background: white; padding: .5rem; z-index: 5; }
.skip:focus { top: .5rem; }
@media (max-width: 42rem) {
  :root { font-size: 1rem; }
  nav { width: 100%; padding: 0 1rem .4rem; flex-wrap: nowrap; overflow-x: auto; }
  nav button { white-space: nowrap; }
  main { padding-top: 1.2rem; }
}
