/* /porsesh/ — «پرسش و پاسخ» archive. Builds on styles.css tokens (light default, [data-theme=dark] overrides). */
.ps-body-page { background: var(--bg); }

/* topic hues: one quiet colour per topic, used for the chip dot and the card's topic label */
.t-taharat { --th: 190; } .t-namaz { --th: 145; } .t-rouzeh { --th: 35; } .t-zakat { --th: 95; }
.t-hajj { --th: 25; } .t-family { --th: 330; } .t-money { --th: 210; } .t-inherit { --th: 260; }
.t-death { --th: 230; } .t-food { --th: 15; } .t-quran { --th: 160; } .t-aqideh { --th: 280; }
.t-seerah { --th: 45; } .t-madhhab { --th: 300; } .t-politics { --th: 0; } .t-other { --th: 220; }

/* ---------- hero ---------- */
.ps-hero { position: relative; padding: 30px 0 22px; background: var(--glow); border-bottom: 1px solid var(--border-soft); overflow: hidden; }
.ps-hero::after {   /* a big, faint question mark — the section's mark */
  content: "؟"; position: absolute; inset-inline-end: -10px; top: -70px; font-size: 300px; line-height: 1;
  font-weight: 800; color: var(--accent); opacity: .06; pointer-events: none;
}
[dir="ltr"] .ps-hero::after { content: "?"; }
.ps-hero-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; position: relative; z-index: 1; }
.ps-hero-txt { max-width: 720px; }
.ps-eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 800; color: var(--accent); }
.ps-eyebrow svg { width: 18px; height: 18px; fill: currentColor; }
.ps-hero h1 { margin: 6px 0 6px; font-size: clamp(1.6rem, 4vw, 2.6rem); font-weight: 800; line-height: 1.3; }
.ps-lede { margin: 0; color: var(--text-dim); font-size: 1rem; line-height: 1.9; }

.ps-by { display: flex; align-items: center; gap: 10px; }
.ps-by img { border-radius: 50%; background: var(--surface); border: 1px solid var(--border); padding: 5px; object-fit: contain; }
.ps-by b { display: block; font-size: .98rem; font-weight: 800; }
.ps-by span { display: block; font-size: .8rem; color: var(--text-mute); }
.ps-by-hero { background: var(--surface); border: 1px solid var(--border); border-radius: 99px; padding: 6px 8px 6px 18px; box-shadow: var(--shadow); }
[dir="ltr"] .ps-by-hero { padding: 6px 18px 6px 8px; }

/* search */
.ps-search {
  position: relative; z-index: 1; display: flex; align-items: center; gap: 6px; margin-top: 22px;
  background: var(--surface); border: 2px solid var(--border); border-radius: 18px; padding: 6px;
  box-shadow: 0 10px 30px -12px rgba(0, 0, 0, .25); transition: border-color .2s, box-shadow .2s;
}
.ps-search:focus-within { border-color: var(--green); box-shadow: 0 0 0 5px var(--green-wash), 0 10px 30px -12px rgba(0, 0, 0, .25); }
.ps-search-ico { width: 24px; height: 24px; fill: var(--text-mute); margin-inline: 10px 2px; flex: none; }
.ps-search input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text);
  font: inherit; font-size: 1.12rem; padding: 12px 4px;
}
.ps-search input::placeholder { color: var(--text-mute); }
.ps-search input::-webkit-search-cancel-button { display: none; }
.ps-clear { border: 0; background: var(--surface-2); color: var(--text-dim); width: 34px; height: 34px; border-radius: 50%; font-size: 1.3rem; cursor: pointer; flex: none; }
.ps-go {
  border: 0; cursor: pointer; flex: none; font: inherit; font-weight: 800; font-size: 1rem;
  background: var(--green); color: #1B1E15; padding: 12px 26px; border-radius: 13px;
}
.ps-go:hover { filter: brightness(1.05); }

.ps-stats { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 8px 26px; margin: 18px 0 0; }
.ps-stats div { display: flex; align-items: baseline; gap: 6px; }
.ps-stats dt { font-size: 1.35rem; font-weight: 800; color: var(--text); }
.ps-stats dd { margin: 0; font-size: .85rem; color: var(--text-mute); }

