:root {
  --bg: #0c0f14;
  --bg-elevated: #141a24;
  --bg-input: #0e131c;
  --border: rgba(94, 234, 212, 0.12);
  --accent: #5eead4;
  --accent-dim: rgba(94, 234, 212, 0.55);
  --text: #e8edf5;
  --text-muted: #8b98ab;
  --font-sans: system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
  --radius: 12px;
  --shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(94, 234, 212, 0.08), transparent),
    radial-gradient(ellipse 80% 50% at 100% 50%, rgba(56, 189, 248, 0.06), transparent),
    var(--bg);
}

main {
  max-width: 960px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

header.hero {
  text-align: center;
  margin-bottom: 2rem;
}

header.hero h1 {
  margin: 0 0 0.35rem;
  font-weight: 700;
  font-size: clamp(1.65rem, 4vw, 2.05rem);
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #f0fdfa 0%, var(--accent) 55%, #38bdf8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

header.hero .hero-guide {
  max-width: 48rem;
  margin: 0.75rem auto 0;
  text-align: left;
}

header.hero .hero-guide--collapsible {
  max-width: 52rem;
}

header.hero .hero-guide p,
header.hero .hero-guide .hero-guide__lead {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.58;
}

header.hero .hero-guide p + p {
  margin-top: 0.85rem;
}

header.hero .hero-guide__section {
  margin-top: 0.65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(14, 19, 28, 0.55);
  overflow: hidden;
}

header.hero .hero-guide__section summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem;
  cursor: pointer;
  list-style: none;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  color: var(--text);
  user-select: none;
}

header.hero .hero-guide__section summary::-webkit-details-marker {
  display: none;
}

header.hero .hero-guide__section summary::before {
  content: "▸";
  flex-shrink: 0;
  color: var(--accent);
  font-size: 0.9rem;
  transition: transform 0.15s ease;
}

header.hero .hero-guide__section[open] summary::before {
  transform: rotate(90deg);
}

header.hero .hero-guide__section summary strong {
  font-weight: 700;
}

header.hero .hero-guide__section summary:hover {
  background: rgba(94, 234, 212, 0.06);
}

header.hero .hero-guide__section summary:focus-visible {
  outline: 2px solid rgba(94, 234, 212, 0.45);
  outline-offset: -2px;
}

header.hero .hero-guide__body {
  padding: 0 0.85rem 0.85rem;
  border-top: 1px solid var(--border);
}

header.hero .hero-guide__body p {
  margin: 0.75rem 0 0;
}

header.hero .hero-guide__body ul,
header.hero .hero-guide__body ol {
  margin: 0.65rem 0 0;
  padding-left: 1.35rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.58;
}

header.hero .hero-guide__body li + li {
  margin-top: 0.4rem;
}

header.hero .hero-guide__steps li + li {
  margin-top: 0.5rem;
}

header.hero .hero-guide__body code {
  font-size: 0.88em;
  color: var(--accent);
}

header.hero .hero-guide__tip {
  margin-top: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-left: 3px solid var(--accent-dim);
  background: rgba(94, 234, 212, 0.06);
  border-radius: 0 8px 8px 0;
}

header.hero .hero-guide a:link,
header.hero .hero-guide a:visited {
  color: #fff;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.45);
  text-underline-offset: 0.15em;
}

header.hero .hero-guide a:hover {
  text-decoration-color: rgba(255, 255, 255, 0.9);
}

header.hero .hero-guide code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  color: var(--text);
  background: rgba(94, 234, 212, 0.08);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.pblast-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.panel {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.35rem 1.15rem;
  box-shadow: var(--shadow);
}

.field-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-dim);
  margin-bottom: 0.45rem;
}

.field-hint {
  margin: 0.55rem 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.seq-input {
  width: 100%;
  min-height: 120px;
  padding: 0.75rem 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 10px;
  resize: vertical;
}

.seq-input:focus {
  outline: none;
  border-color: rgba(94, 234, 212, 0.45);
  box-shadow: 0 0 0 3px rgba(94, 234, 212, 0.12);
}

.num-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.25rem;
}

.num-row--tm {
  gap: 1rem 1rem;
}

.num-field {
  flex: 1 1 6rem;
  min-width: 5.5rem;
}

.num-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.num-input {
  width: 100%;
  padding: 0.6rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.num-input:focus {
  outline: none;
  border-color: rgba(94, 234, 212, 0.45);
  box-shadow: 0 0 0 3px rgba(94, 234, 212, 0.12);
}

.range-control {
  margin-top: 0.35rem;
}

.range-control--tm {
  margin-bottom: 0.15rem;
}

.range-control--stringency {
  margin-bottom: 0.15rem;
}

.stringency-intro {
  margin-top: 0.15rem;
}

.stringency-label-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin: -0.35rem 0 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
}

