/* Alif Meem — one spacing scale, one container, one section rhythm on every page. */
@font-face {
  font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("/fonts/manrope-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("/fonts/manrope-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Amiri Quran"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/fonts/amiri-quran-arabic.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFC;
}

:root {
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 88px;
  --container: 1184px; --radius: 8px; --radius-sm: 5px;
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: Georgia, "Times New Roman", serif;
  --brass: #d9bd86;

  --g-950: #102e22; --g-900: #163e32; --g-800: #1b503b; --g-700: #216448; --g-600: #357957;
  --g-500: #438562; --g-200: #b7cfbd; --g-100: #dce9d9; --g-50: #eff4eb;
  --grad: linear-gradient(110deg, #10382f, #16473a 68%, #123b32);
  --on-grad: #fffaf0; --on-grad-soft: #d9e5da;

  --bg: #faf9f4; --surface: #fffefa; --surface-2: #f0f1e9; --ink: #192e26; --muted: #536159; --line: #d4d9cf;
  --accent: #216448; --accent-ink: #fff; --accent-soft: #e9f0e4; --accent-line: #a4bcaa;
  --warn: #9a4a0a; --warn-soft: #fdf3e7;
  --shadow: 0 1px 2px rgb(6 40 30 / .05), 0 6px 20px rgb(6 40 30 / .06);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --ah-sm: 12px; --ah-lg: 24px; --ah-xl: 38px;
  --arch-ink: color-mix(in srgb, var(--accent) 35%, var(--line));
  --star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1L15.22 4.22L19.78 4.22L19.78 8.78L23 12L19.78 15.22L19.78 19.78L15.22 19.78L12 23L8.78 19.78L4.22 19.78L4.22 15.22L1 12L4.22 8.78L4.22 4.22L8.78 4.22Z'/%3E%3C/svg%3E");
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --grad: linear-gradient(110deg, #102b24, #173c30 68%, #102e25);
    --bg: #111b17; --surface: #19251e; --surface-2: #202e25; --ink: #f2f1e8; --muted: #b5c1b6; --line: #39483c;
    --accent: #a4d6b9; --accent-ink: #112c20; --accent-soft: #25392b; --accent-line: #54735f;
    --warn: #f2b277; --warn-soft: #2e2318; --shadow: 0 1px 2px rgb(0 0 0 / .35);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--accent-line) transparent; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--font); font-feature-settings: "tnum" 1; caret-color: var(--accent); -webkit-font-smoothing: antialiased; }
::selection { background: var(--g-100); color: var(--g-950); }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.masthead :focus-visible, .site-footer :focus-visible { outline-color: var(--brass); }
h1, h2, h3 { line-height: 1.2; margin: 0; text-wrap: balance; }
p { margin: 0; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--s-5); }
.reading-page { max-width: 908px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.icon { flex: none; }

/* Masthead: the green gradient that carries the brand on every page */
.masthead { position: relative; z-index: 2; background: var(--grad); color: var(--on-grad); isolation: isolate; }
.masthead::after { content: ""; position: absolute; inset: 0 0 0 55%; z-index: 0; pointer-events: none; opacity: .12;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56' fill='none' stroke='%23fff' stroke-width='1'%3E%3Cpath d='M28 14L32.1 18.1L37.9 18.1L37.9 23.9L42 28L37.9 32.1L37.9 37.9L32.1 37.9L28 42L23.9 37.9L18.1 37.9L18.1 32.1L14 28L18.1 23.9L18.1 18.1L23.9 18.1ZM28 0V14M28 42V56M0 28H14M42 28H56M0 0L18.1 18.1M56 0L37.9 18.1M56 56L37.9 37.9M0 56L18.1 37.9'/%3E%3C/svg%3E") 0 0 / 56px 56px;
  -webkit-mask-image: radial-gradient(62% 150% at 90% 70%, #000 8%, transparent 74%); mask-image: radial-gradient(62% 150% at 90% 70%, #000 8%, transparent 74%); }
.site-header { position: relative; z-index: 2; border-bottom: 1px solid rgb(235 229 194 / .22); }
.header-row { display: grid; grid-template-columns: auto 1fr minmax(170px, 225px); align-items: center; gap: var(--s-6); min-height: 70px; padding-block: var(--s-2); }
.has-hero .header-row { grid-template-columns: auto 1fr; }
.has-hero .header-nav { justify-content: flex-end; }
.header-end:empty { display: none; }
.brand, .footer-brand { display: inline-flex; align-items: center; gap: 10px; font: 500 1.65rem/1.2 var(--display); letter-spacing: -.04em; }
.brand { color: inherit; text-decoration: none; justify-self: start; white-space: nowrap; }
.brand-mark { color: var(--brass); flex: none; }
.header-nav { display: flex; justify-content: center; gap: clamp(16px, 2vw, 30px); }
.header-nav a { position: relative; padding: var(--s-2) 0; color: var(--on-grad-soft); text-decoration: none; font-weight: 600; font-size: .95rem; white-space: nowrap; transition: color .18s var(--ease); }
.header-nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 2px; background: var(--brass); transform: scaleX(0); transform-origin: left; transition: transform .18s var(--ease); }
.header-nav a:hover, .header-nav a[aria-current="page"] { color: var(--on-grad); }
.header-nav a:hover::after, .header-nav a[aria-current="page"]::after { transform: scaleX(1); }
.header-end { justify-self: end; display: flex; width: 100%; justify-content: flex-end; }
.header-end .search-row.compact { max-width: 300px; }

/* Search + location: side by side everywhere */
.search-row { display: flex; gap: var(--s-3); width: 100%; max-width: 680px; }
.search-row.compact { max-width: 500px; flex: 1 1 320px; gap: var(--s-2); }
.search { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; }
.search > .icon { position: absolute; left: var(--s-4); color: #64776f; pointer-events: none; }
.search-input { width: 100%; min-width: 0; height: 52px; padding: 0 var(--s-4) 0 48px; border: 1px solid transparent; border-radius: var(--radius-sm); background: #fffefa; color: #192e26; font: inherit; }
.search-input::placeholder { color: #536159; }
.search-input { transition: box-shadow .2s var(--ease), border-color .2s var(--ease); }
.search-input:focus { outline: 2px solid var(--brass); outline-offset: 2px; }
.compact .search-input { height: 42px; padding-left: 40px; font-size: .95rem; background: rgb(255 255 255 / .12); border-color: rgb(255 255 255 / .22); color: #fff; box-shadow: none; }
.compact .search-input::placeholder { color: var(--on-grad-soft); }
.compact .search > .icon { left: var(--s-3); color: var(--on-grad-soft); }
.compact .search-input:focus { background: #fff; color: #0f1f19; }
.compact .search:focus-within > .icon, .compact .search-input:focus::placeholder { color: #536159; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2); height: 52px; padding: 0 var(--s-5); border: 0; border-radius: var(--radius-sm); background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 700; white-space: nowrap; cursor: pointer; transition: background-color .18s var(--ease), transform .18s var(--ease); }
.btn:hover { background: color-mix(in srgb, var(--accent) 85%, var(--ink)); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .7; cursor: progress; }
.masthead .btn { background: #e4cf9f; color: #19372b; height: 52px; }
.masthead .btn:hover { background: #f0dfb8; }
.compact .btn { height: 42px; padding: 0 var(--s-4); font-size: .9rem; box-shadow: none; }
.label-short { display: none; }
.suggest { position: absolute; z-index: 30; top: calc(100% + var(--s-2)); left: 0; right: 0; margin: 0; padding: var(--s-1); list-style: none; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow); text-align: left; }
.suggest a { display: flex; justify-content: space-between; gap: var(--s-3); padding: var(--s-2) var(--s-3); border-radius: 8px; color: var(--ink); text-decoration: none; }
.suggest a:hover, .suggest a:focus, .suggest a.active { background: var(--accent-soft); }
.suggest .muted { font-size: .85rem; }

/* Hero (homepage) with a soft light that follows the cursor */
.hero { position: relative; }
.hero { z-index: 1; }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(240px, 1fr); align-items: center; column-gap: clamp(32px, 7vw, 96px); padding-block: clamp(42px, 5vw, 72px); }
.hero-search { min-width: 0; }
.hero-title { max-width: 19ch; font: 400 clamp(2.6rem, 5.1vw, 4.25rem)/1.04 var(--display); letter-spacing: -.045em; }
.hero-lead { max-width: 51ch; margin-top: 16px; font-size: 1.05rem; color: var(--on-grad-soft); }
.hero .search-row { margin-top: 24px; max-width: 600px; }
.hero-calendar { --ah: 30px; --arch-bg: #133a30; --arch-line: #8d9776; position: relative; width: 100%; max-width: 330px; justify-self: end; margin-top: var(--ah); padding: 12px 18px 25px; text-align: center; border: 1px solid var(--arch-line); border-top: 0; background: var(--arch-bg); }
.hero-calendar .arch-finial { background: var(--brass); }
.hero-date { display: grid; gap: 5px; color: var(--on-grad-soft); font-size: .9rem; }
.hero-date .sep { display: none; }
.hero-date span:last-child { font: 400 clamp(1.35rem, 2vw, 1.7rem)/1.25 var(--display); color: var(--on-grad); }
.hero-note { margin-top: 16px; padding-top: 14px; border-top: 1px solid rgb(228 215 177 / .3); color: var(--on-grad-soft); font-size: .85rem; }
.hero-note strong { display: inline-block; min-width: 7ch; text-align: left; margin-left: 4px; font-weight: 750; color: var(--on-grad); }
.hero-note > span { display: block; margin-top: 2px; font-size: .78rem; }
.hero-note .sep { display: none; }
.masthead-light { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
@media (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .masthead-light::before { content: ""; position: absolute; inset: -150px auto auto -150px; width: 300px; height: 300px; opacity: 0; background: radial-gradient(closest-side, rgb(218 230 192 / .1), transparent); transform: translate3d(var(--mx, 50vw), var(--my, 160px), 0); transition: opacity .25s; }
  .masthead.lit .masthead-light::before { opacity: 1; }
}

/* Page head + sections (same rhythm everywhere) */
.crumbs { padding-top: var(--s-5); font-size: .85rem; color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumbs [aria-hidden] { margin-inline: 3px; }
.page-head { display: flex; flex-direction: column; gap: 10px; padding: var(--s-5) 0; border-bottom: 1px solid var(--line); }
.page-head h1 { max-width: 32ch; font: 400 clamp(2rem, 4vw, 3.3rem)/1.09 var(--display); letter-spacing: -.035em; overflow-wrap: anywhere; }
.page-sub { max-width: 72ch; color: var(--muted); }
.page-actions .btn { min-height: 42px; height: auto; padding: 10px 16px; font-size: .9rem; white-space: normal; }
.page-head + .search-row { margin-top: var(--s-5); }
.page-head + .search-row input { border-color: var(--line); }
.notice { padding: var(--s-3) var(--s-4); border-radius: var(--radius-sm); background: var(--accent-soft); border: 1px solid var(--accent-line); }
.section { padding-top: clamp(36px, 4.5vw, 60px); scroll-margin-top: var(--s-5); }
.section + .section, .letter-group, .ayah, .surah-grid, .dua { content-visibility: auto; contain-intrinsic-block-size: auto 480px; }
.ayah { contain-intrinsic-block-size: auto 160px; }
.letter-group { contain-intrinsic-block-size: auto 220px; }
.section-title { font: 400 clamp(1.6rem, 2.8vw, 2.25rem)/1.15 var(--display); letter-spacing: -.028em; margin-bottom: var(--s-2); }
.section-lead { color: var(--muted); margin-bottom: var(--s-5); max-width: 68ch; }
.section-title + :not(.section-lead) { margin-top: var(--s-4); }

/* Cards */
.card { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s-5); color: var(--ink); text-decoration: none; }
.card h3 { font-size: 1.05rem; margin-bottom: var(--s-2); }
.card-title { font: 600 1.18rem/1.3 var(--font); letter-spacing: -.025em; margin-bottom: var(--s-2); }
.card.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 34%, var(--line)); }
.card.warn .card-title { color: var(--warn); }
.card-grid { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

/* City cards: five times, next prayer marked */
.city-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 310px), 1fr)); gap: var(--s-4); }
.city-card { display: block; min-width: 0; color: var(--ink); text-decoration: none; }
.city-card > .card { margin: 0; height: 100%; padding: 18px 14px 16px; border: 1px solid var(--line); border-top: 2px solid var(--arch-line); border-radius: 0 0 var(--radius) var(--radius); }
.city-card:hover > .card, .city-card:focus-visible > .card { --arch-line: var(--accent); border-color: var(--arch-line); }
.city-card:hover .city-card-name { color: var(--accent); }
.city-card-head { display: flex; justify-content: space-between; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; min-height: 32px; margin: 0 0 12px; padding-left: 29px; }
.city-card-name { font: 500 1.45rem/1.2 var(--display); letter-spacing: -.025em; overflow-wrap: anywhere; }
.city-card-next { font-size: .75rem; font-weight: 700; color: var(--accent); }
/* A small mihrab alongside the city name, using the same arch as the calendar. */
.city-card .arch-cap { left: 14px; top: 23px; width: 18px; height: 8px; }
.city-card .card::before { content: ""; position: absolute; top: 30px; left: 14px; width: 18px; height: 8px; border: solid var(--arch-line); border-width: 0 1px 1px; }
.city-card .arch-finial { left: 23px; top: 29px; width: 7px; height: 7px; margin-left: -3.5px; }
.mini-times { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s-1); margin: 0; text-align: center; }
.mini-times > div { min-width: 0; padding: var(--s-2) 0; border-radius: 4px; }
.mini-times dt { font-size: .75rem; font-weight: 600; color: var(--muted); }
.mini-times dd { margin: 3px 0 0; font-size: 1rem; line-height: 1.3; font-weight: 750; white-space: nowrap; }
.mini-times small { display: block; font-size: .68rem; font-weight: 600; color: var(--muted); letter-spacing: .05em; }
.mini-times > div.is-next { background: var(--accent-soft); }
.mini-times > div.is-next dt, .mini-times > div.is-next dd, .mini-times > div.is-next small { color: var(--accent); }

/* Provinces as a clean two-column index */
.province-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--s-6); border-top: 1px solid var(--line); }
.province-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: var(--s-4); padding: var(--s-4) var(--s-1); border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.province-row .province-name { font-weight: 700; }
.province-row .province-count { color: var(--muted); font-size: .9rem; }
.province-row .icon { color: var(--muted); transition: transform .18s var(--ease), color .18s var(--ease); }
.province-row:hover .province-name, .province-row:hover .icon { color: var(--accent); }
.province-row:hover .icon { transform: translateX(3px); }

/* Name lists (names only) */
.name-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-1) var(--s-5); grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.name-list a { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 550; overflow-wrap: anywhere; }
.name-list a:hover { color: var(--accent); text-decoration: underline; }

/* Facts list ("How we calculate") */
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--s-6); margin: 0; }
.facts > div { padding: var(--s-5) 0; border-top: 1px solid var(--line); }
.facts dt { font-weight: 800; margin-bottom: var(--s-1); }
.facts dd { margin: 0; color: var(--muted); max-width: 52ch; }

/* A–Z */
.letter-bar { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-bottom: var(--s-5); }
.letter-bar a { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); font-weight: 700; text-decoration: none; }
.letter-bar a:hover { background: var(--accent-soft); border-color: var(--accent-line); }
.letter-bar a { transition: background-color .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease); }
.letter-bar a[aria-current] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.az-bar { gap: 6px; }
.az-bar a { width: 34px; height: 34px; }
.az-off { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: var(--radius-sm); border: 1px dashed var(--line); color: var(--muted); opacity: .65; font-weight: 600; }
.az-head { margin-bottom: var(--s-3); color: var(--muted); }
.az-head strong { color: var(--accent); font-size: 1.25rem; margin-right: 2px; }
.az-list { min-height: 120px; transition: opacity .15s var(--ease); }
.az-list.is-loading { opacity: .45; }
.az-list.az-in .name-list { animation: rise .35s var(--ease) both; }
.az-error { color: var(--warn); }
.az-error button { margin-left: var(--s-2); font: inherit; font-weight: 700; color: var(--accent); background: none; border: 0; text-decoration: underline; cursor: pointer; }
.letter-group { padding: var(--s-4) 0; border-top: 1px solid var(--line); scroll-margin-top: var(--s-5); }
.letter { font-size: 1.25rem; color: var(--accent); margin-bottom: var(--s-3); }

