/* Interview base — "the interview route". Uses tokens.css + questions.css (crumbs, title, sticker, lead, empty, pages). Prefix: ivx- */

.ivx { position: relative; padding-top: 8px }

/* ---------- head ---------- */
.ivx-head { position: relative; isolation: isolate; padding: 32px 0 36px }
/* same head as every section page: title, the lead under it */
.ivx-head__row { display: flex; flex-direction: column; align-items: flex-start; gap: 18px }
.ivx-title { margin: 0; max-width: 15ch }
.ivx-lead { margin: 0 }

/* the route: stages are stops on one line that leads to the offer; the logo's dot marks where you are */
.ivx-route { margin-top: 36px; padding: 20px 24px 22px; border-radius: var(--sr-r-lg); background: var(--sr-glass); border: 1px solid var(--sr-glass-line); box-shadow: var(--sr-e1); -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3) }
.ivx-route__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 18px }
.ivx-route__all { height: 32px }
.ivx-route__line { position: relative; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--stops, 5), minmax(0, 1fr)) }
/* the road itself: one line through all dots; filled up to the current stop */
.ivx-route__line::before { content: ""; position: absolute; left: 7px; right: calc(100% / var(--stops) - 9px); top: 7px; height: 2px; border-radius: 2px; background: var(--sr-line-strong) }
.ivx-route.is-all .ivx-route__line::before { background: var(--sr-done); opacity: .5 }
.ivx-stop { position: relative; min-width: 0 }
.ivx-stop > a, .ivx-stop--goal { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding-right: 12px; color: var(--sr-text); text-decoration: none }
.ivx-stop__dot { position: relative; z-index: 1; width: 16px; height: 16px; border-radius: 50%; background: var(--sr-surface); border: 2px solid var(--sr-line-strong); transition: transform .25s var(--sr-ease), background-color .2s, border-color .2s }
.ivx-stop__name { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.25 }
.ivx-stop__count { font: 500 12px/1.3 var(--sr-mono); color: var(--sr-muted); font-variant-numeric: tabular-nums }
.ivx-stop > a:hover .ivx-stop__dot { transform: scale(1.2); border-color: var(--sr-accent) }
.ivx-stop > a:hover .ivx-stop__name { color: var(--sr-text) }
.ivx-route.is-all .ivx-stop:not(.ivx-stop--goal) .ivx-stop__dot { border-color: var(--sr-accent); background: var(--sr-accent) }
.ivx-stop.is-current .ivx-stop__dot { width: 18px; height: 18px; margin-top: -1px; border-color: var(--sr-accent); background: var(--sr-accent); box-shadow: 0 0 0 4px var(--sr-accent-soft) }
.ivx-stop.is-current .ivx-stop__name { color: var(--sr-accent-text) }
/* the road is filled from the start up to the current stop */
.ivx-route__line::after { content: ""; position: absolute; left: 7px; top: 7px; height: 2px; border-radius: 2px; background: var(--sr-done); width: calc(var(--cur) * 100% / var(--stops)); animation: ivx-road .8s var(--sr-ease) .2s both }
.ivx-route.is-all .ivx-route__line::after { display: none }
@keyframes ivx-road { from { width: 0 } }
.ivx-stop.is-empty > a { opacity: .45 }
.ivx-stop--goal .ivx-stop__dot { border-style: dashed }
.ivx-stop--goal .ivx-stop__name { color: var(--sr-muted); font-weight: 500 }

/* ---------- layout ---------- */
.ivx-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 32px; align-items: start }

.ivx-rail { position: sticky; top: calc(var(--sr-header-h) + 16px); display: flex; flex-direction: column; gap: 12px; max-height: calc(100vh - var(--sr-header-h) - 32px) }
.ivx-rail h2 { margin: 0 }
.ivx-rail__search { flex: none; height: 38px }
.ivx-rail__list { list-style: none; margin: 0 -6px; padding: 0 6px; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 1px; scrollbar-width: thin; scrollbar-color: var(--sr-line-strong) transparent }
.ivx-rail__list a { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 36px; padding: 0 10px; border-radius: var(--sr-r-sm); color: var(--sr-muted); text-decoration: none; font-size: 14px; transition: background-color .15s, color .15s }
.ivx-rail__list a:hover { background: var(--sr-raise); color: var(--sr-text) }
.ivx-rail__list a[aria-current] { background: var(--sr-raise); color: var(--sr-text); font-weight: 600 }
.ivx-rail__list small { font: 500 11.5px/1 var(--sr-mono); color: var(--sr-muted); font-variant-numeric: tabular-nums }
.ivx-rail__empty { margin: 0; font-size: 13.5px; color: var(--sr-muted) }

