/* ============================================================================
   TESTKAV SKILLS — HOME · «تست‌کاو چالش» v3 (introduction band) — ch-075; ch-084: one link to /challenges/ under the tiles
   A sibling of the hero with its own colour world: deep turquoise night («فیروزه‌ای تیره») with the brand amber as the
   light — the turquoise-and-gold of Persian tilework, and the same colour as the «آزمون‌های ماک» card of the menu.
   Copy (start side): a kicker chip, a two-line title whose second line follows the challenge on screen, one line and
   no tiles (ch-095 v2.3). The visual is a live
   "challenge console" that solves one sample challenge per kind. Same in both themes; every rule is scoped to .tkch;
   motion is driven by home-challenge.js and respects prefers-reduced-motion.
   Palette: change the --tkch-* tokens below to re-colour the whole band.
   ============================================================================ */
.tkch{--tkch-bg-a:#0b464d;--tkch-bg-b:#08363e;--tkch-bg-c:#05282f;              /* the band, top → bottom */
  --tkch-glow-1:rgba(45,212,191,.3);--tkch-glow-2:rgba(34,211,238,.1);           /* corner glows: top-start, bottom-end */
  --tkch-orb-a:45,212,191;--tkch-orb-b:34,211,238;                               /* the two drifting orbs (rgb) */
  --tkch-panel-a:rgba(4,40,46,.9);--tkch-panel-b:rgba(2,24,29,.96);--tkch-term:#021619;   /* the console */
  --tkch-tq:#5eead4;--tkch-tq-rgb:94,234,212;                                     /* turquoise: kicker, active tile */
  --tkch-ink:#effbf9;--tkch-soft:rgba(239,251,249,.76);--tkch-faint:rgba(239,251,249,.52);
  --tkch-line:rgba(239,251,249,.12);--tkch-line-strong:rgba(239,251,249,.24);
  --tkch-amber:#ffc218;--tkch-ok:#6ff0b0;--tkch-red:#ff8a80;
  --tkch-mono:'JetBrains Mono','SF Mono',ui-monospace,Menlo,Consolas,monospace;
  position:relative;isolation:isolate;overflow:hidden;color:var(--tkch-ink);
  background:
    radial-gradient(1100px 640px at 90% 6%,var(--tkch-glow-1),transparent 62%),
    radial-gradient(820px 560px at 4% 100%,var(--tkch-glow-2),transparent 60%),
    linear-gradient(180deg,var(--tkch-bg-a) 0%,var(--tkch-bg-b) 52%,var(--tkch-bg-c) 100%);
  padding:clamp(52px,5.8vw,88px) 0 clamp(56px,6vw,92px)}
