/* 
 ---------------------------------
 |   LAST UPDATED: 2026-08-27    |
 ---------------------------------
 */

/* VIEWPORT HEADNOTE: Standard boundaries 1024, 768–1023, ≤767. min-width 1439px and 1920px are desktop tiers, not standard boundaries. max-width 479px is not tied to our device viewport sizes; used for small-mobile refinement only. */
/* Container queries: `mentions-list` = list rail width; `mentions-hero` = hero artboard; `mention-card` = per-card column width. */

/* ========================================================================
   VIEWPORT-AGNOSTIC (base styles)
   ======================================================================== */

/* Flush under fixed #header (same outcome as navbar-ornamental’s .site-content:has(…hero.has-cover…); lives here per project rule: do not edit navbar-ornamental for Mentions). */
.site-content:has(main .mentions-section .mentions-hero) {
    padding-top: 0;
}

.mentions-section {
    padding-bottom: calc(5vw * var(--scale));
    overflow: visible;
}

/* Lead hero bleed (match site-main rhythm used for cover hero): full width, list below keeps inset. */
body.mentions-immersive .site-main:has(.mentions-section) {
    padding-left: 0;
}

@media (min-width: 1024px) {
    body.mentions-immersive .site-main:has(.mentions-section) .mentions-list-container {
        padding-left: calc(5vw * var(--scale));
        box-sizing: border-box;
    }
}

@media (max-width: 1023px) {
    body.mentions-immersive .site-main:has(.mentions-section) .mentions-list-container {
        padding-left: max(calc(2.5vw * var(--scale)), env(safe-area-inset-left, 0px));
        padding-right: max(calc(2.5vw * var(--scale)), env(safe-area-inset-right, 0px));
        box-sizing: border-box;
    }
}

/* Static hero: no site cover `hero`; art + 6×6 grid copy (title row1 col1–2, subtitle row4 col4–5). */
.mentions-hero {
    position: relative;
    overflow: visible;
    width: min(100vw, 1200px);
    max-width: 100%;
    margin-inline: auto;
    box-sizing: border-box;
}

.mentions-hero-scene {
    --mentions-hero-w: min(100vw, 1200px);
    container-type: inline-size;
    container-name: mentions-hero;
    position: relative;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-template-rows: repeat(6, minmax(0, 1fr));
    width: var(--mentions-hero-w);
    max-width: 100%;
    margin-inline: auto;
    box-sizing: border-box;
    min-height: min(100dvh, calc(var(--mentions-hero-w) * 792 / 1112));
    height: min(100dvh, calc(var(--mentions-hero-w) * 792 / 1112));
    max-height: min(100dvh, 100svh);
    overflow: visible;
}

.mentions-hero-media {
    grid-column: 1 / -1;
    grid-row: 1 / -1;
    z-index: 0;
    position: relative;
    min-height: 0;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.mentions-hero-image {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

.mentions-hero-title {
    grid-column: 1 / 3;
    grid-row: 1;
    z-index: 1;
    align-self: start;
    justify-self: start;
    margin: 3vw 0 0 3vw;
    padding: 0;
    overflow: visible;
    max-width: none;
    text-overflow: clip;
    white-space: normal;
    word-break: normal;
    overflow-wrap: anywhere;
    font-family: var(--ed);
    font-style: italic;
    font-weight: 300;
    font-kerning:auto;
    font-optical-sizing: auto;
    font-size: calc(var(--fontSizeH1) * var(--scale));
    line-height: 1.08;
    color: #f8f4ee;
    text-shadow:
        0 0.04em 0.2em rgba(0, 0, 0, 0.55),
        0 0.12em 0.45em rgba(0, 0, 0, 0.35);
    pointer-events: none;
}

.mentions-hero-desc {
    grid-column: 4 / 6;
    grid-row: 4;
    z-index: 1;
    align-self: start;
    justify-self: start;
    display: flow-root;
    margin: 0;
    padding: 0;
    overflow: visible;
    max-width: none;
    text-overflow: clip;
    white-space: normal;
    word-break: normal;
    overflow-wrap: anywhere;
    font-family: var(--ed);
    font-size: calc(round(var(--fontSizeH4) * var(--scale), 2px));
    line-height: 1.35;
    color: rgba(252, 248, 242, 0.94);
    text-shadow:
        0 0.06em 0.18em rgba(0, 0, 0, 0.45),
        0 0.02em 0.08em rgba(0, 0, 0, 0.35);
    pointer-events: auto;
}

/* Five-tier Jenga rag: an invisible float varies the start edge while natural line lengths vary the end edge. */
@supports (shape-outside: polygon(0 0, 100% 0, 100% 100%, 0 100%)) {
    .mentions-hero-desc::before {
        content: "";
        float: left;
        inline-size: 3ch;
        block-size: 5lh;
        shape-outside: polygon(
            0 0,
            0 20%,
            85% 20%,
            85% 40%,
            25% 40%,
            25% 60%,
            75% 60%,
            75% 80%,
            35% 80%,
            35% 100%,
            0 100%
        );
        pointer-events: none;
    }
}

.mentions-hero-desc a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 0.12em;
}

.mentions-hero-desc p {
    margin: 0 0 0.5em;
    line-height: 1.05;
}

.mentions-hero-desc p:last-child {
    margin-bottom: 0;
}

@container mentions-hero (max-width: 767px) {
    .mentions-hero-title {
        font-size: round(calc(var(--fontSizeH2) * var(--scale)), 2px);
    }

    .mentions-hero-desc {
        grid-column: 3 / 7;
        font-size: round(calc(var(--fontSizeH4) * var(--scale)), 2px);
    }

    /* Four compact tiers keep the Jenga rag inside the shorter mobile hero. */
    .mentions-hero-desc::before {
        display: block;
        inline-size: 2ch;
        block-size: 4lh;
        shape-outside: polygon(
            0 0,
            0 25%,
            80% 25%,
            80% 50%,
            25% 50%,
            25% 75%,
            60% 75%,
            60% 100%,
            0 100%
        );
    }
}

/* Query container for list column mode (wrapper in partials/components/mentions-list.hbs; inner `.mentions-list` is the grid). */
.mentions-list-container {
    container-type: inline-size;
    container-name: mentions-list;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

/* Grid of mention cards — max two columns (desktop + tablet) */
.mentions-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

/* Empty-state message */
.mentions-list.mentions-empty {
    display: block;
    padding: calc(3vw * var(--scale)) calc(2.5vw * var(--scale));
}

.mentions-empty-text {
    font-family: var(--et);
    color: var(--text-color);
    opacity: 0.6;
}

.mentions-empty-text code {
    font-family: var(--cm);
    font-size: 0.9em;
}

/* Individual mention card — title + publication row typography */
.mention-card {
    container-type: inline-size;
    container-name: mention-card;
    --mention-title-font-size: calc(var(--fontSizeH4) * var(--scale));
    /* Publication name + date: blog body × 0.8 × scale, then +25% vs prior slug sizes */
    --mention-pub-font-size: calc(var(--fontSizeBlog) * 0.8 * var(--scale) * 1.25);
    /* Match body padding so OG image insets align with text column */
    --m-pad-x: calc(2.5vw * var(--scale));
    --m-pad-y: calc(2.5vw * var(--scale));
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--text-color);
    border-bottom: 1px solid var(--text-color);
    overflow: hidden;
}

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

/* OG image (direct child of .mention-card) — inset like body text, no hover zoom */
.mention-card-og-image {
    flex-shrink: 0;
    overflow: hidden;
    border-bottom: 1px solid var(--text-color);
    aspect-ratio: 16 / 9;
    width: calc(100% - 2 * var(--m-pad-x));
    margin: var(--m-pad-y) var(--m-pad-x) 0;
    box-sizing: border-box;
    object-fit: cover;
    display: block;
}

/* Card body — post body rhythm for pull-quotes */
.mention-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: var(--m-pad-y) var(--m-pad-x);
    --post-body-font-size: var(--fontSizeBlog);
    --post-body-line-height: 1.4;
}

/* Row 1: favicon or `story` publication mark (dateline is the next line) */
.mention-card-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    column-gap: calc(1vw * var(--scale));
    margin-bottom: calc(0.35vw * var(--scale));
}

.mention-card-source {
    display: flex;
    align-items: center;
    column-gap: calc(0.55em * var(--scale));
    min-width: 0;
    flex: 1 1 auto;
    position: relative;
}

.mention-card-favicon {
    flex-shrink: 0;
    display: block;
    width: var(--mention-pub-font-size);
    height: var(--mention-pub-font-size);
    min-width: 1.25rem;
    min-height: 1.25rem;
    object-fit: contain;
    object-position: left center;
}

/* CSV `story` / JSON `story` + `localStoryAsset`: full publication mark (shown with visible site name beside it) */
.mention-card-pub-logo {
    flex-shrink: 0;
    display: block;
    max-height: calc(var(--mention-pub-font-size) * 2.75);
    max-width: min(220px, 58%);
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: left center;
    padding: 0.12em 0.28em;
    border-radius: 3px;
    box-sizing: border-box;
}

.mention-card-site--visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.mention-card-site {
    font-family: var(--cm);
    font-size: var(--mention-pub-font-size);
    font-weight: 600;
    color: var(--text-color);
    opacity: 0.92;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Headline (after publication row; byline + dateline follow, then excerpt) */
.mention-card-title {
    font-family: var(--ed);
    font-size: var(--mention-title-font-size);
    line-height: 1.2;
    margin: 0 0 calc(0.5vw * var(--scale));
}

.mention-card-title a {
    color: var(--text-color);
    text-decoration: none;
    border-left: none;
}

.mention-card-title a:hover {
    text-decoration: underline;
    text-decoration-thickness: 2px;
}

/*
 * Pull-quote — align with post.css blockquote (typography / line-height).
 * One continuous left rail for the excerpt stack (same idea as post.css
 * `.post-content blockquote blockquote` / ISSUES-LIST: single border for an uninterrupted quote series).
 */
.mentions-section blockquote.mention-card-quote {
    padding-top: calc(0.25vw * var(--scale));
    padding-bottom: calc(0.25vw * var(--scale));
    margin-top: calc(0.75vw * var(--scale));
    margin-bottom: calc(2.2vw * var(--scale));
    font-family: var(--etl) !important;
    line-height: 1.3 !important;
    font-optical-sizing: auto;
    font-feature-settings: var(--font-features-global);
    box-sizing: border-box;
    font-size: var(--post-body-font-size);
}

/* Excerpt stack: shared outer rail; inner blockquotes omit their own left border (unbroken bar). */
.mentions-section .mention-card-quote-stack {
    margin-top: calc(0.35vw * var(--scale));
    margin-left: 1.25rem;
    padding-left: 1.25rem;
    border-left: 4px solid var(--swiss-coffee);
    box-sizing: border-box;
}

.mentions-section .mention-card-quote-stack blockquote.mention-card-quote {
    border-left: none;
    margin-left: 0;
    padding-left: 0;
    margin-top: calc(0.35vw * var(--scale));
    margin-bottom: calc(0.35vw * var(--scale));
}

.mentions-section .mention-card-quote-stack > blockquote.mention-card-quote:first-child {
    margin-top: 0;
}

.mentions-section .mention-card-quote-stack > blockquote.mention-card-quote:last-child {
    margin-bottom: calc(2.2vw * var(--scale));
}

.mentions-section .mention-card-quote-stack blockquote.mention-card-quote + blockquote.mention-card-quote {
    margin-top: calc(0.2vw * var(--scale));
}

.mentions-section blockquote.mention-card-quote.mention-card-quote--context {
    opacity: 0.9;
}

/* (3) Byline + // dateline: one row, byline left, date right; before excerpt stack */
.mention-card-meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    font-size: calc(round(var(--mention-pub-font-size) * 0.8)); /* rounds to nearest whole number, if supported */
    gap: 0.35em 1em;
    margin: 0 0 calc(2vw * var(--scale));
    min-width: 0;
}

.mention-card-meta-row .mention-card-byline {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    padding-top: 0;
    text-align: start;
    font-family: var(--cmb);
}

.mention-card-meta-row .mention-card-dateline, .mention-card-dateline {
    flex: 0 0 auto;
    margin: 0;
    padding: 0;
    text-align: right;
    font-family: var(--cmm);
    font-size: calc(round(var(--mention-pub-font-size) * 0.8)); /* rounds to nearest whole number, if supported */
}

/* Dateline only: keep hugging the right edge of the card */
.mention-card-meta-row .mention-card-dateline:first-child:last-child {
    margin-inline-start: auto;
}

.mention-card-dateline::before {
    content: "//\00a0";
    color: var(--cannon-pink);
}

.mention-card-dateline .mention-card-date {
    color: var(--text-color);
    opacity: 0.82;
    white-space: nowrap;
}

.mention-card-byline {
    font-family: var(--cm);
    font-size: calc(round(var(--post-body-font-size) * .8 * var(--scale), 1));
    color: var(--text-color);
    opacity: 0.9;
}




/* ~half of a 1024px two-up rail: card-local “desktop” title sizing */
@container mention-card (min-width: 31.25rem) {
    .mention-card {
        --mention-title-font-size: calc(var(--fontSizeH4) * var(--scale));
    }
}

/* Wide card: subtler hover underline (replaces viewport 1439px tier) */
@container mention-card (min-width: 35rem) {
    .mention-card-title a:hover {
        text-decoration-thickness: calc(0.15vw * var(--scale));
    }
}

/* Narrow card: compact blockquotes (replaces viewport ≤1023px while two columns) */
@container mention-card (max-width: 40rem) {
    .mentions-section blockquote.mention-card-quote {
        margin-left: 0.7rem;
        margin-right: 0;
        padding-left: 0.95rem;
        padding-right: 0.35rem;
        border-left-width: 3px;
        margin-top: 0.9rem;
        margin-bottom: 1.2rem;
        line-height: 1.3 !important;
    }

    .mentions-section .mention-card-quote-stack {
        margin-left: 0.7rem;
        padding-left: 0.95rem;
        padding-right: 0.35rem;
        border-left-width: 3px;
    }

    .mentions-section .mention-card-quote-stack blockquote.mention-card-quote {
        margin-top: 0.45rem;
        margin-bottom: 0.45rem;
    }

    .mentions-section .mention-card-quote-stack > blockquote.mention-card-quote:last-child {
        margin-bottom: 1.2rem;
    }
}

/* Narrow list rail: single column (replaces viewport ≤767px list grid) */
@container mentions-list (max-width: 50rem) {
    .mentions-list {
        grid-template-columns: 1fr;
    }

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

    .mentions-list.mentions-empty {
        padding: 40px 30px;
    }
}

@container mentions-list (max-width: 22.5rem) {
    .mentions-list.mentions-empty {
        padding: 30px 18px;
    }
}

/* Viewport: section rhythm still tied to device / immersive page shell */
@media (max-width: 767px) {
    .mentions-section {
        padding-bottom: 60px;
    }
}

/* Narrow card: mobile-ish padding + quote body (replaces viewport ≤767px card rules) */
@container mention-card (max-width: 30rem) {
    .mention-card {
        --mention-title-font-size: var(--fontSizeH4);
        --m-pad-x: 3vw;
        --m-pad-y: 3vw;
    }

    .mention-card-body {
        padding: var(--m-pad-y) var(--m-pad-x);
    }

    .mention-card-header {
        margin-bottom: 14px;
    }

    .mention-card-source {
        column-gap: 8px;
    }

    .mention-card-title {
        font-size: var(--fontSizeH5);
        margin-bottom: 14px;
    }

    .mentions-section blockquote.mention-card-quote {
        font-size: var(--post-body-font-size);
        margin-left: 1.15rem;
        padding-left: 1.5rem;
        padding-right: 0.4rem;
        padding-top: 0.35rem;
        padding-bottom: 0.35rem;
        border-left-width: 3px;
        line-height: 1.3 !important;
    }

    .mentions-section .mention-card-quote-stack {
        margin-left: 1.15rem;
        padding-left: 1.5rem;
        padding-right: 0.4rem;
        border-left-width: 3px;
    }

    .mention-card-byline {
        font-size: 13px;
    }
}

/* Very narrow card (replaces viewport ≤479px refinements) */
@container mention-card (max-width: 22.5rem) {
    .mention-card {
        --m-pad-x: 18px;
        --m-pad-y: 24px;
    }

    .mention-card-body {
        padding: var(--m-pad-y) var(--m-pad-x);
    }
}
