/* Khutbah.mu — La Réflexion du vendredi
   Editorial design system: one reading column, two typefaces, one accent. */

/* Self-hosted fonts, Latin subset only (covers French, « », ’, œ).
   Source Serif 4 is pinned to optical size 20 and weights 400–600, Inter to
   400–600; Seaweed Script only contains the letters of "La Réflexion du vendredi". */
@font-face {
  font-family: 'Source Serif 4'; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url('../../../fonts/source-serif-4-latin-var.woff2') format('woff2');
}
@font-face {
  font-family: 'Source Serif 4'; font-style: italic; font-weight: 400; font-display: swap;
  src: url('../../../fonts/source-serif-4-italic-latin-var.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url('../../../fonts/inter-latin-var.woff2') format('woff2');
}
@font-face {
  font-family: 'Seaweed Script'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('../../../fonts/seaweed-script-latin.woff2') format('woff2');
}

:root {
  --ink: #172033;
  --slate-dark: #475569;
  --slate: #64748B;
  --muted: #94A3B8;
  /* Brand palette (public/img/khutbah.png): dark teal, mid teal, gold.
     Text accent is the mid teal deepened to pass 4.5:1 on pale grounds. */
  --brand-teal-dark: #103C4B;
  --brand-teal: #41787C;
  --brand-gold: #C8A454;
  --accent: #356468;
  --accent-strong: #103C4B;
  --accent-pale: #E8F0F0;
  --highlight: #F3E7C6;
  --error: #B42318;
  --success: #1F7A4D;
  --paper: #FAFAF8;
  --white: #FFFFFF;
  --soft: #F5F7F9;
  --verse: #E0E8E7;          /* brand teal at 14% on the page colour */
  --line: #E5E7EB;
  --line-soft: #EEF0F3;
  --field: #CBD5E1;
  --footer: #103C4B;
  --footer-line: #2A5664;

  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --sans: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --script: 'Seaweed Script', 'Brush Script MT', cursive;

  --read: 760px;
  --measure: 712px;
  --prose-size: 19px;
  --text-step: 0px;
  --wide: 1200px;
  --gutter: 40px;
}

/* Reader text size, set by the A− / A+ tools and remembered in localStorage. */
:root[data-text="s"] { --text-step: -2px; }
:root[data-text="l"] { --text-step: 2px; }
:root[data-text="xl"] { --text-step: 4px; }

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 24px; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); }

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--ink); color: var(--white) !important;
  padding: 12px 18px; border-radius: 4px; font-weight: 600;
}
.skip-link:focus { top: 12px; }

.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter); }
.read { max-width: var(--read); margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */

/* Dark teal band: the logo's own background, so the logo sits flush. */
.site-header {
  --header-bg: var(--brand-teal-dark);
  --header-strip: #0C3140;
  --header-raised: #1A4756;
  --header-line: #2A5664;
  --header-text: #E4EEEF;
  --header-muted: #B8CDD1;
  --header-gold: #D9BC7A;
  background: var(--header-bg); color: var(--header-text);
  border-bottom: 3px solid var(--brand-gold);
}
.site-header a:focus-visible, .site-header input:focus-visible { outline-color: var(--header-gold); }

.topbar { background: var(--header-strip); font-size: 13px; color: var(--header-muted); }
.topbar__in { display: flex; justify-content: space-between; align-items: center; gap: 16px; height: 36px; }
.topbar__in > .script { font-size: 19px; line-height: 1; color: var(--header-text); }

.masthead { display: flex; align-items: center; gap: 32px; min-height: 116px; padding-top: 22px; padding-bottom: 22px; }

.brand { display: block; flex: 0 0 auto; margin-right: auto; line-height: 0; }
.brand__logo { display: block; width: 233px; height: 72px; background: var(--header-bg); }

.nav { display: flex; align-items: center; gap: 4px; }
.nav__link {
  position: relative; padding: 10px 14px; border-radius: 4px;
  color: var(--header-text) !important; font-size: 16px; font-weight: 500;
}
.nav__link:hover { color: var(--white) !important; background: var(--header-raised); }
.nav__link[aria-current="page"] { color: var(--header-gold) !important; }
.nav__link[aria-current="page"]::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 0; height: 2px; background: var(--brand-gold);
}
.nav__search-icon { display: none; }

