:root {
  --bg: #0f172a;
  --panel: #1e293b;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --line: #334155;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.hero,
main,
footer {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.25rem;
}

.hero.compact {
  padding-bottom: 0.5rem;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.25rem;
  max-width: 1100px;
  margin: 0 auto;
}

.nav a {
  color: var(--accent);
}

.nav-account {
  margin-left: auto;
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.nav-user {
  color: var(--muted);
  font-size: 0.9rem;
}

.form-grid {
  display: grid;
  gap: 0.75rem 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .form-grid {
    grid-template-columns: 1fr 1fr;
  }
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.95rem;
}

input,
button {
  font: inherit;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  border: 1px solid var(--line);
}

input {
  background: #020617;
  color: var(--text);
}

button {
  background: var(--accent);
  color: #0f172a;
  cursor: pointer;
}

button.danger {
  background: #f87171;
}

.form-actions {
  display: flex;
  gap: 0.75rem;
  align-items: end;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 0.6rem 0.4rem;
  text-align: left;
  vertical-align: top;
}

.section-head,
.pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.flash {
  max-width: 1100px;
  margin: 0 auto 1rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
}

.flash.error {
  background: #7f1d1d;
}

.flash.success {
  background: #14532d;
}

.derived {
  grid-column: 1 / -1;
  color: var(--accent);
}

main .panel + .panel {
  margin-top: 1rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  font-size: 0.8rem;
}

h1,
h2 {
  font-weight: 600;
}

.lede,
.muted {
  color: var(--muted);
}

.panel,
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.25rem;
}

.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .grid {
    grid-template-columns: 1fr 1fr;
  }
}

pre {
  overflow: auto;
  background: #020617;
  color: #bbf7d0;
  padding: 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
}

footer {
  color: var(--muted);
  font-size: 0.9rem;
}

.summary-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}

.summary-list div {
  background: #020617;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
}

.summary-list dt {
  color: var(--muted);
  font-size: 0.85rem;
}

.summary-list dd {
  margin: 0.2rem 0 0;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

button.linkish {
  background: transparent;
  color: var(--accent);
  border: none;
  padding: 0;
  text-decoration: underline;
}

.inline-filter {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.9rem;
  min-width: 12rem;
}

select {
  font: inherit;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #020617;
  color: var(--text);
}

.bar-list {
  display: grid;
  gap: 0.55rem;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(5rem, 8rem) 1fr 3rem;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.9rem;
}

.bar-label {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-track {
  background: #020617;
  border-radius: 999px;
  height: 0.65rem;
  overflow: hidden;
}

.bar-track span {
  display: block;
  height: 100%;
  background: var(--accent);
}

.bar-count {
  text-align: right;
}

#quality-warnings {
  margin: 0;
  padding-left: 1.2rem;
}
