/* ============================================================
   RedSecLabs Ghost Theme — screen.css
   Design system mirrors redseclabs.com: dark navy chrome,
   red accent, Plus Jakarta Sans typography, card-based layouts.
   ============================================================ */

/* ---------- CSS Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; -moz-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body { line-height: 1.6; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; }
p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }
a { color: inherit; }

/* ---------- Design tokens ---------- */
:root {
    /* Palette */
    --c-ink:         #0a0e1a;       /* near-black navy, primary dark */
    --c-ink-800:     #111827;
    --c-ink-700:     #1e293b;
    --c-ink-500:     #334155;
    --c-ink-400:     #475569;
    --c-muted:       #64748b;
    --c-muted-light: #94a3b8;
    --c-border:      #e2e8f0;
    --c-border-soft: #eef2f7;
    --c-bg:          #ffffff;
    --c-bg-alt:      #f8fafc;
    --c-bg-tint:     #f1f5f9;

    --c-accent:        #dc2626;     /* RedSecLabs red */
    --c-accent-hover:  #b91c1c;
    --c-accent-soft:   #fef2f2;
    --c-accent-text:   #ffffff;

    --c-success: #059669;
    --c-warning: #d97706;

    /* Typography */
    --font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

    /* Radii */
    --r-xs: 4px;
    --r-sm: 6px;
    --r-md: 10px;
    --r-lg: 14px;
    --r-xl: 20px;
    --r-pill: 999px;

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(10, 14, 26, 0.04);
    --shadow-sm: 0 2px 8px rgba(10, 14, 26, 0.06), 0 1px 2px rgba(10, 14, 26, 0.04);
    --shadow-md: 0 8px 24px rgba(10, 14, 26, 0.08), 0 2px 6px rgba(10, 14, 26, 0.04);
    --shadow-lg: 0 20px 48px rgba(10, 14, 26, 0.12), 0 6px 12px rgba(10, 14, 26, 0.06);

    /* Layout */
    --container: 1280px;
    --container-narrow: 920px;
    --container-wide: 1400px;
    --gutter: clamp(1rem, 4vw, 2.5rem);

    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --t-fast: 150ms var(--ease-out);
    --t-med:  250ms var(--ease-out);
}

/* Accent variants for the theme-setting switcher */
.accent-navy { --c-accent: #1e40af; --c-accent-hover: #1e3a8a; --c-accent-soft: #eff6ff; }
.accent-teal { --c-accent: #0d9488; --c-accent-hover: #0f766e; --c-accent-soft: #f0fdfa; }

/* ---------- Base ---------- */
html { font-size: 16px; }
body {
    font-family: var(--font-sans);
    color: var(--c-ink-800);
    background: var(--c-bg);
    font-weight: 400;
    letter-spacing: -0.005em;
}

a {
    color: var(--c-accent);
    text-decoration: none;
    transition: color var(--t-fast);
}
a:hover { color: var(--c-accent-hover); }

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--c-ink);
}
h1 { font-size: clamp(2rem, 4.5vw, 3.5rem); }
h2 { font-size: clamp(1.625rem, 3vw, 2.375rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
h4 { font-size: 1.125rem; }

code {
    font-family: var(--font-mono);
    font-size: 0.9em;
    background: var(--c-bg-tint);
    color: var(--c-ink-800);
    padding: 0.15em 0.4em;
    border-radius: var(--r-xs);
}

/* ---------- Utility layout ---------- */
.section-inner,
.site-header-inner,
.site-footer-inner,
.post-full-header-inner,
.post-full-content-inner,
.blog-hero-inner,
.archive-hero-inner,
.cta-band-inner,
.error-page-inner,
.top-bar-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding-inline: var(--gutter);
    width: 100%;
}

.post-full-content-inner,
.error-page-inner { max-width: var(--container-narrow); }

.site-header-inner,
.site-footer-inner { max-width: var(--container-wide); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: var(--r-md);
    font-weight: 600;
    font-size: 0.9375rem;
    letter-spacing: -0.01em;
    line-height: 1;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
    text-decoration: none;
    white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
    background: var(--c-accent);
    color: var(--c-accent-text);
    box-shadow: 0 1px 0 rgba(255,255,255,0.1) inset, var(--shadow-sm);
}
.btn-primary:hover {
    background: var(--c-accent-hover);
    color: var(--c-accent-text);
    box-shadow: 0 1px 0 rgba(255,255,255,0.1) inset, var(--shadow-md);
}

.btn-ghost {
    background: transparent;
    color: var(--c-ink-800);
    border-color: var(--c-border);
}
.btn-ghost:hover { background: var(--c-bg-alt); color: var(--c-ink); }

.btn-lg { padding: 0.95rem 1.5rem; font-size: 1rem; border-radius: var(--r-lg); }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: var(--c-ink);
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.site-header-top-bar {
    background: rgba(0,0,0,0.35);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-size: 0.78rem;
    color: rgba(255,255,255,0.72);
}
.top-bar-inner {
    max-width: var(--container-wide);
    margin: 0 auto;
    padding-inline: var(--gutter);
    padding-block: 0.55rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}
.top-bar-left, .top-bar-right { display: inline-flex; align-items: center; gap: 0.8rem; }
.top-bar-item { display: inline-flex; align-items: center; gap: 0.5rem; color: inherit; text-decoration: none; letter-spacing: 0.005em; }
.top-bar-link:hover { color: #fff; }
.top-bar-sep { color: rgba(255,255,255,0.25); }

.status-dot {
    width: 7px; height: 7px;
    background: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(34,197,94,0.2);
    animation: pulse 2.2s ease-in-out infinite;
    flex-shrink: 0;
}
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(34,197,94,0.22); }
    50%      { box-shadow: 0 0 0 6px rgba(34,197,94,0); }
}

.site-header-inner {
    max-width: var(--container-wide);
    margin: 0 auto;
    padding-inline: var(--gutter);
}
.site-header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding-block: 0.95rem;
}

.site-header-logo {
    display: inline-flex;
    align-items: center;
    color: #fff;
    text-decoration: none;
    font-weight: 800;
    font-size: 1.375rem;
    letter-spacing: -0.03em;
    flex-shrink: 0;
}
.site-header-logo img { max-height: 40px; width: auto; }
.logo-text { color: #fff; }
.logo-accent { color: var(--c-accent); }

.site-nav { flex: 1; display: flex; justify-content: center; }
.nav-list { display: flex; list-style: none; padding: 0; gap: 0.1rem; margin: 0; }

.nav-item { position: relative; }
.nav-item > a {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.55rem 0.9rem;
    color: rgba(255,255,255,0.82);
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: var(--r-sm);
    text-decoration: none;
    transition: background var(--t-fast), color var(--t-fast);
    position: relative;
}
.nav-item > a:hover,
.nav-item > a.is-current,
.nav-item.is-current > a {
    color: #fff;
    background: rgba(255,255,255,0.07);
}
.nav-caret { opacity: 0.6; transition: transform var(--t-fast); }
.nav-item.has-dropdown:hover > a .nav-caret,
.nav-item.has-dropdown:focus-within > a .nav-caret {
    transform: rotate(180deg);
    opacity: 1;
}

.nav-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    min-width: 520px;
    background: #fff;
    color: var(--c-ink);
    border-radius: var(--r-lg);
    box-shadow: 0 20px 60px rgba(10,14,26,0.25), 0 4px 16px rgba(10,14,26,0.12);
    border: 1px solid var(--c-border);
    padding: 0.75rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity var(--t-med), transform var(--t-med), visibility var(--t-med);
    z-index: 60;
}
.nav-dropdown::before {
    content: "";
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 12px; height: 12px;
    background: #fff;
    border-left: 1px solid var(--c-border);
    border-top: 1px solid var(--c-border);
}
.nav-dropdown-narrow { min-width: 380px; }

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

.nav-dropdown-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.25rem;
}
.nav-dropdown-narrow .nav-dropdown-grid { grid-template-columns: 1fr; }

.dropdown-item {
    display: block;
    padding: 0.75rem 0.9rem;
    border-radius: var(--r-md);
    text-decoration: none;
    color: var(--c-ink);
    transition: background var(--t-fast);
}
.dropdown-item:hover { background: var(--c-accent-soft); color: var(--c-ink); }
.dropdown-title {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--c-ink);
    margin-bottom: 0.125rem;
    letter-spacing: -0.01em;
}
.dropdown-desc {
    display: block;
    font-size: 0.8rem;
    color: var(--c-muted);
    line-height: 1.4;
}
.dropdown-item:hover .dropdown-title { color: var(--c-accent); }

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