/* City page */
.today-grid { display: grid; gap: var(--s-4); grid-template-columns: repeat(2, minmax(0, 1fr)); padding-top: var(--s-5); align-items: stretch; }
.today-grid > .card { display: flex; flex-direction: column; }
.side-stack { display: flex; flex-direction: column; gap: var(--s-4); min-width: 0; }
.side-stack > .card { display: flex; flex-direction: column; }
.side-stack > .card:last-child { flex: 1; }
.next-card.arch { --arch-bg: #163e32; --arch-line: #52705c; --ink: #fffaf0; --accent: #e6cb94; --muted: #c8d8c9; --line: #587464; color: var(--ink); text-align: center; }
.next-card .card-title { text-align: left; }
.next-big { display: flex; justify-content: center; align-items: baseline; flex-wrap: wrap; gap: 0 var(--s-2); margin-top: var(--s-1); }
.next-big-name { font-size: 1.75rem; font-weight: 800; letter-spacing: -.02em; color: var(--accent); }
.next-big-at { font-weight: 700; color: var(--ink); }
.ramadan-clock.next-clock { grid-template-columns: repeat(3, minmax(0, 1fr)); align-self: center; width: 100%; max-width: 360px; }
.next-then { font-size: .9rem; color: var(--muted); }
.ramadan-band { max-width: 820px; margin-left: auto; margin-right: auto; padding: var(--s-4) var(--s-6) var(--s-5); text-align: center; }
.ramadan-band .ramadan { margin: 0 0 var(--s-3); }
.ramadan-band .ramadan-clock { max-width: 560px; margin: var(--s-4) auto; gap: var(--s-3); }
.ramadan-band .ramadan-num { font-size: clamp(1.7rem, 4vw, 2.4rem); }
.ramadan-band-link { font-size: .9rem; font-weight: 700; }
/* City Ramadan page: countdown and first-roza card share one row, same width and height */
.today-grid .card-title { margin-bottom: var(--s-3); }
.today-grid .ramadan { margin: 0 0 var(--s-3); }
.today-grid > .card > .times { flex: 1; }
.today-grid .ramadan-clock { margin: var(--s-4) 0; }
.today-grid .ramadan-num { font-size: clamp(1.6rem, 3vw, 2.1rem); }

.times { width: 100%; border-collapse: collapse; }
.times th { text-align: left; font-weight: 500; padding: var(--s-3) 0; }
.times td { text-align: right; padding: var(--s-3) 0; font-weight: 700; }
.times tr + tr { border-top: 1px solid var(--line); }
.today .times { font-size: 1.2rem; }
.times.compact th, .times.compact td { padding: var(--s-2) 0; font-size: .95rem; }
.times tr.sub th, .times tr.sub td { font-size: .9rem; color: var(--muted); font-weight: 500; }
.times tr.current th, .times tr.current td { background: var(--accent-soft); color: var(--accent); font-weight: 800; }
.today .times th { padding-inline-start: 10px; }
.today .times td { padding-inline-end: 10px; }
.today .times tr.current th { box-shadow: inset 3px 0 var(--accent); }
.today-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s-1) var(--s-3); min-height: 30px; }
.today-head .card-title { margin: 0; }
.next { font-weight: 700; color: var(--muted); font-size: .95rem; }
.next-name { color: var(--accent); font-weight: 800; }
.next-in { display: inline-block; color: var(--ink); font-weight: 800; }
.table-scroll { max-width: 100%; overflow-x: auto; border-block: 1px solid var(--line); background: var(--surface); }
.table-scroll + .small { margin-top: var(--s-2); }
.month { width: 100%; border-collapse: collapse; font-size: .9rem; }
.month th, .month td { padding: var(--s-2) var(--s-3); text-align: left; white-space: nowrap; border-bottom: 1px solid var(--line); }
.month thead th { position: sticky; top: 0; background: var(--surface-2); border-bottom-color: var(--accent-line); font-size: .82rem; font-weight: 750; color: var(--ink); }
.month tbody tr:nth-child(even) { background: color-mix(in srgb, var(--surface-2) 35%, var(--surface)); }
.month td:first-child { font-weight: 650; }
.guide-times { min-width: 610px; }
.guide-times td:nth-child(2), .guide-times td:nth-child(3) { white-space: normal; }
.guide-times :is(td, th):last-child { text-align: right; }
.numeric-columns :is(th, td):not(:first-child), .ramadan-table :is(th, td):nth-child(n+3) { text-align: right; }
.month tr.is-today td:first-child { box-shadow: inset 3px 0 var(--accent); }
.month tr.is-today td { background: var(--accent-soft); font-weight: 700; }
.month tr.is-friday td:first-child { color: var(--accent); font-weight: 700; }
.month tbody tr:last-child td { border-bottom: 0; }
.two-col { display: grid; gap: 0 var(--s-6); grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.prose { display: grid; gap: var(--s-4); max-width: 66ch; line-height: 1.75; }
.prose h2, .prose.legal h2 { font: 500 1.55rem/1.25 var(--display); margin-top: var(--s-3); }
.prose h3 { font-size: 1.05rem; }
.prose ul { margin: 0; padding-left: var(--s-5); }
.qibla { text-align: center; }
.compass { width: 160px; height: 160px; margin: 0 auto var(--s-2); display: block; }
.compass-ring { fill: var(--surface-2); stroke: var(--line); stroke-width: 2; }
.compass-n { font-size: 9px; font-weight: 700; text-anchor: middle; fill: var(--muted); }
.compass-needle { stroke: var(--accent); stroke-width: 3; stroke-linecap: round; }
.compass-tip, .compass-hub { fill: var(--accent); }
.qibla-deg { font-size: 1.6rem; font-weight: 800; }

/* Ramadan countdown (inside the Sehri & Iftar card) */
.ramadan { margin: var(--s-2) 0 var(--s-4); text-align: center; }
.ramadan-label { font-weight: 700; color: var(--accent); font-size: .95rem; }
.ramadan-clock { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-2); margin: var(--s-3) 0; }
.ramadan-clock[hidden] { display: none; }
.ramadan-unit { display: flex; flex-direction: column; align-items: center; padding: var(--s-2) 0; }
.ramadan-unit + .ramadan-unit { border-inline-start: 1px solid var(--line); }
.ramadan-num { font-size: 1.5rem; font-weight: 650; line-height: 1.2; font-variant-numeric: tabular-nums; letter-spacing: -.035em; }
.ramadan-unit-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.ramadan-note { font-size: .8rem; color: var(--muted); }
.ramadan[data-stage="eid"] .ramadan-label { font-size: 1.2rem; }

