/* Rezilienz Docs Public Theme — Neue Deutsche Härte Edition */

:root {
    --font-sans: 'Mozilla Headline', system-ui, -apple-system, sans-serif;
    --font-serif: 'Atkinson', system-ui, -apple-system, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

    /*
     * Palette: Stahl & Feuer — maximum-contrast NDH light mode
     * White canvas, near-black text, dark steel nav + sidebar,
     * blood-rust primary, acid-green secondary. Loud, brutal, readable.
     */

    --bg-canvas: #f5f3f0;     /* Cold white with faintest warm dust — stark, not cozy */
    --bg-card: #ffffff;        /* Pure white — maximum contrast for content cards */
    --bg-sidebar: #1e1a17;     /* Dark forge steel — hard structural contrast */
    --bg-nav: #141210;         /* Near-black iron — the top rail has mass */

    --text-primary: #0f0d0b;   /* Absolute forge black */
    --text-secondary: #2a2420; /* Very dark near-black brown */
    --text-muted: #6b5e55;     /* Oxidized iron mid-tone */

    /* Sidebar / nav get their own text scale (dark bg) */
    --text-sidebar: #c8c0b8;   /* Brighter — confident light-on-dark, not dim grey */
    --text-sidebar-muted: #7a6e66;
    --text-nav: #e8e2dc;

    --accent-color: #cc4a0a;       /* Blood rust — no apologies */
    --accent-hover: #a83808;       /* Deeper forge, hover state */
    --accent-light: #fff0e8;       /* Barely-there rust wash on white */
    --accent-on-dark: #e8631a;     /* Rust brightened for dark sidebar */

    --accent-2: #8fcc00;           /* Acid yellow-green — electric */
    --accent-2-dark: #6aaa00;      /* Deeper acid for hover */
    --accent-2-light: #f0fad0;     /* Pale acid wash on canvas */
    --accent-2-on-dark: #a8e000;   /* Acid on dark sidebar — neon bolt */

    --border-color: #d8d0c8;       /* Clean structural line on white */
    --border-accent: #f0c8a0;      /* Rust-kissed border */
    --border-strong: #0f0d0b;      /* Black weld seam — maximum weight */
    --border-sidebar: #3a3028;     /* Sidebar internal borders on dark */

    /* Shadows are hard and real */
    --shadow-sm: 0 1px 3px 0 rgba(15, 8, 4, 0.15);
    --shadow-md: 0 4px 8px -1px rgba(15, 8, 4, 0.20), 0 2px 4px -1px rgba(15, 8, 4, 0.12);
    --shadow-lg: 0 10px 20px -3px rgba(15, 8, 4, 0.18), 0 4px 8px -2px rgba(15, 8, 4, 0.10);

    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
}

/* Base resets & styles */
*, ::before, ::after {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-canvas);
    color: var(--text-primary);
    font-family: var(--font-sans);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Heavy Iron Top Nav — this is the machine's top rail */
.top-nav {
    position: sticky;
    top: 0;
    z-index: 40;
    background: var(--bg-nav);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: 5px solid var(--accent-color); /* Blood rust stripe under the black */
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
}

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

.brand-logo {
    width: 32px;
    height: 32px;
    background-color: var(--accent-color);
    border-radius: 3px; /* Nearly square — industrial, not friendly */
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-family: var(--font-sans);
    box-shadow: inset 0 -2px 0 rgba(0,0,0,0.25);
}

.brand-text {
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 0.04em; /* NDH: slightly spaced, not compressed */
    color: var(--text-nav);
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-sidebar);
    font-size: 0.875rem;
    font-weight: 500;
    transition: color var(--transition-fast);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.8rem;
}

.nav-link:hover {
    color: var(--accent-on-dark);
}

.nav-link.github-btn {
    background: var(--accent-2);
    color: #0a1a00;  /* Near-black green text on acid — readable, striking */
    padding: 0.35rem 0.85rem;
    border-radius: 2px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    box-shadow: 0 0 0 1px var(--accent-2-dark);
}

