/* =========================================================================
   ThornBloom Journal — Midnight Blue Edition
   Consumed by: home.php (landing) + single.php (post) + template-parts/
   journal-newsletter.php. Enqueued on is_home(), is_category(), is_tag(),
   is_author() (landing) and is_single() (post) from functions.php.

   Source of truth:  outputs/designs/midnight-blue-pages-2026-04-20/blog/
                     mockup.html + spec.md
   Palette tokens:   assets/css/tokens.css (:root, already midnight-blue)
   Realm class:      body.global-midnight-blue ensures :root defaults win
                     even if a per-realm body class sits in the mix.

   Classes prefixed .tbj-* to isolate from the legacy .tb-journal-* /
   .tb-post-* rules that still live in assets/css/templates.css + the old
   blog-archive.css (now superseded).

   Breakpoints match the mockup:
       desktop  ≥ 1100px  (3-col grid, full hero padding)
       tablet   720–1099  (2-col grid, featured stacks)
       mobile   < 720     (1-col, tight gutters)
   ========================================================================= */

/* ── 0. Scoping defaults ─────────────────────────────────────────────── */

body.tb-redesign.global-midnight-blue .tbj,
body.tb-redesign .tbj {
    background: var(--realm-bg);
    color: var(--realm-cream);
    font-family: var(--tb-font-body, 'Cormorant Garamond', Georgia, serif);
    font-size: 17px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

.tbj *,
.tbj *::before,
.tbj *::after { box-sizing: border-box; }

.tbj ::selection { background: var(--realm-metallic); color: var(--realm-bg); }

.tbj a { color: var(--realm-metallic); text-decoration: none; }
.tbj a:hover { color: var(--realm-metallic-bright); }

.tbj-sr-only {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ── 1. Shared primitives ────────────────────────────────────────────── */

.tbj-display {
    font-family: var(--tb-font-display, 'ivypresto-display', Georgia, serif);
    font-weight: 600;
    letter-spacing: -0.005em;
    line-height: 1.08;
}
.tbj-display em {
    font-style: italic;
    font-weight: 500;
}

.tbj-eyebrow {
    display: inline-block;
    font-family: var(--tb-font-heading, 'ivypresto-display', Georgia, serif);
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    font-size: 12px;
    color: var(--realm-metallic);
}

.tbj-ornament {
    display: inline-flex; align-items: center; gap: 14px;
    color: var(--realm-metallic);
    font-family: var(--tb-font-heading, 'ivypresto-display', Georgia, serif);
    font-size: 12px; font-weight: 600;
    letter-spacing: 0.22em; text-transform: uppercase;
}
.tbj-ornament::before,
.tbj-ornament::after {
    content: ''; width: 42px; height: 1px;
    background: var(--realm-metallic); opacity: 0.45;
}

.tbj-dot { color: var(--realm-muted); margin: 0 2px; }

/* Buttons ─ mirror tb-btn tokens to stay coherent with homepage / shop */
.tbj-btn {
    display: inline-flex;
    align-items: center; justify-content: center;
    gap: 10px;
    padding: 15px 32px;
    font-family: var(--tb-font-heading, 'ivypresto-display', Georgia, serif);
    font-size: 12px; font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    border-radius: 2px;
    cursor: pointer;
    text-decoration: none;
    transition: transform .35s ease, background-color .35s ease,
                color .35s ease, border-color .35s ease;
    border: 1px solid transparent;
    white-space: nowrap;
    line-height: 1;
}
.tbj-btn--primary {
    background: var(--realm-metallic);
    color: var(--realm-bg);
    border-color: var(--realm-metallic);
}
.tbj-btn--primary:hover {
    background: var(--realm-metallic-bright);
    color: var(--realm-bg);
    transform: translateY(-1px);
}
.tbj-btn--ghost {
    background: transparent;
    color: var(--realm-metallic);
    border-color: var(--realm-metallic);
}
.tbj-btn--ghost:hover {
    background: color-mix(in srgb, var(--realm-metallic) 12%, transparent);
}
.tbj-btn:focus-visible {
    outline: 2px solid var(--realm-metallic);
    outline-offset: 3px;
}

/* Breadcrumb ─ used by both landing hero and post hero */
.tbj-breadcrumb,
.tbj-post-crumbs__inner {
    font-family: var(--tb-font-heading, 'ivypresto-display', Georgia, serif);
    font-size: 10px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--realm-taupe);
}
.tbj-breadcrumb a,
.tbj-post-crumbs__inner a { color: var(--realm-taupe); }
.tbj-breadcrumb a:hover,
.tbj-post-crumbs__inner a:hover { color: var(--realm-metallic); }
.tbj-breadcrumb__sep { margin: 0 12px; opacity: 0.6; }
.tbj-breadcrumb__current { color: var(--realm-metallic); }

/* =========================================================================
   LANDING (home.php)
   ========================================================================= */

/* ── 2. Editorial hero ──────────────────────────────────────────────── */

.tbj-hero {
    position: relative;
    padding: 120px 56px 64px;
    overflow: hidden;
}
.tbj-hero::before {
    content: '';
    position: absolute; inset: 0;
    background:
        radial-gradient(ellipse at 70% 30%,
            color-mix(in srgb, var(--realm-secondary) 65%, transparent) 0%,
            transparent 55%),
        radial-gradient(ellipse at 15% 80%,
            color-mix(in srgb, var(--realm-muted) 14%, transparent) 0%,
            transparent 50%);
    pointer-events: none;
}
.tbj-hero__inner {
    max-width: 1280px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}
.tbj-hero .tbj-breadcrumb { margin-bottom: 36px; display: block; }

.tbj-hero__title {
    font-size: clamp(44px, 5.8vw, 90px);
    color: var(--realm-cream);
    margin: 18px 0 24px;
    max-width: 820px;
}
.tbj-hero__lead {
    color: var(--realm-taupe);
    font-size: 19px;
    font-style: italic;
    line-height: 1.7;
    max-width: 640px;
    margin: 0 0 28px;
}

/* Category rail chips */
.tbj-rail {
    display: flex; gap: 10px; flex-wrap: wrap;
    margin-top: 8px;
}
.tbj-chip {
    padding: 8px 16px;
    font-family: var(--tb-font-heading, 'ivypresto-display', Georgia, serif);
    font-size: 10px; font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    border: 1px solid rgba(196, 188, 177, 0.14);
    color: var(--realm-taupe);
    background: transparent;
    border-radius: 2px;
    cursor: pointer;
    transition: color .3s ease, border-color .3s ease, background-color .3s ease;
    text-decoration: none;
}
.tbj-chip:hover {
    color: var(--realm-cream);
    border-color: var(--realm-metallic);
}
.tbj-chip.is-active {
    background: var(--realm-metallic);
    color: var(--realm-bg);
    border-color: var(--realm-metallic);
}

/* ── 3. Featured post ───────────────────────────────────────────────── */

.tbj-featured-section { padding: 64px 56px 0; position: relative; z-index: 1; }
.tbj-featured-inner { max-width: 1280px; margin: 0 auto; }

.tbj-featured {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 48px;
    background: var(--realm-primary);
    border: 1px solid var(--realm-metallic);
    padding: 0;
    overflow: hidden;
}
.tbj-featured__photo {
    position: relative;
    min-height: 480px;
    overflow: hidden;
    display: block;
    background: linear-gradient(135deg, var(--realm-secondary), var(--realm-primary));
}
.tbj-featured__img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .8s ease;
}
.tbj-featured__photo:hover .tbj-featured__img { transform: scale(1.03); }
.tbj-featured__placeholder {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    color: var(--realm-taupe);
    font-family: var(--tb-font-heading);
    font-size: 12px; letter-spacing: 0.22em;
    text-transform: uppercase;
    background: linear-gradient(135deg, var(--realm-secondary), var(--realm-primary));
}

