/* =============================================================================
   EmbeddedNeurons Ghost Theme — screen.css
   Design: Engineers Desk D5 — paper-blue base, ink navy, amber accent
   Fonts: Inter (body/display) + JetBrains Mono (eyebrow/code/meta)
   ============================================================================= */

/* ── Google Fonts ─────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

/* ── CSS Variables (D5 Design System) ────────────────────────────────────── */
:root {
    --paper:              #e8eef5;
    --paper-card:         #f5f8fc;
    --paper-rule:         rgba(30, 58, 95, 0.10);
    --paper-rule-strong:  rgba(30, 58, 95, 0.18);
    --ink:                #1e3a5f;
    --ink-soft:           #44546e;
    --ink-mute:           #6b7a8f;
    --ink-faint:          #94a0b3;
    --amber:              #d97706;
    --amber-hover:        #b86205;
    --amber-soft:         rgba(217, 119, 6, 0.12);
    --amber-strong:       rgba(217, 119, 6, 0.22);
    --hover-ring:         2px solid var(--amber);
    --green:              #15803d;
    --signal:             #c44536;

    --font-sans:          'Inter', system-ui, -apple-system, sans-serif;
    --font-mono:          'JetBrains Mono', 'Fira Code', monospace;

    /* Ghost custom font hooks (gscan compliance) */
    --gh-font-heading:    var(--font-sans);
    --gh-font-body:       var(--font-sans);

    --radius:             12px;
    --radius-sm:          8px;
    --radius-lg:          16px;

    --container:          1200px;
    --container-sm:       920px;

    --shadow-card:        0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 2px 8px rgba(30, 58, 95, 0.05);
    --shadow-card-hover:  0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 8px 20px rgba(30, 58, 95, 0.10);
    --shadow-amber-hover: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 8px 20px rgba(217, 119, 6, 0.12);
}

/* ── Reset & Base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    background-color: var(--paper);
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

a { color: var(--amber); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--amber-hover); }

/* Author names open About; keep their existing typography and colour at rest. */
.en-author-about { color: inherit; }
.en-author-about:hover { color: var(--amber); }
.en-author-about:focus-visible {
    outline: var(--hover-ring);
    outline-offset: 2px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-sans);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--ink);
}

code, pre { font-family: var(--font-mono); }

/* ── Layout ───────────────────────────────────────────────────────────────── */
.en-container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.en-container-sm {
    width: 100%;
    max-width: var(--container-sm);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.site-content { flex: 1; }

/* ── Navbar ───────────────────────────────────────────────────────────────── */
#en-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1.25rem 0;
    border-bottom: 1px solid transparent;
    transition: background 0.2s ease, border-color 0.2s ease, padding 0.2s ease, color 0.2s ease;
}

/* Over hero band — transparent */
#en-navbar.is-transparent {
    background: transparent;
    border-bottom-color: transparent;
}

/* After hero band — opaque paper */
#en-navbar.is-opaque {
    background: rgba(232, 238, 245, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom-color: var(--paper-rule);
    padding: 1rem 0;
}

/* Default state (pages without hero band) */
#en-navbar:not(.is-transparent):not(.is-opaque) {
    background: rgba(232, 238, 245, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom-color: var(--paper-rule);
    padding: 1rem 0;
}

.en-navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

/* Navbar uses a wider container than content sections */
#en-navbar .en-container {
    max-width: 1380px;
    padding: 0 2rem;
}

/* Logo */
.en-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.en-logo:hover { opacity: 0.85; }

.en-logo-img {
    height: 36px;
    width: auto;
    display: block;
}

.en-logo-img--footer { height: 42px; }

.en-logo span {
    font-family: var(--font-sans);
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: -0.025em;
    color: var(--ink);
    transition: color 0.2s;
}

.en-logo em {
    color: var(--amber);
    font-style: normal;
}

/* Over hero: text goes light */
#en-navbar.is-transparent .en-logo span { color: #f5f8fc; }
#en-navbar.is-transparent .en-logo em   { color: var(--amber); }

/* Desktop nav */
.en-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    list-style: none;
}

.en-nav-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--ink-soft);
    transition: color 0.2s;
    position: relative;
    white-space: nowrap;
}

.en-nav-link:hover,
.en-nav-link.is-active { color: var(--ink); }

.en-nav-link.is-active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--amber);
    border-radius: 1px;
}

/* Over hero: nav links go light */
#en-navbar.is-transparent .en-nav-link { color: rgba(245, 248, 252, 0.82); }
#en-navbar.is-transparent .en-nav-link:hover,
#en-navbar.is-transparent .en-nav-link.is-active { color: #f5f8fc; }
#en-navbar.is-transparent .en-nav-link.is-active::after { background: var(--amber); }

/* MS2L pill */
.en-nav-ms2l {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--ink-soft);
    border: 1px solid var(--paper-rule-strong);
    border-radius: var(--radius-sm);
    padding: 0.3rem 0.75rem;
    transition: color 0.2s, border-color 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.en-nav-ms2l:hover {
    color: var(--amber);
    border-color: var(--amber-soft);
}

#en-navbar.is-transparent .en-nav-ms2l {
    color: rgba(245, 248, 252, 0.75);
    border-color: rgba(245, 248, 252, 0.25);
}

#en-navbar.is-transparent .en-nav-ms2l:hover {
    color: var(--amber);
    border-color: rgba(217, 119, 6, 0.5);
}

/* Nav actions */
.en-nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
/* Search button — triggers Ghost native sodo-search overlay */
.en-nav-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--paper-card);
    border: 1px solid var(--paper-rule-strong);
    border-radius: var(--radius-sm);
    padding: 0.4rem 0.875rem 0.4rem 0.75rem;
    min-width: 210px;
    font-family: var(--font-sans);
    font-size: 0.8125rem;
    font-weight: 400;
    color: var(--ink-mute);
    cursor: pointer;
    transition: border-color 0.18s, color 0.18s, background 0.18s;
    white-space: nowrap;
    line-height: 1;
}

/* Push kbd hint to the right end of the pill */
.en-nav-search-label {
    flex: 1;
    text-align: left;
}

.en-nav-search:hover {
    border-color: var(--amber);
    color: var(--ink-soft);
}



.en-nav-search-kbd {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    background: var(--paper-rule);
    border: 1px solid var(--paper-rule-strong);
    border-radius: 4px;
    padding: 0.1rem 0.35rem;
    color: var(--ink-faint);
    letter-spacing: 0;
    margin-left: 0.125rem;
    line-height: 1.4;
}

/* Search over hero band */
#en-navbar.is-transparent .en-nav-search {
    background: rgba(245, 248, 252, 0.10);
    border-color: rgba(245, 248, 252, 0.25);
    color: rgba(245, 248, 252, 0.70);
}

#en-navbar.is-transparent .en-nav-search:hover {
    border-color: var(--amber);
    color: rgba(245, 248, 252, 0.95);
}

#en-navbar.is-transparent .en-nav-search-label {
    color: rgba(245, 248, 252, 0.82);
}

#en-navbar.is-transparent .en-nav-search-kbd {
    background: rgba(245, 248, 252, 0.08);
    border-color: rgba(245, 248, 252, 0.18);
    color: rgba(245, 248, 252, 0.40);
}

/* Burger */
#en-burger {
    display: none;
    background: none;
    border: 1px solid var(--paper-rule-strong);
    border-radius: var(--radius-sm);
    padding: 0.5rem;
    cursor: pointer;
    color: var(--ink-soft);
    line-height: 1;
}

#en-burger:hover { color: var(--ink); }

#en-navbar.is-transparent #en-burger {
    border-color: rgba(245, 248, 252, 0.3);
    color: rgba(245, 248, 252, 0.85);
}

/* Mobile menu */
#en-mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--paper);
    z-index: 99;
    flex-direction: column;
    padding: 5rem 1.5rem 2rem;
    gap: 1.5rem;
}

#en-mobile-menu.is-open { display: flex; }

.en-mobile-nav {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.en-mobile-nav a {
    font-family: var(--font-sans);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--ink);
}
/* Mobile search button */
.en-mobile-search {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--paper-card);
    border: 1px solid var(--paper-rule-strong);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 500;
    color: var(--ink-soft);
    cursor: pointer;
    width: 100%;
    text-align: left;
    transition: border-color 0.18s, color 0.18s;
}

.en-mobile-search:hover {
    border-color: var(--amber);
    color: var(--ink);
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.en-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.9375rem;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    line-height: 1;
    text-decoration: none;
}

