/* Copyright (c) 2026 Mustafa Yildiz. All rights reserved. See LICENSE. */
@font-face {
  font-family: Roboto;
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("assets/fonts/roboto-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: Roboto;
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("assets/fonts/roboto-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Roboto Mono";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("assets/fonts/roboto-mono-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Roboto Mono";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("assets/fonts/roboto-mono-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  --ink: #111d1b;
  --muted: #435653;
  --line: #d9e2df;
  --panel: #ffffff;
  --surface: #f3f7f5;
  --accent: #237a2e;
  --accent-hover: #195c22;
  --action-bg: #237a2e;
  --action-hover: #195c22;
  --accent-2: #b35e00;
  --good: #0f6f4d;
  --warn: #805000;
  --warn-surface: #fff4dc;
  --error: #b42318;
  --error-surface: #fef3f2;
  --info: #175c91;
  --info-surface: #edf5fc;
  --shadow: 0 18px 45px rgba(24, 48, 45, 0.12);
  --font-ui: Roboto, Arial, "Helvetica Neue", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "Roboto Mono", "SFMono-Regular", Consolas, "Courier New", monospace;
  font-family:
    var(--font-ui);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
  background: var(--surface);
}

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

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

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

.fixed-setting {
  display: grid;
  gap: 8px;
  align-content: center;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 12px;
  background: #fff;
}

.fixed-setting span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.fixed-setting strong {
  font-size: 16px;
}

.range-setting {
  min-height: 0;
}

.range-setting span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.range-setting strong {
  color: var(--accent-2);
  font-size: 14px;
  white-space: nowrap;
}

.range-setting input[type="range"] {
  appearance: none;
  width: 100%;
  height: 6px;
  min-height: 6px;
  margin: 0;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.range-setting input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: #d8e2de;
}

.range-setting input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -6px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--accent-2);
  box-shadow: 0 2px 8px rgba(179, 94, 0, 0.2);
}

.range-setting input[type="range"]::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: #d8e2de;
}

.range-setting input[type="range"]::-moz-range-progress {
  height: 6px;
  border-radius: 999px;
  background: #d8e2de;
}

.range-setting input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--accent-2);
  box-shadow: 0 2px 8px rgba(179, 94, 0, 0.2);
}

.flank-control-row {
  display: grid;
  grid-template-columns: minmax(84px, 1fr) 82px;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 8px;
  background: #fff;
}

.flank-custom-input {
  min-height: 34px;
  border: 1px solid #d2b789;
  border-radius: 5px;
  padding: 0 4px 0 8px;
  color: #7b4400;
  background: #fffaf1;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  cursor: text;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.78);
}

.flank-custom-input:hover {
  border-color: #b38b4d;
  background: #fff5e3;
}

.flank-custom-input:focus {
  border-color: var(--accent-2);
}

.flank-custom-input::-webkit-inner-spin-button,
.flank-custom-input::-webkit-outer-spin-button {
  opacity: 1;
  cursor: pointer;
}

.app-shell {
  width: min(1320px, calc(100% - 40px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(500px, 600px);
  gap: 32px;
  align-items: center;
  min-height: 292px;
  padding: 24px 0;
}

.language-switch {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  margin: 0 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
  background: var(--panel);
}

.language-switch button {
  min-width: 44px;
  min-height: 38px;
  border-radius: 999px;
  padding: 4px 10px;
  color: var(--muted);
  background: transparent;
  font-size: 14px;
}

.language-switch button.active {
  color: #fff;
  background: var(--action-bg);
}

.brand-logo {
  display: block;
  width: 100%;
  height: auto;
  /* Keep the original bridge and wordmark above the old tagline. */
  aspect-ratio: 1004 / 590;
  object-fit: cover;
  object-position: top;
}

.brand-logo-link {
  display: block;
  width: min(100%, 400px);
  text-decoration: none;
}

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

.hero-copy h1 {
  max-width: 760px;
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
}

.hero-subtitle {
  max-width: 760px;
  margin: 12px 0 0;
  color: var(--ink);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.25;
}

.hero-copy p:last-child {
  max-width: 720px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.query-panel,
.snp-card,
.results {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.contact-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 24px;
  align-items: center;
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(24, 48, 45, 0.1);
}

.contact-copy h2 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
}

.contact-copy p:not(.eyebrow) {
  max-width: 680px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.contact-details {
  display: grid;
  gap: 8px;
  margin: 0;
  border-left: 3px solid #b5d3b9;
  padding-left: 16px;
  color: var(--muted);
  font-style: normal;
  font-size: 14px;
  line-height: 1.45;
}

.contact-details strong {
  color: var(--ink);
  font-size: 16px;
}

.contact-details a {
  width: fit-content;
  color: var(--accent);
  font-weight: 600;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.contact-details a:hover {
  color: var(--good);
}

.query-panel {
  padding: 24px;
  backdrop-filter: blur(10px);
}

.query-panel label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.input-label-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.input-label-row label {
  display: inline;
}

.query-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  gap: 12px;
  margin-top: 10px;
  align-items: stretch;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
  font-size: 16px;
}

textarea {
  min-height: 44px;
  max-height: 180px;
  padding: 12px;
  resize: none;
  line-height: 1.45;
  font-family: var(--font-mono);
  font-variant-ligatures: none;
  overflow-y: hidden;
}

#snpInput[aria-invalid="true"] {
  border: 2px solid var(--error);
  background: var(--error-surface);
  box-shadow: 0 0 0 3px rgba(168, 41, 28, 0.1);
}

#snpInput[aria-invalid="true"]:focus {
  outline: 3px solid var(--error);
  outline-offset: 2px;
}

button {
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  color: #fff;
  background: var(--action-bg);
  font-weight: 600;
  cursor: pointer;
}

.analyze-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  min-height: 44px;
  padding: 8px 16px;
  background: var(--action-bg);
  transition: background 0.18s ease;
}

