/* SpeedRunIT home page (templates/home.html, js/sr/home.js).
   One road runs through the whole page — the logo's S, drawn large. The title is set as
   capsules standing on it (the shape of the logo's «IT» chip), then the road winds down the page
   and every section stands at one of its turns. The real terms of each section are painted on the
   road beside it. The logo's orange dot drives the road: along the title on load, down the page
   as you read; the stretch behind it turns warm. The finish is the offer. */

.hm { --road: 60px; position: relative; isolation: isolate; padding-bottom: 40px }
.hm > :not(.hm-road, .hm-pin, .hm-start) { position: relative; z-index: 1 }

/* ---------- the road (geometry comes from home.js) ---------- */
.hm-road { position: absolute; z-index: 0; left: 0; top: 0; overflow: visible; pointer-events: none }
/* until home.js has placed it, the finish ring would stand at 0,0: the top left corner */
.hm-road:not(.is-built) { visibility: hidden }
.hm-road path { fill: none; stroke-linejoin: round }
.hm-road__edge, .hm-road__base { stroke-linecap: round }
.hm-road__mask { stroke: #fff; stroke-width: calc(var(--road) + 120px); stroke-linecap: butt }
/* the road lies above the page: a soft shadow under it gives it thickness */
.hm-road__shadow { stroke: rgb(0 0 0 / .55); stroke-width: calc(var(--road) + 10px); stroke-linecap: round; transform: translateY(14px); filter: blur(14px) }
.hm-road__edge { stroke: var(--sr-line-strong); stroke-width: calc(var(--road) + 4px) }
.hm-road__base { stroke: var(--sr-raise); stroke-width: var(--road) }
/* the lane marking: a dashed centre line makes the band read as a road */
.hm-road__lane { stroke: var(--sr-line-strong); stroke-width: 2.5px; stroke-linecap: butt }
/* the trail: the stretch already read, a thin «done» line along the centre of the road */
.hm-road__lit { stroke: color-mix(in srgb, var(--sr-done) 55%, transparent); stroke-width: 3px; stroke-linecap: round }
/* the snake's body: slithers in waves behind the head (geometry from home.js) */
.hm-road__snake { fill: none; stroke: var(--sr-done); stroke-width: calc(var(--road) * .24); stroke-linecap: round; stroke-linejoin: round; opacity: 0; transition: opacity .3s }
.hm.has-dot .hm-road__snake { opacity: 1 }
.hm-road__labels text {
    fill: color-mix(in srgb, var(--sr-text) 72%, transparent); font: 600 12.5px/1 var(--sr-mono); letter-spacing: .14em; text-transform: uppercase;
    /* the words knock the lane marking out behind them */
    stroke: var(--sr-raise); stroke-width: 14px; stroke-linejoin: round; paint-order: stroke;
    dominant-baseline: central; text-anchor: middle;
}
.hm-road__dot { opacity: 0; transition: opacity .3s }
.hm-snake__head { fill: var(--sr-accent); stroke: var(--sr-raise); stroke-width: 3 }
.hm-snake__eye { fill: var(--sr-accent-ink-light, #FFF7F2) }
.hm-snake__pupil { fill: #1D0D06 }
.hm.has-dot .hm-road__dot { opacity: 1 }
.hm-road__finish { fill: var(--sr-bg); stroke: var(--sr-accent); stroke-width: 4; stroke-dasharray: 7 6; transition: fill .3s }
/* at the finish the snake curls up around the offer: the dashed ring becomes a solid cream coil */
.hm.is-finished .hm-road__finish { fill: var(--sr-bg); stroke: var(--sr-done); stroke-width: 10; stroke-dasharray: none }

/* signs on the road: the start, and one per stop (orange once the dot has passed it) */
.hm-pin, .hm-start {
    position: absolute; z-index: 2; left: 0; top: 0; transform: translate(-50%, -50%);
    padding: 7px 12px 6px; border-radius: var(--sr-r-pill); white-space: nowrap;
    background: var(--sr-bg); color: var(--sr-text); box-shadow: inset 0 0 0 1.5px var(--sr-line-strong), var(--sr-e1);
    font: 600 11.5px/1 var(--sr-mono); letter-spacing: .12em; text-transform: uppercase;
    transition: background-color .3s, color .3s, box-shadow .3s;
}
.hm-start { visibility: hidden }
.hm-start.is-placed { visibility: visible }
.hm-pin.is-reached { background: var(--sr-done); color: var(--sr-feature-ink); box-shadow: var(--sr-e1) }
.hm-pin[data-side="l"] { transform: translate(calc(var(--road) / -2), -50%) }
.hm-pin[data-side="r"] { transform: translate(calc(-100% + var(--road) / 2), -50%) }

/* ---------- hero ----------
   The home page is the one page where the title is the poster: the promise set large, one line
   each («Самый короткий путь» / «до оффера»). The first step (the bite card) stands beside the
   short second line, the lead under the title. Below them the road starts: the «Старт» sign,
   the dot on it and the size of the site painted on the asphalt. */
.hm-hero {
    --hm-h1: clamp(44px, 6.6vw, 104px); --hm-gap: 32px;
    display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: 56px; row-gap: var(--hm-gap);
    /* the top is fixed, not centred: a taller or shorter card must not move the title between visits */
    align-content: start;
    min-height: min(calc(100svh - var(--sr-header-h)), 820px); padding: clamp(32px, 8svh, 88px) 0 calc(var(--road) + 96px);
    box-sizing: border-box;
}
.hm-title { grid-column: 1 / -1; margin: 0; font: 600 var(--hm-h1)/1 var(--sr-font); letter-spacing: -0.052em; color: var(--sr-text) }
.hm-title__line { display: block; white-space: nowrap }
.hm-title .qb-hl { margin-left: .02em; padding: .02em .14em .08em }
.hm-lead { grid-column: 1; grid-row: 2; align-self: start; max-width: 46ch; font-size: 18.5px }
/* the title takes the full width (its second line is the long sticker); the first step stands beside the lead */
.hm-card { grid-column: 2; grid-row: 2; align-self: start; padding: 20px }
/* the directions, one click away: all of them on a first visit, the other ones for a returning reader */
.hm-dirs { grid-column: 1 / -1; grid-row: 3; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 20px; margin-top: 12px; padding-top: 22px; border-top: 1px solid var(--sr-line); animation: qb-rise .6s var(--sr-ease) .4s both }
.hm-dirs__label { margin: 0; min-width: 138px; color: var(--sr-muted) } /* both labels take one width: the row starts at one place */
/* one height for the three cards (first visit, guest, reader with progress), so the row below never moves */
.hm-card { min-height: 160px; box-sizing: border-box; justify-content: space-between }
.hm-card .qb-resume__dir { min-height: 36px }
.hm-dirs__list { list-style: none; margin: -4px; padding: 4px; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; scroll-behavior: smooth }
.hm-dirs__list::-webkit-scrollbar { display: none }
.hm-dirs__list a {
    display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 16px 0 8px; border-radius: var(--sr-r-pill); white-space: nowrap;
    background: var(--sr-surface); border: 1px solid var(--sr-line); color: var(--sr-text); text-decoration: none; transition: border-color .2s, background-color .2s;
}
.hm-dirs__list img { width: 32px; height: 32px; padding: 5px; border-radius: 50%; background: #fff; object-fit: contain; box-sizing: border-box }
.hm-dirs__list b { font-size: 15px; font-weight: 500 }
.hm-dirs__list small { font: 500 13px/1 var(--sr-mono); color: var(--sr-muted); font-variant-numeric: tabular-nums }
.hm-dirs__list a:hover { border-color: var(--sr-accent); background: var(--sr-raise) }
.hm-card__next { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14.5px; line-height: 1.45; color: var(--sr-feature-muted) }
.hm-card__next b { font-weight: 600; color: var(--sr-feature-ink) }

/* entrance (first visit only): the two lines rise in turn, then the sticker lands on «оффера» */
.hm-title__line { animation: qb-rise .7s var(--sr-ease) both }
.hm-title__line:nth-child(2) { animation-delay: .08s }
.hm-title__line:nth-child(3) { animation-delay: .16s }
.hm-title .qb-hl { animation: hm-stick .55s cubic-bezier(.3, 1.5, .5, 1) .45s both }
@keyframes hm-stick { from { transform: rotate(-9deg) scale(.7); opacity: 0 } to { transform: rotate(-2deg) scale(1); opacity: 1 } }
.hm-lead { animation: qb-rise .6s var(--sr-ease) .2s both }
.hm-card { animation: qb-rise .65s var(--sr-ease) .3s both }

/* ---------- the stops: content between the road's two lanes ---------- */
.hm-stop {
    display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 56px; align-items: center;
    margin-top: 210px; padding-inline: calc(var(--road) + 64px); scroll-margin-top: calc(var(--sr-header-h) + 40px);
}
/* the road runs on one side of each stop (right, then left, …): only that side keeps room for it,
   so the text keeps the page's left edge, and the visual always stands next to the road */
.hm-stop:nth-of-type(even) { padding-inline: 0 calc(var(--road) + 64px) }
.hm-stop:nth-of-type(odd) { padding-inline: calc(var(--road) + 64px) 0 }
.hm-stop:nth-of-type(odd) .hm-stop__copy { order: 2 }
.hm-hero + .hm-stop { margin-top: 150px }
.hm-stop__copy { display: flex; flex-direction: column; align-items: flex-start; min-width: 0 }
.hm-stop__title { margin: 0 0 16px; max-width: 18ch; font-size: clamp(30px, 3.3vw, 46px); font-weight: 600; line-height: 1.08; letter-spacing: -0.035em; text-wrap: balance }
.hm-stop__text { margin: 0 0 24px; max-width: 46ch; font-size: 17px; line-height: 1.6; color: var(--sr-muted); text-wrap: pretty }

/* the section link: text + a round arrow that fills on hover */
.hm-link { display: inline-flex; align-items: center; gap: 12px; color: var(--sr-text); font-size: 16px; font-weight: 600; text-decoration: none }
.hm-link svg {
    width: 40px; height: 40px; padding: 12px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--sr-line-strong);
    fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
    transition: background-color .2s, color .2s, box-shadow .2s, transform .25s var(--sr-ease);
}
.hm-link:hover svg { background: var(--sr-accent); color: var(--sr-accent-ink); box-shadow: none; transform: translateX(4px) }

.hm-panel { min-width: 0; margin: 0; padding: 22px; border-radius: var(--sr-r-lg); background: var(--sr-surface); border: 1px solid var(--sr-line); box-shadow: var(--sr-e3) }

/* rise into place once, when the stop comes into view */
.hm-stop > * { transition: opacity .7s var(--sr-ease), transform .7s var(--sr-ease) }
.hm.is-live .hm-stop:not(.is-seen) > * { opacity: 0; transform: translateY(28px) }
.hm.is-live .hm-stop:not(.is-seen) > :nth-child(2) { transform: translateY(48px) }
.hm-stop > :nth-child(2) { transition-delay: .08s }

/* a row that scrolls sideways: arrows show there is more, and move it */
.hm-scroll { position: relative; min-width: 0 }
.hm-scroll__btn {
    position: absolute; z-index: 2; top: 50%; right: -6px; width: 38px; height: 38px; margin-top: -19px; padding: 11px; border: 0; border-radius: 50%;
    background: var(--sr-text); color: var(--sr-bg); cursor: pointer; box-shadow: var(--sr-e2); transition: transform .2s var(--sr-ease), background-color .2s;
}
.hm-scroll__btn svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round }
.hm-scroll__btn--prev { right: auto; left: -6px }
.hm-scroll__btn--prev svg { transform: scaleX(-1) }
.hm-scroll__btn:hover { background: var(--sr-accent); color: var(--sr-accent-ink); transform: scale(1.06) }
.hm-scroll__btn[hidden] { display: none }
/* the edge that hides more items fades out, so a cut item reads as "more", not as a bug */
.hm-scroll.has-next [data-hm-scroll-track] { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 72px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 72px), transparent) }
.hm-scroll.has-prev [data-hm-scroll-track] { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 72px), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 72px), transparent) }
.hm-scroll.has-next.has-prev [data-hm-scroll-track] { -webkit-mask-image: linear-gradient(to right, transparent, #000 72px, #000 calc(100% - 72px), transparent); mask-image: linear-gradient(to right, transparent, #000 72px, #000 calc(100% - 72px), transparent) }

/* résumé: skills from vacancies */
.hm-skills__roles { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px }
.hm-skills__more { display: inline-flex; align-items: center; gap: 6px; color: var(--sr-text); text-decoration: none; box-shadow: inset 0 0 0 1px var(--sr-line-strong); background: transparent }
.hm-skills__more svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s var(--sr-ease) }
.hm-skills__more:hover { color: var(--sr-accent-text) }
.hm-skills__more:hover svg { transform: translateX(3px) }
.hm-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px }
.hm-bars li { display: grid; grid-template-columns: minmax(80px, 130px) minmax(0, 1fr) 44px; align-items: center; gap: 12px }
.hm-bars__term { font-size: 15px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.hm-bars__track { height: 10px; border-radius: 6px; background: var(--sr-raise); overflow: hidden }
.hm-bars__track i { display: block; height: 100%; width: var(--w); border-radius: 6px; background: var(--sr-text); transform-origin: left; transform: scaleX(0); transition: transform .8s var(--sr-ease); transition-delay: calc(var(--i) * 70ms + .2s) }
.hm-bars li:first-child .hm-bars__track i { background: var(--sr-accent) }
.hm-bars__value { font: 500 13.5px/1 var(--sr-mono); color: var(--sr-muted); text-align: right; font-variant-numeric: tabular-nums }
.hm-stop.is-seen .hm-bars__track i, .hm:not(.is-live) .hm-bars__track i { transform: none }
.hm-skills .is-pre .hm-bars__track i { transform: scaleX(0); transition: none }

/* preparation: progress by topic — what the site tracks once you are in */
.hm-prog__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--sr-line) }
.hm-prog__dir { display: flex; align-items: center; gap: 10px; min-width: 0 }
.hm-prog__dir b { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.hm-prog__tag { flex: none; padding: 5px 9px 4px; border-radius: var(--sr-r-pill); box-shadow: inset 0 0 0 1px var(--sr-line-strong); font: 600 11px/1 var(--sr-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--sr-muted) }
.hm-prog__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px }
.hm-prog__list a { display: grid; grid-template-columns: minmax(90px, 1fr) minmax(0, 1.3fr) 64px; align-items: center; gap: 14px; padding: 7px 0; color: var(--sr-text); text-decoration: none }
.hm-prog__name { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.hm-prog__track { height: 8px; border-radius: 5px; background: var(--sr-raise); overflow: hidden }
.hm-prog__track i { display: block; height: 100%; width: var(--p); border-radius: 5px; background: var(--sr-done); transform-origin: left; transform: scaleX(0); transition: transform .9s var(--sr-ease); transition-delay: calc(var(--i) * 60ms + .25s) }
.hm-prog__list small { font: 500 13px/1 var(--sr-mono); color: var(--sr-muted); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap }
.hm-prog__list small b { font-weight: 600; color: var(--sr-text) }
.hm-prog__list .is-done small b { color: var(--sr-text) }
.hm-prog__list a:hover .hm-prog__name { color: var(--sr-accent-text) }
.hm-prog__note { margin: 14px 0 0; padding-top: 14px; border-top: 1px solid var(--sr-line); font-size: 14px; line-height: 1.5; color: var(--sr-muted) }
.hm-prog__note a { color: var(--sr-text); text-underline-offset: 3px }
.hm-stop.is-seen .hm-prog__track i, .hm:not(.is-live) .hm-prog__track i { transform: none }

/* training: the real flip card */
.hm-demo .sim-face { min-height: 260px; box-shadow: var(--sr-e3) }
.hm-demo .sim-face__q { font-size: clamp(21px, 2.1vw, 27px) }

/* interview: stages + the newest records */
.hm .ivx-stage--hr { --stage: var(--sr-stage-hr) }
.hm .ivx-stage--technical { --stage: var(--sr-stage-tech) }
.hm .ivx-stage--system-design { --stage: var(--sr-stage-sd) }
.hm .ivx-stage--final { --stage: var(--sr-stage-final) }
/* interviews: a wide stop — the stages as a route in the order a candidate meets them */
.hm-stop--wide { grid-template-columns: minmax(0, 1fr); gap: 44px }
.hm-stop--wide:nth-of-type(n) .hm-stop__copy { order: 0; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); column-gap: 56px; align-items: end }
.hm-stop--wide .hm-stop__title { grid-row: 1 / 3; margin: 0 }
.hm-stop--wide .hm-stop__text { margin: 0 0 18px }
.hm-iv { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px }
.hm-iv li { position: relative; padding-top: 30px }
/* the route: a line in each stage's colour, joining the stages left to right, a dot where each begins */
.hm-iv li::before { content: ""; position: absolute; top: 6px; left: 22px; right: 4px; height: 3px; border-radius: 2px; background: var(--stage, var(--sr-line-strong)) }
.hm-iv li::after { content: ""; position: absolute; top: 0; left: 0; width: 15px; height: 15px; border-radius: 50%; background: var(--stage, var(--sr-line-strong)); box-shadow: 0 0 0 4px var(--sr-bg) }
.hm-iv a { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; color: var(--sr-text); text-decoration: none }
.hm-iv b { font-size: 17px; font-weight: 600; letter-spacing: -0.01em }
.hm-iv small { font: 500 13px/1 var(--sr-mono); color: var(--sr-muted); white-space: nowrap }
.hm-iv a:hover b { color: var(--stage) }
/* the recordings: drawn covers, the stage named in its colour */
.hm-ivc { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px }
.hm-ivc a { display: flex; flex-direction: column; gap: 10px; color: var(--sr-text); text-decoration: none }
.hm-ivc__media { display: block; aspect-ratio: 16 / 9; border-radius: var(--sr-r-lg); overflow: hidden; background: var(--sr-raise); box-shadow: var(--sr-e3); transition: transform .3s var(--sr-ease), box-shadow .3s }
.hm-ivc__media img { width: 100%; height: 100%; object-fit: cover; display: block }
.hm-ivc a:hover .hm-ivc__media { transform: translateY(-4px); box-shadow: var(--sr-e3), 0 0 0 2px var(--stage, var(--sr-line-strong)) }
.hm-ivc__meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font: 500 11.5px/1.3 var(--sr-mono); letter-spacing: .05em; text-transform: uppercase; color: var(--sr-muted) }
.hm-ivc__meta i { font-style: normal; color: var(--stage, var(--sr-muted)) }
.hm-ivc__title { font-size: 15px; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden }

/* autoresponses: each vacancy's button turns from «Откликнуться» into «Отправлен», one after another */
.hm-hr__name { font-size: 16px; font-weight: 600; letter-spacing: -0.01em }
.hm-hr__list { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px }
.hm-hr__list li { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 9px 9px 9px 16px; border-radius: var(--sr-r-md); background: var(--sr-raise) }
.hm-hr__list b { min-width: 0; font-size: 15px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.hm-hr__btn { position: relative; flex: none; display: grid; place-items: center; width: 126px; height: 34px; border-radius: var(--sr-r-sm); overflow: hidden; box-shadow: inset 0 0 0 1px var(--sr-line-strong); font-size: 13.5px; font-weight: 500; color: var(--sr-text) }
.hm-hr__btn i {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 6px; border-radius: inherit;
    background: color-mix(in srgb, var(--sr-success) 18%, var(--sr-raise)); color: var(--sr-success); font-style: normal;
    transition: opacity .25s, transform .35s var(--sr-ease); transition-delay: calc(.5s + var(--i) * .45s);
}
.hm-hr__btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round }
.hm.is-live .hm-stop:not(.is-seen) .hm-hr__btn i { opacity: 0; transform: scale(.7) }
.hm-hr__week { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--sr-line); font-size: 14.5px; color: var(--sr-muted) }
.hm-hr__week b { font-size: 28px; font-weight: 600; letter-spacing: -0.03em; line-height: 1; color: var(--sr-text); font-variant-numeric: tabular-nums }

