/* Flat theme: SerpInsight kit (brand-dark + primary olive, no elevation shadows). */
:root {
  --font-min: 14px;
  /* Core palette: matches SerpInsight --brand-dark and --primary */
  --main: #040521;
  --accent: #809b01;
  /* Kit names: aliases to the same values for design-doc parity */
  --brand-dark: var(--main);
  --primary: var(--accent);
  --main-rgb: 4 5 33;
  --accent-rgb: 128 155 1;
  --bg: #e9ebf2;
  --surface: #ffffff;
  /* Always use on full main or accent fills */
  --text-on-brand: #ffffff;
  --text-on-dark: var(--text-on-brand);
  --ink: var(--main);
  --canvas: var(--surface);
  /* SerpInsight app radius cap (--radius in Tailwind theme) */
  --radius: 0.3125rem;
  --r: var(--radius);
  --border: rgb(var(--main-rgb) / 0.14);
  /* Slightly softer than --border: vertical guides between table columns */
  --tbl-col-border: rgb(var(--main-rgb) / 0.08);
  --shadow: none;
  --layout-max: 1350px;
  --space-page-x: clamp(1rem, 3.2vw, 2rem);
  --space-page-y: clamp(1.35rem, 4vw, 2.75rem);
  --space-section: clamp(1.35rem, 3vw, 2rem);
  --r-pill: 999px;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: var(--font-min);
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
}

a {
  color: var(--accent);
  text-decoration: none;
  text-underline-offset: 2px;
  font-weight: 500;
}

.wrap a:hover {
  text-decoration: underline;
  color: var(--main);
}

/* —— Top bar —— */
.top {
  position: sticky;
  top: 0;
  z-index: 40;
  padding: 0;
  background: var(--main);
  color: var(--text-on-brand);
  border-bottom: 2px solid var(--accent);
}

.top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.top .brand {
  font-weight: 600;
  letter-spacing: -0.02em;
  font-size: var(--font-min);
}

.top .brand a {
  color: inherit;
  text-decoration: none;
}

.top .brand a:hover {
  opacity: 0.88;
  text-decoration: none;
}

.top nav,
.top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
}

.top-nav__link {
  color: var(--text-on-brand);
  padding: 0.45rem 0.85rem;
  border-radius: var(--r);
  font-size: var(--font-min);
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
}

.top-nav__link:hover {
  background: rgb(var(--accent-rgb) / 0.22);
  color: var(--text-on-brand);
  text-decoration: none;
}

.top-nav__link--active {
  background: rgb(var(--accent-rgb) / 0.32);
  border-color: rgb(var(--accent-rgb) / 0.55);
  color: var(--text-on-brand);
}

.top-nav__link--active:hover {
  background: rgb(var(--accent-rgb) / 0.4);
  color: var(--text-on-brand);
}

.top-trail {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin-left: auto;
  justify-content: flex-end;
}

.top-account {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.75rem;
  max-width: min(100%, 16rem);
}

.top-account__email {
  font-size: 0.75rem;
  font-weight: 500;
  opacity: 0.9;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-logout-form {
  margin: 0;
}

button.top-nav__link--btn {
  cursor: pointer;
  font: inherit;
  background: none;
  border: 1px solid transparent;
  border-radius: var(--r);
}

/* —— Layout (full-bleed chrome, max 1350px content) —— */
.layout-inner {
  width: 100%;
  max-width: var(--layout-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-page-x);
  padding-right: var(--space-page-x);
}

.wrap {
  padding-top: var(--space-page-y);
  padding-bottom: calc(var(--space-page-y) * 1.35);
}

.page-head {
  margin-bottom: var(--space-section);
}

.page-head--split {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 1.5rem;
}

.page-title {
  margin: 0 0 0.4rem;
  font-size: clamp(1.35rem, 2.5vw, 1.6rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.page-lead,
.lead {
  margin: 0;
  color: rgb(var(--main-rgb) / 0.62);
  font-size: var(--font-min);
  line-height: 1.55;
  max-width: min(42rem, 100%);
}

.crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0 0.65rem;
  font-size: var(--font-min);
  line-height: 1.4;
}

.crumb a {
  color: var(--accent);
  font-weight: 600;
}

.crumb a:hover {
  color: var(--main);
}

.crumb-sep {
  color: rgb(var(--main-rgb) / 0.35);
  font-weight: 600;
  user-select: none;
}

.crumb-current {
  color: rgb(var(--main-rgb) / 0.72);
  font-weight: 600;
}

.skim-row {
  list-style: none;
  margin: 0.85rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.65rem;
  align-items: center;
}

.skim-row > li {
  margin: 0;
}

.skim-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.65rem 0.28rem 0.5rem;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: rgb(var(--main-rgb) / 0.045);
  font-size: 0.8125rem;
  line-height: 1.25;
}

.skim-pill__k {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgb(var(--main-rgb) / 0.5);
}

.mt {
  margin-top: 1rem;
}

/* —— Surfaces —— */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: none;
}

