* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: #f4f7fb;
  color: #23262d;
  font-family: var(--sans);
}

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

button {
  cursor: pointer;
}

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.icon-sprite {
  display: none;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  min-height: 92px;
  padding: 12px 44px;
  background: #1c3361;
  color: white;
  border-bottom: 4px solid #2bb7c5;
  box-shadow: 0 10px 24px rgba(14, 39, 76, 0.18);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 24px;
  min-width: 0;
  color: white;
  text-decoration: none;
}

.ceirr-lockup {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 13px;
  min-width: 0;
}

.ceirr-logo-mark {
  width: 82px;
  height: 76px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.ceirr-logo-text,
.app-title-lockup {
  display: grid;
  min-width: 0;
}

.ceirr-logo-text {
  align-items: center;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
}

.ceirr-wordmark {
  color: white;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.74rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 0.88;
}

.ceirr-subtitle,
.ceirr-funded {
  color: white;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.ceirr-subtitle {
  font-size: 0.62rem;
  line-height: 1.15;
}

.ceirr-rule {
  display: block;
  width: 100%;
  height: 1px;
  margin: 4px 0;
  background: rgba(255, 255, 255, 0.42);
}

.ceirr-funded {
  font-size: 0.74rem;
  line-height: 1;
}

.app-title-lockup {
  gap: 3px;
  padding-left: 22px;
  border-left: 1px solid rgba(255, 255, 255, 0.36);
  line-height: 1.05;
}

.app-title-lockup strong {
  font-size: 1.34rem;
  font-weight: 850;
}

.app-title-lockup span {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.status-cluster {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
  white-space: nowrap;
}

.status-pill,
.identity-pill,
.connection-pill,
.result-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 12px;
  background: white;
  border: 1px solid #d7dee8;
  border-radius: 999px;
  color: #23262d;
  font-size: 0.9rem;
  font-weight: 800;
}

.identity-pill {
  max-width: min(430px, 45vw);
  padding: 6px 12px;
  color: white;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.28);
}

.identity-pill svg {
  flex: 0 0 auto;
}

.identity-copy {
  display: grid;
  min-width: 0;
  line-height: 1.05;
}

.identity-copy strong,
.identity-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.identity-copy strong {
  font-size: 0.88rem;
}

.identity-copy span {
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.signout-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 12px;
  color: white;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 850;
}

.signout-button:hover,
.signout-button:focus-visible {
  background: rgba(255, 255, 255, 0.12);
}

.status-pill[data-status="healthy"] {
  color: white;
  background: #15985f;
  border-color: #15985f;
}

.status-pill[data-status="error"] {
  color: white;
  background: #c4362e;
  border-color: #c4362e;
}

.status-pill[data-status="pending"] {
  color: #5c3d00;
  background: #fff4d6;
  border-color: #f6c75f;
}

.status-pill .dot {
  background: currentColor;
}

.tool-menu {
  position: sticky;
  top: 92px;
  z-index: 4;
  display: flex;
  gap: 8px;
  align-items: center;
  overflow-x: auto;
  padding: 10px 44px;
  background: #f7fafc;
  border-bottom: 1px solid #d7e4ee;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.menu-tab {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 14px;
  color: #334155;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 850;
}

.menu-tab:hover {
  color: #1f3d68;
  background: white;
  border-color: #a6dbe2;
}

.menu-tab.is-active {
  color: white;
  background: #1f3d68;
  border-color: #1f3d68;
  box-shadow: 0 8px 18px rgba(31, 61, 104, 0.22);
}

.dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  background: #ffb020;
  border-radius: 50%;
}

[data-status="healthy"] .dot,
.status-pass {
  background: #1d8f5a;
}

[data-status="error"] .dot,
.status-fail {
  background: #dc3545;
}

.status-pill[data-status] .dot {
  background: currentColor;
}

.content {
  display: grid;
  gap: 22px;
  padding: 28px 32px 44px;
}

.page-section {
  display: grid;
  gap: 22px;
}

.page-view {
  min-width: 0;
}

