@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&display=swap');

:root {
    --bg: #020617;
    --card-bg: rgba(15, 23, 42, 0.96);
    --card-border: rgba(31, 41, 55, 0.9);
    --accent1: #60a5fa;
    --accent2: #38bdf8;
    --accent3: #a855f7;
    --header-bg-from: rgba(15, 23, 42, 0.9);
    --header-bg-to: rgba(17, 24, 39, 0.92);
    --icon-grad-primary: rgba(37, 99, 235, 0.55);
    --icon-grad-secondary: rgba(15, 23, 42, 0.95);
    --field-bg: rgba(15, 23, 42, 0.9);
    --field-border: rgba(148, 163, 184, 0.7);
    --field-text: #e5e7eb;

    /* Spacing scale (documented for consistency) */
    --space-2xs: 0.15rem;
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 0.75rem;
    --space-lg: 1rem;
    --space-xl: 1.5rem;
    --space-2xl: 2rem;

    /* Typography scale */
    --font-size-xs: 0.78rem;
    --font-size-sm: 0.85rem;
    --font-size-base: 0.95rem;
    --font-size-lg: 1.1rem;
    --font-size-xl: 1.35rem;
    --font-size-2xl: 1.9rem;
}

body[data-theme="palette1"] {
    /* Palette: c6de41, 2d6e7e, 153b44, 071c21 [https://colorhunt.co/palette/c6de412d6e7e153b44071c21] */
    --bg: #071c21;
    --card-bg: #153b44;
    --card-border: rgba(45, 110, 126, 0.9);
    --accent1: #c6de41;
    --accent2: #2d6e7e;
    --accent3: #153b44;
    --header-bg-from: rgba(7, 28, 33, 0.96);
    --header-bg-to: rgba(21, 59, 68, 0.96);
    --icon-grad-primary: rgba(198, 222, 65, 0.7);
    --icon-grad-secondary: rgba(7, 28, 33, 0.96);
}

body[data-theme="palette2"] {
    /* Palette: 000000, 3e432e, 616f39, a7d129 [https://colorhunt.co/palette/0000003e432e616f39a7d129] */
    --bg: #000000;
    --card-bg: #1b1f16;
    --card-border: rgba(62, 67, 46, 0.9);
    --accent1: #a7d129;
    --accent2: #616f39;
    --accent3: #3e432e;
    --header-bg-from: rgba(0, 0, 0, 0.96);
    --header-bg-to: rgba(20, 24, 12, 0.96);
    --icon-grad-primary: rgba(167, 209, 41, 0.7);
    --icon-grad-secondary: rgba(0, 0, 0, 0.96);
}

body[data-theme="palette3"] {
    /* Palette: 022c43, 053f5e, 115173, ffd700 [https://colorhunt.co/palette/022c43053f5e115173ffd700] */
    --bg: #022c43;
    --card-bg: #053f5e;
    --card-border: rgba(17, 81, 115, 0.9);
    --accent1: #ffd700;
    --accent2: #115173;
    --accent3: #053f5e;
    --header-bg-from: rgba(2, 44, 67, 0.96);
    --header-bg-to: rgba(5, 63, 94, 0.96);
    --icon-grad-primary: rgba(255, 215, 0, 0.75);
    --icon-grad-secondary: rgba(2, 44, 67, 0.96);
}

body[data-theme="palette4"] {
    /* Palette: 0c2233, 065471, 0a91ab, ffc045 [https://colorhunt.co/palette/0c22330654710a91abffc045] */
    --bg: #0c2233;
    --card-bg: #0b2f44;
    --card-border: rgba(6, 84, 113, 0.9);
    --accent1: #ffc045;
    --accent2: #0a91ab;
    --accent3: #065471;
    --header-bg-from: rgba(12, 34, 51, 0.96);
    --header-bg-to: rgba(6, 84, 113, 0.96);
    --icon-grad-primary: rgba(255, 192, 69, 0.8);
    --icon-grad-secondary: rgba(12, 34, 51, 0.96);
}

body[data-theme="palette5"] {
    /* Monochrome dark: black & greys only */
    --bg: #000000;
    --card-bg: #000000;
    --card-border: rgba(31, 41, 55, 0.9);
    --accent1: #e5e7eb;
    --accent2: #9ca3af;
    --accent3: #6b7280;
    --header-bg-from: #000000;
    --header-bg-to: #000000;
    --icon-grad-primary: rgba(75, 85, 99, 0.85);
    --icon-grad-secondary: rgba(0, 0, 0, 0.98);
}

body[data-theme="palette6"] {
    /* Light mode: white / light greys with dark text */
    --bg: #f9fafb;
    --card-bg: #ffffff;
    --card-border: rgba(209, 213, 219, 0.9);
    --accent1: #111827;
    --accent2: #4b5563;
    --accent3: #111827;
    --header-bg-from: rgba(243, 244, 246, 0.98);
    --header-bg-to: rgba(209, 213, 219, 0.98);
    --icon-grad-primary: rgba(17, 24, 39, 0.9);
    --icon-grad-secondary: rgba(243, 244, 246, 0.98);
    --field-bg: #f9fafb;
    --field-border: rgba(209, 213, 219, 0.9);
    --field-text: #111827;
    color: #111827;
}

