/* "How it works" on every tool page (v1.0.0): a living scene beside the steps, each step lights up as the scene reaches it. */
.tm { --gold: 255, 211, 107; --cyan: 56, 217, 255; --purple: 192, 140, 255; --green: 85, 232, 170; --red: 255, 107, 105; --blue: 110, 160, 255; --tone: var(--cyan); padding: 10px 0 60px; }
.tm-tone-gold { --tone: var(--gold); } .tm-tone-purple { --tone: var(--purple); } .tm-tone-green { --tone: var(--green); } .tm-tone-red { --tone: var(--red); } .tm-tone-blue { --tone: var(--blue); } .tm-tone-cyan { --tone: var(--cyan); }
.tm-card { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 30px; align-items: center; padding: 22px; border-radius: 30px; background: linear-gradient(150deg, rgba(var(--tone), .08), rgba(10, 13, 23, .96) 45%); border: 1px solid rgba(255, 255, 255, .09); box-shadow: 0 30px 80px rgba(0, 0, 0, .4); }
.tm-stage { position: relative; border-radius: 22px; overflow: hidden; background: radial-gradient(ellipse at 50% 40%, rgba(var(--tone), .12), transparent 60%), linear-gradient(180deg, #0b0e1b, #070910); border: 1px solid rgba(255, 255, 255, .08); }
.tm-stage::after { content: ""; position: absolute; inset: 40px 0 0; background-image: linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px); background-size: 32px 32px; -webkit-mask: radial-gradient(ellipse at center, #000 30%, transparent 80%); mask: radial-gradient(ellipse at center, #000 30%, transparent 80%); pointer-events: none; }
.tm-stage-bar { position: relative; z-index: 1; display: flex; align-items: center; gap: 6px; padding: 11px 14px; border-bottom: 1px solid rgba(255, 255, 255, .06); background: rgba(255, 255, 255, .02); }
.tm-stage-bar > i { width: 10px; height: 10px; border-radius: 50%; background: #ff5f57; } .tm-stage-bar > i:nth-child(2) { background: #febc2e; } .tm-stage-bar > i:nth-child(3) { background: #28c840; }
.tm-stage-bar span { margin-inline-start: 8px; font-size: 12px; font-weight: 700; color: #8d89a0; }
.tm-live { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 6px; font: 800 10px/1 system-ui, sans-serif; letter-spacing: .1em; color: rgb(var(--green)); }
.tm-live em { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: tmBlink 1.2s ease-in-out infinite; }
.tm-canvas { position: relative; z-index: 1; aspect-ratio: 640 / 400; }
.tm-canvas svg { display: block; width: 100%; height: 100%; }
.tm-copy h2 { margin: 12px 0 10px; font-size: clamp(22px, 2.6vw, 30px); line-height: 1.3; }
.tm-copy > p { margin: 0 0 18px; color: #aaa5b8; line-height: 1.85; font-size: 14.5px; }
.tm-kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; color: rgb(var(--tone)); }
.tm-kicker::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: currentColor; }
.tm-steps { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 8px; }
.tm-steps li { position: relative; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 12px; padding: 12px 14px 15px; border-radius: 16px; background: rgba(255, 255, 255, .025); border: 1px solid rgba(255, 255, 255, .06); transition: background .35s, border-color .35s, transform .35s; }
.tm-steps .tm-n { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; font: 800 12px/1 ui-monospace, monospace; color: #8d89a0; background: rgba(255, 255, 255, .05); transition: background .35s, color .35s; }
.tm-steps b { font-size: 14px; font-weight: 600; color: #cfcbd8; line-height: 1.55; transition: color .35s; }
.tm-bar { position: absolute; left: 14px; right: 14px; bottom: 6px; height: 2px; border-radius: 2px; background: rgba(255, 255, 255, .05); overflow: hidden; }
.tm-bar em { position: absolute; inset: 0; background: rgb(var(--tone)); transform: scaleX(0); transform-origin: left; }
[dir="rtl"] .tm-bar em { transform-origin: right; }
.tm-steps li.is-on { background: rgba(var(--tone), .1); border-color: rgba(var(--tone), .4); transform: translateX(var(--tm-shift, 4px)); }
[dir="rtl"] .tm-steps li.is-on { --tm-shift: -4px; }
.tm-steps li.is-on .tm-n { color: #0b0c12; background: rgb(var(--tone)); }
.tm-steps li.is-on b { color: #fff; }
.tm-steps li.is-done .tm-n { color: rgb(var(--tone)); background: rgba(var(--tone), .14); }
.tm-steps li.is-done .tm-bar em { transform: scaleX(1); }
.tm-dev { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 16px; text-decoration: none; color: #fff; background: rgba(255, 255, 255, .03); border: 1px solid rgba(255, 255, 255, .08); transition: background .2s, border-color .2s; }
.tm-dev:hover { background: rgba(var(--gold), .08); border-color: rgba(var(--gold), .35); }
.tm-dev img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(var(--gold), .6); }
.tm-dev span { display: grid; gap: 2px; flex: 1; } .tm-dev small { font-size: 11px; color: #8d89a0; } .tm-dev strong { font-size: 14px; }
.tm-dev i { font-style: normal; color: rgb(var(--gold)); }

/* the SVG scene vocabulary */
.tm svg text { font-family: "IBM Plex Sans Arabic", Inter, "Segoe UI", Tahoma, sans-serif; }
.tm svg .mono { font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; }
.tm.is-still .tm-live em { animation: none; }
@media (prefers-reduced-motion: reduce) { .tm-live em { animation: none; } }
@keyframes tmBlink { 50% { opacity: .2; } }

@media (max-width: 980px) {
    .tm-card { grid-template-columns: 1fr; gap: 20px; padding: 14px; border-radius: 24px; }
}
@media print { .tm { display: none !important; } }