.tbj-featured__body {
    padding: 64px 56px 64px 0;
    display: flex; flex-direction: column;
    justify-content: center;
}
.tbj-featured__eyebrow { margin-bottom: 20px; }
.tbj-featured__meta {
    display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
    font-family: var(--tb-font-heading);
    font-size: 10px; letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--realm-taupe);
    margin-bottom: 24px;
}
.tbj-featured__author { color: var(--realm-metallic); }
.tbj-featured__title {
    font-size: clamp(32px, 3.4vw, 46px);
    color: var(--realm-cream);
    margin: 0 0 18px;
    line-height: 1.15;
}
.tbj-featured__title a { color: inherit; }
.tbj-featured__title a:hover { color: var(--realm-metallic); }
.tbj-featured__excerpt {
    color: var(--realm-taupe);
    font-size: 17px;
    font-style: italic;
    line-height: 1.7;
    margin: 0 0 28px;
}

/* ── 4. Article grid ────────────────────────────────────────────────── */

.tbj-grid-section { padding: 96px 56px 120px; position: relative; overflow: hidden; }
.tbj-grid-section__wash {
    position: absolute; pointer-events: none; z-index: 0;
    width: 520px; height: 520px; border-radius: 50%;
    filter: blur(80px); opacity: 0.5;
}
.tbj-grid-section__wash--tl {
    top: -160px; left: -120px;
    background: radial-gradient(circle,
        color-mix(in srgb, var(--realm-secondary) 55%, transparent) 0%,
        transparent 70%);
}
.tbj-grid-section__wash--br {
    bottom: -160px; right: -120px;
    background: radial-gradient(circle,
        color-mix(in srgb, var(--realm-muted) 22%, transparent) 0%,
        transparent 70%);
}
.tbj-grid-inner {
    max-width: 1280px; margin: 0 auto;
    position: relative; z-index: 1;
}

.tbj-grid-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 24px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}
.tbj-grid-header h2 {
    font-size: clamp(32px, 3.6vw, 48px);
    color: var(--realm-cream);
    margin: 0;
    font-family: var(--tb-font-display);
    font-weight: 600;
}
.tbj-grid-header h2 em { font-style: italic; }
.tbj-grid-header__count {
    font-family: var(--tb-font-heading);
    font-size: 10px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--realm-taupe);
}

