/* --- Global Styles & User Aesthetic --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}



.htmx-indicator{ display:none; } .htmx-request .htmx-indicator{ display:block; }

body {
    /* background: linear-gradient(to bottom, #111, #000); */ /* Kept original black */
    background-color: #050505; /* Slightly off-black for less harshness */
    color: #00ffff; /* User's base cyan */
    font-family: 'Consolas', 'Menlo', 'Courier New', monospace; /* Monospace stack */
    font-size: 1.1em; /* Adjusted slightly from user's 1.2em for balance */
    line-height: 1.6;
    margin: 0;
    padding: 0;
    position: relative; /* For pseudo-element overlay */
}

body::before {
    /* Pseudo-element for glitch/scanline effect - From User CSS */
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 1px,
        rgba(0, 255, 255, 0.03) 2px, /* Slightly increased visibility */
        rgba(0, 255, 255, 0.03) 4px
    ); /* Subtle cyan scanlines */
    opacity: 0.5; /* Adjusted opacity */
    pointer-events: none; /* Make sure it doesn't interfere with clicks */
    z-index: -1; /* Ensure it's behind content */
}

a {
    color: #7fdbff; /* Light cyan/blue from generated */
    text-decoration: none;
}

a:hover {
    color: #ffffff;
    text-decoration: underline;
}

img {
    /* Combined styles */
    max-width: 100%;
    height: auto;
    display: block; /* From generated */
    box-shadow: 0 0 0.2em rgba(255, 255, 255, 0.2) inset; /* From user */
    border: 1px solid #444; /* From user */
    border-radius: 3px; /* From user */
}

small {
    font-size: 0.85em;
}

/* --- Header Styles - Primarily from User CSS --- */
#header {
    background-color: #111111;
    padding: 0; /* Let container handle padding */
    position: relative;
    margin-bottom: 0.5em;
    border-bottom: 1px solid #333; /* Added subtle border */
}

.header-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 0.5em 1em; /* Adjusted padding */
    max-width: 1200px; /* Center content */
    margin: 0 auto; /* Center content */
}

.logo-container {
    flex: 0 0 auto;
    /* max-width: 90px; */ /* Let image size dictate */
    margin-right: 1em;
}

.logo-image {
    max-height: 50px; /* Adjusted from user's 68px */
    width: auto; /* Maintain aspect ratio */
    margin-left: 1px;
    border: none; /* Override general img border */
    box-shadow: none; /* Override general img shadow */
}

.nav-container {
    flex: 1 1 auto;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1em; /* Increased gap */
    padding: 0.5em 0; /* Padding only top/bottom */
    /* Keep user's background */
    background-image: url("/images/vortex0b.gif"); /* Path from user css */
    background-repeat: repeat-x;
    background-position: top center;
    min-height: 40px; /* Ensure space for GIF */
}

.nav-container select, /* Style the select menu */
.nav-container .site-menu { /* Apply to our specific ID too */
    background-color: #222; /* Darker background */
    color: #ccc; /* Lighter text */
    border: 1px solid #444; /* Subtle border */
    padding: 6px 10px; /* Adjusted padding */
    border-radius: 3px; /* Consistent radius */
    font-family: inherit;
    min-width: 150px;
    cursor: pointer;
}
.nav-container .site-menu:focus {
    outline: 1px solid #7fdbff;
    box-shadow: 0 0 5px rgba(127, 219, 255, 0.5); /* Glow on focus */
}

/* Button styles if needed in nav - from User CSS */
.nav-container .button {
    background-color: #555;
    color: #fff;
    padding: 5px 8px;
    border-radius: 5px;
    cursor: pointer;
    border: 1px solid #777;
}
.nav-container .button:hover {
    background-color: #777;
}

.header-message {
    /* Keep user's background */
    background-image: url("/images/thin_horizontal_lines.gif"); /* Path from user css */
    background-position: 40px 0px;
    background-repeat: repeat-x;
    color: #99ffff; /* User's color */
    padding: 0.4em 1em; /* Adjusted padding */
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-align: center; /* Center text */
    border-top: 1px dashed #444; /* Add separator */
}

.header-message small {
    white-space: nowrap;
    overflow: hidden;
    display: inline-block; /* Ensure it centers correctly */
}

/* --- Main Layout - Using New Structure --- */
.main-container {
    display: flex;
    max-width: 1200px;
    margin: 20px auto; /* Center content */
    padding: 0 1em; /* Consistent padding */
    gap: 20px; /* Space between sidebar and content */
    min-height: calc(100vh - 200px); /* Adjust based on header/footer height */
}

/* --- Sidebar --- */
.sidebar {
    width: 30%; /* Adjusted width */
    flex-shrink: 0;
    /* background-color: #202020; */ /* User's color - Apply if needed, current body bg might suffice */
    padding: 1em;
    border: 1px solid #222; /* Subtle border */
    background-color: rgba(16, 16, 16, 0.7); /* Slightly transparent dark bg */
    backdrop-filter: blur(2px); /* Optional: blur background behind sidebar */

}

.cryptic-text {
    color: #7fdbff; /* Cyan */
    margin-bottom: 20px;
    padding: 10px;
    border: 1px dashed #333; /* Subtle border */
    line-height: 1.4;
    word-wrap: break-word;
    background-color: rgba(0, 0, 0, 0.3); /* Darker background for text */
}

