/*
 * A model's try: one glass box. At its head the try's name and the drills as small tabs; the steps as chips; then the
 * round (its progress and dots, the question) or the result; one height from the first frame (the tallest question
 * kind holds it), so the page never jumps as questions change.
 */

.drl { display: grid; align-content: start; gap: 16px; min-width: 0; padding: clamp(16px, 2.2vw, 26px); border-radius: var(--radius-card); background: var(--glass-strong); border: 1px solid var(--edge); box-shadow: var(--shadow-tile); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); scroll-margin-top: 104px; }
.drl-head { display: grid; gap: 12px; }
.drl-name { display: inline-flex; align-items: center; gap: 8px; color: var(--accent-ink); font-size: var(--text-label); line-height: var(--lh-label); font-weight: 800; }
.drl-name::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px var(--success-soft); }
.drl-steps { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -4px; padding: 2px 4px 4px; }
.drl-steps::-webkit-scrollbar { display: none; }
/* the chips that run past the box fade at its end edge (the row scrolls) */
.drl-steps { mask-image: linear-gradient(90deg, transparent, var(--fg) 28px); -webkit-mask-image: linear-gradient(90deg, transparent, var(--fg) 28px); }
.drl-steps .chip { flex: none; white-space: nowrap; }
.drl-steps .chip b { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: color-mix(in srgb, var(--fg) 8%, transparent); font-size: 11px; }
.drl-body { display: grid; min-height: clamp(470px, 46vw, 540px); align-content: start; }
.drl-wait { color: var(--fg-muted); }

/* the round */
.drl-round { display: grid; gap: 14px; align-content: start; }
.drl-progress { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; color: var(--fg-muted); font-size: var(--text-label); font-weight: 700; }
.drl-dots { display: flex; gap: 5px; }
.drl-dots i { width: 10px; height: 10px; border-radius: 50%; background: color-mix(in srgb, var(--fg) 12%, transparent); transition: background-color var(--d-default) ease, scale var(--d-press) var(--ease-out); }
.drl-dots i.now { background: var(--accent); scale: 1.15; }
.drl-dots i.ok { background: var(--success); }
.drl-dots i.no { background: var(--danger); }
.drl-result { display: grid; justify-items: start; gap: 10px; padding: clamp(18px, 2.4vw, 28px); border-radius: var(--radius-tile); background: var(--surface); border: 1px solid var(--line); animation: drl-in 300ms var(--ease-out); }
@keyframes drl-in { from { opacity: 0; translate: 0 8px; filter: blur(3px); } }
.drl-score { font-size: var(--text-display); line-height: var(--lh-display); font-weight: 800; }
.drl-result p { font-size: var(--text-callout); line-height: var(--lh-callout); }
.drl-advice { color: var(--fg-muted); }
.drl-acts { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 6px; }

/* the chord on the screen's keys */
.drl-chord { display: grid; gap: 14px; align-content: start; }
.drl-ask { min-height: calc(var(--lh-title-3) * 2); font-size: var(--text-title-3); line-height: var(--lh-title-3); font-weight: 800; text-wrap: balance; }
.drl-cgrid { display: grid; gap: 12px; align-items: stretch; }
@media (min-width: 640px) { .drl-cgrid { grid-template-columns: minmax(130px, 0.35fr) minmax(0, 1fr); } }
.drl-cstaff { display: grid; place-items: center; min-height: 150px; padding: 8px; border-radius: var(--radius-tile); background: var(--surface); border: 1px solid var(--line); animation: drl-in 260ms var(--ease-out); }
.drl-cstaff svg { width: auto; height: 132px; }
.drl-piano { align-self: center; padding: 10px 10px 8px; border-radius: var(--radius-tile); background: var(--surface-muted); border: 1px solid var(--line); }
.drl-cfoot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.drl-said { flex: 1 1 14rem; min-height: 1.6em; color: var(--fg-muted); font-size: var(--text-callout); font-weight: 700; }
.drl-said.ok { color: var(--success-ink); }
.drl-said.no { color: var(--danger-ink); }
.drl-next.off { visibility: hidden; }
@media (prefers-reduced-motion: reduce) { .drl-result, .drl-cstaff { animation: none; } }
/*
 * «تمرین ها به ترتیب»: a numbered line at the start, a card a drill beside it. A card: its head (how it is played, its
 * name and line, its tags), its body (the three steps at the start, the steps and the tip at the end from 1024 px), its
 * way in. A drill played with buttons wears the success tone on its tag; the line runs from one number to the next.
 */