/* Chips (city picker, dua topics) */
.chip-row { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-bottom: var(--s-5); }
.chip { display: inline-flex; align-items: center; min-height: 38px; padding: 5px var(--s-3); border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 600; font-size: .9rem; }
.chip:hover { border-color: var(--accent-line); color: var(--accent); }
.chip[aria-current] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.note-line { margin-top: var(--s-4); }

/* Upcoming events */
.event-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.event { display: grid; grid-template-columns: 72px 1fr auto; gap: var(--s-5); align-items: start; padding: var(--s-5) 0; border-bottom: 1px solid var(--line); }
.event-when { display: flex; flex-direction: column; gap: var(--s-1); align-items: center; text-align: center; padding: var(--s-2) 0; background: var(--surface); border-block: 1px solid var(--accent-line); }
.event-day { font: 400 2rem/1.1 var(--display); }
.event-month { font-size: .75rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.event.is-next .event-when { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.event.is-next .event-month { color: var(--accent-ink); }
.event-name { font: 500 1.5rem/1.22 var(--display); }
.event-meta { font-weight: 600; margin-top: var(--s-1); }
.event-about { color: var(--muted); margin-top: var(--s-1); max-width: 68ch; }
.event-count { font-weight: 700; color: var(--accent); white-space: nowrap; padding-top: var(--s-1); }
.event-name a { color: inherit; text-decoration: underline; text-decoration-color: var(--accent-line); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.event-name a:hover { color: var(--accent); text-decoration-color: currentColor; }
/* Event page */
.event-hero { text-align: center; }
.event-when-line { margin: var(--s-1) auto var(--s-2); max-width: 60ch; }
.event-timer[data-stage="live"] .ramadan-label, .event-timer[data-stage="passed"] .ramadan-label { font-size: 1.4rem; margin-bottom: var(--s-3); }
.event-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: var(--s-5) 0 0; padding-top: var(--s-4); border-top: 1px solid var(--line); }
.event-facts dt { font-size: .75rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.event-facts dd { margin: 2px 0 0; font-weight: 800; }
.event-practices { margin: 0; padding-left: var(--s-5); display: grid; gap: var(--s-2); max-width: 75ch; }
.event-holiday { margin-top: var(--s-4); max-width: 75ch; }
.event-note { margin-top: var(--s-5); max-width: 860px; background: var(--surface-2); }
.event-note h3 { font-size: 1.05rem; margin-bottom: var(--s-2); }
.event-note p { color: var(--muted); }
.ref-list { margin: 0; padding-left: var(--s-5); display: grid; gap: var(--s-2); max-width: 860px; }
/* Reference library: hadith and ayats */
.ref-search { position: relative; display: flex; gap: var(--s-2); max-width: 720px; margin-top: var(--s-4); }
.ref-search > .icon { position: absolute; left: var(--s-4); top: 26px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.ref-search input { flex: 1; min-width: 0; height: 52px; padding: 0 var(--s-4) 0 46px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font: inherit; transition: border-color .2s var(--ease), box-shadow .2s var(--ease); }
.ref-search input::placeholder { color: var(--muted); }
.ref-search input:focus { outline: none; border-color: var(--g-500); box-shadow: 0 0 0 4px color-mix(in srgb, var(--g-500) 22%, transparent); }
.ref-search .btn { height: 52px; }
.ref-count { margin-top: var(--s-3); color: var(--muted); font-size: .9rem; }
.ref-count:empty { display: none; }
.ref-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 0 var(--s-6); grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.ref-card { display: flex; flex-direction: column; gap: var(--s-2); height: 100%; padding: 18px 2px 24px; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.ref-card:hover { border-color: var(--accent-line); }
.ref-card:hover .ref-card-title { color: var(--accent); }
.ref-card-ref { display: flex; justify-content: space-between; align-items: center; gap: var(--s-2); font-size: .8rem; font-weight: 700; color: var(--accent); }
.ref-card-title { font: 500 1.3rem/1.28 var(--display); }
.ref-card-text { color: var(--muted); font-size: .9rem; }
.ref-grade { font-size: .72rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--accent-line); background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.ref-grade[data-grade="weak"], .ref-grade[data-grade="fabricated"] { border-color: color-mix(in srgb, var(--warn) 35%, transparent); background: var(--warn-soft); color: var(--warn); }
.ref-single { max-width: 860px; margin-left: auto; margin-right: auto; padding: var(--s-4) var(--s-6) var(--s-6); display: grid; gap: var(--s-4); }
.ref-ar { font-family: "Amiri Quran", serif; font-weight: 400; font-size: clamp(1.45rem, 3.4vw, 1.8rem); line-height: 2.2; text-align: right; }
.ref-en { max-width: 66ch; font-size: 1.05rem; line-height: 1.75; }
.ref-ayah { display: grid; gap: var(--s-2); }
.ref-ayah + .ref-ayah { padding-top: var(--s-4); border-top: 1px solid var(--line); }
.ref-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: var(--s-3) var(--s-5); margin: 0; padding-top: var(--s-4); border-top: 1px solid var(--line); }
.ref-facts dt { font-size: .75rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.ref-facts dd { margin: 2px 0 0; font-weight: 700; }
.prose-line { max-width: 72ch; }
.quran-results:empty { display: none; }
.quran-hit-list { list-style: none; margin: var(--s-3) 0 0; padding: 0; border-top: 1px solid var(--line); max-width: 860px; }
.quran-hit { display: grid; gap: var(--s-2); padding: var(--s-4) 0; border-bottom: 1px solid var(--line); }
.quran-hit-ref { font-weight: 800; text-decoration: none; }
.quran-hit-ref:hover { text-decoration: underline; }
.quran-hit-ar { font-family: "Amiri Quran", serif; font-weight: 400; font-size: 1.4rem; line-height: 2.1; text-align: right; }
.quran-hit-en { color: var(--muted); }
mark { background: color-mix(in srgb, var(--g-500) 28%, transparent); color: var(--ink); border-radius: 3px; padding: 0 2px; }
.ayah-about { margin-top: var(--s-2); font-size: .9rem; font-weight: 700; }
.back-link { display: inline-flex; align-items: center; gap: var(--s-2); font-weight: 700; }
.back-link .icon { transform: scaleX(-1); }

/* Islamic date */
.date-hero { max-width: 820px; margin-left: auto; margin-right: auto; text-align: center; padding: var(--s-7) var(--s-5); }
.date-hero-hijri { font: 400 clamp(2rem, 4.5vw, 3rem)/1.2 var(--display); letter-spacing: -.035em; color: var(--accent); }
.date-hero-hijri abbr { text-decoration: none; }
.date-hero-greg { font-size: 1.15rem; font-weight: 600; margin: var(--s-2) 0 var(--s-3); }
.convert { max-width: 780px; }
.convert-switch { display: inline-flex; gap: var(--s-1); padding: var(--s-1); margin-bottom: var(--s-4); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); max-width: 100%; }
.convert-switch label { position: relative; cursor: pointer; }
.convert-switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.convert-switch span { display: block; padding: var(--s-2) var(--s-4); border-radius: var(--radius-sm); font-weight: 700; font-size: .92rem; color: var(--muted); }
.convert-switch input:checked + span { background: var(--accent); color: var(--accent-ink); }
.convert-switch input:focus-visible + span { outline: 2px solid var(--g-500); outline-offset: 2px; }
.convert-fields { display: contents; border: 0; margin: 0; padding: 0; }
.convert:has(input[value="g2h"]:checked) [data-dir="h2g"],
.convert:has(input[value="h2g"]:checked) [data-dir="g2h"] { display: none; }
.convert-row { display: flex; gap: var(--s-2); flex-wrap: wrap; }
.convert-row input, .convert-row select { height: 48px; padding: 0 var(--s-3); border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font: inherit; min-width: 0; }
.convert-row input[type="date"] { flex: 1 1 180px; }
.convert-row input[type="number"] { width: 92px; }
.convert-row select { flex: 1 1 160px; }
.convert-row .btn { height: 48px; }
.convert-result { margin-top: var(--s-4); padding-top: var(--s-4); border-top: 1px solid var(--line); }
.convert-result strong { color: var(--accent); }

/* Ramadan page */
.ramadan-hero { max-width: 820px; margin-left: auto; margin-right: auto; padding: var(--s-6); }
.ramadan-hero .ramadan { margin: 0; padding: var(--s-2) 0 0; }
.ramadan-hero .ramadan-label { font-size: 1.15rem; }
.ramadan-hero .ramadan-clock { max-width: 560px; margin: var(--s-5) auto; gap: var(--s-3); }
.ramadan-hero .ramadan-num { font-size: clamp(1.8rem, 5vw, 2.8rem); }
.ramadan-hero .ramadan-note { font-size: .9rem; }

/* Quran */
.surah-grid { display: grid; gap: 0 var(--s-5); grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); }
.surah-card { display: grid; grid-template-columns: 3ch minmax(0, 1fr) auto; align-items: center; gap: var(--s-3); padding: var(--s-4) 6px; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.surah-card:hover { background: var(--accent-soft); color: var(--accent); }
.surah-num { color: var(--muted); font-size: .85rem; font-weight: 650; text-align: right; }
.surah-names { display: flex; flex-direction: column; min-width: 0; }
.surah-name { font-weight: 700; }
.surah-ar { font-family: "Amiri Quran", serif; font-size: 1.3rem; color: var(--accent); }
.surah-head { align-items: center; text-align: center; }
.surah-head-ar { font-family: "Amiri Quran", serif; font-size: 2.2rem; line-height: 1.6; color: var(--accent); }
.quran { max-width: 860px; margin: var(--s-6) auto 0; padding: 0 clamp(16px, 4vw, 52px); border-block: 2px solid var(--accent-line); background: var(--surface); }
.bismillah { font-family: "Amiri Quran", serif; font-size: 1.9rem; text-align: center; padding: var(--s-5) 0; color: var(--accent); }
.ayah { padding: clamp(20px, 3vw, 36px) 0; border-top: 1px solid var(--line); scroll-margin-block-start: 16px; }
.ayah:first-child { border-top: 0; }
.ayah:target { border-top-color: var(--accent); }
.ayah-ar { font-family: "Amiri Quran", serif; font-size: clamp(1.5rem, 3.4vw, 1.9rem); line-height: 2.3; text-align: right; }
.ayah-end { color: var(--accent); white-space: nowrap; }
.ayah-en { margin-top: var(--s-3); color: var(--ink); max-width: 66ch; line-height: 1.75; }
.ayah-num { font-weight: 800; color: var(--accent); margin-right: var(--s-1); }
.surah-nav { display: flex; justify-content: space-between; gap: var(--s-4); max-width: 860px; margin: var(--s-6) auto 0; padding-top: var(--s-5); border-top: 1px solid var(--line); font-weight: 700; }

/* Duas */
.dua-list { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr)); }
.dua { display: flex; flex-direction: column; gap: var(--s-3); }
.dua-head { display: flex; flex-direction: column; gap: 2px; }
.dua-head h3 { font-size: 1.05rem; margin: 0; }
.dua-ar { font-family: "Amiri Quran", serif; font-size: 1.6rem; line-height: 2.1; text-align: right; color: var(--ink); }
.dua-translit { font-style: italic; color: var(--ink); }
.dua-meaning { color: var(--ink); line-height: 1.75; max-width: 66ch; }
.dua-source { font-size: .8rem; font-weight: 700; color: var(--accent); margin-top: auto; }

/* FAQ */
.faq { min-width: 0; border-block: 1px solid var(--accent-line); }
.faq-item + .faq-item { border-top: 1px solid var(--line); }
.faq-a { overflow: hidden; }
.faq-item.closing summary .icon { transform: none; }
.faq-item summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: var(--s-4); padding: var(--s-4) var(--s-5); transition: color .18s var(--ease); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--accent); }
.faq-item summary .icon { flex: none; color: var(--accent); transition: transform .18s var(--ease); }
.faq-item[open] summary { color: var(--accent); }
.faq-item[open] summary .icon { transform: rotate(180deg); }
.faq-item[open] { background: color-mix(in srgb, var(--accent-soft) 45%, var(--surface)); }
.faq-item p { padding: 0 var(--s-5) var(--s-5); color: var(--muted); max-width: 72ch; }