/* --- Category Navigation Tree Styles --- */
.category-nav ul {
    list-style: none;
}

.category-nav .category-item {
    margin-bottom: 5px;
}

.category-nav .category-toggle,
.category-nav .category-link-main {
    display: block;
    padding: 8px 12px; /* Slightly more padding */
    background-color: rgba(34, 34, 34, 0.5); /* Semi-transparent dark */
    color: #cccccc; /* Light grey text */
    cursor: pointer;
    position: relative;
    transition: background-color 0.2s ease, color 0.2s ease, text-shadow 0.2s ease;
    border-left: 3px solid transparent; /* For active state */
    border-radius: 2px;
}
.category-nav .category-link-main {
    cursor: pointer; /* Ensure main links also look clickable */
}

.category-nav .category-toggle:hover,
.category-nav .category-link-main:hover {
    background-color: rgba(51, 51, 51, 0.7);
    color: #ffffff;
    text-shadow: 0 0 4px rgba(255, 255, 255, 0.5); /* Subtle white glow on hover */
}

/* Style for active category/link - Use Cyan Theme */
.category-nav .category-item.active > .category-toggle,
.category-nav .category-item.active > .category-link-main,
.category-nav .subcategory-list li a.active {
    background-color: rgba(0, 100, 100, 0.6); /* Darker cyan background */
    color: #e0ffff; /* Brighter cyan text */
    border-left-color: #00ffff; /* Bright cyan border */
    text-shadow: 0 0 5px #00ffff, 0 0 8px rgba(0, 255, 255, 0.5); /* Cyan glow */
}
.category-nav .subcategory-list li a.active:hover {
    background-color: rgba(0, 130, 130, 0.7); /* Slightly lighter on hover */
}

/* Toggle Icons (+/- or >/v) */
.category-item.has-children > .category-toggle::before {
    content: '[+] '; /* Collapsed state - more techy */
    display: inline-block;
    margin-right: 5px;
    font-weight: normal; /* Use normal weight */
    color: #777; /* Dimmer icon color */
    transition: color 0.2s ease;
}
.category-item.has-children.open > .category-toggle::before {
    content: '[-] '; /* Expanded state */
    color: #00ffff; /* Cyan when open */
}
.category-item.has-children > .category-toggle:hover::before {
    color: #ccc; /* Lighter icon on hover */
}
.category-item.has-children.open > .category-toggle:hover::before {
     color: #fff;
}


/* Subcategory List */
.subcategory-list {
    display: none; /* Hidden by default */
    padding-left: 25px; /* Indent subitems more */
    margin-top: 5px;
    border-left: 1px dotted #444; /* Dotted line */
    margin-left: 8px; /* Align better */
}

.category-item.open > .subcategory-list {
    display: block; /* Show when parent is open */
}

.subcategory-list li {
    margin-bottom: 3px;
}

.subcategory-list a {
    display: block;
    padding: 6px 10px;
    color: #aaaaaa; /* Slightly dimmer than main categories */
    transition: background-color 0.2s ease, color 0.2s ease, text-shadow 0.2s ease;
    border-left: 3px solid transparent; /* For active state */
    margin-left: -3px; /* Align border */
    border-radius: 2px;
    font-size: 0.95em; /* Slightly smaller */
}

.subcategory-list a:hover {
    background-color: rgba(51, 51, 51, 0.5);
    color: #eeeeee;
    text-decoration: none;
    text-shadow: 0 0 3px rgba(255, 255, 255, 0.4);
}

/* --- Content Area --- */
.content-area {
    flex: 1; /* Takes remaining space */
    padding: 1.5em; /* More padding */
    background-color: rgba(10, 10, 10, 0.8); /* User's color semi-transparent */
    border: 1px solid #222;
    backdrop-filter: blur(2px); /* Optional: blur background behind content */
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-bottom: 1px solid #444;
    padding-bottom: 10px;
    margin-bottom: 20px; /* More space */
    width: 100%; /* Ensure it spans width */
}

#content-title {
    color: #e0ffff; /* Bright Cyan */
    font-size: 1.6em; /* Make title larger */
    font-weight: normal;
    text-shadow: 0 0 6px rgba(0, 255, 255, 0.6); /* Cyan glow */
}

.cloud-top-link {
    font-size: 0.75em;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.cloud-top-link:hover {
    color: #999;
}

/* Styling for content loaded into #content-body */
#content-body {
    color: #cccccc; /* Default text color for content */
}

#content-body h3 {
    color: #99ffff; /* Header color within content */
    margin-bottom: 0.8em;
    border-bottom: 1px dashed #333;
    padding-bottom: 0.3em;
}

#content-body p {
    margin-bottom: 1em;
    line-height: 1.7; /* Slightly more line height for readability */
}

#content-body ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 1em;
}

#content-body li {
    margin-bottom: 8px;
    padding-left: 25px; /* Indent list items */
    position: relative;
}

#content-body li::before {
    content: '»'; /* Custom bullet */
    color: #00ffff; /* Bullet color - Bright Cyan */
    position: absolute;
    left: 5px; /* Adjust position */
    top: 1px;
    font-size: 1.1em;
    text-shadow: 0 0 3px #00ffff;
}

