/* ============================================
   Terminal Tribune — CRT Terminal Mode
   Retro-futuristic 80s Monitor Interface
   Amber phosphor on dark CRT screen
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');

/* ═══════════════════════════════════════
   1. TOGGLE BUTTON (both modes)
   ═══════════════════════════════════════ */

.terminal-toggle {
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 10000;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    border: 2px solid rgba(92, 58, 30, 0.6);
    background: rgba(62, 37, 16, 0.9);
    color: #D9C9A8;
    font-family: 'VT323', monospace;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.4);
    line-height: 1;
    user-select: none;
}

.terminal-toggle:hover {
    background: rgba(184, 150, 62, 0.95);
    color: #3E2510;
    transform: scale(1.08);
    border-color: #B8963E;
}

body.terminal-mode .terminal-toggle {
    border-color: rgba(255, 176, 0, 0.5);
    background: rgba(255, 176, 0, 0.08);
    color: #FFB000;
    box-shadow:
        0 0 15px rgba(255, 176, 0, 0.15),
        inset 0 0 8px rgba(255, 176, 0, 0.05);
}

body.terminal-mode .terminal-toggle:hover {
    background: rgba(255, 176, 0, 0.2);
    text-shadow: 0 0 8px rgba(255, 176, 0, 0.8);
}

/* ── Radio Toggle Button ──────────────── */
.radio-toggle {
    position: fixed;
    top: 65px;
    left: 15px;
    z-index: 10000;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    border: 2px solid rgba(92, 58, 30, 0.6);
    background: rgba(62, 37, 16, 0.9);
    color: #D9C9A8;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.4);
    line-height: 1;
    user-select: none;
}

.radio-toggle:hover {
    background: rgba(184, 150, 62, 0.95);
    color: #3E2510;
    transform: scale(1.08);
    border-color: #B8963E;
}

.radio-toggle.active {
    border-color: rgba(165, 214, 111, 0.6);
    background: rgba(62, 37, 16, 0.95);
    color: #A5D66F;
    box-shadow: 0 0 12px rgba(165, 214, 111, 0.2);
}

body.terminal-mode .radio-toggle {
    border-color: rgba(255, 176, 0, 0.3);
    background: rgba(255, 176, 0, 0.05);
    color: rgba(255, 176, 0, 0.5);
}

body.terminal-mode .radio-toggle.active {
    border-color: rgba(255, 176, 0, 0.6);
    background: rgba(255, 176, 0, 0.1);
    color: #FFB000;
    box-shadow: 0 0 12px rgba(255, 176, 0, 0.2);
}

body.terminal-mode .radio-toggle:hover {
    background: rgba(255, 176, 0, 0.2);
    text-shadow: 0 0 8px rgba(255, 176, 0, 0.8);
}

/* ── Language Toggle Button (DE/EN) ──────── */
.lang-toggle {
    position: fixed;
    top: 115px;
    left: 15px;
    z-index: 10000;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    border: 2px solid rgba(92, 58, 30, 0.6);
    background: rgba(62, 37, 16, 0.9);
    color: #D9C9A8;
    font-family: 'Playfair Display', serif;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.4);
    line-height: 1;
    user-select: none;
    letter-spacing: 1px;
}

.lang-toggle:hover {
    background: rgba(184, 150, 62, 0.95);
    color: #3E2510;
    transform: scale(1.08);
    border-color: #B8963E;
}

.lang-toggle.active {
    border-color: rgba(70, 130, 180, 0.6);
    background: rgba(62, 37, 16, 0.95);
    color: #6BA4D4;
    box-shadow: 0 0 12px rgba(70, 130, 180, 0.2);
}

body.terminal-mode .lang-toggle {
    border-color: rgba(255, 176, 0, 0.5);
    background: rgba(255, 176, 0, 0.08);
    color: #FFB000;
    font-family: 'VT323', monospace;
    font-size: 16px;
}

body.terminal-mode .lang-toggle.active {
    border-color: rgba(255, 176, 0, 0.8);
    background: rgba(255, 176, 0, 0.15);
    color: #FFB000;
    box-shadow: 0 0 15px rgba(255, 176, 0, 0.3);
    text-shadow: 0 0 8px rgba(255, 176, 0, 0.6);
}

body.terminal-mode .lang-toggle:hover {
    background: rgba(255, 176, 0, 0.2);
    text-shadow: 0 0 8px rgba(255, 176, 0, 0.8);
}

.lang-toggle.unavailable {
    opacity: 0.3;
    cursor: default;
    pointer-events: none;
}

.article-text-en {
    display: none;
}

@media (max-width: 768px) {
    .radio-toggle {
        width: 36px;
        height: 36px;
        top: 52px;
        left: 10px;
    }

    .lang-toggle {
        width: 36px;
        height: 36px;
        font-size: 11px;
        top: 94px;
        left: 10px;
    }
}


/* ═══════════════════════════════════════
   2. TERMINAL MODE — VARIABLES & BASE
   ═══════════════════════════════════════ */