.en-btn-primary {
    background: var(--amber);
    color: #ffffff;
    border-color: var(--amber);
}

.en-btn-primary:hover {
    background: var(--amber-hover);
    color: #ffffff;
    border-color: var(--amber-hover);
}

.en-btn-outline {
    background: transparent;
    color: var(--ink);
    border-color: var(--paper-rule-strong);
}

.en-btn-outline:hover {
    color: var(--amber);
    border-color: rgba(217, 119, 6, 0.35);
    background: var(--amber-soft);
}

.en-btn-ghost {
    background: transparent;
    color: var(--ink-soft);
    border-color: transparent;
}

.en-btn-ghost:hover { color: var(--ink); background: var(--paper-card); }

.en-btn-cta {
    background: var(--amber);
    color: #ffffff;
    border-color: transparent;
    border-radius: var(--radius-sm);
    padding: 0.75rem 1.25rem;
    font-weight: 600;
    transition: background 0.2s, transform 0.15s;
}

.en-btn-cta:hover {
    color: #ffffff;
    background: var(--amber-hover);
    transform: translateY(-1px);
}

.en-btn-cta:active { transform: translateY(0); }

/* ── Hero Band (D5 brain-radius) ──────────────────────────────────────────── */
.en-hero-band {
    margin: 0;
    border-radius: 0 0 16px 16px;
    overflow: hidden;
    position: relative;
    min-height: 420px;
    background:
        linear-gradient(90deg,
            rgba(30, 58, 95, 0.96) 0%,
            rgba(30, 58, 95, 0.88) 18%,
            rgba(30, 58, 95, 0.55) 28%,
            rgba(30, 58, 95, 0.18) 40%,
            rgba(30, 58, 95, 0.00) 52%),
        url('../images/brain-circuit-toned.png') right -1rem center / auto 115% no-repeat,
        #1e3a5f;
    display: flex;
    align-items: stretch;
    padding-top: 6rem; /* compensate fixed navbar */
}

.en-hero-band-inner {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 3rem 1.5rem 3.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

/* Eyebrow */
.en-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    color: rgba(245, 248, 252, 0.80);
    margin-bottom: 1.5rem;
}

.en-hero-eyebrow .en-pulse-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 0 rgba(21, 128, 61, 0.4);
    animation: en-pulse-ring 2.4s ease-out infinite;
    flex-shrink: 0;
}

@keyframes en-pulse-ring {
    0%   { box-shadow: 0 0 0 0 rgba(21, 128, 61, 0.45); }
    70%  { box-shadow: 0 0 0 8px rgba(21, 128, 61, 0); }
    100% { box-shadow: 0 0 0 0 rgba(21, 128, 61, 0); }
}

/* Hero H1 */
.en-hero-intro h1,
.en-hero-h1 {
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: clamp(2.25rem, 4.4vw, 3.25rem);
    line-height: 1.08;
    letter-spacing: -0.035em;
    color: #f5f8fc;
    margin: 0 0 1.25rem;
    max-width: min(56%, 640px);
}

.en-hero-intro h1 .accent,
.en-hero-h1 .accent { color: var(--amber); }

/* Hero lede */
.en-hero-lede {
    font-size: 1.0625rem;
    line-height: 1.55;
    color: rgba(245, 248, 252, 0.78);
    max-width: 50ch;
    margin: 0;
    font-weight: 400;
}

/* Hero subscribe form (in the band) */
.en-hero-subscribe {
    display: flex;
    gap: 0.75rem;
    margin-top: 2rem;
    max-width: 560px;
    background: transparent;
    border: none;
    border-radius: 0;
    overflow: visible;
    transition: border-color 0.2s;
}

.en-hero-subscribe:focus-within {
    border-color: rgba(245, 248, 252, 0.40);
}

.en-hero-subscribe input[type="email"] {
    flex: 1 1 0;
    min-width: 0;
    padding: 0.75rem 1.25rem;
    font-size: 0.9375rem;
    font-family: var(--font-sans);
    background: rgba(245, 248, 252, 0.10);
    border: 1px solid rgba(245, 248, 252, 0.20);
    border-radius: var(--radius-sm);
    outline: none;
    color: #f5f8fc;
    transition: border-color 0.2s;
}

.en-hero-subscribe input[type="email"]:focus { border-color: var(--amber); }
.en-hero-subscribe input[type="email"]::placeholder { color: rgba(245, 248, 252, 0.50); }

.en-hero-subscribe button {
    padding: 0.75rem 1.25rem;
    margin: 0;
    background: var(--amber);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: var(--font-sans);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

.en-hero-subscribe button:hover { background: var(--amber-hover); }

.en-hero-subscribe-success { color: #86efac; font-size: 0.875rem; margin-top: 0.5rem; }
.en-hero-subscribe-error   { color: #fca5a5; font-size: 0.875rem; margin-top: 0.5rem; }

/* Trust line */
.en-hero-trust,
.en-why-trust {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: rgba(245, 248, 252, 0.55);
    margin-top: 0.75rem;
}

/* ── Section label (amber rule + text) ────────────────────────────────────── */
.en-section-label {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--amber);
    margin: 0 0 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.en-section-label::before {
    content: '';
    width: 24px;
    height: 2px;
    background: var(--amber);
    flex-shrink: 0;
}

/* ── Core Topics (papier + glyphe mono) ───────────────────────────────────── */
.en-topics-section {
    padding: 3rem 0 2rem;
}

.en-topics-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1.125rem;
}

.en-topic-card {
    display: flex;
    flex-direction: column;
    padding: 1.75rem 1.5rem 1.5rem;
    background: var(--paper-card);
    border: 1px solid var(--paper-rule);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--ink);
    gap: 0.625rem;
    box-shadow: var(--shadow-card);
    transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
    position: relative;
}

.en-topic-card:hover,
.en-topic-card:focus-within {
    transform: translateY(-2px);
    border-color: var(--amber);
    box-shadow: var(--shadow-amber-hover), 0 0 0 1px var(--amber);
}

.en-topic-link {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.625rem;
    color: inherit;
    text-decoration: none;
}

.en-topic-link:focus-visible {
    outline: 2px solid var(--amber);
    outline-offset: 4px;
    border-radius: 2px;
}

.en-topic-glyph {
    font-family: var(--font-mono);
    font-size: 1.75rem;
    color: var(--amber);
    line-height: 1;
    margin-bottom: 0.375rem;
}

.en-topic-card h3 {
    font-size: 1.0625rem;
    font-weight: 600;
    margin: 0;
    color: var(--ink);
    letter-spacing: -0.01em;
    line-height: 1.25;
}

.en-topic-card p {
    font-size: 0.8125rem;
    color: var(--ink-mute);
    margin: 0;
    line-height: 1.5;
}

.en-topic-count {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    color: var(--ink-faint);
    margin-top: auto;
    padding-top: 0.5rem;
    transition: color 0.2s;
}

.en-topic-card:hover .en-topic-count,
.en-topic-card:focus-within .en-topic-count { color: var(--amber); }

/* ── Published Ghost co-tags, ordered alphabetically ── */
.en-topic-subtags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 0.375rem;
}

.en-topic-subtags:empty {
    display: none;
}

.en-topic-subtag {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 500;
    color: var(--ink-mute);
    background: rgba(30, 58, 95, 0.06);
    border-radius: 3px;
    padding: 0.125rem 0.3125rem;
    line-height: 1.5;
    letter-spacing: 0.02em;
    white-space: nowrap;
}


/* ── Featured band (inside Latest Articles section) ──────────────────────── */
.en-featured-band {
    background: var(--ink);
    border-radius: var(--radius-lg);
    padding: 3.25rem 3rem;
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 3rem;
    align-items: center;
    box-shadow: 0 12px 40px rgba(30, 58, 95, 0.20);
    position: relative;
    overflow: hidden;
}

.en-featured-band::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -5%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(217, 119, 6, 0.08) 0%, transparent 60%);
    pointer-events: none;
}

.en-featured-band > * { position: relative; z-index: 1; }

.en-featured-cat {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--amber);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.en-featured-cat .star {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--amber);
    box-shadow: 0 0 0 3px var(--amber-soft);
    flex-shrink: 0;
}

.en-featured-band h2 {
    font-weight: 600;
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    line-height: 1.15;
    letter-spacing: -0.025em;
    margin: 0 0 1rem;
    color: #f5f8fc;
    text-wrap: pretty; /* EN-28 candidate-2 */
}