.tbj-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}
.tbj-grid__empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 72px 24px;
    color: var(--realm-taupe);
    font-style: italic;
    font-size: 17px;
}

/* Card — whole tile is clickable */
.tbj-card {
    position: relative;
    background: var(--realm-primary);
    border: 1px solid rgba(209, 178, 140, 0.18);
    display: flex; flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: transform .5s ease, border-color .35s ease,
                box-shadow .5s ease;
    overflow: hidden;
}
.tbj-card:hover {
    transform: scale(1.015);
    border-color: rgba(209, 178, 140, 0.35);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    color: inherit;
}
.tbj-card__photo {
    position: relative;
    aspect-ratio: 3 / 2;
    border-bottom: 1px solid rgba(209, 178, 140, 0.18);
    overflow: hidden;
    background: var(--realm-secondary);
}
.tbj-card__img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .8s ease;
}
.tbj-card:hover .tbj-card__img { transform: scale(1.04); }
.tbj-card__placeholder {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    color: var(--realm-taupe);
    font-family: var(--tb-font-heading);
    font-size: 10px; letter-spacing: 0.22em;
    text-transform: uppercase;
    background: linear-gradient(135deg, var(--realm-secondary), var(--realm-primary));
}
.tbj-card__cat {
    position: absolute;
    top: 14px; left: 14px;
    background: color-mix(in srgb, var(--realm-bg) 80%, transparent);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(196, 188, 177, 0.14);
    padding: 6px 12px;
    font-family: var(--tb-font-heading);
    font-size: 9px; font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--realm-taupe);
}
.tbj-card__body {
    padding: 26px 26px 30px;
    display: flex; flex-direction: column; flex: 1;
}
.tbj-card__meta {
    display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
    font-family: var(--tb-font-heading);
    font-size: 9px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--realm-taupe);
    margin-bottom: 14px;
}
.tbj-card__title {
    font-family: var(--tb-font-display);
    font-weight: 600;
    font-size: 22px;
    color: var(--realm-cream);
    margin: 0 0 12px;
    line-height: 1.3;
    /* 3-line clamp for absurdly long titles per spec */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.tbj-card__excerpt {
    color: var(--realm-taupe);
    font-size: 15px;
    font-style: italic;
    line-height: 1.65;
    margin: 0 0 22px;
    flex: 1;
}
.tbj-card__readmore {
    font-family: var(--tb-font-heading);
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--realm-metallic);
}

/* ── 5. Pagination ──────────────────────────────────────────────────── */

.tbj-pagination {
    margin: 72px auto 0;
    display: flex;
    justify-content: center;
    align-items: center;
}
.tbj-pagination ul.page-numbers {
    list-style: none;
    display: flex;
    gap: 12px;
    padding: 0; margin: 0;
    flex-wrap: wrap;
    justify-content: center;
}
.tbj-pagination .page-numbers {
    font-family: var(--tb-font-heading);
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--realm-taupe);
    padding: 10px 14px;
    border: 1px solid rgba(196, 188, 177, 0.14);
    text-decoration: none;
    transition: color .3s ease, border-color .3s ease;
    display: inline-block;
    min-width: 40px;
    text-align: center;
}
.tbj-pagination .page-numbers:hover {
    color: var(--realm-metallic);
    border-color: var(--realm-metallic);
}
.tbj-pagination .page-numbers.current {
    color: var(--realm-metallic);
    border-color: var(--realm-metallic);
}

/* ── 6. Newsletter band (shared) ───────────────────────────────────── */

.tbj-newsletter {
    padding: 120px 56px;
    background: var(--realm-primary);
    border-top: 1px solid rgba(209, 178, 140, 0.18);
    border-bottom: 1px solid rgba(209, 178, 140, 0.18);
    text-align: center;
    position: relative;
    z-index: 1;
}
.tbj-newsletter__inner {
    max-width: 680px;
    margin: 0 auto;
}
.tbj-newsletter__title {
    font-size: clamp(36px, 4.4vw, 58px);
    color: var(--realm-cream);
    margin: 22px auto 24px;
}
.tbj-newsletter__lead {
    color: var(--realm-taupe);
    font-size: 18px;
    line-height: 1.75;
    margin: 0 auto 36px;
    max-width: 540px;
    font-style: italic;
}
.tbj-newsletter__form {
    display: flex;
    gap: 12px;
    max-width: 520px;
    margin: 0 auto;
}
.tbj-newsletter__form input[type="email"] {
    flex: 1;
    background: var(--realm-bg);
    border: 1px solid rgba(209, 178, 140, 0.35);
    color: var(--realm-cream);
    padding: 15px 20px;
    font-family: var(--tb-font-body);
    font-size: 16px;
    border-radius: 2px;
    line-height: 1.4;
    min-height: 44px;
}
.tbj-newsletter__form input[type="email"]::placeholder {
    color: var(--realm-taupe);
    font-style: italic;
}
.tbj-newsletter__form input[type="email"]:focus {
    outline: none;
    border-color: var(--realm-metallic);
}
.tbj-newsletter__form button {
    background: var(--realm-metallic);
    color: var(--realm-bg);
    border: none;
    padding: 15px 28px;
    font-family: var(--tb-font-heading);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 2px;
    min-height: 44px;
    white-space: nowrap;
}
.tbj-newsletter__form button:hover { background: var(--realm-metallic-bright); }
.tbj-newsletter__status {
    min-height: 1.2em;
    margin: 10px auto 0;
    font-size: 13px;
    color: var(--realm-taupe);
    font-style: italic;
}
.tbj-newsletter__fineprint {
    font-size: 12px;
    font-style: italic;
    color: var(--realm-taupe);
    margin-top: 18px;
}

