/* Houtaf al Thawra — site styles, sister of Joudran al Thawra (joudran.abisalloum.com).
   Arabic (RTL) first, English translation on request. Tokens copied from Joudran. */
:root {
  --paper: #EDECE8;
  --paper-2: #FFFFFF;
  --ink: #1C1A17;
  --mid: #6B675F;
  --rule: #CBC7BE;
  --spray: #CF1F2B;
  --display: "Anton", "Arial Narrow", Impact, sans-serif;
  --body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --arabic: "IBM Plex Sans Arabic", "Noto Naskh Arabic", "Segoe UI", sans-serif;
  --arabic-display: "Lalezar", "IBM Plex Sans Arabic", sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  --maxw: 1100px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --paper: #1B1A18; --paper-2: #242320; --ink: #ECE9E2; --mid: #9C978E; --rule: #3B3934; --spray: #E8404B; }
}
:root[data-theme="dark"] { --paper: #1B1A18; --paper-2: #242320; --ink: #ECE9E2; --mid: #9C978E; --rule: #3B3934; --spray: #E8404B; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--arabic); font-size: 18px; line-height: 1.7; }
a { color: inherit; text-decoration-color: var(--spray); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--spray); }
:focus-visible { outline: 3px solid var(--spray); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--arabic-display); font-weight: 400; line-height: 1.25; margin: 0 0 0.3em; }
h1 { font-size: clamp(36px, 6vw, 64px); line-height: 1.15; }
h2 { font-size: clamp(24px, 3.4vw, 34px); }
h3 { font-size: clamp(20px, 2.4vw, 26px); }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; }
li { list-style: none; }
[lang="en"] { font-family: var(--body); }
h1[lang="en"], h2[lang="en"], [lang="en"] h3 { font-family: var(--display); letter-spacing: .01em; }
.en { direction: ltr; text-align: left; color: var(--mid); }
.muted { color: var(--mid); }
.alt-name { display: block; font-family: var(--display); font-size: 0.5em; color: var(--mid); margin-top: .2em; letter-spacing: .01em; line-height: 1.2; }
.skip { position: absolute; inset-inline-start: 8px; top: 0; transform: translateY(-120%); background: var(--spray); color: #fff; padding: .5em 1em; z-index: 100; }
.skip:focus { transform: none; }

/* header / footer (as Joudran) */
.top { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5em 1.5em; padding: 14px var(--gutter); border-bottom: 3px solid var(--ink); }
.brand { font-family: var(--arabic-display); font-size: 30px; text-decoration: none; line-height: 1.3; }
.brand-other { font-family: var(--display); font-size: 0.7em; color: var(--spray); margin-inline-start: .35em; letter-spacing: .02em; }
.nav { display: flex; flex-wrap: wrap; gap: 0 1.2em; margin-inline-start: auto; font-size: 16px; }
.nav a { text-decoration: none; padding: .2em 0; border-bottom: 2px solid transparent; }
.nav a[aria-current="page"] { border-bottom-color: var(--spray); }
.show-en .nav { flex-direction: row-reverse; justify-content: flex-end; }
.lang { font: inherit; font-family: var(--body); font-size: 15px; color: inherit; background: none; cursor: pointer; border: 2px solid var(--ink); padding: 1px 10px; }
.lang:hover, .lang[aria-pressed="true"], .show-en .lang { background: var(--ink); color: var(--paper); }
.a2hs { font: inherit; font-size: 14px; color: inherit; background: none; border: 1px solid var(--rule); padding: 1px 8px; cursor: pointer; }
.foot { padding: 28px var(--gutter) 40px; border-top: 1px solid var(--rule); color: var(--mid); font-size: 14px; margin-top: 56px; line-height: 1.6; }
.foot p { max-width: 70ch; }
.foot .en { display: block; }
.sister { font-family: var(--arabic-display); font-size: 18px; color: var(--ink); text-decoration: none; }
.sister span { font-family: var(--display); color: var(--spray); margin-inline-start: .35em; }
main { display: block; padding: 0 var(--gutter); max-width: var(--maxw); margin: 0 auto; }
.ph { padding: 32px 0 8px; }

/* search and tags */
.search { margin: 28px 0 8px; }
.search input { font: inherit; font-size: 17px; width: 100%; max-width: 520px; padding: 8px 12px; border: 2px solid var(--ink); background: var(--paper-2); color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; }
.chip { font-size: 14px; text-decoration: none; border: 1px solid var(--ink); padding: 0 10px; border-radius: 999px; line-height: 1.8; }
.chip:hover { background: var(--ink); color: var(--paper); }

/* chant list */
.chants-list .chant { padding: 16px 0 18px; border-bottom: 1px solid var(--rule); }
.chants-list .chant h2 { margin: 0; }
.chants-list .chant h2 a { text-decoration: none; }
.chants-list .chant h2 a:hover { color: var(--spray); }
.chants-list .text { margin-top: 8px; }

/* chant page */
.chant-page h1 { padding-top: 32px; }
.chant-page .chips { margin-bottom: 20px; }
.text { font-size: clamp(21px, 2.6vw, 25px); line-height: 1.6; font-weight: 500; margin-bottom: 24px; }
.text .line { min-height: 1.6em; }
.text .line .en { display: none; }
.show-en .text .line .en { display: block; font-size: .72em; font-weight: 400; line-height: 1.45; margin-bottom: .45em; }
@media (min-width: 760px) {
  .show-en .text .line { display: grid; grid-template-columns: 1fr 1fr; column-gap: 32px; align-items: baseline; }
  .show-en .text .line .en { margin-bottom: 0; }
}
.listen audio { width: 100%; max-width: 480px; margin: 4px 0 16px; }
.description { border-top: 3px solid var(--ink); padding-top: 10px; max-width: 68ch; }
.description-title { font-family: var(--arabic-display); font-size: 22px; }
.description-text li { list-style: disc; margin-inline-start: 1.2em; }

/* print / listen / about */
.picks { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 20px; }
.picks label { font-size: 15px; border: 1px solid var(--ink); padding: 2px 10px; border-radius: 999px; cursor: pointer; display: inline-flex; gap: .4em; align-items: center; }
.picks label:has(input:checked) { background: var(--ink); color: var(--paper); }
.picks input { accent-color: var(--spray); margin: 0; }
.playlist-page .listen { padding: 12px 0 4px; border-bottom: 1px solid var(--rule); }
.playlist-page .listen a { font-family: var(--arabic-display); font-size: 22px; text-decoration: none; }
.about-page { max-width: 68ch; }
.show-en .about-page { max-width: none; }
.about-page h3 { margin-top: 24px; }
.about-page .row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 40px; }
.about-page .en { display: none; }
.show-en .about-page .en { display: block; }
@media (min-width: 760px) { .show-en .about-page .row { grid-template-columns: 1fr 1fr; } }
.about-page ul li { list-style: disc; margin-inline-start: 1.2em; }
.contact-page { padding-top: 32px; max-width: 68ch; }

@media print {
  .top, .foot, .search, .picks, .ph, .listen, .skip { display: none; }
  body { background: #fff; color: #000; }
  .chants-list .chant { border-bottom: 1px solid #000; break-inside: avoid; }
}