.en-featured-band p {
    font-size: 1rem;
    line-height: 1.6;
    color: rgba(245, 248, 252, 0.72);
    margin: 0 0 1.5rem;
    max-width: 50ch;
}

.en-featured-meta {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: rgba(245, 248, 252, 0.55);
    display: flex;
    gap: 0.875rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.en-featured-figure {
    background: rgba(245, 248, 252, 0.04);
    border: 1px solid rgba(245, 248, 252, 0.10);
    border-radius: var(--radius-sm);
    aspect-ratio: 4/3;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.en-featured-figure img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* EN-29 — hide Latest section when all N=3 recent posts are featured (no cards rendered) */
#latest-guides:not(:has(.en-post-card)) {
    display: none;
}
/* ── Post Card Grid (D5 paper + amber hover) ──────────────────────────────── */
.en-section {
    padding: 2rem 0 4rem;
}

/* Alternating section — light paper-card bg to visually separate */
.en-section--alt {
    background: var(--paper-card);
    border-top: 1px solid var(--paper-rule);
    border-bottom: 1px solid var(--paper-rule);
    padding: 3rem 0;
}

/* 3-col forced grid for the 3 latest cards block */
.en-post-grid--3 {
    grid-template-columns: repeat(3, 1fr);
    margin-top: 2rem;
}

.en-section-title {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--amber);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.en-section-title::before {
    content: '';
    width: 24px;
    height: 2px;
    background: var(--amber);
    flex-shrink: 0;
}

.en-post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

/* Base card */
.en-post-card {
    display: flex;
    flex-direction: column;
    background: var(--paper-card);
    border: 1px solid var(--paper-rule);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    position: relative;
    text-decoration: none;
    color: inherit;
}

.en-post-card:hover,
.en-post-card:focus-visible {
    transform: translateY(-2px);
    border-color: var(--amber);
    box-shadow: var(--shadow-amber-hover), 0 0 0 1px var(--amber);
    outline: none;
}

.en-post-card:hover .en-post-card-title,
.en-post-card:focus-visible .en-post-card-title { color: var(--amber); }

/* Card image */
.en-post-card-image {
    display: block;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #d8e0eb;
}

.en-post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.en-post-card:hover .en-post-card-image img { transform: scale(1.04); }

/* Card body */
.en-post-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 1.25rem 1.375rem 1.375rem;
}

/* Tags */
.en-post-card-tags {
    display: flex;
    gap: 0.4375rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.en-tag-badge {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--amber);
    letter-spacing: 0.02em;
    padding: 0.25rem 0.625rem;
    background: var(--amber-soft);
    border: 1px solid transparent;
    border-radius: 999px;
    transition: background 0.15s, border-color 0.15s;
}

.en-tag-badge:hover {
    background: var(--amber-strong);
    border-color: rgba(217, 119, 6, 0.30);
}

/* ── EN-30: topic badge palette — approved six colours ──────────────────── */
/* Scoped default: blue ink for non-topic tags inside .en-post-card-tags.   */
/* Specificity 0,2,0 — overrides global .en-tag-badge (0,1,0).             */
/* Global .en-tag-badge (amber) untouched — lock icon in post-card-meta OK. */
.en-post-card-tags .en-tag-badge {
    color: #1e3a5f;
    background: #e8f1fb;
    border-color: #a9c4e1;
    transition: background 0.15s, border-color 0.15s, filter 0.15s;
}
/* Five topic overrides via slug BEM modifier — specificity 0,2,0.          */
/* Palette approved 2026-10-02. Article B (two topics) handled naturally:   */
/* each badge carries its own slug, each gets its own color.                */
.en-post-card-tags .en-tag-badge--embedded    { color: #754000; background: #fff0dc; border-color: #d9ac70; }
.en-post-card-tags .en-tag-badge--systems     { color: #0d5c53; background: #e5f6f2; border-color: #9acabb; }
.en-post-card-tags .en-tag-badge--engineering-tools { color: #5f417a; background: #f3eefd; border-color: #c4aedb; }
.en-post-card-tags .en-tag-badge--edge-ai     { color: #8a4034; background: #fff0ea; border-color: #dfb0a2; }
.en-post-card-tags .en-tag-badge--fundamentals{ color: #57611f; background: #f4f5e2; border-color: #bec88b; }
/* The shared orange hover ring supplies feedback without tinting its colour.
   Approved topic colours remain unchanged when not hovered. */
.en-post-card-tags .en-tag-badge:hover        { filter: none; }

/* Title */
.en-post-card-title {
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 1.0625rem;
    line-height: 1.3;
    letter-spacing: -0.015em;
    color: var(--ink);
    margin: 0 0 0.625rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
    text-wrap: pretty;
}

/* Excerpt */
.en-post-card-excerpt {
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--ink-soft);
    margin: 0 0 1.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

/* Standard archive excerpts retain the same two-line format as Latest. */
.en-post-grid--archive .en-post-card-excerpt {
    flex: 0 0 auto; /* Keep the two-line clamp when a neighbouring card is taller. */
}

/* Meta */
.en-post-card-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--ink-mute);
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid var(--paper-rule);
}

.en-post-card-meta img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    background: #d8e0eb;
    flex-shrink: 0;
}

.en-post-card-meta-author {
    color: var(--ink);
    font-weight: 500;
    font-size: 0.8125rem;
}

.en-post-card-meta-sep { color: var(--ink-faint); }

.en-post-card-meta-date,
.en-post-card-meta-read {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    color: var(--ink-mute);
    letter-spacing: 0.02em;
}

.en-post-card-meta-read { margin-left: auto; }

/* Featured card (horizontal, full width) */
.en-post-card.en-post-card-featured {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 0;
    align-items: stretch;
    grid-column: 1 / -1;
}

.en-post-card.en-post-card-featured .en-post-card-image {
    aspect-ratio: auto;
    min-height: 300px;
}

.en-post-card.en-post-card-featured .en-post-card-body {
    padding: 2.25rem 2.5rem;
    justify-content: center;
}

.en-post-card.en-post-card-featured .en-post-card-title {
    font-size: 1.625rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
    -webkit-line-clamp: 3;
    margin-bottom: 0.875rem;
}

.en-post-card.en-post-card-featured .en-post-card-excerpt {
    font-size: 0.9375rem;
    -webkit-line-clamp: 4;
    margin-bottom: 1.5rem;
}

.en-post-card-featured-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--amber);
    text-transform: uppercase;
    letter-spacing: 0.16em;
    margin-bottom: 1rem;
}

.en-post-card-featured-pill-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--amber);
    box-shadow: 0 0 0 3px var(--amber-soft);
    flex-shrink: 0;
}

/* ── Featured Articles section (EN-29): no height clamp — body always visible ── */
/* Removed: height:242px + overflow:hidden on card + overflow:hidden on body.
   Bug chain: card 242px → img 92px (min-height:unset by section-alt) → body 148px
   → padding 56px → content 92px → pill(38)+tags(38)=76px → 16px for title+excerpt+meta
   → flex-shrinks title+excerpt to 0px on ≤900px. Confirmed by Puppeteer EN-29 baseline.

   Founder review 2026-10-06: use the Fundamentals archive image format.
   Inherit the shared Featured image sizing/fitting instead of a home-only cap
   and contain rule. Keep the compact body and the no-clipping fix below. */
.en-section--alt .en-post-card.en-post-card-featured {
    /* height:242px removed — was clipping title/excerpt/meta on ≤900px layouts */
    min-height: 220px; /* safety floor on desktop */
}

.en-section--alt .en-post-card.en-post-card-featured .en-post-card-body {
    padding: 1.75rem 2rem;
    /* overflow:hidden removed — was compounding the 242px clip */
}

.en-section--alt .en-post-card.en-post-card-featured .en-post-card-title {
    font-size: 1.3rem;
    margin-bottom: 0.7rem;
}

.en-section--alt .en-post-card.en-post-card-featured .en-post-card-excerpt {
    font-size: 0.75rem;
    margin-bottom: 1.25rem;
    /* -webkit-line-clamp:2 from base adds trailing … — no bare mid-sentence cutoff */
}

/* ── Tag filter bar ────────────────────────────────────────────────────────── */
#browse {
    scroll-margin-top: 96px;
}

.en-tag-bar {
    display: flex;
    align-items: center;
    gap: 0;
    flex-wrap: wrap;
    padding: 0;
    border-bottom: 1px solid var(--paper-rule);
    margin-bottom: 2rem;
    scroll-margin-top: 96px;
}

