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

:root {
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Plus Jakarta Sans", var(--font-sans);
  /* Theme: light rose & pink (names kept for compatibility) */
  --blue-header: #9f1239;
  --blue-heading: #9f1239;
  --blue-accent: #e11d48;
  --blue-accent-mid: #f43f5e;
  --blue-accent-hover: #be123c;
  --blue-glow: rgb(225 29 72 / 0.38);
  --page-bg: #fff5f5;
  --page-bg-mesh:
    radial-gradient(1100px 580px at 5% -8%, rgb(254 205 211 / 0.9), transparent 52%),
    radial-gradient(900px 480px at 100% 5%, rgb(251 207 232 / 0.65), transparent 48%),
    radial-gradient(800px 400px at 50% 100%, rgb(255 228 230 / 0.5), transparent 45%);
  --surface: #ffffff;
  --surface-elevated: #ffffff;
  /* High-contrast text on rose surfaces (previous muted tones were hard to read) */
  --text-primary: #161012;
  --text-secondary: #2f1a22;
  --text-muted: #453038;
  --text-subtle: #5a434d;
  --border-soft: #fecdd3;
  --border-strong: #fda4af;
  --card-radius: 16px;
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-xs: 0 1px 2px rgb(136 19 55 / 0.06);
  --shadow-sm: 0 2px 4px rgb(136 19 55 / 0.05), 0 4px 12px rgb(190 24 93 / 0.08);
  --shadow-md: 0 4px 6px rgb(136 19 55 / 0.06), 0 12px 32px rgb(190 24 93 / 0.11);
  --shadow-lg: 0 8px 16px rgb(136 19 55 / 0.08), 0 24px 48px rgb(190 24 93 / 0.14);
  --ease-out: cubic-bezier(0.33, 1, 0.48, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--page-bg);
  background-image: var(--page-bg-mesh);
  background-attachment: fixed;
  font-feature-settings: "cv02", "cv03", "cv04", "ss01";
  -webkit-font-smoothing: antialiased;
}

.layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ——— Header (punchy hero: bright photo + rose/pink lift + bottom scrim) ——— */
.site-header {
  position: relative;
  color: #fff;
  text-align: center;
  padding: 2.25rem 1.25rem 2.85rem;
  min-height: 12.5rem;
  overflow: hidden;
  background-color: #3f0d12;
  background-image:
    linear-gradient(180deg, rgb(255 255 255 / 0.42) 0%, rgb(255 255 255 / 0) 34%),
    linear-gradient(
      180deg,
      rgb(251 113 133 / 0.42) 0%,
      rgb(244 63 94 / 0.18) 36%,
      transparent 54%
    ),
    linear-gradient(
      to top,
      rgb(62 12 22 / 0.82) 0%,
      rgb(91 24 38 / 0.4) 28%,
      transparent 56%
    ),
    url("images/header-hero.png");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  image-rendering: auto;
}

.site-header__inner {
  position: relative;
  z-index: 1;
  max-width: 56rem;
  margin: 0 auto;
}

.site-header__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.03em;
  text-shadow:
    0 1px 3px rgb(0 0 0 / 0.55),
    0 2px 16px rgb(0 0 0 / 0.4);
}

.site-header__title-link {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  color: inherit;
  text-decoration: none;
  transition: opacity 0.2s var(--ease-out);
}

@media (min-width: 520px) {
  .site-header__title-link {
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    text-align: left;
  }
}

.site-header__logo {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 22%;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow:
    0 2px 4px rgb(0 0 0 / 0.2),
    0 8px 24px rgb(0 0 0 / 0.28),
    0 0 0 1px rgb(255 255 255 / 0.15) inset;
}

@media (min-width: 520px) {
  .site-header__logo {
    width: 4rem;
    height: 4rem;
  }
}

.site-header__title-text {
  display: block;
  max-width: min(42rem, 100%);
}

.site-header__title-link:hover {
  opacity: 0.92;
}

.site-header__title-link:hover .site-header__logo {
  box-shadow:
    0 2px 6px rgb(0 0 0 / 0.25),
    0 10px 28px rgb(0 0 0 / 0.32),
    0 0 0 1px rgb(255 255 255 / 0.2) inset;
}

.site-header__badge {
  display: inline-block;
  margin: 1.1rem 0 0;
  padding: 0.5rem 1.2rem;
  max-width: 100%;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.45;
  color: rgb(255 255 255 / 0.98);
  border: 1px solid rgb(255 255 255 / 0.35);
  border-radius: 999px;
  background: rgb(88 28 45 / 0.58);
  box-shadow: 0 1px 0 rgb(255 255 255 / 0.12) inset;
}

