/**
 * Loveshack – Main Stylesheet
 *
 * Table of Contents:
 *  1. CSS Custom Properties (Light & Dark)
 *  2. Reset & Base
 *  3. Typography
 *  4. Layout / Container
 *  5. Vignette Effect
 *  6. Skip Link
 *  7. Site Header / Branding
 *  8. Navigation
 *  9. Color Scheme Toggle
 * 10. Passwordless
 * 11. Social Links
 * 12. Stream / Activity Feed
 * 13. Stream Items
 * 14. Single Post
 * 15. Pages & Archives
 * 16. Comments
 * 17. Footer
 * 18. Pagination
 * 19. Forms
 * 20. Media & Embeds
 * 21. Utilities
 * 22. Animations & Transitions
 * 23. Accessibility
 * 24. Print
 *
 * @package Loveshack
 * @since   1.0.0
 */

/* ==========================================================================
   1. CSS Custom Properties
   ========================================================================== */

:root {
    /* Accent – overridden by Customizer */
    --ls-accent: #6366f1;
    --ls-accent-hover: #818cf8;

    /* Spacing */
    --ls-space-xs: 0.25rem;
    --ls-space-sm: 0.5rem;
    --ls-space-md: 1rem;
    --ls-space-lg: 1.5rem;
    --ls-space-xl: 2rem;
    --ls-space-2xl: 3rem;
    --ls-space-3xl: 4rem;

    /* Typography */
    --ls-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    --ls-font-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    --ls-text-xs: 0.84375rem;
    --ls-text-sm: 0.984375rem;
    --ls-text-base: 1.125rem;
    --ls-text-lg: 1.265625rem;
    --ls-text-xl: 1.40625rem;
    --ls-text-2xl: 1.6875rem;
    --ls-text-3xl: 2.25rem;

    /* Radius */
    --ls-radius-sm: 8px;
    --ls-radius-md: 12px;
    --ls-radius-lg: 16px;
    --ls-radius-full: 9999px;

    /* Layout */
    --ls-container-width: 450px;
    --ls-container-width-lg: 640px;

    /* Content */
    --ls-image-max-height: 250px;

    /* Transitions */
    --ls-transition: 0.2s ease;
    --ls-transition-slow: 0.35s ease;
}

/* ----- Dark mode (DEFAULT) ----- */
[data-color-scheme="dark"],
:root {
    --ls-bg: #181e24;
    --ls-bg-surface: rgba(15, 12, 18, 0.3);
    --ls-bg-surface-hover: rgba(24, 30, 36, 0.6);
    --ls-bg-muted: #121618;
    --ls-stream-tag-pill-bg: rgba(18, 22, 24, 0.7);
    --ls-stream-tag-pill-bg-hover: rgba(24, 30, 36, 0.7);
    --ls-sticky-stream-tag-pill-bg: rgba(18, 22, 24, 0.28);
    --ls-sticky-stream-tag-pill-bg-hover: rgba(24, 30, 36, 0.38);
    --ls-bg-input: #0f1315;
    --ls-text: #ffffff;
    --ls-text-shadow:  0 2px 2px rgba(0, 0, 0, 0.4);
    --ls-text-secondary: #aaaaaa;
    --ls-text-muted: #bbbbbb;
    --ls-sticky-card-bg: #2f2a18;
    --ls-sticky-card-fg: #f8eec1;
    --ls-sticky-card-icon-filter: brightness(0) invert(100%);
    --ls-vignette: radial-gradient(ellipse at center, transparent, rgba(0, 0, 0, 0.5) 100%);
    --ls-border: #1f252a;
    --ls-border-light: #1b2025;
    --ls-shadow-sm: none;
    --ls-shadow-md: 0 2px 16px rgba(0, 0, 0, 0.3);
    --ls-shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.5);
    --ls-ui-icon-filter: brightness(0) invert(82%);
}

/* ----- Light mode ----- */
[data-color-scheme="light"] {
    --ls-bg: #ffffff;
    --ls-bg-surface: rgba(255, 255, 255, 0.6);
    --ls-bg-surface-hover: rgba(255, 255, 255, 0.7);
    --ls-bg-muted: #f0f0f0;
    --ls-stream-tag-pill-bg: rgba(240, 240, 240, 0.3);
    --ls-stream-tag-pill-bg-hover: rgba(228, 231, 235, 0.7);
    --ls-sticky-stream-tag-pill-bg: rgba(240, 240, 240, 0.22);
    --ls-sticky-stream-tag-pill-bg-hover: rgba(228, 231, 235, 0.34);
    --ls-bg-input: #ffffff;
    --ls-text: #1a1a1a;
    --ls-text-shadow: none;
    --ls-text-secondary: #6b7280;
    --ls-text-muted: #666666;
    --ls-sticky-card-bg: #fff7d6;
    --ls-sticky-card-fg: #1a1a1a;
    --ls-sticky-card-icon-filter: brightness(0) invert(0%);
    --ls-border: #e5e7eb;
    --ls-border-light: #f0f0f0;
    --ls-vignette: radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, 0.4) 100%);
    --ls-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --ls-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
    --ls-shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.08);
    --ls-ui-icon-filter: brightness(0) invert(22%);
}

/* ----- Card Rendering Toggles (Customizer body classes) ----- */
html:not([data-color-scheme]) body.ls-cards-dark-none .h-feed .ls-stream-item,
[data-color-scheme="dark"] body.ls-cards-dark-none .h-feed .ls-stream-item,
[data-color-scheme="light"] body.ls-cards-light-none .h-feed .ls-stream-item,
html:not([data-color-scheme]) body.ls-cards-dark-sticky .h-feed .ls-stream-item:not(.sticky),
[data-color-scheme="dark"] body.ls-cards-dark-sticky .h-feed .ls-stream-item:not(.sticky),
[data-color-scheme="light"] body.ls-cards-light-sticky .h-feed .ls-stream-item:not(.sticky) {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

html:not([data-color-scheme]) .ls-stream-item.ls-cardless-dark,
[data-color-scheme="dark"] .ls-stream-item.ls-cardless-dark,
[data-color-scheme="light"] .ls-stream-item.ls-cardless-light {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* ==========================================================================
   2. Reset & Base
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--ls-font), sans-serif;
    font-size: var(--ls-text-base);
    line-height: 1.7;
    color: var(--ls-text);
    text-shadow: var(--ls-text-shadow);
    background: var(--ls-bg);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }

ul,
li {
    list-style: none;
    padding: 0;
}

a {
    color: var(--ls-text);
    text-decoration: none;
    transition: color var(--ls-transition);
}

a:hover { color: var(--ls-text); }

/* ==========================================================================
   3. Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    margin: 0 0 var(--ls-space-md);
    font-weight: 600;
    line-height: 1.3;
    color: var(--ls-text);
}

h1 { font-size: var(--ls-text-3xl); }
h2 { font-size: var(--ls-text-2xl); }
h3 { font-size: var(--ls-text-xl); }
p  { margin: 0 0 var(--ls-space-md); }

blockquote {
    margin: var(--ls-space-lg) 0;
    padding: var(--ls-space-md) var(--ls-space-lg);
    border-left: 2px solid var(--ls-text-muted);
    background: var(--ls-bg-muted);
    border-radius: 0 var(--ls-radius-sm) var(--ls-radius-sm) 0;
    font-style: italic;
    color: var(--ls-text-secondary);
}

code, pre { font-family: var(--ls-font-mono); font-size: var(--ls-text-sm); }
code { padding: 0.15em 0.4em; background: var(--ls-bg-muted); border-radius: 4px; }
pre  { padding: var(--ls-space-lg); background: var(--ls-bg-muted); border-radius: var(--ls-radius-md); overflow-x: auto; }
pre code { padding: 0; background: none; }

hr {
    border: none;
    border-top: 1px solid var(--ls-border);
    margin: var(--ls-space-2xl) 0;
}

/* ==========================================================================
   4. Layout
   ========================================================================== */