.nav-link.github-btn:hover {
    background: var(--accent-2-on-dark);
    color: #0a1a00;
}

/* Landing/Archive Page Layout */
.hero-section {
    padding: 6rem 2rem 4rem 2rem;
    text-align: center;
    max-w: 800px;
    margin: 0 auto;
}

.hero-tag {
    display: inline-block;
    background-color: var(--accent-2);
    color: #0a1a00;
    padding: 4px 14px;
    border-radius: 0;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    margin-bottom: 1.5rem;
    border: none;
    box-shadow: 3px 3px 0 rgba(0,0,0,0.3); /* Offset shadow — stencil block print */
}

.hero-heading {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 0 0 1.25rem 0;
    color: var(--text-primary);
    line-height: 1.15;
}

.hero-deck {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.list-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem 6rem 2rem;
}

.doc-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.doc-list-item {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--border-strong);
    border-radius: 0;
    padding: 1.25rem 1.75rem;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    position: relative;
}

.doc-list-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
    border-left-color: var(--accent-color);
    border-color: var(--border-color);
    background-color: var(--accent-light);
}

.list-item-content {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex-grow: 1;
}

.list-item-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.015em;
    color: var(--text-primary);
    transition: color var(--transition-fast);
}

.doc-list-item:hover .list-item-title {
    color: var(--accent-color);
}

.list-item-description {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

.list-item-action {
    display: flex;
    align-items: center;
    color: var(--accent-color);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    transition: transform var(--transition-fast);
}

.doc-list-item:hover .list-item-action {
    transform: translateX(4px);
}

/* Three-Column Article Layout */
.docs-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    width: 100%;
    flex-grow: 1;
    /* As a flex child of <body>, min-width:0 prevents it from
       overflowing the viewport even when grid children are wide */
    min-width: 0;
    max-width: 100vw;
    overflow-x: hidden;
}

/* Left Sidebar — dark forge chassis */
.docs-sidebar {
    background-color: var(--bg-sidebar);
    border-right: 3px solid var(--accent-color); /* Rust seam between dark sidebar and light canvas */
    padding: 2.5rem 1.5rem;
    position: sticky;
    top: 64px;
    height: calc(100vh - 64px);
    overflow-y: auto;
}

.sidebar-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-sidebar-muted);
    margin-bottom: 1.25rem;
    padding-left: 0.75rem;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 0.15rem;
}

.sidebar-nav-item {
    margin-bottom: 0.15rem;
    width: 100%;
}

.sidebar-link {
    display: block;
    text-decoration: none;
    color: var(--text-sidebar);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.45rem 0.75rem;
    border-radius: 0;  /* No rounding — hard edges */
    transition: all var(--transition-fast);
    line-height: 1.3;
    border-left: 2px solid transparent;
}

.sidebar-link:hover {
    color: var(--accent-2-on-dark);
    background-color: rgba(168, 224, 0, 0.08);
    border-left-color: var(--accent-2-on-dark);
}

.sidebar-link.active {
    color: var(--accent-2-on-dark);
    background-color: rgba(168, 224, 0, 0.12);
    font-weight: 700;
    border-left: 3px solid var(--accent-2-on-dark);
    padding-left: calc(0.75rem - 1px);
}

/* Main Main reading panel + right TOC sidebar */
.main-wrapper {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 3rem;
    padding: 3rem;
    width: 100%;
    max-width: 1200px;           /* Group content and right TOC cohesively */
    margin: 0 auto;              /* Center reading pane in the remaining viewport space */
    /* Prevent this grid child from overflowing its own parent */
    min-width: 0;
    box-sizing: border-box;
}

/* Main Prose Content Typography (Bitter Serif Focus) */
.docs-content-container {
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    /* Grid/flex children need min-width:0 to respect overflow containment */
    min-width: 0;
}