.en-tag-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: 0;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: var(--font-sans);
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--ink-mute);
    transition: color 0.2s, border-color 0.2s;
    margin-bottom: -1px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    background: transparent;
}

.en-tag-pill:hover {
    color: var(--ink);
    border-bottom-color: var(--paper-rule-strong);
}

.en-tag-pill.is-active {
    color: var(--amber);
    border-bottom-color: var(--amber);
}

/* ── Why Follow Us (D5 navy, before footer) ───────────────────────────────── */
.en-why-section {
    position: relative;
    padding: 5rem 0 4.5rem;
    background: var(--ink);
    overflow: hidden;
}

.en-why-section::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -5%;
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, rgba(217, 119, 6, 0.08) 0%, transparent 60%);
    pointer-events: none;
}

.en-why-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 4rem;
    max-width: 960px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.en-why-text {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.en-why-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--amber);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.en-why-label::before {
    content: '';
    width: 18px;
    height: 1px;
    background: var(--amber);
}

.en-why-title {
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    color: #f5f8fc;
    margin: 0;
}

.en-why-desc {
    font-size: 1rem;
    color: rgba(245, 248, 252, 0.70);
    line-height: 1.65;
    max-width: 480px;
    margin: 0;
}

/* Why subscribe form */
.en-why-subscribe-form {
    display: flex;
    flex-direction: row;
    gap: 0.625rem;
    margin-top: 2rem;
    align-items: center;
    flex-wrap: wrap;
}

.en-why-email {
    flex: 1 1 200px;
    min-width: 0;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-family: var(--font-sans);
    background: rgba(245, 248, 252, 0.08);
    border: 1px solid rgba(245, 248, 252, 0.18);
    border-radius: var(--radius-sm);
    outline: none;
    color: #f5f8fc;
    transition: border-color 0.2s;
}

.en-why-email:focus { border-color: var(--amber); }
.en-why-email::placeholder { color: rgba(245, 248, 252, 0.40); }

.en-why-submit { flex: 0 0 auto; }

.en-why-trust {
    width: 100%;
    margin: 0;
}

.en-why-form-success,
.en-why-form-error {
    flex: 1 0 100%;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.en-why-form-success { color: #86efac; }
.en-why-form-error   { color: #fca5a5; }

/* Why section chips (D5 navy background) */
.en-why-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.en-why-chip {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(245, 248, 252, 0.60);
    border: 1px solid rgba(245, 248, 252, 0.15);
    border-radius: var(--radius-sm);
    padding: 0.3rem 0.625rem;
}

@media (max-width: 600px) {
    .en-why-subscribe-form { flex-direction: column; align-items: stretch; }
    .en-why-email { width: 100%; flex: 1 1 auto; }
    .en-why-submit { width: 100%; }
}

/* Terminal component */
.en-terminal {
    background: #0d1b2e;
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.25), 0 2px 8px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.en-terminal-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #081524;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.en-terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.en-terminal-dot--red    { background: #ff5f57; }
.en-terminal-dot--yellow { background: #ffbd2e; }
.en-terminal-dot--green  { background: #28c840; }

.en-terminal-filename {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: rgba(245, 248, 252, 0.35);
    margin-left: 0.5rem;
}

.en-terminal-body {
    padding: 1.5rem 1.75rem;
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    line-height: 1.8;
}

.en-terminal-body p { margin: 0; }

.en-t-key     { color: var(--amber); }
.en-t-op      { color: #e8eef5; }
.en-t-str     { color: #86efac; }
.en-t-comment { color: rgba(245, 248, 252, 0.35); font-style: italic; }
.en-t-line    { margin: 0; white-space: nowrap; }
.en-t-prompt  { color: var(--amber); margin-right: 0.5rem; user-select: none; }
.en-t-type    { color: #e8eef5; }
.en-t-cursor  {
    display: inline-block;
    width: 7px;
    height: 0.9em;
    background: #e8eef5;
    vertical-align: text-bottom;
    margin-left: 1px;
    animation: en-blink 1s step-end infinite;
}

@keyframes en-blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

.en-t-out   { margin: 0; color: rgba(245, 248, 252, 0.50); }
.en-t-ok    { color: #86efac; }
.en-t-check { margin-right: 0.4rem; }

/* ── Footer (D5 navy, amber accents) ─────────────────────────────────────── */
.en-footer {
    --ftr-bg:          #1e3a5f;
    --ftr-border:      rgba(245, 248, 252, 0.10);
    --ftr-border-soft: rgba(245, 248, 252, 0.06);
    --ftr-text:        #f5f8fc;
    --ftr-muted:       rgba(245, 248, 252, 0.60);
    --ftr-subtle:      rgba(245, 248, 252, 0.35);
    --ftr-primary:     var(--amber);
    --ftr-status:      #4ade80;

    background: var(--ink);
    color: var(--ftr-text);
    font-family: var(--font-sans);
    padding: 5rem 0 1.5rem;
    border-top: none;
    -webkit-font-smoothing: antialiased;
}

.en-footer a { color: inherit; text-decoration: none; }

.en-footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 0.9fr;
    gap: 3.5rem;
    margin-bottom: 3.5rem;
    align-items: start;
}

.en-footer-brand-wrap { display: flex; flex-direction: column; }

.en-footer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 1.375rem;
    letter-spacing: -0.025em;
    color: var(--ftr-text);
    margin-bottom: 1rem;
    text-decoration: none;
}

.en-footer-logo-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.en-footer-brand em { font-style: normal; color: var(--amber); font-weight: 600; }

.en-footer-tagline {
    font-size: 0.9375rem;
    color: var(--ftr-muted);
    max-width: 38ch;
    margin-bottom: 1.5rem;
    line-height: 1.65;
}

.en-footer-col h4 {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--amber);
    margin: 0 0 1.25rem;
}

.en-footer-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.en-footer-col ul a {
    font-size: 0.9375rem;
    color: var(--ftr-muted);
    transition: color 0.2s;
}

.en-footer-col ul a:hover { color: var(--ftr-text); }

.en-footer-social { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.25rem; }

.en-footer-social a {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--ftr-muted);
    background: rgba(245, 248, 252, 0.04);
    border: 1px solid var(--ftr-border);
    border-radius: var(--radius-sm);
    transition: color 0.2s, background 0.2s, border-color 0.2s, transform 0.2s;
}

.en-footer-social a:hover {
    color: var(--ftr-text);
    background: rgba(245, 248, 252, 0.08);
    border-color: rgba(245, 248, 252, 0.20);
    transform: translateY(-1px);
}

.en-footer-subscribe {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-direction: column;
}

.en-footer-subscribe input {
    background: rgba(245, 248, 252, 0.06);
    border: 1px solid var(--ftr-border);
    border-radius: var(--radius-sm);
    color: var(--ftr-text);
    font-size: 0.875rem;
    font-family: var(--font-sans);
    padding: 0.5rem 0.75rem;
    outline: none;
    width: 100%;
    transition: border-color 0.2s;
}

.en-footer-subscribe input::placeholder { color: var(--ftr-subtle); }
.en-footer-subscribe input:focus { border-color: var(--amber); }

.en-footer-subscribe button {
    background: var(--amber);
    border: none;
    border-radius: var(--radius-sm);
    color: #ffffff;
    cursor: pointer;
    font-size: 0.875rem;
    font-family: var(--font-sans);
    font-weight: 600;
    padding: 0.5rem 1rem;
    transition: background 0.2s;
}

.en-footer-subscribe button:hover { background: var(--amber-hover); }

.en-footer-subscribe-success,
.en-footer-subscribe-error { font-size: 0.8125rem; margin-top: 0.25rem; }

.en-footer-subscribe-success { color: #86efac; }
.en-footer-subscribe-error   { color: #fca5a5; }

.en-footer-bottom {
    border-top: 1px solid var(--ftr-border-soft);
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.8125rem;
    color: var(--ftr-subtle);
}

.en-footer-bottom-right { display: inline-flex; align-items: center; gap: 1.25rem; }

.en-footer-copy { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.02em; }

.en-footer-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--ftr-muted);
}

.en-footer-pulse {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--ftr-status);
    box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.15);
    flex-shrink: 0;
}

.en-footer-ghost { font-size: 0.8125rem; color: var(--ftr-muted); }
.en-footer-ghost a { color: var(--ftr-muted); transition: color 0.2s; }
.en-footer-ghost a:hover { color: var(--ftr-text); }

/* ── Article page (D5 paper card + TOC + share) ───────────────────────────── */

/* Progress bar */
.en-progress-bar {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--paper-rule);
    z-index: 90;
}

.en-progress-bar-fill {
    height: 100%;
    background: var(--amber);
    width: 0%;
    transition: width 0.1s linear;
}

/* Article layout */
.en-post-layout {
    background: var(--paper);
    padding: 0 1.5rem 3rem;
    padding-top: 80px; /* navbar clearance */
}

/* Feature image: full-bleed, overlaps card */
.en-post-feature-image {
    max-width: min(1040px, 80vh);  /* EN-22 fix: figure scales with vh; 80vh×9/16=45vh height at 1080p */
    margin: 0 auto 0;  /* EN-22: was -120px, removed overlap that hid bottom labels */
    position: relative;
    z-index: 1;
}

.en-post-feature-image img {
    width: 100%;
    aspect-ratio: 16/9;  /* EN-22: was 21/9 — native ratio of feature images */
    object-fit: cover;
    /* max-height: see EN-22 media query below — capped at 50vh under 1440px */
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    display: block;
}

.en-post-feature-image::after {
    /* EN-22: gradient disabled — was masking bottom labels/scenes (1956/1997/2022) */
    content: none;
}

/* Article card */
.en-article-wrap {
    max-width: calc(1040px + 2 * (220px + 48px));
    margin: 0 auto;
    position: relative;
}

.en-post-card-article {
    max-width: 1040px;
    margin: 0 auto;
    background: var(--paper-card);
    border: 1px solid var(--paper-rule);
    border-radius: var(--radius-lg);
    padding: 4rem 5rem;
    position: relative;
    z-index: 2;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 12px 40px rgba(30, 58, 95, 0.08);
}

/* Article header */
.en-post-header {
    padding-top: 5rem; /* clear the fixed navbar on post pages */
    margin-bottom: 2.5rem;
}

/* D5 card layout: la carte gere l'espacement; on neutralise le padding-top
   du fix navbar (5rem) lorsque le header est a l'interieur de la carte */
.en-post-card-article .en-post-header {
    padding-top: 0;
}

/* D5 deck: custom_excerpt affiche comme sous-titre sous le H1 */
.en-post-deck {
    font-size: 1.125rem;
    line-height: 1.65;
    color: var(--ink-soft);
    margin: -0.5rem 0 1.75rem;
    max-width: 68ch;
}

.en-post-header-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.en-post-eyebrow {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--amber);
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.en-post-eyebrow::before {
    content: '';
    width: 24px;
    height: 1px;
    background: var(--amber);
}

.en-post-header h1 {
    font-size: clamp(2rem, 4vw, 2.625rem);
    font-weight: 600;
    margin-bottom: 1.5rem;
    letter-spacing: -0.04em;
    line-height: 1.1;
    color: var(--ink);
    text-wrap: pretty; /* EN-28 candidate-2 */
}

.en-post-header-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8125rem;
    color: var(--ink-mute);
    flex-wrap: wrap;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--paper-rule);
}

