/* ============================================================
   THE CORNMILL INTELLIGENCER — Broadsheet Stylesheet
   ============================================================ */

:root {
    --color-bg:          #E6E4DF;
    --color-paper:       #E6E4DF;
    --color-text:        #2A2118;
    --color-text-light:  #6B5E52;
    --color-accent:      #7A2518;
    --color-link:        #2A2118;
    --color-link-hover:  #7A2518;
    --color-rule:        #B8AD98;
    --color-rule-light:  #D6CFC2;

    --color-tag-dogs:       #9A6B1A;
    --color-tag-science:    #3A5A78;
    --color-tag-community:  #3D6B4A;
    --color-tag-health:     #6B4060;
    --color-tag-news:       #7A2518;
    --color-tag-pro-audio:  #3A3A42;
    --color-tag-ai:         #2A5E52;
    --color-tag-whats-on:   #8A4A22;
    --color-tag-page-3:     #6B4060;
    --color-tag-features:   #7A2518;

    --font-headline: "Georgia", "Times New Roman", "Palatino", serif;
    --font-body:     "Georgia", "Times New Roman", serif;
    --font-sans:     -apple-system, "Helvetica Neue", "Segoe UI", sans-serif;
    --font-mono:     "Courier New", monospace;

    --max-width: 1100px;
    --column-rule: 1px solid var(--color-rule-light);
}

/* ---- Reset & Base ---- */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--color-link); text-decoration: none; }
a:hover { color: var(--color-link-hover); }

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

/* ---- Container ---- */

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    background: var(--color-paper);
    box-shadow: 0 0 40px rgba(0,0,0,0.08);
}

main > .container {
    padding-bottom: 40px;
}

/* ---- Masthead ---- */

.masthead {
    padding: 10px 0 0;
    text-align: center;
    background: var(--color-bg);
    border-bottom: none;
}

.masthead > .container {
    background: var(--color-bg);
}

/* Masthead banner: crest – title – crest */
.masthead-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.masthead-crest {
    width: 200px;
    height: auto;
    flex-shrink: 0;
    display: none;  /* hidden on small screens */
}

@media (min-width: 800px) {
    .masthead-crest { display: block; }
}

@media (min-width: 1000px) {
    .masthead-crest { width: 220px; }
}

.masthead-image-link {
    display: block;
    max-width: 680px;
    flex: 1 1 auto;
    margin: 0 0 4px;
}

.masthead-img {
    width: 100%;
    height: auto;
}

.masthead .edition-line {
    font-family: var(--font-sans);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    color: var(--color-text-light);
    text-transform: uppercase;
    margin-bottom: 8px;
}

@media (max-width: 600px) {
    .edition-label-full { display: none; }
}

/* Thick-thin rule below masthead */
.masthead::after {
    content: "";
    display: block;
    border-top: 3px solid var(--color-text);
    border-bottom: 1px solid var(--color-text);
    height: 5px;
    margin: 0;
}

.masthead-title {
    font-family: var(--font-headline);
    font-size: 3.4rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: var(--color-text);
    line-height: 1.05;
    margin-bottom: 2px;
}

.masthead-motto {
    font-family: var(--font-headline);
    font-style: italic;
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin-bottom: 10px;
}

/* ---- Navigation ---- */

.main-nav {
    display: flex;
    justify-content: center;
    gap: 0;
    padding: 6px 0;
    border-top: 1px solid var(--color-rule);
    border-bottom: 1px solid var(--color-rule);
    flex-wrap: wrap;
    background: var(--color-paper);
}

.main-nav a {
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 3px 14px;
    color: var(--color-text);
    border-right: 1px solid var(--color-rule-light);
    transition: color 0.15s;
}

.main-nav a:last-child {
    border-right: none;
}

.main-nav a:hover {
    color: var(--color-accent);
    background: transparent;
}

.main-nav a.active {
    color: var(--color-accent);
    background: transparent;
    font-weight: 700;
}

/* ---- More Dropdown ---- */

.nav-more {
    position: relative;
    border-right: 1px solid var(--color-rule-light);
}

.nav-more-toggle {
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 3px 14px;
    color: var(--color-text);
    cursor: pointer;
    transition: color 0.15s;
}

.nav-more-toggle:hover {
    color: var(--color-accent);
}

.nav-more-toggle.active {
    color: var(--color-accent);
    font-weight: 700;
}

.nav-more-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-paper);
    border: 1px solid var(--color-rule);
    border-top: 2px solid var(--color-text);
    padding: 6px 0;
    min-width: 160px;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.nav-more:hover .nav-more-dropdown {
    display: block;
}

.nav-more-dropdown a {
    display: block;
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 5px 16px;
    color: var(--color-text);
    border-right: none;
}

.nav-more-dropdown a:hover {
    color: var(--color-accent);
    background: rgba(0,0,0,0.03);
}

.nav-more-dropdown a.active {
    color: var(--color-accent);
    font-weight: 700;
}

/* Mobile-only items hidden on desktop */
.nav-more-dropdown a.nav-mobile-only {
    display: none;
}

@media (max-width: 600px) {
    .nav-collapsible {
        display: none;
    }
    .nav-more-dropdown a.nav-mobile-only {
        display: block;
    }
    /* Highlight More toggle when a collapsed item is active */
    .nav-more.nav-more-mobile-active .nav-more-toggle {
        color: var(--color-accent);
        font-weight: 700;
    }
}

/* ---- Section Rules ---- */

.section-rule {
    border: none;
    border-top: 1px solid var(--color-rule);
    margin: 24px 0;
    position: relative;
}

.section-rule::after {
    content: "\2767"; /* ❧ floral heart / hedera */
    position: absolute;
    top: -9px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-paper);
    padding: 0 12px;
    color: var(--color-rule);
    font-size: 0.85rem;
}

/* ---- Category Tags ---- */

.category-tag {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 2px 8px;
    border: 1px solid currentColor;
    background: transparent;
    border-radius: 0;
}

.tag-dogs-and-animals      { color: var(--color-tag-dogs); }
.tag-science-and-technology { color: var(--color-tag-science); }
.tag-community              { color: var(--color-tag-community); }
.tag-health                 { color: var(--color-tag-health); }
.tag-news                   { color: var(--color-tag-news); }
.tag-pro-audio              { color: var(--color-tag-pro-audio); }
.tag-ai                     { color: var(--color-tag-ai); }
.tag-whats-on               { color: var(--color-tag-whats-on); }

.subcategory-tag {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 0.55rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 1px 6px;
    color: var(--color-text-light);
    border: 1px solid var(--color-rule-light);
    margin-left: 3px;
}

/* ---- Mood Line ---- */

.mood-line {
    text-align: center;
    padding: 12px 0;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--color-rule-light);
}

.mood-line p {
    font-style: italic;
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin: 0;
}

/* ---- Featured Story ---- */

.featured-story {
    margin: 24px 0;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--color-rule);
    overflow: hidden; /* clearfix */
}

.featured-image {
    float: left;
    width: 48%;
    margin-right: 28px;
    margin-bottom: 12px;
}

.featured-image:empty,
.article-image:empty {
    display: none;
}

.featured-story > .category-tag {
    margin-bottom: 8px;
}

.featured-headline {
    font-family: var(--font-headline);
    font-size: 2.2rem;
    line-height: 1.12;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.featured-headline a {
    color: var(--color-text);
}

.featured-headline a:hover {
    color: var(--color-accent);
}

.featured-deck {
    font-family: var(--font-headline);
    font-style: italic;
    font-size: 1rem;
    color: var(--color-text-light);
    margin-bottom: 12px;
    line-height: 1.5;
}

.featured-lede {
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 12px;
    text-align: justify;
    hyphens: auto;
}

.featured-deck + .featured-lede::first-letter {
    float: left;
    font-size: 3.6em;
    line-height: 0.78;
    padding-right: 6px;
    padding-top: 5px;
    font-family: var(--font-headline);
    color: var(--color-accent);
    font-weight: 700;
}

.read-more {
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-accent);
}

/* ---- Story Grid (newspaper columns) ---- */

.story-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0;
    margin: 0;
    border-top: 2px solid var(--color-text);
    padding-top: 16px;
}

.story-card {
    background: transparent;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
    border-right: var(--column-rule);
    padding: 12px 18px 18px;
    transition: none;
    grid-column: span 2; /* default: 1/3 width (2 of 6 cols) */
    display: flex;
    flex-direction: column;
    height: 620px;
}

.story-card:hover {
    box-shadow: none;
    transform: none;
}

/* ---- Lede & read-more ---- */

.card-read-more {
    display: none;
}

.card-lede {
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--color-text);
    margin-top: 6px;
    flex: 1 1 0;
    overflow: hidden;
}

/* ---- Irregular layout pattern ---- */

/* Row 1: wide story (4 cols) + narrow story (2 cols) */
.story-card:nth-child(1) {
    grid-column: span 4;
    border-bottom: 1px solid var(--color-rule-light);
}

.story-card:nth-child(1) {
    display: block; /* override flex for float layout */
}

.story-card:nth-child(1) .card-image {
    float: left;
    width: 50%;
    margin-right: 18px;
    margin-bottom: 6px;
    display: block;
}

.story-card:nth-child(1) .card-body {
    overflow: visible;
}

.story-card:nth-child(1) .card-headline {
    font-size: 1.5rem;
    line-height: 1.18;
}

.story-card:nth-child(1) .card-lede {
    -webkit-line-clamp: unset;
    font-size: 0.9rem;
    line-height: 1.65;
    margin-top: 8px;
    text-align: justify;
    hyphens: auto;
}

.story-card:nth-child(1) .card-read-more {
    display: inline-block;
    margin-top: 8px;
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-accent);
}

/* clearfix for float */
.story-card:nth-child(1) .card-body::after {
    content: "";
    display: table;
    clear: both;
}

.story-card:nth-child(2) {
    grid-column: span 2;
    border-right: none;
    border-bottom: 1px solid var(--color-rule-light);
}

/* Row 2: three equal columns */
.story-card:nth-child(3),
.story-card:nth-child(4),
.story-card:nth-child(5) {
    grid-column: span 2;
    border-bottom: 1px solid var(--color-rule-light);
}

.story-card:nth-child(5) {
    border-right: none;
}

/* Row 3: narrow (2 cols) + wide (4 cols) — mirror of row 1 */
.story-card:nth-child(6) {
    grid-column: span 2;
    border-bottom: 1px solid var(--color-rule-light);
}

.story-card:nth-child(7) {
    grid-column: span 4;
    border-right: none;
    border-bottom: 1px solid var(--color-rule-light);
}

.story-card:nth-child(7) {
    display: block;
}

.story-card:nth-child(7) .card-image {
    float: right;
    width: 50%;
    margin-left: 18px;
    margin-bottom: 6px;
    display: block;
}

.story-card:nth-child(7) .card-body {
    overflow: visible;
}

.story-card:nth-child(7) .card-headline {
    font-size: 1.5rem;
    line-height: 1.18;
}

.story-card:nth-child(7) .card-lede {
    -webkit-line-clamp: unset;
    font-size: 0.9rem;
    line-height: 1.65;
    margin-top: 8px;
    text-align: justify;
    hyphens: auto;
}

.story-card:nth-child(7) .card-read-more {
    display: inline-block;
    margin-top: 8px;
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-accent);
}

.story-card:nth-child(7) .card-body::after {
    content: "";
    display: table;
    clear: both;
}

/* Row 4+: three equal columns again */
.story-card:nth-child(8),
.story-card:nth-child(9),
.story-card:nth-child(10) {
    grid-column: span 2;
    border-bottom: 1px solid var(--color-rule-light);
}

.story-card:nth-child(10) {
    border-right: none;
}

/* Row 5: wide + narrow (repeat row 1 pattern) */
.story-card:nth-child(11) {
    grid-column: span 4;
    border-bottom: 1px solid var(--color-rule-light);
}

.story-card:nth-child(11) {
    display: block;
}

.story-card:nth-child(11) .card-body {
    overflow: visible;
}

.story-card:nth-child(11) .card-image {
    float: left;
    width: 50%;
    margin-right: 18px;
    margin-bottom: 6px;
    display: block;
}

.story-card:nth-child(11) .card-headline {
    font-size: 1.5rem;
    line-height: 1.18;
}

.story-card:nth-child(11) .card-lede {
    -webkit-line-clamp: unset;
    font-size: 0.9rem;
    line-height: 1.65;
    margin-top: 8px;
    text-align: justify;
    hyphens: auto;
}

.story-card:nth-child(11) .card-read-more {
    display: inline-block;
    margin-top: 8px;
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-accent);
}

.story-card:nth-child(11) .card-body::after {
    content: "";
    display: table;
    clear: both;
}

.story-card:nth-child(12) {
    grid-column: span 2;
    border-right: none;
    border-bottom: 1px solid var(--color-rule-light);
}

