/* سایت عمومی کتابخانه مدیریت — موبایل‌اول، سبک و سریع */
@font-face { font-family: "Vazirmatn"; src: url("../fonts/Vazirmatn.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --night: #0B2A2E;
  --night-2: #12393D;
  --teal: #146B66;
  --teal-soft: #DCEDEA;
  --saffron: #E3A23B;
  --saffron-deep: #C98A22;
  --mist: #F4F6F5;
  --card: #FFFFFF;
  --ink: #15201F;
  --muted: #566664;
  --line: #DCE3E1;
  --radius: 14px;
  --wrap: 1180px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body.site { margin: 0; font-family: "Vazirmatn", Tahoma, sans-serif; background: var(--mist); color: var(--ink); font-size: 16px; line-height: 1.95; overflow-x: clip; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.5; margin: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; right: 16px; top: -60px; background: var(--saffron); color: var(--night); padding: 8px 14px; border-radius: 8px; z-index: 100; font-weight: 700; }
.skip:focus { top: 10px; }
:focus-visible { outline: 3px solid var(--saffron); outline-offset: 3px; border-radius: 6px; }
.lead { color: var(--muted); font-size: clamp(15px, 1.4vw, 18px); max-width: 46em; }

/* ---------- دکمه‌ها ---------- */
.s-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 10px 22px; border-radius: 12px; font-weight: 800; font-size: 15px; text-decoration: none; border: 2px solid transparent; transition: background .2s, color .2s, border-color .2s; white-space: nowrap; cursor: pointer; font-family: inherit; }
.s-btn-sm { min-height: 38px; padding: 6px 14px; font-size: 14px; border-radius: 10px; }
.s-btn-accent { background: var(--saffron); color: var(--night); }
.s-btn-accent:hover { background: var(--saffron-deep); }
.s-btn-line { border-color: currentColor; color: var(--night); background: transparent; }
.s-btn-line:hover { background: var(--night); color: #fff; border-color: var(--night); }
.s-btn-ghost { color: #fff; border-color: rgba(255,255,255,.4); }
.s-btn-ghost:hover { background: rgba(255,255,255,.12); }

/* ---------- سربرگ ---------- */
.s-nav { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; background: rgba(244,246,245,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.s-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 900; color: var(--night); font-size: 17px; }
.s-logo img { width: 36px; height: 36px; border-radius: 9px; }
.s-links { display: flex; align-items: center; gap: 4px; }
.s-links > a { padding: 8px 12px; border-radius: 9px; text-decoration: none; color: var(--muted); font-size: 15px; }
.s-links > a:hover { color: var(--night); background: #E6ECEA; }
.s-auth { display: flex; gap: 8px; margin-inline-start: 8px; }
.s-menu { display: none; width: 44px; height: 44px; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 11px 10px; cursor: pointer; flex-direction: column; justify-content: space-between; }
.s-menu span { display: block; height: 2px; background: var(--night); border-radius: 2px; }

/* ---------- اسلایدر ---------- */
.hero { position: relative; background: var(--night); color: #fff; overflow: hidden; isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background: radial-gradient(800px 420px at 85% 0%, #1D5A57 0%, transparent 60%), radial-gradient(600px 400px at 0% 100%, #3B3416 0%, transparent 60%); }
.slides { display: grid; }
.slide { grid-area: 1 / 1; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; gap: clamp(24px, 4vw, 56px);
  max-width: var(--wrap); width: 100%; margin: 0 auto; padding: clamp(40px, 6vw, 80px) 16px clamp(92px, 9vw, 120px);
  opacity: 0; visibility: hidden; transition: opacity .7s ease, visibility .7s; }
.slide.is-active { opacity: 1; visibility: visible; }
.slide-title { font-size: clamp(30px, 4.4vw, 54px); font-weight: 900; line-height: 1.4; margin: 0 0 16px; letter-spacing: -.3px; }
.slide-desc { font-size: clamp(16px, 1.5vw, 19px); color: #C9DAD7; max-width: 30em; margin: 0 0 28px; }
.slide-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.slide-art img { width: 100%; border-radius: 20px; box-shadow: 0 30px 60px -25px rgba(0,0,0,.6); aspect-ratio: 4 / 3; object-fit: cover; background: var(--night-2); }
.hero-ctrl { position: absolute; bottom: 64px; inset-inline: 0; display: flex; justify-content: center; align-items: center; gap: 12px; }
.arr { width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,.3); background: rgba(255,255,255,.06); cursor: pointer; display: grid; place-items: center; }
.arr svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.arr:hover { background: rgba(255,255,255,.16); }
.pause[aria-pressed="true"] { background: var(--saffron); border-color: var(--saffron); }
.pause[aria-pressed="true"] svg { stroke: var(--night); }
.dots { display: flex; gap: 8px; }
.dots { gap: 2px; }
.dot { position: relative; width: 24px; height: 24px; border: 0; padding: 0; background: none; cursor: pointer; }
.dot::before { content: ""; position: absolute; top: 7px; inset-inline-start: 7px; width: 10px; height: 10px; border-radius: 10px; background: rgba(255,255,255,.35); transition: width .3s, background .3s; }
.dot[aria-current="true"] { width: 44px; }
.dot[aria-current="true"]::before { width: 30px; background: var(--saffron); }

/* ---------- آمار ---------- */
.stats { position: relative; z-index: 2; max-width: var(--wrap); margin: -44px auto 0; padding: 0 16px; }
.stats dl { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); background: var(--card); border-radius: var(--radius); box-shadow: 0 18px 40px -22px rgba(11,42,46,.35); }
.stats div { padding: 20px 12px; text-align: center; display: flex; flex-direction: column-reverse; }
.stats div + div { border-inline-start: 1px solid var(--line); }
.stats dt { color: var(--muted); font-size: 14px; }
.stats dd { margin: 0; font-size: clamp(24px, 3vw, 34px); font-weight: 900; color: var(--night); line-height: 1.3; }

/* ---------- بخش‌ها ---------- */
main > section { padding: clamp(56px, 8vw, 96px) 0 0; }
main > section h2 { font-size: clamp(24px, 3vw, 36px); font-weight: 900; color: var(--night); margin-bottom: 12px; }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.sec-head a { color: var(--teal); font-weight: 700; }

/* مقایسه */
.why h2 { max-width: 24em; }
.duel { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 32px 0 8px; }
.duel-q { grid-column: 1 / -1; margin: 0; background: var(--night); color: #fff; border-radius: var(--radius); padding: 16px 20px; font-size: 17px; font-weight: 700; }
.duel-q span { display: block; font-size: 13px; color: var(--saffron); font-weight: 600; }
.duel-card { border-radius: var(--radius); padding: 20px 22px; }
.duel-card h3 { font-size: 15px; margin-bottom: 8px; }
.duel-card p { margin: 0 0 10px; }
.duel-generic { background: #E9EDEC; color: #4B5755; }
.duel-library { background: var(--card); border: 2px solid var(--teal); box-shadow: 0 16px 36px -24px rgba(20,107,102,.55); }
.duel-library h3 { color: var(--teal); }
.duel-src { font-size: 13.5px; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 10px; margin-top: 4px !important; }
.duel-note { grid-column: 1 / -1; font-size: 13px; color: var(--muted); margin: 0; }
.cite { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 4px; border-radius: 6px; background: var(--saffron); color: var(--night); font-size: 12px; font-weight: 800; vertical-align: 2px; }
.reasons { list-style: none; margin: 36px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px 32px; }
.reasons li { display: grid; grid-template-columns: 44px 1fr; gap: 4px 14px; }
.reasons svg { grid-row: span 2; width: 44px; height: 44px; padding: 10px; border-radius: 12px; background: var(--teal-soft); fill: none; stroke: var(--teal); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.reasons h3 { font-size: 17px; color: var(--night); }
.reasons p { margin: 0; color: var(--muted); font-size: 15px; }
.table-scroll { overflow-x: auto; margin-top: 40px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.compare { width: 100%; border-collapse: collapse; min-width: 540px; font-size: 15px; }
.compare caption { text-align: start; padding: 16px 20px 6px; color: var(--muted); font-size: 14px; }
.compare th, .compare td { padding: 14px 20px; text-align: start; border-top: 1px solid var(--line); vertical-align: top; }
.compare thead th { background: #F8FAF9; font-size: 14px; color: var(--muted); }
.compare thead th:last-child { color: var(--teal); }
.compare tbody th { font-weight: 700; color: var(--night); width: 26%; }
.compare td:last-child { background: #F5FAF9; font-weight: 600; }
.yes { color: var(--teal); font-weight: 800; }
.yes::before { content: "✓ "; }
.no { color: #A0553B; }

/* موضوع‌ها */
.topic-grid { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.topic-grid a { display: flex; flex-direction: column; justify-content: space-between; min-height: 96px; padding: 16px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); text-decoration: none; transition: border-color .2s, transform .2s; }
.topic-grid a:hover { border-color: var(--teal); transform: translateY(-2px); }
.topic-grid span { font-weight: 800; color: var(--night); line-height: 1.6; }
.topic-grid small { color: var(--muted); }

/* کتاب‌ها */
.book-row { list-style: none; margin: 20px 0 0; padding: 0 0 12px; display: grid; grid-auto-flow: column; grid-auto-columns: 168px; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; }
.book-row li { scroll-snap-align: start; }
.book-grid { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 22px 18px; }
.book a { display: flex; flex-direction: column; gap: 4px; text-decoration: none; }
.book img { width: 100%; aspect-ratio: 180 / 260; object-fit: cover; border-radius: 6px 10px 10px 6px; background: linear-gradient(135deg, var(--teal), var(--night)); box-shadow: 0 12px 24px -14px rgba(11,42,46,.55); transition: transform .2s; }
.book img.nocover { opacity: .9; }
.book a:hover img { transform: translateY(-3px); }
.book-title { font-weight: 800; font-size: 14.5px; color: var(--night); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 6px; }
.book-meta { font-size: 13px; color: var(--muted); }
.empty { color: var(--muted); }

/* مراحل */
.how-steps { list-style: none; counter-reset: s; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.how-steps li { counter-increment: s; background: var(--card); border-radius: var(--radius); padding: 22px; border: 1px solid var(--line); }
.how-steps li::before { content: counter(s, persian); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--night); color: var(--saffron); font-weight: 900; margin-bottom: 12px; }
.how-steps h3 { font-size: 18px; color: var(--night); }
.how-steps p { margin: 4px 0 0; color: var(--muted); }
.sample-q { margin-top: 40px; }
.sample-q h3 { font-size: 18px; color: var(--night); margin-bottom: 12px; }
.sample-q ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.sample-q a { display: inline-block; padding: 8px 16px; border-radius: 30px; background: var(--teal-soft); color: var(--night); text-decoration: none; font-size: 14.5px; }
.sample-q a:hover { background: var(--teal); color: #fff; }

/* مشارکت */
.contrib-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 32px; align-items: center; background: var(--night); color: #E3EFED; border-radius: 22px; padding: clamp(28px, 4vw, 52px); }
.contribute h2 { color: #fff !important; }
.contribute p { color: #C9DAD7; max-width: 34em; }
.contribute b { color: var(--saffron); }
.contrib-art { position: relative; display: flex; justify-content: center; align-items: flex-end; gap: 10px; min-height: 180px; }
.cbook { width: 54px; border-radius: 4px 8px 8px 4px; background: linear-gradient(180deg, #E6EFEC, #BFD3CF); box-shadow: inset 6px 0 0 rgba(11,42,46,.18); }
.cbook:nth-child(1) { height: 150px; } .cbook:nth-child(2) { height: 128px; background: linear-gradient(180deg, #F2D49B, #E3A23B); } .cbook:nth-child(3) { height: 160px; }
.ctag { position: absolute; top: 0; inset-inline-start: 8%; width: 92px; height: 92px; border-radius: 50%; background: var(--saffron); color: var(--night); display: grid; place-content: center; text-align: center; font-weight: 900; font-size: 26px; line-height: 1.1; transform: rotate(-10deg); box-shadow: 0 10px 24px -10px rgba(0,0,0,.5); }
.ctag small { font-size: 13px; font-weight: 700; }

/* تعرفه */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin-top: 20px; }
.plan { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; display: flex; flex-direction: column; gap: 6px; }
.plan-featured { border: 2px solid var(--teal); box-shadow: 0 20px 40px -26px rgba(20,107,102,.6); }
.plan h3 { font-size: 19px; color: var(--night); }
.plan-price { margin: 4px 0; }
.plan-price b { font-size: 36px; font-weight: 900; color: var(--night); }
.plan-price span { color: var(--muted); }
.plan-desc { color: var(--muted); margin: 0 0 12px; flex: 1; }

/* پرسش‌های رایج */
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 0; font-weight: 800; font-size: 17px; color: var(--night); display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--teal); font-size: 24px; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 18px; color: #3F4D4B; max-width: 48em; }

.final { padding-bottom: clamp(56px, 8vw, 96px) !important; }
.final-in { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; border-top: 2px solid var(--night); padding-top: 32px; }
.final h2 { margin: 0 !important; }

/* ---------- صفحات کتاب ---------- */
.page { padding: 28px 0 72px; }
.page h1 { font-size: clamp(26px, 3.4vw, 38px); font-weight: 900; color: var(--night); }
.crumbs { display: flex; gap: 8px; font-size: 14px; color: var(--muted); margin-bottom: 14px; flex-wrap: wrap; }
.crumbs a { color: var(--teal); }
.book-search { display: flex; gap: 8px; margin: 16px 0; max-width: 520px; }
.book-search input { flex: 1; min-width: 0; min-height: 44px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; font: inherit; background: #fff; }
.topic-links { display: flex; gap: 8px; flex-wrap: wrap; }
.topic-links a { padding: 6px 14px; border-radius: 30px; border: 1px solid var(--line); background: #fff; text-decoration: none; font-size: 14px; }
.topic-links a[aria-current="page"] { background: var(--night); color: #fff; border-color: var(--night); }
.book-page { display: grid; grid-template-columns: 240px 1fr; gap: 36px; margin-top: 12px; }
.book-cover { width: 240px; border-radius: 8px 14px 14px 8px; box-shadow: 0 24px 40px -22px rgba(11,42,46,.6); background: linear-gradient(135deg, var(--teal), var(--night)); aspect-ratio: 240 / 346; object-fit: cover; }
.book-facts { display: flex; gap: 28px; flex-wrap: wrap; margin: 12px 0; }
.book-facts div { display: flex; flex-direction: column-reverse; }
.book-facts dt { font-size: 13px; color: var(--muted); }
.book-facts dd { margin: 0; font-weight: 800; color: var(--night); }
.book-desc { color: #3F4D4B; max-width: 40em; }
.book-page h2 { font-size: 20px; color: var(--night); margin: 28px 0 10px; }
.q-list { padding-inline-start: 20px; }
.q-list a { color: var(--teal); }
.page section h2 { font-size: 22px; color: var(--night); margin-top: 48px; }

/* ---------- پاورقی ---------- */
.s-foot { background: var(--night); color: #B9CCC9; padding: 48px 16px 24px; }
.s-foot-grid { max-width: var(--wrap); margin: 0 auto; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.s-foot h2 { color: #fff; font-size: 16px; margin-bottom: 10px; }
.s-foot nav { display: flex; flex-direction: column; gap: 6px; }
.s-foot a { color: #DCE9E6; text-decoration: none; }
.s-foot a:hover { color: var(--saffron); }
.s-logo-light { color: #fff; margin-bottom: 8px; }
.s-foot-social a { margin-inline-end: 14px; }
.s-trust img { background: #fff; border-radius: 8px; padding: 4px; }
.s-foot-copy { max-width: var(--wrap); margin: 32px auto 0; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.12); font-size: 13px; color: #8FA6A2; }

/* ---------- واکنش‌گرا ---------- */
@media (max-width: 1024px) {
  .topic-grid { grid-template-columns: repeat(3, 1fr); }
  .reasons { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .s-menu { display: flex; }
  .s-links { position: absolute; top: 100%; inset-inline: 0; flex-direction: column; align-items: stretch; gap: 0; background: #fff; border-bottom: 1px solid var(--line); padding: 8px 16px 16px; display: none; box-shadow: 0 20px 30px -20px rgba(0,0,0,.3); }
  .s-links.open { display: flex; }
  .s-links > a { padding: 12px 8px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .s-auth { margin: 12px 0 0; }
  .s-auth .s-btn { flex: 1; }
  .slide { grid-template-columns: 1fr; text-align: start; padding-top: 24px; padding-bottom: 128px; gap: 20px; }
  .slide-art { order: -1; }
  .slide-art img { aspect-ratio: 16 / 9; border-radius: 14px; }
  .hero-ctrl { bottom: 58px; }
  .stats dl { grid-template-columns: repeat(2, 1fr); }
  .stats div:nth-child(odd) { border-inline-start: 0; }
  .stats div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .duel { grid-template-columns: 1fr; }
  .how-steps { grid-template-columns: 1fr; }
  .contrib-grid { grid-template-columns: 1fr; }
  .contrib-art { min-height: 150px; }
  .s-foot-grid { grid-template-columns: 1fr; }
  .book-page { grid-template-columns: 1fr; }
  .book-cover { width: 180px; }
}
@media (max-width: 560px) {
  .topic-grid { grid-template-columns: repeat(2, 1fr); }
  .reasons { grid-template-columns: 1fr; }
  .slide-cta .s-btn { flex: 1; }
  .book-row { grid-auto-columns: 136px; }
  .final-in .s-btn { width: 100%; }
}

/* ===== دو حالت پرسش: کتابخانه اصلی / کتابخانه شخصی ===== */
.modes { padding: clamp(48px, 7vw, 88px) 0; background: linear-gradient(180deg, var(--teal-soft) 0%, transparent 100%); }
.mode-switch { display: inline-flex; gap: 4px; padding: 5px; margin: 8px 0 22px; border-radius: 999px; background: #fff; border: 1px solid var(--line); box-shadow: 0 6px 20px rgba(11,42,46,.06); }
.mode-switch span { padding: 8px 16px; border-radius: 999px; font-weight: 700; font-size: 14px; color: var(--muted); }
.mode-switch span.on { background: var(--night); color: #fff; animation: modeflip 6s infinite; }
.mode-switch span:last-child { animation: modeflip2 6s infinite; }
@keyframes modeflip { 0%, 45% { background: var(--night); color: #fff; } 50%, 95% { background: transparent; color: var(--muted); } }
@keyframes modeflip2 { 0%, 45% { background: transparent; color: var(--muted); } 50%, 95% { background: var(--saffron); color: var(--night); } }
.mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.mode-card { background: var(--card); border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px); padding: clamp(20px, 3vw, 30px); display: flex; flex-direction: column; }
.mode-card h3 { font-size: 22px; color: var(--night); margin: 6px 0 6px; }
.mode-card p { color: var(--muted); margin: 0 0 12px; }
.mode-card ul { margin: 0 0 20px; padding: 0; list-style: none; display: grid; gap: 8px; }
.mode-card li { padding-inline-start: 26px; position: relative; line-height: 1.8; }
.mode-card li::before { content: ""; position: absolute; inset-inline-start: 4px; top: .7em; width: 10px; height: 6px; border-inline-start: 2px solid var(--teal); border-bottom: 2px solid var(--teal); transform: rotate(-45deg); }
.mode-card .s-btn { margin-top: auto; align-self: flex-start; }
.mode-ico { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 26px; background: var(--teal-soft); }
.mode-mine { background: var(--night); border-color: var(--night); }
.mode-mine h3 { color: #fff; }
.mode-mine p, .mode-mine li { color: #C9DAD7; }
.mode-mine b { color: var(--saffron); }
.mode-mine li::before { border-color: var(--saffron); }
.mode-mine .mode-ico { background: rgba(227,162,59,.16); }

/* قفسه‌ها با تصویر و توضیح */
.topic-grid li.has-img a { padding: 0 0 14px; overflow: hidden; justify-content: flex-start; gap: 4px; }
.topic-grid li.has-img img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; display: block; margin-bottom: 8px; }
.topic-grid li.has-img span, .topic-grid li.has-img em, .topic-grid li.has-img small { padding: 0 14px; }
.topic-grid em { font-style: normal; font-size: 13px; color: var(--muted); line-height: 1.7; display: block; margin: 2px 0 6px; }
.topic-hero { display: flex; gap: 20px; align-items: center; margin: 4px 0 18px; padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.topic-hero img { width: min(260px, 40%); height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; flex-shrink: 0; }
.topic-hero p { margin: 0; color: var(--muted); line-height: 2; }
@media (max-width: 760px) {
  .mode-grid { grid-template-columns: 1fr; }
  .topic-hero { flex-direction: column; align-items: stretch; }
  .topic-hero img { width: 100%; }
}

/* ===== زنجیره ارزش پورتر: خانه‌ها و آجرچینی کتاب‌ها ===== */
.valuechain { padding: clamp(48px, 7vw, 88px) 0; }
.vc { display: grid; grid-template-columns: 1fr 64px; gap: 0; margin-top: 22px; filter: drop-shadow(0 10px 30px rgba(11,42,46,.08)); }
.vc-body { background: var(--card); border: 1px solid var(--line); border-inline-end: 0; border-radius: 18px 0 0 18px; border-start-start-radius: 18px; border-end-start-radius: 18px; border-start-end-radius: 0; border-end-end-radius: 0; padding: 14px; min-width: 0; }
.vc-band { margin: 4px 4px 8px; font-size: 12px; font-weight: 800; letter-spacing: .02em; color: var(--muted); }
.vc-support { display: grid; gap: 6px; margin-bottom: 14px; }
.vc-row { display: grid; grid-template-columns: 210px 1fr; gap: 10px; align-items: center; background: #EEF5F3; border-radius: 12px; padding: 8px; }
.vc-primary { display: grid; grid-template-columns: repeat(var(--cols, 5), minmax(0, 1fr)); gap: 6px; }
.vc-col { background: #FBF3E4; border-radius: 12px; padding: 8px; display: flex; flex-direction: column; gap: 8px; min-width: 0; position: relative; }
.vc-col:not(:last-child)::after { content: ""; position: absolute; inset-inline-end: -6px; top: 22px; width: 0; height: 0; border-block: 7px solid transparent; border-inline-start: 7px solid #E9D3A8; z-index: 1; }
.vc-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.vc-head > a:first-child { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--night); min-width: 0; }
.vc-head b { font-size: 15px; line-height: 1.5; }
.vc-head small { color: var(--muted); font-size: 12px; white-space: nowrap; }
.vc-head.col > a:first-child { flex-wrap: wrap; row-gap: 0; }
.vc-head.col small { flex-basis: 100%; padding-inline-start: 34px; margin-top: -4px; }
.vc-ico { width: 28px; height: 28px; border-radius: 8px; background: #fff; display: grid; place-items: center; font-size: 15px; flex-shrink: 0; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.vc-ask { font-size: 12px; font-weight: 700; text-decoration: none; color: var(--teal); background: #fff; border: 1px solid var(--line); padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.vc-ask:hover { border-color: var(--teal); }
.vc-head.col .vc-ask { display: none; }
.vc-col:hover .vc-ask, .vc-col:focus-within .vc-ask { display: inline-block; }
.bricks { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
.bricks li { min-width: 0; max-width: 100%; }
.bricks a, .bricks span { display: block; font-size: 12px; line-height: 1.5; padding: 4px 9px; border-radius: 4px; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
  background: var(--brick, #146B66); color: #fff; box-shadow: inset 0 -2px 0 rgba(0,0,0,.18); transition: transform .15s; }
.bricks a:hover { transform: translateY(-2px); }
.vc-row .bricks li:nth-child(3n+1) a { --brick: #146B66; } .vc-row .bricks li:nth-child(3n+2) a { --brick: #0F5551; } .vc-row .bricks li:nth-child(3n) a { --brick: #2A8079; }
.vc-col .bricks { flex-direction: column; flex-wrap: nowrap; }
.vc-col .bricks li:nth-child(3n+1) a { --brick: #C98A22; } .vc-col .bricks li:nth-child(3n+2) a { --brick: #B07519; } .vc-col .bricks li:nth-child(3n) a { --brick: #D99A33; }
.vc-col .bricks li:nth-child(even) { padding-inline-start: 10px; } /* آجرچینی: ردیف‌ها یک‌درمیان جابه‌جا */
.bricks .more a { background: transparent !important; color: var(--teal); box-shadow: none; border: 1px dashed currentColor; }
.bricks.empty span { width: var(--w); height: 24px; padding: 0; background: repeating-linear-gradient(135deg, #dfe8e6 0 6px, #e8efed 6px 12px); box-shadow: none; }
.vc-col .bricks.empty span { background: repeating-linear-gradient(135deg, #efe2c8 0 6px, #f5ebd7 6px 12px); }
.bricks.empty { flex-direction: row !important; flex-wrap: wrap !important; }
.bricks.empty li { flex: 1 0 40%; }
.vc-margin { background: var(--night); color: var(--saffron); display: grid; place-items: center; clip-path: polygon(0 0, 100% 50%, 0 100%); border-radius: 0; }
[dir="rtl"] .vc-margin, html[dir="rtl"] .vc-margin { clip-path: polygon(100% 0, 0 50%, 100% 100%); }
.vc-margin span { writing-mode: vertical-rl; font-weight: 900; font-size: 13px; text-align: center; line-height: 1.6; padding-inline-start: 10px; }
.vc { grid-template-columns: 1fr 64px; }
html[dir="rtl"] .vc-body { border-radius: 0 18px 18px 0; border-inline-end: 1px solid var(--line); border-inline-start: 0; }
.vc-legend { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 13px; color: var(--muted); margin-top: 14px; }
.vc-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-inline-end: 4px; }
.lg-s { background: #146B66; } .lg-p { background: #C98A22; }
.vc-crumb { font-size: 14px; color: var(--muted); margin: 0 0 14px; }
.page .vc { margin: 8px 0 26px; }
@media (max-width: 1024px) { .vc-row { grid-template-columns: 170px 1fr; } }
@media (max-width: 860px) {
  .vc { grid-template-columns: 1fr; }
  html[dir="rtl"] .vc-body { border-radius: 18px 18px 0 0; border: 1px solid var(--line); border-bottom: 0; }
  .vc-margin { height: 46px; clip-path: polygon(0 0, 100% 0, 50% 100%) !important; }
  .vc-margin span { writing-mode: horizontal-tb; padding: 0 0 12px; font-size: 12px; }
  .vc-margin br { display: none; }
  .vc-row { grid-template-columns: 1fr; gap: 6px; }
  .vc-primary { grid-template-columns: 1fr 1fr; }
  .vc-col:not(:last-child)::after { display: none; }
  .vc-head.col .vc-ask { display: inline-block; }
}
@media (max-width: 520px) {
  .vc-body { padding: 10px; }
  .vc-primary { grid-template-columns: 1fr; }
  .vc-col .bricks { flex-direction: row; flex-wrap: wrap; }
  .vc-col .bricks li:nth-child(even) { padding-inline-start: 0; }
}

/* ===== دو نوع پاسخ ===== */
.answers { padding: clamp(48px, 7vw, 88px) 0; background: var(--paper, #F4F6F5); }
.ans-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 22px; }
.ans-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: clamp(20px, 3vw, 28px); }
.ans-card h3 { font-size: 21px; color: var(--night); margin: 10px 0 6px; }
.ans-card p { color: var(--muted); margin: 0 0 14px; }
.ans-tag { display: inline-block; font-size: 12px; font-weight: 800; padding: 4px 12px; border-radius: 999px; background: var(--teal-soft); color: var(--teal); }
.ans-apply { border-color: var(--saffron); box-shadow: 0 10px 30px rgba(227,162,59,.15); }
.ans-apply .ans-tag { background: var(--night); color: var(--saffron); }
.ans-demo { background: #F7F9F8; border-radius: 12px; padding: 14px; font-size: 14px; line-height: 2; color: var(--ink, #1B2433); }
.ans-apply .ans-demo { background: #FFF8EC; }
.small-note { font-size: 13px; color: var(--muted); margin-top: 16px; }
@media (max-width: 760px) { .ans-grid { grid-template-columns: 1fr; } }

/* اصلاح سرتیتر خانه‌ها */
.vc-row { grid-template-columns: 230px 1fr; }
.vc-name { display: flex; flex-direction: column; line-height: 1.4; min-width: 0; }
.vc-name b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vc-head.col small, .vc-name small { flex-basis: auto; padding: 0; margin: 0; }
.vc-head.row { padding-inline-end: 6px; border-inline-end: 1px dashed #cfe0dc; height: 100%; }
.bricks a { unicode-bidi: plaintext; }
@media (max-width: 1024px) { .vc-row { grid-template-columns: 200px 1fr; } }
@media (max-width: 860px) { .vc-row { grid-template-columns: 1fr; } .vc-head.row { border: 0; padding: 0; } }
.vc-name b { white-space: normal; overflow: visible; }