.section-card,
.panel {
  min-width: 0;
  background: white;
  border: 1px solid #e1e6ef;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  color: white;
  background: linear-gradient(90deg, #213f6d 0%, #246b8a 72%, #2bb7c5 100%);
}

.section-header h2 {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  font-size: 1.18rem;
}

.section-header p {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-weight: 650;
}

.history-card .section-header {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.history-card .section-header p {
  margin: 0;
}

.panel {
  padding: 18px;
}

.panel .section-header {
  margin: -18px -18px 18px;
}

.export-mode-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 430px);
  gap: 30px;
  align-items: center;
  padding: 28px 26px;
}

.mode-choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  align-items: center;
  margin-bottom: 20px;
}

.mode-choice {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  color: #424852;
  background: transparent;
  border: 0;
  font-size: 1.02rem;
  font-weight: 850;
}

.radio-dot {
  width: 18px;
  height: 18px;
  border: 2px solid #c7ced8;
  border-radius: 50%;
  background: white;
}

.mode-choice.is-selected .radio-dot {
  border: 6px solid #2bb7c5;
}

.uuid-box {
  display: block;
  margin: 0 0 20px;
}

.standard-export-options {
  display: block;
}

.all-types-toggle,
.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #3f4650;
  font-weight: 850;
}

.all-types-toggle {
  margin-bottom: 16px;
  font-size: 1.04rem;
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 10px 28px;
  max-width: 840px;
  padding: 18px 22px;
  border: 1px solid #dfe4ec;
  border-radius: 8px;
}

.template-option {
  display: inline-grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 28px;
  color: #444b55;
  font-weight: 700;
}

.template-option span {
  margin: 0;
  font-size: 0.95rem;
  text-transform: none;
}

.template-option strong {
  font-weight: 700;
}

.export-action-card {
  display: grid;
  justify-items: center;
  gap: 12px;
}

.export-action-card p {
  max-width: 360px;
  margin: 0;
  color: #697380;
  text-align: center;
  font-weight: 650;
}

.policy-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.section-card > :not(.section-header) {
  margin-left: 26px;
  margin-right: 26px;
}

.section-card > .section-header + * {
  margin-top: 22px;
}

.section-card > :last-child {
  margin-bottom: 24px;
}

.policy-grid,
.contract-layout {
  display: grid;
  gap: 24px;
}

.policy-grid {
  grid-template-columns: minmax(0, 1fr) minmax(210px, 290px);
  align-items: start;
}

.contract-layout {
  grid-template-columns: minmax(210px, 280px) minmax(0, 1fr);
}

fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

legend,
label span,
.control-label {
  display: block;
  margin-bottom: 8px;
  color: #4b535e;
  font-size: 0.84rem;
  font-weight: 850;
  text-transform: uppercase;
}

.choice-list {
  display: grid;
  gap: 9px;
  min-height: 42px;
  padding: 12px;
  background: #fbfcff;
  border: 1px solid #dfe4ec;
  border-radius: 8px;
}

.status-list {
  max-height: 170px;
  overflow: auto;
}

.contract-list {
  grid-template-columns: 1fr;
}

.choice-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 24px;
  color: #424852;
  font-weight: 700;
}

.choice-option span,
.inline-check span,
.all-types-toggle span {
  display: inline;
  margin-bottom: 0;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  text-transform: none;
}

.choice-option input,
.inline-check input,
.all-types-toggle input,
.template-option input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #2a7f92;
}

input[type="date"],
input[type="search"],
input[type="text"],
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  background: white;
  border: 1px solid #cfd7e3;
  border-radius: 8px;
  color: #23262d;
}

.study-search-panel {
  display: grid;
  gap: 14px;
  margin: 0 0 20px;
  padding: 18px 20px;
  background: white;
  border: 1px solid #dfe4ec;
  border-radius: 8px;
}

.study-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  gap: 12px;
  align-items: end;
}

.study-search-field {
  min-width: 0;
}

.study-search-heading,
.study-search-controls,
.study-selection-summary,
.study-main,
.study-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.study-search-heading,
.study-main {
  justify-content: space-between;
}

.study-search-heading h3 {
  margin: 0;
  color: #23262d;
  font-size: 1.02rem;
}

.study-search-controls {
  align-items: end;
}

.study-search-controls label {
  flex: 1 1 360px;
}

.study-search-controls button {
  flex: 0 0 auto;
}

.compact-button {
  min-height: 36px;
  padding: 7px 11px;
  font-size: 0.9rem;
}

.study-selection-summary {
  justify-content: flex-start;
  min-height: 34px;
  padding: 8px 10px;
  color: #607080;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-weight: 700;
}

