:root {
  --page: #eef6ff;
  --page-deep: #e4f1ff;
  --surface: rgba(255, 255, 255, 0.84);
  --surface-solid: #ffffff;
  --ink: #17324d;
  --ink-strong: #0c2540;
  --muted: #62768a;
  --faint: #91a2b4;
  --line: rgba(54, 100, 146, 0.17);
  --line-strong: rgba(54, 100, 146, 0.30);
  --blue: #3187ec;
  --blue-dark: #176dcc;
  --cyan: #41b8d6;
  --mint: #49b995;
  --violet: #7c70e8;
  --red: #ed6671;
  --shadow: 0 28px 70px rgba(55, 104, 156, 0.14);
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--page);
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 82% 10%, rgba(92, 178, 245, 0.21), transparent 28%),
    radial-gradient(circle at 10% 74%, rgba(114, 218, 203, 0.16), transparent 30%),
    linear-gradient(135deg, #e8f3ff 0%, #f5f9ff 46%, #e9f8fa 100%);
  background-attachment: fixed;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

::selection { color: #fff; background: var(--blue); }
button, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

.page-glow {
  position: fixed;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(51, 109, 167, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(51, 109, 167, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.62), transparent 76%);
}

.site-header,
main,
footer {
  position: relative;
  z-index: 2;
  width: min(calc(100% - 80px), 1440px);
  margin-inline: auto;
}

.site-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 82px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  justify-self: start;
  color: var(--ink-strong);
  font-size: 19px;
  font-weight: 750;
  letter-spacing: 0.08em;
}

.brand small {
  padding-left: 11px;
  border-left: 1px solid var(--line-strong);
  color: var(--faint);
  font: 8px var(--mono);
  letter-spacing: 0.16em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
}

.brand-mark img { display: block; width: 31px; height: 31px; object-fit: contain; }

nav { display: flex; gap: 32px; }
nav a { color: var(--muted); font-size: 11px; transition: color 0.2s; }
nav a:hover { color: var(--blue-dark); }

.header-status { display: flex; align-items: center; justify-self: end; gap: 18px; }
.visit-counter { padding-right: 18px; border-right: 1px solid var(--line); color: var(--faint); font: 8px var(--mono); letter-spacing: 0.10em; white-space: nowrap; }
.visit-counter b { color: var(--blue-dark); font-weight: 650; }

.server-ready {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-self: end;
  color: var(--muted);
  font: 8px var(--mono);
  letter-spacing: 0.14em;
}

.server-ready i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 5px rgba(73, 185, 149, 0.12), 0 0 13px rgba(73, 185, 149, 0.55);
}

main { min-height: calc(100vh - 82px); }

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 540px);
  align-items: center;
  gap: clamp(52px, 8vw, 132px);
  min-height: calc(100vh - 154px);
  padding: 66px 0 92px;
}

.workspace:not(.view-active) { display: none; }
.intro { max-width: 790px; }

.paper-tag {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font: 9px var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.paper-tag span {
  padding: 6px 10px;
  border: 1px solid rgba(49, 135, 236, 0.30);
  border-radius: 999px;
  color: var(--blue-dark);
  background: rgba(255, 255, 255, 0.54);
}

h1 {
  margin: 28px 0 25px;
  color: var(--ink-strong);
  font-size: clamp(56px, 6.15vw, 94px);
  font-weight: 430;
  line-height: 0.96;
  letter-spacing: -0.069em;
}

.intro h1 em {
  color: var(--blue);
  font-style: normal;
  font-weight: 490;
}

.hero-copy {
  max-width: 610px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.route-visual {
  position: relative;
  width: min(100%, 650px);
  height: 188px;
  margin-top: 28px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.70), rgba(229, 244, 255, 0.56));
  box-shadow: 0 18px 42px rgba(55, 104, 156, 0.10), inset 0 0 0 1px var(--line);
  backdrop-filter: blur(12px);
}

.route-visual #route-field {
  position: absolute;
  inset: 31px 0 28px;
  width: 100%;
  height: calc(100% - 59px);
  pointer-events: none;
}

.route-visual-head,
.route-visual-labels {
  position: absolute;
  z-index: 2;
  left: 15px;
  right: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.route-visual-head {
  top: 12px;
  color: var(--faint);
  font: 7px var(--mono);
  letter-spacing: 0.11em;
}

.route-visual-head b { color: var(--blue); font-weight: 600; }

.route-visual-labels {
  bottom: 10px;
  color: var(--muted);
  font: 7px var(--mono);
  letter-spacing: 0.04em;
}

.route-visual-labels span { display: flex; align-items: center; gap: 6px; }
.route-visual-labels b { color: var(--blue); font-weight: 550; }
.atom { width: 7px; height: 7px; border-radius: 50%; }
.atom.oxygen { background: var(--red); }
.atom.carbon { background: var(--cyan); }
.atom.product { background: var(--violet); }

.workflow-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 650px;
  margin-top: 28px;
  border-top: 1px solid var(--line-strong);
}