/* --- Footer Styles - From User CSS --- */
#fhft { /* Footer container ID from user css */
    display: flex;
    background: #0a0a0a; /* Slightly lighter than pure black */
    padding: 1em 1.5em; /* More padding */
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid #333;
    max-width: 1200px; /* Center content */
    margin: 20px auto 0 auto; /* Spacing and centering */
}

#logo_nf { /* Footer logo ID from user css */
    margin: 0;
    padding: 0;
}

#logo_nf a span {
    color: #aaa; /* Dimmer color for footer logo */
    text-decoration: none;
    padding-right: 0.2em;
    font-weight: bold;
    transition: color 0.2s ease;
}
#logo_nf a:hover span {
    color: #fff;
}

#fhft nav { /* Footer nav container */
    display: flex;
    align-items: center;
}

#fhft ul { /* Footer nav list */
    display: flex;
    list-style-type: none;
    padding: 0;
    margin: 0;
    gap: 1em;
}

#fhft li a { /* Footer nav links */
    color: #888; /* Dimmer footer links */
    text-decoration: none;
    padding: 5px 10px;
    border: 1px solid #333;
    border-radius: 3px;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

#fhft li a:hover {
    color: #fff;
    background-color: #222;
    border-color: #555;
}
#fhft li a .opt { /* Optional text styling */
     opacity: 0.7;
}


/* --- Text Rain Styles - From User CSS --- */
#text-rain-container {
    position: fixed; /* Fixed position to cover viewport */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden; /* Hide raindrops that go out of bounds */
    pointer-events: none; /* Make it non-interactive */
    z-index: -2; /* Place behind body::before scanlines */
}

.raindrop {
    position: absolute; /* Position each raindrop */
    top: -50px; /* Start above the screen */
    white-space: nowrap;
    font-family: monospace;
    color: #00ffff; /* Cyan color */
    text-shadow: 0 0 3px #00ffff, 0 0 5px rgba(0, 255, 255, 0.5); /* Neon glow */
    opacity: 0; /* Start invisible */
    font-size: 1.1em; /* Size based on body font */
    animation: rain linear infinite;
    animation-delay: var(--delay); /* Use CSS variable for delay */
    animation-duration: var(--duration); /* Use CSS variable for duration */
    will-change: transform, opacity; /* Performance hint */
}

@keyframes rain {
    0% {
        transform: translateY(0);
        opacity: 0;
    }
    10% {
         opacity: 0.6; /* Fade in */
    }
    90% {
         opacity: 0.4; /* Start fading out */
    }
    100% {
        transform: translateY(105vh); /* Fall past the bottom */
        opacity: 0;
    }
}

/* --- Miscellaneous Styles --- */
::marker {
    /* Default browser marker styling often sufficient */
    /* unicode-bidi: isolate; */
    /* font-variant-numeric: tabular-nums; */
    /* text-transform: none; */
    /* text-indent: 0px !important; */
    /* text-align: start !important; */
    /* text-align-last: start !important; */
    /* Keep if specific marker styling is needed */
}

.splash-page { /* From User CSS */
    text-shadow: 0 0 0.1em #ff00ff, 0 0 0.2em #ff00ff, 0 0 0.3em #ff00ff; /* Magenta glow */
}

/* --- Removed/Replaced Styles --- */
/* #main, main, .content (Replaced by .main-container, .content-area) */
/* #categories-container (Replaced by .category-nav structure) */
/* #footer, .footer-container, .footer-logo, .footer-nav (Replaced by #fhft structure) */

/* In your main style.css, update or add these rules: */

/* Styling for content loaded into #content-body */
#content-body {
    color: #cccccc; /* Default text color for content - already set, good */
    line-height: 1.7; /* Ensure good line height */
}

#content-body h1, /* If essays can have their own H1 */
#content-body h2,
#content-body h3,
#content-body h4 { /* Extend to other heading levels if used */
    color: #00ffff; /* Main cyan for headings */
    font-weight: normal; /* Monospace often looks better without bold */
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.5); /* Cyan glow */
    line-height: 1.3;
    margin-top: 1.8em;
    margin-bottom: 0.75em;
    padding-bottom: 0.3em;
    border-bottom: 1px dashed #333; /* Consistent border style */
}

#content-body h1 { /* Main title of the loaded essay */
    font-size: 1.6em; /* Match #content-title size from main page */
    margin-top: 0; /* No top margin if it's the first element */
}
#content-body h2 { font-size: 1.4em; }
#content-body h3 { font-size: 1.25em; } /* Your existing style for h3 is good */

#content-body p {
    /* color: #cccccc; is inherited */
    margin-bottom: 1.2em;
    text-align: left; /* Prefer left-align for readability over justify in monospace */
    /* line-height: 1.7; is inherited */
}

#content-body .thesis {
    font-style: normal;
    background-color: rgba(0, 50, 50, 0.3); /* Dark cyan, semi-transparent */
    border-left: 4px solid #00ffff; /* Bright cyan accent */
    padding: 15px 20px;
    margin: 25px 0;
    color: #cceeff; /* Lighter cyan/white text for thesis */
    border-radius: 0 3px 3px 0;
    line-height: 1.6;
}

#content-body .thesis strong {
    font-style: normal;
    color: #00ffff; /* Bright cyan for "Thesis:" label */
    font-weight: normal;
}