.analyze-button:hover:not(:disabled) {
  background: var(--action-hover);
}

.analyze-button.is-loading::before {
  content: "";
  position: absolute;
  inset-inline-start: 12px;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: refresh-spin 0.8s linear infinite;
}

.analyze-button.is-loading {
  opacity: 0.85;
}

.analyze-button.is-complete {
  background: var(--action-hover);
}

.settings-grid {
  display: grid;
  grid-template-columns: minmax(145px, 0.95fr) minmax(172px, 1.2fr) minmax(165px, 1.15fr);
  gap: 12px;
  margin-top: 16px;
  align-items: stretch;
}

.settings-grid > * {
  display: grid;
  grid-template-rows: 36px 44px;
  align-content: start;
  align-items: center;
  min-width: 0;
  gap: 8px;
}

#enzymeSet, #scanDepth {
  min-width: 0;
  height: 44px;
  padding-right: 22px;
}

.status-line {
  min-height: 20px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.status-line.status-error {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  border: 1px solid #e4a49c;
  border-radius: 6px;
  padding: 12px;
  color: var(--error);
  background: var(--error-surface);
}

.status-line.status-error::before {
  content: "!";
  display: inline-grid;
  flex: 0 0 20px;
  place-items: center;
  height: 20px;
  border-radius: 50%;
  color: #fff;
  background: var(--error);
  font-size: 14px;
  line-height: 1;
}

.status-line.status-not-found::before {
  content: "?";
}

.status-line.status-retryable::before {
  content: "\21bb";
}

.status-line.status-loading {
  border-left: 3px solid var(--info);
  border-radius: 4px;
  padding: 8px 12px;
  color: var(--info);
  background: var(--info-surface);
}

.status-line.status-success {
  border-left: 3px solid var(--good);
  border-radius: 4px;
  padding: 8px 12px;
  color: #135b20;
  background: #e5f4e8;
}

.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  border-radius: 8px;
  padding: 8px 13px;
  color: #17633a;
  background: #eef8f1;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(28, 84, 55, 0.08);
}

.secondary-action.ghost {
  color: #36534a;
  background: #ffffff;
}

.secondary-action:hover:not(:disabled) {
  border-color: #6cb37a;
  background: #e4f4e8;
  transform: translateY(-1px);
}

.secondary-action:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  transform: none;
}

.setting-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 30px;
}

.enzyme-setting {
  gap: 8px;
}

.icon-action {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  min-height: 36px;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
  border-radius: 50%;
  padding: 0;
  color: #17633a;
  background: #eef8f1;
  box-shadow: 0 7px 16px rgba(28, 84, 55, 0.1);
}

.icon-action svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-action:hover:not(:disabled) {
  background: #e2f3e7;
  border-color: #6cb37a;
  transform: rotate(18deg);
}

.icon-action:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.icon-action:disabled svg {
  animation: refresh-spin 1s linear infinite;
}

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

.input-help-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  padding: 0;
  color: var(--accent);
  background: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
}

.input-help-toggle:hover {
  border-color: color-mix(in srgb, var(--accent) 36%, var(--line));
  background: #f1fbf9;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(16, 34, 29, 0.34);
  backdrop-filter: blur(5px);
}

.modal-backdrop[hidden] {
  display: none;
}