.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: 0;
    width: 40px; height: 40px;
    padding: 0;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
}
.mobile-menu-toggle span {
    display: block;
    width: 22px; height: 2px;
    background: #fff;
    transition: transform var(--t-fast), opacity var(--t-fast);
}
.mobile-menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.mobile-menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
    background: var(--c-ink-800);
    border-top: 1px solid rgba(255,255,255,0.06);
}
.mobile-menu[hidden] { display: none; }
.mobile-menu ul {
    list-style: none;
    padding: 1rem var(--gutter);
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.mobile-menu a {
    display: block;
    padding: 0.85rem 0.75rem;
    color: #fff;
    font-weight: 500;
    text-decoration: none;
    border-radius: var(--r-sm);
}
.mobile-menu a:hover { background: rgba(255,255,255,0.06); }
.mobile-menu .btn { margin-top: 0.5rem; }

@media (max-width: 960px) {
    .site-nav { display: none; }
    .site-header-actions .btn:not(.mobile-menu-toggle) { display: none; }
    .mobile-menu-toggle { display: inline-flex; }
}

/* ---------- Blog hero ---------- */
.blog-hero {
    background: linear-gradient(180deg, var(--c-ink) 0%, var(--c-ink-800) 100%);
    color: #fff;
    padding-block: clamp(4rem, 8vw, 6.5rem);
    position: relative;
    overflow: hidden;
}
.blog-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% 0%, rgba(220, 38, 38, 0.18), transparent 65%),
        radial-gradient(ellipse 60% 40% at 80% 100%, rgba(59, 130, 246, 0.08), transparent 60%);
    pointer-events: none;
}
.blog-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 70% 80% at 50% 50%, #000 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse 70% 80% at 50% 50%, #000 30%, transparent 80%);
    pointer-events: none;
    opacity: 0.55;
}
.blog-hero-inner { position: relative; z-index: 1; text-align: center; }

.blog-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--c-accent);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
}
.eyebrow-dash {
    width: 24px;
    height: 2px;
    background: var(--c-accent);
    border-radius: 2px;
    display: inline-block;
}

.blog-hero-title {
    color: #fff;
    font-size: clamp(2.25rem, 5.5vw, 3.75rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    margin-bottom: 1.25rem;
    max-width: 20ch;
    margin-inline: auto;
    line-height: 1.05;
}
.accent-text { color: var(--c-accent); }

.blog-hero-description {
    color: rgba(255,255,255,0.72);
    font-size: clamp(1rem, 1.35vw, 1.125rem);
    max-width: 62ch;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
}

.blog-hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(1rem, 3vw, 2.5rem);
    margin-bottom: 2.25rem;
    flex-wrap: wrap;
}
.stat-item { display: flex; flex-direction: column; align-items: center; gap: 0.2rem; }
.stat-value {
    font-size: clamp(1.625rem, 3vw, 2.25rem);
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.03em;
    line-height: 1;
    display: inline-flex;
    align-items: flex-start;
}
.stat-plus { color: var(--c-accent); font-size: 0.75em; margin-left: 0.05em; }
.stat-label {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.55);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 500;
}
.stat-divider {
    width: 1px;
    height: 28px;
    background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.15), transparent);
}
@media (max-width: 720px) {
    .stat-divider { display: none; }
    .blog-hero-stats { gap: 1.25rem 2rem; }
}

.blog-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}
.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.85rem;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.88);
    border-radius: var(--r-pill);
    font-size: 0.78rem;
    font-weight: 500;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}
.pill-dot {
    width: 5px; height: 5px;
    background: var(--c-accent);
    border-radius: 50%;
    flex-shrink: 0;
}

/* ---------- Section headers ---------- */
.section-header {
    margin-bottom: 2.5rem;
    display: flex;
    align-items: baseline;
    gap: 1rem;
    flex-wrap: wrap;
}
.section-eyebrow {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.7rem;
    background: var(--c-accent-soft);
    color: var(--c-accent);
    border-radius: var(--r-pill);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.section-title {
    font-size: clamp(1.5rem, 3vw, 2.125rem);
    letter-spacing: -0.025em;
}

/* ---------- Featured post ---------- */
.featured-post-section { padding-block: clamp(3rem, 6vw, 5rem); background: var(--c-bg); }

.featured-post {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: clamp(1.5rem, 3vw, 3rem);
    align-items: center;
    background: var(--c-bg);
    border: 1px solid var(--c-border);
    border-radius: var(--r-xl);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--t-med), transform var(--t-med);
}
.featured-post:hover { box-shadow: var(--shadow-lg); }

.featured-post-image-link {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    background: var(--c-bg-tint);
    overflow: hidden;
}
.featured-post-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 600ms var(--ease-out);
}
.featured-post-image-link:hover .featured-post-image { transform: scale(1.04); }

.featured-post-content {
    padding: clamp(1.5rem, 3vw, 2.5rem);
    padding-inline-start: 0;
}
.featured-post-title {
    font-size: clamp(1.5rem, 2.75vw, 2rem);
    margin-block: 0.75rem 1rem;
    line-height: 1.2;
}
.featured-post-title a { color: var(--c-ink); }
.featured-post-title a:hover { color: var(--c-accent); }
.featured-post-excerpt {
    color: var(--c-muted);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

@media (max-width: 860px) {
    .featured-post { grid-template-columns: 1fr; }
    .featured-post-content { padding: 1.5rem; }
}

/* ---------- Post feed ---------- */
.post-feed-section { padding-block: clamp(3rem, 6vw, 5rem); background: var(--c-bg-alt); }

.post-feed {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: clamp(1.25rem, 2.5vw, 2rem);
}

.post-card {
    background: var(--c-bg);
    border: 1px solid var(--c-border);
    border-radius: var(--r-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform var(--t-med), box-shadow var(--t-med), border-color var(--t-med);
    box-shadow: var(--shadow-xs);
}
.post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: #d1d5db;
}

.post-card-image-link {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    background: var(--c-bg-tint);
    overflow: hidden;
}
.post-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 600ms var(--ease-out);
}
.post-card:hover .post-card-image { transform: scale(1.05); }

.post-card-image-placeholder {
    width: 100%; height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--c-ink) 0%, var(--c-ink-700) 100%);
    color: var(--c-accent);
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: 0.1em;
}

.post-card-tag {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.3rem 0.7rem;
    background: rgba(10,14,26,0.85);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--r-pill);
    letter-spacing: 0.02em;
    backdrop-filter: blur(8px);
}
.featured-tag { background: var(--c-accent); }

.post-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.75rem;
}
.post-card-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--c-muted);
    font-weight: 500;
}
.meta-separator { opacity: 0.5; }

.post-card-title {
    font-size: 1.1875rem;
    line-height: 1.35;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.post-card-title a { color: var(--c-ink); }
.post-card-title a:hover { color: var(--c-accent); }

.post-card-excerpt {
    color: var(--c-muted);
    font-size: 0.9375rem;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.post-card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--c-accent);
    font-weight: 600;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    transition: gap var(--t-fast);
}
.post-card-link:hover { gap: 0.6rem; }

/* ---------- Pagination ---------- */
.pagination {
    margin-top: 3rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding-block: 1.25rem;
    border-top: 1px solid var(--c-border);
}
.pagination-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.65rem 1.1rem;
    border-radius: var(--r-md);
    background: var(--c-bg);
    color: var(--c-ink-800);
    border: 1px solid var(--c-border);
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    transition: border-color var(--t-fast), background var(--t-fast);
}
.pagination-link:hover:not(.pagination-disabled) {
    border-color: var(--c-accent);
    color: var(--c-accent);
}
.pagination-disabled { opacity: 0.4; cursor: not-allowed; }
.pagination-info { color: var(--c-muted); font-size: 0.875rem; font-weight: 500; }

