/* ==========================================================================
   REPORTEDLY TRUE — Stylesheet
   "Filed for your consideration."
   ========================================================================== */

/* --- Custom Properties --- */
:root {
    /* Brand tokens — sourced from vidgen3 rt-theme */
    --ink: #1a1614;          /* dark leather */
    --slate: #12100e;        /* deeper leather (gradient stop) */
    --amber: #8b3a2a;        /* oxblood / dried red ink — the only warm accent */
    --amber-light: #a34832;
    --crimson: #8b3a2a;      /* classification stamps */
    --umber: #5c3a2e;        /* burnt umber */
    --parchment: #ddd0b8;    /* aged linen */
    --parchment-dark: #cdc0a8;
    --bone: #ddd0b8;
    --charcoal: #1a1614;
    --fog: #7a7060;          /* tobacco-stain secondary */
    --hairline: rgba(221, 208, 184, 0.14); /* faint linen rule */

    --font-display: 'Special Elite', 'Courier New', monospace;
    --font-body: 'Libre Baskerville', Georgia, 'Times New Roman', serif;
    --font-stamp: 'Archivo Black', 'Arial Black', sans-serif;
    --font-ui: 'Source Sans 3', system-ui, -apple-system, sans-serif;

    --max-width: 1100px;
    --gutter: 1.5rem;
}

/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--ink);
    color: var(--bone);
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

a {
    color: var(--amber);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--amber-light);
}

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

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

/* --- Paper Texture Overlay (subtle) --- */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.035;
    background-image: url("/assets/img/textures/grain.png");
    background-size: 320px;
    mix-blend-mode: overlay;
}

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

.site-header {
    background: var(--slate);
    border-bottom: 2px solid var(--amber);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--bone);
}

.site-logo:hover {
    color: var(--bone);
}

.logo-seal {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--amber);
    color: var(--ink);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 1.1rem;
    border-radius: 50%;
    border: 2px solid var(--amber-light);
    flex-shrink: 0;
}

.logo-seal--small {
    width: 36px;
    height: 36px;
    font-size: 0.85rem;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-name {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.logo-tagline {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    color: var(--fog);
    letter-spacing: 0.02em;
}

/* Navigation */
.nav-list {
    display: flex;
    list-style: none;
    gap: 0.25rem;
}

.nav-link {
    font-family: var(--font-ui);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--bone);
    padding: 0.4rem 0.75rem;
    border: 1px solid transparent;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nav-link:hover,
.nav-link.active {
    color: var(--amber);
    border-color: var(--amber);
}

.external-indicator {
    font-size: 0.7em;
    opacity: 0.6;
}

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--fog);
    padding: 0.5rem;
    cursor: pointer;
    flex-direction: column;
    gap: 4px;
}

.nav-toggle-bar {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--bone);
    transition: transform 0.2s;
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }
    .nav-list {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--slate);
        border-bottom: 2px solid var(--amber);
        flex-direction: column;
        padding: 1rem;
    }
    .nav-list.open {
        display: flex;
    }
    .nav-link {
        padding: 0.75rem 1rem;
    }
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */

.hero {
    padding: 5rem 0 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: 'CLASSIFIED';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-15deg);
    font-family: var(--font-ui);
    font-size: 8rem;
    font-weight: 700;
    color: var(--crimson);
    opacity: 0.04;
    letter-spacing: 0.1em;
    pointer-events: none;
    white-space: nowrap;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 1rem;
    color: var(--parchment);
}

.hero-subtitle {
    font-family: var(--font-body);
    font-size: 1.15rem;
    color: var(--fog);
    font-style: italic;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.hero-tagline {
    font-family: var(--font-display);
    font-size: 0.95rem;
    color: var(--amber);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.5rem 1.5rem;
    border: 1px solid var(--amber);
    display: inline-block;
}

/* ==========================================================================
   SECTION STYLING
   ========================================================================== */

.section {
    padding: 4rem 0;
}

.section--alt {
    background: var(--slate);
}

.section-header {
    margin-bottom: 2.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(139, 58, 42, 0.3);
}

.section-label {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--amber);
    margin-bottom: 0.25rem;
}

