/* Profile and dictionary panels inherit BioIDz's existing colour palette. */
#dictionaryView[hidden], #dictionaryBrowse[hidden], #dictionaryDetail[hidden], .dictionary-entry[hidden] { display:none; }
.dictionary-intro, .dictionary-count { color:var(--ink-soft); font-size:14px; line-height:1.7; }
.dictionary-list { display:grid; grid-template-columns:repeat(auto-fill,minmax(240px,1fr)); gap:12px; }
.dictionary-entry { display:flex; flex-direction:column; gap:8px; padding:20px; border:1px solid var(--line); border-radius:20px; background:var(--surface); color:var(--ink); text-align:left; min-height:100px; cursor:pointer; }
.dictionary-entry strong { font-size:16px; line-height:1.4; overflow-wrap:anywhere; }
.dictionary-entry span { font-size:12px; color:var(--ink-soft); }
.dictionary-entry:hover { border-color:var(--brand); }
.dictionary-detail-actions { display:flex; flex-wrap:wrap; align-items:center; gap:10px; }
#dictionaryOrganismTitle { margin:16px 0 24px; font-size:26px; overflow-wrap:anywhere; }
#dictionaryProfile { padding:24px; border:1px solid var(--line); border-radius:20px; background:var(--surface); }
.organism-profile { color:var(--ink-soft); font-size:13px; line-height:1.7; overflow-wrap:anywhere; }
.organism-profile h4 { color:var(--ink); font-size:16px; margin:24px 0 8px; }
.organism-profile p { margin:8px 0 14px; }
.profile-group { font-weight:600; color:var(--brand); }
.organism-profile ul { padding-left:20px; }
.organism-profile li { margin-bottom:10px; }
.profile-source { color:var(--var); }
.profile-limitations { font-size:12px; }
.profile-reaction-table { border-collapse:collapse; width:100%; font-size:12px; }
.profile-reaction-table caption { text-align:left; padding:10px 0; color:var(--ink); }
.profile-reaction-table th, .profile-reaction-table td { border:1px solid var(--line); padding:10px; vertical-align:top; text-align:left; }
.profile-reaction-table th { font-weight:600; color:var(--ink); }
.profile-reaction-table th:first-child { min-width:110px; }
.organism-profile h4:first-child { margin-top:0; }
.result-organism-profile { border-top:1px solid var(--line); margin-top:18px; }
.result-organism-profile > summary, .organism-profile details > summary { min-height:44px; padding:12px 0; cursor:pointer; font-weight:600; color:var(--brand); }

/* Organism biography: jump rail, best-medium card, incubation stats, morphology grid, collapsible context. */
.organism-biography .sec { margin:24px 0; }
.organism-biography .sec:first-of-type { margin-top:0; }
.bio-jumprail { display:flex; gap:8px; overflow-x:auto; padding:2px 2px 14px; margin-bottom:10px; border-bottom:1px solid var(--line); scrollbar-width:none; }
.bio-jumprail::-webkit-scrollbar { display:none; }
.bio-jumprail button { flex-shrink:0; font:600 12px 'IBM Plex Sans',Arial,sans-serif; color:var(--ink-soft); background:var(--surface); border:1px solid var(--line); padding:8px 14px; border-radius:999px; cursor:pointer; white-space:nowrap; min-height:36px; }
.bio-jumprail button:hover, .bio-jumprail button:focus-visible { border-color:var(--brand); color:var(--brand); }

.bio-best-medium { display:flex; align-items:flex-start; gap:12px; background:var(--pos-bg); border:1px solid var(--pos-line); border-radius:14px; padding:14px 16px; margin-bottom:10px; }
.bio-best-medium .bio-best-icon { flex-shrink:0; width:28px; height:28px; border-radius:50%; background:var(--surface); display:flex; align-items:center; justify-content:center; color:var(--brand); }
.bio-best-medium .bio-best-label { font:700 10px/1 'IBM Plex Sans',Arial,sans-serif; letter-spacing:.07em; text-transform:uppercase; color:var(--brand); margin:0 0 3px; }
.bio-best-medium .bio-best-name { font:600 14px/1.3 'IBM Plex Sans',Arial,sans-serif; color:var(--ink); margin:0; }
.other-media { display:flex; flex-wrap:wrap; gap:7px; }
.other-media span { font-size:11.5px; font-weight:600; color:var(--ink-soft); background:var(--surface-sunk); border:1px solid var(--line); padding:6px 11px; border-radius:999px; }

.bio-stat-strip { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }
.bio-stat { background:var(--surface-sunk); border:1px solid var(--line); border-radius:12px; padding:12px 8px; text-align:center; }
.bio-stat-v { font:700 14px/1.25 'IBM Plex Sans',Arial,sans-serif; font-variant-numeric:tabular-nums; color:var(--ink); }
.bio-stat-l { font-size:10px; font-weight:600; letter-spacing:.06em; text-transform:uppercase; color:var(--ink-faint); margin-top:4px; }