.prose {
    font-family: var(--font-serif);
    font-size: 1.05rem;
    line-height: 1.55;   /* Down from 1.75 — tighter, denser, more purposeful */
    color: var(--text-secondary);
    /* Needed so pre/table scroll containers work inside grid children */
    min-width: 0;
}

.prose h1, .prose h2, .prose h3, .prose h4 {
    font-family: var(--font-sans);
    color: var(--text-primary);
    font-weight: 800;
    letter-spacing: -0.01em;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    line-height: 1.15;
}

.prose h1 {
    font-size: 2.25rem;
    font-weight: 900;
    border-bottom: 3px solid var(--text-primary); /* Black rule — not grey, not subtle */
    padding-bottom: 0.5rem;
    margin-top: 100px; /* Generous editorial breathing room at the top */
    letter-spacing: -0.02em;
}

.prose h2 {
    font-size: 1.6rem;
    border-bottom: 1px solid var(--border-strong);
    padding-bottom: 0.35rem;
}

.prose h3 {
    font-size: 1.2rem;
    letter-spacing: 0;
}

.prose p {
    margin-top: 0;
    margin-bottom: 0.9rem; /* Tighter paragraph breaks */
}

.prose ul, .prose ol {
    margin-top: 0;
    margin-bottom: 0.9rem;
    padding-left: 1.5rem;
}

.prose li {
    margin-bottom: 0.25rem; /* Tight list items */
    line-height: 1.5;
}

.prose li > ul, .prose li > ol {
    margin-top: 0.25rem;
    margin-bottom: 0.25rem;
}

.prose strong {
    color: var(--text-primary);
    font-weight: 600;
}

.prose a {
    color: var(--accent-color);
    text-decoration: underline;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.prose a:hover {
    color: var(--accent-hover);
}

/* Code block styles */
.prose pre {
    background-color: #111008;  /* Near-black with warm undertone — forge dark */
    color: #e8e4dc;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.5;
    padding: 1.1rem 1.25rem;
    border-radius: 0;           /* Square — industrial, no softening */
    overflow-x: auto;
    border: 1px solid #2a2418;
    border-left: 4px solid var(--accent-color); /* Rust stripe marks the code zone */
    box-shadow: var(--shadow-md);
    margin: 1.25rem 0;
    /* Prevent code blocks from overflowing the page on mobile */
    max-width: 100%;
    word-break: normal;
    white-space: pre;
}

.prose code {
    font-family: var(--font-mono);
    font-size: 0.85em;
    background-color: #eef4d8; /* Pale acid wash */
    color: #3d5800;             /* Deep acid green — readable, industrial */
    padding: 2px 6px;
    border-radius: 2px;
    border: 1px solid #c8d98a;
    font-weight: 500;
}

.prose pre code {
    background-color: transparent;
    color: inherit;
    padding: 0;
    border-radius: 0;
    border: none;
    font-size: inherit;
    font-weight: normal;
}

/* Alert Boxes (GitHub Alerts styled beautifully) */
.prose blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
    border-radius: 2px;
    font-size: 0.975rem;
    font-family: var(--font-sans);
    line-height: 1.6;
    border-left: 4px solid var(--accent-color);
    background-color: var(--accent-light);
    color: var(--text-secondary);
}

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

/* Target alert indicators (NOTE, TIP, IMPORTANT, WARNING, CAUTION) */
.prose blockquote.note {
    border-left-color: #3b82f6; /* Blue */
    background-color: #eff6ff;
}
.prose blockquote.tip {
    border-left-color: #10b981; /* Green */
    background-color: #ecfdf5;
}
.prose blockquote.important {
    border-left-color: #8b5cf6; /* Purple */
    background-color: #f5f3ff;
}
.prose blockquote.warning {
    border-left-color: #f59e0b; /* Amber */
    background-color: #fffbeb;
}
.prose blockquote.caution {
    border-left-color: #ef4444; /* Red */
    background-color: #fef2f2;
}

