/* ============================================================
   MENTORAX GHOST THEME — screen.css
   Matches mentorax.io design system exactly
   ============================================================ */

/* ---------- Variables ---------- */
:root {
    --dark:        #111827;
    --cream:       #F8F6F2;
    --gold:        #C9973A;
    --gold-dark:   #A87D2E;
    --gold-faint:  rgba(201, 151, 58, 0.15);
    --text:        #1f2937;
    --text-muted:  #6b7280;
    --white:       #ffffff;
    --card-bg:     #ffffff;
    --border:      rgba(0, 0, 0, 0.08);
    --max-w:       1200px;
    --post-w:      720px;
    --radius:      6px;
}

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

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

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text);
    background: var(--cream);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

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

a {
    color: var(--gold);
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover {
    color: var(--gold-dark);
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5 {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-weight: 700;
    line-height: 1.2;
    color: var(--dark);
}

/* ---------- Utility: Buttons ---------- */
.btn-primary {
    display: inline-block;
    background: var(--gold);
    color: var(--dark);
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 14px 28px;
    border-radius: var(--radius);
    letter-spacing: 0.01em;
    transition: background 0.2s ease, transform 0.15s ease;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary:hover {
    background: var(--gold-dark);
    color: var(--dark);
    text-decoration: none;
    transform: translateY(-1px);
}

.btn-secondary {
    display: inline-block;
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.35);
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 14px 28px;
    border-radius: var(--radius);
    transition: border-color 0.2s ease, color 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
}

.btn-secondary:hover {
    border-color: var(--gold);
    color: var(--gold);
    text-decoration: none;
}


/* ==========================================================
   HEADER
   ========================================================== */

.site-header {
    background: var(--dark);
    border-bottom: 1px solid rgba(201, 151, 58, 0.2);
    position: sticky;
    top: 0;
    z-index: 200;
}

.header-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    gap: 0;
}

/* Logo */
.site-logo {
    display: flex;
    align-items: baseline;
    gap: 0;
    text-decoration: none;
    flex-shrink: 0;
    margin-right: auto;
}

.site-logo:hover {
    text-decoration: none;
}

.logo-mentora {
    font-family: 'Playfair Display', serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--white);
    line-height: 1;
}

.logo-x {
    font-family: 'Playfair Display', serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--gold);
    line-height: 1;
}

.logo-sub {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.7rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.35);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-left: 8px;
    align-self: center;
}

/* Nav */
.site-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.site-nav a {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.15s ease;
}

.site-nav a:hover {
    color: var(--white);
    text-decoration: none;
}

.site-nav .nav-back {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8rem;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    padding-right: 20px;
    margin-right: 4px;
}

.site-nav .nav-back:hover {
    color: var(--gold);
}

.site-nav .nav-newsletter {
    color: rgba(201, 151, 58, 0.8);
}

.site-nav .nav-newsletter:hover {
    color: var(--gold);
}

.site-nav .nav-book {
    color: rgba(255, 255, 255, 0.6);
}

.site-nav .nav-cta {
    background: var(--gold);
    color: var(--dark) !important;
    font-weight: 700;
    padding: 8px 18px;
    border-radius: var(--radius);
    font-size: 0.85rem;
    transition: background 0.15s ease;
}

.site-nav .nav-cta:hover {
    background: var(--gold-dark);
    color: var(--dark) !important;
    text-decoration: none;
}

/* Hamburger */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    margin-left: 16px;
}

.hamburger {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle.open .hamburger:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open .hamburger:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.nav-toggle.open .hamburger:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}


/* ==========================================================
   HERO SECTION
   ========================================================== */

.hero-section {
    background: var(--dark);
    padding: 88px 24px 104px;
    position: relative;
    overflow: hidden;
}

/* Subtle background texture */
.hero-section::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(201, 151, 58, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.hero-inner {
    max-width: 780px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-eyebrow {
    display: inline-block;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gold);
    border: 1px solid rgba(201, 151, 58, 0.3);
    padding: 6px 16px;
    border-radius: 2px;
    margin-bottom: 24px;
}

.hero-inner h1 {
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    color: var(--white);
    line-height: 1.15;
    margin-bottom: 20px;
}

.hero-inner > p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.6);
    max-width: 560px;
    margin: 0 auto 36px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

.hero-social-proof {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.82rem;
}

.hero-social-proof a {
    color: rgba(255, 255, 255, 0.45);
    text-decoration: none;
    font-style: italic;
}

