:root {
    --pg-ink: #111827;
    --pg-muted: #64748b;
    --pg-line: #e5e7eb;
    --pg-soft: #f8fafc;
    --pg-accent: #0ea5e9;
    --pg-accent-dark: #0369a1;
    --pg-warm: #f97316;
}

body {
    color: var(--pg-ink);
    background: #f8fafc;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.site-nav {
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
}

.navbar-brand {
    letter-spacing: 0;
}

.nav-link {
    color: #1f2937;
    font-weight: 700;
}

.nav-link:hover,
.nav-link:focus {
    color: var(--pg-accent-dark);
}

.nav-search {
    min-width: 260px;
}

.home-intro {
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(12, 74, 110, 0.82)),
        url("https://images.unsplash.com/photo-1454165804606-c3d57bc86b40?auto=format&fit=crop&w=1800&q=80") center/cover;
    color: #ffffff;
    padding: 4.8rem 0 4.2rem;
}

.intro-copy {
    max-width: 820px;
}

.home-intro .lead,
.home-intro .text-secondary {
    color: rgba(255, 255, 255, 0.82) !important;
}

.eyebrow {
    color: var(--pg-accent);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.hero-search {
    display: flex;
    gap: 0.75rem;
    max-width: 680px;
    padding: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.12);
    border-radius: 8px;
}

.hero-search .form-control {
    border: 0;
}

.btn-accent {
    color: #ffffff;
    background: var(--pg-accent-dark);
    border-color: var(--pg-accent-dark);
}

.btn-accent:hover {
    color: #ffffff;
    background: #075985;
    border-color: #075985;
}

.metric-panel {
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.11);
    backdrop-filter: blur(8px);
    padding: 2rem;
    border-radius: 8px;
}

.metric-panel .metric {
    display: block;
    font-size: clamp(3rem, 8vw, 5rem);
    line-height: 1;
    font-weight: 800;
}

.metric-panel .label {
    display: block;
    color: rgba(255, 255, 255, 0.78);
    margin-top: 0.75rem;
}

.metric-list {
    display: grid;
    gap: 0.75rem;
    margin-top: 1.5rem;
    color: rgba(255, 255, 255, 0.86);
}

.metric-list span {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 0.75rem;
}

.section-kicker {
    color: var(--pg-muted);
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.section-heading {
    border-bottom: 1px solid var(--pg-line);
    padding-bottom: 1rem;
}

.featured-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.85fr);
    grid-template-rows: repeat(2, minmax(210px, 1fr));
    gap: 1.25rem;
}

.featured-card {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    min-height: 210px;
    background: #0f172a;
    color: #ffffff;
}

.featured-card-large {
    grid-row: span 2;
    min-height: 445px;
}

.featured-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.38;
}

.featured-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.1), rgba(15, 23, 42, 0.92));
}

.featured-card-body {
    position: absolute;
    inset: auto 0 0;
    z-index: 1;
    padding: 1.25rem;
}

.featured-card-large .featured-card-body {
    padding: 1.8rem;
}

.featured-label {
    display: inline-flex;
    margin-bottom: 0.7rem;
    border-radius: 999px;
    background: var(--pg-accent);
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 900;
    padding: 0.3rem 0.65rem;
}

.featured-card h3 {
    font-size: 1.2rem;
    font-weight: 900;
}

.featured-card-large h3 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.featured-card a {
    color: #ffffff;
    text-decoration: none;
}

.featured-card p {
    color: rgba(255, 255, 255, 0.78);
    margin-bottom: 0.75rem;
}

.archive-hero {
    background: #0f172a;
    color: #ffffff;
    padding: 3.5rem 0;
}

.archive-hero p:not(.eyebrow) {
    color: rgba(255, 255, 255, 0.78);
}

.post-card {
    position: relative;
    display: flex;
    flex-direction: column;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0;
    background: #ffffff;
    min-height: 100%;
    overflow: hidden;
    transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.site-sidebar {
    display: grid;
    gap: 1.25rem;
}

.sidebar-widget {
    border: 1px solid var(--pg-line);
    border-radius: 8px;
    background: #ffffff;
    padding: 1.2rem;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.04);
}

.sidebar-widget h2 {
    border-bottom: 3px solid var(--pg-accent);
    font-size: 1rem;
    font-weight: 900;
    margin: 0 0 1rem;
    padding-bottom: 0.7rem;
}

.sidebar-list,
.popular-list {
    display: grid;
    gap: 0.65rem;
}

.sidebar-list a,
.popular-list a {
    color: var(--pg-ink);
    text-decoration: none;
}

.sidebar-list a {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 0.55rem;
}

.sidebar-list strong {
    color: var(--pg-accent-dark);
    font-size: 0.86rem;
}

