:root {
    --bg: #f4f7fc;
    --surface: #ffffff;
    --surface-soft: #eef3fb;
    --text: #0f172a;
    --muted: #64748b;
    --line: #dbe2ef;
    --brand: #2563eb;
    --brand-strong: #0f3eae;
    --ok: #10981f;
    --danger: #ef4444;
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 22px;
    --shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
    --container: min(1360px, calc(100% - 2.2rem));
    --transition: 0.25s ease;
}

html[data-theme="dark"] {
    --bg: #0b1220;
    --surface: #10192c;
    --surface-soft: #15223a;
    --text: #e5ecff;
    --muted: #9fb1d1;
    --line: #263654;
    --brand: #5d8cff;
    --brand-strong: #7ca2ff;
    --shadow: 0 20px 46px rgba(0, 0, 0, 0.32);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    background: radial-gradient(circle at top right, rgba(37, 99, 235, 0.08), transparent 40%), var(--bg);
    color: var(--text);
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.68;
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    color: var(--brand);
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0;
    line-height: 1.3;
}

p {
    margin: 0;
}

ul,
ol {
    margin: 0;
    padding: 0;
}

.container {
    width: var(--container);
    margin: 0 auto;
}

.site-content {
    padding: 1.4rem 0 0;
}

.topbar {
    border-bottom: 1px solid var(--line);
    background: var(--surface);
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 38px;
}

.topbar-date {
    color: var(--muted);
    font-size: 0.82rem;
}

.topbar-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 1.1rem;
    font-size: 0.82rem;
}

.topbar-links a {
    color: var(--muted);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 90;
    backdrop-filter: saturate(180%) blur(14px);
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    border-bottom: 1px solid var(--line);
}

.header-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1rem;
    align-items: center;
    min-height: 72px;
}

.site-branding {
    min-width: 152px;
}

.site-branding .custom-logo {
    max-height: 42px;
    width: auto;
}

.brand-text {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--brand);
    letter-spacing: -0.02em;
}

.primary-nav {
    justify-self: center;
}

.menu,
.menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.primary-menu {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.primary-menu > li > a {
    color: var(--text);
    padding: 0.35rem 0;
}

.primary-menu > li.current-menu-item > a,
.primary-menu > li > a:hover {
    color: var(--brand);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.action-btn {
    border: 1px solid var(--line);
    border-radius: 999px;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    background: var(--surface);
    cursor: pointer;
    transition: var(--transition);
}

.action-btn:hover {
    color: var(--brand);
    border-color: color-mix(in srgb, var(--brand) 38%, var(--line));
}

.mobile-toggle {
    display: none;
}

.mobile-nav,
.search-panel {
    border-top: 1px solid var(--line);
    background: var(--surface);
}

.mobile-nav-inner,
.search-panel-inner {
    padding: 1rem 0 1.2rem;
}

.mobile-menu {
    display: grid;
    gap: 0.65rem;
    margin-bottom: 1rem;
}

.search-form {
    display: flex;
    gap: 0.6rem;
}

.search-form label {
    flex: 1;
}

.search-field {
    width: 100%;
    border: 1px solid var(--line);
    background: var(--surface-soft);
    color: var(--text);
    border-radius: 10px;
    min-height: 42px;
    padding: 0 0.9rem;
    font-size: 0.95rem;
}

.search-submit,
.newsletter-form button,
.comment-form input[type="submit"],
.wp-block-search__button {
    border: 0;
    background: linear-gradient(125deg, var(--brand), var(--brand-strong));
    color: #fff;
    border-radius: 10px;
    min-height: 42px;
    padding: 0 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform var(--transition), filter var(--transition);
}

.search-submit:hover,
.newsletter-form button:hover,
.comment-form input[type="submit"]:hover,
.wp-block-search__button:hover {
    transform: translateY(-1px);
    filter: brightness(1.03);
}

.hero-section,
.category-grid-section,
.spotlight-section,
.content-section,
.community-section,
.archive-layout,
.single-layout,
.page-layout {
    margin-top: 1.35rem;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: 1rem;
}

.hero-main {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--surface);
    box-shadow: var(--shadow);
    position: relative;
}

.hero-main-media img,
.post-card-media img,
.timeline-thumb img,
.single-cover img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.hero-main-content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 1.3rem;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.02), rgba(15, 23, 42, 0.86));
    color: #fff;
}

.hero-main-content h1 {
    margin-top: 0.6rem;
    font-size: clamp(1.5rem, 3vw, 2rem);
    letter-spacing: -0.02em;
}

.hero-main-content p {
    margin-top: 0.6rem;
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.95rem;
}

.hero-cat,
.post-card-cat {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 0.65rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--brand) 16%, transparent);
    color: var(--brand);
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.hero-main-content .hero-cat {
    color: #fff;
    background: rgba(37, 99, 235, 0.3);
}

.hero-side {
    display: grid;
    gap: 0.85rem;
}

.post-card {
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform var(--transition), border-color var(--transition);
}

.post-card:hover {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--brand) 25%, var(--line));
}

.post-card--compact {
    display: grid;
    grid-template-columns: 120px 1fr;
}