.header-search {
  display: flex; align-items: center; gap: 10px; width: 260px; height: 44px; padding: 0 14px;
  border: 1px solid var(--header-line); border-radius: 4px; background: var(--header-raised); color: var(--header-muted);
}
.header-search:focus-within { border-color: var(--header-gold); box-shadow: 0 0 0 3px rgba(200, 164, 84, .25); }
.header-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font: inherit; font-size: 15px; color: var(--white); }
.header-search input:focus-visible { outline: 0; }
.header-search input::placeholder { color: #9DB8BD; }
.header-search input::-webkit-search-cancel-button { filter: invert(1); }

/* Reading progress: pinned to the top of the viewport while the header scrolls away. */
.progress { position: fixed; top: 0; left: 0; right: 0; z-index: 30; height: 3px; pointer-events: none; }
.progress span { display: block; height: 3px; width: 0; background: var(--brand-gold); }

/* ---------- Shared typography ---------- */

/* "La Réflexion du vendredi": the brand phrase, always in the script face. */
.script {
  font-family: var(--script); font-style: normal; font-weight: 400;
  letter-spacing: 0; text-transform: none;
}
.article-head__label.script { font-size: 22px; font-weight: 400; line-height: 1; letter-spacing: 0; text-transform: none; color: var(--accent); }
.page-title.script { font-weight: 400; font-size: 64px; letter-spacing: 0; }

.kicker {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0;
  font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent);
}

.page-title {
  margin: 16px 0 20px;
  font-family: var(--serif); font-weight: 600; font-size: 52px; line-height: 1.1; letter-spacing: -.012em;
  text-wrap: balance;
}
.page-title--catalogue { font-size: 48px; margin: 18px 0 14px; }
.page-title--theme { font-size: 60px; line-height: 1.05; margin: 10px 0 18px; }

.lead { margin: 0; max-width: 640px; font-family: var(--serif); font-size: 20px; line-height: 1.6; color: var(--slate-dark); }

.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; font-size: 15px; color: var(--slate); }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.tag {
  display: inline-block; padding: 5px 11px;
  border: 1px solid var(--line); border-radius: 3px; background: var(--white);
  font-size: 14px; font-weight: 500; color: var(--ink) !important;
}
.tag:hover { border-color: var(--accent); color: var(--accent) !important; }
.tag--plain { border-color: transparent; background: transparent; color: var(--accent) !important; }

.rule { height: 1px; margin: 40px 0; border: 0; background: var(--line); }

.crumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; padding: 0; list-style: none; font-size: 14px; color: var(--slate); }
.crumbs a { color: var(--slate); }
.crumbs a:hover { color: var(--accent); }
.crumbs li + li::before { content: "›"; margin-right: 8px; color: var(--slate); }
.crumbs [aria-current="page"] { color: var(--ink); }

.section-title { margin: 0; font-family: var(--serif); font-size: 28px; font-weight: 600; }

.label { margin: 48px 0 14px; font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--slate); }

/* ---------- Khutbah text ---------- */

.article-head { max-width: 976px; margin: 0 auto; padding: 72px 24px 0; text-align: center; }
.article-head--story { padding-top: 48px; }
.article-head__line {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 4px 12px;
  margin: 0; font-size: 14px; color: var(--slate);
}
.article-head__label { font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.article-head__sep { color: var(--muted); }
.article-head__title {
  max-width: 920px; margin: 20px auto 18px;
  font-family: var(--serif); font-weight: 600; font-size: 56px; line-height: 1.1; letter-spacing: -.012em;
  text-wrap: balance;
}
.article-head__summary {
  max-width: 720px; margin: 0 auto;
  font-family: var(--serif); font-size: 21px; line-height: 1.55; color: var(--slate-dark);
  text-wrap: pretty;
}
.article-head__meta { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 16px; margin-top: 24px; }
.tags--small { justify-content: center; gap: 6px; }
.tags--small .tag { padding: 3px 9px; font-size: 13px; }
.article-head__time { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--slate); }
.article-head__rule { height: 1px; margin: 40px 0 48px; border: 0; background: var(--line); }

.prose { font-family: var(--serif); font-size: calc(var(--prose-size) + var(--text-step)); line-height: 1.75; color: var(--ink); overflow-wrap: break-word; }
.prose p { margin: 0 0 1.15em; }
.prose h2, .prose h3, .prose h4 { font-family: var(--serif); font-weight: 600; line-height: 1.3; margin: 1.8em 0 .6em; }
.prose h2 { font-size: 26px; }
.prose h3 { font-size: 22px; }
.prose ul, .prose ol { margin: 0 0 1.15em; padding-left: 1.4em; }
.prose em { font-style: italic; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose .opening { font-style: italic; color: var(--slate-dark); }
.prose .closing {
  margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--line);
  text-align: center; font-style: italic; color: var(--slate-dark);
}
.prose .hadith { margin: 32px 0; padding-left: 32px; font-style: italic; font-size: 1.05em; line-height: 1.6; }