/* Any overflow stories: three-column row */
.story-card:nth-child(n+13) {
    grid-column: span 2;
}

.story-card:nth-child(3n+15) {
    border-right: none;
}

/* Remove bottom border from last row */
.story-card:last-child,
.story-card:nth-last-child(1),
.story-card:nth-last-child(2),
.story-card:nth-last-child(3) {
    border-bottom: none;
}

/* Remove right border from last card in any row */
.story-card:nth-child(3n+5) {
    border-right: none;
}

.card-image {
    margin-bottom: 10px;
    flex: 0 0 auto;
    overflow: hidden;
}

.card-image:empty {
    display: none;
}

.card-body {
    padding: 0;
    flex: 1 1 auto;
    overflow: hidden;
    position: relative;
}

.card-body::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(transparent, var(--color-paper));
    pointer-events: none;
}

.card-body .category-tag {
    margin-bottom: 6px;
}

.card-headline {
    font-family: var(--font-headline);
    font-size: 1.15rem;
    line-height: 1.22;
    margin-bottom: 6px;
    letter-spacing: -0.01em;
}

.card-headline a {
    color: var(--color-text);
}

.card-headline a:hover {
    color: var(--color-accent);
}

.card-deck {
    font-size: 0.85rem;
    color: var(--color-text-light);
    line-height: 1.55;
    text-align: justify;
    hyphens: auto;
}

/* ---- Image Styles ---- */

.image-placeholder {
    background: #DDD9D3;
    width: 100%;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-rule-light);
    overflow: hidden;
}

.image-placeholder .placeholder-icon {
    font-size: 2.4rem;
    opacity: 0.3;
    line-height: 1;
}

.image-placeholder .placeholder-caption {
    font-family: var(--font-sans);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-light);
    opacity: 0.5;
    margin-top: 4px;
}


.article-image img,
.featured-image img {
    width: 100%;
    height: auto;
    border: 1px solid var(--color-rule-light);
}

.card-image img {
    width: 100%;
    border: 1px solid var(--color-rule-light);
}

/* In flex cards (standard 2-col), image uses natural height */
.story-card:not(:nth-child(1)):not(:nth-child(7)):not(:nth-child(11)) .card-image img {
    height: auto;
}

/* In float cards (wide 4-col), image uses natural height */
.story-card:nth-child(1) .card-image img,
.story-card:nth-child(7) .card-image img,
.story-card:nth-child(11) .card-image img {
    height: auto;
}

/* ---- Article Full ---- */

.article-full {
    max-width: 680px;
    margin: 0 auto;
    padding: 28px 0 60px;
}

.article-header {
    margin-bottom: 20px;
}

.article-header .category-tag {
    margin-bottom: 10px;
}

.article-headline {
    font-family: var(--font-headline);
    font-size: 2.6rem;
    line-height: 1.1;
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}

.article-deck {
    font-family: var(--font-headline);
    font-style: italic;
    font-size: 1.1rem;
    color: var(--color-text-light);
    line-height: 1.5;
    margin-bottom: 14px;
}

.article-meta {
    display: flex;
    gap: 16px;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-top: 1px solid var(--color-rule);
    border-bottom: 1px solid var(--color-rule);
    padding: 6px 0;
    flex-wrap: wrap;
}

.article-meta .article-grade {
    margin-left: auto;
    font-family: var(--font-mono);
    font-weight: 700;
}

.article-image {
    margin: 20px 0;
}

.article-body {
    text-align: justify;
    hyphens: auto;
}

.article-body p {
    margin-bottom: 16px;
    line-height: 1.75;
    text-indent: 1.5em;
}

.article-body p:first-child {
    text-indent: 0;
}

.article-body p:first-child::first-letter {
    float: left;
    font-size: 3.4em;
    line-height: 0.78;
    padding-right: 6px;
    padding-top: 5px;
    font-family: var(--font-headline);
    color: var(--color-accent);
    font-weight: 700;
}

.article-body h2 {
    font-family: var(--font-headline);
    font-size: 1.4rem;
    margin: 28px 0 12px;
    line-height: 1.25;
    text-align: left;
    border-bottom: 1px solid var(--color-rule-light);
    padding-bottom: 4px;
}

.article-body h3 {
    font-family: var(--font-headline);
    font-size: 1.15rem;
    margin: 22px 0 8px;
    text-align: left;
    font-style: italic;
}

.article-body blockquote {
    border-left: 2px solid var(--color-accent);
    padding: 6px 20px;
    margin: 20px 0 20px 20px;
    font-style: italic;
    color: var(--color-text-light);
}

.article-body .pull-quote {
    border-left: none;
    border-top: 2px solid var(--color-text);
    border-bottom: 2px solid var(--color-text);
    text-align: center;
    font-family: var(--font-headline);
    font-size: 1.35rem;
    padding: 18px 24px;
    margin: 28px 0;
    color: var(--color-text);
    font-style: italic;
    line-height: 1.35;
}

.article-body strong { font-weight: 700; }
.article-body em { font-style: italic; }

.article-body a {
    border-bottom: 1px solid var(--color-rule);
}

.article-body a:hover {
    border-bottom-color: var(--color-accent);
}

/* ---- Sources ---- */

.article-sources {
    margin-top: 28px;
    padding-top: 14px;
    border-top: 1px solid var(--color-rule);
}

.article-sources h4 {
    font-family: var(--font-sans);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-light);
    margin-bottom: 6px;
}

.article-sources ul {
    list-style: none;
    padding: 0;
}

.article-sources li {
    font-size: 0.8rem;
    margin-bottom: 3px;
    color: var(--color-text-light);
    word-break: break-all;
}

.article-sources li a {
    border-bottom: 1px dotted var(--color-rule);
}

/* ---- Article Bottom Nav ---- */

.article-nav-bottom {
    margin-top: 28px;
    padding-top: 14px;
    border-top: 1px solid var(--color-rule);
    font-family: var(--font-sans);
    font-size: 0.82rem;
}

/* ---- Article Share ---- */

.article-share {
    margin-top: 32px;
    padding: 18px 0 16px;
    border-top: 1px solid var(--color-rule);
    border-bottom: 1px solid var(--color-rule);
    font-family: var(--font-sans);
}

.article-share .share-label {
    margin: 0 0 10px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-light);
}

.article-share .share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.article-share .share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 500;
    line-height: 1;
    color: var(--color-text);
    background: transparent;
    border: 1px solid var(--color-rule);
    border-radius: 999px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.article-share .share-btn:hover {
    background: var(--color-text);
    border-color: var(--color-text);
    color: #F4F0E4;
}

.article-share .share-btn svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.article-share .share-btn.is-copied {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #F4F0E4;
}

/* Platform buttons — icon only, always */
.article-share .share-x span,
.article-share .share-fb span,
.article-share .share-li span,
.article-share .share-wa span,
.article-share .share-email span {
    display: none;
}

.article-share .share-x,
.article-share .share-fb,
.article-share .share-li,
.article-share .share-wa,
.article-share .share-email {
    padding: 9px;
}

.article-share .share-x svg,
.article-share .share-fb svg,
.article-share .share-li svg,
.article-share .share-wa svg,
.article-share .share-email svg {
    width: 17px;
    height: 17px;
}

@media (max-width: 640px) {
    .article-share .share-btn span {
        display: none;
    }
    .article-share .share-btn {
        padding: 9px;
    }
    .article-share .share-btn svg {
        width: 17px;
        height: 17px;
    }
}

/* ---- Category Page ---- */

.category-page {
    padding: 28px 0 60px;
}

.category-title {
    font-family: var(--font-headline);
    font-size: 2rem;
    margin-bottom: 4px;
    border-bottom: 2px solid var(--color-text);
    padding-bottom: 6px;
}

.category-description {
    color: var(--color-text-light);
    font-style: italic;
    margin-bottom: 20px;
    margin-top: 8px;
}

.story-list-item {
    padding: 14px 0;
    border-bottom: 1px solid var(--color-rule-light);
}

.story-list-item .story-date {
    font-family: var(--font-sans);
    font-size: 0.68rem;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.story-list-item h3 {
    font-family: var(--font-headline);
    font-size: 1.15rem;
    margin: 3px 0;
    line-height: 1.3;
}

.story-list-item h3 a { color: var(--color-text); }
.story-list-item h3 a:hover { color: var(--color-accent); }

.story-list-item .story-deck {
    font-size: 0.88rem;
    color: var(--color-text-light);
    font-style: italic;
}

/* ---- Archive ---- */

.archive-page {
    padding: 28px 0 60px;
}

.archive-page h2 {
    font-family: var(--font-headline);
    font-size: 2rem;
    border-bottom: 2px solid var(--color-text);
    padding-bottom: 6px;
    margin-bottom: 16px;
}

.archive-entry {
    padding: 14px 0;
    border-bottom: 1px solid var(--color-rule-light);
}

.archive-entry h3 {
    font-family: var(--font-headline);
    font-size: 1.05rem;
}

.archive-entry p {
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin-top: 3px;
    font-style: italic;
}

/* ---- Footer ---- */

.site-footer {
    border-top: 3px solid var(--color-text);
    padding: 16px 0;
    text-align: center;
    margin-top: 0;
    background: var(--color-paper);
}

.site-footer p {
    font-family: var(--font-sans);
    font-size: 0.72rem;
    color: var(--color-text-light);
    margin-bottom: 2px;
    letter-spacing: 0.03em;
}

.footer-tagline {
    font-family: var(--font-headline);
    font-style: italic;
    font-size: 0.88rem !important;
    color: var(--color-text) !important;
}

/* ---- Good News Index ---- */

.good-news-index {
    display: inline-block;
    border: 1px solid var(--color-rule);
    padding: 4px 16px;
    font-family: var(--font-sans);
    font-size: 0.72rem;
    margin-top: 8px;
    color: var(--color-text-light);
}

.good-news-index .count {
    font-weight: 700;
    color: var(--color-tag-community);
}

/* ---- Read / New state ---- */

/* Read stories: headline fades like worn newsprint */
.is-read .card-headline a,
.is-read .featured-headline a {
    color: var(--color-text-light);
}

.is-read .card-deck,
.is-read .featured-deck {
    opacity: 0.7;
}

/* New stories: small accent dot before headline */
.is-new .card-headline::before,
.is-new .featured-headline::before {
    content: "\2022";  /* bullet */
    color: var(--color-accent);
    margin-right: 6px;
    font-size: 0.7em;
    vertical-align: middle;
}

/* ---- Column Articles (e.g. "Page 3") ---- */

/* Column header on article page */
.column-header {
    text-align: center;
    margin-bottom: 20px;
    padding: 14px 0;
    border-top: 2px solid var(--color-accent);
    border-bottom: 1px solid var(--color-accent);
}

.column-name {
    display: block;
    font-family: var(--font-headline);
    font-size: 1.5rem;
    font-style: italic;
    font-weight: 700;
    color: var(--color-accent);
    letter-spacing: 0.04em;
}

.column-number {
    display: block;
    font-family: var(--font-sans);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--color-text-light);
    margin-top: 2px;
}

/* Column badge on story cards */
.card-column-badge {
    margin-bottom: 6px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--color-accent);
}

.card-column-name {
    font-family: var(--font-headline);
    font-size: 0.78rem;
    font-style: italic;
    font-weight: 700;
    color: var(--color-accent);
}

.card-column-number {
    font-family: var(--font-sans);
    font-size: 0.62rem;
    color: var(--color-text-light);
    letter-spacing: 0.08em;
}

/* Tag colour for page 3 and features */
.tag-page-3 {
    border-color: var(--color-tag-page-3) !important;
    color: var(--color-tag-page-3) !important;
}

.tag-features {
    border-color: var(--color-accent) !important;
    color: var(--color-accent) !important;
}

/* ---- Page 3 Promo ---- */

.page3-promo {
    display: flex !important;
    align-items: stretch;
    padding: 0 !important;
    overflow: hidden;
}

.page3-promo-link {
    display: flex;
    flex-direction: column;
    width: 100%;
    color: var(--color-text);
    transition: opacity 0.2s;
}

.page3-promo-link:hover {
    opacity: 1;
}

.page3-promo-headline {
    display: block;
    font-family: var(--font-headline);
    font-weight: 700;
    color: var(--color-accent);
    text-align: center;
    padding: 14px 14px 10px;
    line-height: 1.1;
}

.page3-promo-headline .line1 {
    display: block;
    font-size: 2.8rem;
}

.page3-promo-headline .line2 {
    display: block;
    font-size: 3.2rem;
}

.page3-promo-img {
    width: 100%;
    height: auto;
    display: block;
}

.page3-promo-text {
    padding: 12px 14px;
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.page3-promo-title {
    display: block;
    font-family: var(--font-sans);
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--color-text-light);
}

.page3-promo-strapline {
    display: block;
    font-family: var(--font-headline);
    font-size: 1.3rem;
    font-style: italic;
    font-weight: 700;
    color: var(--color-accent);
    margin-top: 2px;
    line-height: 1.2;
}

