/* ============================================================
   NO BS SURVIVAL — style.css
   Theme: Field Manual
   Fonts: Bebas Neue (headings), IBM Plex Mono (body/meta)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=IBM+Plex+Mono:ital,wght@0,400;0,600;1,400&display=swap');

/* ---- TOKENS ---- */
:root {
    --paper:        #e2d8c0;
    --paper-dark:   #d4c9aa;
    --paper-darker: #c4b898;
    --ink:          #1a1410;
    --ink-mid:      #5a4a30;
    --ink-faint:    #8a7a5a;
    --ink-ghost:    #c4b898;
    --red:          #cc1111;
    --red-dark:     #7a0a0a;
    --red-stamp:    #b30e0e;
    --black:        #0a0a0a;
    --dark:         #111;
    --border:       #8a7a5a;
    --border-dash:  #a09070;
    --white:        #f5f0e8;

    --font-mono:    'IBM Plex Mono', 'Courier New', monospace;
    --font-title:   'Bebas Neue', 'Arial Narrow', sans-serif;

    --max-width:    1100px;
    --sidebar-w:    280px;
    --gutter:       32px;

    /* Lined paper texture */
    --paper-lines: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 22px,
        rgba(100, 80, 40, 0.06) 22px,
        rgba(100, 80, 40, 0.06) 23px
    );
    /* Crosshatch scratch texture */
    --scratch: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 8px,
        rgba(100, 80, 40, 0.04) 8px,
        rgba(100, 80, 40, 0.04) 9px
    );
}

/* ============================================================
   RESET & BASE
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.7;
    min-height: 100vh;
    background-image: var(--paper-lines);
}

a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

p { margin-bottom: 1.2em; }
p:last-child { margin-bottom: 0; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-title);
    letter-spacing: 0.04em;
    line-height: 1.05;
    color: var(--ink);
}

/* ============================================================
   SITE HEADER
   ============================================================ */

.site-header {
    background: var(--black);
    border-bottom: 4px solid var(--red);
    line-height: 0;
}

.site-header img {
    width: 100%;
    display: block;
    max-height: 200px;
    object-fit: contain;
    object-position: center center;
    background: var(--black);
}

/* ============================================================
   NAVIGATION
   ============================================================ */

.site-nav-wrap {
    background: var(--paper-dark);
    border-bottom: 2px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.site-nav {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--gutter);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.site-nav a {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-faint);
    padding: 10px 12px;
    border-bottom: 3px solid transparent;
    transition: color 0.15s, border-color 0.15s;
    white-space: nowrap;
}

.site-nav a:hover,
.site-nav a.active {
    color: var(--red);
    border-bottom-color: var(--red);
    text-decoration: none;
}

/* Mobile hamburger */
.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border);
    color: var(--ink-faint);
    font-family: var(--font-mono);
    font-size: 0.625rem;
    letter-spacing: 0.1em;
    padding: 6px 10px;
    cursor: pointer;
    margin: 8px 0 8px auto;
}

/* ============================================================
   TICKER BAR
   ============================================================ */

.ticker-bar {
    background: var(--red);
    color: var(--white);
    font-family: var(--font-mono);
    font-size: 0.5625rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 5px var(--gutter);
    display: flex;
    align-items: center;
    gap: 12px;
    overflow: hidden;
}

.ticker-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--white);
    flex-shrink: 0;
    animation: ticker-pulse 2s ease-in-out infinite;
}

@keyframes ticker-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.3; }
}

/* ============================================================
   PAGE LAYOUT
   ============================================================ */

.page-wrap {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--gutter);
    display: grid;
    grid-template-columns: 1fr var(--sidebar-w);
    gap: var(--gutter);
    align-items: start;
}

.page-wrap.full-width {
    grid-template-columns: 1fr;
}

.main-content { min-width: 0; }

/* ============================================================
   SECTION RULES & LABELS
   ============================================================ */

.section-rule {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 24px;
    font-family: var(--font-mono);
    font-size: 0.5625rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    color: var(--ink-faint);
    text-transform: uppercase;
}

