:root {
  --bg: #f4f6f1;
  --surface: #ffffff;
  --surface-soft: #f7f8f5;
  --ink: #17201c;
  --muted: #68726d;
  --line: #dde3de;
  --line-strong: #cad3cc;
  --primary: #136c5b;
  --primary-dark: #0b5547;
  --primary-soft: #e8f4f0;
  --accent: #d8ef5b;
  --accent-ink: #23300c;
  --success: #22745c;
  --success-soft: #e8f6ef;
  --warning: #9a6117;
  --warning-soft: #fff4dc;
  --danger: #a63d45;
  --danger-soft: #fff0f0;
  --working: #4264b1;
  --working-soft: #edf1ff;
  --shadow: 0 18px 55px rgba(35, 55, 45, 0.08);
  --shadow-small: 0 7px 22px rgba(35, 55, 45, 0.07);
  --radius: 22px;
  --radius-small: 13px;
  --focus: 0 0 0 4px rgba(19, 108, 91, 0.17);
}

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

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: clip;
  color: var(--ink);
  background:
    radial-gradient(circle at 76% -12%, rgba(216, 239, 91, 0.2), transparent 25rem),
    radial-gradient(circle at -5% 15%, rgba(19, 108, 91, 0.08), transparent 24rem),
    var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible,
[tabindex="0"]:focus-visible,
a:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

[hidden] {
  display: none !important;
}

.shell {
  width: min(1220px, calc(100% - 48px));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 10px;
  left: 10px;
  padding: 10px 15px;
  color: #fff;
  background: var(--primary-dark);
  border-radius: 8px;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: relative;
  z-index: 10;
  border-bottom: 1px solid rgba(202, 211, 204, 0.75);
  background: rgba(247, 248, 244, 0.86);
  backdrop-filter: blur(18px);
}

.header-inner {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--primary);
  border-radius: 13px;
  box-shadow: 0 8px 18px rgba(19, 108, 91, 0.2);
}

