/* ==========================================================================
   TECH VINTAGE v2 — Ghost Custom Theme
   Esthétique : Cyberpunk / Néon / Glitch — fond sombre
   ========================================================================== */

:root {
    /* BG */
    --bg: #0c0c14;
    --bg-raised: #12121e;
    --bg-card: #161624;
    --bg-card-hover: #1c1c30;
    --bg-surface: #1e1e32;

    /* Neons */
    --neon-cyan: #00f0ff;
    --neon-magenta: #ff2daa;
    --neon-yellow: #ffe14d;
    --neon-green: #39ff14;

    /* Glow */
    --glow-cyan: rgba(0, 240, 255, 0.15);
    --glow-magenta: rgba(255, 45, 170, 0.12);
    --glow-cyan-strong: rgba(0, 240, 255, 0.35);

    /* Text */
    --text: #d4d4e8;
    --text-bright: #f0f0ff;
    --text-muted: #6a6a88;

    /* Borders */
    --border: #2a2a44;
    --border-hover: #3e3e5e;

    /* Fonts */
    --font-display: 'Instrument Serif', Georgia, serif;
    --font-body: 'DM Sans', -apple-system, sans-serif;
    --font-mono: 'DM Mono', 'SF Mono', monospace;

    /* Layout */
    --content-w: 720px;
    --wide-w: 1200px;
    --gap: clamp(1rem, 3vw, 1.5rem);
    --gap-lg: clamp(2.5rem, 6vw, 5rem);
    --radius: 8px;
    --radius-lg: 12px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.65;
    min-height: 100vh;
}
a { color: inherit; text-decoration: none; transition: color 0.2s; }
img { max-width: 100%; height: auto; display: block; }
::selection { background: var(--neon-magenta); color: #fff; }

/* ---------- Utilities ---------- */
.tv-sep { margin: 0 0.35rem; opacity: 0.3; }

.tv-badge {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--neon-cyan);
    background: var(--glow-cyan);
    padding: 0.25rem 0.65rem;
    border-radius: 3px;
    border: 1px solid rgba(0, 240, 255, 0.2);
    transition: all 0.2s;
}
.tv-badge:hover {
    background: rgba(0, 240, 255, 0.25);
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.2);
}
.tv-badge--sm { font-size: 0.66rem; padding: 0.18rem 0.5rem; }

.tv-btn {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 500;
    padding: 0.5rem 1.1rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    letter-spacing: 0.02em;
}
.tv-btn--primary {
    background: var(--neon-magenta);
    color: #fff;
    box-shadow: 0 0 20px rgba(255, 45, 170, 0.25);
}
.tv-btn--primary:hover {
    background: #ff50be;
    box-shadow: 0 0 30px rgba(255, 45, 170, 0.4);
    color: #fff;
}
.tv-btn--ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
}
.tv-btn--ghost:hover {
    color: var(--neon-cyan);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.1);
}

/* ---------- Scanlines ---------- */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.025) 2px,
        rgba(0, 0, 0, 0.025) 4px
    );
}

/* ---------- HEADER ---------- */
.tv-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(12, 12, 20, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}
.tv-header__inner {
    max-width: var(--wide-w);
    margin: 0 auto;
    padding: 0 var(--gap);
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.tv-logo { flex-shrink: 0; display: flex; align-items: center; }
.tv-logo img { height: 34px; width: auto; }
.tv-logo__text {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-bright);
}

.tv-nav { flex: 1 1 0; display: flex; justify-content: center; min-width: 0; overflow-x: auto; overflow-y: hidden; }