/* ——— Main (no negative margin — avoids flash banners sitting in the header gap) ——— */
.site-main {
  flex: 1;
  width: 100%;
  max-width: 54rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

.flash-stack {
  margin: 0 0 1.25rem;
}

.flash {
  margin: 0 0 0.5rem;
  padding: 0.75rem 1rem 0.75rem 1rem;
  padding-left: 1rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid transparent;
  box-shadow: var(--shadow-xs);
}

.flash--success {
  background: linear-gradient(90deg, #ecfdf5 0%, #f0fdf4 100%);
  color: #047857;
  border-color: #a7f3d0;
  border-left: 4px solid #10b981;
}

.flash--warning {
  background: linear-gradient(90deg, #fffbeb 0%, #fff7ed 100%);
  color: #b45309;
  border-color: #fde68a;
  border-left: 4px solid #f59e0b;
}

.app-card {
  position: relative;
  background: var(--surface-elevated);
  border-radius: var(--card-radius);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-md);
  padding: 2rem 1.75rem 2.25rem;
  overflow: hidden;
}

/* Single top accent flush with card edge (no gap vs header) */
.app-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #fb7185, #f472b6, #fda4af);
  opacity: 0.95;
}

.app-section + .stepper {
  margin-top: 2rem;
}

.stepper + .app-section {
  margin-top: 2rem;
}

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

/* ——— Pre-analysis (PCR cycle X) ——— */
.app-section--preanalysis {
  padding: 1.25rem 1.35rem;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: linear-gradient(180deg, #fff1f2 0%, #fff 100%);
}

.preanalysis__help {
  margin: 0.5rem 0 1.15rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.55;
  max-width: 42rem;
}

.preanalysis-form__grid {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1rem 1.25rem;
}

.preanalysis-form__field {
  flex: 1 1 12rem;
  min-width: 0;
}

.preanalysis-form__label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.preanalysis-form__input {
  display: block;
  width: 100%;
  max-width: 11rem;
  padding: 0.55rem 0.75rem;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: #fff;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.preanalysis-form__input:hover {
  border-color: #fda4af;
}

.preanalysis-form__input:focus {
  outline: none;
  border-color: var(--blue-accent);
  box-shadow: 0 0 0 3px rgb(225 29 72 / 0.18);
}

.preanalysis-form__hint {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: var(--text-subtle);
}

.preanalysis-form__actions {
  flex: 0 0 auto;
  padding-bottom: 0.15rem;
}

.preanalysis-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1px solid #fda4af;
  background: rgb(255 241 242 / 0.92);
}

.preanalysis-summary__text {
  margin: 0;
  font-size: 0.9rem;
  color: #9f1239;
  font-weight: 500;
}

.preanalysis-summary__value {
  display: inline-block;
  margin-left: 0.25rem;
  padding: 0.15rem 0.55rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--blue-heading);
  background: #fff;
  border-radius: 6px;
  border: 1px solid #fda4af;
}

.upload-gate-hint {
  margin: 0 0 0.85rem;
  padding: 0.65rem 0.85rem;
  font-size: 0.8125rem;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  max-width: 42rem;
}

.signal2-next-hint {
  margin: 0 0 0.85rem;
  padding: 0.65rem 0.85rem;
  font-size: 0.8125rem;
  color: #065f46;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 8px;
  max-width: 42rem;
}

/* ——— Workflow stages: Signal 1 ↔ Signal 2 (horizontal slide) ——— */
.workflow-stages {
  margin-top: 1.5rem;
}

.workflow-stages__viewport {
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--border-soft);
  background: #fff5f5;
  min-height: min(72vh, 44rem);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.9);
}

.workflow-stages__track {
  display: flex;
  width: 200%;
  min-height: 100%;
  transform: translate3d(0, 0, 0);
  transition: transform 0.58s cubic-bezier(0.33, 1, 0.48, 1);
  will-change: transform;
}

.workflow-stages[data-step="2"] .workflow-stages__track {
  transform: translate3d(-50%, 0, 0);
}

.workflow-stages[data-step="1"] .workflow-stage--2,
.workflow-stages[data-step="2"] .workflow-stage--1 {
  pointer-events: none;
  user-select: none;
}

@media (prefers-reduced-motion: reduce) {
  .workflow-stages__track {
    transition: none;
  }

  .export-tile:hover,
  .btn--primary:hover,
  .btn--analyze:hover,
  .cite-trigger:hover {
    transform: none;
  }
}

.workflow-stage {
  flex: 0 0 50%;
  width: 50%;
  padding: 1.5rem 1.35rem 2rem;
  box-sizing: border-box;
  min-width: 0;
  background: #fff;
}

.workflow-stage--1 .app-section--preanalysis {
  margin-bottom: 1.5rem;
}