/* =========================================================================
   SINGLE POST (single.php)
   ========================================================================= */

/* Breadcrumb bar */
.tbj-post-crumbs {
    background: var(--realm-bg);
    padding: 40px 56px 0;
    border-top: 1px solid rgba(209, 178, 140, 0.12);
}
.tbj-post-crumbs__inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    row-gap: 8px;
}

/* Editorial hero — headline block sits above full-bleed hero image */
.tbj-post-hero {
    padding: 48px 56px 0;
    position: relative;
}
.tbj-post-hero__headline {
    max-width: 860px;
    margin: 0 auto;
    text-align: center;
    padding: 40px 0 56px;
}
.tbj-post-hero__title {
    font-size: clamp(36px, 4.8vw, 72px);
    color: var(--realm-cream);
    margin: 18px 0 22px;
    line-height: 1.1;
}
.tbj-post-hero__deck {
    color: var(--realm-taupe);
    font-size: 20px;
    font-style: italic;
    line-height: 1.6;
    max-width: 680px;
    margin: 0 auto 32px;
}
.tbj-post-hero__meta {
    display: flex;
    gap: 14px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    font-family: var(--tb-font-heading);
    font-size: 10px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--realm-taupe);
}
.tbj-post-hero__author { color: var(--realm-metallic); }
.tbj-post-hero__share-group {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-left: 8px;
    padding-left: 18px;
    border-left: 1px solid rgba(196, 188, 177, 0.22);
}
.tbj-post-hero__share-label {
    font-family: var(--tb-font-heading);
    font-size: 10px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--realm-taupe);
}
.tbj-post-hero__share {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px; height: 32px;
    border: 1px solid rgba(209, 178, 140, 0.35);
    border-radius: 50%;
    color: var(--realm-cream);
    transition: color .3s ease, border-color .3s ease, background-color .3s ease;
}
.tbj-post-hero__share:hover {
    color: var(--realm-bg);
    background: var(--realm-metallic);
    border-color: var(--realm-metallic);
}

/* Full-bleed hero figure — appears below headline, above article body */
.tbj-post-hero__figure {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0;
    background: var(--realm-secondary);
    border: 1px solid rgba(209, 178, 140, 0.22);
    overflow: hidden;
}
.tbj-post-hero__img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 640px;
    object-fit: cover;
}

/* Article body — single column editorial reading width */
.tbj-post-body {
    padding: 80px 24px 96px;
    position: relative;
}
.tbj-post-body__inner {
    max-width: 720px;
    margin: 0 auto;
    font-family: var(--tb-font-body);
    font-size: 18px;
    line-height: 1.78;
    color: var(--realm-cream);
}

.tbj-post-body__inner > p,
.tbj-post-body__inner > ul,
.tbj-post-body__inner > ol {
    margin: 0 0 28px;
    color: var(--realm-cream);
}
.tbj-post-body__inner > ul,
.tbj-post-body__inner > ol {
    padding-left: 1.4em;
}
.tbj-post-body__inner > ul li,
.tbj-post-body__inner > ol li {
    margin-bottom: 10px;
}

/* Drop cap on first paragraph */
.tbj-post-body__inner > p:first-of-type::first-letter {
    font-family: var(--tb-font-display);
    font-weight: 600;
    font-style: italic;
    float: left;
    font-size: 4.4em;
    line-height: 0.88;
    padding: 6px 12px 0 0;
    color: var(--realm-metallic);
}

/* Headings inside body */
.tbj-post-body__inner h2,
.tbj-post-body__inner h3,
.tbj-post-body__inner h4 {
    font-family: var(--tb-font-display);
    font-weight: 600;
    color: var(--realm-cream);
    line-height: 1.2;
    margin: 52px 0 20px;
    letter-spacing: -0.005em;
}
.tbj-post-body__inner h2 { font-size: clamp(28px, 3vw, 38px); }
.tbj-post-body__inner h3 { font-size: clamp(22px, 2.2vw, 28px); color: var(--realm-metallic); }
.tbj-post-body__inner h4 { font-size: 20px; }

.tbj-post-body__inner h2 em,
.tbj-post-body__inner h3 em { font-style: italic; }