body.terminal-mode {
    --t-bg: #0a0800;
    --t-screen: #0c0a02;
    --t-amber: #FFB000;
    --t-amber-dim: #806000;
    --t-amber-mid: #CC8C00;
    --t-amber-bright: #FFD866;
    --t-amber-glow: rgba(255, 176, 0, 0.4);
    --t-border: rgba(255, 176, 0, 0.2);
    --t-border-bright: rgba(255, 176, 0, 0.45);

    background: #111 !important;
    background-image:
        radial-gradient(ellipse at 50% 100%, #1a1508 0%, #0a0a0a 70%) !important;
}


/* ═══════════════════════════════════════
   3. CRT MONITOR FRAME (PAGE-WRAPPER)
   ═══════════════════════════════════════ */

body.terminal-mode .page-wrapper {
    background-color: var(--t-screen);
    max-width: 1200px;
    min-height: 100vh;
    position: relative;
    overflow: hidden;

    /* 3D Bezel — thick frame with lighting */
    border: 22px solid;
    border-color: #3a3632 #2a2826 #1a1816 #2a2826;
    border-radius: 18px;

    /* Depth & glow */
    box-shadow:
        /* Thin inner screen edge */
        inset 0 0 0 2px #080600,
        /* Inner phosphor glow */
        inset 0 0 80px rgba(255, 176, 0, 0.03),
        inset 0 0 20px rgba(255, 176, 0, 0.02),
        /* Outer monitor edge */
        0 0 0 1px #111,
        0 0 0 3px #2a2826,
        0 0 0 4px #111,
        /* Drop shadow on desk */
        0 8px 40px rgba(0, 0, 0, 0.7),
        0 2px 10px rgba(0, 0, 0, 0.5),
        /* Ambient screen glow */
        0 5px 60px rgba(255, 176, 0, 0.04);

    /* Grid layout for sidebar nav */
    display: grid;
    grid-template-columns: 54px 1fr;
    grid-template-rows: auto 1fr auto;
}

/* Paper texture overrides — replace with CRT effects */
body.terminal-mode .page-wrapper::before {
    background: none;
}

body.terminal-mode .page-wrapper::after {
    background: none;
}


/* ═══════════════════════════════════════
   4. SCANLINES OVERLAY
   ═══════════════════════════════════════ */

body.terminal-mode .page-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent 0px,
        transparent 2px,
        rgba(0, 0, 0, 0.1) 2px,
        rgba(0, 0, 0, 0.1) 4px
    );
    pointer-events: none;
    z-index: 500;
    border-radius: inherit;
}


/* ═══════════════════════════════════════
   5. VIGNETTE / SCREEN CURVATURE
   ═══════════════════════════════════════ */

body.terminal-mode .page-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        ellipse at center,
        transparent 55%,
        rgba(0, 0, 0, 0.2) 80%,
        rgba(0, 0, 0, 0.5) 100%
    );
    pointer-events: none;
    z-index: 501;
    border-radius: inherit;
}


/* ═══════════════════════════════════════
   6. CRT ANIMATIONS
   ═══════════════════════════════════════ */

/* Subtle screen flicker */
@keyframes crt-subtle {
    0%   { opacity: 0.985; }
    50%  { opacity: 1; }
    100% { opacity: 0.985; }
}

body.terminal-mode .page-wrapper {
    animation: crt-subtle 4s ease-in-out infinite;
}

/* CRT turn-on effect */
@keyframes crt-on {
    0% {
        filter: brightness(15);
        transform: scaleY(0.005) scaleX(0.4);
        opacity: 1;
    }
    35% {
        filter: brightness(8);
        transform: scaleY(0.005) scaleX(0.7);
    }
    50% {
        filter: brightness(2.5);
        transform: scaleY(1.05) scaleX(0.97);
    }
    70% {
        filter: brightness(1.3);
        transform: scale(1.01);
    }
    100% {
        filter: brightness(1);
        transform: scale(1);
    }
}

body.terminal-mode .page-wrapper.crt-boot {
    animation: crt-on 0.6s ease-out;
}

/* Cursor blink */
@keyframes cursor-blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

.t-cursor {
    animation: cursor-blink 0.8s step-end infinite;
    color: var(--t-amber);
}

/* LED pulse */
@keyframes led-pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}


/* ═══════════════════════════════════════
   7. GRID PLACEMENT
   ═══════════════════════════════════════ */

body.terminal-mode .site-header {
    grid-column: 1 / -1;
}

body.terminal-mode .site-nav {
    grid-column: 1;
    grid-row: 2;
}

body.terminal-mode .content-layout,
body.terminal-mode .telegraph-fullpage,
body.terminal-mode .main-content {
    grid-column: 2;
    grid-row: 2;
}

body.terminal-mode .site-footer {
    grid-column: 1 / -1;
}


/* ═══════════════════════════════════════
   8. TERMINAL HEADER
   ═══════════════════════════════════════ */

/* Hide newspaper header */
body.terminal-mode .site-header a {
    display: none;
}

body.terminal-mode .site-header {
    background: transparent;
    padding: 0;
    text-align: left;
}

body.terminal-mode .site-header::before {
    display: none;
}

body.terminal-mode .site-header::after {
    display: none;
}

/* Terminal header (injected by JS) */
.terminal-header-content {
    display: none;
}

body.terminal-mode .terminal-header-content {
    display: block;
    padding: 14px 20px 10px;
    border-bottom: 1px solid var(--t-border);
    font-family: 'VT323', monospace;
    position: relative;
    z-index: 2;
}