/* Other ready-made palettes — paste one AFTER the rule above (later tokens win):
   نیلی (indigo, before ch-075):
   .tkch{--tkch-bg-a:#1b2166;--tkch-bg-b:#131849;--tkch-bg-c:#0d1139;--tkch-glow-1:rgba(139,123,255,.36);--tkch-glow-2:rgba(255,194,24,.2);
     --tkch-orb-a:139,123,255;--tkch-orb-b:63,123,255;--tkch-panel-a:rgba(19,24,74,.92);--tkch-panel-b:rgba(9,12,44,.97);--tkch-term:#070a26;
     --tkch-tq:#a99bff;--tkch-tq-rgb:169,155,255}
   ذغالی (charcoal, like the hero):
   .tkch{--tkch-bg-a:#1d1f25;--tkch-bg-b:#16181d;--tkch-bg-c:#111216;--tkch-glow-1:rgba(255,194,24,.14);--tkch-glow-2:rgba(255,194,24,.1);
     --tkch-orb-a:255,194,24;--tkch-orb-b:255,157,60;--tkch-panel-a:rgba(28,30,36,.94);--tkch-panel-b:rgba(18,19,23,.98);--tkch-term:#0d0e11;
     --tkch-tq:#ffd45a;--tkch-tq-rgb:255,212,90}
*/
/* ambient: a faint lab grid and two slow orbs */
.tkch-sky{position:absolute;inset:0;z-index:-1;pointer-events:none;overflow:hidden}
.tkch-sky::before{content:"";position:absolute;inset:0;
  background:radial-gradient(rgba(247,246,255,.14) 1px,transparent 1.5px) 0 0/30px 30px;opacity:.45;
  -webkit-mask-image:radial-gradient(70% 70% at 50% 50%,#000 30%,transparent 100%);mask-image:radial-gradient(70% 70% at 50% 50%,#000 30%,transparent 100%)}
.tkch-orb{position:absolute;border-radius:50%;will-change:transform}
.tkch-orb--a{left:-6%;top:-10%;width:min(760px,70vw);aspect-ratio:1;
  background:radial-gradient(closest-side,rgba(var(--tkch-orb-a),.42),rgba(var(--tkch-orb-a),.12) 45%,transparent 72%);animation:tkch-drift-a 26s ease-in-out infinite alternate}
.tkch-orb--b{right:-8%;bottom:-30%;width:min(640px,60vw);aspect-ratio:1;
  background:radial-gradient(closest-side,rgba(var(--tkch-orb-b),.3),rgba(var(--tkch-orb-b),.08) 45%,transparent 72%);animation:tkch-drift-b 32s ease-in-out infinite alternate}
@keyframes tkch-drift-a{to{transform:translate(9%,12%)}}
@keyframes tkch-drift-b{to{transform:translate(-10%,-8%)}}

.tkch-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:0 clamp(32px,5vw,80px);align-items:center}

/* ---------- copy ---------- */
.tkch-kicker{display:inline-flex;align-items:center;gap:9px;margin:0;padding:6px 14px 6px 13px;border-radius:999px;
  border:1px solid rgba(var(--tkch-tq-rgb),.34);background:rgba(var(--tkch-tq-rgb),.08);
  font-family:var(--tk-font-heading);font-size:13.5px;font-weight:700;line-height:1.5;color:var(--tkch-tq)}
.tkch-kicker__dot{position:relative;flex:none;width:8px;height:8px;border-radius:50%;background:var(--tkch-tq);box-shadow:0 0 10px rgba(var(--tkch-tq-rgb),.8)}
.tkch-kicker__dot::after{content:"";position:absolute;inset:-4px;border-radius:50%;border:1px solid rgba(var(--tkch-tq-rgb),.6);animation:tkch-ping 2.2s var(--tk-ease) infinite}
@keyframes tkch-ping{0%{transform:scale(.6);opacity:1}100%{transform:scale(1.9);opacity:0}}
.tkch .tkch-title{margin:20px 0 0;font-family:var(--tk-font-heading);font-weight:950;font-size:clamp(32px,3.6vw,52px);line-height:1.45;letter-spacing:0;color:var(--tkch-ink)}
.tkch-title__a,.tkch-title__b{display:block}
.tkch-title__a{font-size:.8em;font-weight:950;line-height:1.5}   /* خط ثابت کوچک‌تر ولی هم‌وزن؛ تأکید روی عبارت طلایی */
.tkch-word-wrap{display:inline-block;vertical-align:bottom;overflow:hidden;line-height:inherit}
.tkch-word{display:inline-block;color:var(--tkch-amber);white-space:nowrap;
  background:linear-gradient(var(--tkch-amber),var(--tkch-amber)) no-repeat 0 92%/100% 3px;padding-bottom:2px;
  transition:transform .32s var(--tk-ease),opacity .32s var(--tk-ease)}
.tkch-word.is-out{transform:translateY(-.55em);opacity:0}
.tkch-word.is-in{transform:translateY(.55em);opacity:0;transition:none}
.tkch-lede{max-width:46ch;margin:14px 0 0;font-size:clamp(16px,1.3vw,19px);font-weight:700;line-height:1.85;color:var(--tkch-soft)}

/* ch-084: the one link of the band, to the «چالش‌های عملی» page (/challenges/) */
.tkch-go{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:52px;margin-top:26px;padding:0 26px;border-radius:999px;
  font-family:inherit;font-size:15px;font-weight:800;line-height:1;color:#191307;text-decoration:none;white-space:nowrap;background:linear-gradient(180deg,#ffd75a,#f3b705);
  box-shadow:0 14px 34px -14px rgba(255,194,24,.7),inset 0 1px 0 rgba(255,255,255,.5);transition:transform .2s var(--tk-ease),box-shadow .2s var(--tk-ease)}
.tkch-go svg{width:18px;height:18px;flex:none}
.tkch-go:hover{transform:translateY(-1px);box-shadow:0 18px 40px -14px rgba(255,194,24,.85),inset 0 1px 0 rgba(255,255,255,.55)}
.tkch-go:focus-visible{outline:2px solid var(--tkch-tq);outline-offset:3px}

/* the hero's trust row, for the whole band */
.tkch-trust{grid-column:1 / -1;display:flex;flex-wrap:wrap;gap:10px 28px;margin:clamp(10px,1.6vw,22px) 0 0;padding:22px 0 0;list-style:none;border-top:1px solid var(--tkch-line)}
.tkch-trust li{display:inline-flex;align-items:center;gap:8px;font-size:13.5px;font-weight:600;color:var(--tkch-soft)}
.tkch-trust svg{width:15px;height:15px;flex:none;color:var(--tkch-amber)}

/* ---------- the console ---------- */
.tkch-visual{position:relative;margin:0;min-width:0;perspective:1400px}
.tkch-visual::before{content:"";position:absolute;z-index:-1;inset:-8% -4%;pointer-events:none;
  background:radial-gradient(60% 55% at 50% 45%,rgba(var(--tkch-orb-a),.34),transparent 70%)}
.tkch-console{position:relative;max-width:600px;margin-inline:auto;border-radius:18px;
  background:linear-gradient(180deg,var(--tkch-panel-a) 0%,var(--tkch-panel-b) 100%);border:1px solid rgba(247,246,255,.16);
  box-shadow:0 60px 120px -44px rgba(3,5,30,.95),0 0 0 1px rgba(0,0,0,.35),inset 0 1px 0 rgba(255,255,255,.1);
  transform:rotateX(var(--tkch-rx,0deg)) rotateY(var(--tkch-ry,0deg));transform-style:preserve-3d;transition:transform .45s var(--tk-ease)}
.tkch-console::before{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;
  background:radial-gradient(60% 40% at 80% 0%,rgba(var(--tkch-orb-a),.16),transparent 70%)}
.tkch-console__bar{display:flex;align-items:center;gap:12px;padding:14px 18px;border-bottom:1px solid var(--tkch-line);border-radius:18px 18px 0 0;background:rgba(247,246,255,.04)}
.tkch-dots{display:flex;gap:6px;flex:none}
.tkch-dots i{width:10px;height:10px;border-radius:50%;background:rgba(247,246,255,.14)}
.tkch-dots i:first-child{background:#ff5f57}.tkch-dots i:nth-child(2){background:#febc2e}.tkch-dots i:last-child{background:#28c840}
.tkch-console__name{flex:1;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-family:var(--tk-font-heading);font-size:15.5px;font-weight:800;color:var(--tkch-ink)}
.tkch-console__cat{flex:none;height:24px;padding:0 10px;border-radius:999px;border:1px solid rgba(255,194,24,.45);color:var(--tkch-amber);font-size:12px;font-weight:700;line-height:22px}
.tkch-console__body{padding:18px 18px 16px}

.tkch-steps{position:relative;margin:0 0 16px;padding:0;list-style:none;display:grid;gap:8px}
.tkch-steps li{position:relative;display:flex;align-items:center;gap:12px;font-size:13.5px;line-height:1.6;color:var(--tkch-faint);transition:color .35s var(--tk-ease)}
.tkch-steps li i{flex:none;display:grid;place-items:center;width:26px;height:26px;border-radius:50%;border:1px solid var(--tkch-line-strong);
  font-style:normal;font-size:12px;font-weight:800;color:var(--tkch-faint);background:transparent;transition:background .35s var(--tk-ease),border-color .35s var(--tk-ease),color .35s var(--tk-ease),box-shadow .35s var(--tk-ease)}
.tkch-steps li + li::before{content:"";position:absolute;inset-inline-start:12.5px;top:-9px;width:1px;height:10px;background:var(--tkch-line-strong)}
.tkch-steps li.is-done{color:var(--tkch-soft)}
.tkch-steps li.is-done i{background:var(--tkch-amber);border-color:var(--tkch-amber);color:#181a1d}
.tkch-steps li.is-now{color:var(--tkch-ink)}
.tkch-steps li.is-now i{border-color:var(--tkch-amber);color:var(--tkch-amber);box-shadow:0 0 0 4px rgba(255,194,24,.16);animation:tkch-ring 1.6s var(--tk-ease) infinite}
@keyframes tkch-ring{0%,100%{box-shadow:0 0 0 3px rgba(255,194,24,.14)}50%{box-shadow:0 0 0 7px rgba(255,194,24,.04)}}

.tkch-term{border-radius:10px;padding:12px 14px;background:var(--tkch-term);border:1px solid var(--tkch-line);font-family:var(--tkch-mono);font-size:13px;line-height:1.7;text-align:left;
  min-height:66px;box-sizing:border-box}
.tkch-term__line{display:flex;align-items:center;gap:8px;color:var(--tkch-ink);white-space:nowrap;overflow:hidden}
.tkch-term__ps{flex:none;color:var(--tkch-amber);font-weight:700}
.tkch-term__line code{font:inherit;color:inherit;min-width:0;overflow:hidden;text-overflow:ellipsis}
.tkch-caret{flex:none;width:8px;height:1.15em;background:var(--tkch-amber);opacity:.9;animation:tkch-blink 1s steps(2,start) infinite}
@keyframes tkch-blink{to{visibility:hidden}}
.tkch-term__out{margin-top:2px;color:var(--tkch-ok);font-weight:700;letter-spacing:.02em}
.tkch-term__out:empty{display:none}

.tkch-flag{display:flex;align-items:center;gap:10px;margin-top:12px;padding:10px 12px;border-radius:10px;border:1px dashed var(--tkch-line-strong);
  font-size:13px;color:var(--tkch-soft);transition:border-color .3s var(--tk-ease),background .3s var(--tk-ease)}
.tkch-flag__k{flex:none;font-weight:700;color:var(--tkch-faint)}
.tkch-flag__v{flex:1;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-family:var(--tkch-mono);font-size:13px;color:var(--tkch-ink);text-align:left}
.tkch-flag__v.is-fa{font-family:var(--tk-font-heading,inherit);font-size:14px;font-weight:800}   /* پاسخ فارسی (۹۲ از ۱۰۰) با قلم متن، نه تک‌فاصله */
.tkch-flag__ok{flex:none;display:inline-flex;align-items:center;gap:5px;color:var(--tkch-ok);font-weight:700;opacity:0;transform:translateX(-6px);transition:opacity .3s var(--tk-ease),transform .3s var(--tk-ease)}
.tkch-flag__ok svg{width:14px;height:14px}
.tkch-flag.is-ok{border-style:solid;border-color:rgba(95,227,161,.5);background:rgba(95,227,161,.08)}
.tkch-flag.is-ok .tkch-flag__ok{opacity:1;transform:none}

.tkch-console__foot{display:flex;align-items:center;gap:18px;padding:12px 18px 14px;border-top:1px solid var(--tkch-line);font-size:13px;color:var(--tkch-soft)}
.tkch-pts b{display:inline-block;font-family:var(--tk-font-heading);font-size:19px;font-weight:900;color:var(--tkch-amber);margin-inline-end:2px}
.tkch-rank{display:inline-flex;align-items:center;gap:6px}
.tkch-rank b{font-family:var(--tk-font-heading);font-size:16px;font-weight:900;color:var(--tkch-ink);display:inline-block;min-width:1.3em;text-align:center}
.tkch-rank__up{display:inline-block;height:20px;padding:0 7px;border-radius:999px;background:rgba(95,227,161,.14);color:var(--tkch-ok);
  font-style:normal;font-size:11px;font-weight:800;line-height:20px;white-space:nowrap;opacity:1;transition:opacity .3s var(--tk-ease)}
.tkch-rank__up.is-off{opacity:0}
.tkch-fb{margin-inline-start:auto;height:24px;padding:0 10px;border-radius:999px;background:rgba(255,122,114,.14);border:1px solid rgba(255,122,114,.5);color:var(--tkch-red);font-size:11.5px;font-weight:800;line-height:22px;letter-spacing:.02em;white-space:nowrap}
.tkch-fb[hidden]{display:none}
/* the points fly up once when a flag is accepted */
.tkch-pts b.is-pop{animation:tkch-pop .9s var(--tk-ease)}
@keyframes tkch-pop{0%{transform:translateY(8px);opacity:0}30%{transform:translateY(-3px);opacity:1}100%{transform:none}}
.tkch-rank b.is-swap{animation:tkch-swap .5s var(--tk-ease)}
@keyframes tkch-swap{0%{transform:translateY(-.6em);opacity:0}100%{transform:none;opacity:1}}
.tkch-toast{position:absolute;inset-inline-start:26px;bottom:22px;font-family:var(--tk-font-heading);font-size:28px;font-weight:900;color:var(--tkch-amber);
  text-shadow:0 0 18px rgba(255,194,24,.7),0 2px 10px rgba(0,0,0,.5);pointer-events:none;opacity:0}
.tkch-toast[hidden]{display:none}
.tkch-toast.is-fly{animation:tkch-fly 1.7s linear forwards}
@keyframes tkch-fly{0%{opacity:0;transform:translateY(6px) scale(.9)}12%{opacity:1;transform:translateY(-8px) scale(1.08)}70%{opacity:1;transform:translateY(-52px) scale(1)}100%{opacity:0;transform:translateY(-88px) scale(1)}}
/* scenario change: the whole card crossfades */
.tkch-console__body,.tkch-console__bar,.tkch-console__foot{transition:opacity .35s var(--tk-ease)}
.tkch-console.is-swapping .tkch-console__body,.tkch-console.is-swapping .tkch-console__bar,.tkch-console.is-swapping .tkch-console__foot{opacity:0}

/* ---------- entrance (home-challenge.js adds .is-in when the band scrolls into view) ---------- */
.tkch.is-armed .tkch-kicker,.tkch.is-armed .tkch-title,.tkch.is-armed .tkch-lede,.tkch.is-armed .tkch-trust{opacity:0;transform:translateY(14px)}
.tkch.is-armed .tkch-console{opacity:0;transform:translateY(26px) scale(.98)}
.tkch.is-in .tkch-kicker,.tkch.is-in .tkch-title,.tkch.is-in .tkch-lede,.tkch.is-in .tkch-trust{opacity:1;transform:none;transition:opacity .7s var(--tk-ease),transform .7s var(--tk-ease)}
.tkch.is-in .tkch-title{transition-delay:.08s}.tkch.is-in .tkch-lede{transition-delay:.16s}.tkch.is-in .tkch-trust{transition-delay:.5s}
.tkch.is-in .tkch-console{opacity:1;transform:rotateX(var(--tkch-rx,0deg)) rotateY(var(--tkch-ry,0deg));transition:opacity .8s var(--tk-ease) .15s,transform .9s var(--tk-ease) .15s}
.tkch.is-live .tkch-console{transition:transform .45s var(--tk-ease)}

@media (prefers-reduced-motion:reduce){
  .tkch-orb,.tkch-steps li.is-now i,.tkch-caret,.tkch-pts b.is-pop,.tkch-rank b.is-swap,.tkch-toast.is-fly,.tkch-kicker__dot::after{animation:none}
  .tkch *,.tkch *::after,.tkch *::before{transition:none!important}
  .tkch-console{transform:none!important}
}

/* ---------- responsive ---------- */
@media (max-width:1180px){
  .tkch-grid{grid-template-columns:minmax(0,1fr) minmax(0,.94fr)}
}
@media (max-width:900px){
  .tkch-grid{grid-template-columns:minmax(0,1fr);gap:40px 0}
  .tkch-copy{text-align:center}
  .tkch-lede{margin-inline:auto}
  .tkch-console{max-width:600px}
  .tkch-trust{justify-content:center}
}
@media (max-width:640px){
  .tkch{padding:48px 0 52px}
  .tkch .tkch-title{margin-top:16px;font-size:clamp(34px,11.2vw,46px);line-height:1.38}   /* عبارت‌ها ≤ ۸em → در ۳۲۰ تا ۴۳۰ پیکسل یک‌خطی */
  .tkch-title__a{font-size:.74em}
  .tkch-word{padding-bottom:4px;background-size:100% 4px;background-position:0 94%}
  .tkch-lede{margin-top:12px;font-size:17px}
  .tkch-trust{display:none}
  .tkch-go{width:100%;margin-top:22px}
  .tkch-console__body{padding:14px 14px 12px}
  .tkch-console__bar,.tkch-console__foot{padding-inline:14px}
  /* the command may wrap on a phone instead of being cut; two lines are reserved so the console does not jump */
  .tkch-term{font-size:12px;min-height:90px}
  .tkch-term__line{display:block;white-space:pre-wrap;overflow-wrap:anywhere;overflow:visible}
  .tkch-term__line code{display:inline;overflow:visible;text-overflow:clip}
  .tkch-term__ps{display:inline-block;margin-inline-end:6px}
  .tkch-caret{display:inline-block;vertical-align:-.15em;margin-inline-start:4px}
  .tkch-console__foot{gap:14px;flex-wrap:wrap}
  .tkch-toast{font-size:22px}
}
@media (hover:none){
}