.brand-mark svg {
  width: 23px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.brand > span:last-child {
  display: grid;
  line-height: 1.2;
}

.brand strong {
  font-size: 16px;
  letter-spacing: 0.01em;
}

.brand small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.service-status {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.status-pill,
.soft-tag,
.result-badge {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  color: #56615b;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.status-pill svg {
  width: 14px;
  fill: currentColor;
}

.status-dot {
  width: 7px;
  height: 7px;
  background: #939d97;
  border-radius: 50%;
}

.status-pill[data-tone="success"] {
  color: var(--success);
  background: var(--success-soft);
  border-color: #c8e8d9;
}

.status-pill[data-tone="success"] .status-dot {
  background: #2c9774;
  box-shadow: 0 0 0 4px rgba(44, 151, 116, 0.12);
}

.status-pill[data-tone="danger"] {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: #f1ced1;
}

.status-pill[data-tone="danger"] .status-dot {
  background: var(--danger);
}

.page-shell {
  padding-top: 64px;
  padding-bottom: 80px;
}

.intro {
  max-width: 760px;
}

.eyebrow,
.step-label {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.intro h1 {
  margin: 0;
  font-size: clamp(38px, 5.8vw, 68px);
  font-weight: 760;
  letter-spacing: -0.055em;
  line-height: 1.06;
}

.intro h1 span {
  color: var(--primary);
}

.intro-copy {
  max-width: 630px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.journey {
  margin: 44px 0 28px;
  padding: 13px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(221, 227, 222, 0.9);
  border-radius: 18px;
  box-shadow: var(--shadow-small);
}

.journey-step {
  position: relative;
  min-height: 62px;
  display: grid;
  grid-template-columns: 32px 1fr;
  grid-template-rows: 1fr 1fr;
  align-items: center;
  column-gap: 10px;
  padding: 8px 12px;
  color: #87918b;
  border-radius: 12px;
}

.journey-step > span {
  grid-row: 1 / 3;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  background: #edf0ed;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 750;
}

.journey-step strong {
  align-self: end;
  color: #67716c;
  font-size: 13px;
}

.journey-step small {
  align-self: start;
  font-size: 11px;
}

.journey-step.is-current {
  color: var(--primary);
  background: var(--primary-soft);
}

.journey-step.is-current strong {
  color: var(--primary-dark);
}

.journey-step.is-current > span {
  color: #fff;
  background: var(--primary);
}

.journey-step.is-complete > span {
  color: var(--accent-ink);
  background: var(--accent);
}

.notice {
  position: relative;
  margin: 0 0 20px;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px 10px 15px;
  color: #38554c;
  background: #edf6f2;
  border: 1px solid #cee4db;
  border-radius: var(--radius-small);
}

.notice > svg {
  width: 19px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.7;
}

.notice > span {
  flex: 1;
}

.notice[data-tone="danger"] {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: #f0cdd0;
}

.notice[data-tone="warning"] {
  color: var(--warning);
  background: var(--warning-soft);
  border-color: #efd9ae;
}

.main-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 294px;
  align-items: start;
  gap: 24px;
}

.primary-column {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
}

.card,
.history-card {
  min-width: 0;
  max-width: 100%;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(221, 227, 222, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card {
  padding: 29px;
}

.section-heading,
.table-heading,
.action-row,
.history-heading,
.result-hero,
.run-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.section-heading {
  margin-bottom: 24px;
}

.section-heading h2,
.history-heading h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.soft-tag {
  color: var(--muted);
  background: var(--surface-soft);
}

.drop-zone {
  min-height: 218px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 28px;
  background:
    linear-gradient(var(--surface-soft), var(--surface-soft)) padding-box,
    repeating-linear-gradient(90deg, var(--line-strong) 0 8px, transparent 8px 15px) border-box;
  border: 1px solid transparent;
  border-radius: 17px;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.drop-zone:hover,
.drop-zone.is-dragover {
  background: var(--primary-soft);
  border-color: #83b6a7;
}

.drop-zone.is-dragover {
  transform: scale(1.004);
}

.drop-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.upload-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  color: var(--primary);
  background: #fff;
  border: 1px solid #dce6df;
  border-radius: 17px;
  box-shadow: var(--shadow-small);
}

.upload-icon svg,
.result-check svg,
.confirmation-icon svg,
.download-button svg,
.queue-message svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.upload-icon svg {
  width: 27px;
}

.drop-copy {
  display: grid;
  justify-items: start;
}

.drop-copy strong {
  font-size: 17px;
}

.drop-copy > span {
  color: var(--muted);
}

.drop-copy small {
  margin-top: 10px;
  color: #929b96;
}

.link-button {
  padding: 0;
  color: var(--primary);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.selected-file {
  margin-top: 13px;
  min-height: 64px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--primary-soft);
  border: 1px solid #cfe6dd;
  border-radius: 13px;
}

.file-icon {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--primary);
  border-radius: 10px;
  font-size: 8px;
  font-weight: 800;
}

.selected-file > div {
  min-width: 0;
  display: grid;
}

.selected-file strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selected-file small {
  color: var(--muted);
}

.icon-button {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.icon-button:hover {
  color: var(--ink);
  background: rgba(23, 32, 28, 0.06);
}

.file-requirements {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}

.file-requirements summary {
  width: fit-content;
  color: var(--primary);
  cursor: pointer;
  font-weight: 700;
}

.file-requirements p {
  margin: 7px 0 0;
}

.action-row {
  margin-top: 20px;
}

.preflight-buttons,
.auxiliary-downloads > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
}

.action-row > p,
.action-row div p,
.section-subtitle,
.table-heading p,
.history-hint,
.confirmation-panel p,
.result-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.button {
  min-height: 43px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 17px;
  border: 1px solid transparent;
  border-radius: 11px;
  cursor: pointer;
  font-weight: 730;
  line-height: 1.2;
  transition: background 150ms ease, border-color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.button:not(:disabled):active {
  transform: translateY(1px);
}

.button.primary {
  color: #fff;
  background: var(--primary);
  box-shadow: 0 7px 18px rgba(19, 108, 91, 0.2);
}

.button.primary:hover:not(:disabled) {
  background: var(--primary-dark);
}

.button.ghost {
  color: #4f5c55;
  background: #fff;
  border-color: var(--line);
}

.button.ghost:hover:not(:disabled) {
  border-color: #aebbb3;
  background: var(--surface-soft);
}

.button.danger {
  color: #fff;
  background: var(--danger);
}

.button.small {
  min-height: 34px;
  padding: 6px 11px;
  font-size: 12px;
}

.danger-text {
  color: var(--danger) !important;
}

.button.is-loading .button-spinner {
  display: block;
}

.button.is-loading > span:first-child {
  opacity: 0.75;
}

.button-spinner {
  display: none;
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

@keyframes spin {
  to { transform: rotate(1turn); }
}

.result-badge {
  border: 0;
}

.result-badge[data-tone="success"] {
  color: var(--success);
  background: var(--success-soft);
}

.result-badge[data-tone="warning"] {
  color: var(--warning);
  background: var(--warning-soft);
}

.result-badge[data-tone="danger"] {
  color: var(--danger);
  background: var(--danger-soft);
}

.result-badge[data-tone="working"] {
  color: var(--working);
  background: var(--working-soft);
}

.fact-grid {
  margin: 0 0 24px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 1px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.fact-grid > div {
  min-width: 0;
  padding: 13px 15px;
  background: var(--surface-soft);
}

.fact-grid dt {
  color: var(--muted);
  font-size: 11px;
}

.fact-grid dd {
  margin: 3px 0 0;
  overflow: hidden;
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inspection-message,
.run-error,
.queue-message {
  margin: 0 0 20px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13px;
}

.inspection-message {
  color: var(--warning);
  background: var(--warning-soft);
  border: 1px solid #efdbb6;
}

.inspection-message ul {
  margin: 7px 0 0;
  padding-left: 18px;
}

.table-block,
.sample-block {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 15px;
  overflow: hidden;
}

.table-heading {
  min-height: 61px;
  padding: 11px 14px;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line);
}

.table-heading h3 {
  margin: 0;
  font-size: 14px;
}

.table-scroll {
  width: 100%;
  max-width: 100%;
  overflow: auto;
  overscroll-behavior-inline: contain;
  scrollbar-gutter: stable;
  background: #fff;
}

.table-scroll table {
  width: max-content;
  min-width: 100%;
  max-width: none;
  border-collapse: collapse;
  font-size: 12px;
}

.table-scroll th,
.table-scroll td {
  min-width: 128px;
  max-width: 290px;
  padding: 10px 12px;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  vertical-align: top;
  white-space: nowrap;
  border-right: 1px solid #edf0ed;
  border-bottom: 1px solid #edf0ed;
}

.table-scroll th {
  position: sticky;
  z-index: 1;
  top: 0;
  color: #4d5b54;
  background: #fafbf9;
  font-size: 11px;
  font-weight: 750;
}

.table-scroll td.is-changed {
  color: #5e4a08;
  background: #fff9df;
  font-weight: 650;
}

.table-scroll td.is-error {
  color: var(--danger);
  background: var(--danger-soft);
}

.table-empty {
  padding: 32px 20px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.emphasized {
  padding: 15px 16px;
  background: var(--primary-soft);
  border: 1px solid #cfe5dc;
  border-radius: 14px;
}

.emphasized strong {
  font-size: 14px;
}

.run-heading {
  align-items: flex-start;
}

.run-heading-side {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.run-heading-side small {
  color: #8a948e;
  font-size: 10px;
}

.queue-message {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--warning);
  background: var(--warning-soft);
  border: 1px solid #efdcb9;
}

.queue-message svg {
  width: 19px;
  flex: 0 0 auto;
}

.stage-list {
  margin: 4px 0 24px;
  display: grid;
  gap: 5px;
}

.stage-row {
  display: grid;
  grid-template-columns: 36px minmax(150px, 0.75fr) minmax(150px, 1fr) 74px;
  align-items: center;
  gap: 13px;
  min-height: 58px;
  padding: 8px 11px;
  border-radius: 12px;
}

.stage-row.is-running {
  background: var(--working-soft);
}

.stage-row.is-failed {
  background: var(--danger-soft);
}

.stage-icon {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  color: #8d9791;
  background: #f1f3f1;
  border: 1px solid #e3e7e4;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
}

.stage-row.is-completed .stage-icon {
  color: var(--success);
  background: var(--success-soft);
  border-color: #cce8dc;
}

.stage-row.is-running .stage-icon {
  color: #fff;
  background: var(--working);
  border-color: var(--working);
}

.stage-row.is-running .stage-icon::after {
  content: "";
  width: 11px;
  height: 11px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

.stage-row.is-running .stage-icon > span {
  display: none;
}

.stage-name {
  min-width: 0;
  display: grid;
}

.stage-name strong {
  font-size: 13px;
}

.stage-name span,
.stage-counter {
  color: var(--muted);
  font-size: 11px;
}

.stage-bar {
  height: 7px;
  overflow: hidden;
  background: #e7ebe8;
  border-radius: 99px;
}

.stage-bar > span {
  height: 100%;
  display: block;
  width: 0;
  background: var(--primary);
  border-radius: inherit;
  transition: width 350ms ease;
}

.stage-row.is-running .stage-bar > span {
  background: var(--working);
}

.stage-counter {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.stage-counter b {
  color: var(--ink);
  font-size: 12px;
}

.run-error {
  color: var(--danger);
  background: var(--danger-soft);
  border: 1px solid #f0cdd0;
}

.run-file,
.run-elapsed {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.run-file {
  color: #415049;
  font-weight: 700;
}

.run-elapsed {
  font-variant-numeric: tabular-nums;
}

.sample-block {
  margin-top: 2px;
}

.tabs {
  display: flex;
  gap: 3px;
  padding: 3px;
  background: #e9edea;
  border-radius: 9px;
}

.tabs button {
  padding: 5px 9px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.tabs button[aria-selected="true"] {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 2px 8px rgba(28, 45, 36, 0.08);
}

.compact-table {
  max-height: 360px;
}

.confirmation-panel {
  margin-top: 20px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 13px;
  padding: 15px;
  color: var(--success);
  background: var(--success-soft);
  border: 1px solid #c9e6d8;
  border-radius: 14px;
}

.confirmation-panel p {
  color: #537268;
}

.confirmation-icon,
.result-check {
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--success);
  border-radius: 50%;
}

.confirmation-icon {
  width: 38px;
  height: 38px;
}

.confirmation-icon svg {
  width: 22px;
}

.run-actions {
  margin-top: 19px;
  display: flex;
  justify-content: flex-end;
  gap: 9px;
}

.result-card {
  overflow: hidden;
  border-color: #cce5da;
}

.result-hero {
  align-items: flex-start;
}

.result-check {
  width: 45px;
  height: 45px;
  flex: 0 0 auto;
}

.result-check svg {
  width: 25px;
}

.result-hero > div {
  flex: 1;
}

.result-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 9px;
}

.result-hero h2 {
  margin: 0 0 5px;
  font-size: 24px;
}

.download-button svg {
  width: 18px;
}

.result-legend {
  margin: 0;
  padding: 9px 14px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  background: #fffdf3;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
}

.result-legend > span {
  width: 14px;
  height: 10px;
  flex: 0 0 auto;
  background: #fff2b8;
  border: 1px solid #ead993;
  border-radius: 3px;
}

.summary-grid {
  margin: 25px 0 20px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.auxiliary-downloads {
  margin: -6px 0 20px;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.auxiliary-downloads[hidden] {
  display: none;
}

.summary-item {
  padding: 13px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.summary-item strong {
  display: block;
  font-size: 20px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.summary-item span {
  color: var(--muted);
  font-size: 11px;
}

.history-card {
  position: sticky;
  top: 22px;
  padding: 21px;
}

.history-heading {
  align-items: flex-start;
}

.history-heading h2 {
  font-size: 19px;
}

.refresh-button svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.6;
}

.history-hint {
  margin: 10px 0 16px;
}

.history-list {
  display: grid;
  gap: 8px;
}

.history-item {
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 32px;
  gap: 4px 10px;
  padding: 12px;
  text-align: left;
  background: var(--surface-soft);
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
}

.history-item:hover,
.history-item.is-active {
  background: var(--primary-soft);
  border-color: #cfe5dc;
}

.history-item strong {
  min-width: 0;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-item time {
  color: var(--muted);
  font-size: 10px;
}

.history-state {
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: center;
  padding: 3px 7px;
  color: var(--muted);
  background: #fff;
  border-radius: 99px;
  font-size: 10px;
}

.history-item-delete {
  position: static;
  grid-column: 3;
  grid-row: 1 / 3;
  align-self: center;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: var(--danger);
  background: #fff;
  border: 1px solid #efd8d9;
  border-radius: 50%;
  cursor: pointer;
  font-size: 17px;
  opacity: 0.7;
}

.history-item:hover .history-item-delete,
.history-item:focus-within .history-item-delete {
  opacity: 1;
}

.history-empty {
  padding: 28px 8px 16px;
  display: grid;
  justify-items: center;
  color: var(--muted);
  text-align: center;
}

.history-empty svg {
  width: 40px;
  margin-bottom: 10px;
  fill: none;
  stroke: #a7b0ab;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.4;
}

.history-empty strong {
  color: #67726c;
  font-size: 12px;
}

.history-empty span {
  margin-top: 4px;
  font-size: 11px;
}

.site-footer {
  padding: 25px 0 32px;
  color: #89928d;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 11px;
}

.confirm-dialog {
  width: min(390px, calc(100% - 32px));
  padding: 0;
  border: 0;
  border-radius: 19px;
  box-shadow: 0 30px 100px rgba(21, 39, 30, 0.25);
}

.confirm-dialog::backdrop {
  background: rgba(13, 23, 18, 0.46);
  backdrop-filter: blur(3px);
}

.confirm-dialog form {
  padding: 27px;
  text-align: center;
}

.dialog-icon {
  width: 42px;
  height: 42px;
  margin: 0 auto 13px;
  display: grid;
  place-items: center;
  color: var(--danger);
  background: var(--danger-soft);
  border-radius: 50%;
  font-size: 20px;
  font-weight: 800;
}

.confirm-dialog h2 {
  margin: 0;
  font-size: 19px;
}

.confirm-dialog p {
  margin: 9px 0 22px;
  color: var(--muted);
  font-size: 13px;
}

.dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.toast-region {
  position: fixed;
  z-index: 100;
  right: 22px;
  bottom: 22px;
  display: grid;
  gap: 8px;
  pointer-events: none;
}

.toast {
  max-width: 360px;
  padding: 11px 14px;
  color: #fff;
  background: #26352e;
  border-radius: 11px;
  box-shadow: 0 12px 35px rgba(20, 37, 28, 0.25);
  animation: toast-in 180ms ease-out;
  font-size: 13px;
}

.toast.is-error {
  background: #83373d;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(6px); }
}

.noscript {
  position: fixed;
  z-index: 200;
  inset: auto 12px 12px;
  padding: 15px;
  color: #fff;
  background: var(--danger);
  border-radius: 10px;
  text-align: center;
}

@media (max-width: 960px) {
  .main-grid {
    grid-template-columns: 1fr;
  }

  .history-card {
    position: static;
  }

  .history-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .fact-grid {
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .shell {
    width: min(100% - 28px, 1220px);
  }

  .header-inner {
    min-height: 70px;
  }

  .service-status {
    max-width: 190px;
    gap: 4px;
  }

  .status-pill {
    min-height: 25px;
    padding: 3px 7px;
    font-size: 10px;
  }

  .page-shell {
    padding-top: 39px;
    padding-bottom: 50px;
  }

  .intro h1 {
    font-size: clamp(35px, 11.8vw, 52px);
  }

  .intro-copy {
    font-size: 15px;
  }

  .journey {
    margin-top: 31px;
    padding: 8px;
  }

  .journey-step {
    min-height: 48px;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    justify-items: center;
    padding: 6px 2px;
    text-align: center;
  }

  .journey-step > span {
    grid-row: auto;
    width: 24px;
    height: 24px;
  }

  .journey-step strong {
    align-self: auto;
    margin-top: 2px;
    font-size: 10px;
  }

  .journey-step small {
    display: none;
  }

  .card {
    padding: 21px 17px;
    border-radius: 18px;
  }

  .section-heading {
    align-items: flex-start;
    gap: 10px;
  }

  .section-heading h2 {
    font-size: 19px;
  }

  .drop-zone {
    min-height: 190px;
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .drop-copy {
    justify-items: center;
  }

  .action-row,
  .result-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .upload-actions > p {
    display: none;
  }

  .button {
    width: 100%;
  }

  .preflight-buttons,
  .auxiliary-downloads,
  .auxiliary-downloads > div {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .fact-grid {
    grid-template-columns: 1fr 1fr;
  }

  .run-heading {
    flex-direction: row;
  }

  .stage-row {
    grid-template-columns: 32px 1fr auto;
    gap: 9px;
    padding-inline: 5px;
  }

  .stage-bar {
    grid-column: 2 / 4;
    grid-row: 2;
  }

  .stage-counter {
    grid-column: 3;
    grid-row: 1;
  }

  .sample-block .table-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
  }

  .confirmation-panel {
    grid-template-columns: auto 1fr;
  }

  .confirmation-panel .button {
    grid-column: 1 / 3;
  }

  .run-actions {
    flex-direction: column-reverse;
  }

  .result-hero {
    align-items: flex-start;
  }

  .result-actions {
    width: 100%;
    flex-direction: column-reverse;
  }

  .download-button {
    margin-top: 5px;
  }

  .summary-grid {
    grid-template-columns: 1fr 1fr;
  }

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
