/*
Theme Name:  Velominati Magazine
Theme URI:   https://velominati.com
Author:      Frank Strack
Description: Custom magazine-style theme for Velominati – Keepers of the Cog
Version:     1.0.0
License:     Private
Text Domain: velominati-magazine
*/

/* ============================================================
   FONTS — Museo (self-hosted)
   ============================================================ */
@font-face {
    font-family: 'Museo';
    src: url('fonts/Museo300-Regular.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Museo';
    src: url('fonts/Museo500-Regular.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Museo';
    src: url('fonts/Museo700-Regular.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Museo';
    src: url('fonts/museo900-regular.otf') format('opentype');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'MuseoSans';
    src: url('fonts/MuseoSans_500.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'MuseoSans';
    src: url('fonts/MuseoSans_700.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* ============================================================
   CUSTOM PROPERTIES
   ============================================================ */
:root {
    --red:        #C8321A;
    --red-dark:   #A52817;
    --black:      #111111;
    --dark:       #1A1A1A;
    --darker:     #0D0D0D;
    --mid:        #2D2D2D;
    --gray-light: #F5F5F3;
    --gray-mid:   #E0E0DC;
    --gray-dark:  #888888;
    --white:      #FFFFFF;
    --text:       #222222;
    --text-light: #555555;

    --font-display: 'MuseoSans', 'Helvetica Neue', Arial, sans-serif;
    --font-body:    'MuseoSans', 'Helvetica Neue', Arial, sans-serif;
    --font-sans:    'MuseoSans', 'Helvetica Neue', Arial, sans-serif;

    --max-width:   1200px;
    --content-width: 780px;
    --gutter:      24px;
    --section-gap: 80px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 17px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-weight: 500;
    color: var(--text);
    background-color: var(--white);
    background-image: url('images/background.png');
    background-attachment: fixed;
    background-size: cover;
    background-position: center top;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

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

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.15;
    color: inherit;
}

p { margin-bottom: 1.2em; }
p:last-child { margin-bottom: 0; }

ul, ol { padding-left: 1.5em; }

/* ============================================================
   LAYOUT HELPERS
   ============================================================ */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.section {
    padding: var(--section-gap) 0;
}

.section--dark {
    background: var(--dark);
    color: var(--white);
}
.section--darker {
    background: var(--darker);
    color: var(--white);
}
.section--black {
    background: var(--black);
    color: var(--white);
}
.section--light {
    background: transparent;
}

/* ============================================================
   SITE HEADER
   ============================================================ */
.site-header {
    background: var(--black);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 2px solid var(--red);
}

/* ── Sticky article title bar — appears below site header on scroll ── */
.sticky-article-title {
    position: fixed;
    left: 0;
    right: 0;
    background: var(--black);
    color: #fff;
    font-family: var(--font-serif);
    font-size: 1.17rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 8px var(--gutter);
    border-bottom: 1px solid rgba(200, 50, 26, 0.4);
    z-index: 99;
    opacity: 0;
    transform: translateY(-110%);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.sticky-article-title.is-visible {
    opacity: 0.75;
    transform: translateY(0);
    pointer-events: auto;
}
.sticky-title__text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}
.sticky-title__back-to-top {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    background: none;
    border: none;
    color: rgba(255,255,255,0.7);
    padding: 2px 4px;
    cursor: pointer;
    transition: color 0.15s;
}
.sticky-title__back-to-top svg { width: 18px; height: 18px; }
.sticky-title__back-to-top:hover { color: var(--red); }
@media (max-width: 768px) {
    .sticky-article-title { display: none; }
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px var(--gutter);
    max-width: var(--max-width);
    margin: 0 auto;
}

.site-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.site-logo__img {
    height: 52px;
    width: auto;
    display: block;
}

/* ============================================================
   MAIN NAVIGATION
   ============================================================ */
.site-nav {
    display: flex;
    align-items: center;
    gap: 0;
    list-style: none;
    padding: 0;
    margin: 0;
}

.site-nav a {
    display: inline-block;
    text-align: left;
    padding: 8px 24px;
    text-decoration: none;
    transition: background 0.2s;
}


.site-nav a:hover,
.site-nav .current_page_item a,
.site-nav .current-menu-item a {
    background: rgba(255,255,255,0.06);
}

.site-nav .nav-label-small {
    display: block !important;
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 0.576rem;
    letter-spacing: 0.15em;
    text-transform: none !important;
    color: var(--red) !important;
    line-height: 1;
    margin-bottom: 1px;
}

.site-nav .nav-label-main {
    display: block !important;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 0.984rem;
    letter-spacing: 0.14em;
    text-transform: uppercase !important;
    color: var(--white) !important;
    line-height: 1;
}

.site-nav .current_page_item .nav-label-main,
.site-nav .current-menu-item .nav-label-main {
    color: var(--red);
}

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;          /* space between bars */
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    width: 36px;
    height: 36px;
    box-sizing: border-box;
}

.nav-toggle__bar {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transform-origin: center;
    /* pre-declare both transforms so transition fires on both */
    transition: transform 0.3s ease, opacity 0.22s ease;
}

/* Morph into ×
   Each bar is 2px tall, gap between bars is 6px.
   Distance from bar 1 center to bar 2 center = 6 + 2 = 8px. */
.nav-toggle.is-open .nav-toggle__bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.nav-toggle.is-open .nav-toggle__bar:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.nav-toggle.is-open .nav-toggle__bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ============================================================
   ADMIN BAR OFFSET
   ============================================================ */
.admin-bar .site-header {
    top: 32px;
}
@media (max-width: 782px) {
    .admin-bar .site-header { top: 46px; }
}

/* ============================================================
   HERO — THE RULES
   ============================================================ */
.hero-rules {
    background-color: var(--black);
    background-size: cover;
    background-position: center center;
    color: var(--white);
    padding: 80px 0 60px;
    position: relative;
    overflow: hidden;
}

/* Light overlay on landing page hero */
.hero-rules::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.40);
    pointer-events: none;
    z-index: 0;
}

.hero-rules__inner,
.hero-rules__left,
.hero-rules__right {
    position: relative;
    z-index: 1;
}

.hero-rules__right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.hero-rules::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('images/cog-watermark.svg') center / 600px no-repeat;
    opacity: 0.035;
    pointer-events: none;
    z-index: 1;
}

.hero-rules__inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--gutter);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.hero-rules__label {
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 0.65rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--red);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.hero-rules__label::before {
    content: '';
    display: inline-block;
    width: 30px;
    height: 2px;
    background: var(--red);
}

.hero-rules__heading {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(3rem, 6vw, 5rem);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--white);
    line-height: 1;
    margin-bottom: 24px;
}