body[data-theme="palette7"] {
    /* Super colorful: vibrant gradient accents */
    --bg: #020617;
    --card-bg: rgba(15, 23, 42, 0.96);
    --card-border: rgba(59, 130, 246, 0.8);
    --accent1: #ec4899;
    --accent2: #6366f1;
    --accent3: #22c55e;
    --header-bg-from: rgba(27, 20, 61, 0.98);
    --header-bg-to: rgba(76, 29, 149, 0.98);
    --icon-grad-primary: rgba(236, 72, 153, 0.85);
    --icon-grad-secondary: rgba(8, 47, 73, 0.98);
}

body {
    margin: 0;
    padding: 0;
    color: #e5e7eb;
    background: var(--bg);
    font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: var(--font-size-base);
    line-height: 1.7;
    position: relative;
    overflow-x: hidden;
}

/* Soft animated gradient background */
body::before {
    content: "";
    position: fixed;
    inset: -20%;
    background:
        radial-gradient(circle at 0% 0%, rgba(31, 41, 55, 0.5), transparent 60%),
        radial-gradient(circle at 100% 100%, rgba(15, 23, 42, 0.6), transparent 55%),
        radial-gradient(circle at 80% 10%, rgba(15, 23, 42, 0.7), transparent 60%);
    opacity: 0.9;
    pointer-events: none;
    z-index: -2;
    transform: translate3d(0,0,0);
    animation: ambientGradient 48s ease-in-out infinite alternate;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(180deg, rgba(15, 23, 42, 0.96) 0%, transparent 40%, rgba(0, 0, 0, 0.98) 100%),
        radial-gradient(circle at top, rgba(15, 23, 42, 0.9), transparent 70%);
    mix-blend-mode: normal;
    z-index: -1;
}

/* Override animated gradient for alternate themes so base color shifts visibly */
body[data-theme="palette1"]::before,
body[data-theme="palette2"]::before,
body[data-theme="palette3"]::before,
body[data-theme="palette4"]::before,
body[data-theme="palette5"]::before,
body[data-theme="palette6"]::before,
body[data-theme="palette7"]::before,
body[data-theme="palette1"]::after,
body[data-theme="palette2"]::after,
body[data-theme="palette3"]::after,
body[data-theme="palette4"]::after,
body[data-theme="palette5"]::after,
body[data-theme="palette6"]::after,
body[data-theme="palette7"]::after {
    background: none;
    background-image: none;
}

@keyframes ambientGradient {
    0% {
        transform: translate3d(-16px, 0, 0) scale(1);
        filter: blur(0);
    }
    50% {
        transform: translate3d(28px, -24px, 0) scale(1.05);
        filter: blur(0.8px);
    }
    100% {
        transform: translate3d(-22px, 22px, 0) scale(1.03);
        filter: blur(0.4px);
    }
}

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

a:hover {
    text-decoration: underline;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.site-header {
    background: transparent;
    color: #f9fafb;
    padding: 0.9rem 0 0.3rem;
    margin-bottom: 1.25rem;
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
}

.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 999px;
    padding: 0.55rem 1.1rem;
    background: linear-gradient(to right, var(--header-bg-from), var(--header-bg-to));
    border: 1px solid rgba(148, 163, 184, 0.6);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.9);
}

.site-title {
    margin: 0;
    font-size: 1.25rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

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

.site-nav {
    margin-left: 1.75rem;
    display: flex;
    align-items: center;
}

.site-nav a {
    margin-left: 1.2rem;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 0.2rem;
    color: #e5e7eb;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    position: relative;
}

.site-nav a:hover {
    color: #ffffff;
}

.site-nav a.active {
    color: #ffffff;
}

.site-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -0.4rem;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent1), var(--accent2), var(--accent3));
    opacity: 0;
    transform: scaleX(0.6);
    transform-origin: center;
    transition: opacity 160ms ease-out, transform 160ms ease-out;
}

.site-nav a:hover::after {
    opacity: 1;
    transform: scaleX(1);
}

.site-nav a.active::after {
    opacity: 1;
    transform: scaleX(1);
}

.site-main {
    padding: 1.5rem 0 3rem;
}

.site-nav-toggle {
    display: none;
    background: transparent;
    border: none;
    color: #e5e7eb;
    font-size: 1.1rem;
    margin-right: 0.5rem;
    cursor: pointer;
    min-width: 44px;
    min-height: 44px;
    border-radius: 999px;
}

.site-search {
    display: flex;
    align-items: center;
    margin-left: 1rem;
    position: relative;
}

.site-search-toggle {
    background: transparent;
    border: none;
    color: #e5e7eb;
    cursor: pointer;
    font-size: 1rem;
    padding: 0.2rem 0.4rem;
    min-width: 44px;
    min-height: 44px;
    border-radius: 999px;
}

.site-search-form {
    position: absolute;
    right: 0;
    top: 120%;
    background: rgba(15, 23, 42, 0.97);
    border-radius: 999px;
    padding: 0.25rem 0.6rem;
    border: 1px solid rgba(148, 163, 184, 0.8);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.9);
    opacity: 0;
    transform: translateY(-4px);
    pointer-events: none;
    transition: opacity 160ms ease-out, transform 160ms ease-out;
}

.site-search-form input[type="search"] {
    border: none;
    background: transparent;
    color: #e5e7eb;
    outline: none;
    font-size: 0.9rem;
    width: 180px;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0.5rem;
    z-index: 100;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid #1f2937;
    background: #111827;
    color: #f9fafb;
}