/* Nuclear override — Ghost injects default ul/li styles that break flex nav */
.tv-header .tv-nav__list,
ul.tv-nav__list,
.tv-nav__list,
.tv-header nav ul,
.tv-header .tv-nav ul {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 0.1rem !important;
    list-style: none !important;
    list-style-type: none !important;
    list-style-image: none !important;
    margin: 0 !important;
    padding: 0 !important;
    min-width: 0;
    flex-wrap: nowrap;
}
.tv-header .tv-nav__list > li,
.tv-nav__list > li,
.tv-header nav ul li,
.tv-header .tv-nav ul li {
    list-style: none !important;
    list-style-type: none !important;
    list-style-image: none !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    flex-shrink: 0;
}
.tv-header .tv-nav__list > li::before,
.tv-nav__list > li::before,
.tv-header nav ul li::before {
    content: none !important;
    display: none !important;
}
.tv-header .tv-nav__list > li::marker,
.tv-nav__list > li::marker,
.tv-header nav ul li::marker {
    content: none !important;
    display: none !important;
    font-size: 0 !important;
}
.tv-nav__list::-webkit-scrollbar { display: none; }
.tv-nav__list li a {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-muted);
    padding: 0.35rem 0.55rem;
    border-radius: 4px;
    transition: all 0.2s;
    letter-spacing: 0.01em;
    white-space: nowrap;
}
.tv-nav__list li a:hover {
    color: var(--neon-cyan);
    background: var(--glow-cyan);
}

/* Footer nav — same override */
.tv-footer__col ul {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}
.tv-footer__col ul li {
    list-style: none !important;
    display: block !important;
    margin-bottom: 0.3rem;
}

/* Mobile menu nav — same override */
.tv-mobile-menu__list,
ul.tv-mobile-menu__list {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.1rem !important;
}
.tv-mobile-menu__list > li {
    list-style: none !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
}

.tv-header__actions { display: flex; align-items: center; gap: 0.75rem; flex-shrink: 0; }
.tv-header__link {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    transition: color 0.2s;
}
.tv-header__link:hover { color: var(--neon-cyan); }

.tv-nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
}
.tv-mobile-menu {
    display: none;
    padding: 1rem var(--gap) 1.5rem;
    border-top: 1px solid var(--border);
    background: var(--bg-raised);
}
.tv-mobile-menu.is-open { display: block; }
.tv-mobile-menu__list { list-style: none; display: flex; flex-direction: column; gap: 0.1rem; }
.tv-mobile-menu__list li a {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.88rem;
    color: var(--text-muted);
    padding: 0.6rem 0.75rem;
    border-radius: 4px;
}
.tv-mobile-menu__list li a:hover { color: var(--neon-cyan); background: var(--glow-cyan); }
.tv-mobile-menu__actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

@media (max-width: 1024px) {
    .tv-nav { display: none; }
    .tv-header__actions .tv-btn,
    .tv-header__actions .tv-header__link { display: none; }
    .tv-nav-toggle { display: flex; }
}

/* ---------- HERO ---------- */
.tv-hero {
    max-width: var(--wide-w);
    margin: 0 auto;
    padding: var(--gap-lg) var(--gap) var(--gap);
}
.tv-hero__link {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: center;
    color: inherit;
}
.tv-hero__link:hover .tv-hero__title { color: var(--neon-cyan); }
.tv-hero__image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 3 / 2;
    border: 1px solid var(--border);
    position: relative;
}
.tv-hero__image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.06) 0%, transparent 50%, rgba(255, 45, 170, 0.06) 100%);
    pointer-events: none;
}
.tv-hero__image img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.4s;
}
.tv-hero__link:hover .tv-hero__image img { transform: scale(1.02); }
.tv-hero__content { display: flex; flex-direction: column; gap: 0.75rem; }
.tv-hero__title {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    font-weight: 400;
    line-height: 1.2;
    color: var(--text-bright);
    transition: color 0.25s;
}
.tv-hero__excerpt { font-size: 1rem; color: var(--text); line-height: 1.6; }
.tv-hero__meta { font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-muted); }

@media (max-width: 700px) {
    .tv-hero__link { grid-template-columns: 1fr; gap: 1rem; }
}

/* ---------- DUO ---------- */
.tv-duo { max-width: var(--wide-w); margin: 0 auto; padding: 0 var(--gap) var(--gap); }
.tv-duo__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gap); }
@media (max-width: 600px) { .tv-duo__grid { grid-template-columns: 1fr; } }