.card-pad {
  padding: clamp(1.15rem, 2.8vw, 1.65rem) clamp(1.1rem, 2.5vw, 1.5rem);
}

.chip {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  font-size: var(--font-min);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  border-radius: var(--r);
  background: rgb(var(--main-rgb) / 0.06);
  border: 1px solid var(--border);
}

/* —— Branded pills (skimmable data) —— */
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 0.22rem 0.6rem;
  font-size: var(--font-min);
  font-weight: 600;
  line-height: 1.25;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: rgb(var(--main-rgb) / 0.06);
  color: var(--ink);
}

.pill--accent {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--text-on-brand);
}

.pill--main {
  background: var(--main);
  border-color: var(--main);
  color: var(--text-on-brand);
}

.pill--muted {
  font-weight: 500;
  color: rgb(var(--main-rgb) / 0.78);
  background: rgb(var(--main-rgb) / 0.04);
}

.pill--mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: var(--font-min);
  font-weight: 600;
}

.pill--stat {
  font-variant-numeric: tabular-nums;
}

.pill--lg {
  padding: 0.3rem 0.75rem;
  font-size: var(--font-min);
}

.pill--wrap {
  white-space: normal;
  text-align: left;
  justify-content: flex-start;
  max-width: 100%;
}

.pill-list {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.pill-list li {
  margin: 0;
}

.env-foot {
  margin-top: var(--space-section);
  padding: 0.85rem 1rem;
  border-radius: var(--r);
  border: 1px solid var(--border);
  background: rgb(var(--main-rgb) / 0.03);
}

.env-foot-title {
  margin: 0 0 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgb(var(--main-rgb) / 0.55);
}

.env-foot .pill-list {
  margin-top: 0;
}

/* —— Forms —— */
.stack {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.stack-tight {
  gap: 0.45rem;
}

.form-error {
  color: #9a3412;
  font-size: 0.875rem;
  margin: 0 0 0.75rem;
}

.inline {
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
  margin-right: 0.65rem;
  margin-bottom: 0.25rem;
}

label.stack {
  font-size: 0.8125rem;
  font-weight: 500;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="file"],
textarea {
  width: 100%;
  max-width: min(36rem, 100%);
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}

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

fieldset.stack {
  margin: 0;
  padding: 0.75rem 0 0;
  border: none;
  border-top: 1px solid var(--border);
}

fieldset.stack:first-of-type {
  border-top: none;
  padding-top: 0;
}

fieldset.stack legend {
  padding: 0;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.55;
}

/* —— Buttons —— */
button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.45rem 0.85rem;
  font: inherit;
  font-weight: 600;
  font-size: var(--font-min);
  min-height: 2.5rem;
  border-radius: var(--r);
  cursor: pointer;
  border: 2px solid var(--accent);
  background: var(--accent);
  color: var(--text-on-brand);
  text-decoration: none;
}

button:hover,
.btn:hover {
  filter: brightness(1.05);
  text-decoration: none;
}

.btn-ghost {
  background: transparent;
  color: var(--main);
  border: 2px solid var(--main);
}

.btn-ghost:hover {
  background: rgb(var(--accent-rgb) / 0.12);
  border-color: var(--accent);
  color: var(--main);
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

/* —— Table —— */
.tbl-wrap {
  overflow-x: auto;
  margin: 0 -0.05rem;
}

.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-min);
}

.tbl th {
  text-align: left;
  font-weight: 600;
  font-size: var(--font-min);
  text-transform: none;
  letter-spacing: 0.02em;
  opacity: 0.75;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

.tbl td:not(:last-child) {
  border-right: 1px solid var(--tbl-col-border);
}

.tbl td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  font-size: var(--font-min);
}

.tbl tbody tr:last-child td {
  border-bottom: none;
}

.tbl tbody tr:hover td {
  background: rgb(var(--accent-rgb) / 0.06);
}

.tbl code {
  font-size: var(--font-min);
}

.btn-block {
  width: 100%;
  justify-content: center;
}

/* —— Progress —— */
.progress {
  height: 6px;
  border-radius: var(--r);
  background: rgb(var(--main-rgb) / 0.1);
  overflow: hidden;
  max-width: 12rem;
  margin-top: 0.25rem;
}

.progress > span {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: var(--r);
  min-width: 0;
  transition: width 0.25s ease;
}

.stat-line {
  margin: 0.35rem 0;
  font-size: 0.9rem;
}

.stat-line strong {
  font-weight: 600;
  margin-right: 0.35rem;
}

.stat-line--tight {
  margin: 0 0 0.35rem;
}

.muted {
  font-size: var(--font-min);
  opacity: 0.72;
}

