/* Question bank: overview (/questions/) and a direction page. Uses tokens.css. Prefix: qb- */

.qb { position: relative; padding-top: 8px }
.qb img { display: block }

/* ---------- shared bits ---------- */
.qb-icon-btn { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--sr-line); background: var(--sr-surface); color: var(--sr-text); display: grid; place-items: center; cursor: pointer; flex: none; transition: border-color .15s }
.qb-icon-btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round }
.qb-icon-btn:hover { border-color: var(--sr-line-strong) }
.qb-text-btn {
    padding: 4px 2px; border: 0; background: none; cursor: pointer; white-space: nowrap;
    color: var(--sr-muted); font: 500 13px/1.3 var(--sr-font);
    text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--sr-line-strong);
    transition: color .15s, text-decoration-color .15s;
}
.qb-text-btn:hover { color: var(--sr-text); text-decoration-color: currentColor }
.qb-count { font: 500 12.5px/1 var(--sr-mono); color: var(--sr-muted); padding: 4px 7px; border-radius: 6px; background: var(--sr-raise); font-variant-numeric: tabular-nums }

/* white tile behind direction logos: the logos are drawn for a light background */
.qb-dir__icon { width: 36px; height: 36px; border-radius: 10px; flex: none; display: grid; place-items: center; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / .18), inset 0 0 0 1px rgb(0 0 0 / .06) }
.qb-dir__icon img { width: 22px; height: 22px; object-fit: contain }

/* ---------- hero ---------- */
.qb-hero {
    position: relative; isolation: isolate;
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, var(--sr-side-col)); gap: 48px var(--sr-col-gap); align-items: stretch;
    padding: 32px 0 40px;
}

.qb-crumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 20px; font-size: 13.5px; color: var(--sr-muted) }
.qb-crumbs a { color: var(--sr-muted); text-decoration: none; transition: color .15s }
.qb-crumbs a:hover { color: var(--sr-text) }
.qb-crumbs [aria-current] { color: var(--sr-text) }
/* changing direction: an explicit, labelled control next to where you are */
.qb-crumbs .qb-switch {
    display: inline-flex; align-items: center; gap: 6px; height: 28px; margin-left: 8px; padding: 0 11px 0 9px;
    border-radius: var(--sr-r-pill); border: 1px solid var(--sr-line); background: var(--sr-surface);
    color: var(--sr-text); font-size: 13.5px; font-weight: 500; transition: border-color .15s, background-color .15s;
}
.qb-crumbs .qb-switch:hover { border-color: var(--sr-accent); color: var(--sr-text) }
.qb-switch svg { width: 13px; height: 13px; fill: none; stroke: var(--sr-accent); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .35s var(--sr-ease) }
.qb-switch:hover svg { transform: rotate(180deg) }

.qb-title {
    margin: 0 0 16px; max-width: 20ch;
    font: 600 var(--sr-h1)/1.08 var(--sr-font); letter-spacing: -0.035em; text-wrap: balance;
    color: var(--sr-text);
}
/* the role in the title: accent colour only, no plaque, no tilt */
.qb-hl {
    /* the key word as a sticker: the logo's chip shape (one sharper corner), softer radii, a slight tilt, text in the optical centre */
    display: inline-block; padding: .04em .16em .1em; margin-right: .03em; line-height: 1;
    border-radius: .26em .1em .26em .26em; background: var(--sr-accent); color: var(--sr-accent-ink);
    transform: rotate(-2deg);
}
.qb-title--direction { max-width: 16ch }
/* a little air between lines so a wrapped chip never touches the line above or below */
.qb-title:has(.qb-hl) { line-height: 1.12 }

.qb-lead { margin: 0; max-width: 54ch; color: var(--sr-muted); font-size: 17px; line-height: 1.6; text-wrap: pretty }
.qb-lead__num { color: var(--sr-text); font-weight: 600 }

/* progress card: the one featured element of the screen. Cream, bitten corner, the bite holds the main action.
   Inner rhythm: 20px padding, 12px between rows, 16px above a divided section. */
