:root {
  --background: #f5f7fb;
  --surface: #ffffff;
  --surface-alt: #f8faff;
  --border: #e4e9f2;
  --border-strong: #d3dbea;
  --heading: #101828;
  --text: #475467;
  --text-muted: #667085;
  --primary: #365cf5;
  --primary-dark: #264ad7;
  --primary-soft: #eef3ff;
  --accent: #12b76a;
  --accent-soft: #ecfdf3;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.03), 0 10px 30px rgba(16, 24, 40, 0.05);
  --radius: 16px;
  font-family: Inter, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--heading);
  background: var(--background);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--background);
  color: var(--heading);
}

a {
  color: inherit;
  text-decoration: none;
}

p,
h1,
h2,
h3,
h4 {
  margin: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 76px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
}

.header-container {
  width: min(1200px, calc(100% - 48px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  position: relative;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--primary);
}

.brand-mark::before,
.brand-mark::after,
.brand-mark span {
  content: "";
  position: absolute;
  border-radius: 8px;
  background: #fff;
}

.brand-mark::before {
  width: 5px;
  height: 24px;
}

.brand-mark::after {
  width: 24px;
  height: 5px;
}

.brand-mark span {
  width: 8px;
  height: 8px;
  top: 9px;
  right: 9px;
  border: 2px solid var(--primary);
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-copy strong {
  font-size: 20px;
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.brand-copy small {
  color: var(--text-muted);
  font-size: 12px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 30px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
}

.site-nav a {
  transition: color 0.2s ease;
}

.site-nav a:hover,
.site-nav .active {
  color: var(--heading);
}

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

.header-action,
.primary-button,
.secondary-button,
.module-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.header-action,
.primary-button,
.module-button.is-active {
  color: #fff;
  background: var(--primary);
  border: 1px solid var(--primary);
}

.header-action:hover,
.primary-button:hover,
.module-button.is-active:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.header-action {
  min-height: 42px;
  padding: 0 18px;
}

.language-toggle {
  width: auto;
  min-width: 78px;
  min-height: 42px;
  padding: 0 14px;
  border-color: var(--border-strong);
  color: #344054;
  background: var(--surface);
  font-size: 13px;
}

.language-toggle:hover {
  border-color: #b8c5db;
  color: var(--heading);
  background: var(--surface-alt);
}

main {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
}

.landing {
  position: relative;
  min-height: calc(100vh - 76px);
  display: grid;
  align-items: center;
  margin: 0 calc(50% - 50vw);
  overflow: hidden;
  isolation: isolate;
}

.landing img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.landing::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(245, 247, 251, 0.94) 0%, rgba(245, 247, 251, 0.77) 38%, rgba(245, 247, 251, 0.08) 72%);
}

.landing-copy {
  width: min(1200px, calc(100% - 48px));
  display: grid;
  gap: 22px;
  margin: 0 auto;
  padding: 80px 0;
}

.landing-copy p {
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.landing-copy h1 {
  max-width: 620px;
  font-size: clamp(64px, 8vw, 118px);
  line-height: 0.95;
  letter-spacing: -0.07em;
}

.landing-copy .primary-button {
  width: max-content;
  margin-top: 8px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) 420px;
  align-items: center;
  gap: 74px;
  min-height: 548px;
  padding: 62px 0 54px;
}

.eyebrow {
  width: max-content;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 21px;
  padding: 8px 13px;
  border: 1px solid #d0fadf;
  border-radius: 999px;
  color: #067647;
  background: var(--accent-soft);
  font-size: 13px;
  font-weight: 500;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.hero h1 {
  max-width: 650px;
  margin-bottom: 20px;
  font-size: clamp(42px, 4.2vw, 54px);
  line-height: 1.16;
  letter-spacing: -0.07em;
}

.hero-description {
  max-width: 625px;
  color: var(--text);
  font-size: 17px;
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 35px;
}

.secondary-button,
.module-button {
  border: 1px solid var(--border-strong);
  color: #344054;
  background: var(--surface);
}

.secondary-button:hover,
.module-button:hover {
  border-color: #b8c5db;
  background: var(--surface-alt);
}

.hero-panel,
.tool-card,
.workspace,
.query-panel,
.result-panel {
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-panel {
  border-radius: 20px;
  padding: 24px;
}

.hero-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.hero-panel-header p,
.metric-card p,
.metric-card span {
  color: var(--text-muted);
  font-size: 13px;
}

.hero-panel-header h2 {
  margin-top: 5px;
  font-size: 20px;
  letter-spacing: -0.03em;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--text-muted);
  background: #f2f4f7;
  font-size: 12px;
  font-weight: 600;
}

.badge-success {
  color: #067647;
  background: var(--accent-soft);
}

.metric-card {
  display: grid;
  gap: 6px;
  margin-bottom: 24px;
  padding: 22px;
  border-radius: 14px;
  background: linear-gradient(120deg, #f5f8ff, #eef3ff);
}

.metric-card strong {
  margin: 1px 0;
  color: var(--primary);
  font-size: 32px;
  letter-spacing: -0.06em;
}

.workflow {
  display: grid;
  gap: 16px;
}

.workflow-item {
  display: flex;
  align-items: center;
  gap: 13px;
}

.workflow-item span {
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 12px;
  font-weight: 700;
}

.workflow-item p {
  color: #344054;
  font-size: 14px;
}

.platform-section {
  margin-bottom: 58px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  margin-bottom: 25px;
}

.section-label {
  margin-bottom: 8px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-heading h2,
.workspace-header h2 {
  font-size: 28px;
  letter-spacing: -0.045em;
}

.section-heading > p {
  max-width: 455px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.7;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.tool-card {
  min-height: 205px;
  display: flex;
  flex-direction: column;
  padding: 22px;
  border-radius: var(--radius);
}

.tool-card.is-active {
  border-color: #d9e2ff;
}

.tool-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 21px;
}

.tool-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 13px;
  font-weight: 700;
}

.tool-icon.muted {
  color: var(--text-muted);
  background: #f2f4f7;
}

.tool-card h3 {
  margin-bottom: 9px;
  font-size: 18px;
  letter-spacing: -0.025em;
}

.tool-card p {
  flex: 1;
  margin-bottom: 18px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
}

.tool-card a {
  color: var(--primary);
  font-size: 14px;
  font-weight: 600;
}

.disabled-link {
  color: #98a2b3;
  font-size: 14px;
  font-weight: 500;
}

.workspace {
  margin-bottom: 48px;
  padding: 30px;
  border-radius: 20px;
}

.workspace-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  margin-bottom: 27px;
}

.workspace-header h2 {
  margin-bottom: 9px;
}

.workspace-header > div:first-child > p:not(.section-label) {
  color: var(--text);
  font-size: 14px;
  line-height: 1.65;
}

.workspace-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 7px;
}

.meta-text {
  color: var(--text-muted);
  font-size: 13px;
  white-space: nowrap;
}

.model-selection {
  margin: 0 0 22px;
  padding: 22px 23px 23px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.model-selection legend {
  float: left;
  width: 100%;
  margin-bottom: 6px;
  padding: 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.model-help {
  clear: both;
  margin-bottom: 18px;
  color: var(--text-muted);
  font-size: 13px;
}

.model-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.model-radio {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
}

.model-card {
  position: relative;
  min-height: 98px;
  display: grid;
  grid-template-columns: 22px 1fr auto;
  column-gap: 13px;
  row-gap: 5px;
  align-items: start;
  padding: 17px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-alt);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.model-card:hover {
  border-color: #c7d4ff;
}

.model-radio:focus-visible + .model-card {
  outline: 3px solid rgba(54, 92, 245, 0.13);
}

.model-radio:checked + .model-card {
  border-color: var(--primary);
  background: #f5f8ff;
  box-shadow: 0 0 0 1px var(--primary);
}

.model-check {
  grid-row: 1 / span 2;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  border: 2px solid var(--border-strong);
  border-radius: 50%;
  background: var(--surface);
}

.model-radio:checked + .model-card .model-check {
  border: 6px solid var(--primary);
}

.model-card strong {
  color: var(--heading);
  font-size: 14px;
  font-weight: 600;
}

.model-card small {
  grid-column: 2;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
}

.model-card .badge {
  grid-column: 3;
  grid-row: 1 / span 2;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(490px, 1fr) 300px;
  gap: 20px;
}

.query-panel,
.result-panel {
  border-radius: var(--radius);
  box-shadow: none;
  padding: 23px;
}

.query-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.panel-title {
  grid-column: 1 / -1;
  margin-bottom: 1px;
}

.panel-title h3 {
  margin-bottom: 6px;
  font-size: 17px;
  letter-spacing: -0.025em;
}

.panel-title p {
  color: var(--text-muted);
  font-size: 13px;
}

.sample-column {
  display: grid;
  align-content: start;
  gap: 13px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-alt);
}

.column-label {
  margin-bottom: 1px;
  color: #344054;
  font-size: 13px;
  font-weight: 650;
}

label {
  display: grid;
  gap: 7px;
}

label span {
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
}

input,
textarea,
select,
button {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  padding: 11px 12px;
  color: var(--heading);
  background: var(--surface);
  font: inherit;
  font-size: 14px;
}

input:focus,
textarea:focus,
select:focus {
  outline: 3px solid rgba(54, 92, 245, 0.13);
  border-color: var(--primary);
}

.sequence-input {
  min-height: 112px;
  resize: vertical;
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  line-height: 1.55;
}

.compact-sequence {
  min-height: 92px;
}

.na-field[hidden] {
  display: none;
}

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

button {
  width: auto;
  min-width: 144px;
  border-color: var(--primary);
  color: #fff;
  background: var(--primary);
  cursor: pointer;
  font-weight: 600;
}

button:hover {
  border-color: var(--primary-dark);
  background: var(--primary-dark);
}

.utility-button {
  min-width: 0;
  border-color: var(--border-strong);
  color: #344054;
  background: var(--surface);
}

.utility-button:hover {
  border-color: #b8c5db;
  color: var(--heading);
  background: var(--surface-alt);
}

button:disabled,
button:disabled:hover {
  border-color: var(--border);
  color: #98a2b3;
  background: #f2f4f7;
  cursor: not-allowed;
}

.query-note {
  grid-column: 1 / -1;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
}

.selector-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 20px;
}

.selector-panel,
.selector-summary,
.candidate-results,
.strain-plot-panel,
.strain-detail-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 23px;
}

