/* fingerprintd panel — sobriété d'instrument : la donnée d'abord, le chrome
   s'efface. Couleurs en OKLCH, thème clair et sombre, aucune dépendance. */

:root {
  color-scheme: light dark;

  --bg: oklch(0.985 0.0015 255);
  --surface: oklch(1 0 0);
  --surface-2: oklch(0.972 0.002 255);
  --line: oklch(0.905 0.004 255);
  --line-strong: oklch(0.845 0.006 255);

  --ink: oklch(0.225 0.012 255);
  --ink-2: oklch(0.36 0.012 255);
  --muted: oklch(0.495 0.012 255);

  --accent: oklch(0.465 0.095 158);
  --accent-ink: oklch(0.99 0.008 158);
  --accent-soft: oklch(0.945 0.032 158);
  --warn: oklch(0.52 0.115 70);
  --warn-soft: oklch(0.955 0.035 80);
  --danger: oklch(0.49 0.16 25);
  --danger-soft: oklch(0.955 0.03 25);
  --focus: oklch(0.5 0.1 158);

  --radius: 10px;
  --radius-sm: 8px;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: oklch(0.175 0.006 255);
    --surface: oklch(0.215 0.008 255);
    --surface-2: oklch(0.245 0.009 255);
    --line: oklch(0.305 0.01 255);
    --line-strong: oklch(0.4 0.012 255);

    --ink: oklch(0.95 0.004 255);
    --ink-2: oklch(0.86 0.006 255);
    --muted: oklch(0.73 0.012 255);

    --accent: oklch(0.78 0.105 158);
    --accent-ink: oklch(0.19 0.03 158);
    --accent-soft: oklch(0.27 0.04 158);
    --warn: oklch(0.82 0.11 78);
    --warn-soft: oklch(0.28 0.035 78);
    --danger: oklch(0.74 0.13 25);
    --danger-soft: oklch(0.28 0.035 25);
    --focus: oklch(0.82 0.1 158);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Author display rules would otherwise beat the UA [hidden] rule (the login
   view is a grid), so make the attribute authoritative. */
[hidden] {
  display: none !important;
}

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

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

code {
  font-family: var(--mono);
  font-size: 0.92em;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

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

::selection {
  background: var(--accent-soft);
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  z-index: 40;
  transition: top 0.15s var(--ease);
}

.skip:focus {
  top: 12px;
}

/* ---------------------------------------------------------------- login --- */

.login {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-box {
  width: min(360px, 100%);
}

.login h1 {
  margin-top: 28px;
  font-size: 1.5rem;
}

.lede {
  margin-top: 8px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 14px;
  max-width: 34ch;
}

.login form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.login label {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
}

/* ------------------------------------------------------------- brandline --- */

.brandline {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.mark {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: inset 0 0 0 1px oklch(0 0 0 / 0.12);
}

/* ------------------------------------------------------------------ top --- */

.top {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 20;
}

.top-inner {
  max-width: 1080px;
  margin: 0 auto;
  min-height: 56px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.top-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
  flex: none;
}

.dot.ok {
  background: var(--accent);
}

.dot.warn {
  background: var(--warn);
}

.dot.err {
  background: var(--danger);
}

.top-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}

.top-meta {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* ----------------------------------------------------------------- wrap --- */

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px 24px 72px;
}

/* ---------------------------------------------------------------- stats --- */

.stats {
  display: flex;
  flex-wrap: wrap;
  border-block: 1px solid var(--line);
  margin-bottom: 28px;
}

.stat {
  flex: 1 1 180px;
  min-width: 0;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat + .stat {
  border-left: 1px solid var(--line);
}

.stat-label {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.01em;
}

.stat-value {
  font-family: var(--mono);
  font-size: 22px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.stat-value.sm {
  font-size: 17px;
}

/* --------------------------------------------------------------- layout --- */

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  align-items: start;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  min-width: 0;
}

.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.panel-head h2 {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
}

.panel-note {
  font-size: 12.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.side {
  padding-bottom: 4px;
}

.side .panel-head {
  border-bottom: 0;
  padding-bottom: 4px;
}

.side form {
  padding: 4px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ---------------------------------------------------------------- jobs ----- */

.jobs {
  list-style: none;
  margin: 0;
  padding: 0;
}

.job {
  padding: 16px 20px 18px;
  border-top: 1px solid var(--line);
  /* No fill-mode: the base state is already the last keyframe, and a filling
     transform animation would keep a stacking context alive, trapping the
     actions menu under the next row. */
  animation: rise 0.28s var(--ease);
}

/* Lift the row that owns the open menu above its siblings. */
.job:has(.more[open]),
.job.menu-open {
  position: relative;
  z-index: 15;
}

.job:first-child {
  border-top: 0;
}

.job {
  transition: background 0.6s var(--ease);
}

.job.is-new {
  background: var(--accent-soft);
}

.job[data-status="cancelled"] {
  opacity: 0.62;
}

.job-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.job-name {
  font-size: 14.5px;
  font-weight: 600;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-pattern {
  margin-top: 5px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--muted);
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 5px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0;
}

.status-tag {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.status-tag::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status-tag.active {
  color: var(--accent);
}

.status-tag.completed {
  color: var(--muted);
}

.status-tag.cancelled {
  color: var(--danger);
}

.bar {
  margin-top: 12px;
  height: 5px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}

.bar > span {
  display: block;
  height: 100%;
  width: var(--pct, 0%);
  border-radius: inherit;
  background: var(--accent);
  transition: width 0.45s var(--ease);
}

.job[data-status="cancelled"] .bar > span {
  background: var(--line-strong);
}

.job-supply {
  margin-top: 7px;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--warn);
}

.job-supply .dot {
  background: var(--warn);
}

.job-foot {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.job-count {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.job-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* --------------------------------------------------------------- empty ---- */

.empty {
  padding: 44px 20px 48px;
  text-align: center;
}

.empty-title {
  font-weight: 600;
  margin-bottom: 6px;
}

.empty .muted {
  max-width: 42ch;
  margin: 0 auto;
}

.muted {
  color: var(--muted);
  font-size: 13px;
}

/* --------------------------------------------------------------- forms ---- */

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-2);
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.opt {
  font-weight: 400;
  color: var(--muted);
  font-size: 11.5px;
}

input,
select {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}

input::placeholder {
  color: var(--muted);
}

input:hover,
select:hover {
  border-color: var(--muted);
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--focus);
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--focus) 22%, transparent);
}

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

select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 16px) 52%, calc(100% - 11px) 52%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 32px;
}

.form-error {
  font-size: 12.5px;
  color: var(--danger);
  margin: 0;
}

.hint {
  padding: 0 20px 18px;
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
  color: var(--muted);
}

/* ------------------------------------------------------------- buttons ---- */

.btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease),
    color 0.15s var(--ease), transform 0.08s var(--ease);
}