.en-post-header-meta img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--paper-rule-strong);
}

.en-post-header-meta-author { font-weight: 600; color: var(--ink); }

.en-post-header-meta-date,
.en-post-header-meta-read {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    color: var(--ink-mute);
    letter-spacing: 0.03em;
}

.en-post-header-meta-sep { color: var(--ink-faint); }

/* Article body prose */
.en-post-content {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--ink-soft);
    max-width: 75ch;
    margin-left: auto;
    margin-right: auto;
}

.en-post-content p { margin-bottom: 1.5rem; }

.en-post-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--ink);
    margin: 2.5rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--paper-rule);
    letter-spacing: -0.02em;
}

.en-post-content h3 {
    font-size: 1.1875rem;
    font-weight: 600;
    color: var(--ink);
    margin: 2rem 0 0.75rem;
    letter-spacing: -0.015em;
}

.en-post-content h4 {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--amber);
    margin: 1.5rem 0 0.5rem;
}

.en-post-content :is(h2,h3,h4)[id] { scroll-margin-top: 96px; }

.en-post-content a {
    color: var(--amber);
    text-decoration: underline;
    text-underline-offset: 3px;
    overflow-wrap: anywhere; /* Long source URLs must not widen mobile articles. */
}

.en-post-content a:hover { color: var(--amber-hover); }

.en-post-content ul,
.en-post-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.en-post-content li { margin-bottom: 0.4rem; }

/* Blockquote */
.en-post-content blockquote {
    border-left: 3px solid var(--amber);
    padding: 0.75rem 1.5rem;
    background: var(--amber-soft);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--ink-soft);
}

.en-post-content blockquote p { margin-bottom: 0; }

.en-post-content hr {
    border: none;
    border-top: 1px solid var(--paper-rule);
    margin: 2.5rem 0;
}

.en-post-content img {
    border-radius: var(--radius-sm);
    border: 1px solid var(--paper-rule);
    max-width: 100%;
}

/* Tables */
.en-post-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.en-post-content th,
.en-post-content td {
    padding: 0.625rem 1rem;
    border: 1px solid var(--paper-rule);
    text-align: left;
}

.en-post-content th {
    background: var(--paper);
    font-family: var(--font-sans);
    font-weight: 600;
    color: var(--ink);
}

.en-post-content tr:nth-child(even) td { background: var(--paper); }

/* Inline code */
.en-post-content code:not(pre code) {
    background: var(--amber-soft);
    color: var(--amber);
    padding: 0.15em 0.45em;
    border-radius: 4px;
    font-size: 0.875em;
    border: 1px solid rgba(217, 119, 6, 0.20);
}

/* Code blocks */
.en-post-content pre {
    background: var(--ink) !important;
    border: none !important;
    border-radius: var(--radius-sm) !important;
    padding: 0 !important;
    overflow: hidden;
    margin-bottom: 1.5rem;
    position: relative;
}

.en-post-content pre.en-code-block-wrap { padding: 0 !important; }

.en-code-block-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.625rem 1.25rem;
    background: #142944;
    border-bottom: 1px solid rgba(245, 248, 252, 0.06);
}

.en-code-block-lang {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    color: rgba(245, 248, 252, 0.50);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.en-code-copy-btn {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--amber);
    background: transparent;
    border: 1px solid rgba(217, 119, 6, 0.30);
    border-radius: 4px;
    padding: 0.2rem 0.625rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.en-code-copy-btn:hover { background: var(--amber-soft); }

.en-post-content pre code {
    display: block;
    background: none !important;
    color: #e8eef5 !important;
    padding: 1.25rem 1.5rem !important;
    border: none !important;
    font-size: 0.875rem;
    line-height: 1.7;
    overflow-x: auto;
}

/* Ghost callout cards */
.kg-callout-card {
    display: flex;
    gap: 1rem;
    padding: 1.125rem 1.25rem;
    background: var(--paper);
    border: 1px solid var(--paper-rule);
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
}

.kg-callout-emoji { font-size: 1.375rem; flex-shrink: 0; line-height: 1.5; }
.kg-callout-text { flex: 1; font-size: 0.9375rem; color: var(--ink-soft); line-height: 1.6; }

/* Callout variants via emoji-based background */
.kg-callout-card[data-callout-type="note"]    { background: rgba(30, 58, 95, 0.05); border-color: rgba(30, 58, 95, 0.15); }
.kg-callout-card[data-callout-type="warning"] { background: var(--amber-soft); border-color: rgba(217, 119, 6, 0.25); }
.kg-callout-card[data-callout-type="tip"]     { background: rgba(21, 128, 61, 0.06); border-color: rgba(21, 128, 61, 0.20); }

/* TOC (left panel, absolute positioned relative to wrapper centre) */
.en-toc-panel {
    position: absolute;
    left: calc(50% - 748px);
    top: 0;
    height: 100%;
    width: 220px;
    transform: none;
    padding-right: 32px;
}

.en-toc-sticky {
    position: sticky;
    top: 6rem;
}

.en-toc-label {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-mute);
    margin-bottom: 0.875rem;
}

.en-toc-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.en-toc-item a {
    font-size: 0.8125rem;
    color: var(--ink-mute);
    line-height: 1.4;
    text-decoration: none;
    display: block;
    padding: 0.125rem 0.5rem;
    border-left: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s;
}

.en-toc-item a:hover,
.en-toc-item.is-active a {
    color: var(--amber);
    border-left-color: var(--amber);
}

