/* QuickEnrich for Delivery: one stylesheet, no build step. Tokens first, then layout, then components. */
:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #f0f2f5;
  --text: #161b26;
  --muted: #5d6679;
  --faint: #8a93a5;
  --border: #e2e5eb;
  --border-strong: #cdd2db;
  --accent: #2547d0;
  --accent-hover: #1c39b0;
  --accent-soft: #e8edfc;
  --accent-text: #ffffff;
  --ok: #16794a;
  --ok-bg: #e2f3e9;
  --warn: #8a5a00;
  --warn-bg: #fbefd4;
  --bad: #b42318;
  --bad-bg: #fde7e5;
  --neutral: #9aa3b2;
  --neutral-soft: #d3d8e0;
  --focus: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent);
  --shadow: 0 1px 2px rgb(16 24 40 / 5%);
  --radius: 10px;
  --radius-sm: 7px;
  --mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1217;
    --surface: #171b22;
    --surface-2: #1f242d;
    --text: #e7eaf0;
    --muted: #9aa3b4;
    --faint: #6f7889;
    --border: #2a303b;
    --border-strong: #3a4250;
    --accent: #7b93ff;
    --accent-hover: #98abff;
    --accent-soft: #1f2846;
    --accent-text: #0b0e14;
    --ok: #4cc38a;
    --ok-bg: #12291d;
    --warn: #f0b75a;
    --warn-bg: #33270f;
    --bad: #ff8a80;
    --bad-bg: #3a1a18;
    --neutral: #6f7889;
    --neutral-soft: #3a4250;
    --shadow: none;
    color-scheme: dark;
  }
}

/* ---- Base ------------------------------------------------------------------------------ */
*,
*::before,
*::after {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    14px/1.5 system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    sans-serif;
  -webkit-font-smoothing: antialiased;
}
a {
  color: var(--accent);
  text-underline-offset: 2px;
}
a:hover {
  color: var(--accent-hover);
}
h1,
h2,
h3 {
  margin: 0;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
h1 {
  font-size: 1.45rem;
  font-weight: 650;
}
h2 {
  font-size: 1rem;
  font-weight: 620;
}
p {
  margin: 0;
}
code {
  font-family: var(--mono);
  font-size: 0.92em;
}
:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 0.86rem;
}
.num {
  font-variant-numeric: tabular-nums;
}

