/* Deliberately zero external network requests (no Google Fonts, no CDNs) —
   this is a private data system, and every outside request is one more
   thing that could leak that someone is viewing it. System font stacks
   give a close feel to the brand's serif/humanist pairing without it. */

:root {
  --font-display: Georgia, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  --font-body: -apple-system, "Segoe UI", Karla, Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Consolas, monospace;
}

:root {
  --bg: #efebe2;
  --surface: #ffffff;
  --surface-2: #e6dfcd;
  --ink: #1e2a38;
  --ink-soft: #475363;
  --muted: #7c7364;
  --line: #ddd3bd;
  --accent: #9c6b26;
  --accent-strong: #7c521a;
  --accent-ink: #ffffff;
  --good: #2f6e64;
  --good-bg: #e4efec;
  --bad: #a3391f;
  --bad-bg: #f6e6e0;
  --shadow: 0 1px 2px rgba(30, 42, 56, 0.06), 0 8px 22px rgba(30, 42, 56, 0.07);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171a1e;
    --surface: #1f242b;
    --surface-2: #262c34;
    --ink: #ede9df;
    --ink-soft: #c3bcac;
    --muted: #93897a;
    --line: #333b44;
    --accent: #d6a34f;
    --accent-strong: #e8b968;
    --accent-ink: #221704;
    --good: #79c1b1;
    --good-bg: #16241f;
    --bad: #e0866a;
    --bad-bg: #2a1a15;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 12px 30px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-strong); }

h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.01em; margin: 0; text-wrap: balance; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.75rem;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.topbar .brand { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; }
.topbar nav { display: flex; gap: 1.1rem; align-items: center; font-size: 0.9rem; }
.topbar nav a { color: var(--ink-soft); text-decoration: none; }
.topbar nav a:hover { color: var(--accent-strong); }

.wrap { max-width: 980px; margin: 0 auto; padding: 2.5rem 1.5rem 4rem; }
.wrap.narrow { max-width: 460px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 1.5rem;
}

.stack { display: flex; flex-direction: column; gap: 1.25rem; }

label { display: block; font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 0.3rem; font-weight: 600; }
input[type="text"], input[type="password"], input[type="number"], input[type="date"], select {
  width: 100%;
  font: inherit;
  padding: 0.6rem 0.7rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
}
input:focus, select:focus, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.field { margin-bottom: 1rem; }
.hint { font-size: 0.8rem; color: var(--muted); margin-top: 0.3rem; }
.checkbox-row { display: flex; align-items: center; gap: 0.5rem; }
.checkbox-row label { margin: 0; font-weight: 500; }

button, .btn {
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 8px;
  padding: 0.6rem 1.1rem;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
button:hover, .btn:hover { filter: brightness(0.97); }
button.primary, .btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
button.danger, .btn.danger { background: var(--bad-bg); color: var(--bad); border-color: transparent; }
button:disabled { opacity: 0.55; cursor: not-allowed; }

.error-banner {
  background: var(--bad-bg);
  color: var(--bad);
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
  font-size: 0.88rem;
}

table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
th { text-align: left; font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); padding: 0.6rem 0.7rem; border-bottom: 1px solid var(--line); }
td { padding: 0.7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: none; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }

.badge { display: inline-block; font-family: var(--font-mono); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.04em; padding: 0.15rem 0.5rem; border-radius: 5px; font-weight: 600; }
.badge.good { background: var(--good-bg); color: var(--good); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.neutral { background: var(--surface-2); color: var(--ink-soft); }

.progress-track { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.progress-fill { height: 100%; background: var(--accent); width: 0%; transition: width 0.15s linear; }

video { width: 100%; border-radius: 10px; background: #000; display: block; }

.eyebrow { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-strong); }

.empty { color: var(--muted); font-size: 0.9rem; padding: 2rem 0; text-align: center; }

@media (max-width: 620px) {
  .wrap { padding: 1.5rem 1rem 3rem; }
  .topbar { padding: 0.9rem 1rem; }
}