/* Share rail (right panel, absolute positioned relative to wrapper centre) */
.en-share-panel {
    position: absolute;
    left: calc(50% + 528px);
    right: auto;
    top: 0;
    width: 60px;
    transform: none;
    padding-left: 24px;
}

.en-share-sticky {
    position: sticky;
    top: 6rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.en-share-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--paper-card);
    border: 1px solid var(--paper-rule);
    color: var(--ink-mute);
    cursor: pointer;
    transition: background 0.18s, border-color 0.18s, color 0.18s, transform 0.18s;
    text-decoration: none;
}

.en-share-btn:hover {
    background: var(--amber-soft);
    border-color: rgba(217, 119, 6, 0.30);
    color: var(--amber);
    transform: none;
}


/* EN-24 — Share rail étendu (9 boutons + inline ≤1599px + mobile ≤640px) ── */

/* Fix sticky: .en-share-panel manquait height:100% (présent dans TOC, absent Share) */
.en-share-panel {
    height: 100%;
}

/* Rail étendu — réduction gap pour loger 9 boutons confortablement */

/* Séparateur horizontal entre les deux groupes du rail */
.en-share-divider {
    width: 24px;
    height: 1px;
    background: var(--paper-rule-strong);
    margin: 0.3rem auto;
    border: none;
    flex-shrink: 0;
}

/* max-height + scroll pour petites hauteurs : scroller interne permet au tooltip de sortir */
.en-share-sticky {
    overflow: visible;
}
.en-share-sticky-scroller {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    max-height: calc(100vh - 7rem);
    overflow-y: auto;
    scrollbar-width: none;
}
.en-share-sticky-scroller::-webkit-scrollbar { display: none; }

/* Wrapper bouton (tooltip au survol + focus) */
.en-share-btn-wrap {
    position: relative;
    flex-shrink: 0;
}

.en-share-btn-wrap::after {
    content: attr(data-label);
    position: absolute;
    right: calc(100% + 10px);
    left: auto;
    top: 50%;
    transform: translateY(-50%);
    background: var(--ink);
    color: #f5f8fc;
    font-size: 0.625rem;
    font-family: var(--font-mono);
    letter-spacing: 0.04em;
    white-space: nowrap;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.14s;
    z-index: 20;
}

.en-share-btn-wrap:hover::after,
.en-share-btn-wrap:focus-within::after {
    opacity: 1;
}

/* Focus visible sur les boutons du rail */
.en-share-btn:focus-visible {
    outline: 2px solid var(--amber);
    outline-offset: 2px;
}

/* Barre inline — affichée entre 641px et 1599px, insérée sous la byline */
.en-share-inline {
    display: none;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding-top: 1rem;
    margin-top: 0.875rem;
    border-top: 1px solid var(--paper-rule);
}

.en-share-inline-label {
    font-family: var(--font-mono);
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--ink-mute);
    margin-right: 0.25rem;
    flex-shrink: 0;
}

.en-share-inline .en-share-btn {
    width: 34px;
    height: 34px;
}

.en-share-inline .en-share-divider {
    width: 1px;
    height: 20px;
    margin: 0 0.1rem;
}

/* Barre mobile — Copier + Partager… (≤640px) */
.en-share-mobile {
    display: none;
    gap: 0.75rem;
    padding: 0.875rem 0;
    border-top: 1px solid var(--paper-rule);
    margin-top: 0.75rem;
}

.en-share-mobile-btn {
    flex: 1;
    height: 44px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--paper-card);
    border: 1px solid var(--paper-rule-strong);
    color: var(--ink-soft);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    font-family: var(--font-sans);
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.en-share-mobile-btn:hover {
    background: var(--amber-soft);
    color: var(--amber);
    border-color: rgba(217, 119, 6, 0.30);
}

.en-share-mobile-btn:focus-visible {
    outline: 2px solid var(--amber);
    outline-offset: 2px;
}

/* Breakpoints EN-24 */
@media (min-width: 641px) and (max-width: 1599px) {
    .en-share-inline { display: flex; }
}

@media (max-width: 640px) {
    .en-share-inline { display: none; }
    .en-share-mobile { display: flex; }
}

/* Toast notification (copie réussie) */
.en-share-toast {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%) translateY(12px);
    background: var(--ink);
    color: #f5f8fc;
    font-size: 0.8125rem;
    font-family: var(--font-mono);
    letter-spacing: 0.03em;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s, transform 0.18s;
    z-index: 999;
    white-space: nowrap;
}

.en-share-toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Message preview pour aperçu non publié */
.en-share-preview-notice {
    font-family: var(--font-mono);
    font-size: 0.625rem;
    font-weight: 500;
    color: var(--ink-mute);
    text-align: center;
    padding: 0.25rem 0.25rem 0;
    letter-spacing: 0.03em;
    line-height: 1.4;
}

/* Author block */
.en-post-author {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 1.5rem;
    align-items: start;
    margin-top: 3rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--paper-rule);
}

.en-post-author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--paper-rule-strong);
}

.en-post-author-label {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--amber);
    margin-bottom: 0.375rem;
}

.en-post-author-name {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 0.375rem;
}

.en-post-author-bio {
    font-size: 0.875rem;
    color: var(--ink-soft);
    line-height: 1.6;
}

/* Related articles */
.en-post-related {
    /* .en-container supplies the same width and gutters as the homepage grids. */
    margin: 0 auto;
}

/* Hide TOC/Share below 1600px:
   Rails are positioned via calc(50% +/- offset) relative to wrapper centre.
   Minimum viewport: 2 * 748px = 1496px for TOC left-edge >= 0;
   1600px adds ~104px safety margin for scrollbars and sub-pixel rendering.
   EN-23: replaces old left:-8px/translateX(-100%) that overflowed at 1680px.
   Kept as min-width threshold: visible >=1600px, hidden otherwise. */
@media (max-width: 1599px) {
    .en-toc-panel, .en-share-panel { display: none; }
    .en-post-card-article { padding: 2.5rem 2rem; }
}

@media (max-width: 640px) {
    /* Reduce outer horizontal padding so the card is nearly full-width on small phones */
    .en-post-layout { padding-left: 12px; padding-right: 12px; }
    .en-post-card-article { padding: 1.75rem 1.25rem; }
    .en-post-feature-image { margin-bottom: 0; }  /* EN-22: was -60px */
    .en-post-feature-image img { aspect-ratio: 16/9; max-height: none; }
    .en-post-author { grid-template-columns: 60px 1fr; gap: 1rem; }
    .en-post-author-avatar { width: 60px; height: 60px; }
}

/* ── Members paywall CTA ──────────────────────────────────────────────────── */
.en-member-cta {
    margin: 3rem 0;
    padding: 2.5rem;
    background: var(--ink);
    border-radius: var(--radius-lg);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.en-member-cta::before {
    content: '';
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 400px;
    height: 200px;
    background: radial-gradient(circle, var(--amber-soft) 0%, transparent 70%);
    pointer-events: none;
}

.en-member-cta-icon {
    width: 48px;
    height: 48px;
    background: var(--amber-soft);
    border: 1px solid rgba(217, 119, 6, 0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.25rem;
    position: relative;
    z-index: 1;
}

.en-member-cta h3 {
    font-size: 1.375rem;
    margin-bottom: 0.75rem;
    color: #f5f8fc;
    position: relative;
    z-index: 1;
}

.en-member-cta p {
    color: rgba(245, 248, 252, 0.70);
    margin-bottom: 1.5rem;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 1;
}

.en-member-cta-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

/* ── Tag page hero ────────────────────────────────────────────────────────── */
.en-tag-hero {
    padding: 7rem 0 3rem;
    text-align: center;
    position: relative;
}

.en-tag-hero-name {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--amber);
    margin-bottom: 0.75rem;
}

.en-tag-hero h1 { font-size: clamp(2rem, 5vw, 3.25rem); margin-bottom: 1rem; }
.en-tag-hero p  {
    color: var(--ink-soft);
    max-width: 520px;
    margin: 0 auto;
    text-wrap: balance;
}

.en-tag-hero--fundamentals p {
    max-width: 720px;
}

.en-empty-topic {
    text-align: center;
    padding: 3rem 1.5rem;
    background: var(--paper-card);
    border: 1px solid var(--paper-rule);
    border-radius: var(--radius);
}

.en-empty-topic h2 { font-size: 1.25rem; margin-bottom: 0.75rem; }
.en-empty-topic p { color: var(--ink-soft); margin-bottom: 1.5rem; }

/* ── Author page ──────────────────────────────────────────────────────────── */
.en-author-hero {
    padding: 7rem 0 3rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.en-author-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--paper-rule-strong);
    flex-shrink: 0;
}