/* Tables styling */
/* JS (in index.html) wraps every .prose table in a .table-scroll-wrapper
   div at DOMContentLoaded. The wrapper is the scroll container so the
   table can stay a real table (border-collapse etc. intact). */
.prose .table-scroll-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1.5rem 0;
    max-width: 100%;
    width: 100%;
}
.prose .table-scroll-wrapper table {
    margin: 0; /* Wrapper owns the margin */
}

.prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.925rem;
    font-family: var(--font-sans);
    /* Do NOT use display:block — it breaks border-collapse.
       Scrolling is handled by .table-scroll-wrapper. */
}

.prose th, .prose td {
    padding: 0.65rem 1rem;
    border: 1px solid var(--border-color);
    text-align: left;
}

.prose th {
    background-color: var(--bg-sidebar);
    font-weight: 700;
    color: #f0ece6; /* Warm near-white — maximum legibility on dark header row */
    letter-spacing: 0.02em;
}

.prose tr:nth-child(even) {
    background-color: rgba(180, 170, 158, 0.22); /* More assertive stripe */
}

/* Right Sidebar TOC — stark white annotation block, rust stripe anchor */
.docs-toc-container {
    position: sticky;
    top: 196px;                 /* Align with the 100px H1 headline top margin */
    align-self: start;          /* CRITICAL: Prevents stretching down to the bottom of the grid row */
    max-height: calc(100vh - 240px); /* Adjust height to prevent bottom overflow with the new top position */
    overflow-y: auto;
    padding: 1.25rem 1rem;
    background-color: #ffffff;
    border-left: 3px solid var(--accent-color);
    box-shadow: var(--shadow-sm); /* Clean tactile shadow to support floating card aesthetic */
}

.toc-title {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.toc-link {
    display: block;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    transition: color var(--transition-fast);
    line-height: 1.3;
}

.toc-link:hover {
    color: var(--accent-color);
}

.toc-link.active {
    color: var(--accent-color);
    font-weight: 700;
}

.toc-link.indent-3 {
    padding-left: 0.85rem;
}

/* Responsive hamburgers & collapses */
.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-nav);
    cursor: pointer;
    padding: 0.5rem;
}

/* Footer — Light Rust (NDH Warm technical block style) */
.docs-footer {
    border-top: 5px solid var(--accent-color);
    padding: 2rem 1.5rem;
    text-align: center;
    background-color: var(--accent-light);
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    margin-top: auto;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.03);
}

.docs-footer a {
    color: var(--accent-color) !important;
    text-decoration: underline !important;
    font-weight: 800;
}

.docs-footer a:hover {
    color: var(--accent-hover) !important;
    text-decoration: underline !important;
}

/* Scrollbar customizations */
.docs-sidebar::-webkit-scrollbar, .docs-toc-container::-webkit-scrollbar, .prose pre::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

.docs-sidebar::-webkit-scrollbar-track, .docs-toc-container::-webkit-scrollbar-track, .prose pre::-webkit-scrollbar-track {
    background: transparent;
}

.docs-sidebar::-webkit-scrollbar-thumb {
    background: var(--accent-2-on-dark);
    border-radius: 0;
}

.docs-sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--accent-2);
}

.docs-toc-container::-webkit-scrollbar-thumb, .prose pre::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 0;
}

.docs-toc-container::-webkit-scrollbar-thumb:hover, .prose pre::-webkit-scrollbar-thumb:hover {
    background: var(--accent-hover);
}

/* Media Queries for Responsive adjustments */
@media (max-width: 1200px) {
    .docs-layout {
        grid-template-columns: 170px 1fr; /* Reduce left sidebar width symmetrically to 170px */
    }
    
    .docs-sidebar {
        padding: 2.5rem 1rem;             /* Squeeze horizontal padding to prevent link overflow */
    }

    .main-wrapper {
        grid-template-columns: 1fr 170px; /* Reduce width of the Right TOC to give prose room to breathe */
        gap: 1.5rem;                       /* Tighten gap on intermediate screen widths */
    }
}

