:root {
  --paper: #0d0f14;
  --panel: #141922;
  --ink: #e2e6ee;
  --ink-soft: #a2acbd;
  --ink-faint: #6f7b8f;
  --rule: #232b38;
  --accent: #7fa6e8;
  --good: #79b78f;
  --bad: #e08a8a;
}
@media (prefers-color-scheme: light) {
  :root {
    --paper: #fbfaf7; --panel: #ffffff; --ink: #171b22; --ink-soft: #4d5665;
    --ink-faint: #7c8698; --rule: #e3ded4; --accent: #33559b;
    --good: #3f7050; --bad: #a44;
  }
}

* { box-sizing: border-box; }
body {
  background: var(--paper); color: var(--ink); margin: 0;
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", sans-serif;
  padding: 2.5rem 1.25rem 5rem;
}
.wrap { max-width: 42rem; margin: 0 auto; }
a { color: var(--accent); }

header {
  display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap;
  border-bottom: 1px solid var(--rule); padding-bottom: 1rem; margin-bottom: 2rem;
}
header h1 {
  font-family: "Iowan Old Style", Palatino, Georgia, serif;
  font-size: 1.3rem; font-weight: 600; margin: 0;
}
header h1 a { color: inherit; text-decoration: none; }
nav { margin-left: auto; display: flex; gap: 1rem; font-size: .9rem; }

h2 {
  font-size: .78rem; letter-spacing: .11em; text-transform: uppercase;
  color: var(--ink-faint); font-weight: 600; margin: 2.2rem 0 .7rem;
}
h3 { font-family: "Iowan Old Style", Palatino, Georgia, serif;
     font-size: 1.25rem; font-weight: 600; margin: 0 0 .5rem; }
p { margin: 0 0 .9rem; }
.muted { color: var(--ink-soft); font-size: .93rem; }

.panel {
  background: var(--panel); border: 1px solid var(--rule);
  border-radius: 10px; padding: 1.2rem 1.3rem;
}

table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: .55rem .6rem; border-bottom: 1px solid var(--rule); }
th { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase;
     color: var(--ink-faint); font-weight: 600; }

.field { margin: 0 0 1rem; }
label { display: block; font-size: .82rem; color: var(--ink-soft); margin-bottom: .3rem; }
input, textarea, select, button {
  font: inherit; color: var(--ink); background: var(--paper);
  border: 1px solid var(--rule); border-radius: 7px; padding: .5rem .65rem;
}
input[type=text], textarea, select { width: 100%; }
textarea { min-height: 7rem; resize: vertical; }
input[type=file] { width: 100%; padding: .55rem; }
.hint { color: var(--ink-faint); font-size: .8rem; margin-top: .3rem; display: block; }

button, .button {
  background: #233052; border-color: #39456a; cursor: pointer;
  display: inline-block; text-decoration: none; padding: .55rem 1rem;
}
button:hover, .button:hover { background: #2b3a63; }
button:disabled { opacity: .5; cursor: default; }
button.quiet { background: transparent; }
button.danger { background: #3a1f24; border-color: #5f3038; color: #f0c9cf; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

progress { width: 100%; height: .7rem; margin-top: .6rem; }
.notice { border-left: 3px solid var(--accent); background: var(--panel);
          padding: .8rem 1rem; border-radius: 0 8px 8px 0; margin-bottom: 1.5rem; }
.notice.bad { border-left-color: var(--bad); }
.notice.good { border-left-color: var(--good); }

footer { margin-top: 3.5rem; padding-top: 1.2rem; border-top: 1px solid var(--rule);
         color: var(--ink-faint); font-size: .85rem; }
.row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