/* Top status bar */
.t-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: var(--t-amber-dim);
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.t-led {
    color: #00cc00;
    font-size: 8px;
    text-shadow: 0 0 6px #00cc00, 0 0 12px rgba(0, 204, 0, 0.3);
    animation: led-pulse 2s ease-in-out infinite;
    margin-right: 6px;
    vertical-align: middle;
}

.t-sys {
    font-size: 13px;
    color: var(--t-amber-dim);
}

.t-date {
    font-size: 13px;
    color: var(--t-amber-dim);
}

/* Main title */
.t-header-title {
    font-size: 44px;
    font-family: 'VT323', monospace;
    color: var(--t-amber);
    letter-spacing: 8px;
    text-align: center;
    text-shadow:
        0 0 10px rgba(255, 176, 0, 0.6),
        0 0 30px rgba(255, 176, 0, 0.3),
        0 0 60px rgba(255, 176, 0, 0.1);
    line-height: 1;
    padding: 6px 0;
}

.t-header-sub {
    font-size: 15px;
    color: var(--t-amber-dim);
    text-align: center;
    letter-spacing: 4px;
    margin-bottom: 6px;
}

.t-header-line {
    color: var(--t-amber-dim);
    text-align: center;
    font-size: 14px;
    letter-spacing: 2px;
    overflow: hidden;
    opacity: 0.5;
}


/* ═══════════════════════════════════════
   9. SIDEBAR NAVIGATION
   ═══════════════════════════════════════ */

body.terminal-mode .site-nav {
    flex-direction: column;
    background: rgba(255, 176, 0, 0.02);
    border-top: none;
    border-bottom: none;
    border-right: 1px solid var(--t-border);
    padding: 0;
    position: sticky;
    top: 0;
    box-shadow: none;
    align-self: start;
    height: fit-content;
}

body.terminal-mode .site-nav ul {
    flex-direction: column;
    width: 100%;
}

body.terminal-mode .site-nav li {
    width: 100%;
}

/* Show Telegraph on all screen sizes */
body.terminal-mode .nav-mobile-only {
    display: list-item !important;
}

/* Nav links → icon buttons */
body.terminal-mode .site-nav a {
    font-size: 0;
    padding: 16px 0;
    text-align: center;
    border-right: none;
    border-bottom: 1px solid var(--t-border);
    color: var(--t-amber-dim);
    font-family: 'VT323', monospace;
    transition: all 0.2s;
    position: relative;
}

body.terminal-mode .site-nav a::before {
    font-size: 22px;
    display: block;
    line-height: 1;
}

/* Icon assignment by href */
body.terminal-mode .site-nav a[href$="index.html"]::before {
    content: '⌂';
}

body.terminal-mode .site-nav a[href$="archiv.html"]::before {
    content: '▤';
}

body.terminal-mode .site-nav a[href$="sonderblatt.html"]::before {
    content: '✦';
}

body.terminal-mode .site-nav a[href$="radio.html"]::before {
    content: '♫';
}

body.terminal-mode .site-nav a[href$="slots.html"]::before {
    content: '♠';
}

body.terminal-mode .site-nav a[href$="telegraph.html"]::before {
    content: '⚡';
}

/* Hover & active */
body.terminal-mode .site-nav a:hover,
body.terminal-mode .site-nav a.active {
    background: rgba(255, 176, 0, 0.1);
    color: var(--t-amber);
    text-shadow: 0 0 10px rgba(255, 176, 0, 0.5);
}

/* Active indicator bar */
body.terminal-mode .site-nav a.active::after {
    content: '';
    position: absolute;
    right: 0;
    top: 20%;
    bottom: 20%;
    width: 2px;
    background: var(--t-amber);
    box-shadow: 0 0 6px var(--t-amber);
}

/* Tooltip labels */
body.terminal-mode .site-nav a[href$="index.html"]::after {
    content: 'HOME';
}

body.terminal-mode .site-nav a[href$="archiv.html"]::after {
    content: 'ARCH';
}

body.terminal-mode .site-nav a[href$="sonderblatt.html"]::after {
    content: 'XTRA';
}

body.terminal-mode .site-nav a[href$="radio.html"]::after {
    content: 'RADIO';
}

body.terminal-mode .site-nav a[href$="slots.html"]::after {
    content: 'SLOTS';
}

body.terminal-mode .site-nav a[href$="telegraph.html"]::after {
    content: 'FEED';
}

body.terminal-mode .site-nav a:not(.active)::after {
    content: attr(data-t-label);
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(10, 8, 0, 0.95);
    border: 1px solid var(--t-border);
    color: var(--t-amber);
    font-size: 11px;
    font-family: 'VT323', monospace;
    padding: 3px 8px;
    white-space: nowrap;
    letter-spacing: 1px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 600;
}

body.terminal-mode .site-nav a:not(.active):hover::after {
    opacity: 1;
}

/* Hide ticker bar in terminal mode */
body.terminal-mode .ticker-bar {
    display: none;
}

body.terminal-mode .site-nav {
    top: 0;
}


/* ═══════════════════════════════════════
   10. CONTENT AREA — GLOBAL TEXT
   ═══════════════════════════════════════ */

body.terminal-mode .main-content {
    padding: 24px;
}

body.terminal-mode .content-layout {
    display: block;
}

