/* ==========================================================================
   CONSTRUCTIVIST TECHNICAL GUIDES THEME
   Faithfully based on the 2001 Constructivist Web Architecture Aesthetic
   ========================================================================== */

/* --- TeX Gyre Font Face Definitions --- */
@font-face {
    font-family: 'TeX Gyre Heros';
    src: url('../src/font/tex-gyre/texgyreheros-regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'TeX Gyre Heros';
    src: url('../src/font/tex-gyre/texgyreheros-bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'TeX Gyre Heros';
    src: url('../src/font/tex-gyre/texgyreheros-italic.woff2') format('woff2');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'TeX Gyre Heros Cn';
    src: url('../src/font/tex-gyre/texgyreheroscn-regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'TeX Gyre Heros Cn';
    src: url('../src/font/tex-gyre/texgyreheroscn-bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'TeX Gyre Cursor';
    src: url('../src/font/tex-gyre/texgyrecursor-regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'TeX Gyre Cursor';
    src: url('../src/font/tex-gyre/texgyrecursor-bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* ==========================================================================
   RESET & BASE STYLING
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* WET Core Color Palette (WCAG 2.1 AAA Compliant) */
    --bg-canvas: #ffffff;
    --bg-page: #eaebed;
    --accent-red: #284162;            /* WET Primary Brand Blue (10.4:1 contrast on white) */
    --accent-red-dark: #193451;       /* WET Dark Navy Blue (12.7:1 contrast on white) */
    --wet-link: #295376;              /* WET Interactive Link Blue (8.1:1 contrast on white) */
    --wet-link-hover: #0535d2;        /* WET Hover/Focus Blue (8.6:1 contrast on white) */
    --text-dark: #333333;             /* WET Primary Text (12.6:1 contrast on white) */
    --text-muted: #555555;            /* WET Secondary Text (7.0:1 contrast on white) */
    --concrete-base: #dcdcdc;         /* WET Border/Divider Gray */
    --concrete-shadow: #8e8e8e;
    --concrete-highlight: #f0f0f0;
    --window-void: #193451;
    --well-bg: #f5f5f5;               /* WET Default Well Background */
    --well-border: #dcdcdc;           /* WET Default Well Border */
    --font-stack: 'TeX Gyre Heros Cn', 'Oswald', Impact, 'Arial Narrow Bold', sans-serif;
    --font-body: 'TeX Gyre Heros', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    --font-code: 'TeX Gyre Cursor', 'Courier New', Courier, monospace;
}

html {
    background-color: var(--bg-page);
}

body {
    background-color: var(--bg-page);
    min-height: 100vh;
    font-family: var(--font-stack);
    text-transform: uppercase;
    -webkit-font-smoothing: antialiased;
    color: var(--text-dark);
}

/* ==========================================================================
   AODA / WCAG 2.1 LEVEL AA ACCESSIBILITY ENHANCEMENTS
   ========================================================================== */

/* WCAG 2.4.7 Focus Visible: Clear, high-contrast 3px focus indicator */
:focus-visible {
    outline: 3px solid var(--text-dark) !important;
    outline-offset: 2px !important;
}

/* High contrast focus on dark surfaces (code bars, dark canvas, etc.) */
.guide-code-bar :focus-visible,
.guide-mobile-bar :focus-visible,
body.home-page :focus-visible {
    outline: 3px solid var(--accent-red) !important;
    outline-offset: 2px !important;
}

/* Screen reader only utility class */
.wb-inv,
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* WET accessibility skip link styling (WCAG 2.4.1 Bypass Blocks) */
#wb-tphp {
    margin: 0;
    padding: 0;
    list-style: none;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 100000;
}

.wb-slc {
    margin: 0;
    padding: 0;
    list-style: none;
}

.wb-sl {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    border: 0;
    white-space: nowrap;
}

.wb-sl:focus,
.wb-sl:focus-visible {
    position: fixed !important;
    top: 14px !important;
    left: 14px !important;
    width: auto !important;
    height: auto !important;
    clip: auto !important;
    clip-path: none !important;
    overflow: visible !important;
    display: inline-block !important;
    padding: 12px 22px !important;
    background-color: var(--accent-red) !important;
    color: #ffffff !important;
    font-family: var(--font-stack) !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important;
    text-decoration: none !important;
    outline: 3px solid #000000 !important;
    outline-offset: 2px !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6) !important;
    z-index: 100000 !important;
}

main#wb-cont:focus,
main.guide-main:focus,
.viewport:focus {
    outline: none !important;
}

/* WCAG 2.3.3 Animation / Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .cursor-square {
        display: none !important;
    }
}

/* ==========================================================================
   HOMEPAGE POSTER / VIEWPORT FRAME
   ========================================================================== */
body.home-page {
    display: flex;
    justify-content: center;
    align-items: stretch;
    padding: 0;
    min-height: 100vh;
    background-color: var(--bg-canvas);
}

.viewport {
    position: relative;
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    background-color: var(--bg-canvas);
    overflow-x: hidden;
    box-shadow: none;
    border: none;
    padding: 28px 48px 60px 48px;
}

/* Film grain / printed ink texture overlay */
.viewport::after,
.guide-layout::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(circle at 50% 50%, rgba(255,255,255,0.08), rgba(0,0,0,0.06)),
        url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.07'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 10;
}

/* ==========================================================================
   CONSTRUCTIVIST NAVIGATION & TYPOGRAPHY COLUMN
   ========================================================================== */
.interface-layer {
    position: relative;
    z-index: 5;
    width: 100%;
    max-width: 1300px;
    margin-top: 10px;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    flex-direction: column;
}

/* --- Top Header Section --- */
.header-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 22px;
}

.header-border {
    height: 3px;
    background-color: var(--accent-red);
    width: 100%;
}

.main-title {
    font-size: 34px;
    line-height: 1.05;
    font-weight: 700;
    color: var(--accent-red);
    letter-spacing: 0.2px;
    padding: 2px 0 1px 0;
}

.main-title a {
    color: inherit;
    text-decoration: none;
}

.status-marquee {
    background-color: var(--accent-red);
    color: #ffffff;
    padding: 10px 14px;
    margin-top: 4px;
    font-size: 10px;
    line-height: 1.35;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.status-marquee p {
    display: flex;
    align-items: center;
}

.cursor-square {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #ffffff;
    margin-left: 3px;
    vertical-align: middle;
}

/* --- General Section Rules --- */
.bureau-section {
    margin-bottom: 24px;
}

.section-heading {
    color: var(--accent-red);
    font-weight: 700;
    letter-spacing: 0.5px;
    line-height: 1.25;
    margin-top: 6px;
    margin-bottom: 8px;
}

/* --- Lists & Nav Items --- */
.film-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 5px;
}

.film-item {
    display: inline-flex;
    align-items: baseline;
    text-decoration: none;
    min-height: 26px;
    padding: 3px 6px;
    width: fit-content;
}

.film-name {
    color: var(--accent-red);
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: 0.25px;
    white-space: nowrap;
    transition: color 0.15s ease;
    padding: 1px 0;
}

/* Homepage full-width list items with title and description side-by-side */
.home-page .film-item {
    display: flex;
    align-items: baseline;
    text-decoration: none;
    min-height: 28px;
    padding: 4px 8px;
    width: 100%;
    white-space: nowrap;
    border-left: 3px solid transparent;
    transition: background-color 0.12s ease, border-left-color 0.12s ease;
}

.home-page .film-item:hover,
.home-page .film-item:focus {
    background-color: #eef2f6;
    border-left-color: var(--accent-red);
}

.home-page .film-name {
    color: var(--accent-red);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.3px;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 220px;
}

.home-page .film-desc {
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.2;
    text-transform: none;
    letter-spacing: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-left: 16px;
}

.home-page .film-item:hover .film-desc,
.home-page .film-item:focus .film-desc {
    color: var(--text-dark);
}

/* Sidebar navigation styling on guide pages */
.guide-sidebar .film-item {
    display: block;
    width: 100%;
    padding: 3px 4px;
    min-height: 22px;
}

.guide-sidebar .film-name {
    color: var(--accent-red);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: 0.15px;
    white-space: normal;
    display: inline-block;
    padding: 2px 4px;
    transition: background-color 0.12s ease, color 0.12s ease;
}

.guide-sidebar .film-item:hover .film-name {
    background-color: var(--text-dark);
    color: #ffffff;
}

/* Active / Selected badge like ANAMORPH in source */
.guide-sidebar .badge,
.film-item.active .badge,
.film-item:hover .badge,
.film-item .badge,
.badge {
    border-radius: 0px !important;
}

.guide-sidebar .film-item.active .badge,
.film-item.active .badge {
    background-color: var(--text-dark);
    color: #ffffff;
    padding: 2px 6px;
    line-height: 1.35;
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    white-space: normal;
}

.film-item.active .film-name {
    color: #ffffff;
}

.film-year,
.red-line,
.vertical-red-ribbon {
    display: none !important;
}

/* --- Music / Secondary Section --- */
.music-section .header-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.sub-domain {
    color: var(--accent-red);
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
}

.sub-heading {
    color: var(--accent-red);
    font-size: 10px;
    font-weight: 700;
    margin-top: 1px;
    margin-bottom: 2px;
}

/* --- Propaganda / Divided Section --- */
.thick-bar {
    height: 13px;
    background-color: var(--accent-red);
    width: 100%;
}

.propaganda-section .section-heading {
    margin: 2px 0;
}

/* --- Directory / Contact Section --- */
.contact-section {
    position: relative;
    margin-top: 12px;
}

.contact-title {
    color: var(--accent-red);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-top: 8px;
    margin-bottom: 4px;
}

.contact-title a {
    color: inherit;
    text-decoration: none;
}
.contact-title a:hover {
    color: var(--text-dark);
}

/* ==========================================================================
   INDIVIDUAL GUIDE PAGE LAYOUT (FULL PAGE WIDTH)
   ========================================================================== */
.guide-wrapper {
    display: flex;
    justify-content: center;
    padding: 0;
    min-height: 100vh;
    width: 100%;
}

.guide-layout {
    position: relative;
    width: 100%;
    max-width: 100%;
    background-color: var(--bg-canvas);
    box-shadow: none;
    border: none;
    display: flex;
    min-height: 100vh;
    overflow: hidden;
}

.guide-sidebar {
    width: 320px;
    flex-shrink: 0;
    border-right: 2px solid #e1e4e7;
    padding: 28px 20px 48px 24px;
    background-color: #f8f9fa;
    position: relative;
    z-index: 5;
}

.guide-sidebar .interface-layer {
    width: 100%;
    margin-top: 0;
    margin-left: 0;
}

.guide-sidebar .vertical-red-ribbon {
    position: relative;
    top: 12px;
    height: 220px;
    width: 100%;
    clip-path: polygon(0 0, 100% 0, 100% 85%, 0 70%);
}

/* Main Content Area - Full Page Width */
.guide-main {
    flex: 1 1 auto;
    width: calc(100% - 320px);
    padding: 36px 48px 80px 48px;
    position: relative;
    z-index: 5;
    background-color: var(--bg-canvas);
}

.guide-content-wrap {
    margin-left: 0;
    margin-right: 0;
    max-width: 100%;
}

/* Header & Breadcrumb */
.guide-main-header {
    border-bottom: 2px solid #e1e4e7;
    padding-bottom: 14px;
    margin-bottom: 24px;
}

.guide-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    color: var(--wet-link);
    text-decoration: none;
    letter-spacing: 0.2px;
    margin-bottom: 14px;
}
.guide-back-btn:hover {
    color: var(--wet-link-hover);
    text-decoration: underline;
}

.guide-tags-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    margin-bottom: 6px;
}