/* ---------- CTA band ---------- */
.cta-band {
    background: var(--c-ink);
    background-image:
        radial-gradient(ellipse 60% 80% at 10% 50%, rgba(220, 38, 38, 0.18), transparent 60%),
        radial-gradient(ellipse 50% 70% at 90% 50%, rgba(59, 130, 246, 0.1), transparent 60%);
    color: #fff;
    padding-block: clamp(3rem, 6vw, 4.5rem);
}
.cta-band-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}
.cta-band-copy { max-width: 56ch; }
.cta-band h2 { color: #fff; font-size: clamp(1.5rem, 3vw, 2.125rem); margin-bottom: 0.5rem; }
.cta-band p { color: rgba(255,255,255,0.72); font-size: 1.05rem; line-height: 1.7; }

/* ---------- Full post page ---------- */
.post-full { background: var(--c-bg); }

.post-full-header {
    padding-block: clamp(3rem, 5vw, 4.5rem) clamp(2rem, 3vw, 3rem);
    background: linear-gradient(180deg, var(--c-bg-alt) 0%, var(--c-bg) 100%);
    border-bottom: 1px solid var(--c-border-soft);
}
.post-full-header-inner { max-width: var(--container-narrow); }

.post-full-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    font-size: 0.8125rem;
    color: var(--c-muted);
    font-weight: 500;
    margin-bottom: 1.25rem;
}
.post-full-tag {
    padding: 0.35rem 0.8rem;
    background: var(--c-accent-soft);
    color: var(--c-accent);
    border-radius: var(--r-pill);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
}
.post-full-tag:hover { background: var(--c-accent); color: #fff; }

.post-full-title {
    font-size: clamp(2rem, 4.5vw, 3.25rem);
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 1.25rem;
    color: var(--c-ink);
}
.post-full-excerpt {
    font-size: clamp(1.05rem, 1.75vw, 1.25rem);
    color: var(--c-ink-500);
    line-height: 1.65;
    margin-bottom: 2rem;
    font-weight: 400;
}

.post-full-byline {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--c-border-soft);
}
.byline-avatar {
    width: 44px; height: 44px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--c-bg-tint);
}
.byline-avatar-placeholder {
    display: flex; align-items: center; justify-content: center;
    background: var(--c-ink);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
}
.byline-name { font-weight: 600; color: var(--c-ink); font-size: 0.9375rem; }
.byline-name a { color: inherit; text-decoration: none; }
.byline-name a:hover { color: var(--c-accent); }
.byline-bio { font-size: 0.8125rem; color: var(--c-muted); margin-top: 0.15rem; }

.post-full-feature-image {
    max-width: var(--container);
    margin: 0 auto;
    padding-inline: var(--gutter);
    padding-block: clamp(1.5rem, 3vw, 2.5rem);
}
.post-full-feature-image img {
    width: 100%;
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-md);
}
.post-full-feature-image figcaption {
    text-align: center;
    color: var(--c-muted);
    font-size: 0.875rem;
    margin-top: 0.75rem;
}

/* Prose typography */
.post-full-content {
    padding-block: clamp(1.5rem, 3vw, 2.5rem);
}
.post-full-content-inner {
    font-size: 1.0625rem;
    line-height: 1.75;
    color: var(--c-ink-800);
}
.post-full-content-inner > * + * { margin-top: 1.25em; }
.post-full-content-inner h2 {
    font-size: clamp(1.35rem, 2.5vw, 1.75rem);
    margin-top: 2.25em;
    margin-bottom: 0.5em;
    letter-spacing: -0.025em;
}
.post-full-content-inner h3 {
    font-size: clamp(1.15rem, 2vw, 1.375rem);
    margin-top: 1.75em;
    margin-bottom: 0.4em;
}
.post-full-content-inner p { color: var(--c-ink-800); }
.post-full-content-inner a {
    color: var(--c-accent);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}
.post-full-content-inner a:hover { text-decoration-thickness: 2px; }
.post-full-content-inner ul,
.post-full-content-inner ol { padding-left: 1.5rem; }
.post-full-content-inner li + li { margin-top: 0.4em; }
.post-full-content-inner blockquote {
    border-left: 3px solid var(--c-accent);
    padding: 0.25rem 0 0.25rem 1.25rem;
    margin-block: 1.5em;
    color: var(--c-ink-500);
    font-style: italic;
    font-size: 1.125rem;
}
.post-full-content-inner img,
.post-full-content-inner figure {
    border-radius: var(--r-md);
    margin-block: 1.75em;
}
.post-full-content-inner figure img { border-radius: inherit; margin-block: 0; }
.post-full-content-inner figcaption {
    text-align: center;
    color: var(--c-muted);
    font-size: 0.875rem;
    margin-top: 0.6rem;
}
.post-full-content-inner pre {
    background: var(--c-ink);
    color: #e2e8f0;
    padding: 1.25rem 1.5rem;
    border-radius: var(--r-md);
    overflow-x: auto;
    font-size: 0.875rem;
    line-height: 1.6;
    font-family: var(--font-mono);
}
.post-full-content-inner pre code { background: transparent; color: inherit; padding: 0; }
.post-full-content-inner hr {
    border: 0;
    border-top: 1px solid var(--c-border);
    margin-block: 2.5em;
}
.post-full-content-inner table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
}
.post-full-content-inner th,
.post-full-content-inner td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--c-border);
    text-align: left;
}
.post-full-content-inner th { background: var(--c-bg-alt); font-weight: 600; }

/* Ghost card helpers */
.kg-image { max-width: 100%; }
.kg-width-wide { max-width: 1040px; margin-inline: auto; }
.kg-width-full {
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    width: 100vw;
    max-width: none;
    border-radius: 0 !important;
}
.kg-bookmark-card {
    display: flex;
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    overflow: hidden;
    text-decoration: none !important;
    color: inherit !important;
    background: var(--c-bg);
    transition: box-shadow var(--t-med);
}
.kg-bookmark-card:hover { box-shadow: var(--shadow-md); }
.kg-bookmark-content { padding: 1.25rem 1.5rem; flex: 1; }
.kg-bookmark-title { font-weight: 700; color: var(--c-ink); margin-bottom: 0.25rem; }
.kg-bookmark-description { font-size: 0.9375rem; color: var(--c-muted); }
.kg-bookmark-thumbnail img { width: 180px; height: 100%; object-fit: cover; }
.kg-callout-card { padding: 1.25rem 1.5rem; border-radius: var(--r-md); border: 1px solid var(--c-border); background: var(--c-bg-alt); }

