/* css/reader.css */
:root {
    /* Variables will be set by PHP */
    --accent: #f59e0b; /* Default, overridden by PHP */
    
    /* NIGHT MODE (High Contrast) */
    --bg-color: #050505; 
    --text-color: #e5e5e5;
    --heading-color: #ffffff;
    --subtext-color: #9ca3af; 
    --panel-bg: #111111;
    --border-color: rgba(255,255,255,0.15);
}

/* DAY MODE (High Contrast) */
html.day-mode {
    --bg-color: #fcfbf9; 
    --text-color: #0f0f0f;
    --heading-color: #000000;
    --subtext-color: #555555; 
    --panel-bg: #ffffff;
    --border-color: rgba(0,0,0,0.1);
}

body {
    background-color: var(--bg-color) !important;
    color: var(--text-color) !important;
    font-family: 'Merriweather', serif;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* TYPOGRAPHY */
h1, h2, h3, h4, .font-display { font-family: 'Outfit', sans-serif; }

/* Prose Overrides */
.prose { 
    color: var(--text-color) !important; 
    font-size: 1.05rem; 
    line-height: 1.75; 
    max-width: 100%;
}

/* H2: Section Titles */
.prose h2 { 
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    color: var(--heading-color) !important;
    margin-top: 2.5em !important;
    margin-bottom: 0.8em !important;
    line-height: 1.2 !important;
}

/* H3: Sub-sections */
.prose h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem !important;
    font-weight: 600 !important;
    color: var(--heading-color) !important;
    margin-top: 2em !important;
    margin-bottom: 0.5em !important;
}
/* Standalone chapter subheaders (outside .prose) */
.section.chapter-subheader {
    font-family: 'Outfit', sans-serif;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--accent);
    margin: 2.5rem 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(var(--accent-rgb, 245, 158, 11), 0.3);
    letter-spacing: 0.02em;
}

/* Day mode adjustments */
html.day-mode .section.chapter-subheader {
    border-bottom-color: rgba(var(--accent-rgb, 245, 158, 11), 0.2);
}

html.day-mode .prose .section.chapter-subheader {
    border-bottom-color: rgba(var(--accent-rgb, 245, 158, 11), 0.2) !important;
}


/* Lists */
.prose ul, .prose ol { margin-top: 1em; margin-bottom: 1em; }
.prose li { color: var(--text-color) !important; margin-top: 0.5em; }
.prose strong { color: var(--heading-color) !important; font-weight: 700; }

/* UI COMPONENTS */
.evidence-trigger { 
    border-bottom: 2px solid var(--accent); 
    cursor: pointer; 
    font-family: 'Outfit', sans-serif; 
    font-weight: 700; 
    color: var(--heading-color);
    text-decoration: none;
}
.evidence-trigger:hover { 
    background: var(--accent); 
    color: white; 
    padding: 0 4px; 
    margin: 0 -4px; 
    border-radius: 4px;
}

/* TOC LEFT RAIL */
.toc-link {
    display: block; 
    font-family: 'Outfit', sans-serif; 
    font-size: 0.8rem;
    color: var(--subtext-color); 
    margin-bottom: 0.75rem; 
    transition: color 0.2s; 
    text-decoration: none;
}
.toc-link:hover { color: var(--accent); }
.toc-link.active { 
    color: var(--heading-color); 
    font-weight: bold; 
    border-left: 2px solid var(--accent); 
    padding-left: 8px; 
    margin-left: -10px;
}

/* NAV BAR FOOTER */
.chapter-nav {
    border-top: 1px solid var(--border-color);
    margin-top: 4rem;
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    font-family: 'Outfit', sans-serif;
    gap: 20px;
}

.nav-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    max-width: 45%;
    transition: opacity 0.2s;
}
.nav-card:hover { opacity: 0.7; }
.nav-label { 
    font-size: 0.65rem; 
    text-transform: uppercase; 
    letter-spacing: 0.1em; 
    color: var(--subtext-color); 
    margin-bottom: 4px;
}
.nav-title { 
    font-size: 0.95rem; 
    font-weight: 700; 
    color: var(--heading-color); 
    line-height: 1.3; 
}
.nav-arrow { 
    color: var(--accent); 
    font-size: 1.2rem; 
    font-weight: bold; 
    margin-bottom: 5px;
}