.guide-tag {
    background-color: #e8eef4;
    color: var(--accent-red-dark);
    border: 1px solid #c8d8e8;
    border-radius: 0px !important;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    letter-spacing: 0.2px;
}

.guide-tag.outline {
    background: transparent;
    color: var(--text-dark);
    border: 1px solid #c8d8e8;
}

/* WET Default Heading Font Sizes */
h1, .h1 {
    font-size: 34px !important;
}

h2, .h2 {
    font-size: 26px !important;
}

h3, .h3 {
    font-size: 22px !important;
}

.guide-page-title {
    font-size: 34px;
    line-height: 1.1;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: -0.2px;
    margin-bottom: 8px;
}

.guide-page-subtitle {
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.4;
    color: var(--text-muted);
    text-transform: none;
}

/* Content Body */
.guide-body {
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-dark);
    text-transform: none;
}

.guide-body p,
.guide-body .line {
    margin-bottom: 16px;
}

.guide-body h2,
.guide-body .section-header {
    font-family: var(--font-stack);
    font-size: 26px;
    font-weight: 700;
    color: var(--accent-red);
    text-transform: uppercase;
    border-bottom: 2px solid var(--accent-red);
    padding-bottom: 4px;
    margin-top: 30px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
}

.guide-body h3 {
    font-family: var(--font-stack);
    font-size: 22px;
    font-weight: 700;
    color: var(--accent-red);
    margin-top: 24px;
    margin-bottom: 10px;
}