.empty-hint {
  padding: 0.75rem 0;
  font-size: 0.9rem;
  opacity: 0.75;
}

.stat-num {
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.tbl td:last-child a {
  font-weight: 600;
  font-size: 0.8125rem;
}

/* —— Motion (respect accessibility) —— */
@media (prefers-reduced-motion: no-preference) {
  .cfg-animate {
    animation: cfgIn 0.35s ease-out both;
  }

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

/* —— HTMX —— */
.htmx-indicator {
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
  opacity: 1;
}

.btn-spinner {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  margin-left: 0.4rem;
  vertical-align: -0.15em;
  border: 2px solid rgb(255 255 255 / 0.35);
  border-top-color: var(--text-on-brand);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.htmx-request button[type="submit"] .btn-spinner {
  opacity: 1;
}

.btn-ghost .btn-spinner,
.btn-stop .btn-spinner {
  border-color: rgb(var(--main-rgb) / 0.2);
  border-top-color: var(--main);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn-spinner {
    animation: none;
    opacity: 0.6;
  }
}

/* —— Upload drop zone —— */
.form-upload {
  gap: 1rem;
}

.file-drop {
  position: relative;
  display: block;
  cursor: pointer;
  border: 1px dashed rgb(var(--main-rgb) / 0.28);
  border-radius: var(--r);
  padding: 1.25rem 1rem;
  text-align: center;
  background: rgb(var(--main-rgb) / 0.02);
  transition:
    border-color 0.15s ease,
    background 0.15s ease;
}

.file-drop:hover,
.file-drop:focus-within {
  border-color: var(--accent);
  background: rgb(var(--accent-rgb) / 0.06);
  box-shadow: none;
}

.file-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
  max-width: none;
}

.file-drop-body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: center;
  pointer-events: none;
}

.file-drop-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.file-name {
  font-size: 0.8rem;
  word-break: break-all;
  max-width: 100%;
  padding: 0 0.5rem;
  opacity: 0.55;
}

.file-name.has-file {
  opacity: 1;
  font-weight: 500;
}

.file-hint {
  font-size: 0.75rem;
  opacity: 0.5;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.form-actions--end {
  justify-content: flex-end;
  padding-top: 0.25rem;
}

button[type="submit"] {
  position: relative;
  min-width: 9rem;
}

button[type="submit"]:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* —— Column pickers —— */
.cfg-mount {
  min-height: 0;
}

.stack-loose {
  gap: 1.25rem;
}

.panel-intro {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--border);
}

.panel-intro-muted {
  color: rgb(var(--main-rgb) / 0.62);
  font-weight: 500;
}

.pick-panel {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

/* Step 1: name column (left) + extra columns (right) on wide viewports */
.pick-columns-layout {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-width: 0;
}

.pick-columns-layout > .pick-panel--column {
  min-width: 0;
}

.pick-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.pick-filter-row .input-search {
  flex: 1 1 12rem;
  min-width: 0;
  width: auto;
}

.pick-filter-row .bulk-actions {
  flex-shrink: 0;
}

@media (max-width: 30rem) {
  .pick-filter-row .bulk-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (min-width: 768px) {
  .pick-columns-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem 2rem;
    align-items: stretch;
  }

  .pick-columns-layout > .pick-panel--passthrough {
    border-left: 1px solid var(--tbl-col-border);
    padding-left: 1.5rem;
  }

  .pick-columns-layout .pick-scroll {
    max-height: min(45vh, 20rem);
    min-height: min(38vh, 17rem);
  }
}

.pick-panel--compact {
  padding-top: 0.25rem;
}

.pick-panel-head {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.pick-heading {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.72;
}

.pick-sub {
  margin: 0;
  font-size: 0.875rem;
  opacity: 0.62;
  line-height: 1.45;
}

.input-search {
  width: 100%;
  max-width: none;
  padding: 0.5rem 0.65rem;
  border: 2px solid var(--border);
  border-radius: var(--r);
  font: inherit;
  background: var(--surface);
  transition: border-color 0.15s ease;
}

.input-search:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: none;
}

.pick-scroll {
  max-height: min(52vh, 22rem);
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: rgb(var(--main-rgb) / 0.02);
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgb(var(--main-rgb) / 0.28) transparent;
}

.pick-scroll::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.pick-scroll::-webkit-scrollbar-thumb {
  background: rgb(var(--main-rgb) / 0.22);
  border-radius: 999px;
}

.pick-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.pick-list {
  list-style: none;
  margin: 0;
  padding: 0.35rem 0;
}

.pick-item {
  border-bottom: 1px solid var(--border);
}

.pick-item:last-child {
  border-bottom: none;
}

.pick-row {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.45rem 0.75rem;
  cursor: pointer;
  transition: background 0.15s ease;
}

.pick-row:hover {
  background: rgb(var(--main-rgb) / 0.04);
}

.pick-input {
  margin-top: 0.2rem;
  flex-shrink: 0;
  accent-color: var(--accent);
}

.pick-text {
  flex: 1;
  min-width: 0;
  font-size: 0.875rem;
  line-height: 1.4;
  word-break: break-word;
}

/* —— Step 1: two-column column pick (tiles + drop zones) —— */
.column-pick-layout {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-width: 0;
  margin-top: 0.5rem;
}

@media (min-width: 768px) {
  .column-pick-layout {
    display: grid;
    grid-template-columns: minmax(0, 40%) minmax(0, 60%);
    gap: 1.25rem 1.75rem;
    align-items: start;
  }
}

.column-pick-tile-scroll {
  max-height: min(52vh, 22rem);
}

.column-pick-tile-list {
  list-style: none;
  margin: 0;
  padding: 0.35rem 0;
}

.column-pick-tile {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--surface);
  font: inherit;
  font-size: 0.875rem;
  text-align: left;
  cursor: grab;
  color: inherit;
  word-break: break-word;
}

.column-pick-tile:hover {
  border-color: rgb(var(--accent-rgb) / 0.45);
}

.column-pick-tile:active {
  cursor: grabbing;
}

.column-pick-tile--dragging {
  opacity: 0.55;
}

.column-pick-tile--pending {
  outline: 2px solid rgb(var(--accent-rgb) / 0.55);
  outline-offset: 1px;
}

.column-pick-right {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.column-pick-right-block {
  margin: 0;
}

.column-pick-dropzone {
  min-height: 3.25rem;
  padding: 0.5rem 0.65rem;
  border: 2px dashed rgb(var(--main-rgb) / 0.22);
  border-radius: var(--r);
  background: rgb(var(--main-rgb) / 0.02);
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background 0.15s ease;
}

.column-pick-dropzone:focus-visible {
  outline: 2px solid rgb(var(--accent-rgb) / 0.45);
  outline-offset: 2px;
}

.column-pick-dropzone--pass {
  cursor: default;
  min-height: 4rem;
}

.column-pick-dropzone--dragover {
  border-color: var(--accent);
  background: rgb(var(--accent-rgb) / 0.08);
}

.column-pick-dropzone-empty {
  margin: 0;
  font-size: 0.875rem;
  opacity: 0.62;
  line-height: 1.45;
}

.column-pick-chip-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.column-pick-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.6rem;
  border-radius: var(--r);
  border: 1px solid var(--border);
  background: rgb(var(--main-rgb) / 0.04);
  font-size: 0.875rem;
  font-weight: 500;
  max-width: 100%;
  word-break: break-word;
}

.column-pick-chip--keyword {
  background: rgb(var(--accent-rgb) / 0.12);
  font-weight: 600;
}

.column-pick-chip-remove {
  flex-shrink: 0;
  margin: 0;
  padding: 0.1rem 0.4rem;
  border: none;
  border-radius: var(--r);
  background: rgb(var(--main-rgb) / 0.08);
  font: inherit;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  color: inherit;
  opacity: 0.75;
}

.column-pick-chip-remove:hover {
  opacity: 1;
}

.column-pick-pass-ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.column-pick-pass-li {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.35rem;
}

.column-pick-pass-li:first-child {
  margin-top: 0;
}

.column-pick-pass-empty {
  margin: 0;
  font-size: 0.875rem;
}

.tld-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tld-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: var(--r);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease;
}

