:root {
  color-scheme: light;
  --ink: #1c1915;
  --muted: #4d463c;
  --paper: #f6f1e7;
  --card: #fffaf3;
  --line: #ddd4c4;
  --accent: #0c5c56;
  --accent-ink: #ffffff;
  --alert: #7a1f2b;
  --ok: #1d5a32;
  --focus: #0c5c56;
}

* { box-sizing: border-box; }

html, body { width: 100%; max-width: 100%; overflow-x: hidden; }

body {
  margin: 0;
  font-family: "Iowan Old Style", Palatino, Georgia, serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
}

a { color: var(--accent); }
a:hover { text-decoration: none; }

.skip {
  position: absolute;
  left: 0.5rem;
  top: -3rem;
  background: var(--ink);
  color: white;
  padding: 0.5rem 0.75rem;
}
.skip:focus { top: 0.5rem; }

.site-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  align-items: center;
  padding: 0.75rem 1.25rem;
  background: var(--ink);
  color: #f6f1e7;
}
.site-header a, .site-header .linkish { color: #f6f1e7; }
.brand { font-weight: 700; text-decoration: none; letter-spacing: 0.01em; }
.site-header nav { display: flex; flex: 1 1 12rem; min-width: 0; flex-wrap: wrap; gap: 0.75rem 1rem; align-items: center; }

.page { width: 100%; max-width: 46rem; margin: 0 auto; padding: 1.25rem; min-width: 0; }
h1 { font-size: 1.8rem; line-height: 1.2; margin-top: 0; }
h2 { font-size: 1.2rem; }

.banner { padding: 0.75rem 1rem; background: #e5f2ef; border-left: 4px solid var(--ok); }
.banner.alert { background: #f8e8ea; border-left-color: var(--alert); }

.card, form.panel, .stack > * {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem;
}
.stack { display: grid; gap: 0.75rem; }

label { display: block; font-weight: 700; margin-top: 0.75rem; }
input, select, textarea {
  width: 100%;
  font: inherit;
  padding: 0.7rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  color: var(--ink);
}
textarea { min-height: 6rem; }

button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin-top: 0.75rem;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  border: 2px solid var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}
button.secondary, a.secondary {
  background: transparent;
  color: var(--accent);
}
button.linkish {
  background: transparent;
  color: inherit;
  border: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  text-decoration: underline;
}
.danger { background: var(--alert); border-color: var(--alert); }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.meta { color: var(--muted); }
.status { font-weight: 700; }
.actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.errors { color: var(--alert); }

.witness-page { padding-top: 1.5rem; }
.witness-body { background: #f3efe6; }
.choice { display: grid; gap: 0.75rem; }
@media (min-width: 700px) {
  .choice { grid-template-columns: 1fr 1fr; }
  .choice button { width: 100%; }
}

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.45rem 0.2rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.timeline { list-style: none; padding: 0; }
.timeline li { padding: 0.35rem 0; border-bottom: 1px solid var(--line); }