/* Global amber text */
body.terminal-mode,
body.terminal-mode .page-wrapper {
    color: var(--t-amber-mid);
}

body.terminal-mode h1,
body.terminal-mode h2,
body.terminal-mode h3 {
    font-family: 'VT323', monospace !important;
    color: var(--t-amber) !important;
    text-shadow:
        0 0 5px rgba(255, 176, 0, 0.4),
        0 0 15px rgba(255, 176, 0, 0.15);
}

body.terminal-mode p,
body.terminal-mode span,
body.terminal-mode li {
    font-family: 'VT323', monospace;
    color: var(--t-amber-mid);
}

body.terminal-mode a {
    font-family: 'VT323', monospace;
    color: var(--t-amber);
    text-decoration: none;
}

body.terminal-mode a:hover {
    color: var(--t-amber-bright);
    text-shadow: 0 0 8px rgba(255, 176, 0, 0.5);
}


/* ═══════════════════════════════════════
   11. SECTION HEADERS & DIVIDERS
   ═══════════════════════════════════════ */

body.terminal-mode .section-header {
    margin-bottom: 20px;
    padding-bottom: 10px;
}

body.terminal-mode .section-header::before,
body.terminal-mode .section-header::after {
    border-color: var(--t-border);
    border-bottom: none;
    padding-top: 0;
}

body.terminal-mode .section-header h2 {
    background: var(--t-screen);
    font-size: 1.4rem;
    letter-spacing: 3px;
}

body.terminal-mode .section-header h2::after {
    content: none;
}

body.terminal-mode .divider::before {
    border-color: var(--t-border);
    border-bottom: none;
    padding-top: 0;
}

body.terminal-mode .divider span {
    background: var(--t-screen);
    color: var(--t-amber-dim);
}


/* ═══════════════════════════════════════
   12. FEATURED ARTICLE
   ═══════════════════════════════════════ */

body.terminal-mode .featured-card {
    border: 1px solid var(--t-border);
    background: rgba(255, 176, 0, 0.02);
    transition: all 0.2s;
}

body.terminal-mode .featured-card:hover {
    border-color: var(--t-border-bright);
    box-shadow:
        0 0 20px rgba(255, 176, 0, 0.08),
        inset 0 0 30px rgba(255, 176, 0, 0.02);
    transform: none;
}

body.terminal-mode .featured-card::before {
    border-color: var(--t-border);
}

body.terminal-mode .featured-card img {
    filter: sepia(100%) saturate(400%) hue-rotate(5deg) brightness(0.5) contrast(1.4);
}

body.terminal-mode .featured-info {
    border-color: var(--t-border);
    background: rgba(255, 176, 0, 0.03);
}

body.terminal-mode .featured-info::before {
    color: var(--t-amber-dim);
}

body.terminal-mode .featured-type {
    background: rgba(255, 176, 0, 0.15);
    color: var(--t-amber);
    border: 1px solid var(--t-border);
    font-family: 'VT323', monospace;
    font-size: 0.9rem;
    letter-spacing: 2px;
}

body.terminal-mode .featured-date {
    font-style: normal;
    color: var(--t-amber-dim);
    font-family: 'VT323', monospace;
}


/* ═══════════════════════════════════════
   13. ARTICLE GRID CARDS
   ═══════════════════════════════════════ */

body.terminal-mode .article-card {
    border: 1px solid var(--t-border);
    background: rgba(255, 176, 0, 0.02);
    transition: all 0.2s;
}

body.terminal-mode .article-card:hover {
    border-color: var(--t-border-bright);
    box-shadow: 0 0 15px rgba(255, 176, 0, 0.06);
    transform: none;
}

body.terminal-mode .article-card img {
    filter: sepia(100%) saturate(400%) hue-rotate(5deg) brightness(0.5) contrast(1.4);
}

body.terminal-mode .article-card .card-info {
    border-color: var(--t-border);
    background: rgba(255, 176, 0, 0.03);
}

body.terminal-mode .card-type {
    background: rgba(255, 176, 0, 0.12);
    color: var(--t-amber);
    font-family: 'VT323', monospace;
    font-size: 0.85rem;
}

body.terminal-mode .card-date {
    font-style: normal;
    color: var(--t-amber-dim);
    font-family: 'VT323', monospace;
}

body.terminal-mode .article-card .card-info h3 {
    font-size: 1.1rem;
}


/* ═══════════════════════════════════════
   14. NEWSFEED SIDEBAR (hidden)
   ═══════════════════════════════════════ */

body.terminal-mode .newsfeed-sidebar {
    display: none;
}

/* ── Weather Widget (Terminal Mode) ────── */
body.terminal-mode .sidebar-weather {
    display: none;
}

/* ── Puzzle Widget (Terminal Mode) ────── */
body.terminal-mode .sidebar-puzzle {
    display: none;
}