.hero-rules__intro {
    font-family: var(--font-body);
    font-size: 1.05rem;
    color: rgba(255, 245, 235, 0.80);
    line-height: 1.75;
    margin-bottom: 36px;
    max-width: 480px;
}

.hero-rules__cta {
    display: inline-block;
    background: var(--red);
    color: var(--white);
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    padding: 14px 32px;
    text-decoration: none;
    transition: background 0.2s;
}
.hero-rules__cta:hover {
    background: var(--red-dark);
    color: var(--white);
}

.hero-rules__rules-list {
    list-style: none;
    padding: 0;
    margin: 0;
    border-top: 1px solid rgba(255,255,255,0.12);
}

.hero-rules__rule {
    padding: 18px 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex;
    gap: 20px;
    align-items: baseline;
}

.hero-rules__rule-num {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 0.7rem;
    color: var(--red);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    flex-shrink: 0;
    min-width: 64px;
}

.hero-rules__rule-text {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 1rem;
    color: var(--white);
    line-height: 1.3;
}

.hero-rules__rule-desc {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.5);
    line-height: 1.5;
    margin-top: 4px;
}

.hero-rules__more {
    margin-top: 20px;
    text-align: right;
}

.hero-rules__more a {
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 0.65rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--red);
}
.hero-rules__more a:hover { color: rgba(200,50,26,0.7); }

/* ============================================================
   BOOK ADS STRIP
   ============================================================ */
/* ── Ad strip ────────────────────────────────────────────────────────────── */
.ad-strip {
    background: var(--darker);
    padding: 32px 0;
}

.ad-strip__inner {
    max-width: 1360px; /* 970 billboard + 24 gap + 300 sidebar + 2×24 gutters */
    margin: 0 auto;
    padding: 0 var(--gutter);
    display: flex;
    align-items: stretch;
    gap: 24px;
}

/* ── Wrapper divs added by velominati_ad_slot() inside the strip ── */
/* Billboard wrapper: grows to fill available width */
.ad-strip__inner .ad-slot-page-header {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    padding: 0;
    max-width: none;
    display: flex;
    align-items: stretch;
}

.ad-strip__inner .ad-slot-page-header .vma-slot,
.ad-strip__inner .ad-slot-page-header .vma-slot--empty {
    flex: 1 1 auto;
    width: 100%;
    max-width: none;
}
.ad-strip__inner .ad-slot-page-header img {
    width: 100%;
    height: auto;
    display: block;
}

/* Sidebar/rectangle wrapper: fixed 300px wide */
.ad-strip__inner .ad-slot-sidebar {
    flex: 0 0 300px;
    width: 300px;
    margin: 0;
    display: flex;
    align-items: stretch;
}

.ad-strip__inner .ad-slot-sidebar .vma-slot,
.ad-strip__inner .ad-slot-sidebar .vma-slot--empty {
    flex: 1 1 auto;
    width: 100%;
}

/* ── Mobile inline ad slot — hidden on desktop, shown in mobile breakpoint ── */
.ad-slot-mobile-inline { display: none; }

/* ── VMA slot — live ad ──────────────────────────────────────────────────── */
.vma-slot img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* ── VMA slot — empty / no active flight ────────────────────────────────── */
.vma-slot--empty {
    background: #3a3a3a;
    border: 1px dashed rgba(255,255,255,0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

/* Billboard: use aspect-ratio so it scales correctly at any container width */
.vma-slot--empty.vma-slot--billboard {
    flex: 1 1 auto;
    max-width: 970px;
}

/* Rectangle: fixed 300×250 */
.vma-slot--empty.vma-slot--mrec {
    flex: 0 0 300px;
    width: 300px;
}

/* Half-page: fixed 300×600 */
.vma-slot--empty.vma-slot--halfpage {
    width: 300px;
    margin-left: auto;
    margin-right: auto;
}

/* Leaderboard: fixed 728×90 — horizontal layout */
.vma-slot--empty.vma-slot--leaderboard {
    width: 728px;
    max-width: 100%;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 0 28px;
    gap: 32px;
}

/* Label+size wrapper — column in all slots, fills row in leaderboard */
.vma-empty__meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.vma-slot--leaderboard .vma-empty__meta {
    align-items: flex-start;
}

.vma-slot--leaderboard .vma-empty__cta {
    flex-shrink: 0;
    white-space: nowrap;
}

.vma-empty__label {
    font-family: var(--font-sans);
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.25);
}

.vma-empty__size {
    font-family: var(--font-sans);
    font-size: 0.6rem;
    color: rgba(255,255,255,0.2);
    letter-spacing: 0.1em;
}

.vma-empty__cta {
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 600;
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 3px;
    padding: 5px 14px;
    transition: color 0.15s, border-color 0.15s;
}

.vma-empty__cta:hover {
    color: #fff;
    border-color: rgba(255,255,255,0.5);
}

/* ── Book ads inside the hero ────────────────────────────────────────────── */
.hero-books {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: fit-content;
    gap: 10px;
    background: rgba(0, 0, 0, 0.55);
    padding: 16px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.hero-books__eyebrow {
    font-family: var(--font-sans);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: rgba(255, 245, 235, 0.60);
    text-transform: uppercase;
    margin: 0;
    text-align: left;
    width: 250px;
}

.hero-books__eyebrow em {
    color: var(--red);
    font-style: normal;
}

.hero-book-ad {
    display: block;
    overflow: hidden;
    text-decoration: none;
    width: 250px;
}

.hero-book-ad img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.hero-book-ad:hover img {
    transform: scale(1.02);
}

/* legacy — keep in case used elsewhere */
.book-ad__divider {
    width: 1px;
    height: 100px;
    background: rgba(255,255,255,0.15);
    flex-shrink: 0;
}

/* ============================================================
   SECTION HEADER
   ============================================================ */
.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 40px;
    padding-bottom: 16px;
    border-bottom: 3px solid var(--red);
}

.section-header__label {
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 0.58rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--red);
    margin-bottom: 4px;
}

.section-header__title {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 2rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: inherit;
    line-height: 1;
}

.section-header__dark .section-header__title { color: var(--white); }

.section-header__link {
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 0.62rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--red);
    white-space: nowrap;
}
.section-header__link:hover { opacity: 0.75; }

/* ============================================================
   ARTICLE GRID
   ============================================================ */
.article-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.article-card {
    background: var(--white);
    overflow: hidden;
    position: relative;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    border: 1px solid var(--gray-mid);
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}

.article-card__image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: var(--black);
}

.article-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.article-card:hover .article-card__image img {
    transform: scale(1.05);
}

.article-card__image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--black) 0%, var(--mid) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.15);
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 3rem;
    letter-spacing: 0.1em;
}