.hero-social-proof a:hover {
    color: var(--gold);
}

.hero-sep {
    opacity: 0.3;
}


/* ==========================================================
   POSTS SECTION (Homepage & Archives)
   ========================================================== */

.posts-section {
    background: var(--cream);
    padding: 72px 24px 88px;
}

.posts-inner {
    max-width: var(--max-w);
    margin: 0 auto;
}

.posts-heading {
    font-size: 1.25rem;
    color: var(--dark);
    margin-bottom: 40px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--gold);
    display: inline-block;
}


/* ==========================================================
   POST GRID
   ========================================================== */

.post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.post-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid var(--border);
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.1);
}

.post-card-image-link {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--dark);
}

.post-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.post-card-content {
    padding: 22px 24px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-card-tag {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 10px;
    display: block;
}

.post-card-title {
    font-size: 1.15rem;
    line-height: 1.3;
    margin-bottom: 10px;
    flex-shrink: 0;
}

.post-card-title a {
    color: var(--dark);
    text-decoration: none;
    transition: color 0.15s ease;
}

.post-card-title a:hover {
    color: var(--gold);
}

.post-card-excerpt {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.65;
    flex: 1;
    margin-bottom: 18px;
}

.post-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.post-card-meta-sep {
    opacity: 0.4;
}


/* ==========================================================
   PAGINATION
   ========================================================== */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 60px;
    flex-wrap: wrap;
}

.pagination-link {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 9px 20px;
    border: 1px solid var(--gold);
    color: var(--gold);
    border-radius: var(--radius);
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.pagination-link:hover {
    background: var(--gold);
    color: var(--dark);
    text-decoration: none;
}

.pagination-link--disabled {
    border-color: var(--border);
    color: var(--text-muted);
    opacity: 0.5;
    cursor: default;
}

.pagination-link--disabled:hover {
    background: none;
    color: var(--text-muted);
}

.pagination-info {
    font-size: 0.82rem;
    color: var(--text-muted);
}


/* ==========================================================
   NEWSLETTER CTA (End-of-post + Homepage)
   ========================================================== */

.newsletter-cta {
    background: var(--dark);
    padding: 80px 24px;
    position: relative;
    overflow: hidden;
}

.newsletter-cta::before {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(201, 151, 58, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.newsletter-inner {
    max-width: 560px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
}

.newsletter-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gold);
    border: 1px solid rgba(201, 151, 58, 0.3);
    padding: 5px 14px;
    border-radius: 2px;
    margin-bottom: 20px;
}

.newsletter-inner h3 {
    font-size: clamp(1.5rem, 3vw, 2.1rem);
    color: var(--white);
    line-height: 1.2;
    margin-bottom: 14px;
}

.newsletter-inner > p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 28px;
}

.newsletter-form {
    width: 100%;
}

.newsletter-fields {
    display: flex;
    gap: 10px;
    max-width: 460px;
    margin: 0 auto 10px;
}

.newsletter-fields input[type="email"] {
    flex: 1;
    padding: 13px 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius);
    color: var(--white);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.newsletter-fields input[type="email"]::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.newsletter-fields input[type="email"]:focus {
    border-color: var(--gold);
}

.newsletter-fields button {
    background: var(--gold);
    color: var(--dark);
    border: none;
    padding: 13px 22px;
    border-radius: var(--radius);
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease;
    position: relative;
    min-width: 140px;
}

.newsletter-fields button:hover {
    background: var(--gold-dark);
}

/* Ghost form states */
.newsletter-fields button .state-loading,
.newsletter-fields button .state-success {
    display: none;
}

.newsletter-form.loading .state-default { display: none; }
.newsletter-form.loading .state-loading { display: inline; }

.newsletter-form.success .state-default { display: none; }
.newsletter-form.success .state-success { display: inline; }
.newsletter-form.success input { opacity: 0.5; pointer-events: none; }

.newsletter-note {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.77rem;
    margin: 0;
}

.newsletter-error {
    color: #ff6b6b;
    font-size: 0.85rem;
    margin-top: 8px;
    min-height: 1em;
}

/* Inline CTA (injected mid-post) */
.newsletter-cta.inline-cta {
    border-radius: var(--radius);
    padding: 48px 36px;
    margin: 48px 0;
}

.newsletter-cta.inline-cta .newsletter-inner {
    max-width: 100%;
}

.newsletter-cta.inline-cta h3 {
    font-size: 1.4rem;
    color: #ffffff !important;
}