/* ---------- CATEGORIES ---------- */
.tv-categories {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 0.85rem 0;
    margin-bottom: var(--gap);
    overflow-x: auto;
}
.tv-categories__inner {
    max-width: var(--wide-w);
    margin: 0 auto;
    padding: 0 var(--gap);
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: center;
}
.tv-categories::-webkit-scrollbar { display: none; }
.tv-cat-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    padding: 0.35rem 0.75rem;
    border-radius: 100px;
    white-space: nowrap;
    transition: all 0.2s;
}
.tv-cat-pill:hover {
    color: var(--neon-magenta);
    border-color: var(--neon-magenta);
    background: var(--glow-magenta);
    box-shadow: 0 0 14px rgba(255, 45, 170, 0.12);
}
.tv-cat-pill__count { font-size: 0.68rem; color: var(--text-muted); opacity: 0.6; }
.tv-cat-pill--sm { font-size: 0.75rem; padding: 0.25rem 0.6rem; }

/* ---------- FEED ---------- */
.tv-feed { padding: var(--gap) 0 var(--gap-lg); }
.tv-feed__inner { max-width: var(--wide-w); margin: 0 auto; padding: 0 var(--gap); }
.tv-feed__heading {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--neon-cyan);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.tv-feed__heading::before {
    content: '//';
    color: var(--text-muted);
    font-weight: 400;
}
.tv-feed__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--gap);
}
@media (max-width: 900px) { .tv-feed__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .tv-feed__grid { grid-template-columns: 1fr; } }

/* ---------- CARD ---------- */
.tv-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s ease;
}
.tv-card:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
    box-shadow:
        0 0 30px rgba(0, 240, 255, 0.05),
        0 8px 32px rgba(0, 0, 0, 0.3);
    transform: translateY(-3px);
}
.tv-card__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
}
.tv-card__link:hover .tv-card__title { color: var(--neon-cyan); }
.tv-card__image {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    position: relative;
}
.tv-card__image::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 50%;
    background: linear-gradient(to top, var(--bg-card) 0%, transparent 100%);
    pointer-events: none;
    opacity: 0.5;
}
.tv-card__image img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.35s;
}
.tv-card:hover .tv-card__image img { transform: scale(1.04); }
.tv-card__body {
    padding: 1.1rem 1.2rem 1.2rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.4rem;
}
.tv-card__title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 400;
    line-height: 1.3;
    color: var(--text-bright);
    transition: color 0.2s;
}
.tv-card__excerpt {
    font-size: 0.86rem;
    color: var(--text-muted);
    line-height: 1.55;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.tv-card__meta {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    padding-top: 0.6rem;
    border-top: 1px solid var(--border);
}
.tv-card--large .tv-card__title { font-size: 1.3rem; }

/* ---------- ARTICLE ---------- */
.tv-article__header {
    padding: var(--gap-lg) var(--gap) 1.5rem;
    text-align: center;
}
.tv-article__header-inner {
    max-width: var(--content-w);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
}
.tv-article__title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 400;
    line-height: 1.15;
    color: var(--text-bright);
}
.tv-article__excerpt {
    font-size: 1.15rem;
    color: var(--text);
    line-height: 1.55;
    max-width: 600px;
}
.tv-article__byline { display: flex; gap: 1rem; margin-top: 0.25rem; }
.tv-author { display: flex; align-items: center; gap: 0.6rem; }
.tv-author__avatar { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--border); }
.tv-author__name { font-weight: 600; font-size: 0.88rem; color: var(--text-bright); }
.tv-author__name:hover { color: var(--neon-cyan); }
.tv-author__meta { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-muted); }

/* Feature image */
.tv-article__feature {
    max-width: 960px;
    margin: 0 auto 2.5rem;
    padding: 0 var(--gap);
}
.tv-article__feature img {
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    width: 100%;
}
.tv-article__feature figcaption {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 0.6rem;
}

