/* Public site (Main, Archive and Fatwa mockups). Uses tokens.css and base.css. */

.page { min-height: 100vh; display: flex; flex-direction: column; }
.page main { flex: 1 0 auto; }

.wrap { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }

.icon { flex: none; }

.pill {
  display: inline-block; font-size: var(--fs-label); font-weight: 600; line-height: 1.4;
  padding: 4px 10px; border-radius: 999px; background: var(--blue-tint); color: var(--blue);
  text-decoration: none;
}
a.pill:hover { background: var(--blue-tint-2); color: var(--blue-hover); text-decoration: underline; }
.pill[aria-current="true"] { background: var(--blue); color: var(--white); }
.pill-soon { align-self: flex-start; background: var(--gold-tint); color: var(--gold-tint-text); }

.eyebrow {
  margin: 0; font-family: var(--font-ui); font-size: var(--fs-label); font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--gold-text);
}
.section-title { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-h2); line-height: 1.15; margin: 0 0 18px; }
.strong-link { font-weight: 600; display: inline-flex; align-items: center; min-height: var(--tap); }
.btn-lg { min-height: 56px; padding: 0 24px; font-size: 16px; }
.btn-light { background: var(--white); color: var(--blue); }
.btn-light:hover { background: var(--blue-tint-2); color: var(--blue-hover); }

.breadcrumb { font-size: var(--fs-small); color: var(--muted); }

/* Header */
.site-header { background: var(--white); border-bottom: 1px solid var(--line); }
.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px;
  padding-top: 12px; padding-bottom: 12px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand img { width: 64px; height: 64px; border-radius: var(--radius); }
.brand-title { display: block; font-family: var(--font-display); font-size: 25px; font-weight: 600; line-height: 1.1; }
.brand-sub {
  display: block; margin-top: 2px;
  font-size: var(--fs-label); letter-spacing: .14em; text-transform: uppercase;
  color: var(--gold-text); font-weight: 600;
}
.main-nav { display: flex; flex-wrap: wrap; gap: 2px; margin-left: auto; }
.main-nav a {
  display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 12px;
  border-radius: var(--radius-sm); color: var(--ink-3); text-decoration: none;
  font-size: 15px; font-weight: 500;
}
.main-nav a:hover { background: var(--blue-tint-2); color: var(--blue); }
.main-nav a[aria-current="page"] { color: var(--blue); font-weight: 600; }

