/* ==========================================================================
   پرسش از کارشناس — design system (mobile-first, RTL, light; footer in GeekWare's dark look)
   ========================================================================== */

@font-face { font-family: "Vazirmatn"; src: url("/fonts/Vazirmatn-FD-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("/fonts/Vazirmatn-FD-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --bg: #f6f8fa;
  --surface: #fff;
  --text: #14202b;
  --muted: #55636f;
  --faint: #637080;
  --border: #e1e6eb;
  --border-strong: #c9d2da;
  --primary: #0f766e;
  --primary-hover: #0d645d;
  --primary-soft: #e6f4f2;
  --danger: #c2334d;
  --danger-soft: #fdecef;
  --ok-soft: #e7f6ec;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(20, 32, 43, .06), 0 8px 24px -12px rgba(20, 32, 43, .18);
  --container: 1120px;
  --gutter: 16px;
  --header-h: 60px;
  /* GeekWare footer */
  --gw-bg: #07070d;
  --gw-text: #eef0fb;
  --gw-muted: #a3a7c2;
  --gw-faint: #8286a6;
  --gw-border: rgba(255, 255, 255, .09);
  --gw-link: #a78bfa;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0; min-height: 100dvh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text);
  font-family: "Vazirmatn", Tahoma, system-ui, sans-serif; font-size: 16px; line-height: 1.85;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overflow-x: clip;
}
main { flex: 1; }
main:focus { outline: none; }
img, svg { display: block; max-width: 100%; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); text-decoration: underline; }
p { margin: 0 0 1em; }
h1, h2, h3 { line-height: 1.45; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(1.55rem, 6vw, 2.3rem); }
h2 { font-size: clamp(1.25rem, 4.5vw, 1.6rem); }
h3 { font-size: 1.08rem; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid #f59e0b; outline-offset: 2px; border-radius: 6px; }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 8px; right: 8px; z-index: 100; padding: 10px 16px; border-radius: 10px; background: var(--text); color: #fff; transform: translateY(-150%); transition: transform .2s; }
.skip-link:focus { transform: none; }
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 760px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: .9em; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 44px; padding: 0 1.2em; border: 1px solid transparent; border-radius: var(--radius-sm);
  font-weight: 700; font-size: 1rem; line-height: 1; white-space: nowrap; cursor: pointer; text-decoration: none;
  transition: background .15s, border-color .15s, transform .1s;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn[aria-disabled="true"] { opacity: .7; cursor: progress; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); color: #fff; }
.btn-ghost { background: transparent; border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover { background: #fff; color: var(--text); }
.btn-sm { min-height: 44px; padding: 0 1em; font-size: .92rem; }
.btn-lg { min-height: 52px; padding: 0 1.6em; font-size: 1.05rem; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; gap: 16px; min-height: var(--header-h); }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 1.05rem; }
.logo:hover { color: var(--text); text-decoration: none; }
.main-nav { display: none; gap: 4px; margin-inline-start: auto; }
.main-nav a { color: var(--muted); padding: 8px 12px; border-radius: 10px; }
.main-nav a:hover { color: var(--text); background: var(--bg); text-decoration: none; }
.site-header .btn { margin-inline-start: auto; }
@media (min-width: 760px) { .main-nav { display: flex; } .site-header .btn { margin-inline-start: 0; } }

/* ---------- Breadcrumbs ---------- */
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 14px 0 0; font-size: .88rem; color: var(--faint); }
.crumbs li + li::before { content: "‹"; margin-inline-end: 6px; }
.crumbs a { color: var(--muted); }

/* ---------- Sections ---------- */
.hero { padding: 24px 0 8px; }
.hero h1 { margin-bottom: .3em; }
.hero .lead { color: var(--muted); font-size: 1.02rem; margin-bottom: 16px; }
.hero-cat { padding-top: 12px; }
.section { padding: 32px 0; }
.section h2 { margin-bottom: 16px; }
@media (min-width: 760px) { .hero { padding-top: 48px; } .section { padding: 48px 0; } }

/* ---------- Ask box ---------- */
.ask { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; }
.chips { min-width: 0; border: 0; margin: 0 0 12px; padding: 0; }
.chips legend { padding: 0; font-size: .9rem; color: var(--muted); margin-bottom: 6px; }
.chip-row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin-inline: -14px; padding-inline: 14px; }
.chip-row::-webkit-scrollbar { display: none; }
.chip { flex: none; position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1px solid var(--border-strong); border-radius: 999px; font-size: .92rem; white-space: nowrap; background: #fff; }
.chip input:checked + span { background: var(--primary); border-color: var(--primary); color: #fff; }
.chip input:focus-visible + span { outline: 3px solid #f59e0b; outline-offset: 2px; }
@media (min-width: 760px) { .chip-row { flex-wrap: wrap; overflow: visible; margin-inline: 0; padding-inline: 0; } }
/* Text box with its tools inside the same border: textarea, recorded voice, attachments, then mic + paperclip. */
.input-box { border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: #fff; transition: border-color .15s, box-shadow .15s; }
.input-box:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.input-box textarea { display: block; width: 100%; min-height: 120px; resize: vertical; padding: 12px 14px 4px; border: 0; border-radius: var(--radius-sm) var(--radius-sm) 0 0; background: transparent; line-height: 1.9; }
.follow-up .input-box textarea { min-height: 88px; }
.input-box textarea:focus { outline: none; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.input-tools { display: flex; align-items: center; gap: 4px; padding: 4px 6px 6px; }
.tool { display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; transition: background .15s, color .15s; }
.tool:hover { background: var(--primary-soft); color: var(--primary); }
.tool .i-stop { display: none; }
.is-recording .tool-mic { background: var(--danger); color: #fff; animation: pulse 1.4s ease-in-out infinite; }
.is-recording .tool-mic .i-mic { display: none; }
.is-recording .tool-mic .i-stop { display: block; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(194, 51, 77, .15); } }
@media (prefers-reduced-motion: reduce) { .is-recording .tool-mic { animation: none; } }
.tools-status { flex: 1; min-width: 0; font-size: .82rem; color: var(--muted); line-height: 1.5; padding-inline-start: 4px; }
.is-recording .tools-status { color: var(--danger); }
.file-input { position: absolute; top: 0; inset-inline-start: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
/* The hidden input stays inside its picker, so it can't push the page wider on phones. */
.input-tools, .photo-card form, .file-pick { position: relative; }
.input-tools:has(.file-input:focus-visible) label.tool { outline: 3px solid #f59e0b; outline-offset: 2px; }
.voice { display: flex; align-items: center; gap: 8px; padding: 4px 10px; }
.voice audio { flex: 1; min-width: 0; height: 40px; }
.attach-list { list-style: none; margin: 0; padding: 4px 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.attach-list li { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 2px 4px 2px 2px; padding-inline-start: 8px; border: 1px solid var(--border); border-radius: 999px; background: var(--bg); font-size: .85rem; }
.attach-list img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.attach-list span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }
.attach-del { width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 1.2rem; line-height: 1; cursor: pointer; }
.attach-del:hover { background: var(--danger-soft); color: var(--danger); }
.ask .error, .follow-up .error { margin-top: 6px; }
.ask-work { margin-top: 8px; }
.ask-work .check { font-size: .92rem; }
.work-note { display: none; width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: #fff; }
.work-note:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.ask-work:has(input:checked) .work-note { display: block; }
.progress { display: block; width: 100%; height: 6px; margin-top: 10px; accent-color: var(--primary); }
.ask-rules { margin: 4px 0 0; font-size: .82rem; color: var(--faint); }
.ask-rules a { text-decoration: underline; text-underline-offset: 3px; }
.ask-label { display: block; margin-top: 12px; font-size: .9rem; font-weight: 700; }
.ask-send { display: grid; gap: 10px; margin-top: 4px; }
.ask-send input { width: 100%; min-height: 48px; padding: 8px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: #fff; }
.ask-send input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.ask-send .btn { width: 100%; }
@media (min-width: 560px) { .ask-send { grid-template-columns: 1fr auto; } .ask-send .btn { min-height: 48px; } }
.ask-help { display: block; margin-top: 4px; color: var(--faint); font-size: .82rem; }
.ask-expect { margin: 12px 0 0; padding-top: 10px; border-top: 1px dashed var(--border); font-size: .9rem; color: var(--muted); }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Forms ---------- */
.field { display: grid; gap: 4px; margin-bottom: 16px; }
.field label { font-size: .9rem; font-weight: 700; }
.field input, .field textarea, .field select { width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: #fff; }
.field textarea { line-height: 1.9; resize: vertical; }
.field small { color: var(--faint); font-size: .82rem; }
.field.has-error input, .field.has-error textarea, .field.has-error select { border-color: var(--danger); }
.error { color: var(--danger); font-size: .88rem; margin: 0; }
.check { display: flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--primary); }

/* ---------- Category cards ---------- */
.cat-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.cat-card { display: flex; flex-direction: column; height: 100%; padding: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); transition: border-color .15s, box-shadow .15s; }
.cat-card:hover { border-color: var(--primary); box-shadow: var(--shadow); color: var(--text); text-decoration: none; }
.cat-card h3 { margin-bottom: .3em; }
.cat-card p { color: var(--muted); font-size: .92rem; flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cat-more { color: var(--primary); font-weight: 700; font-size: .92rem; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 8px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.faq summary { cursor: pointer; list-style: none; padding: 12px 16px; min-height: 44px; font-weight: 700; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--primary); font-size: 1.3rem; line-height: 1.3; }
.faq details[open] summary::after { content: "−"; }
.faq-a { padding: 0 16px 6px; color: var(--muted); }

/* ---------- Prose (admin-written landing text, rules) ---------- */
.prose h2 { margin-top: 1.4em; }
.prose h3 { margin-top: 1.2em; }
.prose ul { padding-inline-start: 1.3em; }
.prose li { margin-bottom: .3em; }
.prose li::marker { color: var(--primary); }
.prose .lead { color: var(--muted); font-size: 1.05rem; }

.not-found { padding-block: 64px; }
.nf-code { font-size: clamp(4rem, 20vw, 7rem); font-weight: 700; line-height: 1; color: var(--primary); margin-bottom: 8px; }

/* ---------- Footer (same look as geekware.ir) ---------- */
.site-footer { margin-top: 32px; padding: 40px 0 calc(28px + env(safe-area-inset-bottom)); background: var(--gw-bg); color: var(--gw-text); }
.site-footer .logo { color: var(--gw-text); }
.footer-inner { display: grid; gap: 24px; }
.footer-brand p { color: var(--gw-muted); font-size: .92rem; margin-top: 10px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-links a { color: var(--gw-muted); display: inline-flex; align-items: center; min-height: 32px; }
.footer-links a:hover { color: var(--gw-text); }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--gw-border); color: var(--gw-faint); font-size: .85rem; }
.footer-bottom a { color: var(--gw-link); text-decoration: underline; text-underline-offset: 3px; }
.footer-bottom a:hover { color: #c4b5fd; }
@media (min-width: 900px) { .footer-inner { grid-template-columns: 2fr 1fr 1fr; align-items: start; } .footer-links { flex-direction: column; } }

/* ---------- Admin ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.page-admin { background: var(--bg); }
.admin-bar { background: #fff; border-bottom: 1px solid var(--border); }
.admin-bar-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding-block: 8px; }
.admin-bar nav { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; }
.admin-bar nav a { color: var(--muted); padding: 8px 10px; border-radius: 10px; }
.admin-bar nav a[aria-current] { color: var(--primary); background: var(--primary-soft); }
.admin-main { padding-block: 20px 48px; max-width: 900px; }
.admin-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.admin-head h1 { margin: 0; }
.admin-form h2 { font-size: 1.1rem; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--border); }
.admin-form h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.admin-section { margin-top: 32px; }
.field-row { display: grid; gap: 0 16px; }
@media (min-width: 560px) { .field-row { grid-template-columns: 1fr 1fr; } }
.form-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.svc-row { display: grid; gap: 0 16px; align-items: center; margin-bottom: 8px; }
@media (min-width: 560px) { .svc-row { grid-template-columns: 1fr 220px; } }
.svc-row .field { margin-bottom: 8px; }
.svc-row.is-later { display: flex; justify-content: space-between; color: var(--faint); min-height: 44px; }
.faq-edit { position: relative; margin-bottom: 12px; }
.faq-delete { margin-top: 8px; }
.sort-inline { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; color: var(--muted); }
.sort-inline input { width: 64px; min-height: 40px; padding: 4px 8px; border: 1px solid var(--border-strong); border-radius: 10px; }
.notice { padding: 10px 14px; border-radius: var(--radius-sm); background: var(--ok-soft); margin-bottom: 16px; }
.notice-error { background: var(--danger-soft); color: var(--danger); }
.back { margin-bottom: 4px; font-size: .9rem; }
.stat-row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.stat { color: var(--text); }
.stat:hover { border-color: var(--primary); text-decoration: none; color: var(--text); }
.stat b { display: block; font-size: 1.6rem; color: var(--primary); }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table th, .table td { padding: 10px 14px; text-align: start; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table th { color: var(--muted); font-weight: 700; font-size: .85rem; }
.table tr:last-child td { border-bottom: 0; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--bg); color: var(--muted); font-size: .82rem; }
.badge-on { background: var(--primary-soft); color: var(--primary); }
.admin-login { min-height: 100dvh; display: grid; place-items: center; padding: 16px; }
.admin-login .card { width: 100%; max-width: 380px; }
.admin-login img { margin-bottom: 12px; }
.admin-login .error { margin-bottom: 12px; }

/* ---------- Status page (the asker's thread) ---------- */
.order-page h1 { margin-bottom: 16px; }
.order-code { margin: 0; color: var(--muted); font-size: .92rem; }
.order-code b { color: var(--text); }
.save-link { margin-bottom: 16px; background: var(--primary-soft); border-color: transparent; }
.save-link p { margin-bottom: 10px; }
.save-url { font-family: ui-monospace, Consolas, monospace; width: 100%; min-height: 44px; margin-bottom: 10px; padding: 8px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: #fff; font-size: .85rem; color: var(--muted); }
.thread { display: grid; gap: 12px; }
.status-card { border-inline-start: 4px solid var(--primary); }
.status-card p:last-child { margin-bottom: 0; }
.status-card form { margin-top: 8px; }
.tone-warn { border-inline-start-color: #d97706; }
.tone-ok { border-inline-start-color: #15803d; }
.tone-muted { border-inline-start-color: var(--border-strong); }
.status-badge { display: inline-block; margin-bottom: 6px; padding: 2px 12px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-weight: 700; font-size: .9rem; }
.tone-warn .status-badge { background: #fef3c7; color: #92400e; }
.tone-ok .status-badge { background: var(--ok-soft); color: #166534; }
.tone-muted .status-badge { background: var(--bg); color: var(--muted); }
.status-note { color: #92400e; font-size: .92rem; }
.msg { padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.msg header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; margin-bottom: 6px; font-size: .9rem; }
.msg time { color: var(--faint); font-size: .82rem; }
.msg-expert { border-color: var(--primary); box-shadow: var(--shadow); }
.msg-expert header b { color: var(--primary); }
.msg-customer, .msg-question { background: #fbfcfd; }
.msg-text { white-space: pre-line; overflow-wrap: anywhere; margin-bottom: .5em; }
.msg-text:last-child { margin-bottom: 0; }
.voice-play { display: block; width: 100%; height: 40px; margin: 6px 0; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.thumb img { width: 96px; height: 96px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.doc-list { margin: 6px 0; padding-inline-start: 1.2em; font-size: .92rem; }
.doc-list small { color: var(--faint); }
.work-line { margin: 8px 0 0; font-size: .9rem; }
.follow-up { margin-top: 16px; }
.follow-up h2 { font-size: 1.08rem; }
.follow-up .form-actions { margin-top: 10px; }
.fake-actions { justify-content: center; margin-top: 16px; }

/* ---------- Admin: orders ---------- */
.admin-sub { font-size: 1rem; color: var(--muted); margin: 20px 0 10px; }
.stat-alert b { color: var(--danger); }
.badge-info { background: var(--primary-soft); color: var(--primary); }
.badge-warn { background: #fef3c7; color: #92400e; }
.badge-ok { background: var(--ok-soft); color: #166534; }
.badge-alert { background: var(--danger-soft); color: var(--danger); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.filters select, .filters input { min-height: 44px; padding: 6px 10px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: #fff; }
.filters input { width: 180px; }
.cell-text { max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 16px; color: var(--muted); }
.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px 20px; margin: 0 0 16px; }
.info-grid dt { color: var(--faint); font-size: .82rem; }
.info-grid dd { margin: 0; }
.admin-thread { margin-bottom: 16px; }
.admin-cards { display: grid; gap: 12px; }
.admin-cards h2 { font-size: 1.05rem; }
.pay-list { margin: 0 0 12px; padding-inline-start: 1.2em; }

/* ---------- Experts: cards, profile, sign-up ---------- */
.avatar { width: 56px; height: 56px; flex: none; border-radius: 50%; object-fit: cover; background: var(--primary-soft); }
.avatar-lg { width: 96px; height: 96px; }
.avatar-letter { display: inline-grid; place-items: center; color: var(--primary); font-weight: 700; font-size: 1.4rem; }
.avatar-lg.avatar-letter { font-size: 2.2rem; }
.expert-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.expert-card { display: flex; align-items: center; gap: 12px; height: 100%; padding: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); }
.expert-card:hover { border-color: var(--primary); color: var(--text); text-decoration: none; box-shadow: var(--shadow); }
.expert-card span { display: grid; min-width: 0; }
.expert-card small { color: var(--muted); font-size: .88rem; line-height: 1.6; }
.profile-head { display: flex; align-items: center; gap: 16px; margin-bottom: 8px; }
.profile-head h1 { margin-bottom: .1em; }
.profile-head .lead { margin: 0; }
.profile-meta { color: var(--muted); font-size: .95rem; }
.badges { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; padding: 0; }
.profile-bio { margin-top: 8px; }
.check-group { border: 0; margin: 0 0 16px; padding: 0; display: grid; gap: 0 16px; }
.check-group legend { font-size: .9rem; font-weight: 700; padding: 0; margin-bottom: 4px; }
@media (min-width: 560px) { .check-group { grid-template-columns: 1fr 1fr; } .check-group legend, .check-group .error { grid-column: 1 / -1; } }
.join-form .btn-block { margin-top: 8px; }
.join-form .ask-rules { margin-top: 12px; }

/* ---------- Expert panel ---------- */
.panel-main { max-width: 760px; }
/* Mobile: logo and logout on the first row, the menu as one row under them. */
.panel-bar form { margin-inline-start: auto; }
.panel-bar nav { order: 3; flex: 1 0 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.panel-bar nav a { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
@media (min-width: 760px) { .panel-bar nav { order: 0; flex: 1 1 auto; } }
.count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--primary); color: #fff; font-size: .78rem; line-height: 1; }
.tabs { display: flex; gap: 4px; margin-bottom: 12px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--border); }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; color: var(--muted); border-bottom: 3px solid transparent; }
.tab:hover { color: var(--text); text-decoration: none; }
.tab[aria-current] { color: var(--primary); border-bottom-color: var(--primary); font-weight: 700; }
.inbox { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.inbox-item { display: grid; gap: 6px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); }
.inbox-item:hover { border-color: var(--primary); color: var(--text); text-decoration: none; }
.inbox-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: .92rem; }
.inbox-text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.inbox-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.inbox-tags time { margin-inline-start: auto; color: var(--faint); font-size: .82rem; }
.empty { padding: 24px 0; text-align: center; }
.panel-order-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 12px; margin-bottom: 12px; }
.panel-order-head p { margin: 0; }
.panel-title { font-size: 1.25rem; }
.claim { margin-top: 16px; }
.bale-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; background: var(--primary-soft); border-color: transparent; }
.bale-card p { margin: 0; }
.steps { margin: 0; padding-inline-start: 1.2em; }
.steps li { margin-bottom: 4px; }
.steps .is-done { color: #166534; list-style: none; margin-inline-start: -1.2em; }
.photo-card { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-bottom: 12px; }
.photo-card form { display: grid; gap: 8px; justify-items: start; flex: 1; min-width: 200px; }
.photo-card label.btn { cursor: pointer; }
.photo-card form:has(.file-input:focus-visible) label.btn { outline: 3px solid #f59e0b; outline-offset: 2px; }
.admin-main > .card + .card, .admin-main > .card + section { margin-top: 12px; }
.card > .admin-sub:first-child { margin-top: 0; }
.field-label { font-size: .9rem; font-weight: 700; }
.file-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.file-pick label.btn { cursor: pointer; }
.file-pick:has(.file-input:focus-visible) label.btn { outline: 3px solid #f59e0b; outline-offset: 2px; }
.file-pick small { color: var(--faint); font-size: .82rem; overflow-wrap: anywhere; min-width: 0; }
.doc-rows { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.doc-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.doc-row span { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pw { margin: 8px 0 16px; }
.pw summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; color: var(--primary); font-weight: 700; }
.radio-row { display: flex; flex-wrap: wrap; gap: 0 20px; }
.radio-row input { width: 20px; height: 20px; accent-color: var(--primary); }
.payout-form { display: flex; gap: 6px; align-items: center; }
.payout-form input { width: 130px; min-height: 40px; padding: 4px 8px; border: 1px solid var(--border-strong); border-radius: 10px; }
.table td small { display: block; margin-top: 4px; font-size: .78rem; }

/* ---------- How it works (hub) ---------- */
.how { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); counter-reset: how; }
.how li { counter-increment: how; display: grid; grid-template-columns: 36px 1fr; column-gap: 12px; align-items: center; padding: 16px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.how li::before { content: counter(how, persian); display: inline-grid; place-items: center; grid-row: span 2; align-self: start; width: 36px; height: 36px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.how h3 { margin: 0 0 .2em; }
.how p { margin: 0; color: var(--muted); font-size: .92rem; }

/* ---------- Question pages (SPEC §13) ---------- */
.qa { padding-top: 16px; }
.qa-topic { margin-bottom: 6px; font-size: .92rem; }
.qa-topic .badge { margin-inline-start: 6px; }
.qa-question { padding: 16px 18px; margin-bottom: 16px; background: #fbfcfd; border: 1px solid var(--border); border-radius: var(--radius); }
.qa-question .prose p:last-child { margin-bottom: 0; }
.qa-answer { padding: 18px; background: var(--surface); border: 1px solid var(--primary); border-radius: var(--radius); box-shadow: var(--shadow); }
.qa-answer h2 { font-size: 1.15rem; margin-bottom: 12px; }
.qa-answer .prose h2 { font-size: 1.08rem; }
.qa-expert { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; color: var(--text); }
a.qa-expert:hover { color: var(--text); text-decoration: none; }
a.qa-expert:hover b { color: var(--primary); }
.qa-expert > span:last-child { display: grid; min-width: 0; line-height: 1.6; }
.qa-expert small { color: var(--muted); font-size: .88rem; }
.qa-meta { margin: 8px 0 0; color: var(--faint); font-size: .85rem; }
.qa-more { margin: 16px 0 0; font-weight: 700; }
.qa-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.narrow .qa-grid { grid-template-columns: 1fr; }
.qa-card { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 16px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); transition: border-color .15s, box-shadow .15s; }
.qa-card:hover { border-color: var(--primary); box-shadow: var(--shadow); color: var(--text); text-decoration: none; }
.qa-card h3 { margin: 0; font-size: 1.02rem; }
.qa-card p { margin: 0; flex: 1; color: var(--muted); font-size: .92rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.qa-card-meta { color: var(--primary); font-size: .85rem; font-weight: 700; }
.preview-bar { margin: 16px 0 0; background: #fef3c7; color: #92400e; }

/* ---------- Admin: pages from questions ---------- */
.demo-card { margin-bottom: 16px; background: #fffbeb; border-color: #fde68a; }
.demo-card p { margin-bottom: 10px; }
.demo-add { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 16px; }
.pick-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.pick { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.pick:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.pick > input { flex: none; width: 22px; height: 22px; margin-top: 4px; accent-color: var(--primary); }
.pick-body { min-width: 0; flex: 1; }
.pick-text { display: block; cursor: pointer; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pick-meta { margin: 4px 0 0; color: var(--faint); font-size: .85rem; }
.sticky-actions { position: sticky; bottom: 0; padding: 12px 0; background: var(--bg); border-top: 1px solid var(--border); }
.admin-form > h2 + .field-row { margin-top: 0; }
.filters .check input { width: 20px; min-height: 0; padding: 0; }