.article-card__category {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--red);
    color: var(--white);
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 0.52rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    padding: 4px 9px;
    text-decoration: none;
}

.article-card__body {
    padding: 20px 20px 24px;
}

.article-card__meta {
    font-size: 0.72rem;
    color: var(--gray-dark);
    margin-bottom: 8px;
    font-family: var(--font-sans);
    font-weight: 700;
    letter-spacing: 0.05em;
}

.article-card__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.05rem;
    line-height: 1.25;
    margin-bottom: 10px;
    color: var(--text);
}

.article-card__title a {
    color: inherit;
    text-decoration: none;
}
/* Stretched link — makes the whole card clickable */
.article-card__title a::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
}
.article-card__title a:hover { color: var(--red); }
/* Category badge stays above the stretched link */
.article-card__category { position: relative; z-index: 1; }

.article-card__excerpt {
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card--featured {
    grid-column: span 3;
    display: grid;
    grid-template-columns: 1fr 1fr;
    border: none;
    border-bottom: 3px solid var(--red);
}

.article-card--featured .article-card__image {
    aspect-ratio: auto;
    height: 360px;
}

.article-card--featured .article-card__body {
    padding: 36px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.article-card--featured .article-card__title {
    font-size: 1.6rem;
    margin-bottom: 16px;
}

.article-card--featured .article-card__excerpt {
    font-size: 0.95rem;
    -webkit-line-clamp: 4;
}

/* ============================================================
   LEXICON TEASER
   ============================================================ */
.lexicon-teaser {
    background: var(--dark);
    color: var(--white);
    padding: var(--section-gap) 0;
}

.lexicon-teaser__inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--gutter);
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 60px;
    align-items: center;
}

.lexicon-teaser__heading-block .section-header {
    border-bottom-color: rgba(255,255,255,0.2);
    margin-bottom: 24px;
}

.lexicon-teaser__heading-block .section-header__title {
    color: var(--white);
}

.lexicon-teaser__desc {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.65);
    line-height: 1.7;
    margin-bottom: 28px;
}

.lexicon-teaser__cta {
    display: inline-block;
    border: 2px solid var(--red);
    color: var(--red);
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    padding: 12px 28px;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}
.lexicon-teaser__cta:hover {
    background: var(--red);
    color: var(--white);
}

.lexicon-terms {
    list-style: none;
    padding: 0;
    margin: 0;
    columns: 2;
    gap: 32px;
}

.lexicon-term {
    break-inside: avoid;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.lexicon-term__name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--white);
    margin-bottom: 4px;
}

.lexicon-term__name span {
    color: var(--red);
    font-weight: 300;
    margin: 0 6px;
    font-size: 0.8rem;
}

.lexicon-term__def {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.52);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================================
   SITE FOOTER
   ============================================================ */
.site-footer {
    background: var(--black);
    color: rgba(255,255,255,0.45);
    padding: 40px 0 28px;
    font-size: 0.8rem;
    border-top: 3px solid var(--red);
}

.site-footer__inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--gutter);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.site-footer__logo {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1.2rem;
    color: var(--white);
    letter-spacing: 0.04em;
    text-decoration: none;
}

.site-footer__nav {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 24px;
}

.site-footer__nav a {
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 0.6rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.45);
}
.site-footer__nav a:hover { color: var(--red); }

.site-footer__copy {
    font-size: 0.72rem;
    text-align: right;
}

/* ============================================================
   CONTENT PAGES (Rules, Lexicon, Single, etc.)
   ============================================================ */
.page-header {
    background: #4a4a4a;
    color: var(--white);
    padding: 78px 0 66px;
    border-bottom: 3px solid var(--red);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Pages (Rules, Lexicon, Articles) — no red border */
body.page .page-header {
    border-bottom: none;
}

/* Title pinned to the bottom of the hero (Articles archive) */
.page-header--title-bottom {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-top: 120px;
    padding-bottom: 24px;
}

/* When a hero photo is set, ensure text contrast */
.page-header[style*="background-image"] .page-header__inner {
    text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

.page-header__inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.page-header__label {
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 0.58rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--red);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.page-header__label::before {
    content: '';
    display: inline-block;
    width: 24px;
    height: 2px;
    background: var(--red);
}

.page-header__title {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(2.5rem, 5vw, 4rem);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1;
    color: var(--white);
}

.page-header__desc {
    margin-top: 16px;
    font-size: 1rem;
    color: rgba(255,255,255,0.6);
    max-width: 620px;
    line-height: 1.7;
}

/* ── Plain title bar (replaces dark page-header on articles/pages) ─── */
.post-title-bar {
    padding: 24px 0 20px;
    margin-bottom: 28px;
}

.post-title-bar__title {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(1.8rem, 4vw, 3rem);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1;
    color: var(--black);
    margin-top: 8px;
    margin-bottom: 0;
}

/* Meta bar inline below title — no background, no overlay */
.post-meta-bar--inline {
    background: none;
    padding: 0;
    margin-top: 12px;
    margin-bottom: 0;
}

/* Pages (Rules, Lexicon) — title only, no meta bar */
.post-title-bar--page {
    padding-top: 20px;
}

/* Two-column layout with sidebar */
.content-sidebar-wrap {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 52px var(--gutter);
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 52px;
    align-items: start;
}

/* When an ad strip sits directly above, match its bottom padding (32px) */
.ad-slot-page-header + .content-sidebar-wrap,
.ad-strip + .content-sidebar-wrap {
    padding-top: 32px;
}

/* Full-width content (Rules, Lexicon) */
.content-full {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 52px var(--gutter);
}

/* ============================================================
   THE RULES PAGE
   ============================================================ */
.rules-content {
    max-width: 800px;
}

.rules-content .intro-text {
    font-size: 1.05rem;
    color: var(--text-light);
    line-height: 1.75;
    margin-bottom: 28px;
}

.rules-content .intro-text p {
    margin-bottom: 1em;
}

.rule-entry {
    padding: 12px 16px;
    background: rgba(0,0,0,0.04);
    border-radius: 3px;
    margin-bottom: 6px;
}

.rule-entry__heading {
    display: block;
    margin-bottom: 6px;
    line-height: 1.4;
    font-size: 1rem;
}

.rule-entry__number {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1rem;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.rule-entry__sep {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1rem;
    color: var(--red);
}

.rule-entry__title {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 1rem;
    color: #444;
}

.rule-entry__body {
    font-size: 0.92rem;
    color: var(--text-light);
    line-height: 1.7;
}

.rule-entry__body p { margin-bottom: 0.8em; }
.rule-entry__body p:last-child { margin-bottom: 0; }

/* ============================================================
   THE LEXICON PAGE
   ============================================================ */
.lexicon-content {
    max-width: 860px;
}

.lexicon-intro {
    font-size: 1.05rem;
    color: var(--text-light);
    line-height: 1.75;
    margin-bottom: 28px;
}

.lexicon-entry {
    padding: 12px 16px;
    background: rgba(0,0,0,0.04);
    border-radius: 3px;
    margin-bottom: 6px;
}

.lexicon-entry__heading {
    display: block;
    margin-bottom: 6px;
    line-height: 1.4;
    font-size: 1rem;
}

.lexicon-entry__name {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1rem;
    color: #333;
    letter-spacing: 0.04em;
}

.lexicon-entry__sep {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1rem;
    color: var(--red);
}

.lexicon-entry__def {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 1rem;
    color: #444;
}

.lexicon-entry__body {
    font-size: 0.86rem;
    line-height: 1.65;
    color: var(--text-light);
}
.lexicon-entry__body p { margin-bottom: 0.7em; }
.lexicon-entry__body p:last-child { margin-bottom: 0; }

/* ============================================================
   ARCHIVE / ARTICLES
   ============================================================ */
.archive-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    margin-bottom: 48px;
}

/* ── Archive list (The Articles page) ──────────── */
.archive-list {
    margin-bottom: 40px;
}

.archive-year {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--white);
    background: #4a4a4a;
    display: inline-block;
    padding: 4px 12px;
    border-radius: 2px;
    margin: 32px 0 10px;
}
.archive-year:first-child { margin-top: 0; }

/* Card layout: thumb left, text right */
.archive-card {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 0;
    background: rgba(0,0,0,0.04);
    border-radius: 3px;
    margin-bottom: 14px;
    overflow: hidden;
}

.archive-card__thumb-link {
    display: block;
    flex-shrink: 0;
}

.archive-card__thumb {
    display: block;
    width: 140px;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 4/3;
}

.archive-card__body {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.archive-card__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 0.72rem;
}

.archive-card__cat {
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--red);
    text-decoration: none;
}

