/* ============================================================
   تست‌پیج — استایل مشترک سایت
   پالت مطابق: superpowers/specs/2026-08-03-frontend-palette-redesign-design.md
   فونت: Vazirmatn — هنگام انتشار، CDN را با نسخه سلف‌هاست جایگزین کن.

   این فایل بین همه صفحه‌های سایت مشترک است.
   استایل مخصوص هر صفحه در همان فایل HTML داخل <style> می‌آید.
   ============================================================ */

/* ---------- 1. توکن‌ها ---------- */
:root{
  --navy:#131921;
  --navy-2:#1B222D;
  --accent:#FF4D00;
  --accent-tint:#FFF1EA;
  --accent-dark:#E04400;
  --accent-light:#FF7A3D;

  --bg:#FFFFFF;
  --surface:#FFFFFF;
  --surface-2:#F7F8FA;
  --border:#E4E7EC;
  --border-2:#CBD2DC;

  --text:#131921;
  --text-muted:#667085;
  --text-soft:#98A2B3;
  --text-invert:#FFFFFF;
  --muted-invert:#8B93A3;

  --success:#16A34A;
  --warning:#FF4D00;
  --danger:#DC2626;
  --info:#2563EB;

  --radius-sm:8px;
  --radius:12px;
  --radius-lg:16px;

  --shadow-sm:0 1px 2px rgba(16,24,40,.06);
  --shadow:0 4px 12px rgba(16,24,40,.06);
  --shadow-lg:0 12px 32px rgba(16,24,40,.10);

  --max:1140px;
  --topbar-h:64px;
}

/* ---------- 2. پایه ---------- */
*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth;scroll-padding-top:88px}
body{
  font-family:Vazirmatn,'Segoe UI',Tahoma,sans-serif;
  background:var(--bg);color:var(--text);
  line-height:1.6;font-size:16px;
  -webkit-font-smoothing:antialiased;
}
a{color:inherit;text-decoration:none}
img{max-width:100%;display:block}