.newsletter-cta.inline-cta p,
.newsletter-cta.inline-cta .newsletter-badge {
    color: rgba(255, 255, 255, 0.7) !important;
}

.newsletter-cta.inline-cta > p {
    font-size: 0.95rem;
    margin-bottom: 20px;
}


/* ==========================================================
   SINGLE POST
   ========================================================== */

/* Header */
.post-header {
    background: var(--dark);
    padding: 72px 24px 60px;
    border-bottom: 1px solid rgba(201, 151, 58, 0.15);
}

.post-header-inner {
    max-width: var(--post-w);
    margin: 0 auto;
}

.post-tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border: 1px solid rgba(201, 151, 58, 0.35);
    padding: 4px 12px;
    border-radius: 2px;
    margin-bottom: 18px;
    text-decoration: none;
    transition: background 0.15s ease;
}

.post-tag:hover {
    background: var(--gold-faint);
    color: var(--gold);
}

.post-title {
    font-size: clamp(1.8rem, 4.5vw, 2.9rem);
    color: var(--white);
    line-height: 1.15;
    margin-bottom: 20px;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
}

.post-meta-sep {
    opacity: 0.4;
}

/* Feature Image */
.post-feature-image {
    margin: 0;
    max-height: 520px;
    overflow: hidden;
    background: var(--dark);
}

.post-feature-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.post-feature-image figcaption {
    background: var(--dark);
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.82rem;
    text-align: center;
    padding: 10px 24px;
}

/* Content Wrapper */
.post-content-wrapper {
    background: var(--cream);
    padding: 0 24px 72px;
}

.post-content {
    max-width: var(--post-w);
    margin: 0 auto;
    padding-top: 56px;
}

/* Ghost Content Styles */
.gh-content > * + * { margin-top: 1.5em; }

.gh-content h2 {
    font-size: 1.75rem;
    margin-top: 2.2em;
    margin-bottom: 0.4em;
    color: var(--dark);
    padding-top: 0.2em;
}

.gh-content h3 {
    font-size: 1.35rem;
    margin-top: 1.8em;
    margin-bottom: 0.3em;
    color: var(--dark);
}

.gh-content h4 {
    font-size: 1.1rem;
    margin-top: 1.5em;
    margin-bottom: 0.3em;
    color: var(--dark);
}

.gh-content p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text);
    margin-bottom: 0;
}

.gh-content a {
    color: var(--gold);
    text-decoration: underline;
    text-decoration-color: rgba(201, 151, 58, 0.4);
    text-underline-offset: 3px;
    transition: color 0.15s, text-decoration-color 0.15s;
}

.gh-content a:hover {
    color: var(--gold-dark);
    text-decoration-color: var(--gold-dark);
}

.gh-content ul,
.gh-content ol {
    padding-left: 1.6em;
}

.gh-content li {
    font-size: 1.05rem;
    line-height: 1.75;
    margin-bottom: 0.35em;
    color: var(--text);
}

.gh-content blockquote {
    border-left: 3px solid var(--gold);
    padding: 4px 0 4px 28px;
    margin: 2.2em 0;
    color: var(--text-muted);
    font-style: italic;
    font-size: 1.1rem;
    line-height: 1.7;
}

.gh-content blockquote p {
    font-size: inherit;
}

.gh-content pre {
    background: var(--dark);
    color: rgba(255, 255, 255, 0.88);
    padding: 22px 26px;
    border-radius: var(--radius);
    overflow-x: auto;
    font-size: 0.9rem;
    line-height: 1.6;
}

.gh-content code {
    background: rgba(17, 24, 39, 0.08);
    color: var(--dark);
    padding: 2px 7px;
    border-radius: 3px;
    font-size: 0.88em;
    font-family: 'Fira Code', 'Courier New', monospace;
}

.gh-content pre code {
    background: none;
    color: inherit;
    padding: 0;
    font-size: inherit;
}

.gh-content hr {
    border: none;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    margin: 3em 0;
}

.gh-content img {
    border-radius: var(--radius);
    margin: 2em auto;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
}

.gh-content figure {
    margin: 2.5em 0;
}

.gh-content figcaption {
    text-align: center;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 10px;
    font-style: italic;
}

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

.gh-content th,
.gh-content td {
    border: 1px solid var(--border);
    padding: 10px 14px;
    text-align: left;
}

.gh-content th {
    background: var(--dark);
    color: var(--white);
    font-weight: 600;
}