.about-dialog {
  width: min(520px, 100%);
  border: 1px solid rgba(23, 99, 58, 0.16);
  border-radius: 8px;
  padding: 24px;
  color: var(--ink);
  background: #ffffff;
  box-shadow: 0 28px 70px rgba(17, 40, 34, 0.24);
}

.about-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.about-head h2 {
  margin: 3px 0 0;
  color: #17332a;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
}

.modal-close {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  padding: 0;
  color: #36534a;
  background: #fff;
  font-size: 20px;
  font-weight: 700;
}

.modal-close:hover {
  color: var(--accent-hover);
  border-color: #91b797;
  background: #f2f8f3;
}

.about-meta {
  display: grid;
  gap: 12px;
  margin: 0;
}

.about-meta > div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 16px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.about-meta dt {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.about-meta dd {
  margin: 0;
  color: #17332a;
  font-size: 14px;
  font-weight: 500;
}

.about-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

.iupac-note {
  margin: 12px 0 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  color: var(--muted);
  background: #f8fbfa;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.5;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(340px, 380px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.snp-card {
  padding: 24px;
  position: sticky;
  top: 18px;
  max-height: calc(100dvh - 36px);
  overflow: auto;
  overscroll-behavior: contain;
}

.section-head h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
}

.meta-list {
  display: grid;
  gap: 16px;
  margin: 24px 0;
}

.meta-list div {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

dt {
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
}

dd {
  margin: 0;
  font-weight: 500;
  text-align: right;
  font-size: 16px;
  min-width: 0;
  overflow-wrap: anywhere;
}

#alleles {
  line-height: 1.45;
  word-break: break-word;
}

#frequencyMeta {
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
}

#frequencyMeta a {
  color: var(--accent);
  text-underline-offset: 2px;
}

.allele-frequency {
  display: inline-flex;
  gap: 4px;
  align-items: baseline;
  white-space: nowrap;
}

#alleles .allele-frequency {
  display: inline;
  white-space: normal;
  overflow-wrap: anywhere;
}

.allele-source-note {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-weight: 400;
}

.allele-source-note.is-fallback {
  color: var(--warn);
}

.allele-frequency .allele-percent {
  color: #58706a;
  font-weight: 500;
  white-space: nowrap;
}

.allele-frequency.is-rare,
.allele-frequency.is-missing {
  color: #8a5b5b;
  border-radius: 999px;
  padding: 0 4px;
  background: rgba(198, 45, 45, 0.07);
}

.allele-frequency.is-missing .allele-percent {
  color: #8a5b5b;
}