.qb-progress {
    padding: 20px; color: var(--sr-feature-ink);
    display: flex; flex-direction: column; gap: 12px;
}
.qb-progress__title { margin: 0; padding-right: 64px; color: var(--sr-feature-muted) }
.qb-progress__guest { margin: 0; padding-right: 56px; font-size: 20px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.25 }
.qb-progress__count { margin: 0; padding-right: 56px; font-size: 15px; line-height: 1.3; color: var(--sr-feature-muted) }
.qb-progress__count b { display: flex; width: max-content; margin-bottom: 6px; font-size: 44px; font-weight: 600; letter-spacing: -0.04em; color: var(--sr-feature-ink) }
.qb-progress__bar { --sr-progress-track: color-mix(in srgb, var(--sr-feature-ink) 12%, transparent); --sr-progress-ring: var(--sr-feature); margin: 6px 7px 0 0 }
.qb-progress__meta { display: flex; justify-content: space-between; margin: -4px 0 0; font-size: 13.5px; color: var(--sr-feature-muted) }
.qb-progress__meta span:first-child { font-weight: 600; color: var(--sr-feature-ink) }
.qb-progress__next {
    display: flex; flex-direction: column; gap: 4px; margin-top: 4px; padding-top: 16px;
    border-top: 1px solid color-mix(in srgb, var(--sr-feature-ink) 12%, transparent);
    color: var(--sr-feature-ink); text-decoration: none;
}
.qb-progress__next:hover { color: var(--sr-feature-ink) }
.qb-progress__next:hover .qb-progress__q { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px }
.qb-progress__label { color: var(--sr-feature-muted) }
.qb-progress__q { font-size: 16px; font-weight: 600; line-height: 1.35; letter-spacing: -0.01em; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden }
.qb-progress__topic { font-size: 13.5px; color: var(--sr-feature-muted) }
.qb-progress__note { margin: 0; font-size: 14px; line-height: 1.5; color: var(--sr-feature-muted); text-wrap: pretty }
.qb-progress__note a { color: var(--sr-feature-ink); text-underline-offset: 3px }
.qb-progress__login { align-self: flex-start; margin-top: 4px }

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

/* ---------- topics tree ---------- */
.qb-side {
    position: sticky; top: calc(var(--sr-header-h) + 12px);
    max-height: calc(100vh - var(--sr-header-h) - 24px);
    display: flex; flex-direction: column;
    border-radius: var(--sr-r-lg); background: var(--sr-surface); border: 1px solid var(--sr-line); box-shadow: var(--sr-e1);
    overflow: hidden;
}
.qb-side__head { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 10px 14px 10px 18px; border-bottom: 1px solid var(--sr-line) }
.qb-side__head h2 { margin: 0 auto 0 0; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; display: flex; align-items: baseline; gap: 8px }
.qb-side__head small { font: 500 12px/1 var(--sr-mono); color: var(--sr-muted) }
.qb-side__close { display: none }
.qb-side__scroll { overflow-y: auto; overscroll-behavior: contain; padding: 8px 8px 14px; scrollbar-width: thin; scrollbar-color: var(--sr-line-strong) transparent }

.qb-tree__all {
    display: flex; justify-content: space-between; align-items: center; gap: 10px;
    min-height: 40px; padding: 8px 12px 8px 10px; margin-bottom: 4px; border-radius: var(--sr-r-sm);
    color: var(--sr-text); text-decoration: none; font-weight: 500; font-size: 14.5px;
    transition: background-color .15s;
}
.qb-tree__all span { font: 500 11.5px/1 var(--sr-mono); color: var(--sr-muted); font-variant-numeric: tabular-nums }
.qb-tree__all:hover { background: var(--sr-raise); color: var(--sr-text) }
.qb-tree__all[aria-current] { background: var(--sr-raise); color: var(--sr-text); font-weight: 600 }

