/* P3 /sample tech layer. Every rule is gated by ts-* classes set by tech-sample.js; without them subpages.css stays as is. */
@keyframes ts-fade{from{opacity:0}to{opacity:1}}
@keyframes ts-rise{from{opacity:0;transform:scaleY(0)}to{opacity:1;transform:none}}
@keyframes ts-ping{0%{opacity:.9;transform:scale(1)}100%{opacity:0;transform:scale(3.2)}}
@keyframes ts-blink{50%{opacity:0}}

/* 1. See the edit: the current wording stays readable; the divider reveals the proposed wording. */
.ts-edit>div:last-child{position:relative}
.ts-edit .after-copy{clip-path:inset(-8px calc(100% - var(--cutpx,100%)) -8px -8px)}
.ts-handle{display:none}
.ts-edit .ts-handle{display:block;position:absolute;left:0;top:0;width:44px;margin-left:-22px;touch-action:pan-y;cursor:ew-resize;outline:0}
.ts-handle::before{content:'';position:absolute;left:21px;top:-8px;bottom:-8px;width:2px;background:var(--ink)}
.ts-handle::after{content:'';position:absolute;left:50%;top:50%;width:18px;height:18px;margin:-9px 0 0 -9px;border-radius:50%;background:var(--accent);box-shadow:0 0 0 2px var(--ink),0 0 0 6px #fffefae6}
.ts-handle:focus-visible::after{box-shadow:0 0 0 2px var(--ink),0 0 0 5px #fffefa,0 0 0 7px var(--ink)}

/* 2. Baseline bento: one tall cell for the zero, two smaller cells beside it. */
.counts.ts-bento{grid-template-columns:1.15fr 1fr;gap:16px;border:0;padding:0}
.counts.ts-bento>div{background:var(--surface);border:1px solid var(--line);border-radius:8px;padding:24px 26px}
.counts.ts-bento>div:first-child{grid-row:span 2;display:flex;flex-direction:column}
.counts.ts-bento>div:first-child b{font-size:84px}
.counts.ts-bento dd{display:flex;align-items:center;justify-content:space-between;gap:20px}
.ts-art{display:block;flex:none;overflow:visible;opacity:0}
.ts-in .ts-art{opacity:1}
.ts-ring{width:132px;height:132px}
.ts-ring .sg{fill:none;stroke:#bac9c5;stroke-width:7;stroke-linecap:butt;opacity:.85}
.ts-ring .sg.p{stroke-dasharray:3 2.4}
.ts-ticks{width:150px;height:38px}
.ts-ticks .tk{fill:#bac9c5;transform-box:fill-box;transform-origin:50% 100%}
.ts-ticks .tk.e{fill:none;stroke:#a4b9b1;stroke-width:1}
.ts-ticks .tk.p{fill:none;stroke:#bac9c5;stroke-width:1.5;stroke-dasharray:3 2}
.ts-run{width:130px;height:26px}
.ts-run .rl{stroke:#ffffff40;stroke-width:1.5}
.ts-run .rd{fill:var(--accent)}
.ts-run .rr{fill:none;stroke:var(--accent);stroke-width:1.5;opacity:0;transform-box:fill-box;transform-origin:center}
.ts-in .ts-ring .sg{animation:ts-fade .45s calc(var(--i)*70ms) both}
.ts-in .ts-ticks .tk{animation:ts-rise .5s cubic-bezier(.2,.75,.25,1) calc(var(--i)*55ms) both}
.ts-in .ts-run .rr{animation:ts-ping 1.6s cubic-bezier(.2,.75,.25,1) .5s 2}

/* 3. The selected question sits in an input frame; the record streams in and product names light up. */
.ts-mx .mxi-qtext{border:1px solid var(--line);border-radius:24px;padding:10px 18px;margin-top:10px;background:#0c2428a6}
.ts-mx .ts-w{animation:ts-fade .3s var(--d,0ms) both}
.ts-mx .ts-nm{color:var(--accent)}
.ts-typing .mxi-qtext::after{content:'';display:inline-block;width:2px;height:1em;margin-left:3px;vertical-align:-2px;background:var(--accent);animation:ts-blink .9s steps(1) infinite}

/* 4. Bar race: the zero row's empty track lights once the race ends. */
.bars li.us .bt{position:relative}
.bars.ts-done li.us .bt::after{content:'';position:absolute;inset:0;border:1px solid var(--accent);border-radius:10px;animation:ts-fade .5s both}

/* Tall cell: the zero sits inside the ring, centred, so the card has no empty side. */
@media(min-width:601px){
 .counts.ts-bento>div:first-child dd{flex:1;display:grid;grid-template-columns:1fr;place-items:center;margin:16px 0}
 .counts.ts-bento>div:first-child dd>*{grid-area:1/1}
 .counts.ts-bento>div:first-child .ts-ring{width:clamp(170px,18vw,250px);height:clamp(170px,18vw,250px)}
}
@media(max-width:600px){
 .counts.ts-bento{grid-template-columns:1fr;gap:12px}
 .counts.ts-bento>div,.counts.ts-bento>div+div{display:block;padding:18px 18px}
 .counts.ts-bento>div:first-child{grid-row:auto;display:block}
 .counts.ts-bento>div:first-child b{font-size:42px}
 .counts.ts-bento dd{margin:10px 0 8px}
 .counts.ts-bento>div:first-child dd{justify-content:space-between}
 .ts-ring{width:64px;height:64px}
 .ts-ticks{width:104px;height:28px}
 .ts-run{width:72px;height:20px}
 .ts-mx .mxi-qtext{border-radius:18px;padding:9px 14px}
}