.selector-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 16px;
}

.selector-panel .panel-title {
  margin-bottom: 0;
}

.selector-panel .form-actions {
  align-self: end;
}

.selector-summary {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.summary-grid {
  display: grid;
  gap: 12px;
}

.summary-card {
  display: grid;
  gap: 5px;
  padding: 15px;
  border-radius: 12px;
  background: var(--surface-alt);
}

.summary-card span {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
}

.summary-card strong {
  color: var(--primary);
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -0.04em;
}

.candidate-results {
  margin-top: 20px;
}

.strain-space-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 20px;
}

.strain-plot-panel {
  min-width: 0;
}

.strain-toolbar {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 220px));
  gap: 14px;
  margin: 18px 0;
}

.strain-space-plot {
  width: 100%;
  min-height: 420px;
  display: block;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f8faff 100%);
}

.strain-axis {
  stroke: #98a2b3;
  stroke-width: 1;
}

.strain-grid-line {
  stroke: #e4e9f2;
  stroke-width: 1;
}

.strain-axis-label {
  fill: var(--text-muted);
  font-size: 12px;
}

.strain-axis-title {
  fill: #344054;
  font-size: 13px;
  font-weight: 700;
}

.strain-point {
  stroke: #fff;
  stroke-width: 2;
  opacity: 0.82;
  cursor: pointer;
  transition: opacity 0.2s ease, stroke-width 0.2s ease;
}