.tld-chip:hover {
  border-color: rgb(var(--main-rgb) / 0.35);
  background: rgb(var(--main-rgb) / 0.03);
}

.tld-chip input {
  accent-color: var(--accent);
}

.label-sm {
  font-size: 0.8125rem;
  font-weight: 500;
}

.label-hint {
  font-weight: 400;
  opacity: 0.55;
}

.toggle-row {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  font-size: 0.875rem;
  line-height: 1.45;
  padding: 0.35rem 0;
}

.toggle-row input {
  margin-top: 0.2rem;
  accent-color: var(--accent);
}

.stack-tight {
  gap: 0.35rem;
}

.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;
}

/* —— Settings: Porkbun toggle —— */
.settings-toggle {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  margin-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
}

.settings-toggle-text {
  flex: 1;
  min-width: 0;
}

.settings-toggle-title {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
}

.settings-toggle-hint {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.45;
  opacity: 0.72;
}

.settings-toggle-hint strong {
  font-weight: 600;
  opacity: 1;
}

.switch {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  cursor: pointer;
}

.switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-track {
  display: block;
  width: 2.75rem;
  height: 1.5rem;
  border-radius: var(--r);
  background: rgb(var(--main-rgb) / 0.2);
  transition: background 0.2s ease;
  position: relative;
}

.switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 1.24rem;
  height: 1.24rem;
  border-radius: calc(var(--r) - 1px);
  background: var(--surface);
  box-shadow: none;
  border: 1px solid rgb(var(--main-rgb) / 0.12);
  transition: transform 0.2s ease;
}

.switch input:checked + .switch-track {
  background: var(--accent);
}

.switch input:checked + .switch-track .switch-thumb {
  transform: translateX(1.22rem);
}

.switch input:focus-visible + .switch-track {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .switch-thumb,
  .switch-track {
    transition: none;
  }
}

/* —— Toasts + connection —— */
.toast-host {
  position: fixed;
  z-index: 100;
  bottom: clamp(0.75rem, 2vw, 1.35rem);
  right: calc(max(0px, (100vw - var(--layout-max)) / 2) + var(--space-page-x));
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.45rem;
  pointer-events: none;
  width: min(22rem, calc(100vw - 2 * var(--space-page-x)));
  max-width: min(22rem, calc(var(--layout-max) - 2 * var(--space-page-x)));
}

.toast {
  pointer-events: auto;
  padding: 0.55rem 0.75rem;
  border-radius: var(--r);
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  box-shadow: none;
  font-size: 0.875rem;
  line-height: 1.4;
  max-width: 100%;
}

.toast--err {
  border-color: rgb(127 29 29 / 0.45);
  background: rgb(254 242 242);
}

.toast--ok {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--text-on-brand);
}

.toast--ok .toast-title,
.toast--ok .toast-msg {
  color: var(--text-on-brand);
  opacity: 1;
}

.toast-title {
  font-weight: 600;
  margin: 0 0 0.15rem;
}

.toast-msg {
  margin: 0;
  opacity: 0.88;
  word-break: break-word;
}

.conn-banner {
  padding: 0.5rem 0;
  font-size: 0.8125rem;
  font-weight: 600;
  background: rgb(254 226 226);
  color: var(--main);
  border-bottom: 2px solid rgb(127 29 29 / 0.35);
}

.conn-banner-inner {
  text-align: center;
  line-height: 1.4;
}

.conn-banner--hidden {
  display: none;
}

.conn-banner--online {
  background: var(--accent);
  color: var(--text-on-brand);
  border-bottom: 2px solid var(--accent);
}

/* —— Status + verdict badges —— */
.status-badge {
  display: inline-block;
  padding: 0.12rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: var(--r);
  border: 2px solid var(--border);
  background: rgb(var(--main-rgb) / 0.05);
}

.status-badge--queued {
  background: var(--main);
  border-color: var(--accent);
  color: var(--text-on-brand);
}
.status-badge--running {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--text-on-brand);
}
.status-badge--interrupted {
  background: rgb(254 243 199);
  border-color: rgb(180 83 9 / 0.55);
  color: var(--main);
}
.status-badge--done {
  background: var(--main);
  border-color: rgb(255 255 255 / 0.35);
  color: var(--text-on-brand);
}
.status-badge--failed {
  background: rgb(254 226 226);
  border-color: rgb(127 29 29 / 0.45);
  color: var(--main);
}

.verdict-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.1rem 0.4rem;
  border-radius: var(--r);
  text-transform: lowercase;
  border: 2px solid var(--border);
  background: rgb(var(--main-rgb) / 0.04);
}
.verdict-badge--available {
  color: var(--text-on-brand);
  background: var(--accent);
  border-color: var(--accent);
}
.verdict-badge--taken {
  color: var(--text-on-brand);
  background: var(--main);
  border-color: var(--main);
}
.verdict-badge--premium {
  color: var(--main);
  background: rgb(233 213 255);
  border-color: rgb(107 33 168 / 0.35);
}
.verdict-badge--error {
  color: var(--main);
  background: rgb(254 226 226);
  border-color: rgb(127 29 29 / 0.4);
}

.banner {
  margin: 0.35rem 0 0.65rem;
  padding: 0.65rem 0.85rem;
  border-radius: calc(var(--r) + 1px);
  font-size: 0.875rem;
  line-height: 1.45;
  border: 2px solid var(--border);
}
.banner-warn {
  background: rgb(254 243 199);
  border-color: rgb(180 83 9 / 0.45);
}

.btn-primary {
  background: var(--accent);
  color: var(--text-on-brand);
  border-color: var(--accent);
}

.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.job-actions-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0.5rem 0 0.15rem;
}

.resume-form,
.stop-form {
  margin: 0;
}

.btn-stop {
  background: transparent;
  color: var(--ink);
  border-color: rgba(127, 29, 29, 0.45);
}

.btn-stop:hover {
  background: rgba(127, 29, 29, 0.08);
  border-color: rgba(127, 29, 29, 0.55);
}

.dl-hint {
  font-size: 0.8rem;
  margin: 0.25rem 0 0;
}