.region-pill {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  border: 1px solid #d5dfdc;
  border-radius: 999px;
  padding: 4px 10px;
  color: #263632;
  background: #eef4f2;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

.region-coding,
.region-exon {
  border-color: #7fb6d2;
  color: #0b4a69;
  background: #e7f4fb;
}

.region-utr {
  border-color: #d4bb70;
  color: #664b00;
  background: #fff7dc;
}

.region-intron {
  border-color: #b5a4db;
  color: #493478;
  background: #f0ebfb;
}

.region-promoter {
  border-color: #f0a86d;
  color: #7b3a00;
  background: #fff0e3;
}

.region-intergenic {
  border-color: #9fc7b1;
  color: #175538;
  background: #e8f6ee;
}

.region-unknown,
.region-neutral {
  border-color: #d6dfdd;
  color: var(--muted);
  background: #f5f8f7;
}

.region-unavailable {
  border-color: #d4bb70;
  color: #664b00;
  background: #fff7dc;
}

.sequence-box {
  overflow-wrap: anywhere;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 16px;
  background: #f8fbfa;
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: 0.05em;
  font-variant-ligatures: none;
  font-variant-numeric: tabular-nums;
}

.base-snp {
  border-radius: 4px;
  padding: 2px 4px;
  color: #fff;
  background: var(--accent-2);
  display: inline-block;
  max-width: 100%;
  overflow-x: auto;
  vertical-align: bottom;
  font-weight: 700;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.results {
  min-width: 0;
  overflow: hidden;
  box-shadow: 0 18px 42px rgba(24, 48, 45, 0.1);
}

.tabs {
  display: flex;
  gap: 1px;
  border-bottom: 1px solid var(--line);
  background: var(--line);
}

.tab {
  flex: 1;
  min-height: 48px;
  border-radius: 0;
  color: var(--muted);
  background: #f7faf9;
  font-size: 16px;
}

.tab.active {
  color: var(--ink);
  background: #fff;
}

.tab-panel {
  display: none;
  padding: 24px;
}

.tab-panel.active {
  display: block;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.design-section {
  margin-top: 24px;
}

.design-section h3 {
  margin: 0 0 10px;
  font-size: 20px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
  background: #fff;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  background: #f8fbfa;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

td {
  font-size: 14px;
  line-height: 1.45;
}

td:nth-child(2),
td:nth-child(6),
td:nth-child(8),
td:nth-child(9),
.detail-grid span,
.meta-detail {
  font-family: var(--font-mono);
  font-variant-ligatures: none;
  font-variant-numeric: tabular-nums;
}

.design-row {
  cursor: pointer;
}

.enzyme-group-name {
  display: inline;
  min-width: 110px;
  font-weight: 600;
  overflow-wrap: normal;
  word-break: normal;
}

.enzyme-name {
  display: inline-block;
  white-space: nowrap;
}

.result-table th:first-child,
.result-table td:first-child {
  min-width: 110px;
}

.natural-group-row {
  cursor: pointer;
}

.natural-group-row:hover td {
  background: #f3f8f6;
}

.design-row:hover td {
  background: #edf5ef;
}

.iso-group {
  box-shadow: none;
}

.result-table :where(tbody > .natural-group-row:nth-of-type(4n + 3)) td,
.result-table :where(tbody > .design-row:nth-of-type(4n + 3)) td {
  background: #f6f9f8;
}

.iso-group:hover td,
.design-row.iso-group:hover td {
  background: #edf5ef;
}

.cut-palette-0,
.cut-palette-1,
.cut-palette-2,
.cut-palette-3,
.cut-palette-4,
.cut-palette-5,
.cut-palette-6,
.cut-palette-7 {
  --cut-accent: #6b7f73;
  --cut-soft: #f6f9f8;
  --cut-mid: #e5ece8;
  --cut-dark: #34483b;
}

.multi-cut-warning td,
.multi-cut-warning.iso-group td {
  color: var(--ink);
  background: #fffaf0;
}

.multi-cut-warning:hover td,
.design-row.multi-cut-warning:hover td {
  background: var(--warn-surface);
}

.multi-cut-warning .supplier-detail,
.multi-cut-warning .empty-row {
  color: var(--muted);
}

.warning-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin-left: 8px;
  border-radius: 999px;
  padding: 0 8px;
  color: var(--warn);
  background: var(--warn-surface);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.group-count-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  min-height: 22px;
  margin-left: 8px;
  border: 1px solid #cbd7d0;
  border-radius: 999px;
  padding: 0 7px;
  color: #3c4c43;
  background: #f1f5f2;
  font-size: 13px;
  font-weight: 600;
}

.detail-toggle {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 12px;
  color: var(--accent);
  background: #fff;
  font-size: 14px;
  font-weight: 600;
}

.detail-toggle:hover {
  border-color: color-mix(in srgb, var(--accent) 36%, var(--line));
  background: #f1fbf9;
}

.detail-row td {
  padding: 12px 16px 16px;
  background: #fbfdfc;
}

.detail-row.multi-cut-warning td {
  background: #fffaf0;
}

.allele-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.allele-separator {
  color: var(--muted);
  font-weight: 500;
}

.allele-detail-stack {
  display: grid;
  gap: 12px;
}

.allele-detail-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.allele-detail-card.multi-cut-warning {
  border-color: #ead5a7;
  background: #fffaf0;
}

.allele-detail-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.allele-detail-title strong {
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 14px;
  font-variant-ligatures: none;
}

.detail-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
}

.detail-grid span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.72);
}

.detail-grid strong {
  color: var(--ink);
}

.natural-cut-map {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  background: #f8faf9;
}

.cut-map-head,
.cut-map-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.cut-map-head {
  justify-content: space-between;
  color: var(--muted);
  font-size: 14px;
}

.cut-map-head strong {
  color: var(--ink);
}

