/* Protocols.is — Article Design System (Dark Cinematic) */

/* ============================================
   PROTOCOLS.IS ARTICLE DESIGN SYSTEM
============================================ */

:root {
--cr-bg: #0A0E1A;
--cr-bg-raised: #141B2D;
--cr-surface: rgba(15, 23, 42, 0.8);
--cr-surface-hover: rgba(20, 27, 45, 0.9);
--cr-border: rgba(59, 130, 246, 0.12);
--cr-border-bright: rgba(59, 130, 246, 0.25);
--cr-cyan: #3B82F6;
--cr-cyan-dim: rgba(59, 130, 246, 0.08);
--cr-cyan-glow: rgba(59, 130, 246, 0.2);
--cr-red: #EF4444;
--cr-red-dim: rgba(239, 68, 68, 0.08);
--cr-amber: #F59E0B;
--cr-amber-dim: rgba(245, 158, 11, 0.08);
--cr-green: #10B981;
--cr-green-dim: rgba(16, 185, 129, 0.08);
--cr-text: #F1F5F9;
--cr-text-secondary: #94A3B8;
--cr-text-muted: #64748B;
--cr-font-display: 'Space Grotesk', system-ui, sans-serif;
--cr-font-body: 'Inter', system-ui, sans-serif;
--cr-font-mono: 'JetBrains Mono', monospace;
}

/* === BASE TYPOGRAPHY (scoped to articles) === */
.cr-article {
color: var(--cr-text);
font-family: var(--cr-font-body);
font-size: 17px;
line-height: 1.8;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}

.cr-article *, .cr-article *::before, .cr-article *::after {
box-sizing: border-box;
}

/* === LAYOUT === */
.cr-article {
max-width: 780px;
margin: 0 auto;
padding: 40px 24px 80px;
}

/* === HERO === */
.cr-hero {
text-align: center;
padding: 60px 0 48px;
border-bottom: 1px solid var(--cr-border);
margin-bottom: 48px;
position: relative;
}

.cr-hero::before {
content: '';
position: absolute;
top: 0;
left: 50%;
transform: translateX(-50%);
width: 200px;
height: 200px;
background: radial-gradient(circle, var(--cr-cyan-glow) 0%, transparent 70%);
border-radius: 50%;
pointer-events: none;
opacity: 0.4;
}

.cr-badge {
display: inline-block;
font-family: var(--cr-font-mono);
font-size: 11px;
font-weight: 500;
letter-spacing: 0.15em;
text-transform: uppercase;
color: var(--cr-cyan);
background: var(--cr-cyan-dim);
border: 1px solid var(--cr-border-bright);
padding: 6px 16px;
border-radius: 4px;
margin-bottom: 24px;
}

.cr-hero h1 {
font-family: var(--cr-font-display);
font-size: clamp(2rem, 5vw, 3rem);
font-weight: 700;
line-height: 1.15;
letter-spacing: -0.02em;
color: #F1F5F9;
margin-bottom: 20px;
}