#content-body a {
    color: #7fdbff;
    text-decoration: none;
}

#content-body a:hover {
    color: #ffffff;
    text-decoration: underline;
    text-shadow: 0 0 3px #ffffff;
}

/* Your existing #content-body ul, li, li::before styles are good for a dark theme */
#content-body ul {
    list-style: none;
    padding-left: 0; /* Reset default */
    margin-bottom: 1em;
}

#content-body li {
    margin-bottom: 8px;
    padding-left: 25px;
    position: relative;
}

#content-body li::before {
    content: '»';
    color: #00ffff;
    position: absolute;
    left: 5px;
    top: 1px; /* Adjust if line-height changes affect alignment */
    font-size: 1.1em;
    text-shadow: 0 0 3px #00ffff;
}

#content-body blockquote { /* If blockquotes are used in essays */
    border-left: 3px solid #447777; /* Muted cyan border */
    padding-left: 15px;
    margin: 1em 0 1em 5px; /* Add some left margin to indent */
    color: #bbbbbb;
    font-style: normal;
}


/* ======================================================================
   FILE: /sys/operative_dossier.css
   FUNCTION: Global Terminal 2.0 Aesthetic for Operative Nodes
   ====================================================================== */

@import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');

:root { 
    --bg-color: #050505; 
    --text-color: #00ff41; 
    --accent-color: #22ff66; 
    --highlight-color: #ffffff; 
    --border-color: #005a17; 
    --scanline-alpha: rgba(0, 0, 0, 0.4); 
    --glow-color: rgba(0, 255, 65, 0.2); 
}

/* --- ANIMATION VECTORS --- */
@keyframes text-flicker { 
    0%, 100% { text-shadow: 0 0 2px var(--glow-color), 0 0 5px var(--glow-color); opacity: 1; } 
    50% { text-shadow: none; opacity: 0.95; } 
}
@keyframes glitch { 
    0%, 100% { clip-path: inset(0 0 0 0); } 
    10% { clip-path: inset(45% 0 50% 0); } 
    30% { clip-path: inset(90% 0 2% 0); } 
    55% { clip-path: inset(25% 0 70% 0); } 
}
@keyframes fadeInAndScroll { 
    0%   { top: 100%; opacity: 0; } 
    5%   { top: 80%; opacity: 1; } 
    90%  { top: 0%; opacity: 1; } 
    100% { top: -100%; opacity: 0; } 
}
@keyframes bioScan {
    0% { top: -20%; }
    100% { top: 120%; }
}

/* --- CORE PHYSICS & HOLOGRAPHIC DEPTH --- */
* { box-sizing: border-box; margin: 0; padding: 0; } 
html { scroll-behavior: smooth; }

body { 
    background-color: #000; 
    color: var(--text-color); 
    font-family: 'VT323', monospace; 
    font-size: 18px; 
    line-height: 1.6; 
    perspective: 1000px; /* 3D Space */
    display: flex; 
    flex-direction: column; 
    height: 100vh; 
    overflow: hidden;
}

body::after { 
    content: " "; 
    display: block; 
    position: fixed; 
    top: 0; left: 0; width: 100%; height: 100%; 
    background: repeating-linear-gradient(0deg, var(--scanline-alpha), var(--scanline-alpha) 1px, transparent 1px, transparent 2px); 
    pointer-events: none; 
    z-index: 1000; 
}

/* --- TERMINAL FRAMING --- */
.main-container { 
    display: flex; 
    flex: 1; 
    overflow: hidden; 
    transform: rotateX(2deg) scale(0.98);
    box-shadow: 0 0 50px rgba(0, 255, 65, 0.05);
    border-radius: 5px;
    background-color: var(--bg-color);
    animation: text-flicker 15s linear infinite;
}

.content-area { 
    flex: 1; 
    overflow-y: auto; 
    display: flex; 
    flex-direction: column; 
    max-width: 1400px; 
    margin: 0 auto; 
    width: 100%; 
    padding: 25px; 
}

/* --- DOSSIER GRID & PANES --- */
.dossier-grid { 
    display: grid; 
    grid-template-columns: 3fr 2fr; 
    grid-template-areas: "header header" "nexus vectors" "nexus payload" "transmission transmission" "log log"; 
    gap: 20px; 
    width: 100%; 
}

.data-pane { 
    border: 1px solid var(--border-color); 
    padding: 15px; 
    display: flex; 
    flex-direction: column; 
    background: rgba(0, 10, 0, 0.4);
}
.data-pane-title { 
    font-size: 1.2em; 
    color: var(--highlight-color); 
    margin-bottom: 15px; 
} 
.data-pane-title::before { content: "// "; }

/* --- BIOMETRIC AVATAR SCAN --- */
.banner-container { 
    position: relative;
    overflow: hidden;
    border: 1px solid var(--highlight-color); 
    padding: 5px; 
    box-shadow: 0 0 15px var(--glow-color);
}
.banner-container::after {
    content: '';
    position: absolute;
    top: -100%; left: 0; width: 100%; height: 20%;
    background: linear-gradient(to bottom, transparent, rgba(0, 255, 65, 0.8), transparent);
    animation: bioScan 3s linear infinite;
}
.banner-image { 
    width: 80px; height: 80px; 
    object-fit: cover; 
    filter: grayscale(1) contrast(200%) brightness(1.5); 
    animation: glitch 3s linear infinite alternate-reverse; 
}

