:root {
  color-scheme: light;
  --paper: #f3efe5;
  --card: #faf8f1;
  --ink: #181715;
  --muted: #77746b;
  --line: #c8c2b5;
  --sage: #7f9276;
  --danger: #963b31;
  font-family: Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
}
.testbar {
  background: var(--ink);
  color: white;
  padding: 0.65rem;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font:
    700 0.72rem Arial,
    sans-serif;
}
.platform-header {
  min-height: 86px;
  padding: 1.4rem clamp(1.25rem, 5vw, 4rem);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
}
.brand {
  color: inherit;
  text-decoration: none;
  font:
    2rem Georgia,
    serif;
}
.platform-header span,
.eyebrow {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  font-weight: 700;
}
main {
  width: min(1180px, calc(100% - 2rem));
  margin: 3rem auto 5rem;
}
h1,
h2 {
  margin: 0 0 1rem;
  font-family: Georgia, serif;
  font-weight: 400;
}
h1 {
  font-size: clamp(2.4rem, 7vw, 4.8rem);
  line-height: 0.98;
}
h2 {
  font-size: clamp(1.7rem, 4vw, 2.5rem);
}
.eyebrow {
  margin: 0 0 1rem;
}
.lede {
  color: var(--muted);
  font:
    1.25rem/1.5 Georgia,
    serif;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  padding: clamp(1.3rem, 4vw, 2.2rem);
}
.gate {
  width: min(560px, 100%);
  margin: 5rem auto;
}
form {
  display: grid;
  gap: 1.15rem;
  margin-top: 1.5rem;
}
label {
  display: grid;
  gap: 0.45rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  font-weight: 700;
}
input,
select,
button {
  min-height: 48px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
}
input,
select {
  width: 100%;
  padding: 0.75rem;
}
button {
  padding: 0.75rem 1.2rem;
  background: var(--ink);
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}
button.secondary {
  background: transparent;
  color: var(--ink);
}
button.danger {
  border-color: var(--danger);
  color: var(--danger);
  background: transparent;
}
button.compact {
  min-height: 38px;
  padding: 0.55rem 0.8rem;
}
button:disabled {
  cursor: wait;
  opacity: 0.55;
}
details {
  margin-top: 1.8rem;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}
summary {
  cursor: pointer;
  font-weight: 700;
}
.message {
  min-height: 1.3rem;
  color: var(--sage);
}
.message.error {
  color: var(--danger);
}
.dashboard-head,
.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  margin: 2rem 0;
  border: 1px solid var(--line);
  background: var(--line);
}
.metric {
  background: var(--card);
  padding: 1.3rem;
}
.metric strong {
  display: block;
  font:
    2.3rem Georgia,
    serif;
}
.metric span {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.table-wrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 820px;
}
th,
td {
  padding: 0.9rem 0.65rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}
th {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.68rem;
}
td small {
  display: block;
  color: var(--muted);
  margin-top: 0.25rem;
}
td select {
  min-width: 130px;
}
.count {
  white-space: nowrap;
}
.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.audit {
  margin: 0;
  padding: 0;
  list-style: none;
  max-height: 560px;
  overflow: auto;
}
.audit li {
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--line);
}
.audit time,
.audit small {
  display: block;
  color: var(--muted);
  margin-top: 0.2rem;
}

@media (max-width: 760px) {
  .platform-header {
    min-height: 68px;
    padding: 1rem;
  }
  .brand {
    font-size: 1.55rem;
  }
  .platform-header span {
    font-size: 0.6rem;
  }
  main {
    width: min(100% - 1rem, 1180px);
    margin-top: 1rem;
  }
  .gate {
    margin-top: 2rem;
  }
  .metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  .split {
    grid-template-columns: 1fr;
  }
  .dashboard-head {
    align-items: center;
  }
}