/* ---- Page 3 Archive ---- */

.page3-archive {
    max-width: 680px;
    margin: 0 auto;
    padding-bottom: 40px;
}

.page3-archive-title {
    font-family: var(--font-headline);
    font-size: 1.1rem;
    font-style: italic;
    border-top: 2px solid var(--color-accent);
    border-bottom: 1px solid var(--color-rule-light);
    padding: 8px 0;
    margin-bottom: 4px;
    color: var(--color-accent);
}

/* ---- Responsive ---- */

@media (max-width: 768px) {
    .container { box-shadow: none; }
    .masthead-title { font-size: 2.4rem; }

    .featured-story {
        flex-direction: column;
    }

    .featured-image { float: none; width: 100%; margin-right: 0; }
    .featured-headline { font-size: 1.8rem; }

    /* Collapse to 2-column grid on tablet */
    .story-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .story-card,
    .story-card:nth-child(1),
    .story-card:nth-child(7),
    .story-card:nth-child(11) {
        grid-column: span 1;
        display: block;
        border-right: var(--column-rule);
    }

    .story-card:nth-child(1) .card-headline,
    .story-card:nth-child(7) .card-headline,
    .story-card:nth-child(11) .card-headline {
        font-size: 1.15rem;
    }

    .story-card:nth-child(2n) {
        border-right: none;
    }

    .article-headline { font-size: 2rem; }
}

@media (max-width: 480px) {
    body { font-size: 15px; }
    .masthead-title { font-size: 1.8rem; }

    /* Single column on mobile */
    .story-grid {
        grid-template-columns: 1fr;
    }

    .story-card,
    .story-card:nth-child(1),
    .story-card:nth-child(7),
    .story-card:nth-child(11) {
        grid-column: span 1;
        display: block;
        border-right: none;
        padding: 14px 0;
    }

    .story-card:nth-child(1) .card-headline,
    .story-card:nth-child(7) .card-headline,
    .story-card:nth-child(11) .card-headline {
        font-size: 1.15rem;
    }

    .main-nav a {
        font-size: 0.65rem;
        padding: 3px 8px;
        letter-spacing: 0.06em;
    }

    .article-body p { text-indent: 0; }

    .games-row { flex-direction: column; }
    .games-crossword, .games-wordmill { border-right: none !important; }
}

/* ============================================================
   ARTICLE EXTRAS
   ============================================================ */

.article-extras {
    margin-top: 28px;
    border-top: 2px solid var(--color-text);
    padding-top: 16px;
}

.extras-block {
    margin-bottom: 24px;
}

.extras-block:last-child {
    margin-bottom: 0;
}

.extras-title {
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-light);
    margin-bottom: 10px;
    border-bottom: 1px solid var(--color-rule-light);
    padding-bottom: 4px;
}

/* Stats table */

.extras-stats-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.extras-stats-table tr {
    border-bottom: 1px dotted var(--color-rule-light);
}

.extras-stats-table tr:last-child {
    border-bottom: none;
}

.extras-stats-key {
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 5px 12px 5px 0;
    width: 35%;
    vertical-align: top;
}

.extras-stats-val {
    padding: 5px 0;
    line-height: 1.5;
}

/* Image / figure */

.extras-figure {
    margin: 0;
}

.extras-figure img {
    width: 100%;
    height: auto;
    border: 1px solid var(--color-rule-light);
}

.extras-figure figcaption {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    color: var(--color-text-light);
    margin-top: 6px;
    font-style: italic;
}

.extras-credit {
    font-style: normal;
    opacity: 0.7;
}

/* Timeline */

.extras-timeline {
    position: relative;
    padding-left: 20px;
    border-left: 2px solid var(--color-accent);
}

.extras-timeline-item {
    position: relative;
    padding-bottom: 12px;
    margin-bottom: 4px;
}

.extras-timeline-item::before {
    content: "";
    position: absolute;
    left: -25px;
    top: 4px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-accent);
}

.extras-timeline-date {
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--color-accent);
    display: block;
    margin-bottom: 2px;
}

.extras-timeline-text {
    font-size: 0.88rem;
    line-height: 1.5;
}

/* Infobox */

.extras-infobox-body {
    background: rgba(0,0,0,0.02);
    border-left: 3px solid var(--color-rule);
    padding: 12px 16px;
    font-size: 0.9rem;
    line-height: 1.65;
}

/* Numbers callout */

.extras-numbers {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.extras-number-item {
    flex: 1;
    min-width: 120px;
    text-align: center;
    padding: 12px;
    border: 1px solid var(--color-rule-light);
}

.extras-number-value {
    display: block;
    font-family: var(--font-headline);
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-accent);
    line-height: 1;
}

.extras-number-label {
    display: block;
    font-family: var(--font-sans);
    font-size: 0.72rem;
    color: var(--color-text-light);
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Pull quote */

.extras-quote {
    border-top: 2px solid var(--color-text);
    border-bottom: 2px solid var(--color-text);
    text-align: center;
    padding: 18px 24px;
    margin: 0;
}

.extras-quote p {
    font-family: var(--font-headline);
    font-size: 1.3rem;
    font-style: italic;
    line-height: 1.35;
    color: var(--color-text);
    margin: 0;
}

.extras-quote cite {
    display: block;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-style: normal;
    color: var(--color-text-light);
    margin-top: 8px;
}

/* Gallery */

.extras-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.extras-gallery-item {
    margin: 0;
}

.extras-gallery-item img {
    width: 100%;
    height: auto;
    border: 1px solid var(--color-rule-light);
}

.extras-gallery-item figcaption {
    font-family: var(--font-sans);
    font-size: 0.7rem;
    color: var(--color-text-light);
    margin-top: 4px;
}

/* ============================================================
   NEWS PAGE
   ============================================================ */

.news-page {
    padding: 28px 0 40px;
}

.news-layout {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 28px;
    align-items: start;
}

.news-main .category-title {
    margin-bottom: 4px;
}

.news-main .category-description {
    margin-bottom: 20px;
}

/* News stories — position-driven layout */

.news-stories {
    border-top: 2px solid var(--color-text);
    padding-top: 16px;
}

.news-story {
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--color-rule-light);
}

.news-story-body .subcategory-tag {
    margin-right: 6px;
}

.news-story-body .story-date {
    font-family: var(--font-sans);
    font-size: 0.68rem;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.news-story h3 {
    font-family: var(--font-headline);
    font-size: 1rem;
    line-height: 1.25;
    margin: 4px 0;
}

.news-story h3 a { color: var(--color-text); }
.news-story h3 a:hover { color: var(--color-accent); }

/* Hidden by default — shown by position class */
.news-story-image,
.news-story .news-lede,
.news-story .read-more {
    display: none;
}

/* Lead story (1st visible) */
.news-story.news-lead {
    overflow: hidden;
}

.news-story.news-lead .news-story-image {
    display: block;
    float: left;
    width: 45%;
    margin-right: 20px;
    margin-bottom: 8px;
}

.news-story.news-lead .news-story-image img {
    width: 100%;
    height: auto;
    border: 1px solid var(--color-rule-light);
}

.news-story.news-lead h3 {
    font-size: 1.6rem;
    line-height: 1.15;
    margin: 6px 0 8px;
}

.news-story.news-lead .news-lede,
.news-story.news-lead .read-more {
    display: block;
}

.news-lede {
    font-size: 0.9rem;
    line-height: 1.65;
    margin-bottom: 8px;
    text-align: justify;
    hyphens: auto;
}

/* Secondary stories (2nd & 3rd visible) */
.news-story.news-secondary h3 {
    font-size: 1.15rem;
}

/* List stories (4th+) */
.news-story.news-list .story-deck {
    display: none;
}

/* Filters & story list */

.news-heading-row {
    display: flex;
    align-items: baseline;
    gap: 16px;
}

.news-heading-row .category-title {
    margin-bottom: 0;
    white-space: nowrap;
}

.news-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.news-filter-btn {
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-light);
    background: none;
    border: 1px solid var(--color-rule-light);
    padding: 3px 10px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.news-filter-btn:hover {
    color: var(--color-text);
    border-color: var(--color-rule);
}

.news-filter-btn.active {
    color: var(--color-text);
    border-color: var(--color-rule);
    border-bottom: 2px solid var(--color-accent);
}

.story-list-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Sidebar */

.news-sidebar {
    border-left: var(--column-rule);
    padding-left: 20px;
    font-family: var(--font-sans);
}

/* Sidebar price rows */

.sw-price-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px dotted var(--color-rule-light);
}

.sw-price-row:last-child {
    border-bottom: none;
}

.sw-price-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-text);
    flex: 1;
}

.sw-price-value {
    font-family: var(--font-headline);
    font-size: 1rem;
    font-weight: 700;
}

/* News responsive */

@media (max-width: 768px) {
    .news-layout {
        grid-template-columns: 1fr;
    }
    .news-sidebar {
        border-left: none;
        border-top: 1px solid var(--color-rule);
        padding-left: 0;
        padding-top: 20px;
    }
    .news-story.news-lead .news-story-image {
        float: none;
        width: 100%;
        margin-right: 0;
    }
}

/* ============================================================
   SIDEBAR WIDGETS
   ============================================================ */

.sidebar-widgets {
    font-family: var(--font-sans);
}

.sw-widget {
    padding: 14px 0;
    border-bottom: 1px solid var(--color-rule-light);
}

.sw-widget:last-child {
    border-bottom: none;
}

.sw-title {
    font-family: var(--font-sans);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-light);
    margin-bottom: 6px;
    border-bottom: 1px solid var(--color-rule-light);
    padding-bottom: 3px;
}

.sw-temp {
    font-family: var(--font-headline);
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1;
}

.sw-price {
    font-family: var(--font-headline);
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1;
}

.sw-change {
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 2px;
}

.sw-up { color: #6A8D5B; }
.sw-down { color: var(--color-accent); }

.sw-summary {
    font-size: 0.82rem;
    color: var(--color-text);
    margin-top: 4px;
    line-height: 1.4;
}

.sw-detail {
    font-size: 0.78rem;
    color: var(--color-text-light);
    margin-top: 4px;
    line-height: 1.4;
}

.sw-table {
    width: 100%;
    font-size: 0.78rem;
    margin-top: 6px;
    border-collapse: collapse;
}

.sw-table td {
    padding: 3px 0;
    border-bottom: 1px dotted var(--color-rule-light);
}

.sw-idx-name { font-weight: 600; }
.sw-idx-value { text-align: right; }
.sw-idx-change { text-align: right; padding-left: 8px; font-weight: 600; }

.sw-events {
    list-style: none;
    padding: 0;
    font-size: 0.8rem;
    line-height: 1.5;
}

.sw-events li {
    margin-bottom: 4px;
}

.sw-quote {
    font-family: var(--font-headline);
    font-style: italic;
    font-size: 0.85rem;
    color: var(--color-text);
    margin: 8px 0 0;
    padding-left: 12px;
    border-left: 2px solid var(--color-accent);
    line-height: 1.5;
}

.sw-quote cite {
    display: block;
    font-size: 0.75rem;
    font-style: normal;
    color: var(--color-text-light);
    margin-top: 2px;
}

.sw-score {
    font-family: var(--font-headline);
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-accent);
    line-height: 1;
}

.sw-score span {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--color-text-light);
}

.sw-label {
    font-family: var(--font-headline);
    font-style: italic;
    font-size: 0.9rem;
    margin-top: 4px;
}

.sw-updated {
    font-size: 0.72rem;
    color: var(--color-text-light);
    font-style: italic;
    text-align: center;
    padding-top: 10px;
    border-top: 1px solid var(--color-rule-light);
    margin-top: 4px;
}

/* ============================================================
   FUN & GAMES
   ============================================================ */

.games-page {
    max-width: 780px;
    margin: 0 auto;
    padding: 28px 0 40px;
}

.games-section-title {
    font-family: var(--font-headline);
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 4px;
}

.games-section-subtitle {
    text-align: center;
    font-family: var(--font-headline);
    font-style: italic;
    color: var(--color-text-light);
    font-size: 0.95rem;
    margin-bottom: 0;
}

.games-heading {
    font-family: var(--font-headline);
    font-size: 1.4rem;
    border-bottom: 2px solid var(--color-text);
    padding-bottom: 4px;
    margin-bottom: 16px;
}

/* ---- Cartoon ---- */

.games-cartoon {
    text-align: center;
    margin-bottom: 8px;
}

.games-cartoon .games-heading {
    text-align: left;
}

.cartoon-image img {
    max-width: 100%;
    border: 1px solid var(--color-rule-light);
    margin: 0 auto;
}

.cartoon-placeholder {
    background: #DDD9D3;
    padding: 60px 20px;
    border: 1px solid var(--color-rule-light);
    margin-bottom: 12px;
}