.qb-tree, .qb-tree__qs { list-style: none; margin: 0; padding: 0 }
/* row = [toggle][link to the topic's questions][count] */
.qb-tree__row {
    display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center;
    border-radius: var(--sr-r-sm); transition: background-color .15s;
}
.qb-tree__row:hover { background: var(--sr-raise) }
.qb-tree__row.is-current { background: var(--sr-raise) }
.qb-tree__toggle {
    width: 28px; height: 32px; padding: 0; border: 0; background: none; cursor: pointer;
    display: grid; place-items: center; color: var(--sr-muted); border-radius: 8px;
}
.qb-tree__toggle svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s var(--sr-ease) }
.qb-tree__toggle:hover { color: var(--sr-text) }
.qb-tree__toggle[aria-expanded="true"] { color: var(--sr-text) }
.qb-tree__toggle[aria-expanded="true"] svg { transform: rotate(90deg) }
.qb-tree__link {
    display: flex; align-items: baseline; gap: 8px; min-width: 0;
    padding: 8px 6px 8px 2px; color: var(--sr-text); text-decoration: none;
    font-size: 14.5px; font-weight: 500; line-height: 1.3;
}
.qb-tree__link:hover { color: var(--sr-text) }
.qb-tree__link[aria-current] .qb-tree__name { color: var(--sr-text); font-weight: 600 }
.qb-tree__num { font: 500 11.5px/1.3 var(--sr-mono); color: var(--sr-muted); min-width: 16px; font-variant-numeric: tabular-nums; flex: none }
.qb-tree__name { min-width: 0; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow-wrap: anywhere }
.qb-tree__name em { font-style: normal; font-size: 11px; color: var(--sr-muted); border: 1px dashed var(--sr-line-strong); border-radius: 4px; padding: 0 4px; margin-left: 4px }
.qb-tree__count { padding-right: 10px; font: 500 11.5px/1 var(--sr-mono); color: var(--sr-muted); font-variant-numeric: tabular-nums }
.qb-tree__topic.is-inactive .qb-tree__row { opacity: .6 }

.qb-tree__body { margin: 2px 0 8px 13px; padding-left: 8px; border-left: 1px solid var(--sr-line) }
.qb-tree__sub .qb-tree__row { grid-template-columns: 26px minmax(0, 1fr) auto }
.qb-tree__sub .qb-tree__link { font-size: 14px; padding-block: 7px }
.qb-tree__qs { margin: 2px 0 6px 13px; padding-left: 8px; border-left: 1px solid var(--sr-line) }
.qb-tree__qs--loose { margin-left: 0; padding-left: 0; border-left: 0 }
.qb-tree__qs a {
    display: flex; gap: 10px; align-items: center;
    padding: 6px 8px; border-radius: 8px;
    color: var(--sr-muted); text-decoration: none; font-size: 13.5px; line-height: 1.35;
    transition: background-color .15s, color .15s;
}
.qb-tree__qs a:hover { background: var(--sr-raise); color: var(--sr-text) }
.qb-tree__qs .sr-status { width: 10px; height: 10px; border-width: 1.4px }
.qb-tree__q { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }

/* ---------- filters (in the flow: the list scrolls as one piece) ---------- */
.qb-main { min-width: 0; display: flex; flex-direction: column; gap: 14px }
.qb-filters { display: flex; flex-direction: column; gap: 12px }
/* top row: search and «what to show» side by side; the switch drops under the search when there is no room */
.qb-filters__top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px }
.qb-filters__search { flex: 1 1 260px; min-width: 0 }
.qb-filters__row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px }
.qb-chips { display: flex; flex-wrap: wrap; gap: 6px }
.qb-filters .sr-chip, .qb-subtopics .sr-chip { height: 36px }
.qb-chip__dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none }
.qb-chip--hr .qb-chip__dot { background: var(--sr-stage-hr) }
.qb-chip--tech .qb-chip__dot { background: var(--sr-stage-tech) }
.qb-chip--sd .qb-chip__dot { background: var(--sr-stage-sd) }
.qb-seg { display: inline-flex; height: 42px; padding: 4px; border-radius: var(--sr-r-md); background: var(--sr-well) }
.qb-seg a { height: 34px; padding: 0 13px; display: inline-flex; align-items: center; border-radius: calc(var(--sr-r-md) - 4px); color: var(--sr-muted); text-decoration: none; font-size: 13.5px; font-weight: 500; white-space: nowrap; transition: color .15s, background-color .15s }
.qb-seg a:hover { color: var(--sr-text) }
.qb-seg a[aria-current] { background: var(--sr-surface); color: var(--sr-text); box-shadow: var(--sr-e1) }
.qb-seg a { gap: 6px }
.qb-seg svg { width: 15px; height: 15px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round }
.qb-seg .qb-chip__count { margin-left: 1px }
/* a stage with nothing to show stays in place (the row doesn't jump) but can't be picked */
.qb-chips .sr-chip.is-empty { opacity: .4; cursor: default; pointer-events: none }
/* the row is in the user's favorites: a small ribbon after the text */
.qb-q__fav { display: inline-block; width: 14px; height: 14px; margin-left: 8px; vertical-align: -1px; fill: var(--sr-done); stroke: var(--sr-done); stroke-width: 1.6; stroke-linejoin: round }
.qb-topics-btn {
    display: none; align-items: center; gap: 8px; height: 42px; padding: 0 16px;
    border-radius: var(--sr-r-md); border: 1px solid var(--sr-line); background: var(--sr-surface); color: var(--sr-text);
    font: 500 14px/1 var(--sr-font); cursor: pointer; flex: none;
}
.qb-topics-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round }

/* ---------- results ---------- */
.qb-results-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 10px }
.qb-results-head h2 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -0.02em; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap }
.qb-sep { color: var(--sr-faint); font-weight: 400 }
.qb-found { font-size: 14px; font-weight: 500; letter-spacing: 0; color: var(--sr-muted) }
.qb-admin-note { margin: 2px 2px 10px; padding: 10px 12px; border-radius: var(--sr-r-sm); border: 1px dashed var(--sr-line-strong); font-size: 13.5px; line-height: 1.45; color: var(--sr-muted) }
.qb-empty--direction { margin-top: 8px }
.qb-empty--direction h2 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -0.015em }
.qb-subtopics .sr-chip small { font: 500 11px/1 var(--sr-mono); opacity: .7; margin-left: 2px }

.qb-list {
    list-style: none; margin: 0; padding: 0;
    border-radius: var(--sr-r-lg); background: var(--sr-surface); border: 1px solid var(--sr-line); box-shadow: var(--sr-e1);
    overflow: hidden;
}
.qb-list li + li { border-top: 1px solid var(--sr-line) }
.qb-q {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto 18px; gap: 14px; align-items: center;
    padding: 11px 18px; min-height: 52px; color: var(--sr-text); text-decoration: none;
    transition: background-color .15s;
}
.qb-q:not(:has(.sr-status)) { grid-template-columns: minmax(0, 1fr) auto 18px }
.qb-q:hover { background: color-mix(in srgb, var(--sr-raise) 55%, var(--sr-surface)); color: var(--sr-text) }
.qb-q__body { display: flex; flex-direction: column; gap: 4px; min-width: 0 }
.qb-q__text { font-size: 15.5px; font-weight: 500; line-height: 1.45; overflow-wrap: anywhere; text-wrap: pretty }
.qb-q__meta { font-size: 13.5px; color: var(--sr-muted) }
.qb-q__meta:empty { display: none }
.qb-q__go { width: 18px; height: 18px; fill: none; stroke: var(--sr-muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transform: translateX(-4px); transition: opacity .15s, transform .2s var(--sr-ease), stroke .15s }
.qb-q:hover .qb-q__go, .qb-q:focus-visible .qb-q__go { opacity: 1; transform: none; stroke: var(--sr-accent) }

.qb-empty {
    display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px;
    padding: 48px 20px; border-radius: var(--sr-r-lg); border: 1px dashed var(--sr-line-strong);
}
.qb-empty__art { width: 64px; height: 64px; color: var(--sr-line-strong); margin-bottom: 4px }
.qb-empty .sr-snake { width: 96px; margin-bottom: 6px }
.qb-empty .sr-snake--sleep { width: 120px }
.qb-empty h3 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -0.01em; max-width: 36ch; overflow-wrap: anywhere }
.qb-empty p { margin: 0; color: var(--sr-muted); font-size: 14px }
.qb-empty__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 6px }