/* ---------- Tags block ---------- */
.post-full-tags { padding: 1.5rem var(--gutter); }
.post-full-tags-inner {
    max-width: var(--container-narrow);
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding-top: 1.5rem;
    border-top: 1px solid var(--c-border);
}
.tags-label { font-size: 0.8125rem; color: var(--c-muted); font-weight: 600; margin-right: 0.25rem; }
.tag-chip {
    padding: 0.3rem 0.7rem;
    background: var(--c-bg-alt);
    border: 1px solid var(--c-border);
    color: var(--c-ink-500);
    border-radius: var(--r-pill);
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--t-fast);
}
.tag-chip:hover { background: var(--c-accent); color: #fff; border-color: var(--c-accent); }

/* ---------- Author card ---------- */
.post-full-author-card { padding: 2rem var(--gutter); }
.author-card-inner {
    max-width: var(--container-narrow);
    margin: 0 auto;
    display: flex;
    gap: 1.5rem;
    padding: 1.75rem;
    background: var(--c-bg-alt);
    border: 1px solid var(--c-border);
    border-radius: var(--r-lg);
}
.author-card-avatar {
    width: 72px; height: 72px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.author-card-avatar-placeholder {
    display: flex; align-items: center; justify-content: center;
    background: var(--c-ink);
    color: #fff;
    font-weight: 800;
    font-size: 1.75rem;
}
.author-card-eyebrow {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--c-accent);
    margin-bottom: 0.15rem;
}
.author-card-name { font-size: 1.25rem; margin-bottom: 0.5rem; }
.author-card-name a { color: var(--c-ink); text-decoration: none; }
.author-card-name a:hover { color: var(--c-accent); }
.author-card-bio { color: var(--c-muted); font-size: 0.9375rem; line-height: 1.65; margin-bottom: 0.75rem; }
.author-card-link {
    font-size: 0.875rem;
    font-weight: 600;
    margin-right: 0.75rem;
}

@media (max-width: 600px) {
    .author-card-inner { flex-direction: column; text-align: left; }
}

/* ---------- Inline CTA on posts ---------- */
.post-full-inline-cta { padding: 1rem var(--gutter) 3rem; }
.inline-cta-inner {
    max-width: var(--container-narrow);
    margin: 0 auto;
    background: var(--c-ink);
    background-image: radial-gradient(ellipse 80% 120% at 100% 0%, rgba(220, 38, 38, 0.25), transparent 60%);
    color: #fff;
    border-radius: var(--r-lg);
    padding: 2rem 2.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.inline-cta-eyebrow {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--c-accent);
    margin-bottom: 0.25rem;
}
.inline-cta-inner h3 { color: #fff; font-size: 1.25rem; margin-bottom: 0.4rem; }
.inline-cta-inner p { color: rgba(255,255,255,0.75); font-size: 0.9375rem; max-width: 48ch; margin: 0; }

/* ---------- Related posts ---------- */
.related-posts { padding-block: clamp(3rem, 6vw, 5rem); background: var(--c-bg-alt); border-top: 1px solid var(--c-border); }

/* ---------- Archive pages (tag / author) ---------- */
.archive-hero {
    background: linear-gradient(180deg, var(--c-ink) 0%, var(--c-ink-800) 100%);
    color: #fff;
    padding-block: clamp(3.5rem, 6vw, 5rem);
    text-align: center;
    position: relative;
    overflow: hidden;
}
.archive-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 70% 50% at 50% 0%, rgba(220, 38, 38, 0.12), transparent 70%);
    pointer-events: none;
}
.archive-hero-inner { position: relative; z-index: 1; }
.archive-title {
    color: #fff;
    font-size: clamp(2rem, 4.5vw, 3rem);
    margin-bottom: 1rem;
}
.archive-description {
    color: rgba(255,255,255,0.75);
    font-size: 1.1rem;
    max-width: 60ch;
    margin: 0 auto;
    line-height: 1.65;
}
.archive-meta {
    margin-top: 1.25rem;
    color: var(--c-accent);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.author-hero .archive-avatar {
    width: 96px; height: 96px;
    border-radius: 50%;
    margin: 0 auto 1.25rem;
    border: 3px solid rgba(220, 38, 38, 0.3);
    object-fit: cover;
}
.archive-avatar-placeholder {
    display: flex; align-items: center; justify-content: center;
    background: var(--c-accent);
    color: #fff;
    font-weight: 800;
    font-size: 2.25rem;
}
.author-socials { margin-top: 1.25rem; display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.author-social {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-weight: 500;
    padding: 0.4rem 0.9rem;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: var(--r-pill);
    font-size: 0.875rem;
    transition: border-color var(--t-fast), color var(--t-fast);
}
.author-social:hover { color: #fff; border-color: var(--c-accent); }

/* ---------- Error page ---------- */
.error-page {
    min-height: 70vh;
    display: flex;
    align-items: center;
    padding-block: 4rem;
    background: var(--c-bg-alt);
}
.error-page-inner { text-align: center; }
.error-code {
    font-family: var(--font-mono);
    font-size: clamp(5rem, 15vw, 10rem);
    font-weight: 700;
    line-height: 1;
    background: linear-gradient(135deg, var(--c-accent), var(--c-ink));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 1rem;
    letter-spacing: -0.04em;
}
.error-title { font-size: clamp(1.75rem, 3.5vw, 2.5rem); margin-bottom: 1rem; }
.error-description { color: var(--c-muted); font-size: 1.05rem; max-width: 52ch; margin: 0 auto 2rem; line-height: 1.7; }
.error-actions { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.site-footer {
    background: var(--c-ink);
    color: rgba(255,255,255,0.75);
    padding-block: clamp(3rem, 6vw, 5rem) 1.5rem;
    position: relative;
    overflow: hidden;
}
.site-footer::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 40% at 50% 0%, rgba(220, 38, 38, 0.07), transparent 60%);
    pointer-events: none;
}
.site-footer-inner { position: relative; z-index: 1; }

.site-footer-top {
    display: grid;
    grid-template-columns: 1.3fr 3fr;
    gap: clamp(2rem, 4vw, 4rem);
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    color: #fff;
    font-weight: 800;
    font-size: 1.375rem;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
    text-decoration: none;
}
.footer-logo img { max-height: 36px; }
.footer-tagline { color: rgba(255,255,255,0.65); font-size: 0.9375rem; line-height: 1.7; max-width: 40ch; }
.footer-tagline strong { color: #fff; font-weight: 600; }

.footer-columns {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}
.footer-col h4 {
    color: #fff;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}
.footer-col ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.footer-col a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.9375rem;
    transition: color var(--t-fast);
}
.footer-col a:hover { color: var(--c-accent); }

.site-footer-offices {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    padding-block: 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.office-card {
    padding: 1.25rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--r-md);
}
.office-label {
    display: block;
    color: var(--c-accent);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}
.office-card p { color: rgba(255,255,255,0.85); font-size: 0.9375rem; line-height: 1.6; }

.site-footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    flex-wrap: wrap;
    padding-top: 1.5rem;
}
.footer-copyright { color: rgba(255,255,255,0.5); font-size: 0.8125rem; }
.footer-legal { display: flex; align-items: center; gap: 0.6rem; font-size: 0.8125rem; }
.footer-legal a { color: rgba(255,255,255,0.7); text-decoration: none; }
.footer-legal a:hover { color: #fff; }
.footer-legal span { color: rgba(255,255,255,0.3); }

.footer-badges { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.footer-badges .badge {
    padding: 0.3rem 0.7rem;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.85);
    border-radius: var(--r-xs);
    letter-spacing: 0.02em;
}

@media (max-width: 960px) {
    .site-footer-top { grid-template-columns: 1fr; }
    .footer-columns { grid-template-columns: repeat(2, 1fr); }
    .site-footer-offices { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .footer-columns { grid-template-columns: 1fr; }
    .site-footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ---------- Accessibility & misc ---------- */
:focus-visible {
    outline: 2px solid var(--c-accent);
    outline-offset: 3px;
    border-radius: 2px;
}
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@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;
    }
}

/* ---------- Print ---------- */
@media print {
    .site-header, .site-footer, .post-full-inline-cta, .cta-band, .related-posts, .post-full-tags, .pagination { display: none; }
    body { color: #000; background: #fff; }
    a { color: #000; text-decoration: underline; }
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
    background: var(--c-bg-alt);
    border-bottom: 1px solid var(--c-border-soft);
    font-size: 0.8125rem;
}
.breadcrumb-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding-inline: var(--gutter);
    padding-block: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    color: var(--c-muted);
}
.breadcrumb a {
    color: var(--c-muted);
    text-decoration: none;
    transition: color var(--t-fast);
    font-weight: 500;
}
.breadcrumb a:hover { color: var(--c-accent); }
.breadcrumb-sep { color: var(--c-muted-light); flex-shrink: 0; }
.breadcrumb-current {
    color: var(--c-ink);
    font-weight: 600;
    max-width: 60ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
@media (max-width: 600px) {
    .breadcrumb-current { max-width: 28ch; }
}

/* ---------- CTA band refinements ---------- */
.cta-band-action { display: flex; flex-direction: column; align-items: flex-end; gap: 0.5rem; }
.cta-microcopy {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.5);
    font-style: italic;
}
@media (max-width: 700px) { .cta-band-action { align-items: flex-start; } }

/* ---------- Footer: Engage block ---------- */
.site-footer-engage {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.5fr;
    gap: 2rem;
    padding-block: 3rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    align-items: start;
}

.engage-form {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--r-lg);
    padding: 1.5rem 1.75rem;
}
.engage-title {
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 0 0 0.75rem;
}
.engage-divider {
    width: 36px;
    height: 2px;
    background: var(--c-accent);
    border-radius: 2px;
    margin-bottom: 0.9rem;
}
.engage-description {
    color: rgba(255,255,255,0.7);
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}
.engage-form-fields { display: flex; flex-direction: column; gap: 0.6rem; }
.engage-select {
    width: 100%;
    padding: 0.65rem 0.85rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--r-md);
    color: #fff;
    font-family: inherit;
    font-size: 0.875rem;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23ffffff99' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M2 4l4 4 4-4'/></svg>");
    background-repeat: no-repeat;
    background-position: right 0.85rem center;
    background-size: 12px;
    padding-right: 2.25rem;
    cursor: pointer;
    transition: border-color var(--t-fast), background-color var(--t-fast);
}
.engage-select:hover,
.engage-select:focus {
    border-color: rgba(255,255,255,0.25);
    background-color: rgba(255,255,255,0.08);
    outline: none;
}
.engage-select option { background: var(--c-ink); color: #fff; }
.engage-micro {
    margin-top: 0.75rem;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.45);
    font-style: italic;
}

.engage-contact { color: rgba(255,255,255,0.8); }
.engage-contact-header {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.7);
    margin-bottom: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.01em;
}
.engage-phone {
    display: block;
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-decoration: none;
    margin-bottom: 0.35rem;
    font-family: var(--font-mono);
}
.engage-phone:hover { color: var(--c-accent); }
.engage-email {
    display: block;
    color: rgba(255,255,255,0.72);
    font-size: 0.9rem;
    text-decoration: none;
}
.engage-email:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

.engage-offices { display: flex; flex-direction: column; gap: 0.75rem; }
.engage-offices .office-card {
    padding: 0.9rem 1rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--r-md);
}
.engage-offices .office-label {
    display: block;
    color: var(--c-accent);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.35rem;
}
.engage-offices .office-card p { color: rgba(255,255,255,0.82); font-size: 0.85rem; line-height: 1.5; }

