.virtual-lab-root {
    padding: 0;
    box-sizing: border-box;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.virtual-lab-loading {
    padding: 18px;
    border-radius: 12px;
    border: 1px solid #d8dee8;
    background: #f5f8fc;
    color: #2d3a4a;
}

.vl-shell {
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex: 1;
    min-height: 0;
    overflow: visible;
    padding: 18px;
}

.vl-header h2 {
    margin: 0;
    font-size: 1.35rem;
    color: #153d63;
}

.vl-header p {
    margin: 6px 0 0;
    color: #43586e;
}

.vl-scenarios {
    border: 1px solid #d9e2ee;
    border-radius: 14px;
    background: linear-gradient(180deg, #fbfdff 0%, #f2f8ff 100%);
    padding: 12px;
}

.vl-scenarios-label {
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #2f5270;
    margin-bottom: 8px;
}

.vl-scenarios-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.vl-scenario-btn {
    border: 1px solid #b9cee6;
    border-radius: 999px;
    padding: 7px 11px;
    background: #ffffff;
    color: #264663;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
}

.vl-scenario-btn:hover {
    background: #eaf4ff;
}

.vl-grid {
    display: grid;
    grid-template-columns: minmax(260px, 340px) minmax(320px, 1fr);
    gap: 16px;
}

.vl-controls,
.vl-results {
    border: 1px solid #d9e2ee;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    padding: 14px;
}

.vl-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.vl-results {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.vl-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.vl-field label {
    font-size: 0.845rem;
    font-weight: 700;
    color: #1e4465;
}

.vl-field-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.vl-field-label-row label {
    margin: 0;
}

.vl-suggest-btn {
    flex-shrink: 0;
    font-size: 0.7rem;
    font-weight: 700;
    color: #2f7d4f;
    background: rgba(47, 125, 79, 0.07);
    border: 1px solid rgba(47, 125, 79, 0.25);
    border-radius: 12px;
    padding: 2px 10px;
    cursor: pointer;
    transition: background 0.15s;
    line-height: 1.6;
}

.vl-suggest-btn:hover:not(:disabled) {
    background: rgba(47, 125, 79, 0.16);
}

.vl-suggest-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.vl-field input,
.vl-field select {
    border: 1px solid #b8c9dc;
    border-radius: 8px;
    padding: 8px 10px;
    background: #ffffff;
    color: #5f7285;
    font-size: 0.9rem;
    font-family: 'Segoe UI', Tahoma, sans-serif;
    box-sizing: border-box;
}

.vl-field textarea {
    border: 1px solid #b8c9dc;
    border-radius: 8px;
    padding: 8px 10px;
    background: #ffffff;
    color: #5f7285;
    font-size: 0.9rem;
    font-family: 'Segoe UI', Tahoma, sans-serif;
    box-sizing: border-box;
}

.vl-field input::placeholder,
.vl-field textarea::placeholder,
.vl-custom-text::placeholder,
.vl-stoich-amount::placeholder,
.vl-search-box::placeholder,
#vl-stoich-products::placeholder {
    color: #c8d6e0;
    opacity: 1;
}

.vl-custom-text {
    width: 100%;
    min-height: 56px;
    resize: vertical;
}

.vl-custom-note {
    font-size: 0.78rem;
    color: #5f7488;
    background: #f1f7ff;
    border: 1px solid #d5e3f2;
    border-radius: 8px;
    padding: 7px 9px;
}

.vl-custom-actions {
    display: flex;
    justify-content: flex-start;
    gap: 6px;
    flex-wrap: wrap;
    padding-top: 8px;
    border-top: 1px solid #e8f0f8;
    margin-top: 2px;
}

.vl-reaction-picker {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    align-items: stretch;
}

.vl-suggest-reactants-btn {
    min-height: 38px;
    padding: 8px 14px;
    white-space: nowrap;
    justify-self: end;
}

.vl-custom-meta {
    font-size: 0.8rem;
    color: #2f4b66;
    border: 1px solid #cfe0f0;
    border-radius: 8px;
    background: #f4f9ff;
    padding: 8px 10px;
}

.vl-custom-meta ul {
    margin: 6px 0 0;
    padding-left: 18px;
}

.vl-custom-history {
    border: 1px solid #d8e6f4;
    border-radius: 8px;
.vl-dark-mode .vl-tax-rxn-card,
    padding: 8px;
}

.vl-history-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #325373;
    margin-bottom: 6px;
}

.vl-history-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.vl-history-item {
    border: 1px solid #d7e5f3;
    border-radius: 8px;
    background: #ffffff;
    padding: 7px 8px;
}

.vl-history-eq {
    font-size: 0.8rem;
    color: #223b54;
    margin-bottom: 4px;
}

.vl-history-meta {
    font-size: 0.74rem;
    color: #6b8299;
    margin-bottom: 6px;
}

.vl-history-actions {
    display: flex;
    gap: 6px;
}

.vl-check-good { color: #1e7e34; font-weight: 700; }
.vl-check-bad { color: #b13737; font-weight: 700; }
.vl-check-neutral { color: #6a7f93; font-weight: 700; }

.vl-safety-panel {
    border: 1px solid #d4a574;
    border-radius: 6px;
    background: #fff8f0;
    padding: 12px;
    margin-top: 12px;
    font-size: 0.85rem;
}

.vl-safety-compound { font-weight: 700; color: #8b4513; margin-bottom: 8px; }
.vl-safety-signal { font-weight: 700; margin-bottom: 6px; }
.vl-signal-danger { color: #c41e3a; }
.vl-signal-warning { color: #ed7f37; }
.vl-signal-review { color: #7a4b0f; }

.vl-pictograms {
    display: flex;
    gap: 8px;
    margin: 8px 0;
    flex-wrap: wrap;
}

.vl-ghs-pictogram {
    width: 48px;
    height: 48px;
    border: 2px solid #000;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
    text-align: center;
    padding: 2px;
    border-radius: 2px;
}

.vl-ghs-flame::before { content: "🔥 Flame"; }
.vl-ghs-corrosion::before { content: "⚠ Corrosion"; }
.vl-ghs-health::before { content: "☠ Health"; }
.vl-ghs-skull::before { content: "☠ Toxic"; }
.vl-ghs-exclamation::before { content: "⚠ Irritant"; }
.vl-ghs-oxidizing::before { content: "⊕ Oxidizer"; }
.vl-ghs-exploding_bomb::before { content: "💣 Explosive"; }
.vl-ghs-environment::before { content: "Env. Hazard"; }

.vl-hazards-list {
    list-style: none;
    padding: 0;
    margin: 8px 0 0 0;
}

.vl-hazards-list li {
    padding: 4px 0;
    border-bottom: 1px solid #e8d4c8;
    color: #6b3410;
}

.vl-hazards-list li:last-child { border-bottom: none; }

.vl-safety-source {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #d8e5f3;
    color: #617487;
    font-size: 0.76rem;
    line-height: 1.35;
}

.vl-safety-source a {
    color: #1168c4;
    font-weight: 700;
    text-decoration: none;
}

.vl-safety-source a:hover {
    text-decoration: underline;
}

.vl-stoichiometry-section {
    border: 1px solid #b8c5d1;
    border-radius: 10px;
    background: #f0f4f8;
    padding: 12px;
    margin-top: 12px;
    font-size: 0.85rem;
}

.vl-stoichiometry-title {
    font-weight: 700;
    color: #1c3d5c;
    margin-bottom: 8px;
    font-size: 0.93rem;
    letter-spacing: 0.01em;
}

.vl-stoich-inputs {
    margin-bottom: 10px;
}

.vl-stoich-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    table-layout: fixed;
}

.vl-stoich-table col.col-reactant { width: auto; }
.vl-stoich-table col.col-amount   { width: 100px; }
.vl-stoich-table col.col-unit     { width: 72px; }

.vl-stoich-table thead th {
    font-size: 0.72rem;
    font-weight: 700;
    color: #4a6a88;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 6px 10px;
    border-bottom: 2px solid #b8cde0;
    background: #dce8f3;
    text-align: left;
    white-space: nowrap;
}

.vl-stoich-table thead th.col-amount-hdr,
.vl-stoich-table thead th.col-unit-hdr {
    text-align: center;
}

.vl-stoich-table tbody tr {
    border-bottom: 1px solid #dae6f0;
}

.vl-stoich-table tbody tr:nth-child(odd) {
    background: #fff;
}

.vl-stoich-table tbody tr:nth-child(even) {
    background: #f0f6fb;
}

.vl-stoich-table td {
    padding: 6px 10px;
    vertical-align: middle;
}

.vl-stoich-amt-cell,
.vl-stoich-unit-cell {
    text-align: center;
    padding: 5px 6px;
}

.vl-stoich-label {
    font-size: 0.87rem;
    color: #2d4a62;
    font-weight: 500;
    word-break: break-word;
}

.vl-stoich-amount {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 5px 6px;
    border: 1px solid #b8cde0;
    border-radius: 4px;
    font-size: 0.86rem;
    font-family: 'Segoe UI', Tahoma, sans-serif;
    color: #2d4a62;
    text-align: center;
    background: #fff;
}

.vl-stoich-amount:focus {
    outline: none;
    border-color: #4a90d9;
    box-shadow: 0 0 0 2px rgba(74,144,217,0.2);
}

.vl-stoich-unit {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 5px 4px;
    border: 1px solid #b8cde0;
    border-radius: 4px;
    font-size: 0.86rem;
    font-family: 'Segoe UI', Tahoma, sans-serif;
    background: #fff;
    color: #2d4a62;
    text-align: center;
    cursor: pointer;
}

.vl-stoich-products-row {
    margin: 10px 0 8px;
}

.vl-stoich-products-row label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    color: #3d5a7a;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 4px;
}

.vl-calculate-btn {
    display: block;
    width: 100%;
    padding: 9px 14px;
    background: #1a60c8;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 4px;
    font-family: 'Segoe UI', Tahoma, sans-serif;
    transition: background 0.15s;
    letter-spacing: 0.01em;
}

.vl-calculate-btn:hover {
    background: #1451a8;
}

.vl-calculate-btn:disabled {
    background: #7fa7d8;
    cursor: not-allowed;
}

.vl-stoich-results {
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    background: #fafbfc;
    padding: 8px;
}

.vl-stoich-output {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.vl-stoich-item {
    padding: 6px;
    background: #fff;
    border-left: 3px solid #2c5282;
    border-radius: 2px;
    color: #1a202c;
    font-size: 0.8rem;
}

.vl-stoich-item strong {
    color: #2c5282;
}

.vl-stoich-item ul {
    margin: 4px 0 0 20px;
    padding: 0;
    list-style: disc;
}

.vl-stoich-item li {
    margin: 2px 0;
    color: #4a5568;
}

.vl-spec-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 8px;
    font-size: 0.82rem;
    color: #2b4863;
}

.vl-spec-groups {
    font-size: 0.82rem;
    color: #365570;
    margin-bottom: 10px;
}

.vl-spec-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 10px;
}

.vl-spec-panel {
    border: 1px solid #d5e2ee;
    border-radius: 8px;
    background: #f9fcff;
    padding: 8px;
}

.vl-spec-panel h4 {
    margin: 0 0 6px;
    font-size: 0.82rem;
    color: #1d3f5f;
}

.vl-spec-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.76rem;
}

.vl-spec-table th,
.vl-spec-table td {
    border: 1px solid #d8e5f3;
    padding: 4px 6px;
    text-align: left;
    vertical-align: top;
}

.vl-spec-table th {
    background: #eef5fd;
    color: #2b4d6c;
    font-weight: 700;
}

.vl-spec-list {
    margin: 0;
    padding-left: 16px;
    font-size: 0.78rem;
    color: #2f4e6a;
}

.vl-spec-notes {
    margin: 10px 0 0;
    padding-left: 18px;
    font-size: 0.76rem;
    color: #5a7187;
}

.vl-ana-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(90px, 1fr));
    gap: 8px;
}

.vl-ana-kpi {
    border: 1px solid #d4e0ec;
    border-radius: 8px;
    background: #f6fbff;
    padding: 7px;
}

.vl-ana-k {
    font-size: 0.72rem;
    color: #56728c;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.vl-ana-v {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1d4464;
}

.vl-ana-best {
    margin-top: 8px;
    font-size: 0.8rem;
    color: #2c4c68;
}

.vl-ana-sens {
    margin-top: 8px;
    font-size: 0.8rem;
    color: #2c4c68;
}

.vl-ana-badge {
    display: inline-block;
    border: 1px solid #cbdced;
    border-radius: 999px;
    padding: 2px 8px;
    margin: 0 4px 4px 0;
    background: #eef6ff;
    color: #315272;
    font-size: 0.74rem;
    font-weight: 700;
}

.vl-opt-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 6px;
    font-size: 0.82rem;
    color: #284969;
}

.vl-opt-basis {
    font-size: 0.74rem;
    color: #5c7790;
}

.vl-opt-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(160px, 1fr));
    gap: 6px;
    margin-bottom: 8px;
}

.vl-opt-item {
    border: 1px solid #d4e1ee;
    border-radius: 6px;
    background: #f8fcff;
    padding: 6px 8px;
    font-size: 0.78rem;
    color: #2e4f6d;
}

.vl-opt-d {
    color: #6e8498;
}

.vl-opt-note {
    margin-top: 8px;
    font-size: 0.75rem;
    color: #5b7388;
}

@media (max-width: 980px) {
    .vl-spec-grid {
        grid-template-columns: 1fr;
    }

    .vl-ana-grid {
        grid-template-columns: repeat(2, minmax(100px, 1fr));
    }

    .vl-opt-grid {
        grid-template-columns: 1fr;
    }
}

.vl-eq-source {
    font-size: 0.78rem;
    color: #2f7d4f;
    font-weight: 700;
    margin-bottom: 6px;
}

.vl-reactants-line {
    font-size: 0.82rem;
    color: #31495f;
    margin-bottom: 6px;
}