.section-title {
    font-family: var(--font-display);
    font-size: 1.8rem;
    color: var(--parchment);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ==========================================================================
   VIDEO GRID (Case Files)
   ========================================================================== */

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.video-card {
    background: var(--slate);
    border: 1px solid rgba(139, 58, 42, 0.2);
    transition: border-color 0.3s, transform 0.2s;
    position: relative;
    overflow: hidden;
}

.video-card:hover {
    border-color: var(--amber);
    transform: translateY(-2px);
}

.video-card__thumb {
    aspect-ratio: 16 / 9;
    background: var(--ink);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.video-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-card__placeholder {
    font-family: var(--font-display);
    color: var(--fog);
    font-size: 0.85rem;
    text-align: center;
    padding: 1rem;
}

.video-card__stamp {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    font-family: var(--font-ui);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--parchment);
    background: var(--crimson);
    padding: 0.2rem 0.6rem;
    transform: rotate(2deg);
}

.video-card__body {
    padding: 1.25rem;
}

.video-card__title {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--parchment);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.video-card__desc {
    font-size: 0.85rem;
    color: var(--fog);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-card__meta {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    color: var(--fog);
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255,255,255,0.05);
}

/* ==========================================================================
   BLOG FEED (Field Notes)
   ========================================================================== */

.post-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.post-card {
    background: var(--slate);
    border: 1px solid rgba(139, 58, 42, 0.15);
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 1.5rem;
    padding: 1.1rem;
    align-items: center;
    transition: border-color 0.3s;
    position: relative;
}

.post-card:hover {
    border-color: var(--amber);
}

.post-card__thumb {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    background: var(--ink);
    border: 1px solid var(--hairline);
    overflow: hidden;
}
.post-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.post-card:hover .post-card__thumb img { transform: scale(1.04); }
.post-card__noimg {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 0.8rem;
    color: var(--fog);
}
.post-card__content {
    padding: 0.1rem 0.4rem 0.1rem 0;
    min-width: 0;
}
.post-card__meta {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    color: var(--fog);
    margin-top: 0.6rem;
}

@media (max-width: 640px) {
    .post-card { grid-template-columns: 1fr; }
}

.post-card__content {
    min-width: 0;
}

.post-card__classification {
    font-family: var(--font-ui);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--crimson);
    margin-bottom: 0.25rem;
}

.post-card__title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    color: var(--parchment);
    margin-bottom: 0.5rem;
}

.post-card__title a {
    color: inherit;
}

.post-card__title a:hover {
    color: var(--amber);
}

.post-card__excerpt {
    font-size: 0.9rem;
    color: var(--fog);
    line-height: 1.6;
}

.post-card__tags {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

.tag {
    font-family: var(--font-ui);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--amber);
    border: 1px solid rgba(139, 58, 42, 0.3);
    padding: 0.15rem 0.5rem;
}

/* ==========================================================================
   BLOG POST (Single)
   ========================================================================== */

.post-single {
    max-width: 740px;
    margin: 0 auto;
    padding: 3rem 0 5rem;
}

.post-header {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(139, 58, 42, 0.3);
}

.post-header__classification {
    font-family: var(--font-ui);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--crimson);
    margin-bottom: 0.5rem;
}

.post-header__title {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--parchment);
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.post-header__meta {
    font-family: var(--font-ui);
    font-size: 0.8rem;
    color: var(--fog);
}

.post-body {
    font-size: 1.05rem;
    line-height: 1.8;
}

.post-body h2 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    color: var(--parchment);
    margin: 2.5rem 0 1rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.post-body h3 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    color: var(--parchment);
    margin: 2rem 0 0.75rem;
}

.post-body p {
    margin-bottom: 1.25rem;
}

.post-body blockquote {
    border-left: 3px solid var(--amber);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: rgba(139, 58, 42, 0.05);
    font-style: italic;
    color: var(--parchment);
}

