:root {
  --page-bg: #f2f4f6;
  --panel-bg: #ffffff;
  --line: #dce4e8;
  --text: #2b3137;
  --muted: #6f7c85;
  --blue: #238db7;
  --blue-dark: #176f93;
  --blue-soft: #d9eef7;
  --blue-bar: #cfeaf6;
  --lavender: #e6e4f9;
  --green: #2d9b62;
  --green-soft: #e8f5ee;
  --orange: #d67b1f;
  --orange-soft: #fff2e2;
  --red: #bd4b4b;
  --red-soft: #fbeaea;
  --shadow: 0 8px 24px rgba(33, 54, 66, 0.08);
  --radius: 4px;
  --font: "Segoe UI", Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.page-shell {
  width: min(1180px, calc(100% - 24px));
  margin: 0 auto 32px;
}

.hero {
  min-height: 225px;
  margin-top: 10px;
  padding: 30px 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  border: 1px solid #e2e5e7;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 77% 40%, rgba(42, 165, 196, 0.08), transparent 32%),
    linear-gradient(135deg, #fbfbfb 0%, #f6f7f8 100%);
}

.hero-copy {
  position: relative;
  z-index: 2;
  flex: 1 1 58%;
}

.eyebrow {
  margin-bottom: 5px;
  color: var(--blue-dark);
  font-size: 0.77rem;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.brand-script {
  color: #2e7b9b;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.1rem, 7vw, 5.2rem);
  font-style: italic;
  line-height: 1;
  letter-spacing: -0.06em;
  text-shadow: 0 3px 0 rgba(55, 137, 169, 0.08);
}

.brand-subtitle {
  margin-top: 8px;
  color: #71818a;
  font-size: clamp(1rem, 2vw, 1.35rem);
  letter-spacing: 0.08em;
}

.enzyme-art {
  flex: 0 1 430px;
  min-width: 300px;
}

.enzyme-art svg {
  width: 100%;
  height: auto;
  overflow: visible;
  filter: drop-shadow(0 8px 12px rgba(35, 70, 83, 0.15));
}

.enzyme-art .ribbon {
  fill: none;
  stroke: url(#ribbonA);
  stroke-linecap: round;
  filter: url(#shadow);
}

.enzyme-art .thick {
  stroke-width: 18;
}

.enzyme-art .thin {
  stroke-width: 10;
}

.enzyme-art .second {
  stroke-width: 13;
  opacity: 0.9;
}

.enzyme-art circle {
  fill: #2d86c5;
  stroke: #fff;
  stroke-width: 3;
}

.enzyme-art .cofactor {
  fill: #63c530;
}

.enzyme-art .cofactor-core {
  fill: #f8d62c;
}

.main-nav {
  margin: 16px 0;
  min-height: 46px;
  display: flex;
  align-items: stretch;
  gap: 2px;
  border: 1px solid #e1e5e7;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 2px 6px rgba(48, 68, 79, 0.04);
}

.main-nav a {
  padding: 12px 16px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #66757e;
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.main-nav a:hover,
.main-nav a:focus {
  color: var(--blue-dark);
  background: #f5fbfd;
  border-bottom-color: var(--blue);
}

.main-nav span {
  color: var(--blue);
  font-weight: 700;
}

.welcome-panel,
.server-section {
  margin-bottom: 18px;
  border: 1px solid #cfe4ec;
  border-radius: var(--radius);
  background: var(--panel-bg);
  box-shadow: 0 2px 7px rgba(40, 64, 76, 0.04);
}

.welcome-panel {
  padding: 30px 18px 28px;
}

.welcome-panel h1 {
  max-width: 1020px;
  margin: 0 0 12px;
  color: #30363a;
  font-size: clamp(1.7rem, 3vw, 2.25rem);
  font-weight: 400;
  line-height: 1.2;
}

.lead {
  max-width: 970px;
  margin: 0 0 24px;
  color: #56646c;
  font-size: 1.02rem;
}

.version-line {
  padding-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  color: #4b5961;
  font-size: 0.88rem;
  border-top: 1px solid #edf0f1;
}

.section-title {
  padding: 8px 14px;
  color: #37758e;
  background: var(--blue-bar);
  font-size: 0.97rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.server-section > form,
.server-section > .batch-layout,
.server-section > .status-toolbar,
.server-section > .status-grid,
.server-section > .documentation-grid,
.server-section > .technical-details,
.server-section > .prediction-report {
  margin-left: 15px;
  margin-right: 15px;
}

.server-section > form,
.batch-layout {
  padding-top: 16px;
  padding-bottom: 24px;
}

.subsection-title {
  margin: 10px 0 15px;
  padding: 3px 8px;
  color: #4e5d6c;
  background:
    linear-gradient(90deg, var(--lavender) 0 48%, transparent 48% 100%);
  font-size: 0.92rem;
  font-weight: 700;
}

.form-grid {
  margin-bottom: 20px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 28px;
}

.form-grid.wide-left {
  grid-template-columns: minmax(0, 2fr) minmax(240px, 0.85fr);
}

.field {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-wide {
  grid-column: 1 / -1;
}

.field > span {
  color: #303a40;
  font-size: 0.9rem;
  font-weight: 650;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 40px;
  padding: 9px 11px;
  color: #273238;
  border: 1px solid #cfd7dc;
  border-radius: 3px;
  background: #fff;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field textarea {
  min-height: 170px;
  resize: vertical;
  font-family: "Consolas", "Courier New", monospace;
  font-size: 0.86rem;
  line-height: 1.45;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(35, 141, 183, 0.12);
}

.field small {
  color: #77848c;
  font-size: 0.78rem;
  line-height: 1.4;
}

#sequence-count {
  float: right;
  color: var(--blue-dark);
  font-weight: 650;
}

.form-actions {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button {
  min-height: 40px;
  padding: 9px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 3px;
  cursor: pointer;
  text-decoration: none;
  font-weight: 650;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:disabled {
  opacity: 0.55;
  cursor: wait;
  transform: none;
}

.button.primary {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
  box-shadow: 0 4px 10px rgba(35, 141, 183, 0.18);
}

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

.button.secondary {
  color: var(--blue-dark);
  background: #f5fbfd;
  border-color: #bcd9e5;
}

.message {
  min-height: 24px;
  margin-top: 14px;
  padding: 0;
  font-size: 0.9rem;
}

.message.success,
.message.error,
.message.info {
  padding: 9px 12px;
  border-radius: 3px;
}

.message.success {
  color: #226d49;
  background: var(--green-soft);
  border: 1px solid #bfe2d0;
}

.message.error {
  color: #8e3838;
  background: var(--red-soft);
  border: 1px solid #efc4c4;
}

.message.info {
  color: #7b571e;
  background: var(--orange-soft);
  border: 1px solid #efcf9d;
}

.hidden {
  display: none !important;
}

.prediction-report {
  margin-bottom: 24px;
  padding: 20px 0 0;
  border-top: 1px solid #e7ecef;
}

.report-heading {
  margin-bottom: 16px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.report-heading h2 {
  margin: 1px 0 0;
  font-size: 1.55rem;
  font-weight: 500;
}

.report-kicker {
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.request-id {
  color: #7a878f;
  font-family: "Consolas", "Courier New", monospace;
  font-size: 0.75rem;
  word-break: break-all;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.metric-card {
  min-height: 164px;
  padding: 16px;
  border: 1px solid #dbe4e8;
  border-radius: 4px;
  background: linear-gradient(180deg, #fff 0%, #f9fbfc 100%);
  box-shadow: 0 5px 14px rgba(51, 75, 86, 0.06);
}

.metric-label {
  min-height: 46px;
  color: #67767e;
  font-size: 0.84rem;
  font-weight: 650;
}

.metric-value {
  margin: 9px 0 8px;
  color: #26363e;
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  font-weight: 650;
  letter-spacing: -0.03em;
}

.metric-unit {
  color: #849098;
  font-size: 0.78rem;
}

.configuration-card {
  text-align: center;
}

.configuration-badge {
  width: 74px;
  height: 74px;
  margin: 2px auto 5px;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 50%;
  background: var(--blue);
  font-family: Georgia, serif;
  font-size: 2.5rem;
  font-weight: 700;
  box-shadow: 0 7px 18px rgba(35, 141, 183, 0.25);
}

.probability-track {
  height: 8px;
  margin: 11px 0 8px;
  overflow: hidden;
  border-radius: 99px;
  background: #e5ebee;
}

.probability-track span {
  width: 0;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, #2b91b8, #48b985);
  transition: width 0.35s ease;
}

.probability-track.large {
  height: 11px;
  margin: 0;
}

.stereo-report {
  margin-top: 14px;
  padding: 14px 16px;
  display: grid;
  gap: 11px;
  border: 1px solid #dde6ea;
  border-radius: 4px;
  background: #fbfcfd;
}

.stereo-row {
  display: grid;
  grid-template-columns: 48px 1fr 72px;
  align-items: center;
  gap: 12px;
}

.stereo-row strong {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.report-columns {
  margin: 16px 0;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 14px;
}

.report-columns article,
.information-box,
.documentation-grid article {
  padding: 15px;
  border: 1px solid #dce5e9;
  border-radius: 4px;
  background: #fff;
}

.report-columns h3,
.information-box h3,
.documentation-grid h3 {
  margin: 0 0 10px;
  color: #375c6c;
  font-size: 1rem;
}

.summary-list {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(120px, 0.7fr) 1.3fr;
  gap: 7px 12px;
}

.summary-list dt {
  color: #75828a;
}

.summary-list dd {
  margin: 0;
  color: #2f3a40;
  overflow-wrap: anywhere;
}

.warning-list {
  margin: 0;
  padding-left: 20px;
  color: #5e5e50;
}

.warning-list li + li {
  margin-top: 6px;
}

.technical-details {
  margin-top: 13px;
  margin-bottom: 18px;
  border: 1px solid #dce5e9;
  border-radius: 3px;
  background: #fbfcfc;
}

.technical-details summary {
  padding: 10px 12px;
  color: #436879;
  cursor: pointer;
  font-weight: 650;
}

.technical-details pre {
  max-height: 420px;
  margin: 0;
  padding: 14px;
  overflow: auto;
  color: #26343a;
  background: #f5f7f8;
  border-top: 1px solid #e1e7ea;
  font-family: "Consolas", "Courier New", monospace;
  font-size: 0.78rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.batch-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(260px, 0.8fr);
  gap: 22px;
}

.upload-box {
  min-height: 150px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: #5e6c74;
  border: 2px dashed #b9d3de;
  border-radius: 4px;
  background: #f8fcfd;
  cursor: pointer;
  text-align: center;
}

.upload-box:hover {
  border-color: var(--blue);
}

.upload-box input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-icon {
  color: var(--blue);
  font-size: 2rem;
  line-height: 1;
}

.information-box code {
  margin: 4px 5px 4px 0;
  padding: 3px 7px;
  display: inline-block;
  color: #315e72;
  background: #eaf4f8;
  border-radius: 3px;
}

.information-box p {
  color: #68767e;
}

.status-toolbar {
  padding: 15px 0 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.status-toolbar p {
  margin: 0;
  color: #65737b;
}

.status-grid {
  padding: 12px 0 5px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.status-card {
  padding: 14px;
  border: 1px solid #dce5e9;
  border-radius: 4px;
  background: #fff;
}

.status-card h3 {
  margin: 0 0 8px;
  color: #405e6b;
  font-size: 0.94rem;
}

.status-card .status-value {
  color: #26363d;
  font-size: 1.05rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.status-card .status-note {
  margin-top: 6px;
  color: #7a878e;
  font-size: 0.78rem;
}

.status-dot {
  width: 9px;
  height: 9px;
  margin-right: 6px;
  display: inline-block;
  border-radius: 50%;
  background: #9aa7ad;
}

.status-dot.ok {
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(45, 155, 98, 0.13);
}

.status-dot.bad {
  background: var(--red);
  box-shadow: 0 0 0 3px rgba(189, 75, 75, 0.13);
}

.status-placeholder {
  color: #7a878d;
}

.documentation-grid {
  padding: 16px 0 22px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.documentation-grid p {
  margin: 0;
  color: #65747c;
}

footer {
  margin-top: 18px;
  padding: 16px 10px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 24px;
  color: #7a858b;
  font-size: 0.8rem;
  border-top: 1px solid #d9e0e3;
}

@media (max-width: 900px) {
  .hero {
    min-height: 190px;
    padding: 28px 32px;
  }

  .enzyme-art {
    max-width: 330px;
    min-width: 250px;
  }

  .main-nav {
    overflow-x: auto;
  }

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

  .batch-layout,
  .report-columns {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 680px) {
  .page-shell {
    width: min(100% - 12px, 1180px);
  }

  .hero {
    min-height: 170px;
    padding: 24px 22px;
  }

  .enzyme-art {
    display: none;
  }

  .brand-script {
    font-size: 3.1rem;
  }

  .main-nav a {
    padding: 11px 12px;
    font-size: 0.86rem;
  }

  .welcome-panel {
    padding: 23px 14px;
  }

  .form-grid,
  .form-grid.wide-left,
  .metric-grid,
  .status-grid,
  .documentation-grid {
    grid-template-columns: 1fr;
  }

  .field-wide {
    grid-column: auto;
  }

  .report-heading,
  .status-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .summary-list dd {
    margin-bottom: 6px;
  }
}


.report-tools {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

@media (max-width: 680px) {
  .report-tools {
    align-items: flex-start;
  }
}