.section-rule::before,
.section-rule::after {
    content: '';
    flex: 1;
    height: 1px;
    background: repeating-linear-gradient(
        90deg,
        var(--border-dash) 0,
        var(--border-dash) 4px,
        transparent 4px,
        transparent 8px
    );
}

.section-label {
    font-family: var(--font-mono);
    font-size: 0.5625rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    color: var(--red);
    text-transform: uppercase;
    border-bottom: 1px solid var(--border);
    padding-bottom: 6px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.section-label a {
    color: var(--ink-faint);
    font-size: 0.5rem;
    letter-spacing: 0.12em;
}

.section-label a:hover { color: var(--red); }

/* ============================================================
   FEATURED POST BLOCK
   ============================================================ */

.featured-post {
    display: grid;
    grid-template-columns: 1fr 240px;
    gap: 0;
    margin-bottom: 32px;
    border: 2px solid var(--border);
    background: var(--paper-dark);
}

.featured-post-content {
    padding: 24px;
    border-right: 2px solid var(--border);
    background-image: var(--paper-lines);
}

.stamp {
    display: inline-block;
    background: var(--red-stamp);
    color: var(--white);
    font-family: var(--font-title);
    font-size: 0.75rem;
    letter-spacing: 0.14em;
    padding: 3px 10px;
    margin-bottom: 10px;
    transform: rotate(-1.5deg);
    transform-origin: left center;
}

.featured-post-title {
    font-family: var(--font-title);
    font-size: 2.25rem;
    color: var(--ink);
    letter-spacing: 0.04em;
    line-height: 1;
    margin-bottom: 10px;
}

.featured-post-title a { color: var(--ink); }
.featured-post-title a:hover { color: var(--red); text-decoration: none; }

.featured-post-excerpt {
    font-size: 0.8125rem;
    color: var(--ink-mid);
    line-height: 1.6;
    margin-bottom: 14px;
}

.featured-post-meta {
    font-size: 0.5625rem;
    color: var(--ink-faint);
    letter-spacing: 0.08em;
    border-top: 1px dashed var(--border-dash);
    padding-top: 8px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.featured-post-img {
    background: var(--paper-darker);
    background-image: var(--scratch);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    overflow: hidden;
}

.featured-post-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-post-img .no-image {
    font-family: var(--font-title);
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    color: var(--ink-ghost);
    text-align: center;
    padding: 20px;
}

/* ============================================================
   POST GRID
   ============================================================ */

.post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

/* ============================================================
   POST CARD
   ============================================================ */

.post-card {
    background: var(--paper-dark);
    border: 1px solid var(--border);
    border-top: 4px solid var(--ink-faint);
    padding: 16px;
    position: relative;
    transition: border-top-color 0.15s, box-shadow 0.15s;
    background-image: var(--paper-lines);
}

.post-card:hover {
    border-top-color: var(--red);
    box-shadow: 2px 2px 8px rgba(100, 80, 40, 0.15);
}

.post-card-ref {
    position: absolute;
    top: 8px;
    right: 10px;
    font-family: var(--font-mono);
    font-size: 0.5rem;
    color: var(--ink-ghost);
    letter-spacing: 0.06em;
}

.post-card-cat {
    font-family: var(--font-mono);
    font-size: 0.5625rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-faint);
    margin-bottom: 5px;
}

.post-card-cat a {
    color: var(--ink-faint);
}

.post-card-cat a:hover {
    color: var(--red);
    text-decoration: none;
}

.post-card-title {
    font-family: var(--font-title);
    font-size: 1.25rem;
    color: var(--ink);
    letter-spacing: 0.03em;
    line-height: 1.1;
    margin-bottom: 8px;
}

.post-card-title a { color: var(--ink); }
.post-card-title a:hover { color: var(--red); text-decoration: none; }

.post-card-img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
    margin-bottom: 10px;
    background: var(--paper-darker);
}

.post-card-excerpt {
    font-size: 0.75rem;
    color: var(--ink-mid);
    line-height: 1.5;
    margin-bottom: 10px;
}