.cartoon-placeholder .placeholder-icon {
    font-size: 3rem;
    display: block;
    opacity: 0.4;
}

.cartoon-placeholder .placeholder-caption {
    font-family: var(--font-sans);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-light);
    opacity: 0.6;
    margin-top: 8px;
    display: block;
}

.cartoon-caption {
    font-family: var(--font-headline);
    font-style: italic;
    font-size: 1rem;
    color: var(--color-text);
    margin-top: 12px;
    line-height: 1.5;
}

.cartoon-artist {
    font-family: var(--font-sans);
    font-size: 0.72rem;
    color: var(--color-text-light);
    margin-top: 4px;
}

/* ---- Games Row ---- */

.games-row {
    display: flex;
    gap: 28px;
    align-items: flex-start;
}

.games-crossword {
    flex: 1;
    border-right: var(--column-rule);
    padding-right: 28px;
}

.games-wordmill {
    flex: 1;
}

/* ---- Crossword ---- */

.crossword-container {
    text-align: center;
}

.crossword-grid {
    display: grid;
    gap: 0;
    max-width: 360px;
    margin: 0 auto 16px;
    border: 2px solid var(--color-text);
}

.cw-cell {
    position: relative;
    aspect-ratio: 1;
    border: 1px solid var(--color-rule);
    background: var(--color-paper);
}

.cw-black {
    background: var(--color-text);
}

.cw-input {
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
    text-align: center;
    font-family: var(--font-sans);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-text);
    text-transform: uppercase;
    outline: none;
    padding: 0;
    padding-top: 6px;
}

.cw-number {
    position: absolute;
    top: 1px;
    left: 2px;
    font-family: var(--font-sans);
    font-size: 0.55rem;
    color: var(--color-text-light);
    line-height: 1;
    pointer-events: none;
}

.cw-highlight {
    background: #E8E4D8 !important;
}

.cw-selected {
    background: #D4CFC0 !important;
}

.cw-correct {
    background: #C8DCC0 !important;
}

.cw-wrong {
    background: #E8C8C0 !important;
}

.crossword-clues {
    display: flex;
    gap: 16px;
    text-align: left;
    margin-bottom: 16px;
}

.clues-column {
    flex: 1;
}

.clues-column h4 {
    font-family: var(--font-sans);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-light);
    margin-bottom: 6px;
    border-bottom: 1px solid var(--color-rule-light);
    padding-bottom: 3px;
}

.clue-list {
    padding-left: 20px;
}

.clue-list li {
    font-size: 0.82rem;
    line-height: 1.5;
    margin-bottom: 3px;
    cursor: pointer;
}

.clue-list li:hover {
    color: var(--color-accent);
}

/* ---- Buttons ---- */

.games-btn {
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 6px 18px;
    border: 1px solid var(--color-text);
    background: var(--color-text);
    color: var(--color-paper);
    cursor: pointer;
    margin: 4px;
}

.games-btn:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
}

.games-btn-secondary {
    background: transparent;
    color: var(--color-text);
}

.games-btn-secondary:hover {
    background: var(--color-text);
    color: var(--color-paper);
}

/* ---- Wordmill ---- */

.wordmill-hint {
    font-family: var(--font-headline);
    font-style: italic;
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin-bottom: 16px;
    text-align: center;
}

.wordmill-board {
    max-width: 280px;
    margin: 0 auto 16px;
}

.wm-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    margin-bottom: 4px;
}

.wm-cell {
    aspect-ratio: 1;
    border: 2px solid var(--color-rule);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-sans);
    font-size: 1.3rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--color-text);
    transition: background 0.2s;
}

.wm-filled {
    border-color: var(--color-text-light);
}

.wm-correct {
    background: #6A8D5B;
    border-color: #6A8D5B;
    color: #fff;
}

.wm-present {
    background: #C9A94E;
    border-color: #C9A94E;
    color: #fff;
}

.wm-absent {
    background: #787872;
    border-color: #787872;
    color: #fff;
}

.wordmill-keyboard {
    max-width: 340px;
    margin: 0 auto;
}

.wm-kb-row {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-bottom: 4px;
}

.wm-key {
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 8px 6px;
    min-width: 28px;
    border: 1px solid var(--color-rule);
    background: var(--color-paper);
    color: var(--color-text);
    cursor: pointer;
    border-radius: 3px;
    text-align: center;
}

.wm-key:hover {
    background: #D6CFC2;
}

.wm-key-wide {
    min-width: 50px;
    font-size: 0.68rem;
}

.wm-key.wm-correct {
    background: #6A8D5B;
    border-color: #6A8D5B;
    color: #fff;
}

.wm-key.wm-present {
    background: #C9A94E;
    border-color: #C9A94E;
    color: #fff;
}

.wm-key.wm-absent {
    background: #787872;
    border-color: #787872;
    color: #fff;
}

.wordmill-message {
    text-align: center;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 12px;
    min-height: 1.5em;
}

.wm-win { color: #6A8D5B; }
.wm-lose { color: var(--color-accent); }

/* ---- Jokes / Lighter Side ---- */

/* ---- 4 Letter Words ---- */

.games-four-letter-words {
    text-align: center;
    margin-bottom: 8px;
}

.games-four-letter-words .games-heading {
    text-align: left;
}

.flw-subtitle {
    font-family: var(--font-headline);
    font-style: italic;
    font-size: 0.88rem;
    color: var(--color-text-light);
    margin-bottom: 20px;
    text-align: left;
}

.flw-container {
    max-width: 360px;
    margin: 0 auto;
}

.flw-clue {
    font-family: var(--font-headline);
    font-style: italic;
    font-size: 1.1rem;
    color: var(--color-text);
    margin-bottom: 20px;
    padding: 12px 16px;
    border: 1px solid var(--color-rule-light);
    background: rgba(0,0,0,0.02);
    line-height: 1.5;
}

.flw-letters {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
}

.flw-cell {
    width: 64px;
    height: 64px;
    border: 2px solid var(--color-rule);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-sans);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-text-light);
    background: var(--color-paper);
    transition: all 0.3s;
}

.flw-cell.flw-revealed {
    border-color: var(--color-accent);
    color: var(--color-accent);
    background: #F5ECEA;
}

.flw-stars {
    font-size: 0.85rem;
    font-family: var(--font-sans);
    color: var(--color-text-light);
    margin-bottom: 16px;
    min-height: 1.2em;
}

.flw-stars-4 { color: var(--color-accent); font-weight: 700; }
.flw-stars-3 { color: #9A6B1A; }

.flw-input {
    display: flex;
    gap: 6px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.flw-text-input {
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    text-align: center;
    width: 100px;
    padding: 6px 8px;
    border: 2px solid var(--color-rule);
    letter-spacing: 0.15em;
    outline: none;
}

.flw-text-input:focus {
    border-color: var(--color-accent);
}

.flw-message {
    font-family: var(--font-sans);
    font-size: 0.88rem;
    min-height: 2em;
    margin-top: 8px;
}

.flw-wrong {
    color: var(--color-accent);
}

.flw-win {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--color-accent);
}

.flw-win br + span,
.flw-win {
    line-height: 1.8;
}

.flw-lose {
    color: var(--color-text-light);
}

.games-jokes {
    margin-top: 8px;
}

.jokes-list {
    columns: 2;
    column-gap: 28px;
    column-rule: var(--column-rule);
}

.joke-item {
    break-inside: avoid;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--color-rule-light);
}

.joke-setup {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 6px;
}

.joke-punchline {
    font-family: var(--font-headline);
    font-style: italic;
    font-size: 0.95rem;
    color: var(--color-accent);
    line-height: 1.5;
    visibility: hidden;
    height: 0;
    overflow: hidden;
    margin: 0;
    transition: height 0.3s;
}

.joke-punchline.revealed {
    visibility: visible;
    height: auto;
    margin-bottom: 0;
}

.joke-reveal-btn {
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-accent);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.joke-reveal-btn:hover {
    text-decoration: underline;
}

/* ---- Trivia ---- */

.trivia-box {
    margin-top: 20px;
    padding: 16px;
    border: 1px solid var(--color-rule);
    text-align: center;
}

.trivia-box h4 {
    font-family: var(--font-sans);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-light);
    margin-bottom: 8px;
}

.trivia-question {
    font-family: var(--font-headline);
    font-size: 1.05rem;
    margin-bottom: 8px;
}

.trivia-answer {
    font-family: var(--font-headline);
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--color-accent);
    visibility: hidden;
    height: 0;
    overflow: hidden;
    margin: 0;
}

.trivia-answer.revealed {
    visibility: visible;
    height: auto;
    margin-top: 8px;
}

/* ---- Games responsive ---- */

@media (max-width: 768px) {
    .games-row {
        flex-direction: column;
    }
    .games-crossword {
        border-right: none;
        padding-right: 0;
        border-bottom: 1px solid var(--color-rule-light);
        padding-bottom: 24px;
        margin-bottom: 8px;
    }
    .jokes-list { columns: 1; }
}

/* ==========================================================================
   BELOW THE LINE
   ========================================================================== */

.below-the-line {
    max-width: var(--content-width, 960px);
    margin: 0 auto;
    padding: 0 16px;
}

.btl-rule {
    border: none;
    border-top: 3px double var(--color-rule);
    margin: 48px 0 32px;
}

.btl-section {
    margin-bottom: 36px;
}

.btl-heading {
    font-family: var(--font-headline);
    font-size: 1.3rem;
    border-bottom: 2px solid var(--color-rule);
    padding-bottom: 6px;
    margin-bottom: 16px;
}

.btl-story-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.btl-story-card {
    border-top: 2px solid var(--color-rule-light);
    padding-top: 10px;
}

.btl-card-image img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    display: block;
}

.btl-card-image .image-placeholder {
    height: 130px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-light, #f5f5f0);
}

.btl-card-headline {
    font-family: var(--font-headline);
    font-size: 0.95rem;
    line-height: 1.25;
    margin: 8px 0 4px;
}

.btl-card-headline a {
    color: var(--color-text);
    text-decoration: none;
}

.btl-card-headline a:hover {
    text-decoration: underline;
}

.btl-card-deck {
    font-size: 0.8rem;
    color: var(--color-text-light);
    line-height: 1.35;
    margin: 0;
}

@media (max-width: 600px) {
    .btl-story-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    .btl-card-image img,
    .btl-card-image .image-placeholder {
        height: 100px;
    }
}

/* ============================================================
   PUBLISHER-DRIVEN LAYOUT SYSTEM
   Rows of fixed templates (full / 2:1 / 1:2 / 1:1:1) containing
   slots, each slot holding 1 full-height cell or 2 stacked half
   cells. Built on a 6-column grid (3 visual columns of 2 cols
   each) to match the existing .story-grid base.
   ============================================================ */

.layout-row {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0;
    border-top: 2px solid var(--color-text);
    padding-top: 16px;
    margin-bottom: 0;
}

.layout-row + .layout-row {
    border-top: 1px solid var(--color-rule);
    padding-top: 16px;
    margin-top: 0;
}

/* Fixed row heights — content is clipped via overflow:hidden on each slot
   so an oversized card can't stretch the grid. Publisher picks a different
   block (or the compact variant) if the full card doesn't fit. */
.layout-row-full,
.layout-row-2-1, .layout-row-1-2, .layout-row-1-1-1                  { height: 600px; }

/* Row templates — each slot is placed by its order */
.layout-row-full   .layout-slot:nth-child(1) { grid-column: span 6; }
.layout-row-2-1    .layout-slot:nth-child(1) { grid-column: span 4; }
.layout-row-2-1    .layout-slot:nth-child(2) { grid-column: span 2; }
.layout-row-1-2    .layout-slot:nth-child(1) { grid-column: span 2; }
.layout-row-1-2    .layout-slot:nth-child(2) { grid-column: span 4; }
.layout-row-1-1-1  .layout-slot                { grid-column: span 2; }