.qb-pages { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 10px }
.qb-pages__step {
    height: 40px; padding: 0 16px; display: inline-flex; align-items: center; gap: 8px;
    border-radius: var(--sr-r-pill); border: 1px solid var(--sr-line); background: var(--sr-surface);
    color: var(--sr-text); text-decoration: none; font-size: 14px; font-weight: 500;
    transition: border-color .15s;
}
.qb-pages__step svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transform: scaleX(-1) }
.qb-pages__step--next svg { transform: none }
.qb-pages__step:hover { border-color: var(--sr-line-strong); color: var(--sr-text) }
.qb-pages__step[aria-disabled] { opacity: .4; pointer-events: none }
.qb-pages__nums { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center }
.qb-pages__nums a, .qb-pages__nums span { min-width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: var(--sr-text); text-decoration: none; font-size: 14px; font-variant-numeric: tabular-nums; transition: background-color .15s }
.qb-pages__nums a:hover { background: var(--sr-raise); color: var(--sr-text) }
.qb-pages__nums [aria-current] { background: var(--sr-text); color: var(--sr-bg); font-weight: 600 }
.qb-pages__gap { color: var(--sr-muted) }
.qb-pages__of { display: none; font-size: 14px; color: var(--sr-muted); font-variant-numeric: tabular-nums }

.qb-scrim { display: none }

/* ---------- overview ---------- */
.qb-hero--overview .qb-title { max-width: 18ch }
/* the count sits in the headline, set in the same type, so it reads as part of the sentence */
.qb-bignum { color: var(--sr-text); white-space: nowrap; font-feature-settings: "tnum" 0 }
.qb-nowrap { white-space: nowrap }

.qb-resume {
    display: flex; flex-direction: column; align-items: stretch; gap: 12px; padding: 20px;
    color: var(--sr-feature-ink); text-decoration: none;
}
.qb-resume:hover { color: var(--sr-feature-ink) }
.qb-resume__label { color: var(--sr-feature-muted); padding-right: 64px }
.qb-resume__dir { display: flex; align-items: center; gap: 12px; min-width: 0; padding-right: 48px }
.qb-resume__dir b { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.15 }
.qb-resume__count { font-size: 15px; color: var(--sr-feature-muted) }
.qb-resume__count b { font-weight: 600; color: var(--sr-feature-ink) }
.qb-resume__bar { --sr-progress-track: color-mix(in srgb, var(--sr-feature-ink) 12%, transparent); --sr-progress-ring: var(--sr-feature); margin-right: 7px }
.qb-resume__meta { font-size: 14px; line-height: 1.45; color: var(--sr-feature-muted) }
.qb-resume:hover .qb-resume__dir b { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px }

.qb-steps { padding: 20px 20px 16px; border-radius: 22px 22px 22px 8px }
.qb-steps__title { margin: 0 0 14px }
.qb-steps ol { list-style: none; margin: 0; padding: 0; counter-reset: step; display: flex; flex-direction: column; gap: 14px }
.qb-steps li { counter-increment: step; display: grid; grid-template-columns: 28px minmax(0, 1fr); column-gap: 12px; row-gap: 2px }
.qb-steps li::before {
    content: counter(step); grid-row: span 2; width: 28px; height: 28px; border-radius: 50%;
    display: grid; place-items: center; background: var(--sr-raise); font: 600 13px/1 var(--sr-font); color: var(--sr-text);
}
.qb-steps li:first-child::before { background: var(--sr-done); color: var(--sr-feature-ink) }
.qb-steps b { font-size: 15px; font-weight: 600; line-height: 1.35; padding-top: 4px }
.qb-steps b a { color: var(--sr-accent-text) }
.qb-steps li span { font-size: 13.5px; color: var(--sr-muted); line-height: 1.45 }