/* ── Noir-Rätsel Fallseite (Terminal Mode) ── */
body.terminal-mode .raetsel-masthead {
    background: var(--t-bg);
    border-bottom-color: var(--t-border);
}
body.terminal-mode .raetsel-masthead::before,
body.terminal-mode .raetsel-masthead::after,
body.terminal-mode .raetsel-corners-bottom::before,
body.terminal-mode .raetsel-corners-bottom::after {
    border-color: var(--t-amber-dim);
}
body.terminal-mode .raetsel-ornament-top,
body.terminal-mode .raetsel-ornament-bottom {
    color: var(--t-amber-dim);
}
body.terminal-mode .raetsel-title {
    font-family: 'VT323', monospace;
    color: var(--t-amber);
    text-shadow: 0 0 8px rgba(255, 176, 0, 0.3);
}
body.terminal-mode .raetsel-subtitle {
    font-family: 'VT323', monospace;
    color: var(--t-amber-dim);
}
body.terminal-mode .raetsel-rule {
    border-color: var(--t-border);
}
body.terminal-mode .raetsel-case {
    border-bottom-color: var(--t-border);
}
body.terminal-mode .raetsel-case-label,
body.terminal-mode .raetsel-days-label,
body.terminal-mode .raetsel-puzzle-label {
    font-family: 'VT323', monospace;
    color: var(--t-amber-dim);
}
body.terminal-mode .raetsel-case-title {
    font-family: 'VT323', monospace;
    color: var(--t-amber);
}
body.terminal-mode .raetsel-case-intro {
    font-family: 'VT323', monospace;
    color: var(--t-amber-dim);
}
body.terminal-mode .raetsel-progress-bar {
    border-bottom-color: var(--t-border);
}
body.terminal-mode .raetsel-dot {
    border-color: var(--t-border);
}
body.terminal-mode .raetsel-dot.solved {
    background-color: var(--t-amber);
    border-color: var(--t-amber);
    box-shadow: 0 0 6px rgba(255, 176, 0, 0.4);
}
body.terminal-mode .raetsel-dot.today {
    border-color: var(--t-amber);
}
body.terminal-mode .raetsel-progress-text {
    font-family: 'VT323', monospace;
    color: var(--t-amber-dim);
}
body.terminal-mode .raetsel-puzzle-section {
    border-bottom-color: var(--t-border);
}
body.terminal-mode .raetsel-day {
    border-color: var(--t-border);
}
body.terminal-mode .raetsel-day.solved {
    border-color: var(--t-amber);
    background-color: rgba(255, 176, 0, 0.05);
}
body.terminal-mode .raetsel-day.today {
    border-color: var(--t-amber);
}
body.terminal-mode .raetsel-day-label {
    font-family: 'VT323', monospace;
    color: var(--t-amber);
}
body.terminal-mode .raetsel-day-badge {
    font-family: 'VT323', monospace;
    border-color: var(--t-border);
}
body.terminal-mode .raetsel-day-badge.solved {
    background-color: var(--t-amber);
    color: var(--t-bg);
    border-color: var(--t-amber);
}
body.terminal-mode .raetsel-day-badge.today {
    border-color: var(--t-amber);
    color: var(--t-amber);
}
body.terminal-mode .raetsel-day-hint {
    font-family: 'VT323', monospace;
    color: var(--t-amber-dim);
}
body.terminal-mode .raetsel-day-hint.today-hint {
    color: var(--t-amber);
}
body.terminal-mode .raetsel-solution-section.visible {
    border-color: var(--t-amber);
    background: rgba(255, 176, 0, 0.05);
}
body.terminal-mode .raetsel-solution-badge {
    font-family: 'VT323', monospace;
    color: var(--t-amber);
    text-shadow: 0 0 10px rgba(255, 176, 0, 0.5);
}
body.terminal-mode .raetsel-solution-text {
    font-family: 'VT323', monospace;
    color: var(--t-amber-dim);
}
body.terminal-mode .raetsel-solution-locked {
    font-family: 'VT323', monospace;
    color: var(--t-amber-dim);
}

/* ── Karikatur Widget (Terminal Mode) ────── */
body.terminal-mode .sidebar-karikatur {
    display: none;
}

/* ── Telegraph Widget (Terminal Mode) ────── */
body.terminal-mode .sidebar-telegraph {
    display: none;
}


/* ═══════════════════════════════════════
   15. TELEGRAPH PAGE
   ═══════════════════════════════════════ */

body.terminal-mode .telegraph-fullpage {
    grid-column: 2;
    grid-row: 2;
    background: rgba(10, 8, 0, 0.4);
}

/* --- Header --- */
body.terminal-mode .telegraph-fullpage .newsfeed-header {
    background: rgba(255, 176, 0, 0.04);
    color: var(--t-amber);
    border-bottom: 1px solid var(--t-border);
    border-top: 2px solid #00cc00;
    font-family: 'VT323', monospace;
    font-size: 1.1rem;
    letter-spacing: 6px;
    text-shadow: 0 0 8px rgba(255, 176, 0, 0.4);
    padding: 12px 18px;
}

/* Art-Deco-Ornament ersetzen */
body.terminal-mode .telegraph-fullpage .newsfeed-header::after {
    content: '════════════════════════════════';
    display: block;
    font-family: 'VT323', monospace;
    font-size: 0.7rem;
    color: var(--t-amber-dim);
    letter-spacing: 0;
    margin-top: 6px;
    opacity: 0.5;
}

/* --- Header Label Switching --- */
.t-telegraph-label {
    display: none;
}

.t-telegraph-original {
    display: inline;
}

body.terminal-mode .t-telegraph-label {
    display: inline;
}

body.terminal-mode .t-telegraph-original {
    display: none;
}

/* --- Status-Zeile (injected by JS) --- */
.telegraph-status {
    display: none;
}