/* —— Dashboard job board (list cards) —— */
.job-board {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.job-board__item {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: calc(var(--r) + 2px);
  background: var(--surface);
  box-shadow: none;
  transition: border-color 0.15s ease;
}

.job-board__item:hover {
  border-color: rgb(var(--accent-rgb) / 0.42);
}

.job-board__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.85rem;
  padding: clamp(0.9rem, 2.2vw, 1.2rem) clamp(1rem, 2.5vw, 1.4rem);
}

.job-board__name {
  flex: 1 1 10rem;
  min-width: 0;
  margin: 0;
}

.job-board__name .input-inline-title {
  width: 100%;
}

.job-board__dynamic {
  display: flex;
  flex: 1 1 8rem;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.75rem;
  min-width: 0;
}

.input-inline-title {
  font: inherit;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  padding: 0.2rem 0.4rem;
  margin: -0.2rem -0.4rem;
  border: 1px solid transparent;
  border-radius: var(--r);
  background: transparent;
  color: var(--main);
}

.input-inline-title:hover {
  border-color: var(--border);
  background: rgb(var(--main-rgb) / 0.04);
}

.input-inline-title:focus {
  outline: 2px solid rgb(var(--accent-rgb) / 0.45);
  outline-offset: 1px;
  border-color: transparent;
  background: var(--surface);
}

.job-page-title-form {
  margin: 0 0 0.4rem;
}

.job-page-title-heading {
  margin: 0;
  font: inherit;
  font-size: inherit;
  font-weight: inherit;
}

.campaign-name-field {
  margin: 0 0 1rem;
}

.job-board__grow {
  flex: 1 1 8rem;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.job-board__time {
  font-size: var(--font-min);
  color: rgb(var(--main-rgb) / 0.58);
  white-space: nowrap;
}

.empty-state {
  text-align: center;
  padding: clamp(1.75rem, 4vw, 2.75rem) 1.25rem;
}

.empty-state .empty-hint {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
}

.dash-attn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1rem;
  height: 1.1rem;
  margin-left: 0.2rem;
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--main);
  background: rgb(254 243 199);
  border: 2px solid rgb(180 83 9 / 0.45);
  border-radius: 999px;
  vertical-align: middle;
}

.activity-block .empty-hint {
  margin: 0.5rem 0 0;
}

.nowrap {
  white-space: nowrap;
}

.code-tight {
  font-size: 0.78rem;
  word-break: break-all;
}

.err-cell {
  max-width: 16rem;
}

.err-msg {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: var(--font-min);
}

.activity-block {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.activity-title {
  margin: 0 0 0.25rem;
  font-size: var(--font-min);
  font-weight: 600;
}

.activity-hint {
  margin: 0 0 0.65rem;
  font-size: var(--font-min);
  opacity: 0.7;
}

.activity-stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: min(52vh, 30rem);
  overflow: auto;
  padding-right: 0.15rem;
}

.activity-card {
  border: 1px solid var(--border);
  border-radius: calc(var(--r) + 2px);
  background: rgb(var(--main-rgb) / 0.02);
  padding: 0.85rem 1rem;
}

.activity-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  margin-bottom: 0.35rem;
}

.activity-card__domain {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: var(--font-min);
  font-weight: 600;
  word-break: break-all;
}

.activity-card__meta {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.activity-card__err {
  margin: 0;
  font-size: var(--font-min);
  line-height: 1.45;
  color: rgb(var(--main-rgb) / 0.75);
}

.activity-card__err--empty {
  opacity: 0.55;
}

.activity-card .layers-details {
  margin-top: 0.5rem;
}

.layers-details summary {
  cursor: pointer;
  font-size: var(--font-min);
  font-weight: 500;
  opacity: 0.8;
}

.layers-pre {
  margin: 0.35rem 0 0;
  padding: 0.5rem;
  font-size: 0.68rem;
  line-height: 1.35;
  overflow-x: auto;
  background: rgb(var(--main-rgb) / 0.04);
  border-radius: var(--r);
  max-height: 12rem;
}

.layers-row td {
  padding-top: 0.15rem;
  border-bottom: 1px solid var(--border);
}

/* —— New job wizard —— */
.job-wizard {
  position: relative;
}

.job-wizard.card-pad {
  padding: clamp(1.35rem, 3vw, 2rem) clamp(1.25rem, 2.8vw, 1.75rem);
}

.job-wizard .panel-intro {
  padding-bottom: 1rem;
  margin-bottom: 0.15rem;
}

.panel-intro-file {
  font-weight: 500;
}

.wizard-stepper {
  margin: 0 0 1rem;
}

.job-wizard .wizard-stepper {
  margin-bottom: 1.35rem;
}

.wizard-stepper__list {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.wizard-stepper__item {
  flex: 1 1 7rem;
  min-width: 0;
}

.wizard-stepper__sep {
  flex: 0 0 1.25rem;
  align-self: center;
  height: 2px;
  background: var(--border);
  opacity: 0.85;
}

.job-wizard .wizard-stepper__sep {
  flex-basis: 1rem;
  height: 1px;
  opacity: 0.5;
}

.wizard-stepper__btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.55rem;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  border: 2px solid var(--border);
  border-radius: var(--r);
  background: var(--surface);
  color: var(--main);
  min-height: 2.75rem;
}

.wizard-stepper__btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.wizard-stepper__item--current .wizard-stepper__btn:not(:disabled) {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--text-on-brand);
}