/* Article body */
.tv-article__body {
    max-width: var(--content-w);
    margin: 0 auto;
    padding: 0 var(--gap) var(--gap-lg);
}
.gh-content > * + * { margin-top: 1.5rem; }
.gh-content h2 {
    font-family: var(--font-display);
    font-size: 1.7rem;
    font-weight: 400;
    color: var(--text-bright);
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}
.gh-content h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--text-bright);
    margin-top: 2rem;
    font-style: italic;
}
.gh-content h4 {
    font-family: var(--font-mono);
    font-size: 0.88rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--neon-cyan);
    margin-top: 2rem;
}
.gh-content p { font-size: 1.05rem; line-height: 1.75; }
.gh-content strong { font-weight: 600; color: var(--text-bright); }
.gh-content a {
    color: var(--neon-cyan);
    text-decoration: underline;
    text-decoration-color: rgba(0, 240, 255, 0.25);
    text-underline-offset: 3px;
}
.gh-content a:hover { text-decoration-color: var(--neon-cyan); }
.gh-content blockquote {
    border-left: 3px solid var(--neon-magenta);
    padding: 0.25rem 0 0.25rem 1.25rem;
    margin: 2rem 0;
}
.gh-content blockquote p {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-style: italic;
    color: var(--text);
}
.gh-content pre {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.15rem;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.6;
}
.gh-content code {
    font-family: var(--font-mono);
    font-size: 0.85em;
    background: var(--bg-surface);
    padding: 0.15em 0.35em;
    border-radius: 3px;
    color: var(--neon-yellow);
}
.gh-content pre code { background: none; padding: 0; color: var(--text); }
.gh-content ul, .gh-content ol { padding-left: 1.4rem; }
.gh-content li { margin-bottom: 0.4rem; font-size: 1.05rem; }
.gh-content li::marker { color: var(--neon-magenta); }
.gh-content hr { border: none; height: 1px; background: var(--border); margin: 2.5rem 0; }
.gh-content figure { margin: 2rem 0; }
.gh-content figure img { border-radius: var(--radius); border: 1px solid var(--border); }
.gh-content figcaption { font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-muted); text-align: center; margin-top: 0.6rem; }

/* Ghost wide / full */
.gh-content .kg-width-wide {
    max-width: min(960px, calc(100vw - 2 * var(--gap)));
    margin-left: 50%;
    transform: translateX(-50%);
}
.gh-content .kg-width-full { width: 100vw; margin-left: 50%; transform: translateX(-50%); }

/* Bookmark */
.gh-content .kg-bookmark-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.gh-content .kg-bookmark-card:hover { border-color: var(--border-hover); }
.gh-content .kg-bookmark-container { display: flex; color: inherit; }
.gh-content .kg-bookmark-content { flex: 1; padding: 1rem; }
.gh-content .kg-bookmark-title { font-weight: 600; font-size: 0.92rem; color: var(--text-bright); }
.gh-content .kg-bookmark-description { font-size: 0.82rem; color: var(--text-muted); margin-top: 0.25rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gh-content .kg-bookmark-thumbnail { width: 180px; flex-shrink: 0; }
.gh-content .kg-bookmark-thumbnail img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }

/* ---------- ARTICLE FOOTER ---------- */
.tv-article__footer {
    max-width: var(--content-w);
    margin: 0 auto;
    padding: 0 var(--gap) var(--gap-lg);
}
.tv-article__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

/* ---------- RELATED ---------- */
.tv-related {
    background: var(--bg-raised);
    border-top: 1px solid var(--border);
    padding: var(--gap-lg) 0;
}
.tv-related__inner { max-width: var(--wide-w); margin: 0 auto; padding: 0 var(--gap); }

/* ---------- COMMENTS ---------- */
.tv-comments { border-top: 1px solid var(--border); padding: var(--gap-lg) 0; }
.tv-comments__inner { max-width: var(--content-w); margin: 0 auto; padding: 0 var(--gap); }

/* ---------- ARCHIVE ---------- */
.tv-archive__header {
    max-width: var(--wide-w);
    margin: 0 auto;
    padding: var(--gap-lg) var(--gap) var(--gap);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}
.tv-archive__header--author { flex-direction: row; text-align: left; gap: 1.5rem; }
.tv-archive__avatar { width: 72px; height: 72px; border-radius: 50%; border: 3px solid var(--border); }
.tv-archive__title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    color: var(--text-bright);
}
.tv-archive__desc { font-size: 1rem; color: var(--text); max-width: 500px; }
.tv-archive__count { font-family: var(--font-mono); font-size: 0.78rem; color: var(--neon-cyan); }
.tv-archive__location { font-family: var(--font-mono); font-size: 0.82rem; color: var(--text-muted); }