/* Slots — borders match the old story-card column rules */
.layout-slot {
    border-right: var(--column-rule);
    padding: 12px 18px 18px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

.layout-row .layout-slot:last-child {
    border-right: none;
}

/* A stacked slot splits its height between two cells */
.layout-slot-stacked {
    display: grid;
    grid-template-rows: 1fr 1fr;
    gap: 14px;
    padding: 0; /* cells handle their own padding */
    border-right: var(--column-rule);
    overflow: hidden;
    min-height: 0;
}
.layout-row .layout-slot-stacked:last-child {
    border-right: none;
}

.layout-slot-stacked .layout-cell {
    padding: 12px 18px 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0; /* allow grid item to shrink */
}

.layout-slot-stacked .layout-cell + .layout-cell {
    border-top: 1px solid var(--color-rule);
}

/* Non-stacked slots have a single cell filling the slot */
.layout-slot:not(.layout-slot-stacked) .layout-cell {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

/* Override the legacy fixed .story-card height inside the layout system —
   let cards fill their slot/cell instead. */
.layout-cell .story-card {
    height: auto;
    flex: 1 1 auto;
    border-right: none;
    padding: 0;
}

/* Byline establishes its own block formatting context so it shrinks to
   fit beside the floated image (instead of extending full-width under
   it). While the image is still vertically present, the byline + its
   border rules sit in the text column next to it. Once the image ends,
   the byline naturally expands to full card width. */
.layout-cell .card-byline {
    display: flow-root;
}

/* Drop cap on the opening paragraph of every card lede — matches the
   classic drop cap used on the article page and the legacy featured
   hero. `:not(.card-lede) + .card-lede` matches a .card-lede whose
   preceding sibling is NOT a .card-lede (i.e. the first one in the
   sequence), so only the opening lede paragraph gets the treatment. */
.layout-cell :not(.card-lede) + .card-lede::first-letter {
    float: left;
    font-size: 3.4em;
    line-height: 0.78;
    padding-right: 6px;
    padding-top: 5px;
    font-family: var(--font-headline);
    color: var(--color-accent);
    font-weight: 700;
}

/* Wide hero treatment for the full-width row */
.layout-row-full .layout-slot .card-image {
    max-height: 420px;
    overflow: hidden;
}
.layout-row-full .layout-slot .card-headline {
    font-size: 2.1rem;
    line-height: 1.15;
    margin-top: 14px;
}

/* Layout-cell missing-reference placeholder */
.layout-missing {
    padding: 20px;
    border: 1px dashed var(--color-accent);
    color: var(--color-accent);
    font-family: var(--font-sans);
    font-size: 0.8rem;
    text-align: center;
}

/* ---- Compact Story Card (half-height / image-less) ---- */

.story-card-compact {
    height: auto;
    padding: 0;
    border-right: none;
}

/* Desktop: hide category tags on compact cards — the stacked half-height
   treatment is already visually terse. Mobile re-enables them below. */
.story-card-compact .category-tag,
.story-card-compact .subcategory-tag {
    display: none;
}

/* Byline visibility on regular cards.
   Only full-row cells show a byline. All other placements hide it.
   Compact (half-height) cards never output a byline in markup. */
.layout-row:not(.layout-row-full) .layout-cell .card-byline {
    display: none;
}

/* Byline styling — a small newspaper-style rule sitting between the deck
   and the opening paragraph, visually separating the introductory metadata
   from the article body. */
.layout-cell .card-byline {
    font-family: var(--font-sans);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--color-text-light);
    text-indent: 0;
    margin: 10px 0 12px;
    padding: 6px 0;
    border-top: 1px solid var(--color-rule);
    border-bottom: 1px solid var(--color-rule);
}

.layout-cell .card-byline-name {
    color: var(--color-text);
    font-weight: 600;
    letter-spacing: 0.08em;
}

.story-card-compact .card-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.story-card-compact .card-headline {
    font-family: var(--font-headline);
    font-size: 1.05rem;
    line-height: 1.2;
    margin: 4px 0 2px;
}

.story-card-compact .card-headline a {
    color: var(--color-text);
    text-decoration: none;
}

.story-card-compact .card-headline a:hover {
    color: var(--color-accent);
}

.story-card-compact .card-deck {
    font-size: 0.82rem;
    line-height: 1.4;
    color: var(--color-text-light);
    font-style: italic;
    text-indent: 0;
    margin: 0;
}

.story-card-compact .card-byline {
    font-family: var(--font-sans);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-light);
    margin: 2px 0 0;
}

/* ---- Ad Block ----
   Both desktop and mobile variants are always emitted. CSS below 900px
   flips which one is visible. Mobile-only by default is hidden. */

.ad-block.ad-block-mobile { display: none; }

.ad-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
    height: 100%;
    padding: 4px 0;
}

.ad-block-label {
    font-family: var(--font-sans);
    font-size: 0.58rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--color-text-light);
    border-bottom: 1px solid var(--color-rule-light);
    padding-bottom: 4px;
    margin-bottom: 4px;
}

.ad-block-image {
    width: 100%;
    overflow: hidden;
    flex-shrink: 0;
}
.ad-block .ad-block-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
}
/* Height knob — applies to the image container. `.ad-block` prefix pushes
   specificity above the mobile-variant rules in the 900px media query so
   data-* choices still win there. */
.ad-block .ad-block-image[data-h="small"]  { height: 100px; }
.ad-block .ad-block-image[data-h="medium"] { height: 160px; }
.ad-block .ad-block-image[data-h="large"]  { height: 220px; }
.ad-block .ad-block-image[data-h="xlarge"] { height: 320px; }
/* `full` eats whatever vertical space is left in the ad's flex column.
   Pair with ~ .ad-block-body flex:0 0 auto so the body doesn't fight it. */
.ad-block .ad-block-image[data-h="full"]   { flex: 1 1 0; min-height: 80px; height: auto; }
.ad-block .ad-block-image[data-h="full"] ~ .ad-block-body { flex: 0 0 auto; }
/* Legacy ads without data-h: let the image size itself (auto height), so
   previously-published ad files render exactly as before until an editor
   saves them and picks a height. */
.ad-block .ad-block-image:not([data-h]) { height: auto; }
.ad-block .ad-block-image:not([data-h]) img { height: auto; object-fit: initial; }
/* Fit + position (applied to the inner img). */
.ad-block .ad-block-image[data-fit="contain"] img { object-fit: contain; }
.ad-block .ad-block-image[data-pos="top"]    img { object-position: center top; }
.ad-block .ad-block-image[data-pos="bottom"] img { object-position: center bottom; }

/* Stacked-slot override — when the same ad lives in a half-height slot the
   data-half-* attrs (emitted by renderMediaImage when the ad file has an
   image_half override) take over fit / position / height. Each rule beats
   the default data-* rules above on both specificity (one extra class) and
   source order. */
.layout-slot-stacked .ad-block .ad-block-image[data-half-h="small"]  { height: 100px; }
.layout-slot-stacked .ad-block .ad-block-image[data-half-h="medium"] { height: 160px; }
.layout-slot-stacked .ad-block .ad-block-image[data-half-h="large"]  { height: 220px; }
.layout-slot-stacked .ad-block .ad-block-image[data-half-h="xlarge"] { height: 280px; }
.layout-slot-stacked .ad-block .ad-block-image[data-half-h="full"]   { flex: 1 1 0; min-height: 60px; height: auto; }
.layout-slot-stacked .ad-block .ad-block-image[data-half-h="full"] ~ .ad-block-body { flex: 0 0 auto; }
.layout-slot-stacked .ad-block .ad-block-image[data-half-fit="cover"]   img { object-fit: cover; }
.layout-slot-stacked .ad-block .ad-block-image[data-half-fit="contain"] img { object-fit: contain; }
.layout-slot-stacked .ad-block .ad-block-image[data-half-pos="center"] img { object-position: center; }
.layout-slot-stacked .ad-block .ad-block-image[data-half-pos="top"]    img { object-position: center top; }
.layout-slot-stacked .ad-block .ad-block-image[data-half-pos="bottom"] img { object-position: center bottom; }

/* ---- Ad-block layout axis ----
   data-layout on .ad-block decides how the image sits relative to the text:
     above      — image stacked on top of text (the default; flex column)
     below      — text on top, image beneath (order: 5 on image)
     left       — image on the left column, text on the right
     right      — image on the right column, text on the left
     background — image fills the whole ad, text overlays with gradient scrim
   In left/right layouts the image container stretches to row height and its
   *width* is the primary knob (data-w=small|medium|large). Any data-h value
   is reset so the height rules above don't fight the row axis.
*/
/* Vertical layout positions — the image can be dropped into any slot in the
   reading order. Base `order` values give every child its natural position;
   overrides below bump the image into gaps between them. Only applies to
   column-flex layouts (above / after-title / before-cta / below); grid-based
   left/right and absolute-based background ignore order by construction. */
.ad-block-desktop > .ad-block-label   { order: 0; }
.ad-block-desktop > .ad-block-image   { order: 1; }  /* default = above */
.ad-block-desktop > .ad-block-title   { order: 2; }
.ad-block-desktop > .ad-block-body    { order: 4; }
.ad-block-desktop > .ad-block-cta     { order: 6; }
.ad-block-desktop > .ad-block-sponsor { order: 8; }

.ad-block-desktop[data-layout="after-title"] > .ad-block-image { order: 3; }
.ad-block-desktop[data-layout="before-cta"]  > .ad-block-image { order: 5; }
.ad-block-desktop[data-layout="below"]       > .ad-block-image { order: 9; }

/* Left/right — grid layout lets the image span the text rows (title + body
   + cta + sponsor) and stretch to their combined height without needing an
   extra wrapper div around the text. */
.ad-block-desktop[data-layout="left"],
.ad-block-desktop[data-layout="right"] {
    display: grid;
    grid-template-columns: 40% 1fr;
    grid-template-rows: auto auto 1fr auto auto;
    grid-template-areas:
        "label label"
        "image title"
        "image body"
        "image cta"
        "image sponsor";
    gap: 4px 12px;
    align-items: stretch;
}
.ad-block-desktop[data-layout="right"] {
    grid-template-columns: 1fr 40%;
    grid-template-areas:
        "label label"
        "title image"
        "body image"
        "cta image"
        "sponsor image";
}
.ad-block-desktop[data-layout="left"]  .ad-block-label,
.ad-block-desktop[data-layout="right"] .ad-block-label    { grid-area: label; }
.ad-block-desktop[data-layout="left"]  .ad-block-image,
.ad-block-desktop[data-layout="right"] .ad-block-image    { grid-area: image; height: auto; min-height: 0; }
.ad-block-desktop[data-layout="left"]  .ad-block-title,
.ad-block-desktop[data-layout="right"] .ad-block-title    { grid-area: title; }
.ad-block-desktop[data-layout="left"]  .ad-block-body,
.ad-block-desktop[data-layout="right"] .ad-block-body     { grid-area: body; flex: unset; }
.ad-block-desktop[data-layout="left"]  .ad-block-cta,
.ad-block-desktop[data-layout="right"] .ad-block-cta      { grid-area: cta; }
.ad-block-desktop[data-layout="left"]  .ad-block-sponsor,
.ad-block-desktop[data-layout="right"] .ad-block-sponsor  { grid-area: sponsor; }
.ad-block-desktop[data-layout="left"]  .ad-block-image img,
.ad-block-desktop[data-layout="right"] .ad-block-image img {
    height: 100%;
    object-fit: cover;
}
/* Width knob — :has() on the parent adjusts the grid columns based on the
   image's data-w. Supported in all evergreen browsers (Safari 15.4+). */
.ad-block-desktop[data-layout="left"]:has(.ad-block-image[data-w="small"])   { grid-template-columns: 30% 1fr; }
.ad-block-desktop[data-layout="left"]:has(.ad-block-image[data-w="medium"])  { grid-template-columns: 40% 1fr; }
.ad-block-desktop[data-layout="left"]:has(.ad-block-image[data-w="large"])   { grid-template-columns: 55% 1fr; }
.ad-block-desktop[data-layout="right"]:has(.ad-block-image[data-w="small"])  { grid-template-columns: 1fr 30%; }
.ad-block-desktop[data-layout="right"]:has(.ad-block-image[data-w="medium"]) { grid-template-columns: 1fr 40%; }
.ad-block-desktop[data-layout="right"]:has(.ad-block-image[data-w="large"])  { grid-template-columns: 1fr 55%; }

/* Background layout — image absolute-positioned, text overlays with a
   dark gradient for readability. The text colour flips to light. */