.en-author-info h1 { font-size: 2rem; margin-bottom: 0.5rem; }
.en-author-bio     { color: var(--ink-soft); max-width: 600px; }

/* ── Post footer ──────────────────────────────────────────────────────────── */
.en-post-footer {
    padding: 3rem 0 4rem;
    border-top: 1px solid var(--paper-rule);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.en-post-footer-tags { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.en-post-share { display: flex; align-items: center; gap: 0.75rem; }

/* ── Pagination ───────────────────────────────────────────────────────────── */
.en-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 2rem 0 4rem;
    color: var(--ink-mute);
    font-size: 0.875rem;
}

/* ── GDPR Banner ─────────────────────────────────────────────────────────── */
#en-gdpr-banner {
    display: none;
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 3rem);
    max-width: 680px;
    background: var(--paper-card);
    border: 1px solid var(--paper-rule);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    z-index: 200;
    box-shadow: 0 8px 32px rgba(30, 58, 95, 0.12);
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.en-gdpr-text {
    flex: 1;
    font-size: 0.875rem;
    color: var(--ink-soft);
    min-width: 240px;
}

.en-gdpr-text a {
    color: var(--amber);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.en-gdpr-actions { display: flex; gap: 0.75rem; flex-shrink: 0; }

/* ── Error page ───────────────────────────────────────────────────────────── */
.en-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 70vh;
    padding: 6rem 1.5rem;
}

.en-error-code {
    font-family: var(--font-mono);
    font-size: 6rem;
    font-weight: 700;
    line-height: 1;
    color: var(--paper-rule-strong);
    margin-bottom: 1rem;
}

.en-error h1 { font-size: 2rem; margin-bottom: 1rem; }
.en-error p  { color: var(--ink-soft); margin-bottom: 2rem; }

/* ── Page (about, contact, etc.) ──────────────────────────────────────────── */
.en-page-header {
    padding: 7rem 0 2rem;
}

.en-page-header h1 { font-size: clamp(2rem, 4vw, 2.75rem); margin-bottom: 0.75rem; }
.en-page-header p  { color: var(--ink-soft); font-size: 1.125rem; }

/* ── Static page band (About, Contact) — shallow ink header — BLOG-6 2026-07-22 */
.en-page-band {
    background: var(--ink);
    padding: 7rem 0 3.5rem;
}

.en-page-band-eyebrow {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--amber);
    margin: 0 0 1rem;
}

.en-page-band-title {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 600;
    color: #f5f8fc;
    letter-spacing: -0.02em;
    margin: 0;
    line-height: 1.15;
}

.en-page-body {
    padding: 3rem 0 6rem;
}

/* 2-column grid modifier: pillar cards inside narrow column (About page) */
.en-topics-grid--2col {
    grid-template-columns: repeat(2, 1fr);
}

/* Contact email card — centered, mono address, amber border */
.en-contact-email-card {
    background: var(--paper-card);
    border: 1px solid rgba(217, 119, 6, 0.20);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    margin: 1.5rem 0;
}

.en-contact-email-card a {
    font-family: var(--font-mono);
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: var(--ink);
    font-weight: 600;
    letter-spacing: -0.01em;
    text-decoration: none;
}

.en-contact-email-card a:hover { color: var(--amber); }

/* Contact section — BLOG-9 2026-07-28 (Tally embed replaces mailto shell) */
.en-contact-form-card {
    background: var(--paper-card);
    border: 1px solid rgba(30, 58, 95, 0.10);
    border-radius: var(--radius-lg);
    padding: clamp(1.5rem, 4vw, 2.5rem);
    margin: 0 0 2rem;
    box-shadow: var(--shadow-card);
}

.en-contact-form-eyebrow {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--amber);
    margin: 0 0 0.75rem;
}

.en-contact-form-card h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: var(--ink);
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin: 0 0 0.75rem;
}

.en-contact-form-intro {
    color: var(--ink-soft);
    line-height: 1.65;
    margin: 0 0 1.5rem;
    max-width: 620px;
}

/* Tally embed wrapper — BLOG-9 2026-07-28 */
.en-tally-embed {
    margin: 0 0 1rem;
    min-height: 299px;
}

.en-tally-embed iframe {
    display: block;
    width: 100%;
    border: none;
}


.en-contact-form-privacy {
    font-size: 0.8125rem;
    color: var(--ink-mute);
    line-height: 1.5;
    margin: 1rem 0 0;
}

.en-contact-fallback {
    font-size: 0.8125rem;
    color: var(--ink-mute);
    line-height: 1.5;
    margin: 0.5rem 0 0;
}

.en-contact-fallback a {
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--ink-soft);
    text-decoration: none;
}

.en-contact-fallback a:hover { color: var(--amber); }

/* ── About identity section (BLOG-7 2026-07-23) ─────────────────────────────── */
.en-identity-section {
    background: var(--paper-card);
    border-top: 1px solid rgba(30, 58, 95, 0.08);
    border-bottom: 1px solid var(--paper-rule);
    padding: 3.75rem 0;  /* BLOG-10 v2 */
}

.en-identity-eyebrow {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--amber);
    margin: 0 0 1rem;
}

.en-identity-inner {
    display: flex;
    align-items: flex-start;
    gap: 2rem;  /* BLOG-10 v2 */
}

.en-identity-photo {
    width: 112px;  /* BLOG-10 v2 */
    height: 112px;  /* BLOG-10 v2 */
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--paper-rule-strong);
    flex-shrink: 0;
}

.en-identity-photo-fallback {
    width: 112px;  /* BLOG-10 v2 */
    height: 112px;  /* BLOG-10 v2 */
    border-radius: 50%;
    background: var(--ink);
    color: #f5f8fc;
    font-family: var(--font-mono);
    font-size: 1.125rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 2px solid rgba(30, 58, 95, 0.20);
    letter-spacing: 0.02em;
}

.en-identity-text {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    gap: 0.375rem;
}

.en-identity-name {
    font-size: 1.625rem;  /* BLOG-10 v2 */
    font-weight: 600;
    margin: 0;
    color: var(--ink);
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.en-identity-bio {
    font-size: 1.0625rem;  /* BLOG-10 v2 */
    color: var(--ink-soft);
    line-height: 1.6;
    margin: 0.625rem 0 0;
    max-width: 720px;
    display: grid;
    gap: 0.75rem;
    text-wrap: pretty;
}

.en-identity-bio p { margin: 0; }

.en-identity-location {
    font-size: 0.875rem;
    color: var(--ink-soft);
    margin: 0;
}


/* ── Pulse dot utility ────────────────────────────────────────────────────── */
.en-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    position: relative;
    flex-shrink: 0;
}

.en-pulse::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: var(--green);
    opacity: 0.5;
    animation: en-pulse-outer 2s ease-out infinite;
}

@keyframes en-pulse-outer {
    0%   { transform: scale(0.8); opacity: 0.5; }
    70%  { transform: scale(2);   opacity: 0; }
    100% { transform: scale(2);   opacity: 0; }
}

/* ── Utilities ────────────────────────────────────────────────────────────── */
.u-text-primary  { color: var(--amber); }
.u-text-muted    { color: var(--ink-soft); }
.u-font-mono     { font-family: var(--font-mono); }
.u-hidden        { display: none !important; }

/* ── Ghost Card classes (required by gscan) ───────────────────────────────── */
.kg-width-wide {
    margin-left: calc(50% - min(50vw - 1.5rem, 680px));
    margin-right: calc(50% - min(50vw - 1.5rem, 680px));
    max-width: none;
}

.kg-width-full {
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    max-width: 100vw;
    border-radius: 0;
}

.kg-image-card { margin-bottom: 1.5rem; }

.kg-image-card img {
    border-radius: var(--radius-sm);
    border: 1px solid var(--paper-rule);
}

.kg-gallery-card { margin-bottom: 1.5rem; }
.kg-gallery-container { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.kg-gallery-row { display: flex; gap: 0.5rem; width: 100%; }
.kg-gallery-image { flex: 1; overflow: hidden; }
.kg-gallery-image img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-sm); }

.kg-video-card { margin-bottom: 1.5rem; }
.kg-video-card video { width: 100%; border-radius: var(--radius-sm); }