.skip-link:focus {
    left: 0.75rem;
}

.site-search.open .site-search-form {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Archive & search pages */
.archive-section {
    margin: 1.5rem 0;
}

.archive-list {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0;
}

.archive-list li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 0.3rem 0;
    font-size: 0.9rem;
}

.archive-list-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
}

.archive-label {
    color: #e5e7eb;
}

.archive-count {
    color: #9ca3af;
    font-size: 0.8rem;
}

.search-page-form {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.85rem 1rem 1rem;
    border-radius: 0.85rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.9);
}

.search-page-form-main {
    display: flex;
    gap: 0.5rem;
}

.search-page-form-main input[type="search"] {
    flex: 1 1 auto;
    padding: 0.4rem 0.6rem;
    border-radius: 999px;
    border: 1px solid var(--field-border);
    background: var(--field-bg);
    color: var(--field-text);
}

.search-page-form-main button {
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    border: 1px solid #4b5563;
    background-image: linear-gradient(135deg, #020617, #111827);
    color: #f9fafb;
    cursor: pointer;
}

.search-page-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.6rem;
    font-size: 0.8rem;
    color: #9ca3af;
}

.search-page-filters label {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.search-page-filters select {
    background: var(--field-bg);
    border-radius: 999px;
    border: 1px solid var(--field-border);
    color: var(--field-text);
    padding: 0.45rem 0.7rem;
    font-size: 0.8rem;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.9);
    transition: border-color 150ms ease-out, box-shadow 150ms ease-out, background-color 150ms ease-out, color 150ms ease-out;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: linear-gradient(135deg, rgba(15,23,42,1), rgba(15,23,42,0.98));
}

.search-page-filters select:hover {
    border-color: rgba(148, 163, 184, 0.9);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.98);
}

.search-page-filters select:focus {
    outline: none;
    border-color: var(--accent1);
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.7), 0 22px 55px rgba(15, 23, 42, 1);
}

.search-results {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0;
}

.search-result-item {
    margin-bottom: 0.8rem;
    padding: 0.75rem 1rem 0.75rem;
}

.search-suggestions {
    margin-top: 2rem;
    border-top: 1px dashed #1f2937;
    padding-top: 1.25rem;
}

.search-suggestions h2 {
    margin-top: 0;
    font-size: 1rem;
}

.search-suggestions-list {
    list-style: none;
    margin: 0.4rem 0 0.75rem;
    padding: 0;
    font-size: 0.9rem;
}

.search-suggestions-list li {
    padding: 0.1rem 0;
}

.search-suggestion-date {
    margin-left: 0.35rem;
    font-size: 0.78rem;
    color: #9ca3af;
}

.search-popular-tags {
    margin: 0.25rem 0 0;
    font-size: 0.85rem;
}

.search-popular-tags a {
    color: #93c5fd;
}

.post-excerpt,
.post-detail,
.static-page {
    background: var(--card-bg);
    border-radius: 0.85rem;
    padding: 1.6rem 1.55rem 1.4rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.95);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(22px) saturate(135%);
    -webkit-backdrop-filter: blur(22px) saturate(135%);
    transition: transform 180ms ease-out, box-shadow 180ms ease-out, border-color 180ms ease-out, background-color 180ms ease-out;
}

.post-excerpt h2 {
    margin-top: 0;
    margin-bottom: 0.35rem;
    font-size: 1.35rem;
}

.post-excerpt:hover {
    transform: translateY(-3px);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.98);
    border-color: rgba(148, 163, 184, 0.9);
    background-color: rgba(15, 23, 42, 0.99);
}

.post-detail h1,
.static-page h1 {
    margin-top: 0;
    margin-bottom: 0.35rem;
    font-size: var(--font-size-2xl);
    overflow-wrap: anywhere;
}

.post-meta {
    font-size: 0.78rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.75rem;
}

.post-meta-featured {
    color: var(--accent1);
}

.post-series-pill {
    display: inline-block;
    margin-left: 0.35rem;
}

.post-series-link {
    display: inline-block;
    padding: 0.12rem 0.5rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.7);
    background-color: rgba(15, 23, 42, 0.9);
    color: #e5e7eb;
    font-size: 0.7rem;
    text-transform: none;
    letter-spacing: 0;
}

.post-series-link:hover {
    text-decoration: none;
    background-color: rgba(30, 64, 175, 0.85);
}

.post-meta-separator {
    margin: 0 0.25rem;
}

.post-read-meta {
    color: #e5e7eb;
    font-weight: 500;
    letter-spacing: 0.05em;
}

.post-read-meta-words {
    margin-left: 0.15rem;
    color: #9ca3af;
    font-weight: 400;
}

.post-taxonomy {
    font-size: 0.85rem;
    color: #9ca3af;
    margin-top: 1rem;
}

.post-content,
.page-content {
    margin-top: 0.75rem;
    line-height: 1.8;
    max-width: 70ch;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 1024px) {
    .post-detail .post-content,
    .static-page .page-content {
        max-width: 98ch;
    }
}

/* Responsive embedded video wrapper */
.video-embed {
    margin: 1.5rem auto;
    max-width: 100%;
}

.video-embed iframe {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
}

/* Legacy gallery blocks migrated from WordPress [gallery] shortcodes */
.post-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.75rem;
    margin: 1.5rem auto;
    max-width: 100%;
}

.post-gallery-item {
    border-radius: 0.6rem;
    overflow: hidden;
    border: 1px solid var(--card-border);
    background: #020617;
}

