/* Daleel Al-Yawm — design tokens */
:root {
  --bg: #F7F5F0;
  --bg-2: #EEEAE1;
  --surface: #FFFFFF;
  --ink: #12201E;
  --ink-2: #3F4D4B;
  --muted: #687573;
  --line: #E6E1D6;
  --footer: #0B2F2B;
  --footer-ink: #D5E4E0;
  --brand: #0E5E57;
  --brand-2: #0A4842;
  --brand-ink: #FFFFFF;
  --gold: #C8962E;
  --gold-2: #E9C46A;
  --soft: #E3EFEC;
  --danger: #B3261E;
  --ok: #1E7B4A;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(14, 40, 38, .05), 0 4px 16px rgba(14, 40, 38, .05);
  --shadow-lg: 0 2px 4px rgba(14, 40, 38, .05), 0 16px 40px rgba(14, 40, 38, .10);
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%23C8962E' stroke-opacity='.16' stroke-width='1'%3E%3Crect x='14' y='14' width='28' height='28'/%3E%3Crect x='14' y='14' width='28' height='28' transform='rotate(45 28 28)'/%3E%3Ccircle cx='28' cy='28' r='6'/%3E%3C/g%3E%3C/svg%3E");
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B1312; --bg-2: #101C1B; --surface: #13201F; --ink: #EAF2EF; --ink-2: #BCCBC7; --muted: #8A9C98;
    --line: #223634; --brand: #2BA394; --brand-2: #3CC0AF; --brand-ink: #04201C; --soft: #17302D;
    --footer: #07100F; --footer-ink: #A9BDB8;
    --shadow: 0 1px 2px rgba(0,0,0,.35), 0 4px 16px rgba(0,0,0,.2); --shadow-lg: 0 2px 4px rgba(0,0,0,.3), 0 16px 40px rgba(0,0,0,.35); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0B1312; --bg-2: #101C1B; --surface: #13201F; --ink: #EAF2EF; --ink-2: #BCCBC7; --muted: #8A9C98;
  --line: #223634; --brand: #2BA394; --brand-2: #3CC0AF; --brand-ink: #04201C; --soft: #17302D;
  --footer: #07100F; --footer-ink: #A9BDB8;
  --shadow: 0 1px 2px rgba(0,0,0,.35), 0 4px 16px rgba(0,0,0,.2); --shadow-lg: 0 2px 4px rgba(0,0,0,.3), 0 16px 40px rgba(0,0,0,.35); color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, sans-serif; background: var(--bg); color: var(--ink); line-height: 1.7; font-size: 16px; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; }