.ls-container {
    width: 100%;
    max-width: var(--ls-container-width);
    margin: 0 auto;
    padding: 0;
}

.ls-container-lg {
    max-width: var(--ls-container-width-lg);
}

.ls-site {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.ls-site-content {
    flex: 1;
    padding: var(--ls-space-lg);
}

@media (min-width: 960px) {
    html:has(body.ls-stream-layout-two-column:is(.home, .blog, .archive, .search)),
    body.ls-stream-layout-two-column:is(.home, .blog, .archive, .search) {
        height: 100%;
        overflow: hidden;
    }

    body.ls-stream-layout-two-column:is(.home, .blog, .archive, .search) .ls-site {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: minmax(0, 1fr) auto;
        width: min(100%, 1280px);
        height: 100dvh;
        min-height: 100dvh;
        margin: 0 auto;
        overflow: hidden;
    }

    body.ls-stream-layout-two-column:is(.home, .blog, .archive, .search) .ls-site-header {
        grid-column: 1;
        grid-row: 1;
        min-height: 0;
        padding: var(--ls-space-xl);
        display: flex;
        align-items: stretch;
    }

    body.ls-stream-layout-two-column:is(.home, .blog, .archive, .search) .ls-site-header > .ls-container {
        max-width: var(--ls-container-width);
        height: 100%;
        margin: 0 auto;
        display: flex;
        flex-direction: column;
    }

    body.ls-stream-layout-two-column:is(.home, .blog, .archive, .search) .ls-site-header__branding {
        flex: 1 1 auto;
        display: flex;
        flex-direction: column;
        justify-content: center;
        text-align: center;
        padding: var(--ls-space-lg) 0;
    }

    body.ls-stream-layout-two-column:is(.home, .blog, .archive, .search) .ls-site-bar {
        flex: 0 0 auto;
        width: 100%;
    }

    body.ls-stream-layout-two-column:is(.home, .blog, .archive, .search) .ls-site-header .ls-site-footer--header {
        display: block;
        flex: 0 0 auto;
        margin-top: auto;
        padding: var(--ls-space-md) 0 0;
    }

    body.ls-stream-layout-two-column:is(.home, .blog, .archive, .search) .ls-site-logo,
    body.ls-stream-layout-two-column:is(.home, .blog, .archive, .search) .ls-site-description,
    body.ls-stream-layout-two-column:is(.home, .blog, .archive, .search) .ls-passwordless {
        margin-left: auto;
        margin-right: auto;
    }

    body.ls-stream-layout-two-column:is(.home, .blog, .archive, .search) .ls-social-links__list,
    body.ls-stream-layout-two-column:is(.home, .blog, .archive, .search) .ls-subscriber-pills {
        justify-content: center;
    }

    body.ls-stream-layout-two-column:is(.home, .blog, .archive, .search) .ls-site-content {
        grid-column: 2;
        grid-row: 1 / 3;
        min-height: 0;
        overflow-y: auto;
        overscroll-behavior: contain;
        padding: var(--ls-space-xl) var(--ls-space-lg);
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    body.ls-stream-layout-two-column:is(.home, .blog, .archive, .search) .ls-site-content::-webkit-scrollbar {
        width: 0;
        height: 0;
        display: none;
    }

    body.ls-stream-layout-two-column:is(.home, .blog, .archive, .search) .ls-site-content > .ls-container {
        margin-left: auto;
        margin-right: auto;
    }

    body.ls-stream-layout-two-column:is(.home, .blog, .archive, .search) .ls-site-footer .ls-social-links {
        display: none;
    }

    body.ls-stream-layout-two-column:is(.home, .blog, .archive, .search) .ls-site > .ls-site-footer {
        display: none;
    }

    body.ls-stream-layout-two-column:is(.home, .blog, .archive, .search) .ls-stream .pagination {
        margin-bottom: var(--ls-space-2xl);
    }
}

/* ==========================================================================
   5. Vignette
   ========================================================================== */

.ls-vignette {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    background: var(--ls-vignette);
}

/* ==========================================================================
   6. Skip Link
   ========================================================================== */

.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    z-index: 10000;
    padding: var(--ls-space-sm) var(--ls-space-md);
    background: var(--ls-accent);
    color: #fff;
    font-weight: 600;
}
.skip-link:focus { top: 0; }

/* ==========================================================================
   7. Site Header
   ========================================================================== */

.ls-site-header {
    padding: var(--ls-space-md) 0 0;
}

.ls-site-bar {
    margin-bottom: var(--ls-space-md);
}

.ls-site-bar__inner {
    width: 100%;
    max-width: var(--ls-container-width-lg);
    margin: 0 auto;
}

.ls-site-bar__controls {
    display: flex;
    align-items: center;
    gap: var(--ls-space-sm);
    min-height: 36px;
}

.ls-site-bar__main {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
}

.ls-site-header__branding {
    text-align: center;
    padding: var(--ls-space-2xl) 0 var(--ls-space-md);
    animation: fadein-from-top 1.5s ease forwards;
}

.ls-site-header__branding--compact {
    display: flex;
    align-items: center;
    gap: var(--ls-space-md);
    padding: 0;
    text-align: left;
}

/* Logo / Avatar */
.ls-site-logo {
    margin: 0 auto var(--ls-space-lg);
}

.ls-site-logo img,
.ls-site-logo .custom-logo {
    max-height: 180px;
    width: 180px;
    height: 180px;
    object-fit: cover;
    margin: 0 auto;
    border-radius: var(--ls-radius-full);
    box-shadow: 0 0 0 3px var(--ls-bg), 0 0 20px rgba(255, 255, 255, 0.05);
}

.ls-site-logo.ls-site-logo--decoration-none img,
.ls-site-logo.ls-site-logo--decoration-none .custom-logo {
    border-radius: 0;
    box-shadow: none;
}

.ls-site-logo .custom-logo.custom-logo--inline-svg {
    display: block;
    color: var(--ls-text);
}

.ls-site-logo .custom-logo.custom-logo--inline-svg[stroke]:not([stroke="none"]),
.ls-site-logo .custom-logo.custom-logo--inline-svg [stroke]:not([stroke="none"]) {
    stroke: currentColor !important;
}

.ls-site-logo__variant {
    display: block;
}

.ls-site-logo__variant--dark {
    display: none;
}

[data-color-scheme="dark"] .ls-site-logo__variant--default {
    display: none;
}

[data-color-scheme="dark"] .ls-site-logo__variant--dark {
    display: block;
}

.ls-site-logo--small { margin: 0; }
.ls-site-logo--small img,
.ls-site-logo--small .custom-logo {
    max-height: 32px;
    width: 32px;
    height: 32px;
    box-shadow: none;
}

.ls-site-logo--nav {
    margin-right: var(--ls-space-sm);
    flex-shrink: 0;
}

/* Title */
.ls-site-title {
    font-size: var(--ls-text-2xl);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: var(--ls-space-sm);
}

.ls-site-title a { color: var(--ls-text); }

.ls-site-title--compact { font-size: var(--ls-text-lg); margin: 0; }

/* Tagline */
.ls-site-description {
    color: var(--ls-text-muted);
    font-size: var(--ls-text-sm);
    font-weight: 800;
    margin-bottom: var(--ls-space-sm);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ==========================================================================
   8. Navigation
   ========================================================================== */

.ls-main-nav { position: relative; }

.ls-main-nav__toggle {
    display: none;
    align-items: center;
    gap: var(--ls-space-xs);
    background: none;
    border: 1px solid var(--ls-border);
    border-radius: var(--ls-radius-sm);
    padding: 4px 10px;
    color: var(--ls-text-secondary);
    font-family: var(--ls-font);
    font-size: var(--ls-text-xs);
    cursor: pointer;
    transition: background var(--ls-transition);
}

.ls-main-nav__toggle:hover { background: var(--ls-bg-surface-hover); }

.ls-main-nav__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 2px;
    flex-wrap: wrap;
}

.ls-main-nav__list a,
.ls-main-nav__list .page_item a {
    display: block;
    padding: 4px 10px;
    color: var(--ls-text-muted);
    font-size: var(--ls-text-xs);
    font-weight: 500;
    border-radius: var(--ls-radius-sm);
    transition: color var(--ls-transition), background var(--ls-transition);
}

.ls-main-nav__list a:hover,
.ls-main-nav__list .current-menu-item > a,
.ls-main-nav__list .current_page_item > a {
    color: var(--ls-text);
    background: var(--ls-bg-surface);
}

/* Sub-menu */
.ls-main-nav__list .sub-menu,
.ls-main-nav__list .children {
    list-style: none;
    margin: 0;
    padding: var(--ls-space-xs);
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--ls-bg-surface);
    border: 1px solid var(--ls-border);
    border-radius: var(--ls-radius-md);
    box-shadow: var(--ls-shadow-md);
    min-width: 160px;
    z-index: 100;
}