.verse { margin: 40px 0; padding: 30px 36px 26px; background: var(--verse); border-left: 5px solid var(--brand-teal-dark); border-radius: 0 4px 4px 0; }
.verse + .verse { margin-top: -24px; }
.verse blockquote { margin: 0; }
.verse blockquote p { margin: 0; font-size: 1.05em; line-height: 1.65; }
.verse blockquote p + p { margin-top: .8em; }
.verse figcaption {
  display: flex; align-items: center; gap: 10px; margin-top: 16px;
  font-family: var(--sans); font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent);
}
.verse figcaption::before { content: ""; flex: 0 0 24px; height: 2px; background: var(--brand-gold); }

.permalink { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; margin-top: 32px; font-size: 15px; color: var(--slate); }

/* ---------- Chronological navigation ---------- */

.chrono {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 500;
}
.chrono > a, .chrono > span { color: var(--slate-dark) !important; padding: 8px 0; }
.chrono a:hover { color: var(--accent) !important; }
.chrono > span { color: var(--muted) !important; }

.pn {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 56px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  font-family: var(--sans);
}
.pn__item { display: flex; flex-direction: column; gap: 6px; padding: 26px 0; color: var(--ink) !important; }
.pn__item--next { padding-left: 28px; border-left: 1px solid var(--line); text-align: right; align-items: flex-end; }
a.pn__item:hover .pn__title { color: var(--accent); }
.pn__label { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--slate); }
.pn__title { font-family: var(--serif); font-size: 21px; font-weight: 600; line-height: 1.3; }
.pn__title--muted { font-weight: 400; font-style: italic; color: var(--slate); }
.pn__date { font-size: 14px; color: var(--slate); }

.back-link { margin: 32px 0 0; text-align: center; font-size: 15px; }

/* ---------- Share ---------- */

.share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 40px; font-family: var(--sans); }
.share__label { margin-right: 6px; font-size: 14px; font-weight: 600; color: var(--slate); }
.share__btn {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: 4px; background: var(--white);
  font: inherit; font-size: 15px; font-weight: 500; color: var(--ink) !important; cursor: pointer;
}
.share__btn:hover { border-color: var(--accent); color: var(--accent) !important; }
/* ---------- Reading tools ---------- */

.reader { max-width: var(--read); margin: 0 auto; padding: 0 24px; }
.tools { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 0 0 28px; font-size: 13px; }
.tools__group { display: inline-flex; margin-right: 4px; border: 1px solid var(--line); border-radius: 4px; background: var(--white); }
.tool {
  display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 7px 10px;
  border: 0; border-radius: 4px; background: transparent;
  font: inherit; font-size: 13px; color: var(--slate-dark); white-space: nowrap; cursor: pointer;
}
.tool:hover { background: var(--accent-pale); color: var(--ink); }
.tool[hidden] { display: none; }
.tool:disabled { opacity: .4; cursor: default; background: transparent; }
.tool.is-copied { color: var(--success); }
.tools__group .tool { padding: 7px 9px; border-radius: 0; }
.tools__group .tool + .tool { border-left: 1px solid var(--line); }
.tools__status { min-height: 20px; padding-inline: 10px; font-size: 12px; color: var(--success); }
.tools__status:empty { display: none; }

@media (min-width: 1200px) {
  .reader {
    display: grid; grid-template-columns: 1fr minmax(0, var(--measure)) 1fr; column-gap: 4rem;
    max-width: none; padding: 0 40px;
  }
  .reader > .prose { grid-column: 2; grid-row: 1; }
  .tools {
    grid-column: 1; grid-row: 1; justify-self: end; align-self: start;
    position: sticky; top: 2rem;
    flex-direction: column; align-items: flex-end; margin: 6px 0 0;
  }
  .tools__group { margin: 0 0 8px; }
  .tools__status:empty { display: block; }
}