.qb-section-title { margin: 0 0 18px; font-size: 24px; font-weight: 600; letter-spacing: -0.025em }
.qb-section-title--sm { font-size: 18px; margin-bottom: 4px }
.qb-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px }
.qb-cards li { animation: qb-rise .5s var(--sr-ease) both; animation-delay: calc(min(var(--i, 0), 12) * 45ms) }
.qb-card {
    position: relative; height: 100%;
    display: flex; flex-direction: column; gap: 8px;
    padding: 18px 18px 18px; border-radius: var(--sr-r-lg);
    background: var(--sr-surface); border: 1px solid var(--sr-line); box-shadow: var(--sr-e1);
    color: var(--sr-text); text-decoration: none;
    transition: border-color .15s, box-shadow .25s, transform .25s var(--sr-ease);
}
.qb-card:hover { color: var(--sr-text); border-color: var(--sr-line-strong); box-shadow: var(--sr-e2); transform: translateY(-3px) }
.qb-card__top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px }
.qb-card .qb-dir__icon { width: 44px; height: 44px; border-radius: 12px }
.qb-card .qb-dir__icon img { width: 26px; height: 26px }
.qb-card__go { width: 32px; height: 32px; padding: 8px; border-radius: 50%; background: var(--sr-raise); fill: none; stroke: var(--sr-muted); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: background-color .2s, stroke .2s, transform .35s cubic-bezier(.3, 1.4, .5, 1) }
.qb-card:hover .qb-card__go { background: var(--sr-accent); stroke: var(--sr-accent-ink); transform: rotate(45deg) }
.qb-card__name { font-size: 18px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.25 }
.qb-card__topics { margin-bottom: auto; font-size: 13.5px; line-height: 1.45; color: var(--sr-muted); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden }
.qb-card__meta { padding-top: 12px; border-top: 1px solid var(--sr-line); font-size: 13.5px; font-weight: 500; color: var(--sr-text) }
/* featured card: cream, the bite holds the arrow */
.qb-card.is-feature { background: var(--sr-feature); color: var(--sr-feature-ink); border-color: transparent; box-shadow: var(--sr-e2) }
.qb-card.is-feature .qb-card__topics { color: var(--sr-feature-muted) }
.qb-card.is-feature .qb-card__meta { color: var(--sr-feature-muted); border-top-color: color-mix(in srgb, var(--sr-feature-ink) 12%, transparent) }

.qb-soon { margin-top: 44px }
.qb-soon__lead { margin: 0 0 14px; font-size: 14px; color: var(--sr-muted) }
.qb-soon ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px }
.qb-soon li { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px 0 6px; border-radius: var(--sr-r-pill); border: 1px dashed var(--sr-line-strong); color: var(--sr-muted); font-size: 13.5px }
.qb-soon .qb-dir__icon { width: 24px; height: 24px; border-radius: 50%; opacity: .7 }
.qb-soon .qb-dir__icon img { width: 15px; height: 15px }

/* ---------- motion ---------- */
@keyframes qb-rise { from { opacity: 0; transform: translateY(8px) } }
@keyframes qb-unfold { from { opacity: 0; transform: translateY(-4px) } }
.qb-list li { animation: qb-rise .4s var(--sr-ease) both; animation-delay: calc(min(var(--i, 0), 14) * 22ms) }
.qb-tree__body:not([hidden]), .qb-tree__qs:not([hidden]) { animation: qb-unfold .22s var(--sr-ease) }
.qb-hero__copy, .qb-progress, .qb-resume, .qb-steps { animation: qb-rise .55s var(--sr-ease) both }
.qb-hero > .qb-progress, .qb-hero > .qb-resume, .qb-hero > .qb-steps { align-self: end }
/* hero as one block: crumbs stay on top, the title and lead sit on the card's bottom edge */
/* the right half of a section head: the page's main action or its contents, level with the lead */
.qb-hero > .qb-hero__side { align-self: end; animation: qb-rise .55s var(--sr-ease) .06s both }
.qb-hero__copy { display: flex; flex-direction: column }
.qb-hero__copy > .qb-crumbs { margin-bottom: auto; padding-bottom: 20px }
.qb-progress, .qb-resume, .qb-steps { animation-delay: .12s }