.post-gallery-item img {
    display: block;
    width: 100%;
    height: auto;
}

/* Lightbox for gallery images */
.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: none;
    align-items: center;
    justify-content: center;
}

.gallery-lightbox.is-open {
    display: flex;
}

.gallery-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.92);
}

.gallery-lightbox-inner {
    position: relative;
    z-index: 1;
    max-width: 100vw;
    max-height: 100vh;
    padding: 1.5rem;
    box-sizing: border-box;
}

.gallery-lightbox-inner img {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 3.5rem); /* account for close button area */
    border-radius: 0.75rem;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.95);
}

.gallery-lightbox-close {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    background: transparent;
    border: none;
    color: #e5e7eb;
    font-size: 1.2rem;
    cursor: pointer;
}

.gallery-lightbox-close:focus-visible {
    outline: 2px solid #93c5fd;
    outline-offset: 2px;
}

.post-detail .post-content {
    position: relative;
}

.post-content p,
.page-content p {
    margin: 0 0 1.1rem;
    overflow-wrap: anywhere;
}

.post-content h2,
.page-content h2 {
    margin-top: 2rem;
    margin-bottom: 0.6rem;
    font-size: 1.4rem;
}

.post-content h3,
.page-content h3 {
    margin-top: 1.6rem;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.post-content ul,
.post-content ol,
.page-content ul,
.page-content ol {
    padding-left: 1.5rem;
    margin: 0 0 1.1rem;
}

.post-content li + li,
.page-content li + li {
    margin-top: 0.35rem;
}

.post-content li,
.page-content li,
.comment-body {
    overflow-wrap: anywhere;
}

.post-content table,
.page-content table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-collapse: collapse;
}

.post-content blockquote,
.page-content blockquote {
    margin: 1.4rem auto;
    padding: 0.9rem 1rem 0.9rem 1.1rem;
    border-left: 3px solid rgba(148, 163, 184, 0.9);
    background: rgba(15, 23, 42, 0.9);
    border-radius: 0.5rem;
    color: #e5e7eb;
    font-style: italic;
}

.post-content blockquote p:last-child,
.page-content blockquote p:last-child {
    margin-bottom: 0;
}

/* Reading progress bar */
.reading-progress {
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    height: 3px;
    z-index: 20;
    pointer-events: none;
}

.reading-progress-bar {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--accent1), var(--accent2));
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.8);
    transform-origin: left center;
}

.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.75rem;
    font-size: 0.85rem;
    color: #6b7280;
}

.pagination a {
    color: #93c5fd;
}

.site-footer {
    border-top: 1px solid #111827;
    padding: 2.25rem 0 2.75rem;
    margin-top: 2.5rem;
    font-size: 0.8rem;
    color: #9ca3af;
    background: var(--bg);
    text-align: center;
}

.footer-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.4rem;
}

.footer-social {
    margin-top: 0;
    margin-bottom: 0;
}

.footer-social a {
    margin: 0 0.35rem;
    color: #9ca3af;
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    border-radius: 999px;
}

.footer-social a:hover {
    color: #e5e7eb;
}

.footer-subscribe-widget {
    font-size: 0.78rem;
}

.footer-subscribe-inline {
    max-width: 260px;
    margin-left: auto;
}

.footer-subscribe-inline input[type="email"] {
    padding: 0.32rem 0.55rem;
    padding-right: 5rem;
    font-size: 0.8rem;
}

.footer-subscribe-inline button {
    padding: 0.28rem 0.75rem;
    font-size: 0.8rem;
}

.footer-copy {
    margin-top: 0.5rem;
}

@media (max-width: 640px) {
    .footer-top {
        flex-direction: column;
        align-items: center;
    }
    .footer-subscribe-inline {
        margin-left: 0;
    }
}

.comments {
    margin-top: 2.25rem;
}

.comment {
    margin-top: 0.85rem;
    padding: 0.9rem 1rem;
    border-radius: 0.6rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.85);
}

.comment-meta {
    font-size: 0.8rem;
    color: #6b7280;
    margin-bottom: 0.35rem;
}

.comment-form {
    margin-top: 1.5rem;
}

.comment-form label {
    display: block;
    margin: 0.5rem 0 0.25rem;
    font-weight: 500;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea {
    width: 100%;
    padding: 0.5rem 0.6rem;
    border-radius: 0.35rem;
    border: 1px solid var(--field-border);
    background: var(--field-bg);
    color: var(--field-text);
    box-sizing: border-box;
}

.comment-form button[type="submit"] {
    margin-top: 0.9rem;
    padding: 0.5rem 1.1rem;
    border-radius: 999px;
    border: 1px solid #4b5563;
    background-image: linear-gradient(135deg, #020617, #111827);
    color: #f9fafb;
    cursor: pointer;
}

.comment-form button[type="submit"]:hover {
    box-shadow:
        0 0 0 1px rgba(148, 163, 184, 0.65),
        0 16px 40px rgba(0, 0, 0, 0.95);
}

.design-label {
    margin-top: 0.75rem;
    font-size: 0.8rem;
    color: #9ca3af;
}

.post-list-two-col .post-two-col-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr);
    gap: 1.75rem;
    align-items: flex-start;
}

.post-stream-heading {
    margin-top: 0;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #9ca3af;
}