/* Footer */
.site-footer { background: var(--navy); color: #D8E0F2; margin-top: auto; }
.site-footer a { color: #D8E0F2; text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; }
.footer-main {
  display: flex; flex-wrap: wrap; gap: 40px; justify-content: space-between;
  padding-top: 48px; padding-bottom: 40px;
}
.footer-brand { display: flex; gap: 16px; align-items: center; flex: 1 1 360px; }
.footer-brand img { width: 88px; height: 88px; border-radius: var(--radius-md); }
.footer-name { display: block; font-family: var(--font-display); font-size: 22px; color: var(--white); font-weight: 600; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: center; font-size: 15px; }
.footer-nav a { display: inline-flex; align-items: center; min-height: var(--tap); }
.footer-legal { padding-bottom: 28px; font-size: 13px; color: #A8B7DA; }

/* Search box (hero, archive, 404) */
.search-form { display: flex; flex-wrap: wrap; gap: 10px; max-width: 820px; }
.search-box {
  flex: 1 1 320px; display: flex; align-items: center; gap: 10px;
  background: var(--white); border: 1px solid var(--input-border); border-radius: var(--radius-md);
  padding: 0 16px; min-height: 56px; color: var(--muted);
}
.search-box:focus-within { outline: 3px solid var(--blue); outline-offset: 1px; border-color: var(--blue); }
.search-box input {
  flex: 1; min-width: 0; border: 0; outline: none; background: transparent;
  font: inherit; font-size: 16px; color: var(--ink);
}

/* Home: hero */
.hero { background: var(--blue-hero); border-bottom: 5px solid var(--gold); color: #E2E8F6; }
.hero-grid { padding-top: 72px; padding-bottom: 80px; display: flex; flex-wrap: wrap; align-items: center; gap: 56px; }
.hero-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.hero-bismillah { margin: 0; font-family: var(--font-arabic); font-size: 28px; line-height: 1.6; color: var(--gold-arabic); }
.hero h1 { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: var(--fs-hero); line-height: 1.05; color: var(--gold-light); }
.hero-lead { margin: 0; font-size: 19px; line-height: 1.6; max-width: 640px; }
.hero-lead strong { color: var(--teal); }
.hero .search-form { max-width: 680px; margin-top: 6px; }
.hero :focus-visible { outline-color: var(--gold-light); }
.popular { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.popular > span { font-size: var(--fs-small); color: #C5D0EA; }

.ask-card {
  flex: 1 1 300px; display: flex; flex-direction: column; gap: 16px;
  background: var(--white); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-xl); padding: 28px;
}
.ask-card h2 { margin: 0; font-family: var(--font-display); font-size: 26px; font-weight: 600; }
.ask-card p { margin: 0; line-height: 1.6; }
.ask-card :focus-visible { outline-color: var(--blue); }
.privacy-note { display: flex; gap: 8px; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.privacy-note .icon { color: var(--blue); margin-top: 2px; }

/* Home: body */
.home-body { padding-top: 56px; padding-bottom: 72px; display: flex; flex-wrap: wrap; gap: 56px; align-items: flex-start; }
.home-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; }
.home-side { flex: 1 1 300px; display: flex; flex-direction: column; gap: 20px; }
.more-link { margin: 8px 0 0; font-weight: 600; }

.fatwa-row {
  display: flex; flex-direction: column; gap: 8px; padding: 22px 0;
  border-top: 1px solid var(--line); text-decoration: none; color: var(--ink);
}
.fatwa-row:hover .fatwa-row-title { color: var(--blue); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.fatwa-row-title { font-family: var(--font-display); font-size: 23px; font-weight: 600; line-height: 1.25; }
.fatwa-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: 13.5px; margin: 0; }
.fatwa-no { font-weight: 600; color: var(--gold-text); }

.how { padding: 28px; display: flex; flex-direction: column; gap: 18px; margin-top: 32px; }
.how h3 { margin: 0; font-family: var(--font-display); font-size: 22px; font-weight: 600; }
.how ol { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.how li { display: flex; gap: 14px; line-height: 1.5; }
.step {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  background: var(--blue); color: var(--white);
  display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 14px;
}

.topics { padding: 24px 24px 16px; display: flex; flex-direction: column; }
.topics h2 { margin: 0 0 10px; font-family: var(--font-display); font-size: 24px; font-weight: 600; }
.topic-link {
  display: flex; align-items: center; justify-content: space-between; min-height: var(--tap); padding: 0 4px;
  border-top: 1px solid var(--line-2); text-decoration: none; color: var(--ink); font-weight: 500; font-size: 15.5px;
}
.topic-link:hover { color: var(--blue); }
.topics-all { font-weight: 600; margin-top: 12px; min-height: var(--tap); display: inline-flex; align-items: center; }

.about-card { padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.about-card h3 { margin: 0; font-family: var(--font-display); font-size: 24px; font-weight: 600; line-height: 1.25; }
.about-card p { margin: 0; line-height: 1.6; }

.works { background: var(--parchment); border-top: 1px solid var(--line); }
.works .wrap { padding-top: 64px; padding-bottom: 72px; display: flex; flex-direction: column; gap: 28px; }
.works .section-title { margin: 0; }
.works-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.work { padding: 28px; display: flex; flex-direction: column; gap: 10px; }
.work .icon { color: var(--blue); }
.work h3 { margin: 0; font-size: 19px; }
.work p { margin: 0; line-height: 1.6; }

/* Archive */
.page-band { background: var(--parchment); border-bottom: 1px solid var(--line); }
.page-band .wrap { padding-top: 48px; padding-bottom: 40px; display: flex; flex-direction: column; gap: 18px; }
.page-band h1 { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 48px; line-height: 1.1; }

.archive { padding-top: 40px; padding-bottom: 72px; display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.filters { flex: 1 1 260px; max-width: 300px; display: flex; flex-direction: column; gap: 32px; }
.filter-label {
  display: block; margin: 0 0 10px; font-size: var(--fs-label); font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.chip {
  display: flex; align-items: center; min-height: var(--tap); padding: 0 14px; border-radius: var(--radius);
  color: var(--ink-3); text-decoration: none; font-size: 15px;
}
.chip:hover { background: var(--blue-tint-2); color: var(--blue); }
.chip[aria-current="true"] { background: var(--blue); color: var(--white); font-weight: 600; }
.sort-form { display: flex; flex-direction: column; gap: 8px; }
.sort-form .filter-label { margin: 0; }
.tag-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }

.results { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; }
.results-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px;
  padding-bottom: 12px; border-bottom: 2px solid var(--ink);
}
.results-head p { margin: 0; font-size: 15px; }
.results-head .muted { font-size: var(--fs-small); }
.result { border-top: 0; border-bottom: 1px solid var(--line); }
.excerpt { color: var(--muted); line-height: 1.6; font-size: 15.5px; }
.results mark { background: var(--gold-tint); color: inherit; border-radius: 2px; padding: 0 1px; box-shadow: inset 0 -2px 0 var(--gold); }
.elsewhere { margin-top: 40px; padding: 20px 24px; background: var(--parchment-2); border: 1px solid var(--line); border-radius: var(--radius); }
.elsewhere h2 { margin: 0 0 8px; font-family: var(--font-display); font-size: 21px; font-weight: 600; }
.elsewhere ul { list-style: none; margin: 0; padding: 0; }
.elsewhere li + li { border-top: 1px solid var(--line); }
.elsewhere a { display: flex; flex-direction: column; gap: 4px; padding: 12px 0; color: inherit; text-decoration: none; }
.elsewhere a:hover .elsewhere-title { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.elsewhere-type { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--gold-text); }
.elsewhere-title { font-weight: 600; font-size: 17px; }
.elsewhere .excerpt { font-size: 14.5px; }
.empty { padding: 48px 0; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.empty p { margin: 0; }
.empty-title { font-size: 18px; font-weight: 600; }

.pagination { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 32px; align-items: center; }
.pg {
  display: inline-flex; align-items: center; justify-content: center; min-width: var(--tap); min-height: var(--tap);
  padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white);
  color: var(--ink-3); text-decoration: none; font-weight: 500;
}
.pg:hover { border-color: var(--blue); color: var(--blue); }
.pg[aria-current="page"] { background: var(--blue); border-color: var(--blue); color: var(--white); }
.pg-wide { padding: 0 16px; }
.pg-gap { color: var(--muted); padding: 0 4px; }

/* Single fatwa */
.fatwa-page { padding-top: 40px; padding-bottom: 72px; display: flex; flex-wrap: wrap; gap: 56px; align-items: flex-start; }
.fatwa { flex: 999 1 560px; min-width: 0; max-width: 760px; display: flex; flex-direction: column; gap: 32px; }
.fatwa-head { display: flex; flex-direction: column; gap: 12px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.fatwa-head h1 { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: var(--fs-h1); line-height: 1.1; }
.fatwa-dates { margin: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 15px; }

.question-box {
  background: var(--parchment); border-radius: var(--radius-lg); padding: 28px 30px;
  display: flex; flex-direction: column; gap: 12px;
}
.question-box p { margin: 0; font-size: var(--fs-prose); line-height: 1.65; }
.question-box .asker { font-size: var(--fs-small); color: var(--muted); }

.answer { display: flex; flex-direction: column; gap: 20px; }
.fatwa-opening { text-align: center; color: var(--blue); }
.fatwa-opening p, .fatwa-opening p[dir] { margin: 0; font-family: var(--font-arabic); font-size: 24px; line-height: 1.7; text-align: center; }
.fatwa-opening p:first-child { font-size: 30px; }
.fatwa-opening p + p { color: var(--ink-2); }

/* Rich text from the editor */
.prose { font-size: var(--fs-prose); line-height: var(--lh-prose); color: var(--ink-2); }
.prose > :first-child { margin-top: 0; }
.prose p, .prose ul, .prose ol, .prose blockquote { margin: 0 0 1.1em; }
.prose h2 { font-family: var(--font-display); font-size: 28px; margin: 1.4em 0 .5em; color: var(--ink); }
.prose h3 { font-family: var(--font-display); font-size: var(--fs-h3); margin: 1.3em 0 .4em; color: var(--ink); }
.prose ul, .prose ol { padding-inline-start: 1.4em; }
.prose li { margin: .3em 0; }
.prose blockquote {
  background: var(--quote-bg); border-inline-start: 4px solid var(--gold);
  padding: 16px 22px; border-radius: 0 var(--radius) var(--radius) 0;
}
.prose blockquote p:last-child { margin-bottom: 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.prose img { border-radius: var(--radius); }
.prose .ar, .prose .ur { font-size: 1.2em; }

/* Arabic-script blocks anywhere (tagged on the server by BlockDirection) */
.ar { font-family: var(--font-arabic); line-height: var(--lh-arabic); }
.ur { font-family: var(--font-urdu); line-height: var(--lh-urdu); }
[dir="auto"].ar, [dir="auto"].ur { text-align: start; }

.references ol { margin: 12px 0 0; padding-inline-start: 1.4em; display: flex; flex-direction: column; gap: 8px; font-size: 15.5px; line-height: 1.6; color: var(--ink-3); }

.fatwa-closing {
  border-top: 1px solid var(--line); padding-top: 28px;
  display: grid; grid-template-columns: 1fr auto; column-gap: 24px; align-items: center;
}
.fatwa-closing > * { grid-column: 1; margin: 0 0 4px; }
.fatwa-closing .ar, .fatwa-closing [dir].ar { font-size: 26px; color: var(--blue); text-align: left; }
.fatwa-closing strong { font-family: var(--font-display); font-size: 22px; font-weight: 600; color: var(--ink); }
.fatwa-closing p:not(.ar) { font-size: var(--fs-small); color: var(--muted); }
.fatwa-closing p:has(strong) { font-size: inherit; }
.fatwa-closing p:has(> img:only-child) { grid-column: 2; grid-row: 1 / span 6; margin: 0; }
.fatwa-closing img { width: 112px; height: auto; }

.disclaimer {
  margin: 0; padding: 16px 18px; border-radius: var(--radius-md);
  background: var(--parchment-2); font-size: 13.5px; line-height: 1.6; color: var(--muted);
}

.fatwa-side { flex: 1 1 280px; max-width: 340px; display: flex; flex-direction: column; gap: 24px; position: sticky; top: 24px; }
.fatwa-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.fatwa-actions .btn { padding: 0 14px; font-weight: 500; }
.share-status { margin: -16px 0 0; font-size: 13.5px; color: var(--teal-dark); min-height: 0; }
.share-status:empty { display: none; }

.details { padding: 22px 22px 20px; display: flex; flex-direction: column; gap: 14px; }
.details dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 14.5px; }
.details dt { color: var(--muted); }
.details dd { margin: 0; color: var(--ink); }

.related { display: flex; flex-direction: column; }
.related .eyebrow { padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.related-item { display: flex; flex-direction: column; gap: 4px; padding: 14px 0; border-bottom: 1px solid var(--line-2); text-decoration: none; color: var(--ink); font-size: 13px; }
.related-title { font-family: var(--font-display); font-size: 18px; font-weight: 600; line-height: 1.3; }
.related-item:hover .related-title { color: var(--blue); text-decoration: underline; }

.cta-card { background: var(--blue); color: #E2E8F6; border-radius: var(--radius-lg); padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.cta-card h2 { margin: 0; font-family: var(--font-display); font-size: 24px; font-weight: 600; color: var(--white); }
.cta-card p { margin: 0; font-size: 14.5px; line-height: 1.6; }
.cta-card :focus-visible { outline-color: var(--gold-light); }

.print-only { display: none; }

/* Ask a Question */
.page-lead { margin: 0; font-size: var(--fs-prose); line-height: 1.6; color: var(--text-2); max-width: 680px; }
.ask { padding-top: 48px; padding-bottom: 80px; display: flex; flex-wrap: wrap; gap: 56px; align-items: flex-start; }
.ask-main { flex: 999 1 600px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.ask-side { flex: 1 1 300px; display: flex; flex-direction: column; gap: 20px; }
.ask-form { display: flex; flex-direction: column; gap: 26px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; }
.ask-form fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.ask-form legend { padding: 0; font-size: 14.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.req { color: var(--danger); }
.textarea { padding: 12px 14px; min-height: 220px; resize: vertical; line-height: 1.6; }
select.input { padding-right: 8px; }

.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg label {
  display: inline-flex; align-items: center; gap: 10px; min-height: var(--tap); padding: 0 16px;
  border: 1px solid var(--input-border); border-radius: var(--radius); background: var(--white);
  font-size: 15px; font-weight: 500; cursor: pointer;
}
.seg label:has(input:checked) { border-color: var(--blue); background: var(--blue-tint-2); color: var(--blue); }
.seg input, .check input { width: 18px; height: 18px; margin: 0; accent-color: var(--blue); flex: none; }

.consent-box { background: var(--parchment-2); border-radius: var(--radius-md); padding: 18px 20px; display: flex; flex-direction: column; gap: 16px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.5; cursor: pointer; font-weight: 400 !important; }
.check input { margin-top: 2px; width: 20px; height: 20px; }
.form-actions { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.form-actions .btn { min-width: 200px; }

.field-error { margin: 0; font-size: 14px; font-weight: 600; color: var(--danger); }
.has-error .input, .has-error .seg label { border-color: var(--danger); }
.has-error .input:focus-visible { outline-color: var(--danger); }
.error-summary { border: 2px solid var(--danger); border-radius: var(--radius-md); padding: 18px 22px; background: #FDF5F2; }
.error-summary h2 { margin: 0 0 8px; font-size: 18px; color: var(--danger); }
.error-summary ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.error-summary a { color: var(--danger); font-weight: 600; }

/* Honeypot: hidden from people and screen readers, visible to naive bots */
.hp { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.side-box { padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.side-box h2 { margin: 0; font-size: 17px; }
.side-box p { margin: 0; line-height: 1.6; font-size: 15px; }
.side-box ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; line-height: 1.55; font-size: 15px; color: var(--text-2); }
.side-search { display: flex; gap: 8px; }
.side-search .input { flex: 1; min-width: 0; }
.side-search .btn { padding: 0 14px; }

.thanks { border: 1px solid #B9C8EA; background: var(--blue-tint-2); border-radius: var(--radius-xl); padding: 36px; display: flex; flex-direction: column; gap: 14px; }
.thanks .icon { color: var(--blue); }
.thanks h2 { margin: 0; font-family: var(--font-display); font-size: 30px; font-weight: 600; line-height: 1.2; }
.thanks p { margin: 0; line-height: 1.6; }
.thanks-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.btn-outline { background: var(--white); border-color: var(--blue); color: var(--blue); }
.btn-outline:hover { background: var(--blue-tint-2); color: var(--blue-hover); }

/* CMS content (articles, books, pages) */
.content-list { padding-top: 32px; padding-bottom: 72px; display: flex; flex-direction: column; max-width: 900px; }
.content-row { display: flex; gap: 20px; padding: 22px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.content-row:hover .fatwa-row-title { color: var(--blue); text-decoration: underline; text-underline-offset: 4px; }
.content-row-body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.content-thumb { width: 140px; height: 100px; object-fit: cover; border-radius: var(--radius); flex: none; background: var(--parchment-2); }
.content-page { padding-top: 40px; padding-bottom: 72px; }
.content-article { max-width: 760px; display: flex; flex-direction: column; gap: 28px; }
.content-media { display: flex; flex-wrap: wrap; gap: 16px; }
.content-image { border-radius: var(--radius-md); max-height: 520px; width: auto; }
.content-image-cover { max-width: 320px; box-shadow: 0 8px 24px rgba(15, 37, 87, .15); }
.content-files { display: flex; flex-wrap: wrap; gap: 10px; }
.content-details { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; font-size: 15px; }
.content-details dt { color: var(--muted); }
.content-details dd { margin: 0; }
@media (max-width: 600px) { .content-thumb { width: 96px; height: 72px; } }

/* Admin preview of a draft */
.preview-banner { background: var(--gold-tint); border-bottom: 1px solid #E8D7A8; color: var(--gold-tint-text); font-size: 14.5px; }
.preview-banner .wrap { padding-top: 12px; padding-bottom: 12px; }

/* Error page */
.error-search { margin: 24px auto; text-align: left; }

/* Responsive */
@media (max-width: 900px) {
  :root { --gutter: 16px; }
  .main-nav { margin-left: 0; width: 100%; }
  .hero-grid { padding-top: 48px; padding-bottom: 56px; gap: 32px; }
  .hero h1 { font-size: 40px; }
  .home-body, .archive, .fatwa-page { gap: 40px; }
  .filters, .fatwa-side { max-width: none; position: static; }
  .filters { gap: 20px; }
  .chips { flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .chip { min-height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; }
  .chip[aria-current="true"] { border-color: var(--blue); }
  .page-band h1 { font-size: 36px; }
  .fatwa-head h1 { font-size: 34px; }
  .question-box { padding: 22px; }
  .fatwa-closing { grid-template-columns: 1fr; }
  .fatwa-closing p:has(> img:only-child) { grid-column: 1; grid-row: auto; margin-top: 12px; }
}

/* Print: the fatwa only, with its address (BRIEF §3 "PDF" = print to PDF) */
@media print {
  @page { margin: 18mm 16mm; }
  body { font-size: 11pt; color: #000; background: #fff; }
  .site-header, .site-footer, .skip-link, .fatwa-side, .breadcrumb, .page-band form { display: none !important; }
  .wrap { max-width: none; padding: 0; }
  .fatwa-page { display: block; padding: 0; }
  .fatwa { max-width: none; gap: 18pt; }
  .fatwa-head h1 { font-size: 22pt; }
  .question-box { background: none; border: 1pt solid #999; }
  .prose { font-size: 11.5pt; color: #000; }
  .prose blockquote { background: none; }
  .disclaimer { background: none; border-top: 1pt solid #999; border-radius: 0; }
  .pill { background: none; border: 1pt solid #999; color: #000; }
  a { color: #000; text-decoration: none; }
  .print-only { display: block; }
  .print-url { font-size: 9pt; color: #444; }
  .fatwa-closing, .question-box, .prose blockquote { break-inside: avoid; }
}
