/**
 * MOL-GOD HPLC Accordion Frontend — Phase 5
 * Wrapper + sections + calculator + bibliography + AI Q&A.
 * Coexists with existing hplc-accordion-frontend.css; selectors are .molgod-hplc-accordion-wrapper scoped.
 */

.molgod-hplc-accordion-wrapper {
    max-width: 1100px;
    margin: 24px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1f2937;
}

.molgod-accordion-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 12px 12px 0 0;
    padding: 20px 24px;
    margin-bottom: 0;
}
.molgod-accordion-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 700;
    color: #fff;
}
.molgod-accordion-title .molgod-badge {
    background: rgba(255,255,255,0.22);
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.03em;
}
.molgod-accordion-subtitle {
    margin: 0;
    opacity: 0.92;
    font-size: 14px;
}

.molgod-accordion-container {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-top: none;
    border-radius: 0 0 12px 12px;
    overflow: hidden;
}

.molgod-accordion-section + .molgod-accordion-section {
    border-top: 1px solid #f1f5f9;
}

.molgod-accordion-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 22px;
    background: #fff;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s ease;
}
.molgod-accordion-trigger:hover { background: #f8fafc; }
.molgod-accordion-trigger[aria-expanded="true"] { background: #eef2ff; }

.molgod-section-icon { font-size: 22px; flex-shrink: 0; }
.molgod-section-title {
    font-weight: 600;
    font-size: 16px;
    color: #111827;
    flex-shrink: 0;
}
.molgod-section-subtitle {
    color: #6b7280;
    font-size: 13px;
    flex: 1;
}
.molgod-accordion-arrow {
    margin-left: auto;
    color: #6b7280;
    transition: transform 0.25s ease;
    display: inline-flex;
}
.molgod-accordion-trigger[aria-expanded="true"] .molgod-accordion-arrow { transform: rotate(180deg); }

.molgod-accordion-content {
    padding: 0 22px 22px;
    display: none;
}
.molgod-accordion-section.is-open .molgod-accordion-content { display: block; }

/* ─── Blocks ─── */
.molgod-content-block {
    margin: 18px 0;
    padding: 16px 18px;
    border-radius: 10px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
}
.molgod-problem-block  { background: linear-gradient(180deg,#fff7ed 0%, #ffffff 100%); border-color: #fed7aa; }
.molgod-solution-block { background: linear-gradient(180deg,#ecfdf5 0%, #ffffff 100%); border-color: #bbf7d0; }
.molgod-tool-block     { background: linear-gradient(180deg,#eff6ff 0%, #ffffff 100%); border-color: #bfdbfe; }
.molgod-education-block{ background: linear-gradient(180deg,#fef3c7 0%, #ffffff 100%); border-color: #fcd34d; }
.molgod-faq-block      { background: #fff; border-color: #e5e7eb; }

.molgod-block-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    font-size: 16px;
    color: #111827;
}

/* ─── Scenario / timeline / causes ─── */
.molgod-scenario h4 { margin: 0 0 8px; font-size: 15px; color: #111827; }
.molgod-timeline { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.molgod-timeline-event {
    display: flex;
    gap: 10px;
    padding: 8px 12px;
    background: #fff;
    border-left: 4px solid #3b82f6;
    border-radius: 6px;
}
.molgod-timeline-event.bad     { border-left-color: #ef4444; }
.molgod-timeline-event.success { border-left-color: #16a34a; }
.molgod-time-badge {
    background: #1f2937;
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 999px;
    font-weight: 600;
    flex-shrink: 0;
}

.molgod-root-causes { margin-top: 12px; }
.molgod-cause-card {
    display: flex;
    gap: 12px;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 8px;
}
.molgod-cause-number {
    flex-shrink: 0;
    width: 26px; height: 26px;
    border-radius: 50%;
    background: #4f46e5;
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 13px;
}

/* ─── Solution framework ─── */
.molgod-solution-framework { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.molgod-solution-layer {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}
.molgod-solution-layer.highlight { grid-column: 1 / -1; border-color: #3b82f6; }
.molgod-layer-number {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: #111827;
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 700;
    flex-shrink: 0;
}
.molgod-layer-content h4 { margin: 0 0 4px; font-size: 14px; }
.molgod-layer-content p  { margin: 0; font-size: 13px; color: #6b7280; }

/* ─── Calculator ─── */
.molgod-calculator {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px;
}
.molgod-calc-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    align-items: end;
}
.molgod-calc-input-group label {
    display: block;
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 4px;
}
.molgod-calc-input-group input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
}
.molgod-calc-button {
    padding: 10px 14px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}
.molgod-calc-button:hover { filter: brightness(1.05); }

.molgod-calc-results { margin-top: 16px; }
.molgod-calc-results h4 { margin: 0 0 10px; font-size: 15px; }
.molgod-calc-result-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.molgod-calc-result-table th,
.molgod-calc-result-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
}
.molgod-calc-result-table thead th { background: #f1f5f9; }
.molgod-calc-result-table tfoot td { background: #fff7ed; font-weight: 600; }

.molgod-calc-shopping-list { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.molgod-btn-add-to-cart, .molgod-btn-print {
    padding: 8px 14px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
}
.molgod-btn-add-to-cart { background: #16a34a; color: #fff; border-color: #16a34a; }

/* ─── Education / tables ─── */
.molgod-comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
    font-size: 13px;
}
.molgod-comparison-table th, .molgod-comparison-table td {
    padding: 8px 10px;
    border: 1px solid #e5e7eb;
    text-align: left;
}
.molgod-comparison-table thead th { background: #eef2ff; }
.molgod-edu-formula {
    background: #f8fafc;
    padding: 10px 12px;
    border-left: 4px solid #6366f1;
    border-radius: 4px;
    margin: 10px 0;
    font-size: 13px;
}
.molgod-edu-warning {
    background: #fef2f2;
    border-left: 4px solid #ef4444;
    padding: 10px 12px;
    margin-top: 10px;
    border-radius: 4px;
    font-size: 13px;
}
.molgod-edu-list { padding-left: 20px; margin: 8px 0; font-size: 13px; }

/* ─── FAQ ─── */
.molgod-faq-list { display: flex; flex-direction: column; gap: 8px; }
.molgod-faq-item {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}
.molgod-faq-question {
    width: 100%;
    padding: 12px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    border: none;
    cursor: pointer;
    text-align: left;
    font-size: 14px;
    color: #111827;
}
.molgod-faq-question:hover { background: #f8fafc; }
.molgod-faq-toggle {
    font-size: 18px;
    color: #6366f1;
    font-weight: 700;
    transition: transform 0.2s ease;
}
.molgod-faq-item.is-open .molgod-faq-toggle { transform: rotate(45deg); }
.molgod-faq-answer { display: none; padding: 12px 14px; background: #f9fafb; border-top: 1px solid #e5e7eb; font-size: 13px; }
.molgod-faq-item.is-open .molgod-faq-answer { display: block; }
.molgod-faq-source { margin-top: 8px; color: #6b7280; }
.molgod-faq-source a { color: #4f46e5; text-decoration: none; }

/* ─── Failure stories dedicated block (Forensic Fix) ─── */
.molgod-failure-block { background: linear-gradient(180deg,#fef2f2 0%, #ffffff 100%); border: 1px solid #fecaca; border-radius: 12px; padding: 18px 20px; margin: 22px 0; }
.molgod-failure-title { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; font-size: 18px; color: #7f1d1d; }
.molgod-badge-danger { background: #dc2626; color: #fff; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 500; letter-spacing: 0.03em; }
.molgod-failure-intro { margin: 0 0 14px; color: #991b1b; font-size: 13px; }
.molgod-failure-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.molgod-failure-card { background: #fff; border: 1px solid #fecaca; border-left: 4px solid #dc2626; border-radius: 8px; padding: 12px 14px; }
.molgod-failure-head h3 { margin: 0 0 6px; font-size: 15px; color: #7f1d1d; }
.molgod-failure-meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: 11px; color: #991b1b; margin-bottom: 10px; }
.molgod-failure-meta span { background: #fee2e2; padding: 2px 8px; border-radius: 999px; }
.molgod-failure-body { font-size: 13px; color: #1f2937; }
.molgod-failure-problem { margin-bottom: 10px; }
.molgod-failure-problem p, .molgod-failure-lesson p { margin: 4px 0 0; line-height: 1.5; }
.molgod-failure-lesson { background: linear-gradient(180deg,#fef3c7,#ffffff); border-left: 3px solid #f59e0b; padding: 8px 12px; border-radius: 4px; }
.molgod-failure-lesson strong { color: #92400e; }

/* ─── Community submission form ─── */
.molgod-community-block { background: linear-gradient(180deg,#fef3c7 0%, #ffffff 100%); border-color:#fcd34d; }
.molgod-community-intro { margin:4px 0 12px; color:#713f12; font-size:13px; }
.molgod-community-form { display:grid; gap:10px; background:#fff; border:1px solid #fcd34d; border-radius:8px; padding:14px; }
.molgod-cf-row label { display:block; font-size:12.5px; color:#374151; font-weight:500; margin-bottom:4px; }
.molgod-cf-row label .req { color:#dc2626; }
.molgod-cf-row input[type=text], .molgod-cf-row input[type=email], .molgod-cf-row textarea {
    width:100%; padding:7px 10px; border:1px solid #d1d5db; border-radius:6px; font-size:13px; font-family:inherit;
}
.molgod-cf-row textarea { resize:vertical; }
.molgod-cf-hint { color:#6b7280; font-size:11px; }
.molgod-cf-actions { display:flex; align-items:center; gap:10px; margin-top:6px; }
.molgod-cf-submit {
    background:linear-gradient(135deg,#f59e0b,#d97706); color:#fff; border:none;
    padding:9px 18px; border-radius:8px; font-weight:600; cursor:pointer; font-size:13px;
}
.molgod-cf-submit:hover { filter:brightness(1.05); }
.molgod-cf-flash { font-size:12px; color:#065f46; font-weight:500; }
.molgod-cf-flash.err { color:#991b1b; }

/* ─── Compliance Badges ─── */
.molgod-compliance-block { background: linear-gradient(180deg,#faf5ff 0%, #ffffff 100%); border-color:#e9d5ff; }
.molgod-compliance-intro { margin:4px 0 12px; color:#581c87; font-size:13px; }
.molgod-compliance-badges { display:grid; grid-template-columns: repeat(auto-fit,minmax(200px,1fr)); gap:8px; }
.molgod-compliance-badge { background:#fff; border:1px solid #e5e7eb; border-left:4px solid var(--badge-color,#6366f1); border-radius:8px; overflow:hidden; }
.molgod-compliance-badge summary { list-style:none; cursor:pointer; padding:10px 12px; display:grid; grid-template-columns: auto 1fr auto; gap:8px; align-items:center; background:#fff; }
.molgod-compliance-badge summary::-webkit-details-marker { display:none; }
.molgod-compliance-badge[open] summary { background:#faf5ff; border-bottom:1px solid #e9d5ff; }
.molgod-badge-code { font-weight:700; font-size:12px; color:var(--badge-color,#6366f1); background:#f8fafc; padding:3px 8px; border-radius:4px; white-space:nowrap; }
.molgod-badge-name { font-size:13px; color:#1f2937; }
.molgod-badge-status { font-size:11px; color:#16a34a; background:#dcfce7; padding:2px 8px; border-radius:999px; font-weight:600; }
.molgod-badge-body { padding:10px 14px 14px; font-size:12.5px; color:#374151; }
.molgod-badge-desc { margin:0 0 8px; }
.molgod-badge-criteria { padding-left:18px; margin:6px 0; }
.molgod-badge-criteria li { margin:3px 0; }
.molgod-badge-ref { margin-top:8px; padding-top:8px; border-top:1px dashed #e5e7eb; font-size:11.5px; color:#6b7280; }

/* ─── Cost Savings Calculator ─── */
.molgod-cost-block { background: linear-gradient(180deg,#f0fdf4 0%, #ffffff 100%); border-color:#bbf7d0; }
.molgod-cost-intro { margin:4px 0 12px; color:#14532d; font-size:13px; }
.molgod-cost-inputs { display:grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap:10px; margin-bottom:14px; padding:12px; background:#fff; border:1px solid #d1fae5; border-radius:8px; }
.molgod-cost-input label { display:block; font-size:12px; color:#065f46; margin-bottom:4px; font-weight:500; }
.molgod-cost-input input { width:100%; padding:7px 10px; border:1px solid #a7f3d0; border-radius:6px; font-size:13px; }
.molgod-cost-scenarios { display:grid; gap:12px; }
.molgod-cost-scenario { background:#fff; border:1px solid #d1fae5; border-radius:8px; overflow:hidden; }
.molgod-cost-head { display:flex; justify-content:space-between; align-items:center; padding:10px 14px; background:#ecfdf5; border-bottom:1px solid #d1fae5; }
.molgod-cost-head h4 { margin:0; font-size:14px; color:#064e3b; }
.molgod-cost-savings { background:#16a34a; color:#fff; padding:4px 10px; border-radius:999px; font-size:12px; font-weight:600; }
.molgod-cost-table { width:100%; border-collapse:collapse; font-size:12.5px; }
.molgod-cost-table thead th { padding:8px 10px; background:#f0fdf4; text-align:left; font-weight:600; color:#064e3b; border-bottom:1px solid #d1fae5; font-size:12px; }
.molgod-cost-table thead th.molgod-cost-ours { background:#dcfce7; color:#14532d; }
.molgod-cost-table tbody td { padding:6px 10px; border-bottom:1px solid #f1f5f9; }
.molgod-cost-table tbody tr.molgod-cost-total td { background:#f0fdf4; font-weight:600; color:#065f46; border-top:2px solid #bbf7d0; }
.molgod-cost-summary { margin-top:14px; padding:12px 14px; background:linear-gradient(135deg,#16a34a,#22c55e); color:#fff; border-radius:8px; display:flex; justify-content:space-between; align-items:center; }
.molgod-cost-annual { font-size:18px; font-weight:700; }

/* ─── Method Comparison Matrix ─── */
.molgod-comparison-block { background: linear-gradient(180deg,#f0f9ff 0%, #ffffff 100%); border-color:#bae6fd; }
.molgod-mc-intro { margin:4px 0 10px; color:#0c4a6e; font-size:13px; }
.molgod-mc-wrapper { overflow-x:auto; }
.molgod-mc-table {
    width:100%; border-collapse:collapse; font-size:12.5px; background:#fff;
    border-radius:8px; overflow:hidden; box-shadow:0 1px 3px rgba(0,0,0,.05);
    min-width:760px;
}
.molgod-mc-table thead th {
    background:#f1f5f9; padding:10px 8px; text-align:left; font-weight:600;
    color:#0f172a; border-bottom:2px solid #cbd5e1; font-size:12px;
}
.molgod-mc-table thead th.molgod-mc-ours { background:#eef2ff; color:#4338ca; }
.molgod-mc-table tbody td { padding:8px 8px; border-bottom:1px solid #f1f5f9; vertical-align:top; }
.molgod-mc-table tbody td.molgod-mc-ours { background:#fafbff; font-weight:600; color:#1e1b4b; }
.molgod-mc-table tbody tr:last-child td { border-bottom:none; }
.molgod-mc-legend { margin-top:10px; display:flex; flex-wrap:wrap; gap:12px; font-size:11.5px; color:#475569; }
.molgod-mc-legend-item { display:inline-flex; align-items:center; gap:5px; }
.molgod-mc-dot { width:10px; height:10px; border-radius:50%; display:inline-block; }
.molgod-mc-dot.our    { background:#4f46e5; }
.molgod-mc-dot.usp    { background:#16a34a; }
.molgod-mc-dot.lit    { background:#ea580c; }
.molgod-mc-dot.vendor { background:#64748b; }

/* ─── Troubleshooting Tree ─── */
.molgod-troubleshooting-block { background: linear-gradient(180deg,#fef2f2 0%, #ffffff 100%); border-color:#fecaca; }
.molgod-troubleshooting-intro { margin:4px 0 12px; color:#6b7280; font-size:13px; }
.molgod-ts-tree { display:grid; grid-template-columns: 240px 1fr; gap:14px; }
@media (max-width:780px){ .molgod-ts-tree { grid-template-columns: 1fr; } }
.molgod-ts-symptoms { display:flex; flex-direction:column; gap:6px; }
.molgod-ts-symptom {
    text-align:left; background:#fff; border:1px solid #e5e7eb; border-radius:8px;
    padding:10px 12px; cursor:pointer; display:flex; flex-direction:column; gap:2px;
    transition: border-color .15s ease, background .15s ease;
}
.molgod-ts-symptom:hover { border-color:#c7d2fe; background:#f8fafc; }
.molgod-ts-symptom.active { border-color:#4f46e5; background:#eef2ff; }
.molgod-ts-symptom-name { font-weight:600; font-size:13px; color:#111827; }
.molgod-ts-symptom-count { font-size:11px; color:#6366f1; }
.molgod-ts-panels { position:relative; }
.molgod-ts-panel { display:none; flex-direction:column; gap:8px; }
.molgod-ts-panel.active { display:flex; }
.molgod-ts-cause { background:#fff; border:1px solid #e5e7eb; border-radius:8px; overflow:hidden; }
.molgod-ts-cause summary {
    list-style:none; cursor:pointer; padding:10px 12px;
    display:flex; justify-content:space-between; align-items:center; gap:10px;
    background:#fff; font-weight:500;
}
.molgod-ts-cause summary::-webkit-details-marker { display:none; }
.molgod-ts-cause[open] summary { background:#f8fafc; border-bottom:1px solid #e5e7eb; }
.molgod-ts-cause-name { color:#111827; font-size:13px; flex:1; }
.molgod-ts-cause-prob { display:flex; align-items:center; gap:6px; font-size:11px; color:#4f46e5; font-weight:600; }
.molgod-ts-bar { display:inline-block; width:60px; height:6px; background:#e5e7eb; border-radius:999px; overflow:hidden; }
.molgod-ts-bar span { display:block; height:100%; background:linear-gradient(90deg,#6366f1,#a855f7); }
.molgod-ts-cause-body { padding:10px 14px 14px; font-size:13px; color:#1f2937; }
.molgod-ts-cause-body p { margin:4px 0; }
.molgod-ts-meta { margin-top:8px; display:flex; gap:6px; flex-wrap:wrap; }
.molgod-ts-chip { background:#eef2ff; color:#4338ca; padding:3px 9px; border-radius:999px; font-size:11px; border:1px solid #c7d2fe; }

/* ─── Gradient visualizer ─── */
.molgod-gradient-visualizer {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px;
}
.molgod-gradient-visualizer canvas {
    width: 100%;
    max-width: 100%;
    height: auto;
    background: #f8fafc;
    border-radius: 6px;
}
.molgod-gradient-controls { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.molgod-gradient-controls button {
    padding: 6px 12px;
    border: 1px solid #e5e7eb;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
}
.molgod-gradient-controls button.active { background: #4f46e5; color: #fff; border-color: #4f46e5; }

/* ─── Gradient extras (timeline + slope calc) ─── */
.molgod-gradient-timeline { margin-top: 14px; background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; padding: 10px 12px; }
.molgod-gradient-timeline h4 { margin: 0 0 8px; font-size: 14px; color: #111827; }
.molgod-gradient-steps { width: 100%; border-collapse: collapse; font-size: 12px; }
.molgod-gradient-steps th { background: #eef2ff; padding: 6px 8px; text-align: left; font-weight: 600; color: #1e1b4b; }
.molgod-gradient-steps td { padding: 5px 8px; border-bottom: 1px solid #f1f5f9; }

.molgod-gradient-calc { margin-top: 14px; background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; padding: 10px 12px; }
.molgod-gradient-calc h4 { margin: 0 0 8px; font-size: 14px; color: #111827; }
.molgod-gv-inputs { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin-bottom: 10px; }
.molgod-gv-inputs label { display: block; font-size: 11px; color: #6b7280; margin-bottom: 3px; }
.molgod-gv-inputs input { width: 100%; padding: 5px 8px; border: 1px solid #d1d5db; border-radius: 4px; font-size: 13px; }
.molgod-gv-results { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.molgod-gv-tile { background: linear-gradient(135deg, #eef2ff, #e0e7ff); padding: 10px; border-radius: 6px; text-align: center; }
.molgod-gv-val { font-size: 17px; font-weight: 700; color: #4338ca; margin-bottom: 2px; }
.molgod-gv-lbl { font-size: 10.5px; color: #6366f1; text-transform: uppercase; letter-spacing: 0.02em; }
.molgod-gv-note { margin-top: 10px; padding: 8px 12px; background: #fef3c7; border-left: 3px solid #f59e0b; border-radius: 4px; font-size: 11.5px; color: #78350f; }

/* ─── Molecular Predictor ─── */
.molgod-predictor-block { background: linear-gradient(180deg,#f5f3ff 0%, #ffffff 100%); border-color: #e9d5ff; }
.molgod-predictor-intro { margin: 4px 0 12px; color: #5b21b6; font-size: 13px; }
.molgod-predictor-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.molgod-predictor-card { background: #fff; border: 1px solid #e9d5ff; border-radius: 8px; padding: 12px; }
.molgod-predictor-head { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.molgod-predictor-icon { font-size: 18px; }
.molgod-predictor-label { font-size: 12px; color: #6b7280; text-transform: uppercase; letter-spacing: 0.02em; }
.molgod-predictor-value { font-size: 22px; font-weight: 700; color: #5b21b6; margin: 4px 0; }
.molgod-predictor-unit { font-size: 13px; color: #9ca3af; font-weight: 500; margin-left: 4px; }
.molgod-predictor-range { font-size: 11px; color: #6b7280; }
.molgod-predictor-conf { margin-top: 6px; font-size: 10.5px; padding: 2px 8px; border-radius: 999px; display: inline-block; }
.molgod-predictor-conf.conf-high { background: #dcfce7; color: #065f46; }
.molgod-predictor-conf.conf-medium { background: #fef3c7; color: #78350f; }
.molgod-predictor-conf.conf-low { background: #fee2e2; color: #7f1d1d; }
.molgod-predictor-note { margin-top: 6px; font-size: 11px; color: #6b7280; font-style: italic; }
.molgod-predictor-disclaimer { margin-top: 12px; color: #6b7280; }

/* ─── Downloads ─── */
.molgod-downloads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}
.molgod-download-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px;
    text-align: center;
}
.molgod-download-icon { font-size: 32px; margin-bottom: 6px; }
.molgod-download-card h4 { margin: 4px 0; font-size: 14px; }
.molgod-download-card p  { margin: 0 0 10px; font-size: 12px; color: #6b7280; }
.molgod-download-btn {
    padding: 8px 12px;
    background: #4f46e5;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
}
.molgod-download-btn:hover { filter: brightness(1.07); }

/* ─── Bibliography ─── */
.molgod-bibliography-wrapper {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    margin: 22px 0;
}
.molgod-bibliography-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    margin: 0 0 14px;
}
.molgod-bibliography-controls {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    padding-bottom: 14px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 14px;
}
.molgod-citation-style-selector label { font-size: 13px; margin-right: 6px; color: #6b7280; }
.molgod-citation-style-selector select { padding: 6px 10px; border: 1px solid #d1d5db; border-radius: 6px; }
.molgod-bibliography-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.molgod-btn-copy-all, .molgod-btn-download {
    padding: 6px 12px;
    border: 1px solid #d1d5db;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
}
.molgod-btn-copy-all:hover, .molgod-btn-download:hover { background: #f8fafc; }

.molgod-references-list { display: flex; flex-direction: column; gap: 10px; }
.molgod-reference-item {
    display: flex;
    gap: 10px;
    background: #fafafa;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13px;
}
.molgod-ref-number { color: #6366f1; font-weight: 700; flex-shrink: 0; }
.molgod-ref-content { flex: 1; }
.molgod-ref-text { line-height: 1.55; }
.molgod-ref-actions { margin-top: 6px; display: flex; gap: 8px; flex-wrap: wrap; }
.molgod-ref-link, .molgod-ref-copy {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 999px;
    background: #eef2ff;
    color: #4338ca;
    text-decoration: none;
    border: 1px solid #c7d2fe;
    cursor: pointer;
}

/* ─── AI Q&A ─── */
.molgod-ai-qa-wrapper {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    margin: 22px 0;
}
.molgod-ai-title { display: flex; align-items: center; gap: 8px; font-size: 18px; margin: 0 0 12px; }
.molgod-ai-chat { border: 1px solid #e5e7eb; border-radius: 10px; overflow: hidden; }
.molgod-ai-messages { padding: 14px; min-height: 120px; background: #f9fafb; }
.molgod-ai-welcome p { margin: 0 0 8px; color: #111827; font-size: 13px; }
.molgod-ai-msg { margin: 8px 0; padding: 10px 12px; border-radius: 8px; font-size: 13px; line-height: 1.5; }
.molgod-ai-msg.user { background: #eef2ff; color: #1e1b4b; }
.molgod-ai-msg.bot  { background: #fff; border: 1px solid #e5e7eb; color: #111827; }
.molgod-ai-msg.bot.error { background: #fef2f2; border-color: #fecaca; color: #7f1d1d; }
.molgod-ai-msg.molgod-ai-thinking { background: #f8fafc; color: #6b7280; font-style: italic; }
.molgod-ai-text { white-space: pre-wrap; }
.molgod-ai-meta { margin-top: 6px; font-size: 10.5px; color: #9ca3af; }
.molgod-ai-suggestions { display: flex; gap: 8px; flex-wrap: wrap; }
.molgod-ai-suggestion {
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    color: #4338ca;
    padding: 6px 10px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 12px;
}
.molgod-ai-suggestion:hover { background: #e0e7ff; }

.molgod-ai-input-wrapper {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    padding: 10px;
    border-top: 1px solid #e5e7eb;
    background: #fff;
}
.molgod-ai-input-wrapper textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    resize: vertical;
    font-family: inherit;
    font-size: 13px;
}
.molgod-ai-send-btn {
    padding: 10px 18px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    height: fit-content;
    align-self: end;
}

/* ─── Print ─── */
@media print {
    .molgod-accordion-trigger, .molgod-accordion-arrow,
    .molgod-calc-button, .molgod-btn-add-to-cart, .molgod-btn-print,
    .molgod-ai-qa-wrapper, .molgod-bibliography-actions,
    .molgod-ai-send-btn, .molgod-download-btn { display: none !important; }
    .molgod-accordion-section .molgod-accordion-content { display: block !important; padding: 0 !important; }
}

/* ─── Responsive ─── */
@media (max-width: 640px) {
    .molgod-accordion-trigger { flex-wrap: wrap; }
    .molgod-section-subtitle { width: 100%; margin-top: 4px; }
    .molgod-bibliography-controls { flex-direction: column; align-items: stretch; }
}