/* Footer */
.site-footer { --ink: #fcf8eb; --muted: #cedace; --accent: #e7d2a5; --accent-line: #a4946c; position: relative; background: #15372d; border-top: 1px solid var(--accent-line); margin-top: clamp(48px, 6vw, 80px); }
.site-footer::before { content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 16px; background: var(--accent-line); pointer-events: none;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='16' viewBox='0 0 44 16'%3E%3Cpath d='M22 0.8L24.11 2.91L27.09 2.91L27.09 5.89L29.2 8L27.09 10.11L27.09 13.09L24.11 13.09L22 15.2L19.89 13.09L16.91 13.09L16.91 10.11L14.8 8L16.91 5.89L16.91 2.91L19.89 2.91Z'/%3E%3C/svg%3E") center / 44px 16px repeat-x; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='16' viewBox='0 0 44 16'%3E%3Cpath d='M22 0.8L24.11 2.91L27.09 2.91L27.09 5.89L29.2 8L27.09 10.11L27.09 13.09L24.11 13.09L22 15.2L19.89 13.09L16.91 13.09L16.91 10.11L14.8 8L16.91 5.89L16.91 2.91L19.89 2.91Z'/%3E%3C/svg%3E") center / 44px 16px repeat-x; }
.footer-grid { display: grid; gap: var(--s-6); grid-template-columns: 2fr 1fr 1fr 1fr; padding-top: var(--s-7); padding-bottom: var(--s-7); font-size: .9rem; color: var(--muted); }
.footer-brand { color: var(--ink); margin-bottom: var(--s-3); }
.footer-title { color: var(--accent); font-size: .83rem; font-weight: 750; margin-bottom: var(--s-3); letter-spacing: .025em; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-1); }
.footer-links a, .footer-grid a { color: var(--muted); }
.footer-links a { display: inline-block; text-decoration: none; padding-block: 3px; }
.footer-sources { margin-top: var(--s-3); font-size: .8rem; }
.footer-links a:hover { color: var(--accent); text-decoration: underline; }