/* ---------- PAGE ---------- */
.tv-page .tv-article__header { padding-bottom: 1rem; }

/* ---------- PAGINATION ---------- */
.tv-pagination {
    max-width: var(--wide-w);
    margin: 0 auto;
    padding: 0 var(--gap) var(--gap-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}
.tv-pagination__link {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--text-muted);
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 0.5rem 1.15rem;
    border-radius: 4px;
    transition: all 0.2s;
}
.tv-pagination__link:hover {
    color: var(--neon-cyan);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 14px rgba(0, 240, 255, 0.12);
}
.tv-pagination__current { font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-muted); }

/* ---------- ERROR ---------- */
.tv-error { display: flex; justify-content: center; align-items: center; min-height: 55vh; padding: var(--gap-lg) var(--gap); text-align: center; }
.tv-error__inner { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; }
.tv-error__code {
    font-family: var(--font-mono);
    font-size: 6rem;
    color: var(--neon-magenta);
    line-height: 1;
    text-shadow: 0 0 40px rgba(255, 45, 170, 0.3);
}
.tv-error__title { font-family: var(--font-display); font-size: 1.5rem; color: var(--text-bright); }
.tv-error__desc { color: var(--text-muted); margin-bottom: 0.5rem; }

/* ---------- FOOTER ---------- */
.tv-footer {
    border-top: 1px solid var(--border);
    background: var(--bg-raised);
    padding: var(--gap-lg) 0 var(--gap);
}
.tv-footer__inner { max-width: var(--wide-w); margin: 0 auto; padding: 0 var(--gap); }
.tv-footer__top { display: flex; justify-content: space-between; gap: var(--gap-lg); margin-bottom: var(--gap-lg); }
.tv-footer__brand { max-width: 360px; }
.tv-footer__logo { height: 30px; width: auto; margin-bottom: 0.75rem; }
.tv-footer__site-name { font-family: var(--font-mono); font-size: 1rem; color: var(--text-bright); display: block; margin-bottom: 0.75rem; }
.tv-footer__desc { font-size: 0.88rem; color: var(--text-muted); line-height: 1.5; }
.tv-footer__links { display: flex; gap: clamp(2rem, 5vw, 4rem); }
.tv-footer__col ul { list-style: none; }
.tv-footer__heading { font-family: var(--font-mono); font-size: 0.7rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.1em; color: var(--neon-cyan); display: block; margin-bottom: 0.65rem; }
.tv-footer__col li { margin-bottom: 0.3rem; }
.tv-footer__col a { font-size: 0.88rem; color: var(--text-muted); }
.tv-footer__col a:hover { color: var(--neon-cyan); }
.tv-footer__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}
.tv-footer__bottom a { color: var(--text-muted); }
.tv-footer__bottom a:hover { color: var(--neon-cyan); }

@media (max-width: 700px) { .tv-footer__top { flex-direction: column; gap: 2rem; } }

/* ---------- INLINE SUBSCRIBE CTA ---------- */
.tv-cta {
    max-width: var(--wide-w);
    margin: 0 auto;
    padding: var(--gap) var(--gap) var(--gap-lg);
}
.tv-cta__box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: clamp(2rem, 5vw, 3rem);
    text-align: center;
    position: relative;
    overflow: hidden;
}
.tv-cta__box::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(0, 240, 255, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 50%, rgba(255, 45, 170, 0.05) 0%, transparent 60%);
    pointer-events: none;
}
.tv-cta__box > * { position: relative; }
.tv-cta__title {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 3vw, 1.8rem);
    font-weight: 400;
    color: var(--text-bright);
    margin-bottom: 0.5rem;
}
.tv-cta__desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    max-width: 480px;
    margin: 0 auto 1.25rem;
    line-height: 1.55;
}
.tv-cta__form {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    max-width: 420px;
    margin: 0 auto;
}
.tv-cta__input {
    flex: 1;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    padding: 0.6rem 1rem;
    border-radius: 4px;
    border: 1px solid var(--border);
    background: var(--bg-surface);
    color: var(--text-bright);
    outline: none;
    transition: border-color 0.2s;
}
.tv-cta__input::placeholder { color: var(--text-muted); }
.tv-cta__input:focus {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.1);
}
.tv-cta__submit {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 500;
    padding: 0.6rem 1.25rem;
    border-radius: 4px;
    border: none;
    background: var(--neon-magenta);
    color: #fff;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    box-shadow: 0 0 20px rgba(255, 45, 170, 0.2);
}
.tv-cta__submit:hover {
    background: #ff50be;
    box-shadow: 0 0 30px rgba(255, 45, 170, 0.35);
}
.tv-cta__note {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.75rem;
}