.ad-block-desktop[data-layout="background"] {
    position: relative;
    padding: 14px 16px;
    overflow: hidden;
}
.ad-block-desktop[data-layout="background"] .ad-block-image {
    position: absolute;
    inset: 0;
    height: auto;
    width: 100%;
    margin: 0;
    z-index: 0;
}
.ad-block-desktop[data-layout="background"] .ad-block-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.ad-block-desktop[data-layout="background"] .ad-block-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.75) 100%);
    pointer-events: none;
}
.ad-block-desktop[data-layout="background"] > :not(.ad-block-image) {
    position: relative;
    z-index: 1;
}
.ad-block-desktop[data-layout="background"] .ad-block-label,
.ad-block-desktop[data-layout="background"] .ad-block-title,
.ad-block-desktop[data-layout="background"] .ad-block-body,
.ad-block-desktop[data-layout="background"] .ad-block-sponsor {
    color: #fff;
    border-color: rgba(255,255,255,0.3);
}
.ad-block-desktop[data-layout="background"] .ad-block-cta { color: #ffeb3b; }

/* Half-slot layout override — .layout-slot-stacked + data-half-layout on the
   .ad-block swaps the axis inside stacked slots without changing the default
   desktop layout. Mirrors the full-layout rules above. */
/* Stacked slot gets its own override layer — same order scheme as default,
   but keyed on data-half-layout. No base rules needed here; the defaults
   above still hold, and these just bump the image's order when the stacked
   override is set. */
.layout-slot-stacked .ad-block-desktop[data-half-layout="after-title"] > .ad-block-image { order: 3; }
.layout-slot-stacked .ad-block-desktop[data-half-layout="before-cta"]  > .ad-block-image { order: 5; }
.layout-slot-stacked .ad-block-desktop[data-half-layout="below"]       > .ad-block-image { order: 9; }

.layout-slot-stacked .ad-block-desktop[data-half-layout="left"],
.layout-slot-stacked .ad-block-desktop[data-half-layout="right"] {
    display: grid;
    grid-template-columns: 40% 1fr;
    grid-template-rows: auto auto 1fr auto auto;
    grid-template-areas:
        "label label"
        "image title"
        "image body"
        "image cta"
        "image sponsor";
    gap: 4px 12px;
    align-items: stretch;
}
.layout-slot-stacked .ad-block-desktop[data-half-layout="right"] {
    grid-template-columns: 1fr 40%;
    grid-template-areas:
        "label label"
        "title image"
        "body image"
        "cta image"
        "sponsor image";
}
.layout-slot-stacked .ad-block-desktop[data-half-layout="left"]  .ad-block-label,
.layout-slot-stacked .ad-block-desktop[data-half-layout="right"] .ad-block-label    { grid-area: label; }
.layout-slot-stacked .ad-block-desktop[data-half-layout="left"]  .ad-block-image,
.layout-slot-stacked .ad-block-desktop[data-half-layout="right"] .ad-block-image    { grid-area: image; height: auto; min-height: 0; }
.layout-slot-stacked .ad-block-desktop[data-half-layout="left"]  .ad-block-title,
.layout-slot-stacked .ad-block-desktop[data-half-layout="right"] .ad-block-title    { grid-area: title; }
.layout-slot-stacked .ad-block-desktop[data-half-layout="left"]  .ad-block-body,
.layout-slot-stacked .ad-block-desktop[data-half-layout="right"] .ad-block-body     { grid-area: body; flex: unset; }
.layout-slot-stacked .ad-block-desktop[data-half-layout="left"]  .ad-block-cta,
.layout-slot-stacked .ad-block-desktop[data-half-layout="right"] .ad-block-cta      { grid-area: cta; }
.layout-slot-stacked .ad-block-desktop[data-half-layout="left"]  .ad-block-sponsor,
.layout-slot-stacked .ad-block-desktop[data-half-layout="right"] .ad-block-sponsor  { grid-area: sponsor; }
.layout-slot-stacked .ad-block-desktop[data-half-layout="left"]  .ad-block-image img,
.layout-slot-stacked .ad-block-desktop[data-half-layout="right"] .ad-block-image img {
    height: 100%;
    object-fit: cover;
}
.layout-slot-stacked .ad-block-desktop[data-half-layout="left"]:has(.ad-block-image[data-half-w="small"])   { grid-template-columns: 30% 1fr; }
.layout-slot-stacked .ad-block-desktop[data-half-layout="left"]:has(.ad-block-image[data-half-w="medium"])  { grid-template-columns: 40% 1fr; }
.layout-slot-stacked .ad-block-desktop[data-half-layout="left"]:has(.ad-block-image[data-half-w="large"])   { grid-template-columns: 55% 1fr; }
.layout-slot-stacked .ad-block-desktop[data-half-layout="right"]:has(.ad-block-image[data-half-w="small"])  { grid-template-columns: 1fr 30%; }
.layout-slot-stacked .ad-block-desktop[data-half-layout="right"]:has(.ad-block-image[data-half-w="medium"]) { grid-template-columns: 1fr 40%; }
.layout-slot-stacked .ad-block-desktop[data-half-layout="right"]:has(.ad-block-image[data-half-w="large"])  { grid-template-columns: 1fr 55%; }
.layout-slot-stacked .ad-block-desktop[data-half-layout="background"] {
    position: relative;
    padding: 14px 16px;
    overflow: hidden;
}
.layout-slot-stacked .ad-block-desktop[data-half-layout="background"] .ad-block-image {
    position: absolute;
    inset: 0;
    height: auto;
    width: 100%;
    margin: 0;
    z-index: 0;
}
.layout-slot-stacked .ad-block-desktop[data-half-layout="background"] .ad-block-image img {
    width: 100%; height: 100%; object-fit: cover;
}
.layout-slot-stacked .ad-block-desktop[data-half-layout="background"] .ad-block-image::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.75) 100%);
    pointer-events: none;
}
.layout-slot-stacked .ad-block-desktop[data-half-layout="background"] > :not(.ad-block-image) {
    position: relative; z-index: 1;
}
.layout-slot-stacked .ad-block-desktop[data-half-layout="background"] .ad-block-label,
.layout-slot-stacked .ad-block-desktop[data-half-layout="background"] .ad-block-title,
.layout-slot-stacked .ad-block-desktop[data-half-layout="background"] .ad-block-body,
.layout-slot-stacked .ad-block-desktop[data-half-layout="background"] .ad-block-sponsor {
    color: #fff;
    border-color: rgba(255,255,255,0.3);
}
.layout-slot-stacked .ad-block-desktop[data-half-layout="background"] .ad-block-cta { color: #ffeb3b; }

.ad-block-title {
    font-family: var(--font-headline);
    font-size: 1.15rem;
    line-height: 1.15;
    margin: 2px 0;
    color: var(--color-text);
}

.ad-block-body {
    font-size: 0.82rem;
    line-height: 1.5;
    color: var(--color-text);
    flex: 1 1 auto;
}

.ad-block-body p {
    margin: 0 0 6px;
}

.ad-block-cta {
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-accent);
    text-decoration: none;
    margin-top: 4px;
}

.ad-block-cta:hover {
    text-decoration: underline;
}

.ad-block-sponsor {
    font-family: var(--font-sans);
    font-size: 0.65rem;
    color: var(--color-text-light);
    margin-top: 2px;
}

/* ---- Info Block ---- */

.info-block.info-block-mobile { display: none; }

.info-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: 100%;
    background: rgba(0, 0, 0, 0.03);
    padding: 14px 16px;
    border: 1px solid var(--color-rule-light);
}

.info-block-header {
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--color-rule-light);
    padding-bottom: 6px;
    margin-bottom: 2px;
}

.info-block-icon {
    font-size: 1.4rem;
    line-height: 1;
}

.info-block-title {
    font-family: var(--font-headline);
    font-size: 1rem;
    margin: 0;
    color: var(--color-text);
}

.info-block-body {
    font-size: 0.82rem;
    line-height: 1.5;
    color: var(--color-text);
    flex: 1 1 auto;
}

.info-block-body p {
    margin: 0 0 6px;
    text-indent: 0;
}

.info-block-footer {
    font-family: var(--font-sans);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-light);
    border-top: 1px solid var(--color-rule-light);
    padding-top: 6px;
}

/* Page 3 promo mobile variant is always hidden on desktop */
.page3-promo-mobile { display: none; }

/* ---- Promo blocks (card / strip / text styles) ----
   Billboard style reuses the existing .page3-promo-* classes. Card, strip
   and text are the new generic shapes used by promo/{slug}.json files. */

.promo-block.promo-block-mobile { display: none; }

.promo-block {
    display: block;
    height: 100%;
}

.promo-block a {
    text-decoration: none;
    color: inherit;
}

/* --- Card style --- */
.promo-card .promo-card-link {
    display: flex;
    flex-direction: column;
    gap: 6px;
    height: 100%;
    padding: 14px 16px;
    background: rgba(122, 37, 24, 0.04);
    border: 1px solid rgba(122, 37, 24, 0.2);
    transition: background-color 0.15s ease;
}
.promo-card .promo-card-link:hover {
    background: rgba(122, 37, 24, 0.08);
}
.promo-card .promo-card-label {
    font-family: var(--font-sans);
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--color-accent);
    font-weight: 700;
}
.promo-card .promo-card-image {
    margin: 4px 0;
    overflow: hidden;
    width: 100%;
    flex-shrink: 0;
}
.promo-card .promo-card-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
}
.promo-card .promo-card-image[data-h="small"]  { height: 100px; }
.promo-card .promo-card-image[data-h="medium"] { height: 160px; }
.promo-card .promo-card-image[data-h="large"]  { height: 220px; }
.promo-card .promo-card-image[data-h="xlarge"] { height: 320px; }
.promo-card .promo-card-image[data-h="full"]   { flex: 1 1 0; min-height: 80px; height: auto; }
.promo-card .promo-card-image[data-h="full"] ~ .promo-card-strapline { flex: 0 0 auto; }
.promo-card .promo-card-image:not([data-h]) { height: auto; }
.promo-card .promo-card-image:not([data-h]) img { height: auto; object-fit: initial; }
.promo-card .promo-card-image[data-fit="contain"] img { object-fit: contain; }
.promo-card .promo-card-image[data-pos="top"]    img { object-position: center top; }
.promo-card .promo-card-image[data-pos="bottom"] img { object-position: center bottom; }

/* Stacked-slot override for promos (symmetric with ad-block). */
.layout-slot-stacked .promo-card .promo-card-image[data-half-h="small"]  { height: 100px; }
.layout-slot-stacked .promo-card .promo-card-image[data-half-h="medium"] { height: 160px; }
.layout-slot-stacked .promo-card .promo-card-image[data-half-h="large"]  { height: 220px; }
.layout-slot-stacked .promo-card .promo-card-image[data-half-h="xlarge"] { height: 280px; }
.layout-slot-stacked .promo-card .promo-card-image[data-half-h="full"]   { flex: 1 1 0; min-height: 60px; height: auto; }
.layout-slot-stacked .promo-card .promo-card-image[data-half-fit="cover"]   img { object-fit: cover; }
.layout-slot-stacked .promo-card .promo-card-image[data-half-fit="contain"] img { object-fit: contain; }
.layout-slot-stacked .promo-card .promo-card-image[data-half-pos="center"] img { object-position: center; }
.layout-slot-stacked .promo-card .promo-card-image[data-half-pos="top"]    img { object-position: center top; }
.layout-slot-stacked .promo-card .promo-card-image[data-half-pos="bottom"] img { object-position: center bottom; }

/* ---- Promo-card layout axis ----
   Same five layouts as ad-block, except the flex container is the inner
   .promo-card-link rather than the outer aside, so selectors descend via
   .promo-card[data-layout=...] .promo-card-link. */
.promo-card .promo-card-link > .promo-card-label     { order: 0; }
.promo-card .promo-card-link > .promo-card-image     { order: 1; }  /* default = above */
.promo-card .promo-card-link > .promo-card-title     { order: 2; }
.promo-card .promo-card-link > .promo-card-strapline { order: 4; }
.promo-card .promo-card-link > .promo-card-cta       { order: 6; }

.promo-card[data-layout="after-title"] .promo-card-link > .promo-card-image { order: 3; }
.promo-card[data-layout="before-cta"]  .promo-card-link > .promo-card-image { order: 5; }
.promo-card[data-layout="below"]       .promo-card-link > .promo-card-image { order: 7; }

/* Embed slot — iframe or HTML snippet dropped in between strapline and CTA.
   order: 5 so it renders after strapline (4) and before CTA (6). When an
   image is set to `before-cta` (also order 5) source order keeps the image
   above the embed, which is still a sensible stack. */
.promo-card .promo-card-link > .promo-card-embed { order: 5; }
.promo-card-embed {
    margin: 6px 0 4px;
    line-height: 0; /* collapse whitespace around iframe */
    min-height: 0;
}
.promo-card-embed iframe,
.promo-card-embed embed,
.promo-card-embed object {
    max-width: 100%;
    display: block;
    border: 0;
}
/* When the card has an embed instead of a link wrapper, drop the hover
   background change (there's nothing to navigate to). */
.promo-card .promo-card-link-embed { cursor: default; }
.promo-card .promo-card-link-embed:hover { background: rgba(122, 37, 24, 0.04); }

