:root {
    --text: #0b1220;
    --muted: #64748b;
    --soft: #94a3b8;
    --border: #e5e7eb;
    --border-soft: #f1f5f9;
    --bg: #f7f8fb;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --accent: var(--color-accent, var(--ghost-accent-color, #0b1220));
    --accent-soft: rgba(15, 23, 42, 0.06);
    --radius: 20px;
    --radius-sm: 14px;
    --container: 1120px;
    --content: 740px;
    --font-heading: var(--gh-font-heading, Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
    --font-body: var(--gh-font-body, Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
    --shadow-card: 0 10px 30px rgba(15, 23, 42, 0.055);
    --shadow-hover: 0 20px 48px rgba(15, 23, 42, 0.095);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(circle at 20% 0%, rgba(15, 23, 42, 0.045), transparent 34rem),
        linear-gradient(180deg, #fff 0%, var(--bg) 360px);
}

h1,
h2,
h3,
h4,
h5,
h6,
.brand {
    font-family: var(--font-heading);
    color: var(--text);
    letter-spacing: -0.045em;
    line-height: 1.05;
}

h1 {
    font-size: clamp(2rem, 3.4vw, 3.45rem);
    margin: 0 0 1rem;
}

h2 {
    font-size: clamp(1.55rem, 2.4vw, 2.1rem);
    margin: 0 0 1rem;
}

h3 {
    font-size: 1.08rem;
    margin: 0 0 0.55rem;
}

p {
    margin: 0 0 1rem;
}

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

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

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

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

button {
    font: inherit;
}

.container {
    width: min(var(--container), calc(100vw - 48px));
    margin-inline: auto;
}

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

.site-main {
    flex: 1;
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.site-header.is-scrolled {
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.055);
}

.header-inner {
    min-height: 72px;
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr) auto;
    align-items: center;
    gap: 1.25rem;
    overflow: visible;
}

.brand {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    font-size: 1.18rem;
    font-weight: 850;
    color: var(--text);
}

.brand img {
    max-height: 44px;
    width: auto;
}

/* Premium desktop nav */
.main-nav {
    min-width: 0;
    overflow: visible;
}

.main-nav--premium {
    display: flex;
    justify-content: center;
}

.premium-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.premium-nav-item {
    position: relative;
    flex: 0 0 auto;
}

.premium-nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.32rem;
    min-height: 36px;
    padding: 0.48rem 0.74rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #334155;
    font-size: 0.88rem;
    font-weight: 760;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.16s ease, color 0.16s ease;
}

.premium-nav-link--direct {
    text-decoration: none;
}

.premium-nav-link:hover,
.premium-nav-item:focus-within .premium-nav-link,
.premium-nav-item:hover .premium-nav-link {
    background: var(--accent-soft);
    color: var(--accent);
}

.premium-nav-link span {
    color: var(--soft);
    font-size: 0.76rem;
    transform: translateY(-1px);
}

.premium-dropdown {
    position: absolute;
    top: calc(100% + 14px);
    left: 50%;
    z-index: 120;
    width: min(720px, calc(100vw - 48px));
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(-50%) translateY(8px);
    transition: opacity 0.16s ease, visibility 0.16s ease, transform 0.16s ease;
}

.premium-nav-item:hover .premium-dropdown,
.premium-nav-item:focus-within .premium-dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.premium-dropdown::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -16px;
    height: 16px;
}

.premium-dropdown-inner {
    padding: 0.9rem;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.14);
    backdrop-filter: blur(18px);
}

.premium-dropdown--articles {
    width: min(320px, calc(100vw - 48px));
}

.premium-dropdown--articles .premium-dropdown-inner {
    padding: 0.85rem;
}

.premium-dropdown--media-horizontal,
.premium-dropdown--saas-horizontal {
    width: min(960px, calc(100vw - 48px));
}

.premium-dropdown--media-horizontal .premium-dropdown-inner,
.premium-dropdown--saas-horizontal .premium-dropdown-inner {
    padding: 1rem;
}