/* CONTENT STYLES */
.prose blockquote {
    border-left: 4px solid var(--border-color) !important;
    padding-left: 1rem !important;
    margin: 1.5rem 0 !important;
    font-style: italic !important;
    background: var(--panel-bg) !important;
    color: var(--subtext-color) !important;
    border-radius: 0 8px 8px 0 !important;
    padding: 1rem !important;
}

.prose div:has(> p > b) {
    border-left: 2px solid var(--accent) !important;
    background: var(--panel-bg) !important;
    color: var(--text-color) !important;
    border-radius: 0 8px 8px 0 !important;
    padding: 1rem !important;
    font-family: 'JetBrains Mono', monospace !important;
    font-size: 0.875rem !important;
    margin: 1.5rem 0 !important;
}

.prose div.bg-white\\/5 {
    background: var(--panel-bg) !important;
    border-color: var(--border-color) !important;
    color: var(--text-color) !important;
}

.prose p.italic {
    color: var(--subtext-color) !important;
    border-top-color: var(--border-color) !important;
}

.prose ul li::marker {
    color: var(--accent) !important;
}

.prose a {
    color: var(--accent) !important;
    text-decoration: none !important;
    border-bottom: 1px dotted var(--accent) !important;
}
.prose a:hover {
    border-bottom-style: solid !important;
}
/* Chapter 19 - AI Terminal Styles */
.ai-terminal {
    background: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin: 2rem 0;
    overflow: hidden;
    font-family: 'JetBrains Mono', monospace;
}