.archive-card__sep {
    color: var(--text-light);
    font-weight: 400;
}

.archive-card__date,
.archive-card__comments {
    color: var(--text-light);
}

.archive-card__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1rem;
    margin: 0;
    line-height: 1.3;
}
.archive-card__title a {
    color: var(--text);
    text-decoration: none;
}
.archive-card__title a:hover { color: var(--red); }

.archive-card__excerpt {
    font-size: 0.85rem;
    color: var(--text-light);
    margin: 0;
    line-height: 1.55;

    /* clamp to ~4 lines */
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* No thumbnail: let text fill both columns */
.archive-card:not(:has(.archive-card__thumb-link)) {
    grid-template-columns: 1fr;
}

/* ── Ad slot wrappers ──────────────────────────────── */
.ad-slot-page-header {
    margin: 24px auto;
    max-width: 970px;
    padding: 0 var(--gutter);
    display: flex;
    justify-content: center;
}

.ad-slot-page-header .vma-slot,
.ad-slot-page-header .vma-slot--empty {
    width: 100%;
    max-width: 970px;
    border-radius: 2px;
}

.ad-slot-inline {
    margin: 36px auto;
    max-width: 970px;
    padding: 0 var(--gutter);
    display: flex;
    justify-content: center;
}

.ad-slot-inline .vma-slot,
.ad-slot-inline .vma-slot--empty {
    width: 100%;
    max-width: 970px;
    border-radius: 3px;
}

.ad-slot-sidebar {
    margin-bottom: 24px;
    display: flex;
    justify-content: center;
}

/* Sidebar 300×250 — full widget width, correct aspect ratio */
.ad-placeholder--sidebar {
    width: 100%;
    height: auto;
    aspect-ratio: 6 / 2;
    margin-bottom: 24px;
    border-radius: 2px;
    flex: none;
}

/* ── Video lightbox overlay ────────────────────────── */
.video-lightbox-wrap {
    position: relative;
    display: block;
}

.video-lightbox-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--white);
    background: rgba(0,0,0,0.25);
    cursor: pointer;
    transition: background 0.2s;
    z-index: 1;
}
.video-lightbox-play:hover { background: rgba(0,0,0,0.45); }

.archive-filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 36px;
}

.archive-filter {
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 0.6rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    padding: 8px 18px;
    border: 2px solid var(--gray-mid);
    color: var(--text-light);
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s;
}
.archive-filter:hover,
.archive-filter.active {
    border-color: var(--red);
    color: var(--red);
}

.vsp-archive-link {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #333333;
    border-radius: 3px;
    padding: 16px 20px;
    margin-bottom: 32px;
    text-decoration: none;
    color: rgba(255,255,255,0.7);
    font-size: 0.85rem;
    transition: background 0.2s;
}
.vsp-archive-link:hover { background: #3a3a3a; color: var(--white); }
.vsp-archive-link strong {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--white);
}
.vsp-archive-link .vsp-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    background-image: url('images/velominati-super-prestige.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
    position: sticky;
    top: calc(110px + var(--gutter));
    max-height: calc(100vh - 110px - var(--gutter) - 16px);
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.sidebar::-webkit-scrollbar { display: none; }

/* Sidebar half-page slot: spacing + centering */
.ad-slot-sidebar-half {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.widget {
    margin-bottom: 40px;
}

.widget-title {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text);
    padding-bottom: 10px;
    border-bottom: 3px solid var(--red);
    margin-bottom: 20px;
}

.widget .book-sidebar-ad {
    display: block;
    margin-bottom: 16px;
    overflow: hidden;
}

.widget .book-sidebar-ad img {
    width: 100%;
    transition: transform 0.3s ease;
}
.widget .book-sidebar-ad:hover img { transform: scale(1.02); }

.widget select {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--gray-mid);
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--text);
    background: rgba(245, 242, 238, 0.45);
    cursor: pointer;
}

.search-form {
    display: flex;
    gap: 0;
}

.search-form input[type="search"] {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--gray-mid);
    border-right: none;
    font-family: var(--font-body);
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.6);
    outline: none;
}
.search-form input[type="search"]:focus {
    border-color: var(--red);
}

.search-form button {
    background: var(--red);
    color: var(--white);
    border: none;
    padding: 10px 16px;
    cursor: pointer;
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: background 0.2s;
}
.search-form button:hover { background: var(--red-dark); }

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-top: 48px;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    padding: 10px 16px;
    border: 2px solid var(--gray-mid);
    color: var(--text);
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s;
}
.pagination a:hover { border-color: var(--red); color: var(--red); }
.pagination .current {
    background: var(--red);
    border-color: var(--red);
    color: var(--white);
}

/* ============================================================
   SINGLE POST
   ============================================================ */
.post-content {
    max-width: var(--content-width);
}

