:root {
  color-scheme: light dark;
  --paper: light-dark(#f6efe4, #1a1410);
  --ink: light-dark(#2a2118, #f6efe4);
  --muted: light-dark(#5c4638, #d4c3b0);
  --accent: light-dark(#8f3a22, #e7a07a);
  --accent-ink: light-dark(#fff8f2, #2a120c);
  --quiet: light-dark(#efe2cf, #2e261f);
  --card: light-dark(#fffaf4, #261e18);
  --line: light-dark(#e4d2bf, #3d3228);
  --warn: light-dark(#8f3a22, #e7a07a);
  --sage: light-dark(#3f6b52, #8faf96);
  --ochre: light-dark(#c4a574, #c4a574);
  --clay: light-dark(#8f3a22, #c46a45);
  --sand: light-dark(#f3e6d4, #3a2e24);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--paper);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36' viewBox='0 0 36 36'%3E%3Cpath d='M18 4 L24 18 L18 32 L12 18 Z' fill='none' stroke='%238f3a22' stroke-opacity='0.16'/%3E%3C/svg%3E");
  background-size: 36px 36px;
  color: var(--ink);
  font: 17px/1.5 "Segoe UI", "Helvetica Neue", sans-serif;
}

@media (prefers-color-scheme: dark) {
  body {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36' viewBox='0 0 36 36'%3E%3Cpath d='M18 4 L24 18 L18 32 L12 18 Z' fill='none' stroke='%23e7a07a' stroke-opacity='0.14'/%3E%3C/svg%3E");
  }
}

body::before {
  content: "";
  display: block;
  height: 8px;
  background: repeating-linear-gradient(
    90deg,
    var(--clay) 0 14px,
    var(--ochre) 14px 22px,
    var(--sage) 22px 34px,
    var(--sand) 34px 44px
  );
}

a { color: var(--ink); }

.wrap {
  max-width: 64rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
}

.mast {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  align-items: center;
  margin-bottom: 1.75rem;
}

.brand {
  font-family: Georgia, "Iowan Old Style", Palatino, serif;
  font-weight: 500;
  font-size: 1.45rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--ink);
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

nav a, button, .button {
  font: inherit;
  border-radius: 999px;
  padding: 0.5rem 0.95rem;
  text-decoration: none;
}

nav a {
  background: var(--quiet);
  color: var(--ink);
}

nav a[aria-current="page"] {
  background: var(--accent);
  color: var(--accent-ink);
}

button, .button {
  background: var(--accent);
  color: var(--accent-ink);
  border: 0;
  cursor: pointer;
}

button.secondary, .button.secondary, a.quiet {
  background: var(--quiet);
  color: var(--ink);
}

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid var(--sage);
  outline-offset: 2px;
}

h1 {
  font-family: Georgia, "Iowan Old Style", Palatino, serif;
  font-weight: 500;
  font-size: 2.15rem;
  line-height: 1.2;
  margin: 0 0 0.65rem;
}

h1::after {
  content: "";
  display: block;
  width: 5.5rem;
  height: 0.85rem;
  margin-top: 0.45rem;
  background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 88 14'%3E%3Cpath d='M2 7 H34' stroke='%238f3a22' stroke-width='1.2'/%3E%3Cpath d='M44 1 L50 7 L44 13 L38 7 Z' fill='none' stroke='%233f6b52' stroke-width='1.2'/%3E%3Cpath d='M54 7 H86' stroke='%23c4a574' stroke-width='1.2'/%3E%3C/svg%3E");
}

@media (prefers-color-scheme: dark) {
  h1::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 88 14'%3E%3Cpath d='M2 7 H34' stroke='%23e7a07a' stroke-width='1.2'/%3E%3Cpath d='M44 1 L50 7 L44 13 L38 7 Z' fill='none' stroke='%238faf96' stroke-width='1.2'/%3E%3Cpath d='M54 7 H86' stroke='%23c4a574' stroke-width='1.2'/%3E%3C/svg%3E");
  }
}

.lede, .status, .who, .when { color: var(--muted); }

.card, .table-wrap {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 1rem 1.1rem;
  margin-top: 1.25rem;
}

.flash {
  background: var(--quiet);
  color: var(--ink);
  border-radius: 16px;
  padding: 0.75rem 1rem;
}

label { display: block; margin-bottom: 0.75rem; }

input, select {
  display: block;
  width: 100%;
  margin-top: 0.3rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
}

.row-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }

table { width: 100%; border-collapse: collapse; }

th, td {
  text-align: left;
  padding: 0.65rem 0.35rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

tr:last-child td { border-bottom: 0; }

.warn { color: var(--warn); }

.pictures {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: 1.15rem;
  margin-top: 1.25rem;
}

.pictures figure {
  margin: 0;
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 0.55rem 0.55rem 0;
}

.pictures img {
  display: block;
  width: 100%;
  height: 12rem;
  object-fit: cover;
  border-radius: 14px;
  background: var(--quiet);
}

.pictures figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.7rem;
  padding: 0.7rem 0.3rem 0.8rem;
}

.file {
  font-family: Georgia, "Iowan Old Style", Palatino, serif;
  font-weight: 500;
}

.pictures figcaption .actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
}

.pictures figcaption .actions form { margin: 0; }

.pictures figcaption .actions a,
.pictures figcaption .actions button {
  margin: 0;
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  background: var(--quiet);
  color: var(--ink);
  text-decoration: none;
}

@media (max-width: 36rem) {
  .pictures figcaption .actions { margin-left: 0; }
  h1 { font-size: 1.8rem; }
}
