:root {
  --ink-950: #10253a;
  --ink-900: #17344e;
  --ink-800: #254760;
  --ink-700: #3c5d72;
  --ink-600: #5d7687;
  --ink-500: #718794;
  --ink-100: #eaf0f2;
  --line-strong: #c9d6dc;
  --line: #dbe5e8;
  --line-soft: #eaf0f2;
  --surface: #ffffff;
  --surface-alt: #f5f8f8;
  --surface-tint: #eef6f5;
  --blue: #075a8c;
  --blue-deep: #06466c;
  --teal: #087b73;
  --teal-soft: #dff3ef;
  --copper: #a55f25;
  --copper-soft: #f7e9dc;
  --terracotta: #C4612F;
  --terracotta-hover: #A94E22;
  --terracotta-soft: #F2E3D6;
  --warning: #9a570d;
  --warning-soft: #fff2d9;
  --danger: #a13b42;
  --danger-soft: #fdebed;
  --positive: #176c54;
  --positive-soft: #e4f4ed;
  --shadow-sm: 0 1px 2px rgba(16, 37, 58, .06), 0 3px 10px rgba(16, 37, 58, .04);
  --shadow-md: 0 14px 38px rgba(16, 37, 58, .14);
  --radius-sm: 7px;
  --radius: 12px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --content: 1536px;
  --font-sans: "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;
  --font-mono: Consolas, "Cascadia Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink-900);
  background: #f3f6f6;
  font: 14px/1.55 var(--font-sans);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button:not(:disabled), input[type="checkbox"] { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .48; }
img { max-width: 100%; }
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3, h4 { color: var(--ink-950); line-height: 1.24; }
p { color: var(--ink-600); }
a { color: var(--blue); }
[hidden] { display: none !important; }

:focus-visible {
  outline: 3px solid rgba(0, 132, 163, .32);
  outline-offset: 2px;
}
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; top: 8px; left: 12px; z-index: 500;
  padding: 9px 14px; color: white; background: var(--ink-950);
  border-radius: var(--radius-sm); transform: translateY(-150%);
}
.skip-link:focus { transform: none; }

.site-header { position: relative; z-index: 20; background: var(--surface); box-shadow: 0 1px 0 var(--line); }
.personal-site-bar {
  display: flex;
  align-items: center;
  min-height: 76px;
  padding: 14px max(24px, calc((100vw - var(--content)) / 2));
  color: var(--ink-900);
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}
.personal-site-bar strong {
  padding-left: 14px;
  border-left: 4px solid var(--teal);
  font-size: 15px;
  line-height: 1.65;
}
.institution-bar {
  min-height: 76px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 9px max(24px, calc((100vw - var(--content)) / 2));
  color: var(--ink-900);
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}
.institution-logos {
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(220px, 325px) minmax(300px, 520px);
  align-items: center;
  gap: 0;
  min-width: 0;
}
.brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: 66px;
  padding: 5px 18px;
  overflow: hidden;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
}
.brand-mark:first-child { padding-left: 0; }
.brand-mark:last-child { border-right: 0; }
.brand-mark-zzu { justify-content: flex-start; }
.brand-mark-cml, .brand-mark-sklcm { background: #fff; }
.brand-logo { display: block; width: 100%; height: 100%; max-width: 100%; object-fit: contain; object-position: center; }
.brand-logo-zzu { flex: none; width: 100%; height: auto; max-width: 250px; max-height: 56px; }
.brand-logo-cml { max-width: 305px; }
.brand-logo-sklcm { max-width: 500px; }
.product-bar {
  display: grid; grid-template-columns: minmax(500px, 1fr) minmax(360px, 540px);
  align-items: center; gap: 28px;
  max-width: var(--content); margin: auto; padding: 20px 24px 17px;
}
.product-title-group { min-width: 0; }
.product-kicker, .eyebrow, .panel-kicker {
  color: var(--teal); font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
}
.product-title-group h1 { display: inline; margin: 0; font-size: clamp(21px, 2vw, 28px); letter-spacing: -.025em; }
.prototype-tag {
  display: inline-flex; margin-left: 10px; vertical-align: 4px; padding: 3px 8px;
  color: var(--copper); background: var(--copper-soft); border-radius: 4px; font-size: 11px; font-weight: 700;
}
.global-search { display: grid; grid-template-columns: minmax(0, 1fr) auto; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--surface); overflow: hidden; box-shadow: inset 0 1px 2px rgba(16,37,58,.03); }
.global-search:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(8,123,115,.1); }
.global-search input { width: 100%; min-width: 0; padding: 10px 12px 10px 39px; border: 0; outline: 0; color: var(--ink-900); background: linear-gradient(90deg, transparent 36px, var(--line-soft) 36px, var(--line-soft) 37px, transparent 37px); }
.global-search::before { content: "⌕"; position: absolute; align-self: center; margin-left: 13px; color: var(--ink-600); font-size: 20px; line-height: 1; pointer-events: none; }
.global-search button { padding: 0 16px; border: 0; color: white; background: var(--blue); font-weight: 700; }
.global-search button:hover { background: var(--blue-deep); }

.primary-nav { display: flex; gap: 4px; max-width: var(--content); margin: auto; padding: 0 24px; overflow-x: auto; }
.nav-item { position: relative; flex: 0 0 auto; padding: 10px 15px 12px; border: 0; color: var(--ink-600); background: transparent; font-weight: 650; }
.nav-item::after { content: ""; position: absolute; left: 15px; right: 15px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--teal); transform: scaleX(0); transition: transform .18s ease; }
.nav-item:hover { color: var(--ink-900); background: var(--surface-alt); }
.nav-item.is-active { color: var(--blue-deep); }
.nav-item.is-active::after { transform: none; }