.ivx-main { min-width: 0; display: flex; flex-direction: column; gap: 20px }

/* ---------- search bar ---------- */
.ivx-bar { display: flex; align-items: center; gap: 12px }
.ivx-bar__search { flex: 1; min-width: 0; height: 46px }
.ivx-toggle { display: inline-flex; align-items: center; gap: 10px; flex: none; color: var(--sr-text); text-decoration: none; font-size: 14px; font-weight: 500; white-space: nowrap }
.ivx-toggle:hover { color: var(--sr-text) }
.ivx-toggle__track { width: 38px; height: 22px; padding: 2px; border-radius: 22px; background: var(--sr-well); box-shadow: inset 0 1px 3px rgb(var(--sr-shadow-color) / .3); transition: background-color .2s }
.ivx-toggle__track span { display: block; width: 18px; height: 18px; border-radius: 50%; background: var(--sr-surface); box-shadow: var(--sr-e1); transition: transform .25s var(--sr-ease) }
.ivx-toggle[aria-checked="true"] .ivx-toggle__track { background: var(--sr-accent) }
.ivx-toggle[aria-checked="true"] .ivx-toggle__track span { transform: translateX(16px) }

.ivx-applied { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: -6px }
.ivx-applied__found { font-size: 14px; font-weight: 600; margin-right: 4px }
.ivx-chip { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 4px 0 12px; border-radius: var(--sr-r-pill); background: var(--sr-raise); font-size: 13.5px }
.ivx-chip a { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: var(--sr-muted) }
.ivx-chip a:hover { background: var(--sr-line); color: var(--sr-text) }
.ivx-chip svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round }

/* ---------- showcase ---------- */
/* the pick and the fresh list end on one line: the list spreads its rows over the pick's height */
.ivx-show { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 20px; align-items: stretch }
.ivx-fresh { display: flex; flex-direction: column }
.ivx-fresh ul { flex: 1; justify-content: space-between }
.ivx-pick { display: flex; flex-direction: column; gap: 12px; padding: 18px; color: var(--sr-feature-ink); text-decoration: none; transition: transform .25s var(--sr-ease) }
.ivx-pick:hover { color: var(--sr-feature-ink); transform: translateY(-2px) }
.ivx-pick__label { color: var(--sr-feature-muted); padding-right: 64px }
.ivx-pick__media { display: block; aspect-ratio: 16 / 9; border-radius: var(--sr-r-md); overflow: hidden; background: color-mix(in srgb, var(--sr-feature-ink) 10%, transparent) }
.ivx-pick__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--sr-ease) }
.ivx-pick:hover .ivx-pick__media img { transform: scale(1.03) }
.ivx-pick__title { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.3 }
.ivx-pick__meta { font-size: 13.5px; color: var(--sr-feature-muted) }
.ivx-pick .sr-bite__dot svg { fill: currentColor; stroke: none; width: 16px; height: 16px; margin-left: 2px }

.ivx-fresh h3 { margin: 4px 0 12px }
.ivx-fresh ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column }
.ivx-fresh li + li { border-top: 1px solid var(--sr-line) }
.ivx-fresh a { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 14px; align-items: center; padding: 12px 0; color: var(--sr-text); text-decoration: none }
.ivx-fresh a:hover { color: var(--sr-text) }
.ivx-fresh__thumb { display: block; aspect-ratio: 16 / 9; border-radius: var(--sr-r-sm); overflow: hidden; background: var(--sr-raise) }
.ivx-fresh__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--sr-ease) }
.ivx-fresh a:hover .ivx-fresh__thumb img { transform: scale(1.05) }
.ivx-fresh__text { display: flex; flex-direction: column; gap: 4px; min-width: 0 }
.ivx-fresh__text b { font-size: 14.5px; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden }
.ivx-fresh__text span { font-size: 13.5px; color: var(--sr-muted) }