@media (max-width: 960px) {
    .main-wrapper {
        grid-template-columns: 1fr;       /* Hide TOC and span prose full width */
        padding: 2rem;
    }
    
    .docs-toc-container {
        display: none;                    /* Hide TOC on tablet & mobile viewports */
    }
}

@media (max-width: 768px) {
    /* Grid children default to min-width:auto, letting content blow past
       the container. Setting min-width:0 on every grid/flex child is the
       prerequisite for overflow-x:auto to actually work inside them. */
    .docs-layout {
        grid-template-columns: 1fr;
        min-width: 0;
    }

    .main-wrapper {
        padding: 1rem;   /* Was 1.5rem — saves 1rem total horizontal */
        min-width: 0;
    }

    .docs-content-container {
        min-width: 0;
        max-width: 100%;
    }

    .docs-sidebar {
        display: none;
        position: fixed;
        left: 0;
        top: 64px;
        z-index: 30;
        width: 280px;
        height: calc(100vh - 64px);
    }

    .docs-sidebar.active {
        display: block;
    }

    .mobile-nav-toggle {
        display: block;
    }

    .hero-heading {
        font-size: 2.25rem;
    }

    .prose {
        font-size: 1rem;
    }

    .prose h1 {
        margin-top: 40px;
    }
}

/* ==========================================================================
   Custom Shortcode & Component Enhancements (NDH Brutalist Edition)
   ========================================================================== */

/* 1. Redactions */
.redact {
    background-color: var(--text-primary);
    color: var(--text-primary);
    padding: 0.15rem 0.35rem;
    border-radius: 2px;
    cursor: pointer;
    transition: all var(--transition-fast);
    user-select: none;
    -webkit-user-select: none;
}
.redact:hover {
    background-color: var(--accent-color);
    color: #ffffff;
}

.marker-redacted {
    background-color: var(--text-primary);
    color: #ffffff;
    padding: 0.15rem 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    border-radius: 2px;
    display: inline-block;
}

/* 2. Image & Figure Layouts */
.gallery-single {
    margin: 2rem 0;
    clear: both;
    display: flex;
    flex-direction: column;
}

.gallery-single.inline-image-left,
.gallery-single.vignette-left,
.gallery-single.landscape-left,
.gallery-single.vignette-landscape-left {
    float: left;
    margin-right: 2rem;
    margin-bottom: 1rem;
    clear: left;
}

.gallery-single.inline-image-right,
.gallery-single.vignette-right,
.gallery-single.landscape-right,
.gallery-single.vignette-landscape-right {
    float: right;
    margin-left: 2rem;
    margin-bottom: 1rem;
    clear: right;
}

.photo-wrapper {
    position: relative;
    overflow: hidden;
    display: block;
    width: 100%;
    border: 3px solid var(--border-strong);
    box-shadow: 6px 6px 0 var(--text-primary);
    transition: all var(--transition-fast);
}

.photo-wrapper:hover {
    transform: translate(-2px, -2px);
    box-shadow: 8px 8px 0 var(--accent-color);
}

.photo-wrapper img {
    display: block;
    width: 100%;
    height: auto;
}