body.terminal-mode .telegraph-status {
    display: flex;
    justify-content: space-between;
    font-family: 'VT323', monospace;
    font-size: 14px;
    color: var(--t-amber-dim);
    padding: 6px 18px;
    border-bottom: 1px solid var(--t-border);
    background: rgba(255, 176, 0, 0.02);
    letter-spacing: 1px;
}

.telegraph-status .t-status-led {
    color: #00cc00;
    text-shadow: 0 0 6px #00cc00;
}

/* --- News Items --- */
body.terminal-mode .news-item {
    border-bottom: 1px dashed rgba(255, 176, 0, 0.12);
    border-left: 2px solid transparent;
    padding-left: 16px;
    transition: all 0.15s;
}

body.terminal-mode .news-item:hover {
    background: rgba(255, 176, 0, 0.05);
    border-left-color: var(--t-amber);
    box-shadow: inset 4px 0 12px rgba(255, 176, 0, 0.04);
}

/* Source as [TAG] */
body.terminal-mode .news-source {
    color: var(--t-amber);
    font-family: 'VT323', monospace;
    font-size: 0.75rem;
    letter-spacing: 1px;
}

body.terminal-mode .news-source::before {
    content: '[';
    color: var(--t-amber-dim);
}

body.terminal-mode .news-source::after {
    content: ']';
    color: var(--t-amber-dim);
}

/* Title */
body.terminal-mode .news-title {
    color: var(--t-amber-mid);
    font-family: 'VT323', monospace;
    font-size: 1.05rem;
    text-shadow: 0 0 3px rgba(255, 176, 0, 0.1);
}

body.terminal-mode .news-item:hover .news-title {
    color: var(--t-amber);
    text-shadow: 0 0 6px rgba(255, 176, 0, 0.3);
}

/* Time */
body.terminal-mode .news-time {
    color: var(--t-amber-dim);
    font-family: 'VT323', monospace;
    font-size: 0.75rem;
    letter-spacing: 1px;
}

body.terminal-mode .news-time::before {
    content: '› ';
    color: var(--t-amber-dim);
    opacity: 0.5;
}


/* ═══════════════════════════════════════
   16. FOOTER → STATUS BAR
   ═══════════════════════════════════════ */

body.terminal-mode .site-footer {
    background: rgba(255, 176, 0, 0.03);
    border-top: 1px solid var(--t-border);
    padding: 8px 20px;
    text-align: left;
}

body.terminal-mode .site-footer::before {
    display: none;
}

body.terminal-mode .site-footer::after {
    display: none;
}

body.terminal-mode .footer-logo {
    display: none;
}

body.terminal-mode .footer-text {
    font-family: 'VT323', monospace;
    color: var(--t-amber-dim);
    font-size: 14px;
    letter-spacing: 1px;
}


/* ═══════════════════════════════════════
   17. ARCHIVE PAGE
   ═══════════════════════════════════════ */

body.terminal-mode .archive-grid {
    column-gap: 15px;
}

body.terminal-mode .archive-item {
    border: 1px solid var(--t-border);
    background: rgba(255, 176, 0, 0.02);
}

body.terminal-mode .archive-item:hover {
    border-color: var(--t-border-bright);
    box-shadow: 0 0 12px rgba(255, 176, 0, 0.06);
    transform: none;
}

body.terminal-mode .archive-item img {
    filter: sepia(100%) saturate(400%) hue-rotate(5deg) brightness(0.5) contrast(1.4);
}

body.terminal-mode .archive-item .item-info {
    border-color: var(--t-border);
    background: rgba(255, 176, 0, 0.03);
}

body.terminal-mode .archive-item .item-info h3 {
    font-family: 'VT323', monospace;
    color: var(--t-amber);
}

body.terminal-mode .item-type {
    background: rgba(255, 176, 0, 0.12);
    color: var(--t-amber);
    font-family: 'VT323', monospace;
}

body.terminal-mode .item-date {
    color: var(--t-amber-dim);
    font-family: 'VT323', monospace;
    font-style: normal;
}

/* Filter buttons */
body.terminal-mode .filter-btn {
    font-family: 'VT323', monospace;
    font-size: 1rem;
    border-color: var(--t-border);
    color: var(--t-amber-dim);
    background: transparent;
}

body.terminal-mode .filter-btn:hover,
body.terminal-mode .filter-btn.active {
    background: rgba(255, 176, 0, 0.15);
    color: var(--t-amber);
    border-color: var(--t-border-bright);
}


/* ═══════════════════════════════════════
   18. ARTICLE PAGE — TEXT MODE
   ═══════════════════════════════════════ */

body.terminal-mode .artikel-container {
    text-align: left;
    padding: 24px;
}

body.terminal-mode .artikel-type {
    background: rgba(255, 176, 0, 0.15);
    color: var(--t-amber);
    border: none;
    font-family: 'VT323', monospace;
    font-size: 1rem;
}

body.terminal-mode .artikel-title {
    font-family: 'VT323', monospace;
    color: var(--t-amber);
    text-shadow: 0 0 8px rgba(255, 176, 0, 0.3);
}

body.terminal-mode .artikel-date {
    font-style: normal;
    color: var(--t-amber-dim);
    font-family: 'VT323', monospace;
}