.gh-content tr:nth-child(even) td {
    background: rgba(0, 0, 0, 0.02);
}

/* Inline CTA wrapper (injected by JS) */
.post-inline-cta {
    max-width: var(--post-w);
    margin: 0 auto;
}


/* ==========================================================
   AUTHOR BIO
   ========================================================== */

.author-bio {
    max-width: var(--post-w);
    margin: 56px auto 0;
    padding: 28px 32px;
    background: var(--white);
    border-radius: var(--radius);
    border-left: 3px solid var(--gold);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.author-bio-avatar {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid var(--gold);
}

.author-bio-avatar--placeholder {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: var(--dark);
    color: var(--gold);
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 2px solid var(--gold);
}

.author-bio-content {
    flex: 1;
}

.author-bio-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    display: block;
    margin-bottom: 4px;
}

.author-bio-name {
    font-size: 1.05rem;
    color: var(--dark);
    margin-bottom: 8px;
    font-family: 'Playfair Display', serif;
}

.author-bio-text {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.65;
    margin-bottom: 12px;
}

.author-bio-links {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.author-bio-links a {
    font-size: 0.83rem;
    color: var(--gold);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid rgba(201, 151, 58, 0.3);
    padding-bottom: 1px;
    transition: border-color 0.15s;
}

.author-bio-links a:hover {
    border-color: var(--gold);
}


/* ==========================================================
   POST SHARE
   ========================================================== */

.post-share {
    max-width: var(--post-w);
    margin: 28px auto 0;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    padding: 20px 0;
    border-top: 1px solid var(--border);
}

.post-share-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.post-share-link {
    font-size: 0.82rem;
    font-weight: 600;
    padding: 7px 16px;
    border-radius: var(--radius);
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    border: 1px solid var(--border);
    color: var(--text-muted);
}

.post-share-link:hover {
    border-color: var(--gold);
    color: var(--gold);
    text-decoration: none;
}


/* ==========================================================
   FOOTER
   ========================================================== */

.site-footer {
    background: var(--dark);
    border-top: 1px solid rgba(201, 151, 58, 0.15);
    padding: 64px 24px 0;
}

.footer-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 56px;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-logo {
    display: inline-flex;
    align-items: baseline;
    text-decoration: none;
    margin-bottom: 14px;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.875rem;
    line-height: 1.6;
    max-width: 260px;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.footer-col h4 {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.3);
    margin-bottom: 14px;
}

.footer-col a {
    display: block;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.875rem;
    text-decoration: none;
    margin-bottom: 8px;
    transition: color 0.15s;
}

.footer-col a:hover {
    color: var(--gold);
}

.footer-legal {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 20px 0 28px;
    text-align: center;
    color: rgba(255, 255, 255, 0.2);
    font-size: 0.78rem;
    line-height: 1.6;
}


/* ==========================================================
   ARCHIVE PAGES (Tag / Author)
   ========================================================== */

.archive-header {
    background: var(--dark);
    padding: 72px 24px 64px;
    text-align: center;
}

.archive-header-inner {
    max-width: 600px;
    margin: 0 auto;
}

.archive-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 20px;
    border: 3px solid var(--gold);
}

.archive-cover {
    width: 56px;
    height: 56px;
    border-radius: var(--radius);
    object-fit: cover;
    margin: 0 auto 16px;
}

.archive-title {
    font-size: 2rem;
    color: var(--white);
    margin-bottom: 12px;
}

.archive-description {
    color: rgba(255, 255, 255, 0.55);
    font-size: 1rem;
    line-height: 1.7;
    max-width: 480px;
    margin: 0 auto 12px;
}

.archive-meta {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.82rem;
}

.archive-author-links {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 16px;
}

.archive-author-links a {
    font-size: 0.85rem;
    color: var(--gold);
    font-weight: 500;
}


/* ==========================================================
   ERROR PAGE
   ========================================================== */

.error-page {
    background: var(--dark);
    min-height: 65vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 24px;
}

.error-inner {
    max-width: 480px;
}

.error-code {
    font-family: 'Playfair Display', serif;
    font-size: 7rem;
    font-weight: 700;
    color: var(--gold);
    line-height: 1;
    margin-bottom: 12px;
    opacity: 0.7;
}

.error-title {
    font-size: 1.5rem;
    color: var(--white);
    margin-bottom: 14px;
}