@media (max-width: 960px) {
    .site-footer-engage { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* ---------- Footer: Certification strip ---------- */
.site-footer-certifications {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
    padding-block: 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    align-items: center;
}
.certification-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    transition: opacity var(--t-fast);
}
.certification-item img {
    max-height: 48px;
    width: auto;
    max-width: 120px;
    filter: grayscale(0.3) brightness(1.1);
    opacity: 0.9;
    transition: filter var(--t-fast), opacity var(--t-fast);
    object-fit: contain;
}
.certification-item:hover img {
    filter: grayscale(0) brightness(1);
    opacity: 1;
}
.certification-item span {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.6);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
@media (max-width: 720px) {
    .site-footer-certifications { grid-template-columns: repeat(3, 1fr); gap: 1rem; }
    .certification-item img { max-height: 36px; }
}
@media (max-width: 480px) {
    .site-footer-certifications { grid-template-columns: repeat(2, 1fr); }
}

/* Deprecate old elements no longer used */
.footer-badges, .site-footer-offices { display: none; }
.footer-description {
    color: rgba(255,255,255,0.55);
    font-size: 0.85rem;
    line-height: 1.65;
    margin-top: 0.5rem;
    max-width: 38ch;
}

/* Screen-reader only (used for form label) */
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ============================================================
   ADDITIONS v2 — polish, new components, small details
   ============================================================ */

/* ---------- Skip link (a11y) ---------- */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 8px;
    background: var(--c-accent);
    color: #fff;
    padding: 0.5rem 0.875rem;
    border-radius: var(--r-sm);
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    z-index: 200;
    transition: top var(--t-fast);
}
.skip-to-content:focus { top: 8px; color: #fff; }

/* ---------- Reading progress ---------- */
.reading-progress {
    position: fixed;
    top: 0; left: 0;
    height: 3px;
    width: 0%;
    background: var(--c-accent);
    z-index: 60;
    transition: width 80ms linear;
    pointer-events: none;
}

/* ---------- Back to top ---------- */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--c-ink);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    cursor: pointer;
    z-index: 40;
    box-shadow: var(--shadow-md);
    transition: transform var(--t-fast), opacity var(--t-fast), background var(--t-fast);
    opacity: 0.92;
}
.back-to-top:hover { background: var(--c-accent); transform: translateY(-2px); opacity: 1; }
.back-to-top[hidden] { display: none; }

/* ---------- Header refinements ---------- */
.site-header-main-wrap {
    background: var(--c-ink);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.site-header-logo img {
    height: 36px;
    width: auto;
    display: block;
    /* On dark bg, invert the SVG if it was designed for a light bg */
    filter: brightness(0) invert(1);
}

.top-bar-links { display: inline-flex; align-items: center; gap: 1rem; }
.top-bar-item svg { opacity: 0.85; }
.top-bar-email { display: none; }
@media (min-width: 700px) { .top-bar-email { display: inline-flex; } }

.nav-item a {
    position: relative;
}
.nav-item a::after {
    content: "";
    position: absolute;
    bottom: 2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--c-accent);
    transition: width var(--t-fast), left var(--t-fast);
}
.nav-item a:hover::after,
.nav-item.is-current a::after {
    width: calc(100% - 2rem);
    left: 1rem;
}
.nav-item.is-current a { background: transparent; }

.site-header-actions .icon-btn {
    width: 40px; height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.85);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--r-sm);
    cursor: pointer;
    transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.site-header-actions .icon-btn:hover {
    background: rgba(255,255,255,0.12);
    color: #fff;
    border-color: rgba(255,255,255,0.2);
}

.btn-sm { padding: 0.5rem 0.85rem; font-size: 0.8125rem; border-radius: var(--r-sm); }
.sign-in-link {
    color: rgba(255,255,255,0.85);
    border-color: rgba(255,255,255,0.15);
    background: transparent;
}
.sign-in-link:hover {
    color: #fff;
    border-color: rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.05);
}

.btn-with-arrow svg { transition: transform var(--t-fast); }
.btn-with-arrow:hover svg { transform: translateX(3px); }

.btn-cta {
    padding: 0.65rem 1.15rem;
    font-size: 0.875rem;
}

@media (max-width: 960px) {
    .site-header-actions .sign-in-link { display: none; }
    .site-header-actions .btn-cta { display: none; }
    .site-header-actions .icon-btn { display: none; }
}

.mobile-menu-actions {
    padding: 0.5rem var(--gutter) 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    border-top: 1px solid rgba(255,255,255,0.06);
    margin-top: 0.5rem;
}
.mobile-menu-actions .btn {
    justify-content: center;
    padding: 0.85rem 1rem;
    font-size: 0.9375rem;
}
.mobile-menu-actions .btn-ghost {
    background: rgba(255,255,255,0.05);
    color: #fff;
    border-color: rgba(255,255,255,0.12);
}
.mobile-menu-actions .btn-ghost:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}
.mobile-nav-list { list-style: none; padding: 0.75rem 0; margin: 0; display: flex; flex-direction: column; }
.mobile-nav-list li a {
    display: block;
    padding: 0.85rem var(--gutter);
    color: #fff;
    font-weight: 500;
    font-size: 0.9375rem;
    text-decoration: none;
    border-left: 2px solid transparent;
    transition: background var(--t-fast), border-color var(--t-fast);
}
.mobile-nav-list li a:hover {
    background: rgba(255,255,255,0.05);
    border-left-color: var(--c-accent);
    color: #fff;
}

/* ---------- Eyebrow dot indicator ---------- */
.eyebrow-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--c-accent);
    border-radius: 50%;
    margin-right: 0.4rem;
    vertical-align: middle;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

/* ---------- Hero certification strip (replaced with inline hero-meta pills) ---------- */

/* ---------- Section header link ---------- */
.section-header { justify-content: flex-start; }
.section-header-link {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--c-muted);
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
    padding: 0.4rem 0.75rem;
    border: 1px solid var(--c-border);
    border-radius: var(--r-sm);
    transition: color var(--t-fast), border-color var(--t-fast);
}
.section-header-link:hover { color: var(--c-accent); border-color: var(--c-accent); }

/* ---------- Featured post author line ---------- */
.featured-post-author {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 1.25rem;
    color: var(--c-muted);
    font-size: 0.875rem;
    font-weight: 500;
}
.featured-post-author img {
    width: 28px; height: 28px;
    border-radius: 50%;
    object-fit: cover;
}
.author-initial {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--c-ink);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
}

/* ---------- Meta badge (members-only) ---------- */
.meta-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.5rem;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #78350f;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    border-radius: var(--r-xs);
}

/* ---------- Newsletter band ---------- */
.newsletter-band {
    padding-block: clamp(3rem, 6vw, 5rem);
    background: var(--c-bg);
    border-top: 1px solid var(--c-border);
    border-bottom: 1px solid var(--c-border);
}
.newsletter-band-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding-inline: var(--gutter);
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: clamp(2rem, 4vw, 4rem);
    align-items: center;
}
.newsletter-eyebrow {
    display: inline-block;
    color: var(--c-accent);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}
.newsletter-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: 0.5rem;
    color: var(--c-ink);
}
.newsletter-description {
    color: var(--c-muted);
    font-size: 1rem;
    line-height: 1.7;
    max-width: 52ch;
}
.newsletter-form { width: 100%; }
.newsletter-input-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.newsletter-input-group input[type="email"] {
    flex: 1;
    min-width: 200px;
    padding: 0.85rem 1rem;
    border: 1px solid var(--c-border);
    background: var(--c-bg);
    border-radius: var(--r-md);
    font-size: 0.9375rem;
    font-family: inherit;
    color: var(--c-ink-800);
    transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.newsletter-input-group input[type="email"]:focus {
    outline: none;
    border-color: var(--c-accent);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}
.newsletter-submit { padding: 0.85rem 1.5rem; }
.newsletter-hint {
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: var(--c-muted);
}
.newsletter-error { color: var(--c-accent); }

@media (max-width: 860px) {
    .newsletter-band-inner { grid-template-columns: 1fr; }
}

/* ---------- CTA band refinements ---------- */
.cta-band-eyebrow {
    display: inline-block;
    color: var(--c-accent);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}
.cta-band-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; }
.btn-ghost-on-dark {
    background: transparent;
    color: rgba(255,255,255,0.9);
    border: 1px solid rgba(255,255,255,0.25);
}
.btn-ghost-on-dark:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
    border-color: rgba(255,255,255,0.4);
}

/* ---------- Archive compact hero ---------- */
.archive-hero-compact { padding-block: clamp(2.5rem, 4vw, 3.5rem); }