.strain-point:hover,
.strain-point:focus {
  opacity: 1;
  stroke-width: 3;
  outline: none;
}

.strain-detail-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

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

table {
  width: 100%;
  min-width: 850px;
  border-collapse: collapse;
  font-size: 13px;
}

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

th {
  color: #344054;
  background: var(--surface-alt);
  font-size: 12px;
  font-weight: 700;
}

td {
  color: var(--text);
  line-height: 1.45;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.result-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.result-card {
  padding: 18px;
  border-radius: 12px;
  background: linear-gradient(135deg, #f5f8ff 0%, #edf3ff 100%);
}

.result-label {
  margin-bottom: 12px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
}

#prediction-output {
  min-height: 36px;
  color: var(--primary);
  font-size: 25px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.04em;
  word-break: break-word;
}

.score-explanation {
  display: grid;
  gap: 8px;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-alt);
}

.score-explanation h4 {
  font-size: 13px;
  line-height: 1.3;
}

.score-explanation p {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.65;
}

.formula-fraction {
  display: inline-grid;
  grid-template-rows: auto auto;
  align-items: center;
  margin: 0 4px;
  color: var(--text-main);
  font-weight: 650;
  line-height: 1.15;
  text-align: center;
  vertical-align: middle;
}

.formula-fraction span {
  display: block;
  padding: 1px 6px;
  white-space: nowrap;
}