/* ---------- filters bar ---------- */
.ps-main { padding-block: 18px 30px; }
.ps-bar { position: sticky; top: 0; z-index: 5; background: var(--bg); padding: 10px 0; margin-bottom: 8px; border-bottom: 1px solid var(--border-soft); }
.ps-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.ps-chips::-webkit-scrollbar { display: none; }
.ps-chip {
  flex: none; display: inline-flex; align-items: center; gap: 7px; cursor: pointer; font: inherit; font-size: .88rem; font-weight: 700;
  background: var(--surface); color: var(--text-dim); border: 1px solid var(--border); border-radius: 99px; padding: 7px 14px;
  transition: background .15s, color .15s, border-color .15s;
}
.ps-chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: hsl(var(--th, 80) 55% 50%); }
.ps-chip[data-t=""]::before { display: none; }
.ps-chip i { font-style: normal; font-weight: 600; font-size: .76rem; color: var(--text-mute); }
.ps-chip:hover { border-color: var(--hover-border); color: var(--text); }
.ps-chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.ps-chip.on i { color: inherit; opacity: .7; }
.ps-chip.zero { opacity: .45; }
.ps-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.ps-count { font-size: .9rem; font-weight: 800; color: var(--text-dim); }
.ps-sort { display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--text-mute); }
.ps-sort select { font: inherit; font-size: .86rem; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 6px 10px; }