.error-message {
    color: rgba(255, 255, 255, 0.5);
    font-size: 1rem;
    margin-bottom: 32px;
    line-height: 1.6;
}


/* ==========================================================
   RESPONSIVE
   ========================================================== */

@media (max-width: 1024px) {
    .post-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    /* Header / nav */
    .site-nav {
        display: none;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--dark);
        padding: 16px 24px 20px;
        border-top: 1px solid rgba(255, 255, 255, 0.06);
        border-bottom: 1px solid rgba(201, 151, 58, 0.2);
        z-index: 199;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    }

    .site-nav.open {
        display: flex;
    }

    .site-nav a {
        padding: 10px 0;
        font-size: 0.95rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        width: 100%;
    }

    .site-nav a:last-child {
        border-bottom: none;
    }

    .site-nav .nav-back {
        border-right: none;
        padding-right: 0;
        margin-right: 0;
    }

    .site-nav .nav-cta {
        margin-top: 8px;
        text-align: center;
        padding: 11px 18px;
    }

    .nav-toggle {
        display: flex;
        margin-left: auto;
    }

    .header-inner {
        position: relative;
    }

    /* Hero */
    .hero-section {
        padding: 60px 24px 72px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-primary,
    .btn-secondary {
        text-align: center;
    }

    /* Posts */
    .post-grid {
        grid-template-columns: 1fr;
    }

    /* Newsletter */
    .newsletter-fields {
        flex-direction: column;
    }

    .newsletter-fields button {
        width: 100%;
    }

    .newsletter-cta.inline-cta {
        padding: 36px 24px;
    }

    /* Post content */
    .post-header {
        padding: 48px 24px 44px;
    }

    .post-title {
        font-size: 1.75rem;
    }

    .gh-content h2 {
        font-size: 1.4rem;
    }

    .gh-content h3 {
        font-size: 1.15rem;
    }

    /* Author bio */
    .author-bio {
        flex-direction: column;
        padding: 24px;
    }

    /* Footer */
    .footer-inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }

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

    /* Archive */
    .archive-header {
        padding: 56px 24px 48px;
    }
}

@media (max-width: 480px) {
    .footer-links {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .post-share {
        flex-direction: column;
        align-items: flex-start;
    }
}


/* ==========================================================
   KOENIG EDITOR CARDS (required by Ghost validator)
   ========================================================== */

.kg-width-wide {
    position: relative;
    width: 85vw;
    min-width: 100%;
    margin-left: calc(50% - 42.5vw);
    margin-right: calc(50% - 42.5vw);
}

.kg-width-full {
    position: relative;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

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

.kg-image-card { margin: 2em 0; }
.kg-image-card img { border-radius: var(--radius); }

.kg-gallery-container { display: flex; flex-direction: column; margin: 2em 0; }
.kg-gallery-row { display: flex; gap: 8px; margin-bottom: 8px; }
.kg-gallery-image img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); }

.kg-bookmark-card {
    width: 100%;
    margin: 2em 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--white);
}
.kg-bookmark-container { display: flex; color: var(--text); text-decoration: none; min-height: 148px; }
.kg-bookmark-container:hover { text-decoration: none; }
.kg-bookmark-content { flex: 1; padding: 20px; display: flex; flex-direction: column; }
.kg-bookmark-title { font-weight: 600; font-size: 0.95rem; color: var(--dark); margin-bottom: 6px; }
.kg-bookmark-description { font-size: 0.83rem; color: var(--text-muted); line-height: 1.5; flex: 1; margin-bottom: 12px; }
.kg-bookmark-metadata { display: flex; align-items: center; gap: 8px; font-size: 0.78rem; color: var(--text-muted); }
.kg-bookmark-icon { width: 16px; height: 16px; flex-shrink: 0; }
.kg-bookmark-thumbnail { position: relative; min-width: 33%; }
.kg-bookmark-thumbnail img { position: absolute; width: 100%; height: 100%; object-fit: cover; }

.kg-callout-card {
    display: flex;
    gap: 16px;
    padding: 20px 24px;
    border-radius: var(--radius);
    background: var(--gold-faint);
    border-left: 3px solid var(--gold);
    margin: 2em 0;
}
.kg-callout-emoji { font-size: 1.2rem; line-height: 1.6; flex-shrink: 0; }
.kg-callout-text { font-size: 0.95rem; line-height: 1.7; color: var(--text); }

