/* The comparison page and «کدام روتر برای من؟» (docs/70-storefront-redesign.md, checkpoint 4), on the Arena tokens of store.css.
   The table scrolls sideways inside its frame with the first column held in place; every motion is transform, opacity or a colour. */
.ch-crumbs { display:flex; flex-wrap:wrap; align-items:center; gap:4px 8px; margin:0 0 14px; font-size:13px; color:var(--st-muted); }
.ch-crumbs a { color:var(--st-muted) !important; transition:color .2s; }
.ch-crumbs a:hover { color:#fff !important; }
.ch-crumbs [aria-current] { color:var(--st-ink); }
.ch-head { display:flex; flex-wrap:wrap; align-items:flex-end; justify-content:space-between; gap:14px 24px; margin-bottom:18px; }
.ch-head h1 { margin:0; font-size:clamp(26px,3.4vw,38px); font-weight:900; line-height:1.35; }
.ch-head p { max-width:62ch; margin:6px 0 0; color:var(--st-muted); font-size:15px; }
.ch-tools { display:flex; flex-wrap:wrap; align-items:center; gap:10px; }
.ch-seg { display:inline-flex; gap:4px; padding:4px; border-radius:999px; border:1px solid var(--st-line2); background:var(--st-card2); }
.ch-seg a { padding:7px 18px; border-radius:999px; font-size:14px; font-weight:700; color:var(--st-muted) !important; transition:background .2s, color .2s; }
.ch-seg a:hover { color:#fff !important; }
.ch-seg a[aria-current] { background:#fff; color:#0a0b10 !important; }
.ch-diff, .ch-add { display:flex; align-items:center; gap:8px; margin:0; }
.ch-switch { position:relative; display:inline-flex; align-items:center; gap:10px; min-height:44px; padding:0 14px 0 6px; border-radius:999px; border:1px solid var(--st-line2);
  background:var(--st-card2); font-size:14px; cursor:pointer; }
.ch-switch input { appearance:none; position:relative; width:38px; height:22px; margin:0; border-radius:999px; background:#ffffff1f; cursor:pointer; transition:background .2s; }
.ch-switch input::after { content:""; position:absolute; top:3px; right:3px; width:16px; height:16px; border-radius:50%; background:#fff; transition:transform .2s cubic-bezier(.2,.7,.2,1); }
.ch-switch input:checked { background:#F05666; }
.ch-switch input:checked::after { transform:translateX(-16px); }
.ch-switch input:focus-visible { outline:2px solid #F05666; outline-offset:3px; }
body[data-page="store"] .ch-add select { min-height:44px; max-width:260px; padding:0 12px; border-radius:999px; border:1px dashed var(--st-line2); background:var(--st-card2);
  color:var(--st-ink); color-scheme:dark; font-size:14px; cursor:pointer; }
.ch-add select:focus-visible { outline:2px solid #F05666; outline-offset:2px; }
.ch-apply { min-height:40px; padding:0 14px; border-radius:11px; border:1px solid var(--st-line2); background:#ffffff0b; color:var(--st-ink); font:inherit; font-size:13px; cursor:pointer; }
.ch-swipe { display:none; margin:0 0 8px; color:var(--st-muted); font-size:12.5px; }
.sr { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }

/* the table */
.ch-wrap { overflow-x:auto; border-radius:22px; border:1px solid var(--st-line); background:linear-gradient(180deg, var(--st-card), var(--st-card2));
  scrollbar-width:thin; scrollbar-color:#ffffff22 transparent; overscroll-behavior-x:contain; }
.ch-wrap:focus-visible { outline:2px solid #F05666; outline-offset:2px; }
body[data-page="store"] .ch-table { width:100%; min-width:calc(150px + var(--cols) * 190px); border-collapse:separate; border-spacing:0; background:none; table-layout:fixed; }
.ch-table th, .ch-table td { padding:11px 14px; border-bottom:1px solid var(--st-line); font-size:14px; line-height:1.7; vertical-align:middle; transition:background .15s; }
.ch-table thead th { vertical-align:top; border-bottom-color:var(--st-line2); }
.ch-table th:first-child { position:sticky; right:0; z-index:2; width:150px; background:var(--st-card); text-align:start; box-shadow:-1px 0 0 var(--st-line); }
.ch-table td { text-align:center; color:#fff; font-variant-numeric:tabular-nums; }
.ch-table tbody th[scope="row"] { font-weight:400; font-size:13px; color:var(--st-muted); }
.ch-corner { background:var(--st-card) !important; }
.ch-col { position:relative; padding:18px 14px 16px !important; text-align:center; }
.ch-dev { display:grid; justify-items:center; gap:6px; color:#fff !important; }
.ch-dev img { width:min(150px,100%); height:auto; aspect-ratio:1; object-fit:contain; filter:drop-shadow(0 14px 14px #0009); transition:transform .3s cubic-bezier(.2,.7,.2,1); }
.ch-dev:hover img { transform:translateY(-5px) scale(1.03); }
.ch-dev span { font-size:14.5px; font-weight:800; line-height:1.6; }
.ch-os { display:inline-block; margin-top:6px; padding:1px 10px; border-radius:999px; background:var(--st-grad); color:#16080c; font-size:11px; font-weight:800; }
.ch-price { display:block; margin-top:8px; font-size:15px; font-weight:900; color:#fff; font-variant-numeric:tabular-nums; }
.ch-price.out { color:var(--st-muted); font-weight:700; font-size:13.5px; }
.ch-buy { gap:6px; min-height:40px; margin-top:8px; padding:0 16px; font-size:13px; }
.ch-buy .ic { width:15px; height:15px; }
.ch-remove { position:absolute; top:10px; left:10px; display:grid; place-items:center; width:32px; height:32px; border-radius:10px; border:1px solid var(--st-line2);
  color:var(--st-muted) !important; background:var(--st-card2); transition:color .2s, border-color .2s, transform .15s; }
.ch-remove:hover { color:#fff !important; border-color:#F05666; }
.ch-remove:active { transform:scale(.92); }
.ch-remove .ic { width:15px; height:15px; }
.ch-group th { position:static; padding:18px 14px 8px !important; background:none !important; box-shadow:none !important; font-size:13px; font-weight:800; color:#F05666;
  border-bottom-color:var(--st-line2); }
.ch-group th::before { content:""; display:inline-block; width:14px; height:3px; margin-inline-end:8px; border-radius:2px; background:var(--st-grad); vertical-align:middle; }
.ch-table td.best { background:#4ade8012; font-weight:800; }
.ch-best { display:inline-block; margin-inline-start:6px; padding:0 8px; border-radius:999px; background:#4ade8026; color:#7cf0ad; font-size:11px; font-weight:800; vertical-align:1px; }
.ch-table td.none { color:var(--st-muted); font-size:13px; }
.ch-table .dim { color:#ffffff40; }
.ch-table .lit { background:#ffffff09; }
.ch-table td.best.lit { background:#4ade801c; }
.ch-table tr:last-child > * { border-bottom:0; }
.ch-legend { margin:12px 0 0; color:var(--st-muted); font-size:13px; }
.ch-finder { max-width:420px; margin-top:22px; }

/* «کدام روتر برای من؟» */
.fd { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.25fr); gap:22px; align-items:start; }
.fd-form { display:grid; align-content:start; gap:18px; padding:20px; border-radius:22px; border:1px solid var(--st-line); background:linear-gradient(180deg, var(--st-card), var(--st-card2)); }
.fd-q { min-width:0; margin:0; padding:0; border:0; }
.fd-q legend { display:flex; align-items:center; gap:10px; padding:0; margin-bottom:10px; font-size:16px; font-weight:800; color:#fff; line-height:1.6; }
.fd-n { flex:none; display:grid; place-items:center; width:28px; height:28px; border-radius:9px; background:var(--st-grad); color:#16080c; font-size:14px; font-weight:900; }
.fd-opts { display:grid; align-content:start; gap:8px; }
.fd-opt { position:relative; box-sizing:border-box; display:flex; align-items:center; gap:12px; min-height:48px; padding:8px 14px; border-radius:14px; border:1px solid var(--st-line2);
  background:#ffffff05; font-size:14.5px; cursor:pointer; transition:border-color .2s, background .2s, transform .15s; }
.fd-opt:hover { border-color:#ffffff66; }
.fd-opt:active { transform:scale(.99); }
.fd-opt input { flex:none; width:18px; height:18px; margin:0; accent-color:#F05666; color-scheme:dark; cursor:pointer; }
.fd-opt:has(input:checked) { border-color:#F05666; background:#f0566614; color:#fff; }
.fd-opt:has(input:focus-visible) { outline:2px solid #F05666; outline-offset:2px; }
.fd-go { justify-content:center; gap:8px; min-height:52px; border:0; font-family:inherit; font-size:15px; cursor:pointer; }
.fd-go .ic { width:18px; height:18px; }
.fd-result { padding:20px; border-radius:22px; border:1px solid var(--st-line); background:#ffffff04; scroll-margin-top:calc(var(--site-nav-height) + 16px); }
.fd-result:focus { outline:none; }
body[data-page="store"] .fd-result h2 { margin:0 0 12px; font-size:clamp(20px,2.4vw,26px); }
.fd-note { margin:0 0 14px; padding:12px 14px; border-radius:14px; background:#fbe33512; border:1px solid #fbe33533; color:#f3e9a6; font-size:14px; }
.fd-note a { color:#ff8a96 !important; border-bottom:1px dashed #ff8a9688; }
.fd-cards { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:14px; }
.fd-card { display:flex; flex-direction:column; gap:10px; padding:16px; border-radius:20px; border:1px solid var(--st-line); background:linear-gradient(180deg, var(--st-card), var(--st-card2)); }
.fd-card.main { border:1px solid transparent; background:linear-gradient(180deg, var(--st-card), var(--st-card2)) padding-box, var(--st-grad) border-box; }
.fd-tag { align-self:flex-start; padding:2px 12px; border-radius:999px; background:#ffffff12; color:var(--st-ink); font-size:12px; font-weight:800; }
.fd-card.main .fd-tag { background:var(--st-grad); color:#16080c; }
.fd-dev { display:grid; justify-items:center; gap:4px; text-align:center; color:#fff !important; }
.fd-dev img { width:min(200px,80%); height:auto; aspect-ratio:1; object-fit:contain; filter:drop-shadow(0 16px 16px #0009); transition:transform .3s cubic-bezier(.2,.7,.2,1); }
.fd-dev:hover img { transform:translateY(-6px) scale(1.03); }
.fd-dev small { color:var(--st-muted); font-size:12px; }
.fd-dev b { font-size:16px; line-height:1.6; }
.fd-why { display:grid; gap:6px; margin:0; padding:0; list-style:none; }
.fd-why li { display:flex; gap:8px; align-items:flex-start; font-size:14px; color:#d3d9e3; line-height:1.75; }
.fd-why .ic { flex:none; width:16px; height:16px; margin-top:4px; color:#4ade80; }
.fd-foot { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px; margin-top:auto; padding-top:12px; border-top:1px solid var(--st-line); }
.fd-foot .eco-btn { gap:6px; min-height:42px; font-size:13.5px; }
.fd-foot .eco-btn .ic { width:15px; height:15px; }
.ch-link { display:inline-flex; align-items:center; gap:8px; margin-top:16px; font-size:14px; font-weight:700; color:#ff8a96 !important; border-bottom:1px dashed #ff8a9688; }
.ch-link .ic { width:16px; height:16px; }
.fd-empty { display:grid; justify-items:center; gap:6px; padding:36px 12px; text-align:center; color:var(--st-muted); }
.fd-empty p { margin:0; }
.fd-empty-ic .ic { width:30px; height:30px; padding:12px; border-radius:16px; background:#ffffff0b; color:#F05666; box-sizing:content-box; }
.fd-small { font-size:13.5px; }
.fd-small a { color:#ff8a96 !important; }

@media (prefers-reduced-motion: no-preference) {
  .fd-card { animation:fd-in .5s cubic-bezier(.2,.7,.2,1) both; }
  .fd-card + .fd-card { animation-delay:.08s; }
  @keyframes fd-in { from { opacity:0; transform:translateY(18px); } to { opacity:1; transform:none; } }
}
@media (prefers-reduced-motion: reduce) { .ch-dev img, .fd-dev img, .ch-switch input, .ch-switch input::after { transition:none; } }
@media (max-width:860px) {
  .fd { grid-template-columns:minmax(0,1fr); }
  .ch-swipe { display:block; }
  body[data-page="store"] .ch-table { min-width:calc(112px + var(--cols) * 150px); }
  .ch-table th:first-child { width:112px; }
  .ch-table th, .ch-table td { padding:9px 10px; font-size:13px; }
  .ch-table tbody th[scope="row"] { font-size:12px; }
  .ch-dev span { font-size:13px; }
}
@media (max-width:520px) {
  .ch-tools { width:100%; }
  .ch-seg { flex:1 1 100%; } .ch-seg a { flex:1; text-align:center; }
  .ch-diff, .ch-add { flex:1 1 auto; }
  body[data-page="store"] .ch-add select { width:100%; max-width:none; }
  .fd-form, .fd-result { padding:14px; border-radius:18px; }
  .fd-card { padding:14px; }
}