.tbj-post-body__inner a {
    color: var(--realm-metallic);
    border-bottom: 1px solid rgba(209, 178, 140, 0.35);
    transition: color .3s ease, border-color .3s ease;
}
.tbj-post-body__inner a:hover {
    color: var(--realm-metallic-bright);
    border-bottom-color: var(--realm-metallic-bright);
}

/* Inline figures + captions */
.tbj-post-body__inner figure,
.tbj-post-body__inner .wp-block-image {
    margin: 48px auto;
    border: 1px solid rgba(209, 178, 140, 0.18);
    background: var(--realm-primary);
}
.tbj-post-body__inner figure img,
.tbj-post-body__inner .wp-block-image img {
    display: block;
    width: 100%;
    height: auto;
}
.tbj-post-body__inner figcaption {
    font-family: var(--tb-font-body);
    font-style: italic;
    font-size: 14px;
    color: var(--realm-taupe);
    text-align: center;
    padding: 14px 20px 16px;
    line-height: 1.5;
}

/* Pull quote / blockquote */
.tbj-post-body__inner blockquote,
.tbj-post-body__inner .wp-block-quote {
    margin: 56px 0;
    padding: 8px 0 8px 28px;
    border-left: 1px solid var(--realm-metallic);
    position: relative;
    font-family: var(--tb-font-display);
    font-style: italic;
    font-size: clamp(22px, 2.4vw, 30px);
    line-height: 1.4;
    color: var(--realm-cream);
}
.tbj-post-body__inner blockquote p,
.tbj-post-body__inner .wp-block-quote p { margin: 0 0 10px; }
.tbj-post-body__inner blockquote cite,
.tbj-post-body__inner .wp-block-quote cite {
    display: block;
    font-family: var(--tb-font-heading);
    font-style: normal;
    font-size: 11px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--realm-metallic);
    margin-top: 18px;
}

/* Tags row */
.tbj-post-tags {
    margin-top: 56px;
    padding-top: 28px;
    border-top: 1px solid rgba(209, 178, 140, 0.18);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}
.tbj-post-tags__label {
    font-family: var(--tb-font-heading);
    font-size: 10px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--realm-metallic);
}
.tbj-post-tags__tag {
    font-family: var(--tb-font-heading);
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--realm-taupe);
    padding: 6px 12px;
    border: 1px solid rgba(196, 188, 177, 0.14);
    border-radius: 2px;
    transition: color .3s ease, border-color .3s ease;
    text-decoration: none;
}
.tbj-post-tags__tag:hover {
    color: var(--realm-metallic);
    border-color: var(--realm-metallic);
}

/* FAQ block */
.tbj-post-faq {
    padding: 40px 24px 80px;
    background: var(--realm-bg);
}
.tbj-post-faq__header {
    text-align: center;
    margin: 0 auto 40px;
    max-width: 720px;
}
.tbj-post-faq__header .tbj-display {
    font-size: clamp(30px, 3.4vw, 44px);
    color: var(--realm-cream);
    margin: 14px 0 0;
}
.tbj-post-faq__header .tbj-display em { font-style: italic; }

/* Related posts — reuse landing grid but constrain to 3 cards */
.tbj-post-related {
    padding: 80px 56px 96px;
    background: var(--realm-primary);
    border-top: 1px solid rgba(209, 178, 140, 0.18);
}
.tbj-post-related .tbj-grid-inner { max-width: 1280px; }
.tbj-grid--related {
    grid-template-columns: repeat(3, 1fr);
}

/* =========================================================================
   RESPONSIVE — tablet + mobile
   ========================================================================= */

@media (max-width: 1100px) {
    .tbj-featured { grid-template-columns: 1fr; gap: 0; }
    .tbj-featured__body { padding: 48px 32px 56px; }
    .tbj-featured__photo { min-height: 340px; }
    .tbj-grid,
    .tbj-grid--related { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
    .tbj-hero { padding: 96px 24px 48px; }
    .tbj-featured-section { padding: 48px 24px 0; }
    .tbj-grid-section { padding: 64px 24px 80px; }
    .tbj-newsletter { padding: 80px 24px; }
    .tbj-post-crumbs { padding: 32px 24px 0; }
    .tbj-post-hero { padding: 32px 24px 0; }
    .tbj-post-hero__headline { padding: 24px 0 40px; }
    .tbj-post-related { padding: 64px 24px 72px; }
}

@media (max-width: 720px) {
    .tbj-grid,
    .tbj-grid--related { grid-template-columns: 1fr; }
    .tbj-post-body { padding: 56px 20px 72px; }
    .tbj-post-body__inner { font-size: 17px; line-height: 1.75; }
    .tbj-post-body__inner > p:first-of-type::first-letter {
        font-size: 3.8em;
        padding: 4px 10px 0 0;
    }
    .tbj-post-body__inner blockquote,
    .tbj-post-body__inner .wp-block-quote {
        width: 90%;
        margin-left: auto;
        margin-right: auto;
    }
    .tbj-newsletter__form { flex-direction: column; }
    .tbj-newsletter__form input[type="email"],
    .tbj-newsletter__form button { width: 100%; }
    .tbj-post-hero__share-group {
        border-left: none;
        padding-left: 0;
        margin-left: 0;
        margin-top: 12px;
    }
    .tbj-post-hero__img { max-height: none; }
    .tbj-featured__body { padding: 40px 24px 48px; }
}

@media (max-width: 375px) {
    .tbj-hero { padding: 80px 16px 40px; }
    .tbj-hero__title { font-size: 38px; }
    .tbj-chip { font-size: 9px; letter-spacing: 0.16em; padding: 7px 12px; }
    .tbj-post-body { padding: 48px 16px 64px; }
    .tbj-post-hero { padding: 28px 16px 0; }
    .tbj-post-crumbs { padding: 28px 16px 0; }
}

/* ── 7. Full-bleed safety net ───────────────────────────────────────────
   The Astra `page-builder` layout filter (see functions.php
   `thornbloom_blog_fullwidth`) flattens .ast-container on the blog
   contexts — but belt-and-suspenders here in case a plugin or page
   option reasserts the boxed layout. Scoped strictly to the journal
   body class so shop / product / page templates are untouched.
   @since 2.7.40 Blog landing container fix
   ──────────────────────────────────────────────────────────────────── */

body.global-midnight-blue.blog .ast-container,
body.global-midnight-blue.archive .ast-container,
body.global-midnight-blue.single-post .ast-container,
body.global-midnight-blue.blog #content > .ast-container,
body.global-midnight-blue.archive #content > .ast-container,
body.global-midnight-blue.single-post #content > .ast-container {
    max-width: 100%;
    width: 100%;
    padding-left: 0;
    padding-right: 0;
}