.ls-main-nav__list li:hover > .sub-menu,
.ls-main-nav__list li:hover > .children { display: block; }

@media (max-width: 640px) {
    .ls-main-nav__toggle { display: flex; }

    .ls-main-nav__list {
        display: none;
        flex-direction: column;
        position: absolute;
        top: calc(100% + 4px);
        left: 0;
        right: 0;
        background: var(--ls-bg-surface);
        border: 1px solid var(--ls-border);
        border-radius: var(--ls-radius-md);
        box-shadow: var(--ls-shadow-lg);
        padding: var(--ls-space-xs);
        z-index: 100;
    }

    .ls-main-nav__list.is-open { display: flex; }
}

/* ==========================================================================
   9. Color Scheme Toggle
   ========================================================================== */

/* Shared header icon button ------------------------------------------------ */

.ls-header-icon {
    background: none;
    border: 1px solid var(--ls-border);
    border-radius: var(--ls-radius-full);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--ls-text-muted);
    transition: color var(--ls-transition), background var(--ls-transition), border-color var(--ls-transition);
    flex-shrink: 0;
    text-decoration: none;
}

.ls-header-icon:hover {
    color: var(--ls-text);
    background: var(--ls-bg-surface);
    border-color: var(--ls-text-muted);
}

.ls-header-icon:focus-visible {
    outline: 2px solid var(--ls-accent);
    outline-offset: 2px;
}

/* Color-scheme toggle (first icon — pushes group right) */

.ls-color-scheme-toggle {
    margin-left: auto;
}

[data-color-scheme="light"] .ls-color-scheme-toggle__icon--dark,
[data-color-scheme="dark"] .ls-color-scheme-toggle__icon--light { display: none; }

[data-color-scheme="light"] .ls-color-scheme-toggle__icon--light,
[data-color-scheme="dark"] .ls-color-scheme-toggle__icon--dark { display: flex; }


/* ==========================================================================
   10. Passwordless
   ========================================================================== */

.ls-passwordless {
    max-width: 420px;
    margin: 0 auto var(--ls-space-xl);
}

.ls-passwordless--header {
    margin-top: var(--ls-space-xl);
}

.ls-passwordless__heading {
    font-size: var(--ls-text-lg);
    font-weight: 600;
    margin-bottom: var(--ls-space-xs);
}

.ls-passwordless__text {
    font-size: var(--ls-text-xs);
    color: var(--ls-text-muted);
    margin-bottom: var(--ls-space-md);
}

.ls-passwordless__field {
    display: flex;
    gap: var(--ls-space-sm);
}

.ls-passwordless__input {
    flex: 1;
    padding: 0.6rem 0.9rem;
    border: 1px solid var(--ls-border);
    border-radius: var(--ls-radius-sm);
    background: var(--ls-bg-surface);
    color: var(--ls-text);
    font-family: var(--ls-font);
    font-size: var(--ls-text-sm);
    transition: border-color var(--ls-transition), box-shadow var(--ls-transition);
}

