/* m51 — صفحهٔ اول.
   ۱) گوشی (تا ۶۴۰px): سرصفحه دقیقا یک صفحهٔ آرام است: پرسش بالا، عقربه‌سنج وسط، جستجو پایین (نزدیک شست).
      دو مسیر بعد از آن دیگر دو نوار زرد و آبی نیست، دو کارت آرام روی همان زمینهٔ تیره است.
   ۲) دسکتاپ: ورود نرم متن‌ها، عقربه‌سنج زنده با نشانگر (home-hero.js) و هالهٔ همراه نشانگر. چیزی به صفحه اضافه نشده است.
   همهٔ قاعده‌ها با «html .tk-public-body» تا بر برگه‌های قبلی صفحهٔ اول مقدم باشند. */

/* ---------- دسکتاپ و هر جا نشانگر دقیق هست ---------- */
@media (prefers-reduced-motion: no-preference){
  html .tk-public-body .tkh .tkh-title__q,html .tk-public-body .tkh .tkh-title__a,html .tk-public-body .tkh .tkh-slogan,
  html .tk-public-body .tkh .tkh-search,html .tk-public-body .tkh .tkh-popular,html .tk-public-body .tkh .tkh-visual,html .tk-public-body .tkh .tkh-trust{
    animation:tkh51-in .9s cubic-bezier(.22,1,.36,1) both}
  html .tk-public-body .tkh .tkh-title__a{animation-delay:.08s}
  html .tk-public-body .tkh .tkh-slogan{animation-delay:.18s}
  html .tk-public-body .tkh .tkh-search{animation-delay:.26s}
  html .tk-public-body .tkh .tkh-popular{animation-delay:.34s}
  html .tk-public-body .tkh .tkh-visual{animation-delay:.2s}
  html .tk-public-body .tkh .tkh-trust{animation-delay:.5s}
}
@keyframes tkh51-in{from{opacity:0;transform:translateY(18px)}to{opacity:1;transform:none}}

@media (hover:hover) and (pointer:fine){
  html .tk-public-body .tkh .tkh-gauge{cursor:crosshair}
  html .tk-public-body .tkh .tkh-gauge.is-live .tkh-gauge__arc,html .tk-public-body .tkh .tkh-gauge.is-live .tkh-gauge__needle{transition-duration:.16s;transition-timing-function:ease-out}
  html .tk-public-body .tkh .tkh-gauge__needle circle{transition:r .25s ease,stroke-width .25s ease}
  html .tk-public-body .tkh .tkh-gauge.is-live .tkh-gauge__needle circle{r:18px;stroke-width:5px}
  html .tk-public-body .tkh .tkh-glow{transform:translate3d(var(--tkh-gx,0px),var(--tkh-gy,0px),0);transition:transform .6s cubic-bezier(.22,1,.36,1);will-change:transform}
  html .tk-public-body .tkh .tkh-search{transition:box-shadow .3s ease,transform .3s ease}
  html .tk-public-body .tkh .tkh-search:focus-within{box-shadow:0 0 0 3px rgba(255,194,24,.55);transform:translateY(-1px)}
}

/* بخش‌های مخصوص گوشی در دسکتاپ نیستند */
.tkp,.tkm-go{display:none}

/* ---------- گوشی: طراحی جدا ---------- (۱۴۸px = سربرگ ۷۵ + نوار پایین ۶۹ و کمی هوا)
   صفحهٔ اول مثل خانهٔ یک اپلیکیشن: پرسش، دستهٔ کارت‌های کارنامه که با انگشت ورق می‌خورد، جستجو، و زیرش دسترسی سریع.
   عقربه‌سنج دسکتاپ و دو نوار مسیر در گوشی نمایش داده نمی‌شوند. */