.post-stream-list {
    list-style: none;
    margin: 0.5rem 0 0;
    padding: 0;
    font-size: 0.9rem;
}

.post-stream-list li {
    margin-bottom: 0.4rem;
}

.post-stream-date {
    color: #6b7280;
    font-size: 0.8rem;
}

.timeline {
    position: relative;
    margin-left: 0.75rem;
    padding-left: 1.25rem;
    border-left: 2px solid rgba(55, 65, 81, 0.9);
}

.timeline-item {
    position: relative;
    margin-bottom: 1.5rem;
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: -1.4rem;
    top: 0.3rem;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #f59e0b;
    box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.9);
}

/* Palette 5 (monochrome) specific overrides to remove color */
body[data-theme="palette5"] .timeline-item::before {
    background: #9ca3af;
    box-shadow: 0 0 0 2px #000000;
}

body[data-theme="palette5"] .comment-flash-success,
body[data-theme="palette5"] .comment-flash-error {
    background: #111827;
    border-color: #4b5563;
    color: #e5e7eb;
}

body[data-theme="palette5"] .footer-social a:hover {
    color: #e5e7eb;
}

body[data-theme="palette5"] .EnlighterJS {
    filter: grayscale(1);
}

.timeline-meta time {
    font-size: 0.8rem;
    color: #9ca3af;
}

.timeline-content h2 {
    margin: 0.2rem 0 0.2rem;
    font-size: 1.2rem;
}

.post-subscribe-cta {
    margin-top: 1.5rem;
    font-size: 0.9rem;
}

.post-subscribe-cta h2 {
    margin: 0.35rem 0 0.25rem;
    font-size: 1rem;
}

.post-subscribe-cta p {
    margin: 0 0 0.5rem;
    color: #9ca3af;
}

.post-subscribe-separator {
    border: 0;
    border-top: 1px dashed rgba(55, 65, 81, 0.8);
    margin: 0 0 0.75rem;
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
}

.home-layout-2col {
    /* Mobile-first: stack by default; grid applied on larger screens below */
    margin-bottom: 2rem;
}

.home-left-column {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.home-panel {
    background: var(--card-bg);
    border-radius: 0.85rem;
    padding: 1.5rem 1.5rem 1.25rem;
    border: 1px solid var(--card-border);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.95);
}

.home-subscribe-panel {
    margin-top: 1.25rem;
    background: var(--card-bg);
    border-radius: 0.85rem;
    padding: 1.25rem 1.5rem 1.2rem;
    border: 1px solid var(--card-border);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9);
}

.home-subscribe-widget h2 {
    margin-top: 0;
    margin-bottom: 0.3rem;
    font-size: 1rem;
}

.home-subscribe-copy {
    margin-top: 0;
    margin-bottom: 0.6rem;
    font-size: 0.9rem;
    color: #9ca3af;
}

.subscribe-form {
    margin-top: 0.25rem;
}

.subscribe-inline {
    position: relative;
    max-width: 100%;
}

.subscribe-inline input[type="email"] {
    width: 100%;
    padding: 0.55rem 0.75rem;
    padding-right: 5.5rem; /* space for the button on the right */
    border-radius: 999px;
    border: 1px solid var(--field-border);
    background: var(--field-bg);
    color: var(--field-text);
    box-sizing: border-box;
    font-size: 0.9rem;
    min-height: 42px;
}

.subscribe-inline button {
    position: absolute;
    top: 50%;
    right: 3px;
    transform: translateY(-50%);
    padding: 0.32rem 0.85rem;
    border-radius: 999px;
    border: 1px solid #4b5563;
    background-image: linear-gradient(135deg, #020617, #111827);
    color: #f9fafb;
    cursor: pointer;
    font-size: 0.85rem;
    white-space: nowrap;
    min-height: 34px;
    line-height: 1.1;
}

.subscribe-inline button:hover {
    box-shadow: 0 10px 30px var(--accent1);
}

.subscribe-inline button[disabled] {
    opacity: 0.7;
    cursor: default;
    box-shadow: none;
}

.subscribe-flash {
    margin: 0 0 0.6rem;
    padding: 0.45rem 0.6rem;
    border-radius: 0.5rem;
    font-size: 0.85rem;
}

.subscribe-flash-success {
    background: rgba(22, 163, 74, 0.15);
    border: 1px solid rgba(22, 163, 74, 0.6);
    color: #bbf7d0;
}

.subscribe-flash-info {
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(37, 99, 235, 0.6);
    color: #bfdbfe;
}

.subscribe-flash-error {
    background: rgba(220, 38, 38, 0.15);
    border: 1px solid rgba(220, 38, 38, 0.7);
    color: #fecaca;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.home-panel-links {
    margin-top: 1.25rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    font-size: 0.85rem;
}

.home-panel-focus {
    margin-top: 1.25rem;
    font-size: 0.9rem;
    color: #d1d5db;
}

.home-panel-focus h2 {
    margin: 0 0 0.25rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #9ca3af;
}

.home-index h2 {
    margin-top: 0.25rem;
    margin-bottom: 0.25rem;
}

.home-index-list {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.95rem;
}

.home-index-list li {
    margin-bottom: 0.45rem;
}

.home-index-card {
    display: flex;
    gap: 0.9rem;
    align-items: center;
    padding: 0.55rem 0.5rem;
    border-radius: 0.75rem;
    position: relative;
    overflow: hidden;
    transition: background-color 140ms ease-out, transform 140ms ease-out, box-shadow 140ms ease-out, border-color 140ms ease-out;
}

.home-index-card::after {
    /* Override global gradient underline for card links */
    display: none;
}

.home-index-card:hover {
    background: var(--card-bg);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.9);
    transform: translateY(-1px);
}