.ls-passwordless__input:focus {
    outline: none;
    border-color: var(--ls-accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.ls-passwordless__submit {
    padding: 0.6rem 1.2rem;
    background: var(--ls-accent);
    color: #fff;
    border: none;
    border-radius: var(--ls-radius-sm);
    font-family: var(--ls-font);
    font-size: var(--ls-text-sm);
    font-weight: 600;
    cursor: pointer;
    transition: background var(--ls-transition), transform var(--ls-transition);
    white-space: nowrap;
}

.ls-passwordless__submit:hover {
    background: var(--ls-accent-hover);
    transform: translateY(-1px);
}

.ls-passwordless__message {
    margin-top: var(--ls-space-sm);
    font-size: var(--ls-text-sm);
}

.ls-passwordless__message--success {
    color: #10b981;
}

.ls-passwordless__message--error {
    color: #ef4444;
}

.ls-passwordless__message--info {
    color: var(--ls-accent);
}

.ls-stream-item--passwordless .ls-passwordless {
    max-width: none;
    margin: 0;
}

.ls-stream-item--passwordless .ls-stream-item__body {
    margin-top: 0;
}

/* Confirmation Notice Banner (shown after clicking the opt-in link) */
.ls-notice {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    padding: var(--ls-space-md) var(--ls-space-lg);
    text-align: center;
    font-size: var(--ls-text-sm);
    font-weight: 500;
    animation: cpSlideDown 0.35s ease forwards;
}

.ls-notice p {
    margin: 0;
}

.ls-notice--success {
    background: #ecfdf5;
    color: #065f46;
    border-bottom: 1px solid #a7f3d0;
}

.ls-notice--error {
    background: #fef2f2;
    color: #991b1b;
    border-bottom: 1px solid #fecaca;
}

[data-color-scheme="dark"] .ls-notice--success {
    background: #064e3b;
    color: #a7f3d0;
    border-bottom-color: #065f46;
}

[data-color-scheme="dark"] .ls-notice--error {
    background: #7f1d1d;
    color: #fecaca;
    border-bottom-color: #991b1b;
}

@keyframes cpSlideDown {
    from {
        opacity: 0;
        transform: translateY(-100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   11. Social Links
   ========================================================================== */

.ls-social-links {
    margin: var(--ls-space-md) auto 0;
}

.ls-social-links__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 4px;
    flex-wrap: wrap;
}

.ls-social-links__link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--ls-radius-sm);
    transition: transform var(--ls-transition);
}

.ls-social-links__link:hover {
    transform: scale(1.12);
}

.ls-social-links__icon {
    width: 22px;
    height: 22px;
    border-radius: 2px;
    object-fit: contain;
    opacity: 0.45;
    transition: opacity var(--ls-transition), transform var(--ls-transition);
}

.ls-social-links__link:hover .ls-social-links__icon {
    opacity: 0.8;
}

[data-color-scheme="dark"] .ls-social-links__icon {
    filter: brightness(0) invert(1);
}

[data-color-scheme="light"] .ls-social-links__icon {
    filter: none;
    opacity: 0.4;
}

[data-color-scheme="light"] .ls-social-links__link:hover .ls-social-links__icon {
    opacity: 0.7;
}

/* ==========================================================================
   12. Stream / Activity Feed
   ========================================================================== */

.ls-stream {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* ==========================================================================
   13. Stream Items
   ========================================================================== */

.ls-stream-item {
    margin: var(--ls-space-lg) 0;
    background: var(--ls-bg-surface);
    padding: var(--ls-space-md);
    border: 1px solid var(--ls-border);
    border-radius: var(--ls-radius-lg);
    box-shadow: var(--ls-shadow-lg);
}

.ls-stream-item.sticky {
    background: var(--ls-sticky-card-bg);
    color: var(--ls-sticky-card-fg);
    --ls-stream-tag-pill-bg: var(--ls-sticky-stream-tag-pill-bg);
    --ls-stream-tag-pill-bg-hover: var(--ls-sticky-stream-tag-pill-bg-hover);
}

.ls-stream-item.sticky a,
.ls-stream-item.sticky h1,
.ls-stream-item.sticky h2,
.ls-stream-item.sticky h3,
.ls-stream-item.sticky h4,
.ls-stream-item.sticky h5,
.ls-stream-item.sticky h6,
.ls-stream-item.sticky .ls-author-name,
.ls-stream-item.sticky .ls-author-handle,
.ls-stream-item.sticky .ls-stream-item__time,
.ls-stream-item.sticky .ls-stream-item__content,
.ls-stream-item.sticky .ls-stream-item__content a,
.ls-stream-item.sticky .ls-stream-item__excerpt,
.ls-stream-item.sticky .ls-stream-item__excerpt a,
.ls-stream-item.sticky .ls-stream-item__title-link,
.ls-stream-item.sticky .ls-stream-item__read-more,
.ls-stream-item.sticky .ls-post-type,
.ls-stream-item.sticky .ls-stream-item__tags a {
    color: var(--ls-sticky-card-fg);
}

.ls-stream-item.sticky .ls-post-type__icon,
.ls-stream-item.sticky .ls-stream-item__play-icon-image {
    filter: var(--ls-sticky-card-icon-filter);
}

.ls-stream-item[data-stream-link] {
    cursor: pointer;
}

/* Header — avatar | name + @handle | time (right) */
.ls-stream-item__header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: var(--ls-space-md);
}

.ls-avatar { flex-shrink: 0; }

.ls-avatar__img {
    border-radius: var(--ls-radius-full);
    width: 36px;
    height: 36px;
    object-fit: cover;
}

.ls-stream-item__meta {
    flex: 1;
    min-width: 0;
}

.ls-stream-item__author-line {
    display: flex;
    flex-direction: column;
    align-items: baseline;
    flex-wrap: wrap;
}

.ls-author-name {
    font-weight: 600;
    font-size: var(--ls-text-sm);
    color: var(--ls-text-secondary);
    line-height: 1.3;
    white-space: nowrap;
}

.ls-author-handle {
    font-size: var(--ls-text-xs);
    color: var(--ls-text-muted);
    white-space: nowrap;
}

.ls-stream-item__time-link {
    flex-shrink: 0;
    margin-left: auto;
}

.ls-stream-item__time {
    font-size: var(--ls-text-xs);
    color: var(--ls-text-muted);
    white-space: nowrap;
}

.ls-stream-item__time-link:hover .ls-stream-item__time {
    color: var(--ls-text-secondary);
}

/* Post type badge (hidden by default for clean look; still in markup for accessibility) */
.ls-post-type {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    font-size: var(--ls-text-xs);
    font-weight: 500;
    color: var(--ls-text-muted);
    background: var(--ls-bg-muted);
    border-radius: var(--ls-radius-full);
    white-space: nowrap;
    flex-shrink: 0;
}

.ls-post-type__icon {
    display: block;
    width: 14px;
    height: 14px;
    filter: var(--ls-ui-icon-filter);
}

/* Content */
.ls-stream-item__content {
    font-size: var(--ls-text-sm);
    line-height: 1.65;
    color: var(--ls-text-secondary);
}

.ls-stream-item__content p:last-child { margin-bottom: 0; }

.ls-stream-item__content a {
    color: var(--ls-accent);
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-thickness: 1px;
}

.ls-stream-item__content a:hover {
    color: var(--ls-accent-hover);
}

/* Keep rich content media inside stream card bounds */
.ls-stream-item__content video,
.ls-stream-item__content iframe,
.ls-stream-item__content embed,
.ls-stream-item__content object {
    display: block;
    max-width: 100%;
    width: 100%;
    height: auto;
    border-radius: var(--ls-radius-md);
}

.ls-stream-item__content .wp-video,
.ls-stream-item__content .wp-video-shortcode,
.ls-stream-item__content .mejs-container,
.ls-stream-item__content .mejs-mediaelement {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    border-radius: var(--ls-radius-md);
    overflow: hidden;
}

/* Image */
.ls-stream-item__image {
    margin-bottom: var(--ls-space-md);
}

.ls-stream-item__image img {
    width: 100%;
    max-height: var(--ls-image-max-height);
    height: auto;
    object-fit: cover;
    border-radius: 1rem;
    transition: all .45s cubic-bezier(.4, 0, .2, 1);
    box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.4);
    overflow:hidden;
}

.ls-stream-item__image-link {
    display: block;
    position: relative;
}

.ls-stream-item__image-link:hover img {
    transform: scale(1.03);
    transform: scale(1.05);
}

/* Video play overlay */
.ls-stream-item__play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
    border-radius: var(--ls-radius-full);
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--ls-transition), transform 0.2s ease;
}

.ls-stream-item__play-icon-image {
    display: block;
    width: 48px;
    height: 48px;
    filter: brightness(0) invert(100%);
}

.ls-stream-item__image-link:hover .ls-stream-item__play-icon {
    background: rgba(0, 0, 0, 0.7);
    transform: translate(-50%, -50%) scale(1.08);
}

/* Video embed */
.ls-stream-item__video {
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.4);
}

.ls-stream-item__video iframe {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: none;
}

.ls-stream-item__video video {
    display: block;
    width: 100%;
    height: auto;
    border: none;
}

/* WordPress default mediaelement player wrapper */
.ls-stream-item__video .wp-video,
.ls-stream-item__video .mejs-container {
    width: 100% !important;
    height: auto !important;
    background: transparent !important;
}

.ls-stream-item__video .mejs-mediaelement {
    background: transparent !important;
}

.ls-stream-item__video .mejs-overlay-play {
    background: rgba(0, 0, 0, 0.35);
}

.ls-stream-item__video .mejs-overlay-play:hover {
    background: rgba(0, 0, 0, 0.5);
}

/* Body / title / excerpt */
.ls-stream-item__body { margin-top: var(--ls-space-sm); }

.ls-stream-item__title {
    font-size: var(--ls-text-lg);
    font-weight: 600;
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}

.ls-stream-item__title-link { color: var(--ls-text); }
.ls-stream-item__title-link:hover { color: var(--ls-text); }

.ls-stream-item__excerpt {
    color: var(--ls-text-secondary);
    font-size: var(--ls-text-sm);
    line-height: 1.55;
}

.ls-stream-item__read-more {
    font-size: var(--ls-text-sm);
    font-weight: 500;
    text-decoration: underline;
    color: var(--ls-text-muted);
    margin-top: 0;
    transition: color var(--ls-transition), gap var(--ls-transition);
}

.ls-stream-item__read-more:hover {
    color: var(--ls-text);
}

