/* 1. Tokens and base */

:root {
  color-scheme: light;
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #f0f2f5;
  --row-hover: #f3f6fb;
  --border: #e1e5ea;
  --border-strong: #c9d0d8;
  --control-border: #7b8594;
  --control-bg: #ffffff;
  --text: #1a1f26;
  --muted: #5a6472;
  --accent: #2456c4;
  --accent-hover: #1c47a6;
  --accent-fg: #ffffff;
  --accent-tint: #e8effc;
  --danger: #b42318;
  --danger-hover: #951d14;
  --danger-fg: #ffffff;
  --focus: #2f6fea;
  --nav-bg: #ffffff;
  --nav-text: #2b323c;
  --nav-muted: #5d6775;
  --nav-active-bg: #e8effc;
  --nav-active-text: #1a46a8;
  --shadow: 0 1px 2px rgb(16 24 40 / 6%);
  --shadow-raised: 0 8px 24px rgb(16 24 40 / 16%);

  --ok-fg: #12693a;
  --ok-bg: #e3f4ea;
  --ok-border: #a7dbbb;
  --bad-fg: #b42318;
  --bad-bg: #fdeceb;
  --bad-border: #f4b7b2;
  --warn-fg: #8a4b00;
  --warn-bg: #fdf1dc;
  --warn-border: #efcd8e;
  --active-fg: #1c4fb6;
  --active-bg: #e6eefc;
  --active-border: #b3c8f3;
  --waiting-fg: #6941b8;
  --waiting-bg: #f0ebfb;
  --waiting-border: #d0c2f0;
  --neutral-fg: #4c5563;
  --neutral-bg: #eceef1;
  --neutral-border: #cfd4db;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --s1: 0.25rem;
  --s2: 0.5rem;
  --s3: 0.75rem;
  --s4: 1rem;
  --s5: 1.5rem;
  --s6: 2rem;
  --radius: 6px;
  --radius-lg: 8px;
  --control-h: 2.25rem;
  --nav-w: 15rem;
  --topbar-h: 3.25rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0f1216;
    --surface: #161a20;
    --surface-2: #1d232b;
    --row-hover: #1b2129;
    --border: #2a313b;
    --border-strong: #3a434f;
    --control-border: #6b7686;
    --control-bg: #12161b;
    --text: #e6e9ee;
    --muted: #9ba5b3;
    --accent: #7aa7ff;
    --accent-hover: #9dbdff;
    --accent-fg: #0b1322;
    --accent-tint: #18243b;
    --danger: #f2877d;
    --danger-hover: #f6a39b;
    --danger-fg: #1c0a08;
    --focus: #7aa7ff;
    --nav-bg: #12161b;
    --nav-text: #d5dae2;
    --nav-muted: #95a0ae;
    --nav-active-bg: #1c2a44;
    --nav-active-text: #a9c5ff;
    --shadow: 0 1px 2px rgb(0 0 0 / 40%);
    --shadow-raised: 0 8px 24px rgb(0 0 0 / 55%);

    --ok-fg: #6bd49a;
    --ok-bg: #12291c;
    --ok-border: #22543a;
    --bad-fg: #ff9a90;
    --bad-bg: #2e1615;
    --bad-border: #5e2925;
    --warn-fg: #f1b860;
    --warn-bg: #2b2111;
    --warn-border: #5b4421;
    --active-fg: #8fb7ff;
    --active-bg: #15233f;
    --active-border: #29467d;
    --waiting-fg: #c0aaff;
    --waiting-bg: #221b3a;
    --waiting-border: #433673;
    --neutral-fg: #b0b8c4;
    --neutral-bg: #232931;
    --neutral-border: #3b434f;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
[x-cloak] { display: none !important; }

html {
  font-size: 87.5%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
  overflow-wrap: break-word;
}

h1, h2, h3, h4 { line-height: 1.25; font-weight: 600; margin: 0 0 var(--s3); }
h1 { font-size: 1.5rem; letter-spacing: -0.01em; }
h2 { font-size: 1.1429rem; margin-top: var(--s5); }
h3 { font-size: 1rem; margin-top: var(--s4); }
h4 { font-size: 0.9286rem; }
p { margin: 0 0 var(--s3); }
ul, ol { margin: 0 0 var(--s3); padding-left: 1.25rem; }
small { font-size: 0.8571rem; }
strong { font-weight: 600; }
hr { border: 0; border-top: 1px solid var(--border); margin: var(--s5) 0; }

a {
  color: var(--accent);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: color-mix(in srgb, currentColor 45%, transparent);
  text-underline-offset: 0.2em;
}
a:hover { color: var(--accent-hover); text-decoration-color: currentColor; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
:focus:not(:focus-visible) { outline: none; }

.icon {
  width: 1em;
  height: 1em;
  flex: none;
  vertical-align: -0.125em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

code, kbd, samp, pre { font-family: var(--mono); font-size: 0.9286em; }
code {
  padding: 0.05em 0.35em;
  border-radius: 4px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  overflow-wrap: break-word;
}
pre {
  margin: 0 0 var(--s3);
  padding: var(--s3) var(--s4);
  max-width: 100%;
  overflow: auto;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  line-height: 1.5;
  tab-size: 2;
}
pre code { padding: 0; border: 0; background: none; font-size: inherit; }
pre.wrap { white-space: pre-wrap; overflow-wrap: anywhere; }

time { white-space: nowrap; }
td.num, th.num, .figure { font-variant-numeric: tabular-nums; }
td.num, th.num { text-align: right; }

button, input, select, textarea { font: inherit; color: inherit; }

button,
a.button,
input[type="submit"],
input[type="button"],
input[type="reset"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  min-height: var(--control-h);
  padding: 0 var(--s4);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: var(--shadow);
  appearance: none;
  transition: background-color 0.12s, border-color 0.12s;
}
button:hover,
a.button:hover,
input[type="submit"]:hover {
  background: var(--surface-2);
  border-color: var(--control-border);
  color: var(--text);
}
button:disabled, input:disabled, select:disabled, textarea:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

input:not([type="checkbox"], [type="radio"], [type="submit"], [type="button"], [type="reset"], [type="hidden"], [type="file"], [type="range"], [type="color"]),
select,
textarea {
  display: block;
  width: 100%;
  min-height: var(--control-h);
  padding: 0.375rem 0.625rem;
  border: 1px solid var(--control-border);
  border-radius: var(--radius);
  background-color: var(--control-bg);
  color: var(--text);
  line-height: 1.4;
  appearance: none;
}
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
input:focus-visible, input:focus-within, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 0;
  border-color: var(--focus);
}
select {
  padding-right: 2rem;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: right 0.95rem center, right 0.65rem center;
  background-size: 0.3rem 0.3rem;
  background-repeat: no-repeat;
}
select[multiple] { padding-right: 0.625rem; background-image: none; }
textarea { min-height: 6rem; resize: vertical; font-family: var(--mono); font-size: 0.9286rem; }
input[type="checkbox"], input[type="radio"] {
  width: 1rem;
  height: 1rem;
  margin: 0;
  accent-color: var(--accent);
  vertical-align: -0.15em;
}
input[type="file"] { max-width: 100%; }

label { display: inline-block; max-width: 100%; font-weight: 500; overflow-wrap: anywhere; }
fieldset {
  min-width: 0;
  margin: 0 0 var(--s4);
  padding: var(--s4);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
legend { padding: 0 var(--s2); font-weight: 600; }

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: var(--s4);
}
th, td {
  padding: 0.5rem 0.75rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}
tbody tr:last-child > * { border-bottom: 0; }
th {
  font-size: 0.8571rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}
thead th { background: var(--surface-2); }
thead th:first-child { border-top-left-radius: var(--radius-lg); }
thead th:last-child { border-top-right-radius: var(--radius-lg); }
tbody tr:hover > * { background: var(--row-hover); }
tr[data-href] { cursor: pointer; }
td a { text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); }
caption { text-align: left; font-weight: 600; padding-bottom: var(--s2); }

details > summary {
  cursor: pointer;
  width: fit-content;
  border-radius: 4px;
}
details > summary::marker { color: var(--muted); }

/* 2. Shell */

.skip-link {
  position: absolute;
  left: var(--s3);
  top: -10rem;
  z-index: 100;
  padding: var(--s2) var(--s3);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
}
.skip-link:focus { top: var(--s3); }

.shell { min-height: 100vh; }
.shell.has-nav {
  display: grid;
  grid-template-columns: var(--nav-w) minmax(0, 1fr);
  background: linear-gradient(to right, var(--nav-bg) calc(var(--nav-w) - 1px), var(--border) 0 var(--nav-w), transparent 0);
}

.topbar { display: none; }

.brand {
  display: flex;
  align-items: center;
  gap: var(--s2);
  color: var(--text);
  font-weight: 650;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.brand:hover { color: var(--text); }
.brand img, .brand .logo { width: 1.5rem; height: 1.5rem; color: var(--accent); }

.sidenav {
  position: sticky;
  top: 0;
  align-self: start;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow-y: auto;
  padding: var(--s4) var(--s3);
  background: var(--nav-bg);
  border-right: 1px solid var(--border);
  color: var(--nav-text);
}
.sidenav > .brand { padding: 0 var(--s2) var(--s4); }
.nav-group { margin-bottom: var(--s4); }
.nav-heading {
  margin: 0 0 var(--s1);
  padding: 0 var(--s2);
  font-size: 0.7857rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--nav-muted);
}
.nav-group ul { list-style: none; margin: 0; padding: 0; }
.nav-group a {
  display: flex;
  align-items: center;
  gap: var(--s2);
  padding: 0.375rem var(--s2);
  border-radius: var(--radius);
  color: var(--nav-text);
  font-weight: 500;
  text-decoration: none;
}
.nav-group a .icon { color: var(--nav-muted); }
.nav-group a:hover { background: var(--surface-2); color: var(--text); }
.nav-group a[aria-current="page"] {
  background: var(--nav-active-bg);
  color: var(--nav-active-text);
  font-weight: 600;
}
.nav-group a[aria-current="page"] .icon { color: currentColor; }
.badge {
  margin-left: auto;
  min-width: 1.4rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-fg);
  font-size: 0.7857rem;
  font-weight: 600;
  line-height: 1.4rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.nav-foot {
  margin-top: auto;
  padding-top: var(--s3);
  border-top: 1px solid var(--border);
  display: grid;
  gap: var(--s3);
}
.switcher { margin: 0; padding: 0 var(--s2); min-width: 0; }
.switcher-label {
  display: block;
  font-size: 0.7857rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--nav-muted);
}
.switcher-current { display: block; font-weight: 600; overflow-wrap: anywhere; }
details.switcher > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
  width: 100%;
  padding: var(--s1) 0;
  list-style: none;
}
details.switcher > summary::-webkit-details-marker { display: none; }
details.switcher > summary .icon { color: var(--nav-muted); transition: transform 0.12s; }
details.switcher[open] > summary .icon { transform: rotate(180deg); }
details.switcher ul { list-style: none; margin: var(--s1) 0 0; padding: 0; }
details.switcher li a {
  display: block;
  padding: 0.3rem var(--s2);
  border-radius: var(--radius);
  color: var(--nav-text);
  text-decoration: none;
  overflow-wrap: anywhere;
}
details.switcher li a:hover { background: var(--surface-2); }
details.switcher li a[aria-current="true"] { color: var(--nav-active-text); font-weight: 600; }