.post-card-meta {
    font-size: 0.5625rem;
    color: var(--ink-faint);
    letter-spacing: 0.06em;
    border-top: 1px dashed var(--border-dash);
    padding-top: 7px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.read-more {
    font-family: var(--font-mono);
    font-size: 0.5625rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--red);
    border-bottom: 1px solid var(--red);
    padding-bottom: 1px;
}

.read-more:hover { text-decoration: none; color: var(--red-dark); }

/* ============================================================
   SINGLE POST
   ============================================================ */

.post-header {
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border);
}

.post-header .stamp { margin-bottom: 12px; }

.post-title {
    font-family: var(--font-title);
    font-size: 3rem;
    color: var(--ink);
    letter-spacing: 0.04em;
    line-height: 1;
    margin-bottom: 14px;
}

.post-meta {
    font-size: 0.625rem;
    color: var(--ink-faint);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    padding-top: 10px;
    border-top: 1px dashed var(--border-dash);
}

.post-featured-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    margin-bottom: 28px;
    border: 1px solid var(--border);
}

.post-content {
    font-size: 0.9375rem;
    color: var(--ink);
    line-height: 1.8;
    background-image: var(--paper-lines);
}

.post-content h2 {
    font-family: var(--font-title);
    font-size: 1.75rem;
    color: var(--ink);
    letter-spacing: 0.04em;
    margin: 1.8em 0 0.6em;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
}

.post-content h3 {
    font-family: var(--font-title);
    font-size: 1.375rem;
    color: var(--ink-mid);
    letter-spacing: 0.04em;
    margin: 1.4em 0 0.5em;
}

.post-content a { color: var(--red); }
.post-content a:hover { color: var(--red-dark); }

.post-content blockquote {
    border-left: 4px solid var(--red);
    background: var(--paper-dark);
    padding: 14px 18px;
    margin: 1.4em 0;
    font-style: italic;
    color: var(--ink-mid);
}

.post-content ul,
.post-content ol {
    padding-left: 1.8em;
    margin-bottom: 1.2em;
}

.post-content li {
    margin-bottom: 0.4em;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border: 1px solid var(--border);
    margin: 1.2em 0;
}

.post-content strong { color: var(--ink); font-weight: 600; }

.post-footer {
    margin-top: 32px;
    padding-top: 20px;
    border-top: 2px solid var(--border);
    font-size: 0.625rem;
    color: var(--ink-faint);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* Post navigation */
.post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px dashed var(--border-dash);
}

.post-nav-prev,
.post-nav-next {
    background: var(--paper-dark);
    border: 1px solid var(--border);
    border-top: 3px solid var(--ink-faint);
    padding: 14px;
    transition: border-top-color 0.15s;
}

.post-nav-prev:hover,
.post-nav-next:hover { border-top-color: var(--red); }

.post-nav-next { text-align: right; }

.post-nav-label {
    font-size: 0.5rem;
    letter-spacing: 0.16em;
    color: var(--ink-faint);
    text-transform: uppercase;
    margin-bottom: 4px;
    display: block;
}

.post-nav-title {
    font-family: var(--font-title);
    font-size: 1rem;
    color: var(--ink);
    line-height: 1.1;
}

.post-nav-prev a,
.post-nav-next a { color: var(--ink); text-decoration: none; }
.post-nav-prev a:hover .post-nav-title,
.post-nav-next a:hover .post-nav-title { color: var(--red); }

/* ============================================================
   CATEGORY ARCHIVE PAGE
   ============================================================ */

.archive-header {
    background: var(--paper-dark);
    background-image: var(--paper-lines);
    border: 2px solid var(--border);
    border-top: 4px solid var(--red);
    padding: 24px;
    margin-bottom: 28px;
}

.archive-label {
    font-family: var(--font-mono);
    font-size: 0.5625rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--red);
    margin-bottom: 6px;
}

.archive-title {
    font-family: var(--font-title);
    font-size: 2.5rem;
    color: var(--ink);
    letter-spacing: 0.04em;
    line-height: 1;
    margin-bottom: 8px;
}

.archive-description {
    font-size: 0.8125rem;
    color: var(--ink-mid);
    line-height: 1.6;
}