.workflow-summary > div {
  display: grid;
  grid-template-columns: 28px 1fr;
  min-height: 78px;
  padding: 17px 15px 0 0;
}

.workflow-summary span { color: var(--blue); font: 8px var(--mono); }
.workflow-summary strong { color: var(--ink); font-size: 11px; font-weight: 650; }
.workflow-summary small { grid-column: 2; margin-top: 5px; color: var(--faint); font-size: 9px; line-height: 1.4; }

.query-panel {
  padding: 27px 30px 28px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(72, 125, 177, 0.10);
  backdrop-filter: blur(18px);
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.panel-heading div { display: flex; align-items: center; gap: 13px; }
.panel-heading span,
.panel-heading small { color: var(--faint); font: 8px var(--mono); letter-spacing: 0.14em; }
.panel-heading span { color: var(--blue); }
.panel-heading strong { color: var(--ink-strong); font-size: 16px; font-weight: 650; }
.panel-intro { margin: 18px 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.panel-intro code { padding: 2px 5px; border-radius: 4px; color: var(--blue-dark); background: rgba(49, 135, 236, 0.08); font: 9px var(--mono); }

.input-mode-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-top: 16px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(231, 242, 253, 0.55);
}

.input-mode-tabs button {
  padding: 8px 5px;
  border: 0;
  border-radius: 7px;
  color: var(--faint);
  background: transparent;
  font: 8px var(--mono);
  letter-spacing: 0.06em;
  transition: 0.2s ease;
}

.input-mode-tabs button:hover { color: var(--blue-dark); }
.input-mode-tabs button.active { color: var(--blue-dark); background: rgba(255, 255, 255, 0.94); box-shadow: 0 4px 13px rgba(44, 97, 148, 0.10); }
.input-mode-panel[hidden] { display: none; }

.example-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.example-row > span { margin-right: 3px; color: var(--faint); font: 8px var(--mono); text-transform: uppercase; }

.example-chip {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--blue-dark);
  background: rgba(237, 246, 255, 0.82);
  font-size: 9px;
  transition: 0.2s ease;
}

