/* ===== Theme Variables ===== */
:root {
    --bg: #1a1a2e;
    --bg-surface: #24243e;
    --bg-surface-hover: #2c2c4a;
    --text: #f0ece4;
    --text-muted: #9a96a8;
    --accent: #2a9bc7;
    --accent-hover: #35b0de;
    --warm: #e8752a;
    --warm-hover: #f58a42;
    --gold: #f5c842;
    --border: #3a3a5c;
    --radius: 8px;
    --content-width: 820px;
    --page-width: 1200px;
}

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--accent-hover);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ===== Typography ===== */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.35rem; }

/* ===== Nav ===== */
.site-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--page-width);
    margin: 0 auto;
    padding: 1rem 1.5rem;
}

.site-nav-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
}

.site-nav-logo:hover {
    color: var(--accent);
}

.site-nav-logo img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.site-header {
    border-bottom: 2px solid var(--warm);
}

/* ===== Hero / Featured Article ===== */
.hero {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 2.5rem;
}

.hero-image {
    width: 100%;
    aspect-ratio: 3 / 2;
    max-height: 420px;
    object-fit: cover;
    display: block;
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2.5rem 2rem 1.5rem;
    background: linear-gradient(
        transparent 0%,
        rgba(26, 26, 46, 0.4) 30%,
        rgba(26, 26, 46, 0.85) 60%,
        rgba(26, 26, 46, 0.95) 100%
    );
}

.hero-overlay h1 {
    margin-bottom: 0.4rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7), 0 1px 3px rgba(0, 0, 0, 0.5);
}