.study-selection-summary strong {
  color: #1f3d68;
}

.study-selection-summary span,
.study-bulk-bar span {
  margin: 0;
  text-transform: none;
}

.study-table-wrap {
  overflow: auto;
  border: 1px solid #dfe4ec;
  border-radius: 8px;
}

.study-table {
  width: 100%;
  min-width: 1040px;
  border-collapse: collapse;
  background: white;
}

.study-table th,
.study-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #edf0f4;
  text-align: left;
  vertical-align: top;
}

.study-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #4b535e;
  background: #f6f8fb;
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.study-table td {
  color: #3f4650;
  font-weight: 650;
}

.study-table td strong {
  display: block;
  color: #23262d;
  font-size: 1rem;
}

.study-table td small {
  display: block;
  margin-top: 4px;
  color: #697380;
  font-weight: 650;
}

.study-table-row.is-selected td {
  background: #f1fbfd;
}

.select-column {
  width: 78px;
}

.actions-column {
  width: 230px;
}

.select-column input,
.study-template-option input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: #2a7f92;
}

.study-actions-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.study-template-row td {
  padding-top: 0;
  background: #fbfcff;
}

.study-bulk-bar {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  min-height: 66px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #dfe4ec;
  border-radius: 8px;
  box-shadow: 0 -10px 24px rgba(15, 23, 42, 0.08);
}

.study-bulk-bar > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  color: #697380;
  font-weight: 800;
}

.study-bulk-bar strong {
  color: #23262d;
}

.study-list {
  display: grid;
  gap: 10px;
}

.study-row {
  display: grid;
  gap: 12px;
  padding: 14px;
  background: white;
  border: 1px solid #dfe4ec;
  border-radius: 8px;
}

.study-row.is-selected {
  border-color: #75cbd5;
  box-shadow: inset 4px 0 0 #2bb7c5;
}

.study-select {
  display: inline-flex;
  gap: 10px;
  align-items: flex-start;
  min-width: min(420px, 100%);
}

.study-template-option input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: #2a7f92;
}

.study-select span,
.study-template-option span {
  display: grid;
  gap: 3px;
  margin-bottom: 0;
  text-transform: none;
}

.study-select strong {
  color: #23262d;
  font-size: 1rem;
}

.study-select small,
.study-template-option small {
  color: #68727f;
  font-weight: 650;
}

.study-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: #68727f;
  font-weight: 650;
}

.study-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.study-template-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 10px;
  padding: 12px;
  background: #fbfcff;
  border: 1px solid #edf0f4;
  border-radius: 8px;
}

.study-template-option {
  display: inline-flex;
  gap: 9px;
  align-items: flex-start;
}

.study-template-option strong {
  color: #3f4650;
}

.queue-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #607080;
  background: #f2f4f7;
  font-size: 0.84rem;
  font-weight: 850;
}

.queue-chip.is-running,
.update-chip.is-running {
  color: #614800;
  background: #ffe8a3;
}

.queue-chip.is-complete,
.update-chip.is-complete {
  color: white;
  background: #15985f;
}

.queue-chip.is-failed,
.update-chip.is-failed {
  color: white;
  background: #c0392b;
}

textarea {
  resize: vertical;
}

.option-line {
  margin-top: 20px;
}

.field-hint {
  display: block;
  margin-top: 8px;
  color: #697380;
  font-size: 0.86rem;
  font-weight: 650;
  line-height: 1.35;
}

.field-hint.indented {
  margin-left: 28px;
}

.date-filter-row {
  display: grid;
  grid-template-columns: max-content minmax(180px, 260px);
  gap: 12px;
  align-items: center;
  margin-top: 26px;
}

.contract-copy {
  color: #67717e;
  font-size: 0.9rem;
  line-height: 1.5;
}

.contract-copy strong {
  display: block;
  margin-bottom: 4px;
  color: #4b535e;
}

.contract-copy ul {
  margin: 0;
  padding-left: 18px;
}

.hidden {
  display: none !important;
}

.action-row {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.primary,
.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 850;
}

.primary {
  color: white;
  background: #15985f;
  border: 1px solid #10784b;
}