.post-content h2, .post-content h3 {
    font-family: var(--font-display);
    font-weight: 700;
    margin: 1.8em 0 0.7em;
    color: var(--text);
}
.post-content h2 { font-size: 1.5rem; }
.post-content h3 { font-size: 1.2rem; }

.post-content p { line-height: 1.8; font-size: 1.02rem; }

.post-content ul, .post-content ol {
    margin-bottom: 1.2em;
}

.post-content img {
    margin: 24px 0;
    max-width: 100%;
}

.post-content figcaption,
.post-content .wp-caption-text {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    color: var(--text-light);
    margin-top: -16px; /* pull up under the image */
    margin-bottom: 24px;
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.04);
    line-height: 1.5;
}

.post-content blockquote {
    border-left: 4px solid var(--red);
    padding: 4px 0 4px 24px;
    margin: 28px 0;
    color: var(--text-light);
    font-style: italic;
}

/* ── Article hero image with title overlay ──────────────────── */
.post-hero-wrap {
    position: relative;
    margin-bottom: 0;  /* meta bar sits flush below */
    line-height: 0;
}

/* Kill any margin WordPress adds to the figure/img wrapper */
.post-hero-wrap img,
.post-hero-wrap figure,
.post-hero-wrap p {
    margin: 0;
    padding: 0;
    line-height: 0;
}

/* Gradient bar + title overlaid at the bottom of the image */
.post-hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 52px 20px 18px;
    background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.72) 55%);
    line-height: normal;
}

.post-hero-title {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 3em;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1.1;
    color: #fff;
    margin: 0;
}

/* ── Meta bar — sits flush below the hero image ─────────────── */
.post-meta-bar {
    display: flex;
    align-items: center;
    gap: 20px;
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gray-dark);
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.04);
    flex-wrap: wrap;
    margin-top: 0;
    margin-bottom: 28px;
}

.post-meta-bar a { color: var(--red); }
.post-meta-cat a { color: var(--red); text-decoration: none; }

/* Inline variant (no-image fallback) */
.post-meta-bar--inline {
    background: none;
    padding: 0;
    margin-top: 10px;
    margin-bottom: 0;
}

.comments-section {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 3px solid var(--red);
}

/* ── Comment list ─────────────────────────────────── */
#comments {
    margin-top: 32px;
}

.comments-title {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1.1rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.comment-navigation,
.comments-pagination {
    margin-bottom: 16px;
    font-size: 0.82rem;
}
.comment-navigation a,
.comments-pagination a {
    color: var(--red);
    text-decoration: none;
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 32px;
}
.comment-list .children {
    list-style: none;
    padding-left: 24px;
    margin-top: 6px;
}

/* Each comment card */
.comment-body {
    background: rgba(0,0,0,0.04);
    border-radius: 3px;
    padding: 12px 16px;
    margin-bottom: 6px;
}

/* Avatar | Name stacked above Date
   Use display:contents so the avatar, fn, and says
   become direct grid children alongside .comment-metadata */
.comment-meta {
    display: grid;
    grid-template-columns: 38px 1fr;
    column-gap: 10px;
    margin-bottom: 8px;
}
.comment-author.vcard {
    display: contents;
}
.comment-author .avatar {
    grid-column: 1;
    grid-row: 1 / 3;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    align-self: center;
}
.comment-author .fn {
    grid-column: 2;
    grid-row: 1;
    font-weight: 700;
    font-size: 0.82rem;
    color: var(--text);
    align-self: end;
}
.comment-author .fn a {
    color: var(--text);
    text-decoration: none;
}
.comment-author .says {
    display: none;
}
.comment-metadata {
    grid-column: 2;
    grid-row: 2;
    font-size: 0.74rem;
    color: var(--text-light);
    align-self: start;
}
.comment-metadata a {
    color: var(--text-light);
    text-decoration: none;
}
.comment-metadata .edit-link {
    margin-left: 8px;
}
.comment-metadata .edit-link a {
    color: var(--red);
}

/* Comment text */
.comment-content {
    font-size: 0.86rem;
    line-height: 1.65;
    color: var(--text);
    overflow-x: auto;
    word-break: break-word;
    overflow-wrap: break-word;
}
.comment-content p { margin-bottom: 0.7em; }
.comment-content p:last-child { margin-bottom: 0; }

/* Hide orphaned like/dislike plugin output */
.cld-like-dislike-wrap { display: none !important; }

/* Quoted comment blockquotes */
.comment-content blockquote {
    position: relative;
    background: rgba(0, 0, 0, 0.04);
    border-left: 3px solid var(--red);
    border-radius: 0 3px 3px 0;
    padding: 8px 0 10px 16px;
    margin: 10px 0 12px;
    margin-inline: 0;
    font-style: italic;
    color: var(--text-light);
    font-size: 0.83rem;
    line-height: 1.6;
}

/* ── Collapsible quote thread ─────────────────────────────────────────────── */

/* Toggle button — sits in the top-right corner of the blockquote */
.quote-thread-toggle {
    position: absolute;
    top: 6px;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-display);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--red);
    opacity: 0.5;
    padding: 0;
    line-height: 1;
    transition: opacity 0.15s;
}
.quote-thread-toggle:hover { opacity: 1; }

/* The collapsible wrapper around nested blockquotes */
.quote-thread.is-collapsed { display: none; }

/* "↑ AuthorName" back-link injected by JS for direct parent */
.blockquote-source {
    display: inline-block;
    margin-top: 7px;
    font-style: normal;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--red);
    text-decoration: none;
    opacity: 0.75;
    transition: opacity 0.15s;
}
.blockquote-source:hover { opacity: 1; text-decoration: underline; }

/* Reply link */
.comment-reply-link {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--red);
    text-decoration: none;
}

/* ── Comment navigation ───────────────────────────── */
.comment-navigation {
    margin-bottom: 16px;
    font-size: 0.82rem;
}
.comment-nav-links {
    display: flex;
    justify-content: flex-end;
    gap: 20px;
}
.comment-nav-links a {
    color: var(--red);
    text-decoration: none;
}
.comment-navigation--bottom {
    margin-top: 16px;
    margin-bottom: 0;
}

/* ── Comment form ─────────────────────────────────── */
#respond {
    background: rgba(245, 242, 238, 0.8);
    border-radius: 3px;
    padding: 20px 20px 16px;
    margin-top: 24px;
}

#reply-title,
.comment-reply-title {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 12px;
    display: block;
}

#respond .comment-notes,
#respond .logged-in-as {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 14px;
}
#respond .logged-in-as a { color: var(--red); text-decoration: none; }

#respond .comment-form-comment label { display: none; }

#respond .comment-form-author label,
#respond .comment-form-email label,
#respond .comment-form-url label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 4px;
}