h1, h2, h3 { line-height: 1.35; margin: 0 0 .5em; }
h1 { font-size: clamp(1.6rem, 4vw, 2.3rem); font-weight: 700; }
h2 { font-size: clamp(1.25rem, 3vw, 1.55rem); font-weight: 600; }
h3 { font-size: 1.1rem; font-weight: 600; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.skip { position: absolute; top: -40px; inset-inline-start: 8px; background: var(--brand); color: var(--brand-ink); padding: 6px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { top: 8px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
.num { font-variant-numeric: tabular-nums; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; gap: 16px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.logo-mark { width: 42px; height: 42px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 1.25rem; font-weight: 700; color: var(--brand); }
.brand-text small { font-size: .72rem; color: var(--muted); }
.nav { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }
.nav > a, .dd-btn { color: var(--ink-2); padding: 8px 12px; border-radius: 10px; font: inherit; font-size: .95rem; background: none; border: 0; cursor: pointer; }
.nav > a:hover, .dd-btn:hover { background: var(--soft); color: var(--brand); text-decoration: none; }
.nav > a.active, .dd-btn.active { color: var(--brand); font-weight: 600; }
.nav-sep { width: 1px; height: 24px; background: var(--line); margin: 0 6px; }
.dropdown { position: relative; }
.chev { font-size: .7em; }
.dd-menu { display: none; position: absolute; inset-inline-start: 0; top: 100%; min-width: 210px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 6px; }
.dd-menu a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--ink); }
.dd-menu a:hover { background: var(--soft); text-decoration: none; }
.dropdown:hover .dd-menu, .dropdown.open .dd-menu { display: block; }
.theme-btn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; font-size: 1.1rem; }
.menu-btn { display: none; margin-inline-start: auto; width: 44px; height: 44px; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; cursor: pointer; padding: 10px; flex-direction: column; justify-content: space-between; }
.menu-btn span { display: block; height: 2px; background: var(--ink); border-radius: 2px; }
@media (max-width: 920px) {
  .menu-btn { display: flex; }
  .nav { display: none; position: absolute; top: 68px; inset-inline: 0; flex-direction: column; align-items: stretch; background: var(--surface); border-bottom: 1px solid var(--line); padding: 10px 16px 16px; gap: 2px; box-shadow: var(--shadow); max-height: calc(100vh - 68px); overflow: auto; }
  .nav.open { display: flex; }
  .dd-menu { position: static; box-shadow: none; border: 0; padding: 0 12px 0 0; }
  .dropdown:hover .dd-menu { display: none; }
  .dropdown.open .dd-menu { display: block; }
  .nav-sep { display: none; }
  .nav .btn { margin-top: 6px; text-align: center; }
  .theme-btn { align-self: flex-start; }
}

/* Buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--brand); color: var(--brand-ink); border: 1px solid var(--brand); padding: 11px 20px; border-radius: 12px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none !important; transition: background .15s, transform .05s; }
.btn:hover { background: var(--brand-2); }
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 7px 14px; font-size: .9rem; }
.btn-ghost { background: transparent; color: var(--brand); }
.btn-ghost:hover { background: var(--soft); }
.btn-gold { background: var(--gold); border-color: var(--gold); color: #1d1606; }
.btn-gold:hover { background: var(--gold-2); }
.btn-danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
label { display: block; font-weight: 500; margin-bottom: 6px; font-size: .95rem; }
input, select, textarea { width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: 0; border-color: var(--brand); }
textarea { min-height: 200px; resize: vertical; line-height: 1.9; font-size: 1.1rem; }
.field { margin-bottom: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 640px) { .grid-2 { grid-template-columns: 1fr; } }
.alert { padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; background: var(--soft); border: 1px solid var(--line); }
.alert-error { background: color-mix(in srgb, var(--danger) 10%, var(--surface)); border-color: color-mix(in srgb, var(--danger) 35%, transparent); color: var(--danger); }
.alert-ok { background: color-mix(in srgb, var(--ok) 10%, var(--surface)); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }

/* Layout pieces */
.hero { background: var(--brand); background-image: var(--pattern), linear-gradient(160deg, #0E5E57 0%, #0A4842 100%); color: #fff; padding: 40px 0 92px; }
.hero h1 { color: #fff; }
.hero .muted, .hero p { color: rgba(255,255,255,.82); }
.hero-pull { margin-top: -64px; }
.page-head { padding: 34px 0 10px; }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 8px; }
.crumbs a { color: var(--muted); }
.section { padding: 26px 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.card + .card { margin-top: 16px; }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.card-title h2, .card-title h3 { margin: 0; }
.cols { display: grid; grid-template-columns: 1.15fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 860px) { .cols { grid-template-columns: 1fr; } }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; background: var(--soft); color: var(--brand); font-size: .85rem; font-weight: 500; }
.chip-gold { background: color-mix(in srgb, var(--gold) 18%, var(--surface)); color: #8a6214; }
[data-theme="dark"] .chip-gold { color: var(--gold-2); }

/* Today card */
.today-card { text-align: center; padding: 30px 22px; position: relative; overflow: hidden; }
.today-card::before { content: ''; position: absolute; inset: 0; background: var(--pattern); opacity: .7; pointer-events: none; }
.today-card > * { position: relative; }
.today-day { font-size: 1.1rem; color: var(--muted); }
.today-hijri { font-size: clamp(2rem, 6.5vw, 3.4rem); font-weight: 700; color: var(--brand); line-height: 1.2; margin: 6px 0; }
.today-greg { font-size: 1.2rem; color: var(--ink-2); }
.today-actions { margin-top: 16px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

/* Prayer list */
.prayers { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
@media (max-width: 760px) { .prayers { grid-template-columns: repeat(3, 1fr); } }
.prayer { background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 12px 8px; text-align: center; }
.prayer .p-name { font-size: .9rem; color: var(--muted); }
.prayer .p-time { font-size: 1.25rem; font-weight: 600; }
.prayer.next { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.prayer.next .p-name { color: inherit; opacity: .85; }
.prayer.sunrise { opacity: .78; }
.next-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: var(--soft); border-radius: 14px; padding: 12px 16px; margin-bottom: 14px; }
.countdown { font-size: 1.6rem; font-weight: 700; color: var(--brand); letter-spacing: 1px; }
.city-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.city-picker { position: relative; }
.city-results { position: absolute; inset-inline: 0; top: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); max-height: 280px; overflow: auto; z-index: 20; display: none; }
.city-results.show { display: block; }
.city-results button { display: block; width: 100%; text-align: start; padding: 9px 14px; background: none; border: 0; font: inherit; color: var(--ink); cursor: pointer; }
.city-results button:hover, .city-results button:focus { background: var(--soft); }

/* Tools grid */
.tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.tool { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; color: var(--ink); transition: transform .12s, box-shadow .12s, border-color .12s; }
.tool:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--brand); }
.tool .t-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--soft); color: var(--brand); font-size: 1.4rem; margin-bottom: 10px; }
.tool h3 { margin-bottom: 4px; }
.tool p { margin: 0; color: var(--muted); font-size: .92rem; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { padding: 10px 12px; text-align: center; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { background: var(--bg-2); font-weight: 600; position: sticky; top: 0; }
tr.is-today td { background: var(--soft); font-weight: 600; }
tbody tr:last-child td { border-bottom: 0; }

/* City lists */
.city-group { margin-bottom: 20px; }
.city-links { display: flex; flex-wrap: wrap; gap: 8px; }
.city-links a { padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font-size: .93rem; }
.city-links a:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }

/* Qibla */
.compass-wrap { display: grid; place-items: center; padding: 10px 0; }
.compass { width: min(320px, 82vw); aspect-ratio: 1; position: relative; }
.compass-dial { position: absolute; inset: 0; transition: transform .15s linear; }
.compass-center { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.qibla-deg { font-size: 2.6rem; font-weight: 700; color: var(--brand); text-align: center; }
.aligned .compass-dial circle.ring { stroke: var(--ok); }
.status-line { text-align: center; min-height: 1.7em; }
.facing-badge { display: none; }
.aligned .facing-badge { display: inline-flex; }

/* Calendar */
.cal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.month { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.month h3 { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.month h3 small { font-weight: 400; color: var(--muted); font-size: .8rem; }
.days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; text-align: center; }
.days .dn { font-size: .72rem; color: var(--muted); padding: 2px 0; }
.days .d { border-radius: 8px; padding: 4px 0 2px; font-size: .95rem; line-height: 1.15; }
.days .d small { display: block; font-size: .66rem; color: var(--muted); }
.days .d.today { background: var(--brand); color: var(--brand-ink); }
.days .d.today small { color: inherit; opacity: .85; }
.days .d.event { background: color-mix(in srgb, var(--gold) 22%, var(--surface)); }
.events { font-size: .82rem; margin-top: 8px; color: var(--ink-2); }

/* Text tools */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.stat { background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 12px; text-align: center; }
.stat b { display: block; font-size: 1.6rem; color: var(--brand); line-height: 1.2; }
.stat span { font-size: .85rem; color: var(--muted); }
.harakat { display: flex; flex-wrap: wrap; gap: 6px; }
.harakat button { min-width: 54px; height: 54px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 1.6rem; cursor: pointer; line-height: 1; }
.harakat button small { display: block; font-size: .62rem; color: var(--muted); margin-top: 2px; }
.harakat button:hover { border-color: var(--brand); background: var(--soft); }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 999px; opacity: 0; transition: .2s; z-index: 90; pointer-events: none; }
.toast.show { opacity: 1; transform: translateX(-50%); }

/* Result boxes */
.result { background: var(--soft); border-radius: 16px; padding: 18px; text-align: center; margin-top: 16px; }
.result .big { font-size: clamp(1.4rem, 4vw, 2rem); font-weight: 700; color: var(--brand); }
.tabs { display: inline-flex; background: var(--bg-2); border-radius: 12px; padding: 4px; gap: 4px; margin-bottom: 16px; }
.tabs button { border: 0; background: none; font: inherit; padding: 8px 16px; border-radius: 9px; cursor: pointer; color: var(--ink-2); }
.tabs button.on { background: var(--surface); color: var(--brand); font-weight: 600; box-shadow: var(--shadow); }

/* FAQ / prose */
.prose p, .prose li { color: var(--ink-2); }
details { border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; background: var(--surface); margin-bottom: 8px; }
summary { cursor: pointer; font-weight: 600; }

/* Auth */
.auth-box { max-width: 460px; margin: 30px auto; }

/* Footer */
.site-footer { margin-top: 40px; background: var(--surface); border-top: 1px solid var(--line); padding: 34px 0 18px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 24px; }
.footer-grid a:not(.brand) { display: block; color: var(--ink-2); padding: 3px 0; font-size: .93rem; }
.footer-grid h3 { font-size: 1rem; }
.footer-bottom { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 14px; font-size: .85rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > div:first-child { grid-column: 1 / -1; } }

@media print {
  .site-header, .site-footer, .no-print { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; }
}
.prayer .p-time { white-space: nowrap; font-size: 1.12rem; }
@media (max-width: 640px) { .hero { padding: 22px 0 80px; } .hero p { font-size: .95rem; } }


/* ===== Professional refinement layer ===== */
h1, h2, h3, .brand-text strong, .today-hijri, .countdown, .p-time, .qibla-deg, .stat b, .result .big, .btn { font-family: 'Readex Pro', 'IBM Plex Sans Arabic', 'Segoe UI', sans-serif; }
h1, h2 { text-wrap: balance; letter-spacing: -.01em; }
.ic { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; }
.btn .ic { width: 1.05em; height: 1.05em; }

/* Header */
.site-header { background: color-mix(in srgb, var(--surface) 88%, transparent); }
.header-row { min-height: 72px; }
.nav > a, .dd-btn { font-weight: 500; position: relative; display: inline-flex; align-items: center; gap: 4px; }
.nav > a.active::after, .dd-btn.active::after { content: ''; position: absolute; inset-inline: 12px; bottom: 2px; height: 2px; border-radius: 2px; background: var(--gold); }
.chev { width: 14px; height: 14px; opacity: .7; }
.dd-menu { padding: 8px; border-radius: 12px; box-shadow: var(--shadow-lg); }
.theme-btn { display: grid; place-items: center; color: var(--ink-2); }
.theme-btn .ic { width: 18px; height: 18px; }
.theme-btn .i-sun { display: none; }
:root[data-theme="dark"] .theme-btn .i-sun { display: block; }
:root[data-theme="dark"] .theme-btn .i-moon { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .theme-btn .i-sun { display: block; } :root:not([data-theme="light"]) .theme-btn .i-moon { display: none; } }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 56px 0 120px; background-image: var(--pattern), radial-gradient(900px 400px at 15% -10%, rgba(233,196,106,.18), transparent 60%), linear-gradient(160deg, #0F6A62 0%, #0A4440 100%); }
.hero::after { content: ''; position: absolute; inset-inline-start: -80px; top: -60px; width: 380px; height: 380px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cg fill='none' stroke='%23E9C46A' stroke-opacity='.22' stroke-width='.6'%3E%3Crect x='10' y='10' width='44' height='44' rx='4'/%3E%3Crect x='10' y='10' width='44' height='44' rx='4' transform='rotate(45 32 32)'/%3E%3Ccircle cx='32' cy='32' r='15'/%3E%3Ccircle cx='32' cy='32' r='9'/%3E%3C/g%3E%3C/svg%3E") no-repeat center / contain; pointer-events: none; }
.hero .wrap { position: relative; z-index: 1; }
.hero h1 { font-size: clamp(1.8rem, 4.6vw, 2.8rem); margin: 14px 0 10px; max-width: 18ch; }
.hero .lead { font-size: 1.12rem; max-width: 56ch; color: rgba(255,255,255,.86); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: rgba(255,255,255,.1); border: 1px solid rgba(233,196,106,.35); color: #F3DFA8; font-size: .88rem; font-weight: 500; }
.trust { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 24px; margin: 22px 0 0; padding: 0; color: rgba(255,255,255,.9); font-size: .93rem; }
.trust li { display: inline-flex; align-items: center; gap: 8px; }
.trust .ic { color: var(--gold-2); }
.hero-pull { margin-top: -78px; position: relative; z-index: 2; }
@media (max-width: 640px) { .hero { padding: 32px 0 100px; } .hero .lead { font-size: 1rem; } .trust { gap: 8px 16px; font-size: .86rem; } }

/* Cards */
.card { box-shadow: var(--shadow); }
.hero-pull .card { box-shadow: var(--shadow-lg); }
.today-card { padding: 34px 24px; }
.today-card::before { opacity: .45; }
.today-day { font-size: 1rem; font-weight: 500; letter-spacing: .01em; }
.today-hijri { margin: 10px 0 8px; }
.today-greg { padding-top: 10px; border-top: 1px dashed var(--line); display: inline-block; padding-inline: 18px; }
.today-actions .btn-ghost { border-color: var(--line); }
.ramadan-note { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 22px 0 0; padding: 10px 14px; border-radius: 12px; background: color-mix(in srgb, var(--gold) 12%, var(--surface)); color: var(--ink-2); font-size: .93rem; }
.ramadan-note .ic { color: var(--gold); }

/* Prayer widget */
.card-title h2 { font-size: 1.3rem; }
.next-bar { background: linear-gradient(90deg, var(--soft), color-mix(in srgb, var(--soft) 40%, var(--surface))); border: 1px solid color-mix(in srgb, var(--brand) 18%, transparent); padding: 14px 18px; }
.next-label { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 50%, transparent); animation: pulse 2s infinite; flex: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } }
.countdown { font-size: 1.75rem; letter-spacing: .04em; }
.prayer { background: var(--surface); padding: 14px 6px 12px; display: flex; flex-direction: column; align-items: center; gap: 2px; transition: border-color .15s; position: relative; }
.prayer .p-ic { color: var(--gold); display: grid; place-items: center; margin-bottom: 2px; }
.prayer .p-ic .ic { width: 22px; height: 22px; }
.prayer .p-name { font-weight: 500; font-size: .88rem; }
.prayer.next { background: linear-gradient(165deg, var(--brand) 0%, var(--brand-2) 100%); box-shadow: 0 8px 20px color-mix(in srgb, var(--brand) 30%, transparent); }
.prayer.next .p-ic { color: var(--gold-2); }
.prayer.next::before { content: 'التالية'; position: absolute; top: -9px; inset-inline-start: 50%; transform: translateX(50%); background: var(--gold); color: #1d1606; font-size: .68rem; font-weight: 600; padding: 1px 8px; border-radius: 999px; line-height: 1.5; }
.prayer.sunrise { opacity: 1; background: var(--bg); }
.prayer.sunrise .p-time { color: var(--muted); }
.prayers { gap: 10px; padding-top: 6px; }
.qibla-line { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: .9rem; color: var(--muted); }
.qibla-line .ic { color: var(--gold); }

/* Section heads */
.sec-head { display: flex; align-items: end; justify-content: space-between; gap: 8px 20px; flex-wrap: wrap; margin-bottom: 18px; }
.sec-head h2 { margin: 0; position: relative; padding-bottom: 8px; }
.sec-head h2::after { content: ''; position: absolute; inset-inline-start: 0; bottom: 0; width: 44px; height: 3px; border-radius: 3px; background: var(--gold); }
.sec-head p { margin: 0; }
.section { padding: 36px 0; }

/* Tool cards */
.tools { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.tool { display: flex; flex-direction: column; padding: 22px; box-shadow: var(--shadow); }
.tool:hover { box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); transform: translateY(-3px); }
.tool .t-icon { width: 48px; height: 48px; border-radius: 12px; background: linear-gradient(150deg, var(--soft), color-mix(in srgb, var(--gold) 14%, var(--soft))); margin-bottom: 14px; }
.tool .t-icon .ic { width: 24px; height: 24px; }
.tool h3 { font-size: 1.08rem; }
.tool p { flex: 1; }
.tool .t-go { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; font-size: .88rem; font-weight: 600; color: var(--brand); }
.tool .t-go .ic { transition: transform .15s; }
.tool:hover .t-go .ic { transform: translateX(-4px); }
[dir="ltr"] .tool .t-go .ic { transform: scaleX(-1); }

/* City pills, tables, details */
.city-links a { transition: border-color .15s, background .15s; }
.city-links a:hover { background: var(--soft); }
th { font-size: .88rem; color: var(--ink-2); }
details { transition: border-color .15s; }
details[open] { border-color: color-mix(in srgb, var(--brand) 30%, var(--line)); }
summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; font-size: 1.3rem; line-height: 1; color: var(--brand); font-weight: 400; }
details[open] summary::after { content: '−'; }
details[open] summary { margin-bottom: 6px; }
.ev-star { color: var(--gold); }
.page-head { padding: 40px 0 14px; }
.page-head h1 { margin-bottom: 8px; }
.facing-badge .ic { color: var(--ok); }

/* Footer */
.site-footer { background: var(--footer); color: var(--footer-ink); border-top: 3px solid var(--gold); padding: 44px 0 20px; margin-top: 56px; }
.site-footer .muted, .site-footer p { color: color-mix(in srgb, var(--footer-ink) 80%, transparent); }
.site-footer .brand-text strong { color: #fff; }
.site-footer .brand-text small { color: var(--footer-ink); }
.footer-grid h3 { color: #fff; font-size: .95rem; margin-bottom: 12px; }
.footer-grid a:not(.brand) { color: var(--footer-ink); }
.footer-grid a:not(.brand):hover { color: var(--gold-2); text-decoration: none; }
.footer-bottom { border-top-color: rgba(255,255,255,.1); margin-top: 28px; }

/* Fix: equal card tops inside grids, balanced tool grid, tighter section rhythm */
.grid-2 > .card + .card, .cols > .card + .card, .cols > section + section { margin-top: 0; }
.grid-2 { align-items: stretch; }
.tools { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) { .tools { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .tools { grid-template-columns: 1fr; } }
.section { padding: 28px 0; }
.section + .section { padding-top: 8px; }
.city-hint { display: flex; align-items: center; gap: 8px; margin: 14px 0 0; padding: 10px 14px; border-radius: 12px; background: color-mix(in srgb, var(--gold) 12%, var(--surface)); color: var(--ink-2); font-size: .9rem; }
.city-hint[hidden] { display: none; }
.city-hint .ic { color: var(--gold); }
[hidden] { display: none !important; }
/* QA fixes: footer sits at the bottom on short pages; month tables fit phone screens */
body { display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1 0 auto; }
@media (max-width: 560px) {
  table { font-size: .78rem; }
  th, td { padding: 8px 3px; }
  th { font-size: .74rem; }
}
@media (max-width: 560px) {
  .card { padding: 16px; }
  .card > .table-wrap { margin-inline: -15px; border-radius: 0; border-inline: 0; }
}

/* Ad slots (Google AdSense) — reserved height avoids layout shift */
.ad-slot { margin: 22px auto; max-width: 970px; text-align: center; min-height: 120px; }
.ad-label { display: block; font-size: .7rem; letter-spacing: .08em; color: var(--muted); margin-bottom: 4px; }
.ad-box { display: grid; place-items: center; min-height: 100px; border: 1px dashed var(--line); border-radius: 12px; background: var(--bg-2); color: var(--muted); font-size: .85rem; }
.contact-card { margin: 16px 0; }
@media (max-width: 560px) { .ad-slot { min-height: 100px; margin: 16px auto; } }

/* Install-app bar */
.install-bar { position: fixed; z-index: 80; inset-inline: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); max-width: 560px; margin-inline: auto; display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 12px 14px; }
.install-bar img { border-radius: 10px; flex: none; }
.ib-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.4; }
.ib-text strong { font-size: .95rem; }
.ib-text span { font-size: .82rem; color: var(--muted); }
.ib-close { background: none; border: 0; font-size: 1.4rem; line-height: 1; color: var(--muted); cursor: pointer; padding: 4px 6px; }
@media print { .install-bar { display: none !important; } }

/* Top location bar */
.loc-bar { background: var(--footer); color: var(--footer-ink); font-size: .84rem; }
.loc-row { display: flex; align-items: center; gap: 8px 18px; flex-wrap: wrap; padding-block: 7px; min-height: 38px; }
.loc-bar svg { width: 15px; height: 15px; flex: none; color: var(--gold-2); }
.loc-place, .loc-next { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.loc-place strong { color: #fff; font-weight: 600; }
.loc-label { opacity: .8; }
.loc-cd { opacity: .8; margin-inline-start: 4px; }
.loc-live { display: inline-flex; align-items: center; gap: 5px; margin-inline-start: 6px; font-size: .72rem; font-weight: 600; color: #8EE3C4; }
.loc-live i { width: 7px; height: 7px; border-radius: 50%; background: #3DDC97; animation: locpulse 1.8s infinite; }
@keyframes locpulse { 0% { box-shadow: 0 0 0 0 rgba(61,220,151,.55); } 70% { box-shadow: 0 0 0 7px rgba(61,220,151,0); } 100% { box-shadow: 0 0 0 0 rgba(61,220,151,0); } }
.loc-btn { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.08); color: #fff; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; padding: 4px 12px; font: inherit; font-size: .8rem; cursor: pointer; }
.loc-btn:hover { background: rgba(255,255,255,.16); }
.loc-btn:disabled { opacity: .6; cursor: wait; }
.loc-bar.loading strong { opacity: .6; }
@media (max-width: 560px) { .loc-row { gap: 4px 12px; font-size: .78rem; } .loc-label, .loc-cd { display: none; } .loc-btn span { display: none; } .loc-btn { padding: 5px 8px; } }
@media (prefers-reduced-motion: reduce) { .loc-live i { animation: none; } }
@media print { .loc-bar { display: none !important; } }

/* Direct-answer box (AEO) */
.answer { background: var(--soft); border-inline-start: 4px solid var(--brand); border-radius: 12px; padding: 12px 16px; margin: 12px 0 4px; color: var(--ink); line-height: 1.8; }
.answer p { margin: 0; }
.answer .answer-text { font-weight: 500; }
.answer .answer-meta { margin-top: 6px; font-size: .85rem; color: var(--muted); }