/* test assignments */
.hm-ta__list { list-style: none }
.hm-ta__list li + li { border-top: 1px solid var(--sr-line) }
.hm-ta__list a { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; align-items: center; padding: 12px 0; color: var(--sr-text); text-decoration: none }
.hm-ta__mono { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px 4px 12px 12px; background: var(--sr-raise); box-shadow: inset 0 0 0 1px var(--sr-line-strong); font-weight: 600; font-size: 17px }
.hm-ta__text { display: flex; flex-direction: column; gap: 4px; min-width: 0 }
.hm-ta__list a:hover .hm-ta__mono { background: var(--sr-done); color: var(--sr-feature-ink); box-shadow: none }
.hm-ta__list li:first-child a { padding-top: 0 }
.hm-ta__list li:last-child a { padding-bottom: 0 }
.hm-ta__list b { font-size: 15.5px; font-weight: 500; line-height: 1.4 }
.hm-ta__list span { font-size: 13.5px; color: var(--sr-muted) }
.hm-ta__list a:hover b { color: var(--sr-accent-text) }

/* articles: editorial rows — topic, title, reading time; readers also see how the article opens */
.hm-ar { list-style: none; padding: 8px 22px }
.hm-ar li + li { border-top: 1px solid var(--sr-line) }
.hm-ar a { display: grid; grid-template-columns: 148px minmax(0, 1fr); gap: 18px; align-items: start; padding: 16px 0; color: var(--sr-text); text-decoration: none }
.hm-ar__cover { aspect-ratio: 4 / 3; border-radius: var(--sr-r-md); overflow: hidden; background: var(--sr-raise) }
.hm-ar__cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s var(--sr-ease) }
.hm-ar a:hover img { transform: scale(1.05) }
.hm-ar__body { display: flex; flex-direction: column; gap: 6px; min-width: 0 }
.hm-ar__topic { display: inline-flex; align-items: center; gap: 7px; font: 600 11.5px/1 var(--sr-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--topic, var(--sr-accent-text)) }
.hm-ar__topic::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor }
.hm-ar li[data-topic="HR"] { --topic: var(--sr-stage-hr) }
.hm-ar li[data-topic="Рынок"] { --topic: var(--sr-stage-sd) }
.hm-ar li[data-topic="Резюме"] { --topic: var(--sr-stage-final) }
.hm-ar li[data-topic="Легенда"] { --topic: var(--sr-stage-tech) }
.hm-ar b { font-size: 19px; font-weight: 600; line-height: 1.25; letter-spacing: -0.015em }
.hm-ar a:hover b { color: var(--sr-accent-text) }
.hm-ar q { font-size: 14.5px; line-height: 1.5; color: var(--sr-muted); quotes: "«" "»"; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden }
.hm-ar small { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 13.5px; color: var(--sr-muted) }
.hm-ar__lock { display: inline-flex; align-items: center; gap: 5px }
.hm-ar__lock svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2 }