body.global-midnight-blue.blog #primary,
body.global-midnight-blue.archive #primary,
body.global-midnight-blue.single-post #primary {
    max-width: 100%;
    width: 100%;
    padding: 0;
    margin: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

body.global-midnight-blue.blog .site-content,
body.global-midnight-blue.archive .site-content,
body.global-midnight-blue.single-post .site-content {
    background: var(--realm-bg);
}

/* ── 8. Table of Contents (easy-table-of-contents plugin) ────────────
   v2.7.44 realm-agnostic hardening
   -------------------------------------------------------------------
   Plugin injects #ez-toc-container inside the post content and emits
   its own inline CSS via wp_add_inline_style('eztoc', ...). When the
   plugin's "custom theme" was active, that inline CSS set
      div#ez-toc-container { background: rgba(26,47,37,0.6); ... }
   which, being later in source order with the same specificity as our
   `body.class #id` selector, slipped through any number of bumps and
   kept rendering the TOC green (Enchanted-Forest tokens).

   v2.7.44 fixes this two ways, belt-and-braces:
     (a) In the DB, ez-toc-settings.theme is switched to "none" and all
         custom_*_colour fields cleared — the plugin emits no colored
         inline CSS anymore, so there is nothing to fight.
     (b) This block is now realm-agnostic. It redefines the realm tokens
         explicitly *inside* the #ez-toc-container scope, so even if a
         collection realm class (ef-realm, dark-romance-realm, etc.)
         is applied on a future blog body, the TOC still resolves to
         midnight-blue values. Bg + border + color carry !important
         as specificity insurance against any re-introduced plugin
         inline CSS or future theme preset.

   Verified against two category cohorts on 2026-04-23:
     - vamp-romantic-wedding (Dark Wedding Aesthetics + Wedding Trends)
     - dark-fantasy-wedding-invitation-styles
   ──────────────────────────────────────────────────────────────────── */

/* (a) Redefine realm tokens scoped to the TOC — realm-agnostic. */
body #ez-toc-container,
body div#ez-toc-container.ez-toc-v2_0_82_2,
body .ez-toc-v2_0_82_2,
body .ez-toc-container-direction {
    --realm-primary: #0E1426;
    --realm-secondary: #161E35;
    --realm-bg: #070A14;
    --realm-cream: #ECE4D5;
    --realm-taupe: #B8B3A8;
    --realm-metallic: #D1B28C;
    --tb-border-gold: rgba(209, 178, 140, 0.18);
}

/* (b) Container chrome — !important to beat any plugin/theme preset. */
body #ez-toc-container,
body div#ez-toc-container.ez-toc-v2_0_82_2,
body .ez-toc-v2_0_82_2,
body .ez-toc-container-direction {
    background: #0E1426 !important;
    border: 1px solid rgba(209, 178, 140, 0.18) !important;
    color: #ECE4D5 !important;
    border-radius: 3px;
    padding: 32px 40px;
    max-width: 720px;
    width: 100%;
    margin: 56px auto;
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.25);
}

body #ez-toc-container .ez-toc-title-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(209, 178, 140, 0.18);
    padding-bottom: 16px;
    margin-bottom: 20px;
    background: transparent !important;
}

body #ez-toc-container p.ez-toc-title,
body #ez-toc-container .ez-toc-title {
    font-family: var(--tb-font-display, 'IvyPresto Display', Georgia, serif);
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #D1B28C !important;
    margin: 0;
    cursor: default !important;
    background: transparent !important;
    text-shadow: none;
    line-height: 1.2;
}