/* ---------- library ---------- */
.ivx-results-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 8px; padding-top: 20px; border-top: 1px solid var(--sr-line) }
.ivx-results-head h2 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -0.02em }
.ivx-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 18px }
/* a page holds 32 recordings: 4 columns (8 rows) or 2 columns (16 rows) always end on a full row */
.ivx-card { animation: qb-rise .45s var(--sr-ease) both; animation-delay: calc(min(var(--i, 0), 12) * 30ms) }
/* no frame: the cover is the card, text sits under it */
.ivx-card > a { display: flex; flex-direction: column; gap: 10px; color: var(--sr-text); text-decoration: none }
.ivx-card > a:hover { color: var(--sr-text) }
.ivx-card__media { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: var(--sr-r-lg); overflow: hidden; background: var(--sr-raise); box-shadow: var(--sr-e1); transition: box-shadow .25s, transform .25s var(--sr-ease) }
.ivx-card > a:hover .ivx-card__media { box-shadow: var(--sr-e2); transform: translateY(-2px) }
.ivx-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--sr-ease) }
.ivx-card > a:hover .ivx-card__media img { transform: scale(1.04) }
.ivx-card__noimg { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; font-size: 13.5px; color: var(--sr-muted) }
.ivx-card__noimg svg { width: 26px; height: 26px; fill: currentColor }
.ivx-card__platform { position: absolute; left: 10px; top: 10px; display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: var(--sr-r-pill); background: rgb(16 17 19 / .72); color: #F2F0EB; font-size: 13.5px; font-weight: 500; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px) }
.ivx-card__platform svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round }
.ivx-card__play { position: absolute; right: 10px; bottom: 10px; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--sr-accent); color: var(--sr-accent-ink); opacity: 0; transform: scale(.8); transition: opacity .2s, transform .25s var(--sr-ease) }
.ivx-card__play svg { width: 16px; height: 16px; fill: currentColor; margin-left: 2px }
.ivx-card > a:hover .ivx-card__play, .ivx-card > a:focus-visible .ivx-card__play { opacity: 1; transform: none }
.ivx-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px }
.interviews-direction-tag { font: 500 11px/1.3 var(--sr-mono); letter-spacing: .05em; text-transform: uppercase; color: var(--sr-muted) }
.ivx-card__stage { font: 500 11px/1.3 var(--sr-mono); letter-spacing: .05em; text-transform: uppercase; color: var(--sr-muted) }
.ivx-card__meta > * + *::before { content: "·"; margin-right: 8px; color: var(--sr-faint) }
.ivx-card__title { font-size: 15px; font-weight: 600; line-height: 1.4; letter-spacing: -0.01em; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden }
.ivx-card__date { font-size: 13.5px; color: var(--sr-muted) }

/* ---------- tablet & phone ---------- */
@media (max-width: 1280px) {
    .ivx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) }
    .ivx-show { grid-template-columns: minmax(0, 1fr) }
}
@media (max-width: 960px) {
    .ivx-head__row { grid-template-columns: minmax(0, 1fr) }
    .ivx-layout { grid-template-columns: minmax(0, 1fr); gap: 20px }
    /* the rail becomes a horizontal strip of directions */
    .ivx-rail { position: static; max-height: none }
    .ivx-rail__search, .ivx-rail h2, .ivx-rail__empty { display: none }
    .ivx-rail__list { flex-direction: row; overflow-x: auto; overflow-y: hidden; margin: 0 calc(var(--sr-gutter) * -1); padding: 0 var(--sr-gutter) 4px; gap: 6px; scrollbar-width: none }
    .ivx-rail__list::-webkit-scrollbar { display: none }
    .ivx-rail__list li { flex: none }
    .ivx-rail__list a { min-height: 38px; border: 1px solid var(--sr-line); border-radius: var(--sr-r-pill); white-space: nowrap }

}
@media (max-width: 640px) {
    /* the route folds into two rows of two instead of hiding stages past the edge */
    .ivx-route__line { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 18px }
    .ivx-route__line::before, .ivx-route__line::after { display: none }
    .ivx-route__head { flex-direction: column; align-items: flex-start; gap: 10px }
    .ivx-head { padding: 18px 0 24px }
    .ivx-bar { flex-direction: column; align-items: stretch }
    .ivx-bar__search { flex: none } /* in a column «flex: 1» would be its height: it collapsed */
    /* a phone gets the library as a list: cover on the left, text beside it — 32 full-width covers were a 12 000 px scroll */
    .ivx-grid { grid-template-columns: minmax(0, 1fr); gap: 16px }
    .ivx-card > a { display: grid; grid-template-columns: 132px minmax(0, 1fr); column-gap: 14px; row-gap: 4px; align-items: start }
    .ivx-card__media { grid-row: 1 / 4; border-radius: var(--sr-r-md) }
    .ivx-card__meta, .ivx-card__title, .ivx-card__date { padding: 0 }
    .ivx-card__title { font-size: 14.5px; line-height: 1.35 }
    .ivx-card__date { font-size: 13px }
    .ivx-show { gap: 24px }
    .ivx-fresh a { grid-template-columns: 112px minmax(0, 1fr) }
}
@media (prefers-reduced-motion: reduce) {
    .ivx-card { animation: none }
    .ivx-card__media, .ivx-card__media img, .ivx-pick, .ivx-stop__dot { transition: none }
}