#respond textarea,
#respond input[type="text"],
#respond input[type="email"],
#respond input[type="url"] {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--gray-mid);
    border-radius: 2px;
    background: rgba(245, 242, 238, 0.45);
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--text);
    outline: none;
    resize: vertical;
}
#respond textarea:focus,
#respond input:focus {
    border-color: var(--red);
}

#respond .comment-form-comment { margin-bottom: 0; }

/* Hide original submit paragraph only after JS has moved the button into .compose-footer */
#respond.compose-enhanced p.form-submit { display: none; }

/* ── Compose layout ──────────────────────────────────────────────────────── */

/* Avatar source element — hidden, JS reads it to build the row */
.compose-avatar-source { display: none; }

/* ── RTE toolbar ─────────────────────────────────────────────── */
.rte-toolbar {
    display: flex;
    gap: 2px;
    margin-bottom: 6px;
}
.rte-tool {
    background: none;
    border: 1px solid transparent;
    border-radius: 3px;
    color: var(--text-light);
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 0.72rem;
    line-height: 1;
    padding: 4px 8px;
    min-width: 28px;
    text-align: center;
    transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.rte-tool:hover {
    background: rgba(0,0,0,0.06);
    color: var(--near-black);
    border-color: rgba(0,0,0,0.1);
}
.rte-tool.is-active {
    background: var(--near-black);
    color: #fff;
    border-color: var(--near-black);
}


/* ── Rich text editor (contenteditable) ─────────────────────── */
.rte-editor {
    width: 100%;
    min-height: 80px;
    max-height: 320px;
    overflow-y: auto;
    padding: 9px 12px;
    border: 1px solid #d8d3cb;
    border-radius: 2px;
    background: #fff;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--near-black);
    outline: none;
    transition: border-color 0.2s, min-height 0.35s cubic-bezier(0.4,0,0.2,1);
    word-break: break-word;
}
.rte-editor:focus {
    border-color: var(--red);
    min-height: 160px;
}
/* Placeholder via ::before when editor is empty */
.rte-editor:empty::before,
.rte-editor:not(:focus):not(:has(*)):empty::before {
    content: attr(data-placeholder);
    color: #aaa;
    pointer-events: none;
}
/* Handle the common case: editor has only a <br> child (browser default) */
.rte-editor > br:only-child::before {
    content: attr(data-placeholder);
    color: #aaa;
}
/* Blockquotes inside the editor */
.rte-editor blockquote {
    border-left: 3px solid var(--red);
    margin: 8px 0;
    padding: 6px 12px;
    background: rgba(0,0,0,0.03);
    color: var(--text-light);
    font-style: italic;
}
.rte-editor blockquote .blockquote-source {
    display: block;
    font-style: normal;
    font-size: 0.75rem;
    color: var(--red);
    margin-top: 4px;
    text-decoration: none;
}
.rte-editor p { margin: 0 0 6px; }
.rte-editor p:last-child { margin-bottom: 0; }
.rte-editor a { color: var(--red); }
.rte-editor code {
    font-family: var(--font-mono, monospace);
    font-size: 0.88em;
    background: rgba(0,0,0,0.06);
    padding: 1px 4px;
    border-radius: 2px;
}

/* ── Comment reply area — tile links side by side ───────────── */
.reply {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    margin-top: 8px;
}

/* ── Quote button on each comment ───────────────────────────── */
.comment-quote-btn {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 2px 6px;
    opacity: 0.55;
    transition: opacity 0.15s, color 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.comment-quote-btn:hover {
    opacity: 1;
    color: var(--red);
}

/* Row: avatar circle + textarea side by side */
.compose-row {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.compose-avatar {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

.compose-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.compose-avatar .compose-avatar-badge {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
}

.compose-row .comment-form-comment {
    flex: 1;
    min-width: 0;
}

/* Footer: char count left, POST button right */
.compose-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 14px;
    margin-top: 10px;
    padding-left: 54px; /* indent to align with textarea */
}

.compose-char-count {
    font-size: 0.7rem;
    font-family: var(--font-display);
    letter-spacing: 0.06em;
    color: var(--text-light);
    opacity: 0.5;
    min-width: 60px;
    text-align: right;
}

/* POST button: visible at rest, fully opaque on focus */
.compose-footer .btn-primary {
    opacity: 0.45;
    transform: translateY(0);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

#respond.compose-active .compose-footer .btn-primary {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-block;
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    padding: 14px 32px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    border: 2px solid transparent;
}
.btn-primary {
    background: var(--red);
    color: var(--white);
    border-color: var(--red);
}
.btn-primary:hover {
    background: var(--red-dark);
    border-color: var(--red-dark);
    color: var(--white);
}
.btn-outline {
    background: transparent;
    color: var(--white);
    border-color: rgba(255,255,255,0.4);
}
.btn-outline:hover {
    border-color: var(--red);
    color: var(--red);
}

.center-btn {
    text-align: center;
    margin-top: 40px;
}

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

/* ── Tablet: ≤ 1024px ──────────────────────────────────────── */
@media (max-width: 1024px) {
    /* Homepage article grid */
    .article-grid { grid-template-columns: repeat(2, 1fr); }
    .article-card--featured { grid-column: span 2; }

    /* Hero */
    .hero-rules { padding: 60px 0 40px; }
    .hero-rules__inner { grid-template-columns: 1fr; gap: 32px; }
    .hero-rules__right { display: none; }

    /* Lexicon teaser */
    .lexicon-teaser__inner { grid-template-columns: 1fr; gap: 40px; }
    .lexicon-terms { columns: 1; }

    /* Content + sidebar stack */
    .content-sidebar-wrap {
        grid-template-columns: 1fr;
        padding: 36px var(--gutter);
        gap: 36px;
    }
    .sidebar { position: static; }

    /* Ad billboard constrained */
    .ad-placeholder--billboard { width: 100%; }
    .ad-slot-page-header { margin-top: 16px; }
}

/* ── Mobile: ≤ 768px ───────────────────────────────────────── */
@media (max-width: 768px) {
    :root {
        --section-gap: 44px;
        --gutter: 16px;
    }

    /* ── Global ── */
    img, video, iframe { max-width: 100%; height: auto; }

    /* ── Admin bar — hide entirely on mobile ── */
    #wpadminbar { display: none !important; }
    html { margin-top: 0 !important; }
    .admin-bar .site-header { top: 0 !important; }

    /* ── Header / Nav ── */
    .site-header__inner {
        flex-wrap: wrap;
        align-items: flex-start;
        justify-content: space-between;
        gap: 0;
        padding: 0 16px;
    }
    .site-logo { padding: 10px 0; }
    .site-logo__img { height: 44px; width: auto; }
    .nav-toggle { display: flex; margin-top: 14px; margin-left: auto; }
    #primary-nav { width: 100%; order: 3; }
    .site-nav {
        display: flex;
        flex-direction: column;
        width: 100%;
        background: var(--black);
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.32s ease, opacity 0.25s ease;
    }
    .site-nav.is-open {
        max-height: 400px;
        opacity: 1;
    }
    .site-nav li { width: 100%; }
    .site-nav a {
        border: none;
        border-top: 1px solid rgba(255,255,255,0.08);
        justify-content: flex-start;
        flex-direction: row;
        gap: 10px;
        padding: 12px 16px;
        width: 100%;
        box-sizing: border-box;
    }
    .nav-label-small { font-size: 0.6rem; }
    .nav-label-main  { font-size: 0.85rem; }

    /* ── Page header ── */
    .page-header { padding: 44px 0 32px; }
    .ad-slot-page-header { display: none; } /* hide billboard inside header on mobile */

    /* ── Homepage hero ── */
    .hero-rules { padding: 44px 0 32px; }
    .hero-rules__heading { font-size: clamp(2.8rem, 10vw, 5rem); }
    .hero-rules__intro { font-size: 0.9rem; }
    .hero-rules__cta { padding: 12px 24px; font-size: 0.8rem; }

    /* ── Ad strip — hide billboard, center the 300×250 ── */
    .ad-strip__inner { justify-content: center; }
    .ad-strip__inner .ad-slot-page-header { display: none; }
    .ad-strip__inner .ad-slot-sidebar { flex: 0 0 300px; width: 300px; }
    .ad-placeholder--billboard { width: 100%; height: 100px; }
    .ad-placeholder--rect { flex: none; width: 100%; }
    .ad-slot-inline { margin: 24px 0; }

    /* ── Mobile inline ad (articles + pages) ── */
    .ad-slot-mobile-inline {
        display: flex;
        justify-content: center;
        margin: 20px 0 28px;
    }

    /* ── Homepage article grid ── */
    .article-grid { grid-template-columns: 1fr; gap: 20px; }
    .article-card--featured {
        grid-column: span 1;
        grid-template-columns: 1fr;
    }
    .article-card--featured .article-card__image { height: 200px; }

    /* ── Content + sidebar ── */
    .content-sidebar-wrap { padding: 24px 16px; gap: 28px; }

    /* ── Archive cards ── */
    .archive-card {
        grid-template-columns: 100px 1fr;
    }
    .archive-card__thumb { width: 100px; aspect-ratio: 1; }
    .archive-card__body { padding: 10px 12px; gap: 4px; }
    .archive-card__title { font-size: 0.88rem; }
    .archive-card__excerpt { -webkit-line-clamp: 2; }

    /* ── Archive year headers ── */
    .archive-year { margin: 20px 0 8px; }

    /* ── VSP link ── */
    .vsp-archive-link { flex-direction: row; gap: 12px; padding: 12px 16px; }
    .vsp-archive-link .vsp-icon { width: 36px; height: 36px; flex-shrink: 0; }

    /* ── Rules page ── */
    .rule-entry { padding: 10px 12px; }
    .rule-entry__heading { flex-wrap: wrap; gap: 2px; }

    /* ── Lexicon page ── */
    .lexicon-entry { padding: 10px 12px; }
    .lexicon-entry__heading { flex-wrap: wrap; }

    /* ── Single post ── */
    .post-meta-bar { flex-wrap: wrap; gap: 6px; font-size: 0.78rem; }
    .post-content { font-size: 1.05rem; line-height: 1.75; }
    .post-content figcaption,
    .post-content .wp-caption-text { font-size: 0.8rem; }

    /* ── Comments ── */
    .comments-title { font-size: 1rem; }
    .comment-list .comment { padding: 10px 12px; }

    /* ── Lexicon teaser (homepage) ── */
    .lexicon-teaser__inner { padding: 0 var(--gutter); }
    .lexicon-terms { columns: 1; gap: 12px; }

    /* ── Book ads ── */
    .hero-books { flex-direction: column; }
    .hero-book-ad img { width: 100%; }
    .book-sidebar-ad { margin-bottom: 12px; }

    /* ── Footer ── */
    .site-footer__inner { flex-direction: column; align-items: center; text-align: center; gap: 16px; }
    .site-footer__nav { flex-wrap: wrap; justify-content: center; gap: 12px; }

    /* ── Plain title bar ── */
    .post-title-bar { padding: 24px 0 16px; }
    .post-title-bar__title { font-size: clamp(1.6rem, 6vw, 2.5rem); }

    /* ── Post hero overlay title ── */
    .post-hero-title { font-size: clamp(1rem, 4vw, 1.4rem); }
    .post-hero-overlay { padding: 36px 14px 12px; }
    .post-meta-bar { gap: 12px; font-size: 0.62rem; }

    /* ── Compose form — reduce avatar size ── */
    .compose-avatar,
    .compose-avatar img { width: 32px; height: 32px; }
    .compose-footer { padding-left: 46px; }
}

/* ── Small mobile: ≤ 480px ─────────────────────────────────── */
@media (max-width: 480px) {
    /* Archive cards: stack thumbnail above body */
    .archive-card {
        grid-template-columns: 1fr;
    }
    .archive-card__thumb {
        width: 100%;
        height: 160px;
        aspect-ratio: unset;
    }
    .archive-card__body { padding: 10px 12px; }

    /* Page header title */
    .page-header__title { font-size: 2rem; }

    /* Homepage hero */
    .hero-rules__heading { font-size: 2.8rem; }

    /* Pagination */
    .pagination { flex-wrap: wrap; gap: 4px; font-size: 0.8rem; }
    .pagination a, .pagination span { padding: 6px 10px; }

    /* Section headers */
    .section-header { flex-direction: column; align-items: flex-start; gap: 8px; }

    /* Post hero caption — stack items at very small sizes */
    .post-hero-wrap .post-meta-bar { font-size: 0.65rem; gap: 8px; }
}

/* ── Inline rule card — [rule number=N] shortcode ─────────────────── */
.rule-inline-card {
    background: transparent;
    border-radius: 4px;
    border-left: 4px solid var(--red);
    padding: 24px 28px 18px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    margin: 36px 0;
}

.rule-inline-card .rule-entry {
    background: none;
    padding: 0;
    margin: 0;
}

.rule-inline-card__link {
    display: inline-block;
    margin-top: 14px;
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--red);
    text-decoration: none;
}

.rule-inline-card__link:hover { text-decoration: underline; }

/* ============================================================
   RULE REFERENCE EASTER EGGS
   ============================================================ */

/* The inline links — almost invisible, just a dotted underline */
.rule-ref,
.lexicon-ref {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dotted rgba(0, 0, 0, 0.30);
    cursor: pointer;
    transition: border-bottom-color 0.15s, color 0.15s;
}
.rule-ref:hover,
.rule-ref:focus,
.lexicon-ref:hover,
.lexicon-ref:focus {
    color: var(--red);
    border-bottom-color: var(--red);
    outline: none;
}

/* ── Tooltip ─────────────────────────────────────────────────────────────── */
#rule-tooltip,
#lexicon-tooltip {
    position: absolute;
    z-index: 9000;
    max-width: 280px;
    background: #1a1a1a;
    color: #e8e8e8;
    border-radius: 3px;
    padding: 10px 14px;
    pointer-events: none;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.15s ease, transform 0.15s ease;
    line-height: 1.5;
    box-shadow: 0 4px 16px rgba(0,0,0,0.35);
}
#rule-tooltip.is-visible,
#lexicon-tooltip.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.rule-tooltip__num {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    color: var(--red);
    margin-bottom: 3px;
}
.rule-tooltip__title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.85rem;
    color: #fff;
    margin-bottom: 4px;
}
.rule-tooltip__body {
    font-size: 0.78rem;
    color: #aaa;
    line-height: 1.55;
}