.post-card--compact .post-card-media,
.post-card--compact .post-card-media img {
    height: 100%;
}

.post-card-content {
    padding: 0.8rem 0.9rem 1rem;
}

.post-card-title {
    margin-top: 0.5rem;
    font-size: 1rem;
}

.post-card-meta {
    margin-top: 0.65rem;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.8rem;
    color: var(--muted);
}

.post-card-fallback {
    width: 100%;
    min-height: 100%;
    background: linear-gradient(120deg, #113b91, #2563eb 58%, #2b8cff);
    aspect-ratio: 16/9;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.95rem;
}

.section-heading h2 {
    font-size: clamp(1.2rem, 2vw, 1.45rem);
    letter-spacing: -0.01em;
}

.section-heading a {
    font-size: 0.84rem;
    color: var(--muted);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 0.8rem;
}

.category-pill {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    min-height: 110px;
    padding: 0.8rem;
    display: grid;
    align-content: center;
    justify-items: center;
    text-align: center;
    gap: 0.2rem;
    transition: var(--transition);
}

.category-pill:hover {
    border-color: color-mix(in srgb, var(--brand) 35%, var(--line));
    transform: translateY(-2px);
}

.category-icon {
    color: var(--brand);
    font-size: 1.2rem;
    width: 1.2rem;
    height: 1.2rem;
}

.category-text {
    font-weight: 700;
    font-size: 0.86rem;
}

.category-count {
    color: var(--muted);
    font-size: 0.77rem;
}

.spotlight-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.95rem;
}

.content-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 1.2rem;
}

.timeline-list {
    display: grid;
    gap: 0.9rem;
}

.timeline-item {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 0.9rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.timeline-thumb,
.timeline-thumb img {
    height: 100%;
}

.timeline-content {
    padding: 0.9rem 1rem 1rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.timeline-content h3,
.timeline-content h2 {
    font-size: 1.05rem;
}

.timeline-content p {
    color: var(--muted);
    font-size: 0.92rem;
}

.widget {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    padding: 1rem;
    box-shadow: var(--shadow);
}

.widget + .widget {
    margin-top: 0.95rem;
}

.widget-title {
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.trending-list {
    list-style: none;
    display: grid;
    gap: 0.75rem;
}

.trending-list li {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 0.55rem;
    align-items: start;
}

.trend-rank {
    color: var(--brand);
    font-weight: 700;
}

.newsletter-form {
    margin-top: 0.65rem;
    display: grid;
    gap: 0.55rem;
}

.newsletter-form input,
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface-soft);
    color: var(--text);
    min-height: 42px;
    padding: 0.72rem 0.9rem;
    font-size: 0.92rem;
}

.comment-form textarea {
    min-height: 140px;
}

.community-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.95rem;
}

.community-card {
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 1rem;
}

.community-card h3 {
    font-size: 1rem;
}

.community-card p {
    margin-top: 0.5rem;
    color: var(--muted);
    font-size: 0.92rem;
}

.community-card a {
    display: inline-flex;
    margin-top: 0.65rem;
    color: var(--brand);
    font-size: 0.85rem;
    font-weight: 700;
}

.ttp-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.82rem;
    color: var(--muted);
    margin-bottom: 1rem;
}

.ttp-breadcrumb .sep {
    opacity: 0.6;
}

.single-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 1.2rem;
}

.single-main,
.single-sidebar {
    min-width: 0;
}

.single-header {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    padding: 1.2rem;
}

.single-title {
    margin-top: 0.7rem;
    font-size: clamp(1.7rem, 4vw, 2.35rem);
    letter-spacing: -0.03em;
}

.single-meta,
.single-share {
    margin-top: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
    color: var(--muted);
    font-size: 0.88rem;
}

.single-share a {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: 1px solid var(--line);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.single-cover {
    margin: 1rem 0;
    overflow: hidden;
    border-radius: var(--radius-lg);
}

.ai-summary,
.single-bottom-block,
.comments-area,
.page-layout {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    padding: 1rem 1.15rem;
    margin-top: 1rem;
}

.ai-summary h2,
.single-bottom-block h2,
.comments-title {
    font-size: 1.2rem;
    margin-bottom: 0.65rem;
}

.faq-card + .faq-card {
    margin-top: 0.8rem;
}

.faq-card h3 {
    font-size: 1rem;
    margin-bottom: 0.35rem;
}

.faq-card p {
    color: var(--muted);
    font-size: 0.92rem;
}

.entry-content {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    padding: 1.1rem 1.2rem;
    margin-top: 1rem;
}

.entry-content > * + * {
    margin-top: 1rem;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
    scroll-margin-top: 95px;
}

.entry-content h2 {
    font-size: 1.55rem;
    margin-top: 1.8rem;
}

.entry-content h3 {
    font-size: 1.28rem;
    margin-top: 1.3rem;
}

.entry-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.94rem;
}

.entry-content table th,
.entry-content table td {
    border: 1px solid var(--line);
    padding: 0.55rem 0.7rem;
    text-align: left;
}

.entry-content blockquote {
    margin: 0;
    padding: 0.85rem 1rem;
    border-left: 4px solid var(--brand);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    background: color-mix(in srgb, var(--brand) 10%, var(--surface));
}