.dph { padding-block: 0 var(--section); }
.dph-list { display: grid; gap: 14px; }
.dph-item { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; }
.dph-item + .dph-item::before { content: ''; position: absolute; inset-inline-start: 21.5px; inset-block-start: -14px; height: 22px; border-inline-start: 1px dashed var(--line-strong); }
.dph-no { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line-strong); font-size: var(--text-headline); font-weight: 800; }
.dph-item:first-child .dph-no { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.dph-card { display: grid; gap: 16px; padding: clamp(16px, 2vw, 24px); border-radius: var(--radius-card); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-card); }
.dph-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px 14px; align-items: center; }
.dph-ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--surface-muted); color: var(--fg-muted); }
.dph-item.away .dph-ico { background: var(--success-soft); color: var(--success-ink); }
.dph-ico .i { width: 22px; height: 22px; }
.dph-t { display: grid; gap: 2px; }
.dph-t b { font-size: var(--text-title-3); line-height: var(--lh-title-3); font-weight: 800; }
.dph-t > span { color: var(--fg-muted); font-size: var(--text-footnote); line-height: var(--lh-footnote); }
.dph-tags { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
@media (min-width: 768px) { .dph-head { grid-template-columns: auto minmax(0, 1fr) auto; } .dph-tags { grid-column: auto; } }
.dph-tag { padding: 4px 10px; border-radius: var(--radius-pill); background: var(--surface-muted); font-size: var(--text-label); line-height: var(--lh-label); font-weight: 700; white-space: nowrap; }
.dph-tag.away { background: var(--success-soft); color: var(--success-ink); }

.dph-body { display: grid; gap: 16px; }
@media (min-width: 1024px) { .dph-body { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; } }
.dph-how, .dph-steps { display: grid; gap: 8px; align-content: start; }
.dph-how small, .dph-steps small { color: var(--fg-muted); font-size: var(--text-label); font-weight: 800; }
.dph-how ol { display: grid; gap: 6px; }
.dph-how li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start; font-size: var(--text-callout); line-height: var(--lh-callout); }
.dph-how li span { display: grid; place-items: center; width: 24px; height: 24px; margin-top: 2px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); font-size: var(--text-label); font-weight: 800; }
.dph-side { display: grid; gap: 14px; align-content: start; }
.dph-steps ol { display: flex; flex-wrap: wrap; gap: 6px; }
.dph-steps li { display: inline-flex; align-items: center; gap: 6px; padding-block: 4px; padding-inline: 6px 10px; border-radius: var(--radius-pill); background: var(--surface-muted); font-size: var(--text-label); line-height: var(--lh-label); font-weight: 600; }
.dph-steps li b { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--surface); font-size: 10px; }
.dph-tip { display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--radius-tile); background: var(--reward-soft); font-size: var(--text-footnote); line-height: var(--lh-footnote); }
.dph-tip .i { flex: none; width: 18px; height: 18px; margin-top: 2px; color: var(--reward-ink); }
.dph-tip b { color: var(--reward-ink); }

.dph-foot { display: flex; justify-content: flex-end; }
.dph-go { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: var(--radius-pill); background: var(--success-soft); color: var(--success-ink); font-size: var(--text-footnote); font-weight: 800; transition: transform var(--d-press) var(--ease-out); }
.dph-go.quiet { background: var(--surface-muted); color: var(--fg); }
.dph-go:active { transform: scale(0.97); }
.dph-go .i { width: 16px; height: 16px; }
.dph-go .go { transition: translate var(--d-default) var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .dph-go:hover .go { translate: -3px 0; } }

.dph-end { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding: 18px clamp(16px, 2vw, 24px); border-radius: var(--radius-card); background: var(--glass-strong); border: 1px solid var(--edge); }
.dph-end > span { display: inline-flex; align-items: center; gap: 8px; font-size: var(--text-callout); font-weight: 700; }
.dph-end > span .i { width: 20px; height: 20px; color: var(--accent); }
