:root {
  color-scheme: dark;
  --bg: #111315;
  --surface: #181b20;
  --surface-2: #151a20;
  --list-1: #102b28;
  --list-2: #202033;
  --line: #2d333b;
  --ink: #eef2f5;
  --muted: #9aa6b2;
  --teal: #0f766e;
  --teal-dark: #7bd7cf;
  --amber: #f1b867;
  --red: #ff8b82;
  --image-bg: #0d1014;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.42);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
}

button,
input,
select {
  font: inherit;
}

.lists-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto minmax(320px, 1.5fr);
  align-items: end;
  gap: 16px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(17, 19, 21, 0.94);
  backdrop-filter: blur(12px);
}

.eyebrow {
  margin: 0 0 3px;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.12;
}

h1 {
  font-size: 25px;
}

h2 {
  font-size: 22px;
}

h3 {
  font-size: 18px;
}

.page-links {
  display: inline-flex;
  gap: 6px;
  justify-content: center;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.page-links a {
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
}

.page-links a:hover,
.page-links a[aria-current="page"] {
  background: rgba(15, 118, 110, 0.24);
  color: var(--teal-dark);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.toolbar label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.toolbar input,
.toolbar select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
}

.toolbar input {
  width: min(32vw, 330px);
  min-width: 220px;
  padding: 0 12px;
}

.toolbar select {
  min-width: 190px;
  padding: 0 34px 0 10px;
}

.summary {
  display: grid;
  gap: 8px;
  padding: 16px 24px 0;
}

.summary-main {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip,
.mini-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 780;
}

.chip {
  flex-wrap: wrap;
  padding: 4px 11px;
}

.mini-chip {
  padding: 0 9px;
  font-size: 12px;
}

.chip strong,
.mini-chip strong {
  color: var(--ink);
}

.chip em {
  color: inherit;
  font-style: normal;
}

.chip.ok,
.mini-chip.ok {
  border-color: rgba(123, 215, 207, 0.32);
  color: var(--teal-dark);
}

.chip.bad,
.mini-chip.bad {
  border-color: rgba(255, 139, 130, 0.36);
  color: var(--red);
}

.items {
  display: grid;
  gap: 18px;
  overflow-x: auto;
  padding: 18px 24px 32px;
}

.empty-state {
  min-height: 180px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-weight: 850;
}

.list-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(560px, 1fr));
  gap: 16px;
  min-width: 1140px;
}

.list-column {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.list-1 {
  background: var(--list-1);
}

.list-2 {
  background: var(--list-2);
}

.list-column-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid rgba(154, 166, 178, 0.18);
  background: rgba(24, 27, 32, 0.56);
}

.list-column-counts {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.list-trials {
  display: grid;
  gap: 12px;
  padding: 0 12px 12px;
}

.list-item-group {
  display: grid;
  gap: 9px;
  padding: 11px;
  border: 1px solid rgba(154, 166, 178, 0.18);
  border-radius: 8px;
  background: rgba(17, 19, 21, 0.64);
  scroll-margin-top: 150px;
}

.list-item-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.list-item-head div {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.list-item-head span {
  flex: 0 0 auto;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.list-item-head strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-item-head em {
  flex: 0 0 auto;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.list-item-head em.ok {
  color: var(--teal-dark);
}

.list-item-head em.bad {
  color: var(--red);
}

.set-groups {
  display: grid;
  gap: 9px;
}

.set-group {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 9px;
  padding: 9px;
  border: 1px solid rgba(154, 166, 178, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.set-label {
  display: grid;
  place-items: center;
  border: 1px solid rgba(154, 166, 178, 0.18);
  border-radius: 7px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.trial-stack {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.trial-card {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(154, 166, 178, 0.24);
  border-radius: 7px;
  background: #111720;
}

.trial-head {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
}

.trial-head strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.2;
}

.trial-head span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sequence {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
  padding: 6px;
  border: 1px solid rgba(154, 166, 178, 0.22);
  border-radius: 6px;
  background: #0d1014;
}

.seq-step {
  flex: 0 0 clamp(64px, 5vw, 92px);
  display: grid;
  gap: 3px;
  margin: 0;
}

.seq-step img,
.missing-thumb {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--image-bg);
}

.seq-step img {
  display: block;
}

.missing-thumb {
  display: grid;
  place-items: center;
  padding: 6px;
  border: 1px dashed rgba(255, 139, 130, 0.46);
  color: var(--red);
  text-align: center;
}

.missing-thumb strong,
.missing-thumb span {
  display: block;
  font-size: 10px;
  line-height: 1.1;
}

.seq-step figcaption {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.arrow {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  min-width: 16px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 900;
}

@media (max-width: 1100px) {
  .lists-topbar {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .page-links,
  .toolbar {
    justify-content: start;
  }

  .list-board {
    min-width: 1120px;
  }
}

@media (max-width: 680px) {
  .lists-topbar,
  .summary,
  .items {
    padding-left: 12px;
    padding-right: 12px;
  }

  .toolbar input,
  .toolbar select {
    width: calc(100vw - 24px);
  }

  .list-board {
    min-width: 1080px;
  }
}