#main-content { min-height: calc(100vh - 260px); max-width: var(--content); margin: auto; padding: 28px 24px 54px; outline: none; }
.app-page { animation: page-in .22s ease both; }
@keyframes page-in { from { opacity: 0; } to { opacity: 1; } }
.loading-panel, .message-panel {
  display: flex; align-items: center; gap: 15px; max-width: 720px; margin: 60px auto;
  padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm);
}
.loading-panel p, .message-panel p { margin: 3px 0 0; }
.loading-mark { width: 30px; height: 30px; flex: 0 0 auto; border: 3px solid var(--line); border-top-color: var(--teal); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.message-error { align-items: flex-start; border-left: 5px solid var(--danger); background: var(--danger-soft); }
.message-error h2 { margin-bottom: 6px; font-size: 18px; }

.hero-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(320px, .45fr); gap: 24px; align-items: stretch; }
.hero-copy {
  min-height: 310px; padding: clamp(30px, 4vw, 54px);
  border: 1px solid #d9e7e5; border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 88% 12%, rgba(8,123,115,.12), transparent 29%),
    linear-gradient(135deg, #f8fbfb 0%, #edf6f4 100%);
  box-shadow: var(--shadow-sm);
}
.hero-copy h2 { max-width: 820px; margin: 13px 0 18px; font-size: clamp(30px, 3.2vw, 46px); letter-spacing: -.045em; }
.hero-copy p { max-width: 760px; margin-bottom: 25px; font-size: 16px; line-height: 1.8; }
.hero-quote { max-width: 850px; margin: 13px 0 25px; padding: 0 0 0 22px; border-left: 4px solid var(--copper); }
.hero-quote p { max-width: 820px; margin: 0; color: var(--ink-950); font-size: clamp(29px, 3vw, 44px); font-weight: 800; line-height: 1.28; letter-spacing: -.035em; }
.hero-quote footer { margin-top: 13px; color: var(--ink-600); font-size: 13px; line-height: 1.5; }
.hero-quote cite { font-style: normal; }
.hero-actions, .page-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.button, .text-button, .icon-button { border: 0; transition: background .16s ease, border-color .16s ease, transform .12s ease; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 38px; padding: 8px 14px; border: 1px solid transparent; border-radius: var(--radius-sm); font-weight: 700; }
.button:not(:disabled):active { transform: translateY(1px); }
.button-primary { color: white; background: var(--blue); }
.button-primary:hover:not(:disabled) { background: var(--blue-deep); }
.button-secondary { color: var(--blue-deep); border-color: #bad0da; background: white; }
.button-secondary:hover:not(:disabled) { border-color: #8fb1bf; background: #f5fafb; }
.button-quiet { min-height: 34px; padding: 5px 10px; color: var(--ink-800); border-color: var(--line); background: var(--surface); }
.button-block { width: 100%; margin-top: 9px; }
.text-button { padding: 4px 6px; color: var(--blue); background: transparent; font-weight: 650; }
.text-button:hover { text-decoration: underline; }
.icon-button { width: 28px; height: 28px; border-radius: 6px; color: var(--ink-600); background: transparent; font-size: 20px; line-height: 1; }
.icon-button:hover { color: var(--danger); background: var(--danger-soft); }

.hero-data-card { padding: 26px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
.hero-data-heading { margin-bottom: 14px; color: var(--ink-700); font-size: 12px; font-weight: 750; letter-spacing: .08em; }
.stat-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.stat-card { min-height: 112px; padding: 16px; border: 1px solid var(--line-soft); border-radius: 10px; background: var(--surface-alt); }
.stat-card strong { display: block; color: var(--blue-deep); font-size: 27px; line-height: 1.2; }
.stat-card span { display: block; margin-top: 6px; color: var(--ink-900); font-weight: 700; }
.stat-card small { display: block; margin-top: 2px; color: var(--ink-500); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin: 40px 2px 16px; }
.section-heading h3 { margin: 4px 0 0; font-size: 23px; }
.section-heading p { max-width: 580px; margin: 0; text-align: right; }
.overview-panels { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.distribution-card { min-height: 190px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.distribution-title { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 15px; }
.distribution-title h4 { margin: 0; font-size: 16px; }
.distribution-title span { color: var(--ink-500); font: 10px var(--font-mono); }
.bar-row { margin: 10px 0; }
.bar-row > div:first-child { display: flex; justify-content: space-between; gap: 12px; color: var(--ink-700); font-size: 12px; }
.bar-row strong { color: var(--ink-900); }
.bar-track { height: 6px; margin-top: 4px; overflow: hidden; border-radius: 10px; background: var(--line-soft); }
.bar-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--teal), #3ba69a); }
.distribution-placeholder p { margin: 16px 0 0; }
.science-boundary { display: grid; grid-template-columns: auto 1fr; gap: 20px; margin-top: 18px; padding: 17px 20px; border-left: 4px solid var(--copper); border-radius: 4px var(--radius) var(--radius) 4px; background: var(--copper-soft); }
.science-boundary strong { color: #754116; white-space: nowrap; }
.science-boundary p { margin: 0; color: #765739; }

.page-heading-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.page-heading-row h2 { margin: 4px 0 5px; font-size: 28px; letter-spacing: -.025em; }
.page-heading-row p { margin: 0; }
.screening-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 18px; align-items: start; }
.filter-panel, .results-workspace { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.filter-panel { position: sticky; top: 12px; padding: 18px; }
.filter-panel:has(.field-combobox-trigger[aria-expanded="true"]) { z-index: 70; }
.panel-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding-bottom: 13px; border-bottom: 1px solid var(--line-soft); }
.panel-heading h3 { margin: 3px 0 0; font-size: 18px; }
.logic-switch { display: grid; grid-template-columns: auto 1fr 1fr; align-items: center; gap: 5px; margin: 14px 0; padding: 5px; border-radius: 8px; background: var(--surface-alt); }
.logic-switch > span { padding: 0 4px; color: var(--ink-600); font-size: 11px; }
.logic-option { min-height: 32px; padding: 5px 7px; border: 1px solid transparent; border-radius: 6px; color: var(--ink-600); background: transparent; font-size: 11px; }
.logic-option.is-active { color: var(--blue-deep); border-color: var(--line); background: white; box-shadow: var(--shadow-sm); font-weight: 700; }
.filter-rows { display: grid; gap: 10px; max-height: calc(100vh - 420px); min-height: 145px; overflow: auto; padding-right: 3px; scrollbar-width: thin; }
.filter-rows:has(.field-combobox-trigger[aria-expanded="true"]) { overflow: visible; }

/* Accessible two-line field chooser: scientific meaning above, raw field below. */
.field-combobox { position: relative; }
.field-combobox-trigger {
  display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 8px;
  width: 100%; min-height: 54px; padding: 7px 10px; border: 1px solid var(--line-strong);
  border-radius: 7px; color: var(--ink-900); background: #fff; text-align: left;
}
.field-combobox-trigger::after { content: "⌄"; color: var(--ink-600); font-size: 17px; }
.field-combobox-trigger[aria-expanded="true"] { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(8,123,115,.1); }
.field-option-copy { display: grid; min-width: 0; }
.field-option-copy > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 650; }
.field-option-copy > code { overflow: hidden; color: var(--ink-500); font: 10px/1.35 var(--font-mono); text-overflow: ellipsis; white-space: nowrap; }
.field-combobox-menu {
  position: fixed; z-index: 60; width: min(460px, calc(100vw - 48px)); height: min(500px, 58vh); margin: 0;
  padding: 8px 8px 18px; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 9px; background: #fff; box-shadow: var(--shadow-md);
}
.field-combobox-search { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; }
.field-listbox { height: calc(100% - 43px); max-height: none; margin-top: 7px; overflow: auto; scrollbar-width: thin; }
.field-group-label { position: sticky; top: 0; z-index: 1; padding: 7px 8px 4px; color: var(--teal); background: #fff; font-size: 10px; font-weight: 800; letter-spacing: .06em; }
.field-option { display: block; width: 100%; padding: 7px 8px; border: 0; border-radius: 6px; background: transparent; text-align: left; }
.field-option:hover, .field-option:focus, .field-option[aria-selected="true"] { background: var(--surface-tint); outline: 0; }
.field-option[hidden], .field-group[hidden] { display: none; }
.field-empty { padding: 14px 8px; color: var(--ink-500); text-align: center; font-size: 12px; }
.filter-row { padding: 11px; border: 1px solid var(--line); border-radius: 9px; background: #fcfdfd; }
.filter-row:has(.filter-enabled:not(:checked)) { opacity: .58; background: var(--surface-alt); }
.filter-row-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; }
.switch { display: inline-flex; align-items: center; gap: 7px; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch span { position: relative; width: 31px; height: 17px; border-radius: 20px; background: var(--line-strong); transition: background .15s; }
.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 13px; height: 13px; border-radius: 50%; background: white; box-shadow: 0 1px 3px rgba(16,37,58,.3); transition: transform .15s; }
.switch input:checked + span { background: var(--teal); }
.switch input:checked + span::after { transform: translateX(14px); }
.switch input:focus-visible + span { outline: 3px solid rgba(0,132,163,.25); outline-offset: 2px; }
.switch em { color: var(--ink-700); font-size: 11px; font-style: normal; font-weight: 700; }
.filter-control { display: grid; gap: 3px; min-width: 0; }
.filter-control > span { color: var(--ink-500); font-size: 10px; font-weight: 700; letter-spacing: .04em; }
.filter-control select, .filter-control input, .filter-value-wrap input, .filter-value-wrap select,
.toolbar-controls select, .catalog-search input {
  min-width: 0; width: 100%; height: 34px; padding: 5px 9px;
  border: 1px solid var(--line-strong); border-radius: 6px; color: var(--ink-900); background: white;
}
.filter-control select:focus, .filter-value-wrap input:focus, .filter-value-wrap select:focus, .toolbar-controls select:focus, .catalog-search input:focus { border-color: var(--teal); outline: 3px solid rgba(8,123,115,.1); }
.filter-control .filter-field-search { height: 30px; border-radius: 6px 6px 0 0; border-bottom-color: var(--line-soft); color: var(--ink-700); font-size: 11px; }
.filter-control .filter-field-search + .filter-field { margin-top: -4px; border-radius: 0 0 6px 6px; }
.filter-expression { display: grid; grid-template-columns: 42% minmax(0, 1fr); gap: 7px; align-items: end; margin-top: 7px; }
.filter-value-wrap { display: flex; align-items: center; gap: 5px; min-width: 0; }
.filter-value-wrap > * { min-width: 0; }
.range-separator { flex: 0 0 auto; color: var(--ink-500); font-size: 11px; }
.filter-no-value { display: flex; align-items: center; height: 34px; color: var(--ink-500); font-size: 11px; }

.results-workspace { min-width: 0; overflow: visible; }
.results-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 15px 17px; border-bottom: 1px solid var(--line); }
.results-toolbar strong { font-size: 16px; }
.active-filter-summary { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; max-width: 740px; margin-top: 5px; color: var(--ink-500); font-size: 11px; }
.logic-chip, .filter-summary-chip { display: inline-flex; padding: 2px 6px; border-radius: 4px; }
.logic-chip { color: white; background: var(--teal); font-weight: 800; }
.filter-summary-chip { color: var(--ink-700); background: var(--surface-alt); border: 1px solid var(--line-soft); }
.toolbar-controls { display: flex; align-items: center; justify-content: flex-end; gap: 9px; flex: 0 0 auto; }
.toolbar-controls label { display: flex; align-items: center; gap: 6px; color: var(--ink-600); font-size: 12px; }
.toolbar-controls select { width: 68px; height: 34px; }
.segmented-control { display: inline-flex; padding: 3px; border-radius: 7px; background: var(--surface-alt); }
.segmented-control button { min-height: 28px; padding: 3px 9px; border: 0; border-radius: 5px; color: var(--ink-600); background: transparent; }
.segmented-control button.is-active { color: var(--blue-deep); background: white; box-shadow: var(--shadow-sm); font-weight: 700; }
.column-picker { position: absolute; right: max(24px, calc((100vw - var(--content)) / 2)); z-index: 15; width: min(760px, calc(100vw - 48px)); height: min(560px, 68vh); padding: 16px 16px 22px; overflow: hidden; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-md); }
.column-picker-head, .column-picker-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.column-picker-head span { color: var(--ink-500); font-size: 12px; }
.column-picker-note { margin: 8px 0 0; color: var(--ink-500); font-size: 11px; }
.column-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-content: start; gap: 6px; height: calc(100% - 102px); margin: 13px 0; overflow: auto; scrollbar-width: thin; }
.column-options label { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 7px; padding: 8px; border: 1px solid var(--line-soft); border-radius: 7px; }
.column-options label:hover { background: var(--surface-alt); }
.column-options input { grid-row: 1 / span 2; align-self: center; accent-color: var(--teal); }
.column-options span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.column-options small { overflow: hidden; color: var(--ink-500); font: 10px var(--font-mono); text-overflow: ellipsis; white-space: nowrap; }
.column-picker-actions { padding-top: 11px; border-top: 1px solid var(--line-soft); }

.resizable-selector {
  min-width: 300px;
  min-height: 260px;
  max-width: calc(100vw - 32px);
  max-height: 84vh;
  resize: none;
}
.resizable-column-selector { min-width: 520px; min-height: 320px; }
.selector-resize-handle {
  position: absolute;
  bottom: 0;
  z-index: 4;
  width: 22px;
  height: 22px;
  touch-action: none;
}
.selector-resize-handle::after {
  content: "";
  position: absolute;
  bottom: 5px;
  width: 9px;
  height: 9px;
  opacity: .65;
  border-bottom: 2px solid var(--teal);
}
.selector-resize-handle.is-left { left: 0; cursor: nesw-resize; }
.selector-resize-handle.is-left::after { left: 5px; border-left: 2px solid var(--teal); }
.selector-resize-handle.is-right { right: 0; cursor: nwse-resize; }
.selector-resize-handle.is-right::after { right: 5px; border-right: 2px solid var(--teal); }

.results-table-wrap { max-width: 100%; overflow: auto; scrollbar-width: thin; }
#results-table { width: 100%; border-collapse: separate; border-spacing: 0; white-space: nowrap; }
#results-table th { position: sticky; top: 0; z-index: 2; height: 42px; padding: 0 11px; color: var(--ink-700); background: #f5f8f8; border-bottom: 1px solid var(--line-strong); text-align: left; font-size: 11px; }
#results-table td { height: 66px; max-width: 210px; padding: 7px 11px; overflow: hidden; border-bottom: 1px solid var(--line-soft); color: var(--ink-800); text-overflow: ellipsis; }
#results-table tbody tr { background: white; transition: background .12s; }
#results-table tbody tr:hover { background: #f4faf9; }
#results-table tbody tr.is-selected { background: #eaf6f4; box-shadow: inset 3px 0 var(--teal); }
.select-column { width: 42px; min-width: 42px; text-align: center !important; }
.select-column input { accent-color: var(--teal); }
.sticky-select-col {
  position: sticky !important;
  left: 0;
  z-index: 4 !important;
  width: 48px;
  min-width: 48px;
  max-width: 48px;
  text-align: center !important;
  background: inherit;
  box-shadow: 1px 0 0 var(--line-soft);
}
.sticky-id-col {
  position: sticky !important;
  left: 48px;
  z-index: 4 !important;
  width: 132px;
  min-width: 132px;
  max-width: 132px;
  background: inherit;
  box-shadow: 1px 0 0 var(--line-strong), 5px 0 9px rgba(16,37,58,.05);
}
#results-table thead .sticky-select-col,
#results-table thead .sticky-id-col { z-index: 7 !important; background: #f5f8f8; }
#results-table tbody tr:hover .sticky-select-col,
#results-table tbody tr:hover .sticky-id-col { background: #f4faf9; }
#results-table tbody tr.is-selected .sticky-select-col,
#results-table tbody tr.is-selected .sticky-id-col { background: #eaf6f4; }
.structure-column { width: 92px; min-width: 92px; text-align: center !important; }
.sort-button { display: flex; align-items: center; gap: 6px; width: 100%; height: 100%; padding: 0; border: 0; color: inherit; background: transparent; font-weight: 750; text-align: left; }
.sort-button span { color: var(--ink-500); font-size: 10px; }
.sort-button.is-active { color: var(--blue); }
.structure-button, .structure-placeholder, .card-structure { border: 0; background: transparent; }
.structure-button { width: 75px; height: 56px; padding: 1px; border-radius: 5px; }
.structure-button:hover { background: white; box-shadow: 0 0 0 1px var(--line-strong); }
.structure-button img { width: 100%; height: 100%; object-fit: contain; }
.structure-placeholder { color: var(--blue); font-size: 11px; }
.id-link { padding: 2px 0; border: 0; color: var(--blue); background: transparent; font-weight: 750; text-align: left; }
.id-link:hover { text-decoration: underline; }
.data-badge { display: inline-flex; align-items: center; max-width: 185px; padding: 3px 7px; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; font-size: 10px; font-weight: 750; text-overflow: ellipsis; }
.data-badge.is-positive { color: var(--positive); border-color: #b9decf; background: var(--positive-soft); }
.data-badge.is-warning { color: var(--warning); border-color: #efd39b; background: var(--warning-soft); }
.data-badge.is-neutral { color: var(--ink-700); background: var(--surface-alt); }
.mono-value { display: inline-block; max-width: 180px; overflow: hidden; font: 11px var(--font-mono); text-overflow: ellipsis; vertical-align: middle; }

.molecule-card-grid { display: grid; grid-template-columns: repeat(3, minmax(210px, 1fr)); gap: 12px; padding: 15px; }
.molecule-card { min-width: 0; padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.molecule-card:hover { border-color: #aec7ce; box-shadow: var(--shadow-sm); }
.molecule-card.is-selected { border-color: var(--teal); box-shadow: inset 0 0 0 1px var(--teal); }
.molecule-card-top { display: flex; justify-content: space-between; align-items: center; }
.molecule-card-top input { accent-color: var(--teal); }
.card-structure { display: flex; align-items: center; justify-content: center; width: 100%; height: 120px; margin: 5px 0 8px; border-radius: 7px; }
.card-structure:hover { background: var(--surface-alt); }
.card-structure img { width: 100%; height: 100%; object-fit: contain; }
.card-structure span { color: var(--ink-500); }
.card-subtitle { margin: 3px 0 10px; overflow: hidden; color: var(--ink-500); font: 10px var(--font-mono); text-overflow: ellipsis; white-space: nowrap; }
.card-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin: 0; }
.card-metrics div { min-width: 0; padding: 6px; border-radius: 5px; background: var(--surface-alt); }
.card-metrics dt { overflow: hidden; color: var(--ink-500); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.card-metrics dd { margin: 1px 0 0; overflow: hidden; color: var(--ink-900); font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.empty-state { padding: 62px 24px; color: var(--ink-700); text-align: center; }
.empty-state strong { font-size: 17px; }
.empty-state p { margin: 7px 0 0; }
.pagination { display: flex; justify-content: flex-end; align-items: center; gap: 5px; min-height: 56px; padding: 11px 16px; border-top: 1px solid var(--line-soft); }
.pagination button { min-width: 32px; height: 32px; padding: 3px 9px; border: 1px solid var(--line); border-radius: 6px; background: white; }
.pagination button:hover:not(:disabled), .pagination button.is-active { color: white; border-color: var(--blue); background: var(--blue); }
.pagination > span { margin-left: 7px; color: var(--ink-500); font-size: 11px; }
.pagination .pagination-gap { margin: 0; }

.catalog-search { width: min(420px, 40vw); }
.catalog-search input { height: 39px; padding-left: 12px; }
.category-tabs { display: flex; gap: 5px; padding-bottom: 12px; overflow-x: auto; }
.category-tabs button { flex: 0 0 auto; padding: 7px 11px; border: 1px solid var(--line); border-radius: 20px; color: var(--ink-700); background: white; }
.category-tabs button.is-active { color: white; border-color: var(--teal); background: var(--teal); }
.catalog-summary { margin: 4px 0 10px; color: var(--ink-600); }
.descriptor-list { display: grid; gap: 8px; }
.descriptor-item { display: grid; grid-template-columns: minmax(360px, 1fr) minmax(250px, auto) 190px; align-items: center; gap: 18px; padding: 15px 17px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.descriptor-item:hover { border-color: #b8cdd3; box-shadow: var(--shadow-sm); }
.descriptor-heading { display: flex; align-items: baseline; gap: 9px; min-width: 0; }
.descriptor-heading h3 { margin: 0; font-size: 15px; }
.descriptor-heading code { overflow: hidden; color: var(--blue); font: 11px var(--font-mono); text-overflow: ellipsis; white-space: nowrap; }
.descriptor-main p { margin: 5px 0 0; color: var(--ink-600); font-size: 12px; }
.descriptor-meta { display: flex; gap: 5px; flex-wrap: wrap; }
.descriptor-meta span { padding: 3px 6px; border-radius: 4px; color: var(--ink-600); background: var(--surface-alt); font-size: 10px; }
.descriptor-meta .filterable-mark { color: var(--positive); background: var(--positive-soft); font-weight: 700; }
.descriptor-stats { padding-left: 15px; border-left: 1px solid var(--line-soft); }
.descriptor-stats small { display: block; color: var(--ink-500); }
.descriptor-stats strong { display: block; margin-top: 2px; color: var(--ink-800); font-size: 12px; }
.methodology-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.method-card { min-height: 238px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: var(--shadow-sm); }
.method-card h3 { margin-bottom: 12px; font-size: 18px; }
.method-card p { min-height: 67px; margin-bottom: 14px; }
.method-card ul { margin: 0; padding: 13px 0 0 18px; border-top: 1px solid var(--line-soft); color: var(--ink-700); }
.method-card li { margin: 5px 0; }
.method-card a { color: var(--teal-700); overflow-wrap: anywhere; }
.overlay-backdrop { position: fixed; inset: 0; z-index: 80; background: rgba(8, 27, 40, .46); backdrop-filter: blur(2px); }
.detail-drawer { position: fixed; top: 0; right: 0; z-index: 90; width: min(72vw, 1400px); height: 100vh; overflow: auto; background: white; box-shadow: -18px 0 50px rgba(8,27,40,.22); }
.compare-dialog, .modal-dialog { position: fixed; z-index: 100; inset: 5vh 4vw auto; max-width: 1320px; max-height: 90vh; margin: auto; overflow: auto; border: 0; border-radius: var(--radius-lg); background: white; box-shadow: var(--shadow-md); }
.modal-backdrop { position: fixed; inset: 0; z-index: 99; background: rgba(31, 36, 33, 0.5); backdrop-filter: blur(4px); }
.modal-dialog { position: relative; z-index: 101; inset: auto; max-width: 420px; margin: 14vh auto 0; }
#molecule-detail-content, #compare-content, #export-content { min-height: 100%; }
/* Shared styling for dynamically rendered detail, comparison and export modules. */
.detail-header, .compare-header, .export-header, .modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.detail-header h2, .compare-header h2, .export-header h2, .modal-header h2 { margin: 0 0 4px; font-size: 22px; }
.detail-close, .modal-close, .close-button { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; background: white; font-size: 20px; }
.detail-close:hover, .modal-close:hover, .close-button:hover { background: var(--surface-alt); }
.detail-body, .compare-body, .export-body, .modal-body { padding: 22px 24px; }
.detail-grid { display: grid; grid-template-columns: minmax(300px, .8fr) minmax(390px, 1.2fr); gap: 18px; }
.detail-card, .viewer-panel, .property-panel, .compare-table-wrap, .export-section { padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.viewer-container, .molecule-viewer, [data-viewer] { min-height: 410px; border-radius: 8px; background: radial-gradient(circle, #f9fbfb, #edf2f2); }
.viewer-toolbar, .detail-toolbar { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 10px; }
.viewer-toolbar button, .detail-toolbar button { padding: 6px 9px; border: 1px solid var(--line); border-radius: 6px; background: white; }
.viewer-toolbar button.is-active, .detail-toolbar button.is-active { color: white; border-color: var(--teal); background: var(--teal); }
.property-grid, .detail-properties { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.property-grid > div, .detail-properties > div { min-width: 0; padding: 9px; border-radius: 7px; background: var(--surface-alt); }
.property-grid dt, .detail-properties dt { color: var(--ink-500); font-size: 10px; }
.property-grid dd, .detail-properties dd { margin: 2px 0 0; overflow: hidden; color: var(--ink-900); font-weight: 700; text-overflow: ellipsis; }
.compare-table { width: 100%; border-collapse: collapse; }
.compare-table th, .compare-table td { padding: 10px; border: 1px solid var(--line); text-align: left; }
.compare-table th { background: var(--surface-alt); }
.export-options { display: grid; gap: 10px; }
.export-options label { display: flex; align-items: flex-start; gap: 9px; padding: 11px; border: 1px solid var(--line); border-radius: 8px; }

.toast-region { position: fixed; right: 20px; bottom: 20px; z-index: 300; display: grid; gap: 8px; pointer-events: none; }
.toast { max-width: min(390px, calc(100vw - 40px)); padding: 11px 14px; border-left: 4px solid var(--blue); border-radius: 7px; color: white; background: var(--ink-900); box-shadow: var(--shadow-md); opacity: 0; transform: translateY(10px); transition: .2s ease; }
.toast.is-visible { opacity: 1; transform: none; }
.toast-success { border-left-color: #67d3af; }
.toast-error { border-left-color: #f3989e; }

.site-footer { color: rgba(255,255,255,.76); background: var(--ink-950); font-size: 11px; }
.site-footer strong, .site-footer span { display: block; }
.site-footer strong { color: white; font-size: 12px; }
.project-support {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  gap: 18px;
  padding: 15px max(24px, calc((100vw - var(--content)) / 2));
  border-bottom: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.88);
  background: rgba(8,123,115,.2);
}
.project-support strong { white-space: nowrap; }
.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  gap: 24px;
  min-height: 92px;
  padding: 18px max(24px, calc((100vw - var(--content)) / 2));
}
.footer-grid > :last-child { text-align: right; }
.footer-center { display: grid; justify-items: center; gap: 9px; text-align: center; }
.footer-contacts { display: grid; gap: 5px; margin: 0; text-align: center; font-style: normal; }
.footer-contacts > span { display: flex; align-items: baseline; justify-content: center; gap: 10px; }
.footer-contacts strong { font-size: 11px; }
.footer-contacts a { color: #bcdde3; text-decoration: none; }
.footer-contacts a:hover { color: white; text-decoration: underline; }
.footer-notice { display: grid; justify-items: end; gap: 7px; }
.filing-link { display: inline-block; color: #bcdde3; text-decoration: none; }
.filing-link:hover { color: white; text-decoration: underline; }
.upload-data-notice { margin-top: 8px; color: var(--teal-700); font-weight: 700; }

@media (max-width: 1180px) {
  .institution-bar { grid-template-columns: 1fr; }
  .institution-logos { grid-template-columns: minmax(150px, 208px) minmax(220px, 325px) minmax(320px, 1fr); }
  .product-bar { grid-template-columns: 1fr; gap: 14px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { min-height: auto; }
  .overview-panels { grid-template-columns: 1fr 1fr; }
  .screening-layout { grid-template-columns: 300px minmax(0, 1fr); }
  .molecule-card-grid { grid-template-columns: repeat(2, minmax(210px, 1fr)); }
  .descriptor-item { grid-template-columns: 1fr 220px; }
  .descriptor-stats { grid-column: 1 / -1; padding: 8px 0 0; border: 0; border-top: 1px solid var(--line-soft); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :last-child { grid-column: 1 / -1; text-align: left; }
  .footer-notice { justify-items: start; }
}

@media (max-width: 1024px) {
  .detail-drawer { width: calc(100vw - 24px); max-width: none; }
}

@media (max-width: 860px) {
  .institution-bar { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 10px 16px; }
  .institution-logos { width: 100%; grid-template-columns: minmax(170px, .8fr) minmax(260px, 1.2fr); }
  .brand-mark-sklcm { grid-column: 1 / -1; }
  .product-bar { padding-top: 15px; }
  .product-title-group h1 { font-size: 21px; }
  .primary-nav { padding: 0 14px; }
  #main-content { padding: 22px 14px 42px; }
  .page-heading-row { align-items: flex-start; flex-direction: column; }
  .screening-layout { grid-template-columns: 1fr; }
  .filter-panel { position: static; }
  .filter-rows { max-height: 440px; }
  .results-toolbar { align-items: flex-start; flex-direction: column; }
  .toolbar-controls { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
  .column-picker { right: 14px; width: calc(100vw - 28px); min-width: calc(100vw - 28px); }
  .column-options { grid-template-columns: 1fr 1fr; }
  .descriptor-item { grid-template-columns: 1fr; }
  .descriptor-stats { grid-column: auto; }
  .descriptor-meta { justify-content: flex-start; }
  .catalog-search { width: 100%; }
  .detail-grid { grid-template-columns: 1fr; }
  .methodology-grid { grid-template-columns: 1fr 1fr; }
  .detail-drawer { width: calc(100vw - 14px); max-width: none; }
  .property-grid, .detail-properties { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 580px) {
  .institution-logos { grid-template-columns: 1fr; }
  .brand-mark-sklcm { grid-column: auto; }
  .brand-mark { width: 100%; }
  .institution-secondary { white-space: normal; }
  .personal-site-bar { min-height: 0; padding: 12px 16px; }
  .personal-site-bar strong { font-size: 13px; }
  .product-bar { padding-left: 14px; padding-right: 14px; }
  .prototype-tag { margin: 6px 0 0; vertical-align: 0; }
  .global-search { grid-template-columns: minmax(0, 1fr) auto; }
  .global-search input { font-size: 12px; }
  .nav-item { padding-left: 11px; padding-right: 11px; }
  .hero-copy, .hero-data-card { padding: 23px 18px; }
  .hero-copy h2, .hero-quote p { font-size: 30px; }
  .stat-grid, .overview-panels, .methodology-grid { grid-template-columns: 1fr; }
  .stat-card { min-height: 96px; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .section-heading p { text-align: left; }
  .science-boundary { grid-template-columns: 1fr; gap: 4px; }
  .page-actions { width: 100%; }
  .page-actions .button { flex: 1 1 130px; }
  .logic-switch { grid-template-columns: 1fr 1fr; }
  .logic-switch > span { grid-column: 1 / -1; }
  .filter-expression { grid-template-columns: 1fr; }
  .molecule-card-grid { grid-template-columns: 1fr; }
  .pagination { justify-content: center; flex-wrap: wrap; }
  .pagination button[data-page]:not(:first-child):not(:last-of-type) { min-width: 30px; }
  .column-options { grid-template-columns: 1fr; }
  .descriptor-heading { align-items: flex-start; flex-direction: column; }
  .property-grid, .detail-properties { grid-template-columns: 1fr; }
  .project-support { grid-template-columns: 1fr; gap: 5px; padding-left: 16px; padding-right: 16px; }
  .footer-grid { grid-template-columns: 1fr; padding-left: 16px; padding-right: 16px; }
  .footer-grid > :last-child { grid-column: auto; }
}

/* Range Slider Styles */
.filter-slider-row {
  padding: 20px 20px 16px;
  background: var(--surface-soft);
  border-radius: 8px;
  margin-top: 12px;
}

.range-slider-wrap {
  padding: 0;
  min-height: 60px;
}

.range-slider-track {
  position: relative;
  height: 10px;
  background: var(--line);
  border-radius: 5px;
  margin: 8px 12px;
}

.range-slider-range {
  position: absolute;
  height: 100%;
  background: var(--teal);
  border-radius: 4px;
}

.range-slider-min,
.range-slider-max {
  position: absolute;
  width: 100%;
  height: 10px;
  top: 0;
  left: 0;
  margin: 0;
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
}

.range-slider-min::-webkit-slider-thumb,
.range-slider-max::-webkit-slider-thumb {
  pointer-events: all;
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--surface);
  border: 3px solid var(--teal);
  box-shadow: 0 2px 8px rgba(16, 37, 58, .2);
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}

.range-slider-min::-webkit-slider-thumb:hover,
.range-slider-max::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 3px 12px rgba(16, 37, 58, .3);
}

.range-slider-min::-webkit-slider-thumb:active,
.range-slider-max::-webkit-slider-thumb:active {
  transform: scale(1.1);
  box-shadow: 0 2px 10px rgba(16, 37, 58, .35);
}

.range-slider-min::-moz-range-thumb,
.range-slider-max::-moz-range-thumb {
  pointer-events: all;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--surface);
  border: 3px solid var(--teal);
  box-shadow: 0 2px 8px rgba(16, 37, 58, .2);
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}

.range-slider-min::-moz-range-thumb:hover,
.range-slider-max::-moz-range-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 3px 12px rgba(16, 37, 58, .3);
}

.range-slider-min::-moz-range-thumb:active,
.range-slider-max::-moz-range-thumb:active {
  transform: scale(1.1);
  box-shadow: 0 2px 10px rgba(16, 37, 58, .35);
}

.range-slider-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  padding: 0 8px;
  font-size: 12px;
  color: var(--ink-600);
  font-weight: 500;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 30, 42, 0.5);
  backdrop-filter: blur(3px);
}

.modal-dialog {
  position: relative;
  z-index: 2001;
  max-width: 480px;
  width: 90%;
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(8, 27, 40, 0.3);
}

.modal-content {
  position: relative;
  width: min(90vw, 480px);
  max-height: 85vh;
  overflow: auto;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

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

.modal-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}

.modal-close {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: white;
  font-size: 24px;
  line-height: 1;
  color: var(--ink-600);
  transition: all 0.2s ease;
}

.modal-close:hover {
  border-color: var(--ink-600);
  color: var(--ink-900);
  transform: scale(1.05);
}

.modal-body {
  padding: 24px;
}

.form-field {
  margin-bottom: 16px;
}

.form-field label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: var(--ink-800);
}

.form-field input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 14px;
  transition: all 0.2s ease;
}

.form-field input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-soft);
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.message-panel {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  line-height: 1.5;
}

.message-error {
  background: #FEE;
  border: 1px solid #FCC;
  color: #C00;
}

.message-success {
  background: #EFE;
  border: 1px solid #CFC;
  color: #060;
}

.message-info {
  background: var(--teal-soft);
  border: 1px solid var(--teal);
  color: var(--ink-900);
}

.dbv2-layout { display: grid; grid-template-columns: minmax(280px, .72fr) minmax(0, 1.28fr); gap: 22px; align-items: start; }
.dbv2-form, .dbv2-results { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: white; box-shadow: var(--shadow-sm); }
.dbv2-parameter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 18px 0; }
.dbv2-parameter-grid label { display: grid; gap: 6px; color: var(--ink-700); font-size: 13px; font-weight: 700; }
.dbv2-parameter-grid input, .dbv2-parameter-grid select { min-height: 38px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; background: white; }
.dbv2-form small { display: block; margin-top: 7px; color: var(--ink-500); }
.dbv2-status { min-height: 24px; margin-top: 14px; color: var(--ink-600); font-size: 13px; }
.dbv2-summary { padding: 14px 16px; border-left: 4px solid #d92d20; background: #fff6f5; }
.dbv2-summary p { margin: 7px 0 0; }
.dbv2-results h3 { margin: 24px 0 10px; font-size: 16px; }
.dbv2-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
.dbv2-table-wrap table { width: 100%; border-collapse: collapse; font-size: 13px; }
.dbv2-table-wrap th, .dbv2-table-wrap td { padding: 9px; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: top; }
.dbv2-table-wrap th { white-space: nowrap; color: white; background: var(--ink-900); }
.dbv2-table-wrap td:last-child { min-width: 160px; }
.dbv2-empty { color: var(--ink-600); }
#dbv2-details { margin-top: 16px; }
#dbv2-log { max-height: 220px; overflow: auto; padding: 12px; background: var(--surface-alt); font-size: 12px; white-space: pre-wrap; }

@media (max-width: 860px) { .dbv2-layout { grid-template-columns: 1fr; } }
@media (max-width: 580px) { .dbv2-parameter-grid { grid-template-columns: 1fr; } }

/* DBv2.0 desktop-workflow replica */
.dbv2-workbench { display:grid; grid-template-columns:286px minmax(0,1fr); min-height:720px; overflow:hidden; border:1px solid var(--line); border-radius:14px; background:#f5f6f8; box-shadow:var(--shadow-sm); }
.dbv2-sidebar { padding:18px; background:#f9fafb; border-right:1px solid var(--line); }
.dbv2-sidebar form { display:grid; gap:14px; }
.dbv2-sidebar fieldset, .dbv2-energy-panel { display:grid; gap:9px; margin:0; padding:12px; border:1px solid var(--line); border-radius:10px; background:white; }
.dbv2-sidebar legend { padding:0 5px; color:var(--ink-900); font-size:14px; font-weight:800; }
.dbv2-sidebar label { display:grid; gap:5px; color:var(--ink-700); font-size:12px; font-weight:700; }
.dbv2-sidebar input, .dbv2-sidebar select { width:100%; min-height:34px; box-sizing:border-box; padding:6px 8px; border:1px solid var(--line); border-radius:6px; background:#fbfbfc; }
.dbv2-sidebar small, .dbv2-energy-panel p { color:var(--ink-500); font-size:11px; line-height:1.45; }
.dbv2-energy-panel h3 { margin:0; font-size:14px; }.dbv2-energy-panel p { margin:0; }
#dbv2-energy-inputs { display:grid; gap:8px; max-height:260px; overflow:auto; }.dbv2-energy-panel small { font-weight:400; }
.dbv2-actions { display:grid; gap:9px; }.dbv2-actions .button { width:100%; justify-content:center; }
.dbv2-main { position:relative; min-width:0; padding:0 22px 18px; background:white; }
.dbv2-tabs { display:flex; gap:8px; min-height:64px; align-items:end; border-bottom:1px solid var(--line); }.dbv2-tabs button { padding:15px 18px 13px; border:0; border-bottom:3px solid transparent; background:transparent; color:var(--ink-600); font-weight:800; }.dbv2-tabs button.is-active { color:var(--ink-900); border-color:var(--teal); }
.dbv2-tab-panel { padding:20px 0; }.dbv2-tab-panel h3 { margin:0 0 14px; color:var(--ink-900); font-size:17px; }.dbv2-report { min-height:500px; }
.dbv2-result-summary { display:flex; justify-content:space-between; gap:18px; align-items:center; margin-bottom:14px; padding:13px 16px; border-left:4px solid var(--teal); background:#f1fbfa; }.dbv2-result-summary span { color:var(--ink-600); font-size:12px; }
.dbv2-toolbar { display:flex; justify-content:flex-end; gap:8px; margin-bottom:10px; }.dbv2-toolbar .button { min-height:32px; padding:5px 10px; font-size:12px; }
#dbv2-xrd-canvas, #dbv2-comparison-canvas { width:100%; height:auto; display:block; border:1px solid var(--line); border-radius:8px; background:white; }.dbv2-peak-list { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }.dbv2-peak-list span { padding:5px 8px; border-radius:4px; background:var(--surface-alt); color:var(--ink-600); font-size:11px; }
.dbv2-status { padding:11px 0 0; color:var(--ink-600); font-size:13px; }.dbv2-progress { height:4px; overflow:hidden; background:#e7eef0; }.dbv2-progress span { display:block; width:35%; height:100%; background:var(--teal); animation:dbv2-progress 1s infinite linear; }@keyframes dbv2-progress{from{transform:translateX(-120%)}to{transform:translateX(360%)}}
.dbv2-editor-dialog { position:fixed; z-index:1200; inset:5vh 4vw; overflow:auto; border-radius:14px; background:white; box-shadow:0 20px 70px rgba(0,0,0,.3); }.dbv2-editor-head, .dbv2-editor-foot { display:flex; align-items:center; justify-content:space-between; gap:18px; padding:16px 20px; border-bottom:1px solid var(--line); }.dbv2-editor-head strong { display:block; font-size:20px; }.dbv2-editor-head span { color:var(--ink-500); font-size:12px; }.dbv2-editor-foot { justify-content:flex-end; border-top:1px solid var(--line); border-bottom:0; }
.dbv2-editor-body { display:grid; grid-template-columns:minmax(400px,1.25fr) minmax(360px,.75fr); gap:20px; padding:20px; }.dbv2-viewer-panel { min-height:520px; }.dbv2-viewer-panel label { display:block; margin-top:8px; font-size:13px; }.dbv2-atom-panel { display:grid; grid-template-rows:minmax(260px,1fr) auto auto; gap:12px; }.dbv2-atom-panel table { width:100%; border-collapse:collapse; }.dbv2-atom-panel th,.dbv2-atom-panel td { padding:7px; border:1px solid var(--line); font-size:12px; text-align:left; }.dbv2-atom-panel th { background:var(--surface-alt); }.dbv2-atom-panel tr { cursor:pointer; }.dbv2-atom-panel tr.is-selected { background:#e6f7f4; }.dbv2-atom-form { display:grid; grid-template-columns:1fr 1fr; gap:8px; }.dbv2-atom-form label { display:grid; gap:4px; font-size:12px; font-weight:700; }.dbv2-atom-form input { min-width:0; padding:7px; border:1px solid var(--line); border-radius:5px; }.dbv2-editor-buttons { display:flex; gap:8px; }.dbv2-editor-buttons .button { flex:1; }
.dbv2-weight-modal { position:fixed; z-index:1400; inset:0; display:grid; place-items:center; padding:30px; background:rgba(8,27,40,.5); }.dbv2-weight-modal>div { width:min(1000px,100%); max-height:85vh; overflow:auto; padding:22px; border-radius:12px; background:white; }.dbv2-weight-modal .modal-close { float:right; }.dbv2-weight-modal table { width:100%; border-collapse:collapse; }.dbv2-weight-modal th,.dbv2-weight-modal td { padding:9px; border-bottom:1px solid var(--line); text-align:left; }
@media (max-width: 900px) { .dbv2-workbench { grid-template-columns:1fr; }.dbv2-sidebar { border-right:0; border-bottom:1px solid var(--line); }.dbv2-sidebar form { grid-template-columns:repeat(2,minmax(0,1fr)); }.dbv2-actions { grid-column:1/-1; grid-template-columns:repeat(2,1fr); }.dbv2-editor-body { grid-template-columns:1fr; }.dbv2-viewer-panel { min-height:380px; } }
@media (max-width:580px) { .dbv2-main { padding:0 14px 14px; }.dbv2-sidebar form { grid-template-columns:1fr; }.dbv2-tabs { overflow:auto; }.dbv2-tabs button { white-space:nowrap; padding-left:12px; padding-right:12px; }.dbv2-result-summary { display:block; }.dbv2-result-summary span { display:block; margin-top:7px; }.dbv2-editor-dialog { inset:2vh 2vw; }.dbv2-editor-body { padding:12px; }.dbv2-editor-foot { flex-wrap:wrap; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
