:root {
  color-scheme: light dark;
  --ground: #f7f6f2;
  --surface: #ffffff;
  --ink: #1b1b1d;
  --muted: #55555c;
  --line: #d9d7d0;
  --accent: #1f5fbf;
  --accent-ink: #ffffff;
  --ok: #1e7a3c;
  --warn: #9a5b00;
  --bad: #b3261e;
  --code: #eceae4;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.5;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #121214;
    --surface: #1c1c1f;
    --ink: #f2f2f0;
    --muted: #b0b0b6;
    --line: #3a3a40;
    --accent: #6ea8ff;
    --accent-ink: #0b1220;
    --ok: #5fd68a;
    --warn: #ffbf5c;
    --bad: #ff8a80;
    --code: #26262a;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
}

.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.brand h1 { margin: 0; font-size: 1.8rem; letter-spacing: -0.01em; }
.label { margin: 0; color: var(--muted); font-size: 0.95rem; }

.status { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; font-weight: 600; }
.status .dot { width: 0.8rem; height: 0.8rem; border-radius: 50%; background: var(--warn); }
.status.reachable .dot { background: var(--ok); }
.status.unreachable .dot { background: var(--bad); }
.status .hint { flex-basis: 100%; font-weight: 400; color: var(--muted); font-size: 0.9rem; max-width: 46rem; }
.status .hint:empty { display: none; }

.layout {
  display: grid;
  grid-template-columns: minmax(20rem, 2fr) minmax(24rem, 3fr);
  gap: 1.5rem;
  padding: 1.5rem;
}

@media (max-width: 60rem) {
  .layout { grid-template-columns: 1fr; }
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  padding: 1.25rem 1.5rem;
  min-width: 0;
}

.panel h2 { margin: 0 0 1rem; font-size: 1.25rem; }

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

select, textarea {
  width: 100%;
  font: inherit;
  color: inherit;
  background: var(--ground);
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  padding: 0.6rem 0.75rem;
}

textarea { resize: vertical; }

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1rem; }

button {
  font: inherit;
  font-weight: 600;
  padding: 0.6rem 1.1rem;
  border-radius: 0.5rem;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  cursor: pointer;
}

button.secondary { background: transparent; color: var(--accent); }
button:disabled { opacity: 0.45; cursor: not-allowed; }
button:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.notice { margin: 0.75rem 0 0; min-height: 1.5em; color: var(--muted); }
.notice.problem { color: var(--bad); font-weight: 600; }

.answer:empty { display: none; }
.answer { margin-top: 1.5rem; white-space: pre-wrap; }

.empty { color: var(--muted); }
.rounds { list-style: none; margin: 0; padding: 0; }

.banner { margin: 0; padding: 0.75rem 1.5rem; background: var(--bad); color: var(--surface); font-weight: 600; }
.footer { padding: 0 1.5rem 1.5rem; }
.build { margin: 0; color: var(--muted); font-size: 0.85rem; font-variant-numeric: tabular-nums; }