.post-body a {
    border-bottom: 1px solid var(--amber);
}

.post-body hr {
    border: none;
    border-top: 1px solid rgba(139, 58, 42, 0.2);
    margin: 2rem 0;
}

/* Redacted text */
.redacted {
    background: var(--charcoal);
    color: var(--charcoal);
    padding: 0 0.3em;
    cursor: help;
    transition: color 0.3s;
}

.redacted:hover {
    color: var(--amber);
}

/* ==========================================================================
   CTA / SUBSCRIBE
   ========================================================================== */

.cta-section {
    text-align: center;
    padding: 4rem 0;
    border-top: 1px solid rgba(139, 58, 42, 0.2);
    border-bottom: 1px solid rgba(139, 58, 42, 0.2);
}

.cta-heading {
    font-family: var(--font-display);
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--parchment);
    margin-bottom: 0.75rem;
}

.cta-text {
    color: var(--fog);
    margin-bottom: 1.5rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.btn {
    font-family: var(--font-ui);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.75rem 2rem;
    border: 2px solid var(--amber);
    color: var(--amber);
    background: transparent;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-block;
    text-decoration: none;
}

.btn:hover {
    background: var(--amber);
    color: var(--ink);
}

.btn--filled {
    background: var(--amber);
    color: var(--ink);
}

.btn--filled:hover {
    background: var(--amber-light);
    color: var(--ink);
}

/* ==========================================================================
   ABOUT PAGE
   ========================================================================== */

.about-content {
    max-width: 740px;
    margin: 0 auto;
    padding: 3rem 0 5rem;
}

.dossier-field {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 0.5rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-size: 0.95rem;
}

.dossier-field__label {
    font-family: var(--font-ui);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    color: var(--fog);
    padding-top: 0.15rem;
}

.dossier-field__value {
    color: var(--parchment);
}

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

.site-footer {
    background: var(--slate);
    border-top: 2px solid var(--amber);
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1.5fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-tagline {
    font-style: italic;
    color: var(--fog);
    font-size: 0.9rem;
    margin-top: 0.75rem;
}

.footer-links h4,
.footer-legal h4 {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--amber);
    margin-bottom: 0.75rem;
}

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

.footer-links li {
    margin-bottom: 0.4rem;
}

.footer-links a {
    font-family: var(--font-ui);
    font-size: 0.85rem;
    color: var(--bone);
}

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

.footer-legal p {
    font-size: 0.85rem;
    color: var(--fog);
    line-height: 1.6;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.copyright {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    color: var(--fog);
}

.classification-stamp {
    font-family: var(--font-ui);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--fog);
    border: 1px solid var(--fog);
    padding: 0.2rem 0.75rem;
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }
    .post-card {
        grid-template-columns: 1fr;
    }
    .dossier-field {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }
}

/* ==========================================================================
   UTILITIES
   ========================================================================== */

.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 2rem; }

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--fog);
    font-style: italic;
}

.empty-state__icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

/* ==========================================================================
   WORDMARK — "REPORTEDLY" typed, "TRUE" stamped (the channel logo, on the web)
   ========================================================================== */

.wordmark {
    font-weight: 400;
    line-height: 1;
    display: inline-flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: center;
    gap: 0.35em;
}