.guide-body h2::before,
.guide-body .section-header::before {
    display: none !important;
}

.guide-body a {
    color: var(--wet-link);
    text-decoration: underline;
    font-weight: 600;
    transition: color 0.15s ease;
}

.guide-body a:hover,
.guide-body a:focus {
    color: var(--wet-link-hover);
    text-decoration: underline;
}

/* ==========================================================================
   WET DEFAULT COMPONENTS - WELL / INSET CALLOUTS
   ========================================================================== */
.well,
.search-box,
.important,
.guide-alert {
    min-height: 20px;
    padding: 16px 20px;
    margin: 22px 0;
    background-color: var(--well-bg);
    border: 1px solid var(--well-border);
    border-left: 5px solid var(--accent-red);
    border-radius: 0px !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
    font-family: var(--font-body);
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--text-dark);
    text-transform: none;
}

.well b,
.well strong,
.search-box b,
.search-box strong,
.important b,
.important strong {
    color: var(--accent-red);
    font-weight: 700;
}

.well code,
.search-box code,
.important code {
    font-family: var(--font-code);
    font-size: 13px;
    background-color: #eaedf1;
    color: var(--accent-red-dark);
    padding: 2px 5px;
    border: 1px solid #d0d7de;
    border-radius: 3px;
    font-weight: 600;
}