.home-index-icon {
    flex: 0 0 3rem;
    height: 3rem;
    border-radius: 0.9rem;
    background: radial-gradient(circle at top left, var(--icon-grad-primary), var(--icon-grad-secondary));
    border: 1px solid rgba(148, 163, 184, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    color: #e5e7eb;
}

.home-index-icon-date {
    opacity: 0.9;
}

.home-index-text {
    flex: 1 1 auto;
    min-width: 0;
}

.home-index-title {
    font-size: 0.97rem;
    color: #e5e7eb;
    overflow-wrap: anywhere;
}

.home-index-excerpt {
    margin-top: 0.15rem;
    font-size: var(--font-size-sm);
    color: #9ca3af;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.home-index-meta {
    margin-top: 0.1rem;
    font-size: 0.8rem;
    color: #9ca3af;
    display: flex;
    align-items: baseline;
    gap: 0.3rem;
    flex-wrap: wrap;
}

.home-index-meta-sep {
    opacity: 0.6;
}

.home-index-new {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 0.05rem 0.4rem;
    border-radius: 999px;
    border: 1px solid var(--accent2);
    color: var(--accent1);
    background: rgba(15, 23, 42, 0.8);
}

.home-index-more {
    margin-top: 1.1rem;
    font-size: 0.9rem;
    color: #9ca3af;
}

.home-index-card:hover .home-index-excerpt {
    color: #e5e7eb;
}

/* Posts feed (infinite scroll) */
.posts-feed {
    background: var(--card-bg);
    border-radius: 0.85rem;
    padding: 1.6rem 1.55rem 1.4rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.95);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(22px) saturate(135%);
    -webkit-backdrop-filter: blur(22px) saturate(135%);
}

.posts-feed h1 {
    margin-top: 0;
    margin-bottom: 0.35rem;
    font-size: var(--font-size-2xl);
}

.posts-feed-list {
    list-style: none;
    margin: 0.75rem 0 0;
    padding: 0;
}

.posts-feed-item + .posts-feed-item {
    margin-top: 1.2rem;
}

.posts-feed-card {
    display: block;
    position: relative;
    padding: 1.1rem 1.2rem;
    border-radius: 0.85rem;
    border: 1px solid var(--card-border);
    background: rgba(15, 23, 42, 0.98);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85);
    transition: transform 150ms ease-out,
                box-shadow 150ms ease-out,
                border-color 150ms ease-out,
                background-color 150ms ease-out;
}

.posts-feed-card-link {
    position: absolute;
    inset: 0;
    border-radius: 0.85rem;
    z-index: 1;
}

.posts-feed-thumb a,
.posts-feed-title a {
    position: relative;
    z-index: 2;
}

.posts-feed-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.95);
    border-color: rgba(148, 163, 184, 0.9);
}

.posts-feed-card--with-thumb {
    display: flex;
    gap: 1rem;
    align-items: stretch;
}

.posts-feed-body {
    flex: 1 1 auto;
}

.posts-feed-thumb {
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid var(--card-border);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.9);
    flex: 0 0 240px;
    height: 100%;
}

.posts-feed-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: cover;
}

.posts-feed-title {
    margin: 0 0 0.25rem;
    font-size: 1.15rem;
}

.posts-feed-meta {
    margin: 0 0 0.3rem;
    font-size: 0.8rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    align-items: baseline;
}

.posts-feed-meta-separator {
    opacity: 0.6;
}

.posts-feed-new {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 0.05rem 0.4rem;
    border-radius: 999px;
    border: 1px solid var(--accent2);
    color: var(--accent1);
    background: rgba(15, 23, 42, 0.8);
}

.posts-feed-excerpt {
    margin: 0;
    font-size: var(--font-size-sm);
    color: #d1d5db;
}

.posts-feed-subscribe-card {
    margin-top: 0.9rem;
    padding: 0.9rem 1rem;
    border-radius: 0.75rem;
    border: 1px dashed rgba(148, 163, 184, 0.8);
    background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.20), transparent 55%), rgba(15, 23, 42, 0.96);
}

.posts-feed-subscribe-card h2 {
    margin: 0 0 0.3rem;
    font-size: 1rem;
}

.posts-feed-subscribe-card p {
    margin: 0 0 0.55rem;
    font-size: 0.9rem;
    color: #9ca3af;
}

.posts-feed-status {
    margin-top: 0.85rem;
    font-size: 0.85rem;
    color: #9ca3af;
    text-align: center;
    min-height: 1.1rem;
}

.posts-feed-sentinel {
    height: 1px;
}

@media (max-width: 768px) {
    .posts-feed-card--with-thumb {
        flex-direction: column;
    }

    .posts-feed-thumb {
        order: -1;
        max-height: none;
        height: auto;
    }

    .posts-feed-thumb img {
        height: auto;
    }
}

@media (max-width: 960px) {
    .post-list-two-col .post-two-col-layout,
    .home-layout-2col {
        display: block;
    }

    .home-panel {
        margin-bottom: 1.5rem;
    }

    .home-index {
        margin-top: 1.75rem;
    }

    .home-index-card {
        padding: 0.55rem 0.1rem;
    }

    .home-index-icon {
        display: none;
    }
}