.share__btn.is-copied { border-color: var(--success); background: #EEF7F2; color: var(--success) !important; }
.share__status { font-size: 14px; color: var(--success); }

/* ---------- Related ---------- */

.related { margin-top: 72px; }
.related .section-title { margin-bottom: 24px; }
.related__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.related__card {
  display: flex; flex-direction: column; gap: 10px; padding: 22px 20px 24px;
  border: 1px solid var(--line); border-top: 3px solid var(--ink); border-radius: 2px;
  background: var(--white); color: var(--ink) !important;
}
.related__card:hover { border-top-color: var(--accent); }
.related__card:hover .related__title { color: var(--accent); }
.related__date { font-size: 14px; color: var(--slate); }
.related__title { font-family: var(--serif); font-size: 20px; font-weight: 600; line-height: 1.3; }
.related__themes { margin-top: auto; font-size: 13px; color: var(--slate); }

/* ---------- Archive rows ---------- */

.rows { list-style: none; margin: 0; padding: 0; }
.rows--ruled { border-top: 1px solid var(--line); }
.rows li { border-bottom: 1px solid var(--line); }
.rows--compact li { border-bottom: 0; }
.rows--compact li + li { border-top: 1px solid var(--line-soft); }
.row {
  display: grid; grid-template-columns: 170px minmax(0, 1fr) 20px; gap: 20px; align-items: baseline;
  padding: 15px 8px; color: var(--ink) !important; border-radius: 3px;
}
.rows--compact .row { grid-template-columns: 150px minmax(0, 1fr) 20px; padding: 13px 8px; }
.row:hover { background: var(--white); }
.rows--compact .row:hover { box-shadow: 0 0 0 1px var(--line); }
.row:hover .row__title { color: var(--accent); }
.row__date { font-size: 15px; color: var(--slate); font-variant-numeric: tabular-nums; }
.row__title { font-family: var(--serif); font-size: 19px; line-height: 1.4; }
.row__arrow { color: var(--muted); }

/* ---------- Home: archive teaser ---------- */

.teaser { margin-top: 88px; padding: 64px 0 72px; background: var(--soft); border-top: 1px solid var(--line); }
.teaser__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 24px; }
.teaser__more { font-size: 15px; font-weight: 500; }
.teaser__all { display: none; }
.themes-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 32px; }
.themes-strip__label { margin-right: 6px; font-size: 14px; color: var(--slate); }

/* ---------- Search field ---------- */

.field {
  display: flex; align-items: center; padding-left: 16px;
  border: 1px solid var(--field); border-radius: 4px; background: var(--white);
}
.field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(53, 100, 104, .15); }
.field.is-invalid { border-color: var(--error); box-shadow: 0 0 0 3px rgba(180, 35, 24, .12); }
.field svg { flex: 0 0 auto; color: var(--slate); }
.field input {
  flex: 1; min-width: 0; height: 52px; padding: 0 0 0 12px;
  border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; font-size: 17px;
}
.field input:focus-visible { outline: 0; }
.field input::placeholder { color: var(--slate); }
.field input::-webkit-search-cancel-button { cursor: pointer; }
.field button {
  height: 52px; padding: 0 20px; border: 0; border-left: 1px solid var(--line);
  border-radius: 0 3px 3px 0; background: var(--soft); color: var(--ink);
  font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
}
.field button:hover { background: var(--accent-pale); color: var(--accent); }
.field__box { display: flex; flex: 1; align-items: center; min-width: 0; }
.field--large input { height: 60px; font-size: 19px; }
.field--large button { height: 60px; padding: 0 28px; border-left: 0; background: var(--accent); color: var(--white); font-size: 16px; }
.field--large button:hover { background: var(--accent-strong); color: var(--white); }
.field--catalogue { max-width: 640px; margin-top: 32px; }
.field-hint { margin: 12px 0 0; font-size: 14px; color: var(--slate); }
.field-hint--error { color: var(--error); font-weight: 500; }

/* ---------- Archives ---------- */

.catalogue { padding-top: 48px; }
.catalogue__layout { display: flex; flex-wrap: wrap; gap: 56px; margin-top: 56px; padding-bottom: 96px; }
.catalogue__side { flex: 0 1 200px; min-width: 180px; }
.catalogue__main { flex: 999 1 560px; min-width: 0; }
.side-title { margin: 0 0 12px; font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--slate); }

.years { list-style: none; margin: 0 0 32px; padding: 0; border-top: 1px solid var(--line); }
.years a { display: flex; justify-content: space-between; padding: 11px 10px; border-bottom: 1px solid var(--line); font-size: 16px; color: var(--ink) !important; }
.years a:hover { background: var(--soft); }
.years a[aria-current="page"] { background: var(--ink); color: var(--white) !important; font-weight: 600; }
.years__n { color: var(--slate); font-variant-numeric: tabular-nums; }
.years a[aria-current="page"] .years__n { color: var(--field); }