.cr-hero h1 .cr-accent {
background: linear-gradient(135deg, var(--cr-cyan), #10B981);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}

.cr-hero-meta {
font-family: var(--cr-font-mono);
font-size: 13px;
color: var(--cr-text-muted);
letter-spacing: 0.04em;
}

.cr-hero-meta span { margin: 0 8px; }

.cr-hero-sub {
font-size: 19px;
color: var(--cr-text-secondary);
max-width: 620px;
margin: 16px auto 0;
line-height: 1.6;
}

/* === QUICK LINKS BAR === */
.cr-quick-links {
display: flex;
gap: 12px;
justify-content: center;
flex-wrap: wrap;
margin-top: 28px;
}

.cr-quick-links a {
font-family: var(--cr-font-mono);
font-size: 12px;
letter-spacing: 0.06em;
text-transform: uppercase;
color: var(--cr-cyan);
border: 1px solid var(--cr-border-bright);
background: var(--cr-cyan-dim);
padding: 8px 18px;
border-radius: 4px;
text-decoration: none;
transition: all 0.2s ease;
}

.cr-quick-links a:hover {
background: rgba(59, 130, 246, 0.15);
border-color: var(--cr-cyan);
box-shadow: 0 4px 16px var(--cr-cyan-glow);
}

/* === TABLE OF CONTENTS === */
.cr-toc {
background: var(--cr-surface);
border: 1px solid var(--cr-border);
border-top: 3px solid var(--cr-cyan);
border-radius: 6px;
padding: 28px 32px;
margin-bottom: 48px;
}

.cr-toc-label {
font-family: var(--cr-font-mono);
font-size: 11px;
font-weight: 600;
letter-spacing: 0.15em;
text-transform: uppercase;
color: var(--cr-cyan);
margin-bottom: 16px;
}

.cr-toc ol {
list-style: none;
counter-reset: toc-counter;
padding: 0;
}

.cr-toc ol li {
counter-increment: toc-counter;
margin-bottom: 6px;
}

.cr-toc ol li a {
color: var(--cr-text-secondary);
text-decoration: none;
font-size: 14px;
transition: color 0.15s ease;
display: flex;
align-items: baseline;
gap: 10px;
}

.cr-toc ol li a::before {
content: counter(toc-counter, decimal-leading-zero);
font-family: var(--cr-font-mono);
font-size: 12px;
color: var(--cr-cyan);
min-width: 22px;
}

.cr-toc ol li a:hover { color: #F1F5F9; }

/* === HEADINGS === */
h2 {
font-family: var(--cr-font-display);
font-size: 28px;
font-weight: 700;
letter-spacing: -0.01em;
color: #F1F5F9;
margin: 64px 0 24px;
padding-bottom: 14px;
border-bottom: 1px solid var(--cr-border);
}

h3 {
font-family: var(--cr-font-display);
font-size: 22px;
font-weight: 600;
color: #F1F5F9;
margin: 44px 0 18px;
}

h4 {
font-family: var(--cr-font-display);
font-size: 19px;
font-weight: 700;
color: #F1F5F9;
margin: 36px 0 14px;
padding: 12px 0 12px 16px;
border-left: 3px solid var(--cr-cyan);
background: linear-gradient(90deg, var(--cr-cyan-dim) 0%, transparent 60%);
letter-spacing: -0.01em;
}

/* === BODY TEXT === */
p {
margin-bottom: 22px;
color: var(--cr-text);
line-height: 1.8;
}

strong { color: #F1F5F9; font-weight: 600; }

a {
color: var(--cr-cyan);
text-decoration: none;
border-bottom: 1px solid var(--cr-border-bright);
transition: border-color 0.15s ease;
}

a:hover { border-bottom-color: var(--cr-cyan); }

/* === LISTS === */
ul, ol {
margin: 0 0 24px 0;
padding-left: 28px;
}

li {
margin-bottom: 10px;
color: var(--cr-text-secondary);
line-height: 1.7;
}

li strong { color: var(--cr-text); }

/* === VERDICT BOX === */
.cr-verdict {
background: linear-gradient(135deg, var(--cr-surface) 0%, var(--cr-bg-raised) 100%);
border: 1px solid var(--cr-border-bright);
border-radius: 8px;
padding: 32px;
margin: 32px 0;
position: relative;
overflow: hidden;
}

.cr-verdict::before {
content: '';
position: absolute;
top: 0; left: 0; right: 0;
height: 3px;
background: linear-gradient(90deg, var(--cr-cyan), var(--cr-green), var(--cr-cyan));
}

.cr-verdict-badge {
font-family: var(--cr-font-mono);
font-size: 11px;
font-weight: 600;
letter-spacing: 0.15em;
text-transform: uppercase;
color: var(--cr-cyan);
margin-bottom: 12px;
}

.cr-verdict h3 {
font-size: 22px;
margin: 0 0 12px;
color: #F1F5F9;
}

.cr-verdict p {
color: var(--cr-text-secondary);
font-size: 15px;
margin-bottom: 12px;
}

.cr-verdict-score {
font-family: var(--cr-font-mono);
font-size: 14px;
color: var(--cr-cyan);
margin-top: 16px;
padding-top: 16px;
border-top: 1px solid var(--cr-border);
}

.cr-verdict-score .score-num {
font-size: 28px;
font-weight: 700;
color: #F1F5F9;
}

/* === RATING BOX === */
.cr-rating-box {
background: var(--cr-surface);
border: 1px solid var(--cr-border);
border-radius: 8px;
padding: 28px 32px;
margin: 28px 0;
}

.cr-rating-box-title {
font-family: var(--cr-font-mono);
font-size: 11px;
font-weight: 600;
letter-spacing: 0.15em;
text-transform: uppercase;
color: var(--cr-cyan);
margin-bottom: 20px;
}

.cr-rating-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 16px;
}

.cr-rating-item {
display: flex;
flex-direction: column;
gap: 6px;
}

.cr-rating-label {
font-size: 13px;
color: var(--cr-text-secondary);
display: flex;
justify-content: space-between;
}

.cr-rating-label .val {
font-family: var(--cr-font-mono);
font-weight: 600;
color: var(--cr-cyan);
}

.cr-rating-bar {
height: 6px;
background: rgba(59, 130, 246, 0.1);
border-radius: 3px;
overflow: hidden;
}

.cr-rating-fill {
height: 100%;
background: linear-gradient(90deg, var(--cr-cyan), var(--cr-green));
border-radius: 3px;
transition: width 1s ease;
}

.cr-rating-overall {
grid-column: 1 / -1;
text-align: center;
padding-top: 16px;
border-top: 1px solid var(--cr-border);
margin-top: 8px;
}

.cr-rating-overall .overall-score {
font-family: var(--cr-font-display);
font-size: 36px;
font-weight: 700;
color: #F1F5F9;
}

.cr-rating-overall .overall-label {
font-family: var(--cr-font-mono);
font-size: 11px;
letter-spacing: 0.1em;
color: var(--cr-text-muted);
text-transform: uppercase;
}

/* === PULL QUOTE === */
.cr-pull-quote {
border-left: 3px solid var(--cr-cyan);
padding: 20px 24px;
margin: 32px 0;
background: var(--cr-cyan-dim);
border-radius: 0 6px 6px 0;
}

.cr-pull-quote p {
font-size: 18px;
font-weight: 500;
color: #F1F5F9;
line-height: 1.5;
margin: 0;
}

/* === WARNING / DANGER CALLOUT === */
.cr-callout-danger {
background: var(--cr-red-dim);
border: 1px solid rgba(239, 68, 68, 0.15);
border-left: 3px solid var(--cr-red);
border-radius: 0 6px 6px 0;
padding: 20px 24px;
margin: 24px 0;
}

.cr-callout-danger strong { color: var(--cr-red); }

.cr-callout-info {
background: var(--cr-cyan-dim);
border: 1px solid var(--cr-border-bright);
border-left: 3px solid var(--cr-cyan);
border-radius: 0 6px 6px 0;
padding: 20px 24px;
margin: 24px 0;
}

.cr-callout-info strong { color: var(--cr-cyan); }

/* === CHECKLIST === */
.cr-checklist {
background: var(--cr-surface);
border: 1px solid var(--cr-border);
border-radius: 8px;
padding: 28px 32px;
margin: 28px 0;
}

.cr-checklist-title {
font-family: var(--cr-font-mono);
font-size: 11px;
font-weight: 600;
letter-spacing: 0.15em;
text-transform: uppercase;
color: var(--cr-red);
margin-bottom: 16px;
}

.cr-checklist ul {
list-style: none;
padding: 0;
}

.cr-checklist ul li {
position: relative;
padding-left: 28px;
margin-bottom: 10px;
color: var(--cr-text);
font-size: 15px;
}

.cr-checklist ul li::before {
content: '\26A0';
position: absolute;
left: 0;
top: 0;
font-size: 14px;
}

/* === TABLES === */
table {
width: 100%;
border-collapse: collapse;
margin: 24px 0;
font-size: 14px;
}

th {
font-family: var(--cr-font-mono);
font-size: 11px;
font-weight: 600;
letter-spacing: 0.1em;
text-transform: uppercase;
color: var(--cr-cyan);
text-align: left;
padding: 12px 16px;
background: var(--cr-surface);
border-bottom: 2px solid var(--cr-border-bright);
}

td {
padding: 12px 16px;
border-bottom: 1px solid var(--cr-border);
color: var(--cr-text-secondary);
vertical-align: top;
}

tr:hover td {
background: rgba(59, 130, 246, 0.04);
}

/* === DOSAGE CARD === */
.cr-dosage {
background: var(--cr-surface);
border: 1px solid var(--cr-border);
border-radius: 8px;
padding: 28px 32px;
margin: 28px 0;
}

.cr-dosage-title {
font-family: var(--cr-font-mono);
font-size: 11px;
font-weight: 600;
letter-spacing: 0.15em;
text-transform: uppercase;
color: var(--cr-cyan);
margin-bottom: 20px;
}

.cr-dosage-row {
display: flex;
justify-content: space-between;
align-items: baseline;
padding: 10px 0;
border-bottom: 1px solid var(--cr-border);
}

.cr-dosage-row:last-child { border-bottom: none; }

.cr-dosage-label {
font-size: 14px;
color: var(--cr-text-secondary);
}

.cr-dosage-value {
font-family: var(--cr-font-mono);
font-size: 14px;
font-weight: 600;
color: var(--cr-cyan);
}

/* === DIAGRAM CONTAINER (legacy) === */
.cr-diagram {
background: var(--cr-bg-raised);
border: 1px solid var(--cr-border);
border-radius: 8px;
padding: 32px 24px;
margin: 32px 0;
overflow-x: auto;
}

.cr-diagram-label {
font-family: var(--cr-font-mono);
font-size: 11px;
font-weight: 600;
letter-spacing: 0.15em;
text-transform: uppercase;
color: var(--cr-text-muted);
text-align: center;
margin-bottom: 20px;
}

.cr-diagram .mermaid {
display: flex;
justify-content: center;
min-width: 100%;
}

.cr-diagram .mermaid svg {
min-width: 700px;
max-width: none;
height: auto;
}

/* === STUDY DATA CHARTS (responsive) === */
.cr-chart-wrap {
background: #111827;
border: 1px solid var(--cr-border);
border-radius: 12px;
padding: 0;
margin: 32px 0;
overflow: hidden;
position: relative;
}

.cr-chart-title {
font-family: var(--cr-font-mono);
font-size: 12px;
font-weight: 600;
letter-spacing: 0.12em;
text-transform: uppercase;
color: var(--cr-text-muted);
text-align: center;
padding: 20px 20px 0;
line-height: 1.5;
}

.cr-chart-scroll {
overflow-x: auto;
overflow-y: hidden;
-webkit-overflow-scrolling: touch;
scrollbar-width: thin;
scrollbar-color: #334155 transparent;
padding: 16px 16px 20px;
}

.cr-chart-scroll::-webkit-scrollbar {
height: 6px;
}

.cr-chart-scroll::-webkit-scrollbar-track {
background: transparent;
}

.cr-chart-scroll::-webkit-scrollbar-thumb {
background: #334155;
border-radius: 3px;
}

.cr-chart-scroll svg {
display: block;
height: auto;
}

/* === BUTTONS === */
.cr-btn-primary {
display: inline-flex;
align-items: center;
justify-content: center;
font-family: var(--cr-font-display);
font-size: 14px;
font-weight: 600;
letter-spacing: 0.04em;
text-transform: uppercase;
color: #ffffff;
background: var(--cr-cyan);
border: none;
padding: 14px 32px;
border-radius: 6px;
text-decoration: none;
cursor: pointer;
transition: all 0.2s ease;
}

.cr-btn-primary:hover {
background: #2563EB;
box-shadow: 0 4px 20px var(--cr-cyan-glow);
border-bottom: none;
transform: translateY(-1px);
}

.cr-btn-outline {
display: inline-flex;
align-items: center;
justify-content: center;
font-family: var(--cr-font-display);
font-size: 14px;
font-weight: 600;
letter-spacing: 0.04em;
text-transform: uppercase;
color: var(--cr-cyan);
background: transparent;
border: 1px solid var(--cr-border-bright);
padding: 13px 32px;
border-radius: 6px;
text-decoration: none;
cursor: pointer;
transition: all 0.2s ease;
}

.cr-btn-outline:hover {
background: var(--cr-cyan-dim);
border-color: var(--cr-cyan);
border-bottom: 1px solid var(--cr-cyan);
}

/* === CTA BLOCK === */
.cr-cta-block {
text-align: center;
padding: 48px 32px;
margin: 48px 0;
background: linear-gradient(135deg, var(--cr-surface) 0%, var(--cr-bg-raised) 100%);
border: 1px solid var(--cr-border-bright);
border-radius: 8px;
position: relative;
overflow: hidden;
}

.cr-cta-block::before {
content: '';
position: absolute;
top: 0; left: 0; right: 0;
height: 2px;
background: linear-gradient(90deg, transparent, var(--cr-cyan), transparent);
}

.cr-cta-block h3 {
font-size: 24px;
margin: 0 0 12px;
color: #F1F5F9;
}

.cr-cta-block p {
color: var(--cr-text-muted);
margin-bottom: 24px;
font-size: 15px;
}

.cr-cta-buttons {
display: flex;
gap: 14px;
justify-content: center;
flex-wrap: wrap;
}

/* === CASCADE STEPS === */
.cr-cascade-steps {
counter-reset: cascade;
}

.cr-cascade-step {
counter-increment: cascade;
position: relative;
padding-left: 48px;
margin-bottom: 32px;
}

.cr-cascade-step::before {
content: counter(cascade);
position: absolute;
left: 0;
top: 2px;
width: 32px;
height: 32px;
background: var(--cr-cyan-dim);
border: 1px solid var(--cr-border-bright);
border-radius: 6px;
display: flex;
align-items: center;
justify-content: center;
font-family: var(--cr-font-mono);
font-size: 14px;
font-weight: 700;
color: var(--cr-cyan);
}

/* === NEXT STEPS === */
.cr-next-steps {
background: var(--cr-surface);
border: 1px solid var(--cr-border);
border-radius: 8px;
padding: 28px 32px;
margin: 32px 0;
}

.cr-next-steps h3 {
margin-top: 0;
}

.cr-next-steps ul {
list-style: none;
padding: 0;
}

.cr-next-steps li {
margin-bottom: 10px;
}

.cr-next-steps a {
font-weight: 600;
}

/* === FAQ === */
.cr-faq-item {
border-bottom: 1px solid var(--cr-border);
padding: 20px 0;
}

.cr-faq-q {
font-family: var(--cr-font-display);
font-size: 16px;
font-weight: 600;
color: #F1F5F9;
cursor: pointer;
display: flex;
justify-content: space-between;
align-items: center;
}

.cr-faq-q::after {
content: '+';
font-size: 20px;
color: var(--cr-cyan);
transition: transform 0.2s ease;
}

.cr-faq-q.open::after {
transform: rotate(45deg);
}

.cr-faq-a {
max-height: 0;
overflow: hidden;
transition: max-height 0.3s ease, padding 0.3s ease;
}

.cr-faq-a.open {
max-height: 500px;
padding-top: 12px;
}

.cr-faq-a p {
font-size: 15px;
color: var(--cr-text-secondary);
}

/* === ABOUT FOOTER === */
.cr-about {
margin-top: 60px;
padding-top: 32px;
border-top: 1px solid var(--cr-border);
}

.cr-about p {
font-size: 14px;
color: var(--cr-text-muted);
font-style: italic;
}

/* === DISCLOSURE === */
.cr-disclosure {
font-size: 12px;
color: var(--cr-text-muted);
text-align: center;
margin-top: 8px;
font-style: italic;
}

/* === RESPONSIVE === */
@media (max-width: 640px) {
.cr-article { padding: 24px 18px 60px; font-size: 16px; line-height: 1.75; }
.cr-hero { padding: 40px 0 32px; }
.cr-hero h1 { font-size: 1.75rem; }
.cr-hero-sub { font-size: 16px; }
h2 { font-size: 22px; margin: 48px 0 18px; }
h3 { font-size: 19px; margin: 36px 0 14px; }
h4 { font-size: 17px; }
p { margin-bottom: 18px; }
.cr-rating-grid { grid-template-columns: 1fr; }
.cr-cta-buttons { flex-direction: column; }
.cr-cta-buttons a { width: 100%; text-align: center; }
.cr-dosage-row { flex-direction: column; gap: 4px; }
.cr-quick-links { flex-direction: column; align-items: center; }
.cr-toc { padding: 20px; }
.cr-dosage { padding: 20px; }
.cr-rating-box { padding: 20px; }
.cr-checklist { padding: 20px; }
.cr-verdict { padding: 24px; }
.cr-callout-danger, .cr-callout-info { padding: 16px 18px; }
.cr-pull-quote { padding: 16px 18px; }
.cr-pull-quote p { font-size: 16px; }
.cr-cta-block { padding: 32px 20px; }
table { font-size: 13px; display: block; overflow-x: auto; }
th, td { padding: 10px 12px; }
/* Charts on mobile */
.cr-chart-wrap { margin: 24px -18px; border-radius: 0; border-left: none; border-right: none; }
.cr-chart-title { font-size: 10px; padding: 14px 14px 0; }
.cr-chart-scroll { padding: 10px 10px 14px; }
.cr-chart-scroll svg { min-width: 520px; }
/* Legacy diagrams on mobile */
.cr-diagram { padding: 20px 14px; margin: 24px -18px; border-radius: 0; border-left: none; border-right: none; }
.cr-diagram-label { font-size: 10px; margin-bottom: 14px; }
}

@media (prefers-reduced-motion: reduce) {
* { transition: none !important; animation: none !important; }
}

/* Bibliography / References */
.cr-bibliography {
padding-left: 1.5em;
counter-reset: none;
}
.cr-bibliography li {
margin-bottom: 0.75em;
font-size: 0.92em;
line-height: 1.6;
color: var(--cr-text);
}
.cr-bibliography li a {
color: var(--cr-cyan);
text-decoration: underline;
text-underline-offset: 2px;
}
.cr-bibliography li a:hover {
color: var(--cr-text);
}
.cr-ref {
color: var(--cr-cyan);
text-decoration: none;
font-size: 0.85em;
font-family: var(--cr-font-mono);
}
.cr-ref:hover {
text-decoration: underline;
}