.big-action {
  min-height: 60px;
  padding: 14px 24px;
  background: linear-gradient(90deg, #213f6d 0%, #246b8a 55%, #2bb7c5 100%);
  border: 0;
  font-size: 1.14rem;
}

.secondary {
  color: #1f3d68;
  background: white;
  border: 1px solid #1f3d68;
}

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

button.is-busy {
  cursor: progress;
  opacity: 0.82;
}

button.is-busy svg {
  display: none;
}

button.is-busy::before {
  content: "";
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

.operation-banner,
.environment-notice {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-height: 52px;
  padding: 12px 16px;
  background: white;
  border: 1px solid #dfe4ec;
  border-left: 6px solid #2bb7c5;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.environment-notice {
  display: flex;
  justify-content: space-between;
}

.operation-copy,
.environment-notice {
  min-width: 0;
}

.operation-copy {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 14px;
  align-items: center;
}

.operation-copy span {
  min-width: min(100%, 340px);
  overflow-wrap: anywhere;
}

.operation-banner span,
.environment-notice span {
  color: #697380;
}

.operation-progress {
  display: none;
  height: 4px;
  overflow: hidden;
  background: #dce8ef;
  border-radius: 999px;
}

.operation-progress span {
  display: block;
  width: 42%;
  height: 100%;
  background: #2bb7c5;
  border-radius: inherit;
  animation: progress-slide 1.1s ease-in-out infinite;
}

.operation-banner.is-running .operation-progress {
  display: block;
}

.operation-banner.is-success {
  border-left-color: #15985f;
}

.operation-banner.is-error,
.environment-notice {
  border-left-color: #c0392b;
}

.operation-banner.is-info {
  border-left-color: #2bb7c5;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.preview-grid article {
  min-height: 74px;
  padding: 13px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.preview-grid span {
  display: block;
  color: #697380;
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.preview-grid strong {
  display: block;
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 1.36rem;
}

.confirmation-strip,
.side-effect-preview,
.detail-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.confirmation-strip {
  align-items: center;
  margin-top: 16px;
  color: #697380;
  font-weight: 700;
}

.confirmation-strip span,
.confirmation-strip div span,
.side-effect-preview article {
  padding: 6px 9px;
  background: #effbfd;
  border: 1px solid #bfeaf0;
  border-radius: 999px;
  color: #1f3d68;
}

.side-effect-preview {
  margin-top: 14px;
}

.side-effect-preview article {
  display: grid;
  border-radius: 8px;
}

.side-effect-preview span,
.side-effect-preview small {
  color: #4d5b6b;
}

.warning-list,
.artifact-list,
.exclusion-list,
.uuid-resolution-list,
.run-list,
.accession-preview {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.empty-list {
  color: #697380;
}

.review-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.review-grid h3 {
  margin: 0 0 10px;
}

.artifact-row,
.exclusion-row,
.uuid-row,
.quiet-row {
  display: grid;
  gap: 6px;
  padding: 11px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.run-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 16px 18px;
  background: white;
  border: 1px solid #edf0f4;
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.run-row header {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: center;
  margin-bottom: 7px;
}

.run-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: #23262d;
}

.download-chip,
.date-chip,
.update-chip,
.records-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  font-weight: 800;
}

.download-chip {
  color: white;
  background: #15985f;
}

.date-chip,
.records-chip {
  color: #67717e;
  background: #f2f4f7;
  font-style: italic;
}

.update-chip {
  color: white;
  background: #2bb7c5;
}

.records-chip {
  margin-top: 7px;
  border-left: 4px solid #7d8996;
  border-radius: 4px;
}

.history-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.run-download {
  min-width: 140px;
}

.history-details {
  display: grid;
  grid-template-columns: minmax(160px, 0.35fr) minmax(220px, 1fr) minmax(140px, 0.25fr);
  gap: 12px;
  margin-top: 14px;
  padding: 13px;
  background: #f8f9fa;
  border-radius: 8px;
}

.history-details strong {
  display: block;
  margin-bottom: 5px;
  color: #495057;
  font-size: 0.82rem;
}

.history-details code,
.history-details span {
  color: #23262d;
  overflow-wrap: anywhere;
}

.accession-workbench > :not(.section-header),
.admin-grid > :not(.section-header) {
  margin-left: 26px;
  margin-right: 26px;
}

.accession-purpose {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 16px;
  align-items: center;
  padding: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.accession-purpose strong,
.accession-purpose span {
  display: block;
}

.accession-purpose span {
  margin-top: 4px;
  color: #697380;
  font-weight: 650;
}

.step-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.step-strip span {
  padding: 6px 8px;
  background: white;
  border: 1px solid #dfe4ec;
  border-radius: 999px;
  color: #424852;
  font-size: 0.75rem;
  font-weight: 850;
  text-transform: uppercase;
}

.accession-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.35fr) minmax(0, 1fr);
  gap: 14px;
}

.accession-counts {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.accession-row-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.accession-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.accession-row span {
  color: #697380;
  overflow-wrap: anywhere;
}

.admin-grid article {
  display: grid;
  gap: 12px;
  padding: 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.admin-note {
  margin: 0;
  color: #697380;
  font-weight: 650;
}

.role-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, max-content));
  gap: 10px;
}

.role-list span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 10px;
  background: white;
  border: 1px solid #dfe4ec;
  border-radius: 6px;
  color: #23262d;
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.58);
}