@media (min-width: 850px) {
  .section:has(> .faq), .home-sections > :is(#explore, #provinces, #about) {
    display: grid; grid-template-columns: minmax(190px, 1fr) minmax(0, 2.15fr);
    align-items: start; column-gap: var(--s-7);
  }
  .section-title + .faq, .home-sections > :is(#explore, #provinces, #about) > .section-title + * { margin-top: 0; }
  .home-sections #explore .explore-list { grid-template-columns: 1fr; }
  .home-sections #cities { display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--s-6); }
  .home-sections #cities .section-lead { justify-self: end; margin-bottom: 0; max-width: 54ch; font-size: .92rem; }
  .home-sections #cities .city-grid { grid-column: 1 / -1; margin-top: var(--s-5); }
  .page-head:has(> .page-actions) { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--s-5); align-items: end; }
  .page-head > .page-actions { grid-column: 2; grid-row: 1 / span 2; }
  .page-head > .notice { grid-column: 1 / -1; }
}
@media (max-width: 1080px) {
  .header-row { grid-template-columns: auto 1fr; row-gap: var(--s-1); }
  .has-hero .header-nav { justify-content: flex-start; }
  .header-nav { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; gap: var(--s-5); overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--s-5) * -1); padding: 0 calc(var(--s-5) + 40px) 0 var(--s-5);
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 56px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 56px), transparent); }
  .header-nav::-webkit-scrollbar { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}