/* ---- App shell: sidebar on wide screens, top bar on narrow ------------------------------ */
body.has-sidebar {
  display: grid;
  grid-template-columns: 228px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 18px 12px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  overflow-y: auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 8px;
  color: var(--text);
  font-weight: 680;
  text-decoration: none;
}
.brand:hover {
  color: var(--text);
}
.brand small {
  display: block;
  color: var(--muted);
  font-weight: 500;
  font-size: 0.8rem;
}
.brand-mark {
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 8px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M9 17l5 5 9-11' stroke='white' stroke-width='3.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
      center / 22px no-repeat,
    #2547d0;
}
.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 18px;
  flex: 1;
}
.nav-group {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.nav-heading {
  padding: 0 10px 4px;
  color: var(--faint);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.nav-group a {
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-weight: 520;
  text-decoration: none;
}
.nav-group a:hover {
  background: var(--surface-2);
  color: var(--text);
}
.nav-group a[aria-current='page'] {
  background: var(--accent-soft);
  color: var(--accent);
}
.who {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 12px 10px 0;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
}
.who-email {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.who-meta {
  color: var(--muted);
}
/* Content is centred in the space right of the sidebar and capped so lines and tables stay readable. */
main {
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 28px 40px 96px;
}

@media (max-width: 860px) {
  body.has-sidebar {
    display: block;
  }
  .sidebar {
    position: static;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    padding: 10px 16px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .sidebar nav {
    order: 3;
    flex: 1 0 100%;
    flex-direction: row;
    gap: 4px;
    overflow-x: auto;
    margin: 0 -16px;
    padding: 0 16px 2px;
    scrollbar-width: none;
  }
  .nav-group {
    flex-direction: row;
    gap: 2px;
  }
  .nav-group + .nav-group {
    padding-left: 6px;
    border-left: 1px solid var(--border);
  }
  .nav-heading {
    display: none;
  }
  .nav-group a {
    white-space: nowrap;
  }
  .who {
    margin-left: auto;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 0;
    border: 0;
  }
  .who-email {
    max-width: 150px;
    color: var(--muted);
  }
  main {
    padding: 20px 16px 96px;
  }
}

/* ---- Page header, banners, flash ---------------------------------------------------------- */
.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 24px;
  margin-bottom: 20px;
}
.page-head .sub {
  margin-top: 4px;
  color: var(--muted);
}
.crumb {
  display: inline-block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.86rem;
  text-decoration: none;
}
.head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.head-actions form {
  margin: 0;
}
.banner,
.flash {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  border: 1px solid transparent;
}
.banner::before,
.flash::before {
  content: '';
  flex: none;
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 50%;
  background: currentColor;
}
.banner.bad,
.flash.error {
  background: var(--bad-bg);
  color: var(--bad);
  border-color: color-mix(in srgb, var(--bad) 25%, transparent);
}
.flash.ok {
  background: var(--ok-bg);
  color: var(--ok);
  border-color: color-mix(in srgb, var(--ok) 25%, transparent);
}
.flash {
  animation: flash-in 0.2s ease-out;
}
@keyframes flash-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
}

/* ---- Cards & layout helpers ---------------------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 16px;
}
.card.flush {
  padding: 0;
  overflow: hidden;
}
.card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
  margin-bottom: 14px;
}
.card.flush .card-head {
  padding: 16px 20px 0;
}
.card-head p {
  color: var(--muted);
  font-size: 0.86rem;
}
/* ---- Help page ------------------------------------------------------------------------------ */
.help {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 0 16px;
  align-items: start;
}
.help > .card {
  grid-column: 1;
  max-width: 820px;
  line-height: 1.6;
}
.help > .help-toc {
  grid-column: 2;
  grid-row: 1 / span 20;
  position: sticky;
  top: 24px;
}
.help-toc ol {
  margin: 8px 0 0;
  padding-left: 18px;
  font-size: 0.9rem;
}
.help-toc li + li {
  margin-top: 4px;
}
.help h2 {
  margin-bottom: 10px;
}
.help h3 {
  font-size: 0.98rem;
  margin: 16px 0 6px;
}
.help p,
.help ul,
.help > .card ol {
  margin: 0 0 10px;
}
.help ul,
.help > .card ol {
  padding-left: 20px;
}
.help li + li {
  margin-top: 6px;
}
.help section[id] {
  scroll-margin-top: 16px;
}
.card-pad {
  padding: 20px 20px 4px;
}
.help td {
  white-space: normal;
}
.card-pad + .table-wrap {
  border-top: 1px solid var(--border);
}
@media (max-width: 960px) {
  .help {
    grid-template-columns: minmax(0, 1fr);
  }
  .help > .help-toc {
    grid-column: 1;
    grid-row: auto;
    position: static;
  }
}

.card.narrow {
  max-width: 400px;
  margin: 10vh auto 0;
  padding: 28px;
}
.card.highlight {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.card.danger-zone {
  border-color: color-mix(in srgb, var(--bad) 45%, var(--border));
}
.split {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.split > .card {
  margin-bottom: 0;
}
@media (max-width: 960px) {
  .split {
    grid-template-columns: 1fr;
  }
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.stack > button,
.stack > .button {
  align-self: flex-start;
}
.inline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
  margin: 0;
}
.row3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}
.hint {
  color: var(--muted);
  font-size: 0.84rem;
}

/* ---- Forms ---------------------------------------------------------------------------------- */
label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-weight: 560;
  font-size: 0.88rem;
}
label .hint {
  font-weight: 400;
}
label.check {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  font-weight: 450;
}
fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
fieldset[disabled] {
  display: none;
}
input,
select {
  font: inherit;
  height: 38px;
  padding: 0 11px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  min-width: 0;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
input::placeholder {
  color: var(--faint);
}
input:hover,
select:hover {
  border-color: var(--faint);
}
input:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--focus);
}
input[type='checkbox'],
input[type='radio'] {
  width: 16px;
  height: 16px;
  padding: 0;
  accent-color: var(--accent);
}
input[type='number'] {
  font-variant-numeric: tabular-nums;
}
.input-suffix {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 450;
  color: var(--muted);
}
.input-suffix input {
  width: 110px;
}

button,
.button {
  font: inherit;
  font-weight: 600;
  height: 38px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-text);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  transition:
    background 0.15s,
    border-color 0.15s,
    color 0.15s;
}
button:hover,
.button:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--accent-text);
}
button:disabled,
button[aria-busy='true'] {
  opacity: 0.55;
  cursor: not-allowed;
}
button.secondary,
.button.secondary {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text);
}
button.secondary:hover,
.button.secondary:hover {
  background: var(--surface-2);
  border-color: var(--faint);
}
button.danger {
  background: var(--bad);
  border-color: var(--bad);
  color: #fff;
}
button.danger.ghost {
  background: transparent;
  color: var(--bad);
  border-color: color-mix(in srgb, var(--bad) 40%, transparent);
}
button.danger.ghost:hover {
  background: var(--bad-bg);
}
button.small,
.button.small {
  height: 30px;
  padding: 0 10px;
  font-size: 0.84rem;
}
button.link {
  height: auto;
  background: none;
  border: none;
  color: var(--accent);
  padding: 0;
  font-weight: 520;
}
button.link:hover {
  text-decoration: underline;
  background: none;
  color: var(--accent-hover);
}
button.link.danger {
  color: var(--bad);
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.actions form {
  margin: 0;
}

/* Segmented control built from radio inputs. */
.segmented {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  border-radius: 9px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  align-self: flex-start;
}
.segmented label {
  position: relative;
  padding: 5px 14px;
  border-radius: 6px;
  color: var(--muted);
  font-weight: 560;
  cursor: pointer;
}
.segmented input {
  position: absolute;
  opacity: 0;
}
.segmented label:has(input:checked) {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 2px rgb(16 24 40 / 12%);
}
.segmented label:has(input:focus-visible) {
  box-shadow: var(--focus);
}

/* File drop zone (a styled <label> wrapping the file input). */
.dropzone {
  position: relative;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 180px;
  padding: 28px;
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface-2);
  text-align: center;
  font-weight: 450;
  cursor: pointer;
  transition:
    border-color 0.15s,
    background 0.15s;
}
.dropzone:hover,
.dropzone.over {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.dropzone.has-file {
  border-style: solid;
  border-color: var(--ok);
  background: var(--ok-bg);
}
.dropzone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  height: 100%;
}
.dropzone:has(input:focus-visible) {
  box-shadow: var(--focus);
}
.dropzone strong {
  font-size: 1rem;
}
.dropzone [data-file-name] {
  font-weight: 600;
  color: var(--ok);
}