.archive-count {
    margin-top: 10px;
    font-size: 0.5625rem;
    color: var(--ink-faint);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-top: 1px dashed var(--border-dash);
    padding-top: 8px;
}

/* ============================================================
   SIDEBAR
   ============================================================ */

.sidebar { position: sticky; top: 60px; }

.sidebar-widget {
    background: var(--paper-dark);
    background-image: var(--paper-lines);
    border: 1px solid var(--border);
    border-top: 3px solid var(--red);
    margin-bottom: 24px;
    overflow: hidden;
}

.sidebar-widget-title {
    font-family: var(--font-mono);
    font-size: 0.5625rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--red);
    background: var(--paper-darker);
    padding: 8px 14px;
    border-bottom: 1px solid var(--border);
}

.sidebar-widget-body { padding: 14px; }

/* Recent posts in sidebar */
.sidebar-post {
    display: flex;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px dashed var(--border-dash);
}

.sidebar-post:last-child { border-bottom: none; padding-bottom: 0; }

.sidebar-post-ref {
    font-family: var(--font-mono);
    font-size: 0.5rem;
    color: var(--ink-faint);
    flex-shrink: 0;
    padding-top: 3px;
    letter-spacing: 0.04em;
}

.sidebar-post-title {
    font-family: var(--font-title);
    font-size: 0.9375rem;
    color: var(--ink);
    letter-spacing: 0.03em;
    line-height: 1.15;
}

.sidebar-post-title a { color: var(--ink); }
.sidebar-post-title a:hover { color: var(--red); text-decoration: none; }

.sidebar-post-date {
    font-size: 0.5rem;
    color: var(--ink-faint);
    letter-spacing: 0.06em;
    margin-top: 3px;
}

/* Categories in sidebar */
.sidebar-cat-list { list-style: none; }

.sidebar-cat-list li {
    border-bottom: 1px dashed var(--border-dash);
}

.sidebar-cat-list li:last-child { border-bottom: none; }

.sidebar-cat-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 0;
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    color: var(--ink-mid);
    letter-spacing: 0.06em;
    text-decoration: none;
    transition: color 0.15s;
}

.sidebar-cat-list a:hover { color: var(--red); }

.sidebar-cat-count {
    font-size: 0.5rem;
    color: var(--ink-faint);
    background: var(--paper-darker);
    border: 1px solid var(--border-dash);
    padding: 1px 5px;
    letter-spacing: 0.06em;
}

/* Subscribe widget */
.subscribe-form { display: flex; flex-direction: column; gap: 8px; }

.subscribe-label {
    font-size: 0.6875rem;
    color: var(--ink-mid);
    line-height: 1.5;
}

.subscribe-input {
    background: var(--paper);
    border: 1px solid var(--border);
    color: var(--ink);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 8px 10px;
    outline: none;
    transition: border-color 0.2s;
    width: 100%;
}

.subscribe-input:focus { border-color: var(--red); }
.subscribe-input::placeholder { color: var(--ink-faint); }

.subscribe-btn {
    background: var(--red-dark);
    border: 1px solid var(--red);
    color: var(--white);
    font-family: var(--font-title);
    font-size: 0.9375rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 8px 14px;
    cursor: pointer;
    transition: background 0.15s;
    width: 100%;
}

.subscribe-btn:hover { background: var(--red); }

.subscribe-note {
    font-size: 0.5rem;
    color: var(--ink-faint);
    letter-spacing: 0.06em;
    text-align: center;
}

/* ============================================================
   PAGINATION
   ============================================================ */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 32px 0 0;
    padding-top: 24px;
    border-top: 1px dashed var(--border-dash);
    font-family: var(--font-mono);
    font-size: 0.625rem;
    letter-spacing: 0.1em;
}

.page-link {
    background: var(--paper-dark);
    border: 1px solid var(--border);
    color: var(--ink-faint);
    padding: 6px 12px;
    text-decoration: none;
    text-transform: uppercase;
    transition: all 0.15s;
}

.page-link:hover {
    background: var(--paper-darker);
    color: var(--red);
    border-color: var(--red);
    text-decoration: none;
}