.year-select { display: none; }
.year-select__in { position: relative; }
.year-select select {
  -webkit-appearance: none; appearance: none; width: 100%; height: 52px; padding: 0 44px 0 14px;
  border: 1px solid var(--ink); border-radius: 4px; background: var(--white);
  font: inherit; font-size: 17px; font-weight: 600; color: var(--ink);
}
.year-select svg { position: absolute; right: 14px; top: 16px; pointer-events: none; }
.year-select button { margin-top: 8px; height: 44px; padding: 0 16px; border: 1px solid var(--ink); border-radius: 4px; background: var(--white); font: inherit; font-weight: 600; }
.js .year-select button { display: none; }

.months-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.months-nav a { padding: 7px 0; text-align: center; border-radius: 3px; font-size: 14px; color: var(--ink) !important; }
.months-nav a:hover { background: var(--soft); }
.months-nav a[aria-current="true"] { font-weight: 600; }

.year-head { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 8px; padding-bottom: 12px; border-bottom: 2px solid var(--ink); }
.year-head h2 { margin: 0; font-family: var(--serif); font-size: 36px; font-weight: 600; font-variant-numeric: lining-nums; }
.year-head span { font-size: 15px; color: var(--slate); }

.month { border-bottom: 1px solid var(--line); }
.month summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 4px; cursor: pointer; }
.month summary::-webkit-details-marker { display: none; }
.month summary:hover .month__name { color: var(--accent); }
.month__name { font-family: var(--serif); font-size: 24px; font-weight: 600; }
.month__count { display: flex; align-items: center; gap: 14px; font-size: 14px; color: var(--slate); }
.chev {
  display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px;
  border: 1px solid var(--line); border-radius: 50%; transition: transform .15s;
}
.month[open] .chev { transform: rotate(180deg); background: var(--ink); border-color: var(--ink); color: var(--white); }
.month .rows { margin-bottom: 20px; }

.year-index { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 48px; border-top: 1px solid var(--line); }
.year-index a { display: flex; justify-content: space-between; padding: 12px 10px; border-bottom: 1px solid var(--line); font-size: 16px; color: var(--ink) !important; }
.year-index a:hover { background: var(--white); color: var(--accent) !important; }
.year-index span { font-size: 14px; color: var(--slate); }
.other-year + .other-year { margin-top: 0; }
.other-years { margin-top: 64px; }

/* ---------- Search ---------- */

.search-page { padding-top: 72px; }
.search-page .read { max-width: 800px; }
.results-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 16px;
  margin: 48px 0 0; padding-bottom: 16px; border-bottom: 2px solid var(--ink);
}
.results-head h2 { margin: 0; font-family: var(--serif); font-size: 26px; font-weight: 600; }
.results-head span { font-size: 15px; color: var(--slate); }
.results { list-style: none; margin: 0; padding: 0; }
.results li { border-bottom: 1px solid var(--line); }
.result { display: block; padding: 28px 12px; color: var(--ink) !important; border-radius: 3px; }
.result:hover { background: var(--white); }
.result:hover .result__title { color: var(--accent); }
.result__date { font-size: 14px; color: var(--slate); font-variant-numeric: tabular-nums; }
.result__title { display: block; margin: 6px 0 10px; font-family: var(--serif); font-size: 25px; font-weight: 600; line-height: 1.3; }
.result__excerpt { display: block; font-family: var(--serif); font-size: 18px; line-height: 1.65; color: var(--slate-dark); }
.result__go { display: inline-block; margin-top: 12px; font-size: 14px; font-weight: 600; color: var(--accent); }
mark { background: var(--highlight); color: var(--ink); padding: 0 2px; border-radius: 2px; }

.pagination { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin: 48px 0 0; padding: 0; list-style: none; }
.pagination a, .pagination span {
  display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 12px;
  border-radius: 4px; font-size: 15px;
}
.pagination a { border: 1px solid var(--line); background: var(--white); color: var(--ink) !important; }
.pagination a:hover { border-color: var(--accent); color: var(--accent) !important; }
.pagination [aria-current="page"] { background: var(--ink); color: var(--white); font-weight: 600; }
.pagination .is-disabled { color: var(--muted); }
.pagination__status { display: none; }