/* Steps along the top of the upload flow. */
.steps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  color: var(--faint);
  font-size: 0.86rem;
  font-weight: 560;
}
.steps li {
  display: flex;
  align-items: center;
  gap: 8px;
}
.steps li::before {
  content: attr(data-n);
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  font-size: 0.76rem;
}
.steps li.done {
  color: var(--muted);
}
.steps li.done::before {
  content: '✓';
  border-color: var(--ok);
  background: var(--ok);
  color: #fff;
}
.steps li[aria-current='step'] {
  color: var(--text);
}
.steps li[aria-current='step']::before {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-text);
}

/* Bottom bar that stays visible while the mapping page scrolls. */
.action-bar {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin: 8px -4px 0;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(8px);
  box-shadow: 0 -4px 16px rgb(16 24 40 / 6%);
}
.action-bar .summary {
  flex: 1;
  min-width: 200px;
}
.action-bar .actions {
  margin-left: auto;
}

/* ---- Tables --------------------------------------------------------------------------------- */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
th,
td {
  text-align: left;
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  vertical-align: middle;
}
th {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: var(--surface-2);
}
tbody tr:last-child td {
  border-bottom: 0;
}
tbody tr:not(.empty):hover td {
  background: color-mix(in srgb, var(--surface-2) 55%, transparent);
}
th.num,
td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
tr.empty td {
  padding: 32px 12px;
  text-align: center;
  color: var(--muted);
  white-space: normal;
}
tfoot td {
  font-weight: 650;
  border-top: 1px solid var(--border-strong);
  border-bottom: 0;
}
td .sub {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
}
td a.row-link {
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}
td a.row-link:hover {
  color: var(--accent);
  text-decoration: underline;
}
.table-wrap {
  overflow-x: auto;
}
.card:not(.flush) > .table-wrap {
  margin: 0 -20px -20px;
}
.card > .table-wrap th:first-child,
.card > .table-wrap td:first-child {
  padding-left: 20px;
}
.card > .table-wrap th:last-child,
.card > .table-wrap td:last-child {
  padding-right: 20px;
}
table.preview td {
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
}
table.preview th .tag {
  display: none;
}
table.preview th.mapped {
  background: var(--accent-soft);
  color: var(--accent);
}
table.preview th.mapped .tag {
  display: block;
  font-size: 0.72rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
table.preview td.mapped {
  background: color-mix(in srgb, var(--accent-soft) 45%, transparent);
}

/* Filter bar above lists. */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
  margin-bottom: 14px;
}
.filters label {
  font-size: 0.8rem;
  color: var(--muted);
}
.pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.86rem;
}

