/* Ops console: plain, readable, keyboard-first. No third-party assets; system fonts; nothing below 12px (0.75rem). */
:root {
  --ink: #16191d; --muted: #4a525c; --line: #c9ced6; --bg: #f5f6f8; --panel: #fff;
  --accent: #0b5cad; --accent-ink: #fff; --danger: #a4161a; --danger-bg: #fdecec; --ok: #135c2b; --ok-bg: #e7f5ec;
  --focus: #f0a400;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { font-size: 100%; }
body { font: 1rem/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; margin: 0; background: var(--bg); color: var(--ink); }
h1 { font-size: 1.5rem; margin: 0 0 0.5rem; }
h2 { font-size: 1.2rem; margin: 1.5rem 0 0.5rem; }
h3 { font-size: 1.05rem; margin: 1.25rem 0 0.5rem; }
p, ul, dl { margin: 0.5rem 0; }
code, .mono { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 0.875rem; overflow-wrap: anywhere; }
a { color: var(--accent); }

/* Focus is always visible, on everything that can take it. */
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
h1:focus, main:focus { outline: none; }
h1:focus-visible { outline: 3px solid var(--focus); }

.skip { position: absolute; left: -10000px; top: 0; background: var(--panel); padding: 0.5rem 1rem; z-index: 10; }
.skip:focus { left: 0.5rem; top: 0.5rem; }

.top { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; padding: 0.5rem 1rem; background: var(--ink); color: #fff; }
.top .brand { font-weight: 700; margin: 0; }
.top .who { margin: 0 auto 0 0; }
.top button { background: transparent; color: #fff; border-color: #8b939d; }

nav ul { display: flex; flex-wrap: wrap; gap: 0.25rem; list-style: none; margin: 0; padding: 0.5rem 1rem; background: var(--panel); border-bottom: 1px solid var(--line); }
nav a { display: inline-block; padding: 0.4rem 0.75rem; border-radius: 0.375rem; text-decoration: none; color: var(--ink); }
nav a:hover { background: var(--bg); }
nav a[aria-current="page"] { background: var(--accent); color: var(--accent-ink); }

main { max-width: 80rem; margin: 0 auto; padding: 1rem; }
.lead { color: var(--muted); }
.sub { color: var(--muted); font-size: 0.875rem; }
.hint { color: var(--muted); font-size: 0.875rem; margin: 0.25rem 0 0; }

input, select, textarea, button { font: inherit; font-size: 1rem; color: inherit; }
input, select, textarea { padding: 0.45rem 0.5rem; border: 1px solid #7d8590; border-radius: 0.375rem; background: #fff; min-width: 0; max-width: 100%; }
textarea { width: 100%; resize: vertical; }
button { padding: 0.45rem 0.9rem; border: 1px solid #7d8590; border-radius: 0.375rem; background: var(--panel); cursor: pointer; min-height: 2.5rem; }
button:hover:not(:disabled) { border-color: var(--ink); }
button:disabled { cursor: not-allowed; opacity: 0.55; }
button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
button.danger { background: var(--panel); border-color: var(--danger); color: var(--danger); font-weight: 600; }
dialog button.danger:not(:disabled) { background: var(--danger); color: #fff; }

form.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 0.75rem 1rem; align-items: start; }
form.grid .items, form.grid .buttons, form.grid .error { grid-column: 1 / -1; }
form.row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: flex-end; }
.field { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }
.field.grow { flex: 1 1 14rem; }
.field input, .field select { width: 100%; }
fieldset.items { border: 1px solid var(--line); border-radius: 0.375rem; display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; padding: 0.5rem 0.75rem; }
label.check { display: inline-flex; align-items: center; gap: 0.35rem; min-height: 2rem; }
.buttons { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: flex-end; }
.stack { display: flex; flex-direction: column; gap: 0.35rem; }
.actions { white-space: nowrap; }
.actions button + button { margin-left: 0.35rem; }

.notice { padding: 0; margin: 0.5rem 0; }
.notice.ok { padding: 0.5rem 0.75rem; background: var(--ok-bg); color: var(--ok); border-radius: 0.375rem; }
.notice.error, p.error:not(:empty) { padding: 0.5rem 0.75rem; background: var(--danger-bg); color: var(--danger); border-radius: 0.375rem; }
p.error:empty { display: none; }

.scroll { overflow-x: auto; max-width: 100%; margin: 0.5rem 0 1rem; border: 1px solid var(--line); border-radius: 0.375rem; background: var(--panel); }
table { border-collapse: collapse; width: 100%; font-size: 0.875rem; }
caption { text-align: left; font-weight: 600; padding: 0.5rem 0.75rem; }
th, td { text-align: left; vertical-align: top; padding: 0.4rem 0.75rem; border-top: 1px solid var(--line); }
thead th { background: var(--bg); white-space: nowrap; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
td.mono { max-width: 28rem; }
code.hash { display: inline-block; max-width: 12rem; overflow-wrap: anywhere; }

.state { display: inline-block; padding: 0 0.4rem; border-radius: 0.25rem; background: var(--bg); border: 1px solid var(--line); white-space: nowrap; }
.state-running, .state-open, .state-live { background: var(--ok-bg); color: var(--ok); border-color: #9cc9aa; }
.state-scheduled { background: #e8f0fb; color: #123f73; border-color: #a9c2e6; }
.state-cancelled, .state-draft { color: var(--muted); }

dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 0.25rem 1rem; }
dl.facts dt { font-weight: 600; }
dl.facts dd { margin: 0; overflow-wrap: anywhere; }

dialog.confirm { width: min(34rem, calc(100vw - 1rem)); max-height: calc(100vh - 1rem); overflow: auto; border: 1px solid var(--ink); border-radius: 0.5rem; padding: 1rem 1.25rem; }
dialog.confirm::backdrop { background: rgb(0 0 0 / 0.45); }
dialog.confirm form { display: flex; flex-direction: column; gap: 0.5rem; }
dialog.confirm h2 { margin-top: 0; overflow-wrap: anywhere; }
dialog.confirm li { overflow-wrap: anywhere; }
dialog.confirm ul.what { padding-left: 1.25rem; }
dialog.confirm .word { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: 0.05em; }

/* The sign-in page. */
.signin { max-width: 26rem; margin: 3rem auto; padding: 0 1rem; }
.signin form { display: grid; gap: 0.75rem; }
.signin label { display: grid; gap: 0.25rem; }

@media (max-width: 40rem) {
  main { padding: 0.75rem; }
  nav ul { padding: 0.5rem; }
  nav a { padding: 0.4rem 0.6rem; }
  form.row > * { flex: 1 1 100%; }
  form.row button { width: 100%; }
  dl.facts { grid-template-columns: 1fr; }
  .scroll table { width: max-content; min-width: 100%; }
  .scroll th, .scroll td { max-width: 16rem; }
  .top .who { flex-basis: 100%; order: 3; }
}

[hidden] { display: none !important; }

button.link { background: none; border: 0; padding: 0.25rem 0; color: var(--accent); text-decoration: underline; font: inherit; font-family: ui-monospace, monospace; cursor: pointer; text-align: left; }
.summary { font-size: 1rem; margin: 0.5rem 0; }