/* ---------- tablet & phone ---------- */
@media (max-width: 1024px) {
    .qb-layout { grid-template-columns: minmax(0, 1fr) }
    .qb-topics-btn { display: inline-flex }
    .qb-side {
        position: fixed; z-index: 210; top: 0; bottom: 0; left: 0;
        width: min(400px, 88vw); max-height: none; border-radius: 0 var(--sr-r-lg) var(--sr-r-lg) 0;
        transform: translateX(-104%); transition: transform .3s var(--sr-ease), visibility 0s .3s; box-shadow: var(--sr-e3);
        visibility: hidden;
    }
    .qb-side.is-open { transform: none; visibility: visible; transition: transform .3s var(--sr-ease) }
    .qb-side__close { display: grid }
    .qb-scrim { display: block; position: fixed; inset: 0; z-index: 205; background: rgb(0 0 0 / .5) }
    .qb-scrim[hidden] { display: none }
    .qb-tree__row, .qb-tree__qs a, .qb-tree__all { min-height: 44px }
    .qb-tree__toggle { height: 44px; width: 36px }
    .qb-tree__row, .qb-tree__sub .qb-tree__row { grid-template-columns: 36px minmax(0, 1fr) auto }
    .qb-cards { grid-template-columns: repeat(2, minmax(0, 1fr)) }
}
@media (max-width: 860px) {
    .qb-hero, .qb-hero--overview { grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 18px 0 28px }
}
@media (max-width: 560px) {
    /* «Показать» on a phone: two rows — progress (все / неизученные / изученные), then personal lists */
    .qb-filters__search { flex-basis: 0 } /* «Темы» and search stay on one line, the switch takes the next */
    .qb-seg { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 2px; width: 100%; height: auto }
    .qb-seg a { grid-column: span 2; justify-content: center; gap: 4px; padding: 0 6px; font-size: 13px }
    .qb-seg a:nth-child(n + 4) { grid-column: span 3 }
    .qb-seg svg { display: none }
    .qb-q { grid-template-columns: auto minmax(0, 1fr); padding: 14px; row-gap: 8px }
    .qb-q:not(:has(.sr-status)) { grid-template-columns: minmax(0, 1fr) }
    .qb-q .sr-stage { grid-column: -2 / -1; justify-self: start }
    .qb-q__go { display: none }
    .qb-pages__nums { display: none }
    .qb-pages__of { display: inline }
    .qb-cards { grid-template-columns: minmax(0, 1fr) }
    .qb-crumbs .qb-switch { margin-left: 0 }
}
@media (prefers-reduced-motion: reduce) {
    .qb-side, .qb-card, .qb-card__go, .qb-resume { transition: none }
    .qb-bar i, .qb-list li, .qb-cards li, .qb-tree__body, .qb-tree__qs, .qb-hero__copy, .qb-progress, .qb-resume, .qb-steps { animation: none }
}

/* ---------- concept details ---------- */

/* filters: glass panel over its own colour field */
.qb-main { position: relative; isolation: isolate }
.qb-filters.sr-glass { position: relative; z-index: 5; padding: 10px; border-radius: var(--sr-r-lg) }
.qb-chip__count { font: 500 11px/1 var(--sr-mono); font-variant-numeric: tabular-nums; color: var(--sr-muted); margin-left: 2px }
.sr-chip[aria-current] .qb-chip__count { color: inherit; opacity: .65 }

/* stage thread: a thin stripe in the stage colour, readable before the label */
.qb-q { position: relative }
.qb-q--hr { --stage: var(--sr-stage-hr) }
.qb-q--tech { --stage: var(--sr-stage-tech) }
.qb-q--sd { --stage: var(--sr-stage-sd) }