.page-link.current {
    background: var(--red-dark);
    border-color: var(--red);
    color: var(--white);
}

.page-info {
    color: var(--ink-faint);
    padding: 0 8px;
}

/* ============================================================
   COMMENTS SECTION
   ============================================================ */

.comments-section {
    margin-top: 40px;
    padding-top: 28px;
    border-top: 2px solid var(--border);
}

.comments-title {
    font-family: var(--font-title);
    font-size: 1.5rem;
    color: var(--ink);
    letter-spacing: 0.06em;
    margin-bottom: 20px;
}

.comment {
    background: var(--paper-dark);
    background-image: var(--paper-lines);
    border: 1px solid var(--border);
    border-left: 3px solid var(--border);
    padding: 16px;
    margin-bottom: 14px;
}

.comment-meta {
    font-size: 0.5625rem;
    color: var(--ink-faint);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px dashed var(--border-dash);
    display: flex;
    gap: 12px;
}

.comment-author { color: var(--ink-mid); font-weight: 600; }

.comment-body {
    font-size: 0.8125rem;
    color: var(--ink);
    line-height: 1.6;
}

/* Comment form */
.comment-form {
    margin-top: 28px;
    background: var(--paper-dark);
    background-image: var(--paper-lines);
    border: 2px solid var(--border);
    border-top: 4px solid var(--red);
    padding: 24px;
}

.comment-form-title {
    font-family: var(--font-title);
    font-size: 1.375rem;
    color: var(--ink);
    letter-spacing: 0.06em;
    margin-bottom: 16px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.form-field { display: flex; flex-direction: column; gap: 4px; }

.form-label {
    font-family: var(--font-mono);
    font-size: 0.5625rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-faint);
}

.form-input,
.form-textarea {
    background: var(--paper);
    border: 1px solid var(--border);
    color: var(--ink);
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    padding: 8px 10px;
    outline: none;
    transition: border-color 0.2s;
    width: 100%;
}

.form-input:focus,
.form-textarea:focus { border-color: var(--red); }
.form-input::placeholder,
.form-textarea::placeholder { color: var(--ink-faint); }

.form-textarea {
    min-height: 120px;
    resize: vertical;
    margin-bottom: 12px;
}

.form-submit {
    background: var(--red-dark);
    border: 1px solid var(--red);
    color: var(--white);
    font-family: var(--font-title);
    font-size: 1.0625rem;
    letter-spacing: 0.1em;
    padding: 10px 24px;
    cursor: pointer;
    transition: background 0.15s;
    text-transform: uppercase;
}

.form-submit:hover { background: var(--red); }

.form-honeypot { display: none; }

/* ============================================================
   STATIC PAGES
   ============================================================ */

.page-header {
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border);
}

.page-title {
    font-family: var(--font-title);
    font-size: 2.75rem;
    color: var(--ink);
    letter-spacing: 0.04em;
    line-height: 1;
    margin-bottom: 10px;
}

.page-content {
    font-size: 0.9375rem;
    color: var(--ink);
    line-height: 1.8;
}

.page-content h2 {
    font-family: var(--font-title);
    font-size: 1.75rem;
    margin: 1.8em 0 0.6em;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
}

.page-content h3 {
    font-family: var(--font-title);
    font-size: 1.375rem;
    color: var(--ink-mid);
    margin: 1.4em 0 0.5em;
}

.page-content a { color: var(--red); }
.page-content blockquote {
    border-left: 4px solid var(--red);
    background: var(--paper-dark);
    padding: 14px 18px;
    margin: 1.4em 0;
    font-style: italic;
    color: var(--ink-mid);
}

/* ============================================================
   404 PAGE
   ============================================================ */

.error-page {
    text-align: center;
    padding: 60px 32px;
    max-width: 600px;
    margin: 0 auto;
}

.error-code {
    font-family: var(--font-title);
    font-size: 8rem;
    color: var(--red);
    letter-spacing: 0.06em;
    line-height: 1;
    opacity: 0.3;
}

.error-title {
    font-family: var(--font-title);
    font-size: 2rem;
    color: var(--ink);
    letter-spacing: 0.06em;
    margin-bottom: 12px;
}