/* ---- Pills ------------------------------------------------------------------------------------ */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.6;
  background: var(--surface-2);
  color: var(--muted);
  white-space: nowrap;
}
.pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.pill.ok,
.pill.completed,
.pill.found {
  background: var(--ok-bg);
  color: var(--ok);
}
.pill.warn,
.pill.paused,
.pill.pending {
  background: var(--warn-bg);
  color: var(--warn);
}
.pill.bad,
.pill.error,
.pill.invalid_input {
  background: var(--bad-bg);
  color: var(--bad);
}
.pill.running,
.pill.queued {
  background: var(--accent-soft);
  color: var(--accent);
}
.pill.running::before {
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse {
  50% {
    opacity: 0.3;
  }
}

/* ---- Numbers: KPI tiles, meters, progress --------------------------------------------------- */
.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.kpi {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.kpi .label {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 560;
}
.kpi .value {
  font-size: clamp(1.35rem, 4vw, 1.75rem);
  font-weight: 680;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.kpi .value small {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0;
}
.kpi .foot {
  color: var(--muted);
  font-size: 0.82rem;
}
.kpi.bad .value {
  color: var(--bad);
}
.meter {
  height: 6px;
  margin-top: 6px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}
.meter > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 0.4s;
}

.status-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 0.86rem;
}

/* Mini progress bar used in tables. */
.mini {
  display: flex;
  align-items: center;
  gap: 10px;
}
.mini .bar {
  width: 90px;
  height: 6px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}
.mini .bar > span {
  display: block;
  height: 100%;
  background: var(--accent);
}
.mini .bar.done > span {
  background: var(--ok);
}

/* Job outcome: one stacked bar plus legend. */
.outcome {
  display: flex;
  height: 12px;
  margin: 14px 0 12px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface-2);
}
.outcome span {
  height: 100%;
  transition: width 0.4s;
}
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.88rem;
}
.legend li {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
}
.legend b {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.sw {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}
.o-found {
  background: var(--ok);
}
.o-not_found {
  background: var(--neutral);
}
.o-invalid_input,
.o-error {
  background: var(--bad);
}
.o-duplicate,
.o-cancelled {
  background: var(--neutral-soft);
}
.o-remaining {
  background: repeating-linear-gradient(
    -45deg,
    var(--accent-soft) 0 6px,
    color-mix(in srgb, var(--accent) 22%, var(--accent-soft)) 6px 12px
  );
}
.job-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}
.job-status .big {
  font-size: 1.25rem;
  font-weight: 680;
  font-variant-numeric: tabular-nums;
}
.job-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* Per-minute request chart. */
.chart {
  position: relative;
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 0 8px;
}
.chart .y {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 140px;
  color: var(--faint);
  font-size: 0.74rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.bars {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 140px;
  border-bottom: 1px solid var(--border-strong);
  background: linear-gradient(var(--border) 1px, transparent 1px) 0 0 / 100% 50%;
}
.bars .bar {
  flex: 1;
  min-height: 0;
  border-radius: 2px 2px 0 0;
  background: var(--accent);
}
.bars .bar:hover {
  background: var(--accent-hover);
}
.bars .limit {
  position: absolute;
  left: 0;
  right: 0;
  border-top: 1.5px dashed var(--bad);
  pointer-events: none;
}
.bars .limit span {
  position: absolute;
  right: 0;
  top: 2px;
  padding: 0 4px;
  color: var(--bad);
  font-size: 0.72rem;
  background: var(--surface);
}
.bars .none {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.88rem;
}
.chart .x {
  grid-column: 2;
  display: flex;
  justify-content: space-between;
  padding-top: 6px;
  color: var(--faint);
  font-size: 0.74rem;
}

/* ---- Results ------------------------------------------------------------------------------------ */
.result-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
}
.email-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  margin-bottom: 14px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.email-big {
  flex: 1;
  min-width: 0;
  font-family: var(--mono);
  font-size: 1.12rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.note {
  padding: 8px 12px;
  margin-bottom: 14px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
}
.note.warn {
  background: var(--warn-bg);
  color: var(--warn);
}
.note.bad {
  background: var(--bad-bg);
  color: var(--bad);
}
.note.info {
  background: var(--surface-2);
  color: var(--muted);
}
dl.kv {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 8px 20px;
  margin: 0;
  font-size: 0.9rem;
}
dl.kv dt {
  color: var(--muted);
}
dl.kv dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.placeholder {
  display: grid;
  place-items: center;
  min-height: 220px;
  color: var(--muted);
  text-align: center;
}
.placeholder p + p {
  margin-top: 4px;
}
.token {
  display: block;
  margin: 10px 0;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  word-break: break-all;
}
.checklist {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}
.checklist li + li {
  margin-top: 6px;
}
.checklist strong {
  color: var(--text);
}
details.reasons summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 0.88rem;
}
details.reasons ul {
  margin: 8px 0 0;
  padding-left: 18px;
  font-size: 0.86rem;
}

/* Pre-flight breakdown. */
.pf-headline {
  font-size: 1.05rem;
  margin-bottom: 12px;
}
.pf-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.pf-flow > div {
  display: flex;
  flex-direction: column;
  min-width: 108px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.pf-flow > div.key {
  background: var(--accent-soft);
}
.pf-flow > div.bad b {
  color: var(--bad);
}
.pf-flow span {
  color: var(--muted);
  font-size: 0.78rem;
}
.pf-flow b {
  font-size: 1.2rem;
  font-variant-numeric: tabular-nums;
}

.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before {
    animation: none !important;
    transition: none !important;
  }
}
.verified {
  margin: -6px 0 14px;
}
.result-foot {
  margin-top: 16px;
}
.cache-note {
  margin-top: 10px;
}
.mt {
  margin-top: 14px;
}
.mapping {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}
.inline .grow {
  flex: 1;
  min-width: 220px;
}
.mt-0 {
  margin-top: 0;
}
td.wrap {
  white-space: normal;
  min-width: 260px;
}
.login {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.login .brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}
.login .stack > button {
  align-self: stretch;
}
.login .button.google {
  align-self: stretch;
}