.formula-fraction span:first-child {
  border-bottom: 1px solid currentColor;
}

.score-explanation p + h4 {
  margin-top: 4px;
}

.result-metadata {
  display: grid;
  gap: 7px;
  padding: 0 2px;
}

.result-metadata > p:first-child {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
}

.result-metadata strong {
  color: #344054;
  font-size: 13px;
}

.query-status {
  margin-top: 8px;
  padding: 11px 12px;
  border-radius: 9px;
  color: #344054;
  background: #f2f4f7;
  font-size: 12px;
  line-height: 1.5;
}

.query-status.is-ready {
  color: #067647;
  background: var(--accent-soft);
}

.query-status.is-notice {
  color: #b54708;
  background: #fffaeb;
}

.result-help {
  margin-top: auto;
  padding: 16px;
  border: 1px dashed var(--border-strong);
  border-radius: 12px;
}

.result-help h4 {
  margin-bottom: 8px;
  font-size: 13px;
}

.result-help p {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.65;
}

.site-footer {
  width: min(1200px, calc(100% - 48px));
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin: 0 auto;
  padding: 0 0 34px;
  color: var(--text-muted);
  font-size: 13px;
}

@media (max-width: 1000px) {
  .site-nav {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 36px;
    padding-top: 46px;
  }

  .hero-panel {
    max-width: 520px;
  }

  .tool-grid,
  .workspace-grid,
  .selector-layout,
  .strain-space-layout {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 680px) {
  .site-header {
    height: 68px;
  }

  .header-container,
  main,
  .site-footer {
    width: min(100% - 32px, 1200px);
  }

  .brand-copy small,
  .header-action {
    display: none;
  }

  .header-actions {
    margin-left: auto;
  }

  .hero {
    min-height: 0;
    padding: 39px 0 42px;
  }

  .landing {
    min-height: calc(100vh - 68px);
  }

  .landing::after {
    background: linear-gradient(180deg, rgba(245, 247, 251, 0.94) 0%, rgba(245, 247, 251, 0.79) 47%, rgba(245, 247, 251, 0.14) 100%);
  }

  .landing-copy {
    width: min(100% - 32px, 1200px);
    padding: 56px 0;
  }

  .landing-copy h1 {
    font-size: 58px;
  }

  .hero h1 {
    font-size: 36px;
  }

  .hero-description {
    font-size: 15px;
  }

  .hero-actions,
  .section-heading,
  .workspace-header,
  .form-actions,
  .site-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .tool-grid,
  .query-panel,
  .model-options,
  .selector-panel {
    grid-template-columns: 1fr;
  }

  .workspace {
    padding: 20px;
  }

  .query-panel,
  .result-panel,
  .selector-panel,
  .selector-summary,
  .candidate-results,
  .strain-plot-panel,
  .strain-detail-panel,
  .hero-panel {
    padding: 18px;
  }

  .strain-toolbar {
    grid-template-columns: 1fr;
  }

  button {
    width: 100%;
  }
}