.wizard-stepper__item--done .wizard-stepper__btn:not(:disabled) {
  border-color: var(--main);
  background: rgb(var(--main-rgb) / 0.06);
}

.wizard-stepper__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  flex-shrink: 0;
  border-radius: var(--r);
  font-size: 0.75rem;
  font-weight: 700;
  background: rgb(var(--main-rgb) / 0.1);
  border: 2px solid rgb(var(--main-rgb) / 0.2);
}

.wizard-stepper__item--current .wizard-stepper__num {
  background: transparent;
  border-color: currentColor;
  color: inherit;
}

.wizard-stepper__label {
  line-height: 1.25;
}

.wizard-panel-title {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  font-weight: 600;
  outline: none;
}

.job-wizard .wizard-panel-title {
  margin-bottom: 1.1rem;
}

.job-wizard-form.stack-loose {
  gap: 1.5rem;
}

.wizard-panel {
  animation: wizardFadeIn 0.2s ease-out;
}

@keyframes wizardFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wizard-panel {
    animation: none;
  }
}

.pick-panel-head--row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
}

.bulk-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.job-wizard .bulk-actions .btn-ghost {
  border-color: var(--border);
}

.job-wizard .bulk-actions .btn-ghost:hover {
  border-color: var(--accent);
}

.btn.btn-sm {
  min-height: 2.25rem;
  padding: 0.32rem 0.65rem;
  font-size: 0.8125rem;
}

.wizard-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-top: 0.35rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}

.job-wizard .wizard-nav {
  margin-top: 1rem;
  padding-top: 1.15rem;
}

.job-wizard .pick-panel--compact {
  padding-top: 0.35rem;
  margin-bottom: 0.35rem;
}

.job-wizard .toggle-row {
  padding: 0.65rem 0;
}

.review-lead {
  margin: 0 0 0.65rem;
  font-size: 0.9rem;
  color: rgb(var(--main-rgb) / 0.72);
}

.job-wizard .review-lead {
  margin-bottom: 0.85rem;
}

.review-summary {
  margin: 0;
  padding: 0.65rem 0.75rem;
  border: 2px solid var(--border);
  border-radius: var(--r);
  background: rgb(var(--main-rgb) / 0.03);
}

.job-wizard .review-summary {
  padding: 0.85rem 1rem;
}

.review-row {
  display: grid;
  grid-template-columns: minmax(7rem, 11rem) 1fr;
  gap: 0.35rem 1rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}

.review-row:last-child {
  border-bottom: none;
}

.review-row dt {
  margin: 0;
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.65;
}

.review-row dd {
  margin: 0;
  word-break: break-word;
}

@media (max-width: 30rem) {
  .review-row {
    grid-template-columns: 1fr;
  }
}

/* —— Job detail: hero + live CSV table —— */
.job-page {
  display: flex;
  flex-direction: column;
  gap: clamp(1.25rem, 3vw, 1.85rem);
}

.job-page-head .job-page-lead {
  max-width: min(48rem, 100%);
}

.job-hero-panel {
  border-width: 2px;
}

.job-hero-panel--horizontal {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.job-hero-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border);
}

.job-hero-topbar__badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.job-hero-note {
  flex: 1 1 10rem;
  margin: 0;
  padding: 0.45rem 0.65rem;
  font-size: var(--font-min);
  line-height: 1.4;
  border-radius: var(--r);
  border: 1px solid rgb(180 83 9 / 0.35);
  background: rgb(254 243 199);
  color: var(--main);
}

/* —— Row: full-width progress —— */
.job-hero-progress-row {
  width: 100%;
  min-width: 0;
}

.job-hero-progress-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem 1rem;
  margin-bottom: 0.5rem;
}

.job-hero-progress-label {
  font-size: var(--font-min);
  font-weight: 600;
  color: rgb(var(--main-rgb) / 0.6);
}

.job-hero-progress-value {
  font-size: var(--font-min);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.job-hero-progress-bar {
  width: 100%;
  max-width: none;
  height: 10px;
  margin: 0;
  border-radius: var(--r);
}

.job-hero-progress-fallback {
  margin: 0;
  font-size: var(--font-min);
}

/* —— Row: detail pills (horizontal, wraps) —— */
.job-hero-pills-row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.45rem 0.55rem;
  width: 100%;
  min-width: 0;
}