.promo-card[data-layout="left"]  .promo-card-link,
.promo-card[data-layout="right"] .promo-card-link {
    display: grid;
    grid-template-columns: 40% 1fr;
    grid-template-rows: auto auto auto 1fr auto;
    grid-template-areas:
        "label label"
        "image title"
        "image strapline"
        "image embed"
        "image cta";
    gap: 4px 12px;
    align-items: stretch;
}
.promo-card[data-layout="right"] .promo-card-link {
    grid-template-columns: 1fr 40%;
    grid-template-areas:
        "label label"
        "title image"
        "strapline image"
        "embed image"
        "cta image";
}
.promo-card[data-layout="left"]  .promo-card-link .promo-card-embed,
.promo-card[data-layout="right"] .promo-card-link .promo-card-embed { grid-area: embed; }
.promo-card[data-layout="left"]  .promo-card-link .promo-card-label,
.promo-card[data-layout="right"] .promo-card-link .promo-card-label     { grid-area: label; }
.promo-card[data-layout="left"]  .promo-card-link .promo-card-image,
.promo-card[data-layout="right"] .promo-card-link .promo-card-image     { grid-area: image; height: auto; min-height: 0; margin: 0; }
.promo-card[data-layout="left"]  .promo-card-link .promo-card-title,
.promo-card[data-layout="right"] .promo-card-link .promo-card-title     { grid-area: title; }
.promo-card[data-layout="left"]  .promo-card-link .promo-card-strapline,
.promo-card[data-layout="right"] .promo-card-link .promo-card-strapline { grid-area: strapline; flex: unset; }
.promo-card[data-layout="left"]  .promo-card-link .promo-card-cta,
.promo-card[data-layout="right"] .promo-card-link .promo-card-cta       { grid-area: cta; }
.promo-card[data-layout="left"]  .promo-card-link .promo-card-image img,
.promo-card[data-layout="right"] .promo-card-link .promo-card-image img {
    height: 100%;
    object-fit: cover;
}
.promo-card[data-layout="left"]  .promo-card-link:has(.promo-card-image[data-w="small"])   { grid-template-columns: 30% 1fr; }
.promo-card[data-layout="left"]  .promo-card-link:has(.promo-card-image[data-w="medium"])  { grid-template-columns: 40% 1fr; }
.promo-card[data-layout="left"]  .promo-card-link:has(.promo-card-image[data-w="large"])   { grid-template-columns: 55% 1fr; }
.promo-card[data-layout="right"] .promo-card-link:has(.promo-card-image[data-w="small"])  { grid-template-columns: 1fr 30%; }
.promo-card[data-layout="right"] .promo-card-link:has(.promo-card-image[data-w="medium"]) { grid-template-columns: 1fr 40%; }
.promo-card[data-layout="right"] .promo-card-link:has(.promo-card-image[data-w="large"])  { grid-template-columns: 1fr 55%; }

/* Promo-card background — image fills, gradient overlay, white text. */
.promo-card[data-layout="background"] .promo-card-link {
    position: relative;
    overflow: hidden;
}
.promo-card[data-layout="background"] .promo-card-link .promo-card-image {
    position: absolute;
    inset: 0;
    height: auto;
    width: 100%;
    margin: 0;
    z-index: 0;
}
.promo-card[data-layout="background"] .promo-card-link .promo-card-image img {
    width: 100%; height: 100%; object-fit: cover;
}
.promo-card[data-layout="background"] .promo-card-link .promo-card-image::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.75) 100%);
    pointer-events: none;
}
.promo-card[data-layout="background"] .promo-card-link > :not(.promo-card-image) {
    position: relative; z-index: 1;
}
.promo-card[data-layout="background"] .promo-card-link .promo-card-label,
.promo-card[data-layout="background"] .promo-card-link .promo-card-title,
.promo-card[data-layout="background"] .promo-card-link .promo-card-strapline { color: #fff; }
.promo-card[data-layout="background"] .promo-card-link .promo-card-cta       { color: #ffeb3b; }

/* Half-slot promo layout override (mirrors the ad-block pattern). */
.layout-slot-stacked .promo-card[data-half-layout="after-title"] .promo-card-link > .promo-card-image { order: 3; }
.layout-slot-stacked .promo-card[data-half-layout="before-cta"]  .promo-card-link > .promo-card-image { order: 5; }
.layout-slot-stacked .promo-card[data-half-layout="below"]       .promo-card-link > .promo-card-image { order: 7; }

.layout-slot-stacked .promo-card[data-half-layout="left"]  .promo-card-link,
.layout-slot-stacked .promo-card[data-half-layout="right"] .promo-card-link {
    display: grid;
    grid-template-columns: 40% 1fr;
    grid-template-rows: auto auto auto 1fr auto;
    grid-template-areas:
        "label label"
        "image title"
        "image strapline"
        "image embed"
        "image cta";
    gap: 4px 12px;
    align-items: stretch;
}
.layout-slot-stacked .promo-card[data-half-layout="right"] .promo-card-link {
    grid-template-columns: 1fr 40%;
    grid-template-areas:
        "label label"
        "title image"
        "strapline image"
        "embed image"
        "cta image";
}
.layout-slot-stacked .promo-card[data-half-layout="left"]  .promo-card-link .promo-card-embed,
.layout-slot-stacked .promo-card[data-half-layout="right"] .promo-card-link .promo-card-embed { grid-area: embed; }
.layout-slot-stacked .promo-card[data-half-layout="left"]  .promo-card-link .promo-card-label,
.layout-slot-stacked .promo-card[data-half-layout="right"] .promo-card-link .promo-card-label     { grid-area: label; }
.layout-slot-stacked .promo-card[data-half-layout="left"]  .promo-card-link .promo-card-image,
.layout-slot-stacked .promo-card[data-half-layout="right"] .promo-card-link .promo-card-image     { grid-area: image; height: auto; min-height: 0; margin: 0; }
.layout-slot-stacked .promo-card[data-half-layout="left"]  .promo-card-link .promo-card-title,
.layout-slot-stacked .promo-card[data-half-layout="right"] .promo-card-link .promo-card-title     { grid-area: title; }
.layout-slot-stacked .promo-card[data-half-layout="left"]  .promo-card-link .promo-card-strapline,
.layout-slot-stacked .promo-card[data-half-layout="right"] .promo-card-link .promo-card-strapline { grid-area: strapline; flex: unset; }
.layout-slot-stacked .promo-card[data-half-layout="left"]  .promo-card-link .promo-card-cta,
.layout-slot-stacked .promo-card[data-half-layout="right"] .promo-card-link .promo-card-cta       { grid-area: cta; }
.layout-slot-stacked .promo-card[data-half-layout="left"]  .promo-card-link .promo-card-image img,
.layout-slot-stacked .promo-card[data-half-layout="right"] .promo-card-link .promo-card-image img {
    height: 100%;
    object-fit: cover;
}
.layout-slot-stacked .promo-card[data-half-layout="left"]  .promo-card-link:has(.promo-card-image[data-half-w="small"])   { grid-template-columns: 30% 1fr; }
.layout-slot-stacked .promo-card[data-half-layout="left"]  .promo-card-link:has(.promo-card-image[data-half-w="medium"])  { grid-template-columns: 40% 1fr; }
.layout-slot-stacked .promo-card[data-half-layout="left"]  .promo-card-link:has(.promo-card-image[data-half-w="large"])   { grid-template-columns: 55% 1fr; }
.layout-slot-stacked .promo-card[data-half-layout="right"] .promo-card-link:has(.promo-card-image[data-half-w="small"])  { grid-template-columns: 1fr 30%; }
.layout-slot-stacked .promo-card[data-half-layout="right"] .promo-card-link:has(.promo-card-image[data-half-w="medium"]) { grid-template-columns: 1fr 40%; }
.layout-slot-stacked .promo-card[data-half-layout="right"] .promo-card-link:has(.promo-card-image[data-half-w="large"])  { grid-template-columns: 1fr 55%; }

.layout-slot-stacked .promo-card[data-half-layout="background"] .promo-card-link {
    position: relative;
    overflow: hidden;
}
.layout-slot-stacked .promo-card[data-half-layout="background"] .promo-card-link .promo-card-image {
    position: absolute; inset: 0; height: auto; width: 100%; margin: 0; z-index: 0;
}
.layout-slot-stacked .promo-card[data-half-layout="background"] .promo-card-link .promo-card-image img {
    width: 100%; height: 100%; object-fit: cover;
}
.layout-slot-stacked .promo-card[data-half-layout="background"] .promo-card-link .promo-card-image::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.75) 100%);
    pointer-events: none;
}
.layout-slot-stacked .promo-card[data-half-layout="background"] .promo-card-link > :not(.promo-card-image) {
    position: relative; z-index: 1;
}
.layout-slot-stacked .promo-card[data-half-layout="background"] .promo-card-link .promo-card-label,
.layout-slot-stacked .promo-card[data-half-layout="background"] .promo-card-link .promo-card-title,
.layout-slot-stacked .promo-card[data-half-layout="background"] .promo-card-link .promo-card-strapline { color: #fff; }
.layout-slot-stacked .promo-card[data-half-layout="background"] .promo-card-link .promo-card-cta       { color: #ffeb3b; }
.promo-card .promo-card-title {
    font-family: var(--font-headline);
    font-size: 1.25rem;
    line-height: 1.18;
    margin: 2px 0;
    color: var(--color-text);
}
.promo-card .promo-card-strapline {
    font-size: 0.85rem;
    line-height: 1.45;
    color: var(--color-text-light);
    margin: 0;
    flex: 1 1 auto;
}
.promo-card .promo-card-cta {
    font-family: var(--font-sans);
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-accent);
    margin-top: 6px;
}

/* --- Strip style --- */
.promo-strip .promo-strip-link {
    display: flex;
    gap: 12px;
    align-items: center;
    height: 100%;
    padding: 10px 14px;
    background: rgba(122, 37, 24, 0.04);
    border: 1px solid rgba(122, 37, 24, 0.2);
    transition: background-color 0.15s ease;
}
.promo-strip .promo-strip-link:hover {
    background: rgba(122, 37, 24, 0.08);
}
.promo-strip .promo-strip-img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    flex: 0 0 72px;
}
.promo-strip .promo-strip-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1 1 auto;
    min-width: 0;
}
.promo-strip .promo-strip-label {
    font-family: var(--font-sans);
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--color-accent);
    font-weight: 700;
}
.promo-strip .promo-strip-title {
    font-family: var(--font-headline);
    font-size: 1rem;
    line-height: 1.2;
    color: var(--color-text);
}
.promo-strip .promo-strip-strapline {
    font-size: 0.76rem;
    line-height: 1.4;
    color: var(--color-text-light);
}

/* --- Text style --- */
.promo-text .promo-text-link {
    display: flex;
    flex-direction: column;
    gap: 4px;
    height: 100%;
    padding: 14px 16px;
    border-top: 2px solid var(--color-text);
    border-bottom: 1px solid var(--color-rule);
}
.promo-text .promo-text-label {
    font-family: var(--font-sans);
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--color-accent);
    font-weight: 700;
}
.promo-text .promo-text-title {
    font-family: var(--font-headline);
    font-size: 1.15rem;
    line-height: 1.2;
    margin: 2px 0;
    color: var(--color-text);
}
.promo-text .promo-text-strapline {
    font-size: 0.82rem;
    line-height: 1.45;
    color: var(--color-text-light);
    flex: 1 1 auto;
    margin: 0;
}
.promo-text .promo-text-cta {
    font-family: var(--font-sans);
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-accent);
    margin-top: 4px;
}

/* ---- Layout rows: responsive ----
   On phones the whole layout collapses into a single scrolling stack.
   Each cell keeps a size class inherited from its desktop position:
   - LARGE  — cells from .layout-row-full (hero, ~240px image)
   - MEDIUM — cells from the 2/3-col slot of .layout-row-2-1 / .layout-row-1-2 (~120px image)
   - SMALL  — cells from 1/3-col slots (1:1:1, or the "1" side of 2:1/1:2) and
              any cell inside a stacked slot — text only, no image.
*/

