:root {
  --navy-950: #0a1423;
  --navy-900: #111d31;
  --navy-800: #192a44;
  --ink: #172033;
  --ink-soft: #596579;
  --muted: #8b95a5;
  --canvas: #f3f5f8;
  --surface: #ffffff;
  --surface-soft: #f8fafb;
  --line: #e2e7ed;
  --teal: #12a89d;
  --teal-dark: #087b75;
  --teal-soft: #e8f8f6;
  --blue: #3f72f2;
  --blue-soft: #eef3ff;
  --orange: #e98a3c;
  --green: #2ca96d;
  --red: #d8535f;
  --shadow-sm: 0 1px 3px rgba(14, 29, 50, .06), 0 8px 24px rgba(14, 29, 50, .035);
  --shadow-md: 0 20px 55px rgba(14, 29, 50, .16);
  --radius: 15px;
  --sidebar-width: 244px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
body.modal-open { overflow: hidden; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid rgba(63, 114, 242, .2); outline-offset: 2px; }
.is-hidden { display: none !important; }

.app-shell { min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  width: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  padding: 22px 16px 16px;
  color: #d8e1ef;
  background: linear-gradient(180deg, var(--navy-900), var(--navy-950));
  border-right: 1px solid rgba(255,255,255,.05);
}
.brand-block { display: flex; align-items: center; gap: 11px; padding: 0 9px 22px; }
.brand-mark { width: 40px; height: 40px; display: grid; place-items: center; background: rgba(18,168,157,.12); border: 1px solid rgba(52,210,197,.28); border-radius: 12px; }
.brand-mark svg { width: 30px; fill: none; stroke: #3acbbb; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.brand-mark circle { fill: #3acbbb; stroke: none; }
.brand-name { color: #fff; font-size: 14px; font-weight: 800; letter-spacing: .04em; }
.brand-edition { margin-top: 3px; color: #72849f; font-size: 8px; letter-spacing: .16em; }
.primary-nav { display: grid; gap: 4px; }
.nav-item, .nav-group-toggle {
  width: 100%; height: 43px;
  display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: 7px;
  padding: 0 12px; border: 0; border-radius: 10px;
  color: #91a1b9; background: transparent; text-align: left; font-size: 13px; cursor: pointer; transition: .18s ease;
}
.nav-item:hover, .nav-group-toggle:hover { color: #fff; background: rgba(255,255,255,.05); }
.nav-item.is-active { color: #fff; background: rgba(18,168,157,.14); box-shadow: inset 3px 0 0 #34c4b8; }
.nav-group { display: grid; gap: 2px; }
.nav-group.has-active-child > .nav-group-toggle { color: #d9f5f2; background: rgba(18,168,157,.055); }
.nav-chevron { color: #71849f; font-size: 18px; text-align: center; transform: rotate(0deg); transition: transform .18s ease; }
.nav-group.is-expanded .nav-chevron { transform: rotate(90deg); }
.nav-children { display: grid; gap: 2px; padding: 1px 0 3px 13px; }
.nav-children.is-collapsed { display: none; }
.nav-subitem { height: 35px; grid-template-columns: 17px 1fr auto; padding: 0 10px 0 17px; border-radius: 8px; font-size: 11px; }
.nav-subitem.is-active { box-shadow: inset 2px 0 0 #34c4b8; }
.nav-subitem small { padding: 2px 5px; border-radius: 7px; color: #7fa19f; background: rgba(18,168,157,.08); font-size: 7px; }
.nav-branch-dot { width: 5px; height: 5px; margin-left: 2px; border-radius: 50%; background: #50657e; box-shadow: 0 0 0 3px rgba(80,101,126,.12); }
.nav-subitem.is-active .nav-branch-dot { background: #41c9bc; box-shadow: 0 0 0 3px rgba(65,201,188,.13); }
.nav-icon { color: #70cbc3; font-size: 16px; text-align: center; }
.nav-count { min-width: 20px; padding: 2px 6px; border-radius: 10px; background: rgba(255,255,255,.08); color: #a8b6ca; font-size: 9px; text-align: center; }
.guide-button { margin-top: 16px; display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid rgba(58,202,190,.18); border-radius: 12px; background: rgba(18,168,157,.075); color: #cfe8e5; text-align: left; cursor: pointer; }
.guide-button:hover { background: rgba(18,168,157,.12); }
.guide-icon { width: 27px; height: 27px; display: grid; place-items: center; border: 1px solid rgba(58,202,190,.4); border-radius: 50%; color: #51d4c8; font-weight: 800; }
.guide-button strong, .guide-button small { display: block; }
.guide-button strong { font-size: 10px; }
.guide-button small { margin-top: 2px; color: #788ca8; font-size: 8px; }
.main-area { min-height: 100vh; margin-left: var(--sidebar-width); }
.status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(44,169,109,.12); }
.running-dot { background: var(--orange); box-shadow: 0 0 0 3px rgba(233,138,60,.13); }
.mobile-menu { width: 36px; height: 36px; place-items: center; border: 1px solid var(--line); border-radius: 9px; background: #fff; box-shadow: var(--shadow-sm); cursor: pointer; }
.mobile-menu { display: none; }

.app-view { display: none; padding: 34px 36px 70px; }
.app-view.is-active { display: block; }
.page-heading { max-width: 1260px; margin: 0 auto 24px; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.page-heading h1 { margin: 5px 0 7px; font-size: 28px; line-height: 1.18; letter-spacing: -.03em; }
.page-heading p { margin: 0; color: var(--ink-soft); font-size: 12px; line-height: 1.7; }
.eyebrow, .modal-kicker { color: var(--teal-dark); font-size: 9px; font-weight: 800; letter-spacing: .14em; }
.heading-actions, .run-actions, .result-actions { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; }
.primary-button, .secondary-button, .danger-button, .text-button {
  border-radius: 9px; font-size: 11px; font-weight: 700; cursor: pointer; transition: .16s ease;
}
.primary-button { min-height: 39px; padding: 0 17px; border: 1px solid var(--teal); color: #fff; background: var(--teal); box-shadow: 0 6px 16px rgba(18,168,157,.18); }
.primary-button:hover { background: var(--teal-dark); border-color: var(--teal-dark); transform: translateY(-1px); }
.secondary-button { min-height: 39px; padding: 0 15px; border: 1px solid #d9e0e8; background: #fff; }
.secondary-button:hover { border-color: #aeb9c7; background: #fbfcfd; }
.danger-button { min-height: 39px; padding: 0 15px; border: 1px solid #f0c8cc; color: var(--red); background: #fff7f8; }
.compact { min-height: 32px; padding: 0 12px; font-size: 9px; }
.full-button { width: 100%; }

.workspace-grid { max-width: 1260px; margin: 0 auto; display: grid; grid-template-columns: minmax(0,1fr) 252px; gap: 20px; align-items: start; }
.workspace-content { min-width: 0; display: grid; gap: 17px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.panel-heading { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.panel-heading > div:first-child { display: flex; align-items: center; gap: 11px; }
.panel-heading h2, .run-header h2 { margin: 0 0 4px; font-size: 14px; }
.panel-heading p, .run-header p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.step-index { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; color: var(--teal-dark); background: var(--teal-soft); font-size: 9px; font-weight: 800; }
.complete-index { color: #fff; background: var(--green); }
.section-status, .pipeline-badge, .demo-data-badge { padding: 5px 9px; border-radius: 20px; color: var(--teal-dark); background: var(--teal-soft); font-size: 8px; font-weight: 800; }
.demo-data-badge { color: #8a5a16; background: #fff1dc; }

.input-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 17px 18px 12px; }
.subject-card { min-width: 0; display: grid; grid-template-columns: 42px minmax(0,1fr) auto; align-items: center; gap: 11px; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.file-icon { width: 41px; height: 41px; display: grid; place-items: center; border-radius: 11px; font-size: 14px; font-weight: 850; }
.protein-icon { color: #3867ce; background: var(--blue-soft); }
.ligand-icon { color: var(--teal-dark); background: var(--teal-soft); }
.file-copy { min-width: 0; }
.file-copy span, .file-copy strong, .file-copy small { display: block; }
.field-label { margin-bottom: 3px; color: var(--muted); font-size: 8px; }
.file-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.file-copy small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.text-button { padding: 5px; border: 0; color: var(--blue); background: transparent; white-space: nowrap; }
.text-button:hover { color: #2455c5; }
.text-button.emphasized { color: var(--teal-dark); }
.preset-picker-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 18px 12px; }
.research-control-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 18px 14px; }
.research-control-card { min-width: 0; padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: #fbfcfd; }
.research-control-card > span, .linker-design-loop > div > span, .ligand-property-panel header span { color: var(--teal-dark); font-size: 7px; font-weight: 850; letter-spacing: .08em; }
.research-control-card > strong { display: block; margin: 5px 0; font-size: 10px; }
.research-control-card > p { min-height: 26px; margin: 0 0 10px; color: var(--muted); font-size: 7px; line-height: 1.55; }
.research-control-card label { display: grid; gap: 5px; color: var(--ink-soft); font-size: 8px; font-weight: 750; }
.research-control-card select, .manual-pocket-fields input { width: 100%; min-height: 34px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: #fff; font-size: 8px; }
.manual-pocket-fields { margin-top: 9px; display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; }
.manual-pocket-fields.is-hidden { display: none; }
.preset-control { position: relative; display: grid; grid-template-columns: 110px minmax(0,1fr); align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.preset-control > span { color: var(--ink-soft); font-size: 8px; font-weight: 750; }
.preset-control select { min-width: 0; height: 30px; padding: 0 28px 0 9px; border: 1px solid #d9e0e7; border-radius: 7px; color: var(--ink); background: #f8fafb; font-size: 8px; cursor: pointer; }
.preset-control small { grid-column: 2; margin-top: -5px; color: var(--muted); font-size: 7px; }
.input-preview-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 18px 12px; }
.input-preview-card { min-width: 0; overflow: hidden; border: 1px solid #273a51; border-radius: 12px; background: #101d2d; }
.input-preview-card:fullscreen, .molecule-viewer:fullscreen, .preview-maximized.is-fallback-fullscreen { display: flex; flex-direction: column; width: 100%; height: 100%; border: 0; border-radius: 0; background: #101d2d; }
.preview-maximized.is-fallback-fullscreen { position: fixed !important; inset: 0; z-index: 1000; }
.input-preview-card.preview-maximized .preview-stage, .molecule-viewer.preview-maximized .molecule-scene { flex: 1; width: 100%; height: auto; min-height: 0; }
.input-preview-card.preview-maximized .structure-canvas { min-height: 0; }
.molecule-viewer.preview-maximized .molecule-scene svg { width: 100%; height: 100%; min-height: 0; }
.preview-fullscreen-open { overflow: hidden; }
.input-preview-card header { min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px 8px 12px; border-bottom: 1px solid rgba(255,255,255,.07); }
.input-preview-card header span, .input-preview-card header strong { display: block; }
.input-preview-card header span { color: #667f99; font-size: 6px; font-weight: 800; letter-spacing: .12em; }
.input-preview-card header strong { margin-top: 3px; color: #d9e5f1; font-size: 8px; }
.preview-actions { display: flex; gap: 4px; }
.preview-actions button { width: 26px; height: 26px; border: 1px solid rgba(255,255,255,.1); border-radius: 7px; color: #91a6bc; background: rgba(255,255,255,.04); cursor: pointer; }
.preview-actions button:hover { color: #fff; background: rgba(255,255,255,.09); }
.preview-stage { position: relative; height: 220px; overflow: hidden; background: radial-gradient(circle at 50% 44%, #1b324b, #0c1624 72%); }
.preview-stage svg { width: 100%; height: 100%; display: block; }
.structure-canvas { width: 100%; height: 100%; position: relative; }
.structure-canvas-message { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; color: #8299af; font-size: 8px; text-align: center; }
.drag-tip { position: absolute; right: 10px; bottom: 9px; padding: 4px 7px; border-radius: 10px; color: #6e849b; background: rgba(7,15,25,.55); font-size: 6px; pointer-events: none; }
.preview-orbit ellipse { fill: none; stroke: #4c6c8a; stroke-width: 1; stroke-dasharray: 3 7; opacity: .18; }
.protein-preview-object, .ligand-preview-object { transform-origin: 220px 120px; transition: transform .45s ease; }
.ribbon-shadow { fill: none; stroke: #020914; stroke-width: 18; opacity: .32; filter: url(#protein-shadow); }
.ribbon-main { fill: none; stroke-width: 12; stroke-linecap: round; opacity: .92; }
.ribbon-secondary { fill: none; stroke-width: 7; stroke-linecap: round; opacity: .8; }
.ribbon-secondary.fine { stroke-width: 4; opacity: .66; }
.protein-beads circle { opacity: .9; filter: drop-shadow(0 2px 3px rgba(0,0,0,.28)); }
.preview-bonds line { stroke: #a8bac9; stroke-width: 5; stroke-linecap: round; opacity: .82; }
.preview-atoms { filter: url(#ligand-shadow); }
.preview-caption { fill: #668098; font-size: 8px; font-weight: 650; }
.ligand-property-panel { margin: 0 18px 14px; padding: 13px; border: 1px solid #dce6eb; border-radius: 11px; background: #fbfcfd; }
.ligand-property-panel header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.ligand-property-panel header strong { display: block; margin-top: 4px; font-size: 10px; }
.ligand-property-panel header small { max-width: 290px; color: var(--muted); font-size: 7px; line-height: 1.45; text-align: right; }
.ligand-property-grid { margin-top: 10px; display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 7px; }
.property-chip { min-width: 0; padding: 8px; border-radius: 8px; background: #f0f4f7; }
.property-chip small, .property-chip strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.property-chip small { color: var(--muted); font-size: 7px; }.property-chip strong { margin-top: 3px; font-size: 9px; }
.property-chip.is-warning { color: #7a571d; background: #fff5df; }
.ligand-property-panel > p { margin: 9px 0 0; color: var(--muted); font-size: 7px; line-height: 1.45; }
.linker-design-loop { margin: 0 18px 14px; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 10px 16px; padding: 14px; border: 1px solid #bfe0dc; border-radius: 11px; background: #f5fbfa; }
.linker-design-loop h3 { margin: 4px 0; font-size: 12px; }.linker-design-loop p { margin: 0; color: var(--ink-soft); font-size: 8px; line-height: 1.6; }
.linker-steps { grid-column: 1 / -1; display: flex; align-items: center; gap: 7px; overflow-x: auto; }
.linker-steps span { flex: 0 0 auto; padding: 6px 8px; border-radius: 8px; color: #365a72; background: #fff; font-size: 7px; font-weight: 750; }
.linker-steps i { color: var(--teal); font-style: normal; }
.pipeline-flow { display: grid; grid-template-columns: 1fr 20px 1fr 20px 1fr 20px 1fr; align-items: stretch; gap: 5px; padding: 18px; }
.engine-stage { position: relative; display: grid; grid-template-columns: 42px 1fr; align-items: center; gap: 11px; min-height: 110px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.engine-stage.featured-stage { border-color: #a9ddd8; background: #f4fbfa; }
.quality-symbol b { color: var(--green); font-size: 20px; }
.engine-order { position: absolute; top: 8px; right: 10px; color: #bdc5d0; font-size: 8px; font-weight: 800; }
.engine-symbol { width: 40px; height: 40px; position: relative; display: grid; place-items: center; border-radius: 11px; background: #edf3f8; }
.pocket-symbol span { position: absolute; width: 9px; height: 9px; border-radius: 50%; background: #6291da; }
.pocket-symbol span:nth-child(1) { transform: translate(-9px,-5px); }
.pocket-symbol span:nth-child(2) { transform: translate(7px,-7px); }
.pocket-symbol span:nth-child(3) { transform: translate(2px,9px); }
.docking-symbol { background: var(--teal-soft); }
.docking-symbol span { position: absolute; width: 8px; height: 8px; border: 2px solid var(--teal); border-radius: 50%; }
.docking-symbol span:nth-child(1) { transform: translate(-8px,-5px); }
.docking-symbol span:nth-child(2) { transform: translate(7px,-6px); }
.docking-symbol span:nth-child(3) { transform: translate(1px,9px); }
.affinity-symbol { color: #936324; background: #fff2df; }
.affinity-symbol b { font-size: 12px; }
.engine-copy small, .engine-copy strong, .engine-copy p { display: block; }
.engine-copy small { color: var(--muted); font-size: 8px; }
.engine-copy strong { margin-top: 3px; font-size: 11px; }
.engine-copy p { margin: 5px 0 0; color: var(--ink-soft); font-size: 8px; line-height: 1.5; }
.flow-connector { display: grid; place-items: center; color: #9bb0c2; font-size: 18px; }
.semantic-note { margin: 0 18px 17px; display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border-radius: 9px; color: #5b6b7f; background: #f4f7fa; }
.semantic-note span, .editor-note span { width: 17px; height: 17px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; color: #fff; background: #8496aa; font-size: 9px; font-weight: 800; }
.semantic-note p { margin: 0; font-size: 8px; line-height: 1.55; }

.run-panel { padding: 18px; }
.run-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.run-kicker { display: block; margin-bottom: 4px; color: var(--teal-dark); font-size: 8px; font-weight: 800; letter-spacing: .09em; }
.progress-track { height: 7px; margin-top: 17px; overflow: hidden; border-radius: 9px; background: #edf0f4; }
.progress-fill { width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--teal), #3d82e2); transition: width .35s ease; }
.progress-meta { margin-top: 7px; display: flex; justify-content: space-between; color: var(--muted); font-size: 8px; }
.progress-meta strong { color: var(--teal-dark); }
.stage-list { margin-top: 15px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stage-item { position: relative; min-height: 58px; display: grid; grid-template-columns: 25px 1fr; grid-template-rows: auto auto; column-gap: 8px; align-content: center; padding: 9px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); }
.stage-state { grid-row: 1 / 3; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; color: #7d8999; background: #e9edf2; font-size: 9px; font-weight: 800; }
.stage-item strong { font-size: 9px; }
.stage-item small { overflow: hidden; color: var(--muted); font-size: 7px; line-height: 1.35; white-space: nowrap; text-overflow: ellipsis; }
.stage-item.is-running { border-color: #efbd83; background: #fffaf4; }
.stage-item.is-running .stage-state { color: #fff; background: var(--orange); animation: stagePulse 1.15s infinite; }
.stage-item.is-done { border-color: #bde3d1; background: #f5fbf8; }
.stage-item.is-done .stage-state { color: #fff; background: var(--green); }
.stage-item.is-cancelled { opacity: .5; }
@keyframes stagePulse { 50% { transform: scale(.88); opacity: .65; } }

.task-summary { display: grid; gap: 15px; }
.summary-card { padding: 17px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); }
.sticky-card { position: sticky; top: 105px; }
.summary-title { display: flex; align-items: center; justify-content: space-between; font-size: 11px; font-weight: 750; }
.summary-status { padding: 4px 8px; border-radius: 20px; color: #7b8798; background: #eef1f5; font-size: 8px; }
.summary-status.running { color: #9b641e; background: #fff1dc; }
.summary-status.done { color: #1f8255; background: #e9f8f0; }
.summary-card dl { margin: 15px 0; }
.summary-card dl div { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid #eef1f4; font-size: 8px; }
.summary-card dt { color: var(--muted); }
.summary-card dd { margin: 0; font-weight: 700; text-align: right; }
.privacy-note { color: var(--muted); font-size: 8px; }
.privacy-note { margin: 9px 0 0; text-align: center; }
.science-label { color: #65d2c7; font-size: 8px; font-weight: 800; letter-spacing: .1em; }
.literature-preview-card { position: relative; overflow: hidden; background: linear-gradient(145deg, #fff, #f5fbfa); }
.literature-preview-card::after { content: '⌕'; position: absolute; right: -5px; top: -15px; color: rgba(19,145,135,.055); font-size: 82px; line-height: 1; pointer-events: none; }
.literature-preview-heading { position: relative; z-index: 1; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.literature-preview-heading h3 { margin: 5px 0 0; font-size: 13px; }
.literature-preview-heading > strong { padding: 4px 8px; border-radius: 10px; color: var(--teal-dark); background: var(--teal-soft); font-size: 8px; white-space: nowrap; }
.literature-preview-card > p { position: relative; z-index: 1; margin: 8px 0 11px; color: var(--muted); font-size: 8px; }
.literature-preview-list { position: relative; z-index: 1; display: grid; gap: 6px; }
.literature-preview-item { padding: 9px 10px; border: 1px solid #e2eaec; border-radius: 9px; background: rgba(255,255,255,.88); }
.literature-preview-item span, .literature-preview-item strong, .literature-preview-item small { display: block; }
.literature-preview-item span { color: var(--teal-dark); font-size: 7px; font-weight: 800; }
.literature-preview-item strong { margin: 4px 0; display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: 8px; line-height: 1.45; }
.literature-preview-item small { color: var(--muted); font-size: 7px; }
.literature-preview-empty { position: relative; z-index: 1; margin-top: 7px; padding: 8px; border-radius: 8px; color: #8b682c; background: #fff8e9; font-size: 7px; line-height: 1.5; }
.literature-more-button { position: relative; z-index: 1; width: 100%; margin-top: 10px; display: flex; justify-content: space-between; padding: 9px 2px 2px; border: 0; border-top: 1px solid #e5ecee; color: var(--teal-dark); background: transparent; font-size: 8px; font-weight: 800; cursor: pointer; }

.result-heading { border-bottom: 0; }
.result-tabs { display: flex; gap: 4px; padding: 0 18px; border-bottom: 1px solid var(--line); }
.result-tab { padding: 11px 13px; border: 0; border-bottom: 2px solid transparent; color: var(--muted); background: transparent; font-size: 9px; font-weight: 700; cursor: pointer; }
.result-tab span { margin-left: 3px; padding: 2px 5px; border-radius: 8px; background: #edf1f4; font-size: 7px; }
.result-tab.is-active { color: var(--teal-dark); border-bottom-color: var(--teal); }
.result-workspace { min-height: 400px; display: grid; grid-template-columns: minmax(0,1.4fr) minmax(260px,.8fr); }
.molecule-viewer { position: relative; min-width: 0; border-right: 1px solid var(--line); background: #0f1c2d; }
.viewer-toolbar { height: 40px; display: flex; align-items: center; justify-content: space-between; padding: 0 13px; border-bottom: 1px solid rgba(255,255,255,.08); color: #748aa4; font-size: 7px; letter-spacing: .1em; }
.viewer-toolbar button { width: 25px; height: 25px; margin-left: 3px; border: 1px solid rgba(255,255,255,.1); border-radius: 6px; color: #a9b8ca; background: rgba(255,255,255,.04); cursor: pointer; }
.molecule-scene { position: relative; min-height: 360px; overflow: hidden; }
.molecule-scene canvas { width: 100% !important; height: 100% !important; }
.molecule-scene svg { width: 100%; height: 360px; }
.protein-cloud { fill: #4c75a0; opacity: .17; filter: url(#soft); }
.protein-line { fill: none; stroke: #6085ab; stroke-width: 7; opacity: .35; stroke-linecap: round; }
.protein-line.secondary { stroke: #508c8a; stroke-width: 5; }
.pocket-glow circle { fill: none; stroke: #20c1b3; stroke-width: 2; opacity: .18; }
.pocket-glow circle + circle { opacity: .3; stroke-dasharray: 5 7; }
.ligand-shape line { stroke: #e9b35d; stroke-width: 4; }
.ligand-shape circle { fill: #f1ba62; }
.ligand-shape .atom-n { fill: #5895f0; }
.residue-labels text { fill: #83a9c5; font-size: 11px; font-weight: 700; }
.viewer-legend { position: absolute; z-index: 3; left: 15px; bottom: 13px; display: flex; gap: 12px; color: #9bacc1; font-size: 7px; pointer-events: none; }
.viewer-legend span { display: flex; align-items: center; gap: 5px; }
.viewer-legend i { width: 7px; height: 7px; border-radius: 50%; }
.legend-protein { background: #557ca2; }.legend-pocket { background: #24b8ad; }.legend-ligand { background: #efb45c; }
.scene-pulse svg { animation: scenePulse .6s ease; }
@keyframes scenePulse { 50% { transform: scale(1.025); filter: brightness(1.2); } }
.result-detail { padding: 17px; background: #fbfcfd; }
.detail-summary { padding: 14px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.detail-summary small, .detail-summary strong { display: block; }
.detail-summary small { color: var(--muted); font-size: 8px; }
.detail-summary strong { margin: 5px 0; color: var(--teal-dark); font-size: 22px; }
.detail-summary p { margin: 0; color: var(--ink-soft); font-size: 8px; line-height: 1.6; }
.result-artifact-download { display: inline-block; margin-top: 10px; padding: 7px 9px; border-radius: 7px; color: var(--teal-dark); background: var(--teal-soft); font-size: 8px; font-weight: 800; text-decoration: none; }
.detail-summary.compact-summary { margin-top: 9px; }
.detail-summary.compact-summary strong { font-size: 9px; }
.model-score-grid { display: grid; gap: 9px; }
.quality-summary-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.quality-check-list { grid-column: 1 / -1; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.quality-check-list span { display: inline-block; margin: 3px; padding: 5px 7px; border-radius: 8px; color: #237a53; background: #eaf8f1; font-size: 7px; }
.quality-check-list span.is-failed { color: #9a3d39; background: #fff0ef; }
.interaction-list { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 5px; }
.interaction-list span { padding: 5px 7px; border: 1px solid #dce5eb; border-radius: 8px; color: #46617a; background: #fff; font-size: 7px; }
.result-rerun-button { margin: 0 16px 14px auto; display: block; }
.residue-chips { margin-top: 9px; display: flex; flex-wrap: wrap; gap: 4px; }
.residue-chips span { padding: 4px 6px; border-radius: 6px; color: #37649f; background: #edf4fb; font-size: 7px; font-weight: 700; }
.detail-list { margin-top: 9px; display: grid; gap: 6px; }
.detail-item { width: 100%; display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 7px; padding: 8px; border: 1px solid var(--line); border-radius: 9px; background: #fff; text-align: left; cursor: pointer; }
.detail-item.is-selected { border-color: #83cbc5; background: #f3fbfa; }
.detail-rank { color: #9aa5b3; font-size: 8px; font-weight: 800; }
.detail-item strong, .detail-item small { display: block; }
.detail-item strong { font-size: 8px; }.detail-item small { margin-top: 2px; color: var(--muted); font-size: 7px; }
.detail-value { color: var(--teal-dark); font-size: 8px; font-weight: 800; }
.provenance-grid { margin-top: 9px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.provenance-grid div { min-width: 0; padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.provenance-grid span, .provenance-grid strong { display: block; }
.provenance-grid span { color: var(--muted); font-size: 7px; }
.provenance-grid strong { margin-top: 4px; overflow-wrap: anywhere; font-size: 8px; }

.compact-heading { align-items: center; }
.batch-kpis { max-width: 1260px; margin: 0 auto 17px; display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; }
.batch-kpis article { padding: 16px; border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: var(--shadow-sm); }
.batch-kpis span, .batch-kpis strong, .batch-kpis small { display: block; }
.batch-kpis span { color: var(--muted); font-size: 8px; }
.batch-kpis strong { margin: 5px 0; font-size: 21px; }
.batch-kpis small { color: var(--ink-soft); font-size: 8px; }
.batch-layout { max-width: 1260px; margin: 0 auto; display: grid; grid-template-columns: minmax(0,1.5fr) minmax(270px,.5fr); gap: 17px; }
.simple-heading > div:first-child { display: block; }
.heatmap { display: grid; grid-template-columns: 110px repeat(4,1fr); gap: 5px; padding: 18px; }
.heatmap-corner, .heatmap-head, .heatmap-label { min-height: 34px; display: grid; place-items: center; color: var(--muted); font-size: 8px; font-weight: 700; }
.heatmap-label { justify-content: start; color: var(--ink); }
.heat-cell { min-height: 53px; border: 0; border-radius: 8px; color: #fff; font-size: 10px; font-weight: 800; cursor: pointer; }
.heat-1 { background: #bfdad8; color: #35625f; }.heat-2 { background: #8bc7c1; }.heat-3 { background: #55afa6; }.heat-4 { background: #238f87; }.heat-5 { background: #086e69; }
.heat-pending { color: #9ca6b3; background: #eef1f4; border: 1px dashed #ced5dd; }
.heat-legend { display: flex; align-items: center; justify-content: flex-end; gap: 3px; padding: 0 18px 16px; color: var(--muted); font-size: 7px; }
.heat-legend i { width: 20px; height: 7px; }
.candidate-list { padding: 9px 15px 15px; }
.candidate-list article { display: grid; grid-template-columns: 27px 1fr auto; align-items: center; gap: 7px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.candidate-list article > span { color: #a4aebb; font-size: 8px; font-weight: 800; }
.candidate-list strong, .candidate-list small { display: block; }
.candidate-list strong { font-size: 9px; }.candidate-list small { margin-top: 3px; color: var(--muted); font-size: 7px; }
.candidate-list b { color: var(--teal-dark); font-size: 8px; }

.peptide-coming-soon { max-width: 780px; min-height: 520px; margin: 48px auto 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 50px; border: 1px solid var(--line); border-radius: 18px; background: radial-gradient(circle at 50% 20%, #eefaf8, #fff 58%); box-shadow: var(--shadow-sm); text-align: center; }
.peptide-orbit { position: relative; width: 134px; height: 74px; margin-bottom: 27px; }
.peptide-orbit::before { content: ''; position: absolute; inset: 13px 2px; border: 3px solid #b7deda; border-radius: 50%; transform: rotate(-11deg); }
.peptide-orbit::after { content: ''; position: absolute; inset: 13px 2px; border: 3px solid #aac5e8; border-radius: 50%; transform: rotate(20deg); }
.peptide-orbit span { position: absolute; z-index: 1; width: 13px; height: 13px; border: 3px solid #fff; border-radius: 50%; background: var(--teal); box-shadow: 0 4px 12px rgba(22,143,134,.2); }
.peptide-orbit span:nth-child(1) { left: 6px; top: 32px; }.peptide-orbit span:nth-child(2) { left: 34px; top: 8px; background: #4d87d4; }.peptide-orbit span:nth-child(3) { left: 65px; top: 49px; }.peptide-orbit span:nth-child(4) { right: 28px; top: 10px; background: #4d87d4; }.peptide-orbit span:nth-child(5) { right: 4px; top: 39px; }
.peptide-batch-mark { width: 142px; margin-bottom: 25px; display: grid; gap: 7px; transform: rotate(-3deg); }
.peptide-batch-mark span { display: block; padding: 7px 13px; border: 1px solid #c6e2df; border-radius: 9px; color: #347a74; background: rgba(255,255,255,.82); box-shadow: 0 5px 14px rgba(37,99,114,.07); font-size: 8px; font-weight: 850; letter-spacing: .12em; text-align: left; }
.peptide-batch-mark span:nth-child(2) { margin-left: 18px; border-color: #c7d8ef; color: #4b6f9e; }
.peptide-batch-mark span:nth-child(3) { margin-left: 7px; }
.peptide-status { color: var(--teal-dark); font-size: 8px; font-weight: 850; letter-spacing: .16em; }
.peptide-coming-soon h1 { margin: 13px 0 10px; font-size: 29px; }
.peptide-coming-soon > p { max-width: 530px; margin: 0; color: var(--ink-soft); font-size: 10px; line-height: 1.7; }
.peptide-roadmap { display: flex; align-items: center; gap: 9px; margin: 27px 0 19px; }
.peptide-roadmap span { padding: 8px 10px; border: 1px solid #cfe5e2; border-radius: 8px; color: #2b6f69; background: #f4fbfa; font-size: 8px; font-weight: 750; }
.peptide-roadmap i { color: #9aa7b5; font-size: 10px; font-style: normal; }
.peptide-coming-soon > small { color: var(--muted); font-size: 8px; }
.peptide-literature-panel { max-width: 980px; margin: 18px auto 0; padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: var(--shadow-sm); }
.peptide-literature-panel > header { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 17px; }
.peptide-literature-panel h2 { margin: 6px 0 5px; font-size: 18px; }
.peptide-literature-panel header p { max-width: 620px; margin: 0; color: var(--muted); font-size: 9px; line-height: 1.6; }
.peptide-literature-list { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.peptide-literature-item { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 11px; background: linear-gradient(145deg, #fbfdfd, #f5faf9); }
.peptide-literature-item > span { color: var(--teal-dark); font-size: 7px; font-weight: 850; letter-spacing: .05em; }
.peptide-literature-item strong { margin: 7px 0 9px; display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; font-size: 9px; line-height: 1.5; }
.peptide-literature-item small { color: var(--muted); font-size: 7px; }

.batch-builder-layout { max-width: 1260px; margin: 0 auto; display: grid; grid-template-columns: minmax(0,1fr) 280px; align-items: start; gap: 17px; }
.batch-config-panel { overflow: hidden; }
.batch-protein-picker { display: grid; grid-template-columns: 190px minmax(0,1fr); align-items: center; gap: 20px; padding: 18px; }
.batch-protein-visual { height: 112px; display: grid; place-items: center; overflow: hidden; border-radius: 12px; background: radial-gradient(circle at 50% 45%, #214d65, #10273d 72%); }
.batch-protein-visual svg { width: 88%; height: 88%; }
.batch-protein-visual path { fill: none; stroke: #38bfb3; stroke-width: 6; stroke-linecap: round; opacity: .8; }
.batch-protein-visual path + path { stroke: #4d87d4; stroke-width: 4; opacity: .72; }
.batch-protein-visual circle { fill: #86e0d8; }
.batch-protein-picker label > span, .batch-protein-picker label > small { display: block; }
.batch-protein-picker label > span { margin-bottom: 7px; color: var(--muted); font-size: 8px; font-weight: 750; }
.batch-protein-picker select { width: 100%; height: 41px; padding: 0 11px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: #fff; font-size: 10px; font-weight: 750; }
.batch-protein-picker label > small { margin-top: 7px; color: var(--muted); font-size: 8px; }
.batch-ligand-heading { border-top: 1px solid var(--line); }
.batch-select-actions { display: flex; gap: 5px; }
.batch-select-actions button { padding: 6px 9px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink-soft); background: #fff; font-size: 8px; font-weight: 700; cursor: pointer; }
.batch-select-actions button:hover { color: var(--teal-dark); border-color: #9fd7d2; background: var(--teal-soft); }
.batch-ligand-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; padding: 17px 18px 20px; }
.batch-ligand-option { position: relative; min-width: 0; display: grid; grid-template-columns: 20px 31px minmax(0,1fr); align-items: center; gap: 9px; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: #fff; cursor: pointer; transition: .18s ease; }
.batch-ligand-option:hover { border-color: #9fd7d2; transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.batch-ligand-option.is-selected { border-color: #69c5bc; background: #f2fbfa; box-shadow: inset 0 0 0 1px rgba(36,193,181,.1); }
.batch-ligand-option input { position: absolute; opacity: 0; pointer-events: none; }
.ligand-checkmark { width: 18px; height: 18px; display: grid; place-items: center; border: 1px solid #cbd4dd; border-radius: 5px; color: transparent; background: #fff; font-size: 9px; font-weight: 900; }
.batch-ligand-option.is-selected .ligand-checkmark { color: #fff; border-color: var(--teal); background: var(--teal); }
.ligand-mini-icon { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 8px; color: #5078a3; background: #eef4fa; font-size: 16px; }
.batch-ligand-option strong, .batch-ligand-option small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.batch-ligand-option strong { font-size: 9px; }
.batch-ligand-option small { margin-top: 4px; color: var(--muted); font-size: 7px; }
.batch-ligand-option .batch-evidence { color: #20877f; }
.batch-submit-card { position: sticky; top: 102px; padding: 20px; border: 1px solid #1e3854; border-radius: 14px; color: #e8f0f8; background: linear-gradient(150deg, #102238, #1b3551); box-shadow: var(--shadow-md); }
.batch-summary-label { display: block; color: #91a6bc; font-size: 8px; font-weight: 750; letter-spacing: .08em; }
.batch-submit-card > strong { display: inline-block; margin: 7px 5px 8px 0; color: #fff; font-size: 37px; line-height: 1; }
.batch-submit-card > em { color: #a9bacb; font-size: 9px; font-style: normal; }
.batch-submit-card dl { margin: 9px 0 14px; }
.batch-submit-card dl div { display: flex; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.08); font-size: 8px; }
.batch-submit-card dt { color: #91a6bc; }
.batch-submit-card dd { margin: 0; color: #fff; font-weight: 750; text-align: right; }
.batch-flow-mini { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 14px 0; color: #9fb4ca; font-size: 7px; }
.batch-flow-mini span { padding: 4px 5px; border-radius: 5px; background: rgba(255,255,255,.06); }
.batch-flow-mini i { color: #50c7bc; font-style: normal; }
.batch-submit-card .primary-button:disabled { color: #8091a3; background: #31475d; cursor: not-allowed; box-shadow: none; }
.batch-submit-card > p { margin: 9px 0 0; color: #8fa6bd; font-size: 7px; line-height: 1.5; text-align: center; }
.batch-result-panel { max-width: 1260px; margin: 17px auto 0; overflow: hidden; }
.batch-progress { padding: 15px 18px; border-bottom: 1px solid var(--line); background: #fafcfd; }
.batch-progress > div:first-child { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; color: var(--ink-soft); font-size: 8px; }
.batch-progress .progress-track { height: 6px; }
.batch-result-table { overflow-x: auto; }
.batch-result-row { min-width: 720px; display: grid; grid-template-columns: 55px minmax(200px,1.4fr) minmax(90px,.7fr) minmax(120px,.8fr) minmax(90px,.65fr) 30px; align-items: center; gap: 10px; min-height: 62px; padding: 0 18px; border-bottom: 1px solid var(--line); color: var(--ink-soft); font-size: 8px; }
.batch-result-head { min-height: 38px; color: var(--muted); background: #fafbfc; font-weight: 750; }
.batch-result-row.is-complete { background: #fff; }
.batch-score { display: grid; gap: 2px; }
.batch-score small { color: inherit; font-size: 8px; }
.batch-rank { color: #9aa7b5; font-size: 10px; font-weight: 800; }
.batch-ligand-name { min-width: 0; display: flex; align-items: center; gap: 9px; }
.batch-ligand-name > i { width: 30px; height: 30px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 8px; color: #3e759e; background: #edf4fa; font-size: 15px; font-style: normal; }
.batch-ligand-name strong, .batch-ligand-name small { display: block; }
.batch-ligand-name strong { color: var(--ink); font-size: 9px; }
.batch-ligand-name small { margin-top: 3px; color: var(--muted); font-size: 7px; }
.batch-score { color: var(--teal-dark); font-size: 11px; }
.batch-row-status { width: max-content; padding: 4px 7px; border-radius: 9px; color: #8b96a4; background: #f0f2f5; font-size: 7px; font-weight: 750; }
.batch-result-row.is-complete .batch-row-status { color: #237a53; background: #eaf8f1; }

.history-panel { max-width: 1260px; margin: 0 auto; }
.history-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 15px; border-bottom: 1px solid var(--line); }
.search-box { min-width: 250px; display: flex; align-items: center; gap: 7px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); }
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; font-size: 9px; }
.filter-chips { display: flex; gap: 5px; }
.filter-chips button { padding: 6px 9px; border: 0; border-radius: 7px; color: var(--muted); background: #f1f3f6; font-size: 8px; cursor: pointer; }
.filter-chips button.is-active { color: var(--teal-dark); background: var(--teal-soft); }
.history-row { display: grid; grid-template-columns: .8fr 1.3fr 1.25fr .75fr .55fr 24px; align-items: center; gap: 12px; min-height: 62px; padding: 0 16px; border-bottom: 1px solid var(--line); font-size: 8px; }
.history-row > span strong, .history-row > span small { display: block; }
.history-row > span small { margin-top: 3px; color: var(--muted); }
.table-head { min-height: 38px; color: var(--muted); background: #fafbfc; font-weight: 750; }
.row-menu { border: 0; background: transparent; cursor: pointer; }

.modal-backdrop { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 26px; background: rgba(8,17,30,.68); backdrop-filter: blur(5px); }
.guide-modal h2 { margin: 4px 0; font-size: 18px; }
.modal-close { width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 9px; color: #788598; background: #fff; font-size: 19px; cursor: pointer; }
.guide-modal { position: relative; width: min(460px, 92vw); padding: 28px; border-radius: 17px; background: #fff; box-shadow: var(--shadow-md); }
.guide-modal .modal-close { position: absolute; top: 14px; right: 14px; }
.guide-modal ol { margin: 21px 0; padding: 0; list-style: none; counter-reset: guide; }
.guide-modal li { counter-increment: guide; display: grid; grid-template-columns: 30px 1fr; padding: 10px 0; border-bottom: 1px solid var(--line); }
.guide-modal li::before { content: counter(guide); grid-row: 1 / 3; width: 23px; height: 23px; display: grid; place-items: center; border-radius: 7px; color: var(--teal-dark); background: var(--teal-soft); font-size: 8px; font-weight: 800; }
.guide-modal li b { font-size: 9px; }.guide-modal li span { margin-top: 3px; color: var(--muted); font-size: 8px; }
.literature-backdrop { position: fixed; inset: 28px 0 0; z-index: 220; display: flex; justify-content: flex-end; background: rgba(8,17,30,.5); backdrop-filter: blur(3px); }
.literature-drawer-panel { width: min(620px, 92vw); height: 100%; display: flex; flex-direction: column; background: #f7f9fb; box-shadow: -18px 0 44px rgba(9,23,41,.2); animation: drawerIn .2s ease; }
@keyframes drawerIn { from { transform: translateX(30px); opacity: .65; } }
.literature-drawer-header { position: relative; padding: 24px 55px 19px 24px; border-bottom: 1px solid var(--line); background: #fff; }
.literature-drawer-header h2 { margin: 5px 0; font-size: 20px; }
.literature-drawer-header p { margin: 0; color: var(--muted); font-size: 8px; }
.literature-drawer-header .modal-close { position: absolute; top: 19px; right: 20px; }
.literature-filters { display: flex; gap: 6px; overflow-x: auto; padding: 13px 24px; border-bottom: 1px solid var(--line); background: #fff; }
.literature-filters button { padding: 7px 10px; border: 1px solid var(--line); border-radius: 16px; color: var(--ink-soft); background: #fff; font-size: 8px; font-weight: 750; white-space: nowrap; cursor: pointer; }
.literature-filters button.is-active { color: var(--teal-dark); border-color: #9dd8d2; background: var(--teal-soft); }
.literature-drawer-list { flex: 1; overflow-y: auto; display: grid; align-content: start; gap: 10px; padding: 18px 24px; }
.literature-drawer-empty { margin: 18px 24px 0; padding: 11px; border: 1px solid #eddcb6; border-radius: 10px; color: #765a26; background: #fff8e8; font-size: 8px; line-height: 1.55; }
.literature-card { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 5px 18px rgba(31,50,74,.045); }
.literature-card-topline { display: flex; align-items: center; justify-content: space-between; gap: 9px; }
.literature-category { padding: 4px 7px; border-radius: 8px; color: var(--teal-dark); background: var(--teal-soft); font-size: 7px; font-weight: 850; }
.literature-year { color: var(--muted); font-size: 8px; font-weight: 750; }
.literature-card h3 { margin: 9px 0 7px; font-size: 12px; line-height: 1.45; }
.literature-citation { margin: 0; color: var(--muted); font-size: 8px; }
.literature-summary { margin: 11px 0; color: var(--ink-soft); font-size: 8px; line-height: 1.7; }
.literature-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.literature-tags span { padding: 4px 6px; border-radius: 6px; color: #526c89; background: #f0f4f8; font-size: 7px; }
.literature-source { margin-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 10px; border-top: 1px solid #edf0f3; }
.literature-source code { color: #50627a; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 8px; }
.literature-source button { padding: 5px 8px; border: 1px solid var(--line); border-radius: 7px; color: var(--teal-dark); background: #fff; font-size: 7px; font-weight: 750; cursor: pointer; }
.literature-drawer-footer { display: flex; align-items: flex-start; gap: 8px; padding: 12px 24px; border-top: 1px solid var(--line); background: #fff; }
.literature-drawer-footer > span { width: 18px; height: 18px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; color: var(--teal-dark); background: var(--teal-soft); font-size: 8px; font-weight: 850; }
.literature-drawer-footer p { margin: 1px 0 0; color: var(--muted); font-size: 7px; line-height: 1.5; }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 300; width: 320px; display: flex; align-items: flex-start; gap: 10px; padding: 13px; border: 1px solid #cee6dd; border-radius: 12px; background: #fff; box-shadow: var(--shadow-md); opacity: 0; transform: translateY(16px); pointer-events: none; transition: .22s ease; }
.toast.is-visible { opacity: 1; transform: translateY(0); }
#toast-icon { width: 27px; height: 27px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 8px; color: #fff; background: var(--teal); font-size: 11px; font-weight: 800; }
.toast strong { font-size: 9px; }.toast p { margin: 3px 0 0; color: var(--muted); font-size: 8px; line-height: 1.45; }

.peptide-research-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.peptide-work-card, .peptide-batch-panel { min-width: 0; padding: 20px; }
.research-field { display: grid; gap: 7px; margin: 14px 0; color: var(--ink-soft); font-size: 9px; font-weight: 750; }
.research-field textarea, .research-field input, .research-field select, .inline-fields input { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: #fbfcfd; font: inherit; font-weight: 500; }
.research-field textarea { resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; line-height: 1.55; }
.file-field input { padding: 9px; background: #fff; }
.inline-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.inline-fields label { display: grid; gap: 6px; color: var(--ink-soft); font-size: 8px; font-weight: 750; }
.research-status { margin-top: 12px; padding: 9px 11px; border-radius: 8px; color: var(--ink-soft); background: #f2f5f7; font-size: 8px; }
.candidate-list { display: grid; gap: 8px; margin-top: 12px; }
.candidate-item { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: #fff; text-decoration: none; text-align: left; cursor: pointer; }
.candidate-item:hover { border-color: #98d5cf; background: #f7fcfb; }
.candidate-item strong { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 9px; }
.candidate-item span { color: var(--muted); font-size: 8px; }
.peptide-preview-card { margin-top: 14px; }
.peptide-sequence-stage { height: 210px; overflow: auto; }
.peptide-complex-stage { height: 310px; }
.peptide-sequence-preview { width: 100%; height: 100%; }
.peptide-sequence-preview svg { width: 100%; height: 100%; display: block; padding: 16px; }
.peptide-sequence-preview polyline { fill: none; stroke: #7790a7; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; opacity: .7; }
.peptide-sequence-preview circle { stroke: rgba(255,255,255,.75); stroke-width: 3; filter: drop-shadow(0 3px 4px rgba(0,0,0,.28)); }
.peptide-sequence-preview text { fill: #fff; font-size: 10px; font-weight: 850; }
.candidate-list .pose-result-item { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 7px; padding: 0; border-bottom: 0; }
.pose-result-main { min-width: 0; width: 100%; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 9px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: #fff; text-align: left; cursor: pointer; }
.pose-result-main:hover { border-color: #98d5cf; background: #f7fcfb; }
.pose-rank-label { padding: 4px 7px; border-radius: 7px; color: var(--teal-dark); background: var(--teal-soft); font-size: 8px; white-space: nowrap; }
.pose-file-name { min-width: 0; overflow: hidden; color: var(--ink-soft); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.pose-preview-label { color: var(--teal-dark); font-size: 8px; font-weight: 800; white-space: nowrap; }
.pose-download { width: 50px; display: grid; place-items: center; align-self: stretch; justify-self: end; padding: 7px; border: 1px solid #bfe2de; border-radius: 9px; color: var(--teal-dark); background: #f2fbfa; font-size: 8px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.pose-download:hover { border-color: var(--teal); background: var(--teal-soft); }
.peptide-score-note { margin-top: 12px; display: grid; gap: 4px; padding: 11px 12px; border: 1px solid #e8ddbd; border-radius: 9px; background: #fffaf0; }
.peptide-score-note strong { color: #7d5e20; font-size: 8px; }
.peptide-score-note span { color: #806f50; font-size: 7px; line-height: 1.5; }
.cyclic-placeholder { margin-top: 16px; padding: 18px 20px; border-style: dashed; }
.cyclic-placeholder strong { font-size: 11px; }.cyclic-placeholder p { margin: 6px 0 0; color: var(--muted); font-size: 8px; line-height: 1.6; }
.peptide-batch-panel { max-width: 820px; }
.artifact-links { display: grid; gap: 7px; margin-top: 12px; }
.artifact-links a { padding: 9px; border: 1px solid var(--line); border-radius: 8px; color: var(--blue); background: #fff; font-size: 8px; text-decoration: none; }
.history-empty { padding: 28px; color: var(--muted); text-align: center; font-size: 9px; }

.research-agent-view { min-height: 100vh; }
.research-agent-view.is-active { height: 100dvh; min-height: 0; overflow: hidden; display: flex; flex-direction: column; }
.research-agent-heading { width: 100%; align-items: center; }
.research-agent-heading-actions { display: flex; align-items: center; gap: 10px; }
.research-agent-status { padding: 7px 10px; border: 1px solid #cde9e5; border-radius: 18px; color: var(--teal-dark); background: var(--teal-soft); font-size: 9px; font-weight: 750; }
.research-agent-status.is-warning { color: #7c5b24; border-color: #ead8af; background: #fff8e9; }
.research-example-list { width: 100%; max-width: 1260px; margin: -10px auto 14px; display: flex; flex-wrap: wrap; gap: 7px; }
.research-example-list button { padding: 7px 10px; border: 1px solid #d9e2e8; border-radius: 17px; color: #496078; background: #fff; font-size: 9px; cursor: pointer; }
.research-example-list button:hover { color: var(--teal-dark); border-color: #9bd4cf; background: #f5fbfa; }
.research-agent-layout { width: 100%; max-width: 1260px; flex: 1 1 auto; height: auto; min-height: 0; margin: 0 auto; display: grid; grid-template-columns: minmax(0,1.55fr) minmax(310px,.75fr); gap: 16px; }
.research-chat-panel { min-width: 0; display: grid; grid-template-rows: minmax(0,1fr) auto; overflow: hidden; }
.research-agent-messages { min-height: 0; overflow-y: auto; display: grid; align-content: start; gap: 14px; padding: 22px; background: linear-gradient(180deg, #f9fbfc, #f4f7f9); }
.research-message { max-width: 86%; display: grid; gap: 5px; }
.research-message.is-user { justify-self: end; }
.research-message-role { color: var(--muted); font-size: 9px; font-weight: 750; }
.research-message.is-user .research-message-role { text-align: right; }
.research-message > div { padding: 13px 15px; border: 1px solid #dfe6ea; border-radius: 4px 14px 14px; background: #fff; box-shadow: 0 5px 16px rgba(31,50,74,.04); font-size: 12px; line-height: 1.75; }
.research-message.is-user > div { color: #fff; border-color: var(--teal); border-radius: 14px 4px 14px 14px; background: var(--teal); }
.research-message p { margin: 0 0 10px; }
.research-message p:last-child { margin-bottom: 0; }
.research-message h1, .research-message h2, .research-message h3, .research-message h4 { margin: 15px 0 7px; color: var(--ink); line-height: 1.35; }
.research-message h1:first-child, .research-message h2:first-child, .research-message h3:first-child, .research-message h4:first-child { margin-top: 0; }
.research-message h1 { font-size: 15px; }
.research-message h2 { font-size: 14px; }
.research-message h3 { font-size: 13px; }
.research-message h4 { font-size: 12px; }
.research-message ul, .research-message ol { margin: 7px 0 11px; padding-left: 22px; }
.research-message li { margin: 4px 0; padding-left: 2px; }
.research-message blockquote { margin: 9px 0; padding: 7px 10px; border-left: 3px solid var(--teal); color: var(--ink-soft); background: #f3f9f8; }
.research-message code { padding: 1px 4px; border-radius: 4px; color: #345268; background: #edf2f5; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92em; }
.research-message hr { margin: 13px 0; border: 0; border-top: 1px solid var(--line); }
.research-message.is-loading > div { color: var(--muted); }
.research-citation { display: inline-block; margin: 0 1px; color: var(--teal-dark); font-weight: 850; text-decoration: none; }
.research-agent-form { padding: 14px 16px; border-top: 1px solid var(--line); background: #fff; }
.research-agent-form > label { display: block; margin-bottom: 7px; color: var(--ink-soft); font-size: 9px; font-weight: 800; }
.research-agent-form textarea { width: 100%; min-height: 76px; resize: none; padding: 11px 12px; border: 1px solid #d8e0e7; border-radius: 10px; color: var(--ink); background: #fbfcfd; font-size: 12px; line-height: 1.5; }
.research-agent-form > div { margin-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.research-agent-form > div > span { color: var(--muted); font-size: 8px; }
.research-agent-form button:disabled { opacity: .55; cursor: wait; transform: none; }
.research-sources-panel { min-width: 0; display: grid; grid-template-rows: auto minmax(0,1fr); overflow: hidden; }
.research-sources-panel > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px; border-bottom: 1px solid var(--line); }
.research-sources-panel h2 { margin: 4px 0 0; font-size: 14px; }
.research-sources-panel > header > strong { padding: 5px 8px; border-radius: 11px; color: var(--teal-dark); background: var(--teal-soft); font-size: 9px; }
.research-agent-sources { min-height: 0; overflow-y: auto; display: grid; align-content: start; gap: 10px; padding: 14px; background: #f7f9fb; }
.research-sources-empty { padding: 34px 20px; color: var(--muted); font-size: 10px; line-height: 1.7; text-align: center; }
.research-source-card { scroll-margin-top: 18px; padding: 13px; border: 1px solid #dfe6eb; border-radius: 11px; background: #fff; }
.research-source-card:target { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(18,168,157,.1); }
.research-source-topline { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.research-source-topline span { color: var(--teal-dark); font-size: 10px; font-weight: 850; }
.research-source-topline time { color: var(--muted); font-size: 8px; }
.research-source-card h3 { margin: 8px 0 6px; font-size: 11px; line-height: 1.5; }
.research-source-card > p { margin: 0; color: var(--muted); font-size: 8px; line-height: 1.55; }
.research-source-card details { margin-top: 10px; padding-top: 9px; border-top: 1px solid #edf1f3; }
.research-source-card summary { color: var(--teal-dark); font-size: 8px; font-weight: 750; cursor: pointer; }
.research-source-card details div { margin-top: 8px; color: var(--ink-soft); font-size: 9px; line-height: 1.65; }
.research-source-card footer { margin-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 9px; }
.research-source-card code { min-width: 0; overflow: hidden; color: #607087; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.research-source-card footer a { flex: 0 0 auto; color: var(--blue); font-size: 8px; font-weight: 750; text-decoration: none; }
.site-footer { max-width: 1260px; margin: -40px 36px 24px; padding-top: 16px; border-top: 1px solid var(--line); text-align: center; }
.site-footer a { color: var(--muted); font-size: 9px; text-decoration: none; transition: color .16s ease; }
.site-footer a:hover { color: var(--teal-dark); }

@media (max-width: 1040px) {
  .workspace-grid { grid-template-columns: 1fr; }
  .task-summary { grid-template-columns: 1fr 1fr; }
  .sticky-card { position: static; }
  .pipeline-flow { grid-template-columns: 1fr; }
  .flow-connector { transform: rotate(90deg); height: 18px; }
  .result-workspace, .batch-layout, .batch-builder-layout, .peptide-research-grid, .research-agent-layout { grid-template-columns: minmax(0,1fr); }
  .research-agent-view.is-active { height: auto; min-height: 100dvh; overflow: visible; display: block; }
  .research-agent-layout { flex: none; height: auto; min-height: 0; }
  .research-chat-panel { min-height: 0; display: flex; flex-direction: column; }
  .research-agent-messages { flex: 0 1 auto; max-height: min(56dvh, 560px); }
  .research-sources-panel { max-height: 700px; }
  .batch-submit-card { position: static; }
  .molecule-viewer { border-right: 0; border-bottom: 1px solid var(--line); }
}

@media (max-width: 760px) {
  :root { --sidebar-width: 238px; }
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--shadow-md); }
  .sidebar.is-open { transform: translateX(0); }
  .main-area { margin-left: 0; }
  .mobile-menu { position: fixed; top: 12px; left: 12px; z-index: 50; display: grid; }
  .app-view { padding: 62px 14px 55px; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .page-heading h1 { font-size: 22px; }
  .heading-actions { width: 100%; }
  .heading-actions button { flex: 1; }
  .input-grid, .preset-picker-row, .research-control-grid, .input-preview-grid, .task-summary, .batch-kpis, .batch-protein-picker, .batch-ligand-grid { grid-template-columns: 1fr; }
  .ligand-property-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .linker-design-loop { grid-template-columns: 1fr; }
  .linker-design-loop button { justify-self: start; }
  .batch-protein-visual { height: 96px; }
  .subject-card { grid-template-columns: 40px minmax(0,1fr); }
  .subject-card .text-button { grid-column: 2; justify-self: start; padding-left: 0; }
  .stage-list { grid-template-columns: 1fr 1fr; }
  .result-workspace { display: block; }
  .molecule-scene, .molecule-scene svg { min-height: 280px; height: 280px; }
  .result-tabs { overflow-x: auto; }
  .result-tab { flex: 0 0 auto; }
  .heatmap { grid-template-columns: 78px repeat(4, minmax(58px,1fr)); overflow-x: auto; }
  .history-toolbar { align-items: stretch; flex-direction: column; }
  .search-box { min-width: 0; }
  .history-table { overflow-x: auto; }
  .history-row { min-width: 760px; }
  .modal-backdrop { padding: 8px; }
  .source-form { min-height: 380px; padding: 22px 16px; }
  .sdf-dropzone { min-height: 310px; margin: 20px 14px; }
  .toast { right: 12px; bottom: 12px; width: calc(100vw - 24px); }
  .peptide-coming-soon { min-height: 460px; margin-top: 16px; padding: 34px 18px; }
  .peptide-coming-soon h1 { font-size: 24px; }
  .peptide-roadmap { align-items: stretch; flex-direction: column; }
  .peptide-roadmap i { transform: rotate(90deg); }
  .peptide-literature-panel { padding: 17px 14px; }
  .peptide-literature-panel > header { align-items: stretch; flex-direction: column; }
  .peptide-literature-list { grid-template-columns: 1fr; }
  .literature-drawer-panel { width: 100%; max-width: none; }
  .literature-drawer-header { padding: 20px 50px 16px 16px; }
  .literature-filters { padding: 11px 16px; }
  .literature-drawer-list { padding: 14px 16px; }
  .literature-drawer-footer { padding: 11px 16px; }
  .candidate-item { align-items: flex-start; flex-direction: column; }
  .pose-result-main { grid-template-columns: auto minmax(0,1fr); }
  .pose-preview-label { display: none; }
  .research-agent-heading-actions { width: 100%; align-items: stretch; flex-direction: column; }
  .research-agent-heading-actions button { width: 100%; }
  .research-example-list { margin-top: 0; overflow-x: auto; flex-wrap: nowrap; }
  .research-example-list button { flex: 0 0 auto; }
  .research-agent-messages { padding: 16px 12px; }
  .research-message { max-width: 94%; }
  .research-message > div { font-size: 11px; }
  .research-agent-form > div { align-items: stretch; flex-direction: column; }
  .research-agent-form > div > span { order: 2; }
  .research-agent-form button { width: 100%; }
  .research-sources-panel { max-height: none; }
  .site-footer { margin: -34px 14px 18px; }
}