.example-chip:hover { border-color: rgba(49, 135, 236, 0.42); background: #fff; transform: translateY(-1px); }

.query-panel label {
  display: block;
  margin-bottom: 9px;
  color: var(--muted);
  font: 8px var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.query-panel textarea {
  display: block;
  width: 100%;
  min-height: 126px;
  resize: vertical;
  padding: 16px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  outline: 0;
  color: var(--ink-strong);
  background: rgba(247, 251, 255, 0.90);
  font: 11px/1.7 var(--mono);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.query-panel textarea:focus {
  border-color: rgba(49, 135, 236, 0.62);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(49, 135, 236, 0.09);
}

.query-panel textarea.invalid { border-color: rgba(237, 102, 113, 0.75); box-shadow: 0 0 0 4px rgba(237, 102, 113, 0.08); }

.input-meta {
  display: flex;
  justify-content: space-between;
  min-height: 33px;
  padding: 9px 2px 5px;
  color: var(--faint);
  font: 8px var(--mono);
}

.input-meta > span:first-child { display: flex; align-items: center; gap: 7px; }
.input-meta i { width: 6px; height: 6px; border-radius: 50%; background: #adbac6; transition: background 0.2s; }
.input-meta i.ready { background: var(--mint); box-shadow: 0 0 0 4px rgba(73, 185, 149, 0.10); }
.input-meta b { font-weight: 500; }
.form-error { min-height: 18px; margin: 0 0 7px; color: #d84859; font: 9px var(--mono); }

.predict-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 17px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(120deg, var(--blue-dark), var(--blue));
  box-shadow: 0 12px 25px rgba(49, 135, 236, 0.22);
  font-size: 11px;
  font-weight: 700;
  transition: transform 0.2s, box-shadow 0.2s;
}

.predict-button:hover { transform: translateY(-2px); box-shadow: 0 16px 30px rgba(49, 135, 236, 0.28); }
.predict-button span { display: flex; align-items: center; gap: 12px; }
.predict-button small { opacity: 0.65; font: 7px var(--mono); letter-spacing: 0.12em; }
.predict-button > i { font-size: 17px; font-style: normal; font-weight: 400; }
.predict-button.compact { min-height: 44px; width: auto; min-width: 190px; }
a.predict-button { text-decoration: none; }

.secondary-button {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--blue-dark);
  background: rgba(246, 251, 255, 0.9);
  font: 600 9px var(--mono);
  transition: 0.2s ease;
}

.secondary-button:hover { border-color: rgba(49, 135, 236, 0.45); background: #fff; transform: translateY(-1px); }
.drawer-panel .panel-intro, .batch-panel .panel-intro { margin-bottom: 13px; }
.batch-quota { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 13px; padding: 10px 12px; border: 1px solid rgba(49, 135, 236, 0.18); border-radius: 9px; background: rgba(232, 244, 255, 0.64); }
.batch-quota span { color: var(--faint); font: 7px var(--mono); letter-spacing: 0.10em; }
.batch-quota strong { color: var(--blue-dark); font: 600 8px var(--mono); text-align: right; }
.jsme-container { position: relative; width: 100%; height: 335px; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 11px; background: #fff; }
.jsme-container iframe { border: 0 !important; }
.drawer-loading { display: grid; place-items: center; align-content: center; gap: 11px; height: 100%; color: var(--faint); font: 8px var(--mono); }
.drawer-loading i { width: 22px; height: 22px; border: 2px solid rgba(49, 135, 236, 0.16); border-top-color: var(--blue); border-radius: 50%; animation: spin 0.8s linear infinite; }
.drawer-actions, .batch-actions { display: flex; justify-content: space-between; gap: 12px; }

.batch-drop {
  display: grid !important;
  place-items: center;
  min-height: 185px;
  margin: 0 !important;
  padding: 22px;
  border: 1px dashed rgba(49, 135, 236, 0.42);
  border-radius: 12px;
  color: var(--muted) !important;
  background: rgba(239, 247, 255, 0.62);
  text-align: center;
  text-transform: none !important;
  cursor: pointer;
  transition: 0.2s ease;
}

.batch-drop:hover, .batch-drop.dragging { border-color: var(--blue); background: rgba(230, 243, 255, 0.88); }
.batch-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.batch-upload-icon { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid rgba(49, 135, 236, 0.26); border-radius: 50%; color: var(--blue); background: #fff; font: 19px var(--mono); }
.batch-drop strong { max-width: 100%; overflow: hidden; color: var(--ink); font: 600 10px var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.batch-drop small { color: var(--faint); font: 8px var(--mono); letter-spacing: 0.04em; }

.score-guide { display: grid; grid-template-columns: auto 1fr auto; align-items: end; gap: 10px; margin-top: 23px; }
.score-guide > div { display: grid; gap: 3px; }
.score-guide > div:last-child { text-align: right; }
.score-guide span { color: var(--blue-dark); font: 8px var(--mono); }
.score-guide b { color: var(--faint); font-size: 8px; font-weight: 500; }
.score-guide > i { position: relative; height: 3px; margin-bottom: 12px; border-radius: 9px; background: linear-gradient(90deg, var(--mint), #f0b767, var(--red)); }
.score-guide em { position: absolute; left: 50%; top: -4px; width: 1px; height: 11px; background: var(--ink); }
.canonical-note { display: flex; gap: 10px; margin: 17px 0 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.canonical-note > i { color: var(--mint); font-style: normal; font-weight: 700; }

.loading-view { grid-template-columns: 1fr minmax(390px, 500px); }
.eyebrow { color: var(--blue); font: 8px var(--mono); letter-spacing: 0.16em; }
.loading-copy h2 { margin: 24px 0 19px; color: var(--ink-strong); font-size: clamp(48px, 5.4vw, 78px); font-weight: 430; line-height: 1; letter-spacing: -0.06em; }
.loading-copy > p { color: var(--muted); font: 10px var(--mono); letter-spacing: 0.06em; }

.loading-stages { max-width: 550px; margin-top: 38px; border-top: 1px solid var(--line); }
.loading-stages > div { display: grid; grid-template-columns: 42px 1fr auto; align-items: center; min-height: 48px; border-bottom: 1px solid var(--line); color: var(--faint); transition: color 0.3s; }
.loading-stages span { font: 8px var(--mono); }
.loading-stages b { font-size: 10px; font-weight: 550; }
.loading-stages i { width: 8px; height: 8px; border: 1px solid var(--line-strong); border-radius: 50%; }
.loading-stages > div.active { color: var(--blue-dark); }
.loading-stages > div.active i { border-color: var(--blue); box-shadow: inset 0 0 0 2px #fff; background: var(--blue); }
.loading-stages > div.complete { color: var(--mint); }
.loading-stages > div.complete i { border-color: var(--mint); background: var(--mint); }

.loading-card {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.56);
  box-shadow: var(--shadow), inset 0 0 0 1px var(--line);
  backdrop-filter: blur(15px);
}

.loading-molecule { position: absolute; inset: 14% 15%; animation: breathe 2.2s ease-in-out infinite; }
.loading-molecule i { position: absolute; z-index: 2; width: 18px; height: 18px; border: 4px solid #fff; border-radius: 50%; background: var(--blue); box-shadow: 0 4px 12px rgba(45, 115, 180, 0.22); }
.loading-molecule i:nth-child(1) { left: 20%; top: 24%; }
.loading-molecule i:nth-child(2) { left: 43%; top: 12%; background: var(--cyan); }
.loading-molecule i:nth-child(3) { left: 67%; top: 25%; background: var(--red); }
.loading-molecule i:nth-child(4) { left: 67%; top: 54%; background: var(--violet); }
.loading-molecule i:nth-child(5) { left: 43%; top: 68%; }
.loading-molecule i:nth-child(6) { left: 19%; top: 55%; background: var(--mint); }
.loading-molecule i:nth-child(7) { left: 43%; top: 40%; background: #fff; border-color: var(--blue); }
.loading-molecule b { position: absolute; z-index: 1; height: 2px; width: 27%; transform-origin: left; background: rgba(69, 124, 178, 0.42); }
.loading-molecule b:nth-of-type(1) { left: 23%; top: 28%; transform: rotate(-25deg); }
.loading-molecule b:nth-of-type(2) { left: 47%; top: 18%; transform: rotate(26deg); }
.loading-molecule b:nth-of-type(3) { left: 70%; top: 30%; transform: rotate(90deg); }
.loading-molecule b:nth-of-type(4) { left: 69%; top: 58%; transform: rotate(151deg); }
.loading-molecule b:nth-of-type(5) { left: 46%; top: 72%; transform: rotate(205deg); }
.loading-molecule b:nth-of-type(6) { left: 22%; top: 59%; transform: rotate(268deg); }

.loading-number { z-index: 3; display: flex; align-items: baseline; color: var(--ink-strong); }
.loading-number strong { font: 48px var(--mono); letter-spacing: -0.08em; }
.loading-number span { color: var(--blue); font: 11px var(--mono); }
.loading-card > small { position: absolute; bottom: 27px; color: var(--faint); font: 8px var(--mono); letter-spacing: 0.08em; }
.progress-track { position: absolute; left: 28px; right: 28px; bottom: 55px; height: 3px; overflow: hidden; border-radius: 8px; background: rgba(49, 135, 236, 0.10); }
.progress-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--mint), var(--blue), var(--violet)); transition: width 0.35s ease; }

.result-view { display: none; min-height: calc(100vh - 82px); padding: 34px 0 68px; opacity: 0; transform: translateY(12px); transition: opacity 0.35s, transform 0.35s; }
.result-view.view-active { display: block; opacity: 1; transform: none; }
.batch-result-view { display: none; min-height: calc(100vh - 82px); padding: 34px 0 68px; opacity: 0; transform: translateY(12px); transition: opacity 0.35s, transform 0.35s; }
.batch-result-view.view-active { display: block; opacity: 1; transform: none; }
.result-topline { display: flex; align-items: center; justify-content: space-between; padding: 10px 0 26px; }
.result-topline > div { display: flex; align-items: center; gap: 14px; }
.result-topline span,
.section-number { color: var(--faint); font: 8px var(--mono); letter-spacing: 0.14em; }
.result-topline strong { color: var(--ink); font: 550 9px var(--mono); letter-spacing: 0.06em; }
.result-topline button,
.result-actions button { padding: 8px 0; border: 0; border-bottom: 1px solid var(--line-strong); color: var(--blue-dark); background: none; font: 9px var(--mono); }

.result-grid { display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.76); border-radius: 20px 20px 0 0; background: var(--surface); box-shadow: var(--shadow); backdrop-filter: blur(18px); }
.molecule-panel,
.score-panel { min-height: 520px; padding: 25px 30px; }
.molecule-panel { border-right: 1px solid var(--line); }
.molecule-panel img { display: block; width: 100%; height: 330px; margin: 10px 0; object-fit: contain; mix-blend-mode: multiply; }
.smiles-pair { display: grid; gap: 11px; padding-top: 17px; border-top: 1px solid var(--line); }
.smiles-pair > div { display: grid; grid-template-columns: 88px 1fr; align-items: start; }
.smiles-pair span { color: var(--faint); font: 7px var(--mono); letter-spacing: 0.14em; }
.smiles-pair code { overflow-wrap: anywhere; color: var(--muted); font: 9px/1.5 var(--mono); }

.score-layout { display: grid; grid-template-columns: 205px 1fr; align-items: center; gap: 38px; margin-top: 58px; }
.score-ring { --score: 0deg; display: grid; place-items: center; width: 205px; height: 205px; border-radius: 50%; background: conic-gradient(var(--blue) 0 var(--score), rgba(49, 135, 236, 0.10) var(--score) 360deg); box-shadow: 0 16px 36px rgba(49, 135, 236, 0.13); }
.score-ring::before { content: ""; grid-area: 1/1; width: 176px; height: 176px; border-radius: 50%; background: rgba(255, 255, 255, 0.92); box-shadow: inset 0 0 0 1px var(--line); }
.score-ring > div { z-index: 1; grid-area: 1/1; text-align: center; }
.score-ring strong { display: block; color: var(--ink-strong); font: 39px var(--mono); letter-spacing: -0.07em; }
.score-ring span { color: var(--faint); font: 8px var(--mono); letter-spacing: 0.13em; }
.class-badge { display: inline-block; padding: 5px 9px; border: 1px solid rgba(73, 185, 149, 0.55); border-radius: 999px; color: #238566; background: rgba(73, 185, 149, 0.08); font: 8px var(--mono); letter-spacing: 0.14em; }
.class-badge.hard { border-color: rgba(237, 102, 113, 0.58); color: #cf4452; background: rgba(237, 102, 113, 0.08); }
.score-copy h2 { margin: 16px 0 12px; color: var(--ink-strong); font-size: 29px; font-weight: 470; letter-spacing: -0.04em; }
.score-copy p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.scale-wrap { margin-top: 50px; }
.scale-labels { display: flex; justify-content: space-between; margin-bottom: 9px; color: var(--faint); font: 7px var(--mono); letter-spacing: 0.08em; }
.scale { position: relative; height: 6px; border-radius: 9px; background: linear-gradient(90deg, var(--mint), #f0b767 50%, var(--red)); }
.scale b { position: absolute; left: 50%; top: -5px; width: 1px; height: 16px; background: rgba(23, 50, 77, 0.52); }
.scale i { position: absolute; left: 0; top: -6px; z-index: 2; width: 5px; height: 18px; border: 2px solid #fff; border-radius: 4px; background: var(--ink-strong); box-shadow: 0 3px 9px rgba(19, 49, 77, 0.32); transition: left 0.75s cubic-bezier(0.2, 0.8, 0.2, 1); }
.decision-note { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; margin-top: 34px; padding-top: 18px; border-top: 1px solid var(--line); }
.decision-note span { color: var(--faint); font: 7px var(--mono); letter-spacing: 0.13em; }
.decision-note strong { color: var(--blue-dark); font: 600 9px var(--mono); }
.decision-note p { grid-column: 1/-1; margin: 0; color: var(--muted); font-size: 9px; line-height: 1.5; }

.descriptor-row { display: grid; grid-template-columns: repeat(6, 1fr); overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.76); border-top: 1px solid var(--line); border-radius: 0 0 20px 20px; background: rgba(255, 255, 255, 0.74); box-shadow: 0 20px 45px rgba(55, 104, 156, 0.09); }
.descriptor-row > div { min-height: 112px; padding: 21px; border-right: 1px solid var(--line); }
.descriptor-row > div:last-child { border-right: 0; }
.descriptor-row span { display: block; color: var(--faint); font: 7px var(--mono); letter-spacing: 0.14em; }
.descriptor-row strong { display: block; margin-top: 19px; color: var(--ink-strong); font: 550 20px var(--mono); }
.descriptor-row small { display: block; margin-top: 5px; color: var(--faint); font-size: 8px; }

.interpretation-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 32px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--line); }
.interpretation-grid article { padding: 24px; background: rgba(255, 255, 255, 0.68); }
.interpretation-grid span,
.route-planner-head > div > span { color: var(--blue); font: 8px var(--mono); letter-spacing: 0.12em; }
.interpretation-grid h3 { margin: 14px 0 10px; color: var(--ink-strong); font-size: 15px; font-weight: 620; }
.interpretation-grid p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.65; }

.route-planner { margin-top: 32px; padding: 30px; border: 1px solid rgba(255, 255, 255, 0.8); border-radius: 20px; background: rgba(255, 255, 255, 0.76); box-shadow: 0 20px 50px rgba(55, 104, 156, 0.10); backdrop-filter: blur(15px); }
.route-planner-head { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 50px; }
.route-planner-head h2 { margin: 12px 0 8px; color: var(--ink-strong); font-size: 27px; font-weight: 470; letter-spacing: -0.035em; }
.route-planner-head p { max-width: 750px; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.65; }
#plan-route { display: flex; align-items: center; justify-content: space-between; gap: 25px; min-width: 190px; padding: 14px 17px; border: 1px solid var(--blue); border-radius: 10px; color: var(--blue-dark); background: rgba(232, 244, 255, 0.74); font-size: 10px; font-weight: 650; transition: 0.2s; }
#plan-route:hover:not(:disabled) { color: #fff; background: var(--blue); transform: translateY(-2px); box-shadow: 0 12px 25px rgba(49, 135, 236, 0.20); }
#plan-route:disabled { opacity: 0.46; }
#plan-route i { font-style: normal; font-size: 16px; }

.route-job { margin-top: 26px; padding: 20px; border: 1px solid var(--line); border-radius: 13px; background: rgba(237, 246, 255, 0.72); }
.route-job-status { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; }
.route-spinner { width: 20px; height: 20px; border: 2px solid rgba(49, 135, 236, 0.18); border-top-color: var(--blue); border-radius: 50%; animation: spin 0.8s linear infinite; }
.route-job-status > div { display: grid; gap: 4px; }
.route-job-status strong { color: var(--ink); font-size: 10px; font-weight: 620; }
.route-job-status small { color: var(--faint); font: 8px var(--mono); }
.route-job-status > b { color: var(--blue-dark); font: 600 11px var(--mono); }
.route-progress { height: 4px; margin-top: 15px; overflow: hidden; border-radius: 9px; background: rgba(49, 135, 236, 0.11); }
.route-progress i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--cyan), var(--blue), var(--violet)); transition: width 0.5s ease; }

.route-output { margin-top: 27px; }
.route-summary { display: flex; align-items: center; justify-content: space-between; gap: 25px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.route-summary > div { display: grid; gap: 5px; }
.route-summary strong { color: var(--ink-strong); font-size: 15px; font-weight: 650; }
.route-summary span { color: var(--muted); font: 8px var(--mono); }
.route-summary > b { padding: 6px 10px; border-radius: 999px; color: #238566; background: rgba(73, 185, 149, 0.12); font: 8px var(--mono); letter-spacing: 0.08em; }
.route-summary > b.not-found { color: #bf5540; background: rgba(237, 151, 102, 0.13); }
.route-message { margin: 20px 0 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.route-steps { display: grid; gap: 13px; margin-top: 20px; }
.route-step { display: grid; grid-template-columns: 68px minmax(170px, 240px) 34px 1fr; align-items: center; gap: 16px; padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: rgba(247, 251, 255, 0.78); }
.route-step-index { color: var(--blue); font: 8px var(--mono); letter-spacing: 0.08em; }
.route-product { display: grid; min-width: 0; gap: 5px; }
.route-product img { width: 100%; height: 96px; object-fit: contain; mix-blend-mode: multiply; }
.route-product code,
.route-reactants code { overflow-wrap: anywhere; color: var(--muted); font: 7px/1.4 var(--mono); }
.route-arrow { color: var(--blue); text-align: center; font-size: 18px; }
.route-reactants { display: grid; gap: 7px; }
.route-reactants > span { color: var(--faint); font: 7px var(--mono); letter-spacing: 0.10em; }
.route-reactants > div { display: grid; gap: 5px; padding-left: 10px; border-left: 2px solid rgba(49, 135, 236, 0.22); }
.route-probability { grid-column: 2/-1; color: var(--faint); font: 7px var(--mono); }

.result-actions { display: flex; align-items: center; gap: 25px; padding-top: 24px; }
.result-actions span { color: #238566; font: 8px var(--mono); }

.batch-result-card { padding: 30px; border: 1px solid rgba(255, 255, 255, 0.8); border-radius: 20px; background: rgba(255, 255, 255, 0.78); box-shadow: var(--shadow); backdrop-filter: blur(15px); }
.batch-status-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.batch-status-head > div { display: flex; align-items: center; gap: 14px; }
.batch-status-head > div > div { display: grid; gap: 4px; }
.batch-status-head strong { color: var(--ink); font-size: 12px; font-weight: 650; }
.batch-status-head small { color: var(--faint); font: 8px var(--mono); }
.batch-status-head > b { color: var(--blue-dark); font: 600 12px var(--mono); }
.batch-summary { grid-template-columns: repeat(5, 1fr); gap: 1px; margin-top: 27px; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: var(--line); }
.batch-summary:not([hidden]) { display: grid; }
.batch-summary div { padding: 16px; background: rgba(247, 251, 255, 0.94); }
.batch-summary span { display: block; color: var(--faint); font: 7px var(--mono); letter-spacing: 0.10em; }
.batch-summary strong { display: block; margin-top: 8px; color: var(--ink-strong); font: 600 18px var(--mono); }
.batch-table-wrap { margin-top: 24px; overflow: auto; border: 1px solid var(--line); border-radius: 13px; }
.batch-table-wrap table { width: 100%; min-width: 850px; border-collapse: collapse; background: rgba(255, 255, 255, 0.72); }
.batch-table-wrap th { padding: 12px 14px; border-bottom: 1px solid var(--line); color: var(--faint); background: rgba(237, 246, 255, 0.78); text-align: left; font: 7px var(--mono); letter-spacing: 0.10em; }
.batch-table-wrap td { max-width: 310px; padding: 12px 14px; border-bottom: 1px solid var(--line); color: var(--muted); font: 8px/1.45 var(--mono); overflow-wrap: anywhere; }
.batch-table-wrap tr:last-child td { border-bottom: 0; }
.batch-table-wrap .batch-class { width: 42px; color: #238566; font-weight: 700; }
.batch-table-wrap .batch-class.hard { color: #cf4452; }
.batch-table-wrap .batch-error-cell { color: #d84859; }
.batch-result-actions { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 22px; }
.batch-result-actions p { margin: 0; color: var(--faint); font: 8px var(--mono); }
.batch-result-card > .form-error { margin-top: 18px; }

.about-section {
  padding: 84px 0 72px;
  border-top: 1px solid var(--line);
}

.about-hero {
  position: relative;
  display: grid;
  grid-template-columns: 92px minmax(0, 1.25fr) minmax(330px, 0.75fr);
  align-items: center;
  gap: 30px;
  overflow: hidden;
  padding: 37px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(231, 244, 255, 0.94), rgba(255, 255, 255, 0.78));
  box-shadow: var(--shadow), inset 0 0 0 1px var(--line);
}

.about-hero::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -120px;
  width: 330px;
  height: 330px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(65, 184, 214, 0.17), transparent 68%);
  pointer-events: none;
}

.about-icon {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border: 1px solid rgba(49, 135, 236, 0.18);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 14px 28px rgba(49, 135, 236, 0.12);
}

.about-icon img { width: 62px; height: 62px; object-fit: contain; }
.about-hero > div:nth-child(2) { position: relative; z-index: 1; }
.about-hero > div:nth-child(2) > span,
.about-hero aside > span,
.about-grid article > span,
.affiliation-row > div > span {
  color: var(--blue);
  font: 8px var(--mono);
  letter-spacing: 0.13em;
}

.about-hero h2 {
  margin: 10px 0 12px;
  color: var(--ink-strong);
  font-size: 38px;
  font-weight: 480;
  letter-spacing: -0.045em;
}

.about-hero p {
  max-width: 700px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.75;
}

.about-hero aside {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.67);
}

.about-hero aside strong { color: var(--ink); font-size: 11px; font-weight: 650; line-height: 1.55; }
.about-hero aside small { color: var(--faint); font: 8px var(--mono); }

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

.about-grid article {
  min-height: 300px;
  padding: 27px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.70);
  box-shadow: 0 16px 36px rgba(55, 104, 156, 0.08), inset 0 0 0 1px var(--line);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.about-grid article:hover { transform: translateY(-3px); box-shadow: 0 22px 42px rgba(55, 104, 156, 0.13), inset 0 0 0 1px var(--line); }
.about-grid h3 { margin: 18px 0 13px; color: var(--ink-strong); font-size: 19px; font-weight: 610; letter-spacing: -0.025em; }
.about-grid p { margin: 0 0 13px; color: var(--muted); font-size: 10px; line-height: 1.72; }

.architecture-flow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin: 24px 0 20px;
}

.architecture-flow b {
  padding: 8px 9px;
  border: 1px solid rgba(49, 135, 236, 0.20);
  border-radius: 8px;
  color: var(--blue-dark);
  background: rgba(234, 245, 255, 0.80);
  font: 600 8px var(--mono);
}

.architecture-flow i { color: var(--faint); font-style: normal; font-size: 10px; }
.metric-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 20px 0 17px; }
.metric-row > div { padding: 11px; border: 1px solid var(--line); border-radius: 9px; background: rgba(244, 250, 255, 0.80); }
.metric-row strong { display: block; color: var(--blue-dark); font: 600 18px var(--mono); }
.metric-row small { color: var(--faint); font: 7px var(--mono); }

.affiliation-row {
  display: grid;
  grid-template-columns: 0.7fr repeat(3, 1fr);
  margin-top: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.68);
}

.affiliation-row > div,
.affiliation-row > a {
  display: grid;
  align-content: center;
  gap: 8px;
  min-height: 118px;
  padding: 22px;
  border-right: 1px solid var(--line);
}

.affiliation-row > a:last-child { border-right: 0; }
.affiliation-row strong { color: var(--ink-strong); font-size: 11px; font-weight: 650; }
.affiliation-row span { color: var(--muted); font-size: 8px; line-height: 1.5; }
.affiliation-row > a { transition: background 0.2s; }
.affiliation-row > a:hover { background: rgba(230, 244, 255, 0.76); }

.method-strip { display: grid; grid-template-columns: 110px 1fr auto; align-items: center; gap: 30px; padding: 26px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); }
.method-strip > span { color: var(--blue); font: 8px var(--mono); letter-spacing: 0.15em; }
.method-strip p { margin: 0; font-size: 10px; line-height: 1.6; }
.method-strip div { font: 7px var(--mono); letter-spacing: 0.08em; }
footer { display: flex; justify-content: space-between; padding: 28px 0 38px; color: var(--faint); font: 8px var(--mono); letter-spacing: 0.08em; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes breathe { 50% { transform: scale(1.04); } }

@media (max-width: 1050px) {
  .workspace { grid-template-columns: 1fr minmax(380px, 470px); gap: 45px; }
  h1 { font-size: clamp(52px, 6vw, 70px); }
  .score-layout { grid-template-columns: 170px 1fr; gap: 25px; }
  .score-ring { width: 170px; height: 170px; }
  .score-ring::before { width: 145px; height: 145px; }
  .route-step { grid-template-columns: 58px minmax(150px, 210px) 26px 1fr; }
}

@media (max-width: 900px) {
  .site-header, main, footer { width: calc(100% - 40px); }
  .site-header { grid-template-columns: 1fr auto; }
  .site-header nav { display: none; }
  .workspace { grid-template-columns: 1fr; gap: 52px; padding-top: 60px; }
  .query-panel { max-width: 650px; }
  .loading-view { grid-template-columns: 1fr; }
  .loading-card { width: min(100%, 500px); justify-self: center; }
  .result-grid { grid-template-columns: 1fr; }
  .molecule-panel { border-right: 0; border-bottom: 1px solid var(--line); }
  .descriptor-row { grid-template-columns: repeat(3, 1fr); }
  .descriptor-row > div:nth-child(3) { border-right: 0; }
  .descriptor-row > div:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
  .interpretation-grid { grid-template-columns: 1fr; }
  .about-hero { grid-template-columns: 82px 1fr; }
  .about-hero aside { grid-column: 1/-1; }
  .about-grid { grid-template-columns: 1fr; }
  .about-grid article { min-height: auto; }
  .affiliation-row { grid-template-columns: 1fr 1fr; }
  .affiliation-row > div,
  .affiliation-row > a { border-bottom: 1px solid var(--line); }
  .affiliation-row > a:nth-child(2) { border-right: 0; }
  .affiliation-row > a:nth-child(3),
  .affiliation-row > a:nth-child(4) { border-bottom: 0; }
  .route-planner-head { grid-template-columns: 1fr; gap: 22px; }
  #plan-route { min-width: 220px; }
  .method-strip { grid-template-columns: 80px 1fr; }
  .method-strip div { display: none; }
}

@media (max-width: 620px) {
  .site-header, main, footer { width: calc(100% - 28px); }
  .site-header { height: 70px; }
  .brand small, .server-ready { display: none; }
  .header-status { gap: 0; }
  .visit-counter { padding-right: 0; border-right: 0; }
  .workspace { min-height: calc(100vh - 70px); padding: 45px 0 75px; }
  .paper-tag { align-items: flex-start; flex-direction: column; font-size: 7px; }
  h1 { font-size: 47px; }
  .hero-copy { font-size: 12px; }
  .route-visual { height: 173px; }
  .route-visual-labels { flex-wrap: wrap; gap: 6px; }
  .workflow-summary { grid-template-columns: 1fr; }
  .workflow-summary > div { min-height: 62px; border-bottom: 1px solid var(--line); }
  .query-panel { padding: 22px 18px; border-radius: 16px; }
  .panel-heading small { display: none; }
  .example-row { align-items: flex-start; flex-wrap: wrap; }
  .loading-copy h2 { font-size: 44px; }
  .result-view { padding-top: 18px; }
  .batch-result-view { padding-top: 18px; }
  .result-topline strong { display: none; }
  .molecule-panel, .score-panel { min-height: auto; padding: 21px 16px; }
  .molecule-panel img { height: 255px; }
  .score-layout { grid-template-columns: 1fr; justify-items: center; gap: 26px; margin-top: 36px; }
  .score-copy { text-align: center; }
  .descriptor-row { grid-template-columns: repeat(2, 1fr); }
  .descriptor-row > div:nth-child(3) { border-right: 1px solid var(--line); }
  .descriptor-row > div:nth-child(even) { border-right: 0; }
  .descriptor-row > div:nth-child(4) { border-bottom: 1px solid var(--line); }
  .route-planner { padding: 22px 16px; }
  .route-planner-head h2 { font-size: 23px; }
  #plan-route { width: 100%; }
  .route-step { grid-template-columns: 1fr; gap: 10px; }
  .route-product img { height: 130px; }
  .route-arrow { transform: rotate(90deg); }
  .route-probability { grid-column: 1; }
  .drawer-actions, .batch-actions, .batch-result-actions { align-items: stretch; flex-direction: column; }
  .predict-button.compact { width: 100%; }
  .batch-summary { grid-template-columns: repeat(2, 1fr); }
  .batch-result-card { padding: 20px 15px; }
  .about-section { padding: 62px 0 55px; }
  .about-hero { grid-template-columns: 1fr; padding: 25px 20px; }
  .about-icon { width: 68px; height: 68px; }
  .about-icon img { width: 52px; height: 52px; }
  .about-hero h2 { font-size: 32px; }
  .affiliation-row { grid-template-columns: 1fr; }
  .affiliation-row > div,
  .affiliation-row > a { min-height: 95px; border-right: 0; border-bottom: 1px solid var(--line) !important; }
  .affiliation-row > a:last-child { border-bottom: 0 !important; }
  .method-strip { grid-template-columns: 1fr; gap: 11px; }
  footer { flex-direction: column; gap: 9px; }
}

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