:root {
    /* --- DEFAULT LIGHT THEME --- */
    --bg-color: #f0f0f0;
    --card-bg: #ffffff;
    --ink-color: #000000;
    --terminal-green: #00ff00;
    
    /* Global Settings */
    --border-width: 4px; /* The Thick "Blocky" Border */
    --font-mono: 'Courier New', Courier, monospace;
    --max-width: 800px;
    
    /* Ghost Font Support */
    --gh-font-heading: 'Courier New', Courier, monospace;
    --gh-font-body: 'Courier New', Courier, monospace;
}

/* --- DARK MODE OVERRIDES --- */
[data-theme="dark"] {
    --bg-color: #0d0d0d;       
    --card-bg: #000000;        
    --ink-color: #e0e0e0;      
    --terminal-green: #00ff00; 
}

/* Reset & Basics */
* { box-sizing: border-box; }
body {
    margin: 0;
    padding: 20px;
    background: var(--bg-color);
    font-family: var(--font-mono);
    color: var(--ink-color);
    transition: background 0.3s, color 0.3s;
}

a { text-decoration: none; color: inherit; }

/* Main Container */
.viewport {
    max-width: var(--max-width);
    margin: 0 auto;
}

/* --- Header Section --- */
header.site-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* LOGO: Default (Solid Black Box, Green Dash) */
.header-green-box {
    width: 32px;
    height: 32px;
    background-color: #000000; 
    /* REMOVED: border: 1px solid var(--terminal-green); */
    position: relative;
}
.header-green-box::after {
    content: '';
    position: absolute;
    bottom: 4px; left: 4px; right: 4px; height: 6px;
    background-color: var(--terminal-green);
}

/* LOGO: Dark Mode (Green Box, Black Dash) */
[data-theme="dark"] .header-green-box {
    background-color: var(--terminal-green);
}
[data-theme="dark"] .header-green-box::after {
    background-color: #000000;
}

.site-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--ink-color);
}
.site-title:hover { text-decoration: underline; }

/* --- HEADER BUTTONS --- */
.header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.header-btn {
    background: none;
    border: none;
    font-family: var(--font-mono);
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    padding: 0;
    color: var(--ink-color);
    text-transform: uppercase;
    display: inline-block;
}
.header-btn:hover {
    color: var(--terminal-green);
    text-decoration: underline;
}

.rss-icon svg {
    width: 24px; height: 24px;
    fill: var(--ink-color);
    display: block;
}
.rss-icon:hover svg { fill: var(--terminal-green); }

/* --- MEMBERSHIP FORM --- */
.subscribe-box {
    border: var(--border-width) solid var(--ink-color);
    background: var(--card-bg);
    margin-bottom: 40px;
    padding: 20px;
}

.subscribe-title {
    font-weight: bold;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.subscribe-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.subscribe-input {
    flex-grow: 1;
    background: #000000; 
    color: var(--terminal-green);
    border: 1px solid var(--ink-color);
    padding: 12px;
    font-family: var(--font-mono);
    font-size: 1rem;
    outline: none;
}

.subscribe-btn {
    background: var(--terminal-green);
    color: #000000 !important; 
    border: none;
    padding: 12px 24px;
    font-family: var(--font-mono);
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
}
.subscribe-btn:hover { opacity: 0.8; }

.message-success { display: none; color: var(--ink-color); margin-top: 10px; }
.message-error { display: none; color: red; margin-top: 10px; }
form[data-members-form="success"] .message-success { display: block; }
form[data-members-form="error"] .message-error { display: block; }

/* --- POST CARD DESIGN --- */
.post-card {
    border: var(--border-width) solid var(--ink-color);
    margin-bottom: 24px;
    background: var(--card-bg);
    display: block; 
}
.post-card:hover {
    transform: translateY(-2px);
    box-shadow: 4px 4px 0px rgba(0,0,0,0.2);
}

.card-terminal-bar {
    display: flex;
    align-items: center; 
    /* Increased spacing to give the header "room" like your image */
    padding: 12px 12px 0 12px; 
    height: auto;
    margin-bottom: 10px;
}

.card-status-box {
    /* Fixed 10px height to match the lines exactly */
    width: 12px; 
    height: 10px; 
    background-color: var(--terminal-green);
    /* No border on the green box itself, purely solid color like your image */
    flex-shrink: 0;
    margin-right: 10px; 
}

/* FIXED: EXACT 3-LINE PATTERN */
.card-scanlines {
    flex-grow: 1;
    /* Height 10px = Line(2) + Gap(2) + Line(2) + Gap(2) + Line(2) */
    height: 10px; 
    
    /* This gradient mathematically creates exactly 3 lines */
    background-image: repeating-linear-gradient(
        to bottom,
        var(--ink-color) 0px,
        var(--ink-color) 2px,      /* Line 1, 2, 3 */
        transparent 2px,
        transparent 4px            /* Gaps */
    );
}

.post-card-content { padding: 0 20px 20px 20px; }
.post-title { font-size: 1.2rem; font-weight: normal; margin: 0; }

/* --- REQUIRED GHOST CLASSES --- */
.kg-width-wide { grid-column: wide-start / wide-end; width: 100%; }
.kg-width-full { grid-column: full-start / full-end; width: 100vw; }
.kg-image { max-width: 100%; height: auto; }

/* --- PAGINATION --- */
.pagination {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
    font-weight: bold;
    text-transform: uppercase;
    color: var(--ink-color);
}

.pagination a {
    color: var(--ink-color);
    text-decoration: none;
}

.pagination a:hover {
    color: var(--terminal-green);
    background-color: var(--ink-color);
}

/* --- POST META DATA (Date & Time) --- */
.post-meta {
    font-size: 0.85rem;       /* Slightly smaller than the title */
    margin-top: 10px;         /* Space between title and date */
    font-weight: bold;
    opacity: 0.8;             /* Slightly dimmed to distinguish from title */
    text-transform: uppercase;
}

/* --- TAGS STYLING --- */
.post-meta a {
    color: inherit;           /* Inherit the grey color of the date */
    text-decoration: none;
    text-transform: uppercase;
}

.post-meta a:hover {
    color: var(--terminal-green); /* Glow green on hover */
    text-decoration: none;
}