/* --- HARDWARE METERS (PROGRESS BARS) --- */
.progress-bar { 
    display: inline-block; 
    width: 150px; 
    border: 1px solid var(--border-color); 
    background: rgba(0, 25, 5, 0.5); 
    padding: 2px; 
    box-shadow: inset 0 0 5px rgba(0,0,0,0.8);
} 
.progress-bar-inner { 
    height: 12px; 
    background: repeating-linear-gradient(to right, var(--accent-color), var(--accent-color) 6px, transparent 6px, transparent 8px); 
    width: 0%; 
    transition: width 2s cubic-bezier(0.1, 0.7, 0.1, 1); 
    box-shadow: 0 0 10px var(--glow-color); 
}

/* --- BOOT SEQUENCE --- */
#boot-sequence {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; 
    background: #050505; z-index: 9999; 
    display: flex; flex-direction: column; justify-content: center; align-items: center; 
    color: var(--text-color); font-family: monospace;
}
#hex-stream {
    font-size: 0.8em; opacity: 0.5; max-width: 80%; word-wrap: break-word; text-align: center; margin-bottom: 20px;
}
#boot-bar-container { width: 300px; height: 2px; background: #333; margin-top: 10px; }
#boot-bar { width: 0%; height: 100%; background: var(--accent-color); }

/* --- TYPOGRAPHY & LAYOUT UTILS --- */
#dossier-header { grid-area: header; display: flex; gap: 20px; align-items: center; border-bottom: 1px solid var(--border-color); padding-bottom: 15px; }
.header-info h3 { font-size: 2em; margin: 0; }
#nexus-score { grid-area: nexus; }
.score-display { font-size: 4em; text-align: center; color: var(--accent-color); text-shadow: 0 0 8px var(--accent-color); margin-bottom: 20px; }
.metric-row { margin-bottom: 10px; white-space: pre; font-size: 0.9em; }
#influence-vectors { grid-area: vectors; }
#influence-vectors ul { list-style: none; display: flex; flex-direction: column; justify-content: space-around; }
#influence-vectors li { counter-increment: vector-counter; }
#influence-vectors li::before { content: 'NODE_' counter(vector-counter, decimal-leading-zero) ' :: '; opacity: 0.7; }
#memetic-payload { grid-area: payload; overflow: hidden; }
#memetic-payload p { word-spacing: 15px; line-height: 1.8; }
#memetic-payload span.freq-high { color: var(--highlight-color); font-weight: bold; text-shadow: 0 0 3px var(--glow-color); }
#secure-transmission { grid-area: transmission; }
.transmission-body { border-left: 2px solid var(--accent-color); padding-left: 15px; font-style: italic; }
.transmission-sig { text-align: right; font-style: normal; }
#activity-log-pane { grid-area: log; }
#activity-log { height: 120px; overflow: hidden; position: relative; }
#activity-log .log-entry { opacity: 0; animation: fadeInAndScroll 30s linear infinite; position: absolute; }
::-webkit-scrollbar { width: 10px; } 
::-webkit-scrollbar-track { background: var(--bg-color); border-left: 1px solid var(--border-color); } 
::-webkit-scrollbar-thumb { background: var(--text-color); border: 1px solid var(--border-color); }


/* --- HARDWARE BEZELS (STICKY HEADER / FOOTER) --- */
#hardware-header {
    flex-shrink: 0;
    border-bottom: 2px solid #222;
    padding: 15px 20px; /* Increased to ensure breathing room */
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #020202; 
    z-index: 500;
    box-shadow: 0 5px 15px rgba(0,0,0,0.8);
    box-sizing: border-box; /* Enforces strict bounding physics */
    min-height: 65px; /* Prevents structural collapse */
    background-size: cover;        /* Forces image to stretch over the entire div */
    background-position: center;   /* Anchors the center of the image */
    background-repeat: no-repeat;  /* Prevents the image from tiling */
}

/* Force both the wrapper and the link to operate as flex containers */
.logo-container, .logo-link { 
    display: flex; 
    align-items: center; 
    gap: 15px; 
    text-decoration: none; 
}

.logo-image { 
    width: 35px; 
    height: 35px; 
    image-rendering: pixelated; 
    filter: grayscale(1) brightness(2); 
}

.logo-text { 
    font-size: 1.5em; 
    letter-spacing: 2px; 
    color: var(--highlight-color); 
    line-height: 1; /* Eliminates invisible baseline padding */
    margin-top: 4px; /* Optical alignment with the shell graphic */
}

.header-message { color: var(--accent-color); font-size: 0.9em; opacity: 0.8; }

#hardware-footer {
    flex-shrink: 0;
    border-top: 2px solid #222;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #020202;
    z-index: 500;
    box-shadow: 0 -5px 15px rgba(0,0,0,0.8);
    box-sizing: border-box;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.footer-logo a { color: var(--highlight-color); text-decoration: none; font-size: 1.2em; letter-spacing: 3px; }
.footer-logo a:hover { color: var(--text-color); text-shadow: 0 0 8px var(--glow-color); }