.kg-audio-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--paper-card);
    border: 1px solid var(--paper-rule);
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
}

.kg-embed-card { margin-bottom: 1.5rem; }
.kg-embed-card iframe { width: 100%; border-radius: var(--radius-sm); }

.kg-bookmark-card {
    display: flex;
    border: 1px solid var(--paper-rule);
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: 1.5rem;
    transition: border-color 0.2s;
}

.kg-bookmark-card:hover { border-color: var(--amber-soft); }
.kg-bookmark-container { display: flex; width: 100%; }
.kg-bookmark-content { padding: 1rem 1.25rem; flex: 1; }
.kg-bookmark-title { font-weight: 600; margin-bottom: 0.25rem; color: var(--ink); }
.kg-bookmark-description { font-size: 0.875rem; color: var(--ink-soft); margin-bottom: 0.5rem; }
.kg-bookmark-metadata { display: flex; align-items: center; gap: 0.5rem; font-size: 0.75rem; color: var(--ink-mute); }
.kg-bookmark-thumbnail { width: 160px; flex-shrink: 0; }
.kg-bookmark-thumbnail img { width: 100%; height: 100%; object-fit: cover; }

.kg-toggle-card {
    border: 1px solid var(--paper-rule);
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.kg-toggle-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    cursor: pointer;
    background: var(--paper-card);
    font-weight: 600;
    color: var(--ink);
}

.kg-toggle-content {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--paper-rule);
}

.kg-product-card {
    border: 1px solid var(--paper-rule);
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.kg-product-card-container { padding: 1.5rem; }
.kg-product-card-title { font-size: 1.25rem; font-weight: 600; margin-bottom: 0.5rem; color: var(--ink); }
.kg-product-card-rating { display: flex; gap: 0.25rem; margin-bottom: 0.75rem; }
.kg-product-card-rating-active { color: var(--amber); }
.kg-product-card-description { color: var(--ink-soft); margin-bottom: 1rem; }
.kg-product-card-button {
    display: inline-flex;
    padding: 0.5rem 1.25rem;
    background: var(--amber);
    color: #ffffff;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.875rem;
}

.kg-header-card {
    padding: 4rem 2rem;
    text-align: center;
    background: var(--paper-card);
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
}

.kg-header-card h2 { font-size: 2rem; margin-bottom: 1rem; color: var(--ink); }

.kg-button-card { text-align: center; margin-bottom: 1.5rem; }

.kg-btn {
    display: inline-flex;
    padding: 0.625rem 1.5rem;
    background: var(--amber);
    color: #ffffff;
    border-radius: var(--radius-sm);
    font-weight: 600;
}

/* ── Shared hover ring: same 2px stroke as article border + outer 1px ring. ── */
/* An outline straddles the edge by 1px, so no border/padding change moves content.
   Text links, underlined tabs and disabled controls keep their existing behaviour.
   Keyboard focus indicators remain distinct; touch-only devices avoid sticky hover. */
@media (hover: hover) {
    :is(.en-post-card, .en-topic-card, .en-btn, .en-nav-search, .en-mobile-search,
        .en-nav-ms2l, .en-tag-badge, .en-footer-social a, .en-share-btn,
        .en-share-mobile-btn, .en-code-copy-btn, .en-hero-subscribe button,
        .en-footer-subscribe button, .en-hero-subscribe input[type="email"],
        .en-why-email, .en-footer-subscribe input, .kg-bookmark-card,
        .kg-product-card-button, .kg-btn):not(:disabled):not([aria-disabled="true"]):hover,
    #en-burger:hover {
        outline: var(--hover-ring);
        outline-offset: -1px;
    }
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
/* EN-22 fix (supersedes max-height approach): the old @media (max-width:1440px) never
   triggered at 1920px width (1920 > 1440). Fix: min(1040px,80vh) on the *figure* width
   scales the image proportionally — no additional object-fit:cover crop, cropY stays 0.
   1920×1080: min(1040,864)=864px → 864×9/16=486px (45.0 vh) ✓
   2560×1440: min(1040,1152)=1040px → 585px (40.6 vh) ✓
   3840×2160: min(1040,1728)=1040px → 585px (27.1 vh) ✓
   Source ratio 1.721 < frame 1.778 → only cropX≈0.032 (unchanged). */
@media (max-width: 1440px) {
    /* Superseded by min(1040px,80vh) on figure — kept for object-position on 1024-1440 range */
    .en-post-feature-image img {
        object-position: center top; /* preserve top of image on intermediate widths */
    }
}

@media (max-width: 1024px) {
    .en-featured-band { gap: 2rem; }
}

/* Five topics: three above two centered cards, never a lone fifth card. */
@media (min-width: 700px) and (max-width: 1149px) {
    .en-topics-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .en-topics-grid > .en-topic-card { grid-column: span 2; }
    .en-topics-grid > .en-topic-card:nth-child(4) { grid-column: 2 / span 2; }
    .en-topics-grid > .en-topic-card:nth-child(5) { grid-column: 4 / span 2; }
}

@media (max-width: 900px) {
    .en-nav, .en-nav-actions { display: none; }
    #en-burger { display: flex; }
    .en-post-grid { grid-template-columns: repeat(2, 1fr); }
    .en-post-card.en-post-card-featured { grid-template-columns: 1fr; }
    .en-post-card.en-post-card-featured .en-post-card-image { min-height: 220px; }
    .en-post-card.en-post-card-featured .en-post-card-body { padding: 1.75rem; }
    .en-featured-band { grid-template-columns: 1fr; }
    .en-featured-figure { display: none; }
    .en-footer-grid { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
    .en-footer-grid > *:first-child { grid-column: 1 / -1; }
    .en-why-inner { grid-template-columns: 1fr; gap: 2.5rem; }
}

@media (max-width: 699px) {
    .en-topics-grid { grid-template-columns: 1fr; }
    .en-topics-grid { gap: 0.75rem; }
    .en-topic-card { padding: 1rem 1.125rem; gap: 0.375rem; }
    .en-topic-link { gap: 0.375rem; }
    .en-topic-glyph { margin-bottom: 0; }
    .en-topic-count { padding-top: 0.25rem; }
    /* Keep published co-tags available to assistive tech without enlarging mobile cards. */
    .en-topic-subtags {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        clip-path: inset(50%);
        white-space: nowrap;
        border: 0;
    }
}

@media (max-width: 600px) {
    .en-post-grid { grid-template-columns: 1fr; }
    .en-footer-grid { grid-template-columns: 1fr; gap: 2rem; }
    .en-footer-bottom { flex-direction: column; align-items: flex-start; }
    .en-footer-bottom-right { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
    .en-author-hero { flex-direction: column; }
    #en-gdpr-banner { bottom: 0; left: 0; right: 0; width: 100%; transform: none; border-radius: 0; }
    .en-hero-band { min-height: 360px; border-radius: 0 0 12px 12px; }
    .en-hero-intro h1, .en-hero-h1 { max-width: 100%; font-size: 2rem; }
    .en-hero-subscribe { flex-direction: column; gap: 0.5rem; background: transparent; border: none; border-radius: 0; overflow: visible; }
    .en-hero-subscribe input[type="email"] { width: 100%; min-width: 0; background: rgba(245, 248, 252, 0.10); border: 1px solid rgba(245, 248, 252, 0.20); border-radius: var(--radius-sm); }
    .en-hero-subscribe input[type="email"]:focus { border-color: var(--amber); }
    .en-hero-subscribe button { width: 100%; margin: 0; padding: 0.75rem 1.25rem; }
    .en-guide-banner-inner { flex-direction: column; align-items: center; text-align: center; }
    .en-page-band { padding: 6rem 0 2.5rem; }
    .en-topics-grid--2col { grid-template-columns: 1fr; }
    .en-identity-inner { flex-direction: column; align-items: flex-start; gap: 1rem; }
    .en-identity-photo, .en-identity-photo-fallback { width: 88px; height: 88px; }  /* BLOG-10 v2 mobile cap */
}


/* ── Hero band responsive ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .en-hero-band {
        background:
            linear-gradient(180deg, rgba(30, 58, 95, 0.98) 0%, rgba(30, 58, 95, 0.88) 100%),
            url('../images/brain-circuit-toned.png') right -20px center / auto 90% no-repeat,
            #1e3a5f;
    }

    .en-hero-intro h1, .en-hero-h1 {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .en-hero-band {
        background: #1e3a5f;
        border-radius: 0 0 12px 12px;
    }
}