/* Phones */
@media (max-width: 760px) {
  .container { padding-inline: var(--s-4); }
  .header-row { column-gap: var(--s-3); padding-block: 10px 3px; }
  .header-nav { margin: 0 calc(var(--s-4) * -1); padding: 0 calc(var(--s-4) + 40px) 0 var(--s-4); gap: var(--s-4); }
  .header-end .search-row.compact { max-width: none; }
  .convert-switch { display: flex; }
  .convert-switch label { flex: 1; text-align: center; }
  .convert-switch span { padding: var(--s-2) var(--s-3); font-size: .86rem; }
  .convert-row .btn { flex: 1 1 auto; }
  .event { grid-template-columns: 60px minmax(0, 1fr); gap: 4px var(--s-4); }
  .event-count { grid-column: 2; padding-top: 0; }
  .search-row { gap: var(--s-2); }
  .label-long { display: none; }
  .hero-inner { grid-template-columns: minmax(0, 1fr); gap: var(--s-5); padding-block: 28px 18px; }
  .hero-title { font-size: clamp(2.25rem, 7vw, 3.1rem); }
  .hero-lead { margin-top: 10px; font-size: 1rem; }
  .hero .search-row { margin-top: var(--s-4); }
  .hero-calendar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 20px; max-width: none; margin: 0; padding: 14px 0 0; text-align: left; border: 0; border-top: 1px solid rgb(228 215 177 / .35); background: transparent; }
  .hero-calendar .arch-cap, .hero-calendar .arch-finial { display: none; }
  .hero-date { gap: 2px; font-size: .81rem; }
  .hero-date span:last-child { font-size: 1.15rem; }
  .hero-note { margin: 0; padding: 0; border: 0; }
  .hero-note strong { min-width: 0; margin-left: 0; }
  .search-input, .compact .search-input { font-size: 1rem; padding-left: 42px; }
  .search > .icon { left: var(--s-3); }
  .label-short { display: inline; }
  .btn { padding: 0 var(--s-4); }
  .today-grid, .two-col, .province-list, .facts { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5); padding-block: var(--s-6); }
  .footer-about { grid-column: 1 / -1; }
  .section { padding-top: 36px; }
  .card { padding: var(--s-4); }
  .name-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--s-4); }
}