/* ---------- Empty state ---------- */
.empty-state-section { padding-block: 5rem; background: var(--c-bg-alt); }
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--c-muted);
}
.empty-state svg { color: var(--c-muted-light); margin: 0 auto 1rem; }
.empty-state h2 { color: var(--c-ink); margin-bottom: 0.5rem; }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs {
    padding: 1rem 0 0;
    background: var(--c-bg-alt);
}
.breadcrumbs-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding-inline: var(--gutter);
}
.breadcrumbs ol {
    list-style: none;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0;
    margin: 0;
    font-size: 0.8125rem;
    color: var(--c-muted);
}
.breadcrumbs a {
    color: var(--c-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--t-fast);
}
.breadcrumbs a:hover { color: var(--c-accent); }
.breadcrumb-sep { opacity: 0.4; }

/* ---------- Post full layout with sidebar ---------- */
.post-full-body {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: clamp(2rem, 4vw, 4rem);
    max-width: var(--container);
    margin: 0 auto;
    padding-inline: var(--gutter);
    padding-block: clamp(1.5rem, 3vw, 2.5rem);
    align-items: start;
}
.post-full-sidebar {
    position: sticky;
    top: calc(84px + 1rem);
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}
.post-full-sidebar::-webkit-scrollbar { width: 4px; }
.post-full-sidebar::-webkit-scrollbar-thumb { background: var(--c-border); border-radius: 2px; }
.sidebar-inner { display: flex; flex-direction: column; gap: 1.5rem; }

.post-full-body .post-full-content { padding: 0; }
.post-full-body .post-full-content-inner { max-width: 780px; }

@media (max-width: 960px) {
    .post-full-body {
        grid-template-columns: 1fr;
        padding-block: 1.5rem;
    }
    .post-full-sidebar {
        position: static;
        max-height: none;
        order: 2;
        border-top: 1px solid var(--c-border);
        padding-top: 1.5rem;
    }
    .post-full-body .post-full-content-inner { max-width: none; }
}

/* ---------- Table of Contents ---------- */
.toc-wrap {
    padding: 1.25rem;
    background: var(--c-bg-alt);
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
}
.toc-wrap[hidden] { display: none; }
.toc-heading {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--c-accent);
    margin-bottom: 0.85rem;
}
.toc-nav ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.25rem; }
.toc-nav li { font-size: 0.875rem; line-height: 1.4; }
.toc-nav li.toc-h3 { padding-left: 0.85rem; }
.toc-nav a {
    display: block;
    padding: 0.35rem 0.5rem;
    color: var(--c-ink-500);
    text-decoration: none;
    border-left: 2px solid transparent;
    border-radius: 0 var(--r-xs) var(--r-xs) 0;
    transition: color var(--t-fast), background var(--t-fast), border-color var(--t-fast);
}
.toc-nav a:hover { color: var(--c-ink); background: var(--c-bg); }
.toc-nav a.is-active {
    color: var(--c-accent);
    background: var(--c-bg);
    border-left-color: var(--c-accent);
    font-weight: 600;
}

/* ---------- Share buttons ---------- */
.share-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1rem;
    background: var(--c-bg-alt);
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
}
.share-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--c-muted);
    margin-bottom: 0.25rem;
    padding: 0 0.25rem;
}
.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.5rem 0.7rem;
    color: var(--c-ink-500);
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--r-sm);
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    font-family: inherit;
    transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
    text-align: left;
}
.share-btn:hover {
    background: var(--c-bg);
    color: var(--c-ink);
    border-color: var(--c-border);
}
.share-btn.is-copied { color: var(--c-success); }

/* Inline share row (below post) */
.post-full-share-inline {
    padding: 1rem var(--gutter) 0;
}
.post-full-share-inner {
    max-width: var(--container-narrow);
    margin: 0 auto;
    padding-top: 1.5rem;
    border-top: 1px solid var(--c-border);
}
.post-full-share-inner .share-buttons {
    flex-direction: row;
    flex-wrap: wrap;
    padding: 0;
    background: transparent;
    border: 0;
}
.post-full-share-inner .share-label { margin-bottom: 0; padding-top: 0.5rem; }
.post-full-share-inner .share-btn {
    border: 1px solid var(--c-border);
    background: var(--c-bg);
}

/* ---------- Paywall prompt ---------- */
.paywall-prompt { padding: 2rem 0; }
.paywall-inner {
    background: linear-gradient(180deg, var(--c-bg-alt) 0%, var(--c-bg) 100%);
    border: 1px solid var(--c-border);
    border-radius: var(--r-lg);
    padding: 2rem;
    text-align: center;
}
.paywall-eyebrow {
    display: inline-block;
    padding: 0.3rem 0.75rem;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #78350f;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: var(--r-pill);
    margin-bottom: 1rem;
}
.paywall-inner h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.paywall-inner p { color: var(--c-muted); max-width: 48ch; margin: 0 auto 1.25rem; line-height: 1.65; }
.paywall-actions { display: flex; gap: 0.65rem; justify-content: center; flex-wrap: wrap; }

/* ---------- Author card enhancements ---------- */
.author-card-links { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 0.25rem; }
.author-card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--c-muted);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    padding: 0.35rem 0.65rem;
    border: 1px solid var(--c-border);
    border-radius: var(--r-sm);
    background: var(--c-bg);
    transition: color var(--t-fast), border-color var(--t-fast);
    margin-right: 0;
}
.author-card-link:hover { color: var(--c-accent); border-color: var(--c-accent); }

/* ---------- Inline CTA refinements ---------- */
.inline-cta-inner {
    align-items: center;
}
.inline-cta-copy { flex: 1; min-width: 260px; }

/* ---------- Footer refinements ---------- */
.footer-contact { display: flex; flex-direction: column; gap: 0.65rem; margin-top: 1.25rem; }
.footer-contact-item {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: color var(--t-fast);
}
.footer-contact-item:hover { color: var(--c-accent); }
.footer-contact-item svg { color: var(--c-accent); opacity: 0.8; }

.office-card {
    position: relative;
    overflow: hidden;
}
.office-flag { font-size: 1.25rem; display: block; margin-bottom: 0.4rem; filter: saturate(0.9); }

.footer-sep { opacity: 0.4; margin-inline: 0.5rem; }

/* ---------- Footer logo inversion ---------- */
.footer-logo img {
    height: 36px;
    width: auto;
    filter: brightness(0) invert(1);
}

/* ---------- Image sharpening ---------- */
img[loading="lazy"] { content-visibility: auto; }

/* ---------- Selection color ---------- */
::selection {
    background: var(--c-accent);
    color: #fff;
}

/* ---------- Focus ring refinement ---------- */
:focus-visible {
    outline: 2px solid var(--c-accent);
    outline-offset: 3px;
    border-radius: 2px;
}
.btn:focus-visible { outline-offset: 3px; }

/* ---------- Fix dark mode opt-out (we design for light) ---------- */
@media (prefers-color-scheme: dark) {
    /* Theme is light-first and forces light colors — prevent Ghost's
       color-scheme auto from inverting images or inputs. */
    :root { color-scheme: light; }
}

/* ---------- Ghost Koenig editor card fallback styling ---------- */
.kg-gallery-container {
    display: flex;
    flex-direction: column;
    max-width: 1040px;
    margin-inline: auto;
    gap: 0.5rem;
}
.kg-gallery-row { display: flex; gap: 0.5rem; flex: 0 0 auto; }
.kg-gallery-image img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--r-md); }
.kg-embed-card { margin-block: 1.5em; }
.kg-embed-card iframe { border-radius: var(--r-md); max-width: 100%; }
.kg-toggle-card {
    padding: 1rem 1.25rem;
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    margin-block: 1.5em;
}
.kg-toggle-heading-text { font-weight: 600; }
.kg-button-card { text-align: center; margin-block: 2em; }
.kg-button-card a {
    display: inline-flex;
    align-items: center;
    padding: 0.85rem 1.5rem;
    background: var(--c-accent);
    color: #fff !important;
    font-weight: 600;
    border-radius: var(--r-md);
    text-decoration: none !important;
}
.kg-button-card a:hover { background: var(--c-accent-hover); }
.kg-header-card { padding: 3rem 1.5rem; border-radius: var(--r-lg); background: var(--c-bg-alt); margin-block: 2em; }
.kg-product-card {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 1.5rem;
    padding: 1.25rem;
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    margin-block: 1.5em;
}
@media (max-width: 600px) { .kg-product-card { grid-template-columns: 1fr; } }
.kg-file-card {
    padding: 1rem 1.25rem;
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    margin-block: 1.5em;
}