/* Amber filter on article images */
body.terminal-mode .artikel-image {
    filter: sepia(100%) saturate(400%) hue-rotate(5deg) brightness(0.5) contrast(1.4);
    border-color: var(--t-border);
}

/* Article text (hidden by default, shown in terminal mode) */
.article-text {
    display: none;
}

body.terminal-mode .article-text {
    display: block !important;
    font-family: 'VT323', monospace;
    font-size: 19px;
    line-height: 1.5;
    color: var(--t-amber-mid);
    white-space: pre-wrap;
    padding: 20px 0;
    text-align: left;
    max-width: 80ch;
}

/* Terminal-Modus: EN aktiv → deutschen Text verstecken, englischen zeigen */
body.terminal-mode.lang-en .article-text {
    display: none !important;
}

body.terminal-mode.lang-en .article-text-en {
    display: block !important;
    font-family: 'VT323', monospace;
    font-size: 19px;
    line-height: 1.5;
    color: var(--t-amber-mid);
    white-space: pre-wrap;
    padding: 20px 0;
    text-align: left;
    max-width: 80ch;
}

/* When text is available, hide the image */
body.terminal-mode .article-text-available .artikel-image {
    display: none;
}

body.terminal-mode .artikel-back {
    font-family: 'VT323', monospace;
    color: var(--t-amber);
    border-color: var(--t-border);
    font-size: 1rem;
}

body.terminal-mode .artikel-back:hover {
    background: rgba(255, 176, 0, 0.15);
    color: var(--t-amber-bright);
    border-color: var(--t-border-bright);
}

/* Art Deco text view im Terminal-Modus ausblenden */
body.terminal-mode .article-text-toggle {
    display: none !important;
}

body.terminal-mode .deco-text-view {
    display: none !important;
}


/* ═══════════════════════════════════════
   18b. ARTICLE NAVIGATION (Prev/Next)
   ═══════════════════════════════════════ */

.artikel-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 25px;
}

body.terminal-mode .artikel-nav {
    border-top: 1px solid var(--t-border);
    padding-top: 15px;
    margin-top: 20px;
}


/* ═══════════════════════════════════════
   18c. SONDERBLATT CAROUSEL (Terminal)
   ═══════════════════════════════════════ */

body.terminal-mode .sonder-carousel {
    display: none;
}

body.terminal-mode .sonder-nav {
    display: none;
}

body.terminal-mode .sonder-page-dots {
    display: none;
}

body.terminal-mode .sonder-artikel-head {
    border-bottom-color: var(--t-border);
    background: rgba(255, 176, 0, 0.02);
}

body.terminal-mode .sonder-artikel-head::before,
body.terminal-mode .sonder-artikel-head::after,
body.terminal-mode .sonder-corners-bottom::before,
body.terminal-mode .sonder-corners-bottom::after {
    border-color: var(--t-border);
}

body.terminal-mode .sonder-ornament,
body.terminal-mode .sonder-ornament-bottom {
    color: var(--t-amber-dim);
}

body.terminal-mode .sonder-artikel-badge {
    background: rgba(255, 176, 0, 0.15);
    color: var(--t-amber);
    border-color: var(--t-border);
    font-family: 'VT323', monospace;
}

body.terminal-mode .sonder-artikel-image {
    filter: sepia(100%) saturate(400%) hue-rotate(5deg) brightness(0.5) contrast(1.4);
    border-color: var(--t-border);
}

body.terminal-mode .sonder-artikel-back {
    font-family: 'VT323', monospace;
    color: var(--t-amber);
    border-color: var(--t-border);
    font-size: 1rem;
}

body.terminal-mode .sonder-artikel-back:hover {
    background: rgba(255, 176, 0, 0.15);
    color: var(--t-amber-bright);
    border-color: var(--t-border-bright);
}


/* ═══════════════════════════════════════
   19. IMPRESSUM PAGE
   ═══════════════════════════════════════ */

body.terminal-mode .impressum-container h1 {
    font-family: 'VT323', monospace;
    color: var(--t-amber);
}

body.terminal-mode .impressum-ornament {
    color: var(--t-amber-dim);
}

body.terminal-mode .impressum-section h2 {
    font-family: 'VT323', monospace;
    color: var(--t-amber);
    border-bottom-color: var(--t-border);
}

body.terminal-mode .impressum-section p {
    font-family: 'VT323', monospace;
    color: var(--t-amber-mid);
}

body.terminal-mode .impressum-back {
    font-family: 'VT323', monospace;
    color: var(--t-amber);
    border-color: var(--t-border);
}

body.terminal-mode .impressum-back:hover {
    background: rgba(255, 176, 0, 0.15);
    color: var(--t-amber-bright);
}


/* ═══════════════════════════════════════
   20. HEART / LIKE SYSTEM (Terminal Mode)
   ═══════════════════════════════════════ */

body.terminal-mode .like-heart {
    color: var(--t-amber-dim);
    font-family: 'VT323', monospace;
}

body.terminal-mode .like-heart:hover {
    color: var(--t-amber);
    text-shadow: 0 0 8px rgba(255, 176, 0, 0.5);
}

body.terminal-mode .like-heart.liked {
    color: var(--t-amber);
    text-shadow: 0 0 6px rgba(255, 176, 0, 0.6), 0 0 15px rgba(255, 176, 0, 0.3);
}