.footer-nav a {
    color: var(--text-color);
    text-decoration: none;
    margin-left: 20px;
    opacity: 0.8;
}
.footer-nav a:hover { opacity: 1; text-shadow: 0 0 5px var(--glow-color); }
 
 /* Sidebar styles*/
         .analytics-container {
            margin-top: 20px;
             padding: 10px;
              border: 1px solid #444; /* Add a border*/
               border-radius: 5px; /* Add border-radius */
        }
        .analytics-metric {
            margin-bottom: 15px;
         }
        .metric-name {
            font-weight: bold;
            margin-bottom: 5px;
            display: flex;
            align-items: center;
            justify-content: space-between;
              color: #00ffff; /* Cyan for metric names */
        }
        .info-icon {
            font-size: 0.8em;
            color: lightgray;
            cursor: help;
         }
        .metric-value {
            font-size: 1.2em;
              font-family: 'Space Mono', monospace; /* Monospace for metric values */
            color: #ffcc00; /* Yellow for metric values */
        }
        .metric-change {
            font-size: 0.9em;
           color: #aaa;
        }
        .metric-change.up {
            color: #00ff00; /* Green for positive changes */
        }
        .metric-change.down {
           color: #ff0000; /* Red for negative changes */
       }
        .tab-container {
            display: flex;
            border-bottom: 1px solid #555;
        }
        .tab-button {
            padding: 10px 15px;
             cursor: pointer;
             background-color: #222;
            border: none;
            color: #ddd;
            border-bottom: 2px solid transparent;
            transition: background-color 0.2s, border-bottom-color 0.2s;
            border-bottom-left-radius: 3px;
            border-bottom-right-radius: 3px;
             font-size: 0.9rem;
             flex: 1;
            text-align: center;
        }
          .tab-button.active {
            background-color: #444;
            border-bottom-color: #007bff;
        }
        .tab-content {
            padding-top: 10px;
            display: none;
         }
          .tab-content.active {
            display: block;
         }
         .tab-section {
            margin-bottom: 20px;
              border: 1px solid #444; /* Add a border */
               padding: 10px;
                border-radius: 5px; /* Add border-radius */
         }
         .tab-section h4 {
             margin-bottom: 10px;
             font-weight: bold;
              color: #00ffff; /* Cyan for section headings */
              border-bottom: 1px solid #555; /* horizontal rule */
              padding-bottom: 5px;
          }
        .tweet-table {
          width: 100%;
          border-collapse: collapse;
          margin-top: 10px;
         }
        .tweet-table th, .tweet-table td {
          border: 1px solid #555;
          padding: 8px;
           text-align: left;
        }
          .tweet-table th {
          background-color: #333;
        }
        .user-list {
         list-style: none;
         padding: 0;
       }
       .user-list li {
            margin-bottom: 5px;
            padding: 5px 5px;
        }
        .user-list li.long-time-follower {
            color: #ff00ff; /* Pink for long-time followers */
         }
         .user-list li.new-follower {
            color: #00ff00; /* Green for new followers */
        }
       .user-list li.stranger {
             color: #aaa; /* Gray for strangers */
         }
         .user-list li.first-time-commenter {
            text-decoration: underline;
         }
      .avatar-list {
           display: flex;
           overflow-x: auto;
            padding: 10px 0;
            align-items: center;
        }
        .avatar-list .avatar-item {
           margin-right: 10px;
            width: 50px;
            height: 50px;
             border-radius: 50%;
            overflow: hidden; /* Ensure the image stays within the circle */
            flex: 0 0 auto; /* Don't allow to shrink or grow*/
        }
         .avatar-list .avatar-item img {
            width: 100%;
             height: 100%;
            object-fit: cover;
         }
         



/* --- Essay Page Specific Styles --- */

/* Inherit global body styles from index.css if this is a separate file */
/* If embedded, these will override the original light theme body styles */
body {
    background-color: #050505; /* Match index background */
    color: #cccccc; /* Default text color - a light gray, readable on dark */
    font-family: 'Consolas', 'Menlo', 'Courier New', monospace; /* Match index font */
    font-size: 1.1em;
    line-height: 1.6;
    margin: 0;
    padding: 0; /* Reset padding if needed, main will handle its own */
    position: relative; /* For pseudo-element overlay from index.css if applicable */
}

/* If you have the scanline ::before on the body in index.css,
   and this is a separate CSS file, you might want to replicate it here or ensure
   your main stylesheet applies globally. If embedded, it should just work. */
body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 1px,
        rgba(0, 255, 255, 0.03) 2px,
        rgba(0, 255, 255, 0.03) 4px
    );
    opacity: 0.5;
    pointer-events: none;
    z-index: -1;
}


/* Main content wrapper for the essay */
main {
    max-width: 900px; /* Or your preferred reading width */
    margin: 40px auto;   /* Centering the content with some top/bottom margin */
    padding: 25px 35px;
    background-color: rgba(15, 15, 15, 0.85); /* Dark, slightly transparent, distinct from body */
    border: 1px solid #222; /* Subtle border, like content-area in index */
    backdrop-filter: blur(2px); /* Optional: blur background */
    border-radius: 3px; /* Consistent with index styling */
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.1); /* Subtle cyan glow around the content block */
}

article {
    /* No specific styling needed unless you want further separation */
}