/* Tags */
.ls-post-tags,
.ls-stream-item__tags,
.ls-single__tags {
    margin-top: var(--ls-space-md);
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.ls-post-tags a,
.ls-stream-item__tags a,
.ls-single__tags a {
    display: inline-block;
    font-size: 0.7875rem;
    color: var(--ls-text-muted);
    padding: 2px 8px;
    background: var(--ls-bg-muted);
    border-radius: var(--ls-radius-full);
    transition: color var(--ls-transition), background var(--ls-transition);
    text-decoration: none;
}

.ls-stream-item__tags a {
    background: var(--ls-stream-tag-pill-bg);
}

[data-color-scheme="light"] .ls-post-tags a:hover,
[data-color-scheme="light"] .ls-stream-item__tags a:hover,
[data-color-scheme="light"] .ls-single__tags a:hover {
    color: var(--ls-text);
    background: #e4e7eb;
}

html:not([data-color-scheme]) .ls-post-tags a:hover,
html:not([data-color-scheme]) .ls-stream-item__tags a:hover,
html:not([data-color-scheme]) .ls-single__tags a:hover,
[data-color-scheme="dark"] .ls-post-tags a:hover,
[data-color-scheme="dark"] .ls-stream-item__tags a:hover,
[data-color-scheme="dark"] .ls-single__tags a:hover {
    color: var(--ls-text-secondary);
    background: var(--ls-bg-surface-hover);
}

[data-color-scheme="light"] .ls-stream-item__tags a:hover,
[data-color-scheme="light"] .ls-stream-item__tags a:focus,
html:not([data-color-scheme]) .ls-stream-item__tags a:hover,
html:not([data-color-scheme]) .ls-stream-item__tags a:focus,
[data-color-scheme="dark"] .ls-stream-item__tags a:hover,
[data-color-scheme="dark"] .ls-stream-item__tags a:focus {
    background: var(--ls-stream-tag-pill-bg-hover);
}

/* ==========================================================================
   14. Single Post
   ========================================================================== */

.ls-single {
    background: var(--ls-bg-surface);
    border-radius: var(--ls-radius-lg);
    padding: var(--ls-space-xl);
    margin-bottom: var(--ls-space-xl);
}

.ls-single__header { margin-bottom: var(--ls-space-xl); }

.ls-single__meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: var(--ls-space-lg);
}

.ls-single__meta .ls-avatar__img { width: 44px; height: 44px; }
.ls-single__meta-text { flex: 1; }

.ls-single__time {
    font-size: var(--ls-text-sm);
    color: var(--ls-text-muted);
}

.ls-single__meta--status {
    align-items: flex-start;
}

.ls-single__author-line {
    display: flex;
    flex-direction: column;
    align-items: baseline;
    gap: 1px;
}

.ls-single__meta-right {
    margin-left: auto;
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.ls-single__meta--status .ls-single__time {
    font-size: var(--ls-text-xs);
    white-space: nowrap;
}

.ls-single__title {
    font-size: var(--ls-text-2xl);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: var(--ls-space-md);
    line-height: 1.2;
}

.ls-single__featured-image,
.ls-single__image-full,
.ls-single__video {
    margin: 0 calc(var(--ls-space-xl) * -1) var(--ls-space-xl);
    border-radius: var(--ls-radius-md);
    overflow: hidden;
}

.ls-single__featured-image img,
.ls-single__image-full img { width: 100%; }

.ls-single__video iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: none;
}

.ls-single__video video {
    display: block;
    width: 100%;
    height: auto;
    border: none;
    border-radius: var(--ls-radius-md);
}

.ls-single--video .ls-single__video,
.ls-single--video .ls-single__featured-image {
    margin: 0 0 var(--ls-space-xl);
}

.ls-single--image .ls-single__image-full,
.ls-single--image .ls-single__featured-image {
    margin: 0 0 var(--ls-space-xl);
}

.ls-single__content {
    font-size: var(--ls-text-base);
    line-height: 1.8;
    color: var(--ls-text);
}

.ls-single__content--status {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--ls-text);
}

.ls-single__content--status video,
.ls-single__content--status iframe,
.ls-single__content--status embed,
.ls-single__content--status object {
    display: block;
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box;
}