.bio-morph { display:flex; flex-direction:column; gap:1px; background:var(--line); border:1px solid var(--line); border-radius:12px; overflow:hidden; margin:8px 0; }
.bio-morph-row { display:grid; grid-template-columns:22px 86px 1fr; align-items:center; gap:10px; background:var(--surface); padding:9px 12px; }
.bio-morph-row .morph-glyph { width:20px; height:20px; color:var(--brand); display:flex; }
.bio-morph-row .morph-glyph svg { width:100%; height:100%; }
.bio-morph-row .morph-k { font-size:11px; font-weight:600; color:var(--ink-faint); text-transform:uppercase; letter-spacing:.03em; }
.bio-morph-row .morph-v { font-size:12.5px; color:var(--ink); line-height:1.4; }
.morph-note { font-size:12.5px; line-height:1.6; margin:6px 0; }
.morph-note strong { color:var(--ink); }

.organism-biography details.sec > summary { display:flex; align-items:center; justify-content:space-between; gap:8px; min-height:auto; padding:0; }
.organism-biography details.sec > summary::-webkit-details-marker { display:none; }
.organism-biography details.sec > summary h4 { margin:0; flex:1; }
.organism-biography details.sec > summary .chev { color:var(--ink-faint); transition:transform .15s ease; flex-shrink:0; }
.organism-biography details.sec[open] > summary .chev { transform:rotate(90deg); }
.organism-biography details.sec .sec-body { padding-top:12px; }
.misid-list { padding-left:0; list-style:none; }
.misid-list li { background:var(--var-bg); border:1px solid var(--var-line); border-radius:12px; padding:10px 14px; margin-bottom:8px; }
.misid-list li strong { color:var(--var); }
.misid-list li em { display:block; font-style:normal; color:var(--ink-faint); font-size:12px; margin-top:4px; }
body[data-view="dictionary"] .rail-step, body[data-view="dictionary"] .rail-group-summary, body[data-view="dictionary"] .nav-fab { display:none; }
@media (max-width:600px) { #dictionaryProfile { padding:16px; } .dictionary-list { grid-template-columns:minmax(0,1fr); } }

/* Test profiles share the organism dictionary’s layout and theme variables. */
#testProfilesView[hidden], #testProfilesBrowse[hidden], #testProfilesDetail[hidden] { display:none; }
.reference-profile-title { margin:16px 0 24px; font-size:26px; overflow-wrap:anywhere; }
.reference-profile-panel { padding:24px; border:1px solid var(--line); border-radius:20px; background:var(--surface); }
body[data-view="tests"] .rail-step, body[data-view="tests"] .rail-group-summary, body[data-view="tests"] .nav-fab { display:none; }
@media (max-width:600px) { .reference-profile-panel { padding:16px; } }

/* Combined media (TSI, LIA, SIM): one entry per tube, readings side by side. */
.combined-readings, .combined-options { margin:0 0 12px; padding-left:20px; line-height:1.7; font-size:14px; }
.combined-readings li, .combined-options li { margin:4px 0; }
.combined-reaction-table td, .combined-reaction-table thead th:not(:first-child) { text-align:center; }
.combined-reaction-table thead th { white-space:nowrap; }

/* Manufacturer method section in the Biochemical Tests dictionary */
.brand-method { margin:14px 0 18px; padding:14px 16px; border:1px solid var(--line); border-left:4px solid var(--brand); border-radius:12px; background:var(--surface-sunk, var(--surface)); }
.brand-method[data-brand="none"] { border-left-color:var(--line-strong, var(--line)); }
.brand-method h4 { margin-top:0; }
.brand-method p { margin:6px 0; line-height:1.6; font-size:14px; }
.brand-method .brand-note { font-style:italic; }
.brand-method .brand-subhead { font-weight:600; margin-top:10px; }
.brand-steps, .brand-limits { margin:6px 0 10px; padding-left:20px; line-height:1.6; font-size:14px; }
.brand-steps li, .brand-limits li { margin:3px 0; }
.brand-qc { margin:8px 0; }
.brand-qc td { white-space:normal; }
.brand-sources { font-size:13px; overflow-wrap:anywhere; }
.test-compact-head { font-size:14px; }

/* Highlighted panel membership at the top of each test, linking to the Identify worksheet. */
.test-panels { display:flex; flex-wrap:wrap; align-items:center; gap:8px 10px; margin:0 0 4px; padding:12px 14px; border:1px solid var(--pos-line); border-left:4px solid var(--brand); border-radius:12px; background:var(--pos-bg); }
.test-panels-label { font-weight:600; color:var(--brand); font-size:13px; }
.test-panel-links { display:flex; flex-wrap:wrap; gap:7px; }
.test-panel-link { font:600 12px 'IBM Plex Sans',Arial,sans-serif; color:var(--brand); background:var(--surface); border:1px solid var(--brand); padding:7px 13px; border-radius:999px; cursor:pointer; min-height:34px; white-space:nowrap; }
.test-panel-link:hover { background:var(--brand); color:var(--on-brand, #fff); }
.test-panel-link:focus-visible { outline:3px solid var(--brand); outline-offset:2px; }
.combined-readings-label { font-weight:600; color:var(--ink); margin-bottom:0; }