/* ── Modal overlay ────────────────────────────────────────────────────────── */
#rule-overlay,
#lexicon-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9100;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}
#rule-overlay.is-open,
#lexicon-overlay.is-open {
    display: flex;
}
.rule-overlay__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    animation: ruleOverlayFadeIn 0.18s ease;
}
.rule-overlay__card {
    position: relative;
    z-index: 1;
    background: #fff;
    border-radius: 4px;
    max-width: 600px;
    width: 100%;
    padding: 32px 36px;
    box-shadow: 0 12px 48px rgba(0,0,0,0.28);
    animation: ruleOverlaySlideIn 0.2s ease;
}
.rule-overlay__close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    font-size: 1.6rem;
    line-height: 1;
    color: #999;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 2px;
}
.rule-overlay__close:hover { color: var(--red); }
.rule-overlay__body .rule-entry,
.rule-overlay__body .lexicon-entry {
    background: none;
    padding: 0;
    margin: 0;
}
.rule-overlay__body .rule-entry__number  { font-size: 1.05rem; }
.rule-overlay__body .rule-entry__title   { font-size: 1.05rem; }
.rule-overlay__body .rule-entry__body    { font-size: 0.95rem; margin-top: 10px; }
.rule-overlay__body .lexicon-entry__name { font-size: 1.05rem; }
.rule-overlay__body .lexicon-entry__def  { font-size: 1.05rem; }
.rule-overlay__body .lexicon-entry__body { font-size: 0.95rem; margin-top: 10px; }