.popular-list a {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    border: 1px solid #eef2f7;
    border-left: 3px solid #e0f2fe;
    border-radius: 6px;
    padding: 0.65rem 0.7rem;
    line-height: 1.35;
    transition: background 160ms ease, border-color 160ms ease;
}

.popular-list a:hover {
    background: #f8fafc;
    border-color: #dbeafe;
}

.popular-title {
    flex: 1;
    min-width: 0;
}

.popular-views {
    flex: 0 0 auto;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    background: #eff6ff;
    color: #075985;
    font-size: 0.72rem;
    font-weight: 900;
    line-height: 1;
    padding: 0.32rem 0.5rem;
}

.sidebar-list a:hover {
    color: var(--pg-accent-dark);
}

.post-card:hover {
    border-color: #bae6fd;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.11);
    transform: translateY(-3px);
}

.post-media {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid #eef2f7;
    background: #eef2f7;
}

.post-icon {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at 22% 18%, rgba(14, 165, 233, 0.22), transparent 34%),
        linear-gradient(135deg, rgba(14, 165, 233, 0.14), rgba(249, 115, 22, 0.1)),
        #f8fafc;
    color: #0369a1;
    font-weight: 900;
    font-size: 1.15rem;
}

.post-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 0;
    margin-bottom: 0;
    background: #e5e7eb;
    transition: transform 220ms ease, filter 220ms ease;
}

.post-card:hover .post-thumb {
    filter: saturate(1.05);
    transform: scale(1.035);
}

.post-date-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 4.5rem;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: #334155;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.1);
    font-size: 0.78rem;
    font-weight: 900;
    line-height: 1;
    padding: 0.42rem 0.62rem;
}

.post-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 1rem 1.05rem 1.05rem;
}

.post-card h2,
.post-card h3 {
    line-height: 1.28;
    margin-bottom: 0.65rem;
}

.post-card h2 a,
.post-card h3 a {
    display: -webkit-box;
    min-height: 3.2rem;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.post-card-body > p.text-secondary {
    display: -webkit-box;
    min-height: 4.2rem;
    overflow: hidden;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    font-size: 0.94rem;
    line-height: 1.5;
}

.featured-image {
    width: 100%;
    max-height: 430px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

.post-card a {
    color: var(--pg-ink);
    text-decoration: none;
}

.post-card a:hover,
.read-link {
    color: #0369a1;
}

.read-link {
    font-weight: 700;
    text-decoration: none;
}

.resource-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    border: 1px solid #d8dee8;
    border-radius: 6px;
    background: #f1f5f9;
    color: #334155 !important;
    font-size: 0.92rem;
    font-weight: 800;
    margin-top: auto;
    padding: 0.64rem 0.85rem;
    text-decoration: none;
}

.resource-btn:hover {
    border-color: #cbd5e1;
    background: #e2e8f0;
    color: #0f172a !important;
}

.related-section {
    border-top: 1px solid var(--pg-line);
    padding-top: 2rem;
}

.related-card .post-card-body {
    padding: 0.95rem;
}

.related-card h3 a {
    min-height: 3rem;
}

.pagination-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.page-link-btn,
.page-status {
    border: 1px solid var(--pg-line);
    border-radius: 6px;
    background: #ffffff;
    color: var(--pg-ink);
    padding: 0.65rem 0.9rem;
    text-decoration: none;
    font-weight: 800;
}

.page-link-btn:hover {
    border-color: #94a3b8;
    color: var(--pg-accent-dark);
}

.page-link-btn.disabled {
    pointer-events: none;
    color: #94a3b8;
    background: #f1f5f9;
}

.page-status {
    color: var(--pg-muted);
    font-weight: 700;
}

.category-strip {
    border: 1px solid var(--pg-line);
    border-radius: 8px;
    padding: 1rem;
    background: var(--pg-soft);
}

.chip,
.tag-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 1px solid var(--pg-line);
    border-radius: 999px;
    padding: 0.45rem 0.75rem;
    color: var(--pg-ink);
    background: #ffffff;
    text-decoration: none;
    font-size: 0.92rem;
}

.chip:hover,
.tag-pill:hover {
    border-color: #94a3b8;
    color: #0369a1;
}

.chip span {
    color: var(--pg-muted);
    font-size: 0.82rem;
}

.post-page {
    max-width: 1180px;
}

.post-meta {
    color: var(--pg-muted);
    border-left: 4px solid var(--pg-accent);
    padding-left: 0.9rem;
}

.content-body {
    border: 1px solid var(--pg-line);
    background: #ffffff;
    border-radius: 8px;
    padding: 2rem;
    font-size: 1.05rem;
    line-height: 1.75;
}

.content-body h2,
.content-body h3 {
    margin-top: 2rem;
    font-weight: 800;
}