.job-pill {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: rgb(var(--main-rgb) / 0.05);
  font-size: var(--font-min);
  line-height: 1.3;
  max-width: 100%;
}

.job-pill__k {
  font-weight: 600;
  color: rgb(var(--main-rgb) / 0.5);
  white-space: nowrap;
}

.job-pill__k::after {
  content: "·";
  margin-left: 0.35rem;
  color: rgb(var(--main-rgb) / 0.25);
  font-weight: 700;
}

.job-pill__v {
  font-weight: 600;
  color: var(--ink);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 24rem) {
  .job-pill {
    flex: 1 1 calc(50% - 0.3rem);
    min-width: 0;
  }

  .job-pill__v {
    white-space: normal;
    word-break: break-word;
  }
}

/* —— Row: controls + downloads (horizontal, wraps) —— */
.job-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding-top: 0.35rem;
  border-top: 1px solid var(--border);
}

.job-hero-actions .job-ctrl-form {
  display: inline-flex;
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
}

.job-hero-actions .job-ctrl-form .btn {
  width: 100%;
  min-width: min(100%, 6.5rem);
}

.job-hero-actions > .btn {
  flex: 1 1 auto;
  min-width: min(100%, 7.5rem);
}

@media (min-width: 40rem) {
  .job-hero-actions .job-ctrl-form {
    flex: 0 1 auto;
  }

  .job-hero-actions .job-ctrl-form .btn {
    width: auto;
    min-width: 6.5rem;
  }

  .job-hero-actions > .btn {
    flex: 0 1 auto;
    min-width: 7rem;
  }
}

.job-ctrl-pause {
  border-color: var(--main);
  color: var(--main);
}

#job-panel.job-panel--control-pending .job-hero-panel {
  opacity: 0.94;
}

.status-badge--stopped {
  background: rgb(254 243 199);
  border-color: rgb(180 83 9 / 0.55);
  color: var(--main);
}

.job-live-section {
  margin-top: 0;
  border-width: 2px;
}

.live-section-heading {
  margin: 0 0 0.5rem;
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.live-section-lead {
  margin: 0 0 1rem;
  font-size: var(--font-min);
  line-height: 1.5;
  max-width: min(44rem, 100%);
}

.live-table-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem 1.25rem;
  margin-bottom: 0.85rem;
}

.live-table-title {
  margin: 0;
  font-size: var(--font-min);
  font-weight: 600;
}

.live-table-hint {
  font-weight: 400;
  font-size: var(--font-min);
  opacity: 0.75;
}

.live-table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.live-table-meta {
  margin: 0 0 0.5rem;
  font-size: var(--font-min);
}

.live-tbl-wrap {
  max-height: min(60vh, 32rem);
  overflow-x: auto;
  overflow-y: auto;
  overscroll-behavior-x: contain;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--surface);
}

.live-tbl {
  table-layout: auto;
  width: max-content;
  min-width: 100%;
  max-width: none;
  font-size: var(--font-min);
}

.live-tbl td.live-tbl-cell:not(:last-child) {
  border-right: 1px solid var(--tbl-col-border);
}

.live-tbl thead th.live-tbl-th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--main);
  color: var(--text-on-brand);
  opacity: 1;
  border-bottom: 2px solid var(--accent);
  white-space: nowrap;
  max-width: 10rem;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0.55rem 0.65rem;
  font-size: var(--font-min);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.3;
  vertical-align: bottom;
}

.live-tbl thead th.live-tbl-th--sticky-keyword {
  position: sticky;
  left: 0;
  top: 0;
  z-index: 4;
  max-width: none;
  min-width: 12rem;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  word-break: break-word;
  box-shadow: 2px 0 8px rgb(var(--main-rgb) / 0.18);
}

.live-tbl td.live-tbl-cell {
  white-space: nowrap;
  max-width: 10rem;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0.55rem 0.65rem;
  font-size: var(--font-min);
  line-height: 1.35;
  vertical-align: middle;
}

.live-tbl td.live-tbl-cell--sticky-keyword {
  position: sticky;
  left: 0;
  z-index: 1;
  max-width: none;
  min-width: 12rem;
  white-space: normal;
  word-break: break-word;
  overflow: visible;
  text-overflow: clip;
  background: var(--surface);
  box-shadow: 2px 0 8px rgb(var(--main-rgb) / 0.08);
}

.live-tbl .live-tbl-col--narrow {
  width: 1%;
  max-width: 4.5rem;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.live-tbl thead th.live-tbl-col--narrow {
  text-align: center;
}

.live-tbl tbody tr:hover td {
  background: rgb(var(--accent-rgb) / 0.08);
}

.live-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.65rem;
}

.live-page-indicator {
  font-size: var(--font-min);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.live-table-empty {
  margin: 0.5rem 0 0;
}