.nav-user { display: grid; gap: var(--s2); padding: 0 var(--s2); }
.nav-user .email {
  display: flex;
  align-items: center;
  gap: var(--s2);
  min-width: 0;
  color: var(--nav-muted);
  font-size: 0.9286rem;
  overflow-wrap: anywhere;
}
.nav-user form { margin: 0; }
.nav-user button { width: 100%; }

main {
  min-width: 0;
  padding: var(--s5) var(--s6) var(--s6);
}
.main-inner { margin: 0 auto; }
.page-wide .main-inner { max-width: 80rem; }
.page-narrow .main-inner { max-width: 44rem; }

@media (max-width: 799.98px) {
  .shell.has-nav { display: block; background: none; }
  .topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s3);
    height: var(--topbar-h);
    padding: 0 var(--s4);
    background: var(--nav-bg);
    border-bottom: 1px solid var(--border);
  }
  .topbar .brand { flex: 1 1 auto; min-width: 0; }
  .topbar .brand .logo { flex: none; }
  .topbar .brand-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  time { white-space: normal; }
  button, a.button, input[type="submit"] { max-width: 100%; white-space: normal; }
  #nav-toggle { display: none; flex: none; padding: 0 var(--s3); }
  html.js #nav-toggle { display: inline-flex; }
  .sidenav {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .sidenav > .brand { display: none; }
  html.js .sidenav {
    position: fixed;
    top: var(--topbar-h);
    bottom: 0;
    left: 0;
    z-index: 30;
    width: min(18rem, 100%);
    border-right: 1px solid var(--border);
    box-shadow: var(--shadow-raised);
  }
  html.js .sidenav:not([data-open="true"]) { display: none; }
  .nav-backdrop {
    position: fixed;
    inset: var(--topbar-h) 0 0 0;
    z-index: 25;
    background: rgb(10 14 20 / 40%);
  }
  main { padding: var(--s4); }
}
@media (min-width: 800px) {
  .nav-backdrop { display: none !important; }
}