/* ---------- cards ---------- */
.ps-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.ps-card {
  display: flex; gap: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 10px; transition: border-color .15s, transform .15s, box-shadow .15s; min-width: 0;
  animation: ps-in .35s ease both;
}
.ps-card:hover { border-color: var(--hover-border); transform: translateY(-2px); box-shadow: var(--shadow); }
@keyframes ps-in { from { opacity: 0; transform: translateY(6px); } }
.ps-thumb { position: relative; flex: none; width: 176px; aspect-ratio: 16 / 9; border-radius: var(--r-sm); overflow: hidden; background: #111; align-self: flex-start; }
.ps-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.ps-card:hover .ps-thumb img { transform: scale(1.05); }
.ps-dur { position: absolute; inset-block-end: 6px; inset-inline-start: 6px; background: rgba(0, 0, 0, .78); color: #fff; font-size: .74rem; font-weight: 700; padding: 1px 7px; border-radius: 6px; direction: ltr; }
.ps-play { position: absolute; inset: 0; margin: auto; width: 38px; height: 38px; border-radius: 50%; background: rgba(0, 0, 0, .5); backdrop-filter: blur(2px); opacity: 0; transition: opacity .2s; }
.ps-play::after { content: ""; position: absolute; inset: 0; margin: auto; width: 0; height: 0; border-block: 7px solid transparent; border-left: 12px solid #fff; transform: translateX(2px); }
.ps-card:hover .ps-play { opacity: 1; }
.ps-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1; padding-block: 2px; }
.ps-topic { align-self: flex-start; font-size: .72rem; font-weight: 800; text-decoration: none; color: hsl(var(--th, 80) 55% 32%); background: hsl(var(--th, 80) 60% 50% / .12); padding: 2px 9px; border-radius: 99px; }
[data-theme="dark"] .ps-topic { color: hsl(var(--th, 80) 70% 72%); background: hsl(var(--th, 80) 60% 50% / .18); }
.ps-q { margin: 0; font-size: 1rem; font-weight: 700; line-height: 1.75; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; text-align: start; }
[dir="ltr"] .ps-q { text-align: right; }
.ps-q a { color: var(--text); text-decoration: none; }
.ps-q a:hover { color: var(--headline-hover); }
.ps-q mark { background: hsl(78 70% 52% / .35); color: inherit; border-radius: 3px; padding: 0 1px; }
.ps-meta { margin-top: auto; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .78rem; color: var(--text-mute); }
.ps-meta > * + *::before { content: "|"; margin-inline-end: 14px; opacity: .5; }

.ps-more-row { display: flex; justify-content: center; margin-top: 20px; }
.ps-empty { text-align: center; padding: 40px 16px; background: var(--surface); border: 1px dashed var(--border); border-radius: var(--r-lg); }
.ps-empty h2 { margin: 0 0 8px; font-size: 1.15rem; }
.ps-empty p { margin: 0 auto 16px; max-width: 520px; color: var(--text-dim); line-height: 1.9; }
.ps-foot-note { margin: 22px 0 0; text-align: center; font-size: .82rem; color: var(--text-mute); }
.ps-foot-note a { color: var(--accent); }

/* buttons */
.ps-btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font: inherit; font-weight: 800; font-size: .92rem; text-decoration: none;
  background: var(--green); color: #1B1E15; border: 1px solid transparent; padding: 10px 20px; border-radius: 12px;
}
.ps-btn svg { width: 18px; height: 18px; fill: currentColor; }
.ps-btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.ps-btn-ghost:hover { border-color: var(--hover-border); }
.ps-btn-tg { background: var(--surface); color: var(--text); border-color: var(--border); font-weight: 700; }   /* secondary: the website player comes first (owner 11-05) */
.ps-btn-tg svg { fill: #2AABEE; }
.ps-btn-tg:hover { border-color: var(--hover-border); }

/* ---------- one clip ---------- */
.ps-clip { padding-block: 16px 34px; }
.ps-crumbs { display: flex; gap: 8px; font-size: .82rem; color: var(--text-mute); margin-bottom: 12px; }
.ps-crumbs a { color: var(--text-dim); text-decoration: none; }
.ps-clip-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.ps-player { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow); }
.ps-player .ps-poster { width: 100%; height: 100%; object-fit: cover; display: block; filter: brightness(.8); }
.ps-player iframe, .ps-player video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.ps-fallback { position: absolute; inset: 0; margin: auto; width: max-content; height: max-content; }
.ps-bigplay { position: absolute; inset: 0; margin: auto; width: 78px; height: 78px; border-radius: 50%; border: 0; cursor: pointer; background: var(--green); box-shadow: 0 0 0 10px rgba(168, 214, 46, .25); transition: transform .15s; }
.ps-bigplay::after { content: ""; position: absolute; inset: 0; margin: auto; width: 0; height: 0; border-block: 14px solid transparent; border-left: 22px solid #1B1E15; transform: translateX(3px); }
.ps-bigplay:hover { transform: scale(1.06); }
.ps-player .ps-dur { inset-block-end: 12px; inset-inline-start: 12px; font-size: .85rem; }
.ps-tgnote { margin: 10px 2px 0; font-size: .8rem; color: var(--text-mute); line-height: 1.8; }
.ps-answer { display: flex; flex-direction: column; gap: 14px; }
.ps-kicker { font-size: .82rem; font-weight: 700; color: var(--text-mute); display: flex; align-items: center; gap: 8px; }
.ps-h1 { margin: 0; font-size: clamp(1.25rem, 2.6vw, 1.8rem); font-weight: 800; line-height: 1.65; }
.ps-meta-lg { font-size: .86rem; margin-top: 0; }
.ps-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.ps-related { margin-top: 30px; }
.ps-h2 { margin: 0 0 12px; font-size: 1.15rem; font-weight: 800; }
.ps-empty-page { padding-block: 60px; text-align: center; display: grid; gap: 16px; justify-items: center; }

@media (max-width: 960px) {
  .ps-grid { grid-template-columns: minmax(0, 1fr); }
  .ps-clip-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .ps-hero { padding-top: 20px; }
  .ps-hero::after { font-size: 200px; top: -40px; }
  .ps-by-hero { padding: 5px 14px 5px 6px; }
  .ps-search { border-radius: 14px; margin-top: 16px; }
  .ps-search input { font-size: 1rem; padding: 10px 2px; }
  .ps-search-ico { display: none; }
  .ps-go { padding: 10px 16px; }
  .ps-stats { gap: 6px 18px; } .ps-stats dt { font-size: 1.1rem; }
  .ps-thumb { width: 118px; }
  .ps-card { gap: 10px; padding: 8px; }
  .ps-q { font-size: .93rem; line-height: 1.7; }
  .ps-play { display: none; }
}
@media (prefers-reduced-motion: reduce) { .ps-card { animation: none; } .ps-card, .ps-thumb img { transition: none; } }

/* ---------- reviewed answer: short answer, points, sources, transcript ---------- */
.ps-short { background: var(--green-wash); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 14px 16px; }
.ps-short-h { margin: 0 0 6px; font-size: .85rem; font-weight: 800; color: var(--accent); }
.ps-short p { margin: 0; font-size: 1.02rem; line-height: 2; color: var(--text); }
.ps-detail { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 16px; margin-top: 22px; }
.ps-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 16px 18px; }
.ps-box ul { margin: 0; padding-inline-start: 20px; display: grid; gap: 8px; line-height: 1.9; }
.ps-refs blockquote { margin: 0 0 4px; font-size: 1.25rem; line-height: 2.2; font-family: "Amiri Quran", "Scheherazade New", serif; }
.ps-refs a, .ps-src { font-size: .86rem; color: var(--accent); }
.ps-asks { color: var(--text-dim); }
.ps-text { grid-column: 1 / -1; }
.ps-text summary { cursor: pointer; margin: 0; }
.ps-text p { line-height: 2.1; margin: 12px 0 0; }
@media (max-width: 960px) { .ps-has-answer .ps-answer { order: -1; } }