/* CTA compact (mid-article) */
.tv-cta--compact .tv-cta__box {
    padding: clamp(1.5rem, 3vw, 2rem);
    border-left: 3px solid var(--neon-cyan);
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.tv-cta--compact .tv-cta__text { flex: 1; min-width: 220px; }
.tv-cta--compact .tv-cta__title { font-size: 1.15rem; margin-bottom: 0.25rem; }
.tv-cta--compact .tv-cta__desc { margin: 0; font-size: 0.88rem; }
.tv-cta--compact .tv-cta__actions { flex-shrink: 0; }

/* ---------- Animations ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.tv-card { animation: fadeUp 0.45s ease both; }
.tv-card:nth-child(2) { animation-delay: 0.04s; }
.tv-card:nth-child(3) { animation-delay: 0.08s; }
.tv-card:nth-child(4) { animation-delay: 0.12s; }
.tv-card:nth-child(5) { animation-delay: 0.16s; }
.tv-card:nth-child(6) { animation-delay: 0.20s; }
.tv-hero { animation: fadeUp 0.5s ease both; }

/* ---------- Neon Glow accent on hero card hover ---------- */
.tv-hero__image {
    transition: box-shadow 0.4s;
}
.tv-hero__link:hover .tv-hero__image {
    box-shadow: 0 0 40px rgba(0, 240, 255, 0.1), 0 0 80px rgba(255, 45, 170, 0.05);
}
.tv-card:hover {
    border-color: rgba(0, 240, 255, 0.15);
}

/* ==========================================================================
   TABLE OF CONTENTS
   ========================================================================== */
.tv-toc {
    margin: 0 0 2.5rem;
    padding: 1.25rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    font-family: var(--font-body);
}
.tv-toc__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
}
.tv-toc__title {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--neon-cyan);
}
.tv-toc__icon {
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: transform 0.2s;
}
.tv-toc__list {
    margin-top: 1rem;
    padding: 0;
    list-style: none;
    counter-reset: toc;
}
.tv-toc__item {
    counter-increment: toc;
    margin-bottom: 0.15rem;
}
.tv-toc__item--sub {
    padding-left: 1.25rem;
}
.tv-toc__link {
    display: block;
    font-size: 0.88rem;
    line-height: 1.45;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    color: var(--text);
    transition: all 0.15s;
    border-left: 2px solid transparent;
}
.tv-toc__link:hover {
    color: var(--text-bright);
    background: var(--bg-card-hover);
    border-left-color: var(--neon-cyan);
}
.tv-toc__link.is-active {
    color: var(--neon-cyan);
    background: var(--glow-cyan);
    border-left-color: var(--neon-cyan);
}
.tv-toc__item--sub .tv-toc__link {
    font-size: 0.82rem;
    color: var(--text-muted);
}
.tv-toc__item--sub .tv-toc__link:hover,
.tv-toc__item--sub .tv-toc__link.is-active {
    color: var(--neon-cyan);
}

/* ==========================================================================
   LANGUAGE TOGGLE
   ========================================================================== */
.tv-lang-toggle {
    margin: 0 0 2rem;
}
.tv-lang-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    width: 100%;
    font-family: var(--font-mono);
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text-bright);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 0.85rem 1.5rem;
    cursor: pointer;
    transition: all 0.25s;
    letter-spacing: 0.02em;
}
.tv-lang-btn:hover {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    background: var(--glow-cyan);
    box-shadow: 0 0 24px rgba(0, 240, 255, 0.12);
}
.tv-lang-btn__flag {
    font-size: 1.4rem;
    line-height: 1;
}
