:root {
  color-scheme: light;
  --text: #172d2a;
  --muted: #50655e;
  --line: #d7e0d9;
  --accent: #14584b;
  --surface: #fff;
  --ground: #f2f5f1;
  font-family: "Inter", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--ground); color: var(--text); line-height: 1.5; }
a { color: var(--accent); text-underline-offset: .18em; }
.shell { width: min(1120px, calc(100% - 40px)); margin-inline: auto; }
.bar { background: #142e29; color: #f9fdf9; }
.bar-inner { min-height: 64px; display: flex; align-items: center; gap: 28px; flex-wrap: wrap; padding-block: 10px; }
.wordmark { color: inherit; text-decoration: none; font-weight: 760; white-space: nowrap; }
.bar nav { display: flex; gap: 4px; margin-left: auto; }
.bar nav a, .plain { color: #e4f0e8; padding: 8px 11px; text-decoration: none; }
.bar nav a:hover, .bar nav a[aria-current] { background: #2c4a42; border-radius: 6px; }
.plain { border: 0; background: transparent; }
.content { padding-block: 34px 60px; }
.heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 12px 0 22px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.photo-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(135px, 1fr)); }
.photo-grid img { width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: 6px; border: 1px solid var(--line); }
progress { width: min(100%, 510px); accent-color: var(--accent); }
h1, h2, p { margin: 0; overflow-wrap: anywhere; }
h1 { font-size: clamp(1.7rem, 4vw, 2.55rem); line-height: 1.15; letter-spacing: -.045em; margin-bottom: .3rem; }
h2 { font-size: 1.23rem; letter-spacing: -.02em; }
.muted { color: var(--muted); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 16px; }
.filter, .stack, .login { padding: 20px; }
.filter { display: flex; align-items: end; gap: 14px; flex-wrap: wrap; }
.filter > label { flex: 1 1 180px; }
.filter > a { align-self: center; }
.stack { display: grid; gap: 16px; }
.stack label { max-width: 510px; }
.stack button { justify-self: start; }
.login { max-width: 460px; margin: 6vh auto; }
.login .stack { padding: 15px 0 0; }
label { color: var(--text); font-size: .9rem; font-weight: 650; display: grid; gap: 5px; }
input, select, button { font: inherit; }
input:not([type=hidden]), select { min-width: 0; width: 100%; padding: 9px 11px; border: 1px solid #aabcb2; border-radius: 6px; color: var(--text); background: #fff; }
input[type=file] { padding: 12px; }
button, .button { cursor: pointer; padding: 9px 14px; border-radius: 6px; font-weight: 650; font-size: .92rem; text-decoration: none; }
.primary { background: var(--accent); color: #fff; border: 1px solid var(--accent); }
.primary:hover { background: #0c483d; }
.secondary { color: var(--accent); background: #fff; border: 1px solid #aabcb2; }
.danger { color: #812923; background: #fff2ee; border: 1px solid #e2b8b0; }
:focus-visible { outline: 3px solid #3d927c; outline-offset: 3px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: 11px 16px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
th { color: var(--muted); background: #f8faf7; font-size: .88rem; }
tbody tr:last-child td { border-bottom: 0; }
.article { font-family: "IBM Plex Mono", ui-monospace, monospace; font-weight: 650; }
.value { white-space: pre-wrap; }
.empty { text-align: center; color: var(--muted); padding-block: 28px; }
.pagination { display: flex; justify-content: center; gap: 18px; }
.hint { font-size: .9rem; }
.notice { border: 1px solid #bcd9c6; border-radius: 8px; padding: 10px 14px; background: #edf8ee; margin-bottom: 16px; }
.notice.error { color: #842d25; border-color: #e8c3bc; background: #fff1ed; }
.counts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 0; }
.counts div { padding: 8px 10px; background: var(--ground); border-radius: 6px; }
.counts dt { font-size: .85rem; color: var(--muted); }
.counts dd { margin: 0; font-size: 1.4rem; font-weight: 700; }
details summary { cursor: pointer; color: #812923; }
details p { margin: 8px 0 12px; }
@media (max-width: 600px) {
  .shell { width: calc(100% - 24px); }
  .bar-inner { gap: 5px 12px; }
  .bar nav { order: 3; width: 100%; margin-left: 0; }
  .bar form { margin-left: auto; }
  .heading { align-items: start; flex-direction: column; }
  .content { padding-top: 22px; }
  .counts { grid-template-columns: repeat(2, 1fr); }
}