.hero-overlay p {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 600px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.hero-meta {
    margin-top: 0.6rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

/* ===== Article Cards ===== */
.article-feed {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.article-card {
    display: flex;
    gap: 1.25rem;
    background: var(--bg-surface);
    border-radius: var(--radius);
    overflow: hidden;
    border-left: 3px solid transparent;
    transition: border-color 0.2s, background 0.2s;
}

.article-card:hover {
    border-left-color: var(--accent);
    background: var(--bg-surface-hover);
}

.article-card-thumb {
    width: 240px;
    min-height: 160px;
    object-fit: cover;
    flex-shrink: 0;
}

.article-card-body {
    padding: 1.25rem 1.25rem 1.25rem 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.article-card-body h3 {
    margin-bottom: 0.4rem;
}

.article-card-body h3 a {
    color: var(--text);
}

.article-card-body h3 a:hover {
    color: var(--accent);
}

.article-card-excerpt {
    color: var(--text-muted);
    font-size: 0.95rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card-meta {
    margin-top: 0.6rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ===== Page Container ===== */
.page-container {
    max-width: var(--page-width);
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* ===== Article Detail ===== */
.article-detail {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

.article-detail-header {
    margin-bottom: 2rem;
}

.article-detail-cover {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.article-detail-header h1 {
    margin-bottom: 0.5rem;
}

.article-detail-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.article-detail-divider {
    border: none;
    height: 2px;
    background: var(--warm);
    margin: 1.5rem 0 2rem;
    width: 60px;
}

.article-detail-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.article-detail-content h2 {
    margin: 2rem 0 0.75rem;
}

.article-detail-content h3 {
    margin: 1.5rem 0 0.5rem;
}

.article-detail-content p {
    margin-bottom: 1.25rem;
}

.article-detail-content pre {
    position: relative;
    background: var(--bg-surface);
    border-radius: var(--radius);
    padding: 1.25rem;
    overflow-x: auto;
    margin-bottom: 1.25rem;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}

.code-copy-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.25rem 0.6rem;
    background: var(--bg);
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.75rem;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s, background 0.2s, color 0.2s;
}

.article-detail-content pre:hover .code-copy-btn {
    opacity: 1;
}

.code-copy-btn:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.article-detail-content code {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.88em;
}

.article-detail-content p code {
    background: var(--bg-surface);
    padding: 0.15em 0.4em;
    border-radius: 4px;
}

.article-detail-content img {
    border-radius: var(--radius);
    margin: 1.5rem 0;
}

.article-detail-content blockquote {
    border-left: 3px solid var(--warm);
    padding-left: 1.25rem;
    color: var(--text-muted);
    margin: 1.25rem 0;
    font-style: italic;
}

.article-detail-content .video-embed {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    margin: 1.5rem 0;
    border-radius: var(--radius);
}

.article-detail-content .video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.article-detail-content video {
    max-width: 100%;
    border-radius: var(--radius);
    margin: 1.5rem 0;
}

.article-detail-content .sticker {
    display: inline-block;
    height: 3em;
    width: auto;
    vertical-align: middle;
    margin: 0 0.15em;
}

.article-detail-content .sticker[data-size="small"] {
    height: 1.5em;
}

.article-detail-content .sticker[data-size="large"] {
    height: 6em;
}

.article-detail-content ul,
.article-detail-content ol {
    margin: 0.5em 0 1.25rem;
    padding-left: 1.5em;
}

.article-detail-content li {
    margin-bottom: 0.3em;
}

.article-detail-content img:not(.sticker) {
    cursor: zoom-in;
}

.article-detail-content u {
    text-decoration-color: var(--accent);
}

.article-detail-content s {
    opacity: 0.6;
}

.article-detail-content hr {
    border: none;
    height: 1px;
    background: var(--border);
    margin: 2rem 0;
}

/* ===== Article End Cap (LISA) ===== */
.article-endcap {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.article-endcap img {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

.article-endcap-bubble {
    background: var(--bg-surface);
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    color: var(--text-muted);
    font-size: 0.9rem;
    position: relative;
}

/* ===== LISA Inline Comments ===== */
.lisa-comment-block {
    margin: 1.5rem 0;
    border-radius: var(--radius);
    background: var(--bg-surface);
    border-left: 3px solid var(--gold);
    overflow: hidden;
    transition: border-color 0.2s;
}

.lisa-comment-block:hover {
    border-left-color: var(--warm);
}

.lisa-comment-toggle {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    text-align: left;
}

.lisa-comment-toggle:hover {
    background: var(--bg-surface-hover);
}

.lisa-comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.lisa-comment-name {
    font-weight: 600;
    color: var(--gold);
}

.lisa-comment-chevron {
    margin-left: auto;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid var(--text-muted);
    transition: transform 0.2s;
}

.lisa-comment-block.collapsed .lisa-comment-chevron {
    transform: rotate(-90deg);
}

.lisa-comment-body {
    padding: 0 1rem 1rem;
    color: var(--text-muted);
    font-style: italic;
    line-height: 1.6;
    max-height: 200px;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.2s;
    opacity: 1;
}

.lisa-comment-block.collapsed .lisa-comment-body {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
}

/* ===== Newsletter Signup ===== */
.newsletter-signup {
    margin: 3rem auto 2rem;
    max-width: var(--content-width);
    background: var(--bg-surface);
    border-radius: var(--radius);
    border-top: 3px solid var(--warm);
    padding: 2rem 2rem 2.25rem;
}

.newsletter-signup-inner {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 2rem;
    align-items: center;
}

.newsletter-signup-text h3 {
    font-size: 1.35rem;
    color: var(--gold);
    margin-bottom: 0.5rem;
}

.newsletter-signup-text p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.55;
    margin: 0;
}

.newsletter-form-row {
    display: flex;
    gap: 0.6rem;
}

.newsletter-form-input {
    flex: 1;
    padding: 0.7rem 0.9rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.2s, background 0.2s;
    min-width: 0;
}

.newsletter-form-input:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--bg-surface-hover);
}

.newsletter-form-input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.newsletter-form-submit {
    padding: 0.7rem 1.25rem;
    background: var(--warm);
    color: #fff;
    border: 1px solid var(--warm);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
    white-space: nowrap;
}

.newsletter-form-submit:hover:not(:disabled) {
    background: var(--warm-hover);
    border-color: var(--warm-hover);
    transform: translateY(-1px);
}

.newsletter-form-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.newsletter-form-status {
    margin-top: 0.6rem;
    font-size: 0.85rem;
    min-height: 1.2em;
    color: var(--text-muted);
}

.newsletter-form-status.is-error {
    color: #f58a8a;
}

.newsletter-form-status:empty {
    display: none;
}

.newsletter-form-success {
    text-align: center;
    padding: 1rem 0;
}

.newsletter-form-success h3 {
    color: var(--gold);
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.newsletter-form-success p {
    color: var(--text);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
}

@media (max-width: 720px) {
    .newsletter-signup {
        padding: 1.5rem 1.25rem 1.75rem;
        margin: 2rem auto 1.5rem;
    }

    .newsletter-signup-inner {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .newsletter-form-row {
        flex-direction: column;
    }

    .newsletter-form-submit {
        width: 100%;
    }
}

/* ===== Newsletter Landing Pages (confirm/unsubscribe) ===== */
.newsletter-landing {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 4rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}

.newsletter-landing-card {
    text-align: center;
    background: var(--bg-surface);
    border-radius: var(--radius);
    border-top: 3px solid var(--warm);
    padding: 3rem 2rem;
    max-width: 540px;
    width: 100%;
}

.newsletter-landing-card.newsletter-landing-success {
    border-top-color: var(--gold);
}

.newsletter-landing-card.newsletter-landing-error {
    border-top-color: #f58a8a;
}

.newsletter-landing-lisa {
    width: 120px;
    height: auto;
    margin: 0 auto 1.5rem;
}

.newsletter-landing-card h1 {
    color: var(--gold);
    font-size: 1.8rem;
    margin-bottom: 0.75rem;
}

.newsletter-landing-card p {
    color: var(--text);
    font-size: 1rem;
    line-height: 1.65;
    margin: 0 auto 1rem;
    max-width: 420px;
}

.newsletter-landing-card p:last-of-type {
    margin-bottom: 0;
}

.newsletter-landing-actions {
    margin-top: 2rem;
}

.newsletter-landing-btn {
    display: inline-block;
    padding: 0.7rem 1.5rem;
    background: var(--warm);
    color: #fff !important;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.2s, transform 0.15s;
}

.newsletter-landing-btn:hover {
    background: var(--warm-hover);
    color: #fff !important;
    transform: translateY(-1px);
}

@media (max-width: 600px) {
    .newsletter-landing {
        padding: 2.5rem 1rem;
    }

    .newsletter-landing-card {
        padding: 2rem 1.25rem;
    }

    .newsletter-landing-lisa {
        width: 96px;
    }

    .newsletter-landing-card h1 {
        font-size: 1.45rem;
    }
}

/* ===== Footer ===== */
.site-footer {
    border-top: 2px solid var(--warm);
    background: var(--bg-surface);
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 4rem;
}

.site-footer-inner {
    max-width: var(--page-width);
    margin: 0 auto;
    padding: 3rem 1.5rem 2rem;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2.5rem;
    align-items: start;
}

.site-footer-col h4 {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gold);
    margin-bottom: 1rem;
}

.site-footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.site-footer-col a {
    color: var(--text-muted);
    transition: color 0.2s;
}

.site-footer-col a:hover {
    color: var(--accent);
}

.site-footer-brand {
    max-width: 380px;
}

.site-footer-brand-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.75rem;
}

.site-footer-brand-row img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.site-footer-brand-row span {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
}

.site-footer-brand p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.site-footer-social {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap;
    gap: 0.4rem !important;
}

.site-footer-social li {
    display: inline-block;
}

.site-footer-social a {
    display: inline-block;
    padding: 0.35rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.site-footer-social a:hover {
    color: var(--text);
    border-color: var(--accent);
    background: rgba(42, 155, 199, 0.08);
}

.site-footer-tipjar-col p {
    margin-bottom: 0.75rem;
    line-height: 1.5;
    font-size: 0.85rem;
}

.site-footer-tipjar {
    display: inline-block;
    padding: 0.55rem 1.1rem;
    background: var(--warm);
    color: #fff !important;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.85rem;
    transition: background 0.2s, transform 0.15s;
}

.site-footer-tipjar:hover {
    background: var(--warm-hover);
    color: #fff !important;
    transform: translateY(-1px);
}

.site-footer-bottom {
    max-width: var(--page-width);
    margin: 0 auto;
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

@media (max-width: 800px) {
    .site-footer-inner {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
        padding: 2.5rem 1.25rem 1.5rem;
    }

    .site-footer-brand {
        grid-column: 1 / -1;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .site-footer-inner {
        grid-template-columns: 1fr;
    }
}

/* ===== About Page ===== */
.about-page {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 3rem 1.5rem 4rem;
}

.about-header {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--warm);
}

.about-header h1 {
    margin-bottom: 0.25rem;
}

.about-header-handle {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 1rem;
    letter-spacing: 0;
}

.about-tagline {
    color: var(--text-muted);
    font-size: 1rem;
    font-style: italic;
    margin: 0;
}

.about-bio {
    font-size: 1.1rem;
    line-height: 1.8;
}

.about-bio p {
    margin-bottom: 1.25rem;
}

.about-section {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.about-section h2 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--gold);
}

.about-section p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.about-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.about-links li a {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 500;
    transition: border-color 0.2s, background 0.2s, transform 0.15s;
}

.about-links li a:hover {
    border-color: var(--accent);
    background: var(--bg-surface-hover);
    transform: translateY(-1px);
}

.about-tipjar .tipjar-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--warm);
    color: #fff;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.95rem;
    transition: background 0.2s, transform 0.15s;
    margin-top: 0.5rem;
}

.about-tipjar .tipjar-btn:hover {
    background: var(--warm-hover);
    color: #fff;
    transform: translateY(-1px);
}

@media (max-width: 600px) {
    .about-bio {
        font-size: 1rem;
    }
}

/* ===== Legal Pages (Privacy, Cookies) ===== */
.legal-page {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 3rem 1.5rem 4rem;
    font-size: 1rem;
    line-height: 1.75;
}

.legal-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--warm);
}

.legal-header h1 {
    margin-bottom: 0.5rem;
}

.legal-updated {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-style: italic;
    margin: 0;
}

.legal-page h2 {
    font-size: 1.35rem;
    color: var(--gold);
    margin: 2.5rem 0 1rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border);
}

.legal-page h3 {
    font-size: 1.05rem;
    color: var(--text);
    margin: 1.75rem 0 0.75rem;
}

.legal-page p {
    margin-bottom: 1rem;
    color: var(--text);
}

.legal-page ul,
.legal-page ol {
    margin: 0 0 1.25rem;
    padding-left: 1.5rem;
}

.legal-page li {
    margin-bottom: 0.65rem;
    color: var(--text);
}

.legal-page code {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.85em;
    background: var(--bg-surface);
    padding: 0.15em 0.4em;
    border-radius: 4px;
    color: var(--accent);
}

.legal-page strong {
    color: var(--text);
    font-weight: 600;
}

.legal-footer-note {
    margin-top: 3rem;
    padding: 1rem 1.25rem;
    background: var(--bg-surface);
    border-left: 3px solid var(--gold);
    border-radius: 4px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.cookie-table-wrapper {
    overflow-x: auto;
    margin-bottom: 1.5rem;
    -webkit-overflow-scrolling: touch;
}

.cookie-table {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
    background: var(--bg-surface);
    border-radius: var(--radius);
    overflow: hidden;
    font-size: 0.9rem;
}

.cookie-table thead {
    background: rgba(232, 117, 42, 0.08);
}

.cookie-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--gold);
    border-bottom: 1px solid var(--border);
}

.cookie-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
    line-height: 1.55;
}

.cookie-table tbody tr:last-child td {
    border-bottom: none;
}

.cookie-table td code {
    white-space: nowrap;
}

@media (max-width: 600px) {
    .legal-page {
        padding: 2rem 1rem 3rem;
        font-size: 0.95rem;
    }

    .legal-page h2 {
        font-size: 1.2rem;
    }
}

/* ===== LISA Corner Mascot ===== */
.lisa-corner {
    position: fixed;
    bottom: -20px;
    right: 1.5rem;
    width: 100px;
    pointer-events: none;
    opacity: 0.85;
    z-index: 50;
}

/* ===== LISA Loading State ===== */
.lisa-loading {
    text-align: center;
    padding: 4rem 0;
}

.lisa-loading img {
    width: 80px;
    margin: 0 auto 1rem;
    animation: lisa-bounce 0.6s ease-in-out infinite alternate;
}

.lisa-loading p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

@keyframes lisa-bounce {
    from { transform: translateY(0); }
    to   { transform: translateY(-12px); }
}

/* ===== Utility ===== */
.section-heading {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

/* ===== 404 / Empty State ===== */
.empty-state {
    text-align: center;
    padding: 4rem 1rem;
}

.empty-state img {
    width: 180px;
    margin: 0 auto 1.5rem;
}

.empty-state h2 {
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-muted);
}

/* ===== Responsive ===== */
@media (max-width: 700px) {
    h1 { font-size: 1.6rem; }
    h2 { font-size: 1.35rem; }

    .article-card {
        flex-direction: column;
    }

    .article-card-thumb {
        width: 100%;
        min-height: 180px;
    }

    .article-card-body {
        padding: 1rem;
    }

    .hero-overlay {
        padding: 1.25rem;
    }

    .lisa-corner {
        display: none;
    }

    .page-container {
        padding: 1.5rem 1rem;
    }

    .article-detail {
        padding: 1.5rem 1rem 3rem;
    }

    .article-detail-content pre {
        padding: 1rem;
        font-size: 0.82rem;
    }

    .article-detail-content .video-embed {
        margin: 1rem 0;
    }

    .article-detail-content blockquote {
        padding-left: 1rem;
    }

    .lisa-comment-toggle {
        padding: 0.6rem 0.75rem;
    }
}

/* ===== Image Lightbox ===== */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    cursor: zoom-out;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
}