.terminal-header {
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.terminal-title {
    color: var(--accent);
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
}

.terminal-meta {
    display: flex;
    gap: 10px;
    font-size: 0.75rem;
    opacity: 0.7;
}

.tag {
    background: var(--accent);
    color: black;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: bold;
}

.chat-entry {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.chat-entry:last-child {
    border-bottom: none;
}

.chat-entry.user {
    background: rgba(255, 69, 0, 0.05);
}

.chat-entry.ai {
    background: rgba(0, 255, 65, 0.05);
}

.prompt {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.user-label {
    color: #FF4500;
    font-weight: bold;
}

.ai-label {
    color: #00FF41;
    font-weight: bold;
}

.command {
    color: var(--text-color);
    opacity: 0.9;
}

.status {
    color: var(--accent);
    animation: pulse 2s infinite;
}

.message {
    padding-left: 1.5rem;
    line-height: 1.6;
}

.response-line {
    color: var(--accent);
    margin-bottom: 0.25rem;
    opacity: 0.8;
}

.ai-response {
    margin-top: 1rem;
}

.highlight {
    color: var(--accent);
    font-weight: bold;
}

.emphasis {
    font-weight: bold;
    border-left: 3px solid var(--accent);
    padding-left: 1rem;
    margin: 1rem 0;
}

.adaptive-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.adaptive-list li {
    margin: 0.5rem 0;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    border-left: 2px solid var(--accent);
}

.code {
    font-family: 'JetBrains Mono', monospace;
    color: #00FF41;
    background: rgba(0, 255, 65, 0.1);
    padding: 2px 4px;
    border-radius: 3px;
}

.ethical-boundary {
    border: 1px solid var(--accent);
    border-radius: 6px;
    padding: 1rem;
    margin: 1.5rem 0;
    background: rgba(0, 255, 65, 0.05);
}

.boundary-title {
    color: var(--accent);
    font-weight: bold;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

.cognitive-loop {
    margin: 1rem 0;
}

.loop-steps {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.step {
    background: var(--panel-bg);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    min-width: 100px;
    text-align: center;
}

.tactics-reveal {
    margin-top: 1rem;
}

.tactic {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1rem;
    margin: 1rem 0;
}

.tactic h4 {
    color: var(--accent);
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
}

.code-block {
    font-family: 'JetBrains Mono', monospace;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.75rem;
    border-radius: 4px;
    margin: 0.5rem 0;
    border-left: 3px solid var(--accent);
    overflow-x: auto;
}

.terminal-footer {
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
    text-align: center;
    font-size: 0.8rem;
    opacity: 0.7;
}

.session-end {
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 0.25rem;
}
/* CHAPTER SUBHEADER STYLES - Within .prose for content sections */
.prose .section.chapter-subheader {
    font-family: 'Outfit', sans-serif !important;
    font-size: 1.4rem !important;
    font-weight: 600 !important;
    color: var(--accent) !important; /* Using your accent color */
    margin: 2.5rem 0 1rem 0 !important;
    padding-bottom: 0.5rem !important;
    border-bottom: 2px solid rgba(var(--accent-rgb, 245, 158, 11), 0.3) !important;
    letter-spacing: 0.02em !important;
    text-transform: none !important;
    background: none !important;
    border: none !important;
}

/* Alternative colors if you want options */
.prose .section.chapter-subheader.blue {
    color: #3b82f6 !important;
    border-bottom-color: rgba(59, 130, 246, 0.3) !important;
}

.prose .section.chapter-subheader.purple {
    color: #8b5cf6 !important;
    border-bottom-color: rgba(139, 92, 246, 0.3) !important;
}

.prose .section.chapter-subheader.subtle {
    color: var(--subtext-color) !important;
    border-bottom-color: var(--border-color) !important;
    font-weight: 500 !important;
}

/* Add this near your other prose styles, maybe around line 80-90 */

/* Animations */
.blink {
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.cursor-blink::after {
    content: '█';
    animation: blink 1s infinite;
    margin-left: 2px;
}

.glitch-text {
    animation: glitch 0.3s infinite;
    color: #FF4500;
}

@keyframes glitch {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
    100% { transform: translate(0); }
}
/* Simple Chat Interface */
.chat-interface {
    max-width: 800px;
    margin: 2rem auto;
}

.chat-message {
    display: flex;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.chat-message.user {
    flex-direction: row;
}

.chat-message.ai {
    flex-direction: row;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.user .avatar {
    background: rgba(255, 69, 0, 0.1);
    color: #FF4500;
}

.ai .avatar {
    background: rgba(0, 255, 65, 0.1);
    color: #00FF41;
}

.bubble {
    flex: 1;
    padding: 1rem;
    border-radius: 12px;
    position: relative;
}

.user .bubble {
    background: rgba(255, 69, 0, 0.05);
    border: 1px solid rgba(255, 69, 0, 0.2);
}

.ai .bubble {
    background: rgba(0, 255, 65, 0.05);
    border: 1px solid rgba(0, 255, 65, 0.2);
}

.meta {
    font-size: 0.8rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.user .meta {
    color: #FF4500;
}

.ai .meta {
    color: #00FF41;
}

.text {
    line-height: 1.6;
}

.text p {
    margin-bottom: 0.75rem;
}

.text p:last-child {
    margin-bottom: 0;
}

.insight {
    background: rgba(var(--accent-rgb), 0.1);
    border-left: 3px solid var(--accent);
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 0 8px 8px 0;
    font-style: italic;
}

.adaptation-list {
    margin: 1.5rem 0;
}

.adapt-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    border-left: 3px solid var(--accent);
}

.condition {
    font-weight: 500;
    color: var(--text-color);
}

.action {
    color: var(--accent);
    font-weight: bold;
}

.ethical-note {
    background: rgba(0, 255, 65, 0.1);
    border: 1px solid rgba(0, 255, 65, 0.3);
    border-radius: 8px;
    padding: 1rem;
    margin: 1.5rem 0;
}

.process-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1.5rem 0;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.step {
    background: var(--panel-bg);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    min-width: 100px;
    text-align: center;
}

.arrow {
    color: var(--accent);
    font-weight: bold;
}

.question {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--border-color);
    font-weight: bold;
    color: var(--accent);
}
/* Simple Chat Styles */
.chat-interface {
    max-width: 800px;
    margin: 2rem auto;
}

.chat-message {
    display: flex;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.user .avatar {
    background: rgba(255, 69, 0, 0.1);
    color: #FF4500;
}

.ai .avatar {
    background: rgba(0, 255, 65, 0.1);
    color: #00FF41;
}

.bubble {
    flex: 1;
    padding: 1rem;
    border-radius: 12px;
}

.user .bubble {
    background: rgba(255, 69, 0, 0.05);
    border: 1px solid rgba(255, 69, 0, 0.2);
}

.ai .bubble {
    background: rgba(0, 255, 65, 0.05);
    border: 1px solid rgba(0, 255, 65, 0.2);
}

.meta {
    font-size: 0.8rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.user .meta {
    color: #FF4500;
}

.ai .meta {
    color: #00FF41;
}

.text {
    line-height: 1.6;
}

.text p {
    margin-bottom: 0.75rem;
}

.insight {
    background: rgba(0, 0, 0, 0.1);
    border-left: 3px solid var(--accent);
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 0 8px 8px 0;
    font-style: italic;
}

.adaptation-list {
    margin: 1.5rem 0;
}

.adapt-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 6px;
}

.condition {
    font-weight: 500;
}

.action {
    color: var(--accent);
    font-weight: bold;
}

.ethical-note {
    background: rgba(0, 255, 65, 0.1);
    border: 1px solid rgba(0, 255, 65, 0.3);
    border-radius: 8px;
    padding: 1rem;
    margin: 1.5rem 0;
}

.process-flow {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    gap: 0.5rem;
}

.step {
    background: var(--panel-bg);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

.arrow {
    color: var(--accent);
}

.tactic {
    margin: 1.5rem 0;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

.tactic h4 {
    color: var(--accent);
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
}

.example {
    font-style: italic;
    opacity: 0.8;
    margin-top: 0.5rem;
    padding-left: 1rem;
    border-left: 2px solid var(--border-color);
}

.conclusion {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 2px solid var(--border-color);
}

.final-question {
    font-weight: bold;
    color: var(--accent);
    margin-top: 1rem;
}
/* ============================================
   MISSING STYLES - Add to your existing reader.css
   ============================================ */

/* 1. SECTION (401 files!) - Most important */
.section {
    background: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
}

/* 2. CHAT-LOG (28 files) - Alternative chat system */
.chat-log {
    background: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.chat-entry {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border-radius: 8px;
    border-left: 3px solid transparent;
}

.chat-entry.user {
    background: rgba(255, 69, 0, 0.05);
    border-left-color: rgba(255, 69, 0, 0.5);
}

.chat-entry.ai {
    background: rgba(0, 255, 65, 0.05);
    border-left-color: rgba(0, 255, 65, 0.5);
}

/* 3. LABEL (30 files) - Simple labels */
.label {
    font-weight: bold;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.chat-entry.user .label {
    color: #FF4500;
}

.chat-entry.ai .label {
    color: #00FF41;
}

/* 4. AI-QUOTE (47 files) - Quote variant */
.ai-quote, .quote {
    border-left: 4px solid var(--accent);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    background: rgba(var(--accent-rgb), 0.05);
    color: var(--text-color);
    border-radius: 0 8px 8px 0;
    padding: 1.5rem;
}

/* 5. CHECK-LIST (18 files) */
.check-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.check-list li {
    padding: 0.75rem 0 0.75rem 2rem;
    position: relative;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.check-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
}

/* 6. PHASE-TITLE (19 files) */
.phase-title {
    color: var(--accent);
    font-size: 1.8rem;
    font-weight: bold;
    margin: 3rem 0 1.5rem 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-bottom: 3px solid var(--accent);
    padding-bottom: 0.5rem;
}

/* 7. SUBHEADER (14 files) */
.subheader {
    color: var(--subtext-color);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 1.5rem 0 1rem 0;
    opacity: 0.9;
}

/* 8. DIVIDER (14 files) */
.divider {
    height: 1px;
    background: var(--border-color);
    margin: 2rem 0;
    opacity: 0.5;
}

/* 9. LLM-DIALOGUE (11 files) */
.llm-dialogue {
    background: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
}

/* 10. PULL-QUOTE (11 files) */
.pull-quote {
    font-size: 1.2rem;
    text-align: center;
    border-top: 3px solid var(--accent);
    border-bottom: 3px solid var(--accent);
    padding: 2rem;
    margin: 3rem 0;
    font-style: italic;
    background: transparent;
}

/* Day mode adjustments */
html.day-mode .chat-entry.user {
    background: rgba(255, 69, 0, 0.08);
    border-left-color: rgba(255, 69, 0, 0.7);
}

html.day-mode .chat-entry.ai {
    background: rgba(0, 255, 65, 0.08);
    border-left-color: rgba(0, 255, 65, 0.7);
}

html.day-mode .ai-quote,
html.day-mode .quote {
    background: rgba(var(--accent-rgb), 0.08);
}

html.day-mode .check-list li {
    border-bottom-color: rgba(0, 0, 0, 0.1);
}
/* ============================================
   SAFE SEMANTIC STYLES - SCOPED TO CONTENT ONLY
   ============================================ */

/* TACTIC SYSTEM - scoped to .prose */
.prose .tactic-item {
    background: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1.5rem;
    margin: 1rem 0;
}

html.day-mode .prose .tactic-item {
    border: 1px solid rgba(0, 0, 0, 0.15);
}

.prose .tactic-title {
    color: var(--accent);
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.prose .tactic-desc {
    color: var(--text-color);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.prose .tactic-example {
    background: color-mix(in srgb, var(--accent) 10%, transparent);
    border-left: 3px solid var(--accent);
    padding: 1rem;
    margin: 1rem 0;
    font-style: italic;
    font-size: 0.95rem;
}

html.day-mode .prose .tactic-example {
    background: color-mix(in srgb, var(--accent) 15%, transparent);
}

/* WARNING SYSTEM */
.prose .warning-box {
    background: rgba(255, 69, 0, 0.1);
    border: 2px solid rgba(255, 69, 0, 0.3);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
}

html.day-mode .prose .warning-box {
    background: rgba(255, 69, 0, 0.15);
    border: 2px solid rgba(255, 69, 0, 0.4);
}

.prose .warning-title {
    color: #FF4500;
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.prose .warning-title:before {
    content: "⚠️";
}

/* SYMPTOM SYSTEM */
.prose .symptom-card {
    background: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1rem 0;
    transition: transform 0.2s, border-color 0.2s;
}

html.day-mode .prose .symptom-card {
    border: 1px solid rgba(0, 0, 0, 0.15);
}

.prose .symptom-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.prose .symptom-title {
    color: var(--accent);
    font-weight: bold;
    font-size: 1rem;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* REVELATION SYSTEM */
.prose .revelation-item {
    background: color-mix(in srgb, var(--accent) 10%, transparent);
    border: 2px dashed var(--accent);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    position: relative;
}

html.day-mode .prose .revelation-item {
    background: color-mix(in srgb, var(--accent) 15%, transparent);
}

.prose .revelation-item:before {
    content: "💡";
    position: absolute;
    left: -10px;
    top: -10px;
    background: var(--bg-color);
    padding: 5px;
    font-size: 1.2rem;
}

html.day-mode .prose .revelation-item:before {
    background: var(--bg-color);
}

/* INSIGHT BOX */
.prose .insight-box {
    background: color-mix(in srgb, var(--accent) 10%, transparent);
    border-left: 4px solid var(--accent);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0 8px 8px 0;
}

html.day-mode .prose .insight-box {
    background: color-mix(in srgb, var(--accent) 15%, transparent);
}

.prose .insight-title {
    color: var(--accent);
    font-weight: bold;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

/* PART TITLE - outside .prose since it's a major heading */
.part-title {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--accent);
    text-align: center;
    margin: 3rem 0;
    text-transform: uppercase;
    letter-spacing: 3px;
    border-bottom: 3px solid var(--accent);
    padding-bottom: 1rem;
}

/* FINAL WARNING */
.prose .final-warning {
    background: rgba(255, 0, 0, 0.1);
    border: 3px solid rgba(255, 0, 0, 0.3);
    border-radius: 12px;
    padding: 2rem;
    margin: 3rem 0;
    text-align: center;
    font-weight: bold;
    animation: pulse 2s infinite;
}

html.day-mode .prose .final-warning {
    background: rgba(255, 0, 0, 0.15);
    border: 3px solid rgba(255, 0, 0, 0.4);
}

/* EVIDENCE TRIGGER - keep existing, it's already in .prose */
.prose .evidence-trigger.active {
    background: var(--accent);
    color: white !important;
    padding: 2px 6px;
    border-radius: 4px;
}

html.day-mode .prose .evidence-trigger.active {
    color: black !important;
}

/* FAILURE MODE */
.prose .failure-mode {
    background: var(--panel-bg);
    border: 2px solid rgba(255, 0, 0, 0.3);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    position: relative;
}

html.day-mode .prose .failure-mode {
    border: 2px solid rgba(255, 0, 0, 0.4);
}

.prose .failure-mode:before {
    content: "❌";
    position: absolute;
    left: -15px;
    top: -15px;
    background: var(--bg-color);
    padding: 5px;
    font-size: 1.2rem;
}

/* TACTIC LIST */
.prose .tactic-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.prose .tactic-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.prose .tactic-list li:last-child {
    border-bottom: none;
}

/* SECTION HEADER/CONTENT */
.prose .section-header {
    color: var(--accent);
    font-weight: bold;
    font-size: 1.3rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent);
}

.prose .section-content {
    background: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1rem 0;
}

html.day-mode .prose .section-content {
    border: 1px solid rgba(0, 0, 0, 0.15);
}

/* HIGHLIGHT TERM / TERM */
.prose .highlight-term {
    color: var(--accent);
    font-weight: bold;
    background: color-mix(in srgb, var(--accent) 10%, transparent);
    padding: 2px 6px;
    border-radius: 4px;
}

.prose .term {
    font-weight: bold;
    color: var(--accent);
    border-bottom: 1px dotted var(--accent);
}

/* SYSTEM RESPONSE */
.prose .system-response {
    font-family: 'JetBrains Mono', monospace;
    background: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    font-size: 0.9rem;
}

html.day-mode .prose .system-response {
    border: 1px solid rgba(0, 0, 0, 0.15);
}

/* WEEK SECTIONS */
.prose .week-section {
    margin: 2.5rem 0;
    padding: 1.5rem;
    background: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.prose .week-title {
    color: var(--accent);
    font-weight: bold;
    font-size: 1.4rem;
    margin-bottom: 1rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* BANNED PHRASE */
.prose .banned-phrase {
    color: #FF4500;
    text-decoration: line-through;
    font-weight: bold;
    background: rgba(255, 69, 0, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

html.day-mode .prose .banned-phrase {
    background: rgba(255, 69, 0, 0.15);
}

/* LOG TITLE */
.prose .log-title {
    font-family: 'JetBrains Mono', monospace;
    color: var(--accent);
    font-weight: bold;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

/* SAFE TEXT UTILITIES - scoped to .prose */
.prose .text-sm { font-size: 0.875rem; }
.prose .text-xs { font-size: 0.75rem; }
.prose .italic { font-style: italic; }
.prose .font-bold { font-weight: 700; }
.prose .font-mono { font-family: 'JetBrains Mono', monospace; }
.prose .uppercase { text-transform: uppercase; }
.prose .tracking-widest { letter-spacing: 0.1em; }

/* SAFE BORDER UTILITIES - with unique names */
.prose .border-l-accent { border-left: 2px solid var(--accent); }
.prose .border-l-thick { border-left-width: 4px; }
.prose .border-panel { border: 1px solid var(--border-color); }

/* SAFE SPACING - scoped */
.prose .pad-left { padding-left: 1rem; }
.prose .pad-left-lg { padding-left: 1.5rem; }
.prose .pad-md { padding: 1rem; }
.prose .pad-lg { padding: 1.5rem; }
.prose .margin-y { margin-top: 1.5rem; margin-bottom: 1.5rem; }
.prose .margin-b { margin-bottom: 1rem; }
.prose .margin-b-lg { margin-bottom: 1.5rem; }
.prose .margin-b-xl { margin-bottom: 2rem; }
.prose .margin-t { margin-top: 1rem; }

/* SAFE OPACITY */
.prose .opaque { opacity: 0.8; }
.prose .semi-opaque { opacity: 0.5; }

/* DAY MODE OVERRIDES */
html.day-mode .prose .highlight-term {
    background: color-mix(in srgb, var(--accent) 15%, transparent);
}
/* ============================================
   TAILWIND PROTECTION - Add to VERY END of file
   ============================================ */

/* ============================================
   TARGET ONLY CONTENT AREA (Safest)
   ============================================ */

/* Only apply within .prose (your content area) */
.prose .section,
.prose .chat-entry,
.prose .ai-quote,
.prose .tactic,
.prose .warning-box,
.prose .insight-box {
    background: var(--panel-bg) !important;
    border-color: var(--border-color) !important;
    padding: 1.5rem !important;
    margin: 1.5rem 0 !important;
}

.prose .section {
    border: 1px solid var(--border-color) !important;
    border-radius: 8px !important;
    margin: 2rem 0 !important;
}

.prose .chat-entry.user {
    background: rgba(255, 69, 0, 0.05) !important;
    border-left: 3px solid rgba(255, 69, 0, 0.5) !important;
}

.prose .chat-entry.ai {
    background: rgba(0, 255, 65, 0.05) !important;
    border-left: 3px solid rgba(0, 255, 65, 0.5) !important;
}

.prose .ai-quote,
.prose .quote {
    border-left: 4px solid var(--accent) !important;
    background: rgba(var(--accent-rgb, 245, 158, 11), 0.05) !important;
    font-style: italic !important;
}