/* Hide the plugin's list-glyph toggle icon (the ≡ + chevron pair) */
body #ez-toc-container .ez-toc-cssicon-toggle-label,
body #ez-toc-container input.ez-toc-cssicon-toggle-checkbox,
body #ez-toc-container .ez-toc-icon-toggle-span,
body #ez-toc-container label[for*="ez-toc-cssicon-toggle"],
body #ez-toc-container label.ez-toc-cssicon-toggle-label,
body #ez-toc-container span.ez-toc-icon-toggle-span,
body #ez-toc-container svg.list-377408,
body #ez-toc-container svg.arrow-unsorted-368013 {
    display: none !important;
}

body #ez-toc-container nav {
    margin: 0;
    padding: 0;
    background: transparent !important;
}

body #ez-toc-container ul,
body #ez-toc-container ol,
body #ez-toc-container ul.ez-toc-list,
body #ez-toc-container ul.ez-toc-list-level-1 {
    list-style: none;
    margin: 0;
    padding: 0;
    background: transparent !important;
}

body #ez-toc-container li {
    margin: 0;
    padding: 0;
    line-height: 1.9;
    list-style: none;
    background: transparent !important;
}

body #ez-toc-container li::before,
body #ez-toc-container li::marker {
    content: none;
    display: none;
}

body #ez-toc-container a,
body #ez-toc-container a.ez-toc-link,
body #ez-toc-container ul.ez-toc-list a,
body #ez-toc-container ul.ez-toc-list li a {
    color: #ECE4D5 !important;
    font-family: var(--tb-font-body, 'Cormorant Garamond', Georgia, serif);
    font-size: 1rem;
    line-height: 1.9;
    text-decoration: none !important;
    border-bottom: 1px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
    padding: 0;
    background: transparent !important;
    display: inline;
}

body #ez-toc-container a:hover,
body #ez-toc-container a.ez-toc-link:hover,
body #ez-toc-container a:focus,
body #ez-toc-container ul.ez-toc-list a:hover,
body #ez-toc-container ul.ez-toc-list a:focus {
    color: #D1B28C !important;
    border-bottom: 1px solid rgba(209, 178, 140, 0.18);
    text-decoration: none !important;
}

body #ez-toc-container a:visited,
body #ez-toc-container ul.ez-toc-list a:visited {
    color: #ECE4D5 !important;
}

/* Active-section marker: gold hairline rule on the left */
body #ez-toc-container a.active,
body #ez-toc-container li.active > a,
body #ez-toc-container a.ez-toc-link.active {
    color: #D1B28C !important;
    border-left: 3px solid #D1B28C;
    padding-left: 12px;
    margin-left: -15px;
}

/* Nested sub-items (level 3+): indent + smaller + taupe */
body #ez-toc-container ul ul,
body #ez-toc-container ul.ez-toc-list-level-3,
body #ez-toc-container ul.ez-toc-list-level-4 {
    margin: 4px 0 4px 20px;
}

body #ez-toc-container ul ul li > a,
body #ez-toc-container ul.ez-toc-list-level-3 a,
body #ez-toc-container ul.ez-toc-list-level-4 a {
    font-size: 0.94em;
    color: #B8B3A8 !important;
}

body #ez-toc-container ul ul li > a:hover,
body #ez-toc-container ul.ez-toc-list-level-3 a:hover,
body #ez-toc-container ul.ez-toc-list-level-4 a:hover {
    color: #D1B28C !important;
}

/* Kill the plugin's default counter-hierarchy number bullets if any */
body #ez-toc-container.counter-hierarchy li::before,
body #ez-toc-container.ez-toc-counter li::before {
    content: none;
}

/* Mobile: tighten padding + reduce side margin */
@media (max-width: 720px) {
    body #ez-toc-container,
    body div#ez-toc-container.ez-toc-v2_0_82_2 {
        padding: 24px 22px;
        margin: 40px auto;
        max-width: calc(100% - 32px);
    }
    body #ez-toc-container a,
    body #ez-toc-container a.ez-toc-link {
        font-size: 0.98rem;
    }
}

/* =========================================================================
   v2.7.45 — Primary CTA text legibility fix
   ------------------------------------------------------------------------
   Root cause: `.tbj a { color: var(--realm-metallic); }` (line 40, specificity
   0,1,1) overrides `.tbj-btn--primary { color: var(--realm-bg); }` (0,1,0)
   because the Featured CTA is an <a> inside a .tbj ancestor. Result: gold
   text on gold background → invisible "Read the Story →" label.
   Newsletter `<button>` is unaffected (anchor selector doesn't match) but
   future <a class="tbj-btn--primary"> CTAs would break identically.
   Fix: higher-specificity rules scoped to body.global-midnight-blue that
   pin dark text on the gold fill, plus safety-net coverage for
   wp-block-button__link / any emitted variant. Literal hex per memory
   [feedback_realm_token_deployment] — tokens can be overridden elsewhere.
   ======================================================================== */