@media (min-width: 961px) {
    .home-layout-2col {
        display: grid;
        grid-template-columns: minmax(0, 1.3fr) minmax(0, 2fr);
        gap: 2rem;
        align-items: flex-start;
    }
}

.contact-form {
    margin-top: 2rem;
}

.contact-form form {
    margin-top: 0.75rem;
}

.contact-form label {
    display: block;
    margin: 0.5rem 0 0.25rem;
    font-weight: 500;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    width: 100%;
    padding: 0.5rem 0.6rem;
    border-radius: 0.35rem;
    border: 1px solid var(--field-border);
    background: var(--field-bg);
    color: var(--field-text);
    box-sizing: border-box;
}

.contact-form button[type="submit"] {
    margin-top: 0.9rem;
    padding: 0.5rem 1.1rem;
    border-radius: 999px;
    border: 1px solid #4b5563;
    background-image: linear-gradient(135deg, #020617, #111827);
    color: #f9fafb;
    cursor: pointer;
}

.contact-form button[type="submit"]:hover {
    box-shadow:
        0 0 0 1px rgba(148, 163, 184, 0.65),
        0 16px 40px rgba(0, 0, 0, 0.95);
}

.contact-social ul {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0;
}

.contact-social li {
    margin-bottom: 0.3rem;
    font-size: 0.95rem;
}

.contact-social i {
    margin-right: 0.4rem;
    color: #9ca3af;
}

@media (max-width: 768px) {
    .site-header-inner {
        flex-wrap: wrap;
        border-radius: 0.85rem;
        padding: 0.5rem 0.7rem;
    }

    .site-nav-toggle {
        display: inline-block;
    }

    .site-title {
        font-size: 1rem;
        letter-spacing: 0.04em;
        flex: 1 1 auto;
    }

    .site-nav {
        width: 100%;
        margin-left: 0;
        margin-top: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0.35rem;
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        transition: max-height 180ms ease-out, opacity 180ms ease-out, margin-top 180ms ease-out;
    }

    .site-header-inner.nav-open .site-nav {
        margin-top: 0.5rem;
        max-height: 30rem;
        opacity: 1;
    }

    .site-nav a {
        margin: 0;
        min-height: 44px;
        padding: 0.55rem 0.75rem;
        border-radius: 0.55rem;
        border: 1px solid rgba(55, 65, 81, 0.85);
        background: rgba(15, 23, 42, 0.92);
        font-size: 0.88rem;
        letter-spacing: 0.06em;
    }

    .site-nav a::after {
        bottom: 0.2rem;
        left: 0.75rem;
        right: 0.75rem;
    }

    /* Move search into the hamburger menu on mobile */
    .site-search {
        width: 100%;
        margin-left: 0;
        margin-top: 0.4rem;
        justify-content: flex-start;
        display: none;
    }

    .site-header-inner.nav-open .site-search {
        display: flex;
    }

    .site-search-toggle {
        display: none;
    }

    .site-search-form {
        position: static;
        right: auto;
        top: auto;
        background: transparent;
        border-radius: 999px;
        padding: 0;
        border: none;
        box-shadow: none;
        opacity: 1;
        transform: none;
        pointer-events: auto;
        flex: 1 1 auto;
    }

    .site-search-form input[type="search"] {
        width: 100%;
        background: var(--field-bg);
        border-radius: 999px;
        border: 1px solid var(--field-border);
        padding: 0.55rem 0.8rem;
        color: var(--field-text);
        min-height: 42px;
    }

    .theme-switcher {
        margin-top: 0.4rem;
    }
}

@media (max-width: 768px) {
    .comment-form input[type="text"],
    .comment-form input[type="email"],
    .comment-form textarea,
    .contact-form input[type="text"],
    .contact-form input[type="email"],
    .contact-form textarea {
        padding: 0.65rem 0.75rem;
        font-size: 0.95rem;
    }

    .comment-form button[type="submit"],
    .contact-form button[type="submit"],
    .search-page-form-main button {
        min-height: 44px;
        font-size: 0.9rem;
    }

    .subscribe-inline input[type="email"] {
        min-height: 44px;
        padding-right: 5.8rem;
    }

    .subscribe-inline button {
        min-height: 36px;
        padding: 0.35rem 0.85rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

.admin-header {
    background: #111827;
}

.admin-header .container {
    max-width: 1000px;
}

.admin-main .container {
    max-width: 1000px;
}

/* Home hero */
.home-hero {
    margin-bottom: 2rem;
}

.home-hero-text {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1.3fr);
    gap: 2.5rem;
    align-items: center;
}

.home-hero-text h1 {
    margin: 0 0 0.5rem;
    font-size: 2.1rem;
}

.home-hero-subtitle {
    margin: 0 0 1rem;
    color: #6b7280;
    font-size: 0.95rem;
    letter-spacing: 0.03em;
}

/* Global fancy link underline for in-article/content + footer links
   (toned down from applying to every link inside .site-main) */
.post-content a,
.page-content a,
.static-page .page-content a,
.site-footer a {
    position: relative;
    text-decoration: none;
}

.post-content a::after,
.page-content a::after,
.static-page .page-content a::after,
.site-footer a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -0.25rem;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent1), var(--accent2), var(--accent3));
    opacity: 0;
    transform: scaleX(0.6);
    transform-origin: center;
    transition: opacity 160ms ease-out, transform 160ms ease-out;
}