@media (max-width: 900px) {
    /* Collapse everything to one column, drop fixed heights, release clipping */
    .layout-row,
    .layout-row-full,
    .layout-row-2-1,
    .layout-row-1-2,
    .layout-row-1-1-1 {
        grid-template-columns: 1fr;
        height: auto;
    }
    .layout-row .layout-slot,
    .layout-row .layout-slot-stacked {
        grid-column: span 1 !important;
        border-right: none;
        min-height: auto;
        height: auto;
        overflow: visible;
        padding: 14px 0;
    }
    .layout-row .layout-slot + .layout-slot,
    .layout-row .layout-slot + .layout-slot-stacked,
    .layout-row .layout-slot-stacked + .layout-slot,
    .layout-row .layout-slot-stacked + .layout-slot-stacked {
        border-top: 1px solid var(--color-rule);
    }
    .layout-row .layout-slot-stacked {
        display: block; /* stop enforcing 1fr 1fr — cells stack naturally */
    }
    .layout-slot-stacked .layout-cell + .layout-cell {
        margin-top: 14px;
        padding-top: 14px;
    }
    .layout-cell .story-card {
        height: auto;
        padding: 0;
    }

    /* On mobile, compact cards get their category tags back — they become
       peer stories in the vertical stack, so hierarchy no longer applies. */
    .story-card-compact .category-tag,
    .story-card-compact .subcategory-tag {
        display: inline-block;
    }

    /* ---- SMALL (default, text-only) ----
       1-col slots (the "1" side of 2:1/1:2, every slot in 1:1:1),
       and any cell inside a stacked slot. Hide the card image entirely. */
    .layout-row-1-1-1 .layout-cell .card-image,
    .layout-row-2-1 .layout-slot:last-child .layout-cell .card-image,
    .layout-row-1-2 .layout-slot:first-child .layout-cell .card-image,
    .layout-slot-stacked .layout-cell .card-image {
        display: none;
    }
    /* Trim card body to the essentials for small cells */
    .layout-row-1-1-1 .layout-cell .card-lede,
    .layout-row-2-1 .layout-slot:last-child .layout-cell .card-lede,
    .layout-row-1-2 .layout-slot:first-child .layout-cell .card-lede {
        display: none;
    }
    .layout-row-1-1-1 .layout-cell .card-headline,
    .layout-row-2-1 .layout-slot:last-child .layout-cell .card-headline,
    .layout-row-1-2 .layout-slot:first-child .layout-cell .card-headline {
        font-size: 1.1rem;
        line-height: 1.25;
    }

    /* ---- MEDIUM ----
       The 2/3-col slot in .layout-row-2-1 (first) and .layout-row-1-2 (last).
       Small photo thumbnail ~120px tall, headline + deck. */
    .layout-row-2-1 .layout-slot:first-child .layout-cell .card-image,
    .layout-row-1-2 .layout-slot:last-child  .layout-cell .card-image {
        display: block;
        width: 100%;
        height: 140px;
        overflow: hidden;
        margin-bottom: 10px;
    }
    .layout-row-2-1 .layout-slot:first-child .layout-cell .card-image img,
    .layout-row-1-2 .layout-slot:last-child  .layout-cell .card-image img,
    .layout-row-2-1 .layout-slot:first-child .layout-cell .card-image .image-placeholder,
    .layout-row-1-2 .layout-slot:last-child  .layout-cell .card-image .image-placeholder {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    .layout-row-2-1 .layout-slot:first-child .layout-cell .card-headline,
    .layout-row-1-2 .layout-slot:last-child  .layout-cell .card-headline {
        font-size: 1.3rem;
        line-height: 1.2;
    }
    .layout-row-2-1 .layout-slot:first-child .layout-cell .card-lede,
    .layout-row-1-2 .layout-slot:last-child  .layout-cell .card-lede {
        display: none; /* deck is enough at this size */
    }

    /* ---- LARGE ----
       Full-row cells get a hero photo ~240px and a slightly longer readable card. */
    .layout-row-full .layout-cell .card-image {
        display: block;
        width: 100%;
        height: 240px;
        overflow: hidden;
        margin-bottom: 12px;
    }
    .layout-row-full .layout-cell .card-image img,
    .layout-row-full .layout-cell .card-image .image-placeholder {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    .layout-row-full .layout-cell .card-headline {
        font-size: 1.55rem;
        line-height: 1.15;
    }
    .layout-row-full .layout-cell .card-lede {
        font-size: 0.92rem;
        line-height: 1.5;
    }

    /* ---- Block-variant visibility flip ----
       Hide desktop variants, show mobile variants. */
    .ad-block-desktop,
    .info-block-desktop,
    .page3-promo-desktop,
    .promo-block-desktop {
        display: none !important;
    }
    .ad-block.ad-block-mobile { display: flex; }
    .info-block.info-block-mobile { display: flex; }
    .page3-promo-mobile { display: flex; }
    .promo-block.promo-block-mobile { display: block; }

    /* Compact mobile ad — horizontal thumbnail + text card */
    .ad-block-mobile {
        flex-direction: row;
        gap: 12px;
        align-items: flex-start;
        flex-wrap: wrap;
        padding: 10px 0;
    }
    .ad-block-mobile .ad-block-label {
        flex: 1 1 100%;
        border-bottom: none;
        padding-bottom: 0;
        margin-bottom: 0;
    }
    .ad-block-mobile .ad-block-image {
        flex: 0 0 90px;
    }
    /* Drop any data-h container height — mobile uses a fixed 90x90 thumb,
       UNLESS the user has picked a mobile layout, in which case data-h is
       honoured like the desktop variant. */
    .ad-block.ad-block-mobile:not([data-layout]) .ad-block-image[data-h] { height: auto; }
    .ad-block-mobile .ad-block-image img {
        width: 90px;
        height: 90px;
        object-fit: cover;
    }
    .ad-block-mobile .ad-block-title {
        font-size: 1rem;
        margin: 0 0 2px;
    }
    .ad-block-mobile .ad-block-body {
        font-size: 0.8rem;
    }
    .ad-block-mobile .ad-block-body p {
        margin: 0 0 4px;
    }
    .ad-block-mobile .ad-block-cta {
        font-size: 0.72rem;
    }
    .ad-block-mobile .ad-block-sponsor {
        display: none;
    }
    /* Text column inside the mobile ad grows to fill */
    .ad-block-mobile .ad-block-title,
    .ad-block-mobile .ad-block-body,
    .ad-block-mobile .ad-block-cta {
        flex: 1 1 calc(100% - 102px);
    }

    /* ---- Mobile ad — user-picked layout overrides ----
       When image_mobile_layout is set, the merged mobile block carries
       data-layout on the mobile aside. These rules undo the hardcoded
       90x90 thumb styles and mirror the desktop layout rules so the
       picker options actually do something on mobile. Specificity (class
       + class + attr) beats the `.ad-block-mobile` hardcoded rules above. */
    .ad-block.ad-block-mobile[data-layout] {
        flex-direction: column;
        gap: 6px;
        padding: 4px 0;
        flex-wrap: nowrap;
    }
    .ad-block.ad-block-mobile[data-layout] > .ad-block-label {
        flex: initial;
        padding-bottom: 4px;
        border-bottom: 1px solid var(--color-rule-light);
        margin-bottom: 4px;
    }
    .ad-block.ad-block-mobile[data-layout] > .ad-block-image { flex: initial; }
    .ad-block.ad-block-mobile[data-layout] > .ad-block-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    /* Restore sponsor (hidden by default on mobile) when layout is custom. */
    .ad-block.ad-block-mobile[data-layout] > .ad-block-sponsor { display: block; }
    .ad-block.ad-block-mobile[data-layout] > .ad-block-title,
    .ad-block.ad-block-mobile[data-layout] > .ad-block-body,
    .ad-block.ad-block-mobile[data-layout] > .ad-block-cta { flex: initial; }

    /* Order scheme — same slots as desktop so vertical layouts work. */
    .ad-block.ad-block-mobile[data-layout] > .ad-block-label   { order: 0; }
    .ad-block.ad-block-mobile[data-layout] > .ad-block-image   { order: 1; }
    .ad-block.ad-block-mobile[data-layout] > .ad-block-title   { order: 2; }
    .ad-block.ad-block-mobile[data-layout] > .ad-block-body    { order: 4; }
    .ad-block.ad-block-mobile[data-layout] > .ad-block-cta     { order: 6; }
    .ad-block.ad-block-mobile[data-layout] > .ad-block-sponsor { order: 8; }
    .ad-block.ad-block-mobile[data-layout="after-title"] > .ad-block-image { order: 3; }
    .ad-block.ad-block-mobile[data-layout="before-cta"]  > .ad-block-image { order: 5; }
    .ad-block.ad-block-mobile[data-layout="below"]       > .ad-block-image { order: 9; }

    /* Left / right — grid with image column beside text column. */
    .ad-block.ad-block-mobile[data-layout="left"],
    .ad-block.ad-block-mobile[data-layout="right"] {
        display: grid;
        grid-template-columns: 40% 1fr;
        grid-template-rows: auto auto 1fr auto auto;
        grid-template-areas:
            "label label"
            "image title"
            "image body"
            "image cta"
            "image sponsor";
        gap: 4px 12px;
        align-items: stretch;
    }
    .ad-block.ad-block-mobile[data-layout="right"] {
        grid-template-columns: 1fr 40%;
        grid-template-areas:
            "label label"
            "title image"
            "body image"
            "cta image"
            "sponsor image";
    }
    .ad-block.ad-block-mobile[data-layout="left"]  .ad-block-label,
    .ad-block.ad-block-mobile[data-layout="right"] .ad-block-label    { grid-area: label; }
    .ad-block.ad-block-mobile[data-layout="left"]  .ad-block-image,
    .ad-block.ad-block-mobile[data-layout="right"] .ad-block-image    { grid-area: image; height: auto; min-height: 0; }
    .ad-block.ad-block-mobile[data-layout="left"]  .ad-block-title,
    .ad-block.ad-block-mobile[data-layout="right"] .ad-block-title    { grid-area: title; }
    .ad-block.ad-block-mobile[data-layout="left"]  .ad-block-body,
    .ad-block.ad-block-mobile[data-layout="right"] .ad-block-body     { grid-area: body; flex: unset; }
    .ad-block.ad-block-mobile[data-layout="left"]  .ad-block-cta,
    .ad-block.ad-block-mobile[data-layout="right"] .ad-block-cta      { grid-area: cta; }
    .ad-block.ad-block-mobile[data-layout="left"]  .ad-block-sponsor,
    .ad-block.ad-block-mobile[data-layout="right"] .ad-block-sponsor  { grid-area: sponsor; }
    .ad-block.ad-block-mobile[data-layout="left"]  .ad-block-image img,
    .ad-block.ad-block-mobile[data-layout="right"] .ad-block-image img { height: 100%; object-fit: cover; }
    .ad-block.ad-block-mobile[data-layout="left"]:has(.ad-block-image[data-w="small"])   { grid-template-columns: 30% 1fr; }
    .ad-block.ad-block-mobile[data-layout="left"]:has(.ad-block-image[data-w="medium"])  { grid-template-columns: 40% 1fr; }
    .ad-block.ad-block-mobile[data-layout="left"]:has(.ad-block-image[data-w="large"])   { grid-template-columns: 55% 1fr; }
    .ad-block.ad-block-mobile[data-layout="right"]:has(.ad-block-image[data-w="small"])  { grid-template-columns: 1fr 30%; }
    .ad-block.ad-block-mobile[data-layout="right"]:has(.ad-block-image[data-w="medium"]) { grid-template-columns: 1fr 40%; }
    .ad-block.ad-block-mobile[data-layout="right"]:has(.ad-block-image[data-w="large"])  { grid-template-columns: 1fr 55%; }

    /* Background — image fills, dark gradient, light text. */
    .ad-block.ad-block-mobile[data-layout="background"] {
        position: relative;
        padding: 14px 16px;
        overflow: hidden;
    }
    .ad-block.ad-block-mobile[data-layout="background"] .ad-block-image {
        position: absolute; inset: 0; height: auto; width: 100%; margin: 0; z-index: 0;
    }
    .ad-block.ad-block-mobile[data-layout="background"] .ad-block-image img {
        width: 100%; height: 100%; object-fit: cover;
    }
    .ad-block.ad-block-mobile[data-layout="background"] .ad-block-image::after {
        content: ''; position: absolute; inset: 0;
        background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.75) 100%);
        pointer-events: none;
    }
    .ad-block.ad-block-mobile[data-layout="background"] > :not(.ad-block-image) {
        position: relative; z-index: 1;
    }
    .ad-block.ad-block-mobile[data-layout="background"] .ad-block-label,
    .ad-block.ad-block-mobile[data-layout="background"] .ad-block-title,
    .ad-block.ad-block-mobile[data-layout="background"] .ad-block-body,
    .ad-block.ad-block-mobile[data-layout="background"] .ad-block-sponsor {
        color: #fff;
        border-color: rgba(255,255,255,0.3);
    }
    .ad-block.ad-block-mobile[data-layout="background"] .ad-block-cta { color: #ffeb3b; }

    /* Compact mobile info block — single row with icon + title + body */
    .info-block-mobile {
        flex-direction: column;
        gap: 6px;
        padding: 12px 14px;
    }
    .info-block-mobile .info-block-title {
        font-size: 0.95rem;
    }
    .info-block-mobile .info-block-body {
        font-size: 0.78rem;
    }

    /* Compact mobile Page 3 promo — horizontal bar with thumbnail + label */
    .page3-promo-mobile {
        flex-direction: row;
        align-items: center;
        gap: 14px;
        padding: 10px 12px;
        background: rgba(122, 37, 24, 0.05);
        border: 1px solid rgba(122, 37, 24, 0.2);
        border-radius: 4px;
        text-decoration: none;
        color: var(--color-text);
    }
    .page3-promo-img-mobile {
        width: 80px;
        height: 80px;
        object-fit: cover;
        border-radius: 2px;
        flex: 0 0 80px;
    }
    .page3-promo-text-mobile {
        display: flex;
        flex-direction: column;
        gap: 2px;
        flex: 1 1 auto;
    }
    .page3-promo-title-mobile {
        font-family: var(--font-headline);
        font-size: 1.1rem;
        font-weight: 700;
        color: var(--color-accent);
    }
    .page3-promo-strapline-mobile {
        font-family: var(--font-sans);
        font-size: 0.78rem;
        color: var(--color-text-light);
    }
}