/* Gallery columns */
.kg-gallery-image[data-row="0"] { flex: 1; }

/* Koenig code-block header */
.kg-code-card .kg-code-card-header {
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.7);
    font-size: 0.75rem;
    padding: 0.4rem 0.85rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    font-family: var(--font-mono);
}

/* ---------- Ghost portal button styling ---------- */
button[data-portal],
a[data-portal] { cursor: pointer; }

/* ---------- Print refinements ---------- */
@media print {
    .reading-progress, .back-to-top, .site-header, .site-footer,
    .post-full-inline-cta, .cta-band, .newsletter-band,
    .related-posts, .post-full-tags, .pagination,
    .post-full-sidebar, .share-buttons, .breadcrumbs,
    .paywall-prompt { display: none !important; }
    .post-full-body { grid-template-columns: 1fr; padding: 0; }
    .post-full-body .post-full-content-inner { max-width: none; }
    body { color: #000; background: #fff; font-size: 11pt; }
    a { color: #000; text-decoration: underline; }
    a::after { content: " (" attr(href) ")"; font-size: 80%; color: #444; }
    h1, h2, h3 { page-break-after: avoid; }
    img, figure { page-break-inside: avoid; }
}


/* ============================================================
   ADDITIONS v3 — final small details for remaining partials
   ============================================================ */

/* ---------- Post card footer (author + read more) ---------- */
.post-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 0.85rem;
    border-top: 1px solid var(--c-border-soft);
}
.post-card-author {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--c-muted);
    font-size: 0.8125rem;
    font-weight: 500;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.post-card-author img {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.author-initial-sm {
    width: 22px; height: 22px;
    border-radius: 50%;
    background: var(--c-ink);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.6875rem;
    flex-shrink: 0;
}

.post-card-members-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.6rem;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #78350f;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    border-radius: var(--r-pill);
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.3);
}

/* ---------- Inline breadcrumbs (on archive heroes) ---------- */
.breadcrumbs-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.8125rem;
    color: rgba(255,255,255,0.6);
}
.breadcrumbs-inline a {
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--t-fast);
}
.breadcrumbs-inline a:hover { color: var(--c-accent); }
.breadcrumbs-inline span[aria-hidden] { opacity: 0.4; }

/* ---------- Author location line ---------- */
.author-location {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.75rem;
    color: rgba(255,255,255,0.7);
    font-size: 0.875rem;
    font-weight: 500;
}
.author-location svg { opacity: 0.75; }

/* ---------- Error page suggestions ---------- */
.error-suggestions {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--c-border);
    max-width: 28rem;
    margin-inline: auto;
}
.error-suggestions-heading {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--c-accent);
    margin-bottom: 1rem;
}
.error-suggestions-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.error-suggestions-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--c-bg);
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    color: var(--c-ink-800);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    transition: border-color var(--t-fast), color var(--t-fast);
}
.error-suggestions-list a::after {
    content: "→";
    color: var(--c-muted);
    font-weight: 700;
    transition: transform var(--t-fast), color var(--t-fast);
}
.error-suggestions-list a:hover { border-color: var(--c-accent); color: var(--c-accent); }
.error-suggestions-list a:hover::after { color: var(--c-accent); transform: translateX(3px); }

/* ---------- Better spacing for sticky-header anchor scrolling ---------- */
.post-full-content-inner :is(h2, h3)[id] {
    scroll-margin-top: 100px;
}

/* ---------- Search modal / Ghost portal overrides (lightweight) ---------- */
[data-ghost-search]:focus-visible,
[data-portal]:focus-visible {
    outline: 2px solid var(--c-accent);
    outline-offset: 2px;
}

/* ============================================================
   V3 CORRECTIONS — fixes for live-deployed layout issues
   Appended last so these win the cascade.
   ============================================================ */

/* ---------- Container width: give the page more breathing room ---------- */
:root {
    --container: 1240px;
    --container-narrow: 780px;
    --container-wide: 1360px;
}

/* ---------- Header: slightly tighter, better logo size ---------- */
.site-header-logo img {
    height: 42px;
    width: auto;
    max-height: 42px;
}
.site-header-main { padding-block: 0.85rem; }

/* ---------- Hero: tighter, more dense, more scannable ---------- */
.blog-hero { padding-block: clamp(3rem, 6vw, 4.75rem); }
.blog-hero-title {
    font-size: clamp(2rem, 4.5vw, 3.25rem);
    margin-bottom: 1rem;
    max-width: 22ch;
}
.blog-hero-description {
    font-size: clamp(0.975rem, 1.3vw, 1.1rem);
    margin-bottom: 1.5rem;
    max-width: 60ch;
}

/* ---------- FEATURED POST: complete fix ----------
   The original rules used aspect-ratio: 4/3 which clipped tall images
   unnaturally, and the date meta was inheriting the featured-tag's
   red styling because the meta element was rendered inside the link
   zone. Rebuild with a cleaner stacking + better proportions. */
.featured-post {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 0;
    align-items: stretch;
    border-radius: var(--r-xl);
    overflow: hidden;
    border: 1px solid var(--c-border);
    background: var(--c-bg);
    box-shadow: var(--shadow-sm);
}
.featured-post-image-link {
    position: relative;
    display: block;
    aspect-ratio: auto;   /* let image dictate height on desktop */
    min-height: 340px;
    max-height: 480px;
    background: var(--c-ink);   /* if image has black frame it matches */
    overflow: hidden;
    border-radius: 0;
}
.featured-post-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}
.featured-post-content {
    padding: clamp(1.5rem, 2.5vw, 2.25rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.85rem;
    min-width: 0;
}
/* CRITICAL: kill any stray inherited background/color on the meta row
   that was causing the "red bar" rendering over the date. */
.featured-post .post-card-meta {
    background: transparent !important;
    color: var(--c-muted) !important;
    padding: 0;
    margin: 0;
    font-size: 0.8125rem;
    font-weight: 500;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.featured-post .post-card-meta time,
.featured-post .post-card-meta span {
    background: transparent !important;
    color: inherit !important;
    padding: 0;
}
.featured-post-title {
    font-size: clamp(1.375rem, 2.2vw, 1.75rem);
    line-height: 1.22;
    margin: 0;
    letter-spacing: -0.022em;
}
.featured-post-excerpt {
    margin: 0;
    color: var(--c-muted);
    font-size: 0.975rem;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.featured-post-author {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--c-muted);
    font-size: 0.85rem;
    font-weight: 500;
    margin: 0;
}
.featured-post-author .author-initial {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--c-accent);
    color: #fff;
    font-weight: 700;
    font-size: 0.75rem;
    line-height: 1;
    text-transform: uppercase;
    /* clamp to 1 character even if Ghost returns a name */
    max-width: 26px;
    overflow: hidden;
    white-space: nowrap;
}
/* featured-tag should never bleed — lock it above the image only */
.featured-post .post-card-tag.featured-tag {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 2;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.7rem;
}
.featured-post-content .btn { align-self: flex-start; margin-top: 0.25rem; }

@media (max-width: 900px) {
    .featured-post { grid-template-columns: 1fr; }
    .featured-post-image-link { aspect-ratio: 16 / 9; min-height: 0; max-height: none; }
}

/* ---------- Post cards: tighten meta and remove any leaking tag styles ---------- */
.post-card .post-card-meta {
    background: transparent !important;
    color: var(--c-muted) !important;
}
.post-card .post-card-meta time,
.post-card .post-card-meta span { background: transparent !important; }

/* Tag badge readability */
.post-card-tag {
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.7rem;
    font-weight: 700;
}

/* ---------- Section inner max-width ---------- */
.section-inner,
.blog-hero-inner,
.archive-hero-inner,
.cta-band-inner,
.post-full-header-inner { max-width: var(--container); }

/* ---------- Section header: RSS feed link on the right ---------- */
.section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}
.section-header-link {
    margin-left: auto;
}

/* ---------- CTA band: prevent copy truncation ---------- */
.cta-band { padding-block: clamp(3rem, 5vw, 4.25rem); }
.cta-band-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2rem;
    align-items: center;
}
.cta-band-copy { max-width: none; }
.cta-band-copy p {
    color: rgba(255,255,255,0.78);
    font-size: 1rem;
    line-height: 1.65;
    margin-top: 0.5rem;
    max-width: 56ch;
}
.cta-band-actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
}
@media (max-width: 780px) {
    .cta-band-inner { grid-template-columns: 1fr; }
    .cta-band-actions { justify-content: flex-start; }
}