/* Stream post-type filter pills */
.ls-stream-filters {
    display: flex;
    flex-wrap: wrap;
    gap: var(--ls-space-sm, .5rem);
    justify-content: center;
    margin: 0 0 var(--ls-space-lg, 1rem);
}
.ls-stream-filter {
    display: inline-flex;
    align-items: center;
    padding: .4em 1em;
    border-radius: 9999px;
    background: rgba(127, 127, 127, .12);
    border: 1px solid rgba(127, 127, 127, .25);
    color: var(--ls-text);
    font-size: .9rem;
    line-height: 1.2;
    text-decoration: none;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.ls-stream-filter:hover,
.ls-stream-filter:focus {
    background: rgba(127, 127, 127, .2);
    border-color: rgba(127, 127, 127, .4);
    text-decoration: none;
}
.ls-stream-filter.is-active {
    background: var(--ls-accent, #6366f1);
    border-color: var(--ls-accent, #6366f1);
    color: #fff;
}
.ls-stream-filter.is-active:hover,
.ls-stream-filter.is-active:focus {
    filter: brightness(1.05);
}

/* Subscriber / follower pills (header) */
.ls-subscriber-pills {
    display: flex;
    flex-wrap: wrap;
    gap: var(--ls-space-sm, .5rem);
    justify-content: center;
    margin: var(--ls-space-md, .75rem) 0;
}
.ls-subscriber-pill {
    display: inline-flex;
    align-items: baseline;
    gap: .35em;
    padding: .35em .85em;
    border-radius: 9999px;
    background: rgba(127, 127, 127, .12);
    border: 1px solid rgba(127, 127, 127, .25);
    font-size: .85rem;
    line-height: 1.2;
    color: var(--ls-text);
    white-space: nowrap;
}
.ls-subscriber-pill strong { font-weight: 600; }
.ls-subscriber-pill--ap {
    background: color-mix(in srgb, var(--ls-accent, #6366f1) 12%, transparent);
    border-color: color-mix(in srgb, var(--ls-accent, #6366f1) 35%, transparent);
}

/* Thread continuations */
.ls-thread {
    margin-top: var(--ls-space-xl);
}
.ls-thread__reply.ls-stream-item {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    margin: var(--ls-space-md) 0;
}
.ls-thread__parent-link {
    font-size: .9rem;
    margin: 0 0 var(--ls-space-md);
    color: var(--ls-text-muted, #666);
}
.ls-thread__parent-link a { color: inherit; }

.ls-single__content--status p {
    max-width: 100%;
}

.ls-single__content--status p > video,
.ls-single__content--status p > iframe,
.ls-single__content--status p > embed,
.ls-single__content--status p > object {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.ls-single__content--status .wp-video,
.ls-single__content--status .wp-video-shortcode,
.ls-single__content--status .mejs-container,
.ls-single__content--status .mejs-mediaelement,
.ls-single__content--status .wp-block-video,
.ls-single__content--status .wp-block-embed {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
}

.ls-single__content img {
    border-radius: var(--ls-radius-md);
    margin: var(--ls-space-lg) 0;
}

.ls-single__content a {
    color: var(--ls-accent);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.ls-single__hero-image,
.ls-single__image-full,
.ls-single__featured-image {
    margin: 0 0 var(--ls-space-lg);
}
.ls-single__image-caption {
    font-size: .75rem;
    color: var(--ls-text-muted, #666);
    text-align: center;
    margin-top: var(--ls-space-xs, .5rem);
    line-height: 1.35;
}

.ls-single__teaser {
    border: 1px solid var(--ls-border);
    border-radius: var(--ls-radius-md);
    background: var(--ls-bg-surface);
    overflow: hidden;
}

.ls-teaser__image {
    margin: 0;
    line-height: 0;
}

.ls-teaser__image img {
    display: block;
    width: 100%;
    height: auto;
}

.ls-teaser__body {
    padding: var(--ls-space-xl);
}

.ls-teaser__notice {
    margin: 0 0 var(--ls-space-xs);
    font-size: var(--ls-text-xs);
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--ls-text-muted);
}

.ls-teaser__title {
    margin: 0 0 var(--ls-space-sm);
    font-size: var(--ls-text-xl);
    line-height: 1.25;
}

.ls-teaser__excerpt {
    margin: 0;
    color: var(--ls-text-secondary);
    line-height: 1.7;
}

.ls-teaser__tier {
    margin-top: var(--ls-space-lg);
    padding: var(--ls-space-md);
    border: 1px solid var(--ls-border);
    border-radius: var(--ls-radius-sm);
    background: var(--ls-bg-muted);
}

.ls-teaser__tier-title {
    margin: 0;
    font-size: var(--ls-text-base);
}

.ls-teaser__tier-description {
    margin: var(--ls-space-xs) 0 0;
    color: var(--ls-text-secondary);
    line-height: 1.6;
}

.ls-teaser__tier-price {
    margin: var(--ls-space-sm) 0 0;
    font-weight: 600;
}

.ls-teaser__actions {
    margin-top: var(--ls-space-md);
    display: flex;
    flex-wrap: wrap;
    gap: var(--ls-space-sm);
}

.ls-teaser__cta,
.ls-teaser__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--ls-radius-sm);
    padding: 0.55rem 0.8rem;
    text-decoration: none;
    font-size: var(--ls-text-sm);
    font-weight: 600;
}

.ls-teaser__cta {
    background: var(--ls-text);
    color: var(--ls-bg);
}

.ls-teaser__cta:hover {
    opacity: 0.92;
}

.ls-teaser__cta--disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.ls-teaser__link {
    border: 1px solid var(--ls-border);
    color: var(--ls-text-secondary);
    background: transparent;
}

.ls-teaser__auth {
    border-top: 1px solid var(--ls-border);
    padding: var(--ls-space-lg);
}

.ls-teaser__auth-text {
    text-align: center;
    margin: 0 0 var(--ls-space-md);
    color: var(--ls-text-secondary);
    font-size: var(--ls-text-sm);
}

.ls-teaser__auth-text a {
    color: var(--ls-accent);
    font-weight: 600;
}

.ls-teaser__tier-missing {
    margin-top: var(--ls-space-lg);
    padding: var(--ls-space-sm) var(--ls-space-md);
    border-radius: var(--ls-radius-sm);
    border: 1px solid var(--ls-border);
    background: var(--ls-bg-muted);
}

.ls-stream-item--teaser .ls-stream-item__body--teaser {
    margin-top: var(--ls-space-sm);
    position: relative;
    overflow: hidden;
    border-radius: var(--ls-radius-sm);
    isolation: isolate;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--ls-space-xs);
    padding: var(--ls-space-xl) var(--ls-space-lg);
    min-height: 220px;
    text-align: center;
}

.ls-stream-item--teaser .ls-stream-item__body--teaser > * {
    position: relative;
    z-index: 1;
}

.ls-stream-item--teaser .ls-stream-item__teaser-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.ls-stream-item--teaser .ls-stream-item__teaser-bg img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.2;
}

.ls-stream-item--teaser .ls-teaser__notice {
    margin: 0;
}

.ls-stream-item--teaser .ls-teaser__tier-meta {
    margin: 0;
    font-size: var(--ls-text-sm);
    color: var(--ls-text-secondary);
    font-weight: 600;
}

.ls-stream-item--teaser .ls-stream-item__excerpt {
    margin: 0;
    max-width: 52ch;
}

.ls-stream-item--teaser .ls-teaser__actions {
    margin: var(--ls-space-sm) 0 0;
    justify-content: center;
}

.ls-single__footer {
    margin-top: var(--ls-space-xl);
    padding-top: 0;
    font-size: var(--ls-text-sm);
    color: var(--ls-text-secondary);
}

.ls-single__tags-label,
.ls-single__categories-label {
    font-weight: 600;
    color: var(--ls-text);
}

/* Single post hero redesign (regular blog posts only) */
.single-post .ls-site-content {
    padding-top: var(--ls-space-2xl);
}

.single-post .ls-single--feature {
    max-width: 780px;
    margin: 0 auto var(--ls-space-3xl);
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.single-post .ls-single--feature .ls-single__hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--ls-space-md);
    margin-bottom: var(--ls-space-2xl);
}

.single-post .ls-single--feature .ls-single__hero-meta {
    display: flex;
    align-items: center;
    gap: var(--ls-space-sm);
    color: var(--ls-text-muted);
    font-size: var(--ls-text-sm);
}

.single-post .ls-single--feature .ls-single__meta-separator {
    opacity: 0.75;
    font-size: 0.8em;
}

.single-post .ls-single--feature .ls-single__title {
    margin: 0;
    text-align: center;
    font-size: clamp(1.9rem, 5.2vw, 3rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.single-post .ls-single--feature .ls-single__excerpt {
    margin: 0;
    max-width: 65ch;
    color: var(--ls-text-secondary);
    font-size: var(--ls-text-lg);
    line-height: 1.7;
    text-align: center;
}

.single-post .ls-single--feature .ls-single__hero-author {
    display: inline-flex;
    align-items: center;
    gap: var(--ls-space-sm);
}

.single-post .ls-single--feature .ls-single__hero-author .ls-avatar__img {
    width: 40px;
    height: 40px;
}

.single-post .ls-single--feature .ls-single__hero-author-text .ls-author-name {
    font-size: var(--ls-text-sm);
}

.single-post .ls-single--feature .ls-single__hero-image {
    margin: var(--ls-space-md) 0 0;
    width: 100%;
    border-radius: 22px;
    overflow: hidden;
    background: transparent;
}

.single-post .ls-single--feature .ls-single__hero-image img {
    display: block;
    width: 100%;
    height: auto;
}

.single-post .ls-single--feature .ls-single__content {
    color: var(--ls-text);
    font-size: 1rem;
    line-height: 1.9;
}

.single-post .ls-single--feature .ls-single__content > * {
    max-width: 65ch;
    margin-left: auto;
    margin-right: auto;
}

.single-post .ls-single--feature .ls-single__content > img,
.single-post .ls-single--feature .ls-single__content > figure,
.single-post .ls-single--feature .ls-single__content > .wp-block-image,
.single-post .ls-single--feature .ls-single__content > .wp-block-embed {
    max-width: 100%;
}

.single-post .ls-single--feature .ls-single__content h2,
.single-post .ls-single--feature .ls-single__content h3,
.single-post .ls-single--feature .ls-single__content h4 {
    color: var(--ls-text);
    margin-top: var(--ls-space-2xl);
}

.single-post .ls-single--feature .ls-single__footer {
    display: flex;
    flex-wrap: wrap;
    gap: var(--ls-space-sm);
    align-items: center;
    margin-top: var(--ls-space-2xl);
}

.single-post .ls-single--feature .ls-single__tax {
    display: flex;
    flex-wrap: wrap;
    gap: var(--ls-space-sm);
}

.single-post .ls-single--feature .ls-single__pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.7rem;
    border: 1px solid var(--ls-border);
    border-radius: var(--ls-radius-sm);
    color: var(--ls-text-muted);
    background: var(--ls-bg-surface);
    font-size: var(--ls-text-xs);
    font-weight: 600;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.single-post .ls-single--feature .ls-single__pill:hover {
    color: var(--ls-text);
    border-color: var(--ls-text-muted);
}

.single-post .ls-single--feature .ls-single__extras {
    margin-top: var(--ls-space-2xl);
    padding-top: var(--ls-space-xl);
    border-top: 1px solid var(--ls-border);
    display: grid;
    gap: var(--ls-space-xl);
}

.single-post .ls-single--feature .ls-single__passwordless .ls-passwordless {
    max-width: none;
    margin: 0;
    padding: var(--ls-space-lg);
    border: 1px solid var(--ls-border);
    border-radius: var(--ls-radius-md);
    background: var(--ls-bg-surface);
}

.single-post .ls-single--feature .ls-single__passwordless .ls-passwordless__text:last-child {
    margin-bottom: 0;
}

.ls-related-posts__header {
    margin-bottom: var(--ls-space-sm);
}

.ls-related-posts__title {
    margin: 0;
    font-size: var(--ls-text-lg);
    line-height: 1.2;
}

.ls-related-posts__rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - var(--ls-space-md)) / 2);
    gap: var(--ls-space-md);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding-bottom: var(--ls-space-xs);
    scroll-snap-type: x proximity;
}

@media (max-width: 720px) {
    .ls-related-posts__rail {
        grid-auto-columns: minmax(240px, 88%);
    }
}

.ls-related-posts__card {
    min-width: 0;
    scroll-snap-align: start;
}

.ls-related-posts__card-link {
    display: block;
    height: 100%;
    border-radius: var(--ls-radius-md);
    background: var(--ls-bg-surface);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
}

.ls-related-posts__card-link:hover {
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.ls-related-posts__thumb {
    margin: 0;
    aspect-ratio: 16 / 10;
    background: var(--ls-bg-muted);
    overflow: hidden;
}

.ls-related-posts__thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ls-related-posts__body {
    padding: var(--ls-space-md);
    display: grid;
    gap: var(--ls-space-xs);
}

.ls-related-posts__meta {
    margin: 0;
    color: var(--ls-text-muted);
    font-size: var(--ls-text-xs);
}

.ls-related-posts__card-title {
    margin: 0;
    font-size: var(--ls-text-base);
    line-height: 1.3;
    color: var(--ls-text);
}

.ls-related-posts__excerpt {
    margin: 0;
    color: var(--ls-text-secondary);
    font-size: var(--ls-text-sm);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Post nav */
.post-navigation {
    margin-top: var(--ls-space-xl);
    padding-top: var(--ls-space-lg);
    border-top: 1px solid var(--ls-border);
}

.post-navigation .nav-links {
    display: flex;
    justify-content: space-between;
    gap: var(--ls-space-md);
}

.ls-post-nav__label {
    display: block;
    font-size: var(--ls-text-xs);
    color: var(--ls-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
    margin-bottom: 2px;
}

.ls-post-nav__title {
    font-size: var(--ls-text-sm);
    font-weight: 600;
    color: var(--ls-text);
}

.post-navigation a:hover .ls-post-nav__title { color: var(--ls-accent-hover); }

/* ==========================================================================
   15. Archives / Search / 404
   ========================================================================== */

.ls-archive__header { margin-bottom: var(--ls-space-xl); text-align: center; }
.ls-archive__title { font-size: var(--ls-text-2xl); font-weight: 700; }
.ls-archive__description { color: var(--ls-text-secondary); margin-top: var(--ls-space-sm); font-size: 1rem; }
.ls-archive__description--author p { margin-bottom: var(--ls-space-sm); }
.ls-archive__description--author p:last-child { margin-bottom: 0; }
.ls-archive__author-website a { color: var(--ls-accent); }
.ls-archive__author-website a:hover { color: var(--ls-accent-hover); }

.ls-no-results { text-align: center; padding: var(--ls-space-3xl) 0; }
.ls-no-results__title { font-size: var(--ls-text-2xl); margin-bottom: var(--ls-space-md); }
.ls-no-results__text { color: var(--ls-text-secondary); margin-bottom: var(--ls-space-xl); }

/* ==========================================================================
   16. Comments
   ========================================================================== */

.ls-comments {
    margin-top: var(--ls-space-xl);
    padding-top: var(--ls-space-xl);
}

.ls-comments__toggle {
    display: block;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    padding: 10px 20px;
    border: 1px solid var(--ls-border);
    border-radius: var(--ls-radius-full);
    background: var(--ls-bg-surface);
    color: var(--ls-text);
    font-family: var(--ls-font);
    font-size: var(--ls-text-sm);
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
    cursor: pointer;
    transition: border-color var(--ls-transition), color var(--ls-transition), background var(--ls-transition);
}

.ls-comments__toggle:hover {
    border-color: var(--ls-text-muted);
    color: var(--ls-text-secondary);
}

.ls-comments__toggle[aria-expanded="true"] {
    border-color: var(--ls-text-muted);
}

.ls-comments__panel {
    margin-top: var(--ls-space-lg);
}

.ls-comments__title {
    font-size: var(--ls-text-lg);
    margin-bottom: var(--ls-space-lg);
    text-align: center;
}

.ls-comments__list {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--ls-space-xl);
}

.ls-comments__list > li {
    list-style: none;
    margin: 0;
}

.ls-comments__list .children {
    list-style: none;
    margin: var(--ls-space-md) 0 0;
    padding-left: calc(36px + 10px);
}

.ls-comment {
    padding-bottom: var(--ls-space-md);
    border-bottom: 1px solid var(--ls-border);
}

.ls-comments__list > li:last-child > .ls-comment {
    border-bottom: none;
    padding-bottom: 0;
}

.ls-comments__list .ls-author-name,
.ls-comments__list .ls-author-name a {
    color: var(--ls-text);
    font-size: var(--ls-text-sm);
    font-weight: 600;
    font-style: normal;
}

.ls-comments__list .ls-author-name a:hover {
    color: var(--ls-accent-hover);
}

.ls-comments__list .ls-stream-item__header {
    margin-bottom: var(--ls-space-sm);
}

.ls-comments__list .ls-stream-item__content {
    font-size: var(--ls-text-sm);
    line-height: 1.6;
}

.ls-comments__list .ls-stream-item__content p:last-child {
    margin-bottom: 0;
}

.ls-comments__list .ls-stream-item__content a,
.ls-comment__pingback a {
    color: var(--ls-accent);
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-thickness: 1px;
}

.ls-comments__list .ls-stream-item__content a:hover,
.ls-comment__pingback a:hover {
    color: var(--ls-accent-hover);
}

.ls-comment__moderation {
    font-size: var(--ls-text-xs);
    color: var(--ls-text-muted);
    margin: 0 0 var(--ls-space-sm);
    font-style: italic;
}

.ls-comment__footer {
    margin-top: var(--ls-space-sm);
    display: flex;
    align-items: center;
    gap: var(--ls-space-md);
}

.ls-comment__footer a,
.ls-comment__edit a {
    color: var(--ls-text-muted);
    font-size: var(--ls-text-xs);
    font-weight: 600;
}

.ls-comment__footer a:hover,
.ls-comment__edit a:hover {
    color: var(--ls-text-secondary);
}

.ls-comment__pingback {
    padding: var(--ls-space-md) 0;
    font-size: var(--ls-text-sm);
    color: var(--ls-text-secondary);
}

.ls-comment__pingback a {
    color: var(--ls-text-muted);
}

.ls-comment__pingback a:hover {
    color: var(--ls-text-secondary);
}

.ls-comments__closed { color: var(--ls-text-muted); font-style: italic; }

/* Comment form */
.ls-comments__form label {
    display: block;
    font-size: var(--ls-text-sm);
    font-weight: 500;
    margin-bottom: var(--ls-space-xs);
}

.ls-comments__form input[type="text"],
.ls-comments__form input[type="email"],
.ls-comments__form input[type="url"],
.ls-comments__form textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--ls-border);
    border-radius: var(--ls-radius-sm);
    background: var(--ls-bg);
    color: var(--ls-text);
    font-family: var(--ls-font);
    font-size: var(--ls-text-sm);
    transition: border-color var(--ls-transition);
    margin-bottom: var(--ls-space-md);
}

.ls-comments__form input:focus,
.ls-comments__form textarea:focus {
    outline: none;
    border-color: var(--ls-text-muted);
}

.ls-comments__form .form-submit input[type="submit"] {
    padding: 10px 24px;
    background: var(--ls-text);
    color: var(--ls-bg);
    border: none;
    border-radius: var(--ls-radius-full);
    font-family: var(--ls-font);
    font-size: var(--ls-text-sm);
    font-weight: 600;
    cursor: pointer;
    transition: opacity var(--ls-transition);
}

.ls-comments__form .form-submit input[type="submit"]:hover { opacity: 0.85; }

/* ==========================================================================
   17. Footer
   ========================================================================== */

.ls-site-footer {
    padding: var(--ls-space-2xl) 0;
}

.ls-site-footer--header {
    display: none;
}

.ls-site-footer__info {
    text-align: center;
    font-size: var(--ls-text-xs);
    color: var(--ls-text-muted);
}

.ls-site-footer__custom { margin-bottom: 2px; color: var(--ls-text-secondary); }
.ls-site-footer__copyright { margin-bottom: 2px; }
.ls-site-footer__copyright a { color: var(--ls-text-muted); }
.ls-site-footer__powered { font-size: 0.7875rem; }
.ls-site-footer__powered a { color: var(--ls-text-muted); }

.ls-site-footer .ls-social-links { margin-top: var(--ls-space-md); }

/* ==========================================================================
   18. Pagination
   ========================================================================== */

.pagination, .nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    margin-top: var(--ls-space-2xl);
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 var(--ls-space-sm);
    border-radius: var(--ls-radius-sm);
    font-size: var(--ls-text-xs);
    font-weight: 500;
    color: var(--ls-text-muted);
    transition: all var(--ls-transition);
}

.pagination .page-numbers:hover { background: var(--ls-bg-surface); color: var(--ls-text); }
.pagination .page-numbers.current { background: var(--ls-text); color: var(--ls-bg); }

/* ==========================================================================
   19. Forms
   ========================================================================== */

.search-form {
    display: flex;
    gap: var(--ls-space-sm);
    max-width: 360px;
    margin: 0 auto;
}

.search-form .search-field {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--ls-border);
    border-radius: var(--ls-radius-full);
    background: var(--ls-bg-input);
    color: var(--ls-text);
    font-family: var(--ls-font);
    font-size: var(--ls-text-sm);
}
.search-form .search-field:focus { outline: none; border-color: var(--ls-text-muted); }

.search-form .search-submit {
    padding: 10px 20px;
    background: var(--ls-text);
    color: var(--ls-bg);
    border: none;
    border-radius: var(--ls-radius-full);
    font-family: var(--ls-font);
    font-size: var(--ls-text-sm);
    font-weight: 600;
    cursor: pointer;
}

/* ==========================================================================
   20. Media & Embeds
   ========================================================================== */

.wp-block-embed, .wp-block-video { margin: var(--ls-space-lg) 0; }
.wp-block-embed__wrapper iframe { max-width: 100%; }

/* Keep Ghost/Koenig video cards inside page/single content width. */
.ls-single__content .kg-video-card {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    box-sizing: border-box;
}

.ls-single__content .kg-video-card iframe,
.ls-single__content .kg-video-card video {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
}

figure { margin: var(--ls-space-lg) 0; }
figcaption { font-size: var(--ls-text-xs); color: var(--ls-text-muted); margin-top: var(--ls-space-sm); text-align: center; }

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: var(--ls-space-sm);
}

/* ==========================================================================
   21. Utilities
   ========================================================================== */

.screen-reader-text {
    border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
    height: 1px; margin: -1px; overflow: hidden; padding: 0;
    position: absolute; width: 1px; word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: var(--ls-bg-surface); border-radius: var(--ls-radius-sm);
    box-shadow: 0 0 2px 2px rgba(0,0,0,0.6); clip: auto !important; clip-path: none;
    color: var(--ls-text); display: block; font-size: var(--ls-text-sm); font-weight: 700;
    height: auto; left: 5px; line-height: normal; padding: 15px 23px 14px;
    text-decoration: none; top: 5px; width: auto; z-index: 100000;
}

.page-links { margin: var(--ls-space-lg) 0; font-weight: 600; }

/* ==========================================================================
   22. Animations
   ========================================================================== */

@keyframes fadein-from-top {
    from {
        opacity: 0;
        translate: 0 -10px;
    }
    to   {
        opacity: 1;
        translate: 0 0;
    }
}

@keyframes fadein-from-bottom {
    from {
        opacity: 0;
        translate: 0 10px;
    }
    to   {
        opacity: 1;
        translate: 0 0;
    }
}

.ls-stream-item {
    animation: fadein-from-bottom 1.5s ease forwards;
    opacity: 0;
}

.ls-stream-item:nth-child(1) { animation-delay: 0.03s; }
.ls-stream-item:nth-child(2) { animation-delay: 0.06s; }
.ls-stream-item:nth-child(3) { animation-delay: 0.09s; }
.ls-stream-item:nth-child(4) { animation-delay: 0.12s; }
.ls-stream-item:nth-child(5) { animation-delay: 0.15s; }
.ls-stream-item:nth-child(n+6) { animation-delay: 0.18s; }

@media (prefers-reduced-motion: reduce) {
    .ls-stream-item { animation: none; opacity: 1; }
    * { transition-duration: 0.01ms !important; }
}

/* ==========================================================================
   23. Accessibility
   ========================================================================== */

:focus-visible {
    outline: 2px solid var(--ls-accent);
    outline-offset: 2px;
}

/* ==========================================================================
   24. Print
   ========================================================================== */

@media print {
    .ls-vignette, .ls-main-nav, .ls-header-icon, .ls-passwordless,
    .ls-social-links, .ls-site-footer__powered, .ls-stream-item__read-more,
    .pagination { display: none !important; }

    body { color: #000; background: #fff; }
    .ls-single, .ls-stream-item { border: none; box-shadow: none; padding: 0; background: none; }
}

/* ==========================================================================
   25. Responsive
   ========================================================================== */

@media (max-width: 640px) {
    :root { --ls-text-3xl: 1.6875rem; --ls-text-2xl: 1.40625rem; }

    .ls-site-header__branding { padding: var(--ls-space-lg) 0; }
    .ls-single { padding: var(--ls-space-md); }

    .ls-single__featured-image,
    .ls-single__image-full,
    .ls-single__video {
        margin-left: calc(var(--ls-space-md) * -1);
        margin-right: calc(var(--ls-space-md) * -1);
    }

    .ls-single--video .ls-single__video,
    .ls-single--video .ls-single__featured-image,
    .ls-single--image .ls-single__image-full,
    .ls-single--image .ls-single__featured-image {
        margin-left: 0;
        margin-right: 0;
    }

    .single-post .ls-site-content {
        padding-top: var(--ls-space-xl);
    }

    .single-post .ls-single--feature .ls-single__hero {
        align-items: flex-start;
    }

    .single-post .ls-single--feature .ls-single__title,
    .single-post .ls-single--feature .ls-single__excerpt {
        text-align: left;
    }

    .ls-passwordless__pill { padding: 3px 3px 3px 12px; }
}