/* Header search: icon-only location button so the input keeps its width */
.compact .btn.locate { width: 42px; padding: 0; }
.compact .btn.locate .label-long, .compact .btn.locate .label-short { display: none; }
.surah-nav-link { display: inline-flex; align-items: center; gap: var(--s-2); }
.surah-nav-link .flip { display: inline-flex; transform: scaleX(-1); }

/* Homepage: explore rows with live values, two-column surah/dua lists */
.explore-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--s-6); border-top: 1px solid var(--line); }
.explore-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--s-4); padding: var(--s-4) var(--s-1); border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.explore-name { font-weight: 700; }
.explore-value { color: var(--muted); font-size: .9rem; text-align: right; }
.explore-row .icon { color: var(--muted); transition: transform .18s var(--ease), color .18s var(--ease); }
.explore-row:hover .explore-name, .explore-row:hover .icon { color: var(--accent); }
.explore-row:hover .icon { transform: translateX(3px); }
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--s-6); }
.link-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-1); }
.link-list li { padding: var(--s-2) 0; border-bottom: 1px solid var(--line); }
.link-list a { font-weight: 700; color: var(--ink); text-decoration: none; }
.link-list a:hover { color: var(--accent); }
@media (max-width: 760px) {
  .explore-list, .split { grid-template-columns: minmax(0, 1fr); }
  .explore-row { grid-template-columns: 1fr auto; row-gap: 2px; }
  .explore-value { grid-column: 1; grid-row: 2; text-align: left; }
  .explore-row .icon { grid-row: 1 / span 2; grid-column: 2; }
}

/* Surah facts box, themes, sourced virtues */
.surah-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 0; max-width: 860px; margin: var(--s-4) auto 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.surah-facts > div { padding: var(--s-3) var(--s-4); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-right: -1px; margin-bottom: -1px; }
.surah-facts dt { font-size: .75rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.surah-facts dd { margin: 2px 0 0; font-weight: 800; }
.surah-intro { max-width: 66ch; margin: var(--s-5) auto 0; }
.sajda-mark { color: var(--accent); font-weight: 700; }
.theme-list { display: grid; gap: var(--s-4); max-width: 860px; }
.theme h3 { font-size: 1.05rem; margin-bottom: var(--s-1); }
.theme p { color: var(--muted); }
.source-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-4); max-width: 860px; }
.source-list li { padding-bottom: var(--s-4); border-bottom: 1px solid var(--line); }
.source-line { margin-top: var(--s-1); font-size: .85rem; font-weight: 700; color: var(--accent); }
.weak-note { margin-top: var(--s-5); max-width: 860px; background: var(--warn-soft); }
.weak-note h3 { color: var(--warn); }
.weak-note ul { margin: var(--s-2) 0 0; padding-left: var(--s-5); display: grid; gap: var(--s-2); }

/* Dua hub rows and single dua page */
.dua-index { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--s-6); }
.dua-index li { border-bottom: 1px solid var(--line); scroll-margin-top: var(--s-5); }
.dua-index-row { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; column-gap: var(--s-3); padding: var(--s-3) var(--s-1); color: var(--ink); text-decoration: none; }
.dua-index-name { font-weight: 800; }
.dua-index-row .muted { grid-column: 1; }
.dua-index-row .icon { grid-column: 2; grid-row: 1 / span 2; align-self: center; color: var(--muted); transition: transform .18s var(--ease), color .18s var(--ease); }
.dua-index-row:hover .dua-index-name, .dua-index-row:hover .icon { color: var(--accent); }
.dua-index-row:hover .icon { transform: translateX(3px); }
.dua-single { max-width: 820px; margin-left: auto; margin-right: auto; padding: var(--s-4) var(--s-6) var(--s-6); gap: var(--s-4); }
.dua-single .dua-ar { font-size: clamp(1.7rem, 4vw, 2.1rem); line-height: 2.2; }
.dua-single .dua-source { padding-top: var(--s-3); border-top: 1px solid var(--line); }
.dua-urdu { font-family: "Amiri Quran", serif; /* Phase 2 adds a Nastaliq face with the Urdu text */ font-size: 1.35rem; line-height: 2.3; text-align: right; }
@media (max-width: 760px) { .dua-index { grid-template-columns: 1fr; } .dua-single { padding: var(--s-4); } }

/* Ramadan city timetable */
.ramadan-table .ashra-row td { background: var(--surface-2); font-weight: 800; color: var(--accent); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }

/* Print: a clean A4 timetable */
@media print {
  .masthead, .site-footer, .crumbs, .no-print, .faq, .section-title + .faq, .note-line.no-print { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .container { max-width: none; padding: 0; }
  main .section { padding-top: 12pt; content-visibility: visible; }
  .table-scroll { border: 0; overflow: visible; }
  .month th, .month td { padding: 3pt 6pt; border-bottom: 1px solid #bbb; }
  .month thead th { position: static; background: #eee; color: #000; }
  .month, .month tbody tr:nth-child(even), .month tr.is-today td { background: #fff; color: #000; }
  .month tr.is-today td:first-child { box-shadow: none; }
  a { color: #000; text-decoration: none; }
  .page-head h1 { font-size: 18pt; }
}

/* ---------- Arch: the mihrab niche. A pointed four-centred arch caps prayer and countdown cards ---------- */
.arch { --ah: var(--ah-lg); --arch-bg: var(--surface); --arch-line: var(--arch-ink);
  position: relative; margin-top: calc(var(--ah) + 10px); padding-top: var(--s-2); background: var(--arch-bg); border-color: var(--arch-line);
  border-top: 0; border-radius: 0 0 var(--radius) var(--radius); transition: border-color .2s var(--ease); }
.arch-sm { --ah: var(--ah-sm); }
.section-title + .arch, .section-lead + .arch { margin-top: calc(var(--ah) + var(--s-5)); }
.arch-xl { --ah: var(--ah-xl); }
.arch-cap { position: absolute; left: -.5px; top: calc(-1 * var(--ah)); width: calc(100% + 1px); height: calc(var(--ah) + 1px); overflow: visible; pointer-events: none; }
.arch-cap .fill { fill: var(--arch-bg); }
.arch-cap .line { fill: none; stroke: var(--arch-line); stroke-width: 1; vector-effect: non-scaling-stroke; transition: stroke .2s var(--ease); }
.arch-finial { position: absolute; left: 50%; top: calc(-1 * var(--ah) - 9px); width: 18px; height: 18px; margin-left: -9px; background: var(--accent);
  -webkit-mask: var(--star) center / contain no-repeat; mask: var(--star) center / contain no-repeat; transition: transform .4s var(--ease); }

/* ---------- Day arc: the sun's path from Fajr to Isha, with now and the next prayer marked ---------- */
.day-arc { display: block; width: 100%; height: auto; margin: var(--s-2) 0 var(--s-3); overflow: visible; }
.arc-horizon { stroke: var(--line); stroke-width: 1; }
.arc-grad-top { stop-color: var(--g-500); stop-opacity: .2; }
.arc-grad-bottom { stop-color: var(--g-500); stop-opacity: 0; }
.arc-path { fill: none; stroke: var(--muted); stroke-opacity: .5; stroke-width: 1.5; stroke-dasharray: 2 5; stroke-linecap: round; }
.arc-done { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 1 1; stroke-dashoffset: 1; opacity: 0; }
.day-arc.is-live .arc-done { opacity: 1; animation: arc-draw 1s var(--ease) .1s forwards; }
.arc-dot { fill: var(--surface); stroke: var(--muted); stroke-width: 1.5; transform-box: fill-box; transform-origin: center;
  transition: fill .3s var(--ease), stroke .3s var(--ease), stroke-width .3s var(--ease), transform .3s var(--ease); }
.arc-dot.is-next { fill: var(--surface); stroke: var(--accent); stroke-width: 3; }
.arc-dot.is-past { fill: var(--accent); stroke: var(--accent); }
.arc-dot.is-hover { stroke: var(--accent); stroke-width: 2.5; transform: scale(1.5); }
.arc-sun { opacity: 0; }
.day-arc.is-live .arc-sun { opacity: 1; transition: opacity .35s var(--ease) .45s; }
.arc-sun-glow { fill: #ffda42; opacity: .3; }
.arc-sun-star { fill: #ffd32e; stroke: #846718; stroke-width: 1.25; }
.arc-label { font: 700 12px var(--font); fill: var(--muted); letter-spacing: .05em; text-transform: uppercase; }
@keyframes arc-draw { to { stroke-dashoffset: 0; } }
.today .times tr.is-hover th, .today .times tr.is-hover td { color: var(--accent); }

/* ---------- Day track on city cards: where today stands between the five prayers ---------- */
.day-track { position: relative; display: block; height: 2px; margin: var(--s-3) 10% var(--s-1); border-radius: 2px; background: var(--line); }
.day-track i { position: absolute; left: 0; top: 0; bottom: 0; width: var(--p, 0%); border-radius: inherit; background: var(--accent); transition: width .9s var(--ease); }
.day-track b { position: absolute; top: 50%; left: var(--p, 0%); width: 12px; height: 12px; margin: -6px 0 0 -6px; background: var(--accent);
  -webkit-mask: var(--star) center / contain no-repeat; mask: var(--star) center / contain no-repeat; transition: left .9s var(--ease); }
.day-track:not([style]) b { display: none; }

/* ---------- Motion: one authored entrance per page, numbers that roll, lists that rise as they arrive ---------- */
.roll { animation: roll-in .32s var(--ease) both; }
.ramadan-num { position: relative; overflow: hidden; }
.next-in { position: relative; }
.roll-out { position: absolute; left: 0; right: 0; top: 0; white-space: nowrap; pointer-events: none; animation: roll-out .32s var(--ease) both; }
@keyframes roll-out { to { opacity: 0; transform: translateY(45%); } }
@keyframes roll-in { from { opacity: 0; transform: translateY(-45%); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.compass-turn { transform: rotate(var(--bearing)); transform-origin: 50px 50px; }
/* Set by app.js only on items still below the fold, so nothing is ever hidden without the script */
.reveal-pre { opacity: 0; transform: translateY(18px); }
.reveal-in { animation: rise .5s var(--ease) both; }
.compass-turn.swing-pre { transform: rotate(0deg); }
.compass-turn.swing-in { animation: needle 1.3s var(--ease) both; }
@keyframes needle { from { transform: rotate(0deg); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .day-arc.is-live .arc-done { stroke-dashoffset: 0; }
  .roll { animation: none !important; }
}

@media (max-width: 760px) {
  :root { --ah-lg: 16px; --ah-xl: 24px; }
  .ref-single { padding: var(--s-3) var(--s-4) var(--s-5); }
  .ref-search .btn { padding: 0 var(--s-4); }
  .event-facts { gap: var(--s-2); }
  .event-facts dd { font-size: .9rem; }
  .side-stack { display: contents; }
  .side-stack > .next-card { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; gap: 8px; order: -1; }
  .next-card .card-title, .next-card .next-then { grid-column: 1 / -1; margin: 0; text-align: left; }
  .next-card .next-big { justify-content: flex-start; text-align: left; margin: 0; }
  .next-card .next-clock { gap: 0; margin: 0; }
  .next-clock .ramadan-num { font-size: 1.3rem; }
  .next-clock .ramadan-unit { padding-block: 4px; }
  .today .day-arc { order: 1; max-height: 126px; margin-bottom: 0; }
  .faq-item summary { padding-inline: var(--s-2); }
  .faq-item p { padding-inline: var(--s-2); }
  .masthead.has-hero::after { opacity: .07; }
}
@media print { .arch-cap, .arch-finial, .day-arc, .day-track, .site-footer::before, .masthead::after { display: none; } .arch { margin-top: 0; border-top: 1px solid #bbb; border-radius: 0; } }

/* Capture mode (FORCE_STATIC=1, screenshots only): every section drawn, motion settled at its end state */
[data-static] *, [data-static] *::before, [data-static] *::after { animation: none !important; transition: none !important; }
[data-static] .section, [data-static] .letter-group, [data-static] .ayah, [data-static] .surah-grid, [data-static] .dua { content-visibility: visible !important; }
[data-static] .day-arc.is-live .arc-done { stroke-dashoffset: 0; }