.notice { margin-top: 48px; padding: 40px; border: 1px solid var(--line); border-radius: 4px; background: var(--white); }
.notice h2 { margin: 0 0 10px; font-family: var(--serif); font-size: 26px; font-weight: 600; }
.notice p, .notice ul { margin: 0; font-size: 16px; line-height: 1.6; color: var(--slate-dark); }
.notice ul { margin-top: 16px; padding-left: 20px; line-height: 1.8; }
.notice__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 16px;
  border: 1px solid var(--line); border-radius: 4px; background: var(--white);
  font-size: 15px; font-weight: 600; color: var(--ink) !important;
}
.btn:hover { border-color: var(--accent); color: var(--accent) !important; }
.btn--dark { background: var(--ink); border-color: var(--ink); color: var(--white) !important; }
.btn--dark:hover { background: #24304A; color: var(--white) !important; }
.btn--outline { border-color: var(--ink); }

/* ---------- Themes ---------- */

.theme-band { padding: 48px 0 56px; background: var(--soft); border-bottom: 1px solid var(--line); }
.theme-band .kicker { margin-top: 36px; }
.theme-band .lead { max-width: none; font-size: 21px; color: #334155; }
.theme-stats { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 24px; font-size: 15px; color: var(--slate); }
.theme-stats b { color: var(--ink); font-weight: 600; }

.year-block .year-head { margin: 56px 0 0; padding-bottom: 10px; }
.year-block .year-head h2 { font-size: 30px; }

.theme-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 24px; border-top: 1px solid var(--line); }
.theme-grid a { display: flex; flex-direction: column; gap: 4px; padding: 20px 20px 20px 0; border-bottom: 1px solid var(--line); color: var(--ink) !important; }
.theme-grid a:hover .theme-grid__name { color: var(--accent); }
.theme-grid__name { font-family: var(--serif); font-size: 21px; font-weight: 600; }
.theme-grid__desc { font-size: 14px; line-height: 1.5; color: var(--slate); }
.other-themes { margin-top: 96px; padding: 64px 0 80px; background: var(--white); border-top: 1px solid var(--line); }

.theme-list { list-style: none; margin: 48px 0 96px; padding: 0; border-top: 2px solid var(--ink); }
.theme-list li { border-bottom: 1px solid var(--line); }
.theme-list a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 24px; padding: 28px 8px; color: var(--ink) !important; }
.theme-list a:hover { background: var(--white); }
.theme-list a:hover .theme-list__name { color: var(--accent); }
.theme-list__name { font-family: var(--serif); font-size: 28px; font-weight: 600; }
.theme-list__count { font-size: 15px; color: var(--slate); align-self: center; }
.theme-list__desc { grid-column: 1 / -1; font-family: var(--serif); font-size: 18px; line-height: 1.6; color: var(--slate-dark); }
.theme-list__latest { grid-column: 1 / -1; font-size: 14px; color: var(--slate); }

/* ---------- About ---------- */

.about { padding-top: 48px; padding-bottom: 24px; }
.about h2:first-of-type { margin-top: 1.4em; }

/* ---------- Footer ---------- */

.site-footer { margin-top: 96px; padding: 56px 0 40px; background: var(--footer); color: #CBD5E1; }
.teaser + .site-footer, .other-themes + .site-footer { margin-top: 0; }
.site-footer a { color: #E2E8F0 !important; }
.site-footer a:hover { color: var(--white) !important; text-decoration: underline; }
.site-footer__grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 40px; }
.site-footer__brand { display: flex; flex-direction: column; gap: 10px; max-width: 420px; }
.site-footer__logo { display: block; width: max-content; margin-left: -6px; line-height: 0; } /* aligns the artwork, not its padding, with the text */
.site-footer__logo img { display: block; width: 181px; height: 56px; }
.site-footer__logo:hover { text-decoration: none; }
.site-footer__sub { font-size: 24px; line-height: 1.2; color: var(--brand-gold); }
.site-footer__text { font-size: 15px; line-height: 1.6; color: var(--muted); }
.site-footer__nav { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 0; padding: 0; list-style: none; font-size: 15px; }
.site-footer__bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px;
  align-items: center;
  margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--footer-line); font-size: 14px; color: var(--muted);
}
.site-footer__social { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; min-height: 44px; }
.site-footer__social:hover { text-decoration: none !important; }
.site-footer__social:hover span { text-decoration: underline; }
.site-footer__social svg { flex: 0 0 auto; }

/* ---------- Error page ---------- */

.error-page { padding: 96px 0 48px; }

/* ---------- Tablet ---------- */