/* stage identity: the same colours as the stage chips in the question bank */
.ivx-stage--hr { --stage: var(--sr-stage-hr) }
.ivx-stage--technical { --stage: var(--sr-stage-tech) }
.ivx-stage--final { --stage: var(--sr-stage-final) }
.ivx-stage--system-design { --stage: var(--sr-stage-sd) }
.ivx-route.is-all .ivx-stop:not(.ivx-stop--goal) .ivx-stop__dot { background: var(--stage, var(--sr-accent)); border-color: var(--stage, var(--sr-accent)) }
.ivx-stop > a:hover .ivx-stop__dot { border-color: var(--stage, var(--sr-accent)) }
.ivx-stop.is-current .ivx-stop__dot { background: var(--stage, var(--sr-accent)); border-color: var(--stage, var(--sr-accent)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--stage, var(--sr-accent)) 22%, transparent) }
.ivx-stop.is-current .ivx-stop__name { color: var(--stage, var(--sr-accent-text)) }
.ivx-card__stage[class*="ivx-stage--"] { color: var(--stage) }
/* one circle per stage: the stop on the road wears the stage colour (no second dot by the name) */
.ivx-stop:not(.ivx-stop--goal) .ivx-stop__dot { border-color: var(--stage, var(--sr-line-strong)) }

/* the source lives in the caption, not on top of the cover (covers carry their own text) */
.ivx-card__date { display: flex; align-items: center; gap: 8px; flex-wrap: wrap }
.ivx-card__source { display: inline-flex; align-items: center; gap: 5px }
.ivx-card__source::before { content: "·"; margin-right: 3px; color: var(--sr-faint, var(--sr-muted)) }
.ivx-card__source svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round }
.ivx-card__source.is-paid { color: var(--sr-text) }

/* wide screens: the title on the left, the stages as a road running down the right column */
@media (min-width: 961px) {
    .ivx-head--split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, var(--sr-side-col)); column-gap: var(--sr-col-gap); grid-template-rows: auto 1fr }
    .ivx-head--split > .qb-crumbs { grid-column: 1; grid-row: 1 }
    .ivx-head--split > .ivx-head__row { grid-column: 1; grid-row: 2; justify-content: flex-end }
    .ivx-head--split > .ivx-route { grid-column: 2; grid-row: 1 / 3; align-self: end; margin-top: 0 }
    .ivx-route__line { grid-template-columns: minmax(0, 1fr) }
    .ivx-stop:not(:last-child) > a { padding-bottom: 14px }
    .ivx-stop > a { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; column-gap: 14px; padding-right: 0 }
    .ivx-stop.is-current .ivx-stop__dot { margin: 0 -1px }
    .ivx-route__line::before { left: 7px; right: auto; top: 10px; bottom: 10px; width: 2px; height: auto }
    .ivx-route__line::after { width: 2px; top: 10px; height: calc(var(--cur) * (100% - 20px) / max(var(--stops) - 1, 1)); animation: none }
}
