/* AnshaSayed.com: Hindi, Urdu and Bengali article editions (main.i18n). Header and footer stay English. */

/* Script fonts */
.i18n--hi { --f-display: "Noto Serif Devanagari", "Noto Sans Devanagari", serif; --f-body: "Noto Sans Devanagari", "Inter", system-ui, sans-serif; }
.i18n--bn { --f-display: "Noto Serif Bengali", "Noto Sans Bengali", serif; --f-body: "Noto Sans Bengali", "Inter", system-ui, sans-serif; }
.i18n--ur { --f-display: "Noto Nastaliq Urdu", "Noto Naskh Arabic", serif; --f-body: "Noto Naskh Arabic", "Noto Nastaliq Urdu", system-ui, sans-serif; }

/* Letter-spacing and faux caps break joined letters and conjuncts in these scripts. */
.i18n, .i18n * { letter-spacing: 0 !important; }
.i18n .eyebrow, .i18n .toc__h, .i18n .post-item__meta, .i18n .post-item__more, .i18n .chip, .i18n .crumbs { text-transform: none; }
.i18n em, .i18n i { font-style: normal; }
.i18n .eyebrow, .i18n .toc__h { font-size: .95rem; }
.i18n .crumbs a, .i18n .crumbs span { font-size: .85rem; }

/* Headline sizes: these scripts need more height than Cormorant, so ease the display scale. */
.i18n .phero__title { font-size: clamp(2.2rem, 1.6rem + 2.6vw, 4.2rem); line-height: 1.3; font-weight: 500; }
.i18n .post__body { line-height: 1.95; }
.i18n .post__body h2 { line-height: 1.45; font-weight: 500; font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.3rem); }
.i18n .post-item__title { line-height: 1.45; font-weight: 500; }
.i18n .display { line-height: 1.35; }

/* Urdu: Nastaliq has tall ascenders and deep descenders. */
.i18n--ur .phero__title { line-height: 1.9; font-size: clamp(1.9rem, 1.4rem + 2.2vw, 3.4rem); }
.i18n--ur .post__body { line-height: 2.35; font-size: clamp(1.1rem, 1.04rem + .3vw, 1.25rem); }
.i18n--ur .post__body h2, .i18n--ur .post-item__title, .i18n--ur .display { line-height: 2; }
.i18n--ur .post__body h2 { font-size: clamp(1.5rem, 1.25rem + 1vw, 2.1rem); }
.i18n .phero__meta bdi { unicode-bidi: isolate; }
.i18n--ur .phero__intro, .i18n--ur .post-item__ex { line-height: 2.1; }

/* Right-to-left fixes for components written with physical left/right. */
main[dir="rtl"] .prose ul, main[dir="rtl"] .prose ol { padding-left: 0; padding-right: 1.4rem; }
main[dir="rtl"] .prose blockquote { border-left: 0; border-right: 2px solid var(--burgundy); padding-left: 0; padding-right: 1.4rem; }
main[dir="rtl"] .toc ol { border-left: 0; border-right: 1px solid var(--line); }
main[dir="rtl"] .toc a { padding-left: 0; padding-right: 1rem; margin-left: 0; margin-right: -1px; border-left: 0; border-right: 1px solid transparent; }
main[dir="rtl"] .toc a:hover, main[dir="rtl"] .toc a.is-active { border-right-color: var(--burgundy); }
main[dir="rtl"] .post-item__more i, main[dir="rtl"] .posts-switch i { display: inline-block; transform: scaleX(-1); }
main[dir="rtl"] .eyebrow::before { order: 2; }
main[dir="rtl"] .post__body > p:first-child::first-letter { float: right; padding: 0 0 0 .6rem; }
main[dir="rtl"] .post-item__meta > * + *::before { margin-right: 0; margin-left: 1rem; }
.i18n .post__body > p:first-child::first-letter { float: none; font: inherit; color: inherit; padding: 0; }

/* Language switcher (article sidebar) */
.lang-switch { margin: 0 0 2rem; }
.lang-switch ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.lang-switch a { display: inline-block; padding: .35rem .85rem; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--ink); font-size: .95rem; line-height: 1.6; transition: border-color .3s, background .3s, color .3s; }
.lang-switch a:hover { border-color: var(--burgundy); }
.lang-switch a[aria-current] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.lang-switch a[lang="ur"], .lang-index a[lang="ur"] { font-family: "Noto Naskh Arabic", "Segoe UI", Tahoma, "Arial", sans-serif; font-size: 1.05rem; }

/* "Also in" links on the English article index */
.lang-index { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin: 0 0 2rem; color: var(--muted); font-size: var(--s-1); }
.lang-index a { color: var(--ink); text-decoration: none; padding: .3rem .9rem; border: 1px solid var(--line); border-radius: 999px; font-size: 1rem; transition: border-color .3s; }
.lang-index a:hover { border-color: var(--burgundy); }

/* English site chrome wrappers on translated pages (no box of their own). */
.chrome-wrap { display: contents; }
