/* Topic hub v3: F1 hero (ink) and F2 overview. */
.topic-v3 .tv3-hero { padding: 40px 0 48px; }
.topic-v3 .tv3-hero-grid { display: grid; gap: 32px; align-items: center; }
.topic-v3 .tv3-hero-copy { min-width: 0; }

/* Breadcrumb */
.topic-v3 .tv3-crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; margin: 0 0 20px; }
.topic-v3 .tv3-crumbs li { display: inline-flex; align-items: center; font-size: 16px; line-height: 1.4; color: var(--on-dark-2); }
.topic-v3 .tv3-crumbs li + li::before { content: '/'; margin: 0 10px; color: rgba(255, 255, 255, .35); }
.topic-v3 .tv3-crumbs a { display: inline-flex; align-items: center; min-height: 44px; color: var(--on-dark-2); text-decoration: underline; text-decoration-color: rgba(212, 190, 255, .45); text-underline-offset: 4px; }
.topic-v3 .tv3-crumbs a:hover { color: var(--on-dark); text-decoration-color: currentColor; }
.topic-v3 .tv3-crumbs [aria-current] { color: var(--on-dark); font-weight: 500; }

.topic-v3 .tv3-h1 { font-size: clamp(30px, 1.4rem + 2.4vw, 54px); line-height: 1.06; font-weight: 600; letter-spacing: -.025em; color: var(--on-dark); max-width: 22ch; }
.topic-v3 .tv3-intro { margin-top: 18px; max-width: 60ch; font-size: 18px; line-height: 1.6; color: var(--on-dark-2); }
.topic-v3 .tv3-count { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; padding: 6px 14px; border-radius: 999px; background: rgba(255, 255, 255, .08); font-size: 16px; font-weight: 500; color: var(--on-dark); }
.topic-v3 .tv3-count .v3-i { color: var(--amber); }
.topic-v3 .tv3-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 28px; }
.topic-v3 .tv3-call { color: var(--l300); font-size: 16px; }
.topic-v3 .tv3-call .v3-i { color: var(--l300); }

/* The CMS topic images are mostly square illustrations (1921x1920) with content up to the edges: show the whole image
   (no crop) and let the card take the image's own shape, capped by height so the hero stays one screen. */
.topic-v3 .tv3-hero-media { margin: 0; position: relative; justify-self: center; width: fit-content; max-width: 100%; border-radius: var(--r-panel); overflow: hidden; background: #fff; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .6); }
.topic-v3 .tv3-hero-media img { display: block; width: auto; max-width: 100%; height: auto; max-height: min(62vh, 520px); object-fit: contain; }
.topic-v3 .tv3-hero-media::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); pointer-events: none; }

/* No image: one centred column */
.topic-v3 .tv3-hero-solo .tv3-hero-copy { max-width: 68ch; margin: 0 auto; text-align: center; }
.topic-v3 .tv3-hero-solo .tv3-crumbs ol, .topic-v3 .tv3-hero-solo .tv3-actions { justify-content: center; }
.topic-v3 .tv3-hero-solo .tv3-h1, .topic-v3 .tv3-hero-solo .tv3-intro { margin-left: auto; margin-right: auto; }

@media (max-width: 599px) {
    .topic-v3 .tv3-actions .v3-btn { width: 100%; }
    .topic-v3 .tv3-actions .tv3-call { width: 100%; justify-content: center; }
    .topic-v3 .tv3-intro { font-size: 17px; }
}
@media (min-width: 1024px) {
    .topic-v3 .tv3-hero { padding: 64px 0 72px; }
    .topic-v3 .tv3-hero-grid { grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); gap: 56px; }
    .topic-v3 .tv3-hero-solo .tv3-hero-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 1024px) and (min-height: 620px) {
    /* The site header sits in normal flow above the hero at load (about 103px: info bar + logo bar), so the hero fills
       the rest of the first screen instead of reserving the fixed-header allowance. It is not a snap point: snapping
       to it on load would scroll the header out of view. */
    .topic-v3 .tv3-hero.v3-fold { min-height: calc(100svh - 104px); padding: clamp(20px, 4vh, 44px) 0 clamp(24px, 5vh, 52px); scroll-snap-align: none; }
    .topic-v3 .tv3-h1 { font-size: clamp(36px, 1rem + 4.2vh, 56px); }
    .topic-v3 .tv3-hero-media { justify-self: end; }
}

/* ---------- F2 overview ---------- */
.topic-v3 .tv3-ov-grid { display: grid; gap: 32px; align-items: start; }
.topic-v3 .tv3-short { padding: 24px; display: grid; gap: 16px; }
.topic-v3 .tv3-short-title { font-family: var(--v3-head); font-size: 18px; font-weight: 600; color: var(--ink); }
.topic-v3 .tv3-short-list { display: grid; gap: 6px; }
.topic-v3 .tv3-short-list li { display: flex; align-items: center; gap: 10px; color: var(--ink-2); }
.topic-v3 .tv3-short-list .v3-i { color: var(--brand-deep); }
.topic-v3 .tv3-short-list a { display: inline-flex; align-items: center; min-height: 44px; color: var(--brand-deep); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
@media (min-width: 1024px) {
    .topic-v3 .tv3-ov-grid { grid-template-columns: minmax(0, 1fr) 300px; gap: 72px; }
    .topic-v3 .tv3-short { position: sticky; top: 104px; }
}

/* ---------- QA fixes (28 Nov 2026) ---------- */
/* While the (large, unresized) CMS image loads the card is a soft brand tint with the image's square shape reserved,
   never an empty white box with a sliver of image at the top. */
.topic-v3 .tv3-hero-media { background: linear-gradient(135deg, #EDE3FF, #F7F2FF); }
.topic-v3 .tv3-hero-media img { aspect-ratio: 1 / 1; }
@media (min-width: 1024px) { .topic-v3 .tv3-hero-media img { width: min(62vh, 520px); } }

/* Breadcrumb: the separator trails each item, so a wrapped line always starts with a link, never a lone "/" */
.topic-v3 .tv3-crumbs li + li::before { content: none; }
.topic-v3 .tv3-crumbs li:not(:last-child)::after { content: '/'; margin: 0 10px; color: rgba(255, 255, 255, .35); }

/* Course panel: shown in place of a CMS image that is missing or not usable (TopicV3Page::HERO_IMAGE_SKIP) */
.topic-v3 .tv3-hero-panel { padding: 24px; border-radius: var(--r-panel); background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); }
.topic-v3 .tv3-hp-t { font-family: var(--v3-head); font-size: 18px; font-weight: 600; color: var(--on-dark); }
.topic-v3 .tv3-hp-list { display: grid; gap: 8px; margin-top: 14px; }
.topic-v3 .tv3-hp-list a { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; padding: 12px 16px; border-radius: 14px; background: var(--white); color: var(--ink); text-decoration: none; transition: transform var(--t-fast) var(--ease); }
.topic-v3 .tv3-hp-name { font-size: 16px; font-weight: 600; line-height: 1.35; }
.topic-v3 .tv3-hp-days { flex: none; font-size: 16px; color: var(--mute); white-space: nowrap; }
@media (pointer: fine) { .topic-v3 .tv3-hp-list a:hover { transform: translateX(3px); color: var(--brand-deep); } }
.topic-v3 .tv3-hp-formats { display: flex; align-items: center; gap: 8px; margin-top: 16px; font-size: 16px; color: var(--on-dark-2); }
.topic-v3 .tv3-hp-formats .v3-i { color: var(--amber); flex: none; }
@media (min-width: 1024px) { .topic-v3 .tv3-hero-panel { padding: 32px; } }