.cut-map-legend {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.cut-map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.cut-map-legend i {
  width: 22px;
  height: 10px;
  border-radius: 999px;
}

.legend-snp {
  background: rgba(198, 45, 45, 0.32);
  box-shadow:
    inset 0 -3px 0 #c42d2d,
    0 0 0 1px rgba(198, 45, 45, 0.2);
}

.legend-extra {
  background: rgba(22, 132, 91, 0.3);
  box-shadow:
    inset 0 -3px 0 #16845b,
    0 0 0 1px rgba(22, 132, 91, 0.18);
}

.legend-engineered {
  background: rgba(47, 111, 176, 0.26);
  box-shadow:
    inset 0 -3px 0 #2f6fb0,
    0 0 0 1px rgba(47, 111, 176, 0.16);
}

.legend-mismatch {
  background: rgba(217, 119, 6, 0.28);
  box-shadow:
    inset 0 -3px 0 #d97706,
    0 0 0 1px rgba(217, 119, 6, 0.18);
}

.cut-sequence {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  color: #1b2926;
  background: rgba(255, 255, 255, 0.76);
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: 0.05em;
  overflow-wrap: anywhere;
  font-variant-ligatures: none;
  font-variant-numeric: tabular-nums;
}

.cut-base {
  border-radius: 4px;
  padding: 1px 1px;
}

.cut-polymorphic-site {
  color: #711c1c;
  background: rgba(198, 45, 45, 0.24);
  box-shadow:
    inset 0 -3px 0 #c42d2d,
    0 0 0 1px rgba(198, 45, 45, 0.12);
  font-weight: 700;
}

.cut-extra-site {
  color: #0d563b;
  background: rgba(22, 132, 91, 0.24);
  box-shadow:
    inset 0 -3px 0 #16845b,
    0 0 0 1px rgba(22, 132, 91, 0.12);
  font-weight: 700;
}

.cut-snp-base {
  border-radius: 4px;
  padding: 2px 3px;
  color: #fff;
  background: #b63f31;
  box-shadow: none;
  font-weight: 700;
}

.cut-engineered-site {
  color: #174a7c;
  background: rgba(47, 111, 176, 0.2);
  box-shadow:
    inset 0 -3px 0 #2f6fb0,
    0 0 0 1px rgba(47, 111, 176, 0.12);
  font-weight: 700;
}

.cut-mismatch-original {
  color: #78350f;
  background: rgba(251, 191, 36, 0.3);
  box-shadow:
    inset 0 -3px 0 #d97706,
    0 0 0 1px rgba(217, 119, 6, 0.14);
  font-weight: 700;
}

.cut-mismatch-base {
  border-radius: 4px;
  padding: 2px 4px;
  color: #fff;
  background: #d97706;
  box-shadow:
    0 0 0 1px rgba(146, 64, 14, 0.2),
    0 3px 10px rgba(217, 119, 6, 0.28);
  font-weight: 700;
}

.engineered-detail-row td {
  background: color-mix(in srgb, var(--cut-soft, #e4f5f3) 54%, #fff);
}

.engineered-cut-map {
  border-color: var(--line);
}

.engineered-sequence-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.engineered-sequence-pair > div {
  min-width: 0;
}

.engineered-sequence-pair > div + div {
  border-left: 1px solid var(--line);
  padding-left: 12px;
}

.engineered-sequence-pair strong {
  color: var(--ink);
  font-size: 14px;
}

.gel-detail-button {
  margin-top: 12px;
  border-color: var(--line);
  color: var(--cut-dark, var(--accent));
  background: #fff;
}

.gel-detail-button:hover {
  background: color-mix(in srgb, var(--cut-soft, #e4f5f3) 80%, #fff);
}

@media (max-width: 920px) {
  .engineered-sequence-pair {
    grid-template-columns: 1fr;
  }

  .engineered-sequence-pair > div + div {
    border-top: 1px solid var(--line);
    border-left: 0;
    padding-top: 12px;
    padding-left: 0;
  }
}

.design-row.selected {
  background: #e7f3e9;
}

.design-row.selected td {
  background: #e7f3e9;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  color: var(--good);
  background: rgba(22, 132, 91, 0.12);
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.meta-detail-toggle {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 11px;
  color: var(--accent);
  background: #fff;
  font-size: 14px;
  font-weight: 600;
}

.meta-detail {
  margin: -8px 0 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  color: var(--muted);
  background: #f8fbfa;
  font-size: 14px;
  line-height: 1.5;
}

.supplier-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 13px;
  font-weight: 600;
}

.supplier-badge.commercial {
  color: #135b20;
  background: #e5f4e8;
}

.supplier-badge.research {
  color: #48534d;
  background: #eef1ef;
}

.supplier-detail {
  display: inline-block;
  margin-left: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
}

.isomer-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  color: #48534d;
  background: #eef1ef;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.isomer-badge.grouped {
  color: #3a4d40;
  background: #e9efeb;
}

.empty-row {
  color: var(--muted);
}

.featured-candidate {
  margin: 12px 16px 16px;
  border: 1px solid #b7d4bd;
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 24px;
  background: #f3f9f4;
}

.featured-candidate[hidden] {
  display: none;
}

.candidate-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
}

.candidate-enzyme {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
}

.candidate-motif {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 16px;
  overflow-wrap: anywhere;
}

.candidate-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 24px;
  margin: 16px 0 0;
  font-size: 14px;
}

.candidate-details > * {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.candidate-details dt {
  align-self: start;
}

.candidate-details dd {
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.55;
  text-align: left;
}

.candidate-fragments > span {
  display: block;
}

.candidate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.candidate-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
}

#analysisProgress {
  display: block;
  width: 100%;
  height: 6px;
  margin-top: 8px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  accent-color: var(--accent);
  background: #e4ebe7;
}

#analysisProgress[hidden] {
  display: none;
}