.caption {
    text-align: center;
    font-size: 0.75rem;
    font-family: var(--font-sans);
    font-weight: 700;
    color: var(--text-muted);
    margin-top: 0.75rem;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.img--xsmall {
    width: 100%;
    max-width: 250px;
}
@media (min-width: 640px) {
    .img--xsmall {
        width: 25%;
    }
}

.img--small {
    width: 100%;
    max-width: 350px;
}
@media (min-width: 640px) {
    .img--small {
        width: 37.5%;
    }
}

.img--medium {
    width: 100%;
    max-width: 450px;
}
@media (min-width: 640px) {
    .img--medium {
        width: 50%;
    }
}

.img--large {
    width: 100%;
    max-width: 550px;
}
@media (min-width: 640px) {
    .img--large {
        width: 62.5%;
    }
}

.img--xlarge {
    width: 100%;
    max-width: 650px;
}
@media (min-width: 640px) {
    .img--xlarge {
        width: 75%;
    }
}

.figure-full {
    width: 100%;
    margin: 3rem 0;
    clear: both;
}

/* 3. Highlights & Intents */
.intent-primary {
    color: var(--accent-color);
    font-weight: 700;
}

.intent-warning {
    background-color: var(--accent-2-light);
    color: #3d5800;
    border: 1px solid #c8d98a;
    padding: 0.15rem 0.35rem;
    font-size: 0.9em;
    font-family: var(--font-sans);
    font-weight: 700;
    display: inline-block;
}

.intent-danger {
    background-color: var(--accent-light);
    color: var(--accent-color);
    border: 1px solid var(--border-accent);
    padding: 0.15rem 0.35rem;
    font-size: 0.9em;
    font-family: var(--font-sans);
    font-weight: 700;
    display: inline-block;
}

.intent-secondary {
    color: var(--text-muted);
    font-weight: 500;
}

/* 4. Typewriter / Sidebar Blocks */
.typewriter-text {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    line-height: 1.5;
    background-color: var(--bg-nav);
    color: var(--text-sidebar);
    border-left: 5px solid var(--accent-2);
    padding: 1.5rem;
    margin: 2rem 0;
    clear: both;
    box-shadow: var(--shadow-md);
}
.typewriter-text p {
    color: inherit;
    font-size: inherit;
    margin-bottom: 0.75rem;
}
.typewriter-text p:last-child {
    margin-bottom: 0;
}

/* 5. Infobox Blocks */
.infobox-text {
    padding: 1.5rem;
    margin: 2rem 0;
    border: 2px dashed var(--border-color);
    clear: both;
    font-family: var(--font-sans);
    line-height: 1.5;
}
.infobox-text p {
    color: inherit;
    margin-bottom: 0.75rem;
}
.infobox-text p:last-child {
    margin-bottom: 0;
}
.infobox-text.intent-warning {
    background-color: var(--accent-2-light);
    border-color: var(--accent-2);
    color: #3d5800;
    display: block;
}
.infobox-text.intent-danger {
    background-color: var(--accent-light);
    border-color: var(--accent-color);
    color: var(--accent-color);
    display: block;
}

/* 6. Quotes & Citations */
blockquote.pullquote {
    float: right;
    width: 100%;
    margin: 1.5rem 0;
    border-left: none;
    border-top: 3px solid var(--border-strong);
    border-bottom: 3px solid var(--border-strong);
    padding: 1.5rem 0;
    text-align: center;
    font-size: 1.5rem;
    font-family: var(--font-sans);
    font-weight: 800;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: -0.01em;
    line-height: 1.25;
}
@media (min-width: 640px) {
    blockquote.pullquote {
        width: 50%;
        margin-left: 2rem;
    }
}

blockquote.epigraph {
    max-width: 500px;
    margin: 2rem auto;
    border-left: none;
    border-right: 4px solid var(--accent-color);
    padding: 0.5rem 1.5rem 0.5rem 0;
    text-align: right;
    font-style: italic;
    font-size: 1.1rem;
    color: var(--text-secondary);
    background-color: transparent;
}

blockquote.excerpt {
    background-color: var(--accent-light);
    border-left: 6px solid var(--accent-color);
    font-weight: 700;
    padding: 1.5rem;
    margin: 2rem 0;
    box-shadow: var(--shadow-sm);
    font-size: 1.15rem;
    line-height: 1.5;
}

.attribution {
    display: block;
    margin-top: 0.75rem;
    font-size: 0.7rem;
    font-family: var(--font-sans);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--accent-color);
    font-style: normal;
}
.attribution::before {
    content: "— SOURCE: ";
}