.lightbox-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: var(--radius);
    object-fit: contain;
}

/* ===== Highlight.js overrides ===== */
.article-detail-content pre code.hljs {
    background: transparent;
    padding: 0;
}

/* ===== Article Reactions ===== */
.article-reactions {
    border-top: 1px solid var(--border);
    margin-top: 3rem;
    padding-top: 2rem;
}

.article-reactions-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.article-reactions-header img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.article-reactions-header span {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text);
}

.article-reactions-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.reaction-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.75rem 1.25rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: transform 0.15s, border-color 0.2s, background 0.2s;
    min-width: 80px;
    color: var(--text);
    font-family: inherit;
}

.reaction-btn:hover {
    transform: translateY(-2px);
    background: var(--bg-surface-hover);
    border-color: var(--text-muted);
}

.reaction-btn:active {
    transform: translateY(0);
}

.reaction-active {
    border-color: var(--gold);
    background: rgba(245, 200, 66, 0.08);
}

.reaction-active:hover {
    border-color: var(--gold);
    background: rgba(245, 200, 66, 0.14);
}

.reaction-loading {
    opacity: 0.5;
    pointer-events: none;
}

.reaction-emoji {
    font-size: 1.5rem;
    line-height: 1;
}

.reaction-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 500;
}

.reaction-count {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    min-height: 1.2em;
}

