:root {
  --bg: #14110e;
  --bg-raise: #1e1a16;
  --ink: #f4efe6;
  --muted: #b7aa98;
  --line: #3a3229;
  --gold: #e0b15a;
  --gold-dim: #8a6a2e;
  --ok: #8fbf7a;
  --bad: #d98973;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --radius: 18px;
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(224, 177, 90, 0.12), transparent 50%),
    var(--bg);
  color: var(--ink);
}

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

.wrap {
  width: min(720px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 64px;
}

.brand {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}
.brand h1 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 560;
  font-size: 1.8rem;
  margin: 0;
  letter-spacing: -0.02em;
}
.brand p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.brand h1 a { color: inherit; text-decoration: none; }

.card {
  background: var(--bg-raise);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  margin-bottom: 16px;
}

.lede {
  color: var(--muted);
  line-height: 1.5;
  margin-top: 0;
}

#reader {
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
  background: #0c0a08;
  min-height: 220px;
}
#reader video { width: 100% !important; border-radius: 12px; }

.row {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}
.row input, .row button, form input, form button, form select {
  font: inherit;
}
input, select {
  width: 100%;
  padding: 14px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #12100d;
  color: var(--ink);
}
button, .btn {
  appearance: none;
  border: 0;
  border-radius: 12px;
  padding: 14px 16px;
  background: var(--gold);
  color: #1a140c;
  font-weight: 650;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  display: inline-block;
}
button.secondary, .btn.secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
button:disabled { opacity: 0.55; cursor: wait; }

.banner {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  display: none;
}
.banner.show { display: block; }
.banner.ok { background: rgba(143, 191, 122, 0.15); color: var(--ok); }
.banner.bad { background: rgba(217, 137, 115, 0.15); color: var(--bad); }

.hint { color: var(--muted); font-size: 0.9rem; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
th, td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th { color: var(--muted); font-weight: 550; }
.mono { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 0.86rem; }
.pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.78rem;
  text-transform: lowercase;
}
.pill.ofd { color: var(--gold); border-color: var(--gold-dim); }
.pill.ok { color: var(--ok); }
.pill.bad { color: var(--bad); }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.table-wrap { overflow-x: auto; }

@media (max-width: 640px) {
  .brand { flex-direction: column; }
  .row { flex-direction: column; }
  button, .btn { width: 100%; text-align: center; }
}