.btn:hover {
  background: var(--surface-2);
}

.btn:active {
  transform: translateY(0.5px);
}

.btn:disabled {
  opacity: 0.55;
  cursor: progress;
}

.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.btn.primary:hover {
  background: color-mix(in oklch, var(--accent) 88%, var(--ink));
  border-color: color-mix(in oklch, var(--accent) 88%, var(--ink));
}

.btn.quiet {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
}

.btn.quiet:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.btn.small {
  padding: 5px 9px;
  font-size: 12.5px;
}

.btn.block {
  width: 100%;
  padding: 10px 12px;
}

.btn.danger {
  color: var(--danger);
}

.btn.danger:hover {
  background: var(--danger-soft);
  border-color: color-mix(in oklch, var(--danger) 40%, transparent);
}

/* -------------------------------------------------------------- menu ------ */

.more {
  position: relative;
}

.more > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.more > summary::-webkit-details-marker {
  display: none;
}

.more-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 210px;
  padding: 5px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  z-index: 30;
  display: flex;
  flex-direction: column;
}

.more-menu button {
  text-align: left;
  border: 0;
  background: transparent;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
}

.more-menu button:hover {
  background: var(--surface-2);
}

.more-menu button.danger {
  color: var(--danger);
}

/* ------------------------------------------------------------- dialog ----- */