/* --- Code Blocks & Copy Feature --- */
.guide-code-wrap {
    margin: 20px 0;
    border: 2px solid var(--text-dark);
    background-color: #1a1a19;
}

.guide-code-bar {
    background-color: var(--text-dark);
    color: #ffffff;
    padding: 6px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333333;
}

.guide-code-title {
    font-family: var(--font-stack);
    font-size: 12px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0.2px;
    color: #dfded8;
}

.guide-code-title .dot {
    display: none;
}

.guide-copy-btn {
    background: transparent;
    color: #ffffff;
    border: 1px solid #8e8c84;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 600;
    padding: 2px 10px;
    cursor: pointer;
    text-transform: none;
    border-radius: 2px;
    transition: all 0.15s ease;
}

.guide-copy-btn:hover {
    background-color: var(--accent-red);
    border-color: var(--accent-red);
}

.guide-copy-btn.copied {
    background-color: var(--accent-red) !important;
    border-color: var(--accent-red) !important;
}

.guide-code-content,
.code,
pre.multilinecode {
    font-family: var(--font-code) !important;
    font-size: 13.5px;
    line-height: 1.5;
    color: #f2f0e8;
    background-color: #1a1a19;
    padding: 12px 14px;
    margin: 0;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
    text-transform: none;
}

p code, .line code, li code {
    font-family: var(--font-code);
    font-size: 13px;
    background-color: #f2f4f7;
    color: var(--accent-red-dark);
    padding: 2px 5px;
    border: 1px solid #d0d7de;
    border-radius: 3px;
    font-weight: 600;
    text-transform: none;
}

/* Lists & Step Sequences */
.guide-body ol,
.guide-body ul,
.guide-steps-list {
    margin: 16px 0 20px 24px;
    padding: 0;
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-dark);
    text-transform: none;
}

.guide-body ol li,
.guide-body ul li,
.guide-steps-list li {
    margin-bottom: 10px;
    padding-left: 6px;
}

.guide-steps-list li::marker,
.guide-body ol li::marker {
    font-family: var(--font-stack);
    font-weight: 700;
    color: var(--accent-red);
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 22px 0;
    font-family: var(--font-body);
    font-size: 14px;
    background-color: #ffffff;
    border: 1px solid #dcdcdc;
    text-transform: none;
}

table th {
    background-color: var(--accent-red);
    color: #ffffff;
    font-family: var(--font-stack);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    padding: 10px 14px;
    text-align: left;
    border: 1px solid #193451;
}

table td {
    padding: 10px 14px;
    border: 1px solid #dcdcdc;
    color: var(--text-dark);
}

table tr:nth-child(even) td {
    background-color: #f9f9f9;
}

/* Media & WET Multimedia Player (wb-mltmd) */
.video.line {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    margin: 22px 0;
    border: 2px solid var(--text-dark);
    background: #000;
}

.video.line iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

figure.wb-mltmd {
    margin: 22px 0;
    border: 2px solid var(--text-dark);
    background-color: #000000;
}

figure.wb-mltmd figcaption {
    font-family: var(--font-body);
    font-size: 13px;
    line-height: 1.5;
    color: #44433e;
    margin-top: 8px;
    text-transform: none;
    font-style: italic;
    background-color: var(--bg-canvas);
    padding: 6px 0;
}

/* Images, Figures & WET Lightbox (wb-lbx) */
.content img,
.postcontent img,
.guide-body img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 16px 0;
    border: 2px solid var(--text-dark);
}

