/* One file, no framework, system fonts. The CSP names no external host, so a
   webfont would not load; system fonts are also the ones already on the
   machine, which is one fewer request before a person can read anything. */

:root {
  --ink: #16181d;
  --muted: #6b7280;
  --line: #e4e6eb;
  --paper: #ffffff;
  --wash: #f7f8fa;
  --accent: #1f5fd6;
  --danger: #b42318;
  --ok: #14804a;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e8eaee;
    --muted: #9aa1ac;
    --line: #2b2f36;
    --paper: #16181d;
    --wash: #101216;
    --accent: #6ea8fe;
    --danger: #f2776a;
    --ok: #4ec38a;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--wash);
  color: var(--ink);
  font: 15px/1.5 ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

.chrome {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.75rem 1.25rem;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

.brand { display: flex; align-items: baseline; gap: 0.5rem; }
.brand .account { color: var(--muted); font-size: 0.85em; font-family: ui-monospace, monospace; }

.chrome nav { display: flex; gap: 1rem; flex: 1; flex-wrap: wrap; }
.chrome nav a { color: var(--muted); text-decoration: none; }
.chrome nav a:hover { color: var(--accent); }

.who { display: flex; align-items: center; gap: 0.75rem; color: var(--muted); }

main { max-width: 68rem; margin: 0 auto; padding: 1.5rem 1.25rem 4rem; }

.screen-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.screen-head h1 { font-size: 1.35rem; margin: 0; }
.actions { display: flex; gap: 0.5rem; }

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.25rem;
  margin: 1.25rem 0;
}
.card h2 { font-size: 1rem; margin: 0 0 0.5rem; }
.card.narrow { max-width: 26rem; margin: 3rem auto; }

table { width: 100%; border-collapse: collapse; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
th, td { text-align: left; padding: 0.6rem 0.85rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
tbody tr:last-child td { border-bottom: 0; }

dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 0.35rem 1.25rem; margin: 0 0 1rem; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; font-family: ui-monospace, monospace; word-break: break-all; }

button {
  font: inherit;
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
}
button:hover { border-color: var(--accent); color: var(--accent); }
button[disabled] { opacity: 0.5; cursor: progress; }
button.danger { color: var(--danger); }
button.danger:hover { border-color: var(--danger); }
button[type="submit"] { background: var(--accent); border-color: var(--accent); color: #fff; }
button[type="submit"]:hover { color: #fff; opacity: 0.9; }

form { display: flex; flex-direction: column; gap: 0.85rem; max-width: 26rem; }
.field { display: flex; flex-direction: column; gap: 0.3rem; }
.field span { font-size: 0.85rem; color: var(--muted); }
.field small { color: var(--muted); font-size: 0.8rem; }
input, select {
  font: inherit;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--wash);
  color: var(--ink);
}

.row { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }

.scopes { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; margin-top: 1rem; }
.scope { display: flex; align-items: center; gap: 0.35rem; font-family: ui-monospace, monospace; font-size: 0.85rem; }

pre.logs {
  background: var(--wash);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.85rem;
  max-height: 28rem;
  overflow: auto;
  font: 12.5px/1.5 ui-monospace, monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

.notice { padding: 0.6rem 0.85rem; border-radius: 8px; background: var(--wash); border: 1px solid var(--line); }
.notice-error { color: var(--danger); border-color: var(--danger); }
/* 6c. Not an error -- the platform is working. It is the answer being smaller
   than the question, which a reader has to notice *before* concluding that a
   quiet table means a quiet week. */
.notice-warn { border-color: var(--warn, #b26a00); }
.empty { color: var(--muted); }

.secret { background: var(--paper); border: 1px solid var(--ok); border-radius: 10px; padding: 1rem; margin: 1rem 0; }
code.token { display: block; font-family: ui-monospace, monospace; word-break: break-all; background: var(--wash); padding: 0.6rem; border-radius: 7px; }

/* 5.5b: deploying, and the operator's half of the navigation. */

.dropzone {
  border: 2px dashed var(--line);
  border-radius: 10px;
  padding: 1.4rem;
  text-align: center;
  background: var(--wash);
}
.dropzone p { margin: 0 0 0.7rem; color: var(--muted); }
/* A real file input beside the drop zone, always. Drag and drop with no
   keyboard-reachable equivalent is a demonstration rather than a control. */
.dropzone input[type="file"] { max-width: 100%; }

.job { margin-top: 1rem; }
.job:empty { display: none; }

/* The operator links, marked so the two axes the server has are legible in
   the chrome as well: membership decides one group, the `operators` table
   decides the other. */
.chrome nav a.operator { color: var(--muted); }
.chrome nav a.group-start {
  border-left: 1px solid var(--line);
  padding-left: 0.85rem;
  margin-left: 0.4rem;
}

.secret code { display: block; font-family: ui-monospace, monospace; word-break: break-all; background: var(--wash); padding: 0.6rem; border-radius: 7px; }
