/* Only what this case adds to the shared template. */
.q-path { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0; }
.q-path li { position: relative; display: grid; align-content: space-between; gap: 28px; min-height: 170px; padding: 18px 20px 20px; background: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line-d); font-size: clamp(17px, 1.6vw, 22px); font-weight: 800; line-height: 1.15; letter-spacing: -.02em; transition: opacity .6s var(--out), transform .6s var(--out); transition-delay: calc(var(--i) * 140ms); }
.q-path b { font: 700 12px/1 var(--f-mono); color: var(--muted-d); }
.q-path .is-end { background: var(--accent); box-shadow: none; color: var(--ink); }
.q-path .is-end b { color: var(--ink); }
.js [data-reveal]:not(.is-in) .q-path li { opacity: 0; transform: translateY(14px); }

.q-route { padding-top: 0; }
.q-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: start; margin-top: 44px; }
.q-stick { position: sticky; top: 96px; margin: 0; height: calc(100vh - 136px); min-height: 480px; max-height: 720px; }
.q-stick canvas { display: block; width: 100%; height: 100%; }
.q-steps { display: grid; gap: 88px; min-width: 0; }
.q-step { min-height: 46vh; }
.q-step:last-child { min-height: 52vh; }
.q-step h3 { margin-bottom: 16px; font-weight: 900; font-size: clamp(24px, 2.4vw, 34px); line-height: 1.08; letter-spacing: -.03em; }
.q-step p { font-size: 17px; line-height: 1.6; color: #cfc9bc; }
.q-step p + p { margin-top: 14px; }
.q-step a { color: var(--accent); text-decoration: underline; text-underline-offset: .18em; }
.q-shot { margin: 28px 0 0; }
.q-bots { max-width: 560px; }
.q-shot img { display: block; width: 100%; height: auto; }
.q-ad .shot-img { position: relative; }
.q-mark { position: absolute; left: var(--x); top: var(--y); width: var(--w); height: var(--h); background: var(--accent); mix-blend-mode: multiply; transform-origin: left; transition: transform .8s var(--out) .4s; }
.js .q-ad:not(.is-in) .q-mark { transform: scaleX(0); }
.q-tabs { display: flex; flex-wrap: wrap; gap: 2px; margin-bottom: 10px; }
.q-tabs button { min-height: 44px; padding: 10px 16px; border: 0; background: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line-d); color: var(--muted-d); font: 700 15px/1.2 var(--f-sans); cursor: pointer; }
.q-tabs button[aria-pressed="true"] { background: var(--accent); box-shadow: none; color: var(--ink); }
.q-stack { display: grid; }
.q-stack img { grid-area: 1 / 1; opacity: 0; transition: opacity .35s var(--out); }
.q-stack img.is-on { opacity: 1; }
.q-seg { display: grid; grid-template-columns: minmax(0, 1.4fr) 44px minmax(0, 1fr) 44px minmax(0, 1fr); align-items: center; margin: 28px 0 0; padding: 18px; background: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line-d); }
.q-seg ul { display: grid; gap: 6px; font: 500 12px/1.4 var(--f-mono); color: var(--muted-d); }
.q-seg-arrow { height: 2px; margin: 0 8px; background: var(--accent); }
.q-seg-box { padding: 16px 8px; background: var(--white); color: var(--ink); text-align: center; font-size: 15px; font-weight: 800; }
.q-seg-box--off { position: relative; background: none; box-shadow: inset 0 0 0 1px var(--line-d); color: var(--muted-d); }
.q-seg-box--off::after { content: ''; position: absolute; left: 10%; right: 10%; top: 50%; height: 2px; background: var(--accent); transform-origin: left; transition: transform .7s var(--out) .5s; }
.js .q-seg:not(.is-in) .q-seg-box--off::after { transform: scaleX(0); }

.q-twenty { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 40px; margin: 0; }
.q-twenty > div { display: grid; gap: 16px; }
.q-num { font-weight: 900; font-size: clamp(56px, 7vw, 96px); line-height: .9; letter-spacing: -.05em; color: var(--muted); }
.is-new .q-num { color: var(--ink); }
.q-cells { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.q-cells i { aspect-ratio: 1; border-radius: 50%; background: rgba(10, 10, 10, .1); }
.q-cells .on { background: var(--ink); }
.is-new .q-cells .on { background: var(--accent); box-shadow: 0 0 0 1.5px var(--ink); }
/* the result plays in front of the reader: the same three dots as in 2023 are lit, then the
   number counts from 15 to 60 and nine more light up exactly as it passes each 5%; a slow
   wave keeps them alive */
.has-case-motion .q-twenty:not(.is-in) .q-cells .on { background: rgba(10, 10, 10, .1); box-shadow: none; }
.q-twenty.is-in .q-cells .on { animation: q-dot .4s var(--out) both; animation-delay: calc(var(--n) * 130ms); }
.q-twenty.is-in .is-new .q-cells .on { animation: q-lit .45s var(--out) both, q-wave 6s ease-in-out infinite; animation-delay: var(--d), calc(2.4s + var(--n) * 90ms); }
@keyframes q-dot { from { background: rgba(10, 10, 10, .1); transform: scale(.55); } }
@keyframes q-lit { 0% { background: rgba(10, 10, 10, .1); box-shadow: none; transform: scale(.55); } 60% { transform: scale(1.16); } 100% { transform: none; } }
@keyframes q-wave { 0%, 14%, 100% { transform: none; } 7% { transform: scale(1.12); } }
.q-twenty figcaption { grid-column: 1 / -1; font: 500 11px/1.4 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.q-saving { padding-top: 0; }

@media (max-width: 1100px) {
    .q-grid { grid-template-columns: 1fr; gap: 28px; }
    /* without a side column the route can't stay beside the text, so it stands at the start of the chapter */
    .q-stick { position: static; height: 340px; min-height: 0; max-height: none; }
    .q-step, .q-step:last-child { min-height: 0; }
    .q-steps { gap: 56px; }
}
@media (max-width: 700px) {
    .q-path { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .q-path li { min-height: 132px; }
    .q-seg { grid-template-columns: 1fr; gap: 10px; }
    .q-seg-arrow { width: 2px; height: 16px; margin: 0 auto; }
}