@keyframes ruleOverlayFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes ruleOverlaySlideIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 480px) {
    .rule-overlay__card { padding: 24px 20px; }
    #rule-tooltip { max-width: 220px; }
}

/* ============================================================
   COMMENTS UX — INFINITE SCROLL + STICKY REPLY FORM
   ============================================================ */

/* Shrink the comment textarea to roughly half the WP default */
#respond textarea#comment {
    height: 80px;
    min-height: 60px;
    resize: vertical;
    transition: height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
#respond textarea#comment:focus {
    height: 160px;
}

/* Loading indicator between pages */
.comments-loading {
    text-align: center;
    padding: 20px 0;
    font-size: 0.85rem;
    color: var(--gray-mid, #999);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* Zero-height sentinel used by IntersectionObserver */
.comments-sentinel {
    height: 1px;
    margin: 0;
    padding: 0;
    visibility: hidden;
}

/* ── Sticky reply form ───────────────────────────────────── */
body.comments-sticky-mode #respond {
    position: fixed;
    bottom: 0;
    /* left & width are set dynamically by JS to match the #main column */
    z-index: 200;
    background: rgba(245, 242, 238, 0.8);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-top: 2px solid var(--red, #cc0000);
    padding: 16px var(--gutter, 24px);
    box-shadow: 0 -6px 32px rgba(0, 0, 0, 0.13);
    animation: respondSlideUp 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes respondSlideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* In sticky mode, constrain inner form to readable width */
body.comments-sticky-mode #respond #commentform {
    max-width: 860px;
    margin: 0 auto;
}

/* Keep the form title compact when sticky */
body.comments-sticky-mode #respond #reply-title {
    font-size: 1rem;
    margin-bottom: 8px;
}

/* Ensure body has room for the fixed form */
/* (padding-bottom is set dynamically via JS; these are safe minimums) */
body.comments-sticky-mode .comments-section {
    /* JS sets exact padding-bottom; this is a fallback minimum */
    padding-bottom: 200px;
}

@media (max-width: 600px) {
    /* On mobile the layout is single-column so full-width is correct */
    body.comments-sticky-mode #respond {
        left: 0 !important;
        width: 100% !important;
        padding: 12px var(--gutter, 24px);
        /* Solid fallback — backdrop-filter not reliable on all mobile browsers */
        background: rgba(245, 242, 238, 0.95);
    }
}

/* ── Comment speed control pill ─────────────────────────────────── */
.comments-speed-ctrl {
    position: fixed;
    bottom: 72px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(16, 16, 16, 0.85);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: rgba(255, 255, 255, 0.7);
    border-radius: 20px;
    padding: 5px 10px 5px 14px;
    font-size: 0.67rem;
    font-family: var(--font-mono, 'Courier New', monospace);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}
.comments-speed-ctrl.csc-visible {
    opacity: 1;
    pointer-events: auto;
}
.comments-speed-ctrl.csc-done {
    opacity: 0;
    pointer-events: none;
}
.csc-label {
    white-space: nowrap;
}
.csc-jump {
    background: none;
    border: none;
    border-left: 1px solid rgba(255,255,255,0.15);
    color: var(--red);
    cursor: pointer;
    font-size: 0.67rem;
    font-family: var(--font-mono, 'Courier New', monospace);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 2px 4px 2px 8px;
    line-height: 1;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    transition: opacity 0.15s;
}
.csc-jump option {
    background: #1a1a1a;
    color: #fff;
    font-weight: normal;
    text-transform: none;
    letter-spacing: 0;
}
.csc-jump:disabled {
    opacity: 0.25;
    cursor: default;
}
.csc-jump:not(:disabled):hover {
    opacity: 0.75;
}
.csc-top {
    background: none;
    border: none;
    border-right: 1px solid rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    font-size: 0.67rem;
    font-family: var(--font-mono, 'Courier New', monospace);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 2px 8px 2px 2px;
    line-height: 1;
    transition: color 0.15s;
}
.csc-top:hover {
    color: #fff;
}
@media (max-width: 768px) {
    .comments-speed-ctrl {
        display: none !important;
    }
}