body.terminal-mode .like-heart-card {
    opacity: 0.4;
}

body.terminal-mode .like-heart-card:hover,
body.terminal-mode .like-heart-card.liked {
    opacity: 1;
}

body.terminal-mode .like-heart-detail {
    color: var(--t-amber-dim);
}

body.terminal-mode .like-heart-detail.liked {
    color: var(--t-amber);
    text-shadow: 0 0 8px rgba(255, 176, 0, 0.6), 0 0 20px rgba(255, 176, 0, 0.3);
}

body.terminal-mode .like-heart-textview {
    color: var(--t-amber-dim);
}

body.terminal-mode .like-heart-textview.liked {
    color: var(--t-amber);
    text-shadow: 0 0 8px rgba(255, 176, 0, 0.6), 0 0 20px rgba(255, 176, 0, 0.3);
}


/* ═══════════════════════════════════════
   21. MONITOR BRANDING
   ═══════════════════════════════════════ */

.monitor-brand {
    display: none;
}

body.terminal-mode .monitor-brand {
    display: block;
    position: fixed;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'VT323', monospace;
    font-size: 11px;
    color: #3a3632;
    letter-spacing: 3px;
    z-index: 600;
    user-select: none;
    pointer-events: none;
}


/* ═══════════════════════════════════════
   21. RESPONSIVE
   ═══════════════════════════════════════ */

@media (max-width: 768px) {
    body.terminal-mode .page-wrapper {
        border-width: 14px;
        border-radius: 12px;
        grid-template-columns: 44px 1fr;
    }

    body.terminal-mode .site-nav a {
        padding: 12px 0;
    }

    body.terminal-mode .site-nav a::before {
        font-size: 18px;
    }

    .t-header-title {
        font-size: 28px;
        letter-spacing: 4px;
    }

    .t-header-top {
        font-size: 11px;
    }

    .t-header-sub {
        font-size: 12px;
        letter-spacing: 2px;
    }

    .terminal-toggle {
        width: 36px;
        height: 36px;
        font-size: 14px;
        top: 10px;
        left: 10px;
    }
}

@media (max-width: 480px) {
    body.terminal-mode .page-wrapper {
        border-width: 8px;
        border-radius: 8px;
        grid-template-columns: 36px 1fr;
    }

    body.terminal-mode .site-nav a {
        padding: 10px 0;
    }

    body.terminal-mode .site-nav a::before {
        font-size: 16px;
    }

    .t-header-title {
        font-size: 22px;
        letter-spacing: 2px;
    }

    .t-header-sub {
        font-size: 11px;
        letter-spacing: 1px;
    }

    .terminal-toggle {
        width: 32px;
        height: 32px;
        font-size: 13px;
        top: 8px;
        left: 8px;
    }

    .radio-toggle {
        width: 32px;
        height: 32px;
        top: 46px;
        left: 8px;
    }

    .lang-toggle {
        width: 32px;
        height: 32px;
        font-size: 10px;
        top: 84px;
        left: 8px;
    }
}

/* ═══════════════════════════════════════
   SHARE SYSTEM (Terminal Mode)
   ═══════════════════════════════════════ */

body.terminal-mode .share-card-btn {
    color: var(--t-amber-dim);
    font-family: 'VT323', monospace;
}

body.terminal-mode .share-card-btn:hover {
    color: var(--t-amber);
    text-shadow: 0 0 6px rgba(255, 176, 0, 0.4);
}

body.terminal-mode .share-card-btn.share-copied {
    color: var(--t-amber);
    text-shadow: 0 0 8px rgba(255, 176, 0, 0.6);
}

body.terminal-mode .share-trigger {
    font-family: 'VT323', monospace;
    color: var(--t-amber-dim);
    border-color: var(--t-border);
    font-size: 0.85rem;
    letter-spacing: 2px;
}

body.terminal-mode .share-trigger:hover,
body.terminal-mode .share-open .share-trigger {
    color: var(--t-amber);
    border-color: var(--t-amber);
    text-shadow: 0 0 6px rgba(255, 176, 0, 0.4);
}

body.terminal-mode .share-link {
    font-family: 'VT323', monospace;
    color: var(--t-amber-dim);
    font-size: 0.9rem;
}

body.terminal-mode .share-link:hover {
    color: var(--t-amber);
    border-color: var(--t-border);
    text-shadow: 0 0 6px rgba(255, 176, 0, 0.4);
}

body.terminal-mode .share-icon {
    font-size: 1rem;
}

body.terminal-mode .share-copied {
    color: var(--t-amber) !important;
    text-shadow: 0 0 8px rgba(255, 176, 0, 0.6);
}

body.terminal-mode .share-native {
    color: var(--t-amber-dim);
}

body.terminal-mode .share-native:hover {
    color: var(--t-amber);
    text-shadow: 0 0 8px rgba(255, 176, 0, 0.5);
}

/* Mobile: Terminal Bottom-Sheet */
@media (max-width: 768px) {
    body.terminal-mode .share-open .share-options {
        background: var(--t-bg);
        border-top: 1px solid var(--t-amber);
        box-shadow: 0 -4px 20px rgba(255, 176, 0, 0.1);
    }

    body.terminal-mode .share-open .share-options .share-link {
        border-color: var(--t-border);
    }
}