/* Headings within the essay */
h1, h2, h3, h4, h5, h6 {
    color: #00ffff; /* Main cyan for headings */
    font-weight: normal; /* Monospace often looks better without bold */
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.5); /* Cyan glow */
    margin-bottom: 0.75em;
    line-height: 1.3;
}

h1 {
    font-size: 1.8em; /* Adjust as needed */
    text-align: left; /* Standard for essays, override previous center */
    border-bottom: 1px solid #333;
    padding-bottom: 0.5em;
    margin-bottom: 1em;
}

h2 {
    font-size: 1.5em;
    margin-top: 1.8em;
    padding-bottom: 0.3em;
    border-bottom: 1px dashed #2a2a2a; /* Subtler dash */
}

h3 {
    font-size: 1.25em;
    margin-top: 1.5em;
}

/* Paragraph text */
p {
    color: #cccccc; /* Light gray for readability */
    margin-bottom: 1.2em;
    text-align: left; /* Standard for essays, override previous justify */
    line-height: 1.7; /* Good for readability */
}

/* Thesis block styling */
.thesis {
    font-style: normal; /* Monospace looks better without italics typically */
    background-color: rgba(0, 50, 50, 0.3); /* Dark cyan, semi-transparent */
    border-left: 4px solid #00ffff; /* Bright cyan accent */
    padding: 15px 20px;
    margin: 25px 0;
    color: #cceeff; /* Lighter cyan/white text for thesis */
    border-radius: 0 3px 3px 0;
    line-height: 1.6;
}

.thesis strong {
    font-style: normal;
    color: #00ffff; /* Bright cyan for "Thesis:" label */
    font-weight: normal; /* Avoid double emphasis with bold on monospace */
}

/* Links within the essay content */
a {
    color: #7fdbff; /* Light cyan/blue from index */
    text-decoration: none;
}

a:hover {
    color: #ffffff;
    text-decoration: underline;
    text-shadow: 0 0 3px #ffffff;
}

/* Sections */
section {
    margin-bottom: 1.5em;
}

/* Remove bottom margin from the last paragraph in a section if followed by another heading immediately */
section > p:last-child:not(:only-child) { /* Ensure it's not the ONLY child */
    margin-bottom: 0;
}

section > h3 + p { /* Space after H3 before a paragraph */
    margin-top: 0.5em;
}

/* If you have lists inside essays */
ul, ol {
    color: #cccccc;
    margin-bottom: 1em;
    padding-left: 40px; /* Standard indentation for lists */
}

li {
    margin-bottom: 0.5em;
}

/* Optional: If you want to style blockquotes differently */
blockquote {
    border-left: 3px solid #555;
    padding-left: 15px;
    margin-left: 0;
    margin-right: 0;
    margin-bottom: 1em;
    color: #bbbbbb;
    font-style: normal; /* Remove italics if any */
}

/* If you load error messages or loading indicators dynamically,
   you might want to style them consistently too */
.loading-indicator,
.error-message {
    color: #00ffff;
    text-align: center;
    padding: 20px;
}
.error-detail {
    color: #aaaaaa;
    font-size: 0.9em;
    text-align: center;
}

/* ======================================================================
   [SYS_PATCH] MASTER TERMINAL LAYOUT RECOVERY
   ====================================================================== */

/* Ensure the browser window acts as a rigid, non-scrollable physical monitor */
body {
    display: flex;
    flex-direction: column;
    height: 100vh;
    margin: 0;
    overflow: hidden;
}

/* Re-establish the horizontal split between the sidebar and content */
.main-container {
    display: flex;
    flex-direction: row; /* Forces sidebar left, content right */
    flex: 1;
    overflow: hidden;
    width: 100%;
}

/* Lock the navigation vector to the left with a fixed width */
.sidebar {
    width: 320px;
    flex-shrink: 0;
    overflow-y: auto;
    border-right: 1px solid var(--border-color);
    background: rgba(0, 5, 0, 0.6); /* Deep terminal shadow */
    padding: 20px;
    box-shadow: inset -5px 0 15px rgba(0,0,0,0.5);
    z-index: 100;
}

/* Allow the data payload to expand and fill the remaining space */
.content-area {
    flex: 1;
    overflow-y: auto;
    padding: 40px;
    position: relative;
}


/* ======================================================================
   [SYS_PATCH] VIEWPORT COLLAPSE & TACTICAL OVERLAY (MOBILE)
   ====================================================================== */

/* Ensure the main container is positioned to anchor the absolute sidebar */
.main-container { position: relative; }

