/* DTA Test Desk: the one stylesheet. Light and dark follow the browser; usable from 360 px wide. */
:root {
  color-scheme: light dark;
  --bg: #f5f6f8;
  --panel: #ffffff;
  --text: #1c2330;
  --muted: #5b6678;
  --line: #d3d9e2;
  --accent: #1f5fbf;
  --accent-text: #ffffff;
  --danger-bg: #fdeaea;
  --danger-text: #8a1c1c;
  --note-bg: #e8f0fb;
  --note-text: #17356a;
  --secret-bg: #fff6d6;
  --secret-text: #4a3a00;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12161d;
    --panel: #1b212b;
    --text: #e6e9ef;
    --muted: #9aa5b6;
    --line: #313a49;
    --accent: #6ea4ff;
    --accent-text: #0b1220;
    --danger-bg: #3a1a1a;
    --danger-text: #ffb4b4;
    --note-bg: #17283f;
    --note-text: #b9d3ff;
    --secret-bg: #3a3112;
    --secret-text: #ffe8a0;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

.bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.25rem;
  padding: 0.6rem 1rem;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

.brand { font-weight: 700; color: var(--text); text-decoration: none; }

.links { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1rem; }
.links a { padding: 0.35rem 0; }
.links .who { color: var(--muted); }

.page { max-width: 72rem; margin: 0 auto; padding: 1rem; min-width: 0; overflow-wrap: anywhere; }
.links a { display: inline-flex; align-items: center; min-height: 2.75rem; }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem 1.25rem;
}

.narrow { max-width: 30rem; margin: 1.5rem auto; }

h1 { font-size: 1.5rem; margin: 0 0 0.75rem; }
h2 { font-size: 1.15rem; margin: 1.5rem 0 0.5rem; }

label { display: block; margin: 0.75rem 0 0.25rem; font-weight: 600; }

input, select, textarea {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.4rem 0.6rem;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
}

input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

button, a.button {
  display: inline-block;
  min-height: 2.75rem;
  margin-top: 1rem;
  padding: 0.4rem 1rem;
  font: inherit;
  font-weight: 600;
  color: var(--accent-text);
  background: var(--accent);
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}

button:disabled { opacity: 0.55; cursor: not-allowed; }

form.inline { display: inline-block; margin: 0; }
form.inline button { margin-top: 0; }
form.inline label { display: inline-block; margin: 0 0.25rem 0 0; }
form.inline select { width: auto; }

button.linklike {
  min-height: 2.75rem;
  padding: 0.35rem 0;
  color: var(--accent);
  background: none;
  text-decoration: underline;
  font-weight: 400;
}

.notice {
  margin: 0 0 1rem;
  padding: 0.6rem 0.8rem;
  border-radius: 6px;
  background: var(--note-bg);
  color: var(--note-text);
}

.notice.error { background: var(--danger-bg); color: var(--danger-text); }
.notice.secret { background: var(--secret-bg); color: var(--secret-text); }
.notice p { margin: 0.25rem 0; }
.temp code { font-size: 1.25rem; letter-spacing: 0.05em; user-select: all; }

.muted { color: var(--muted); }
.months a, .months strong { margin-right: 0.75rem; }

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

table.records { width: 100%; border-collapse: collapse; }
table.records th, table.records td { padding: 0.45rem 0.5rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
table.records .actions { display: flex; flex-wrap: wrap; gap: 0.4rem; }

/* Narrow screens: every table row becomes a small card with its labels. */
@media (max-width: 40rem) {
  table.records thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table.records, table.records tbody, table.records tr, table.records td { display: block; width: 100%; }
  table.records tr { margin-bottom: 0.75rem; border: 1px solid var(--line); border-radius: 6px; }
  table.records td { border-bottom: 0; word-break: break-word; }
  table.records td::before { content: attr(data-label) ": "; font-weight: 600; color: var(--muted); }
  table.records td.actions { display: flex; }
  table.records td.actions::before { content: none; }
}

/* ---- Round 2b: dashboard, release page, findings ---- */

:root {
  --ok-bg: #e3f4e6;
  --ok-text: #14532d;
  --warn-bg: #fff1d6;
  --warn-text: #6b4200;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ok-bg: #14301c;
    --ok-text: #b7ebc4;
    --warn-bg: #3a2b0d;
    --warn-text: #ffd998;
  }
}

.panel + .panel, .panel + section.panel { margin-top: 1rem; }
h3 { font-size: 1.05rem; margin: 1rem 0 0.4rem; }
h4 { font-size: 1rem; margin: 0 0 0.4rem; }
textarea { resize: vertical; }

.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li { padding: 0.5rem 0; border-bottom: 1px solid var(--line); }
.plain-list li:last-child { border-bottom: 0; }

.badge {
  display: inline-block;
  padding: 0.05rem 0.55rem;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid currentColor;
  border-radius: 999px;
  color: var(--note-text);
  background: var(--note-bg);
}
.badge.ok { color: var(--ok-text); background: var(--ok-bg); }
.badge.warn { color: var(--warn-text); background: var(--warn-bg); }
.badge.bad { color: var(--danger-text); background: var(--danger-bg); }

.facts { display: grid; grid-template-columns: max-content 1fr; gap: 0.2rem 0.9rem; margin: 0.4rem 0 0.8rem; }
.facts dt { font-weight: 600; color: var(--muted); }
.facts dd { margin: 0; }

.sides { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; }
.side { padding: 0.75rem 1rem; border: 1px solid var(--line); border-radius: 6px; }

.filter { display: flex; flex-wrap: wrap; align-items: end; gap: 0.5rem 1rem; margin: 0 0 1rem; }
.filter > div { flex: 1 1 12rem; }
.filter button { margin-top: 0; }

.progress { margin: 0 0 0.75rem; font-weight: 600; }

.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.25rem 1rem; align-items: baseline; }

.step {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--line);
  border-left-width: 6px;
  border-radius: 6px;
  scroll-margin-top: 1rem;
}
.step:target { outline: 3px solid var(--accent); outline-offset: 2px; }
.step .stepid { font-family: ui-monospace, Consolas, monospace; margin-right: 0.4rem; }
.step p { margin: 0.3rem 0; }
.step .answer { margin: 0.5rem 0; padding: 0.5rem 0.75rem; background: var(--bg); border-radius: 6px; }

fieldset.choices { margin: 0.6rem 0 0; padding: 0; border: 0; min-width: 0; }
fieldset.choices legend { padding: 0; font-weight: 600; }
.choices .row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.3rem; }
label.choice {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  margin: 0;
  padding: 0.25rem 0.9rem 0.25rem 0.7rem;
  font-weight: 400;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
}
label.choice input { width: 1.4rem; height: 1.4rem; min-height: 0; margin: 0; padding: 0; accent-color: var(--accent); }

.verdict { font-weight: 700; }

@media (max-width: 40rem) {
  .facts { grid-template-columns: 1fr; }
  .facts dt { margin-top: 0.4rem; }
  .step { padding: 0.6rem 0.7rem; }
  button, a.button { width: 100%; }
  form.inline button { width: auto; }
  .page { padding: 0.6rem; }
  .panel { padding: 0.8rem; }
}