/* فوکوس قابل مشاهده — لازمه دسترسی‌پذیری، برای کاربر کیبورد */
:focus-visible{outline:2px solid var(--accent);outline-offset:3px;border-radius:4px}
.topbar :focus-visible,.page-head :focus-visible,.cta-band :focus-visible,
footer :focus-visible{outline-color:#fff}

/* پرش به محتوا */
.skip{
  position:absolute;inset-inline-start:-9999px;top:0;z-index:100;
  background:var(--accent);color:#fff;padding:12px 22px;
  border-end-end-radius:var(--radius-sm);font-size:.9375rem;font-weight:500
}
.skip:focus{inset-inline-start:0}
.wrap{max-width:var(--max);margin:0 auto;padding:0 24px}
.wrap-narrow{max-width:860px;margin:0 auto;padding:0 24px}
section{padding:88px 0}
.pt0{padding-top:0}
.pb0{padding-bottom:0}
.bg-soft{background:var(--surface-2)}
.center{text-align:center}
.ltr{direction:ltr;display:inline-block}

/* ---------- 3. سرفصل بخش ---------- */
.section-head{text-align:center;max-width:660px;margin:0 auto 48px}
.section-head .kicker{
  display:inline-block;color:var(--accent);font-size:.8125rem;font-weight:600;
  letter-spacing:.02em;margin-bottom:12px
}
.section-head h2{font-size:1.875rem;font-weight:600;letter-spacing:-.015em;line-height:1.45}
.section-head p{color:var(--text-muted);margin-top:14px;font-size:1.0625rem}

/* ---------- 4. دکمه‌ها ---------- */
.btn{
  display:inline-block;text-align:center;border-radius:var(--radius);
  padding:14px 30px;font-weight:600;font-size:.9375rem;
  transition:background .15s,border-color .15s,transform .15s;
  border:1px solid transparent;font-family:inherit;cursor:pointer
}
.btn-primary{background:var(--accent);color:#fff}
.btn-primary:hover{background:var(--accent-dark)}
.btn-ghost{background:#fff;color:var(--text);border-color:var(--border)}
.btn-ghost:hover{background:var(--surface-2)}
.btn-outline-light{background:transparent;color:#fff;border-color:rgba(255,255,255,.24)}
.btn-outline-light:hover{background:rgba(255,255,255,.09)}
.btn-sm{padding:10px 20px;font-size:.875rem}
.btn-block{display:block;width:100%}

/* ---------- 5. تاپ‌بار ---------- */
.topbar{background:var(--navy);color:var(--text-invert);position:sticky;top:0;z-index:60}
.topbar .wrap{display:flex;align-items:center;justify-content:space-between;height:var(--topbar-h)}
.brand{display:flex;align-items:center;gap:10px;font-weight:600;font-size:1.125rem;color:#fff}
/* The real wordmark, the same file the app's sidebar uses. It was a geometric glyph in an
   orange box before — and U+25E7 is not in Vazirmatn, so it fell through to whatever the
   reader's system happened to have, or to an empty box. */
.brand img{height:30px;width:auto;display:block}
@media (max-width:640px){.brand img{height:26px}}
.topbar nav{display:flex;gap:26px;font-size:.9375rem;color:var(--muted-invert)}
.topbar nav a:hover,.topbar nav a[aria-current="page"]{color:#fff}
.topbar nav a[aria-current="page"]{font-weight:500}
.topbar .actions{display:flex;align-items:center;gap:12px}
.btn-login{
  border:1px solid rgba(255,255,255,.22);border-radius:var(--radius-sm);
  padding:8px 18px;font-size:.9375rem;color:#fff;transition:background .15s
}
.btn-login:hover{background:rgba(255,255,255,.08)}
.btn-signup{
  background:var(--accent);border-radius:var(--radius-sm);
  padding:9px 18px;font-size:.9375rem;color:#fff;font-weight:500
}
.btn-signup:hover{background:var(--accent-dark)}
.burger{
  display:none;background:transparent;border:1px solid rgba(255,255,255,.22);
  border-radius:var(--radius-sm);color:#fff;font-size:1.125rem;
  width:38px;height:38px;cursor:pointer;line-height:1
}
.mobile-nav{display:none;background:var(--navy-2);border-top:1px solid rgba(255,255,255,.08)}
.mobile-nav.open{display:block}
.mobile-nav a{
  display:block;padding:14px 24px;color:var(--muted-invert);
  border-bottom:1px solid rgba(255,255,255,.06);font-size:.9375rem
}
.mobile-nav a:last-child{border-bottom:0}
.mobile-nav a:hover{color:#fff;background:rgba(255,255,255,.04)}

/* ---------- 6. سربرگ صفحه داخلی ---------- */
.page-head{
  background:var(--navy);color:#fff;padding:56px 0 60px;
  position:relative;overflow:hidden;text-align:center
}
.page-head::after{
  content:"";position:absolute;inset-inline:-10%;top:30%;height:300px;
  background:radial-gradient(ellipse at center,rgba(255,77,0,.14),transparent 66%);
  pointer-events:none
}
.page-head .wrap{position:relative;z-index:1}
.page-head .kicker{
  display:inline-block;color:var(--accent-light);font-size:.8125rem;
  font-weight:600;margin-bottom:12px
}
.page-head h1{font-size:2.125rem;font-weight:600;letter-spacing:-.015em;line-height:1.4}
.page-head p{color:var(--muted-invert);margin:14px auto 0;max-width:600px;font-size:1.0625rem}
.breadcrumb{
  font-size:.8125rem;color:var(--muted-invert);margin-bottom:16px;
  display:flex;gap:8px;justify-content:center;flex-wrap:wrap
}
.breadcrumb a:hover{color:#fff}
.breadcrumb span{opacity:.5}

/* ---------- 7. کارت‌ها ---------- */
.card{
  background:var(--surface);border:1px solid var(--border);
  border-radius:var(--radius);padding:26px 24px;box-shadow:var(--shadow-sm)
}
.card-lg{border-radius:var(--radius-lg);padding:30px}
.card-hover{transition:border-color .15s,transform .15s}
.card-hover:hover{border-color:var(--accent);transform:translateY(-2px)}
.grid-2{display:grid;grid-template-columns:repeat(2,1fr);gap:20px}
.grid-3{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}
.grid-4{display:grid;grid-template-columns:repeat(4,1fr);gap:20px}

/* ---------- 8. Placeholder تصویر و ویدیو ---------- */
/* هر .ph یک جای خالی است. با <img> یا <iframe> یا <video> جایگزینش کن. */
.ph{
  position:relative;width:100%;background:var(--surface-2);
  border:2px dashed var(--border-2);border-radius:var(--radius);
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:8px;color:var(--text-soft);text-align:center;padding:20px;overflow:hidden
}
.ph .icon{font-size:1.75rem;opacity:.55}
.ph .label{font-size:.875rem;font-weight:500;color:#7A879B}
.ph .size{font-size:.75rem;color:#A3AEBF;direction:ltr;font-family:ui-monospace,monospace}
.ph.dark{background:var(--navy-2);border-color:#333C4A;color:#7A879B}
.ph.dark .label{color:var(--text-soft)}
.ph .play{
  width:56px;height:56px;border-radius:50%;background:var(--accent);
  display:grid;place-items:center;color:#fff;font-size:1.125rem;
  box-shadow:0 6px 20px rgba(255,77,0,.35);padding-inline-start:4px
}
.ratio-16-10{aspect-ratio:16/10}
.ratio-16-9{aspect-ratio:16/9}
.ratio-9-16{aspect-ratio:9/16}
.ratio-4-3{aspect-ratio:4/3}
.ratio-1-1{aspect-ratio:1/1}

/* قاب مرورگر و موبایل دور اسکرین‌شات */
.frame{
  background:#232B38;border-radius:var(--radius-lg);padding:10px;
  box-shadow:var(--shadow-lg);overflow:hidden
}
.frame .bar{display:flex;gap:6px;padding:4px 6px 10px}
.frame .bar i{width:10px;height:10px;border-radius:50%;background:#3D4655;display:block}
.frame .ph{border-radius:var(--radius-sm)}
.phone{
  width:250px;background:#232B38;border-radius:30px;padding:9px;
  box-shadow:var(--shadow-lg);margin-inline:auto;flex:none
}
.phone .ph{border-radius:22px}

/* A real screenshot in place of a placeholder. The width/height attributes on the tag are
   there so the browser reserves the right space before the file arrives — but on their own
   they also fix the height, so a narrower column squeezed the picture sideways. Height has
   to give way and let the aspect ratio follow the width. */
.frame img,.phone img,.hero-shot img{
  display:block;width:100%;height:auto;border-radius:var(--radius-sm)
}
.phone img{border-radius:22px}

/* ---------- 9. آکاردئون ---------- */
.accordion{display:flex;flex-direction:column;gap:12px}
details{
  background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);
  padding:18px 22px;transition:border-color .15s
}
details[open]{border-color:var(--accent)}
details > summary{
  cursor:pointer;font-weight:500;list-style:none;display:flex;
  justify-content:space-between;align-items:center;gap:16px
}
details > summary::-webkit-details-marker{display:none}
details > summary::after{
  content:"+";color:var(--accent);font-size:1.375rem;font-weight:400;
  line-height:1;flex:none
}
details[open] > summary::after{content:"−"}
details .answer{
  color:var(--text-muted);font-size:.9375rem;margin-top:14px;
  padding-top:14px;border-top:1px solid var(--border)
}
details .answer p + p{margin-top:10px}
details .answer ul{margin:10px 0 0;padding-inline-start:20px;display:flex;flex-direction:column;gap:6px}

/* ---------- 10. فرم ---------- */
.field{display:flex;flex-direction:column;gap:7px;margin-bottom:18px}
.field label{font-size:.875rem;font-weight:500}
.field label .req{color:var(--accent)}
.field input,.field select,.field textarea{
  font-family:inherit;font-size:.9375rem;color:var(--text);
  background:var(--surface);border:1px solid var(--border);
  border-radius:var(--radius);padding:12px 14px;width:100%;
  transition:border-color .15s,box-shadow .15s
}
.field input:focus,.field select:focus,.field textarea:focus{
  outline:none;border-color:var(--accent);box-shadow:0 0 0 3px rgba(255,77,0,.12)
}
.field textarea{resize:vertical;min-height:130px;line-height:1.7}
.field .hint{font-size:.75rem;color:var(--text-muted)}
.field-row{display:grid;grid-template-columns:1fr 1fr;gap:16px}

/* ---------- 11. جدول ---------- */
.table-scroll{
  overflow-x:auto;border:1px solid var(--border);
  border-radius:var(--radius-lg);background:var(--surface)
}
.table-scroll table{width:100%;border-collapse:collapse;font-size:.9375rem}
.table-scroll th{
  background:var(--surface-2);font-weight:600;padding:16px 18px;text-align:right;
  border-bottom:1px solid var(--border);white-space:nowrap
}
.table-scroll th.hl{color:var(--accent)}
.table-scroll td{padding:14px 18px;border-bottom:1px solid var(--border)}
.table-scroll td.c{text-align:center;color:var(--text-muted)}
.table-scroll td.hl{background:var(--accent-tint)}
.table-scroll tr:last-child td{border-bottom:0}
.table-scroll tr.group td{
  background:var(--surface-2);font-weight:600;font-size:.875rem;
  color:var(--text-muted);padding:10px 18px
}
.yes{color:var(--success);font-weight:600}
.no{color:var(--border-2)}

/* ---------- 12. چیپ و فیلتر ---------- */
.chips{display:flex;gap:10px;flex-wrap:wrap;justify-content:center}
.chip{
  background:var(--surface);border:1px solid var(--border);border-radius:999px;
  padding:9px 20px;font-size:.875rem;font-family:inherit;color:var(--text-muted);
  cursor:pointer;transition:all .15s
}
.chip:hover{border-color:var(--accent);color:var(--text)}
.chip[aria-pressed="true"]{background:var(--accent);border-color:var(--accent);color:#fff;font-weight:500}
.badge{
  display:inline-block;background:var(--accent-tint);color:var(--accent-dark);
  border-radius:999px;padding:4px 12px;font-size:.75rem;font-weight:600
}
.badge-soft{background:var(--surface-2);color:var(--text-muted)}

/* ---------- 13. جستجوی سایت ---------- */
.searchbox{position:relative;max-width:520px;margin:0 auto 36px}
.searchbox input{
  width:100%;font-family:inherit;font-size:.9375rem;
  padding:14px 46px 14px 16px;border:1px solid var(--border);
  border-radius:var(--radius);background:var(--surface);color:var(--text)
}
.searchbox input:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px rgba(255,77,0,.12)}
.searchbox .ico{
  position:absolute;inset-inline-start:16px;top:50%;transform:translateY(-50%);
  color:var(--text-soft);pointer-events:none
}
.empty-state{
  text-align:center;color:var(--text-muted);padding:48px 20px;
  border:1px dashed var(--border-2);border-radius:var(--radius);display:none
}
.empty-state.show{display:block}
.result-count{
  text-align:center;color:var(--text-muted);font-size:.875rem;margin:-20px 0 28px
}

/* ---------- خطای فرم ---------- */
.field input[aria-invalid="true"],
.field select[aria-invalid="true"],
.field textarea[aria-invalid="true"]{border-color:var(--danger);background:#FEF5F5}
.field .err{
  display:none;color:var(--danger);font-size:.75rem;font-weight:500
}
.field .err.show{display:block}

/* ---------- 14. متن بلند (قوانین، راهنما) ---------- */
.prose{font-size:1rem;line-height:1.85;color:var(--text)}
.prose h2{
  font-size:1.375rem;font-weight:600;margin:44px 0 14px;
  padding-top:10px;scroll-margin-top:96px;letter-spacing:-.01em
}
.prose h2:first-child{margin-top:0}
.prose h3{font-size:1.0625rem;font-weight:600;margin:26px 0 10px}
.prose p{color:var(--text-muted);margin-bottom:14px}
.prose ul,.prose ol{color:var(--text-muted);margin:0 0 16px;padding-inline-start:22px;display:flex;flex-direction:column;gap:8px}
.prose strong{color:var(--text);font-weight:600}
.prose a{color:var(--accent);border-bottom:1px solid rgba(255,77,0,.35)}
.prose hr{border:0;border-top:1px solid var(--border);margin:36px 0}
.callout{
  background:var(--accent-tint);border:1px solid #FFD9C7;border-radius:var(--radius);
  padding:18px 20px;margin:22px 0;font-size:.9375rem;color:var(--text)
}
.callout b{display:block;margin-bottom:6px;color:var(--accent-dark)}
.callout.neutral{background:var(--surface-2);border-color:var(--border)}
.callout.neutral b{color:var(--text)}

/* ---------- 15. چیدمان با فهرست کناری ---------- */
.doc-layout{display:grid;grid-template-columns:240px 1fr;gap:56px;align-items:start}
.toc{position:sticky;top:96px}
.toc > summary{
  display:none;cursor:pointer;list-style:none;font-weight:600;font-size:.9375rem;
  background:var(--surface-2);border:1px solid var(--border);border-radius:var(--radius);
  padding:14px 18px;justify-content:space-between;align-items:center
}
.toc > summary::-webkit-details-marker{display:none}
.toc > summary::after{content:"+";color:var(--accent);font-size:1.25rem;line-height:1}
.toc[open] > summary::after{content:"−"}
.toc .toc-title{font-size:.8125rem;font-weight:600;color:var(--text-muted);margin-bottom:14px}
.toc ul{list-style:none;display:flex;flex-direction:column;gap:2px;
  border-inline-start:2px solid var(--border);padding-inline-start:0}
.toc a{
  display:block;padding:8px 14px;font-size:.875rem;color:var(--text-muted);
  border-inline-start:2px solid transparent;margin-inline-start:-2px;transition:all .15s
}
.toc a:hover{color:var(--text)}
.toc a.active{color:var(--accent);border-inline-start-color:var(--accent);font-weight:500}

/* ---------- 16. نوار فراخوان پایانی ---------- */
.cta-band{
  background:var(--navy);color:#fff;text-align:center;padding:76px 0;
  position:relative;overflow:hidden
}
.cta-band::after{
  content:"";position:absolute;inset-inline:-10%;top:20%;height:300px;
  background:radial-gradient(ellipse at center,rgba(255,77,0,.14),transparent 66%);
  pointer-events:none
}
.cta-band .wrap{position:relative;z-index:1}
.cta-band h2{font-size:1.875rem;font-weight:600;letter-spacing:-.015em}
.cta-band p{color:var(--muted-invert);margin:14px auto 30px;max-width:520px}
.cta-band small{display:block;color:var(--muted-invert);margin-top:16px;font-size:.8125rem}

/* ---------- 17. فوتر ---------- */
footer{background:var(--navy);color:var(--muted-invert);padding:44px 0 28px;font-size:.875rem}
footer .cols{
  display:grid;grid-template-columns:2fr 1fr 1fr 1fr;gap:32px;
  padding-bottom:28px;border-bottom:1px solid rgba(255,255,255,.09)
}
footer .brand{margin-bottom:12px}
footer .about{max-width:280px;line-height:1.7}
footer h5{color:#fff;font-size:.9375rem;font-weight:600;margin-bottom:12px}
footer ul{list-style:none;display:flex;flex-direction:column;gap:9px}
footer ul a:hover{color:#fff}
footer .base{
  padding-top:22px;display:flex;justify-content:space-between;
  flex-wrap:wrap;gap:12px;font-size:.8125rem
}

/* ---------- 18. واکنش‌گرا ---------- */
@media (max-width:940px){
  .grid-3,.grid-4{grid-template-columns:repeat(2,1fr)}
  .topbar nav{display:none}
  .topbar .actions .btn-login{display:none}
  .burger{display:block}
  .doc-layout{grid-template-columns:1fr;gap:28px}
  /* در موبایل فهرست به یک آکاردئون تبدیل می‌شود، نه اینکه حذف شود */
  .toc{position:static}
  .toc > summary{display:flex}
  .toc .toc-title{display:none}
  .toc ul{margin-top:14px}
  footer .cols{grid-template-columns:1fr 1fr}
}
@media (max-width:640px){
  .wrap,.wrap-narrow{padding:0 16px}
  section{padding:60px 0}
  .section-head h2{font-size:1.5rem}
  .page-head{padding:40px 0 44px}
  .page-head h1{font-size:1.625rem}
  .page-head p{font-size:1rem}
  .grid-2,.grid-3,.grid-4{grid-template-columns:1fr}
  .field-row{grid-template-columns:1fr}
  .cta-band h2{font-size:1.5rem}
  .btn{width:100%}
  .btn-sm{width:auto}
  footer .cols{grid-template-columns:1fr}
}
@media (prefers-reduced-motion:reduce){
  *{transition:none!important;scroll-behavior:auto!important}
}