.wordmark__typed {
    font-family: var(--font-display);
    color: var(--parchment);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.wordmark__typed {
    display: inline-block;
}

.wordmark__stamp {
    font-family: var(--font-stamp);
    color: var(--parchment);
    background: var(--crimson);
    text-transform: uppercase;
    letter-spacing: 0.01em;
    padding: 0.04em 0.26em;
    transform: rotate(-4deg);
    /* double-ring stamp framing: dark outer edge + linen inner hairline */
    border: 0.055em solid #6f2c20;
    box-shadow: inset 0 0 0 0.045em rgba(236, 227, 208, 0.55), 0 2px 0 rgba(0, 0, 0, 0.4);
}

/* ---- Hero title sequence: REPORTEDLY types in, TRUE slams (from Remotion) ---- */
.hero .wordmark {
    display: flex;          /* block-level so the gag badge always wraps underneath */
    font-size: clamp(2.2rem, 7vw, 4.5rem);
    margin-bottom: 1rem;
}
/* REPORTEDLY reveals left-to-right, mechanically (stepped) */
.hero .wordmark__typed {
    animation: rt-type 0.7s steps(10, end) both;
}
/* TRUE: worn-ink edges + a hard 4-frame slam, then locked (no wobble) */
.hero .wordmark__stamp {
    filter: url(#rt-ink-sponge);
    animation: rt-slam 0.16s cubic-bezier(0.2, 0, 0, 1) both;
    animation-delay: 0.78s;
}
@keyframes rt-type {
    from { clip-path: inset(0 100% 0 0); }
    to   { clip-path: inset(0 0 0 0); }
}
@keyframes rt-slam {
    0%   { opacity: 0; transform: rotate(-4deg) scale(2.5); }
    1%   { opacity: 1; }
    100% { opacity: 1; transform: rotate(-4deg) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
    .hero .wordmark__typed { animation: none; clip-path: none; }
    .hero .wordmark__stamp { animation: none; }
}

.hero .hero-tagline { margin-top: 1.75rem; }

/* ==========================================================================
   FEATURED CASE FILE (homepage) — newest episode, embedded for instant play
   ========================================================================== */
.featured__layout {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 2rem;
    align-items: center;
}
.featured__media { min-width: 0; }
.featured__title {
    font-family: var(--font-display);
    font-size: 1.6rem;
    line-height: 1.25;
    color: var(--parchment);
    margin: 0.4rem 0 0.75rem;
}
.featured__title a { color: inherit; }
.featured__title a:hover { color: var(--amber); }
.featured__excerpt {
    color: var(--bone);
    font-size: 1.02rem;
    line-height: 1.7;
    margin-bottom: 1rem;
}
.featured__meta {
    font-family: var(--font-ui);
    font-size: 0.8rem;
    color: var(--fog);
    margin-bottom: 1.25rem;
}
.featured__actions .btn { margin: 0 0.5rem 0.5rem 0; }

@media (max-width: 768px) {
    .featured__layout { grid-template-columns: 1fr; gap: 1.25rem; }
}

/* ==========================================================================
   404 — glitchy dossier
   ========================================================================== */
.err404 { text-align: center; padding: 3rem 0 5rem; }
.err404__stamp {
    font-family: var(--font-ui);
    font-size: 0.75rem; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase;
    color: var(--fog); margin-bottom: 1.5rem;
}
.err404__flick { color: var(--amber); }
.err404__code {
    font-family: var(--font-stamp);
    font-size: clamp(5rem, 22vw, 12rem);
    line-height: 0.9; color: var(--parchment); margin: 0; position: relative;
}
.glitch { position: relative; }
.glitch::before, .glitch::after {
    content: attr(data-text);
    position: absolute; inset: 0; pointer-events: none;
}
.glitch::before { color: #ff3c28; mix-blend-mode: screen; animation: glitch-x 2.6s infinite steps(2); }
.glitch::after  { color: #2850ff; mix-blend-mode: screen; animation: glitch-x 3.4s infinite reverse steps(2); }
@keyframes glitch-x {
    0%,100% { transform: translate(0,0); clip-path: inset(0 0 0 0); }
    20% { transform: translate(-4px, 1px); clip-path: inset(10% 0 60% 0); }
    40% { transform: translate(3px, -2px); clip-path: inset(50% 0 20% 0); }
    60% { transform: translate(-2px, 2px); clip-path: inset(20% 0 50% 0); }
    80% { transform: translate(4px, -1px); clip-path: inset(70% 0 5% 0); }
}
.err404__sub {
    font-family: var(--font-stamp);
    font-size: clamp(1rem, 4vw, 1.8rem);
    letter-spacing: 0.1em; color: var(--parchment);
    background: var(--crimson); display: inline-block;
    padding: 0.15em 0.6em; transform: rotate(-2deg);
    border: 2px solid #6f2c20; margin: 0.5rem 0 1.75rem;
}
.err404__reason {
    font-family: var(--font-body); font-size: 1.15rem; font-style: italic;
    color: var(--bone); max-width: 640px; margin: 0 auto 2rem;
    min-height: 3.4em; transition: opacity 0.22s;
}
.err404__log {
    font-family: var(--font-display), ui-monospace, monospace;
    text-align: left; font-size: 0.82rem; line-height: 1.7; color: var(--fog);
    background: var(--slate); border: 1px solid var(--hairline);
    padding: 1rem 1.25rem; max-width: 540px; margin: 0 auto 2rem;
    overflow: hidden; white-space: pre-wrap; word-break: break-word;
    position: relative;
}
.err404__log .bad { color: var(--amber); }
.err404__log::after {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background: repeating-linear-gradient(to bottom, transparent 0 2px, rgba(0,0,0,0.25) 2px 3px);
    opacity: 0.4;
}
.err404__actions { margin-bottom: 1.5rem; }
.err404__actions .btn { margin: 0 0.35rem 0.5rem; }
.err404__hint { color: var(--fog); font-size: 0.95rem; }
.err404__hint a { border-bottom: 1px solid var(--amber); }
@media (prefers-reduced-motion: reduce) {
    .glitch::before, .glitch::after { animation: none; opacity: 0.25; }
}

/* ==========================================================================
   CASE FILES INDEX — search + tag cloud
   ========================================================================== */
.archive-tools { margin-bottom: 1.5rem; }
.post-search {
    width: 100%; max-width: 420px;
    font-family: var(--font-ui); font-size: 0.95rem;
    color: var(--parchment); background: var(--slate);
    border: 1px solid var(--hairline); padding: 0.7rem 1rem;
}
.post-search:focus { outline: none; border-color: var(--amber); }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1rem; }
a.tag { text-decoration: none; transition: all 0.15s; }
a.tag:hover { background: var(--amber); color: var(--ink); border-color: var(--amber); }
.tag-cloud .tag--extra { display: none; }
.tag-cloud.show-all .tag--extra { display: inline-block; }
.tag-toggle {
    background: none; cursor: pointer;
    color: var(--fog); border-color: var(--fog); border-style: dashed;
    font-family: var(--font-ui); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em;
}
.tag-toggle:hover { color: var(--amber); border-color: var(--amber); }
.archive-empty { color: var(--fog); font-style: italic; padding: 2rem 0; display: none; }

/* ==========================================================================
   POST PREV / NEXT
   ========================================================================== */
.post-nav {
    display: flex; justify-content: space-between; gap: 1rem;
    max-width: 760px; margin: 2.5rem auto 0; padding-top: 1.5rem;
    border-top: 1px solid var(--hairline);
}
.post-nav a {
    flex: 1; max-width: 48%; text-decoration: none;
    font-family: var(--font-ui); font-size: 0.7rem; font-weight: 700;
    letter-spacing: 0.1em; text-transform: uppercase; color: var(--fog);
}
.post-nav a:hover { color: var(--amber); }
.post-nav a.next { text-align: right; }
.post-nav a .t {
    display: block; font-family: var(--font-display); font-size: 0.95rem;
    text-transform: none; letter-spacing: 0; color: var(--parchment); margin-top: 0.3rem;
}
.post-nav a:hover .t { color: var(--amber); }

/* ==========================================================================
   CASE MAP (Leaflet)
   ========================================================================== */
.case-map {
    height: 68vh; min-height: 420px;
    border: 1px solid var(--hairline);
    background: var(--slate);
}
.leaflet-popup-content-wrapper, .leaflet-popup-tip {
    background: var(--ink); color: var(--bone);
    border: 1px solid var(--amber); border-radius: 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.6);
}
.leaflet-popup-content { margin: 0; width: 240px !important; }
.map-pop img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.map-pop__case { display:block; font-family:var(--font-ui); font-size:0.6rem; font-weight:700; letter-spacing:0.12em; text-transform:uppercase; color:var(--crimson); padding:0.5rem 0.7rem 0; }
.map-pop__title { display:block; font-family:var(--font-display); font-size:1rem; color:var(--parchment); padding:0.1rem 0.7rem 0.3rem; text-decoration:none; }
.map-pop__title:hover { color:var(--amber); }
.map-pop__ex { font-size:0.78rem; color:var(--fog); padding:0 0.7rem; line-height:1.4; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.map-pop__btn { display:block; font-family:var(--font-ui); font-size:0.7rem; font-weight:700; text-transform:uppercase; letter-spacing:0.08em; color:var(--amber); padding:0.5rem 0.7rem 0.7rem; text-decoration:none; }
.leaflet-popup-content .map-pop__title { color: var(--parchment); }
.leaflet-popup-content .map-pop__title:hover { color: var(--amber); }
.leaflet-popup-content .map-pop__btn { color: var(--amber); }
.leaflet-container a.leaflet-popup-close-button { color: var(--fog); }

/* ==========================================================================
   REPORT A SIGHTING form
   ========================================================================== */
.report-form { display: flex; flex-direction: column; gap: 1rem; }
.report-label {
    font-family: var(--font-ui); font-size: 0.85rem; color: var(--parchment);
    display: flex; flex-direction: column; gap: 0.4rem;
}
.report-label span { color: var(--fog); font-weight: 400; }
.report-form .post-search { max-width: none; }
.report-text { resize: vertical; min-height: 150px; line-height: 1.6; font-family: var(--font-body); }
.report-note { font-size: 0.8rem; color: var(--fog); font-style: italic; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ==========================================================================
   PRINT — render a case file as an actual dossier
   ========================================================================== */
.print-only { display: none; }

@media print {
    @page { margin: 1.6cm; }
    body {
        background: #fff !important; color: #15110e !important;
        font-family: 'Libre Baskerville', Georgia, serif;
    }
    body::before, .rt-filters { display: none !important; }
    .site-header, .site-footer, .nav-toggle, .post-nav, .post-cta,
    .related-files, .no-print, .yt-lite, .post-media, script { display: none !important; }
    a { color: #15110e !important; text-decoration: none; }

    .container, .post-single .post-header, .post-single .post-body,
    .post-single .post-media, .post-single .post-figure--lead { max-width: 100% !important; }

    .print-only { display: block !important; }

    .print-header {
        display: flex; justify-content: space-between; align-items: flex-start;
        border: 2px solid #15110e; padding: 0.5cm 0.6cm; margin-bottom: 0.5cm;
    }
    .print-header__brand .pm-name {
        font-family: 'Special Elite', monospace; font-size: 20pt; letter-spacing: 1px;
    }
    .print-header__brand .pm-sub {
        font-family: 'Source Sans 3', sans-serif; font-size: 8pt; letter-spacing: 3px;
        text-transform: uppercase; color: #5a5040; margin-top: 2px;
    }
    .print-stamp {
        font-family: 'Archivo Black', 'Arial Black', sans-serif; font-size: 15pt;
        border: 3px solid #8b0000; color: #8b0000; padding: 2px 10px;
        transform: rotate(4deg); white-space: nowrap;
    }
    .print-fields {
        display: flex; flex-wrap: wrap; gap: 0.15cm 0.9cm; margin-bottom: 0.6cm;
        font-family: 'Source Sans 3', sans-serif; font-size: 8.5pt;
        border-bottom: 1px solid #15110e; padding-bottom: 0.4cm;
    }
    .print-fields b { text-transform: uppercase; letter-spacing: 1px; color: #5a5040; margin-right: 4px; }

    .post-header__classification { color: #8b0000 !important; font-size: 8pt; }
    .post-header__case { color: #5a5040 !important; }
    .post-header__title { color: #15110e !important; font-size: 22pt; line-height: 1.15; }
    .post-header__meta { color: #5a5040 !important; font-size: 9pt; }
    .post-card__tags, .post-header__meta + .post-card__tags { display: none !important; }

    .post-body { color: #15110e !important; font-size: 10.5pt; line-height: 1.5; }
    .post-body > p:first-of-type::first-letter { color: #8b0000; }
    .post-body h2, .post-body h3 {
        color: #15110e !important; border-bottom: 1px solid #b8ad99; padding-bottom: 2px;
        page-break-after: avoid;
    }
    .post-figure { page-break-inside: avoid; margin: 0.5cm 0; }
    .post-figure img { max-height: 8cm; width: auto; border: 1px solid #999; }
    .post-figure figcaption { color: #5a5040 !important; font-size: 8pt; border: none; }
    .post-gallery { display: block; }
    .post-gallery img { max-height: 6cm; margin-bottom: 0.3cm; }
    .field-note {
        background: #f3efe6 !important; border-left: 3px solid #15110e !important;
        color: #15110e !important; page-break-inside: avoid;
    }
    .field-note::before { color: #8b0000 !important; }
    .post-sources { border-top: 1px solid #15110e !important; page-break-inside: avoid; }
    .post-sources h2, .post-sources li { color: #15110e !important; }
    .redacted { background: #15110e !important; color: #15110e !important; }

    .print-footer {
        margin-top: 0.7cm; border-top: 1px solid #15110e; padding-top: 0.3cm;
        font-family: 'Source Sans 3', sans-serif; font-size: 8pt; color: #5a5040; text-align: center;
    }
}
.leaflet-control-attribution { background: rgba(0,0,0,0.6) !important; }
.leaflet-control-attribution, .leaflet-control-attribution a { color: var(--fog) !important; }

/* Compact wordmark lockup for the sticky header */
.wordmark--mini {
    font-size: 1.25rem;
    line-height: 1;
}
.wordmark--mini .wordmark__typed { letter-spacing: 0.06em; }
.wordmark--mini .wordmark__stamp { padding: 0.03em 0.22em; }

/* ==========================================================================
   LITE YOUTUBE EMBED (click-to-load) + POST MEDIA
   ========================================================================== */

.post-media { margin: 0 0 2rem; }
.post-media--lead { margin-bottom: 2.5rem; }

.yt-lite {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: var(--ink);
    background-size: cover;
    background-position: center;
    cursor: pointer;
    border: 1px solid var(--hairline);
    overflow: hidden;
}
.yt-lite::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.1), rgba(0,0,0,0.55));
    transition: background 0.2s;
}
.yt-lite:hover::after { background: linear-gradient(180deg, rgba(0,0,0,0.05), rgba(0,0,0,0.45)); }
.yt-lite__play {
    position: absolute;
    top: 50%; left: 50%;
    width: 74px; height: 74px;
    transform: translate(-50%, -50%);
    background: var(--crimson);
    border-radius: 50%;
    box-shadow: 0 3px 14px rgba(0,0,0,0.5);
    z-index: 2;
    transition: transform 0.2s;
}
.yt-lite__play::before {
    content: '';
    position: absolute;
    top: 50%; left: 54%;
    transform: translate(-50%, -50%);
    border-style: solid;
    border-width: 14px 0 14px 24px;
    border-color: transparent transparent transparent var(--parchment);
}
.yt-lite:hover .yt-lite__play { transform: translate(-50%, -50%) scale(1.06); }
.yt-lite__label {
    position: absolute;
    bottom: 0.85rem; left: 0.85rem;
    z-index: 2;
    font-family: var(--font-ui);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--parchment);
    background: rgba(0,0,0,0.5);
    padding: 0.25rem 0.6rem;
}
.yt-lite iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
.yt-lite--active::after,
.yt-lite--active .yt-lite__play,
.yt-lite--active .yt-lite__label { display: none; }

/* ==========================================================================
   POST BODY — rich elements (figures, galleries, lists, notes, sources)
   ========================================================================== */

/* Reading width for episode posts (post.php container is full-width now) */
.post-single .post-header,
.post-single .post-body,
.post-single .post-media,
.post-single > .container > .post-cta,
.post-single .post-figure--lead {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

.post-header__case {
    color: var(--fog);
    font-weight: 400;
}

/* Drop cap on the opening paragraph */
.post-body > p:first-of-type::first-letter {
    font-family: var(--font-display);
    font-size: 3.1rem;
    line-height: 0.8;
    float: left;
    margin: 0.1rem 0.55rem 0 0;
    color: var(--amber);
}

.post-body ul,
.post-body ol {
    margin: 0 0 1.25rem 1.4rem;
    padding: 0;
}
.post-body li { margin-bottom: 0.4rem; }

.post-figure {
    margin: 2rem 0;
}
.post-figure img {
    max-width: 100%;
    max-height: 88vh;       /* tall document scans stay reasonable */
    width: auto;
    height: auto;
    display: block;
    margin: 0 auto;
    border: 1px solid var(--hairline);
}
.post-figure figcaption {
    font-family: var(--font-ui);
    font-size: 0.78rem;
    color: var(--fog);
    letter-spacing: 0.02em;
    padding: 0.6rem 0.2rem 0;
    border-bottom: 1px solid var(--hairline);
    padding-bottom: 0.6rem;
}

.post-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.85rem;
    margin: 2rem 0;
}
.post-gallery .gallery__item { margin: 0; }
.post-gallery img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
    border: 1px solid var(--hairline);
}
.post-gallery figcaption {
    font-family: var(--font-ui);
    font-size: 0.72rem;
    color: var(--fog);
    padding-top: 0.4rem;
}

/* Field note — a margin aside in the clerk's voice */
.field-note {
    font-family: var(--font-ui);
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--parchment);
    background: rgba(139, 58, 42, 0.07);
    border-left: 3px solid var(--amber);
    padding: 1rem 1.25rem;
    margin: 2rem 0;
}
.field-note::before {
    content: 'FIELD NOTE';
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--amber);
    margin-bottom: 0.4rem;
}

/* Sources / Case References */
.post-sources {
    max-width: 760px;
    margin: 3rem auto 0;
    padding-top: 1.5rem;
    border-top: 1px solid var(--amber);
}
.post-sources h2 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--parchment);
    margin-bottom: 1rem;
}
.post-sources ol {
    margin: 0 0 0 1.2rem;
    padding: 0;
}
.post-sources li {
    font-family: var(--font-ui);
    font-size: 0.85rem;
    line-height: 1.55;
    color: var(--fog);
    margin-bottom: 0.6rem;
}
.post-sources a { border-bottom: 1px solid var(--amber); }

/* Episode CTA */
.post-cta {
    text-align: center;
    margin: 3rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid var(--hairline);
}
.post-cta__text {
    font-style: italic;
    color: var(--fog);
    margin-bottom: 1.25rem;
}
.post-cta .btn { margin: 0 0.35rem 0.5rem; }

/* ==========================================================================
   RELATED FILES
   ========================================================================== */

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
}
.related-card {
    background: var(--ink);
    border: 1px solid var(--hairline);
    color: var(--bone);
    transition: border-color 0.3s, transform 0.2s;
    overflow: hidden;
}
.related-card:hover {
    border-color: var(--amber);
    transform: translateY(-2px);
    color: var(--bone);
}
.related-card__thumb {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--slate);
}
.related-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.related-card__body { padding: 1rem 1.1rem; }
.related-card__case {
    font-family: var(--font-ui);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--crimson);
    margin-bottom: 0.3rem;
}
.related-card__title {
    font-family: var(--font-display);
    font-size: 1rem;
    line-height: 1.35;
    color: var(--parchment);
}

@media (max-width: 768px) {
    .post-body > p:first-of-type::first-letter { font-size: 2.6rem; }
}