/* ---------- Pagination: make buttons feel purposeful ---------- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--c-border);
}
.pagination-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1rem;
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    background: var(--c-bg);
    color: var(--c-ink);
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    transition: background var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
}
.pagination-link:hover {
    background: var(--c-ink);
    color: #fff;
    border-color: var(--c-ink);
    transform: translateY(-1px);
}
.pagination-disabled {
    opacity: 0.4;
    pointer-events: none;
    background: var(--c-bg-alt);
}
.pagination-info {
    color: var(--c-muted);
    font-size: 0.85rem;
    font-weight: 500;
}

/* ---------- Empty state between pagination and CTA ---------- */
.post-feed-section { padding-block: clamp(2.5rem, 5vw, 4rem); }

/* ---------- Site header: crisper focus + top bar styling even when hidden ---------- */
.site-header-top-bar { display: block; }
.top-bar-inner { max-width: var(--container-wide); }
.top-bar-item { font-weight: 500; }
.status-dot {
    width: 7px;
    height: 7px;
    background: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
    display: inline-block;
}

/* ---------- Book a Consultation: more prominent ---------- */
.btn-cta {
    padding: 0.7rem 1.2rem;
    font-size: 0.875rem;
    font-weight: 600;
    background: var(--c-accent);
    color: #fff;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.35), 0 1px 0 rgba(255,255,255,0.08) inset;
}
.btn-cta:hover {
    background: var(--c-accent-hover);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(220, 38, 38, 0.45), 0 1px 0 rgba(255,255,255,0.08) inset;
}

/* ---------- Newsletter band visual separation ---------- */
.newsletter-band {
    background: var(--c-bg);
    border-block: 1px solid var(--c-border);
}

/* ---------- Footer: tighten, add email styling ---------- */
.site-footer-offices { padding-block: 2rem; }
.office-flag {
    font-size: 1.5rem;
    line-height: 1;
    margin-bottom: 0.5rem;
    display: inline-block;
}

/* ---------- Utility: prevent any element showing as red overlay bar ---------- */
.post-card-meta::before,
.featured-post-meta::before,
.post-card-meta::after,
.featured-post-meta::after { content: none !important; }


/* ============================================================
   V3.1 CORRECTIONS — fixes discovered from live-site crawl
   ============================================================ */

/* ---------- TOC: use class instead of hidden attribute ---------- */
.toc-wrap.is-toc-empty { display: none; }

/* Safety: if JS fails and TOC remains empty, hide "On this page" */
.toc-nav:empty { display: none; }
.toc-nav:empty + .toc-heading,
.toc-wrap:has(.toc-nav:empty) { display: none; }

/* ---------- Mobile menu: explicit desktop hiding ---------- */
@media (min-width: 961px) {
    .mobile-menu,
    .mobile-menu-toggle { display: none !important; }
}
@media (max-width: 960px) {
    .mobile-menu:not([hidden]) { display: block; }
    .mobile-menu[hidden] { display: none !important; }
}

/* ---------- Archive hero compact: proper styling matching the main hero ---------- */
.archive-hero,
.archive-hero-compact {
    background: linear-gradient(180deg, var(--c-ink) 0%, var(--c-ink-800) 100%);
    color: #fff;
    padding-block: clamp(3rem, 6vw, 4.5rem);
    position: relative;
    overflow: hidden;
}
.archive-hero::before,
.archive-hero-compact::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% 0%, rgba(220, 38, 38, 0.15), transparent 70%),
        radial-gradient(ellipse 60% 40% at 80% 100%, rgba(59, 130, 246, 0.08), transparent 60%);
    pointer-events: none;
}
.archive-hero-inner { position: relative; z-index: 1; }
.archive-hero .blog-hero-eyebrow,
.archive-hero-compact .blog-hero-eyebrow {
    color: var(--c-accent);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.85rem;
}
.archive-title {
    color: #fff;
    font-size: clamp(1.8rem, 4vw, 2.75rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    margin-bottom: 0.75rem;
}
.archive-description {
    color: rgba(255,255,255,0.75);
    font-size: 1.05rem;
    line-height: 1.65;
    margin: 0;
}
.archive-meta {
    margin-top: 0.85rem;
    color: rgba(255,255,255,0.55);
    font-size: 0.85rem;
    font-weight: 500;
}

/* ---------- Eyebrow dot: force visibility ---------- */
.eyebrow-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--c-accent);
    border-radius: 50%;
    margin-right: 0.15rem;
    vertical-align: middle;
    flex-shrink: 0;
}
.blog-hero-eyebrow {
    display: inline-flex !important;
    align-items: center;
    gap: 0.5rem;
}

/* ---------- Search button in header: proper styling ---------- */
.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.9);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--r-md);
    cursor: pointer;
    transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}
.icon-btn:hover {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.2);
    color: #fff;
}
.icon-btn svg {
    width: 18px;
    height: 18px;
}

/* ---------- Share buttons: make them actually look like buttons ---------- */
.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.85rem;
    background: var(--c-bg);
    color: var(--c-ink-500);
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    cursor: pointer;
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none;
    transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
}
.share-btn:hover {
    background: var(--c-ink);
    color: #fff;
    border-color: var(--c-ink);
    transform: translateY(-1px);
}
.share-btn.is-copied {
    background: var(--c-success, #059669);
    color: #fff;
    border-color: var(--c-success, #059669);
}
.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    padding: 1rem 0;
}
.share-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--c-muted);
    margin-right: 0.25rem;
}

/* Sidebar share variant — stack buttons vertically for narrow column */
.post-full-sidebar .share-buttons {
    flex-direction: column;
    align-items: stretch;
}
.post-full-sidebar .share-btn { justify-content: flex-start; }

/* ---------- Post card author: hide if it's just "REDSECLABS" ---------- */
/* Even if Ghost author is misconfigured, limit ugly duplicated rendering */
.post-card-author span:only-child,
.featured-post-author span:only-child {
    text-transform: none;
}

/* Cap post card author initial size again with more specificity */
.post-card-author .author-initial-sm,
.featured-post-author .author-initial {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    max-width: 24px;
    max-height: 24px;
    min-width: 24px;
    border-radius: 50%;
    background: var(--c-accent);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
    overflow: hidden;
    white-space: nowrap;
    flex-shrink: 0;
}
.featured-post-author .author-initial {
    width: 26px;
    height: 26px;
    max-width: 26px;
    max-height: 26px;
    min-width: 26px;
    font-size: 0.75rem;
}

/* ---------- Footer logo consistency ---------- */
.footer-logo img {
    height: 36px;
    width: auto;
    max-width: 180px;
}

/* ---------- "Book" nav item: don't let long Amazon URLs break layout ---------- */
.nav-list .nav-item a {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---------- Breadcrumbs: proper styling on dark/light backgrounds ---------- */
.breadcrumbs ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0;
    margin: 0;
    font-size: 0.8125rem;
    color: var(--c-muted);
}
.breadcrumbs a {
    color: var(--c-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--t-fast);
}
.breadcrumbs a:hover { color: var(--c-accent); }
.breadcrumbs .breadcrumb-sep { color: var(--c-muted-light, #94a3b8); opacity: 0.6; }


/* ============================================================
   V3.2 — Author initials (JS-driven, CSS-styled)
   JS sets the initial text from data-name. CSS just sizes/colors.
   ============================================================ */

[class*="author-initial-css"] {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    background: var(--c-accent);
    color: #fff;
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
    overflow: hidden;
    border-radius: 50%;
    flex-shrink: 0;
    /* While JS hasn't yet populated, keep element visually empty */
    font-size: 0;
}

/* Once JS sets textContent, apply sized font */
.author-initial-css-sm    { width: 22px; height: 22px; min-width: 22px; }
.author-initial-css       { width: 26px; height: 26px; min-width: 26px; }
.author-initial-css-lg    { width: 44px; height: 44px; min-width: 44px; }
.author-initial-css-xl    { width: 72px; height: 72px; min-width: 72px; }

.author-initial-css-sm.has-js-initial { font-size: 0.7rem; }
.author-initial-css.has-js-initial    { font-size: 0.75rem; }
.author-initial-css-lg.has-js-initial { font-size: 1rem; }
.author-initial-css-xl.has-js-initial { font-size: 1.75rem; }

/* Avatar parent styles overridden for placeholder variants */
.byline-avatar.author-initial-css-lg,
.author-card-avatar.author-initial-css-xl,
.archive-avatar.author-initial-css-xl {
    background: var(--c-accent);
    color: #fff;
}

.archive-hero .archive-avatar.author-initial-css-xl {
    margin: 0 auto 1rem;
}

.author-name-text {
    font-weight: 500;
    color: inherit;
    text-transform: none;
    font-size: inherit;
}