/* 3. Components */

.btn-primary,
button.btn-primary,
a.button.btn-primary,
input[type="submit"].btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-fg);
}
.btn-primary:hover,
button.btn-primary:hover,
a.button.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--accent-fg);
}
.btn-danger,
button.btn-danger,
a.button.btn-danger,
input[type="submit"].btn-danger {
  background: var(--danger);
  border-color: var(--danger);
  color: var(--danger-fg);
}
.btn-danger:hover,
button.btn-danger:hover,
a.button.btn-danger:hover {
  background: var(--danger-hover);
  border-color: var(--danger-hover);
  color: var(--danger-fg);
}
.btn-quiet, button.btn-quiet {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  color: var(--nav-text);
}
.btn-quiet:hover, button.btn-quiet:hover { background: var(--surface-2); border-color: var(--border); }
.btn-sm, button.btn-sm, a.button.btn-sm { min-height: 1.75rem; padding: 0 var(--s2); font-size: 0.8571rem; }
button[data-copy] { min-height: 1.75rem; padding: 0 var(--s2); font-size: 0.8571rem; }

.status.status-ok { --tone-fg: var(--ok-fg); --tone-bg: var(--ok-bg); --tone-border: var(--ok-border); }
.tone-bad, .status.status-bad { --tone-fg: var(--bad-fg); --tone-bg: var(--bad-bg); --tone-border: var(--bad-border); }
.status.status-warn { --tone-fg: var(--warn-fg); --tone-bg: var(--warn-bg); --tone-border: var(--warn-border); }
.status.status-active { --tone-fg: var(--active-fg); --tone-bg: var(--active-bg); --tone-border: var(--active-border); }
.tone-waiting, .status.status-waiting { --tone-fg: var(--waiting-fg); --tone-bg: var(--waiting-bg); --tone-border: var(--waiting-border); }
.status.status-neutral { --tone-fg: var(--neutral-fg); --tone-bg: var(--neutral-bg); --tone-border: var(--neutral-border); }

.status, .state {
  --tone-fg: var(--neutral-fg);
  --tone-bg: var(--neutral-bg);
  --tone-border: var(--neutral-border);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.05rem 0.5rem;
  border: 1px solid var(--tone-border);
  border-radius: 999px;
  background: var(--tone-bg);
  color: var(--tone-fg);
  font-size: 0.8571rem;
  font-weight: 600;
  line-height: 1.45;
  white-space: nowrap;
  vertical-align: baseline;
}
.status .icon { width: 0.95em; height: 0.95em; stroke-width: 2.25; }
.state:not(.status).state-succeeded, .state:not(.status).state-approved, .state:not(.status).state-active {
  --tone-fg: var(--ok-fg); --tone-bg: var(--ok-bg); --tone-border: var(--ok-border);
}
.state:not(.status).state-failed, .state:not(.status).state-timed_out, .state:not(.status).state-rejected,
.state:not(.status).state-revoked, .state:not(.status).state-expired {
  --tone-fg: var(--bad-fg); --tone-bg: var(--bad-bg); --tone-border: var(--bad-border);
}
.state:not(.status).state-running, .state:not(.status).state-starting {
  --tone-fg: var(--active-fg); --tone-bg: var(--active-bg); --tone-border: var(--active-border);
}
.state:not(.status).state-queued, .state:not(.status).state-pending, .state:not(.status).state-pending_approval,
.state:not(.status).state-awaiting_approval {
  --tone-fg: var(--waiting-fg); --tone-bg: var(--waiting-bg); --tone-border: var(--waiting-border);
}

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s2) var(--s3);
  margin-bottom: var(--s4);
}
.page-head h1 { margin: 0 auto 0 0; min-width: 0; overflow-wrap: anywhere; }
.page-head form { margin: 0; }
.page-head .meta { flex-basis: 100%; color: var(--muted); }
.page-head .actions { margin-left: auto; }

.breadcrumb { margin-bottom: var(--s2); font-size: 0.9286rem; }
.breadcrumb ol { display: flex; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.breadcrumb li { min-width: 0; color: var(--muted); overflow-wrap: anywhere; }
.breadcrumb li + li::before { content: "›" / ""; padding: 0 var(--s2); color: var(--muted); }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb li[aria-current] { flex: 1 1 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.breadcrumb a:hover { color: var(--accent); text-decoration: underline; }

.toolbar, .filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--s2) var(--s3);
  margin-bottom: var(--s4);
}
.filters .field { display: flex; flex-direction: column; gap: var(--s1); min-width: 0; }
.filters .field label { font-size: 0.8571rem; color: var(--muted); }
.filters input:not([type="checkbox"], [type="radio"]), .filters select { width: auto; min-width: 9rem; max-width: 100%; }
.filter-actions { display: flex; gap: var(--s2); align-items: center; }

.table-wrap { position: relative; max-width: 100%; margin-bottom: var(--s4); }
.table-wrap > table { margin-bottom: 0; }
@media (min-width: 800px) {
  thead th { position: sticky; top: 0; z-index: 2; }
}
@media (max-width: 799.98px) {
  .table-wrap { overflow-x: auto; }
}

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
  gap: var(--s3);
  margin: 0 0 var(--s4);
}
.tiles > div {
  min-width: 0;
  padding: var(--s3) var(--s4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.tiles dt { font-size: 0.8571rem; color: var(--muted); }
.tiles dd {
  margin: var(--s1) 0 0;
  font-size: 1.4286rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.callout, .alert, .banner {
  --tone-fg: var(--bad-fg);
  --tone-bg: var(--bad-bg);
  --tone-border: var(--bad-border);
  margin: 0 0 var(--s4);
  padding: var(--s3) var(--s4);
  border: 1px solid var(--tone-border);
  border-left-width: 4px;
  border-radius: var(--radius-lg);
  background: var(--tone-bg);
  color: var(--text);
}
.callout > :last-child, .alert > :last-child { margin-bottom: 0; }
.callout h2, .alert h2 { margin: 0 0 var(--s2); font-size: 1rem; color: var(--tone-fg); }
.banner {
  --tone-fg: var(--waiting-fg);
  --tone-bg: var(--waiting-bg);
  --tone-border: var(--waiting-border);
}
.callout-neutral { --tone-fg: var(--neutral-fg); --tone-bg: var(--neutral-bg); --tone-border: var(--neutral-border); }

.messages { margin: 0 0 var(--s4); display: grid; gap: var(--s2); }
.messages:empty { display: none; }
.message {
  margin: 0;
  --tone-fg: var(--active-fg);
  --tone-bg: var(--active-bg);
  --tone-border: var(--active-border);
  display: flex;
  align-items: flex-start;
  gap: var(--s2);
  padding: var(--s2) var(--s3);
  border: 1px solid var(--tone-border);
  border-radius: var(--radius);
  background: var(--tone-bg);
  color: var(--text);
}
.message .icon { margin-top: 0.2em; color: var(--tone-fg); }
.message[data-level="success"] { --tone-fg: var(--ok-fg); --tone-bg: var(--ok-bg); --tone-border: var(--ok-border); }
.message[data-level="warning"] { --tone-fg: var(--warn-fg); --tone-bg: var(--warn-bg); --tone-border: var(--warn-border); }
.message[data-level="error"] { --tone-fg: var(--bad-fg); --tone-bg: var(--bad-bg); --tone-border: var(--bad-border); }

.empty-state {
  display: grid;
  justify-items: center;
  gap: var(--s2);
  padding: var(--s6) var(--s4);
  text-align: center;
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
}
.empty-state > .icon { width: 1.75rem; height: 1.75rem; color: var(--muted); }
.empty-state h2 { margin: 0; font-size: 1.0714rem; }
.empty-state p { margin: 0; max-width: 36rem; color: var(--muted); }
.empty-state .button { margin-top: var(--s2); }
.muted, .empty, .helptext { color: var(--muted); }
.empty { font-style: normal; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  min-height: 1.75rem;
  padding: 0 var(--s3);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.8571rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
a.chip:hover { border-color: var(--control-border); color: var(--text); }
.chip[aria-current="true"], .chip[aria-current="page"] {
  background: var(--accent-tint);
  border-color: var(--accent);
  color: var(--nav-active-text);
  font-weight: 600;
}

.facts {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: var(--s1) var(--s4);
  margin: 0 0 var(--s4);
}
.facts dt { color: var(--muted); }
.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 479.98px) {
  .facts { grid-template-columns: minmax(0, 1fr); }
  .facts dd { margin-bottom: var(--s2); }
}

.sticky-actions {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s3);
  margin: var(--s4) calc(-1 * var(--s4)) 0;
  padding: var(--s3) var(--s4);
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.stacked .field { display: flex; flex-direction: column; gap: var(--s1); margin-bottom: var(--s4); }
.stacked .field > div { display: flex; flex-direction: column; gap: var(--s1); }
.stacked input:not([type="checkbox"], [type="radio"]), .stacked select, .stacked textarea { max-width: 40rem; }
.helptext { font-size: 0.8571rem; }
.helptext a { display: inline-block; min-height: 24px; line-height: 24px; }
.errorlist { margin: 0; padding: 0; list-style: none; color: var(--bad-fg); font-weight: 500; }
.actions { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; }

.page-auth main { display: grid; align-items: center; min-height: 100vh; }
.page-auth .main-inner { width: 100%; max-width: 26rem; }
.auth-panel {
  padding: var(--s6);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.auth-panel > .brand { justify-content: center; margin-bottom: var(--s5); font-size: 1.1429rem; }
.auth-panel h1 { font-size: 1.2857rem; text-align: center; }
.auth-panel > p { color: var(--muted); text-align: center; }
.auth-form { margin-bottom: var(--s4); }
.auth-form .field { display: flex; flex-direction: column; gap: var(--s1); margin-bottom: var(--s4); }
.auth-form .field-check { flex-direction: row; align-items: center; gap: var(--s2); }
.auth-form .form-errors { margin-bottom: var(--s4); padding: var(--s2) var(--s3); border: 1px solid var(--bad-border); border-radius: var(--radius); background: var(--bad-bg); }
.auth-form .form-actions { display: grid; gap: var(--s2); margin-top: var(--s5); }
.auth-panel hr { margin: var(--s5) 0; }
.auth-panel ul { padding: 0; list-style: none; display: grid; gap: var(--s2); }
@media (max-width: 479.98px) {
  .page-auth main { align-items: start; }
  .auth-panel { padding: var(--s5) var(--s4); }
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.run-head { margin-bottom: var(--s4); }
.run-head .page-head { margin-bottom: var(--s2); }
.run-head .page-head h1 { margin-right: 0; }
.run-head .page-head .actions { margin-left: auto; }
.run-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s1) var(--s5);
  margin: 0;
  padding: 0;
  list-style: none;
}
.run-meta li { min-width: 0; overflow-wrap: anywhere; }
#run-continuation { margin: var(--s2) 0; }
.run-save-points { list-style: none; margin: var(--s2) 0; padding: 0; }
.run-meta .muted:first-child { margin-right: var(--s1); }
.run-meta .agent-name {
  display: inline-block;
  max-width: min(40ch, 100%);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}

#run-failure .callout-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s1) var(--s4);
  margin-bottom: var(--s2);
}
#run-failure h2 { display: inline-flex; align-items: center; gap: var(--s2); margin: 0; }
#run-failure .failure-reason {
  margin: 0 0 var(--s2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#run-failure .failure-message {
  max-height: 9.5rem;
  margin: 0;
  overflow-y: auto;
  background: var(--surface);
  border-color: var(--tone-border);
}

.run-figures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr));
  gap: var(--s3);
  margin-bottom: var(--s4);
}
.run-figures .tiles {
  grid-template-columns: repeat(auto-fit, minmax(6.5rem, 1fr));
  gap: 0;
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.run-figures .tiles > div {
  padding: var(--s2) var(--s3);
  background: none;
  border: 0;
  border-left: 1px solid var(--border);
  border-radius: 0;
  box-shadow: none;
}
.run-figures .tiles > div:first-child { border-left: 0; }
.run-figures .tiles dd { font-size: 1rem; }
.run-figures .tiles dd time { font-weight: 600; }
@media (max-width: 479.98px) {
  .run-figures .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .run-figures .tiles > div:nth-child(odd) { border-left: 0; }
  .run-figures .tiles > div:nth-child(n + 3) { border-top: 1px solid var(--border); }
}

.error-detail summary { cursor: pointer; overflow-wrap: anywhere; }
.error-detail pre { max-height: 16rem; margin-top: var(--s2); overflow-y: auto; }
td.error-text { max-width: 40rem; overflow-wrap: anywhere; }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2) var(--s3);
  margin: var(--s5) 0 var(--s3);
}
.section-head h2 { margin: 0; }
.timeline-tools { display: flex; flex-wrap: wrap; gap: var(--s2); }
#timeline-system-toggle { display: none; }
html.js #timeline-system-toggle { display: inline-flex; }
#timeline-system-toggle[aria-pressed="true"] {
  background: var(--accent-tint);
  border-color: var(--accent);
  color: var(--nav-active-text);
}
.notice {
  margin: 0 0 var(--s3);
  padding: var(--s2) var(--s3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--muted);
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.timeline:not(:has(li)) { border: 0; }
.event {
  --kind-fg: var(--muted);
  display: grid;
  position: relative;
  grid-template-columns: 4.5rem 7.5rem minmax(0, 1fr) 4.5rem;
  align-items: baseline;
  gap: 0 var(--s3);
  padding: var(--s1) var(--s3);
  border-bottom: 1px solid var(--border);
  border-left: 3px solid transparent;
  scroll-margin-top: calc(var(--topbar-h) + var(--s4));
}
.event:last-child { border-bottom: 0; }
.event.event-detached { border-bottom: 3px double var(--border-strong); }
.event time { color: var(--muted); font-size: 0.8571rem; font-variant-numeric: tabular-nums; }
.event .kind {
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  color: var(--kind-fg);
  font-size: 0.8571rem;
  font-weight: 500;
  white-space: nowrap;
}
.event .summary {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.event .summary code { font-size: 0.8571rem; }
.event details { grid-column: 1 / -1; }
.event details > summary {
  position: absolute;
  top: var(--s1);
  right: var(--s3);
  color: var(--muted);
  font-size: 0.8571rem;
  white-space: nowrap;
}
.event details > pre { margin: var(--s2) 0; max-height: 24rem; overflow: auto; }
.event-message { --kind-fg: var(--text); }
.event-thought { --kind-fg: var(--waiting-fg); }
.event-thought .summary { color: var(--muted); font-style: italic; }
.event-plan { --kind-fg: var(--active-fg); }
.event-tool_call { --kind-fg: var(--accent); }
.event-tool_result { --kind-fg: var(--ok-fg); }
.event-error { --kind-fg: var(--bad-fg); background: var(--bad-bg); border-left-color: var(--bad-fg); }
.event-error .summary { color: var(--bad-fg); font-weight: 500; }
.event[data-group="system"] { background: var(--surface-2); }
.event[data-group="system"] .summary { color: var(--muted); }
li.event[data-call] .kind { padding-left: var(--s4); }
li.event[data-call] .kind .icon { color: var(--muted); }
html.js #timeline:not(.show-system) li.event[data-group="system"] { display: none; }
.event:target { background: var(--accent-tint); border-left-color: var(--accent); }
#timeline-end { scroll-margin-top: calc(var(--topbar-h) + var(--s4)); }
#timeline-end:focus { outline: none; }
@media (max-width: 599.98px) {
  .event { grid-template-columns: auto minmax(0, 1fr) 4.5rem; }
  .event .summary { grid-column: 1 / -1; white-space: normal; overflow-wrap: anywhere; }
  li.event[data-call] .kind { padding-left: 0; }
}

.versions details { margin-bottom: var(--s3); }

.kpis { grid-template-columns: repeat(auto-fill, minmax(min(100%, 8.5rem), 1fr)); }
.kpis .unit { font-size: 0.8571rem; font-weight: 400; color: var(--muted); }
.kpis dd.delta {
  display: flex;
  align-items: center;
  gap: var(--s1);
  margin-top: var(--s1);
  font-size: 0.8571rem;
  font-weight: 400;
  color: var(--muted);
}
.delta[data-direction="up"].delta-ok, .delta[data-direction="up"].delta-ok .icon { color: var(--ok-fg); }
.delta[data-direction="down"].delta-bad, .delta[data-direction="down"].delta-bad .icon { color: var(--bad-fg); }

.charts { display: grid; gap: var(--s4); margin-bottom: var(--s5); }
@media (min-width: 1000px) {
  .charts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.chart {
  min-width: 0;
  margin: 0;
  padding: var(--s3) var(--s4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.chart figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s1) var(--s3);
  margin-bottom: var(--s3);
}
.chart-title { font-weight: 600; }
.legend { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--s1); font-size: 0.8571rem; color: var(--muted); }
.legend .key {
  display: inline-block;
  width: 0.75rem;
  height: 0.75rem;
  margin-left: var(--s2);
  border-radius: 2px;
}
.legend .key:first-child { margin-left: 0; }
.key-succeeded { background: var(--ok-fg); }
.key-failed {
  background: repeating-linear-gradient(45deg, var(--bad-fg) 0 2px, var(--surface) 2px 4px);
  outline: 1px solid var(--bad-fg);
  outline-offset: -1px;
}
.chart .plot {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: var(--s2);
  max-width: calc(720px + 4rem);
}
.chart .ticks { position: relative; height: 8rem; min-width: 2rem; }
.chart .tick {
  position: absolute;
  right: 0;
  bottom: var(--at);
  transform: translateY(50%);
  font-size: 0.7857rem;
  line-height: 1;
  color: var(--muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.chart .area { min-width: 0; }
.chart svg { display: block; width: 100%; height: 8rem; overflow: visible; border-bottom: 1px solid var(--border-strong); }
.chart .grid { stroke: var(--border); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart .dates { position: relative; height: 1.25rem; margin-top: var(--s1); }
.chart .date {
  position: absolute;
  left: var(--at);
  top: 0;
  transform: translateX(-50%);
  font-size: 0.7857rem;
  color: var(--muted);
}
.chart .date:first-child:not(:only-child) { transform: none; }
.chart .date:last-child:not(:only-child) { transform: translateX(-100%); }
.chart .hit { fill: transparent; }
.chart .fill { fill: var(--accent); }
.chart .seg-succeeded { fill: var(--ok-fg); }
.chart .seg-failed { fill: url(#hatch-failed); stroke: var(--bad-fg); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart .hatch-ground { fill: var(--surface); }
.chart .hatch-line { fill: var(--bad-fg); }
.chart .bar:hover .fill, .chart .bar:focus .fill { opacity: 0.8; }
.chart .bar:hover .hit, .chart .bar:focus .hit { fill: var(--accent-tint); }
.chart .readout { min-height: 1.25rem; margin: var(--s1) 0 0; font-size: 0.8571rem; color: var(--muted); }
html:not(.js) .chart .readout { display: none; }
.chart-empty {
  display: grid;
  place-items: center;
  min-height: 8rem;
  margin: 0;
  color: var(--muted);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
}

#attention, #recent-runs { margin-bottom: var(--s5); }
.attention-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr)); gap: var(--s3); }
.card {
  min-width: 0;
  padding: var(--s3) var(--s4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--tone-fg, var(--neutral-border));
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.card h3 { display: flex; align-items: center; gap: var(--s2); margin: 0 0 var(--s2); font-size: 1rem; color: var(--tone-fg, var(--text)); }
.card a[data-agent] { display: -webkit-inline-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; vertical-align: top; }
.card ul { margin: 0 0 var(--s2); padding-left: 1.1rem; }
.card li { margin-bottom: var(--s1); overflow-wrap: anywhere; }
.card > p:last-child { margin-bottom: 0; }

.pager { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--s2); margin: var(--s3) 0; }

/* Runs list */

.chips { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s2); margin: 0 0 var(--s3); }

.runs-head h1 { margin-right: 0; }
.filter-tools { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin-left: auto; }
.filters-more { position: relative; }
.filters-more > summary {
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  list-style: none;
}
.filters-more > summary::-webkit-details-marker { display: none; }
.filters-more > summary .badge { margin-left: var(--s1); min-width: 1.15rem; line-height: 1.15rem; }
.filters-more[open] > summary { background: var(--surface-2); }
.filters-more > .filters {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  align-items: end;
  margin: var(--s2) 0 0;
  padding: var(--s3) var(--s4) var(--s4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-raised);
}
.filters-more > .filters :is(input, select) { width: 100%; min-width: 0; }
.filters-more .filter-actions { grid-column: 1 / -1; justify-content: flex-end; }
@media (min-width: 800px) {
  .filters-more > .filters {
    position: absolute;
    right: 0;
    z-index: 5;
    width: min(38rem, calc(100vw - var(--nav-w) - 4rem));
  }
}

.queue-stat {
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-size: 0.9286rem;
  font-variant-numeric: tabular-nums;
}
.queue-stat strong { margin-right: 0.3em; color: var(--text); }
.queue-stat .icon { margin-right: var(--s1); }
.queue-stat-value, .queue-stat summary {
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
  padding: 0 var(--s3);
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
}
.queue-stat details { position: relative; }
.queue-stat summary { list-style: none; }
.queue-stat summary::-webkit-details-marker { display: none; }
.queue-stat summary:hover, .queue-stat details[open] summary { border-color: var(--border-strong); color: var(--text); }
#queue-by-agent {
  position: absolute;
  left: 0;
  z-index: 5;
  min-width: 14rem;
  max-width: min(22rem, calc(100vw - 2rem));
  margin: var(--s1) 0 0;
  padding: var(--s1);
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-raised);
}
#queue-by-agent li {
  display: flex;
  justify-content: space-between;
  gap: var(--s3);
  padding: var(--s1) var(--s2);
}
#queue-by-agent a { min-width: 0; overflow-wrap: anywhere; }
#queue-by-agent .num { color: var(--text); }

table.runs th, table.runs td { white-space: nowrap; vertical-align: middle; }
table.runs code { font-size: 0.8571rem; }
/* With a zero max-width the agent column takes the space left over and never widens the table. */
table.runs .run-agent { width: 100%; max-width: 0; }
.run-agent > div { display: flex; align-items: baseline; gap: var(--s2); min-width: 0; }
.run-agent a, .run-agent .muted, .run-trigger > span { overflow: hidden; text-overflow: ellipsis; }
.run-agent a { flex: 0 1 auto; min-width: 4rem; font-weight: 500; }
.run-agent .muted { flex: 0 1000 auto; min-width: 0; font-size: 0.8571rem; }
.run-trigger {
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  max-width: 13rem;
  vertical-align: middle;
}
.run-trigger .icon { color: var(--muted); }
tr[data-href]:focus-visible { outline-offset: -2px; }
tr[data-href]:focus-visible > * { background: var(--row-hover); }
@media (max-width: 799.98px) {
  table.runs .col-trigger, table.runs .col-duration { display: none; }
  table.runs .run-agent { max-width: none; }
  .run-agent > div { max-width: 14rem; }
}
#dashboard-filters select { max-width: min(100%, 18rem); }

/* Agents and rules */

.slug-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  max-width: 100%;
  min-width: 0;
}
.slug-chip code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slug-chip .btn-quiet { min-height: 1.75rem; padding: 0 var(--s2); }
code.slug-chip { display: inline-block; font-size: 0.8571rem; color: var(--muted); }