body.global-midnight-blue .tbj .tbj-btn--primary,
body.global-midnight-blue .tbj a.tbj-btn.tbj-btn--primary,
body.global-midnight-blue .tbj-featured .tbj-btn--primary,
body.global-midnight-blue .tbj-featured a.tbj-btn--primary,
body.global-midnight-blue .tbj-newsletter .tbj-btn--primary,
body.global-midnight-blue .tbj-newsletter button.tbj-btn--primary,
body.global-midnight-blue .tbj .wp-block-button__link,
body.global-midnight-blue .tbj-featured .wp-block-button__link {
    background-color: #D1B28C !important;
    color: #070A14 !important;
    border: 1px solid #D1B28C !important;
    text-shadow: none !important;
}
body.global-midnight-blue .tbj .tbj-btn--primary:hover,
body.global-midnight-blue .tbj a.tbj-btn.tbj-btn--primary:hover,
body.global-midnight-blue .tbj-featured .tbj-btn--primary:hover,
body.global-midnight-blue .tbj-featured a.tbj-btn--primary:hover,
body.global-midnight-blue .tbj-newsletter .tbj-btn--primary:hover,
body.global-midnight-blue .tbj-newsletter button.tbj-btn--primary:hover,
body.global-midnight-blue .tbj .wp-block-button__link:hover,
body.global-midnight-blue .tbj-featured .wp-block-button__link:hover {
    background-color: #E1C29A !important;
    color: #070A14 !important;
    border-color: #E1C29A !important;
}
/* Ensure child <span> (e.g. "→" arrow) inherits the dark fill */
body.global-midnight-blue .tbj .tbj-btn--primary > *,
body.global-midnight-blue .tbj-featured .tbj-btn--primary > *,
body.global-midnight-blue .tbj-newsletter .tbj-btn--primary > * {
    color: inherit !important;
}

/* ═══════════════════════════════════════════════════════════════════════
 * v2.7.46 — Archive (category / tag / author) additions
 *
 * archive.php + template-parts/journal-hero|card-grid|pagination.php
 * share the home.php layout system. These rules cover:
 *   1. The richer editorial empty state used on archives with 0 posts
 *   2. Any archive-only safety rules — hero lead supports <p> from
 *      term_description(), so we normalize its margin inside .tbj-hero
 *   3. Rail "All" should NOT be is-active when we're on a term archive
 *      (handled in PHP; visual confirmation here via :not selector — no
 *      behavior change, belt-and-suspenders)
 *
 * Literal midnight-blue hex per feedback_realm_token_deployment.md —
 * avoid var() dependence in case a legacy realm class leaks onto an
 * archive body later.
 * ═══════════════════════════════════════════════════════════════════════ */

/* Hero lead from term_description() may render <p> — strip stray margins. */
.tbj-hero .tbj-hero__lead > p { margin: 0 0 12px; }
.tbj-hero .tbj-hero__lead > p:last-child { margin-bottom: 0; }

/* Archive empty state — editorial, not the terse .tbj-grid__empty variant. */
.tbj-archive-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 96px 32px;
    border: 1px solid rgba(209, 178, 140, 0.18);
    border-radius: 2px;
    background: linear-gradient(180deg, #0E1426 0%, #070A14 100%);
}
body.global-midnight-blue .tbj-archive-empty {
    border-color: rgba(209, 178, 140, 0.22);
    background: linear-gradient(180deg, #0E1426 0%, #070A14 100%);
}
.tbj-archive-empty__lead {
    font-family: 'ivypresto-display', 'IvyPresto Display', Georgia, serif;
    font-size: 28px;
    line-height: 1.25;
    color: #ECE4D5;
    margin: 0 0 14px;
    font-style: italic;
}
.tbj-archive-empty__body {
    font-family: var(--tb-font-body);
    font-size: 17px;
    color: #B8B3A8;
    margin: 0;
}
.tbj-archive-empty__body a {
    color: #D1B28C;
    border-bottom: 1px solid rgba(209, 178, 140, 0.4);
    padding-bottom: 1px;
    transition: color .2s ease, border-color .2s ease;
}
.tbj-archive-empty__body a:hover {
    color: #E1C29A;
    border-bottom-color: #E1C29A;
}

/* Archive h1 in .tbj-hero__title should not inherit #ThornBloom hash
   collisions with link colors on tag pages — force heading color. */
.tbj.tbj--archive .tbj-hero__title {
    color: #ECE4D5;
}
body.global-midnight-blue .tbj.tbj--archive .tbj-hero__title {
    color: #ECE4D5;
}

/* Archive grid header emphasis: italic term name renders longer than
   home's fixed "From the Studio" — allow wrap without losing hierarchy. */
.tbj.tbj--archive .tbj-grid-header h2 {
    flex: 1 1 auto;
    min-width: 0;
}
.tbj.tbj--archive .tbj-grid-header h2 em {
    font-style: italic;
    word-break: break-word;
}

@media (max-width: 640px) {
    .tbj-archive-empty { padding: 64px 20px; }
    .tbj-archive-empty__lead { font-size: 22px; }
    .tbj-archive-empty__body { font-size: 15px; }
}