.dialog {
  width: min(720px, calc(100vw - 32px));
  max-height: 86dvh;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  overflow: hidden;
  box-shadow: 0 12px 32px oklch(0 0 0 / 0.18);
}

.dialog[open] {
  animation: dialog-in 0.2s var(--ease) both;
}

.dialog::backdrop {
  background: oklch(0.18 0.01 255 / 0.42);
}

.dialog-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 20px;
}

.dialog-titles {
  min-width: 0;
}

.dialog-head h2 {
  font-size: 14px;
}

.dialog-meta {
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
  word-break: break-all;
}

.dialog-head .btn {
  margin-left: auto;
  flex: none;
}

.json {
  margin: 0;
  padding: 14px 20px;
  max-height: 54dvh;
  overflow: auto;
  background: var(--surface-2);
  border-block: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.55;
  color: var(--ink-2);
  tab-size: 2;
}

.dialog-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
}

.dialog-note {
  font-size: 12px;
  color: var(--muted);
}

.dialog-note.error {
  color: var(--danger);
}

/* --------------------------------------------------------------- toast ---- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translate(-50%, 12px);
  max-width: min(92vw, 560px);
  padding: 9px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: var(--bg);
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
  z-index: 50;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast.error {
  background: var(--danger);
  border-color: var(--danger);
  color: oklch(0.99 0.005 25);
}



/* -------------------------------------------------------------- notice ----- */

.notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 14px;
  margin-bottom: 18px;
  border: 1px solid color-mix(in oklch, var(--warn) 35%, transparent);
  background: var(--warn-soft);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--ink);
}

.notice .dot {
  margin-top: 6px;
  background: var(--warn);
  flex: none;
}

.notice-body {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}

.notice-code {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-2);
  opacity: 0.85;
}

/* ------------------------------------------------------------- hq ---------- */

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th {
  text-align: left;
  font-weight: 500;
  font-size: 12px;
  color: var(--muted);
  padding: 9px 16px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.data-table td {
  padding: 9px 16px;
  border-bottom: 1px solid var(--line);
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table th.num,
.data-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.data-table .mono {
  font-family: var(--mono);
  font-size: 12px;
}

.data-table .ellipsis {
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#hq-by-platform {
  font-size: 15px;
}

.hq-list {
  margin-top: 18px;
}

.badge.format {
  margin-left: 6px;
  font-size: 10.5px;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--muted);
  background: var(--surface-2);
  border-color: var(--line);
}

.hq-scroll {
  max-height: 420px;
  overflow-y: auto;
}

.badge.incomplete {
  color: var(--warn);
  background: var(--warn-soft);
  border: 1px solid color-mix(in oklab, var(--warn) 32%, transparent);
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 10.5px;
  margin-left: 6px;
}

.dialog-note.warn {
  color: var(--warn);
}

.hq-scroll table {
  min-width: 0;
}

.hq-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.hq-pager {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hq-actions .dropdown > .btn {
  min-width: 200px;
  min-height: 34px;
}

/* ---------------------------------------------------------------- pool ----- */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.dropdown {
  position: relative;
}

.dropdown > .btn {
  width: 100%;
  justify-content: space-between;
  gap: 10px;
  min-height: 38px;
}

.caret {
  flex: none;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--muted);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 30;
  margin: 0;
  padding: 5px;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  min-width: 230px;
}

.dropdown-menu li {
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  color: var(--ink);
}

.dropdown-menu li:hover,
.dropdown-menu li:focus {
  background: var(--surface-2);
  outline: none;
}

.dropdown-menu li[aria-selected="true"] {
  color: var(--accent);
  font-weight: 500;
}

.row-actions .btn + .btn {
  margin-left: 6px;
}

.pool-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.pool-head h1 {
  font-size: 1.55rem;
}

.pool-head .muted {
  margin-top: 4px;
}

.pool-actions {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.inline-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12.5px;
  color: var(--ink-2);
}

.inline-field select {
  width: auto;
  min-width: 210px;
}

.filters {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 16px 20px 14px;
  margin-bottom: 18px;
}

.filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px 14px;
}