@media (max-width: 768px) {
    /* Trigger the mobile button, hide the desktop status */
    #mobile-nav-toggle { display: block !important; }
    .desktop-only { display: none !important; }

    /* Compress hardware bezels */
    #hardware-header { padding: 10px 15px; min-height: 55px; }
    .logo-image { width: 25px; height: 25px; }
    .logo-text { font-size: 1.2em; }

    /* Decouple the sidebar and convert into a sliding modal */
    .sidebar {
        position: absolute;
        top: 0;
        left: -100%; /* Hidden off-screen */
        width: 100%;
        height: 100%;
        background: rgba(0, 5, 0, 0.98); /* Heavy opaque background */
        backdrop-filter: blur(5px);
        transition: left 0.3s cubic-bezier(0.1, 0.7, 0.1, 1);
        z-index: 1000;
        border-right: none;
    }

    /* The Execution State (Triggered by JS) */
    .sidebar.mobile-open {
        left: 0;
    }

    /* Expand the content area to consume the full screen */
    .content-area {
        padding: 20px;
        font-size: 0.95em;
    }

    /* Stack the footer links vertically */
    .footer-container {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    .footer-nav { margin-left: 0; display: flex; gap: 15px; }
    .footer-nav a { margin-left: 0; }
}

/* NEURALNET // STATIC CSS MASTER ARCHITECTURE */
/* AESTHETIC: NULL VECTOR // P1_HYPERION BASELINE */

:root {
    --bg: #000000;
    --fg: #ffffff;
    --muted: #4e606c;
    --trace: #121c22;
    --accent: #00e5ff;
    --accent-dim: rgba(0, 229, 255, 0.1);
    --border-width: 1px;
    --font: "Courier New", Courier, monospace;
}



.tool-viewport {
    background-color: var(--bg);
    color: var(--fg);
    font-family: var(--font);
    line-height: 1.6;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
    user-select: none;
}

.hud-frame {
    border: 2px solid var(--fg);
    background-color: var(--bg);
    width: 480px; /* Standardized max-width for uniformity */
    height: 680px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
    transition: all 0.3s ease;
}

/* --- HEADER PIPELINE --- */
.hud-header {
    border-bottom: 1px solid var(--fg);
    padding-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.hud-header h1 {
    font-size: 1.1rem;
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.status-tag {
    font-size: 0.7rem;
    letter-spacing: 1px;
    color: var(--muted);
    text-transform: uppercase;
    transition: color 0.3s ease;
}

/* --- STATEFUL TOGGLE (CANVAS API) --- */
.engine-control {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin: 1rem 0;
}

.toggle-canvas {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 2px solid var(--muted);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    position: relative;
    background-color: var(--bg);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.toggle-canvas::before {
    content: "";
    position: absolute;
    width: calc(100% + 8px);
    height: calc(100% + 8px);
    border-radius: 50%;
    border: 1px dashed var(--trace);
    transition: all 0.4s ease;
}

.toggle-canvas svg {
    width: 30px;
    height: 30px;
    stroke: var(--muted);
    stroke-width: 1.5;
    fill: none;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.state-label {
    font-size: 0.8rem;
    letter-spacing: 2px;
    font-weight: bold;
    color: var(--fg);
    width: 140px;
    text-align: center;
}

/* --- ACTIVE HUD STATES --- */
.active-1 { border-color: var(--fg); box-shadow: 0 0 20px 2px rgba(255,255,255,0.1); }
.active-1::before { border-color: var(--fg); animation: rotate-dashed 10s linear infinite; }
.active-1 svg { stroke: var(--fg); transform: scale(1.1); }
.active-1 textarea:focus, .active-1 input:focus { border-color: var(--fg); }

.active-2 { border-color: var(--accent); box-shadow: 0 0 20px 2px var(--accent-dim); }
.active-2::before { border-color: var(--accent); animation: rotate-dashed 5s linear infinite reverse; }
.active-2 svg { stroke: var(--accent); transform: scale(1.1); }
.active-2 textarea:focus, .active-2 input:focus { border-color: var(--accent); }
.active-2 button.action-btn { border-color: var(--accent); color: var(--accent); }
.active-2 button.action-btn:hover { background: var(--accent); color: var(--bg); }

/* --- I/O INTERFACES --- */
.interface-layer {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
    position: relative;
}

.interface-panel { display: none; flex-direction: column; gap: 0.8rem; height: 100%; }
.interface-panel.visible { display: flex; animation: fade-in 0.3s ease; }

input, textarea {
    background-color: #080808;
    color: var(--fg);
    border: 1px solid var(--muted);
    font-family: var(--font);
    font-size: 0.8rem;
    padding: 0.5rem;
    width: 100%;
    resize: none;
    outline: none;
    transition: border-color 0.2s ease;
}

input:focus, textarea:focus { border-color: var(--fg); }

.action-row { display: flex; gap: 0.5rem; }

button.action-btn {
    background: transparent;
    color: var(--fg);
    border: 1px solid var(--fg);
    padding: 0.5rem;
    flex-grow: 1;
    cursor: pointer;
    font-family: var(--font);
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 1px;
    transition: all 0.2s;
}

button.action-btn:hover { background: var(--fg); color: var(--bg); }

/* --- TELEMETRY ENGINE --- */
.telemetry-box {
    background-color: var(--bg);
    border: 1px solid var(--trace);
    padding: 0.75rem;
    font-size: 0.7rem;
    height: 90px;
    overflow-y: hidden;
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: var(--muted);
}

.log-row { display: flex; justify-content: space-between; }
.log-row.sys { color: var(--fg); }
.log-row.err { color: #ff3333; }
.log-row.accent { color: var(--accent); }

/* --- FOOTER --- */
.hud-footer {
    border-top: 1px solid var(--trace);
    padding-top: 0.5rem;
    font-size: 0.65rem;
    color: var(--muted);
    display: flex;
    justify-content: space-between;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* --- ANIMATION KEYFRAMES --- */
@keyframes rotate-dashed { to { transform: rotate(360deg); } }
@keyframes fade-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }















