/* =============================================================================
   Individual Topic Page
   ============================================================================= */

.individual-topic {
    width: 100%;
    padding-top: 2rem;
    padding-bottom: var(--pad-v-section-large, 5rem);
    overflow-x: hidden; /* contains sidebar background bleed */
    background-color: var(--c-white, #ffffff);
}

.individual-topic__inner {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 var(--pad-h-medium, 1.5rem);
}

/* Two-column grid: main left, sidebar right — stretch so sidebar fills full row height */
.individual-topic__layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 2.5rem;
}

/* No related content for this topic — let main content fill the row */
.individual-topic__layout--no-sidebar {
    grid-template-columns: 1fr;
}

/* =============================================================================
   Left — Main Content
   ============================================================================= */

.individual-topic__label {
    display: inline-block;
    font-family: var(--f-ibm-plex-sans, "IBM Plex Sans", sans-serif);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--c-gray-text, #7e7e7e);
    text-decoration: none;
    margin-bottom: 0.35rem;
}

.individual-topic__label:hover {
    color: var(--c-blue-royal, #0257b8);
}

/* Title left, Language dropdown right. The heading's old bottom margin lives
   on the row now, so spacing below is unchanged whether or not the dropdown
   renders. */
.individual-topic__title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 0 0 0.75rem;
}

.individual-topic__name {
    font-family: var(--f-ibm-plex-sans, "IBM Plex Sans", sans-serif);
    font-size: 1.875rem; /* ~30px */
    font-weight: 500;
    color: var(--c-navy, #002e5d);
    letter-spacing: -0.02em;
    margin: 0;
    line-height: 1.2;
}

.individual-topic__synonyms {
    font-family: var(--f-ibm-plex-sans, "IBM Plex Sans", sans-serif);
    font-size: 0.875rem;
    color: var(--c-gray-text, #7e7e7e);
    margin: 0 0 0.75rem;
}

/* Language dropdown — mirrors the speech page's Language menu
   (parts/individual-speech/individual-speech.css). */
.individual-topic__lang-wrapper {
    position: relative;
    flex-shrink: 0; /* hold the button's width against a long, wrapping title */
}

.individual-topic__lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-family: var(--f-ibm-plex-sans, "IBM Plex Sans", sans-serif);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--c-navy, #002e5d);
    background: #fff;
    border: 0.0625rem solid #e0e0e3;
    border-radius: 0.313rem;
    padding: 0.375rem 0.75rem;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    white-space: nowrap;
}

.individual-topic__lang-btn:hover,
.individual-topic__lang-btn:focus-visible {
    background: #f4f4f6;
    border-color: #c0c0c3;
    outline: none;
}

.individual-topic__lang-chevron {
    transition: transform 0.2s;
}

[aria-expanded="true"] .individual-topic__lang-chevron {
    transform: rotate(180deg);
}

/* Anchored to the button's right edge: it sits at the right of the content
   column, so a left-anchored menu would hang past it. */
.individual-topic__lang-menu {
    position: absolute;
    top: calc(100% + 0.25rem);
    right: 0;
    left: auto;
    z-index: 100;
    background: #fff;
    border: 0.0625rem solid #e0e0e3;
    border-radius: 0.313rem;
    min-width: 9rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 0.25rem 0;
    overflow: hidden;
}

.individual-topic__lang-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    box-sizing: border-box;
    padding: 0.5rem 0.875rem;
    font-family: var(--f-ibm-plex-sans, "IBM Plex Sans", sans-serif);
    font-size: 0.8125rem;
    font-weight: 400;
    color: var(--c-navy, #002e5d);
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: background 0.1s;
}

.individual-topic__lang-option:hover {
    background: #f4f4f6;
}

/* Description */
.individual-topic__description {
    font-family: var(--f-ibm-plex-sans, "IBM Plex Sans", sans-serif);
    font-size: 0.9375rem; /* 15px */
    line-height: 1.707;
    color: var(--c-gray-dark, #575757);
    margin-bottom: 0.5rem;
}

.individual-topic__description p {
    margin: 0 0 0.75em;
}

.individual-topic__description--clamped {
    /* Show approx 5 lines */
    display: -webkit-box;
    -webkit-line-clamp: 8;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.individual-topic__desc-link {
    margin-top: 1rem;
}

.individual-topic__read-talk {
    font-family: var(--f-ibm-plex-sans, "IBM Plex Sans", sans-serif);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--c-blue-royal, #0257b8);
    text-decoration: none;
}

.individual-topic__read-talk:hover {
    text-decoration: underline;
}

.individual-topic__expand-btn {
    display: flex;
    justify-content: center;
    width: fit-content;
    justify-self: center;
    font-family: var(--f-ibm-plex-sans, "IBM Plex Sans", sans-serif);
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #266ec1;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    margin-bottom: 1.25rem;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.individual-topic__expand-icon {
    display: none;
}

.individual-topic__rule {
    border: none;
    border-top: 1px solid var(--c-gray-white, #ededed);
    margin: 1.25rem 0 0;
}

/* =============================================================================
   Speech Cards (main listing)
   ============================================================================= */

.individual-topic__speeches-list {
    display: flex;
    flex-direction: column;
}

.individual-topic__speech {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid var(--c-gray-white, #ededed);
    position: relative;
    transition: box-shadow 0.3s ease;
}

.individual-topic__speech:last-child {
    border-bottom: none;
 }

/* Match the speech-box lift used on the homepage/search cards. */
.individual-topic__speech:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Transparent full-card overlay makes the whole card clickable; real links
   below are raised above it so they keep their own destinations. */
.individual-topic__speech-link-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.individual-topic__speech-thumb-link {
    flex-shrink: 0;
}

.individual-topic__speech-thumb {
    display: block;
    width: 75px;
    height: 97px;
    object-fit: cover;
    border-radius: var(--brad-image, 0.1875rem);
    flex-shrink: 0;
}

/* Multi-speaker (2-4): the same 75x97 box, split into a 2x2 grid. A single
   speaker still renders a bare <img> and never hits these rules. */
.individual-topic__speech-thumbs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    width: 75px;
    height: 97px;
    border-radius: var(--brad-image, 0.1875rem);
    overflow: hidden;
    flex-shrink: 0;
}

.individual-topic__speech-thumbs .individual-topic__speech-thumb {
    width: 100%;
    height: 100%;
    /* The grid owns the rounding; square the cells so they butt together. */
    border-radius: 0;
    /* Bias the crop upward so faces stay in frame in the short cells. */
    object-position: center 25%;
}

.individual-topic__speech-thumbs-filler {
    background-color: var(--c-speaker-filler, #7D8B9C);
    /* Podium artwork over the slate-blue fill, anchored to the cell's bottom edge.
       The artwork carries transparent headroom above the mic, so scaling it past
       the cell's height crops empty space rather than the podium. */
    background-image: url('../../assets/images/podium.webp');
    background-repeat: no-repeat;
    background-position: bottom center;
    /* Width of the whole GRID, not of this cell — see the --3 rule below. */
    background-size: 100% auto;
}

/* 3 speakers: this leftover cell is the bottom-RIGHT one and only half the
   grid's width, so `100% auto` would draw the podium at half the size it
   gets in the 2-speaker strip. Scale to the full grid width (200% of the
   cell) and anchor right, so the podium renders at a consistent size and
   its left portion is cropped by the photo cell beside it instead. */
.individual-topic__speech-thumbs--3 .individual-topic__speech-thumbs-filler {
    background-size: 200% auto;
    background-position: right bottom;
}

/* A speaker with no portrait: one cell, in that speaker's own position. Kept off
   the -filler class so the --2 bottom-row stretch below never applies to it. */
.individual-topic__speech-thumbs-gap {
    background-color: var(--c-speaker-filler, #7D8B9C);
}

/* 2 speakers: photos take the top row, the filler spans the whole bottom row. */
.individual-topic__speech-thumbs--2 .individual-topic__speech-thumbs-filler {
    grid-column: 1 / -1;
}

.individual-topic__speech-thumb--placeholder {
    width: 75px;
    height: 97px;
    background-color: var(--c-gray-white, #ededed);
    border-radius: var(--brad-image, 0.1875rem);
    flex-shrink: 0;
}

.individual-topic__speech-meta {
    flex: 1;
    min-width: 0;
}

/* Byline container: holds the block spacing so the names and their separators
   flow inline as one comma-separated list and the separators inherit styling. */
.individual-topic__speech-speakers {
    font-family: var(--f-ibm-plex-sans, "IBM Plex Sans", sans-serif);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--c-blue-royal, #0257b8);
    line-height: 1.4;
    margin: 0 0 0.25rem;
    position: relative;
    z-index: 2;
}

.individual-topic__speech-speaker {
    display: inline;
    font-family: var(--f-ibm-plex-sans, "IBM Plex Sans", sans-serif);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--c-blue-royal, #0257b8);
    text-decoration: none;
    /* Spacing lives on .individual-topic__speech-speakers now. */
    margin: 0;
    line-height: 1.4;
    position: relative;
    z-index: 2;
}

.individual-topic__speech-speaker:hover {
    text-decoration: underline;
}

.individual-topic__speech-title {
    font-family: var(--f-ibm-plex-sans, "IBM Plex Sans", sans-serif);
    font-size: 0.9375rem; /* 15px */
    font-weight: 600;
    color: var(--c-navy, #002e5d);
    letter-spacing: -0.01em;
    line-height: 1.2;
    margin: 0 0 0.25rem;
}

.individual-topic__speech-title a {
    color: inherit;
    text-decoration: none;
    position: relative;
    z-index: 2;
}


.individual-topic__speech-date {
    font-family: var(--f-ibm-plex-sans, "IBM Plex Sans", sans-serif);
    font-size: 0.75rem;
    color: var(--c-gray-text, #7e7e7e);
    margin: 0 0 0.35rem;
}

.individual-topic__speech-excerpt {
    font-family: var(--f-ibm-plex-sans, "IBM Plex Sans", sans-serif);
    font-size: 0.75rem;
    color: var(--c-gray-text, #7e7e7e);
    margin: 0 0 0.5rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.individual-topic__speech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin: 0 0 0.5rem;
}

.individual-topic__speech-tag {
    display: inline-flex;
    align-items: center;
    height: 20px;
    font-family: var(--f-ibm-plex-sans, "IBM Plex Sans", sans-serif);
    font-size: 0.625rem;
    font-weight: 500;
    color: #266ec1;
    background-color: #e5e5e5;
    border-radius: 3px;
    padding: 0 0.5rem;
    text-decoration: none;
    white-space: nowrap;
}

.individual-topic__speech-media {
    font-family: var(--f-ibm-plex-sans, "IBM Plex Sans", sans-serif);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--c-gray-lighter, #a2a2a2);
    margin: 0;
}

.individual-topic__media-link {
    color: var(--c-blue-royal, #0257b8);
    text-decoration: none;
    position: relative;
    z-index: 2;
}

.individual-topic__media-link:hover {
    text-decoration: underline;
}

.individual-topic__media-link--unavailable {
    color: #c9c9c9;
}

.individual-topic__media-link--unavailable:hover {
    text-decoration: none;
}

.individual-topic__media-sep {
    color: #c9c9c9;
}

/* Download dropdown (MP3 / PDF) — mirrors the /talks/ archive dropdown */
.individual-topic__download {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.individual-topic__dropdown-trigger {
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    color: var(--c-blue-royal, #0257b8);
    cursor: pointer;
    line-height: 1.2;
    text-decoration: none;
}

.individual-topic__dropdown-menu {
    visibility: hidden;
    background-color: #e5e5e5;
    color: #000;
    font-family: var(--f-ibm-plex-sans, "IBM Plex Sans", sans-serif);
    font-weight: 300;
    font-size: 0.75rem;
    text-transform: uppercase;
    box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.33);
    width: 75px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.2rem;
    position: absolute;
    z-index: 100;
    top: 150%;
    left: -20%;
    opacity: 0;
    transition: opacity 0.3s ease-in-out, visibility 0s linear 0.3s;
}

.individual-topic__dropdown-menu::after {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 45%;
    border: 5px solid;
    border-color: transparent transparent #e5e5e5 transparent;
    cursor: default;
}

.individual-topic__download.individual-topic__dropdown--open .individual-topic__dropdown-menu {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease-in-out, visibility 0s linear 0s;
}

.individual-topic__dropdown-item {
    display: flex;
    flex: 1;
    align-self: stretch;
    align-items: center;
    justify-content: center;
    color: var(--c-blue-royal, #0257b8);
    text-decoration: none;
    font-size: 9px;
    font-weight: 500;
    cursor: pointer;
}

.individual-topic__dropdown-item--unavailable {
    color: #c9c9c9;
    cursor: auto;
}

.individual-topic__dropdown-separator {
    color: #747474;
    font-size: 10px;
}

/* Load More Button */
.individual-topic__load-more {
    display: flex;
    justify-content: center;
    width: fit-content;
    justify-self: center;
    font-family: var(--f-ibm-plex-sans, "IBM Plex Sans", sans-serif);
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #266ec1;
    background: none;
    border: none;
    padding: 1rem 0 0 0;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 10px;
    transition: 0.2s all;
}

.individual-topic__load-more:hover {
    text-decoration-color: transparent;
    transition: 0.2s all;
}

.individual-topic__load-more-icon {
    display: none;
}

.individual-topic__load-more--loading {
    opacity: 0.6;
    pointer-events: none;
}

.individual-topic__no-speeches {
    font-family: var(--f-ibm-plex-sans, "IBM Plex Sans", sans-serif);
    font-size: 0.9375rem;
    color: var(--c-gray-text, #7e7e7e);
    padding: 1rem 0;
}

/* =============================================================================
   Right — Sidebar
   ============================================================================= */

.individual-topic__sidebar {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    align-self: start;
    padding-top: 1rem;
    padding-bottom: 1.5rem;
}

/* Gray background bleeds from the sidebar column to the right viewport edge */
.individual-topic__sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: calc(100% + 100vw);
    background-color: var(--c-gray-white, #ededed);
    border-top-left-radius: 6px;
    border-bottom-left-radius: 6px;
    z-index: 0;
}

.individual-topic__panel {
    position: relative;
    z-index: 1;
}


.individual-topic__panel-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 0.75rem 1rem;
    position: relative;
}

.individual-topic__panel-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1rem;
    right: 0;
    height: 1.5px;
    background-color: #fff;
}

.individual-topic__panel-title {
    font-family: var(--f-ibm-plex-sans, "IBM Plex Sans", sans-serif);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--c-navy, #002e5d);
}

.individual-topic__panel-icon {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.individual-topic__panel-icon svg {
    width: 18px;
    height: auto;
}

.individual-topic__panel-body {
    max-height: 480px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--c-gray-light, #bbb) transparent;
}

.individual-topic__panel-body::-webkit-scrollbar {
    width: 6px;
}

.individual-topic__panel-body::-webkit-scrollbar-thumb {
    background-color: var(--c-gray-light, #bbb);
    border-radius: 3px;
}

/* Shorts panel: tall enough for exactly 3 cards (100px thumb + 20px padding each) */
.individual-topic__panel--shorts .individual-topic__panel-body {
    max-height: 360px;
}

/* Study & Faith panel: ~2 cards (97px thumb + 24px padding + 16px margin each ≈ 275px).
   max-height is only a ceiling — it won't reserve extra room the content doesn't
   already need, so the last card's downward-opening download menu (absolutely
   positioned, ignored by that ceiling) still needs real padding-bottom below the
   content to render without being clipped, even when its title wraps to 2 lines. */
.individual-topic__panel--study-faith .individual-topic__panel-body {
    max-height: 275px;
    padding-bottom: 10px;
}

/* Inspiring Shorts items — the whole card is a real link to the speech
   (crawlable + no-JS fallback); JS intercepts the click to open the popup. */
.individual-topic__short {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.individual-topic__short-thumb-wrap {
    position: relative;
    flex-shrink: 0;
    display: block;
    border-radius: 3px;
    overflow: hidden;
}

.individual-topic__short-thumb {
    display: block;
    width: 150px;
    height: 85px;
    object-fit: cover;
    border-radius: 3px;
    transition: transform 0.3s ease;
}

/* Hovering (or keyboard-focusing) anywhere on the card drives the effects. */
.individual-topic__short:hover .individual-topic__short-thumb,
.individual-topic__short:focus-visible .individual-topic__short-thumb {
    transform: scale(1.05);
}

/* Play overlay — fades in on hover/focus, matches homepage Inspiring Shorts */
.individual-topic__short-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.individual-topic__short:hover .individual-topic__short-play-overlay,
.individual-topic__short:focus-visible .individual-topic__short-play-overlay {
    opacity: 1;
}

.individual-topic__short-play-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
}

.individual-topic__short-play-button svg {
    margin-left: 2px; /* optical centering of the triangle */
}

.individual-topic__short-duration {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background-color: rgba(0, 0, 0, 0.75);
    color: #fff;
    font-family: var(--f-ibm-plex-sans, "IBM Plex Sans", sans-serif);
    font-size: 0.6875rem;
    font-weight: 500;
    padding: 1px 5px;
    border-radius: 2px;
    line-height: 1.4;
}

.individual-topic__short-meta {
    display: block;
    flex: 1;
    min-width: 0;
    align-self: center;
}

.individual-topic__short-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-family: var(--f-ibm-plex-sans, "IBM Plex Sans", sans-serif);
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--c-navy, #002e5d);
    letter-spacing: -0.01em;
    line-height: 1.2;
    margin: 0 0 0.25rem;
}

.individual-topic__short:focus-visible {
    outline: 2px solid var(--c-blue-royal, #0257b8);
    outline-offset: -2px;
    border-radius: 3px;
}

/* Speaker: plain text — not a link, no hover. */
.individual-topic__short-speaker {
    display: block;
    font-family: var(--f-ibm-plex-sans, "IBM Plex Sans", sans-serif);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--c-blue-royal, #0257b8);
    line-height: 1.3;
}

.individual-topic__short-meta-line {
    display: block;
    font-family: var(--f-ibm-plex-sans, "IBM Plex Sans", sans-serif);
    font-size: 12px;
    font-weight: 500;
    color: #747474;
    line-height: 93%;
    margin-top: 0.125rem;
}

/* Visually-hidden popup dismissal hint (screen readers only). */
.individual-topic__short-popup-hint {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Inspiring Shorts — in-page popup player (self-contained) */
.individual-topic__short-popup {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.7);
}

.individual-topic__short-popup.is-open {
    display: flex;
}

.individual-topic__short-popup-dialog {
    position: relative;
    width: 100%;
    max-width: 880px;
}

.individual-topic__short-popup-frame {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
    background: #000;
    border-radius: 4px;
    overflow: hidden;
}

.individual-topic__short-popup-iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.individual-topic__short-popup-close {
    position: absolute;
    top: -2.75rem;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.2s;
}

.individual-topic__short-popup-close:hover,
.individual-topic__short-popup-close:focus-visible {
    background: rgba(255, 255, 255, 0.3);
    outline: none;
}

@media (max-width: 1024px) {
    .individual-topic__short-popup-close {
        top: -2.5rem;
    }
}

/* Study & Faith items */
.individual-topic__study-speech {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    background-color: #fff;
    border-radius: 3px;
    margin: 0.5rem;
    position: relative;
    transition: box-shadow 0.3s ease;
}

.individual-topic__study-speech:last-child {
    border-bottom: none;
}

/* Match the speech-box lift used on the homepage/search cards. */
.individual-topic__study-speech:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Transparent full-card overlay makes the whole box clickable; real links
   below are raised above it so they keep their own destinations. */
.individual-topic__study-link-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.individual-topic__study-thumb {
    display: block;
    width: 75px;
    height: 97px;
    object-fit: cover;
    border-radius: 3px;
    flex-shrink: 0;
}

/* Multi-speaker 2x2 grid — same box as the single study thumb. */
.individual-topic__study-thumbs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    width: 75px;
    height: 97px;
    border-radius: 3px;
    overflow: hidden;
    flex-shrink: 0;
}

.individual-topic__study-thumbs .individual-topic__study-thumb {
    width: 100%;
    height: 100%;
    border-radius: 0;
    object-position: center 25%;
}

.individual-topic__study-thumbs-filler {
    background-color: var(--c-speaker-filler, #7D8B9C);
    /* Podium artwork over the slate-blue fill, anchored to the cell's bottom edge.
       The artwork carries transparent headroom above the mic, so scaling it past
       the cell's height crops empty space rather than the podium. */
    background-image: url('../../assets/images/podium.webp');
    background-repeat: no-repeat;
    background-position: bottom center;
    /* Width of the whole GRID, not of this cell — see the --3 rule below. */
    background-size: 100% auto;
}

/* 3 speakers: this leftover cell is the bottom-RIGHT one and only half the
   grid's width, so `100% auto` would draw the podium at half the size it
   gets in the 2-speaker strip. Scale to the full grid width (200% of the
   cell) and anchor right, so the podium renders at a consistent size and
   its left portion is cropped by the photo cell beside it instead. */
.individual-topic__study-thumbs--3 .individual-topic__study-thumbs-filler {
    background-size: 200% auto;
    background-position: right bottom;
}

/* A speaker with no portrait: one cell, in that speaker's own position. Kept off
   the -filler class so the --2 bottom-row stretch below never applies to it. */
.individual-topic__study-thumbs-gap {
    background-color: var(--c-speaker-filler, #7D8B9C);
}

.individual-topic__study-thumbs--2 .individual-topic__study-thumbs-filler {
    grid-column: 1 / -1;
}

.individual-topic__study-thumb--placeholder {
    width: 75px;
    height: 97px;
    background-color: var(--c-gray-white, #ededed);
    border-radius: 3px;
    flex-shrink: 0;
}

.individual-topic__study-meta {
    flex: 1;
    min-width: 0;
}

/* Byline container: holds the block spacing so the names and their separators
   flow inline as one comma-separated list and the separators inherit styling. */
.individual-topic__study-speakers {
    font-family: var(--f-ibm-plex-sans, "IBM Plex Sans", sans-serif);
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--c-blue-royal, #0257b8);
    line-height: 1.3;
    margin: 0 0 0.2rem;
    position: relative;
    z-index: 2;
}

.individual-topic__study-speaker {
    display: inline;
    font-family: var(--f-ibm-plex-sans, "IBM Plex Sans", sans-serif);
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--c-blue-royal, #0257b8);
    text-decoration: none;
    /* Spacing lives on .individual-topic__study-speakers now. */
    margin: 0;
    line-height: 1.3;
    position: relative;
    z-index: 2;
}

.individual-topic__study-speaker:hover {
    text-decoration: underline;
}

.individual-topic__study-title {
    font-family: var(--f-ibm-plex-sans, "IBM Plex Sans", sans-serif);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--c-navy, #002e5d);
    letter-spacing: -0.01em;
    line-height: 1.15;
    margin: 0 0 0.2rem;
}

.individual-topic__study-title a {
    color: inherit;
    text-decoration: none;
    position: relative;
    z-index: 2;
}

.individual-topic__study-date {
    font-family: var(--f-ibm-plex-sans, "IBM Plex Sans", sans-serif);
    font-size: 0.6875rem;
    color: var(--c-gray-text, #7e7e7e);
    margin: 0 0 0.3rem;
}

.individual-topic__speech-media--sm {
    font-size: 0.6875rem;
}

/* =============================================================================
   Responsive
   ============================================================================= */

@media (max-width: 1024px) { /* 800px */
    .individual-topic__layout {
        grid-template-columns: 1fr;
    }

    .individual-topic__sidebar {
        position: relative;
    }
}

@media (max-width: 768px) { /* 640px */
    /* Match the archive's mobile insets so the cards hug the screen edge the
       same amount on both pages: 20px container inset, with the card list
       pulled 12px back out so the cards themselves sit 8px from the edge. */
    .individual-topic__inner {
        padding: 0 1.25rem;
    }

    .individual-topic__speeches-list {
        margin: 0 -0.75rem;
    }

    /* Not enough width to share a row — the button drops under the title and
       its menu goes back to opening left-aligned beneath it. */
    .individual-topic__title-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    /* Sits below the title now, so nudge it down — same 0.8rem drop the
       speaker page uses (parts/individual-speaker/individual-speaker.css). */
    .individual-topic__lang-wrapper {
        margin-top: 0.4rem;
    }

    .individual-topic__lang-menu {
        left: 0;
        right: auto;
    }
}