/* skeleton while the next list loads */
.qb-skeleton { display: none; border-radius: var(--sr-r-lg); background: var(--sr-surface); border: 1px solid var(--sr-line); overflow: hidden }
.qb-skeleton__row { display: grid; grid-template-columns: 14px minmax(0, 1fr) 96px; gap: 14px; align-items: center; padding: 18px }
.qb-skeleton__row + .qb-skeleton__row { border-top: 1px solid var(--sr-line) }
.qb-skeleton__dot { width: 14px; height: 14px; border-radius: 50% }
.qb-skeleton__lines { display: flex; flex-direction: column; gap: 8px }
.qb-skeleton__lines .sr-skel { height: 12px }
.qb-skeleton__lines .qb-skeleton__meta { width: 22%; height: 9px }
.qb-skeleton__chip { height: 22px; border-radius: 6px }
.qb-main.is-loading .qb-list, .qb-main.is-loading .qb-empty, .qb-main.is-loading .qb-pages, .qb-main.is-loading .qb-subtopics { display: none }
.qb-main.is-loading .qb-skeleton { display: block }
@media (max-width: 560px) {
    .qb-figures { grid-template-columns: repeat(3, minmax(0, 1fr)) }
    .qb-figures div { padding-right: 12px; margin-right: 12px }
    .qb-figures dd { font-size: 26px }
    .qb-skeleton__row { grid-template-columns: 14px minmax(0, 1fr) }
    .qb-skeleton__chip { display: none }
}

/* the row you came back from: a short accent outline that fades */
.qb-list li.is-recent .qb-q { animation: qb-recent 2.4s var(--sr-ease) both }
@keyframes qb-recent { 0%, 40% { background: var(--sr-accent-soft) } 100% { background: transparent } }
.qb-list li { scroll-margin-top: calc(var(--sr-header-h) + 40px) }

/* the logo's dot at the end of the progress bar pings once when the bar has filled: "you are here" */
.qb-progress__bar > i::before, .qb-resume__bar > i::before {
    content: ""; position: absolute; right: -7px; top: 50%; width: 14px; height: 14px; margin-top: -7px; border-radius: 50%;
    border: 2px solid var(--sr-accent); opacity: 0; animation: qb-ping 1.1s var(--sr-ease) 1.1s 2 both;
}
@keyframes qb-ping { 0% { opacity: .9; transform: scale(1) } 100% { opacity: 0; transform: scale(2.6) } }
@media (prefers-reduced-motion: reduce) { .qb-progress__bar > i::before, .qb-resume__bar > i::before { animation: none } }

/* denser list: rows are grouped under «topic · subtopic» headers, the stage is marked only when it is not the main one */
.qb-group {
    padding: 18px 18px 8px; font: 500 11.5px/1.3 var(--sr-mono); letter-spacing: .05em; text-transform: uppercase; color: var(--sr-muted);
    background: color-mix(in srgb, var(--sr-well) 50%, var(--sr-surface));
}
.qb-list li.qb-group + li { border-top: 0 }
.qb-q { grid-template-columns: auto minmax(0, 1fr) auto 18px }
.qb-q:not(:has(.sr-stage)) { grid-template-columns: auto minmax(0, 1fr) 18px }
.qb-q:not(:has(.sr-status)):not(:has(.sr-stage)) { grid-template-columns: minmax(0, 1fr) 18px }

/* phone: the lead steps back so the title stays clearly the largest */
@media (max-width: 640px) { .qb-lead { font-size: 16px; line-height: 1.55 } }
/* the role stays on one line («Python-разработчика»), so on a narrow phone the title gives way */
@media (max-width: 480px) { .qb-title--direction { font-size: min(var(--sr-h1), 8.6vw) } .qb-title--direction .qb-nowrap { white-space: normal } .qb-title--direction .qb-hl { white-space: normal; overflow-wrap: anywhere; box-decoration-break: clone; -webkit-box-decoration-break: clone } }