.site-main a:hover::after,
.site-footer a:hover::after {
    opacity: 1;
    transform: scaleX(1);
}

/* Keyboard focus outlines */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid var(--accent1);
    outline-offset: 2px;
}

.home-hero-body {
    margin: 0;
    color: #d1d5db;
    font-size: 0.97rem;
}

.home-hero-image {
    text-align: right;
}

/* Ensure text content stays in left column and image in right on desktop */
.home-hero-text > h1,
.home-hero-text > p.home-hero-subtitle,
.home-hero-text > .home-hero-body {
    grid-column: 1;
}

.home-hero-image {
    grid-column: 2;
    grid-row: 1 / span 3;
}

.home-hero-image img {
    max-width: 260px;
    width: 100%;
    height: auto;
    border-radius: 999px;
    object-fit: cover;
    box-shadow:
        0 0 0 1px rgba(148, 163, 184, 0.4),
        0 24px 60px rgba(15, 23, 42, 0.95);
    transition: transform 220ms ease-out, box-shadow 220ms ease-out;
}

@media (max-width: 768px) {
    .home-hero-text {
        display: block;
    }

    .home-hero-image {
        float: right;
        margin: 0 0 0.75rem 0.75rem;
    }

    .home-hero-image img {
        max-width: 120px;
        shape-outside: circle(50%);
    }
}

.home-hero-image img:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow:
        0 0 0 1px rgba(191, 219, 254, 0.7),
        0 30px 90px rgba(15, 23, 42, 1);
}

/* Code snippets (non-Enlighter) */
.post-content pre:not(.EnlighterJSRAW),
.page-content pre:not(.EnlighterJSRAW),
.post-content pre.EnlighterJSRAW,
.page-content pre.EnlighterJSRAW {
    background: rgba(15, 23, 42, 0.98);
    border-radius: 0.5rem;
    padding: 0.9rem 1rem;
    margin: 1.2rem 0;
    overflow-x: auto;
    max-width: 100%;
    border: 1px solid rgba(30, 64, 175, 0.6);
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.9);
}

.post-content pre:not(.EnlighterJSRAW) code,
.page-content pre:not(.EnlighterJSRAW) code,
.post-content pre.EnlighterJSRAW code,
.page-content pre.EnlighterJSRAW code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.85rem;
    white-space: pre;
}

.post-content code,
.page-content code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.85rem;
    padding: 0.1rem 0.3rem;
    border-radius: 0.25rem;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(30, 64, 175, 0.5);
}

/* EnlighterJS snippets to match site style */
.EnlighterJS {
    background-color: rgba(15, 23, 42, 0.98) !important;
    background-image: none !important;
    border-radius: 0.75rem;
    border: 1px solid rgba(148, 163, 184, 0.6);
    box-shadow: 0 22px 60px rgba(15, 23, 42, 0.95);
    padding: 0.8rem 0.9rem !important;
    overflow-x: auto !important;
    max-width: 100%;
}

/* Ensure inner Enlighter containers and any Enlighter-* elements use the dark background */
.EnlighterJS,
.EnlighterJS *,
.EnlighterJS pre,
.EnlighterJS code,
.EnlighterJS .enlighter,
.EnlighterJS .enlighter-code,
.post-content pre[class*="Enlighter"],
.page-content pre[class*="Enlighter"],
.post-content code[class*="Enlighter"],
.page-content code[class*="Enlighter"] {
    background-color: rgba(15, 23, 42, 0.98) !important;
    background-image: none !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important;
    font-size: 0.85rem !important;
}

/* Preserve horizontal scrolling and prevent hard-wrapping inside code */
.EnlighterJS pre,
.post-content pre[class*="Enlighter"],
.page-content pre[class*="Enlighter"] {
    overflow-x: auto !important;
}

.EnlighterJS code,
.post-content code[class*="Enlighter"],
.page-content code[class*="Enlighter"] {
    white-space: pre !important;
}

.EnlighterJS .enlighter-toolbar {
    background: transparent !important;
    border: none !important;
}

.EnlighterJS .enlighter-line {
    color: #e5e7eb !important;
}

.EnlighterJS .enlighter-linenumber {
    color: #6b7280 !important;
}

.comment-flash {
    margin: 0.75rem 0 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.85rem;
}

.comment-flash-success {
    background: rgba(22, 163, 74, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.6);
    color: #bbf7d0;
}

.comment-flash-error {
    background: rgba(220, 38, 38, 0.15);
    border: 1px solid rgba(248, 113, 113, 0.7);
    color: #fecaca;
}

.comment-char-count {
    margin-top: 0.35rem;
    font-size: 0.8rem;
    color: #9ca3af;
}

.comment-moderation-note {
    margin-top: 0.25rem;
    font-size: 0.8rem;
    color: #6b7280;
}

.comments-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.comments-header h2 {
    margin: 0;
}

.comments-toggle {
    font-size: 0.8rem;
    border-radius: 999px;
    border: 1px solid #4b5563;
    padding: 0.25rem 0.7rem;
    background: transparent;
    color: #e5e7eb;
    cursor: pointer;
}

.comments-toggle:hover {
    background: rgba(15, 23, 42, 0.9);
}

/* Images in content should not overflow */
.post-content img,
.page-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    display: block;
    margin: 1.25rem auto;
}