.stringency-summary {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.stringency-summary strong {
  color: var(--accent);
  font-weight: 700;
}

.range-slider--steps .range-slider__input::-webkit-slider-thumb {
  cursor: pointer;
}

.range-slider--steps .range-slider__input::-moz-range-thumb {
  cursor: pointer;
}

.range-slider {
  position: relative;
  height: 2.35rem;
  margin: 0.35rem 0 0.85rem;
}

.range-slider__track {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 6px;
  transform: translateY(-50%);
  border-radius: 999px;
  background: rgba(94, 234, 212, 0.12);
  border: 1px solid rgba(94, 234, 212, 0.18);
  overflow: hidden;
}

.range-slider__fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(94, 234, 212, 0.45), rgba(56, 189, 248, 0.55));
}

.range-slider__fill--single {
  left: 0;
  width: 0;
}

.range-slider__input {
  position: absolute;
  left: 0;
  width: 100%;
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
  height: 1.75rem;
  background: transparent;
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
}

.range-slider__input::-webkit-slider-runnable-track {
  height: 6px;
  background: transparent;
  border: none;
}

.range-slider__input::-moz-range-track {
  height: 6px;
  background: transparent;
  border: none;
}

.range-slider__input::-webkit-slider-thumb {
  -webkit-appearance: none;
  pointer-events: auto;
  width: 18px;
  height: 18px;
  margin-top: -6px;
  border-radius: 50%;
  border: 2px solid #0c0f14;
  background: linear-gradient(135deg, #5eead4, #38bdf8);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  cursor: grab;
}

.range-slider__input::-moz-range-thumb {
  pointer-events: auto;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #0c0f14;
  background: linear-gradient(135deg, #5eead4, #38bdf8);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  cursor: grab;
}

.range-slider__input:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 3px rgba(94, 234, 212, 0.35);
}

.range-slider__input:focus-visible::-moz-range-thumb {
  box-shadow: 0 0 0 3px rgba(94, 234, 212, 0.35);
}

.range-slider__input--min {
  z-index: 2;
}

.range-slider__input--max {
  z-index: 3;
}

.range-values {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.range-value strong {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--text);
}

.range-value__label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-right: 0.35rem;
}

.tm-opt-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
}

.tm-opt-input {
  width: 5.5rem;
  padding: 0.55rem 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.tm-opt-input:focus {
  outline: none;
  border-color: rgba(94, 234, 212, 0.45);
  box-shadow: 0 0 0 3px rgba(94, 234, 212, 0.12);
}

.tm-range-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.tm-range-hint span {
  font-family: var(--font-mono);
  color: var(--text);
}

.text-input {
  width: 100%;
  padding: 0.6rem 0.75rem;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--text);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.text-input:focus {
  outline: none;
  border-color: rgba(94, 234, 212, 0.45);
  box-shadow: 0 0 0 3px rgba(94, 234, 212, 0.12);
}

.gene-lookup-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1rem;
  align-items: flex-end;
}

.gene-lookup-field {
  flex: 1 1 10rem;
  min-width: 9rem;
}

.gene-lookup-action {
  flex: 0 0 auto;
}

.btn-lookup {
  padding: 0.62rem 1.1rem;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  background: rgba(94, 234, 212, 0.1);
  border: 1px solid rgba(94, 234, 212, 0.35);
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
}

.btn-lookup:hover {
  background: rgba(94, 234, 212, 0.16);
  border-color: rgba(94, 234, 212, 0.55);
}

.btn-lookup:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(94, 234, 212, 0.35);
}

.btn-lookup:disabled {
  opacity: 0.65;
  cursor: wait;
}

.gene-lookup-status {
  min-height: 1.2rem;
}

.gene-lookup-status--error {
  color: #f87171;
}

.gene-lookup-status--ok {
  color: var(--accent-dim);
}

.gene-pick-wrap {
  margin-top: 0.35rem;
}

.gene-pick-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.gene-pick-btn {
  display: block;
  width: 100%;
  padding: 0.55rem 0.75rem;
  text-align: left;
  font-family: var(--font-sans);
  font-size: 0.84rem;
  color: var(--text);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
}

.gene-pick-btn:hover {
  border-color: rgba(94, 234, 212, 0.35);
  background: rgba(94, 234, 212, 0.06);
}

.gene-pick-btn strong {
  color: var(--accent);
  margin-right: 0.45rem;
}

.taxon-ac {
  position: relative;
}

.taxon-ac-list {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  margin: 0;
  padding: 0.35rem 0;
  list-style: none;
  max-height: 14rem;
  overflow-y: auto;
  background: var(--bg-elevated);
  border: 1px solid rgba(94, 234, 212, 0.25);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.taxon-ac-item {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  text-align: left;
  font-family: var(--font-sans);
  font-size: 0.84rem;
  line-height: 1.35;
  color: var(--text);
  background: transparent;
  border: none;
  cursor: pointer;
}

.taxon-ac-item:hover,
.taxon-ac-item--active {
  background: rgba(94, 234, 212, 0.1);
}

.taxon-ac-item strong {
  display: block;
  font-weight: 600;
  color: var(--text);
}

.taxon-ac-item span {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.75rem 1rem;
}

.btn-reset {
  padding: 0.62rem 1.15rem;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
}

.btn-reset:hover {
  color: var(--text);
  border-color: rgba(94, 234, 212, 0.35);
  background: rgba(94, 234, 212, 0.06);
}

.btn-reset:focus-visible,
.btn-run:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(94, 234, 212, 0.35);
}