.agent-head .page-head { margin-bottom: var(--s3); }
.agent-head .page-head h1 { margin-right: 0; }
.agent-head .page-head .actions { margin-left: auto; }

.tabs {
  display: flex;
  gap: var(--s1);
  margin: 0 0 var(--s4);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}
.tabs a {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0 var(--s3);
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.tabs a:hover { color: var(--text); border-bottom-color: var(--border-strong); }
.tabs a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }

details.panel {
  margin: 0 0 var(--s4);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
details.panel > summary {
  display: flex;
  align-items: center;
  gap: var(--s2);
  width: auto;
  padding: var(--s3) var(--s4);
  font-weight: 600;
}
details.panel[open] > summary { border-bottom: 1px solid var(--border); }
details.panel > form { padding: var(--s4); }
details.panel textarea { width: 100%; }
#run-repository-panel { margin-bottom: var(--s4); }
#run-repository-panel > summary { font-weight: 500; }
#run-repository-panel fieldset { margin: var(--s2) 0 0; }

.agent-overview { display: grid; gap: 0 var(--s6); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1000px) {
  .agent-overview { grid-template-columns: minmax(0, 2fr) minmax(16rem, 1fr); }
}
.agent-aside h2 { font-size: 1rem; }
.plain-list { margin: 0 0 var(--s4); padding: 0; list-style: none; }
.plain-list li { padding: var(--s1) 0; overflow-wrap: anywhere; }
.plain-list .chips { display: inline-flex; flex-wrap: wrap; gap: var(--s1); }

.code-figure { margin: 0 0 var(--s4); min-width: 0; }
.code-figure figcaption { margin-bottom: var(--s1); color: var(--muted); font-size: 0.8571rem; font-weight: 600; }
pre.scroll { max-height: 24rem; overflow: auto; }

table.agents th, table.agents td { vertical-align: middle; }
table.agents .name-cell { width: 100%; max-width: 0; }
table.agents .name-cell > div { display: flex; align-items: baseline; gap: var(--s2); min-width: 0; }
table.agents .name-cell a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; min-width: 4rem; }
table.agents .name-cell .slug-chip { flex: 0 1000 auto; min-width: 3.5rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.agents td:not(.name-cell) { white-space: nowrap; }
table.agents .last-run a { text-decoration: none; }
@media (max-width: 799.98px) {
  table.agents .col-harness, table.agents .col-version { display: none; }
  table.agents .name-cell { max-width: none; }
  table.agents .name-cell > div { max-width: 12rem; }
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 var(--s4);
}
.form-grid .field input:not([type="checkbox"], [type="radio"]), .form-grid .field select { width: 100%; }
@media (max-width: 479.98px) {
  .form-grid { grid-template-columns: minmax(0, 1fr); }
}

.stacked .field-check { margin-bottom: var(--s4); }
.field-check label { display: inline-flex; align-items: flex-start; gap: var(--s2); }
.field-check label input { margin-top: 0.2em; flex: none; }
.checks ul, .checks div > div { margin: var(--s1) 0 0; padding: 0; list-style: none; }
.checks label { display: inline-flex; align-items: flex-start; gap: var(--s2); font-weight: 400; }
.checks label input { margin-top: 0.2em; flex: none; }

.has-sticky-actions .sticky-actions { margin-left: 0; margin-right: 0; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
html.js fieldset[data-kind][disabled] { display: none; }

html.js .no-js-only { display: none; }

#audit tbody .day-row > th {
  padding-top: var(--s3);
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.8571rem;
  border-bottom: 1px solid var(--border);
}
#audit tbody + tbody .day-row > th { border-top: 1px solid var(--border); }
#audit tbody .day-row:hover > th { background: var(--surface-2); }
#audit .audit-target { min-width: 8rem; overflow-wrap: anywhere; }
#audit td:first-child { white-space: nowrap; }
.verb {
  --tone-fg: var(--neutral-fg);
  --tone-bg: var(--neutral-bg);
  --tone-border: var(--neutral-border);
  display: inline-block;
  max-width: 100%;
  padding: 0 0.4rem;
  border: 1px solid var(--tone-border);
  border-radius: var(--radius);
  background: var(--tone-bg);
  overflow-wrap: anywhere;
}
.verb code { background: none; border: 0; padding: 0; color: var(--tone-fg); font-size: 0.8571rem; }
.verb-created { --tone-fg: var(--ok-fg); --tone-bg: var(--ok-bg); --tone-border: var(--ok-border); }
.verb-changed { --tone-fg: var(--active-fg); --tone-bg: var(--active-bg); --tone-border: var(--active-border); }
.verb-removed { --tone-fg: var(--bad-fg); --tone-bg: var(--bad-bg); --tone-border: var(--bad-border); }
.verb-refused { --tone-fg: var(--warn-fg); --tone-bg: var(--warn-bg); --tone-border: var(--warn-border); }

#members td.actions { min-width: 12rem; }
.member-role-form { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin: 0; }
#members .member-role select { width: auto; }
.member-self-note, .member-readonly { display: block; margin-top: var(--s1); font-size: 0.8571rem; }
.row-saved, .row-error {
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  margin-top: var(--s1);
  font-size: 0.8571rem;
  font-weight: 500;
}
.row-saved { color: var(--ok-fg); }
.row-error { color: var(--bad-fg); }
tr:has(.row-saved) > td { animation: row-saved 1.6s ease-out; }
@keyframes row-saved {
  from { background: var(--ok-bg); }
  to { background: transparent; }
}
@media (prefers-reduced-motion: reduce) {
  tr:has(.row-saved) > td { animation: none; }
}
#members td { vertical-align: middle; }
