/* Kateban public site — design C ("نشریهٔ پژوهشی"), second version, chosen 1405/09/10.
   White page; Amiri for titles and names, Vazirmatn for text; cut-out author portraits without frames. */

@font-face { font-family: IRMitra; src: url("/fonts/IRMitra.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: IRMitra; src: url("/fonts/IRMitra-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
:root { --ink:#1b2330; --muted:#647083; --line:#e5e1d8; --navy:#1f3a5f; --gold:#a8844a; --maroon:#7a1f1f; --quran:#1d5e3a; }
* { box-sizing:border-box }
html { -webkit-text-size-adjust:100% }
body { margin:0; background:#fff; color:var(--ink); font:16px/1.95 Vazirmatn, Tahoma, sans-serif }
/* The old Kateban's two side colours, as thin strips at the window's edges: olive on the right, ochre on the left. */
:root { --strip:48px; --strip-right:#8f9e4c; --strip-left:#b87d3d; }
body { padding-inline:var(--strip) }
body::before, body::after { content:""; position:fixed; top:0; bottom:0; width:var(--strip); z-index:50; pointer-events:none }
body::before { right:0; background:var(--strip-right) }
body::after { left:0; background:var(--strip-left) }
@media (max-width:640px) { :root { --strip:16px } }
a { color:inherit; text-decoration:none } a:hover { color:var(--maroon) }
img { max-width:100% }
.wrap { max-width:1200px; margin:0 auto; padding:0 1.25rem }
.amiri { font-family:Amiri, serif }
.muted { color:var(--muted) }
.skip { position:absolute; inset-inline-start:-999px } .skip:focus { inset-inline-start:1rem; top:1rem; background:#fff; padding:.4rem 1rem; z-index:10 }

/* ---------------------------------------------------------------- masthead */
.masthead { display:grid; grid-template-columns:auto 1fr; gap:2.2rem; align-items:center; padding:1.8rem 0 1.4rem }
.emblem { width:170px; filter:drop-shadow(0 10px 18px rgba(80,55,20,.28)); transform:rotate(-2deg); display:block }
.emblem img { display:block; width:100% }
.title-block .eyebrow { color:var(--gold); font-weight:700; letter-spacing:.08em; font-size:.85rem }
.title-block .name { font-family:IRMitra, Amiri, serif; font-weight:700; font-size:3.1rem; line-height:1.35; margin:.1rem 0 .3rem; color:var(--maroon); display:block }
.title-block .line { font-family:Amiri, serif; font-size:1.35rem; color:#4b4237 }
.searchbox { display:flex; max-width:520px; margin-top:1rem; border:1px solid var(--line); border-radius:.5rem; overflow:hidden; background:#fff }
.searchbox input { flex:1; min-width:0; border:0; padding:.6rem 1rem; font:inherit; background:transparent }
.searchbox button { border:0; background:var(--maroon); color:#fff; padding:0 1.2rem; font:inherit; cursor:pointer }
nav.main { display:flex; justify-content:center; gap:2.4rem; padding:.7rem 0; border-top:0; border-bottom:1px solid var(--line); font-weight:500; flex-wrap:wrap }
nav.main a[aria-current] { color:var(--maroon) }

/* compact masthead on inner pages */
.masthead.compact { grid-template-columns:auto 1fr auto; gap:1.1rem; padding:1.6rem 0 1.5rem }
.masthead.compact .emblem { width:66px; transform:none; filter:none }
.masthead.compact .emblem img { height:auto }  /* the logo keeps its round shape */
.masthead.compact .name { font-family:IRMitra, Amiri, serif; font-size:2.3rem; margin:0 0 .15rem; line-height:1.3 }
.masthead.compact .line { font-family:Vazirmatn, sans-serif; font-size:.85rem; color:var(--muted) }
/* the header band */
.site-head { background:#6b1f1f; border-bottom:1px solid #5a1919 }
.site-head .masthead.compact .name { color:#f6e6c2 } .site-head .masthead.compact .line { color:#e6c9b8 }
.site-head .searchbox { border-color:#5a1919 } .site-head .searchbox input { background:#fff }
.site-head .searchbox button { background:var(--gold); color:#fff }
.masthead.compact .searchbox { margin:0; width:300px }

h2.band { font-family:IRMitra, Amiri, serif; font-size:1.8rem; margin:2.6rem 0 1.2rem; display:flex; align-items:center; gap:1rem; color:var(--navy); font-weight:700 }
h2.band::after { content:''; flex:1; height:1px; background:var(--line) }
h2.band a.more { font-family:Vazirmatn, sans-serif; font-size:.85rem; font-weight:500; color:var(--maroon); order:2 }

/* ---------------------------------------------------------------- banner */
.banner { position:relative; display:block; height:330px; overflow:hidden; border-radius:.3rem; background:#2a2118; margin-top:1.6rem }
.banner img { width:100%; height:100%; object-fit:cover; display:block }
.banner .band { position:absolute; inset-inline-start:0; bottom:2.2rem; max-width:62%; background:rgba(14,12,10,.84); color:#fff; padding:1.1rem 1.6rem 1rem 2rem }
.banner .band .home { color:#c9b48a; font-size:.85rem }
.banner .band h2 { margin:0; font-family:IRMitra, Amiri, serif; font-size:1.75rem; line-height:1.5 }
.banner .band p { margin:.2rem 0 .4rem; color:#d9d2c5; font-size:.92rem }
.banner .band .by { color:#e8c27a; font-weight:700; font-size:.95rem }
.banner:hover .band h2 { text-decoration:underline; text-decoration-thickness:1px; text-underline-offset:.35em }

/* ---------------------------------------------------------------- authors */
.authors { display:grid; grid-template-columns:repeat(5, 1fr); gap:2.4rem 1.2rem }
.author { text-align:center }
.author .pic { aspect-ratio:3/4; display:flex; align-items:flex-end; justify-content:center }
.author .pic img { width:100%; height:100%; object-fit:contain; object-position:bottom; display:block; transition:transform .25s }
.author:hover .pic img { transform:translateY(-4px) }
.author b { display:block; font-family:IRMitra, Amiri, serif; font-size:1.25rem; margin-top:.6rem; line-height:1.4 }
.author span { color:var(--muted); font-size:.82rem }
.author .role { display:block; font-style:normal; color:var(--navy); font-size:.85rem; line-height:1.6; margin:.1rem 0 .25rem }

/* ---------------------------------------------------------------- lists */
.columns { display:grid; grid-template-columns:2fr 1fr; gap:3rem }
.toc { list-style:none; margin:0; padding:0 }
.toc li { display:grid; grid-template-columns:auto 1fr; gap:1.3rem; padding:1.1rem 0; border-bottom:1px solid var(--line) }
.toc .face { width:96px; height:128px; object-fit:contain; object-position:bottom }
.toc .face.none { height:auto }
.toc h3 { margin:0; font-family:IRMitra, Amiri, serif; font-size:1.35rem; line-height:1.55; font-weight:700 }
.toc .who { color:var(--navy); font-size:.86rem }
.toc p { margin:.2rem 0 0; color:var(--muted); font-size:.92rem; text-align:justify }
.toc.plain li { grid-template-columns:1fr }
aside h2.side { font-family:IRMitra, Amiri, serif; font-size:1.35rem; margin:2.6rem 0 .6rem; padding-bottom:.3rem; border-bottom:2px solid var(--ink); color:var(--navy) }
aside ol { margin:0; padding:0 1.3rem 0 0 } aside li { padding:.3rem 0; font-size:.93rem }
aside ul { margin:0; padding:0; list-style:none } aside ul li { border-bottom:1px dotted var(--line) }
.tags { display:flex; flex-wrap:wrap; gap:.4rem } .tags a { border:1px solid var(--line); border-radius:.3rem; padding:.15rem .7rem; font-size:.88rem }
.tags a small { color:var(--muted) }
.pager { display:flex; gap:1.5rem; justify-content:center; align-items:center; margin:2rem 0 }
.pager a { border:1px solid var(--line); border-radius:.3rem; padding:.2rem .9rem }
.page-head { padding:2rem 0 .5rem }
.page-head h1 { font-family:IRMitra, Amiri, serif; font-weight:700; font-size:2.6rem; color:var(--maroon); margin:0; line-height:1.4 }
.page-head p { margin:.3rem 0 0; color:var(--muted) }

/* ---------------------------------------------------------------- author home */
.author-head { display:grid; grid-template-columns:240px 1fr; gap:2.5rem; align-items:end; padding:2rem 0 1.2rem; border-bottom:1px solid var(--line) }
.author-head .pic { aspect-ratio:3/4; display:flex; align-items:flex-end; justify-content:center }
.author-head .pic img { width:100%; height:100%; object-fit:contain; object-position:bottom }
.author-head .home-title { color:var(--gold); font-weight:700 }
.author-head h1 { font-family:IRMitra, Amiri, serif; font-size:2.6rem; color:var(--maroon); margin:.1rem 0 .4rem; line-height:1.35 }
.author-head .homes a { color:var(--navy); text-decoration:underline; text-underline-offset:.3em }
.author-head .homes a[aria-current] { color:var(--maroon); text-decoration:none; font-weight:700 }

/* ---------------------------------------------------------------- post */
.post-head { max-width:46rem; margin:0 auto; padding:2.2rem 0 1rem; text-align:center }
.post-head .home { color:var(--gold); font-weight:700; font-size:.9rem }
.post-head h1 { font-family:IRMitra, Amiri, serif; font-size:2.5rem; line-height:1.5; margin:.3rem 0 .8rem; color:var(--ink) }
.byline { display:flex; align-items:center; justify-content:center; gap:.8rem; color:var(--muted); font-size:.92rem }
.byline img { width:56px; height:75px; object-fit:contain; object-position:bottom }
.byline b { color:var(--navy); font-weight:700 }
.post-photo { max-width:60rem; margin:1rem auto 0 } .post-photo img { width:100%; max-height:520px; object-fit:contain; display:block; margin:0 auto }
.post-tools { max-width:46rem; margin:.4rem auto 0; display:flex; gap:1.2rem; justify-content:center; font-size:.85rem; color:var(--muted) }

/* the text of a post (Macode rendered by App\Macode\HtmlRenderer) */
.prose { max-width:46rem; margin:1.5rem auto 0; font-size:1.08rem; line-height:2.15 }
.prose p { margin:0 0 1em; text-align:justify } .prose .align-center { text-align:center } .prose .align-left { text-align:left }
.prose h2, .prose h3 { font-family:IRMitra, Amiri, serif; color:var(--navy); line-height:1.5; margin:1.6em 0 .5em } .prose h2 { font-size:1.6rem } .prose h3 { font-size:1.3rem }
.prose blockquote { margin:1.2em 0; padding:.4em 1.2em; border-inline-start:3px solid var(--gold); background:#faf8f3; color:#3a3328 }
.prose .poem { margin:1.4em auto; max-width:36rem; font-family:Amiri, serif; font-size:1.15em }
.prose .beyt { display:flex; justify-content:space-between; gap:2rem } .prose .mesra { flex:1; text-align:center }
.prose .table-wrap { overflow-x:auto; margin:1em 0 } .prose table { border-collapse:collapse; margin:0 auto; font-size:.95em } .prose td { border:1px solid var(--line); padding:.3em .7em; vertical-align:top } .prose td.align-center { text-align:center }
.prose figure { margin:1.4em 0; text-align:center } .prose figure img { display:block; margin:0 auto } .prose .figure-medium img { max-width:60% } .prose .figure-small img { max-width:32% }
.prose .figure-left { float:left; max-width:45%; margin:.3em 0 1em 1.5em } .prose .figure-right { float:right; max-width:45%; margin:.3em 1.5em 1em 0 }
.prose figcaption { color:var(--muted); font-size:.85em; margin-top:.4em }
.prose aside.box { float:left; width:15rem; margin:.3em 0 1em 1.5em; padding:.6em 1em; border:1px solid var(--line); background:#faf8f3; font-size:.9em }
.prose aside.box:not(.box-left) { float:right; margin:.3em 1.5em 1em 0 }
.prose .quran { color:var(--quran) } .prose span[lang=ar] { font-family:Amiri, serif; font-size:1.06em }
.prose .large { font-size:1.15em } .prose .accent { color:var(--maroon) } .prose mark { background:#fff1b8 }
.prose a { color:var(--navy); text-decoration:underline; text-underline-offset:.25em }
.prose sup.fn-ref { line-height:0 } .prose sup.fn-ref a { text-decoration:none; color:var(--maroon); font-weight:700; padding:0 .1em }
.prose .footnotes { clear:both; margin-top:2.5em; padding-top:1em; border-top:1px solid var(--line); font-size:.88em; line-height:2 }
.prose .footnotes ol { list-style:none; padding:0; margin:0 } .prose .footnotes li { margin:.3em 0 } .prose .footnotes .fn-back { color:var(--maroon); font-weight:700; margin-inline-end:.3em }
.prose :target { background:#f5f5f5 }
.topic-branch h2 a:hover, a.leaf-name:hover { color:var(--maroon) }
.facet-head { font-size:1.05rem; color:var(--navy); margin:1rem 0 .3rem }
.facet-list { list-style:none; margin:0; padding:0; display:flex; flex-wrap:wrap; gap:.35rem 1.1rem; font-size:.92rem }
.facet-list small, .tag-list small, .tag-children small { color:var(--muted) }
.facet-sub { color:var(--muted); font-size:.85rem }

/* ---------------------------------------------------------------- tag pages and indexes (TagController) */
.crumbs { font-size:.88rem; color:var(--muted) } .crumbs a { color:var(--navy) }
.tag-kind { color:var(--gold) !important; font-weight:700; font-size:.85rem; margin:.6rem 0 0 !important }
.tag-head .scope { color:#5b5348; max-width:52rem }
.tag-children { list-style:none; margin:.8rem 0 0; padding:0; display:flex; flex-wrap:wrap; gap:.35rem 1rem; font-size:.92rem }
.tag-children a { color:var(--navy); font-weight:700 }
.tag-kinds { display:flex; flex-wrap:wrap; gap:.4rem .5rem; margin:.8rem 0 .3rem }
.tag-kinds a { border:1px solid var(--line); border-radius:2rem; padding:.15rem .8rem; font-size:.85rem; color:var(--navy) }
.tag-kinds a[aria-current] { background:var(--navy); color:#fff; border-color:var(--navy) }
.letters { display:flex; flex-wrap:wrap; gap:.25rem; margin:.6rem 0 0 }
.letters a { min-width:2.2rem; text-align:center; border:1px solid var(--line); border-radius:.3rem; padding:.1rem .4rem; font-weight:700; color:var(--navy) }
.letters a[aria-current] { background:var(--maroon); border-color:var(--maroon); color:#fff }
.letter-head { font-family:IRMitra, Amiri, serif; font-size:2rem; color:var(--maroon); border-bottom:3px double var(--gold); margin:1.2rem 0 .8rem }
.tag-list { list-style:none; margin:0 0 2rem; padding:0; columns:3 16rem; column-gap:2rem }
.tag-list li { break-inside:avoid; padding:.15rem 0 }
/* The site-wide archive: title and writer on one line, the writer pushed to the line's end (wraps under on a phone). */
.title-list { list-style:none; margin:0 0 2rem; padding:0 }
.title-list li { display:flex; flex-wrap:wrap; align-items:baseline; column-gap:1rem; padding:.45rem 0; border-bottom:1px dotted var(--line) }
.title-list a { font-family:IRMitra, Amiri, serif; font-size:1.15rem; font-weight:700; line-height:1.6 }
.title-list .who { margin-inline-start:auto; color:var(--navy); font-size:.86rem; white-space:nowrap }
.prose::after { content:''; display:block; clear:both }

.author-box { max-width:46rem; margin:3rem auto 0; display:grid; grid-template-columns:110px 1fr; gap:1.4rem; align-items:end; padding-top:1.5rem; border-top:3px double var(--gold) }
.author-box img { width:110px; aspect-ratio:3/4; object-fit:contain; object-position:bottom }
.author-box b { font-family:IRMitra, Amiri, serif; font-size:1.4rem; color:var(--maroon) }
.neighbours { max-width:46rem; margin:2rem auto 0; display:grid; grid-template-columns:1fr 1fr; gap:1rem; font-size:.92rem }
.neighbours a { border:1px solid var(--line); border-radius:.3rem; padding:.7rem 1rem; display:block } .neighbours .next { text-align:left }
.neighbours small { color:var(--muted); display:block }

/* ---------------------------------------------------------------- intro, footer */
/* the foot of the home page: the identity page of Kateban, large, beside the introduction */
.intro { margin-top:3.2rem; display:grid; grid-template-columns:minmax(260px, 420px) 1fr; gap:2.6rem; align-items:center; padding:2.4rem 0; border-top:3px double var(--gold) }
.intro-page { margin:0; text-align:center }
.intro-page img { display:block; width:100%; filter:drop-shadow(0 18px 28px rgba(80,55,20,.32)); transform:rotate(-1.5deg) }
.intro-page figcaption { margin-top:1.1rem; color:var(--gold); font-weight:700; font-size:.95rem }
.intro h2 { font-family:IRMitra, Amiri, serif; color:var(--maroon); font-size:1.6rem; margin:0 0 .4rem }
.intro p { margin:.4rem 0; text-align:justify; color:#3f3a33; font-size:1.02rem; line-height:2.1 }
 /* a page's RSS link, low-key at the foot of the page */
.feed-link { text-align:center; margin:2.4rem 0 0; font-size:.78rem } .feed-link a { color:var(--muted) }
.page-dated { color:var(--muted); font-size:.82rem; margin-top:2rem }
/* ---------------------------------------------------------------- home: topics (the main branches of the tree) */
.topic-cards { display:grid; grid-template-columns:repeat(auto-fill, minmax(210px, 1fr)); gap:1rem }
.topic-card { display:grid; grid-template-columns:1fr auto; gap:.2rem .6rem; align-content:start; padding:.8rem 1rem .9rem;
  border:1px solid var(--line); border-top:3px solid var(--maroon); border-radius:.3rem; background:#fff; color:inherit; text-decoration:none; transition:box-shadow .2s }
.topic-card:hover { box-shadow:0 6px 18px rgba(60,40,15,.12) }
.tc-name { font-family:IRMitra, Amiri, serif; font-size:1.25rem; font-weight:700; color:var(--maroon); line-height:1.45 }
.tc-count { color:var(--muted); font-size:.8rem; white-space:nowrap; padding-top:.35rem }
.tc-leaves { grid-column:1 / -1; color:#5b5348; font-size:.84rem; line-height:1.8 }

/* ---------------------------------------------------------------- the subject tree page */
.topics-head p { max-width:52rem } .topics-head .muted { display:block; font-size:.85rem; margin-top:.3rem }
.topics-index { display:flex; flex-wrap:wrap; gap:.4rem .5rem; margin:1rem 0 .5rem }
.topics-index a { border:1px solid var(--line); border-radius:2rem; padding:.15rem .8rem; font-size:.85rem; color:var(--navy); text-decoration:none }
.topics-index a:hover { border-color:var(--maroon); color:var(--maroon) }
.topic-branch { padding:1.6rem 0 1rem; border-top:3px double var(--gold); margin-top:1.4rem; scroll-margin-top:1rem }
.topic-branch h2 { margin:0 0 .3rem; font-family:IRMitra, Amiri, serif; font-size:1.9rem; color:var(--maroon) }
.topic-branch .count { color:var(--muted); font-family:Vazirmatn, sans-serif; font-size:.85rem; font-weight:400 }
.topic-branch > .scope { color:#5b5348; max-width:56rem; margin:0 0 1rem }
.topic-leaves { list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(auto-fill, minmax(300px, 1fr)); gap:.9rem 1.6rem }
.topic-leaves > li { border-inline-start:3px solid #e6dcc6; padding-inline-start:.8rem; scroll-margin-top:1rem }
.leaf-head { display:flex; justify-content:space-between; gap:.6rem; align-items:baseline }
.leaf-name { font-weight:700; color:var(--navy) }
.topic-leaves .scope { margin:.15rem 0 0; color:#6b6358; font-size:.84rem; line-height:1.85 }
.topic-twigs { list-style:none; margin:.4rem 0 0; padding:0; display:flex; flex-wrap:wrap; gap:.3rem .9rem; font-size:.88rem }
:target { background:#f5f5f5 }
.topic-branch h2 a:hover, a.leaf-name:hover { color:var(--maroon) }
.facet-head { font-size:1.05rem; color:var(--navy); margin:1rem 0 .3rem }
.facet-list { list-style:none; margin:0; padding:0; display:flex; flex-wrap:wrap; gap:.35rem 1.1rem; font-size:.92rem }
.facet-list small, .tag-list small, .tag-children small { color:var(--muted) }
.facet-sub { color:var(--muted); font-size:.85rem }

/* ---------------------------------------------------------------- tag pages and indexes (TagController) */
.crumbs { font-size:.88rem; color:var(--muted) } .crumbs a { color:var(--navy) }
.tag-kind { color:var(--gold) !important; font-weight:700; font-size:.85rem; margin:.6rem 0 0 !important }
.tag-head .scope { color:#5b5348; max-width:52rem }
.tag-children { list-style:none; margin:.8rem 0 0; padding:0; display:flex; flex-wrap:wrap; gap:.35rem 1rem; font-size:.92rem }
.tag-children a { color:var(--navy); font-weight:700 }
.tag-kinds { display:flex; flex-wrap:wrap; gap:.4rem .5rem; margin:.8rem 0 .3rem }
.tag-kinds a { border:1px solid var(--line); border-radius:2rem; padding:.15rem .8rem; font-size:.85rem; color:var(--navy) }
.tag-kinds a[aria-current] { background:var(--navy); color:#fff; border-color:var(--navy) }
.letters { display:flex; flex-wrap:wrap; gap:.25rem; margin:.6rem 0 0 }
.letters a { min-width:2.2rem; text-align:center; border:1px solid var(--line); border-radius:.3rem; padding:.1rem .4rem; font-weight:700; color:var(--navy) }
.letters a[aria-current] { background:var(--maroon); border-color:var(--maroon); color:#fff }
.letter-head { font-family:IRMitra, Amiri, serif; font-size:2rem; color:var(--maroon); border-bottom:3px double var(--gold); margin:1.2rem 0 .8rem }
.tag-list { list-style:none; margin:0 0 2rem; padding:0; columns:3 16rem; column-gap:2rem }
.tag-list li { break-inside:avoid; padding:.15rem 0 }

/* ---------------------------------------------------------------- special dossiers */
/* The list: one full-width strip per dossier (pictures 1800×600, 3:1), the text over the picture's dark lower edge.
   On a phone the strip keeps a minimum height, so only the middle of the picture shows. */
.dossier-list { display:flex; flex-direction:column; gap:1.4rem; margin-top:1.4rem }
.dossier-card { position:relative; display:flex; align-items:flex-end; aspect-ratio:3/1; min-height:200px; border-radius:.35rem; overflow:hidden;
  background:linear-gradient(135deg, #6b1f1f, #3a1313); color:#fff; text-decoration:none }
.dossier-card img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; display:block; transition:transform .3s }
.dossier-card:hover img { transform:scale(1.03) }
.home-dossiers .dossier-list { margin-top:0 }
/* Front page: smaller banners, two side by side (still 3:1); stacked again on a phone. */
.home-dossiers .dossier-list { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:1rem }
.home-dossiers .dossier-card { min-height:150px }
.home-dossiers .dc-text { padding:2rem 1rem .8rem }
.home-dossiers .dc-title { font-size:1.35rem }
.home-dossiers .dc-summary { font-size:.85rem; -webkit-line-clamp:1 }
@media (max-width:760px) { .home-dossiers .dossier-list { grid-template-columns:minmax(0,1fr) } .home-dossiers .dossier-card { aspect-ratio:auto } }
.dc-text { position:relative; display:flex; flex-direction:column; width:100%; padding:3rem 1.6rem 1.1rem; background:linear-gradient(transparent, rgba(10,8,6,.85)) }
.dc-title { font-family:IRMitra, Amiri, serif; font-size:1.9rem; font-weight:700; line-height:1.4; color:#fff }
.dc-summary { color:#eee; font-size:.92rem; line-height:1.9; margin-top:.2rem; max-width:52rem;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden }
.dc-count { color:#e8c27a; font-size:.8rem; margin-top:.3rem }
@media (max-width:640px) {
  .dc-text { padding:2.2rem 1rem .9rem }
  .dc-title { font-size:1.4rem }
  .dc-summary { display:none }   /* on a phone the summary would hide the picture; it is on the dossier's own page */
}
.dossier-head { position:relative; margin-top:1.6rem; border-radius:.35rem; overflow:hidden; min-height:260px; background:#3a1313; display:flex; align-items:flex-end }
.dossier-head img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover }
.dossier-head .dh-text { position:relative; background:linear-gradient(transparent, rgba(10,8,6,.85)); color:#fff; width:100%; padding:3rem 1.6rem 1.2rem }
.dossier-head .dh-text a { color:#e8c27a } .dossier-head h1 { margin:.2rem 0; font-family:IRMitra, Amiri, serif; font-size:2.4rem }
.dossier-head p { margin:0; max-width:52rem; color:#eee; line-height:1.9 }
.dossier-body { margin-top:1.6rem }
/* Sections of a dossier: a heading each; the list of sections only on long dossiers. */
.dossier-count { margin:1.6rem 0 0 }
.dossier-contents { margin:1rem 0 0; padding:1rem 1.4rem; border:1px solid var(--line); border-radius:.35rem }
.dossier-contents ol { margin:0; padding-inline-start:1.4rem; columns:2; column-gap:2.4rem }
.dossier-contents li { break-inside:avoid; padding:.2rem 0; line-height:1.8 }
.dossier-section { scroll-margin-top:1rem }
.dossier-section h2.band { margin-top:2.2rem }
.dossier-section-intro { margin:-.6rem 0 1rem; color:var(--muted); line-height:1.9 }
@media (max-width:640px) {
  .dossier-contents ol { columns:1 }
  .dossier-section h2.band { font-size:1.4rem; line-height:1.6 }
}

/* ---------------------------------------------------------------- footer: Dawawin's footer and colours
   The Kateban leaf large beside a wide introduction; the link groups in a row below; a bottom line. */
.site-footer { --f-ground:#2E2F31; --f-text:#D9D9D6; --f-muted:#A9A9A5; --f-line:#45474A; --f-strong:#F5F5F2;
  margin-top:4rem; background:var(--f-ground); color:var(--f-text); font-size:.9rem }
.site-footer a { color:var(--f-text); text-decoration:none } .site-footer a:hover { color:var(--f-strong); text-decoration:underline }
.footer-about { display:grid; grid-template-columns:240px minmax(0, 1fr); gap:2.6rem; align-items:center; padding:3rem 0 2.4rem; border-bottom:1px solid var(--f-line) }
.footer-page { width:100%; height:auto; transform:rotate(-2deg); filter:drop-shadow(0 12px 20px rgba(0,0,0,.5)) }
.footer-brand { margin:0; font-family:IRMitra, Amiri, serif; font-size:2.4rem; line-height:1.3; color:var(--f-strong) }
.footer-tagline { color:var(--f-muted); font-size:.85rem; margin-bottom:.9rem }
/* the introduction's three paragraphs read as one */
.footer-intro { text-align:justify; font-size:.84rem; line-height:1.8 }
.footer-intro p { display:inline; margin:0 } .footer-intro p + p::before { content:" " }
.footer-count { margin:.5rem 0 0; color:var(--f-strong); font-weight:700; font-size:.88rem }
/* the count on the right, the foundation's and the sister sites' logos on the left */
.footer-meta { display:flex; flex-wrap:wrap; align-items:flex-end; justify-content:space-between; gap:1rem 2rem }
.footer-partners { display:flex; align-items:flex-end; gap:1.6rem; margin-inline-start:auto }
.footer-partners a { display:flex; flex-direction:column; align-items:center; gap:.3rem; font-size:.78rem; color:var(--f-muted); opacity:.85; transition:opacity .2s }
.footer-partners a:hover { opacity:1; text-decoration:none }
.footer-partners img { display:block; height:auto }
.footer-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(170px, 1fr)); gap:2rem; padding:2.2rem 0 }
.footer-grid nav { display:flex; flex-direction:column; gap:.2rem; line-height:1.65 }
.footer-grid .footer-years { grid-column:span 2 }
.footer-heading { font-weight:700; color:var(--f-strong); margin-bottom:.2rem }
.footer-years > div { display:flex; flex-wrap:wrap; gap:.3rem .9rem }
.footer-bottom { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:.8rem; padding:1.2rem 0 1.8rem; border-top:1px solid var(--f-line); color:var(--f-muted); font-size:.82rem }
.footer-bottom__links { display:flex; flex-wrap:wrap; gap:.4rem 1.2rem } .footer-bottom__links a { color:var(--f-muted) }

/* ---------------------------------------------------------------- «مجالس کاتبان» */
.majlis-list { display:grid; grid-template-columns:repeat(3, 1fr); gap:2rem 1.6rem; margin-top:1.2rem }
.majlis-card { display:flex; flex-direction:column; color:inherit; text-decoration:none }
.majlis-card img, .majlis-card .mc-blank { width:100%; aspect-ratio:3/2; object-fit:cover; border-radius:.3rem; background:#f3f1ec; display:block }
.majlis-card .mc-text { display:flex; flex-direction:column; gap:.15rem; padding-top:.7rem }
.mc-num { color:var(--maroon); font-size:.85rem; font-weight:500 }
.mc-title { font-family:IRMitra, Amiri, serif; font-size:1.35rem; font-weight:700; line-height:1.5; color:var(--navy) }
.majlis-card:hover .mc-title { text-decoration:underline; text-decoration-thickness:1px; text-underline-offset:.35em }
.mc-speakers { font-weight:500 } .mc-date { color:var(--muted); font-size:.9rem }
/* Front page: the one chosen majlis — three of its photos in a row, its title centred below; one photo on a phone. */
.home-majlis .hm-link { display:block; color:inherit; text-decoration:none }
.home-majlis .hm-link + .hm-link { margin-top:2.2rem }   /* several chosen majales, one under another */
.hm-photos { display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:.6rem }
.hm-photos.hm-2 { grid-template-columns:repeat(2, minmax(0,1fr)) } .hm-photos.hm-1 { grid-template-columns:1fr }
.hm-photos img { width:100%; aspect-ratio:3/2; object-fit:cover; border-radius:.3rem; display:block; background:#f3f1ec }
.hm-photos.hm-1 img { aspect-ratio:3/1 }
.hm-text { display:flex; flex-direction:column; align-items:center; text-align:center; gap:.15rem; padding-top:.8rem }
.hm-title { font-family:IRMitra, Amiri, serif; font-size:1.6rem; font-weight:700; line-height:1.5; color:var(--navy) }
.home-majlis .hm-link:hover .hm-title { text-decoration:underline; text-decoration-thickness:1px; text-underline-offset:.35em }
.hm-meta { font-weight:500 }
@media (max-width:640px) {
  .hm-photos { grid-template-columns:1fr } .hm-photos img:not(:first-child) { display:none }
  .hm-photos img { aspect-ratio:3/2 } .hm-title { font-size:1.35rem }
}
.majlis-head { padding:2rem 0 .5rem; max-width:46rem; margin:0 auto }
.majlis-head h1 { font-family:IRMitra, Amiri, serif; font-size:2.4rem; line-height:1.45; color:var(--maroon); margin:.2rem 0 .8rem }
.majlis-num { color:var(--gold); font-weight:700; margin-top:.8rem }
.majlis-draft { background:#fff1b8; padding:.4rem .8rem; border-radius:.3rem }
.majlis-facts { margin:0; display:flex; flex-wrap:wrap; gap:.3rem 2rem } .majlis-facts div { display:flex; gap:.5rem }
.majlis-facts dt { color:var(--muted) } .majlis-facts dd { margin:0; font-weight:500 }
.majlis-talk { max-width:46rem; margin:2.6rem auto 0; padding-top:1.6rem; border-top:1px solid var(--line) }
.talk-head { display:flex; gap:1rem; align-items:flex-start }
.talk-head img { width:84px; height:112px; object-fit:cover; border-radius:.3rem; flex:none }
.talk-num { color:var(--gold); font-weight:700; font-size:.9rem }
.talk-head h2 { font-family:IRMitra, Amiri, serif; font-size:1.6rem; line-height:1.5; color:var(--navy); margin:.1rem 0 .3rem }
.talk-speaker { font-weight:700; font-size:1.08rem } .talk-speaker a { color:var(--maroon) } .sp-role { color:var(--muted); font-weight:400 }
.talk-lead { margin:1.2rem 0 0; text-align:center }
.talk-lead img { max-width:100%; max-height:32rem; width:auto; height:auto; display:inline-block; border-radius:.3rem }
.talk-body { margin-top:1rem } .talk-body h3 { font-size:1.25rem }
.talk-media { margin-top:1.2rem } .talk-media .majlis-photos { margin-top:.6rem }
.majlis-whole { max-width:46rem; margin:0 auto }
.majlis-poster { margin:1.8rem auto 0; max-width:46rem; text-align:center } .majlis-poster img { max-width:100%; border-radius:.3rem }
.majlis-media { max-width:46rem; margin:0 auto }
.media-item { margin:0 0 1.2rem } .media-title { font-weight:500; margin-bottom:.4rem }
.media-item audio, .media-item video { width:100%; display:block } .media-item video { background:#000; border-radius:.3rem }
.media-embed { position:relative; aspect-ratio:16/9; background:#000; border-radius:.3rem; overflow:hidden }
.media-embed iframe { position:absolute; inset:0; width:100%; height:100%; border:0 }
.media-dl, .media-link { display:inline-block; margin-top:.4rem; color:var(--maroon); font-size:.92rem }
.media-link { border:1px solid var(--line); border-radius:2rem; padding:.35rem 1rem; margin-inline-end:.5rem }
.majlis-body h3 { font-size:1.25rem }
.majlis-links { max-width:46rem; margin:0 auto } .majlis-links ul { padding-inline-start:1.2rem }
.majlis-whole .majlis-photos, .majlis-photos { display:grid; grid-template-columns:repeat(2, 1fr); gap:.8rem }
.majlis-photos img { width:100%; aspect-ratio:4/3; object-fit:cover; display:block; border-radius:.25rem }
.majlis-files { padding-inline-start:1.2rem } .majlis-source { max-width:46rem; margin:2.4rem auto 0; font-size:.9rem }
.majlis-photo-page figure { margin:1rem 0; text-align:center } .majlis-photo-page figure img { max-width:100%; max-height:80vh }
.majlis-photo-page figcaption { color:var(--muted); margin-top:.6rem }
.photo-nav { display:flex; justify-content:space-between; font-weight:500 }

/* ---------------------------------------------------------------- narrow screens */
@media (max-width: 980px) {
  .authors { grid-template-columns:repeat(3, 1fr) } .columns { grid-template-columns:1fr }
  .banner .band { max-width:85% } .masthead.compact .searchbox { width:200px }
  .majlis-list { grid-template-columns:repeat(2, 1fr) }
}
@media (max-width: 640px) {
  .masthead { grid-template-columns:1fr; text-align:center; gap:1rem } .emblem { width:120px; margin:0 auto } .searchbox { margin-inline:auto }
  .title-block .name { font-size:2.3rem } nav.main { gap:1.1rem }
  .masthead.compact { grid-template-columns:auto 1fr; text-align:start; padding:1.1rem 0 1rem } .masthead.compact .emblem { width:44px; margin:0 } .masthead.compact .name { font-size:1.5rem }
  .masthead.compact .line { display:none } .masthead.compact .searchbox { grid-column:1 / -1; width:100% }
  .authors { grid-template-columns:repeat(2, 1fr); gap:1.6rem .8rem }
  .banner { height:300px } .banner .band { max-width:100%; inset-inline:0; bottom:0; padding:1rem } .banner .band h2 { font-size:1.35rem }
  .intro { grid-template-columns:1fr; gap:1.6rem } .intro-page { max-width:300px; margin:0 auto }
  .author-head { grid-template-columns:1fr; text-align:center } .author-head .pic { max-width:200px; margin:0 auto }  .post-head h1 { font-size:1.8rem } .prose { font-size:1.02rem }
  .prose .beyt { display:block } .prose .mesra { display:block }
  .prose aside.box, .prose .figure-left, .prose .figure-right { float:none; width:auto; max-width:100%; margin:1em 0 }
  .prose .figure-medium img, .prose .figure-small img { max-width:100% }
  .neighbours { grid-template-columns:1fr }
  .majlis-list { grid-template-columns:1fr; gap:1.8rem } .majlis-head h1 { font-size:1.8rem }
  .majlis-photos { grid-template-columns:repeat(2, 1fr) }
  .talk-head img { width:64px; height:85px } .talk-head h2 { font-size:1.3rem }
}

/* ---------------------------------------------------------------- print */
@media print {
  .masthead, nav.main, .site-footer, .post-tools, .neighbours, .searchbox { display:none }
  body { font-size:12pt; padding-inline:0 } .prose { max-width:none }
  body::before, body::after { display:none }
}

/* ---------------------------------------------------------------- home: hero with the identity page, large */
.hero { display:grid; grid-template-columns:minmax(260px, 400px) 1fr; gap:3rem; align-items:center; padding:2.2rem 0 2rem;
        background:radial-gradient(ellipse at 18% 55%, rgba(201,170,120,.20), rgba(255,255,255,0) 62%) }
.hero-page img { display:block; width:100%; filter:drop-shadow(0 18px 28px rgba(80,55,20,.32)); transform:rotate(-1.5deg) }
.hero-text .eyebrow { color:var(--gold); font-weight:700; letter-spacing:.08em }
.hero-name { font-family:IRMitra, Amiri, serif; font-size:4rem; line-height:1.3; margin:.1rem 0 .2rem; color:var(--maroon) }
.hero-line { font-family:Amiri, serif; font-size:1.7rem; margin:0; color:#4b4237 }
.hero-lede { color:var(--muted); font-size:1.02rem; max-width:34rem; margin:.8rem 0 0 }
.hero .searchbox { margin-top:1.4rem; max-width:560px } .hero .searchbox input { padding:.8rem 1.1rem; font-size:1.02rem }

/* ---------------------------------------------------------------- home: two columns of authors */
.author-rows { display:grid; grid-template-columns:1fr 1fr; gap:2.4rem 3rem }
.author-row { display:grid; grid-template-columns:215px 1fr; gap:1.4rem; align-items:stretch }
.author-row .pic { align-self:start; width:100%; aspect-ratio:3/4; overflow:hidden; display:flex; align-items:flex-end; justify-content:center }
.author-row .pic img { width:100%; height:100%; object-fit:contain; object-position:bottom; transition:transform .25s; display:block }
.author-row .pic:hover img { transform:translateY(-4px) }
.author-row .titles { display:flex; flex-direction:column; min-width:0 }
.author-row h3 { margin:0 0 .3rem; font-family:IRMitra, Amiri, serif; font-size:1.5rem; color:var(--maroon); line-height:1.4 }
.author-row ul { list-style:none; margin:0; padding:0; flex:1; display:flex; flex-direction:column; justify-content:space-between }
.author-row li { border-bottom:1px dotted var(--line); padding:.3rem 0; line-height:1.6 }
.author-row li a { font-family:IRMitra, Amiri, serif; font-size:1.08rem; display:block }
.author-row li time { color:var(--muted); font-size:.75rem }

@media (max-width: 980px) {
  .hero { grid-template-columns:260px 1fr; gap:2rem } .hero-name { font-size:3rem }
  .author-rows { grid-template-columns:1fr }
}
@media (max-width: 640px) {
  .hero { grid-template-columns:1fr; text-align:center; gap:1.2rem; padding-top:1.4rem } .hero-page { max-width:240px; margin:0 auto }
  .hero-name { font-size:2.6rem } .hero-line { font-size:1.3rem } .hero-lede { margin-inline:auto } .hero .searchbox { margin-inline:auto }
  .author-row { grid-template-columns:120px 1fr; gap:1rem } .author-row h3 { font-size:1.25rem } .author-row li a { font-size:1rem }
}
/* one line per title, so four titles stand as tall as the portrait */
.author-row li a { white-space:nowrap; overflow:hidden; text-overflow:ellipsis }

/* ---------------------------------------------------------------- home: banners (App\Support\Home::banners)
   As on the old site's front page: a narrow strip, the post's picture as background, the title and the author
   in a dark band at the right. Up to three, crossfading (public/js/slides.js). */
.slides { position:relative; height:230px; margin-top:1.6rem; border-radius:.3rem; overflow:hidden; background:#2a2118 }
.slide { position:absolute; inset:0; display:block; opacity:0; visibility:hidden; transition:opacity .9s, visibility .9s; color:#fff; text-decoration:none }
.slide.is-on { opacity:1; visibility:visible; z-index:1 }
.slide img { width:100%; height:100%; object-fit:cover; object-position:center 35%; display:block; filter:saturate(.9) }
.slide.no-image { background:linear-gradient(120deg, #3a2a1c, #6b4a2a) }
.slide-band { position:absolute; inset-inline-start:0; top:50%; transform:translateY(-50%); max-width:58%; background:rgba(14,12,10,.78);
  padding:1rem 1.6rem 1rem 2rem }
.slide-band h2 { margin:0 0 .3rem; font-family:IRMitra, Amiri, serif; font-size:1.75rem; line-height:1.5; font-weight:700 }
.slide-by { color:#e8c27a; font-size:.9rem; font-weight:700 }
.slide:hover h2 { text-decoration:underline; text-decoration-thickness:1px; text-underline-offset:.35em }
.slides-dots { position:absolute; z-index:2; bottom:.7rem; inset-inline-end:1rem; display:flex; gap:.45rem }
.slides-dots button { width:.7rem; height:.7rem; padding:0; border-radius:50%; border:1.5px solid #fff; background:transparent; cursor:pointer }
.slides-dots button[aria-current] { background:#fff }

/* ---------------------------------------------------------------- home: live pages */
/* the old name images are JPEGs on white: multiply lets the white melt into any background */
.home-name-img { mix-blend-mode:multiply }
.live-pages { margin-top:2.4rem }
/* the name image keeps its size; when the author's name does not fit beside it, the name goes to the next line */
.author-row h3 { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:flex-end; gap:.15rem .8rem; margin-bottom:.4rem }
.author-row h3 > a { flex:none; max-width:100% }
.author-row h3 .home-name-img { height:42px; width:auto; max-width:100%; object-fit:contain; display:block }
.author-row h3 .home-name-text { font-family:IRMitra, Amiri, serif; font-size:1.5rem; color:var(--maroon) }
.author-row .who { color:var(--muted); font-family:Vazirmatn, sans-serif; font-size:.8rem; font-weight:400; white-space:nowrap }
.live-pages .author-row ul { justify-content:flex-start }
.live-pages .author-row li { padding-block:.12rem; padding-inline:1.1rem 0; line-height:1.55 }
.live-pages .author-row li a { font-family:IRMitra, Amiri, serif; font-size:1.12rem }
ul.bullets li { position:relative; padding-inline-start:1.1rem }
ul.bullets li::before { content:""; position:absolute; inset-inline-start:.1rem; top:.8em; width:.42rem; height:.42rem; border-radius:50%; background:#111 }

/* ---------------------------------------------------------------- home: from the archive; most read */
.treasure { display:grid; grid-template-columns:1fr 1fr; gap:1.6rem 2rem }
.treasure article { border-top:2px solid var(--gold); padding-top:.6rem }
.treasure .t-home { color:var(--gold); font-size:.8rem; font-weight:700 }
.treasure h3 { margin:.2rem 0 .3rem; font-family:IRMitra, Amiri, serif; font-size:1.25rem; line-height:1.55 }
.treasure p { margin:0 0 .3rem; color:#4a4339; font-size:.92rem; line-height:1.9; text-align:justify }
.treasure .t-by { color:var(--muted); font-size:.82rem }
ol.popular { padding:0 1.3rem 0 0 }
ol.popular li { display:flex; justify-content:space-between; align-items:baseline; gap:.8rem; padding:.15rem 0; line-height:1.7 }
ol.popular li a { min-width:0 }
ol.popular .views { color:var(--muted); font-size:.8rem; white-space:nowrap; direction:ltr }

@media (max-width:980px) {
}
@media (max-width:640px) {
  .toc .face { width:68px; height:90px } .toc li { gap:.9rem }
  .footer-about { grid-template-columns:1fr; gap:1.4rem; padding-top:2.2rem } .footer-page { max-width:170px; margin:0 auto }
  .footer-grid { grid-template-columns:1fr 1fr } .footer-grid .footer-years { grid-column:1 / -1 }
  .slides { height:190px } .slide-band { max-width:100%; inset-inline:0; top:auto; bottom:0; transform:none; padding:.7rem 1rem 1.6rem }
  .slide-band h2 { font-size:1.25rem } .slides-dots { bottom:.45rem }
  .treasure { grid-template-columns:1fr }
}

/* ---------------------------------------------------------------- advanced search */
.adv-search { border:1px solid var(--line); border-radius:.6rem; background:#fbfaf6; padding:1.3rem 1.4rem 1rem; margin:1rem 0 1.5rem }
.adv-search label, .adv-years legend { display:flex; flex-direction:column; gap:.3rem; font-size:.9rem; color:var(--muted); font-weight:500 }
.adv-years { border:0; margin:0; padding:0; display:flex; flex-wrap:wrap; gap:.3rem .5rem; align-items:end }
.adv-years legend { padding:0; margin-bottom:.3rem; float:none; width:100% }
.adv-years select { flex:1 1 0; width:auto }
.adv-search label, .adv-years { min-width:0 }
.adv-search input, .adv-search select { width:100%; box-sizing:border-box; font:inherit; color:var(--ink); border:1px solid var(--line); border-radius:.4rem; padding:.5rem .7rem; background:#fff; min-width:0 }
.adv-search input:focus, .adv-search select:focus { outline:2px solid var(--gold); outline-offset:0 }
.adv-search option.opt-head { font-weight:700; color:var(--maroon) }
/* the number of posts after each subject/facet is grey; a native <option> cannot colour part of its text,
   so where the browser has the customizable select the lists use it (elsewhere the number stays plain text) */
@supports (appearance: base-select) {
  .adv-tags select, .adv-tags select::picker(select) { appearance:base-select }
  .adv-tags select { display:flex; align-items:center; justify-content:space-between; gap:.4rem; cursor:pointer }
  .adv-tags select::picker-icon { color:var(--muted); font-size:.8rem }
  .adv-tags select::picker(select) { border:1px solid var(--line); border-radius:.4rem; background:#fff; box-shadow:0 6px 18px rgba(0,0,0,.12); max-height:60vh; padding:.25rem 0 }
  .adv-tags option { padding:.3rem .7rem; white-space:pre; color:var(--ink); display:block }
  .adv-tags option:hover, .adv-tags option:focus-visible { background:#f3efe4; outline:0 }
  .adv-tags option:checked { background:#efe8d6 }
  .adv-tags option::checkmark { display:none }
  .adv-tags option.opt-head { color:var(--maroon) }
  .adv-tags .opt-n { color:#9a958a; font-weight:400; font-size:.85em }
}
.adv-words { display:grid; grid-template-columns:repeat(3, 1fr); gap:1rem }
.adv-filters { display:grid; grid-template-columns:1fr 1.4fr 1fr 1.5fr 1fr; gap:1rem; margin-top:1rem }
.adv-go { display:flex; align-items:center; gap:1.2rem; margin-top:1.1rem }
.adv-go button { border:0; background:var(--maroon); color:#fff; padding:.55rem 2.2rem; border-radius:.4rem; font:inherit; font-weight:700; cursor:pointer }
.adv-go a { color:var(--muted); font-size:.9rem }
.adv-help { font-size:.82rem; margin:.8rem 0 0 }
.adv-count { font-weight:700; color:var(--maroon); margin:0 0 .5rem }
/* subjects, facets and names (tags of the posts) */
.adv-tags { border:0; border-top:1px dashed var(--line); margin:1.1rem 0 0; padding:.9rem 0 0; display:grid; grid-template-columns:repeat(4, 1fr); gap:1rem; min-width:0 }
.adv-tags legend { float:left; width:100%; padding:0; margin:0 0 .2rem; font-weight:700; color:var(--navy); font-size:.95rem }
.adv-tags legend + * { clear:both }
/* the filters chosen, each with its × */
.adv-chosen { list-style:none; padding:0; margin:.2rem 0 .8rem; display:flex; flex-wrap:wrap; gap:.4rem }
.adv-chosen li { background:#f3efe4; border:1px solid var(--line); border-radius:1rem; padding:.1rem .4rem .1rem .8rem; font-size:.88rem }
.adv-chosen a { display:inline-block; padding:0 .35rem; color:var(--maroon); font-weight:700; text-decoration:none }
/* refining the results by the tags that come most among them */
.adv-refine { border:1px solid var(--line); border-radius:.5rem; padding:.5rem .9rem; margin:0 0 1rem; background:#fbfaf6; font-size:.9rem }
.adv-refine summary { cursor:pointer; font-weight:700; color:var(--navy) }
.adv-refine div { margin:.45rem 0; line-height:2.1 }
.adv-refine b { color:var(--muted); font-weight:500; margin-inline-end:.3rem }
.adv-refine div a { display:inline-block; border:1px solid var(--line); border-radius:.3rem; padding:0 .55rem; margin:0 0 .3rem .3rem; background:#fff; line-height:1.9 }
.adv-refine small { color:var(--muted) }
@media (max-width:980px) { .adv-filters { grid-template-columns:1fr 1fr } .adv-years { grid-column:1 / -1 } .adv-tags { grid-template-columns:1fr 1fr } }
@media (max-width:640px) {
  .adv-search { padding:1rem }
  .adv-words, .adv-filters, .adv-tags { grid-template-columns:1fr }
  .adv-go button { flex:1 }
}
ol.popular .by { font-weight:700; color:var(--ink) }
/* front page: the chosen announcements, in the left column under the popular posts */
.home-notice { display:block; color:inherit; text-decoration:none; padding:.8rem 0; border-bottom:1px dotted var(--line) }
.home-notice img { display:block; width:100%; height:auto; margin-bottom:.5rem }
.home-notice .hn-title { display:block; font-weight:700; font-size:.98rem; color:var(--navy) }
.home-notice .hn-text { display:block; font-size:.9rem; line-height:1.8; margin-top:.25rem; color:var(--ink) }
.home-notice:hover .hn-title { text-decoration:underline }
.hn-more { display:block; text-align:left; font-size:.88rem; margin-top:.5rem }

/* Author's preview band (panel/preview): stays on top while scrolling, never shown to readers. */
.preview-band { position: sticky; top: 0; z-index: 50; display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: center; justify-content: center; padding: .55rem 1rem; background: #7a1f1f; color: #fff; font-size: .95rem; line-height: 1.7; }
.preview-band a { color: #fff; font-weight: 700; text-decoration: underline; }
@media print { .preview-band { display: none; } }

/* Words searched for: in the results (title, passage) and on the post page (public/js/highlight.js). Not the authors' own .prose mark. */
mark.hl { background:#ffe08a; color:inherit; border-radius:2px; padding:0 .08em; box-decoration-break:clone; -webkit-box-decoration-break:clone }
mark.hl.is-current { background:#ffc24d; box-shadow:0 0 0 2px #e8a317 }
.toc p.passage { color:var(--ink) }
.hl-bar { position:sticky; top:0; z-index:20; display:flex; flex-wrap:wrap; align-items:center; gap:.35rem .9rem; margin:0 0 1rem; padding:.45rem .8rem; background:#fffaf0; border:1px solid #ecd9a8; border-radius:.4rem; font-size:.9rem; line-height:1.7 }
.hl-bar[hidden] { display:none }
.hl-bar span { flex:1 1 12rem }
.hl-bar button { font:inherit; padding:.1rem .7rem; border:1px solid var(--line); border-radius:.3rem; background:#fff; cursor:pointer }
.hl-bar button[hidden] { display:none }

/* ---------------------------------------------------------------- messages and comments (forms are made for the thumb first) */
.hp { position:absolute !important; inset-inline-start:-9999px; width:1px; height:1px; overflow:hidden }
.kform { display:grid; gap:.9rem; max-width:40rem }
.kform label { display:grid; gap:.3rem; font-weight:500 }
.kform .row { display:grid; grid-template-columns:1fr 1fr; gap:.9rem }
.kform input:not([type=checkbox]):not([type=radio]), .kform select, .kform textarea { width:100%; font:inherit; font-size:16px; padding:.65rem .8rem; border:1px solid #cfc9bd; border-radius:.45rem; background:#fff; color:var(--ink) }
.kform textarea { min-height:9rem; resize:vertical; line-height:1.9 }
.kform input:focus, .kform select:focus, .kform textarea:focus { outline:2px solid var(--maroon); outline-offset:1px; border-color:var(--maroon) }
.kform .hint, .form-hint { font-size:.88rem; color:var(--muted); font-weight:400; margin:0 }
.kbtn, .kform button, .btn-line { display:inline-flex; align-items:center; justify-content:center; min-height:2.9rem; padding:.5rem 1.4rem; border-radius:.45rem; font:inherit; font-weight:700; cursor:pointer; text-decoration:none }
.kbtn, .kform button { background:var(--maroon); color:#fff; border:0 }
.kbtn:hover, .kform button:hover { background:#5f1717; color:#fff }
.btn-line { border:1px solid var(--maroon); color:var(--maroon); background:#fff; min-height:2.6rem; padding:.35rem 1.1rem }
.btn-line:hover { background:var(--maroon); color:#fff }
.notice { background:#f1f6ee; border:1px solid #cfe0c4; border-radius:.45rem; padding:.8rem 1rem; margin:1rem 0 }
.errors { background:#fbefee; border:1px solid #ecc8c4; border-radius:.45rem; padding:.7rem 2rem .7rem 1rem; margin:1rem 0; color:#7a1f1f }
.write-to { margin:.8rem 0 0 }
.contact-form, .msg-page { max-width:46rem; margin:2rem auto }
.msg-page h1 { font-size:1.6rem; margin:.5rem 0 1rem }

.comments { max-width:46rem; margin:2.5rem auto 0; border-top:1px solid var(--line); padding-top:1.5rem }
.comments > h2 { font-size:1.25rem; margin:0 0 1rem }
.comment { padding:1rem 0; border-bottom:1px dotted var(--line) }
.comment-head { display:flex; flex-wrap:wrap; gap:.2rem .8rem; align-items:baseline; font-size:.92rem }
.comment-head b { color:var(--navy) }
.comment-head time { color:var(--muted); font-size:.85rem }
.comment-body { white-space:pre-line; margin:.35rem 0 0; overflow-wrap:anywhere }
.comment-reply { margin:.8rem 1.4rem 0 0; padding:.6rem 1rem; background:#faf8f3; border-inline-start:3px solid var(--gold); border-radius:.3rem }
.comment-write { margin:0 0 1rem }
.comment-write > summary { list-style:none; display:inline-flex; cursor:pointer }
.comment-write > summary::-webkit-details-marker { display:none }
.comment-write[open] > summary { margin-bottom:1rem }
.comment-write .kform { padding:1rem; border:1px solid var(--line); border-radius:.5rem; background:#fcfbf8 }

.my-list { list-style:none; padding:0; margin:0 }
.my-list li { border-bottom:1px solid var(--line) }
.my-list a { display:block; padding:.85rem .2rem }
.my-list .what { font-weight:700; display:block }
.my-list .meta { font-size:.85rem; color:var(--muted) }
.my-list .new { display:inline-block; background:var(--maroon); color:#fff; border-radius:1rem; font-size:.75rem; padding:0 .55rem; margin-inline-start:.4rem; font-weight:500 }
.thread { list-style:none; padding:0; margin:1rem 0 1.5rem }
.thread li { padding:.8rem 1rem; border:1px solid var(--line); border-radius:.5rem; margin-bottom:.8rem; background:#fff }
.thread li.theirs { background:#faf8f3; border-color:#e9dcc2 }
.thread .who { font-size:.88rem; color:var(--muted); margin-bottom:.3rem }
.thread .who b { color:var(--navy) }
.thread .text { white-space:pre-line; overflow-wrap:anywhere }
.my-tools { display:flex; flex-wrap:wrap; gap:.6rem; align-items:center; margin:1rem 0 }
.my-tools form { margin:0 }
.linkish { background:none; border:0; padding:0; font:inherit; color:var(--maroon); cursor:pointer; text-decoration:underline }

@media (max-width:640px) {
  .kform .row { grid-template-columns:1fr }
  .kform button, .kbtn { width:100% }
  .comment-write > summary { display:flex; width:100% }
  .comment-write .kform { padding:.8rem }
  .comment-reply { margin-inline-start:0; margin-right:.6rem }
  .contact-form, .msg-page { margin:1.2rem auto }
}

/* «اطلاعیه‌های کاتبان»: a part of the site, not a book — a dated list, and each notice on a plain page of the site. */
.notice-years { display:flex; flex-wrap:wrap; gap:.4rem; margin:1rem 0 .4rem }
.notice-years a { border:1px solid var(--line); border-radius:.3rem; padding:.1rem .75rem; font-size:.9rem }
.notice-years a[aria-current] { background:var(--navy); border-color:var(--navy); color:#fff }
.notice-list { list-style:none; margin:1rem 0 0; padding:0; max-width:52rem }
.notice-list li { border-bottom:1px solid var(--line) }
.notice-list a { display:grid; grid-template-columns:1fr 180px; grid-template-areas:"date img" "title img" "text img"; align-content:start; column-gap:1.4rem; padding:1.1rem 0; color:inherit; text-decoration:none }
.notice-list a:not(:has(img)) { grid-template-columns:1fr; grid-template-areas:"date" "title" "text" }
.notice-list time { grid-area:date; color:var(--gold); font-size:.85rem; font-weight:700 }
.notice-list .nl-title { grid-area:title; font-family:IRMitra, Amiri, serif; font-size:1.35rem; line-height:1.55; font-weight:700; color:var(--navy) }
.notice-list .nl-text { grid-area:text; margin-top:.25rem; font-size:.93rem; line-height:1.9; color:var(--muted); text-align:justify }
.notice-list img { grid-area:img; width:180px; height:120px; object-fit:cover; border-radius:.3rem; background:#f3f1ec }
.notice-list a:hover .nl-title { text-decoration:underline; text-decoration-thickness:1px; text-underline-offset:.35em }

.notice-layout { display:grid; grid-template-columns:minmax(0,1fr) 16rem; gap:3rem; align-items:start; padding-top:1.6rem }
.notice-head { border-bottom:1px solid var(--line); padding-bottom:1rem; margin-bottom:1.2rem }
.notice-head h1 { font-family:IRMitra, Amiri, serif; font-size:2.1rem; line-height:1.5; color:var(--maroon); margin:.3rem 0 .4rem }
.notice-head time { color:var(--gold); font-weight:700; font-size:.92rem }
.notice-head .by { color:var(--navy); font-size:.95rem; margin-top:.2rem }
.notice-photo { margin:0 0 1.2rem } .notice-photo img { display:block; max-width:100%; max-height:520px; height:auto; margin:0 auto; border-radius:.3rem }
.ann .prose { max-width:none; margin-top:0 }
.ann .prose img { max-width:100%; height:auto }
.ann .after-book { max-width:none; margin-top:1.6rem }
.ann .neighbours { max-width:none }
.notice-side { position:sticky; top:1rem; border-inline-start:1px solid var(--line); padding-inline-start:1.4rem; font-size:.92rem }
.notice-side h2 { font-family:IRMitra, Amiri, serif; font-size:1.2rem; color:var(--navy); margin:0 0 .6rem }
.notice-side ul { list-style:none; margin:0; padding:0 }
.notice-side li { padding:.45rem 0; border-bottom:1px dotted var(--line); line-height:1.7 }
.notice-side li small { display:block; color:var(--muted); font-size:.8rem }
@media (max-width: 760px) {
  .notice-list a { grid-template-columns:1fr; grid-template-areas:"img" "date" "title" "text" }
  .notice-list img { width:100%; height:auto; aspect-ratio:3/2; margin-bottom:.6rem }
  .notice-list .nl-title { font-size:1.2rem }
  .notice-layout { grid-template-columns:1fr; gap:1.5rem; padding-top:1rem }
  .notice-head h1 { font-size:1.6rem }
  .notice-side { position:static; border-inline-start:0; padding-inline-start:0; border-top:1px solid var(--line); padding-top:1rem }
}

/* «درسگفتارها»: lists of lectures (the section and an author's page) and the lecture's own page */
.lecture-list { display:flex; flex-direction:column; gap:1.6rem; margin-top:1.2rem }
.lecture-card { display:grid; grid-template-columns:260px minmax(0,1fr); gap:1.4rem; align-items:start; color:inherit; text-decoration:none; padding-bottom:1.6rem; border-bottom:1px solid var(--line) }
.lecture-card img, .lecture-card .lc-blank { width:100%; aspect-ratio:16/10; object-fit:cover; border-radius:.3rem; background:#f3f1ec; display:block }
.lecture-card .lc-text { display:flex; flex-direction:column; gap:.2rem }
.lc-title { font-family:IRMitra, Amiri, serif; font-size:1.45rem; font-weight:700; line-height:1.5; color:var(--navy) }
.lecture-card:hover .lc-title { text-decoration:underline; text-decoration-thickness:1px; text-underline-offset:.35em }
.lc-speaker { font-weight:500; color:var(--maroon) }
.lc-meta { display:flex; flex-wrap:wrap; gap:.3rem .5rem; align-items:center; color:var(--muted); font-size:.85rem }
.lc-meta span { border:1px solid var(--line); border-radius:1rem; padding:0 .55rem; font-size:.78rem }
.lc-intro { margin-top:.35rem; font-size:.95rem; line-height:1.95; color:#333; text-align:justify }
.lecture-speakers { display:flex; flex-wrap:wrap; gap:.4rem .6rem; margin:.4rem 0 .6rem }
.lecture-speakers a { border:1px solid var(--line); border-radius:1.2rem; padding:.2rem .8rem; text-decoration:none; color:var(--navy); font-size:.92rem }
.lecture-speakers a[aria-current] { background:var(--maroon); border-color:var(--maroon); color:#fff }
.lecture-speakers small { opacity:.75 }
.lecture-speaker { display:flex; align-items:center; gap:.6rem; font-size:1.15rem; font-weight:700; color:var(--navy); margin:.2rem 0 .3rem }
.lecture-speaker img { width:52px; height:52px; border-radius:50%; object-fit:cover; object-position:top }
.lecture-intro { margin-bottom:1.4rem }
.lecture-media, .lecture-transcript { margin:1.4rem 0 }
/* on an author's page: the column of the portrait, with the way to the lectures under it */
.toc-side { display:flex; flex-direction:column; gap:.8rem; align-self:end }
.home-switch { display:flex; flex-direction:column; gap:.35rem }
.home-switch a { display:block; text-align:center; border:1px solid var(--line); border-radius:.3rem; padding:.35rem .5rem; text-decoration:none; color:var(--navy); font-weight:500 }
.home-switch a[aria-current] { background:var(--maroon); border-color:var(--maroon); color:#fff }
.home-switch small { opacity:.8 }
@media (max-width: 760px) {
  .lecture-card { grid-template-columns:1fr; gap:.7rem }
  .lc-title { font-size:1.25rem }
  .home-switch { flex-direction:row; flex-wrap:wrap } .home-switch a { flex:1 1 auto; font-size:.88rem }
}