.guide-figure {
    margin: 22px 0;
    padding: 0;
    display: block;
}

.guide-figure a.wb-lbx {
    display: block;
    position: relative;
    cursor: zoom-in;
    border: 2px solid var(--text-dark);
    background-color: #1a1a19;
    text-decoration: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.guide-figure a.wb-lbx:hover {
    border-color: var(--accent-red);
    box-shadow: 0 6px 18px rgba(187, 24, 31, 0.25);
    transform: translateY(-2px);
}

.guide-figure a.wb-lbx:focus,
.guide-figure a.wb-lbx:focus-visible {
    outline: 3px solid var(--accent-red) !important;
    outline-offset: 3px !important;
}

.guide-figure a.wb-lbx img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 0;
    border: none;
}

.guide-figure a.wb-lbx::after {
    content: "⊕ ENLARGE";
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(21, 21, 19, 0.88);
    color: #ffffff;
    font-family: var(--font-stack);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 4px 8px;
    pointer-events: none;
    transition: background 0.15s ease;
}

.guide-figure a.wb-lbx:hover::after {
    background: var(--accent-red);
}

.guide-figcaption {
    font-family: var(--font-body);
    font-size: 13px;
    line-height: 1.5;
    color: #44433e;
    margin-top: 8px;
    text-transform: none;
    font-style: italic;
}

/* WET Lightbox (Magnific Popup) Theme Styling */
.mfp-bg {
    background: #151513 !important;
    opacity: 0.9 !important;
    z-index: 100000 !important;
}

.mfp-wrap {
    z-index: 100001 !important;
}

/* Target strictly the close button element to prevent double box artifact */
button.mfp-close {
    color: #ffffff !important;
    font-family: var(--font-stack) !important;
    font-size: 32px !important;
    opacity: 0.85 !important;
    top: 15px !important;
    right: 20px !important;
    background: rgba(0, 0, 0, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 0px !important;
    width: 44px !important;
    height: 44px !important;
    line-height: 40px !important;
    text-align: center !important;
    cursor: pointer !important;
    padding: 0 !important;
    margin: 0 !important;
    transition: background 0.15s ease, opacity 0.15s ease !important;
}

button.mfp-close:hover,
button.mfp-close:focus {
    background: var(--accent-red) !important;
    opacity: 1 !important;
    outline: 2px solid #ffffff !important;
}

/* Neutralize the inner span so it does not render a second box or duplicate border */
button.mfp-close span.mfp-close,
span.mfp-close {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    width: auto !important;
    height: auto !important;
    position: static !important;
    display: inline !important;
    padding: 0 !important;
    margin: 0 !important;
    color: inherit !important;
    font-size: inherit !important;
    line-height: inherit !important;
}

/* Suppress any redundant markup placeholder div inside figure */
div.mfp-close {
    display: none !important;
}

.mfp-title {
    font-family: var(--font-stack) !important;
    font-size: 13px !important;
    letter-spacing: 0.5px !important;
    color: #dfded8 !important;
    padding-top: 10px !important;
    text-transform: uppercase !important;
}

.mfp-counter {
    color: #a6a49c !important;
    font-family: var(--font-stack) !important;
    font-size: 12px !important;
}

/* Mobile Toggle Bar */
.guide-mobile-bar {
    display: none;
    background-color: var(--text-dark);
    color: #ffffff;
    padding: 10px 14px;
    border-bottom: 2px solid var(--accent-red);
    align-items: center;
    justify-content: space-between;
}

.guide-mobile-title {
    font-family: var(--font-stack);
    font-size: 15px;
    font-weight: 700;
    color: var(--accent-red);
}

.guide-menu-toggle {
    background: transparent;
    color: #ffffff;
    border: 1px solid var(--accent-red);
    font-family: var(--font-stack);
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    cursor: pointer;
}

/* Responsive */
@media screen and (max-width: 900px) {
    .guide-mobile-bar {
        display: flex;
    }
    .guide-layout {
        flex-direction: column;
    }
    .guide-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 2px solid var(--accent-red);
        display: none;
        padding: 16px;
    }
    .guide-sidebar.open {
        display: block;
    }
    .guide-sidebar .vertical-red-ribbon {
        display: none;
    }
    .guide-content-wrap {
        margin-left: 5%;
        margin-right: 5%;
    }
    .interface-layer {
        margin-left: 20px;
    }
    body.home-page {
        padding: 0;
    }
    .viewport {
        box-shadow: none;
    }
}