/* the finish: the road ends in a ring above the reader's own next step */
.hm-finish { margin: 230px 0 0; padding-top: 96px; display: flex; flex-direction: column; align-items: center; text-align: center }
.hm-finish__title { margin: 0 0 14px; max-width: 20ch; font-size: clamp(32px, 3.8vw, 54px); font-weight: 600; line-height: 1.06; letter-spacing: -0.04em; text-wrap: balance }
.hm-finish__text { margin: 0 0 28px; max-width: 46ch; font-size: 17px; line-height: 1.6; color: var(--sr-muted); text-wrap: pretty }
.hm-finish__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px }
.hm-finish__dirs { list-style: none; margin: 0; padding: 0; width: 100%; max-width: 880px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; text-align: left }
.hm-finish__dirs a {
    display: grid; grid-template-columns: 40px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 12px; row-gap: 3px; align-items: center;
    padding: 14px 16px; border-radius: var(--sr-r-md); background: var(--sr-surface); border: 1px solid var(--sr-line);
    color: var(--sr-text); text-decoration: none; transition: border-color .2s, transform .25s var(--sr-ease), box-shadow .25s;
}
.hm-finish__dirs img { grid-row: 1 / 3; width: 40px; height: 40px; padding: 6px; border-radius: 11px; background: #fff; object-fit: contain; box-sizing: border-box }
.hm-finish__dirs b { font-size: 15.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.hm-finish__dirs small { font-size: 13.5px; color: var(--sr-muted) }
.hm-finish__dirs a:hover { border-color: var(--sr-accent); transform: translateY(-2px); box-shadow: var(--sr-e2) }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
    .hm-stop { grid-template-columns: minmax(0, 1fr); gap: 32px }
    .hm-stop:nth-of-type(odd) .hm-stop__copy { order: 0 }
    .hm-stop--wide:nth-of-type(n) .hm-stop__copy { display: flex; align-items: flex-start }
    .hm-stop--wide .hm-link { align-self: flex-start }
    .hm-stop--wide .hm-stop__title { margin: 0 0 16px }
    .hm-iv, .hm-ivc { grid-template-columns: repeat(2, minmax(0, 1fr)) }
    .hm-iv li:nth-child(even) { margin-top: 0 }
    .hm-iv li:nth-child(2)::before { right: 0 }
    .hm-hero { grid-template-columns: minmax(0, 1fr); min-height: 0; padding-top: 48px }
    .hm-lead, .hm-card { grid-column: 1 }
    .hm-card { grid-row: 3; margin-top: 8px; max-width: 480px }
    .hm-dirs { grid-row: 4; grid-template-columns: minmax(0, 1fr); gap: 12px }
}
@media (max-width: 720px) {
    /* one lane on the left: the road runs down the edge and the content sits beside it */
    .hm { --road: 30px }
    .hm-hero { padding: 40px 0 150px }
    .hm-card { min-height: 180px } /* the label takes two lines here */
    /* the road changes sides between the stops (as on a desktop): each stop keeps room on its road's side */
    .hm-stop, .hm-stop:nth-of-type(even), .hm-stop:nth-of-type(odd) { margin-top: 120px; gap: 24px }
    .hm-stop:nth-of-type(even) { padding: 0 calc(var(--road) + 14px) 0 0 }
    .hm-stop:nth-of-type(odd) { padding: 0 0 0 calc(var(--road) + 14px) }
    .hm-stop__title { font-size: 30px }
    /* the poster on a phone: both lines fill the width, so the title is clearly the largest thing on the screen */
    .hm-hero { --hm-h1: clamp(44px, 14.6vw, 96px); --hm-gap: 28px }
    .hm-title__line { white-space: nowrap }
    .hm-title__line + .hm-title__line { margin-top: 6px; font-size: clamp(29px, 9.5vw, 62px); letter-spacing: -0.045em }
    .hm-lead { font-size: 16px; line-height: 1.55 }
    .hm-prog__list a { grid-template-columns: minmax(0, 1fr) 70px 58px; gap: 10px }
    .hm-ar { padding: 4px 16px }
    .hm-ar a { grid-template-columns: 92px minmax(0, 1fr); gap: 14px }
    .hm-ar b { font-size: 16.5px }
    .hm-finish__text { margin-bottom: 22px }
    .hm-finish__dirs { grid-template-columns: 1fr }
    .hm-iv { gap: 26px 12px }
    .hm-iv li:nth-child(even) { margin-top: 0 }
    .hm-iv li:nth-child(2)::before { right: 0 }
    .hm-iv a { flex-direction: column; gap: 4px }
    .hm-iv b { font-size: 15px; line-height: 1.25 }
    .hm-ivc { gap: 22px 12px }
    .hm-ivc__title { font-size: 14px }
    .hm-skills__roles .sr-chip { height: 30px; padding: 0 11px; font-size: 13px }
    .hm-bars li { grid-template-columns: minmax(70px, 100px) minmax(0, 1fr) 38px; gap: 10px }
    .hm-panel { padding: 16px }
            .hm-finish { margin-top: 140px; padding-top: 80px; padding-left: calc(var(--road) + 18px); align-items: flex-start; text-align: left }
    .hm-finish__actions { justify-content: flex-start }
    .hm-finish__title { font-size: 30px }
    /* the lane hugs the screen edge: signs start at the road's edge instead of centring on it */
    .hm-pin, .hm-start { font-size: 10.5px; padding: 6px 9px 5px; transform: translate(calc(var(--road) / -2), -50%) }
    .hm-pin[data-side="r"] { transform: translate(calc(-100% + var(--road) / 2), -50%) }
    .hm-road__labels { display: none }
}

@media (prefers-reduced-motion: reduce) {
    .hm-title__line, .hm-title .qb-hl, .hm-lead, .hm-card, .hm-dirs { animation: none }
    .hm-stop > *, .hm-bars__track i, .hm-prog__track i { transition: none }
}
html.sr-calm :is(.hm-title__line, .hm-title .qb-hl, .hm-lead, .hm-card, .hm-dirs) { animation: none }