.kg-toggle-card { border: 1px solid var(--border); border-radius: var(--radius); margin: 2em 0; overflow: hidden; }
.kg-toggle-heading { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; cursor: pointer; background: var(--white); }
.kg-toggle-heading-text { font-weight: 600; font-size: 0.95rem; color: var(--dark); }
.kg-toggle-content { padding: 16px 20px; font-size: 0.9rem; color: var(--text-muted); line-height: 1.65; }

.kg-button-card { display: flex; margin: 2em 0; justify-content: center; }
.kg-button-card a.kg-btn { display: inline-block; background: var(--gold); color: var(--dark); font-weight: 700; padding: 12px 26px; border-radius: var(--radius); text-decoration: none; font-size: 0.95rem; transition: background 0.15s; }
.kg-button-card a.kg-btn:hover { background: var(--gold-dark); text-decoration: none; }

.kg-header-card { padding: 60px 32px; text-align: center; background: var(--dark); border-radius: var(--radius); margin: 2em 0; }
.kg-header-card h2 { color: var(--white); font-size: 2rem; margin-bottom: 12px; }
.kg-header-card p { color: rgba(255,255,255,0.6); }

.kg-video-card { margin: 2em 0; border-radius: var(--radius); overflow: hidden; }
.kg-video-card video { width: 100%; display: block; }

.kg-audio-card,
.kg-file-card,
.kg-product-card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--white); margin: 2em 0; padding: 20px; }

.kg-file-card { display: flex; align-items: center; gap: 16px; text-decoration: none; color: var(--text); transition: border-color 0.15s; }
.kg-file-card:hover { border-color: var(--gold); text-decoration: none; }
.kg-file-card-title { font-weight: 600; font-size: 0.95rem; color: var(--dark); }
.kg-file-card-caption { font-size: 0.82rem; color: var(--text-muted); }

.kg-paywall-card { padding: 40px 24px; text-align: center; background: var(--dark); border-radius: var(--radius); margin: 2em 0; color: var(--white); }

.kg-nft-card { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin: 2em 0; }

/* Comments */
.post-comments {
    background: var(--cream);
    padding: 0 24px 48px;
}

.post-comments > * {
    max-width: var(--post-w);
    margin: 0 auto;
}


/* ============================================================
   5-LAYER OPTIMIZATION ADDITIONS — auto-appended
   ============================================================ */
/* ============================================================
   5-LAYER OPTIMIZATION ADDITIONS â€” append to screen.css
   ============================================================ */

/* Layer 1 â€” UX: Screen-reader-only utility class */
.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;
}

/* Layer 4 â€” AIO: Definition block â€” post opener used as extractable AIO passage */
.post-definition-block {
    max-width: var(--post-w);
    margin: 0 auto 32px;
    padding: 20px 32px;
    background: rgba(201, 151, 58, 0.06);
    border-left: 3px solid var(--gold);
}

.post-definition-text {
    font-size: 1.05rem;
    color: var(--text);
    line-height: 1.75;
    font-style: italic;
    margin: 0;
}

@media (max-width: 768px) {
    .post-definition-block {
        padding: 16px 20px;
        margin-bottom: 24px;
    }
}

/* Layer 5 â€” CRO: Blueprint CTA block */
.blueprint-cta {
    max-width: var(--post-w);
    margin: 48px auto;
    background: var(--dark);
    padding: 40px 48px;
    text-align: center;
}

.blueprint-cta-eyebrow {
    font-size: 0.72rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 12px;
}

.blueprint-cta-heading {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.25;
    margin-bottom: 14px;
}

.blueprint-cta-text {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.7;
    max-width: 480px;
    margin: 0 auto 28px;
}

.blueprint-cta-btn {
    display: inline-block;
    background: var(--gold);
    color: var(--dark);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 14px 32px;
    text-decoration: none;
    transition: background 0.2s ease;
}

.blueprint-cta-btn:hover {
    background: var(--gold-dark);
    color: var(--dark);
}

.blueprint-cta-note {
    margin-top: 14px;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.4);
}

@media (max-width: 768px) {
    .blueprint-cta {
        padding: 32px 24px;
    }
    .blueprint-cta-heading {
        font-size: 1.3rem;
    }
}

/* Layer 2 â€” SEO/Footer: footer legal entity line */
.footer-legal-entity {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 8px;
}

.footer-meta {
    margin-top: 6px;
    font-size: 0.75rem;
}

.footer-meta a {
    color: rgba(255, 255, 255, 0.4);
}

.footer-meta a:hover {
    color: var(--gold);
}