.workflow-stage--2 .app-section--signal2 {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

/* Signal 1 review block inside Signal 2 stage */
.signal2-s1-review {
  margin: 0 0 1.35rem;
  padding: 1.1rem 1.2rem 1.25rem;
  border-radius: 10px;
  border: 1px solid #a7f3d0;
  background: linear-gradient(180deg, #ecfdf5 0%, #fff 42%);
}

.signal2-s1-review__header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid #d1fae5;
}

.signal2-s1-review__icon {
  flex-shrink: 0;
  display: flex;
  color: #059669;
}

.signal2-s1-review__lead {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.55;
  color: #065f46;
}

.signal2-s1-review__note {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: #4b5563;
}

.review-table-wrap--wide {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: #fff;
}

.review-table-wrap--wide .preview-table {
  min-width: 36rem;
  margin: 0;
}

.upload-fieldset {
  margin: 0;
  padding: 0;
  border: none;
  min-width: 0;
}

.upload-fieldset:disabled .entry-panel,
.upload-fieldset[disabled] .entry-panel {
  opacity: 0.48;
  pointer-events: none;
  filter: grayscale(0.08);
}

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

.btn--md {
  min-height: 2.625rem;
  padding: 0.55rem 1.15rem;
}

.btn--compact {
  padding: 0.45rem 0.85rem;
  font-size: 0.8125rem;
}

.app-heading {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.app-heading--section {
  font-size: 1.1875rem;
  color: var(--blue-heading);
}

.app-heading--entry {
  font-size: 1.0625rem;
  color: var(--text-primary);
  font-weight: 700;
}

.app-description {
  margin: 0.85rem 0 1.25rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.65;
}

/* ——— Intro: description (home) ——— */
.app-section--intro .app-heading--section {
  margin-bottom: 1.15rem;
}

.app-intro {
  display: block;
}

.app-intro__body {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.app-intro__body .app-description {
  margin: 0;
}

/* ——— How to cite ——— */
.cite-block {
  margin: 0;
}

.cite-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  padding: 0.5rem 1rem;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
  transition:
    border-color 0.18s var(--ease-out),
    box-shadow 0.18s var(--ease-out),
    transform 0.18s var(--ease-out);
}

.cite-trigger:hover {
  border-color: #fb7185;
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.cite-trigger:focus-visible {
  outline: 2px solid var(--blue-accent);
  outline-offset: 2px;
}

.cite-trigger__icon {
  display: flex;
  color: var(--text-muted);
}

.cite-dialog {
  padding: 0;
  border: none;
  background: transparent;
  max-width: calc(100vw - 2rem);
}

.cite-dialog::backdrop {
  background: rgb(15 23 42 / 0.45);
}

.cite-dialog__card {
  width: min(28rem, calc(100vw - 2rem));
  padding: 1.35rem 1.35rem 1.15rem;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgb(0 0 0 / 0.2);
  border: 1px solid #e5e7eb;
}

.cite-dialog__title {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--blue-heading);
}

.cite-dialog__text {
  margin: 0 0 1.25rem;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.cite-dialog__text--compact {
  margin: 0 0 0.85rem;
  font-size: 0.85rem;
}

.cite-dialog--review {
  max-width: min(44rem, calc(100vw - 1.5rem));
}

.cite-dialog__card--review {
  max-height: min(88vh, 40rem);
  overflow-y: auto;
}

.review-block__title {
  margin: 1rem 0 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.review-block__title:first-of-type {
  margin-top: 0.35rem;
}

.preview-table--compact {
  font-size: 0.78rem;
}

.preview-table--compact th,
.preview-table--compact td {
  padding: 0.4rem 0.5rem;
}

.qc-pill {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.75rem;
}

.qc-pill--yes {
  background: #d1fae5;
  color: #065f46;
}

.qc-pill--no {
  background: #fee2e2;
  color: #991b1b;
}

.cite-dialog__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

/* ——— App confirm dialog (replaces window.confirm) ——— */
.confirm-dialog {
  padding: 0;
  border: none;
  background: transparent;
  max-width: calc(100vw - 1.5rem);
}

.confirm-dialog::backdrop {
  background: rgb(15 23 42 / 0.55);
  backdrop-filter: blur(4px);
}

.confirm-dialog__card {
  width: min(26rem, calc(100vw - 1.5rem));
  padding: 0;
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  box-shadow:
    0 0 0 1px rgb(255 255 255 / 0.08) inset,
    0 24px 48px rgb(15 23 42 / 0.18),
    0 8px 16px rgb(15 23 42 / 0.08);
  overflow: hidden;
}

.confirm-dialog__hero {
  display: flex;
  justify-content: center;
  padding: 1.25rem 1.25rem 0;
}

.confirm-dialog__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  color: #dc2626;
  background: linear-gradient(145deg, #fef2f2, #fee2e2);
  border: 1px solid #fecaca;
}

.confirm-dialog--danger .confirm-dialog__title {
  padding-top: 0.35rem;
}

.confirm-dialog__title {
  margin: 0;
  padding: 1rem 1.5rem 0.5rem;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--blue-heading);
  text-align: center;
}

.confirm-dialog__body {
  margin: 0;
  padding: 0 1.5rem 1.35rem;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-muted);
  text-align: center;
}

.confirm-dialog__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: stretch;
  gap: 0.65rem;
  padding: 1rem 1.25rem 1.25rem;
  background: linear-gradient(180deg, #fff5f5 0%, #fff1f2 100%);
  border-top: 1px solid var(--border-soft);
}

.confirm-dialog__actions .btn {
  flex: 1 1 auto;
  min-height: 2.75rem;
}

@media (min-width: 420px) {
  .confirm-dialog__actions {
    flex-wrap: nowrap;
    justify-content: flex-end;
  }

  .confirm-dialog__actions .btn {
    flex: 0 1 auto;
    min-width: 7rem;
  }
}

.btn--destructive {
  color: #fff;
  background: linear-gradient(180deg, #f87171 0%, #dc2626 100%);
  border-color: rgb(255 255 255 / 0.15);
  box-shadow:
    var(--shadow-xs),
    0 4px 14px rgb(220 38 38 / 0.35);
}

.btn--destructive:hover {
  background: linear-gradient(180deg, #fb7185 0%, #b91c1c 100%);
  box-shadow:
    var(--shadow-sm),
    0 8px 20px rgb(220 38 38 / 0.38);
  transform: translateY(-1px);
}

.btn--destructive:active {
  transform: translateY(0);
}

.btn--destructive:focus-visible {
  outline: 2px solid #dc2626;
  outline-offset: 3px;
}

/* ——— Stepper (timeline) ——— */
.stepper {
  margin: 0;
  padding: 1.25rem 0 1.5rem;
  border-bottom: 1px solid var(--border-soft);
  background: linear-gradient(180deg, rgb(255 241 242 / 0.95) 0%, transparent 100%);
  border-radius: var(--radius-lg);
  padding-left: 0.35rem;
  padding-right: 0.35rem;
}

.stepper__list {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.stepper__item {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
}

.stepper__item:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 1.1rem;
  left: calc(50% + 1.35rem);
  width: calc(100% - 2.7rem);
  height: 2px;
  background: linear-gradient(90deg, #fecdd3, #fda4af);
  border-radius: 1px;
  z-index: 0;
  pointer-events: none;
}

.stepper__link,
.stepper__locked {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
  padding: 0.2rem 0.15rem;
}

.stepper__dot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.125rem;
  height: 2.125rem;
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-muted);
  background: #fff;
  border: 2px solid var(--border-soft);
  box-shadow: var(--shadow-xs);
  transition:
    border-color 0.2s var(--ease-out),
    color 0.2s var(--ease-out),
    transform 0.2s var(--ease-spring),
    box-shadow 0.2s var(--ease-out);
}

.stepper__name {
  display: block;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  line-height: 1.25;
  max-width: 6.5rem;
  margin: 0 auto;
}

.stepper__link:hover .stepper__dot {
  border-color: #fda4af;
  color: var(--blue-accent);
  transform: scale(1.06);
  box-shadow: 0 4px 12px rgb(225 29 72 / 0.18);
}

.stepper__link:hover .stepper__name {
  color: var(--blue-accent-hover);
}

.stepper__link:focus-visible {
  outline: none;
}

.stepper__link:focus-visible .stepper__dot {
  box-shadow: 0 0 0 3px rgb(225 29 72 / 0.35);
}

.stepper__item--active .stepper__dot {
  color: #fff;
  background: linear-gradient(145deg, var(--blue-accent-mid), var(--blue-accent));
  border-color: transparent;
  box-shadow:
    0 2px 6px rgb(225 29 72 / 0.35),
    0 0 0 1px rgb(255 255 255 / 0.2) inset;
}

.stepper__item--active .stepper__name {
  color: var(--blue-heading);
  font-weight: 700;
}

.stepper__locked {
  cursor: not-allowed;
  user-select: none;
}

.stepper__locked .stepper__dot {
  color: #fecdd3;
  background: #fff5f5;
  border-color: #ffe4e6;
  box-shadow: none;
}

.stepper__locked .stepper__name {
  color: #fecdd3;
}

#step-signal1,
#step-signal2 {
  scroll-margin-top: 1rem;
}

@media (max-width: 520px) {
  .stepper__name {
    font-size: 0.5625rem;
    letter-spacing: 0.04em;
    max-width: 4.5rem;
  }

  .stepper__dot {
    width: 1.85rem;
    height: 1.85rem;
    font-size: 0.75rem;
  }

  .stepper__item:not(:last-child)::after {
    top: 0.95rem;
    left: calc(50% + 1.1rem);
    width: calc(100% - 2.2rem);
  }
}

/* ——— Upload ——— */
.app-section--entry {
  padding-top: 0.25rem;
}

.upload-form {
  margin: 0;
}

.entry-panel {
  margin-top: 1rem;
  padding: 1.5rem 1.5rem 1.65rem;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  background: linear-gradient(165deg, #ffffff 0%, #fff5f5 52%, #ffe4e6 100%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.9);
}

.upload-zone {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
}

.upload-zone__lead {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 42rem;
}

.upload-zone__lead strong {
  color: #7f1d1d;
  font-weight: 600;
}

/* ——— File drop (custom upload) ——— */
.file-drop {
  position: relative;
}

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

.file-drop__input:focus-visible + .file-drop__surface {
  outline: none;
  border-color: var(--blue-accent);
  box-shadow: 0 0 0 3px rgb(225 29 72 / 0.2);
}

.file-drop__surface {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  min-height: 11.5rem;
  padding: 1.75rem 1.5rem;
  text-align: center;
  cursor: pointer;
  border: 2px dashed #fda4af;
  border-radius: 12px;
  background: rgb(255 255 255 / 0.88);
  backdrop-filter: blur(4px);
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    box-shadow 0.2s ease;
}

.file-drop__surface:hover {
  border-color: #fb7185;
  background: #fff;
  box-shadow: 0 4px 14px rgb(190 24 93 / 0.1);
}

.file-drop--dropping .file-drop__surface {
  border-color: var(--blue-accent);
  border-style: solid;
  background: rgb(255 241 242 / 0.98);
  box-shadow: 0 0 0 3px rgb(225 29 72 / 0.2);
}

.file-drop__icon {
  display: flex;
  color: var(--blue-accent);
  opacity: 0.9;
}

.file-drop__text {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-width: 22rem;
}

.file-drop__title {
  font-size: 0.975rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.45;
}

.file-drop__browse {
  color: var(--blue-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.file-drop__surface:hover .file-drop__browse {
  color: var(--blue-accent-hover);
}

.file-drop__hint {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.file-drop__status {
  margin: 0.75rem 0 0;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--blue-heading);
}

.file-drop__status[hidden] {
  display: none;
}

.upload-actions {
  margin-top: 1.5rem;
  margin-bottom: 1.35rem;
}

.upload-actions__bar {
  height: 1px;
  margin-bottom: 1.1rem;
  background: linear-gradient(
    90deg,
    transparent 0%,
    #fecdd3 12%,
    #fecdd3 88%,
    transparent 100%
  );
}

.upload-actions__row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.requirements-card {
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 1.35rem 1.5rem 1.5rem;
}

.requirements-card__title {
  margin: 0 0 1.1rem;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--blue-heading);
  line-height: 1.35;
}

.req-table-wrap {
  overflow-x: auto;
  margin: 0 0 1.35rem;
}

.req-table {
  width: 100%;
  min-width: 16rem;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin: 0;
}

.req-table th {
  text-align: left;
  font-weight: 700;
  color: var(--text-primary);
  padding: 0.7rem 0.65rem;
  border-bottom: 1px solid #ffe4e6;
}

.req-table td {
  padding: 0.7rem 0.65rem;
  color: var(--text-secondary);
  border-bottom: none;
}

.requirements-list {
  margin: 0;
  padding-left: 1.35rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.requirements-list li {
  margin-bottom: 0.45rem;
}

.requirements-list li:last-child {
  margin-bottom: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.5rem 1.25rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  transition:
    background 0.18s var(--ease-out),
    border-color 0.18s var(--ease-out),
    color 0.18s var(--ease-out),
    box-shadow 0.18s var(--ease-out),
    transform 0.18s var(--ease-out);
}

.btn__icon {
  display: flex;
  flex-shrink: 0;
  opacity: 0.95;
}

.btn__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  text-align: left;
}

.btn__text-main {
  font-weight: 700;
  font-size: 0.9375rem;
  letter-spacing: -0.02em;
}

.btn__text-sub {
  font-weight: 500;
  font-size: 0.75rem;
  color: rgb(255 255 255 / 0.82);
  letter-spacing: 0;
}

.btn--primary {
  color: #fff;
  background: linear-gradient(180deg, var(--blue-accent-mid) 0%, var(--blue-accent) 100%);
  border-color: rgb(255 255 255 / 0.12);
  box-shadow:
    var(--shadow-xs),
    0 4px 14px rgb(225 29 72 / 0.35),
    0 0 0 1px rgb(0 0 0 / 0.04) inset;
}

.btn--primary:hover {
  background: linear-gradient(180deg, #fb7185 0%, var(--blue-accent-hover) 100%);
  box-shadow:
    var(--shadow-sm),
    0 8px 24px rgb(225 29 72 / 0.4);
  transform: translateY(-1px);
}

.btn--primary:active {
  transform: translateY(0);
  box-shadow: var(--shadow-xs), 0 2px 8px rgb(225 29 72 / 0.28);
}

.btn--primary:focus-visible {
  outline: 2px solid var(--blue-accent);
  outline-offset: 3px;
}

.btn--secondary {
  color: var(--text-primary);
  background: #fff;
  border-color: var(--border-strong);
  box-shadow: var(--shadow-xs);
}

.btn--secondary:hover {
  background: #fff1f2;
  border-color: #fda4af;
  box-shadow: var(--shadow-sm);
}

.btn--secondary:focus-visible {
  outline: 2px solid var(--blue-accent);
  outline-offset: 2px;
}

.btn--ghost {
  color: #7f1d1d;
  background: #fff1f2;
  border-color: var(--border-soft);
}

.btn--ghost:hover {
  background: #ffe4e6;
  border-color: #fda4af;
  color: var(--text-primary);
}

.btn--ghost:focus-visible {
  outline: 2px solid #fda4af;
  outline-offset: 2px;
}

.btn--danger-ghost {
  color: #b91c1c;
  background: #fff;
  border-color: #fecaca;
  box-shadow: var(--shadow-xs);
}

.btn--danger-ghost:hover {
  background: #fef2f2;
  border-color: #f87171;
  color: #991b1b;
}

.btn--danger-ghost:focus-visible {
  outline: 2px solid #f87171;
  outline-offset: 2px;
}

.btn--xl {
  min-height: 3.25rem;
  padding: 0.65rem 1.35rem;
  border-radius: var(--radius-lg);
}

.btn--analyze {
  gap: 0.6rem;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  font-size: 0.9375rem;
  letter-spacing: -0.015em;
  border-radius: var(--radius-lg);
  box-shadow:
    var(--shadow-xs),
    0 6px 20px rgb(225 29 72 / 0.32);
}

.btn--analyze:hover {
  box-shadow:
    var(--shadow-sm),
    0 10px 28px rgb(225 29 72 / 0.38);
  transform: translateY(-2px);
}

.btn--analyze:active {
  transform: translateY(0);
}

.btn__chevron {
  flex-shrink: 0;
  opacity: 0.92;
  margin-left: 0.15rem;
}

.btn--danger-outline {
  color: #b91c1c;
  background: #fff;
  border-color: #fecaca;
}

.btn--danger-outline:hover {
  background: #fef2f2;
  border-color: #f87171;
}

.app-section--signal2 {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-soft);
}

.requirements-inline {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.requirements-inline--spaced {
  margin-bottom: 1rem;
}

.preview-banner {
  margin: 0 0 1rem;
  padding: 0.85rem 1.1rem;
  font-size: 0.875rem;
  font-weight: 500;
  background: linear-gradient(90deg, #fff1f2 0%, #fce7f3 100%);
  border: 1px solid #fda4af;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
}

.preview-banner__link {
  font-weight: 700;
  color: var(--blue-accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition:
    border-color 0.15s ease,
    color 0.15s ease;
}

.preview-banner__link:hover {
  color: var(--blue-accent-hover);
  border-bottom-color: currentColor;
}

.preview-banner--success {
  background: linear-gradient(90deg, #ecfdf5 0%, #f0fdf4 100%);
  border-color: #a7f3d0;
}

.page-back {
  margin: 0 0 1rem;
}

.page-back__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.6rem 0.35rem 0.4rem;
  margin-left: -0.35rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-md);
  transition:
    color 0.15s ease,
    background 0.15s ease;
}

.page-back__link:hover {
  color: var(--blue-accent);
  background: rgb(225 29 72 / 0.09);
}

.page-back__link:focus-visible {
  outline: 2px solid var(--blue-accent);
  outline-offset: 2px;
}

.page-back__icon {
  display: flex;
  color: var(--text-subtle);
}

.page-back__link:hover .page-back__icon {
  color: var(--blue-accent);
}

.page-title {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3vw, 1.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--blue-heading);
}

.page-lead {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 44rem;
}

.page-lead__meta {
  display: block;
  margin-top: 0.5rem;
}

.export-suite {
  margin-top: 1.5rem;
  padding: 1.35rem 1.35rem 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  background: linear-gradient(165deg, #fff5f5 0%, #fff 48%, #fff1f2 100%);
  box-shadow: var(--shadow-xs);
}

.export-suite__head {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.export-suite__icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-md);
  color: var(--blue-accent);
  background: linear-gradient(145deg, #ffe4e6, #fce7f3);
  border: 1px solid rgb(253 164 175 / 0.95);
  box-shadow: 0 1px 0 rgb(255 255 255 / 0.9) inset;
}

.export-suite__titles {
  min-width: 0;
}

.export-suite__title {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--blue-heading);
}

.export-suite__subtitle {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 36rem;
}

.export-suite__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 0.85rem;
}

.export-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  padding: 1.15rem 1.15rem 1.15rem 1.15rem;
  min-height: 8.5rem;
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  background: #fff;
  box-shadow: var(--shadow-xs);
  transition:
    border-color 0.2s var(--ease-out),
    box-shadow 0.2s var(--ease-out),
    transform 0.22s var(--ease-spring);
}

.export-tile:hover {
  border-color: #fb7185;
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.export-tile:focus-visible {
  outline: 2px solid var(--blue-accent);
  outline-offset: 2px;
}

.export-tile--featured {
  border-color: rgb(251 113 133 / 0.85);
  background: linear-gradient(165deg, #fff 0%, rgb(255 241 242 / 0.85) 100%);
  box-shadow:
    var(--shadow-sm),
    0 0 0 1px rgb(225 29 72 / 0.1);
}

.export-tile--featured:hover {
  border-color: #f43f5e;
}

.export-tile__badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: #fff1f2;
  border-radius: 4px;
}

.export-tile__badge--accent {
  color: #9f1239;
  background: linear-gradient(180deg, #ffe4e6, #fecdd3);
  border: 1px solid rgb(253 164 175 / 0.95);
}

.export-tile__label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

.export-tile__format {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--blue-heading);
  line-height: 1.1;
}

.export-tile__hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: auto;
  padding-right: 1.75rem;
}

.export-tile__arrow {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  display: flex;
  color: var(--text-subtle);
  transition: transform 0.2s var(--ease-out), color 0.2s ease;
}

.export-tile:hover .export-tile__arrow {
  color: var(--blue-accent);
  transform: translateX(3px);
}

.preview-panel {
  margin-top: 1.5rem;
  padding: 1.5rem 1.35rem 1.65rem;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #fffafa 0%, #fff 42%);
  box-shadow: var(--shadow-xs);
}

.preview-panel--report {
  background: #fff;
}

/* Preview: table + pagination share one card (footer sits below the grid) */
.preview-table-block {
  margin-bottom: 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  background: #fff;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.9);
  overflow: hidden;
}

/* Anchor target for pagination links — keeps table in view after full page navigation */
#data-preview {
  scroll-margin-top: 1rem;
}

.preview-table-block .preview-table-wrap {
  margin-bottom: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.preview-pagination--footer {
  margin: 0;
  padding: 0;
  border-top: 1px solid #ffe4e6;
  background: linear-gradient(180deg, rgb(255 252 252) 0%, rgb(255 250 250) 48%, #fff 100%);
}

.preview-pagination__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem 1.25rem;
  padding: 0.9rem 1rem 1rem;
  max-width: 100%;
}

.preview-pagination__meta {
  justify-self: start;
  min-width: 0;
}

.preview-pagination__summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.45rem;
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.preview-pagination__summary-label,
.preview-pagination__summary-of,
.preview-pagination__summary-unit {
  font-weight: 500;
  color: var(--text-muted);
}

.preview-pagination__summary-range {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.preview-pagination__summary-total {
  font-weight: 700;
  color: var(--blue-heading);
}

.preview-pagination__summary--empty {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.preview-pagination__pager-wrap {
  justify-self: center;
  display: flex;
  justify-content: center;
}

.preview-pagination__pager {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: #fff;
  box-shadow: var(--shadow-xs);
}

.preview-pagination__icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  color: var(--blue-heading);
  background: transparent;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease;
}

.preview-pagination__icon-btn:hover {
  background: rgb(255 241 242);
  color: var(--blue-accent);
}

.preview-pagination__icon-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgb(225 29 72 / 0.45);
}

.preview-pagination__icon-btn--disabled {
  cursor: not-allowed;
  color: var(--text-subtle);
  opacity: 0.45;
}

.preview-pagination__icon-btn--disabled:hover {
  background: transparent;
  color: var(--text-subtle);
}

.preview-pagination__status {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0 0.5rem;
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
  letter-spacing: -0.02em;
}

.preview-pagination__status-sep {
  font-weight: 600;
  color: var(--text-subtle);
  opacity: 0.85;
}

.preview-pagination__single {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-subtle);
  white-space: nowrap;
}

.preview-pagination__size-wrap {
  justify-self: end;
  min-width: 0;
}

.preview-pagination__size {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem 0.6rem;
  margin: 0;
}

.preview-pagination__label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}

.preview-pagination__select {
  min-width: 4.75rem;
  padding: 0.4rem 1.85rem 0.4rem 0.6rem;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: #fff
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239f1239' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E")
    no-repeat right 0.45rem center;
  background-size: 12px;
  appearance: none;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.preview-pagination__select:hover {
  border-color: #fb7185;
}

.preview-pagination__select:focus {
  outline: none;
  border-color: var(--blue-accent);
  box-shadow: 0 0 0 3px rgb(225 29 72 / 0.18);
}

@media (max-width: 720px) {
  .preview-pagination__inner {
    grid-template-columns: 1fr;
    justify-items: stretch;
    text-align: center;
    padding: 1rem 0.85rem 1.05rem;
  }

  .preview-pagination__meta {
    justify-self: center;
  }

  .preview-pagination__summary {
    justify-content: center;
  }

  .preview-pagination__pager-wrap {
    justify-self: center;
  }

  .preview-pagination__size-wrap {
    justify-self: stretch;
  }

  .preview-pagination__size {
    justify-content: center;
  }
}

.preview-table-wrap {
  overflow-x: auto;
  margin-bottom: 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  background: #fff;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.9);
}

.preview-table {
  width: 100%;
  min-width: 28rem;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.preview-table th,
.preview-table td {
  padding: 0.55rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid #ffe4e6;
  white-space: nowrap;
}

.preview-table th {
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #9f1239;
  background: linear-gradient(180deg, #fff5f5, #ffe4e6);
  position: sticky;
  top: 0;
  z-index: 1;
}

.preview-table tbody tr:nth-child(even) {
  background: rgb(255 241 242 / 0.65);
}

.preview-table tbody tr.preview-table__row--ss td {
  font-weight: 700;
}

.preview-table tbody tr.preview-table__row--qc-no td {
  background: #fef2f2;
  color: #991b1b;
  font-weight: 700;
  border-bottom-color: #fecaca;
}

.preview-table tbody tr.preview-table__row--qc-no:nth-child(even) td {
  background: #fee2e2;
  color: #991b1b;
}

.preview-table tbody tr.preview-table__row--qc-no.preview-table__row--ss td {
  font-weight: 700;
  color: #991b1b;
}

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

.action-toolbar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-top: 0.25rem;
}

.action-toolbar__primary {
  margin: 0;
  width: 100%;
}

.action-toolbar__primary .btn {
  width: 100%;
  justify-content: flex-start;
}

.action-toolbar__primary .btn__chevron {
  margin-left: auto;
}

.action-toolbar__secondary {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-soft);
}

.action-toolbar__form {
  margin: 0;
}

@media (min-width: 640px) {
  .action-toolbar__primary .btn {
    width: auto;
    min-width: min(100%, 22rem);
  }
}

.preview-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
}

.preview-actions--single {
  margin-top: 0.5rem;
}

.preview-actions--report {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-soft);
  justify-content: flex-end;
}