.error-message {
    font-size: 0.875rem;
    color: var(--ink-mid);
    line-height: 1.6;
    margin-bottom: 24px;
}

/* ============================================================
   SEARCH BAR
   ============================================================ */

.search-form {
    display: flex;
    margin-bottom: 24px;
}

.search-input {
    flex: 1;
    background: var(--paper);
    border: 1px solid var(--border);
    border-right: none;
    color: var(--ink);
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    padding: 9px 12px;
    outline: none;
}

.search-input:focus { border-color: var(--red); }

.search-btn {
    background: var(--red-dark);
    border: 1px solid var(--red);
    color: var(--white);
    font-family: var(--font-title);
    font-size: 0.9375rem;
    letter-spacing: 0.1em;
    padding: 9px 16px;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}

.search-btn:hover { background: var(--red); }

/* ============================================================
   ALERTS & NOTICES
   ============================================================ */

.alert {
    padding: 12px 16px;
    margin-bottom: 16px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    border-left: 4px solid;
}

.alert-success {
    background: rgba(34, 120, 34, 0.08);
    border-color: #228822;
    color: #1a5a1a;
}

.alert-error {
    background: rgba(180, 20, 20, 0.08);
    border-color: var(--red);
    color: var(--red-dark);
}

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
    background: var(--black);
    color: #888;
    margin-top: 60px;
    border-top: 4px solid var(--red);
}

.site-footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 36px var(--gutter);
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: var(--gutter);
}

.footer-brand .footer-logo {
    font-family: var(--font-title);
    font-size: 1.5rem;
    color: var(--red);
    letter-spacing: 0.08em;
    margin-bottom: 6px;
}

.footer-brand .footer-logo span { color: var(--white); }

.footer-tagline {
    font-family: var(--font-mono);
    font-size: 0.5625rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #555;
    margin-bottom: 12px;
}

.footer-brand p {
    font-size: 0.6875rem;
    color: #555;
    line-height: 1.6;
}

.footer-col-title {
    font-family: var(--font-mono);
    font-size: 0.5625rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--red);
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid #222;
}

.footer-links { list-style: none; }

.footer-links li { border-bottom: 1px solid #1a1a1a; }

.footer-links a {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    color: #555;
    padding: 5px 0;
    letter-spacing: 0.06em;
    transition: color 0.15s;
    text-decoration: none;
}

.footer-links a:hover { color: var(--red); }

.footer-bottom {
    border-top: 1px solid #1a1a1a;
    padding: 14px var(--gutter);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 0.5rem;
    color: #333;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    max-width: var(--max-width);
    margin: 0 auto;
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */

.visually-hidden {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

.text-center { text-align: center; }
.text-right  { text-align: right; }
.mt-0        { margin-top: 0; }
.mb-0        { margin-bottom: 0; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 900px) {
    :root { --sidebar-w: 240px; --gutter: 20px; }
    .post-grid { grid-template-columns: repeat(2, 1fr); }
    .site-footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 700px) {
    :root { --gutter: 16px; }

    .page-wrap { grid-template-columns: 1fr; }
    .sidebar { position: static; display: none; }

    .post-grid { grid-template-columns: 1fr; }
    .featured-post { grid-template-columns: 1fr; }
    .featured-post-img { min-height: 120px; }

    .site-nav { flex-direction: column; align-items: flex-start; max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
    .site-nav.open { max-height: 500px; }
    .nav-toggle { display: block; }
    .site-nav a { border-bottom: none; border-left: 3px solid transparent; width: 100%; }
    .site-nav a.active, .site-nav a:hover { border-bottom: none; border-left-color: var(--red); }

    .form-row { grid-template-columns: 1fr; }
    .site-footer-inner { grid-template-columns: 1fr; }
    .post-nav { grid-template-columns: 1fr; }

    .post-title { font-size: 2.25rem; }
    .featured-post-title { font-size: 1.75rem; }
}

@media (max-width: 420px) {
    .post-grid { grid-template-columns: 1fr; }
    .post-title { font-size: 1.875rem; }
}