.premium-dropdown-label {
    display: block;
    margin: 0 0 0.7rem;
    padding: 0 0.15rem;
    color: var(--soft);
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.premium-dropdown .nav {
    display: grid;
    gap: 0.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.premium-dropdown .nav li {
    margin: 0;
}

.premium-dropdown .nav a {
    display: flex;
    align-items: center;
    min-height: 38px;
    padding: 0.62rem 0.72rem;
    border-radius: 12px;
    color: #334155;
    font-size: 0.9rem;
    font-weight: 720;
    line-height: 1.15;
    text-decoration: none;
    transition: background 0.16s ease, color 0.16s ease;
}

.premium-dropdown .nav a:hover,
.premium-dropdown .nav-current a {
    background: var(--accent-soft);
    color: var(--accent);
}

.premium-dropdown-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
}

.premium-dropdown-grid--small {
    grid-template-columns: 1fr;
}

.premium-dropdown-card {
    display: grid;
    gap: 0.28rem;
    min-height: 88px;
    padding: 0.9rem;
    border: 1px solid transparent;
    border-radius: 16px;
    background: var(--surface-soft);
    color: var(--text);
    transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.premium-dropdown-card:hover {
    transform: translateY(-1px);
    background: #fff;
    border-color: rgba(15, 23, 42, 0.12);
    color: var(--text);
}

.premium-dropdown-card-title {
    color: var(--text);
    font-size: 0.92rem;
    font-weight: 850;
    line-height: 1.12;
    letter-spacing: -0.025em;
}

.premium-dropdown-card-text {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 560;
    line-height: 1.35;
}

/* Horizontal media dropdown */
.premium-media-row {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.65rem;
    align-items: stretch;
}

.premium-media-card {
    display: flex;
    min-height: 116px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    padding: 0.9rem 0.65rem;
    border: 1px solid transparent;
    border-radius: 18px;
    background: var(--surface-soft);
    color: var(--text);
    text-align: center;
    transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.premium-media-card:hover {
    transform: translateY(-2px);
    background: #fff;
    border-color: rgba(15, 23, 42, 0.12);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08);
    color: var(--text);
}

.premium-media-logo {
    display: flex;
    width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: #fff;
    border: 1px solid var(--border-soft);
    overflow: hidden;
}

.premium-media-logo img {
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.premium-media-logo span {
    color: var(--text);
    font-size: 0.84rem;
    font-weight: 900;
}

.premium-media-title {
    color: var(--text);
    font-size: 0.78rem;
    font-weight: 850;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

/* Horizontal SaaS dropdown */
.premium-saas-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    align-items: stretch;
}

.premium-saas-card {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 0.85rem;
    min-height: 120px;
    align-items: center;
    padding: 1rem;
    border: 1px solid transparent;
    border-radius: 18px;
    background: var(--surface-soft);
    color: var(--text);
    transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.premium-saas-card:hover {
    transform: translateY(-2px);
    background: #fff;
    border-color: rgba(15, 23, 42, 0.12);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08);
    color: var(--text);
}

.premium-saas-logo {
    display: flex;
    width: 52px;
    height: 52px;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 950;
    letter-spacing: -0.04em;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
}

.premium-saas-logo--enovai {
    background: linear-gradient(135deg, #0b1220, #334155);
}

.premium-saas-logo--mailsign {
    background: linear-gradient(135deg, #f97316, #fb923c);
}

.premium-saas-logo--roitio {
    background: linear-gradient(135deg, #2563eb, #38bdf8);
}

.premium-saas-content {
    display: grid;
    gap: 0.3rem;
    min-width: 0;
}

.premium-saas-title {
    color: var(--text);
    font-size: 0.98rem;
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: -0.035em;
}

.premium-saas-text {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 560;
    line-height: 1.35;
}

/* Legacy nav fallback */
.main-nav:not(.main-nav--premium) .nav {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 0.2rem;
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.main-nav:not(.main-nav--premium) .nav::-webkit-scrollbar {
    display: none;
}

.main-nav:not(.main-nav--premium) .nav li {
    flex: 0 0 auto;
    margin: 0;
}

.main-nav:not(.main-nav--premium) .nav a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0.42rem 0.68rem;
    border-radius: 999px;
    color: #334155;
    font-size: 0.87rem;
    font-weight: 720;
    line-height: 1;
    white-space: nowrap;
    transition: background 0.16s ease, color 0.16s ease;
}

.main-nav:not(.main-nav--premium) .nav a:hover,
.main-nav:not(.main-nav--premium) .nav-current a {
    background: var(--accent-soft);
    color: var(--accent);
}

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

.header-actions .gh-search,
.header-actions button.gh-search {
    color: var(--text);
}

.button,
.gh-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0.62rem 0.95rem;
    border-radius: 12px;
    border: 1px solid var(--accent);
    background: var(--accent);
    color: #fff !important;
    font-weight: 780;
    font-size: 0.9rem;
    line-height: 1.1;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
    transition: transform 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
}

.button:hover,
.gh-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.18);
    opacity: 0.95;
}

.button--login {
    min-width: 104px;
}

.member-link {
    color: var(--muted);
    font-weight: 720;
    font-size: 0.9rem;
    white-space: nowrap;
}

.menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
}

/* Mobile menu */
.mobile-menu {
    width: min(var(--container), calc(100vw - 48px));
    margin: 0 auto 1rem;
    padding: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: var(--shadow-card);
}

.mobile-menu-section + .mobile-menu-section,
.mobile-menu nav + nav {
    margin-top: 0.9rem;
    padding-top: 0.9rem;
    border-top: 1px solid var(--border-soft);
}

.mobile-menu-title {
    display: block;
    margin: 0 0 0.5rem;
    color: var(--soft);
    font-size: 0.68rem;
    font-weight: 880;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.mobile-menu .nav,
.mobile-custom-nav,
.mobile-media-nav,
.mobile-saas-nav {
    display: grid;
    gap: 0.35rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-menu .nav a,
.mobile-menu .member-link {
    display: block;
    padding: 0.72rem 0.82rem;
    border-radius: 10px;
    color: var(--text);
    font-weight: 700;
}

.mobile-menu .nav a:hover,
.mobile-menu .member-link:hover {
    background: var(--accent-soft);
    color: var(--accent);
}

.mobile-media-nav a,
.mobile-saas-nav a {
    display: flex !important;
    align-items: center;
    gap: 0.7rem;
}

.mobile-media-logo,
.mobile-saas-logo {
    display: flex;
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: var(--surface-soft);
    border: 1px solid var(--border-soft);
    overflow: hidden;
}

.mobile-media-logo img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.mobile-media-logo span {
    color: var(--text);
    font-size: 0.72rem;
    font-weight: 900;
}

.mobile-saas-logo {
    color: #fff;
    border: 0;
    font-size: 0.78rem;
    font-weight: 950;
}

.mobile-saas-logo--enovai {
    background: linear-gradient(135deg, #0b1220, #334155);
}

.mobile-saas-logo--mailsign {
    background: linear-gradient(135deg, #f97316, #fb923c);
}

.mobile-saas-logo--roitio {
    background: linear-gradient(135deg, #2563eb, #38bdf8);
}

.mobile-menu .button {
    margin-top: 1rem;
    width: 100%;
}

.mobile-login-button {
    margin-top: 1.1rem;
}

.mobile-signup-link {
    margin-top: 0.45rem;
    text-align: center;
}

.mobile-menu-section--secondary:empty {
    display: none;
}

/* Sections */
.home-page {
    padding-block: 1.7rem 4rem;
}

.archive-page,
.page-template,
.error-page {
    padding-block: 3rem;
}

.section-block {
    margin: 3.1rem 0;
}

.section-header {
    max-width: 680px;
    margin-bottom: 1.4rem;
}

.section-header p,
.entry-excerpt {
    color: var(--muted);
    font-size: 1.05rem;
}

.section-heading-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1.25rem;
}

.section-kicker,
.tag,
.tag-pill,
.compact-card-tag {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 0.3rem 0.56rem;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 0.7rem;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.tag-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

/* Home */
.home-intro-block {
    margin-top: 1rem;
    margin-bottom: 2rem;
}

.home-intro-block h1 {
    font-size: clamp(2rem, 3.4vw, 3.05rem);
}

.home-hero-grid {
    width: min(var(--container), calc(100vw - 48px));
    margin: 1.75rem auto 3rem;
    display: grid;
    grid-template-columns: minmax(0, 1.48fr) minmax(310px, 0.82fr);
    gap: 1rem;
    align-items: stretch;
}

.home-secondary-list {
    display: grid;
    gap: 0.85rem;
}

/* Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.post-card,
.featured-card,
.compact-card,
.cta-box,
.newsletter-box,
.affiliate-box,
.lead-magnet-box,
.author-box,
.toc,
.ad-slot,
.tool-card {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
}

.post-card,
.featured-card,
.compact-card {
    overflow: hidden;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.post-card:hover,
.featured-card:hover,
.compact-card:hover {
    transform: translateY(-2px);
    border-color: rgba(15, 23, 42, 0.14);
    box-shadow: var(--shadow-hover);
}

.post-card-link,
.featured-card-link,
.compact-card-link {
    color: var(--text);
}

.post-card-link,
.featured-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.post-card-media,
.featured-card-media,
.compact-card-media {
    margin: 0;
    background: var(--surface-soft);
    overflow: hidden;
}

.post-card-media img,
.featured-card-media img,
.compact-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-card-media {
    aspect-ratio: 16 / 9.7;
}

.featured-card-media {
    aspect-ratio: 16 / 8.8;
}

.post-card-content,
.featured-card-content {
    padding: 1.15rem;
}

.featured-card--hero .featured-card-content {
    padding: 1.25rem 1.3rem 1.35rem;
}

.featured-card-topline,
.post-card-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.8rem;
}

.featured-card-reading-time,
.post-card-reading-time {
    color: var(--soft);
    font-size: 0.78rem;
    font-weight: 750;
    white-space: nowrap;
}

.post-card-title,
.featured-card-title {
    color: var(--text);
}

.post-card-title {
    font-size: 1.08rem;
    line-height: 1.18;
    letter-spacing: -0.035em;
}

.featured-card-title {
    max-width: 760px;
    font-size: clamp(1.7rem, 2.55vw, 2.45rem);
    margin-top: 0;
}

.post-card-excerpt,
.featured-card-excerpt {
    color: var(--muted);
}

.post-card-meta,
.featured-card-meta,
.compact-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.38rem;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 650;
}

.compact-card {
    min-height: 124px;
    padding: 0.9rem;
}

.compact-card-link {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 0.9rem;
    align-items: center;
    height: 100%;
}

.compact-card-media {
    width: 82px;
    height: 64px;
    border-radius: 12px;
}

.compact-card-title {
    font-size: 0.98rem;
    line-height: 1.22;
    letter-spacing: -0.035em;
    margin: 0.35rem 0 0.35rem;
}

.compact-card-tag {
    padding: 0;
    background: transparent;
    color: var(--muted);
    font-size: 0.66rem;
}

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

/* CTA / newsletter / monetization */
.cta-box,
.newsletter-box,
.affiliate-box,
.lead-magnet-box,
.tool-card {
    padding: 1.25rem;
}

.cta-box {
    margin: 1.5rem 0;
    background: linear-gradient(135deg, #0b1220, #182033);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.1);
}

.cta-box h3,
.cta-box p {
    color: #fff;
}

.cta-box .button {
    background: #fff;
    color: var(--text) !important;
    border-color: #fff;
    box-shadow: none;
}

.newsletter-box {
    background: linear-gradient(180deg, #fff, #f8fafc);
}

/* Ad slots */
.ad-slot {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 88px;
    padding: 1rem;
    color: var(--soft);
    background: repeating-linear-gradient(
        -45deg,
        #f8fafc,
        #f8fafc 8px,
        #f1f5f9 8px,
        #f1f5f9 16px
    );
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    box-shadow: none;
}

.ad-slot span {
    font-size: 0.76rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ad-slot--inline {
    width: min(728px, 100%);
    min-height: 90px;
    height: 90px;
    margin: 1.3rem auto;
    border-radius: 18px;
}

.ad-slot--inline-dynamic {
    margin-top: 1.7rem;
    margin-bottom: 1.7rem;
}

.ad-slot--sidebar-top {
    width: 100%;
    min-height: 250px;
    height: 250px;
}

.sticky-sidebar-ad {
    width: 100%;
    min-height: 600px;
    height: 600px;
}

/* Post — compact hero with sidebar */
.post-template--overlap {
    padding-block: 0 4.5rem;
}

.post-template--overlap .breadcrumbs {
    margin: 1.35rem 0 0.75rem;
    color: var(--muted);
    font-size: 0.86rem;
}

.post-template--overlap .breadcrumbs a {
    color: var(--muted);
}

.post-template--overlap .breadcrumbs a:hover {
    color: var(--accent);
}

/* Post hero */
.post-hero {
    position: relative;
    padding: 1.15rem 0 3.4rem;
    overflow: hidden;
}

.post-hero::before {
    content: "";
    position: absolute;
    inset: 0 0 22%;
    z-index: -1;
    background:
        radial-gradient(circle at 18% 10%, rgba(15, 23, 42, 0.06), transparent 28rem),
        linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
}

.post-hero-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
    gap: 2rem;
    align-items: center;
    padding: 1.6rem 0 1.4rem;
}

.post-hero-copy {
    max-width: 680px;
}

.post-hero-tag {
    margin-bottom: 0.85rem;
}

.post-hero h1 {
    max-width: 720px;
    margin: 0;
    font-size: clamp(2.1rem, 3.8vw, 4rem);
    letter-spacing: -0.06em;
    line-height: 0.98;
}

.post-hero-excerpt {
    max-width: 650px;
    margin-top: 1rem;
    color: var(--muted);
    font-size: clamp(0.98rem, 1.25vw, 1.12rem);
    line-height: 1.55;
}

.post-hero-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.42rem;
    margin-top: 1rem;
    color: var(--muted);
    font-weight: 700;
    font-size: 0.88rem;
}

.post-hero-meta a {
    color: var(--text);
}

.post-hero-media {
    position: relative;
    z-index: 1;
    width: 100%;
    margin: 0;
    overflow: hidden;
    border-radius: 26px;
    background: var(--surface-soft);
    box-shadow: 0 22px 62px rgba(15, 23, 42, 0.12);
}

.post-hero-media picture,
.post-hero-media img {
    display: block;
    width: 100%;
}

.post-hero-media img {
    height: 300px;
    min-height: 300px;
    object-fit: cover;
}

.post-hero-media figcaption {
    position: absolute;
    right: 0.8rem;
    bottom: 0.8rem;
    max-width: min(360px, calc(100% - 1.6rem));
    padding: 0.45rem 0.65rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.74);
    backdrop-filter: blur(12px);
    color: #fff;
    font-size: 0.74rem;
}

/* Overlap layout */
.post-overlap-container {
    position: relative;
    z-index: 3;
    margin-top: -1.8rem;
}

.post-layout--overlap {
    display: grid;
    grid-template-columns: minmax(0, 760px) 320px;
    gap: 2rem;
    align-items: stretch;
}

.post-content-wrap {
    min-width: 0;
    align-self: start;
}

.post-layout--overlap .post-content-wrap > .ad-slot:first-child {
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(16px);
}

.post-content {
    max-width: none;
    padding: clamp(1.35rem, 3vw, 2.65rem);
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 30px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.11);
}

.gh-content {
    font-size: 1.055rem;
    color: #1e293b;
}

.gh-content > *:first-child {
    margin-top: 0;
}

.gh-content > *:last-child {
    margin-bottom: 0;
}

.gh-content h2 {
    margin-top: 2.45rem;
    font-size: clamp(1.55rem, 2.4vw, 2.05rem);
}

.gh-content h3 {
    margin-top: 2rem;
}

.gh-content p,
.gh-content ul,
.gh-content ol {
    margin-bottom: 1.25rem;
}

.gh-content a {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.gh-content iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    border: 0;
    border-radius: var(--radius-sm);
}

.gh-content table {
    display: block;
    overflow-x: auto;
    max-width: 100%;
    border-collapse: collapse;
}

.gh-content .kg-card {
    margin: 2rem 0;
}

.gh-content .kg-card img {
    max-width: 100%;
}

/* Sidebar */
.post-sidebar {
    position: relative;
    display: grid;
    align-self: stretch;
    align-content: start;
    gap: 1rem;
    min-height: 100%;
    padding-top: 0;
}

.post-sidebar > * {
    box-shadow: var(--shadow-card);
}

/* TOC compact, not sticky */
.toc {
    max-height: 240px;
    padding: 0.9rem;
    overflow: auto;
}

.toc h2,
.toc h3 {
    font-size: 0.92rem;
    margin-bottom: 0.65rem;
}

/* TOC hierarchy */
.toc ul {
    display: grid;
    gap: 0.34rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

.toc li {
    margin: 0;
}

.toc a {
    display: block;
    color: var(--muted);
    line-height: 1.35;
}

.toc .toc-h2 a {
    font-size: 0.9rem;
    font-weight: 780;
    color: #475569;
}

.toc .toc-h3 a {
    padding-left: 0.8rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--muted);
}

.toc a:hover {
    color: var(--accent);
}

.toc[hidden] {
    display: none;
}

/* Sticky 300x600 sequence */
.sidebar-sticky-sequence {
    --sidebar-zone-gap: 48px;
    --sidebar-first-zone-height: 1600px;
    --sidebar-second-zone-height: 1600px;
    --sidebar-sequence-height: calc(
        var(--sidebar-first-zone-height) +
        var(--sidebar-second-zone-height) +
        var(--sidebar-zone-gap)
    );

    display: block;
    width: 100%;
    min-height: var(--sidebar-sequence-height);
    box-shadow: none;
}

.sidebar-sticky-zone {
    position: relative;
    width: 100%;
    box-shadow: none;
}

.sidebar-sticky-zone--first {
    min-height: var(--sidebar-first-zone-height);
    padding-bottom: var(--sidebar-zone-gap);
    border-bottom: 1px dashed var(--border);
}

.sidebar-sticky-zone--second {
    min-height: var(--sidebar-second-zone-height);
    padding-top: var(--sidebar-zone-gap);
}

.sidebar-sticky-zone .sticky-sidebar-ad {
    position: sticky;
    top: 96px;
    display: flex;
    width: 100%;
    min-height: 600px;
    height: 600px;
}

.author-box {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    margin: 1.5rem 0;
}

.author-box img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
}

.related-posts {
    margin-top: 2rem;
}

.post-pagination {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.post-pagination a {
    padding: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-weight: 780;
}

/* Pages / archives */
.taxonomy-header,
.author-header {
    padding-block: 3rem 1.5rem;
}

.author-header img {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
}

.empty-state {
    padding: 2rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

/* Required Ghost Koenig wide/full width support */
.kg-width-wide {
    width: min(100%, 1100px);
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.kg-width-full {
    width: 100vw;
    max-width: 100vw;
    margin-left: 50%;
    transform: translateX(-50%);
}

.kg-width-wide img,
.kg-width-full img {
    width: 100%;
    height: auto;
    display: block;
}

.kg-width-wide figcaption,
.kg-width-full figcaption {
    max-width: 760px;
    margin: 0.75rem auto 0;
    padding: 0 1rem;
    color: var(--muted);
    font-size: 0.9rem;
    text-align: center;
}

/* Footer */
.site-footer {
    margin-top: 4rem;
    background: #fff;
    border-top: 1px solid var(--border);
}

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

.footer-grid h3 {
    font-size: 0.95rem;
    margin-bottom: 0.8rem;
}

.footer-grid p,
.footer-grid a,
.footer-bottom {
    color: var(--muted);
}

.footer-grid ul,
.footer-grid .nav {
    display: grid;
    gap: 0.45rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-grid a:hover {
    color: var(--accent);
}

.footer-bottom {
    padding: 1.2rem 0;
    border-top: 1px solid var(--border);
    font-size: 0.92rem;
}

/* Internal Display System */
.enovai-promo-slot {
    width: 100%;
    min-height: 96px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: var(--radius);
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.18), transparent 28rem),
        linear-gradient(135deg, #0b1220, #182033);
    color: #fff;
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.enovai-promo-slot__inner {
    min-height: inherit;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 1rem 1.15rem;
}

.enovai-promo-slot__content {
    min-width: 0;
}

.enovai-promo-slot__eyebrow {
    display: inline-flex;
    width: fit-content;
    margin-bottom: 0.35rem;
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.enovai-promo-slot__title {
    display: block;
    color: #fff;
    font-family: var(--font-heading);
    font-size: clamp(1rem, 1.6vw, 1.28rem);
    line-height: 1.08;
    letter-spacing: -0.035em;
}

.enovai-promo-slot__description {
    max-width: 620px;
    margin: 0.35rem 0 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.9rem;
    line-height: 1.45;
}

.enovai-promo-slot__button {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0.62rem 0.9rem;
    border-radius: 12px;
    background: #fff;
    color: var(--text) !important;
    font-size: 0.86rem;
    font-weight: 820;
    line-height: 1;
    white-space: nowrap;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.14);
}

.enovai-promo-slot__button:hover {
    transform: translateY(-1px);
    color: var(--text);
}

/* Article promo slots */
.enovai-promo-slot--article-top {
    margin-bottom: 1rem;
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.2), transparent 26rem),
        linear-gradient(135deg, #111827, #1f2937);
}

.enovai-promo-slot--article-inline {
    margin: 1.5rem 0;
}

.enovai-promo-slot--article-bottom {
    margin: 2rem 0 1.5rem;
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.18), transparent 26rem),
        linear-gradient(135deg, #0f172a, #111827);
}

/* Sidebar promo slots */
.post-sidebar .enovai-promo-slot {
    min-height: auto;
}

.enovai-promo-slot--sidebar,
.enovai-promo-slot--sidebar-secondary {
    border-radius: 20px;
}

.enovai-promo-slot--sidebar .enovai-promo-slot__inner,
.enovai-promo-slot--sidebar-secondary .enovai-promo-slot__inner {
    min-height: 260px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.1rem;
}

.enovai-promo-slot--sidebar .enovai-promo-slot__title,
.enovai-promo-slot--sidebar-secondary .enovai-promo-slot__title {
    font-size: 1.15rem;
}

.enovai-promo-slot--sidebar .enovai-promo-slot__description,
.enovai-promo-slot--sidebar-secondary .enovai-promo-slot__description {
    font-size: 0.86rem;
}

.enovai-promo-slot--sidebar .enovai-promo-slot__button,
.enovai-promo-slot--sidebar-secondary .enovai-promo-slot__button {
    width: 100%;
}

.enovai-promo-slot--sidebar-secondary {
    background:
        radial-gradient(circle at top left, rgba(15, 23, 42, 0.08), transparent 18rem),
        linear-gradient(180deg, #ffffff, #f8fafc);
    color: var(--text);
}

.enovai-promo-slot--sidebar-secondary .enovai-promo-slot__eyebrow {
    background: var(--accent-soft);
    color: var(--accent);
}

.enovai-promo-slot--sidebar-secondary .enovai-promo-slot__title {
    color: var(--text);
}

.enovai-promo-slot--sidebar-secondary .enovai-promo-slot__description {
    color: var(--muted);
}

.enovai-promo-slot--sidebar-secondary .enovai-promo-slot__button {
    background: var(--accent);
    color: #fff !important;
}

/* Takeover / Arche */
.enovai-takeover {
    display: none;
}

.enovai-takeover__top {
    position: relative;
    z-index: 45;
    width: min(var(--container), calc(100vw - 48px));
    margin: 0.85rem auto 0;
}

.enovai-takeover__top .enovai-promo-slot {
    min-height: 84px;
    border-radius: 18px;
}

.enovai-takeover__top .enovai-promo-slot__inner {
    padding: 0.85rem 1rem;
}

.enovai-takeover__rail {
    position: fixed;
    top: 104px;
    bottom: 24px;
    z-index: 24;
    width: 122px;
    pointer-events: none;
}

.enovai-takeover__rail--left {
    left: max(16px, calc((100vw - var(--container)) / 2 - 150px));
}

.enovai-takeover__rail--right {
    right: max(16px, calc((100vw - var(--container)) / 2 - 150px));
}

.enovai-takeover__rail-card {
    position: sticky;
    top: 104px;
    display: flex;
    min-height: 430px;
    height: min(58vh, 520px);
    flex-direction: column;
    justify-content: flex-end;
    gap: 0.35rem;
    padding: 1rem;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 24px;
    background:
        radial-gradient(circle at top, rgba(255, 255, 255, 0.18), transparent 12rem),
        linear-gradient(180deg, #0b1220, #111827);
    color: #fff;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.14);
    overflow: hidden;
    pointer-events: auto;
}

.enovai-takeover__rail-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.08) 100%),
        repeating-linear-gradient(
            -45deg,
            rgba(255, 255, 255, 0.04),
            rgba(255, 255, 255, 0.04) 8px,
            transparent 8px,
            transparent 16px
        );
    pointer-events: none;
}

.enovai-takeover__rail-card span,
.enovai-takeover__rail-card strong {
    position: relative;
    z-index: 1;
}

.enovai-takeover__rail-card span {
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.enovai-takeover__rail-card strong {
    max-width: 92px;
    color: #fff;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    line-height: 1;
    letter-spacing: -0.045em;
}

@media (min-width: 1280px) {
    .enovai-takeover {
        display: block;
    }
}

/* Responsive */
@media (max-width: 1180px) {
    .header-inner {
        grid-template-columns: 160px minmax(0, 1fr) auto;
        gap: 0.9rem;
    }

    .brand img {
        max-height: 40px;
    }

    .premium-nav {
        gap: 0.15rem;
    }

    .premium-nav-link {
        padding-inline: 0.56rem;
        font-size: 0.84rem;
    }

    .button--login {
        min-width: auto;
        padding-inline: 0.8rem;
    }

    .member-link {
        display: none;
    }

    .premium-media-row {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .premium-saas-row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

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

    .main-nav {
        display: none;
    }

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .home-hero-grid,
    .footer-grid,
    .post-hero-inner,
    .post-layout--overlap {
        grid-template-columns: 1fr;
    }

    .post-hero {
        padding-bottom: 3rem;
    }

    .post-hero h1 {
        font-size: clamp(2.1rem, 8vw, 3.3rem);
    }

    .post-hero-media img {
        height: min(44vh, 360px);
        min-height: 260px;
    }

    .post-overlap-container {
        margin-top: -1rem;
    }

    .post-sidebar {
        position: static;
        padding-top: 0;
    }

    .sidebar-sticky-sequence {
        display: none;
    }

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

    .post-content {
        max-width: none;
    }
}

@media (max-width: 680px) {
    .container,
    .home-hero-grid,
    .mobile-menu {
        width: min(100% - 28px, var(--container));
    }

    .header-inner {
        min-height: 68px;
    }

    .brand img {
        max-height: 42px;
    }

    .header-actions {
        gap: 0.45rem;
    }

    .header-actions .button {
        display: none;
    }

    .header-actions .member-link {
        display: none;
    }

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

    .featured-card-title {
        font-size: 1.68rem;
    }

    .compact-card {
        min-height: 112px;
    }

    .compact-card-link {
        grid-template-columns: 76px minmax(0, 1fr);
    }

    .compact-card-media {
        width: 76px;
        height: 60px;
    }

    .post-hero {
        padding-bottom: 2.5rem;
    }

    .post-hero-inner {
        padding: 1.5rem 0 1.2rem;
        gap: 1.25rem;
    }

    .post-hero h1 {
        font-size: clamp(2rem, 11vw, 3rem);
        letter-spacing: -0.055em;
    }

    .post-hero-excerpt {
        font-size: 0.98rem;
    }

    .post-hero-media {
        border-radius: 22px;
    }

    .post-hero-media img {
        height: 260px;
        min-height: 260px;
    }

    .post-hero-media figcaption {
        position: static;
        max-width: none;
        border-radius: 0;
        background: rgba(15, 23, 42, 0.9);
    }

    .post-overlap-container {
        margin-top: -0.5rem;
    }

    .post-content {
        padding: 1.25rem;
        border-radius: 22px;
    }

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

    .enovai-promo-slot__inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .enovai-promo-slot__button {
        width: 100%;
    }
}

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