.content-body a {
    font-weight: 700;
    color: #0369a1;
}

.content-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
}

.download-box,
.empty-state,
.contact-card {
    border: 1px solid var(--pg-line);
    background: var(--pg-soft);
    border-radius: 8px;
    padding: 1.5rem;
}

.contact-card {
    background: #ffffff;
    box-shadow: 0 16px 35px rgba(15, 23, 42, 0.06);
}

.captcha-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid var(--pg-line);
    border-radius: 8px;
    background: #f8fafc;
    padding: 0.55rem 0.65rem;
}

.captcha-row span {
    flex: 0 0 auto;
    color: var(--pg-ink);
    font-weight: 900;
}

.captcha-row .form-control {
    max-width: 120px;
    background: #ffffff;
}

.post-sidebar {
    position: sticky;
    top: 92px;
    display: grid;
    gap: 1.25rem;
}

.form-control,
.btn {
    border-radius: 6px;
}

.footer-socials {
    display: inline-flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.footer-socials a {
    color: #475569;
    font-weight: 800;
    text-decoration: none;
}

.footer-socials a:hover {
    color: var(--pg-accent-dark);
}

.site-logo-mark {
    display: inline-grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 8px;
    background: linear-gradient(135deg, #0ea5e9, #f97316);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 900;
}

.site-logo-img {
    display: block;
    width: 148px;
    height: 40px;
}

.navbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
}

.monetization-strip,
.premium-inline,
.premium-sidebar-card,
.premium-card {
    border: 1px solid var(--pg-line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 16px 35px rgba(15, 23, 42, 0.06);
}

.monetization-strip {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
    gap: 1rem;
    align-items: center;
    padding: 1.3rem;
}

.newsletter-form {
    display: flex;
    gap: 0.65rem;
}

.premium-inline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: #0f172a;
    color: #ffffff;
    padding: 1.2rem;
}

.premium-inline p {
    color: rgba(255, 255, 255, 0.78);
}

.premium-hero {
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(3, 105, 161, 0.86)),
        url("https://images.unsplash.com/photo-1554224155-6726b3ff858f?auto=format&fit=crop&w=1800&q=80") center/cover;
    color: #ffffff;
    padding: 4.8rem 0;
}

.premium-hero .lead {
    max-width: 760px;
    color: rgba(255, 255, 255, 0.84);
}

.premium-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.25rem;
}

.premium-card-top {
    display: grid;
    gap: 0.6rem;
}

.premium-card-top span {
    width: fit-content;
    border-radius: 999px;
    background: #ecfeff;
    color: #0369a1;
    font-weight: 900;
    padding: 0.4rem 0.7rem;
}

.premium-card-top strong {
    font-size: 1.25rem;
}

.premium-card small {
    color: var(--pg-muted);
}

.premium-features {
    display: grid;
    gap: 0.45rem;
    margin: 0;
    padding-left: 1.1rem;
}

.premium-features li {
    color: #334155;
}

.premium-track {
    color: var(--pg-muted);
    font-size: 0.86rem;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
}

.premium-actions {
    display: grid;
    gap: 0.65rem;
}

.premium-buy-card {
    position: sticky;
    top: 92px;
    display: grid;
    gap: 0.9rem;
    border: 1px solid var(--pg-line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 16px 35px rgba(15, 23, 42, 0.08);
    padding: 1.35rem;
}

.premium-buy-card > span {
    width: fit-content;
    border-radius: 999px;
    background: #ecfeff;
    color: #0369a1;
    font-weight: 900;
    padding: 0.45rem 0.75rem;
}

.checkout-panel {
    max-width: 560px;
    border: 1px solid var(--pg-line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 20px 48px rgba(15, 23, 42, 0.08);
    padding: 1.5rem;
}

.premium-sidebar-card {
    position: sticky;
    top: 92px;
    padding: 1.4rem;
}

.sidebar-cta p {
    color: var(--pg-muted);
    font-size: 0.94rem;
}

@media (max-width: 575.98px) {
    .home-intro {
        min-height: auto;
        padding-top: 2rem;
        padding-bottom: 2rem;
    }

    .hero-inner {
        padding: 2.5rem 0;
    }

    .hero-search {
        flex-direction: column;
        padding: 0;
        background: transparent;
        border: 0;
    }

    .nav-search {
        min-width: 0;
    }

    .display-5,
    .display-6 {
        font-size: 2rem;
    }

    .content-body {
        padding: 1.25rem;
    }

    .featured-grid {
        grid-template-columns: 1fr;
        grid-template-rows: none;
    }

    .monetization-strip,
    .premium-inline {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .premium-inline,
    .newsletter-form {
        flex-direction: column;
    }

    .featured-card-large {
        grid-row: auto;
        min-height: 320px;
    }
}