.filters-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.filters-actions .btn:first-of-type {
  margin-left: auto;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
}

.check input {
  width: auto;
  margin: 0;
  accent-color: var(--accent);
}

.pool-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

.pool-bar .pager {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.table-wrap {
  overflow-x: auto;
}

.pool-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 880px;
}

.pool-table th {
  text-align: left;
  font-weight: 500;
  font-size: 12px;
  color: var(--muted);
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.pool-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  white-space: nowrap;
}

.pool-table tbody tr:hover td {
  background: var(--surface-2);
}

.pool-table tbody tr.consumed .ua,
.pool-table tbody tr.consumed td {
  color: var(--muted);
}

.pool-table .col-check {
  width: 36px;
  padding-right: 0;
}

.pool-table input[type="checkbox"] {
  width: auto;
  margin: 0;
  accent-color: var(--accent);
}

.pool-table .mono {
  font-family: var(--mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.ua {
  display: inline-block;
  max-width: 230px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--accent);
}

.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.badge.consumed {
  color: var(--muted);
}

.row-actions {
  text-align: right;
}

@media (max-width: 720px) {
  .inline-field select {
    min-width: 0;
    width: 100%;
  }

  .pool-actions {
    width: 100%;
  }

  .filters-actions .btn:first-of-type {
    margin-left: 0;
  }
}

/* --------------------------------------------------------------- docs ----- */

.docs {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

.docs-nav {
  position: sticky;
  top: 84px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.docs-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  padding: 5px 0;
  transition: color 0.15s var(--ease);
}

.docs-nav a:hover {
  color: var(--ink);
}

.docs-body {
  max-width: 72ch;
  min-width: 0;
}

.docs-body h1 {
  font-size: 1.9rem;
  margin-bottom: 10px;
}

.docs-lede {
  color: var(--muted);
  margin-bottom: 8px;
}

.docs-body section {
  padding-top: 26px;
  margin-top: 26px;
  border-top: 1px solid var(--line);
}

.docs-body section:first-of-type {
  border-top: 0;
  margin-top: 0;
  padding-top: 8px;
}

.docs-body h2 {
  font-size: 1.05rem;
  margin-bottom: 10px;
}

.docs-body h3 {
  font-size: 0.92rem;
  margin: 20px 0 8px;
}

.docs-body p,
.docs-body li {
  color: var(--ink-2);
}

.docs-body p {
  margin-bottom: 10px;
}

.docs-body ul {
  margin: 0 0 12px;
  padding-left: 20px;
}

.docs-body li {
  margin-bottom: 6px;
}

.docs-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 18px;
  font-size: 13px;
}

.docs-body th,
.docs-body td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.docs-body th {
  color: var(--muted);
  font-weight: 500;
  font-size: 12px;
}

.docs-body td code {
  white-space: nowrap;
}

pre.code {
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.6;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  overflow-x: auto;
  margin: 10px 0 16px;
  color: var(--ink-2);
}

@media (max-width: 820px) {
  .docs {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .docs-nav {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
  }
}

/* ------------------------------------------------------------- motion ----- */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.995);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------------------------------------------------------- responsive ---- */

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .side {
    order: -1;
  }

  .side .panel-head {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 640px) {
  .top-inner {
    padding: 0 16px;
    gap: 12px;
    flex-wrap: wrap;
    min-height: 52px;
    padding-block: 8px;
  }

  .top-meta {
    display: none;
  }

  .wrap {
    padding: 20px 16px 56px;
  }

  .stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .stat {
    padding: 12px 14px;
  }

  .stat + .stat {
    border-left: 0;
  }

  .stat:nth-child(even) {
    border-left: 1px solid var(--line);
  }

  .stat:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .stat-value {
    font-size: 19px;
  }

  .job {
    padding: 14px 16px 16px;
  }

  .job-actions {
    width: 100%;
    margin-left: 0;
    margin-top: 10px;
  }

  .job-actions .btn:first-of-type {
    flex: 1;
  }

  .field-row {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