.btn-run {
  padding: 0.62rem 1.35rem;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  color: #0c0f14;
  background: linear-gradient(135deg, #5eead4, #38bdf8);
  border: none;
  border-radius: 10px;
  cursor: pointer;
}

.btn-run:hover {
  filter: brightness(1.06);
}

footer.note {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.hidden {
  display: none !important;
}

.btn-run:disabled {
  opacity: 0.65;
  cursor: wait;
}

.results-panel {
  margin-top: 1.25rem;
}

.results-heading {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.results-status {
  margin: 0 0 0.85rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  min-height: 1.35rem;
}

.results-status--error {
  color: #f87171;
}

.table-scroll {
  overflow-x: auto;
  margin: 0 -0.25rem;
  padding: 0 0.25rem;
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
  line-height: 1.4;
}

.results-table th,
.results-table td {
  padding: 0.45rem 0.5rem;
  border-bottom: 1px solid rgba(94, 234, 212, 0.1);
  text-align: left;
  vertical-align: top;
}

.results-table thead th {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-dim);
  background: rgba(14, 19, 28, 0.65);
}

.results-table tbody tr:hover {
  background: rgba(94, 234, 212, 0.04);
}

.results-table .pair-num {
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}

.results-table .seq-cell {
  min-width: 9.5rem;
}

.primer-seq {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  word-break: break-all;
  color: var(--text);
}

.diagram-hint {
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.diagram-heading {
  margin: 0 0 0.65rem;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.pair-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.85rem;
}

.pbd-pair-btn {
  padding: 0.35rem 0.75rem;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
}

.pbd-pair-btn:hover {
  color: var(--text);
  border-color: rgba(94, 234, 212, 0.35);
}

.pbd-pair-btn--active {
  color: #0c0f14;
  background: linear-gradient(135deg, #5eead4, #38bdf8);
  border-color: transparent;
}

.pbd-pair-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.diagram-wrap {
  overflow-x: auto;
  margin: 0 -0.25rem;
  padding: 0.25rem;
}

.pbd-svg {
  display: block;
  width: 100%;
  min-width: 640px;
  height: auto;
}

.pbd-title {
  fill: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.pbd-subtitle {
  fill: var(--text-muted);
  font-size: 11px;
}

.pbd-axis-label {
  fill: var(--accent-dim);
  font-size: 11px;
  font-weight: 600;
}

.pbd-axis {
  stroke: rgba(94, 234, 212, 0.25);
  stroke-width: 1;
}

.pbd-coord {
  fill: var(--text-muted);
  font-size: 10px;
  font-family: var(--font-mono);
}

.pbd-seg--utr5 {
  fill: rgba(56, 189, 248, 0.45);
  stroke: rgba(56, 189, 248, 0.7);
  stroke-width: 0.5;
}

.pbd-seg--exon {
  fill: rgba(94, 234, 212, 0.55);
  stroke: rgba(94, 234, 212, 0.85);
  stroke-width: 0.5;
}

.pbd-seg--utr3 {
  fill: rgba(167, 139, 250, 0.45);
  stroke: rgba(167, 139, 250, 0.7);
  stroke-width: 0.5;
}

.pbd-seg--raw {
  fill: rgba(94, 234, 212, 0.35);
  stroke: rgba(94, 234, 212, 0.55);
  stroke-width: 0.5;
}

.pbd-seg-label {
  fill: #0c0f14;
  font-size: 9px;
  font-weight: 600;
  pointer-events: none;
}

.pbd-intron {
  stroke: rgba(139, 152, 171, 0.55);
  stroke-width: 1.5;
}

.pbd-product {
  fill: rgba(250, 204, 21, 0.12);
  stroke: rgba(250, 204, 21, 0.35);
  stroke-width: 0.5;
}

.pbd-primer--fwd {
  fill: #5eead4;
  stroke: #2dd4bf;
  stroke-width: 0.5;
}

.pbd-primer--rev {
  fill: #fb923c;
  stroke: #f97316;
  stroke-width: 0.5;
}

.pbd-primer-label {
  fill: var(--text-muted);
  font-size: 9px;
  font-family: var(--font-mono);
}

.pbd-legend-text {
  fill: var(--text-muted);
  font-size: 10px;
}

.results-table tbody tr {
  cursor: pointer;
}

.results-table tbody tr.results-row--selected {
  background: rgba(94, 234, 212, 0.1);
  outline: 1px solid rgba(94, 234, 212, 0.25);
}