/* 7. Specialized Layout Components */
.component-team_bio {
    background-color: var(--bg-card);
    padding: 2rem;
    margin: 2.5rem 0;
    border: 3px solid var(--border-strong);
    border-left: 24px solid var(--bg-sidebar);
    position: relative;
    box-shadow: 6px 6px 0 var(--text-primary);
}
.component-team_bio::before {
    content: "PERSONNEL FILE // RESTR.";
    position: absolute;
    top: 1rem;
    left: -18px;
    transform: rotate(90deg);
    transform-origin: left;
    font-size: 0.55rem;
    font-weight: 800;
    color: var(--text-sidebar);
    letter-spacing: 0.15em;
    white-space: nowrap;
}

.component-report_cta {
    background-color: var(--bg-sidebar);
    color: var(--text-sidebar);
    padding: 2.5rem;
    margin: 3rem 0;
    border-top: 8px solid var(--accent-color);
    position: relative;
    box-shadow: var(--shadow-lg);
}
.component-report_cta h3 {
    color: #ffffff;
    font-size: 1.75rem;
    font-family: var(--font-sans);
    font-weight: 800;
    text-transform: uppercase;
    margin-top: 0;
    margin-bottom: 1rem;
    letter-spacing: 0.02em;
}
.component-report_cta .cta-button {
    display: inline-block;
    margin-top: 1.5rem;
    background-color: var(--accent-color);
    color: #ffffff;
    font-family: var(--font-sans);
    font-weight: 700;
    padding: 0.75rem 2rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-decoration: none;
    border: 2px solid var(--accent-color);
    transition: all var(--transition-fast);
}
.component-report_cta .cta-button:hover {
    background-color: transparent;
    color: var(--accent-on-dark);
    border-color: var(--accent-on-dark);
}

.component-specialCTA {
    border: 4px double var(--accent-color);
    padding: 2rem;
    margin: 2rem 0;
    text-align: center;
    background-color: var(--bg-card);
    box-shadow: 4px 4px 0 rgba(0,0,0,0.15);
}
.component-specialCTA h3 {
    color: var(--text-primary);
    font-size: 1.8rem;
    font-family: var(--font-sans);
    font-weight: 800;
    margin-top: 0;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.component-report_header {
    border-top: 2px solid var(--text-primary);
    border-bottom: 2px solid var(--text-primary);
    padding: 1rem 0;
    margin: 2rem 0;
    text-align: center;
    font-family: var(--font-sans);
    font-weight: 800;
    font-size: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    background: repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(15, 13, 11, 0.04) 10px, rgba(15, 13, 11, 0.04) 20px);
}

/* ==========================================================================
   Mobile — Code Block & Table Overflow Fixes
   ========================================================================== */

@media (max-width: 768px) {
    /* Code blocks scroll within their own box. max-width:100% + overflow-x:auto
       on the pre works because its ancestor chain now has min-width:0 (set above). */
    .prose pre {
        font-size: 0.8rem;
        padding: 0.9rem 1rem;
        max-width: 100%;
        overflow-x: auto;
        /* Browsers: overflow-x:auto on pre is respected when parents have
           min-width:0. No overflow-x:hidden on .prose (that would clip this). */
    }

    /* Inline code: let long identifiers wrap rather than stretch the line */
    .prose code {
        word-break: break-word;
    }

    /* Table cells: tighter padding buys a little extra column space before scroll kicks in */
    .prose th,
    .prose td {
        padding: 0.5rem 0.65rem;
        font-size: 0.875rem;
    }

    /* Typewriter / monospace blocks get the same internal-scroll treatment */
    .typewriter-text {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        word-break: break-word;
        max-width: 100%;
    }
}