.generated-toc ul {
    list-style: none;
    display: grid;
    gap: 0.42rem;
}

.generated-toc a {
    color: var(--muted);
    font-size: 0.88rem;
}

.generated-toc a.is-active,
.generated-toc a:hover {
    color: var(--brand);
}

.comment-list {
    list-style: none;
    margin-bottom: 1rem;
}

.comment-body {
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface-soft);
    padding: 0.8rem;
}

.comment-list li + li {
    margin-top: 0.8rem;
}

.archive-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 1.2rem;
}

.archive-header {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    padding: 1rem 1.15rem;
    margin-bottom: 1rem;
}

.archive-header h1 {
    font-size: clamp(1.45rem, 3vw, 1.9rem);
}

.archive-header p {
    margin-top: 0.45rem;
    color: var(--muted);
}

.pagination-wrap,
.nav-links {
    margin-top: 1rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.page-numbers {
    min-width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid var(--line);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

.page-numbers.current {
    border-color: var(--brand);
    color: var(--brand);
    font-weight: 700;
}

.site-footer {
    margin-top: 2rem;
    background: linear-gradient(145deg, #0a1d44, #07142d);
    color: #d8e1f9;
}

.footer-grid {
    padding: 2rem 0 1.5rem;
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr 1.2fr;
    gap: 1.2rem;
}

.footer-logo {
    font-size: 1.5rem;
    color: #fff;
}

.footer-brand p {
    margin-top: 0.65rem;
    color: #95a8d3;
    font-size: 0.78rem;
}

.footer-social {
    margin-top: 0.8rem;
    display: flex;
    gap: 0.45rem;
}

.footer-social a {
    width: 32px;
    height: 32px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.footer-nav-block h3,
.footer-newsletter h3 {
    font-size: 1rem;
    color: #fff;
}

.footer-nav-block ul,
.footer-menu {
    list-style: none;
    margin-top: 0.65rem;
    display: grid;
    gap: 0.45rem;
}

.footer-nav-block a,
.footer-menu a,
.footer-newsletter p {
    color: #a8b7dc;
    font-size: 0.88rem;
}

.footer-newsletter .newsletter-form input {
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    min-height: 62px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #9db0db;
    font-size: 0.82rem;
}

.scroll-top {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

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

@media (max-width: 1140px) {
    .category-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .spotlight-grid,
    .community-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .content-section,
    .single-layout,
    .archive-layout {
        grid-template-columns: 1fr;
    }

    .single-sidebar,
    .archive-sidebar,
    .content-sidebar {
        order: -1;
    }

    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .header-row {
        grid-template-columns: auto 1fr auto;
    }

    .primary-nav {
        display: none;
    }

    .mobile-toggle {
        display: inline-flex;
    }

    .hero-grid {
        grid-template-columns: 1fr;
    }

    .post-card--compact {
        grid-template-columns: 1fr;
    }

    .post-card--compact .post-card-media img {
        aspect-ratio: 16/9;
    }

    .timeline-item {
        grid-template-columns: 1fr;
    }

    .timeline-content {
        padding: 0.9rem 1rem 1rem;
    }
}

@media (max-width: 640px) {
    .topbar-links {
        display: none;
    }

    .header-row {
        min-height: 62px;
    }

    .site-content {
        padding-top: 1rem;
    }

    .category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .spotlight-grid,
    .community-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero-main-content {
        position: static;
        background: var(--surface);
        color: var(--text);
    }

    .hero-main-content p {
        color: var(--muted);
    }

    .hero-main-content .hero-cat {
        color: var(--brand);
        background: color-mix(in srgb, var(--brand) 14%, transparent);
    }

    .single-title {
        font-size: 1.6rem;
    }

    .entry-content,
    .single-header,
    .ai-summary,
    .single-bottom-block,
    .comments-area {
        padding: 0.9rem;
    }
}


/* UI refinement: topbar social, hero slider, stream tabs, sidebar mini cards */
.topbar-meta {
    display: flex;
    align-items: center;
    gap: 0.95rem;
}

.topbar-social {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.topbar-social a {
    width: 24px;
    height: 24px;
    border: 1px solid var(--line);
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    background: var(--surface);
}

.topbar-social a:hover {
    color: var(--brand);
    border-color: color-mix(in srgb, var(--brand) 35%, var(--line));
}

.hero-slider {
    position: relative;
}

.hero-track {
    position: relative;
}

.hero-slide {
    display: none;
}

.hero-slide.is-active {
    display: block;
    animation: heroFade 0.35s ease;
}

.hero-main-media img {
    aspect-ratio: 16/9;
    min-height: 420px;
}

.hero-controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    padding: 0 0.8rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transform: translateY(-50%);
    pointer-events: none;
}

.hero-nav {
    pointer-events: auto;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.55);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.hero-nav:hover {
    background: rgba(15, 23, 42, 0.75);
}

.hero-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.hero-dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
}

.hero-dot.is-active {
    width: 22px;
    background: #fff;
}

.stream-head {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: var(--shadow);
    padding: 0.75rem 0.9rem;
}

.stream-head .section-heading {
    margin-bottom: 0.75rem;
}

.stream-tabs {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.stream-tab {
    border: 1px solid var(--line);
    background: var(--surface-soft);
    color: var(--muted);
    border-radius: 999px;
    min-height: 34px;
    padding: 0 0.9rem;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
}

.stream-tab.is-active {
    border-color: color-mix(in srgb, var(--brand) 40%, var(--line));
    background: color-mix(in srgb, var(--brand) 14%, var(--surface));
    color: var(--brand);
}

.stream-panel {
    margin-top: 0.9rem;
}

.stream-panel[hidden] {
    display: none;
}

.topic-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.topic-cloud a {
    border: 1px solid var(--line);
    background: var(--surface-soft);
    border-radius: 999px;
    min-height: 28px;
    padding: 0 0.7rem;
    display: inline-flex;
    align-items: center;
    font-size: 0.8rem;
    color: var(--muted);
}

.topic-cloud a:hover {
    color: var(--brand);
    border-color: color-mix(in srgb, var(--brand) 35%, var(--line));
}

.mini-list {
    display: grid;
    gap: 0.75rem;
}

.mini-card {
    display: grid;
    grid-template-columns: 94px minmax(0, 1fr);
    gap: 0.6rem;
}

.mini-media,
.mini-media img {
    width: 100%;
    height: 74px;
    object-fit: cover;
    border-radius: 10px;
}

.mini-title {
    font-size: 0.88rem;
    line-height: 1.45;
    font-weight: 700;
}

@keyframes heroFade {
    from {
        opacity: 0.65;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 900px) {
    .topbar-meta {
        width: 100%;
        justify-content: space-between;
    }

    .hero-main-media img {
        min-height: 280px;
    }

    .stream-tabs {
        flex-wrap: wrap;
    }
}

@media (max-width: 640px) {
    .topbar-social {
        display: none;
    }

    .hero-main-media img {
        min-height: 220px;
    }

    .hero-controls,
    .hero-dots {
        display: none;
    }

    .stream-head {
        padding: 0.75rem;
    }

    .mini-card {
        grid-template-columns: 82px minmax(0, 1fr);
    }

    .mini-media,
    .mini-media img {
        height: 64px;
    }
}

/* Phase 3-6 refinements: accessibility, article UX, archive featured, QA polish */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

.skip-link:focus {
    width: auto;
    height: auto;
    margin: 0;
    clip: auto;
    white-space: normal;
    left: 1rem;
    top: 1rem;
    padding: 0.45rem 0.7rem;
    background: var(--brand);
    color: #fff;
    border-radius: 8px;
    z-index: 110;
}

.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: transparent;
    z-index: 120;
}

.reading-progress-bar {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--brand), var(--accent, #1098f7));
    transition: width 0.12s linear;
}

.article-highlights {
    margin-top: 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    padding: 0.8rem 0.9rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.7rem;
}

.highlight-item {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    color: var(--muted);
    font-size: 0.86rem;
}

.highlight-item .dashicons {
    color: var(--brand);
    width: 1rem;
    height: 1rem;
    font-size: 1rem;
    margin-top: 0.1rem;
}

.article-nav {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
}

.article-nav-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    padding: 0.85rem;
    display: grid;
    gap: 0.3rem;
}

.article-nav-card .label {
    font-size: 0.77rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.article-nav-card strong {
    font-size: 0.93rem;
    line-height: 1.45;
}

.archive-hero {
    position: relative;
    overflow: hidden;
}

.archive-meta-line {
    margin-top: 0.65rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--muted);
    font-size: 0.84rem;
}

.archive-featured {
    margin-bottom: 1rem;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 0.9rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.archive-featured-media,
.archive-featured-media img {
    width: 100%;
    height: 100%;
    min-height: 250px;
    object-fit: cover;
}

.archive-featured-body {
    padding: 0.95rem 1rem 1rem 0;
    display: grid;
    align-content: center;
    gap: 0.55rem;
}

.archive-featured-body h2 {
    font-size: clamp(1.15rem, 2.1vw, 1.5rem);
}

.archive-featured-body p {
    color: var(--muted);
    font-size: 0.92rem;
}

.single-sidebar .toc-widget {
    position: sticky;
    top: 95px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

@media (max-width: 1140px) {
    .archive-featured {
        grid-template-columns: 1fr;
    }

    .archive-featured-body {
        padding: 0.95rem 1rem 1rem;
    }

    .single-sidebar .toc-widget {
        position: static;
    }

    .article-highlights {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .article-nav {
        grid-template-columns: 1fr;
    }

    .reading-progress {
        height: 2px;
    }
}


/* Pixel-perfect refinement pass */
.topbar {
    border-bottom: 1px solid color-mix(in srgb, var(--line) 88%, #fff);
}

.topbar-date {
    letter-spacing: 0.01em;
}

.primary-menu {
    text-transform: uppercase;
    letter-spacing: 0.05em;
    gap: 1rem;
}

.primary-menu > li > a {
    opacity: 0.94;
}

.hero-grid {
    gap: 1.05rem;
}

.hero-main {
    border-radius: 18px;
}

.hero-main-content {
    padding: 1.35rem;
}

.hero-main-content h1,
.hero-main-content h2 {
    font-size: clamp(1.45rem, 2.45vw, 2.05rem);
    letter-spacing: -0.025em;
}

.hero-main-content .post-card-meta {
    margin-top: 0.55rem;
}

.category-pill {
    min-height: 116px;
    padding: 0.85rem 0.65rem;
}

.category-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 10px;
    border: 1px solid color-mix(in srgb, var(--brand) 28%, var(--line));
    background: color-mix(in srgb, var(--brand) 10%, var(--surface));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.spotlight-section .post-card {
    position: relative;
    min-height: 250px;
    background: #0f172a;
    border: 0;
}

.spotlight-section .post-card .post-card-media,
.spotlight-section .post-card .post-card-media img {
    height: 100%;
    min-height: 250px;
    object-fit: cover;
}

.spotlight-section .post-card .post-card-content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    padding: 1rem;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0), rgba(15, 23, 42, 0.9));
    color: #fff;
}

.spotlight-section .post-card .post-card-title {
    font-size: 1.02rem;
}

.spotlight-section .post-card .post-card-meta,
.spotlight-section .post-card .post-card-cat {
    color: #d8e3ff;
}

.spotlight-section .post-card .post-card-cat {
    background: rgba(255, 255, 255, 0.14);
}

.timeline-item {
    grid-template-columns: 210px minmax(0, 1fr);
}

.timeline-content {
    padding-top: 0.95rem;
}

.stream-head {
    padding: 0.8rem 0.9rem 0.85rem;
}

.stream-tab {
    min-height: 32px;
    padding: 0 0.8rem;
}

.widget-title {
    letter-spacing: -0.01em;
}

.trend-rank {
    width: 22px;
    height: 22px;
    border-radius: 7px;
    background: color-mix(in srgb, var(--brand) 13%, var(--surface));
    border: 1px solid color-mix(in srgb, var(--brand) 28%, var(--line));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.footer-grid {
    gap: 1.35rem;
}

@media (max-width: 900px) {
    .primary-menu {
        letter-spacing: 0.02em;
    }

    .timeline-item {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    :root {
        --container: min(1360px, calc(100% - 1.2rem));
    }

    .hero-main-content {
        padding: 1rem 0.95rem 1.05rem;
    }

    .hero-main-content h1,
    .hero-main-content h2 {
        font-size: 1.28rem;
    }

    .category-pill {
        min-height: 100px;
        padding: 0.7rem 0.55rem;
    }

    .stream-tab {
        font-size: 0.78rem;
    }
}

/* Refinement pass 2: tighter editorial rhythm and card balance */
:root {
    --container: min(1280px, calc(100% - 2rem));
    --radius-md: 18px;
    --radius-lg: 24px;
}

.site-content {
    padding-top: 1.65rem;
}

.topbar-inner {
    min-height: 40px;
}

.header-row {
    min-height: 76px;
}

.hero-grid {
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
    gap: 1.2rem;
}

.hero-main-media img {
    aspect-ratio: 16/10;
    min-height: 460px;
}

.hero-main-content {
    padding: 1.55rem 1.5rem 1.35rem;
}

.hero-main-content h1,
.hero-main-content h2 {
    font-size: clamp(1.55rem, 2.5vw, 2.12rem);
    line-height: 1.3;
}

.hero-main-content p {
    margin-top: 0.72rem;
    max-width: 92%;
    font-size: 0.96rem;
    line-height: 1.7;
}

.hero-side {
    gap: 1rem;
}

.post-card--compact {
    grid-template-columns: 132px 1fr;
}

.post-card-content {
    padding: 0.95rem 0.95rem 1rem;
}

.category-grid {
    gap: 0.9rem;
}

.category-pill {
    min-height: 122px;
    padding: 0.95rem 0.72rem;
}

.category-text {
    font-size: 0.9rem;
}

.spotlight-grid {
    gap: 1rem;
}

.spotlight-section .post-card,
.spotlight-section .post-card .post-card-media,
.spotlight-section .post-card .post-card-media img {
    min-height: 265px;
}

.spotlight-section .post-card .post-card-content {
    padding: 1.1rem 1rem 0.95rem;
}

.content-section {
    grid-template-columns: minmax(0, 1fr) 336px;
    gap: 1.35rem;
}

.timeline-item {
    grid-template-columns: 228px minmax(0, 1fr);
}

.timeline-content {
    padding: 1rem 1.05rem 1.05rem 0;
}

.timeline-content h2,
.timeline-content h3 {
    font-size: 1.1rem;
    line-height: 1.42;
}

.widget {
    padding: 1.05rem;
}

.widget-title {
    margin-bottom: 0.85rem;
    font-size: 1.02rem;
}

.mini-card {
    grid-template-columns: 96px minmax(0, 1fr);
}

.mini-media,
.mini-media img {
    height: 76px;
}

.single-layout {
    grid-template-columns: minmax(0, 1fr) 336px;
    gap: 1.35rem;
}

.single-header {
    padding: 1.35rem 1.35rem 1.25rem;
}

.single-title {
    margin-top: 0.78rem;
    font-size: clamp(1.8rem, 4.1vw, 2.52rem);
}

.single-meta,
.single-share {
    margin-top: 0.82rem;
    font-size: 0.9rem;
}

.ai-summary,
.single-bottom-block,
.comments-area,
.page-layout,
.entry-content {
    padding: 1.2rem 1.3rem;
}

.entry-content {
    font-size: 1.03rem;
    line-height: 1.78;
}

.entry-content h2 {
    font-size: 1.66rem;
    margin-top: 1.95rem;
}

.entry-content h3 {
    font-size: 1.34rem;
}

.footer-grid {
    grid-template-columns: 1.15fr 0.9fr 0.9fr 1.2fr;
    gap: 1.5rem;
    padding: 2.2rem 0 1.65rem;
}

.footer-bottom {
    min-height: 68px;
}

@media (max-width: 1140px) {
    .hero-main-media img {
        min-height: 350px;
    }

    .content-section,
    .single-layout,
    .archive-layout {
        gap: 1.05rem;
    }
}

@media (max-width: 900px) {
    :root {
        --container: min(1280px, calc(100% - 1.45rem));
    }

    .site-content {
        padding-top: 1.2rem;
    }

    .hero-main-content {
        padding: 1.05rem;
    }

    .hero-main-media img {
        min-height: 300px;
    }

    .post-card--compact {
        grid-template-columns: 1fr;
    }

    .content-section,
    .single-layout,
    .archive-layout {
        gap: 1rem;
    }
}

@media (max-width: 640px) {
    :root {
        --container: min(1280px, calc(100% - 1rem));
    }

    .header-row {
        min-height: 64px;
    }

    .hero-main-media img {
        min-height: 230px;
    }

    .hero-main-content {
        padding: 0.95rem 0.9rem 1rem;
    }

    .hero-main-content h1,
    .hero-main-content h2 {
        font-size: 1.3rem;
    }

    .category-pill {
        min-height: 106px;
    }

    .timeline-content {
        padding: 0.88rem 0.92rem 1rem;
    }

    .ai-summary,
    .single-bottom-block,
    .comments-area,
    .page-layout,
    .entry-content,
    .single-header {
        padding: 0.95rem;
    }

    .entry-content {
        font-size: 0.98rem;
    }
}

/* Refinement pass 3: closer visual lock to premium magazine demo */
:root {
    --container: min(1240px, calc(100% - 2.15rem));
}

.site-content {
    padding-top: 1.5rem;
}

.hero-section,
.category-grid-section,
.spotlight-section,
.content-section,
.community-section {
    margin-top: 1.5rem;
}

.section-heading {
    margin-bottom: 1.05rem;
}

.section-heading h2 {
    font-size: clamp(1.24rem, 2vw, 1.5rem);
    letter-spacing: -0.014em;
}

.hero-grid {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: 1.08rem;
}

.hero-main {
    border-radius: 20px;
}

.hero-main-media img {
    aspect-ratio: 16/9.8;
    min-height: 440px;
}

.hero-main-content {
    padding: 1.42rem 1.35rem 1.22rem;
}

.hero-main-content h1,
.hero-main-content h2 {
    font-size: clamp(1.58rem, 2.48vw, 2.16rem);
    line-height: 1.26;
    max-width: 95%;
}

.hero-main-content p {
    max-width: 90%;
    margin-top: 0.66rem;
    font-size: 0.94rem;
    line-height: 1.7;
}

.post-card {
    border-radius: 17px;
}

.post-card-content {
    padding: 0.86rem 0.9rem 0.95rem;
}

.post-card-title {
    font-size: 1.03rem;
    line-height: 1.42;
}

.post-card-meta {
    gap: 0.42rem;
    font-size: 0.79rem;
}

.category-grid {
    gap: 0.86rem;
}

.category-pill {
    min-height: 114px;
    border-radius: 15px;
}

.spotlight-grid {
    gap: 0.92rem;
}

.spotlight-section .post-card,
.spotlight-section .post-card .post-card-media,
.spotlight-section .post-card .post-card-media img {
    min-height: 252px;
}

.spotlight-section .post-card .post-card-content {
    padding: 0.95rem 0.9rem 0.84rem;
}

.spotlight-section .post-card .post-card-title {
    font-size: 1rem;
    line-height: 1.4;
}

.content-section {
    grid-template-columns: minmax(0, 1fr) 328px;
    gap: 1.2rem;
}

.stream-head {
    padding: 0.74rem 0.86rem 0.8rem;
}

.stream-panel {
    margin-top: 0.82rem;
}

.timeline-list {
    gap: 0.82rem;
}

.timeline-item {
    grid-template-columns: 214px minmax(0, 1fr);
    border-radius: 17px;
}

.timeline-content {
    padding: 0.88rem 0.95rem 0.92rem 0;
    gap: 0.38rem;
}

.timeline-content h2,
.timeline-content h3 {
    font-size: 1.02rem;
    line-height: 1.42;
}

.timeline-content p {
    font-size: 0.9rem;
    line-height: 1.62;
}

.widget {
    padding: 0.92rem 0.96rem;
    border-radius: 16px;
}

.widget-title {
    font-size: 0.98rem;
    margin-bottom: 0.72rem;
}

.trending-list {
    gap: 0.68rem;
}

.topic-cloud a {
    min-height: 30px;
    font-size: 0.78rem;
}

.mini-list {
    gap: 0.65rem;
}

.mini-card {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 0.54rem;
}

.mini-media,
.mini-media img {
    height: 68px;
    border-radius: 11px;
}

.mini-title {
    font-size: 0.86rem;
    line-height: 1.42;
}

.community-grid {
    gap: 0.9rem;
}

.community-card {
    border-radius: 16px;
    padding: 0.95rem;
}

.single-layout {
    grid-template-columns: minmax(0, 1fr) 328px;
    gap: 1.2rem;
}

.single-header {
    padding: 1.24rem 1.24rem 1.15rem;
    border-radius: 20px;
}

.single-title {
    font-size: clamp(1.78rem, 3.9vw, 2.42rem);
    letter-spacing: -0.028em;
}

.single-cover {
    border-radius: 20px;
}

.entry-content,
.ai-summary,
.single-bottom-block,
.comments-area {
    border-radius: 20px;
}

.entry-content {
    padding: 1.12rem 1.2rem;
    font-size: 1.01rem;
    line-height: 1.74;
}

.entry-content h2 {
    font-size: 1.58rem;
}

.entry-content h3 {
    font-size: 1.28rem;
}

.footer-grid {
    grid-template-columns: 1.1fr 0.95fr 0.95fr 1.2fr;
    gap: 1.34rem;
}

@media (max-width: 900px) {
    :root {
        --container: min(1240px, calc(100% - 1.35rem));
    }

    .site-content {
        padding-top: 1.06rem;
    }

    .hero-main-media img {
        min-height: 296px;
    }

    .timeline-content {
        padding: 0.86rem 0.92rem 0.96rem;
    }
}

@media (max-width: 640px) {
    :root {
        --container: min(1240px, calc(100% - 0.92rem));
    }

    .hero-section,
    .category-grid-section,
    .spotlight-section,
    .content-section,
    .community-section {
        margin-top: 1.12rem;
    }

    .hero-main {
        border-radius: 16px;
    }

    .hero-main-media img {
        min-height: 220px;
    }

    .hero-main-content {
        padding: 0.92rem 0.88rem 0.96rem;
    }

    .hero-main-content h1,
    .hero-main-content h2 {
        font-size: 1.26rem;
    }

    .category-grid {
        gap: 0.62rem;
    }

    .category-pill {
        min-height: 98px;
        padding: 0.68rem 0.5rem;
    }

    .stream-head {
        padding: 0.68rem 0.72rem 0.74rem;
    }

    .stream-tab {
        min-height: 31px;
        padding: 0 0.72rem;
    }

    .timeline-list {
        gap: 0.74rem;
    }

    .entry-content,
    .single-header,
    .ai-summary,
    .single-bottom-block,
    .comments-area {
        border-radius: 16px;
    }
}

/* Refinement pass 4: text rhythm and consistent card geometry */
.post-card-title a,
.timeline-content h2 a,
.timeline-content h3 a,
.mini-title,
.community-card h3 a {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card-title a,
.timeline-content h2 a,
.timeline-content h3 a {
    -webkit-line-clamp: 2;
}

.mini-title {
    -webkit-line-clamp: 2;
}

.post-card-meta,
.timeline-content .post-card-meta {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.post-card-media img {
    aspect-ratio: 16/10;
    object-fit: cover;
}

.post-card--compact .post-card-media img {
    aspect-ratio: 4/3;
}

.timeline-thumb img {
    aspect-ratio: 16/10;
    object-fit: cover;
}

.hero-main-content .post-card-meta {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.82);
}

.content-sidebar .widget,
.archive-sidebar .widget,
.single-sidebar .widget {
    backdrop-filter: saturate(155%) blur(2px);
}

.single-sidebar .toc-widget {
    top: 88px;
}

.entry-content ul,
.entry-content ol {
    padding-left: 1.25rem;
}

.entry-content li + li {
    margin-top: 0.38rem;
}

.footer-newsletter .newsletter-form {
    gap: 0.6rem;
}

@media (max-width: 900px) {
    .post-card-meta,
    .timeline-content .post-card-meta {
        white-space: normal;
    }

    .post-card--compact .post-card-media img,
    .timeline-thumb img {
        aspect-ratio: 16/9;
    }
}

@media (max-width: 640px) {
    .post-card-content {
        padding: 0.78rem 0.8rem 0.86rem;
    }

    .post-card-title {
        margin-top: 0.44rem;
        font-size: 0.97rem;
    }

    .post-card-meta {
        margin-top: 0.56rem;
        font-size: 0.76rem;
    }

    .widget {
        padding: 0.85rem 0.88rem;
    }

    .widget-title {
        font-size: 0.95rem;
    }

    .community-card p,
    .timeline-content p,
    .entry-content {
        line-height: 1.68;
    }
}

/* Refinement pass 5: mobile quick dock navigation */
.mobile-dock {
    display: none;
}

.mobile-dock-item {
    text-decoration: none;
}

.mobile-dock-btn {
    font: inherit;
}

@media (max-width: 640px) {
    body {
        padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px));
    }

    .mobile-dock {
        position: fixed;
        left: 50%;
        bottom: max(10px, env(safe-area-inset-bottom, 0px));
        transform: translateX(-50%);
        width: min(100%, calc(100% - 0.9rem));
        z-index: 130;
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 0.34rem;
        border: 1px solid color-mix(in srgb, var(--line) 86%, #fff);
        border-radius: 17px;
        background: color-mix(in srgb, var(--surface) 90%, transparent);
        backdrop-filter: saturate(180%) blur(10px);
        box-shadow: 0 12px 26px rgba(15, 23, 42, 0.14);
        padding: 0.42rem;
    }

    .mobile-dock-item {
        min-height: 52px;
        border: 1px solid transparent;
        border-radius: 12px;
        background: transparent;
        color: var(--muted);
        display: grid;
        justify-items: center;
        align-content: center;
        gap: 0.15rem;
        font-size: 0.67rem;
        font-weight: 700;
        letter-spacing: 0.01em;
        line-height: 1.1;
    }

    .mobile-dock-item .dashicons {
        width: 1.05rem;
        height: 1.05rem;
        font-size: 1.05rem;
    }

    .mobile-dock-item.is-active,
    .mobile-dock-item:hover,
    .mobile-dock-item:focus-visible,
    .mobile-dock-item[aria-expanded="true"] {
        color: var(--brand);
        border-color: color-mix(in srgb, var(--brand) 30%, var(--line));
        background: color-mix(in srgb, var(--brand) 11%, var(--surface));
    }

    .scroll-top {
        display: none;
    }
}

/* Refinement pass 6: mobile thumb-zone, denser feed, and faster scroll feel */
.content-section,
.single-layout,
.archive-layout,
.post-card,
.timeline-item,
.widget,
.community-card {
    content-visibility: auto;
    contain-intrinsic-size: 320px;
}

@media (max-width: 640px) {
    .site-content {
        padding-top: 0.9rem;
    }

    .hero-main-content p {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: hidden;
    }

    .stream-tabs {
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        padding-bottom: 0.12rem;
    }

    .stream-tabs::-webkit-scrollbar {
        display: none;
    }

    .stream-tab {
        flex: 0 0 auto;
        min-height: 36px;
        scroll-snap-align: start;
    }

    .timeline-item {
        grid-template-columns: 112px minmax(0, 1fr);
        min-height: 118px;
        contain-intrinsic-size: 118px;
    }

    .timeline-thumb,
    .timeline-thumb img {
        height: 100%;
        min-height: 100%;
    }

    .timeline-content {
        padding: 0.7rem 0.74rem 0.72rem 0;
        gap: 0.27rem;
    }

    .timeline-content h2,
    .timeline-content h3 {
        font-size: 0.95rem;
        line-height: 1.35;
    }

    .timeline-content p {
        font-size: 0.84rem;
        line-height: 1.54;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: hidden;
    }

    .timeline-content .post-card-cat {
        min-height: 23px;
        padding: 0 0.52rem;
        font-size: 0.66rem;
    }

    .timeline-content .post-card-meta {
        margin-top: 0.25rem;
        font-size: 0.72rem;
        opacity: 0.94;
    }

    .content-section,
    .single-layout,
    .archive-layout {
        gap: 0.84rem;
    }

    .widget + .widget {
        margin-top: 0.7rem;
    }

    .content-sidebar .widget,
    .archive-sidebar .widget,
    .single-sidebar .widget {
        backdrop-filter: none;
    }

    .mobile-dock {
        backdrop-filter: saturate(130%) blur(6px);
    }
}

/* Refinement pass 7: micro-performance and tactile mobile touch targets */
@media (max-width: 640px) {
    .header-actions .action-btn,
    .search-submit,
    .newsletter-form button,
    .comment-form input[type="submit"],
    .wp-block-search__button,
    .mobile-dock-item {
        min-height: 44px;
    }

    .category-pill,
    .post-card,
    .timeline-item,
    .widget,
    .community-card,
    .article-nav-card {
        box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
    }

    .post-card:hover,
    .article-nav-card:hover {
        transform: none;
    }

    .hero-controls,
    .hero-dots {
        display: none;
    }

    .entry-content,
    .single-header,
    .ai-summary,
    .single-bottom-block,
    .comments-area {
        scroll-margin-top: 72px;
    }
}

/* Refinement pass 8: adaptive mobile dock + compact header on scroll */
@media (max-width: 640px) {
    .mobile-dock {
        transition: transform 0.24s ease, opacity 0.24s ease, box-shadow 0.24s ease;
    }

    .mobile-dock.is-hidden {
        transform: translate(-50%, calc(115% + env(safe-area-inset-bottom, 0px)));
        opacity: 0;
        pointer-events: none;
        box-shadow: none;
    }

    .site-header.is-compact .header-row {
        min-height: 58px;
    }

    .site-header.is-compact .site-branding .custom-logo {
        max-height: 34px;
    }

    .site-header.is-compact .action-btn {
        width: 36px;
        height: 36px;
    }
}
