/* Styles for the public guide pages: /drugs, /drug-interactions, /questions (includes/SeoPages.php). Based on /about. */
        
                * { margin: 0; padding: 0; box-sizing: border-box; }
        body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; background: var(--color-light); color: var(--color-text); line-height: 1.65; }
        a { color: var(--color-link); }
        .page-hero { padding: 2.5rem 1.25rem 4.25rem; text-align: left; }
        .page-hero > * { max-width: 828px; margin-left: auto; margin-right: auto; }
        body:has(.with-toc) .page-hero > * { max-width: 1128px; }
        .page-hero h1 { font-size: 2rem; font-weight: 800; }
        .page-hero p { opacity: 0.95; margin-top: 0.3rem; }
        .container { max-width: 860px; margin: -2.5rem auto 3rem; padding: 0 1rem; position: relative; }
        .doc { background: var(--color-white); border-radius: 14px; box-shadow: var(--shadow-sm); padding: 2rem 2.25rem; }
        .doc h2 { font-size: 1.25rem; color: var(--color-heading); margin: 2rem 0 0.6rem; scroll-margin-top: 80px; }
        .doc h2:first-of-type { margin-top: 1.25rem; }
        .doc h3 { font-size: 1rem; color: var(--color-heading); margin: 1.1rem 0 0.35rem; }
        .doc p, .doc ul, .doc ol, .doc table { margin-bottom: 0.75rem; }
        .doc ul, .doc ol { padding-left: 1.4rem; }
        .doc li { margin-bottom: 0.3rem; }
        .doc table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
        .doc th, .doc td { text-align: left; vertical-align: top; padding: 0.55rem 0.6rem; border-bottom: 1px solid var(--color-border); }
        .doc th { background: var(--color-tint); color: var(--color-heading); font-weight: 700; }
        .table-wrap { overflow-x: auto; }
        .meta { font-size: 0.88rem; color: var(--color-gray); }
        .summary { background: #fff3d6; color: #3b2a00; border-radius: 3px 3px 12px 3px; padding: 1rem 1.2rem; margin: 1rem 0 0.5rem; box-shadow: 0 1px 1px rgba(18, 26, 22, 0.06), 0 12px 20px -14px rgba(18, 26, 22, 0.35); }
        .summary h2 { color: #2e2100 !important; }
        .summary a { color: #6b4400 !important; }
        @media (prefers-color-scheme: dark) { .summary { background: #33301f; color: #f3e3bd; } .summary li, .summary p { color: #f3e3bd; } .summary h2 { color: #ffe3a3 !important; } .summary a { color: #f7c96a !important; } }
        .summary h2 { margin-top: 0 !important; font-size: 1.05rem; }
                                .other { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--color-border); font-size: 0.92rem; }
        .btn { display: inline-flex; align-items: center; height: 40px; padding: 0 1rem; border-radius: 8px; border: 0; background: #1f6a50; color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
        @media (max-width: 640px) { .doc { padding: 1.4rem 1.1rem; } .page-hero h1 { font-size: 1.6rem; } }
        @media print { #site-header, #site-footer, .page-hero, .other, .btn { display: none !important; } .container { margin: 0; } .doc { box-shadow: none; } }

        /* Guide pages */
        .crumbs { font-size: 0.85rem; color: var(--color-gray); margin: 3.25rem 0 0.6rem; }
        .crumbs a { color: var(--color-link); }
        .crumbs span[aria-current] { color: var(--color-text); }
        .lead { font-size: 1.05rem; color: var(--color-heading); }
        .letters { display: flex; flex-wrap: wrap; gap: 0.35rem 0.6rem; margin: 1rem 0 0.5rem; font-weight: 700; }
        .index-list { columns: 3; column-gap: 1.5rem; list-style: none; padding-left: 0 !important; }
        .index-list li { break-inside: avoid; }
        @media (max-width: 640px) { .index-list { columns: 1; } }
        .cta { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; border: 1px solid var(--color-border); border-top: 3px solid var(--color-primary); border-radius: 10px; padding: 1rem 1.2rem; margin: 1.75rem 0; }
        .cta strong { color: var(--color-heading); }
        .cta p { margin: 0.2rem 0 0 !important; font-size: 0.92rem; color: var(--color-gray); }
        .cta .btn { text-decoration: none; flex-shrink: 0; }
        .disclaimer { font-size: 0.85rem; color: var(--color-gray); border-top: 1px solid var(--color-border); padding-top: 0.75rem; margin-top: 1.5rem; }
        .severity { display: inline-block; font-weight: 800; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; padding: 0.25rem 0.6rem; border-radius: 6px; }
        .sev-severe { background: #fbebeb; color: #9b1c1c; }
        .sev-moderate { background: #f9eeda; color: #7a4b00; }
        .sev-mild { background: #e5f4e4; color: #1e5b2a; }
        @media (prefers-color-scheme: dark) { .sev-severe { background: #3b1d1d; color: #ffb4b4; } .sev-moderate { background: #3a2f12; color: #f7d58a; } .sev-mild { background: #1d3320; color: #a8e2b0; } }
        .question { font-size: 1.15rem; font-weight: 700; color: var(--color-heading); }
        .options { list-style: none; padding-left: 0 !important; }
        .options li { border: 1px solid var(--color-border); border-radius: 10px; padding: 0.6rem 0.8rem; }
        .options .letter { display: inline-flex; width: 1.6rem; height: 1.6rem; align-items: center; justify-content: center; border-radius: 50%; background: var(--color-tint); font-weight: 700; margin-right: 0.4rem; }
        .answer { border: 1px solid var(--color-border); border-radius: 10px; padding: 0.8rem 1rem; margin: 1rem 0; }
        .answer summary { cursor: pointer; font-weight: 700; color: var(--color-link); }
        .answer[open] summary { margin-bottom: 0.6rem; }
        .q-list { list-style: none; padding-left: 0 !important; }
        .q-list li { padding: 0.6rem 0; border-bottom: 1px solid var(--color-border); }
        .q-list .meta { display: block; }
        .doc h3 { margin-top: 0.9rem; }

        /* ── Reading layout (drug guides) ── */
        .container.with-toc { max-width: 1160px; }
        .doc :is(p, li, h2, h3, .meta) { max-width: 72ch; }          /* comfortable line length; tables keep the full width */
        .doc [id] { scroll-margin-top: 140px; }                      /* clear the sticky header and the contents bar */
        @media (min-width: 1100px) {
            .with-toc .guide-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 2rem; align-items: start; }
            .doc [id] { scroll-margin-top: 92px; }
        }

        /* Contents: a bar that opens on phones, a sticky side list on wide screens */
        .toc-side { position: sticky; top: calc(60px + 0.5rem); z-index: 4; margin: 0 0 1rem; }
        .toc-side details { background: var(--color-white); border: 1px solid var(--color-border); border-radius: 12px; box-shadow: var(--shadow-sm); }
        .toc-side summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; min-height: 46px; padding: 0 1rem; font-weight: 700; color: var(--color-heading); }
        .toc-side summary::-webkit-details-marker { display: none; }
        .toc-side summary::after { content: ""; width: 0.5rem; height: 0.5rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform 0.2s ease; }
        .toc-side details[open] summary::after { transform: translateY(2px) rotate(-135deg); }
        .toc-side ol { list-style: none; margin: 0; padding: 0 0.5rem 0.6rem; max-height: 60vh; overflow: auto; overscroll-behavior: contain; }
        .toc-side a { display: block; padding: 0.4rem 0.6rem; border-radius: 8px; color: var(--color-text); text-decoration: none; font-size: 0.93rem; line-height: 1.35; }
        .toc-side a:hover { background: var(--color-tint); }
        .toc-side a[aria-current] { background: var(--color-tint); color: var(--color-link); font-weight: 700; }
        .toc-side a { transition: background-color 0.2s ease, color 0.2s ease; }
        @media (min-width: 1100px) {
            .toc-side { top: calc(68px + 1rem); margin: 0; }
            .toc-side details { background: none; border: 0; box-shadow: none; }
            .toc-side summary { cursor: default; pointer-events: none; min-height: 0; padding: 0.2rem 0.6rem 0.5rem; font-size: 0.9rem; }
            .toc-side summary::after { display: none; }
            .toc-side ol { max-height: calc(100vh - 68px - 4rem); padding: 0; }
        }
        @media (prefers-reduced-motion: reduce) { .toc-side summary::after { transition: none; } }

        /* Safety first: the drug's important safety points, high on the page */
        .safety { border: 1px solid color-mix(in srgb, var(--color-danger, #b3261e) 35%, var(--color-border)); background: color-mix(in srgb, var(--color-danger, #b3261e) 6%, var(--color-white)); border-radius: 12px; padding: 1rem 1.25rem 0.4rem; margin: 1.25rem 0 0.5rem; }
        .safety h2 { margin-top: 0 !important; font-size: 1.1rem; color: color-mix(in srgb, var(--color-danger, #b3261e) 70%, var(--color-heading)); }

        /* Dose table: stacked cards on phones (each row's labels come from data-label) */
        @media (max-width: 640px) {
            .doc table, .doc tbody, .doc tr, .doc td { display: block; width: 100%; }
            .doc thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
            .doc tr { border: 1px solid var(--color-border); border-radius: 10px; padding: 0.5rem 0.8rem; margin-bottom: 0.7rem; }
            .doc td { border: 0; padding: 0.2rem 0; }
            .doc td[data-label]::before { content: attr(data-label); display: block; font-size: 0.75rem; font-weight: 700; color: var(--color-gray); }
            .doc td[data-label="Indication"] { font-weight: 700; color: var(--color-heading); }
            .doc td[data-label="Indication"]::before { display: none; }
        }

        /* Drug guide index: search and each medicine's class */
        .finder { margin: 1.25rem 0 0.5rem; }
        .finder label { display: block; font-weight: 700; color: var(--color-heading); margin-bottom: 0.35rem; }
        .finder input { width: 100%; max-width: 30rem; height: 46px; padding: 0 0.95rem; border: 1px solid var(--color-border); border-radius: 10px; background: var(--color-white); color: var(--color-text); font: inherit; }
        .finder input:focus-visible { outline: 3px solid color-mix(in srgb, var(--color-primary) 45%, transparent); outline-offset: 1px; border-color: var(--color-primary); }
        .finder-none { margin-top: 0.6rem; }
        .index-list li { padding: 0.25rem 0; }
        .index-list .cls { display: block; font-size: 0.8rem; color: var(--color-gray); line-height: 1.3; }
        .letter-group[hidden], .index-list li[hidden] { display: none; }
        .crumbs a { display: inline-block; padding-block: 0.2rem; }
        html[data-theme="dark"] .safety { border-color: color-mix(in srgb, #ff8a80 40%, var(--color-border)); background: color-mix(in srgb, #ff8a80 7%, var(--color-white)); }
        html[data-theme="dark"] .safety h2 { color: #ffb4ab; }
        .guide-actions { margin: 0.4rem 0 0.2rem; font-size: 0.93rem; }
        .guide-actions a { font-weight: 600; }
        .guide-actions .meta { display: inline-block; padding: 0 0.4rem; border-radius: 5px; background: var(--color-tint); color: var(--color-link); font-size: 0.72rem; font-weight: 800; }
