/* Monochrome, light only — no prefers-color-scheme block, so the page renders
   the same whatever the viewer's system theme.
   #222 is both the body text and the accent: links are told apart by their
   underline rather than by hue, which is what lets the palette stay greyscale. */
:root {
  --bg: #ffffff;
  --fg: #222222;
  --muted: #6b6b6b;
  --rule: #e2e2e2;
  --accent: #222222;
  /* White, not black: the button is now dark, so black text would vanish. */
  --accent-fg: #ffffff;
  --danger: #b3261e;
  --field: #ffffff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  /* Monospace throughout. Beyond the look, it stops the progress line jittering:
     percent, speed and ETA update twice a second, and proportional digits change
     width as they change value. 15px because mono renders optically larger. */
  font: 15px/1.55 ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;
}

main {
  max-width: 40rem;
  margin: 0 auto;
  padding: 3rem 1.25rem 5rem;
}

h1 { font-size: 1.125rem; font-weight: 600; letter-spacing: 0.02em; margin: 0 0 2rem; }

/* Title and Log out share a baseline. login.html has a bare h1, so the
   bottom margin stays on h1 and is reset only inside the bar. */
.topbar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}

.topbar h1 { margin: 0; }

label, legend { display: block; font-size: 0.875rem; color: var(--muted); margin-bottom: 0.375rem; }

input[type="url"], input[type="password"], select {
  width: 100%;
  padding: 0.5rem 0.625rem;
  margin-bottom: 1.25rem;
  border: 1px solid var(--rule);
  border-radius: 3px;
  background: var(--field);
  color: inherit;
  font: inherit;
}

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

fieldset { border: 0; padding: 0; margin: 0 0 1.25rem; }
.choice { display: inline-block; margin-right: 1.25rem; color: var(--fg); font-size: 1rem; }
.choice input { margin-right: 0.375rem; }

button[type="submit"] {
  padding: 0.5rem 1rem;
  border: 0;
  border-radius: 3px;
  background: var(--accent);
  color: var(--accent-fg);
  font: inherit;
  cursor: pointer;
}

/* Links carry no colour of their own — the underline is what marks them.
   `inherit` rather than var(--accent) so they stay body-coloured even if the
   accent is later changed for the button. */
button.link {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
}

ul { list-style: none; margin: 2.5rem 0 0; padding: 0; }

li {
  padding: 1.25rem 0;
  border-top: 1px solid var(--rule);
}

.title { margin: 0 0 0.25rem; overflow-wrap: anywhere; }
.meta { margin: 0; font-size: 0.875rem; color: var(--muted); }

.track {
  height: 3px;
  margin-top: 0.75rem;
  background: var(--rule);
  border-radius: 2px;
}

.fill { height: 100%; background: var(--accent); border-radius: 2px; }

.error { color: var(--danger); font-size: 0.875rem; margin: 0.5rem 0 0; }

details { margin-top: 0.5rem; font-size: 0.875rem; }
summary { cursor: pointer; color: var(--muted); }

pre {
  margin: 0.5rem 0 0;
  padding: 0.625rem;
  overflow-x: auto;
  background: var(--field);
  border: 1px solid var(--rule);
  border-radius: 3px;
  font-size: 0.8125rem;
}

.actions { margin: 0.75rem 0 0; display: flex; gap: 1rem; }
.actions a { color: inherit; text-decoration: underline; }