#analysisProgress::-webkit-progress-bar {
  border-radius: 999px;
  background: #e4ebe7;
}

#analysisProgress::-webkit-progress-value {
  border-radius: 999px;
  background: var(--accent);
  transition: width 0.2s ease;
}

#analysisProgress::-moz-progress-bar {
  border-radius: 999px;
  background: var(--accent);
}

#retryAnalysisButton {
  margin-top: 12px;
}

.loading-row td {
  padding: 16px;
}

.skeleton-bar {
  display: block;
  width: 100%;
  height: 14px;
  border-radius: 4px;
  background: linear-gradient(90deg, #e4ebe7 25%, #f3f6f4 50%, #e4ebe7 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.6s ease-in-out infinite;
}

@keyframes skeleton-loading {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

.gel-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}

.gel-frame {
  min-width: 0;
  margin-top: 16px;
  overflow-x: auto;
}

.simulation-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

#gelCanvas {
  display: block;
  width: auto;
  height: auto;
  max-width: none;
  margin-top: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #141817;
}

.results {
  scroll-margin-top: 12px;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.results-actions {
  border-bottom: 1px solid var(--line);
  padding: 12px 16px;
}

.action-status,
.result-legend,
.catalog-detail,
.natural-filters {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.action-status:empty {
  margin: 0;
}

#shareLinkField {
  margin-top: 8px;
}

.inline-cut-warning {
  margin-inline-start: 6px;
}

.result-legend .warning-chip,
.catalog-detail .warning-chip {
  margin-inline: 0 4px;
}

.batch-panel {
  margin: 0 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  background: var(--panel);
}

.batch-panel summary {
  align-content: center;
  min-height: 44px;
  color: var(--ink);
  font-weight: 600;
  cursor: pointer;
}

.batch-panel[open] {
  padding-bottom: 14px;
}

.batch-panel label {
  display: block;
  font-weight: 600;
}

.batch-panel textarea {
  margin: 4px 0 8px;
  overflow-y: auto;
  resize: vertical;
}

#batchHint,
.batch-table small {
  color: var(--muted);
  font-size: 14px;
}

.batch-table-wrap {
  overflow-x: auto;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.batch-table {
  min-width: 590px;
}

.batch-table th,
.batch-table td {
  padding: 8px 12px;
}

.batch-table small {
  display: block;
  max-width: 48ch;
  margin-top: 4px;
  font-family: var(--font-ui);
}

.data-footer {
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding: 12px 0;
  color: var(--muted);
  font-size: 14px;
}

.data-footer dl {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin: 0;
}

.data-footer dd {
  text-align: start;
  color: var(--ink);
}

.data-footer p {
  margin: 8px 0 0;
}

.software-citation {
  margin-top: 16px;
}

.software-citation h2 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
}

.software-citation p {
  line-height: 1.5;
}

.software-citation a {
  color: var(--accent);
  overflow-wrap: anywhere;
}

@media (max-width: 900px) {
  .hero,
  .workspace {
    grid-template-columns: 1fr;
  }

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

  .contact-details {
    border-left: 0;
    border-top: 3px solid #b5d3b9;
    padding: 16px 0 0;
  }

  .hero {
    min-height: 0;
  }

  .snp-card {
    position: static;
    max-height: none;
    overflow: visible;
  }
}

@media (min-width: 901px) and (max-width: 1100px) {
  .settings-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .settings-grid > :nth-child(1) {
    grid-column: 1;
  }

  .settings-grid > :nth-child(2) {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .settings-grid > :nth-child(3) {
    grid-column: 2;
    grid-row: 1;
  }
}

@media screen and (max-width: 640px) {
  .app-shell {
    width: calc(100% - 24px);
    padding-top: 12px;
  }

  .hero {
    gap: 14px;
    padding: 0 0 16px;
  }

  .hero-copy {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
  }

  .hero .language-switch {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    margin: 0;
  }

  .hero .brand-logo-link {
    grid-column: 1;
    grid-row: 1;
  }

  .hero .hero-subtitle,
  .hero .hero-copy .hero-description {
    grid-column: 1 / -1;
    margin: 0;
  }

  .hero .hero-subtitle {
    font-size: 18px;
  }

  .hero .hero-copy .hero-description {
    font-size: 14px;
    line-height: 1.45;
  }

  .query-panel,
  .snp-card,
  .contact-panel,
  .about-dialog,
  .featured-candidate {
    padding: 14px;
  }

  .candidate-details {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 10px;
  }

  .language-switch button,
  .icon-action,
  .input-help-toggle,
  .modal-close,
  .meta-detail-toggle,
  .secondary-action,
  .batch-panel summary {
    min-height: 44px;
    min-width: 44px;
  }

  .icon-action,
  .input-help-toggle,
  .modal-close {
    width: 44px;
    height: 44px;
  }

  .query-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

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

  .settings-grid > * {
    grid-template-rows: minmax(44px, auto) 44px;
    gap: 4px;
  }

  .settings-grid .range-setting {
    grid-column: 1 / -1;
    grid-row: 2;
    grid-template-rows: auto minmax(46px, auto);
  }

  .settings-grid .enzyme-setting {
    grid-column: 2;
    grid-row: 1;
  }

  .range-setting input[type="range"] {
    min-height: 44px;
  }

  .flank-custom-input {
    min-height: 44px;
  }

  .tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tab-panel {
    padding: 12px;
  }

  .results .table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .result-table,
  .result-table tbody {
    display: block;
    width: 100%;
    min-width: 0;
    background: transparent;
  }

  .result-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .result-table tbody > tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    margin-bottom: 4px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--panel);
  }

  .result-table tbody > .natural-group-row,
  .result-table tbody > .design-row {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.95fr) minmax(0, 0.64fr) minmax(0, 0.95fr) auto;
    align-items: stretch;
    min-height: 46px;
  }

  .result-table td {
    display: block;
    min-width: 0;
    border-bottom: 0;
    padding: 8px;
    overflow-wrap: anywhere;
  }

  .result-table :is(.natural-group-row, .design-row) td {
    display: flex;
    grid-row: 1;
    align-items: center;
    min-width: 0;
    padding: 2px 4px;
    overflow: hidden;
    font-size: 12px;
    white-space: nowrap;
  }

  .result-table :is(.natural-group-row, .design-row) .result-extra,
  .result-table .inline-cut-warning,
  .result-table .supplier-detail {
    display: none;
  }

  .result-table .result-enzyme { grid-column: 1; }
  .result-table :is(.natural-group-row, .design-row) .result-motif { grid-column: 2; display: block; align-content: center; text-overflow: ellipsis; }
  .result-table .result-allele { grid-column: 3; }
  .result-table .result-supply { grid-column: 4; }
  .result-table :is(.natural-group-row, .design-row) .result-open { grid-column: 5; justify-content: end; padding: 0 2px; }

  .result-table .enzyme-group-name,
  .result-table .tag,
  .result-table .supplier-badge {
    display: block;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .result-table .tag,
  .result-table .supplier-badge {
    padding: 3px 4px;
    font-size: 11px;
  }

  .result-table .allele-tag-list {
    min-width: 0;
    flex-wrap: nowrap;
    gap: 2px;
  }

  .result-table .detail-toggle {
    min-height: 44px;
    min-width: 44px;
    padding: 4px 6px;
    font-size: 12px;
  }

  .result-table .natural-cut-map {
    padding: 8px;
  }

  .result-table .detail-grid span {
    max-width: 100%;
    flex-wrap: wrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

@media screen and (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --ink: #e9f3ed;
    --muted: #b0c5ba;
    --line: #394f43;
    --panel: #1a2822;
    --surface: #101a16;
    --accent: #8dde9b;
    --accent-hover: #a9e9b3;
    --accent-2: #e1b86b;
    --good: #a0dfbc;
    --warn: #ffd58c;
    --warn-surface: #403118;
    --error: #ffada4;
    --error-surface: #402525;
    --info: #a0d3ff;
    --info-surface: #20394d;
    --shadow: 0 18px 45px rgba(0, 0, 0, 0.32);
  }

  .query-panel, .snp-card, .results, .contact-panel, .about-dialog,
  .table-wrap, table, .allele-detail-card, .detail-toggle, .meta-detail-toggle,
  .input-help-toggle, .modal-close, .tab.active, .secondary-action.ghost,
  input, select, textarea {
    background: var(--panel);
  }

  .flank-control-row {
    background: var(--panel);
  }

  .flank-custom-input,
  .flank-custom-input:hover {
    color: var(--ink);
    border-color: #795e34;
    background: #342b1e;
    box-shadow: none;
  }

  th, .tab, .detail-row td, .sequence-box, .meta-detail, .iupac-note,
  .natural-cut-map, .detail-grid span, .fixed-setting,
  .result-table :where(tbody > .natural-group-row:nth-of-type(4n + 3)) td,
  .result-table :where(tbody > .design-row:nth-of-type(4n + 3)) td {
    background: #22352c;
  }

  .natural-group-row:hover td, .design-row:hover td, .iso-group:hover td,
  .design-row.iso-group:hover td, .design-row.selected td {
    background: #2b4135;
  }

  .featured-candidate, .secondary-action, .icon-action, .status-line.status-success,
  .supplier-badge.commercial {
    color: var(--good);
    border-color: #466c53;
    background: #223b2c;
  }

  .secondary-action.ghost, .modal-close, .about-head h2, .about-meta dd {
    color: var(--ink);
  }

  .secondary-action:hover:not(:disabled), .icon-action:hover:not(:disabled),
  .detail-toggle:hover, .input-help-toggle:hover, .modal-close:hover {
    background: #2d4b37;
  }

  .multi-cut-warning td, .multi-cut-warning.iso-group td, .multi-cut-warning:hover td,
  .detail-row.multi-cut-warning td, .allele-detail-card.multi-cut-warning {
    border-color: #63502e;
    background: var(--warn-surface);
  }

  .supplier-badge.research, .isomer-badge, .isomer-badge.grouped, .group-count-chip,
  .region-pill, .region-unknown, .region-neutral {
    color: var(--muted);
    border-color: var(--line);
    background: #273932;
  }

  .region-coding, .region-exon { color: var(--info); background: var(--info-surface); }
  .region-utr, .region-promoter, .region-unavailable { color: var(--warn); background: var(--warn-surface); }
  .region-intron { color: #e0cef9; background: #382e4a; }
  .region-intergenic { color: var(--good); background: #243e30; }

  .allele-frequency .allele-percent { color: var(--muted); }
  .allele-frequency.is-rare, .allele-frequency.is-missing,
  .allele-frequency.is-missing .allele-percent { color: var(--error); }
  .base-snp, .status-line.status-error::before { color: #14221b; }

  [class*="cut-palette-"] {
    --cut-accent: #8ba89a;
    --cut-soft: #263a30;
    --cut-mid: #304a3d;
    --cut-dark: #d3e6db;
  }

  .range-setting input[type="range"]::-webkit-slider-runnable-track,
  #analysisProgress, #analysisProgress::-webkit-progress-bar {
    background: var(--line);
  }

  .skeleton-bar {
    background-image: linear-gradient(90deg, #263a30 25%, #345045 50%, #263a30 75%);
  }
}

@media print {
  :root {
    color-scheme: light;
  }

  body {
    min-height: 0;
    color: #111;
    background: #fff;
    font-size: 10pt;
  }

  .hero,
  .query-panel,
  .language-switch,
  .tabs,
  .contact-panel,
  .batch-panel,
  .results-actions,
  .natural-filters,
  .modal-backdrop,
  .detail-toggle,
  .meta-detail-toggle,
  .gel-detail-button,
  .candidate-actions,
  #retryAnalysisButton,
  #analysisProgress,
  #downloadGelButton {
    display: none !important;
  }

  .app-shell {
    width: 100%;
    margin: 0;
    padding: 0;
  }

  .workspace {
    display: block;
  }

  .snp-card,
  .results,
  .featured-candidate {
    position: static;
    max-height: none;
    overflow: visible;
    margin: 0 0 16px;
    border: 1px solid #bbb;
    padding: 16px;
    background: #fff;
    box-shadow: none;
  }

  .results {
    overflow: visible;
    border: 0;
    padding: 0;
  }

  .tab-panel {
    display: block !important;
    padding: 0 0 16px;
  }

  .table-wrap {
    overflow: visible;
    border: 1px solid #bbb;
  }

  .result-table {
    display: table;
    width: 100%;
    min-width: 0;
  }

  .result-table thead {
    position: static;
    display: table-header-group;
    width: auto;
    height: auto;
    clip-path: none;
    white-space: normal;
  }

  .result-table tbody {
    display: table-row-group;
  }

  .result-table tbody > tr:not([hidden]) {
    display: table-row;
    break-inside: avoid;
  }

  .result-table td,
  .result-table th {
    display: table-cell;
    min-width: 0;
    padding: 6px;
    font-size: 9pt;
    text-align: left;
  }

  .result-table td[data-label]::before {
    display: none;
  }

  .sequence-box,
  .cut-sequence {
    overflow-wrap: anywhere;
    font-size: 10pt;
  }

  .base-snp {
    display: inline;
    overflow: visible;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .gel-frame {
    overflow: visible;
  }

  #gelCanvas {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    max-height: 230mm;
    object-fit: contain;
    break-inside: avoid;
  }

  .section-head,
  .candidate-head,
  .gel-toolbar {
    break-after: avoid;
  }
}
