/* SPDX-FileCopyrightText: 2026 Intergen, Inc. <https://intergen.org> */
/* SPDX-License-Identifier: AGPL-3.0-or-later */
:root {
  color-scheme: light dark;
  --bg: #f6f7f9;
  --card: #ffffff;
  --text: #1b1f24;
  --muted: #59636e;
  --line: #d3d9e0;
  --accent: #0b5cad;
  --accent-text: #ffffff;
  --warn-bg: #fff4d6;
  --warn-line: #b7791f;
  --warn-text: #5c3b00;
  --bad: #a4262c;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171a;
    --card: #1e2328;
    --text: #e8ebee;
    --muted: #a3adb8;
    --line: #38414a;
    --accent: #6cb0f5;
    --accent-text: #0a1722;
    --warn-bg: #3a2f10;
    --warn-line: #d9a441;
    --warn-text: #ffe2a3;
    --bad: #ff8a8f;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  padding: 1rem;
  background: var(--bg);
  color: var(--text);
  font: 1rem/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
}
main {
  max-width: 34rem;
  margin: 2rem auto;
  padding: 1.5rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 0.5rem;
}
h1 { margin: 0 0 0.25rem; font-size: 1rem; font-weight: 600; color: var(--muted); }
h2 { margin: 0 0 0.5rem; font-size: 1rem; }
.title { margin: 0 0 1rem; font-size: 1.5rem; font-weight: 700; line-height: 1.25; }
.heading-lg { margin: 0 0 1rem; font-size: 1.5rem; color: var(--text); }
.plain { margin: 0 0 1rem; }
.refused .reason { font-weight: 600; color: var(--bad); }

dl.rows { margin: 0 0 1rem; display: grid; grid-template-columns: max-content 1fr; gap: 0.5rem 1rem; }
dl.rows .row { display: contents; }
dt { color: var(--muted); }
dd { margin: 0; }
dd, li, .mono { white-space: pre-wrap; overflow-wrap: anywhere; }
dd { min-width: 0; }
.key { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9em; }
.odd { margin: 0.25rem 0 0; padding: 0.25rem 0.5rem; font-size: 0.875rem; border-left: 3px solid var(--warn-line); background: var(--warn-bg); color: var(--warn-text); }

.keys { margin: 0 0 1rem; }
.keylist {
  margin: 0; padding: 0.5rem; list-style: none;
  max-height: 40vh; overflow: auto;
  border: 1px solid var(--line); border-radius: 0.375rem;
}
.keylist li { padding: 0.375rem 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.85em; }
.keylist li.job .cell:first-child { font-weight: 600; }
.keylist li + li { border-top: 1px solid var(--line); }

.note { margin: 0 0 1rem; padding: 0.75rem 1rem; font-weight: 600; border: 2px solid var(--warn-line); border-radius: 0.375rem; background: var(--warn-bg); color: var(--warn-text); overflow-wrap: anywhere; }
.expires { margin: 0 0 1rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.status { min-height: 1.5rem; margin: 0 0 1rem; color: var(--muted); }
.status.bad { color: var(--bad); font-weight: 600; }

.buttons { display: flex; flex-wrap: wrap; gap: 0.75rem; }
button {
  font: inherit; font-weight: 600; padding: 0.625rem 1.25rem; min-height: 2.75rem;
  border: 1px solid var(--accent); border-radius: 0.375rem;
  background: transparent; color: var(--accent); cursor: pointer;
}
button.primary { background: var(--accent); color: var(--accent-text); }
button:disabled { opacity: 0.5; cursor: not-allowed; }
/* The screen's heading takes focus from the script (tabindex -1) so a stray Enter reaches no button; it is not a control, so it draws no ring. Buttons and links keep theirs. */
h1[tabindex="-1"]:focus { outline: none; }
button:focus-visible, textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

textarea {
  display: block; width: 100%; margin: 0 0 0.75rem; padding: 0.5rem;
  font: 0.85rem/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--text); background: var(--bg);
  border: 1px solid var(--line); border-radius: 0.375rem; resize: vertical;
}

@media (max-width: 30rem) {
  body { padding: 0.5rem; }
  main { margin: 0.5rem auto; padding: 1rem; }
  dl.rows { grid-template-columns: 1fr; gap: 0; }
  dl.rows .row { display: block; margin-bottom: 0.75rem; }
  .buttons { flex-direction: column; }
  button { width: 100%; }
}

/* The job in one line above the buttons: same size as body text, semibold, wraps anywhere. */
.summary { margin: 0 0 0.75rem; font-weight: 600; overflow-wrap: anywhere; }