.reaction-count:empty {
    display: none;
}

@media (max-width: 600px) {
    .article-reactions-buttons {
        justify-content: center;
    }

    .reaction-btn {
        padding: 0.6rem 1rem;
        min-width: 70px;
    }
}

/* ===== Article Share ===== */
.article-share {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.article-share-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 500;
}

.article-share-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.85rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.share-btn:hover {
    color: var(--text);
    background: var(--bg-surface-hover);
    border-color: var(--text-muted);
}

.share-btn-copy.share-copied {
    color: var(--gold);
    border-color: var(--gold);
}

.share-btn-x:hover {
    color: var(--text);
}

.share-btn-linkedin:hover {
    color: #0a66c2;
    border-color: #0a66c2;
}

@media (max-width: 600px) {
    .article-share {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ===== Category Bar ===== */
.category-bar {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.category-bar-inner {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    max-width: var(--page-width);
    margin: 0 auto;
    padding: 0.5rem 1.5rem;
    white-space: nowrap;
}

.category-bar-link {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    border-left: 3px solid transparent;
    transition: color 0.2s, background 0.2s;
}

.category-bar-link:hover {
    color: var(--text);
    background: var(--bg-surface-hover);
}

.category-bar-link.active {
    color: var(--warm);
    background: rgba(232, 117, 42, 0.1);
    border-left-color: var(--warm) !important;
}

/* ===== Category Badge ===== */
.category-badge {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: rgba(42, 155, 199, 0.15);
    color: var(--accent);
    transition: background 0.2s, color 0.2s;
}

.category-badge:hover {
    background: rgba(42, 155, 199, 0.25);
    color: var(--accent-hover);
}

.category-badge-inline {
    vertical-align: middle;
    margin-left: 0.1rem;
}

.hero-overlay .category-badge {
    margin-bottom: 0.5rem;
    font-size: 0.7rem;
}

/* ===== Category Page Header ===== */
.category-header {
    margin-bottom: 2rem;
}

.category-header h1 {
    margin-bottom: 0.4rem;
}

.category-description {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
}

.category-count {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ===== Blazor infrastructure ===== */
#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}