.modal {
  width: min(560px, 100%);
  padding: 22px;
  background: white;
  border: 1px solid #dfe4ec;
  border-radius: 12px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.34);
}

.modal .eyebrow {
  margin: 0 0 6px;
  color: #697380;
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.modal h2 {
  margin: 0;
}

.modal p {
  color: #697380;
}

.modal ul {
  display: grid;
  gap: 8px;
  margin: 16px 0;
  padding-left: 20px;
}

.confirm-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-weight: 700;
}

.confirm-prod {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 12px;
  background: #fff4f2;
  border: 1px solid #e6a29a;
  border-radius: 8px;
}

.confirm-prod span {
  margin: 0;
  color: #9c2318;
}

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

@keyframes progress-slide {
  0% {
    transform: translateX(-115%);
  }
  100% {
    transform: translateX(245%);
  }
}

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

  .tool-menu {
    top: 0;
  }

  .status-cluster {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .identity-pill {
    max-width: min(520px, 100%);
  }

  .export-mode-layout,
  .policy-layout,
  .policy-grid,
  .contract-layout,
  .review-grid,
  .history-details {
    grid-template-columns: 1fr;
  }

  .export-action-card {
    justify-items: start;
  }

  .export-action-card p {
    text-align: left;
  }
}

@media (max-width: 720px) {
  .topbar {
    padding: 12px 16px;
  }

  .brand {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .ceirr-lockup {
    gap: 10px;
  }

  .ceirr-logo-mark {
    width: 58px;
    height: 54px;
  }

  .ceirr-wordmark {
    font-size: 2.04rem;
    letter-spacing: 0.13em;
  }

  .ceirr-subtitle {
    font-size: 0.48rem;
  }

  .ceirr-funded {
    font-size: 0.6rem;
  }

  .app-title-lockup {
    width: 100%;
    padding-top: 9px;
    padding-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.28);
    border-left: 0;
  }

  .tool-menu {
    gap: 6px;
    padding: 10px 14px;
  }

  .status-cluster {
    width: 100%;
  }

  .identity-pill {
    flex: 1 1 220px;
  }

  .menu-tab {
    gap: 7px;
    padding: 8px 9px;
    font-size: 0.95rem;
  }

  .content {
    padding: 18px 16px 32px;
  }

  .template-grid,
  .preview-grid,
  .accession-grid,
  .accession-counts,
  .accession-row,
  .study-template-list,
  .role-list,
  .date-filter-row,
  .run-row {
    grid-template-columns: 1fr;
  }

  .section-card > :not(.section-header),
  .accession-workbench > :not(.section-header),
  .admin-grid > :not(.section-header) {
    margin-left: 16px;
    margin-right: 16px;
  }

  .accession-purpose {
    grid-template-columns: 1fr;
  }

  .step-strip,
  .study-search-heading,
  .study-search-controls,
  .study-main,
  .action-row,
  .history-actions {
    align-items: stretch;
    flex-direction: column;
    justify-content: flex-start;
  }

  .study-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 420px) {
  .ceirr-logo-mark {
    width: 50px;
    height: 48px;
  }

  .ceirr-wordmark {
    font-size: 1.78rem;
  }

  .ceirr-subtitle {
    font-size: 0.42rem;
  }

  .ceirr-funded {
    font-size: 0.54rem;
  }
}