.preview-actions__form {
  margin: 0;
}

/* ——— Global workflow reset (all stages) ——— */
.workflow-reset {
  margin-top: 1.5rem;
  padding: 1.25rem 1.15rem 1.35rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  background: linear-gradient(180deg, #fff5f5 0%, #fff 100%);
  box-shadow: var(--shadow-xs);
}

.workflow-reset__title {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9f1239;
}

.workflow-reset__lede {
  margin: 0 0 1rem;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 44rem;
}

.workflow-reset__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 0.75rem;
}

.workflow-reset__form {
  margin: 0;
}

.workflow-reset .btn {
  white-space: normal;
  text-align: center;
}

.workflow-reset__btn-note {
  font-weight: 500;
  opacity: 0.88;
}

.action-toolbar__secondary .workflow-reset {
  margin-top: 0;
  padding: 0.85rem 0 0;
  border: none;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}

.action-toolbar__secondary .workflow-reset__title {
  margin-bottom: 0.35rem;
}

.action-toolbar__secondary .workflow-reset__lede {
  margin-bottom: 0.85rem;
  font-size: 0.78rem;
}

.preview-panel--report .workflow-reset {
  margin-top: 1.35rem;
}

#workflow-page .workflow-reset {
  margin-top: 1.75rem;
}

/* ——— Footer ——— */
.site-footer {
  margin-top: auto;
  padding: 2rem 1.25rem 2.25rem;
  border-top: 1px solid #fecdd3;
  background: linear-gradient(180deg, #ffe4e6 0%, #fff5f5 100%);
}

.site-footer__inner {
  max-width: 54rem;
  margin: 0 auto;
  text-align: center;
}

.site-footer__copyright {
  margin: 0 0 1rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.site-footer__copy-symbol {
  margin-right: 0.2em;
}

.site-footer__sep {
  margin: 0 0.5rem;
  color: var(--text-subtle);
}

.site-footer__suite {
  color: #9f1239;
  font-weight: 500;
}

.site-footer__credits {
  padding-top: 0.85rem;
  border-top: 1px solid rgb(253 164 175 / 0.55);
}

.site-footer__maintainers {
  margin: 0 0 0.5rem;
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

.site-footer__names {
  display: inline;
  font-weight: 600;
  color: var(--text-primary);
}

.site-footer__affiliation {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--text-muted);
  font-style: normal;
  letter-spacing: 0.01em;
}