@media (max-width:640px){
  html .tk-public-body .tkh{display:flex;flex-direction:column;box-sizing:border-box;height:calc(100svh - 148px);min-height:460px;padding-top:24px;padding-bottom:24px}
  html .tk-public-body .tkh .tkh-glow{display:none}
  html .tk-public-body .tkh .tkh-grid{display:flex;flex-direction:column;align-items:stretch;gap:0;flex:1 1 0;min-height:0;width:100%;box-sizing:border-box;padding-inline:0}
  html .tk-public-body .tkh .tkh-copy{display:contents}
  html .tk-public-body .tkh .tkh-kicker,html .tk-public-body .tkh .tkh-popular,html .tk-public-body .tkh .tkh-trust,
  html .tk-public-body .tkh .tkh-visual,html .tk-public-body .hpz,html .tk-public-body .pub-marq{display:none}

  html .tk-public-body .tkh .tkh-title{order:1;margin:0;padding-inline:24px;text-align:start;font-size:clamp(34px,10.4vw,46px);line-height:1.25}
  html .tk-public-body .tkh .tkh-title__q{display:block;margin:0 0 4px;font-size:.44em;font-weight:600;letter-spacing:0;color:var(--tkh-soft)}
  html .tk-public-body .tkh .tkh-title__a{margin:0}
  html .tk-public-body .tkh .tkh-word-wrap{display:block}   /* «بلدی؟» همیشه خط خودش را دارد تا با عوض شدن مهارت چیزی جابه‌جا نشود */

  /* چهار خانهٔ پاسخ */
  .tkp{order:2;flex:1 1 0;min-height:0;display:flex;flex-direction:column;align-items:center;padding:24px 24px 24px;box-sizing:border-box}
  .tkp__stage{position:relative;flex:1 1 0;min-height:0;width:100%;display:flex;align-items:center;justify-content:center}
  .tkp__stage::before{content:"";position:absolute;top:50%;left:50%;height:92%;aspect-ratio:1;border:1px solid rgba(244,245,242,.14);transform:translate(-50%,-50%);animation:tkpSpin 50s linear infinite;pointer-events:none}
  @keyframes tkpSpin{to{transform:translate(-50%,-50%) rotate(360deg)}}
  .tkp__grid{position:relative;height:calc(100% - 44px);max-height:264px;max-width:70vw;aspect-ratio:1;display:grid;grid-template-columns:1fr 1fr;gap:12px;transform:rotate(calc(-9deg - var(--sp,0) * 18deg));touch-action:pan-y}
  .tkp__box{position:relative;min-width:0;min-height:0;cursor:pointer;-webkit-tap-highlight-color:transparent;
    transform:translate(calc(var(--ix,0px) + var(--sp,0) * var(--ox,0) * 44px),calc(var(--iy,0px) + var(--sp,0) * var(--oy,0) * 44px)) rotate(var(--ir,0deg));
    transition:transform .85s cubic-bezier(.2,.85,.2,1),opacity .5s}
  .tkp__face{position:relative;width:100%;height:100%;box-sizing:border-box;border:1.5px solid rgba(244,245,242,.34);background:#1c1f24;color:rgba(244,245,242,.6);
    transform:perspective(600px) rotateX(var(--rx,0deg)) rotateY(var(--ry,0deg)) rotate(var(--fr,0deg)) scale(var(--fs,1));
    transition:transform .55s cubic-bezier(.2,1.35,.3,1),background-color .4s,border-color .4s,color .3s}
  .tkp__n{position:absolute;inset-block-start:8px;inset-inline-start:12px;font-size:12px;font-weight:600;line-height:1.5;transition:opacity .3s}
  .tkp__face svg{position:absolute;inset:0;width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:8;stroke-linecap:square}
  .tkp__face path{stroke-dasharray:100;stroke-dashoffset:100;transition:stroke-dashoffset 0s}
  .tkp__box.is-eye .tkp__face{border-color:#f4f5f2;color:#f4f5f2;--fs:1.05}
  .tkp__box.is-no .tkp__face{background:#e5484d;border-color:#e5484d;color:#fff;--fs:.9}
  .tkp__box.is-no .tkp__face svg{animation:tkpNo .42s ease-in-out .05s}
  @keyframes tkpNo{20%{transform:translateX(-7%)}45%{transform:translateX(6%)}70%{transform:translateX(-4%)}100%{transform:none}}
  .tkp__box.is-no .tkp__x{stroke-dashoffset:0;transition:stroke-dashoffset .3s cubic-bezier(.22,1,.36,1) .1s}
  .tkp__box.is-no .tkp__x--b{transition-delay:.28s}
  .tkp__box.is-yes{z-index:2}
  .tkp__box.is-yes .tkp__face{background:#ffc218;border-color:#ffc218;color:#15171b;--fr:calc(9deg + var(--sp,0) * 18deg);--fs:1.1;transition-duration:.8s,.4s,.4s,.3s}
  .tkp__box.is-yes .tkp__ok{stroke-dashoffset:0;transition:stroke-dashoffset .55s cubic-bezier(.22,1,.36,1) .35s}
  .tkp__ring{position:absolute;inset:0;border:1.5px solid #ffc218;opacity:0;pointer-events:none}
  .tkp__box.is-yes .tkp__ring{animation:tkpRing 1s cubic-bezier(.22,1,.36,1) .15s}
  @keyframes tkpRing{from{opacity:.9;transform:rotate(9deg) scale(1)}to{opacity:0;transform:rotate(9deg) scale(1.9)}}
  .tkp__bit{position:absolute;top:50%;left:50%;width:8px;height:8px;margin:-4px;background:#ffc218;pointer-events:none;z-index:3}
  .tkp.is-done .tkp__n{opacity:0}
  .tkp__line{position:relative;flex:none;width:100%;height:36px;margin:12px 0 0;text-align:center}
  .tkp__hint,.tkp__read{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;gap:8px;transition:opacity .35s ease,transform .45s cubic-bezier(.22,1,.36,1)}
  .tkp__hint{font-size:13px;font-weight:600;color:rgba(244,245,242,.5);opacity:0}
  .tkp.is-think .tkp__hint{opacity:1}
  .tkp__read{opacity:0;transform:translateY(8px)}
  .tkp.is-done .tkp__read{opacity:1;transform:none;transition-delay:.55s}
  .tkp__read b{font-size:28px;font-weight:900;line-height:1;color:#fff;font-variant-numeric:tabular-nums}
  .tkp__read small{font-size:12.5px;font-weight:600;color:rgba(244,245,242,.45)}
  .tkp__read em{font-style:normal;margin-inline-start:4px;padding:4px 12px;border-radius:8px;background:#ffc218;color:#15171b;font-size:12.5px;font-weight:800}
  .tkp__time{display:block;position:relative;flex:none;width:100%;height:2px;margin-top:12px;background:rgba(244,245,242,.12)}
  .tkp__time u{position:absolute;inset:0;background:rgba(244,245,242,.6);transform-origin:right;transform:scaleX(1)}
  .tkp.is-think .tkp__time u{transform:scaleX(0);transition:transform var(--think,3s) linear}
  .tkp.is-done .tkp__time u{transform:scaleX(1);background:#ffc218;transition:transform .6s cubic-bezier(.22,1,.36,1),background-color .3s}
  /* لحظهٔ جواب درست: یک خط طلایی از بالا تا پایین سرصفحه رد می‌شود */
  html .tk-public-body .tkh{position:relative;overflow-x:clip}
  html .tk-public-body .tkh::after{content:"";position:absolute;inset-inline:0;top:0;height:2px;background:#ffc218;opacity:0;pointer-events:none}
  html .tk-public-body .tkh.is-hit::after{animation:tkpSweep .9s cubic-bezier(.22,1,.36,1)}
  @keyframes tkpSweep{0%{opacity:.9;transform:translateY(0)}100%{opacity:0;transform:translateY(calc(100svh - 148px))}}

  html .tk-public-body .tkh .tkh-search{order:3;margin:0 24px;width:auto;box-sizing:border-box}
  html .tk-public-body .tkh .tkh-slogan{order:4;margin:12px 24px 0;text-align:center;font-size:13px;font-weight:500;line-height:1.8;color:var(--tkh-faint)}

  /* چهار مسیر زیر هم: هر کارت رنگ تخت و نقش خودش را دارد. فاصله‌ها ۱۲ و ۲۴، گوشه‌ها ۸ */
  html .tk-public-body .tkh{background:#15171b}
  .tkm-go{display:grid;grid-template-columns:1fr;gap:12px;margin:0;padding:24px 24px 48px;background:#15171b}
  .tkm-go__c{position:relative;display:flex;align-items:center;min-height:96px;box-sizing:border-box;padding:24px;padding-inline-end:116px;border-radius:8px;overflow:hidden;
    text-decoration:none;-webkit-tap-highlight-color:transparent;transition:transform .15s ease}
  .tkm-go__c:active{transform:scale(.985)}
  .tkm-go__tx{display:block;min-width:0}
  .tkm-go__tx b{display:block;font-size:18px;font-weight:900;line-height:1.5}
  .tkm-go__tx small{display:block;margin-top:4px;font-size:13px;font-weight:500;line-height:1.7}
  .tkm-go__c svg{position:absolute;inset-inline-end:12px;top:50%;width:96px;height:77px;margin-top:-38px;pointer-events:none}
  .tkm-go__c--exam{background:#ffc218;color:#15171b}
  .tkm-go__c--exam small{color:rgba(21,23,27,.72)}
  .tkm-go__c--exam svg{color:rgba(21,23,27,.3)}
  .tkm-go__c--train{background:#5b4fd6;color:#fff}
  .tkm-go__c--train small{color:rgba(255,255,255,.78)}
  .tkm-go__c--train svg{color:rgba(255,255,255,.42)}
  .tkm-go__c--chal{background:#0f8a6a;color:#fff}
  .tkm-go__c--chal small{color:rgba(255,255,255,.8)}
  .tkm-go__c--chal svg{color:rgba(255,255,255,.42)}
  .tkm-go__c--org{background:#2456a8;color:#fff}
  .tkm-go__c--org small{color:rgba(255,255,255,.8)}
  .tkm-go__c--org svg{color:rgba(255,255,255,.42)}
}
/* ---------- گوشی: ضرب‌آهنگ عمودی بخش‌های صفحهٔ اول ----------
   پیش از این هر بخش ۱۲ پیکسل هوا داشت و عنوان روی محتوا می‌افتاد (۸- پیکسل). حالا: هر بخش ۴۸ بالا و پایین،
   عنوان تا محتوا ۲۴، محتوا تا دکمه ۲۴، بین دو ردیف آزمون ۳۶. */
@media (max-width:640px){
  html .tk-public-body main > .pub-section{padding-block:48px!important}
  html .tk-public-body main > .pub-section .pub-shead{margin-block:0 24px!important}
  html .tk-public-body main > .pub-section .pub-shead + *{margin-block-start:0!important}
  html .tk-public-body main > .pub-section .pub-shead h2{margin:0;line-height:1.5}
  html .tk-public-body main > .pub-section .pub-shead p{margin:12px 0 0;line-height:1.9}
  html .tk-public-body main > .pub-section .pub-kick{display:block;margin:0 0 12px}
  html .tk-public-body main > .pub-section .hdm-grid{gap:12px!important}
  html .tk-public-body main > .pub-section .pub-domains-foot,
  html .tk-public-body main > .pub-section .spi-cta{margin-block:24px 0!important}
  html .tk-public-body main > .pub-section .spr-row + .spr-row{margin-block-start:36px!important}
  html .tk-public-body main > .pub-section .spr-head{margin-block:0 12px!important}
  html .tk-public-body main > .pub-section .pub-steps{gap:12px!important}
  html .tk-public-body main > .tktr{padding-block:48px!important}
  html .tk-public-body main > .bz.bzh{padding-block:48px!important}
  html .tk-public-body main > .bz.bzh .bzh-panel{padding:24px!important}
  html .tk-public-body main > .bz.bzh .bzh-panel h2{margin-block:12px 24px;line-height:1.35}
  html .tk-public-body main > .bz.bzh .bz-actions{gap:12px}
}
@media (max-width:640px) and (max-height:700px){
  .tkp{padding-top:12px}
  .tkp__line{height:28px;margin-top:8px}
  .tkp__read b{font-size:22px}
  html .tk-public-body .tkh .tkh-title{font-size:32px}
}
@media (max-width:640px) and (prefers-reduced-motion: reduce){.tkp__stage::before,.tkp__ring,.tkp__face svg,html .tk-public-body .tkh.is-hit::after{animation:none!important}.tkp__box,.tkp__face,.tkp__face path,.tkp__time u{transition:none!important}}

/* m63 — گوشی: فقط دو در. آزمون (اصلی) و سازمان‌ها. آموزش و چالش صفحهٔ جدا نیستند و فقط به شکل دو برچسب داخل کارت آزمون می‌آیند */
@media (max-width:640px){
  .tkm-go--v4 .tkm-go__c--exam{min-height:156px;align-items:flex-start;padding-block:24px}
  .tkm-go--v4 .tkm-go__c--exam b{font-size:20px}
  .tkm-go--v4 .tkm-go__c--exam b{text-wrap:balance}
  .tkm-go--v4 .tkm-go__tags{display:grid;gap:0;margin-top:12px;padding-top:12px;border-top:1px solid rgba(21,23,26,.2)}
  .tkm-go--v4 .tkm-go__tags i{font-style:normal;font-size:12.5px;font-weight:600;line-height:1.9;color:rgba(21,23,26,.8);white-space:nowrap}
  .tkm-go--v4 .tkm-go__tags i::before{content:"✓";margin-inline-end:6px;font-weight:800}
}