@media (max-width: 1023px) {
  .catalogue__side { flex-basis: 100%; }
  .years { display: flex; flex-wrap: wrap; border-top: 0; gap: 8px; }
  .years li { flex: 1 1 120px; }
  .years a { border: 1px solid var(--line); border-radius: 4px; }
  .months-nav { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .catalogue__layout { gap: 32px; }
}

/* ---------- Mobile ---------- */

@media (max-width: 759px) {
  :root { --gutter: 20px; }
  .read, .reader { padding: 0 20px; }

  .topbar__right { display: none; }
  .topbar__in { height: 32px; justify-content: center; }
  .masthead { flex-wrap: wrap; justify-content: center; gap: 0; min-height: 0; padding-top: 16px; padding-bottom: 0; }
  .brand { margin: 0 auto 6px; }
  .brand__logo { width: 178px; height: 55px; }
  .nav { flex: 1 1 100%; justify-content: space-between; gap: 0; }
  .nav__link { padding: 14px 8px; font-size: 16px; }
  .nav__link:first-child { padding-left: 0; }
  .nav__link[aria-current="page"]::after { left: 8px; right: 8px; bottom: 6px; }
  .nav__link:first-child[aria-current="page"]::after { left: 0; }
  .nav__search-icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-right: -12px; color: var(--header-text) !important; }
  .nav__search-icon.is-current { color: var(--header-gold) !important; }
  .header-search { display: none; }

  .kicker { font-size: 12px; gap: 8px; }
  .page-title { font-size: 31px; line-height: 1.15; margin: 12px 0; }
  .page-title--catalogue { font-size: 34px; margin: 10px 0 8px; }
  .page-title--theme { font-size: 40px; }
  .lead { font-size: 17px; line-height: 1.55; }
  .meta { gap: 12px; }
  .tags { gap: 6px; }
  .tag { font-size: 13px; padding: 5px 9px; }
  .rule { margin: 24px 0 28px; }

  .article-head, .article-head--story { padding: 28px 20px 0; }
  .article-head__line { font-size: 13px; gap: 2px 8px; }
  .article-head__label { font-size: 12px; }
  .article-head__title { margin: 14px auto 12px; font-size: 31px; line-height: 1.15; }
  .article-head__summary { font-size: 17px; }
  .article-head__meta { margin-top: 18px; }
  .article-head__rule { margin: 28px 0; }
  .crumbs { font-size: 13px; }

  :root { --prose-size: 18px; }
  .prose { line-height: 1.7; }
  .prose p { margin-bottom: 1.1em; }
  .prose .closing { margin-top: 32px; padding-top: 24px; }
  .prose .hadith { padding-left: 16px; font-size: 1em; }
  .verse { margin: 28px -4px; padding: 20px 18px 18px; }
  .verse + .verse { margin-top: -16px; }
  .verse blockquote p { font-size: 1em; line-height: 1.6; }
  .verse figcaption { margin-top: 12px; font-size: 12px; gap: 8px; }
  .verse figcaption::before { flex-basis: 18px; }

  .chrono { padding: 0; }
  .chrono > a, .chrono > span { min-height: 44px; display: inline-flex; align-items: center; padding: 0 4px; }
  .chrono .chrono__long { display: none; }

  .pn { grid-template-columns: minmax(0, 1fr); margin-top: 40px; }
  .pn__item { padding: 18px 0; }
  .pn__item--next { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); text-align: left; align-items: flex-start; }
  .pn__title { font-size: 19px; }
  .pn__label { font-size: 12px; }

  .share { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 28px; }
  .share__label { grid-column: 1 / -1; }
  .share__btn { flex-direction: column; justify-content: center; gap: 4px; height: 64px; padding: 0 6px; font-size: 13px; }
  .share__status { grid-column: 1 / -1; }

  .related { margin-top: 44px; }
  .related .section-title { font-size: 22px; margin-bottom: 12px; }
  .related__grid { display: block; border-top: 1px solid var(--line); }
  .related__card { gap: 2px; padding: 14px 0; border: 0; border-bottom: 1px solid var(--line); background: transparent; }
  .related__title { font-size: 18px; }
  .related__themes { display: none; }

  .row, .rows--compact .row { grid-template-columns: minmax(0, 1fr) 18px; gap: 2px 12px; padding: 13px 0; }
  .row__date { grid-column: 1; font-size: 14px; }
  .row__title { grid-column: 1; font-size: 18px; line-height: 1.35; }
  .row__arrow { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
  .row:hover, .rows--compact .row:hover { background: transparent; box-shadow: none; }

  .teaser { margin-top: 48px; padding: 36px 0 40px; }
  .teaser .section-title { font-size: 24px; }
  .teaser__more { display: none; }
  .teaser__all { display: flex; align-items: center; justify-content: center; height: 48px; margin-top: 20px; border: 1px solid var(--ink); border-radius: 4px; font-size: 15px; font-weight: 600; color: var(--ink) !important; }
  .teaser__head { display: block; margin-bottom: 16px; }
  .themes-strip__label { width: 100%; }

  .field input { font-size: 17px; }
  .field--large { flex-wrap: wrap; padding: 0; border: 0; background: transparent; }
  .field--large:focus-within { box-shadow: none; }
  .field--large .field__box {
    display: flex; align-items: center; flex: 1 1 100%; height: 56px; padding: 0 14px;
    border: 1px solid var(--field); border-radius: 4px; background: var(--white);
  }
  .field--large .field__box:focus-within { border: 2px solid var(--accent); box-shadow: 0 0 0 3px rgba(53, 100, 104, .12); }
  .field--large.is-invalid .field__box { border-color: var(--error); }
  .field--large input { height: 52px; font-size: 18px; }
  .field--large button { flex: 1 1 100%; height: 52px; margin-top: 10px; border-radius: 4px; }
  .field--catalogue { margin-top: 20px; }
  .field--catalogue button { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }

  .catalogue { padding-top: 20px; }
  .catalogue__layout { display: block; margin-top: 16px; padding-bottom: 24px; }
  .catalogue__side { margin-bottom: 20px; }
  .years, .side-title--years { display: none; }
  .year-select { display: block; margin-bottom: 12px; }
  .side-title--months { display: none; }
  .months-nav { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
  .months-nav a { display: flex; align-items: center; justify-content: center; height: 40px; padding: 0; border: 1px solid var(--line); background: var(--white); }
  .months-nav a[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: var(--white) !important; }
  .year-head { margin: 0; padding: 0 0 10px; }
  .year-head h2 { font-size: 28px; }
  .month summary { min-height: 60px; padding: 0; }
  .month__name { font-size: 22px; }
  .chev { border: 0; width: 22px; height: 22px; }
  .month[open] .chev { background: transparent; color: var(--ink); }
  .month .rows { margin-bottom: 12px; }
  .year-index { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .search-page { padding-top: 24px; }
  .search-page .page-title { font-size: 30px; margin: 0 0 16px; }
  .results-head { margin-top: 28px; padding-bottom: 12px; }
  .results-head h2 { font-size: 20px; }
  .results-head span { font-size: 14px; }
  .result { padding: 20px 0; }
  .result__date { font-size: 13px; }
  .result__title { font-size: 21px; margin: 4px 0 8px; }
  .result__excerpt { font-size: 16px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .result:hover { background: transparent; }
  .pagination { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 24px; }
  .pagination li { display: none; }
  .pagination .pagination__edge, .pagination .pagination__status { display: block; }
  .pagination .pagination__edge a, .pagination .pagination__edge span, .pagination__status span { width: 100%; height: 48px; }
  .pagination__status span { color: var(--slate-dark); }
  .notice { padding: 24px; }
  .notice h2 { font-size: 22px; }

  .theme-band { padding: 24px 0 32px; }
  .theme-band .kicker { margin-top: 24px; }
  .theme-band .lead { font-size: 18px; }
  .theme-grid { grid-template-columns: minmax(0, 1fr); }
  .other-themes { margin-top: 48px; padding: 36px 0 40px; }
  .theme-list a { padding: 20px 0; }
  .theme-list__name { font-size: 24px; }
  .theme-list__desc { font-size: 16px; }

  .site-footer { margin-top: 48px; padding: 32px 0 28px; }
  .site-footer__grid { gap: 20px; }
  .site-footer__nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
  .site-footer__nav a { display: inline-block; padding: 10px 0; }
  .site-footer__bottom { margin-top: 20px; padding-top: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  html { scroll-behavior: auto; }
}

@media print {
  .site-header, .site-footer, .chrono, .share, .related, .pn, .teaser, .back-link, .permalink, .tools, .progress { display: none !important; }
  .reader { display: block; max-width: none; padding: 0; }
  body { background: #fff; }
  .prose { font-size: 12pt; }
  .verse { background: none; border-left: 3px solid var(--brand-teal-dark); }
}