/* ── Reaction Equation Banner ─────────────────────────────────────────────── */
.vl-rxn-banner {
    border: 1.5px solid #c8d8ec;
    border-top: 3px solid #4a6a8a;
    border-radius: 10px;
    background: linear-gradient(160deg, #eef4ff 0%, #f8fbff 100%);
    padding: 12px 14px 12px;
    margin-bottom: 10px;
}

.vl-rxn-banner.vl-fam-organic { border-color: #a8c0d8; border-top-color: #4a6a8a; background: linear-gradient(160deg, #edf4ff 0%, #f6f9ff 100%); }
.vl-rxn-banner.vl-fam-ionic   { border-color: #ddc890; border-top-color: #c47c11; background: linear-gradient(160deg, #fff8e8 0%, #fffdf6 100%); }
.vl-rxn-banner.vl-fam-bio     { border-color: #98c898; border-top-color: #2f7d4f; background: linear-gradient(160deg, #ebf6ec 0%, #f5faf5 100%); }

/* Header row */
.vl-rxn-banner-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.vl-rxn-banner-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #4a6a8a;
    flex-shrink: 0;
}
.vl-rxn-banner.vl-fam-ionic .vl-rxn-banner-label { color: #c47c11; }
.vl-rxn-banner.vl-fam-bio   .vl-rxn-banner-label { color: #2f7d4f; }

.vl-rxn-mech-badge {
    font-size: 0.67rem;
    font-weight: 500;
    color: #3a5a78;
    background: rgba(74, 106, 138, 0.07);
    border: 1px solid rgba(74, 106, 138, 0.18);
    border-radius: 20px;
    padding: 2px 10px;
    min-width: 0;
    flex-shrink: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 66%;
    cursor: default;
    font-style: italic;
}
.vl-rxn-banner.vl-fam-ionic .vl-rxn-mech-badge { color: #7a4800; background: rgba(196, 124, 17, 0.07); border-color: rgba(196, 124, 17, 0.2); }
.vl-rxn-banner.vl-fam-bio   .vl-rxn-mech-badge { color: #1e5a32; background: rgba(47, 125, 79, 0.07); border-color: rgba(47, 125, 79, 0.2); }

/* 3-column body */
.vl-rxn-body {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

/* Side columns (reactants / products) */
.vl-rxn-col {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
}

.vl-rxn-col-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.vl-rxn-icon-svg {
    width: 32px;
    height: 38px;
    display: block;
    flex-shrink: 0;
}

.vl-rxn-col-label {
    font-size: 0.63rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #6a8aaa;
}
.vl-rxn-col-products .vl-rxn-col-label { color: #4a9a68; }

/* Chip stack — vertical, full column width, wraps text */
.vl-rxn-chips {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 5px;
    width: 100%;
}

.vl-rxn-chip {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    padding: 6px 10px 6px 8px;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    border: 1px solid #b8cfe8;
    background: #ffffff;
    color: #1d3f5f;
    white-space: normal;
    word-break: break-word;
    line-height: 1.35;
    box-shadow: 0 1px 4px rgba(74, 106, 138, 0.10), inset 0 1px 0 rgba(255,255,255,0.85);
}

.vl-rxn-chip::before {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #7aaad8;
    flex-shrink: 0;
    margin-top: 3px;
}

.vl-rxn-chip-product {
    border-color: #98c898;
    background: #f2faf2;
    color: #1a5a2a;
    box-shadow: 0 1px 4px rgba(47, 125, 79, 0.10), inset 0 1px 0 rgba(255,255,255,0.85);
}
.vl-rxn-chip-product::before { background: #4ab870; }

.vl-rxn-banner.vl-fam-ionic .vl-rxn-chip          { border-color: #ddc890; background: #fffdf6; color: #5a3000; }
.vl-rxn-banner.vl-fam-ionic .vl-rxn-chip::before   { background: #c47c11; }
.vl-rxn-banner.vl-fam-ionic .vl-rxn-chip-product   { border-color: #98c898; background: #f2faf2; color: #1a5a2a; }
.vl-rxn-banner.vl-fam-bio   .vl-rxn-chip           { border-color: #98c898; background: #f0f8f0; color: #1a4a2a; }
.vl-rxn-banner.vl-fam-bio   .vl-rxn-chip::before   { background: #2f7d4f; }
.vl-rxn-banner.vl-fam-bio   .vl-rxn-chip-product   { border-color: #6db87c; background: #eaf6ec; color: #1a5a2a; }

/* Centre arrow column */
.vl-rxn-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex-shrink: 0;
    min-width: 110px;
    padding-top: 46px; /* align arrow with chips, below the icon+label head */
}

.vl-rxn-big-arrow {
    width: 110px;
    height: 50px;
    display: block;
    overflow: visible;
}

.vl-rxn-conditions {
    font-size: 0.64rem;
    font-weight: 600;
    color: #3a6a8a;
    text-align: center;
    white-space: nowrap;
    background: rgba(74, 106, 138, 0.07);
    border: 1px solid rgba(74, 106, 138, 0.18);
    border-radius: 10px;
    padding: 2px 9px;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.vl-rxn-banner.vl-fam-ionic .vl-rxn-conditions { color: #7a4800; background: rgba(196,124,17,0.07); border-color: rgba(196,124,17,0.2); }
.vl-rxn-banner.vl-fam-bio   .vl-rxn-conditions { color: #1e5a32; background: rgba(47,125,79,0.07); border-color: rgba(47,125,79,0.2); }

/* Equation text footer */
.vl-rxn-eq-text {
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px solid #dce8f4;
    font-family: Consolas, 'Courier New', monospace;
    font-size: 0.84rem;
    color: #1e2d3c;
    text-align: center;
    line-height: 1.5;
}

.vl-rxn-eq-source-badge {
    display: inline-block;
    margin-left: 8px;
    font-family: inherit;
    font-size: 0.62rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    background: #e8f5ee;
    color: #2f7d4f;
    border: 1px solid #b4d8c4;
    vertical-align: middle;
}

/* Legacy/unused selectors — kept for safety */
.vl-rxn-plus, .vl-rxn-arrow-wrap, .vl-rxn-arrow-svg, .vl-rxn-arrow-label, .vl-rxn-banner-row { display: none; }

/* Dark mode */
.vl-dark-mode .vl-rxn-banner                { border-color: #2e4058; border-top-color: #5a8ab0; background: linear-gradient(160deg, #131e2a 0%, #1a2432 100%); }
.vl-dark-mode .vl-rxn-banner.vl-fam-organic { border-color: #2e4a68; border-top-color: #5a8ab0; }
.vl-dark-mode .vl-rxn-banner.vl-fam-ionic   { border-color: #4a3818; border-top-color: #b08030; }
.vl-dark-mode .vl-rxn-banner.vl-fam-bio     { border-color: #184a28; border-top-color: #3a9a60; }
.vl-dark-mode .vl-rxn-banner-label          { color: #5a8ab0; }
.vl-dark-mode .vl-rxn-mech-badge            { color: #8ab0d0; background: rgba(90,138,176,0.12); border-color: rgba(90,138,176,0.25); }
.vl-dark-mode .vl-rxn-col-label             { color: #4a6a8a; }
.vl-dark-mode .vl-rxn-col-products .vl-rxn-col-label { color: #3a8a58; }
.vl-dark-mode .vl-rxn-chip                  { border-color: #2e4058; background: #1f3050; color: #b0c8e0; box-shadow: 0 1px 4px rgba(0,0,0,0.3); }
.vl-dark-mode .vl-rxn-chip-product          { border-color: #184a28; background: #101e12; color: #7ad87a; }
.vl-dark-mode .vl-rxn-conditions            { color: #7a9ab5; background: rgba(90,138,176,0.1); border-color: rgba(90,138,176,0.22); }
.vl-dark-mode .vl-rxn-eq-text               { border-top-color: #2e4058; color: #c0d8f0; }

.vl-actions {
    margin-top: 4px;
    padding-top: 10px;
    border-top: 1px solid #e6eef8;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#vl-run-btn {
    border: 0;
    border-radius: 8px;
    background: #1168c4;
    color: #ffffff;
    font-weight: 700;
    padding: 11px 16px;
    font-size: 0.95rem;
    cursor: pointer;
    width: 100%;
    transition: background 0.15s ease;
}

#vl-run-btn:hover {
    background: #0d55a8;
}

#vl-run-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.vl-btn-secondary {
    border: 1px solid #b8cfe8;
    border-radius: 8px;
    background: #eef5fb;
    color: #1d4a7a;
    font-weight: 600;
    padding: 8px 16px;
    font-size: 0.88rem;
    cursor: pointer;
    width: 100%;
    transition: background 0.15s ease;
}

.vl-btn-secondary:hover:not(:disabled) {
    background: #dceaf6;
    border-color: #8ab4d8;
}

.vl-btn-secondary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ── Optimizer result card ─────────────────────────────────────────────── */
.vl-optimize-out {
    margin-top: 2px;
}

.vl-optimize-card {
    border: 1px solid #b8d4f0;
    border-radius: 10px;
    background: linear-gradient(160deg, #f0f8ff 0%, #e8f4fe 100%);
    border-left: 3px solid #1168c4;
    padding: 12px 14px;
    font-size: 0.84rem;
}

.vl-optimize-card-hdr {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.vl-optimize-icon { font-size: 1rem; }

.vl-optimize-card-hdr strong {
    font-size: 0.88rem;
    color: #1a3c6a;
    flex: 1;
}

.vl-optimize-yield-badge {
    font-size: 0.7rem;
    font-weight: 700;
    color: #2f7d4f;
    background: rgba(47,125,79,0.1);
    border: 1px solid rgba(47,125,79,0.25);
    border-radius: 12px;
    padding: 2px 8px;
}

.vl-optimize-rationale {
    color: #2f4b66;
    margin: 0 0 10px;
    line-height: 1.5;
}

.vl-optimize-kpis {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.vl-optimize-kpi {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #fff;
    border: 1px solid #cde0f4;
    border-radius: 8px;
    padding: 5px 10px;
    min-width: 58px;
}

.vl-optimize-kpi-v {
    font-weight: 700;
    font-size: 0.88rem;
    color: #1168c4;
}

.vl-optimize-kpi-l {
    font-size: 0.68rem;
    color: #5a7a9a;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.vl-optimize-tips, .vl-optimize-warnings {
    margin: 6px 0 0;
    padding-left: 18px;
    color: #2f4b66;
    line-height: 1.5;
}

.vl-optimize-warnings li { color: #7a4a00; }

/* ── Mechanism Explainer card ──────────────────────────────────────────── */
.vl-mech-explain-hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.vl-mech-explain-hdr h3 { margin: 0; }

.vl-mech-explain-loading, .vl-mech-explain-err {
    font-size: 0.84rem;
    color: #4a6a8a;
    padding: 8px 0;
}

.vl-mech-explain-err { color: #922b2b; }

.vl-mech-overview {
    font-size: 0.84rem;
    color: #2f4b66;
    margin: 10px 0 12px;
    line-height: 1.55;
}

.vl-mech-steps {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}

.vl-mech-step {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: #f5f9ff;
    border: 1px solid #d5e5f5;
    border-radius: 10px;
    padding: 10px 12px;
}

.vl-mech-step-num {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #1168c4;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}

.vl-mech-step-body { flex: 1; }

.vl-mech-step-title {
    font-weight: 700;
    font-size: 0.86rem;
    color: #1a3654;
    margin-bottom: 4px;
}

.vl-mech-step-desc {
    font-size: 0.82rem;
    color: #2f4b66;
    line-height: 1.5;
}

.vl-mech-step-arrow {
    font-size: 0.78rem;
    color: #4a6a9a;
    margin-top: 4px;
    font-style: italic;
}

.vl-mech-step-inter {
    font-size: 0.78rem;
    color: #6a4a9a;
    margin-top: 4px;
}

.vl-mech-principle {
    font-size: 0.84rem;
    color: #1a4a2a;
    background: rgba(47,125,79,0.07);
    border: 1px solid rgba(47,125,79,0.2);
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 10px;
    line-height: 1.5;
}

.vl-mech-mistakes {
    font-size: 0.82rem;
    color: #7a4a00;
    background: rgba(196,124,17,0.07);
    border: 1px solid rgba(196,124,17,0.2);
    border-radius: 8px;
    padding: 8px 12px;
    line-height: 1.5;
}

.vl-mech-mistakes ul {
    margin: 6px 0 0;
    padding-left: 18px;
}

/* ── Green Chemistry Scorer ────────────────────────────────────────────── */
.vl-green-summary {
    margin-top: 10px;
    margin-bottom: 12px;
}

.vl-green-overall {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.vl-green-grade {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 3px solid;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 900;
    flex-shrink: 0;
}

.vl-green-score-num {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1;
}

.vl-green-score-max {
    font-size: 0.75rem;
    font-weight: 500;
    color: #7a9ab8;
    margin-left: 2px;
}

.vl-green-score-bar-wrap {
    flex: 1;
    min-width: 80px;
    height: 8px;
    background: #e4eef8;
    border-radius: 4px;
    overflow: hidden;
}

.vl-green-score-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease;
}

.vl-green-cats {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.vl-green-cat-row {
    display: grid;
    grid-template-columns: 140px 1fr 36px;
    grid-template-rows: auto auto;
    gap: 0 8px;
    align-items: center;
}

.vl-green-cat-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #2f4b66;
    white-space: nowrap;
}

.vl-green-cat-bar-wrap {
    height: 7px;
    background: #e4eef8;
    border-radius: 4px;
    overflow: hidden;
}

.vl-green-cat-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.vl-green-cat-score {
    font-size: 0.78rem;
    font-weight: 700;
    text-align: right;
}

.vl-green-cat-comment {
    grid-column: 1 / -1;
    font-size: 0.75rem;
    color: #5a7a9a;
    line-height: 1.4;
    padding-top: 2px;
}

/* ── Reaction Designer ─────────────────────────────────────────────────── */
.vl-design-row {
    display: flex;
    gap: 6px;
    align-items: stretch;
}

.vl-design-input {
    flex: 1;
    border: 1px solid #b8c9dc;
    border-radius: 8px;
    padding: 7px 10px;
    font-size: 0.84rem;
    color: #1e3a5a;
    background: #fff;
    min-width: 0;
}

.vl-design-input:focus {
    outline: none;
    border-color: #1168c4;
    box-shadow: 0 0 0 2px rgba(17,104,196,0.12);
}

.vl-design-results {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}

.vl-design-tip {
    font-size: 0.8rem;
    color: #2f5a1a;
    background: rgba(47,125,79,0.08);
    border: 1px solid rgba(47,125,79,0.2);
    border-radius: 8px;
    padding: 6px 10px;
    line-height: 1.45;
}

.vl-design-match {
    background: #f8fbff;
    border: 1px solid #d5e2ee;
    border-radius: 10px;
    padding: 10px 12px;
}

.vl-design-match-hdr {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.vl-design-match-name {
    font-weight: 700;
    font-size: 0.88rem;
    color: #1a3654;
    flex: 1;
}

.vl-design-match-fam {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.vl-design-match-why {
    font-size: 0.8rem;
    color: #4a6a8a;
    line-height: 1.45;
}

/* ── Lab Safety Advisor ────────────────────────────────────────────────── */
.vl-safety-level {
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 8px;
    padding: 8px 12px;
    margin: 10px 0 12px;
    font-size: 0.88rem;
}

/* ── Yield Explanation card ───────────────────────────────────────── */
.vl-yield-explain-card {
    margin-top: 12px;
}
.vl-yield-headline {
    font-size: 0.92rem;
    color: #1d3f5f;
    font-weight: 600;
    margin: 0 0 10px;
    padding: 8px 12px;
    background: #eef4fb;
    border-radius: 6px;
}
.vl-yield-factors {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}
.vl-yield-factor {
    background: #f9fcff;
    border-radius: 6px;
    padding: 8px 12px 8px 14px;
    font-size: 0.86rem;
}
.vl-yield-factor-hdr {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}
.vl-yield-impact {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.vl-yield-factor-desc {
    color: #3a5a78;
    font-size: 0.84rem;
    line-height: 1.45;
}

/* ── Quiz / Problem Generator card ───────────────────────────────── */
.vl-quiz-card {
    margin-top: 12px;
}
.vl-quiz-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}
.vl-quiz-type-badge {
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: #dce8f8;
    color: #1d3f5f;
    border-radius: 4px;
    padding: 2px 8px;
}
.vl-quiz-diff {
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 4px;
    padding: 2px 7px;
}
.vl-quiz-diff-easy   { background: #d9f0e5; color: #2f7d4f; }
.vl-quiz-diff-medium { background: #fef0d8; color: #c47c11; }
.vl-quiz-diff-hard   { background: #fde8e8; color: #b13737; }
.vl-quiz-question {
    font-size: 0.94rem;
    color: #1a3654;
    font-weight: 600;
    line-height: 1.5;
    padding: 10px 14px;
    background: #f2f7fd;
    border-radius: 8px;
    border-left: 3px solid #4a6a8a;
    margin-bottom: 10px;
}
.vl-quiz-hint {
    font-size: 0.83rem;
    color: #5a7a9a;
    margin-bottom: 10px;
    padding: 6px 10px;
    background: #fffbf0;
    border-radius: 6px;
    border: 1px solid #f0dfa0;
}
.vl-quiz-reveal-btn {
    background: #1d3f5f;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 7px 18px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.vl-quiz-reveal-btn:hover { background: #2a5a8a; }
.vl-quiz-answer-wrap {
    margin-bottom: 10px;
}
.vl-quiz-answer {
    background: #e8f5ee;
    border: 1px solid #b4d9c5;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.88rem;
    color: #1d3f5f;
    line-height: 1.5;
}
.vl-quiz-explanation {
    margin-top: 8px;
    color: #3a5a78;
    font-size: 0.85rem;
    font-weight: 400;
}


.vl-safety-level-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.vl-safety-section {
    margin-bottom: 12px;
}

.vl-safety-section > strong {
    display: block;
    font-size: 0.84rem;
    color: #1a3654;
    margin-bottom: 6px;
}

.vl-safety-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
}

.vl-safety-table th, .vl-safety-table td {
    text-align: left;
    padding: 5px 8px;
    border-bottom: 1px solid #dce8f4;
    color: #2f4b66;
}

.vl-safety-table th {
    font-weight: 700;
    color: #1a3654;
    background: #f0f6ff;
}

.vl-safety-ppe {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.vl-safety-ppe-chip {
    font-size: 0.78rem;
    background: #eef5fb;
    border: 1px solid #c5d8ee;
    border-radius: 14px;
    padding: 3px 10px;
    color: #1d4a7a;
}

.vl-safety-incompat {
    background: #fff5f0;
    border-color: #f5c4b0;
    color: #8b2500;
}

.vl-safety-firstaid {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.vl-safety-fa-row {
    font-size: 0.8rem;
    color: #2f4b66;
    line-height: 1.45;
}

.vl-safety-fa-label {
    font-weight: 700;
    color: #1a3654;
    margin-right: 5px;
}

.vl-safety-text {
    font-size: 0.8rem;
    color: #2f4b66;
    line-height: 1.5;
    margin: 0;
}

.vl-status {
    min-height: 22px;
    color: #1e4f7a;
    font-size: 0.84rem;
    background: #eef5ff;
    border: 1px solid #cce0f8;
    border-radius: 8px;
    padding: 6px 10px;
    display: none;
}

.vl-status:not(:empty) {
    display: block;
}

.vl-status.vl-status-error {
    color: #922b2b;
    background: #fff5f5;
    border-color: #f5c4c4;
}

.vl-result-empty {
    color: #6a7f93;
    text-align: center;
    padding: 32px 20px 40px;
    font-size: 0.9rem;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.vl-empty-flask {
    display: flex;
    justify-content: center;
}

.vl-empty-flask-svg {
    width: 96px;
    height: 128px;
    filter: drop-shadow(0 4px 16px rgba(26,108,200,0.18));
}

@keyframes vl-bubble-rise {
    0%   { transform: translateY(0)  scale(1);   opacity: 0.7; }
    80%  { transform: translateY(-28px) scale(1.1); opacity: 0.5; }
    100% { transform: translateY(-36px) scale(0.8); opacity: 0; }
}
@keyframes vl-bubble-rise-2 {
    0%   { transform: translateY(0)  scale(1);   opacity: 0.6; }
    80%  { transform: translateY(-22px) scale(1.1); opacity: 0.4; }
    100% { transform: translateY(-30px) scale(0.7); opacity: 0; }
}
@keyframes vl-liquid-sway {
    0%, 100% { transform: translateX(0); }
    50%       { transform: translateX(4px); }
}

.vl-flask-bubble {
    animation: vl-bubble-rise 2.8s ease-in infinite;
    transform-origin: center;
}
.vl-flask-bubble-2 {
    animation: vl-bubble-rise-2 2.1s 0.7s ease-in infinite;
}
.vl-flask-bubble-3 {
    animation: vl-bubble-rise 3.4s 1.4s ease-in infinite;
}
.vl-flask-liquid {
    animation: vl-liquid-sway 3.5s ease-in-out infinite;
    transform-origin: center;
}

.vl-empty-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1c3d5c;
    margin-top: 4px;
}

.vl-empty-desc {
    font-size: 0.845rem;
    color: #5a7590;
    line-height: 1.6;
    font-style: normal;
}

.vl-empty-hints {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin-top: 4px;
}

.vl-empty-hint {
    background: #eef5ff;
    border: 1px solid #c8daf0;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #2a5070;
    white-space: nowrap;
}

.vl-result {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.vl-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(70px, 1fr));
    gap: 8px;
}

.vl-kpi {
    border: 1.5px solid #bdd0e4;
    border-radius: 8px;
    background: linear-gradient(135deg, #f8fbff 0%, #eff6ff 100%);
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}

.vl-kpi-label {
    font-size: 0.76rem;
    font-weight: 700;
    color: #4a6880;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.vl-kpi-value {
    font-size: 1.05rem;
    font-weight: 800;
    color: #153d63;
}

.vl-score-high {
    color: #2f7d4f !important;
}

.vl-score-med {
    color: #c47c11 !important;
}

.vl-score-low {
    color: #b13737 !important;
}

.vl-presets-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin: 8px 0;
    font-size: 0.8rem;
}

.vl-preset-label {
    font-weight: 700;
    color: #2f5270;
    white-space: nowrap;
}

.vl-preset-btn {
    border: 1px solid #c5d3e2;
    border-radius: 8px;
    padding: 4px 9px;
    background: #f0f5fb;
    color: #2f5270;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.vl-preset-btn:hover {
    background: #deeaf7;
    border-color: #9bbad6;
    color: #1a3f62;
}

.vl-export-bar {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e0e6f1;
}

.vl-btn-export {
    border: 1px solid #c5d3e2;
    border-radius: 8px;
    padding: 6px 10px;
    height: 30px;
    background: #f0f5fb;
    color: #2f5270;
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
}

.vl-btn-export:hover {
    background: #e0ecf8;
    border-color: #a8c0d8;
}

#vl-export-download {
    padding: 6px 10px;
    height: 30px;
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1;
    border: none;
    border-radius: 8px;
    background-color: var(--brand);
    color: #ffffff;
    transition: background-color 0.2s ease;
}

#vl-export-download:hover {
    background-color: var(--brand-strong);
    border: none;
}

.vl-export-select {
    border: 1px solid #c5d3e2;
    border-radius: 6px;
    padding: 5px 10px;
    height: 30px;
    transform: translateY(2.5px);
    line-height: 1;
    background: #ffffff;
    color: #2f5270;
    font-size: 0.9rem;
    font-weight: 400;
    cursor: pointer;
}

.vl-card {
    border: 1px solid #d5e0ee;
    border-radius: 10px;
    background: #ffffff;
    padding: 12px;
}

.vl-card h3 {
    margin: 0 0 12px;
    padding-bottom: 8px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #1c3d5c;
    border-bottom: 1.5px solid #d0e2f4;
    letter-spacing: 0.01em;
}

.vl-timeline-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.vl-timeline-controls input[type="range"] {
    width: 100%;
}

.vl-timeline-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#vl-play-btn {
    border: 1px solid #9db8d7;
    border-radius: 8px;
    background: #ffffff;
    color: #214763;
    font-weight: 700;
    padding: 6px 11px;
    cursor: pointer;
}

.vl-equation {
    font-family: Consolas, 'Courier New', monospace;
    font-size: 0.92rem;
    color: #1e2d3c;
    background: #f4f9ff;
    border: 1px solid #d8e5f3;
    border-radius: 8px;
    padding: 8px;
}

.vl-grid-two {
    display: grid;
    grid-template-columns: repeat(2, minmax(100px, 1fr));
    gap: 8px;
}

.vl-small-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: #4b6178;
}

.vl-small-value {
    display: block;
    margin-top: 2px;
    color: #1f3144;
}

.vl-muted {
    color: #617487;
    font-style: italic;
}

.vl-card ul,
.vl-card ol {
    margin: 0;
    padding-left: 18px;
    color: #22374c;
}

.vl-basis-card {
    border-left: 3px solid #c47c11;
}

.vl-basis-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(120px, 1fr));
    gap: 8px;
    margin-bottom: 8px;
}

.vl-basis-list {
    margin-top: 8px !important;
    line-height: 1.55;
}

.vl-basis-note {
    margin-top: 10px;
    padding: 8px 10px;
    border: 1px solid #efd5a6;
    border-radius: 8px;
    background: #fff8ec;
    color: #7a4b0f;
    font-size: 0.82rem;
    line-height: 1.45;
}

.vl-verify-field {
    padding: 10px 11px;
    border: 1px solid #cfe0f4;
    border-radius: 8px;
    background: #f8fbff;
}

.vl-verify-select {
    width: 100%;
    min-height: 36px;
    border-color: #b9cee6 !important;
    background: #ffffff;
    color: #153d63 !important;
    font-weight: 800;
}

.vl-verify-select:focus {
    border-color: #1168c4 !important;
    box-shadow: 0 0 0 3px rgba(17, 104, 196, 0.14);
}

.vl-field-note {
    margin-top: 5px;
    color: #617487;
    font-size: 0.78rem;
    line-height: 1.35;
}

.vl-verification-card {
    border-left: 3px solid #1168c4;
}

.vl-verification-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.vl-verification-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 9px;
    border: 1px solid #cfe0f4;
    border-radius: 999px;
    background: #f4f9ff;
    color: #264663;
    font-size: 0.78rem;
    font-weight: 700;
}

.vl-source-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.vl-source-chip {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 9px 10px;
    border: 1px solid #cfe0f4;
    border-radius: 8px;
    background: #ffffff;
    color: #153d63;
    text-decoration: none;
}

.vl-source-chip:hover {
    border-color: #8ebbe8;
    background: #f4f9ff;
}

.vl-source-chip span {
    font-size: 0.84rem;
    font-weight: 800;
}

.vl-source-chip small {
    color: #617487;
    font-size: 0.74rem;
    line-height: 1.25;
}

@media (max-width: 640px) {
    .vl-basis-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 980px) {
    .vl-grid {
        grid-template-columns: 1fr;
    }

    .vl-kpis {
        grid-template-columns: 1fr;
    }
}

/* ═══════════════════════════════════════════════════════════
   FEATURE 1 – Mode tabs (Simulate / Compare / Explore)
═══════════════════════════════════════════════════════════ */
.vl-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 10px;
}

.vl-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.vl-header-actions {
    display: flex;
    gap: 8px;
}

.vl-btn-icon {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.vl-btn-icon:hover {
    background: #e8f0f9;
}

.vl-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.vl-modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
}

.vl-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid #e0e6f1;
}

.vl-modal-header h2 {
    margin: 0;
    font-size: 1.1rem;
    color: #153d63;
}

.vl-modal-close {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1.2rem;
    color: #666;
}

.vl-modal-tabs {
    display: flex;
    border-bottom: 1px solid #e0e6f1;
    background: #f8fafc;
}

.vl-modal-tab {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 12px;
    color: #667085;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.vl-modal-tab:hover {
    color: #244865;
}

.vl-modal-tab-active {
    color: #153d63;
    border-bottom-color: #1168c4 !important;
}

.vl-modal-body {
    padding: 16px;
}

.vl-modal-tab-pane {
    display: block;
}

.vl-favorites-panel {
    padding: 8px 0;
}

.vl-favs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    gap: 8px;
}

.vl-favs-header h3 {
    margin: 0;
    font-size: 0.95rem;
    color: #244865;
}

.vl-favorites-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.vl-fav-item {
    border: 1px solid #d5e0ee;
    border-radius: 8px;
    padding: 10px;
    background: #f8fbff;
    transition: all 0.2s ease;
}

.vl-fav-item:hover {
    background: #f0f5fb;
    border-color: #c5d3e2;
}

.vl-fav-name {
    font-weight: 700;
    color: #244865;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.vl-fav-meta {
    font-size: 0.8rem;
    color: #667085;
    margin-bottom: 6px;
}

.vl-fav-notes {
    font-size: 0.8rem;
    color: #5a6b7d;
    background: #f8f9fa;
    padding: 6px;
    border-radius: 4px;
    border-left: 2px solid #d5e0ee;
    margin: 6px 0;
    font-style: italic;
}

.vl-fav-actions {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
}

.vl-fav-load,
.vl-fav-delete {
    border: 1px solid #c5d3e2;
    border-radius: 4px;
    padding: 4px 8px;
    background: white;
    color: #2f5270;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}

.vl-fav-load:hover {
    background: #e8f0f9;
}

.vl-fav-delete:hover {
    background: #fff0f0;
    color: #c94040;
    border-color: #e8b8b8;
}

.vl-settings-section {
    margin-bottom: 18px;
}

.vl-settings-section h3 {
    margin: 0 0 10px;
    font-size: 0.95rem;
    color: #244865;
    font-weight: 700;
}

.vl-settings-section label {
    display: block;
    margin: 8px 0;
    font-size: 0.9rem;
    color: #3b5c7c;
}

.vl-settings-section input[type="checkbox"] {
    margin-right: 6px;
}

.vl-settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 10px;
}

.vl-settings-grid div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.vl-settings-grid label {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 600;
    color: #2f5270;
}

.vl-settings-grid input {
    padding: 6px;
    border: 1px solid #c5d3e2;
    border-radius: 4px;
    font-size: 0.9rem;
    font-family: 'Segoe UI', Tahoma, sans-serif;
    color: #5f7285;
}

.vl-settings-grid input::placeholder {
    color: #c8d6e0;
    opacity: 1;
}

.vl-settings-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #e0e6f1;
}

.vl-settings-actions button {
    padding: 8px 12px;
    border: 1px solid #c5d3e2;
    border-radius: 6px;
    background: #f0f5fb;
    color: #2f5270;
    font-weight: 600;
    cursor: pointer;
}

.vl-settings-actions button:hover {
    background: #e0ecf8;
}

.vl-btn-secondary {
    background: #fff0f0 !important;
    color: #c94040 !important;
    border-color: #e8b8b8 !important;
}

.vl-mode-tabs {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.vl-mode-tab {
    border: 1px solid #b9cee6;
    border-radius: 8px;
    padding: 6px 14px;
    background: #ffffff;
    color: #3b5c7c;
    font-size: 0.83rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
}

.vl-mode-tab:hover { background: #eaf4ff; }

.vl-mode-tab-active {
    background: #1168c4;
    color: #ffffff;
    border-color: #1168c4;
}

.vl-mode-panel { display: block; }

/* ── Browse-by toggle ── */
.vl-browse-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.vl-browse-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #3b5170;
}

.vl-browse-btns {
    display: flex;
    gap: 3px;
}

.vl-browse-btn {
    border: 1px solid #b8c9dc;
    border-radius: 8px;
    padding: 5px 11px;
    background: #f5f8fc;
    color: #3b5170;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}

.vl-browse-btn:hover { background: #e0eeff; }

.vl-browse-btn-active {
    background: #1168c4;
    color: #ffffff;
    border-color: #1168c4;
    box-shadow: 0 1px 4px rgba(17,104,196,0.18);
}

.vl-mech-bar {
    margin-top: 6px;
    padding: 6px 10px;
    background: #f8fbff;
    border-left: 3px solid;
    border-radius: 0 8px 8px 0;
    font-size: 0.81rem;
    color: #3b4f66;
}

}

/* ═══════════════════════════════════════════════════════════
   Synthesis Planner Mode
═══════════════════════════════════════════════════════════ */
/* Old custom layout superseded — now reuses .vl-grid/.vl-controls/.vl-results */
.vl-synth-layout { display: none; }
.vl-synth-controls, .vl-synth-result { display: none; }

/* Heading inside controls pane */
.vl-synth-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e0e8f4;
    margin-bottom: 2px;
}
.vl-synth-planner-title {
    font-size: 1rem;
    font-weight: 800;
    color: #1d3f5f;
    letter-spacing: -0.01em;
}

/* Run button — matches #vl-run-btn */
#vl-synth-run {
    width: 100%;
    border: 0;
    border-radius: 8px;
    background: #1168c4;
    color: #fff;
    font-weight: 700;
    padding: 11px 16px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.15s;
}
#vl-synth-run:hover { background: #0d55a8; }
#vl-synth-run:disabled { opacity: 0.65; cursor: not-allowed; }

/* Keep intro/intro-icon/intro-text styles for any future use but hide the container */
.vl-synth-intro { display: none; }
.vl-synth-planner-title { font-size: 1.1rem !important; color: #1d3f5f; font-weight: 800; letter-spacing: -0.01em; }
.vl-synth-intro-text p { margin: 0; font-size: 0.78rem; color: #4a6a8a; line-height: 1.4; }
.vl-synth-ai-tag {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 8px;
    background: rgba(47,125,79,0.10);
    color: #2f7d4f;
    border: 1px solid rgba(47,125,79,0.25);
    vertical-align: middle;
}

/* Target molecule header card */
.vl-synth-target-card {
    border: 1.5px solid #c8d8ec;
    border-radius: 10px;
    background: linear-gradient(160deg, #edf4ff 0%, #f8fbff 100%);
    padding: 14px 16px 12px;
    margin-bottom: 10px;
}
.vl-synth-target-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 0;
}
.vl-synth-target-icon { font-size: 1.2rem; }
.vl-synth-header-label {
    font-size: 1rem;
    font-weight: 800;
    color: #1d3f5f;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.vl-synth-header-divider {
    margin: 10px 0;
    border-top: 1px solid #dce8f4;
}

.vl-sim-result-header {
    border: 1px solid #d5e2ee;
    border-radius: 8px;
    background: #f9fcff;
    padding: 12px 14px 0;
    margin-bottom: 12px;
}
.vl-synth-ai-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 20px;
    background: rgba(47,125,79,0.08);
    color: #2f7d4f;
    border: 1px solid rgba(47,125,79,0.22);
    letter-spacing: 0.02em;
}
.vl-synth-target-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 3px;
}
.vl-synth-target-name {
    font-size: 1.3rem;
    font-weight: 800;
    color: #1d3f5f;
    line-height: 1.2;
}
.vl-synth-formula {
    font-size: 0.9rem;
    font-weight: 600;
    color: #4a6a8a;
    font-family: Consolas, 'Courier New', monospace;
    background: rgba(74,106,138,0.07);
    border: 1px solid rgba(74,106,138,0.18);
    border-radius: 4px;
    padding: 1px 7px;
}
.vl-synth-iupac {
    font-size: 0.78rem;
    color: #6a8aaa;
    font-style: italic;
    margin-bottom: 10px;
}
.vl-synth-kpis {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.vl-synth-kpi { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.vl-synth-kpi-val { font-size: 1.1rem; font-weight: 800; color: #1d3f5f; }
.vl-synth-kpi-lbl { font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #6a8aaa; }
.vl-synth-overview {
    font-size: 0.83rem;
    color: #2a4a68;
    line-height: 1.5;
    border-top: 1px solid #dce8f4;
    padding-top: 8px;
    margin-top: 6px;
}

/* Retrosynthesis card */
.vl-synth-retro-text { font-size: 0.85rem; color: #2a4a68; line-height: 1.55; }

/* Starting materials chips */
.vl-synth-sm-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.vl-synth-sm-chip {
    padding: 5px 11px;
    border-radius: 6px;
    font-size: 0.81rem;
    font-weight: 600;
    border: 1px solid #b8cfe8;
    background: #fff;
    color: #1d3f5f;
    box-shadow: 0 1px 3px rgba(74,106,138,0.08);
}

/* Step cards */
.vl-synth-step {
    border: 1px solid #d5e2ee;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 10px;
    background: #fafcff;
}
.vl-synth-step:last-child { margin-bottom: 0; }

.vl-synth-step-header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.vl-synth-step-num {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    border: 1px solid;
    flex-shrink: 0;
}
.vl-synth-step-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1d3f5f;
    flex: 1;
    min-width: 0;
}
.vl-synth-step-yield {
    font-size: 0.78rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* Mini equation row inside a step */
.vl-synth-step-eq {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 8px;
    padding: 8px 0;
    border-top: 1px solid #e8eef8;
    border-bottom: 1px solid #e8eef8;
}
.vl-synth-step-chips {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    flex: 1;
    justify-content: center;
    min-width: 80px;
}
.vl-synth-step-cond {
    font-size: 0.76rem;
    color: #5a7a8a;
    margin-top: 6px;
}
.vl-synth-step-equationtext {
    margin-top: 6px;
    font-family: Consolas, 'Courier New', monospace;
    font-size: 0.8rem;
    color: #2a3a4a;
    word-break: break-all;
}
.vl-synth-step-by {
    font-size: 0.76rem;
    color: #8a7a5a;
    margin-top: 4px;
    font-style: italic;
}
.vl-synth-step-notes {
    font-size: 0.78rem;
    color: #4a6a8a;
    margin-top: 6px;
    line-height: 1.45;
    border-top: 1px dashed #dde8f4;
    padding-top: 6px;
}

/* Dark mode */
.vl-dark-mode .vl-synth-intro             { background: linear-gradient(135deg, #131e2a 0%, #1a2432 100%); border-color: #2e4058; }
.vl-dark-mode .vl-synth-intro-text strong { color: #b0c8e0; }
.vl-dark-mode .vl-synth-intro-text p      { color: #5a8ab0; }
.vl-dark-mode .vl-synth-target-card       { border-color: #2e4058; background: linear-gradient(160deg, #131e2a 0%, #1a2432 100%); }
.vl-dark-mode .vl-synth-target-name       { color: #c0d8f0; }
.vl-dark-mode .vl-synth-formula           { color: #8ab0d0; background: rgba(90,138,176,0.1); border-color: rgba(90,138,176,0.2); }
.vl-dark-mode .vl-synth-iupac             { color: #4a6a80; }
.vl-dark-mode .vl-synth-kpi-val           { color: #c0d8f0; }
.vl-dark-mode .vl-synth-overview          { color: #8ab0d0; border-top-color: #2e4058; }
.vl-dark-mode .vl-synth-sm-chip           { border-color: #2e4058; background: #1f3050; color: #b0c8e0; }
.vl-dark-mode .vl-synth-step              { border-color: #2e4058; background: #131e2a; }
.vl-dark-mode .vl-synth-step-name         { color: #c0d8f0; }
.vl-dark-mode .vl-synth-step-cond         { color: #4a6878; }
.vl-dark-mode .vl-synth-step-equationtext { color: #8ab0d0; }
.vl-dark-mode .vl-synth-step-notes        { color: #5a8ab0; border-top-color: #2e4058; }

/* ═══════════════════════════════════════════════════════════
   FEATURE 7 – Mechanism Fingerprint
═══════════════════════════════════════════════════════════ */
.vl-mech-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    border: 1px solid;
    letter-spacing: 0.02em;
}

.vl-fingerprint-card { overflow: hidden; }

.vl-fp-body {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 16px;
    align-items: start;
}

.vl-fp-radar-wrap {
    flex-shrink: 0;
}

.vl-fp-radar {
    width: 100%;
    height: auto;
    display: block;
}

.vl-fp-bars {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding-top: 4px;
}

.vl-fp-mech-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.vl-fp-steps-lbl {
    font-size: 0.78rem;
    color: #5a7a8e;
    font-weight: 600;
}

.vl-fp-bar-row {
    display: grid;
    grid-template-columns: 96px 1fr 72px;
    align-items: center;
    gap: 8px;
}

.vl-fp-bar-label {
    font-size: 0.80rem;
    font-weight: 600;
    color: #3e5e7c;
    white-space: nowrap;
}

.vl-fp-bar-track {
    height: 9px;
    background: #e0eaf6;
    border-radius: 4px;
    overflow: hidden;
}

.vl-fp-bar-fill {
    height: 100%;
    border-radius: 4px;
    width: 0%;
    transition: none;
}

.vl-fp-bar-val {
    font-size: 0.78rem;
    font-weight: 700;
    text-align: right;
    white-space: nowrap;
}

/* Dark mode */
.vl-dark-mode .vl-fp-bar-track   { background: #243444; }
.vl-dark-mode .vl-fp-steps-lbl   { color: #5a7a90; }
.vl-dark-mode .vl-fp-bar-label   { color: #6a90aa; }

@media (max-width: 540px) {
    .vl-fp-body { grid-template-columns: 1fr; }
    .vl-fp-radar-wrap { max-width: 240px; margin: 0 auto; }
}

.vl-sens-high  { color: #b13737; font-weight: 700; }
.vl-sens-med   { color: #c47c11; font-weight: 700; }
.vl-sens-low   { color: #2f7d4f; font-weight: 700; }

/* ═══════════════════════════════════════════════════════════
   FEATURE 4 – Reaction Network (pathway explorer)
═══════════════════════════════════════════════════════════ */
.vl-muted-sm {
    font-size: 0.845rem;
    color: #527085;
    margin: 0 0 8px;
    font-style: italic;
}

/* Legacy flat layout kept for compat */
.vl-network { display:flex; align-items:flex-start; gap:10px; flex-wrap:wrap; }
.vl-net-origin { padding:5px 12px; border:2px solid; border-radius:8px; font-size:0.82rem; font-weight:700; white-space:nowrap; }
.vl-net-arrow  { font-size:1.2rem; color:#7a93aa; align-self:center; }
.vl-net-targets { display:flex; flex-direction:column; gap:4px; }
.vl-net-target { padding:4px 10px; background:#f1f6fb; border:1px solid #d5e2ee; border-radius:7px; font-size:0.8rem; color:#2d4a63; }

/* ── New layout ── */
.vl-net-card { padding-bottom: 6px; }

.vl-ng-wrap {
    position: relative;
    padding: 2px 0 4px;
}

/* Source card */
.vl-ng-source {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 2px solid;
    border-radius: 14px;
    padding: 12px 16px;
    background: #fff;
    position: relative;
    z-index: 2;
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
    max-width: 380px;
}

@keyframes vl-ng-pulse {
    0%   { transform: scale(1);    opacity: 0.4; }
    100% { transform: scale(1.06); opacity: 0; }
}

.vl-ng-source-pulse {
    position: absolute;
    inset: -4px;
    border-radius: 17px;
    border: 2px solid;
    pointer-events: none;
    animation: vl-ng-pulse 2.2s ease-out infinite;
}

.vl-ng-source-icon {
    width: 38px; height: 38px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.vl-ng-source-label {
    font-size: 0.67rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    border-radius: 5px;
    padding: 2px 8px;
    display: inline-block;
    margin-bottom: 4px;
}

.vl-ng-source-name {
    font-size: 0.95rem;
    font-weight: 800;
    color: #1a3a5c;
    line-height: 1.3;
}

.vl-ng-source-meta {
    font-size: 0.74rem;
    color: #7090a8;
    margin-top: 2px;
}

/* SVG canvas — absolutely overlays the gap between source and cards */
.vl-ng-canvas {
    position: absolute;
    top: 0; left: 0;
    pointer-events: none;
    z-index: 1;
    overflow: visible;
}

/* Edge draw */
@keyframes vl-ng-draw {
    to { stroke-dashoffset: 0; }
}

/* Target cards row */
.vl-ng-tcards {
    display: flex;
    gap: 10px;
    margin-top: 54px;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

.vl-ng-tcard {
    flex: 1;
    min-width: 148px;
    background: #f8fbff;
    border: 1.5px solid #d4e2f0;
    border-radius: 10px;
    padding: 10px 12px 8px;
    cursor: default;
    opacity: 0;
    transform: translateY(14px);
    transition: box-shadow 0.2s, transform 0.18s;
}

.vl-ng-wrap.vl-ng-running .vl-ng-tcard {
    animation: vl-ng-slide-up 0.38s var(--nd, 0ms) cubic-bezier(.34,1.3,.64,1) forwards;
}

@keyframes vl-ng-slide-up {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

.vl-ng-tcard:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.09);
    transform: translateY(-2px);
}

.vl-ng-tcard-badges {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.vl-ng-fam-badge {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    border: 1px solid;
    border-radius: 20px;
    padding: 2px 8px;
}

.vl-ng-rel-badge {
    font-size: 0.73rem;
    font-weight: 700;
    white-space: nowrap;
}

.vl-ng-tcard-name {
    font-size: 0.875rem;
    font-weight: 700;
    color: #1a3a5c;
    line-height: 1.35;
    margin-bottom: 6px;
}

/* Expand/collapse description */
.vl-ng-tcard-desc {
    display: none;
    font-size: 0.80rem;
    color: #3a5672;
    line-height: 1.6;
    padding-top: 7px;
    border-top: 1.5px solid #d0e4f4;
    margin-bottom: 4px;
}

.vl-ng-tcard-open .vl-ng-tcard-desc {
    display: block;
}

.vl-ng-expand-btn {
    background: none;
    border: none;
    padding: 0;
    font-size: 0.76rem;
    font-weight: 700;
    color: #6a8eaa;
    cursor: pointer;
    letter-spacing: 0.01em;
    display: block;
    margin-top: 3px;
    transition: color 0.15s;
}

.vl-ng-expand-btn:hover { color: #1a6cc8; }
.vl-ng-tcard-open .vl-ng-expand-btn { color: #5a80a0; }

/* Dark mode */
.vl-dark-mode .vl-ng-source     { background: #1a2432; border-color: #3a5a7a !important; }
.vl-dark-mode .vl-ng-source-name { color: #c0d8f0; }
.vl-dark-mode .vl-ng-source-meta { color: #5a7a90; }
.vl-dark-mode .vl-ng-tcard      { background: #1c2a3a; border-color: #2e4058; }
.vl-dark-mode .vl-ng-tcard-name { color: #a8c8e0; }
.vl-dark-mode .vl-ng-tcard-desc { color: #7a9ab5; border-top-color: #2e4058; }
.vl-dark-mode .vl-ng-expand-btn { color: #4a6a80; }
.vl-dark-mode .vl-ng-expand-btn:hover { color: #5aaaf0; }

/* ═══════════════════════════════════════════════════════════
   FEATURE 2 – Condition Context bars
═══════════════════════════════════════════════════════════ */
.vl-cond-ctx {
    margin-top: 10px;
    border-top: 1px solid #e8eef5;
    padding-top: 8px;
}

.vl-cond-lbl {
    font-size: 0.79rem;
    color: #4a6278;
    margin-bottom: 4px;
}

.vl-cond-track {
    position: relative;
    height: 8px;
    background: #e2eaf4;
    border-radius: 999px;
    margin-bottom: 10px;
    overflow: visible;
}

.vl-cond-win {
    position: absolute;
    top: 0;
    height: 100%;
    background: #a0d4a0;
    border-radius: 999px;
    opacity: 0.8;
}

.vl-cond-dot {
    position: absolute;
    top: -3px;
    width: 14px;
    height: 14px;
    background: #1168c4;
    border: 2px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}

/* ═══════════════════════════════════════════════════════════
   FEATURE 5 – Insights Challenge (Cross-Family Connections)
═══════════════════════════════════════════════════════════ */
.vl-ic-question {
    font-size: 0.88rem;
    color: #233548;
    margin-bottom: 8px;
}

.vl-ic-answer {
    margin-top: 6px;
}

.vl-ic-answer-box {
    background: #f0f7ee;
    border: 1px solid #a8d4a8;
    border-radius: 8px;
    padding: 10px;
    font-size: 0.84rem;
    color: #1f3a2a;
    line-height: 1.5;
}

.vl-ic-actions {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

.vl-btn-ghost {
    border: 1px solid #9db8d7;
    border-radius: 8px;
    background: #ffffff;
    color: #2b587d;
    font-weight: 600;
    padding: 6px 12px;
    font-size: 0.82rem;
    cursor: pointer;
}

.vl-btn-ghost:hover { background: #eaf4ff; }

/* ═══════════════════════════════════════════════════════════
   FEATURE 6 – Compare Mode
═══════════════════════════════════════════════════════════ */
.vl-compare-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.vl-compare-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.vl-compare-col {
    border: 1px solid #d9e2ee;
    border-radius: 12px;
    background: #ffffff;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.vl-compare-col-hdr {
    font-size: 0.92rem;
    font-weight: 800;
    color: #1a3654;
    border-bottom: 1px solid #e0eaf5;
    padding-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.vl-cmp-out { min-height: 60px; }

.vl-cmp-card {
    border-radius: 10px;
    border: 1px solid #d5e2ee;
    padding: 12px;
    background: #fafcff;
}

.vl-cmp-card-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #1d3752;
    margin-bottom: 6px;
}

.vl-cmp-kpis {
    display: flex;
    gap: 10px;
    align-items: baseline;
    margin-bottom: 4px;
}

.vl-cmp-yield {
    font-size: 1.1rem;
    font-weight: 800;
    color: #153d63;
}

.vl-cmp-conf {
    font-size: 0.8rem;
    color: #617487;
}

.vl-cmp-equation {
    font-family: Consolas, monospace;
    font-size: 0.8rem;
    color: #1e2d3c;
    background: #f4f9ff;
    border: 1px solid #d8e5f3;
    border-radius: 6px;
    padding: 5px 7px;
    margin: 6px 0;
    overflow-x: auto;
}

.vl-cmp-error {
    border: 1px solid #e8b8b8;
    border-radius: 8px;
    background: #fff4f4;
    color: #8e3030;
    display: grid;
    gap: 4px;
    font-size: 0.82rem;
    padding: 10px;
}

.vl-cmp-error span {
    color: #a04545;
}

/* ═══════════════════════════════════════════════════════════
   DARK MODE
═══════════════════════════════════════════════════════════ */
.vl-dark-mode {
    --vl-bg-primary: #1a1f2e;
    --vl-bg-secondary: #252d3d;
    --vl-bg-tertiary: #2d3648;
    --vl-text-primary: #e1e8f0;
    --vl-text-secondary: #b0b9c3;
    --vl-border: #3d4655;
    --vl-accent: #4a90e2;
}

.vl-dark-mode .vl-header h2 {
    color: #e1e8f0;
}

.vl-dark-mode .vl-header p {
    color: #b0b9c3;
}

.vl-dark-mode .virtual-lab-loading {
    border-color: #3d4655;
    background: #252d3d;
    color: #e1e8f0;
}

.vl-dark-mode .vl-scenarios {
    border-color: #3d4655;
    background: linear-gradient(180deg, #2d3648 0%, #252d3d 100%);
}

.vl-dark-mode .vl-scenarios-label {
    color: #a8b5c4;
}

.vl-dark-mode .vl-scenario-btn {
    border-color: #3d4655;
    background: #1a1f2e;
    color: #c0cad6;
}

.vl-dark-mode .vl-scenario-btn:hover {
    background: #2d3648;
}

.vl-dark-mode .vl-controls,
.vl-dark-mode .vl-results {
    border-color: #3d4655;
    background: linear-gradient(180deg, #1a1f2e 0%, #252d3d 100%);
}

.vl-dark-mode .vl-field label {
    color: #b0b9c3;
}

.vl-dark-mode .vl-field input,
.vl-dark-mode .vl-field select {
    background: #252d3d;
    border-color: #3d4655;
    color: #9aabbd;
}

.vl-dark-mode .vl-field textarea {
    background: #252d3d;
    border-color: #3d4655;
    color: #9aabbd;
}

.vl-dark-mode .vl-custom-note {
    background: #1d2a3a;
    border-color: #32465f;
    color: #a8bfd6;
}

.vl-dark-mode .vl-custom-meta {
    background: #1a2736;
    border-color: #32465f;
    color: #b6cce2;
}

.vl-dark-mode .vl-custom-history {
    background: #1a2736;
    border-color: #32465f;
}

.vl-dark-mode .vl-history-title {
    color: #aec5dc;
}

.vl-dark-mode .vl-history-item {
    background: #212f40;
    border-color: #37506a;
}

.vl-dark-mode .vl-history-eq {
    color: #d3e3f2;
}

.vl-dark-mode .vl-history-meta {
    color: #97aec3;
}

.vl-dark-mode .vl-reactants-line {
    color: #c1d4e6;
}

.vl-dark-mode .vl-safety-panel {
    border-color: #5d4a3d;
    background: #2a2419;
}

.vl-dark-mode .vl-safety-compound {
    color: #d4a76a;
}

.vl-dark-mode .vl-safety-signal {
    color: #c1d4e6;
}

.vl-dark-mode .vl-ghs-pictogram {
    border-color: #666;
    background: #1a1f2e;
    color: #a8b5c4;
}

.vl-dark-mode .vl-hazards-list {
    color: #b8c5d6;
}

.vl-dark-mode .vl-hazards-list li {
    border-bottom-color: #3d4655;
    color: #a8b5c4;
}

.vl-dark-mode .vl-stoichiometry-section {
    border-color: #3d4655;
    background: #1a2836;
}

.vl-dark-mode .vl-stoichiometry-title {
    color: #7eb3d1;
}

.vl-dark-mode .vl-stoich-table thead th {
    background: #1e3048;
    color: #7eb3d1;
    border-bottom-color: #3d5570;
}

.vl-dark-mode .vl-stoich-table tbody tr:nth-child(even) {
    background: #1c2c3e;
}

.vl-dark-mode .vl-stoich-table td {
    border-bottom-color: #2a3d52;
}

.vl-dark-mode .vl-stoich-amount,
.vl-dark-mode .vl-stoich-unit {
    background: #252d3d;
    border-color: #3d4655;
    color: #9aabbd;
}

.vl-dark-mode .vl-stoich-products-row label {
    color: #7eb3d1;
}

.vl-dark-mode .vl-calculate-btn {
    background: #2563a8;
}

.vl-dark-mode .vl-calculate-btn:hover {
    background: #1e5090;
}

.vl-dark-mode .vl-stoich-results {
    border-color: #3d4655;
    background: #252d3d;
}

.vl-dark-mode .vl-stoich-item {
    background: #1a1f2e;
    border-left-color: #7eb3d1;
    color: #c1d4e6;
}

.vl-dark-mode .vl-stoich-item strong {
    color: #7eb3d1;
}

.vl-dark-mode .vl-stoich-item li {
    color: #a8b5c4;
}

.vl-dark-mode .vl-spec-head,
.vl-dark-mode .vl-spec-groups {
    color: #b6c9dc;
}

.vl-dark-mode .vl-spec-panel {
    border-color: #3d4655;
    background: #1a2433;
}

.vl-dark-mode .vl-spec-panel h4 {
    color: #c3d7ea;
}

.vl-dark-mode .vl-spec-table th,
.vl-dark-mode .vl-spec-table td {
    border-color: #3d4655;
}

.vl-dark-mode .vl-spec-table th {
    background: #232f41;
    color: #b8cce0;
}

.vl-dark-mode .vl-spec-table td,
.vl-dark-mode .vl-spec-list,
.vl-dark-mode .vl-spec-notes {
    color: #a8b5c4;
}

.vl-dark-mode .vl-ana-kpi {
    border-color: #3d4655;
    background: #1d2938;
}

.vl-dark-mode .vl-ana-k {
    color: #8ca4ba;
}

.vl-dark-mode .vl-ana-v,
.vl-dark-mode .vl-ana-best,
.vl-dark-mode .vl-ana-sens {
    color: #c1d4e6;
}

.vl-dark-mode .vl-ana-badge {
    border-color: #3d4655;
    background: #243244;
    color: #aecdde;
}

.vl-dark-mode .vl-opt-row {
    color: #c1d4e6;
}

.vl-dark-mode .vl-opt-basis,
.vl-dark-mode .vl-opt-d,
.vl-dark-mode .vl-opt-note {
    color: #8ea7bd;
}

.vl-dark-mode .vl-opt-item {
    border-color: #3d4655;
    background: #1d2938;
    color: #b8cde0;
}

.vl-dark-mode .vl-field input::placeholder,
.vl-dark-mode .vl-field textarea::placeholder,
.vl-dark-mode .vl-custom-text::placeholder,
.vl-dark-mode .vl-stoich-amount::placeholder,
.vl-dark-mode .vl-search-box::placeholder,
.vl-dark-mode #vl-stoich-products::placeholder {
    color: #4a5a6a;
    opacity: 1;
}

@media (max-width: 640px) {
    .vl-suggest-reactants-btn {
        width: 100%;
        justify-self: stretch;
    }
}

.vl-dark-mode .vl-actions button {
    border-color: #3d4655;
    background: #1168c4;
    color: #ffffff;
}

.vl-dark-mode .vl-actions button:hover {
    background: #1971d9;
}

.vl-dark-mode .vl-status {
    color: #e1e8f0;
}

.vl-dark-mode .vl-result-empty {
    color: #8a9199;
}
.vl-dark-mode .vl-empty-title { color: #c0d0e0; }
.vl-dark-mode .vl-empty-desc  { color: #7a8e9e; }
.vl-dark-mode .vl-empty-hint  { background: #1c2a3a; border-color: #2e4058; color: #8ab0cc; }
.vl-dark-mode .vl-empty-flask-svg rect,
.vl-dark-mode .vl-empty-flask-svg path { stroke: #4a7aa0; }

.vl-dark-mode .vl-card {
    border-color: #3d4655;
    background: #252d3d;
}

.vl-dark-mode .vl-card h3 {
    color: #c0cad6;
}

.vl-dark-mode .vl-kpi {
    background: #1a1f2e;
}

.vl-dark-mode .vl-kpi-label {
    color: #8a9199;
}

.vl-dark-mode .vl-kpi-value {
    color: #5bc0de;
}

.vl-dark-mode .vl-btn-export {
    border-color: #3d4655;
    background: #252d3d;
    color: #a8b5c4;
}

.vl-dark-mode .vl-btn-export:hover {
    background: #2d3648;
    border-color: #4a5568;
}

.vl-dark-mode .vl-export-bar {
    border-bottom-color: #3d4655;
}

.vl-dark-mode .vl-equation {
    background: #1a1f2e;
    color: #e1e8f0;
}

.vl-dark-mode .vl-timeline-controls input[type="range"] {
    background: #2d3648;
}

.vl-dark-mode .vl-muted {
    color: #6b7582;
}

.vl-dark-mode .vl-browse-label {
    color: #a8b5c4;
}

.vl-dark-mode .vl-browse-btn {
    border-color: #3d4655;
    background: #252d3d;
    color: #a8b5c4;
}

.vl-dark-mode .vl-browse-btn-active {
    background: #1168c4;
    color: #ffffff;
}

.vl-dark-mode .vl-browse-btn:hover {
    background: #2d3648;
}

.vl-dark-mode .vl-mode-tab {
    border-color: #3d4655;
    background: #1a1f2e;
    color: #8a9199;
}

.vl-dark-mode .vl-mode-tab:hover {
    color: #b0b9c3;
}

.vl-dark-mode .vl-mode-tab-active {
    background: #1168c4;
    color: #ffffff;
}

.vl-dark-mode .vl-preset-btn {
    border-color: #3d4655;
    background: #252d3d;
    color: #a8b5c4;
}

.vl-dark-mode .vl-preset-btn:hover {
    background: #2d3648;
    border-color: #4a5568;
}

.vl-dark-mode .vl-preset-label {
    color: #a8b5c4;
}

.vl-dark-mode .vl-modal {
    background: rgba(0, 0, 0, 0.7);
}

.vl-dark-mode .vl-modal-content {
    background: #1a1f2e;
}

.vl-dark-mode .vl-modal-header {
    border-bottom-color: #3d4655;
}

.vl-dark-mode .vl-modal-header h2 {
    color: #e1e8f0;
}

.vl-dark-mode .vl-modal-close {
    color: #8a9199;
}

.vl-dark-mode .vl-modal-tabs {
    border-bottom-color: #3d4655;
    background: #252d3d;
}

.vl-dark-mode .vl-modal-tab {
    color: #6b7582;
}

.vl-dark-mode .vl-modal-tab:hover {
    color: #a8b5c4;
}

.vl-dark-mode .vl-modal-tab-active {
    color: #e1e8f0;
    border-bottom-color: #1168c4 !important;
}

.vl-dark-mode .vl-modal-body {
    background: #1a1f2e;
}

.vl-dark-mode .vl-settings-section {
    border-bottom-color: #3d4655;
}

.vl-dark-mode .vl-settings-section h3 {
    color: #c0cad6;
}

.vl-dark-mode .vl-settings-section label {
    color: #a8b5c4;
}

.vl-dark-mode .vl-settings-grid input {
    background: #252d3d;
    border-color: #3d4655;
    color: #9aabbd;
}

.vl-dark-mode .vl-settings-grid input::placeholder {
    color: #4a5a6a;
    opacity: 1;
}

.vl-dark-mode .vl-settings-actions button {
    border-color: #3d4655;
    background: #252d3d;
    color: #a8b5c4;
}

.vl-dark-mode .vl-settings-actions button:hover {
    background: #2d3648;
}

.vl-dark-mode .vl-btn-secondary {
    background: #3d2d2d !important;
    color: #ff9999 !important;
    border-color: #5d4040 !important;
}

.vl-dark-mode .vl-favorites-panel {
    color: #e1e8f0;
}

.vl-dark-mode .vl-favs-header h3 {
    color: #c0cad6;
}

.vl-dark-mode .vl-fav-item {
    border-color: #3d4655;
    background: #252d3d;
}

.vl-dark-mode .vl-fav-item:hover {
    background: #2d3648;
    border-color: #4a5568;
}

.vl-dark-mode .vl-fav-name {
    color: #c0cad6;
}

.vl-dark-mode .vl-fav-meta {
    color: #8a9199;
}

.vl-dark-mode .vl-fav-notes {
    background: #1a1f2e;
    color: #a8b5c4;
    border-left-color: #3d4655;
}

.vl-dark-mode .vl-fav-load,
.vl-dark-mode .vl-fav-delete {
    border-color: #3d4655;
    background: #252d3d;
    color: #a8b5c4;
}

.vl-dark-mode .vl-fav-load:hover {
    background: #1168c4;
    color: #ffffff;
}

.vl-dark-mode .vl-fav-delete:hover {
    background: #5d3333;
    color: #ff9999;
}

.vl-dark-mode .vl-mech-badge {
    background-color: rgba(255, 255, 255, 0.1);
}

.vl-dark-mode .vl-compare-col {
    border-color: #3d4655;
    background: #252d3d;
}

.vl-dark-mode .vl-compare-col-hdr {
    color: #c0cad6;
    border-bottom-color: #3d4655;
}

.vl-dark-mode .vl-cmp-out {
    background: #1a1f2e;
    color: #8a9199;
}

.vl-dark-mode .vl-cmp-card {
    border-color: #3d4655;
    background: #252d3d;
}

.vl-dark-mode .vl-cmp-card-title {
    color: #c0cad6;
}

.vl-dark-mode .vl-cmp-yield {
    color: #5bc0de;
}

.vl-dark-mode .vl-cmp-conf {
    color: #8a9199;
}

.vl-dark-mode .vl-cmp-equation {
    background: #1a1f2e;
    color: #e1e8f0;
    border-color: #3d4655;
}

.vl-dark-mode .vl-cmp-window {
    color: #8a9199;
}

.vl-dark-mode .vl-compare-shared {
    border-color: #3d4655;
    background: #252d3d;
}

.vl-dark-mode .vl-compare-shared h4 {
    color: #c0cad6;
}

.vl-dark-mode .vl-compare-cond-grid input {
    background: #1a1f2e;
    border-color: #3d4655;
    color: #e1e8f0;
}

.vl-dark-mode .vl-tax-btn {
    border-color: #3d4655;
    background: #252d3d;
    color: #a8b5c4;
}

.vl-dark-mode .vl-tax-btn:hover {
    background: #2d3648;
}

.vl-dark-mode .vl-tax-fam-group {
    border-left-color: #3d4655;
}

.vl-dark-mode .vl-tax-fam-label {
    color: #a8b5c4;
}

.vl-dark-mode .vl-tax-rxn-card {
    color: #8a9199;
}

.vl-dark-mode .vl-tax-insight {
    border-color: rgba(74, 144, 226, 0.3);
    background: rgba(74, 144, 226, 0.1);
}

.vl-dark-mode .vl-btn-icon {
    color: #e1e8f0;
}

.vl-dark-mode .vl-btn-icon:hover {
    background: #252d3d;
}
}

.vl-cmp-window {
    font-size: 0.78rem;
    color: #617487;
}

.vl-compare-shared {
    border: 1px solid #d9e2ee;
    border-radius: 12px;
    background: #f8fbff;
    padding: 14px;
}

.vl-compare-shared h4 {
    margin: 0;
    font-size: 0.9rem;
    color: #1a3654;
}

.vl-compare-shared-hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.vl-compare-cond-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 10px;
}

#vl-cmp-run {
    border: 0;
    border-radius: 10px;
    background: #1168c4;
    color: #ffffff;
    font-weight: 700;
    padding: 9px 16px;
    cursor: pointer;
    font-size: 0.9rem;
}

#vl-cmp-run:disabled { opacity: 0.65; cursor: not-allowed; }

.vl-cmp-insights-box {
    border: 1px solid #c9d9e8;
    border-radius: 10px;
    background: #f0f7ff;
    padding: 12px;
    margin-top: 12px;
}

.vl-cmp-insights-box h4 {
    margin: 0 0 8px;
    font-size: 0.9rem;
    color: #153d63;
}

.vl-cmp-insights-box ul {
    margin: 0;
    padding-left: 18px;
    color: #2a3f55;
    font-size: 0.85rem;
    line-height: 1.6;
}

/* ═══════════════════════════════════════════════════════════
   FEATURE 3 – Explore Mode (Mechanism Taxonomy)
═══════════════════════════════════════════════════════════ */
.vl-explore-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 16px;
    min-height: 400px;
}

.vl-explore-sidebar {
    border: 1px solid #d9e2ee;
    border-radius: 12px;
    background: #f8fbff;
    padding: 14px;
}

.vl-explore-sidebar h3 {
    margin: 0 0 6px;
    font-size: 0.95rem;
    color: #153d63;
}

#vl-tax-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 10px;
}

.vl-explore-search {
    margin: 10px 0 8px;
}

.vl-explore-search input {
    width: 100%;
}

.vl-tax-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid #d5e2ee;
    border-left: 4px solid;
    border-radius: 0 8px 8px 0;
    padding: 7px 10px;
    background: #ffffff;
    color: #2a3f55;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: background 0.1s;
}

.vl-tax-btn:hover { background: #eef5ff; }
.vl-tax-btn-active { background: #e4f0ff; }

.vl-tax-count {
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.vl-explore-main {
    border: 1px solid #d9e2ee;
    border-radius: 12px;
    background: #ffffff;
    padding: 16px;
    overflow-y: auto;
}

#vl-tax-detail h3 { margin: 0 0 8px; }

.vl-tax-hero {
    border: 1px solid #d8e5f3;
    border-radius: 10px;
    background: #f7fbff;
    padding: 14px;
    margin-bottom: 14px;
}

.vl-tax-hero h3 {
    margin: 0 0 6px;
    color: #153d63;
}

.vl-tax-hero p {
    margin: 0;
    color: #53697f;
    line-height: 1.45;
}

.vl-tax-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.vl-tax-stats span {
    border: 1px solid #d8e5f3;
    border-radius: 999px;
    background: #ffffff;
    color: #40566c;
    font-size: 0.78rem;
    padding: 5px 9px;
}

.vl-tax-stats strong {
    color: #1168c4;
}

.vl-tax-fam-group { margin-bottom: 12px; }

.vl-tax-fam-label {
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #5a7394;
    margin-bottom: 5px;
}

.vl-tax-rxn-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 8px 10px;
    background: #f4f8ff;
    border: 1px solid #d8e5f3;
    border-radius: 8px;
    margin-bottom: 6px;
}

.vl-tax-rxn-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.vl-tax-rxn-name {
    font-size: 0.84rem;
    font-weight: 700;
    color: #24394e;
}

.vl-tax-links {
    margin-top: 3px;
    color: #63788c;
    font-size: 0.74rem;
    line-height: 1.35;
}

.vl-tax-rxn-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 5px;
}

.vl-tax-rxn-actions button {
    border: 1px solid #c7d8ea;
    border-radius: 6px;
    background: #ffffff;
    color: #1168c4;
    cursor: pointer;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 5px 7px;
}

.vl-tax-rxn-actions button:hover {
    background: #e9f3ff;
}

.vl-tax-empty {
    border: 1px dashed #cbd9e8;
    border-radius: 8px;
    color: #63788c;
    font-size: 0.82rem;
    padding: 10px;
    text-align: center;
}

.vl-tax-insight {
    margin-top: 14px;
    border: 1px solid;
    border-radius: 10px;
    padding: 12px;
    font-size: 0.85rem;
    color: #1f2f3f;
    line-height: 1.6;
}

.vl-challenge-panel {
    display: grid;
    gap: 8px;
}

.vl-challenge-panel h4 {
    margin: 0 0 4px;
    color: #153d63;
}

.vl-challenge-card {
    border: 1px solid #d8e5f3;
    border-radius: 9px;
    background: #ffffff;
    padding: 9px 11px;
}

.vl-challenge-card summary {
    cursor: pointer;
    color: #2a3f55;
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.45;
}

.vl-challenge-card p {
    margin: 8px 0 0;
    color: #53697f;
    font-size: 0.82rem;
    line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════
   LAB FEATURES — pH strip, beaker, validation, PPE, protocol,
   sweep charts, notebook
═══════════════════════════════════════════════════════════ */

/* pH indicator strip */
.vl-ph-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.vl-ph-row input {
    flex: 1;
}
.vl-ph-strip {
    width: 36px;
    height: 28px;
    border-radius: 5px;
    border: 1px solid #b8cade;
    transition: background 0.4s ease;
    flex-shrink: 0;
}
.vl-ph-desc {
    font-size: 0.78rem;
    font-weight: 700;
    margin-top: 2px;
    transition: color 0.4s ease;
    min-height: 14px;
}

/* Live condition warnings */
.vl-cond-warn {
    font-size: 0.78rem;
    color: #c47c11;
    background: #fff8e6;
    border: 1px solid #f0d080;
    border-radius: 6px;
    padding: 4px 8px;
    margin-top: 3px;
    line-height: 1.4;
}

/* Beaker vessel */
.vl-beaker-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 0 4px;
    gap: 4px;
}
.vl-beaker-svg {
    width: 100px;
    height: 120px;
    filter: drop-shadow(0 2px 6px rgba(17, 104, 196, 0.18));
}
.vl-beaker-label {
    font-size: 0.78rem;
    color: #3b5c7c;
    font-weight: 600;
    text-align: center;
}

/* PPE grid */
.vl-ppe-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}
.vl-ppe-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    background: #f0f7ff;
    border: 1px solid #c5d8ee;
    border-radius: 9px;
    padding: 8px 12px;
    min-width: 68px;
    transition: background 0.15s;
}
.vl-ppe-item:hover { background: #e0eefc; }
.vl-ppe-icon { font-size: 1.4rem; line-height: 1; }
.vl-ppe-label { font-size: 0.7rem; font-weight: 700; color: #254966; text-align: center; }

/* Lab protocol */
.vl-protocol-steps {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.vl-protocol-step {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.84rem;
    color: #1f3144;
    line-height: 1.45;
}
.vl-proto-num {
    min-width: 22px;
    height: 22px;
    background: #1168c4;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
    flex-shrink: 0;
    margin-top: 1px;
}

/* Yield sweep charts */
.vl-sweep-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 6px;
}
.vl-sweep-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.vl-sweep-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: #3a5c7c;
    text-align: center;
}
.vl-sweep-svg {
    width: 100%;
    height: auto;
    border: 1px solid #dce8f5;
    border-radius: 8px;
    background: #f8fbff;
}
.vl-sweep-legend {
    font-size: 0.72rem;
    color: #6a8099;
    text-align: center;
}
.vl-sweep-leg-win { color: #5aaa5a; }
.vl-sweep-leg-dot { color: #e85c0d; }

/* Lab notebook */
.vl-notebook-area {
    width: 100%;
    min-height: 100px;
    border: 1px solid #c8d8e8;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 0.87rem;
    font-family: 'Georgia', serif;
    color: #1f2f3f;
    background: #fffdf4;
    resize: vertical;
    box-sizing: border-box;
    line-height: 1.6;
    background-image: repeating-linear-gradient(transparent, transparent 23px, #e8e0c8 24px);
    background-attachment: local;
}
.vl-notebook-area:focus {
    outline: none;
    border-color: #9ab8d8;
    box-shadow: 0 0 0 3px rgba(17,104,196,0.08);
}
.vl-notebook-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 4px;
}
.vl-notebook-saved {
    font-size: 0.73rem;
    color: #7a9ab5;
    font-style: italic;
}

/* Dark mode additions */
.vl-dark-mode .vl-ph-strip { border-color: #3d4655; }
.vl-dark-mode .vl-cond-warn { background: #2a2010; border-color: #6a5020; color: #e0a050; }
.vl-dark-mode .vl-beaker-label { color: #a0bcd0; }
.vl-dark-mode .vl-ppe-item { background: #1d2a38; border-color: #3d4e60; }
.vl-dark-mode .vl-ppe-item:hover { background: #243344; }
.vl-dark-mode .vl-ppe-label { color: #9ab8d0; }
.vl-dark-mode .vl-protocol-step { color: #c8d8e8; }
.vl-dark-mode .vl-sweep-svg { background: #1a1f2e; border-color: #3d4655; }
.vl-dark-mode .vl-sweep-title { color: #8ab0cc; }
.vl-dark-mode .vl-sweep-legend { color: #7a93aa; }
.vl-dark-mode .vl-notebook-area { background: #1e1c10; background-image: repeating-linear-gradient(transparent, transparent 23px, #3a3520 24px); color: #d8d0b0; border-color: #3d3820; }
.vl-dark-mode .vl-notebook-saved { color: #6a7a8a; }

@media (max-width: 760px) {
    .vl-sweep-wrap { grid-template-columns: 1fr; }
    .vl-ppe-grid { gap: 6px; }
}

/* ═══════════════════════════════════════════════════════════
   UI IMPROVEMENTS
═══════════════════════════════════════════════════════════ */

/* Primary small button — used for main actions in Custom mode */
.vl-btn-primary-sm {
    border: 0;
    border-radius: 7px;
    padding: 6px 12px;
    height: 30px;
    background: #1168c4;
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease;
    white-space: nowrap;
}

.vl-btn-primary-sm:hover {
    background: #0d55a8;
}

/* Conditions section divider */
.vl-conditions-divider {
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #7a93aa;
    border-top: 1px solid #e2eaf4;
    padding-top: 10px;
    margin-top: 2px;
}

/* Ensure KPIs stay in 4 cols on medium screens */
@media (max-width: 980px) {
    .vl-kpis {
        grid-template-columns: repeat(2, minmax(80px, 1fr));
    }
}

@media (max-width: 760px) {
    .vl-suggest-reactants-btn {
        justify-self: stretch;
        width: 100%;
    }

    .vl-custom-actions {
        flex-direction: column;
    }

    .vl-btn-primary-sm {
        width: 100%;
    }
}

/* ═══════════════════════════════════════════════════════════
   LAB-THEMED REDESIGN
═══════════════════════════════════════════════════════════ */

/* ── Instrument-panel header ───────────────────────────────────────────── */
.vl-lab-header {
    background: #ffffff;
    border-radius: 12px;
    padding: 14px 18px;
    color: #153d63;
    border: 1px solid #d9e2ee;
    box-shadow: 0 2px 12px rgba(36, 61, 84, 0.08);
}

.vl-lab-header h2 {
    color: #153d63;
    font-size: 1.3rem;
    letter-spacing: 0.02em;
}

.vl-lab-header p {
    color: #43586e;
    margin: 3px 0 0;
}

.vl-lab-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.vl-lab-icon {
    font-size: 2rem;
    filter: drop-shadow(0 0 6px rgba(100,180,255,0.4));
}

.vl-lab-header .vl-mode-tabs {
    gap: 6px;
}

.vl-lab-header .vl-mode-tab {
    background: #f5f8fc;
    border-color: #d8e4f0;
    color: #2f5270;
    font-size: 0.82rem;
}

.vl-lab-header .vl-mode-tab:hover {
    background: #eaf3fb;
    color: #153d63;
}

.vl-lab-header .vl-mode-tab-active {
    background: #1168c4;
    border-color: #3390f0;
    color: #ffffff;
    box-shadow: 0 0 0 2px rgba(49,144,240,0.25);
}

.vl-lab-header .vl-btn-icon {
    color: #2f5270;
}

.vl-lab-header .vl-btn-icon:hover {
    background: #eaf3fb;
    color: #153d63;
}

/* ── Bench panel (controls left column) ───────────────────────────────── */
.vl-panel-bench {
    background: linear-gradient(180deg, #f4f8ff 0%, #edf4ff 100%) !important;
    border: 1px solid #cddaee !important;
    border-top: 3px solid #1168c4 !important;
}

.vl-panel-bench .vl-conditions-divider {
    color: #1168c4;
    border-top-color: #cddaee;
}

/* ── Reaction vessel banner ────────────────────────────────────────────── */
.vl-vessel-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid;
    background: linear-gradient(135deg, #f4fbf6 0%, #ecf7ff 100%);
    border-color: #b8d8c8;
    margin-bottom: 2px;
    flex-wrap: wrap;
}

.vl-fam-organic {
    background: linear-gradient(135deg, #f4fbf4 0%, #ecf7ec 100%);
    border-color: #9acc9a;
}

.vl-fam-ionic {
    background: linear-gradient(135deg, #f0f6ff 0%, #e8f2ff 100%);
    border-color: #9ab8e8;
}

.vl-fam-bio {
    background: linear-gradient(135deg, #f7f0ff 0%, #f0e8ff 100%);
    border-color: #c0a0dc;
}

.vl-vessel-reagents,
.vl-vessel-products {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    flex: 1;
    min-width: 80px;
}

.vl-vessel-products {
    justify-content: flex-end;
}

.vl-vessel-arrow-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    flex-shrink: 0;
    min-width: 90px;
    color: #4a6a7a;
}

.vl-vessel-arrow svg {
    width: 72px;
    height: 16px;
    color: #1168c4;
}

.vl-vessel-rxn-name {
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #2a4a5c;
    text-align: center;
    max-width: 110px;
    word-break: break-word;
}

.vl-vessel-cond {
    font-size: 0.73rem;
    color: #52728a;
    text-align: center;
    max-width: 120px;
}

.vl-vessel-flask {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    background: rgba(255,255,255,0.7);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 8px;
    padding: 6px 10px;
    min-width: 52px;
    max-width: 90px;
    transition: transform 0.15s;
}

.vl-vessel-flask:hover {
    transform: translateY(-2px);
}

.vl-vessel-flask-product {
    border-style: dashed;
    opacity: 0.85;
}

.vl-vessel-flask-icon {
    font-size: 1.3rem;
    line-height: 1;
}

.vl-vessel-name {
    font-size: 0.75rem;
    font-weight: 700;
    color: #1c3a50;
    text-align: center;
    word-break: break-word;
    line-height: 1.2;
}

.vl-vessel-plus {
    font-size: 1rem;
    font-weight: 700;
    color: #5a7890;
    line-height: 1;
}

/* ── Yield gauge + KPI row ─────────────────────────────────────────────── */
.vl-kpi-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    background: #f8fbff;
    border: 1px solid #d5e2ee;
    border-radius: 10px;
}

.vl-kpi-gauge {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vl-gauge-svg {
    width: 110px;
    height: 58px;
    overflow: visible;
}

.vl-gauge-svg path {
    transition: stroke-dasharray 0.6s ease;
}

.vl-kpi-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    flex: 1;
}

.vl-kpi-small {
    font-size: 0.78rem !important;
}

/* ── Running simulation animation ──────────────────────────────────────── */
#vl-run-btn.vl-running,
#vl-synth-run.vl-running,
#vl-cmp-run.vl-running {
    background: linear-gradient(90deg, #1168c4 0%, #0d8c6a 50%, #1168c4 100%) !important;
    background-size: 200% 100%;
    animation: vl-run-sweep 1.2s linear infinite, vl-run-flash 0.7s ease-in-out infinite alternate;
    cursor: wait;
}

#vl-run-btn.vl-running::after,
#vl-synth-run.vl-running::after,
#vl-cmp-run.vl-running::after {
    content: ' ...';
    display: inline-block;
    width: 1.2em;
    text-align: left;
    animation: vl-run-dots 0.9s steps(3, end) infinite;
}

@keyframes vl-run-sweep {
    0%   { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

@keyframes vl-run-flash {
    0% { box-shadow: 0 0 0 rgba(17, 104, 196, 0.0), 0 9px 18px rgba(17, 104, 196, 0.22); }
    100% { box-shadow: 0 0 0 5px rgba(17, 104, 196, 0.18), 0 12px 24px rgba(13, 140, 106, 0.26); }
}

@keyframes vl-run-dots {
    0% { content: ' .'; }
    33% { content: ' ..'; }
    66%, 100% { content: ' ...'; }
}

.vl-graph-note {
    margin: 8px 0 12px;
    padding: 8px 0 10px;
    border-bottom: 1px solid #d8e5f3;
    color: #617487;
    font-size: 0.8rem;
    line-height: 1.45;
}

/* ── Chart panels top row ───────────────────────────────────────────────── */
.vl-tl-charts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 8px;
}

.vl-tl-chart-panel {
    border: 1.5px solid #c8d8ec;
    border-radius: 8px;
    padding: 10px 10px 6px;
    background: #f6faff;
}

.vl-tl-chart-panel.vl-tl-chart-rate,
.vl-tl-chart-panel.vl-tl-chart-conversion {
    grid-column: 1 / -1;
    margin-bottom: 8px;
}

.vl-tl-charts-kinetics .vl-tl-chart-panel.vl-tl-chart-rate,
.vl-tl-charts-kinetics .vl-tl-chart-panel.vl-tl-chart-conversion {
    grid-column: auto;
}

.vl-tl-chart-title {
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #4a6a8a;
    margin-bottom: 6px;
}

.vl-tl-energy-svg,
.vl-tl-conc-svg {
    width: 100%;
    height: auto;
    display: block;
}

.vl-tl-rate-svg,
.vl-tl-conv-svg {
    width: 100%;
    height: auto;
    display: block;
}

/* ── Live metrics strip ─────────────────────────────────────────────────── */
.vl-tl-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.vl-tl-metric {
    flex: 1;
    min-width: 80px;
    background: #f0f6fb;
    border: 1.5px solid #bcd4e6;
    border-radius: 8px;
    padding: 7px 8px;
    text-align: center;
}

.vl-tl-metric-lbl {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6a8aa8;
    margin-bottom: 2px;
}

.vl-tl-metric-val {
    font-size: 0.94rem;
    font-weight: 800;
    color: #1a3a5c;
    min-height: 18px;
    transition: color 0.3s;
    font-variant-numeric: tabular-nums;
}

.vl-tl-val-green { color: #1d7a42 !important; }
.vl-tl-val-red   { color: #b13030 !important; }
.vl-tl-val-amber { color: #a06010 !important; }

.vl-tl-mbar-track {
    height: 7px;
    background: #d8e8f4;
    border-radius: 4px;
    margin-top: 4px;
    overflow: hidden;
}

.vl-tl-mbar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.55s cubic-bezier(.4,0,.2,1);
}

.vl-tl-mbar-conv { background: #2da862; }
.vl-tl-mbar-rate { background: #e07020; }

/* ── Equilibrium bar ────────────────────────────────────────────────────── */
.vl-tl-eq-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 0.75rem;
}

.vl-tl-eq-lbl {
    font-weight: 700;
    color: #5a7a9a;
    white-space: nowrap;
    font-size: 0.68rem;
}

.vl-tl-eq-bar-wrap {
    flex: 1;
    height: 9px;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    border: 1.5px solid #bcd2e6;
}

.vl-tl-eq-fwd {
    background: linear-gradient(90deg, #1a6cc8, #2da862);
    height: 100%;
    transition: width 0.55s cubic-bezier(.4,0,.2,1);
}

.vl-tl-eq-rev {
    background: #dde8f3;
    height: 100%;
    transition: width 0.55s cubic-bezier(.4,0,.2,1);
}

.vl-tl-eq-info {
    font-size: 0.67rem;
    color: #7a96b0;
    white-space: nowrap;
    font-family: 'Courier New', monospace;
}

/* ── Time badge in controls ─────────────────────────────────────────────── */
.vl-tl-time-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    height: 33px;
    min-height: 33px;
    font-size: 0.76rem;
    font-weight: 700;
    color: #4a6a8a;
    background: #e4eef8;
    border: 1.5px solid #b8cde0;
    border-radius: 20px;
    padding: 0 18px;
    margin-left: 0;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

/* ── Dark mode additions ────────────────────────────────────────────────── */
.vl-dark-mode .vl-tl-chart-panel    { background: #1a2432; border-color: #2e4058; }
.vl-dark-mode .vl-tl-chart-title    { color: #5a82a0; }
.vl-dark-mode .vl-tl-metric         { background: #1c2a3a; border-color: #2e4058; }
.vl-dark-mode .vl-tl-metric-lbl     { color: #5a7a90; }
.vl-dark-mode .vl-tl-metric-val     { color: #a0c0dc; }
.vl-dark-mode .vl-tl-mbar-track     { background: #2a3a4a; }
.vl-dark-mode .vl-tl-eq-bar-wrap    { border-color: #2e4058; }
.vl-dark-mode .vl-tl-eq-rev         { background: #2a3a4a; }
.vl-dark-mode .vl-tl-eq-lbl         { color: #5a7a90; }
.vl-dark-mode .vl-tl-eq-info        { color: #5a7a90; }
.vl-dark-mode .vl-tl-mol-state-tag  { color: #5a7a90; }
.vl-dark-mode .vl-tl-time-badge     { background: #1c2a3a; border-color: #2e4058; color: #6a9abc; }

@media (max-width: 560px) {
    .vl-tl-charts { grid-template-columns: 1fr; }
    .vl-tl-metrics .vl-tl-metric { min-width: 70px; }
}
.vl-fam-organic .vl-vessel-flask { border-color: #7cc07c; }
.vl-fam-bio .vl-vessel-flask { border-color: #b088cc; }

/* ── Numbered result section cards ─────────────────────────────────────── */
.vl-card {
    counter-increment: vl-section;
}

.vl-result {
    counter-reset: vl-section;
}

.vl-card h3::before {
    content: counter(vl-section) ". ";
    font-size: 0.70rem;
    color: #90acc2;
    font-weight: 500;
    margin-right: 3px;
    counter-reset: none;
}

/* Don't number the export bar or vessel banner */
.vl-export-bar {
    counter-increment: none;
}

/* ── Instrument-style KPI enhancements ─────────────────────────────────── */
/* (KPI base styles defined above; box-shadow already applied there) */

/* ── Responsive: vessel banner wraps nicely ─────────────────────────────── */
@media (max-width: 980px) {
    .vl-vessel-banner {
        flex-direction: column;
        align-items: flex-start;
    }
    .vl-vessel-arrow-col {
        flex-direction: row;
        min-width: auto;
        align-self: stretch;
        justify-content: center;
    }
    .vl-vessel-products {
        justify-content: flex-start;
    }
    .vl-kpi-row {
        flex-direction: column;
        align-items: stretch;
    }
    .vl-kpi-gauge {
        justify-content: center;
    }
}

/* ═══════════════════════════════════════════════════════════
   REACTION TIMELINE
═══════════════════════════════════════════════════════════ */

.vl-timeline-card h3 { margin-bottom: 12px; }

.vl-tl-wrapper { padding: 2px 0 6px; }

/* Molecule stage */
.vl-tl-mol-stage {
    margin-bottom: 10px;
}

/* ── Mol box: base ── */
.vl-tl-mol-box {
    display: block;
    width: 100%;
    box-sizing: border-box;
    background: linear-gradient(135deg, #eef5ff, #dceefa);
    border: 2px solid #a8c8e8;
    border-radius: 14px;
    padding: 12px 16px 14px;
    position: relative;
    transition: border-color 0.4s, background 0.4s, box-shadow 0.4s;
    box-shadow: 0 2px 10px rgba(26,108,200,0.07);
}

/* ── Mol box: step type variants ── */
.vl-tl-mol-box[data-step-type="step"] {
    background: linear-gradient(135deg, #fff8ee, #fff0d4);
    border-color: #d4a030;
    box-shadow: 0 2px 10px rgba(180,110,0,0.09);
}
.vl-tl-mol-box[data-step-type="end"] {
    background: linear-gradient(135deg, #edfaf2, #d4f5e2);
    border-color: #2da862;
    box-shadow: 0 3px 14px rgba(30,160,80,0.13);
}

/* ── Mol box head: label row ── */
.vl-tl-mol-box-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    gap: 8px;
}

.vl-tl-stage-label {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: #1a6cc8;
    background: rgba(26,108,200,0.10);
    border-radius: 6px;
    padding: 3px 9px;
    flex-shrink: 0;
    transition: color 0.4s, background 0.4s;
}
.vl-tl-mol-box[data-step-type="step"] .vl-tl-stage-label {
    color: #a07010;
    background: rgba(180,130,0,0.12);
}
.vl-tl-mol-box[data-step-type="end"] .vl-tl-stage-label {
    color: #1a8040;
    background: rgba(30,160,80,0.13);
}

.vl-tl-mol-state-tag {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #fff;
    background: #7a96b0;
    border-radius: 20px;
    padding: 3px 10px;
    transition: background 0.4s;
    white-space: nowrap;
}
.vl-tl-mol-box[data-step-type="step"] .vl-tl-mol-state-tag { background: #c08030; }
.vl-tl-mol-box[data-step-type="end"]  .vl-tl-mol-state-tag { background: #1a9050; }

/* ── Mol box body: icon + formula ── */
.vl-tl-mol-body {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.vl-tl-mol-icon {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(26,108,200,0.12);
    color: #1a6cc8;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.4s, color 0.4s;
}
.vl-tl-mol-box[data-step-type="step"] .vl-tl-mol-icon { background: rgba(180,130,0,0.13); color: #a07010; }
.vl-tl-mol-box[data-step-type="end"]  .vl-tl-mol-icon { background: rgba(30,160,80,0.15); color: #1a8040; font-weight: 900; }

.vl-tl-mol-formula {
    flex: 1;
    font-size: 0.95rem;
    font-weight: 700;
    color: #1a3a5c;
    font-family: 'Segoe UI', Tahoma, sans-serif;
    line-height: 1.5;
    min-height: 22px;
    word-break: break-word;
    white-space: normal;
    overflow-wrap: anywhere;
    padding-top: 5px;
}
.vl-tl-mol-box[data-step-type="step"] .vl-tl-mol-formula { color: #5a3800; }
.vl-tl-mol-box[data-step-type="end"]  .vl-tl-mol-formula { color: #0e4020; }

@keyframes vl-tl-pulse-ring {
    0%   { box-shadow: 0 0 0 0 rgba(26,108,200,0.35); }
    70%  { box-shadow: 0 0 0 10px rgba(26,108,200,0); }
    100% { box-shadow: 0 0 0 0 rgba(26,108,200,0); }
}
.vl-tl-mol-box.vl-tl-mol-pulse { animation: vl-tl-pulse-ring 0.65s ease-out; }

.vl-fam-organic .vl-tl-mol-box { background: linear-gradient(135deg, #f0fff4, #e2f5e8); border-color: #7abf90; }
.vl-fam-ionic   .vl-tl-mol-box { background: linear-gradient(135deg, #ebf4ff, #d8ebff); border-color: #70a8dd; }
.vl-fam-bio     .vl-tl-mol-box { background: linear-gradient(135deg, #f8f0ff, #ede0ff); border-color: #a880d8; }

/* Track + nodes */
.vl-tl-track-section {
    position: relative;
    padding-bottom: 26px;
    margin: 0 12px;
}

.vl-tl-track {
    position: absolute;
    top: 11px;
    left: 11px;
    right: 11px;
    height: 4px;
    background: #dde8f3;
    border-radius: 2px;
    overflow: hidden;
}

.vl-tl-fill {
    height: 100%;
    background: linear-gradient(90deg, #1a6cc8 0%, #2da862 100%);
    border-radius: 2px;
    width: 0%;
    transition: width 0.55s cubic-bezier(.4,0,.2,1);
}

.vl-tl-nodes {
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 1;
}

.vl-tl-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    flex: 1;
    min-width: 0;
    transition: opacity 0.2s;
}

.vl-tl-node:hover .vl-tl-dot { transform: scale(1.2); }

.vl-tl-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #e0eaf5;
    border: 3px solid #b8cfe0;
    transition: all 0.3s;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vl-tl-node-start .vl-tl-dot,
.vl-tl-node-end   .vl-tl-dot { width: 26px; height: 26px; }

.vl-tl-node.vl-tl-done .vl-tl-dot {
    background: #2da862;
    border-color: #2da862;
}

@keyframes vl-tl-glow {
    0%   { box-shadow: 0 0 0 3px rgba(26,108,200,0.30); }
    50%  { box-shadow: 0 0 0 7px rgba(26,108,200,0.08); }
    100% { box-shadow: 0 0 0 3px rgba(26,108,200,0.30); }
}

.vl-tl-node.vl-tl-active .vl-tl-dot {
    background: #1a6cc8;
    border-color: #1a6cc8;
    animation: vl-tl-glow 1.5s infinite;
}

.vl-tl-node-lbl {
    font-size: 0.70rem;
    color: #7a9ab8;
    text-align: center;
    max-width: 92px;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.15;
    overflow-wrap: break-word;
    transition: color 0.25s, font-weight 0.25s;
}

.vl-tl-node.vl-tl-done  .vl-tl-node-lbl,
.vl-tl-node.vl-tl-active .vl-tl-node-lbl {
    color: #1a3a5c;
    font-weight: 700;
}

/* Detail */
.vl-tl-detail {
    background: #f4f8fd;
    border: 1px solid #c8dcea;
    border-left: 3px solid #1a6cc8;
    border-radius: 10px;
    padding: 10px 14px;
    margin: 10px 0 8px;
    min-height: 52px;
    transition: border-left-color 0.4s;
}
.vl-tl-detail[data-step-type="step"] { border-left-color: #c08030; }
.vl-tl-detail[data-step-type="end"]  { border-left-color: #1a9050; }

.vl-tl-detail-hdr {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}

.vl-tl-detail-name {
    font-size: 0.875rem;
    font-weight: 700;
    color: #1a6cc8;
    transition: color 0.3s;
}
.vl-tl-detail[data-step-type="step"] .vl-tl-detail-name { color: #a07010; }
.vl-tl-detail[data-step-type="end"]  .vl-tl-detail-name { color: #1a8040; }

.vl-tl-detail-step-num {
    font-size: 0.68rem;
    font-weight: 700;
    color: #8aa8c0;
    font-family: 'Courier New', monospace;
    white-space: nowrap;
    flex-shrink: 0;
}

.vl-tl-detail-desc {
    font-size: 0.845rem;
    color: #3a5570;
    line-height: 1.55;
}

/* Detail metrics (shown only on Products/end step) */
.vl-tl-detail-metrics {
    display: none;
    gap: 8px;
    margin-top: 4px;
    flex-wrap: wrap;
}

.vl-tl-dm-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    background: #eef7f2;
    border: 1.5px solid #2da86240;
    border-radius: 10px;
    padding: 6px 14px;
    min-width: 72px;
}
.vl-tl-dm-yield { background: #edf7f2; border-color: #2da86260; }
.vl-tl-dm-conf  { background: #eef5ff; border-color: #1a6cc840; }
.vl-tl-dm-check { background: #f4fff8; border-color: #1a906040; }

.vl-tl-dm-val {
    font-size: 1.1rem;
    font-weight: 800;
    color: #1a6040;
    line-height: 1;
}
.vl-tl-dm-yield .vl-tl-dm-val { color: #1a8040; }
.vl-tl-dm-conf  .vl-tl-dm-val { color: #1a5ca8; }
.vl-tl-dm-check .vl-tl-dm-val { color: #1a9050; font-size: 1.15rem; }

.vl-tl-dm-lbl {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6a8aa4;
}

/* Checkmark inside done/active nodes */
.vl-tl-chk {
    display: none;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 900;
    line-height: 1;
}
.vl-tl-node.vl-tl-done .vl-tl-chk {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}
/* Controls */
.vl-tl-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    margin-top: 8px;
}

.vl-tl-controls > * {
    margin: 0 !important;
}

.vl-tl-btn {
    box-sizing: border-box;
    min-height: 33px;
    padding: 6px 18px;
    border-radius: 20px;
    border: 1.5px solid #b8cde0;
    background: #fff;
    color: #2c5282;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    font-family: 'Segoe UI', Tahoma, sans-serif;
    white-space: nowrap;
}

.vl-tl-btn:hover { background: #e8f2fd; border-color: #4a90d9; }

.vl-tl-btn-play {
    background: #1a6cc8;
    color: #fff;
    border-color: #1a6cc8;
    min-width: 96px;
}

.vl-tl-btn-play:hover   { background: #1456a0; border-color: #1456a0; }
.vl-tl-btn-pause        { background: #d06020 !important; border-color: #d06020 !important; }
.vl-tl-btn-pause:hover  { background: #b05010 !important; border-color: #b05010 !important; }

/* Dark mode */
.vl-dark-mode .vl-tl-mol-box     { background: linear-gradient(135deg, #1a2a3e, #1c3050); border-color: #3a5a7a; }
.vl-dark-mode .vl-tl-mol-formula { color: #c0d8f0; }
.vl-dark-mode .vl-tl-mol-icon    { background: rgba(100,160,220,0.15); color: #6aaad8; }
.vl-dark-mode .vl-tl-stage-label { color: #5aaaf0; background: rgba(90,160,240,0.12); }
.vl-dark-mode .vl-tl-mol-state-tag { background: #3a5070; }
.vl-dark-mode .vl-tl-track       { background: #2a3a4a; }
.vl-dark-mode .vl-tl-dot         { background: #2a3a4a; border-color: #4a6070; }
.vl-dark-mode .vl-tl-node-lbl    { color: #5a7a90; }
.vl-dark-mode .vl-tl-node.vl-tl-done .vl-tl-node-lbl,
.vl-dark-mode .vl-tl-node.vl-tl-active .vl-tl-node-lbl { color: #a0c0dc; }
.vl-dark-mode .vl-tl-detail      { background: #1a2432; border-color: #3a4e62; border-left-color: #4a90d9; }
.vl-dark-mode .vl-tl-detail[data-step-type="step"] { border-left-color: #c08030; }
.vl-dark-mode .vl-tl-detail[data-step-type="end"]  { border-left-color: #2da862; }
.vl-dark-mode .vl-tl-detail-name { color: #5aaaf0; }
.vl-dark-mode .vl-tl-detail[data-step-type="step"] .vl-tl-detail-name { color: #c09030; }
.vl-dark-mode .vl-tl-detail[data-step-type="end"]  .vl-tl-detail-name { color: #2da862; }
.vl-dark-mode .vl-tl-detail-desc { color: #8aa8c0; }
.vl-dark-mode .vl-tl-detail-step-num { color: #4a6a80; }
.vl-dark-mode .vl-tl-dm-pill     { background: #1a2a3a; border-color: #2a4a5a; }
.vl-dark-mode .vl-tl-dm-val      { color: #4adca0; }
.vl-dark-mode .vl-tl-dm-lbl      { color: #5a7a90; }
.vl-dark-mode .vl-tl-btn         { background: #1e2a38; border-color: #3a5268; color: #8ab0cc; }
.vl-dark-mode .vl-tl-btn:hover   { background: #243444; }
.vl-dark-mode .vl-tl-btn-play    { background: #1a5fa8; border-color: #1a5fa8; color: #fff; }

@media (max-width: 600px) {
    .vl-tl-node-lbl { font-size: 0.58rem; max-width: 44px; }
    .vl-tl-mol-formula { font-size: 0.9rem; }
    .vl-tl-btn { padding: 5px 12px; font-size: 0.78rem; }
}

/* ═══════════════════════════════════════════════════════════
   UNIFORM VIRTUAL LAB INTERFACE
═══════════════════════════════════════════════════════════ */
.virtual-lab-root {
    --vl-ink: #1d2937;
    --vl-muted-ink: #5d7188;
    --vl-soft-ink: #7e90a4;
    --vl-page: #eef5ff;
    --vl-panel: #ffffff;
    --vl-panel-soft: #f8fbff;
    --vl-line: #d9e2ee;
    --vl-line-strong: #b8c9dc;
    --vl-primary: #1168c4;
    --vl-primary-strong: #0d55a8;
    --vl-primary-soft: #eaf4ff;
    --vl-secondary: #c47c11;
    --vl-good: #2f7d4f;
    --vl-warn: #b56c16;
    --vl-danger: #a33a3a;
    --vl-shadow: 0 14px 36px rgba(31, 53, 71, 0.12);
    --vl-shadow-soft: 0 7px 18px rgba(31, 53, 71, 0.08);
    background:
        radial-gradient(circle at 9% 6%, rgba(17, 104, 196, 0.12), transparent 26%),
        linear-gradient(135deg, #fbfdff 0%, var(--vl-page) 100%);
    color: var(--vl-ink);
    font-family: "Aptos", "Segoe UI", Tahoma, sans-serif;
}

.virtual-lab-root [hidden] {
    display: none !important;
}

.vl-shell {
    gap: 18px;
    padding: 18px;
}

.vl-lab-header {
    background: #ffffff;
    border-radius: 12px;
    padding: 14px 18px;
    color: #153d63;
    border: 1px solid #d9e2ee;
    box-shadow: 0 2px 12px rgba(36, 61, 84, 0.08);
}

.vl-lab-header::after {
    content: none;
}

.vl-lab-header h2,
.vl-modal-header h2 {
    letter-spacing: 0;
}

.vl-lab-title {
    min-width: 0;
    align-items: center;
}

.vl-lab-icon,
.vl-vessel-flask-icon,
.vl-ppe-icon {
    filter: none;
}

.vl-lab-header .vl-btn-icon,
.vl-modal-close {
    min-width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

#vl-settings-btn {
    width: 38px;
    padding: 4px 8px;
    font-size: 1.2rem;
    font-weight: 400;
}

.vl-scenarios,
.vl-controls,
.vl-results,
.vl-compare-col,
.vl-compare-shared,
.vl-explore-sidebar,
.vl-explore-main,
.vl-card,
.vl-modal-content,
.vl-fav-item,
.vl-custom-meta,
.vl-custom-history,
.vl-stoichiometry-section,
.vl-safety-panel,
.vl-cmp-card,
.vl-tax-rxn-card,
.vl-spec-panel,
.vl-ana-kpi,
.vl-opt-item,
.vl-tl-chart-panel,
.vl-tl-detail,
.vl-tl-mol-box {
    border-radius: 8px;
    border-color: var(--vl-line);
    background: var(--vl-panel);
    box-shadow: var(--vl-shadow-soft);
}

.vl-scenarios,
.vl-controls,
.vl-results,
.vl-compare-shared,
.vl-explore-sidebar {
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(8px);
}

.vl-grid {
    grid-template-columns: minmax(290px, 380px) minmax(420px, 1fr);
    align-items: start;
}

.vl-controls,
.vl-results {
    padding: 16px;
}

.vl-panel-bench {
    border-top: 4px solid var(--vl-primary) !important;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%) !important;
}

.vl-scenarios-label,
.vl-preset-label,
.vl-browse-label,
.vl-conditions-divider,
.vl-kpi-label,
.vl-tl-chart-title,
.vl-tl-metric-lbl,
.vl-tax-fam-label,
.vl-stoich-products-row label {
    color: var(--vl-muted-ink);
    letter-spacing: 0.045em;
}

.vl-scenarios-row,
.vl-presets-row,
.vl-custom-actions,
.vl-export-bar,
.vl-fav-actions,
.vl-ic-actions,
.vl-tl-controls {
    gap: 8px;
}

.vl-mode-tabs,
.vl-browse-btns,
.vl-modal-tabs {
    padding: 4px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.vl-lab-header .vl-mode-tabs {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.vl-browse-btns,
.vl-modal-tabs {
    background: #eef5f6;
    border-color: var(--vl-line);
}

.vl-mode-tab,
.vl-browse-btn,
.vl-modal-tab {
    border: 0;
    border-radius: 6px;
    min-height: 34px;
    padding: 7px 13px;
    font-weight: 700;
    transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.vl-mode-tab:hover,
.vl-browse-btn:hover,
.vl-modal-tab:hover,
.vl-scenario-btn:hover,
.vl-preset-btn:hover,
.vl-btn-export:hover,
.vl-btn-ghost:hover,
.vl-btn-primary-sm:hover,
#vl-run-btn:hover,
#vl-cmp-run:hover,
.vl-calculate-btn:hover,
.vl-tl-btn:hover,
.vl-fav-load:hover,
.vl-fav-delete:hover,
.vl-tax-btn:hover {
    transform: translateY(-1px);
}

.vl-mode-tab-active,
.vl-browse-btn-active,
.vl-modal-tab-active {
    background: var(--vl-primary) !important;
    color: #ffffff !important;
    box-shadow: 0 7px 16px rgba(17, 104, 196, 0.22);
}

.vl-scenario-btn,
.vl-preset-btn,
.vl-btn-export,
.vl-btn-ghost,
.vl-btn-primary-sm,
#vl-run-btn,
#vl-cmp-run,
.vl-calculate-btn,
.vl-tl-btn,
.vl-fav-load,
.vl-fav-delete,
.vl-tax-btn,
.vl-settings-actions button,
.vl-ng-expand-btn {
    border-radius: 8px;
    font-family: inherit;
    font-weight: 700;
    transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.vl-scenario-btn,
.vl-preset-btn,
.vl-btn-export,
.vl-btn-ghost,
.vl-fav-load,
.vl-tax-btn,
.vl-settings-actions button {
    background: #ffffff;
    border-color: var(--vl-line);
    color: var(--vl-primary-strong);
}

.vl-scenario-btn:hover,
.vl-preset-btn:hover,
.vl-btn-export:hover,
.vl-btn-ghost:hover,
.vl-fav-load:hover,
.vl-tax-btn:hover,
.vl-settings-actions button:hover {
    background: var(--vl-primary-soft);
    border-color: #b9cee6;
    box-shadow: 0 6px 14px rgba(17, 104, 196, 0.12);
}

#vl-run-btn,
#vl-cmp-run,
.vl-btn-primary-sm,
.vl-calculate-btn,
#vl-export-download,
.vl-tl-btn-play {
    background: var(--vl-primary) !important;
    color: #ffffff !important;
    border-color: var(--vl-primary) !important;
    box-shadow: 0 9px 18px rgba(17, 104, 196, 0.22);
}

#vl-run-btn:hover,
#vl-cmp-run:hover,
.vl-btn-primary-sm:hover,
.vl-calculate-btn:hover,
#vl-export-download:hover,
.vl-tl-btn-play:hover {
    background: var(--vl-primary-strong) !important;
}

.vl-field {
    gap: 6px;
}

.vl-field label,
.vl-settings-grid label {
    color: #31475d;
    font-size: 0.8rem;
}

.vl-field input,
.vl-field select,
.vl-field textarea,
.vl-export-select,
.vl-stoich-amount,
.vl-stoich-unit,
.vl-settings-grid input,
.vl-notebook-area,
.vl-compare-cond-grid input {
    min-height: 38px;
    border-radius: 8px;
    border: 1px solid var(--vl-line-strong);
    background: #fbfdfe;
    color: var(--vl-ink);
    font-family: inherit;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.vl-field textarea,
.vl-notebook-area {
    min-height: 70px;
}

.vl-field input:focus,
.vl-field select:focus,
.vl-field textarea:focus,
.vl-export-select:focus,
.vl-stoich-amount:focus,
.vl-stoich-unit:focus,
.vl-settings-grid input:focus,
.vl-notebook-area:focus,
.vl-compare-cond-grid input:focus {
    outline: none;
    border-color: var(--vl-primary);
    box-shadow: 0 0 0 3px rgba(17, 104, 196, 0.15);
    background: #ffffff;
}

.vl-conditions-divider {
    border-top-color: var(--vl-line);
    margin-top: 6px;
}

.vl-status {
    border-radius: 8px;
    border-color: #cce0f8;
    background: var(--vl-primary-soft);
    color: var(--vl-primary-strong);
}

.vl-status.vl-status-error,
.vl-cond-warn {
    border-color: #ecc8a2;
    background: #fff8ef;
    color: var(--vl-warn);
}

.vl-result-empty {
    min-height: 360px;
    justify-content: center;
    border: 1px dashed var(--vl-line-strong);
    border-radius: 8px;
    background:
        linear-gradient(90deg, rgba(17, 104, 196, 0.05) 1px, transparent 1px),
        linear-gradient(rgba(17, 104, 196, 0.05) 1px, transparent 1px),
        #fbfdfe;
    background-size: 22px 22px;
}

.vl-empty-title,
.vl-card h3,
.vl-compare-col-hdr,
.vl-explore-sidebar h3,
#vl-tax-detail h3,
.vl-favs-header h3,
.vl-settings-section h3,
.vl-stoichiometry-title {
    color: var(--vl-ink);
}

.vl-empty-hint,
.vl-mech-badge,
.vl-ana-badge,
.vl-ng-fam-badge,
.vl-tl-stage-label,
.vl-tl-time-badge,
.vl-tl-dm-pill,
.vl-ppe-item {
    border-radius: 8px;
}

.vl-card {
    padding: 14px;
}

.vl-card h3 {
    border-bottom: 1px solid var(--vl-line);
    padding-bottom: 9px;
}

.vl-export-bar {
    padding: 0 0 10px;
    border-bottom-color: var(--vl-line);
}

.vl-vessel-banner {
    border-radius: 8px;
    border-color: var(--vl-line);
    background: linear-gradient(135deg, #fbfdff 0%, #f2f8ff 100%);
    box-shadow: var(--vl-shadow-soft);
}

.vl-fam-organic {
    background: linear-gradient(135deg, #f5fbf2 0%, #eef8ed 100%);
    border-color: #b8d7ac;
}

.vl-fam-ionic {
    background: linear-gradient(135deg, #f2f8fb 0%, #eaf4f8 100%);
    border-color: #abcbd7;
}

.vl-fam-bio {
    background: linear-gradient(135deg, #fbf5ef 0%, #f8efe7 100%);
    border-color: #dfc1a6;
}

.vl-vessel-flask,
.vl-kpi,
.vl-tl-metric,
.vl-cmp-card,
.vl-tax-rxn-card,
.vl-opt-item,
.vl-ana-kpi,
.vl-spec-panel,
.vl-stoich-item,
.vl-history-item {
    border-radius: 8px;
    background: #fbfdfe;
    border-color: var(--vl-line);
}

.vl-vessel-flask:hover,
.vl-ng-tcard:hover,
.vl-fav-item:hover,
.vl-ppe-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(31, 53, 71, 0.12);
}

.vl-kpi-row {
    border-radius: 8px;
    background: #ffffff;
    border-color: var(--vl-line);
    box-shadow: var(--vl-shadow-soft);
}

.vl-kpi {
    background: linear-gradient(180deg, #ffffff 0%, #eff6ff 100%);
}

.vl-kpi-value,
.vl-ana-v,
.vl-cmp-yield,
.vl-tl-metric-val {
    color: var(--vl-primary-strong);
}

.vl-equation,
.vl-cmp-equation {
    border-color: var(--vl-line);
    background: #f4f9ff;
    color: #203342;
    overflow-x: auto;
}

.vl-ph-strip {
    border-radius: 8px;
    width: 42px;
    height: 34px;
}

.vl-ppe-grid,
.vl-tl-metrics {
    gap: 10px;
}

.vl-ppe-item {
    background: #f0f7ff;
    border-color: var(--vl-line);
}

.vl-proto-num {
    background: var(--vl-primary);
}

.vl-sweep-svg,
.vl-tl-chart-panel,
.vl-ng-source,
.vl-ng-tcard,
.vl-tl-mol-box,
.vl-tl-detail {
    border-radius: 8px;
}

.vl-tl-fill,
.vl-tl-eq-fwd,
.vl-tl-mbar-conv {
    background: linear-gradient(90deg, var(--vl-primary), var(--vl-good));
}

.vl-tl-btn-pause,
.vl-tl-btn-pause:hover {
    background: var(--vl-secondary) !important;
    border-color: var(--vl-secondary) !important;
}

.vl-modal {
    background: rgba(20, 35, 44, 0.58);
    backdrop-filter: blur(3px);
}

.vl-modal-content {
    max-width: 620px;
    border: 1px solid var(--vl-line);
}

.vl-modal-header,
.vl-modal-body,
.vl-settings-actions {
    border-color: var(--vl-line);
}

.vl-compare-cols,
.vl-explore-layout,
.vl-spec-grid,
.vl-sweep-wrap,
.vl-kpi-stats,
.vl-compare-cond-grid,
.vl-settings-grid,
.vl-opt-grid,
.vl-ana-grid {
    gap: 12px;
}

.vl-tax-btn {
    border-left-width: 4px;
}

.vl-tax-btn-active {
    background: var(--vl-primary-soft);
    color: var(--vl-primary-strong);
}

.vl-dark-mode.virtual-lab-root,
.vl-dark-mode .virtual-lab-root {
    --vl-ink: #e6eef2;
    --vl-muted-ink: #a8bac7;
    --vl-soft-ink: #7890a0;
    --vl-page: #111d24;
    --vl-panel: #1b2a33;
    --vl-panel-soft: #14232b;
    --vl-line: #314650;
    --vl-line-strong: #405865;
    --vl-primary: #4a90e2;
    --vl-primary-strong: #7eb3d1;
    --vl-primary-soft: #1d2a3a;
    --vl-shadow: 0 14px 36px rgba(0, 0, 0, 0.32);
    --vl-shadow-soft: 0 7px 18px rgba(0, 0, 0, 0.2);
}

.vl-dark-mode .vl-scenarios,
.vl-dark-mode .vl-controls,
.vl-dark-mode .vl-results,
.vl-dark-mode .vl-compare-col,
.vl-dark-mode .vl-compare-shared,
.vl-dark-mode .vl-explore-sidebar,
.vl-dark-mode .vl-explore-main,
.vl-dark-mode .vl-card,
.vl-dark-mode .vl-modal-content,
.vl-dark-mode .vl-fav-item,
.vl-dark-mode .vl-custom-meta,
.vl-dark-mode .vl-custom-history,
.vl-dark-mode .vl-stoichiometry-section,
.vl-dark-mode .vl-cmp-card,
.vl-dark-mode .vl-tax-rxn-card,
.vl-dark-mode .vl-spec-panel,
.vl-dark-mode .vl-ana-kpi,
.vl-dark-mode .vl-opt-item,
.vl-dark-mode .vl-tl-chart-panel,
.vl-dark-mode .vl-tl-detail,
.vl-dark-mode .vl-tl-mol-box,
.vl-dark-mode .vl-vessel-banner,
.vl-dark-mode .vl-kpi-row,
.vl-dark-mode .vl-kpi,
.vl-dark-mode .vl-vessel-flask,
.vl-dark-mode .vl-ppe-item,
.vl-dark-mode .vl-result-empty {
    background: var(--vl-panel);
    border-color: var(--vl-line);
    color: var(--vl-ink);
}

.vl-dark-mode .vl-field input,
.vl-dark-mode .vl-field select,
.vl-dark-mode .vl-field textarea,
.vl-dark-mode .vl-export-select,
.vl-dark-mode .vl-stoich-amount,
.vl-dark-mode .vl-stoich-unit,
.vl-dark-mode .vl-settings-grid input,
.vl-dark-mode .vl-compare-cond-grid input {
    background: var(--vl-panel-soft);
    border-color: var(--vl-line-strong);
    color: var(--vl-ink);
}

.vl-dark-mode .vl-browse-btns,
.vl-dark-mode .vl-modal-tabs,
.vl-dark-mode .vl-equation,
.vl-dark-mode .vl-cmp-equation {
    background: var(--vl-panel-soft);
    border-color: var(--vl-line);
}

@media (max-width: 1120px) {
    .vl-grid {
        grid-template-columns: minmax(280px, 340px) minmax(360px, 1fr);
    }
}

@media (max-width: 980px) {
    .vl-shell {
        padding: 14px;
    }

    .vl-grid,
    .vl-compare-cols,
    .vl-explore-layout {
        grid-template-columns: 1fr;
    }

    .vl-controls {
        position: static;
    }
}

@media (max-width: 640px) {
    .virtual-lab-root {
        background: #f4f8fa;
    }

    .vl-shell {
        padding: 10px;
        gap: 12px;
    }

    .vl-lab-header,
    .vl-scenarios,
    .vl-controls,
    .vl-results,
    .vl-card,
    .vl-modal-content {
        border-radius: 8px;
    }

    .vl-header-top,
    .vl-header-row,
    .vl-export-bar,
    .vl-settings-actions,
    .vl-favs-header {
        align-items: stretch;
        flex-direction: column;
    }

    .vl-lab-title {
        gap: 8px;
        align-items: center;
    }

    .vl-mode-tabs,
    .vl-browse-btns,
    .vl-modal-tabs,
    .vl-kpi-stats,
    .vl-settings-grid,
    .vl-compare-cond-grid,
    .vl-ana-grid,
    .vl-opt-grid {
        grid-template-columns: 1fr;
        width: 100%;
    }

    .vl-mode-tabs,
    .vl-browse-btns,
    .vl-modal-tabs {
        display: grid;
    }

    .vl-lab-header .vl-header-top,
    .vl-lab-header .vl-header-row {
        align-items: center;
        flex-direction: row;
    }

    .vl-lab-header .vl-mode-tabs {
        display: flex;
        flex-wrap: wrap;
        width: 100%;
        box-sizing: border-box;
    }

    .vl-lab-header .vl-mode-tab {
        flex: 1 1 92px;
        min-width: 0;
    }

    .vl-scenario-btn,
    .vl-preset-btn,
    .vl-btn-export,
    .vl-btn-ghost,
    .vl-btn-primary-sm,
    #vl-run-btn,
    #vl-cmp-run,
    .vl-calculate-btn,
    .vl-export-select,
    .vl-settings-actions button {
        width: 100%;
    }

    .vl-vessel-reagents,
    .vl-vessel-products,
    .vl-empty-hints {
        width: 100%;
    }
}

/* Simulation result top controls */
.vl-result > .vl-export-bar {
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 0 12px;
}

.vl-result > .vl-export-bar .vl-btn-export,
.vl-result > .vl-export-bar .vl-export-select {
    min-height: 38px;
    height: 38px;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1;
    margin: 0 !important;
    transform: none;
}

.vl-result > .vl-export-bar .vl-btn-export {
    padding: 0 14px;
    border: 1px solid var(--vl-line);
    background: #ffffff;
    color: var(--vl-primary-strong);
}

.vl-result > .vl-export-bar .vl-btn-export:hover {
    background: var(--vl-primary-soft);
    border-color: #b9cee6;
}

.vl-result > .vl-export-bar .vl-export-select {
    padding: 0 34px 0 12px;
    border: 1px solid var(--vl-line-strong);
    background-color: #fbfdfe;
    color: #1d2937;
}

.vl-result > .vl-export-bar #vl-export-download {
    border-color: var(--vl-primary) !important;
    background: var(--vl-primary) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    box-shadow: 0 7px 16px rgba(17, 104, 196, 0.18);
}

.vl-result > .vl-export-bar #vl-export-download:hover {
    background: var(--vl-primary-strong) !important;
}

@media (max-width: 760px) {
    .vl-result > .vl-export-bar {
        align-items: stretch;
    }

    .vl-result > .vl-export-bar .vl-btn-export,
    .vl-result > .vl-export-bar .vl-export-select {
        width: 100%;
    }
}

