/* ==========================================================================
   Muslim Ohio — design system
   Palette comes straight from the brand art: the logo's forest ink (#12362F)
   and the amber/ochre Ohio landscape. Cream paper instead of stark white.

   Legacy variable names (--primary-green, --accent-gold, ...) and legacy
   classes (.card-custom, .page-header, .dashboard-card, .sidebar, ...) are
   kept on purpose: the admin and owner dashboards still use them.
   ========================================================================== */

:root {
    /* Brand */
    --forest-950: #081c18;
    --forest-900: #0d2823;
    --forest: #12362f;
    --forest-700: #1b4a40;
    --forest-600: #245c4f;
    --forest-500: #2f7362;
    --sage: #9cbfae;
    --sage-100: #e5efe9;
    --amber: #e3a340;
    --amber-600: #c98424;
    --amber-700: #a86a16;
    --amber-100: #fbeed6;
    --clay: #b5652a;

    /* Surfaces */
    --paper: #fffdf8;
    --cream: #faf6ee;
    --sand: #f3ead9;
    --line: #e6dccb;
    --line-strong: #d6c8b0;

    /* Text */
    --ink: #17211e;
    --ink-soft: #3d4a45;
    --muted: #66736e;

    /* Type */
    --font-display: 'Outfit Variable', 'Outfit', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-body: 'Plus Jakarta Sans Variable', 'Plus Jakarta Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-arabic: 'Amiri', 'Traditional Arabic', 'Geeza Pro', serif;

    /* Shape */
    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 24px;
    --shadow-sm: 0 1px 2px rgba(18, 54, 47, .06), 0 1px 1px rgba(18, 54, 47, .04);
    --shadow: 0 6px 20px -8px rgba(18, 54, 47, .18), 0 2px 6px rgba(18, 54, 47, .05);
    --shadow-lg: 0 24px 48px -20px rgba(8, 28, 24, .35);

    /* The star-and-cross tiling, used as a quiet texture: eight-point stars, each one
       outline, touching point to point, the crosses the spaces between them
       (the geometry of js/home-houses.js; a 152-unit tile, drawn at 76px by default) */
    --pattern-amber: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='76' height='76' viewBox='0 0 152 152'%3E%3Cpath d='M76 22.3L91.7 38L114 38L114 60.3L129.7 76L114 91.7L114 114L91.7 114L76 129.7L60.3 114L38 114L38 91.7L22.3 76L38 60.3L38 38L60.3 38ZM0 -53.7L15.7 -38L38 -38L38 -15.7L53.7 0L38 15.7L38 38L15.7 38L0 53.7L-15.7 38L-38 38L-38 15.7L-53.7 0L-38 -15.7L-38 -38L-15.7 -38ZM152 -53.7L167.7 -38L190 -38L190 -15.7L205.7 0L190 15.7L190 38L167.7 38L152 53.7L136.3 38L114 38L114 15.7L98.3 0L114 -15.7L114 -38L136.3 -38ZM0 98.3L15.7 114L38 114L38 136.3L53.7 152L38 167.7L38 190L15.7 190L0 205.7L-15.7 190L-38 190L-38 167.7L-53.7 152L-38 136.3L-38 114L-15.7 114ZM152 98.3L167.7 114L190 114L190 136.3L205.7 152L190 167.7L190 190L167.7 190L152 205.7L136.3 190L114 190L114 167.7L98.3 152L114 136.3L114 114L136.3 114Z' fill='none' stroke='%23e3a340' stroke-width='1.8' stroke-linejoin='round'/%3E%3C/svg%3E");
    --pattern-forest: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='76' height='76' viewBox='0 0 152 152'%3E%3Cpath d='M76 22.3L91.7 38L114 38L114 60.3L129.7 76L114 91.7L114 114L91.7 114L76 129.7L60.3 114L38 114L38 91.7L22.3 76L38 60.3L38 38L60.3 38ZM0 -53.7L15.7 -38L38 -38L38 -15.7L53.7 0L38 15.7L38 38L15.7 38L0 53.7L-15.7 38L-38 38L-38 15.7L-53.7 0L-38 -15.7L-38 -38L-15.7 -38ZM152 -53.7L167.7 -38L190 -38L190 -15.7L205.7 0L190 15.7L190 38L167.7 38L152 53.7L136.3 38L114 38L114 15.7L98.3 0L114 -15.7L114 -38L136.3 -38ZM0 98.3L15.7 114L38 114L38 136.3L53.7 152L38 167.7L38 190L15.7 190L0 205.7L-15.7 190L-38 190L-38 167.7L-53.7 152L-38 136.3L-38 114L-15.7 114ZM152 98.3L167.7 114L190 114L190 136.3L205.7 152L190 167.7L190 190L167.7 190L152 205.7L136.3 190L114 190L114 167.7L98.3 152L114 136.3L114 114L136.3 114Z' fill='none' stroke='%2312362f' stroke-width='1.8' stroke-linejoin='round'/%3E%3C/svg%3E");

    /* Legacy aliases — do not remove, dashboards depend on them */
    --primary-green: var(--forest-600);
    --dark-green: var(--forest);
    --medium-green: var(--forest-500);
    --accent-gold: var(--amber);
    --cream-bg: var(--cream);
    --light-cream: var(--sand);
    --dark-text: var(--ink);
    --border-color: var(--line);

    /* Bootstrap hooks */
    --bs-body-font-family: var(--font-body);
    --bs-body-color: var(--ink);
    --bs-body-bg: var(--cream);
    --bs-link-color-rgb: 36, 92, 79;
    --bs-link-hover-color-rgb: 18, 54, 47;
    --bs-border-color: var(--line);
    --bs-success-rgb: 36, 92, 79;
    --bs-secondary-color: var(--muted);
}

/* ===== BASE ===== */
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

/* Cut off sideways overflow with `clip`, not `hidden`: `hidden` turns <body>
   into a scroll container, and that silently breaks every position: sticky
   inside it. Browsers without `clip` (Safari < 16, Chrome < 90) keep `hidden`,
   so nothing can scroll sideways there either; sticky just stays off for them. */
html, body {
    max-width: 100vw;
    overflow-x: clip;
}
@supports not (overflow: clip) {
    html, body { overflow-x: hidden; }
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--ink);
    background-color: var(--cream);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main { flex: 1 0 auto; }

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6, .display-font {
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: -0.015em;
    color: var(--forest);
    line-height: 1.15;
}

.text-muted { color: var(--muted) !important; }
.text-forest { color: var(--forest) !important; }
.text-amber { color: var(--amber-700) !important; }
.bg-cream { background: var(--cream) !important; }
.bg-sand { background: var(--sand) !important; }
.bg-paper { background: var(--paper) !important; }
.min-w-0 { min-width: 0; }
.arabic { font-family: var(--font-arabic); direction: rtl; unicode-bidi: isolate; }

::selection { background: var(--amber-100); color: var(--forest); }

*:focus-visible {
    outline: 3px solid var(--amber);
    outline-offset: 2px;
    border-radius: 6px;
}
*:focus:not(:focus-visible) { outline: none; }

.skip-link {
    position: absolute;
    left: 1rem;
    top: -100px;
    z-index: 2000;
    background: var(--forest);
    color: #fff;
    padding: .6rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
}
.skip-link:focus { top: 1rem; color: #fff; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ===== LINKS ===== */
a { color: var(--forest-600); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--forest); text-decoration: underline; text-underline-offset: 3px; }

a[target="_blank"]:not(.btn):not(.icon-link):not(.stretched-link)::after {
    content: '\2197';
    display: inline-block;
    margin-left: 0.2rem;
    font-size: 0.8em;
    opacity: 0.55;
}

.card a, .card-custom a, .mo-card a { text-decoration: none; }

/* ===== NAVBAR ===== */
.mo-nav {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: rgba(250, 246, 238, .88);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid var(--line);
    padding: .55rem 0;
}

.mo-brand {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    text-decoration: none !important;
    color: var(--forest) !important;
}
.mo-brand img { width: 38px; height: 38px; object-fit: contain; flex: 0 0 auto; }
.mo-brand-word {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.02rem;
    line-height: .95;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.mo-brand-word small {
    display: block;
    font-size: .98em;
}

.mo-nav .nav-link {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: .98rem;
    color: var(--ink-soft);
    padding: .5rem .85rem !important;
    border-radius: 999px;
    transition: background .15s ease, color .15s ease;
}
.mo-nav .nav-link:hover { color: var(--forest); background: var(--sand); text-decoration: none; }
.mo-nav .nav-link.active { color: var(--forest); background: var(--sand); font-weight: 600; }

.mo-nav .dropdown-menu {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: .4rem;
    background: var(--paper);
}
.mo-nav .dropdown-item {
    border-radius: var(--radius-sm);
    padding: .55rem .8rem;
    font-weight: 500;
}
.mo-nav .dropdown-item:hover, .mo-nav .dropdown-item:focus { background: var(--sand); color: var(--forest); }
.mo-nav .dropdown-item small { display: block; color: var(--muted); font-weight: 400; font-size: .8rem; }

.mo-nav .navbar-toggler {
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    padding: .4rem .6rem;
}
.mo-nav .navbar-toggler:focus { box-shadow: 0 0 0 3px var(--amber-100); }

@media (max-width: 991.98px) {
    .mo-nav .navbar-collapse {
        background: var(--paper);
        border: 1px solid var(--line);
        border-radius: var(--radius);
        padding: .75rem;
        margin-top: .6rem;
        box-shadow: var(--shadow);
    }
    .mo-nav .nav-link { border-radius: var(--radius-sm); }
    .mo-nav .nav-cta { margin-top: .5rem; }
    .mo-nav .nav-cta .btn { width: 100%; }
}
/* Eight top-menu links (Community joined Market) must fit the 960 px container
   between 992 and 1199 px without wrapping: tighten them only there. */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .mo-nav .nav-link { padding: .5rem .55rem !important; font-size: .94rem; }
}

/* Legacy navbar class (admin/owner pages render the same component) */
.navbar-custom { background: var(--cream); border-bottom: 1px solid var(--line); }
.navbar-logo { width: 36px; height: 36px; object-fit: contain; }

/* ===== BUTTONS ===== */
.btn {
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: .005em;
    border-radius: 999px;
    padding: .55rem 1.2rem;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.btn-sm { padding: .35rem .85rem; font-size: .85rem; }
.btn-lg { padding: .8rem 1.6rem; font-size: 1.05rem; }
.btn:active { transform: translateY(1px); }

.btn-success, .btn-forest {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--forest);
    --bs-btn-border-color: var(--forest);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--forest-700);
    --bs-btn-hover-border-color: var(--forest-700);
    --bs-btn-active-bg: var(--forest-900);
    --bs-btn-active-border-color: var(--forest-900);
    --bs-btn-disabled-bg: var(--forest-600);
    --bs-btn-disabled-border-color: var(--forest-600);
}

.btn-outline-success, .btn-outline-forest {
    --bs-btn-color: var(--forest);
    --bs-btn-border-color: var(--line-strong);
    --bs-btn-bg: transparent;
    --bs-btn-hover-color: var(--forest);
    --bs-btn-hover-bg: var(--sand);
    --bs-btn-hover-border-color: var(--forest-500);
    --bs-btn-active-color: var(--forest);
    --bs-btn-active-bg: var(--sand);
    --bs-btn-active-border-color: var(--forest);
}

.btn-amber {
    --bs-btn-color: var(--forest-950);
    --bs-btn-bg: var(--amber);
    --bs-btn-border-color: var(--amber);
    --bs-btn-hover-color: var(--forest-950);
    --bs-btn-hover-bg: #eab25a;
    --bs-btn-hover-border-color: #eab25a;
    --bs-btn-active-bg: var(--amber-600);
    --bs-btn-active-border-color: var(--amber-600);
    box-shadow: 0 6px 18px -8px rgba(201, 132, 36, .7);
}

.btn-light {
    --bs-btn-color: var(--forest);
    --bs-btn-bg: var(--paper);
    --bs-btn-border-color: var(--paper);
    --bs-btn-hover-bg: #fff;
    --bs-btn-hover-border-color: #fff;
    --bs-btn-hover-color: var(--forest);
}

.btn-outline-light {
    --bs-btn-color: #fff;
    --bs-btn-border-color: rgba(255, 255, 255, .45);
    --bs-btn-hover-bg: rgba(255, 255, 255, .12);
    --bs-btn-hover-border-color: #fff;
    --bs-btn-hover-color: #fff;
}

.btn-ghost {
    --bs-btn-color: var(--forest-600);
    --bs-btn-hover-color: var(--forest);
    --bs-btn-hover-bg: var(--sand);
    padding-left: .6rem;
    padding-right: .6rem;
}

.link-arrow {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--forest-600);
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    white-space: nowrap;
}
.link-arrow::after { content: '\2192'; transition: transform .15s ease; }
.link-arrow:hover { text-decoration: none; color: var(--forest); }
.link-arrow:hover::after { transform: translateX(3px); }

/* ===== PAGE HERO (list & info pages) ===== */
.page-header, .page-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background: radial-gradient(120% 140% at 100% 0%, var(--forest-700) 0%, var(--forest) 45%, var(--forest-900) 100%);
    color: #fff;
    padding: 3.25rem 0 3rem;
    margin-bottom: 0;
    text-align: left !important;
}
.page-header::before, .page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--pattern-amber);
    background-size: 76px 76px;
    opacity: .09;
    z-index: -1;
    -webkit-mask-image: linear-gradient(100deg, transparent 20%, #000 85%);
    mask-image: linear-gradient(100deg, transparent 20%, #000 85%);
}
.page-header h1, .page-hero h1 {
    color: #fff;
    font-size: clamp(2rem, 4.5vw, 3rem);
    font-weight: 650;
    margin-bottom: .5rem;
}
.page-header .lead, .page-hero .lead {
    color: rgba(255, 255, 255, .78);
    font-size: 1.1rem;
    max-width: 40rem;
}
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-family: var(--font-display);
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--amber-700);
    margin-bottom: .6rem;
}
.eyebrow::before {
    content: '';
    width: 18px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
}
.page-hero .eyebrow, .page-header .eyebrow, .on-dark .eyebrow { color: var(--amber); }

.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1.75rem;
    margin-top: 1.25rem;
    color: rgba(255, 255, 255, .75);
    font-size: .92rem;
}
.hero-stats strong {
    font-family: var(--font-display);
    color: #fff;
    font-size: 1.1rem;
    margin-right: .25rem;
}

/* ===== SECTIONS ===== */
.section { padding: 4.5rem 0; }
.section-sm { padding: 3rem 0; }
.section-sand { background: var(--sand); }
.section-paper { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
}
.section-head p { color: var(--muted); margin: .35rem 0 0; max-width: 38rem; }

.section-heading, .section-title {
    font-size: clamp(1.55rem, 3vw, 2.1rem);
    font-weight: 650;
    color: var(--forest);
    margin: 0;
    padding: 0;
}
.section-heading::after { content: none; }

/* ===== CARDS ===== */
.card { border-color: var(--line); border-radius: var(--radius); background: var(--paper); }
.card-custom > .btn, .card > .btn { align-self: flex-start; }

.card-custom, .mo-card {
    position: relative;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: box-shadow .2s ease, border-color .2s ease, transform .2s ease;
    overflow: hidden;
}
.card-custom:hover, .mo-card.is-link:hover {
    border-color: var(--line-strong);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}
.mo-card .card-title, .mo-card h3 {
    font-size: 1.12rem;
    font-weight: 600;
    margin-bottom: .35rem;
    color: var(--forest);
}
.mo-card .stretched-link:hover { color: var(--forest-600); }
.mo-card-body { padding: 1.25rem 1.3rem; }
.mo-card-foot {
    padding: .8rem 1.3rem;
    border-top: 1px dashed var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    font-size: .88rem;
    color: var(--muted);
    position: relative;
    z-index: 2;
}

.meta-list { list-style: none; padding: 0; margin: .5rem 0 0; display: grid; gap: .35rem; }
.meta-list li {
    display: flex;
    gap: .55rem;
    align-items: flex-start;
    color: var(--ink-soft);
    font-size: .92rem;
    line-height: 1.45;
}
.meta-list i { color: var(--forest-500); margin-top: .1rem; flex: 0 0 auto; }
.meta-list a { position: relative; z-index: 2; }

/* Monogram avatar used when a business/masjid has no logo */
.monogram {
    --mono-bg: var(--sage-100);
    --mono-fg: var(--forest);
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: .02em;
    background: var(--mono-bg);
    color: var(--mono-fg);
    overflow: hidden;
}
.monogram img { width: 100%; height: 100%; object-fit: cover; }
.monogram.tone-1 { --mono-bg: var(--amber-100); --mono-fg: var(--amber-700); }
.monogram.tone-2 { --mono-bg: #e8e3f3; --mono-fg: #4a3a7a; }
.monogram.tone-3 { --mono-bg: #f6e1d6; --mono-fg: #8a4320; }
.monogram.tone-4 { --mono-bg: #dcebf2; --mono-fg: #1f5670; }
.monogram-lg { width: 84px; height: 84px; border-radius: 22px; font-size: 1.8rem; }

/* ===== PILLS / TAGS / BADGES ===== */
.badge {
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: .02em;
    border-radius: 999px;
    padding: .38em .75em;
}
.badge.bg-success { background-color: var(--forest-600) !important; }
.badge.bg-warning { background-color: var(--amber-100) !important; color: var(--amber-700) !important; }
.badge.bg-light { background-color: var(--sand) !important; color: var(--ink-soft) !important; }
.badge.bg-info { background-color: #dcebf2 !important; color: #1f5670 !important; }
.badge.bg-outline-success {
    background-color: transparent !important;
    color: var(--forest-600) !important;
    border: 1px solid var(--line-strong);
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-family: var(--font-display);
    font-size: .76rem;
    font-weight: 600;
    letter-spacing: .02em;
    padding: .28rem .65rem;
    border-radius: 999px;
    background: var(--sand);
    color: var(--ink-soft);
    line-height: 1.2;
    white-space: nowrap;
}
.tag-forest { background: var(--sage-100); color: var(--forest); }
.tag-amber { background: var(--amber-100); color: var(--amber-700); }
.tag-outline { background: transparent; border: 1px solid var(--line-strong); }
.tag-row { display: flex; flex-wrap: wrap; gap: .4rem; }

.time-pill {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: .92rem;
    font-variant-numeric: tabular-nums;
    padding: .3rem .7rem;
    border-radius: 10px;
    background: var(--sage-100);
    color: var(--forest);
    white-space: nowrap;
}

/* ===== FILTER BAR ===== */
.filter-bar {
    position: relative;
    z-index: 5;
    margin-top: -1.6rem;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: .8rem;
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    align-items: center;
}
.filter-bar .search-field { flex: 1 1 260px; }
.filter-bar .form-select { flex: 0 1 200px; width: auto; }

.search-field { position: relative; }
.search-field i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    pointer-events: none;
}
.search-field .form-control { padding-left: 2.6rem; }

.form-control, .form-select {
    border-color: var(--line-strong);
    border-radius: 12px;
    padding: .62rem .9rem;
    background-color: #fff;
    color: var(--ink);
}
.form-control::placeholder { color: #95a09b; }
.form-control:focus, .form-select:focus {
    border-color: var(--forest-500);
    box-shadow: 0 0 0 .22rem rgba(227, 163, 64, .25);
}
.form-label { font-weight: 600; color: var(--ink-soft); font-size: .92rem; }
.form-check-input:checked { background-color: var(--forest-600); border-color: var(--forest-600); }

/* Chip-style toggles (day / city / category) */
.chip-scroller {
    display: flex;
    gap: .45rem;
    overflow-x: auto;
    padding: .15rem .1rem .45rem;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}
.chip {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    border: 1px solid var(--line-strong);
    background: var(--paper);
    color: var(--ink-soft);
    font-family: var(--font-display);
    font-weight: 500;
    font-size: .9rem;
    padding: .42rem .9rem;
    border-radius: 999px;
    cursor: pointer;
    transition: all .15s ease;
    white-space: nowrap;
    text-decoration: none !important;
}
.chip:hover { border-color: var(--forest-500); color: var(--forest); }
.chip[aria-pressed="true"], .chip.active {
    background: var(--forest);
    border-color: var(--forest);
    color: #fff;
}
.chip .count {
    font-size: .75rem;
    font-weight: 600;
    background: var(--sand);
    color: var(--ink-soft);
    padding: .05rem .45rem;
    border-radius: 999px;
}
.chip[aria-pressed="true"] .count, .chip.active .count { background: rgba(255, 255, 255, .18); color: #fff; }

.results-meta {
    color: var(--muted);
    font-size: .92rem;
    margin: 1.4rem 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ===== EMPTY / ERROR STATES ===== */
.empty-state {
    text-align: center;
    padding: 3.5rem 1rem;
    color: var(--muted);
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
    background: var(--paper);
}
.empty-state i { font-size: 2rem; color: var(--sage); display: block; margin-bottom: .6rem; }
.empty-state h3 { font-size: 1.15rem; margin-bottom: .3rem; }

/* ===== SKELETON ===== */
.skeleton-loading, .skeleton {
    background: linear-gradient(90deg, #efe7d8 25%, #f7f1e6 50%, #efe7d8 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.4s ease-in-out infinite;
    border-radius: var(--radius);
    border-color: transparent !important;
}
@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===== BREADCRUMBS ===== */
.mo-crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    align-items: center;
    font-size: .88rem;
    color: rgba(255, 255, 255, .7);
    margin-bottom: 1rem;
}
.mo-crumbs a { color: rgba(255, 255, 255, .85); }
.mo-crumbs a:hover { color: #fff; }
.mo-crumbs .sep { opacity: .5; }
.breadcrumb-item a { color: rgba(255, 255, 255, .8); }
.breadcrumb-item.active { color: var(--amber); }

/* ===== DETAIL PAGES ===== */
.detail-hero { padding: 2.5rem 0 5.5rem; }
.detail-hero h1 { font-size: clamp(1.9rem, 4.2vw, 2.8rem); }
.detail-body { margin-top: -3.5rem; position: relative; z-index: 3; padding-bottom: 3rem; }

.panel {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1.6rem;
}
.panel + .panel { margin-top: 1.25rem; }
.panel-title {
    font-size: 1.05rem;
    font-weight: 650;
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: 1rem;
}
.panel-title i { color: var(--amber-600); }

.info-row {
    display: flex;
    gap: .8rem;
    padding: .7rem 0;
    border-bottom: 1px dashed var(--line);
    align-items: flex-start;
}
.info-row:last-child { border-bottom: 0; padding-bottom: 0; }
.info-row:first-child { padding-top: 0; }
.info-row i {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--sage-100);
    color: var(--forest);
    display: grid;
    place-items: center;
    flex: 0 0 auto;
}
.info-row .label { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.info-row .value { color: var(--ink); word-break: break-word; }

.prose { font-size: 1.05rem; line-height: 1.8; color: var(--ink-soft); white-space: pre-line; }

.program-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1rem;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--line);
    position: relative;
}
.program-row:last-child { border-bottom: 0; }
.program-row .when {
    width: 64px;
    text-align: center;
    background: var(--amber-100);
    color: var(--amber-700);
    border-radius: 12px;
    padding: .45rem .25rem;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: .8rem;
    line-height: 1.15;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.program-row h4 { font-size: 1.02rem; margin: 0 0 .15rem; }
.program-row p { margin: 0; color: var(--muted); font-size: .9rem; }

/* ===== DASHBOARD (admin / owner) ===== */
.dashboard-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.5rem;
}
.stat-card {
    background: linear-gradient(135deg, var(--forest), var(--forest-500));
    color: #fff;
    border-radius: var(--radius);
    padding: 1.5rem;
}
.stat-card h3 { font-size: 2rem; font-weight: 700; color: #fff; }
.sidebar {
    background: var(--paper);
    border-right: 1px solid var(--line);
    min-height: calc(100vh - 70px);
}
.sidebar .nav-link {
    color: var(--ink);
    padding: .75rem 1.25rem;
    border-radius: var(--radius-sm);
    margin: 2px 0;
}
.sidebar .nav-link:hover, .sidebar .nav-link.active { background: var(--sand); color: var(--forest); }
.sidebar .nav-link.active { font-weight: 600; border-left: 3px solid var(--amber); }

/* ===== TABLES / ACCORDION / ALERTS / TABS ===== */
.table { --bs-table-bg: transparent; }
.table th { color: var(--forest); font-weight: 600; border-bottom-width: 2px; font-family: var(--font-display); }
.accordion-button:not(.collapsed) { background-color: var(--sand); color: var(--forest); }
.accordion-button:focus { box-shadow: 0 0 0 .22rem rgba(227, 163, 64, .25); }
.progress { background-color: var(--sand); border-radius: 4px; }
.alert { border-radius: var(--radius-sm); }
.alert-success { background-color: var(--sage-100); border-color: #cfe0d6; color: var(--forest); }
.alert-warning { background-color: var(--amber-100); border-color: #f1d9ad; color: #6d4610; }

.nav-tabs { border-bottom: 1px solid var(--line); gap: .25rem; }
.nav-tabs .nav-link {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--muted);
    border: 0;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    padding: .75rem 1rem;
}
.nav-tabs .nav-link:hover { color: var(--forest); border-bottom-color: var(--line-strong); }
.nav-tabs .nav-link.active { color: var(--forest); background: transparent; border-bottom-color: var(--amber); }

.list-group-item { border-color: var(--line); background: var(--paper); }
.list-group-item-action:hover { background: var(--sand); }

/* ===== PRAYER WIDGET ===== */
.prayer-widget-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.prayer-card {
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: var(--radius-lg);
    padding: 1.35rem;
    color: #fff;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    box-shadow: var(--shadow-lg);
}
.prayer-card .pc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.prayer-card .pc-city {
    -webkit-appearance: none;
    appearance: none;
    border: 0;
    color: #fff;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.1rem;
    padding: 0 1.3rem 0 0;
    cursor: pointer;
    background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23e3a340' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='m2 5 6 6 6-6'/%3E%3C/svg%3E") no-repeat right center / 12px;
}
.prayer-card .pc-city option { color: var(--ink); background: #fff; }
.prayer-card .pc-loc { font-size: .85rem; color: rgba(255, 255, 255, .72); }
.prayer-card .pc-loc button {
    background: none;
    border: 0;
    padding: 0;
    color: var(--amber);
    font-weight: 600;
    font-size: .85rem;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.prayer-card .pc-hijri { font-size: .85rem; color: rgba(255, 255, 255, .72); text-align: right; }
.prayer-card .pc-hijri .arabic { display: block; font-size: 1.05rem; color: var(--amber); }
.prayer-card .pc-next {
    margin: 1rem 0 1.1rem;
    padding: 1rem 1.1rem;
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(227, 163, 64, .22), rgba(227, 163, 64, .06));
    border: 1px solid rgba(227, 163, 64, .35);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}
.prayer-card .pc-next .label { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--amber); font-weight: 700; }
.prayer-card .pc-next .name { font-family: var(--font-display); font-size: 1.6rem; font-weight: 650; line-height: 1.1; }
.prayer-card .pc-next .count {
    font-family: var(--font-display);
    font-variant-numeric: tabular-nums;
    font-size: 1.35rem;
    font-weight: 600;
    text-align: right;
}
.prayer-card .pc-next .count small { display: block; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .6); font-weight: 600; }
.prayer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.prayer-grid .pt {
    border-radius: 12px;
    padding: .55rem .7rem;
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .08);
}
.prayer-grid .pt .n { font-size: .78rem; color: rgba(255, 255, 255, .65); font-weight: 600; letter-spacing: .03em; }
.prayer-grid .pt .t { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.prayer-grid .pt.is-next { background: var(--amber); border-color: var(--amber); color: var(--forest-950); }
.prayer-grid .pt.is-next .n { color: rgba(8, 28, 24, .7); }
.prayer-grid .pt.is-past { opacity: .5; }
.prayer-card .pc-foot { margin-top: .9rem; font-size: .78rem; color: rgba(255, 255, 255, .55); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.prayer-card .pc-foot a { color: rgba(255, 255, 255, .8); }

/* ===== HOMEPAGE ===== */
.home-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    color: #fff;
    background: radial-gradient(90% 120% at 85% 0%, var(--forest-700) 0%, var(--forest) 45%, var(--forest-950) 100%);
    padding: 4rem 0 4.5rem;
}
.home-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image: var(--pattern-amber);
    background-size: 86px 86px;
    opacity: .08;
    -webkit-mask-image: radial-gradient(80% 90% at 70% 30%, #000 20%, transparent 75%);
    mask-image: radial-gradient(80% 90% at 70% 30%, #000 20%, transparent 75%);
}
.home-hero::after {
    /* Ohio's rolling hills, echoing the brand illustration */
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 70px;
    z-index: -1;
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 70' preserveAspectRatio='none'%3E%3Cpath d='M0 38c160-30 320-34 480-12s300 40 470 18 330-48 490-20v46H0z' fill='%23c98424' opacity='.35'/%3E%3Cpath d='M0 52c200-26 380-22 560-6s340 26 520 8 260-26 360-14v30H0z' fill='%23faf6ee'/%3E%3C/svg%3E") bottom / 100% 100% no-repeat;
}
.home-hero .salaam {
    font-family: var(--font-arabic);
    color: var(--amber);
    font-size: 1.55rem;
    line-height: 1;
    margin-bottom: .6rem;
    direction: rtl;
    display: inline-block;
}
.home-hero h1 {
    color: #fff;
    font-size: clamp(2.3rem, 5.6vw, 3.9rem);
    font-weight: 650;
    letter-spacing: -0.025em;
    line-height: 1.04;
    margin-bottom: 1.1rem;
}
.home-hero h1 em {
    font-style: normal;
    color: var(--amber);
}
.home-hero .lead {
    color: rgba(255, 255, 255, .8);
    font-size: 1.15rem;
    max-width: 34rem;
    margin-bottom: 1.8rem;
}

.quick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; max-width: 36rem; }
.quick-link {
    display: flex;
    align-items: center;
    gap: .8rem;
    padding: .9rem 1rem;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .13);
    color: #fff !important;
    text-decoration: none !important;
    transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.quick-link:hover { background: rgba(255, 255, 255, .11); border-color: rgba(227, 163, 64, .6); transform: translateY(-1px); }
.quick-link .qi {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: rgba(227, 163, 64, .16);
    color: var(--amber);
    font-size: 1.15rem;
    flex: 0 0 auto;
}
.quick-link strong { font-family: var(--font-display); font-weight: 600; display: block; line-height: 1.2; }
.quick-link small { color: rgba(255, 255, 255, .62); font-size: .8rem; }

.stat-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-top: -2.2rem;
    position: relative;
    z-index: 3;
}
.stat-strip > a {
    padding: 1.2rem 1.4rem;
    border-right: 1px solid var(--line);
    color: inherit;
    text-decoration: none !important;
    transition: background .15s ease;
}
.stat-strip > a:first-child { border-radius: var(--radius-lg) 0 0 var(--radius-lg); }
.stat-strip > a:last-child { border-right: 0; border-radius: 0 var(--radius-lg) var(--radius-lg) 0; }
.stat-strip > a:hover { background: var(--cream); }
.stat-strip .num {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--forest);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.stat-strip .lbl { color: var(--muted); font-size: .88rem; margin-top: .3rem; }

.today-card {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}
.today-card .when {
    flex: 0 0 auto;
    min-width: 88px;
    text-align: center;
    padding: .55rem .5rem;
    border-radius: 12px;
    background: var(--amber-100);
    color: var(--amber-700);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: .82rem;
    line-height: 1.2;
}
.today-card .when small { display: block; font-weight: 600; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; opacity: .8; }

.city-tile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: 1rem 1.15rem;
    border-radius: var(--radius);
    background: var(--paper);
    border: 1px solid var(--line);
    color: var(--ink) !important;
    text-decoration: none !important;
    transition: all .15s ease;
}
.city-tile:hover { border-color: var(--forest-500); box-shadow: var(--shadow); transform: translateY(-1px); }
.city-tile strong { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; color: var(--forest); display: block; }
.city-tile small { color: var(--muted); }
.city-tile .arrow {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--sand);
    color: var(--forest);
    flex: 0 0 auto;
}

.jummah-mini { display: grid; gap: .5rem; }
.jummah-mini .jm {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .75rem .9rem;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 12px;
}
.jummah-mini .jm a { font-weight: 600; color: var(--forest); }
.jummah-mini .jm small { color: var(--muted); display: block; font-size: .8rem; }

.feature-band {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--forest);
    color: #fff;
    padding: 2.5rem;
}
.feature-band::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image: var(--pattern-amber);
    background-size: 68px 68px;
    opacity: .1;
}
.feature-band h2, .feature-band h3 { color: #fff; }
.feature-band p { color: rgba(255, 255, 255, .78); }

.subscribe-form { display: flex; gap: .5rem; max-width: 28rem; }
.subscribe-form .form-control { border-radius: 999px; padding-left: 1.1rem; }
@media (max-width: 480px) {
    .subscribe-form { flex-direction: column; }
}

/* News card */
.news-card .cover {
    aspect-ratio: 16 / 9;
    background: var(--sand);
    position: relative;
    overflow: hidden;
}
.news-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.news-card .cover.cover-fallback {
    background: radial-gradient(120% 120% at 100% 0%, var(--forest-600), var(--forest) 60%);
    display: grid;
    place-items: center;
}
.news-card .cover.cover-fallback::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--pattern-amber);
    background-size: 58px 58px;
    opacity: .14;
}
.news-card .cover.cover-fallback img { width: 56px; height: 56px; object-fit: contain; opacity: .9; position: relative; }
.news-card .excerpt {
    color: var(--muted);
    font-size: .93rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-card.is-feature .cover { aspect-ratio: auto; height: 100%; min-height: 260px; }
.news-card.is-feature h3 { font-size: clamp(1.35rem, 2.6vw, 1.85rem); }

.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ===== JUMMAH ===== */
.jummah-city { margin-bottom: 2.25rem; }
.jummah-city > h2 {
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: .6rem;
    margin-bottom: .8rem;
}
.jummah-city > h2 .count { font-size: .8rem; font-weight: 600; color: var(--muted); font-family: var(--font-body); }
.jummah-row {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: .5rem 1.25rem;
    align-items: center;
    padding: 1rem 1.2rem;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    margin-bottom: .55rem;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.jummah-row:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.jummah-row .name { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; color: var(--forest); }
.jummah-row .addr { color: var(--muted); font-size: .85rem; }
.jummah-row .times { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: flex-end; }
.jummah-row .note { grid-column: 1 / -1; font-size: .83rem; color: var(--muted); margin-top: -.15rem; }
@media (max-width: 640px) {
    .jummah-row { grid-template-columns: 1fr; }
    .jummah-row .times { justify-content: flex-start; }
}

.friday-banner {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--amber-100);
    border: 1px solid #f0d8ad;
    border-radius: var(--radius);
    color: #6d4610;
}
.friday-banner i { font-size: 1.4rem; color: var(--amber-700); }

/* ===== FOOTER ===== */
.mo-footer {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background: var(--forest-950);
    color: rgba(255, 255, 255, .72);
    padding: 4rem 0 2rem;
    margin-top: 0;
    font-size: .95rem;
}
.mo-footer::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image: var(--pattern-amber);
    background-size: 76px 76px;
    opacity: .05;
}
.mo-footer h2 {
    color: #fff;
    font-size: .8rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 1rem;
}
.mo-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.mo-footer a { color: rgba(255, 255, 255, .72); }
.mo-footer a:hover { color: var(--amber); text-decoration: none; }
.mo-footer .brand-line { display: flex; align-items: center; gap: .7rem; margin-bottom: 1rem; color: #fff; }
.mo-footer .brand-line img { width: 44px; height: 44px; }
.mo-footer .dua {
    font-family: var(--font-arabic);
    color: var(--amber);
    font-size: 1.3rem;
    direction: rtl;
    text-align: left;
    line-height: 1.6;
}
.mo-footer .social { display: flex; gap: .5rem; margin-top: 1.25rem; }
.mo-footer .social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .12);
    color: #fff;
    font-size: 1.05rem;
}
.mo-footer .social a:hover { background: var(--amber); color: var(--forest-950); border-color: var(--amber); }
.mo-footer .social a::after { content: none !important; }
.mo-footer .legal {
    border-top: 1px solid rgba(255, 255, 255, .1);
    margin-top: 3rem;
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: .85rem;
    color: rgba(255, 255, 255, .5);
}

/* ===== ARTICLE BODY ===== */
.article-shell { max-width: 46rem; margin: 0 auto; }
.article-body {
    font-family: var(--font-body);
    font-size: 1.1rem;
    line-height: 1.85;
    color: var(--ink-soft);
    /* Long pasted links wrap instead of running off a phone screen. */
    overflow-wrap: anywhere;
}
.article-body h1, .article-body h2, .article-body h3,
.article-body h4, .article-body h5, .article-body h6 {
    font-family: var(--font-display);
    color: var(--forest);
    margin-top: 1.8em;
    margin-bottom: 0.6em;
    font-weight: 650;
    line-height: 1.25;
}
.article-body > *:first-child { margin-top: 0; }
.article-body h1 { font-size: 1.9rem; }
.article-body h2 {
    font-size: 1.6rem;
    margin-top: 2.2em;
    padding-top: .9rem;
    position: relative;
    scroll-margin-top: 90px;
}
.article-body h2::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 2.75rem;
    height: 4px;
    border-radius: 4px;
    background: var(--amber);
}
.article-body h3 { font-size: 1.28rem; color: var(--forest-600); margin-top: 1.6em; }
.article-body h4 {
    font-size: .95rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--forest-600);
    margin-top: 1.5em;
}
.article-body h2 + h3, .article-body h3 + h4 { margin-top: .6em; }
/* The opening paragraph reads as the lede. */
.article-body > p:first-child { color: var(--ink); }
@media (min-width: 768px) { .article-body > p:first-child { font-size: 1.2rem; } }
.article-body p { margin-bottom: 1.25em; }
.article-body p:empty { display: none; }
.article-body ul, .article-body ol { margin-bottom: 1.25em; padding-left: 1.5em; }
.article-body li { margin-bottom: 0.5em; line-height: 1.7; }
.article-body ul li::marker { color: var(--amber); }
.article-body ol li::marker { color: var(--forest-600); font-weight: 700; }
.article-body li > ul, .article-body li > ol { margin: .4em 0 .2em; }
/* Indented list items, as the admin editor (Quill) stores them */
.article-body li.ql-indent-1 { margin-left: 1.6em; }
.article-body li.ql-indent-2 { margin-left: 3.2em; }
.article-body li.ql-indent-3 { margin-left: 4.8em; }
.article-body ul li.ql-indent-1, .article-body ul li.ql-indent-3 { list-style-type: circle; }
.article-body ul li.ql-indent-2 { list-style-type: square; }
.article-body ol li[class*="ql-indent-"] { list-style-type: lower-alpha; }
.article-body li strong, .article-body p > strong:first-child { color: var(--forest); }
.article-body blockquote {
    border-left: 4px solid var(--amber);
    padding: 1rem 1.5rem;
    margin: 1.5em 0;
    background: var(--sand);
    border-radius: 0 12px 12px 0;
    font-style: italic;
    color: var(--ink-soft);
}
.article-body img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 1.5em auto;
    box-shadow: var(--shadow);
}
.article-body a { color: var(--forest-600); text-decoration: underline; text-underline-offset: 3px; }
.article-body pre {
    background: var(--forest-950);
    color: #f3ead9;
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
    overflow-x: auto;
    margin: 1.5em 0;
    font-size: 0.9em;
}
.article-body code { background: var(--sand); padding: 0.15em 0.4em; border-radius: 4px; font-size: 0.9em; }
.article-body pre code { background: none; padding: 0; color: inherit; }
.article-body table { width: 100%; border-collapse: collapse; margin: 1.5em 0; }
.article-body th, .article-body td { border: 1px solid var(--line); padding: 0.65rem 1rem; text-align: left; }
/* Wide tables scroll sideways in their own box (see enhanceArticleBody); cells keep
   a readable width instead of breaking text letter by letter on a phone. */
.article-body .table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1.5em 0; }
.article-body .table-scroll > table { margin: 0; }
.article-body .table-scroll th, .article-body .table-scroll td { min-width: 7.5rem; }
.article-body th { background: var(--sand); font-weight: 600; }
/* Section divider: the brand's star motif instead of a plain rule. */
.article-body hr {
    border: 0;
    height: auto;
    opacity: 1;
    margin: 2.6em 0;
    text-align: center;
    overflow: visible;
    background: none;
}
.article-body hr::after {
    content: '\2726\2003\2726\2003\2726';
    color: var(--amber);
    font-size: .95rem;
    letter-spacing: .1em;
}

/* "In this article" contents box (built by enhanceArticleBody) */
.article-toc {
    background: var(--sand);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 1.1rem 1.4rem 1rem;
    margin: 0 0 2em;
    font-size: 1rem;
}
.article-toc-title {
    font-family: var(--font-display);
    font-weight: 650;
    color: var(--forest);
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: .5rem;
}
.article-toc ol { margin: 0; padding-left: 1.3em; display: grid; gap: .3rem; }
.article-toc li { margin: 0; line-height: 1.45; }
.article-toc li::marker { color: var(--amber); font-weight: 700; }
.article-toc a { color: var(--forest-600); text-decoration: none; }
.article-toc a:hover { text-decoration: underline; text-underline-offset: 3px; }
.article-body figcaption { font-size: 0.875rem; color: var(--muted); font-style: italic; text-align: center; margin-top: 0.5em; }

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1.25rem;
    font-size: 0.92rem;
    color: rgba(255, 255, 255, .75);
}
.article-meta i { color: var(--amber); margin-right: .3rem; }

.article-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.article-tag {
    background: var(--sand);
    padding: 0.35rem 0.85rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--forest);
}

/* ===== ANNOUNCEMENT BAR ===== */
.announce-bar {
    --ab-bg: var(--forest-600);
    --ab-fg: #fff;
    --ab-accent: var(--amber);
    background: var(--ab-bg);
    color: var(--ab-fg);
    font-size: .93rem;
    padding: .55rem 0;
    position: relative;
    z-index: 1031;
}
.announce-bar.tone-celebrate { --ab-bg: linear-gradient(90deg, #b8741c, var(--amber) 60%, #eab25a); --ab-fg: var(--forest-950); --ab-accent: var(--forest-950); }
.announce-bar.tone-urgent { --ab-bg: #9a2b17; --ab-accent: #ffd7cc; }
.announce-bar i { color: var(--ab-accent); font-size: 1.05rem; }
.announce-bar p { line-height: 1.4; }
.announce-bar .announce-link {
    color: var(--ab-fg);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
    margin-left: .35rem;
    white-space: nowrap;
}
.announce-bar .announce-link i { color: inherit; font-size: .85em; }
.announce-bar .announce-close {
    border: 0;
    background: transparent;
    color: var(--ab-fg);
    opacity: .75;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    flex: 0 0 auto;
}
.announce-bar .announce-close:hover { opacity: 1; background: rgba(0, 0, 0, .08); }
.announce-bar .announce-close i { color: inherit; }

/* ===== ARTICLE SHARE ===== */
.share-row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.share-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    height: 40px;
    padding: 0 .9rem;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    background: var(--paper);
    color: var(--forest);
    font-weight: 600;
    font-size: .9rem;
    text-decoration: none !important;
}
.share-btn::after { content: none !important; }
.share-btn:hover { border-color: var(--forest-500); background: var(--sand); color: var(--forest); }
.share-btn.wa { background: #25d366; border-color: #25d366; color: #fff; }
.share-btn.wa:hover { background: #1ebe5b; color: #fff; }

/* ===== EVENT DATE BLOCK ===== */
.date-block {
    flex: 0 0 auto;
    width: 64px;
    text-align: center;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    background: #fff;
    font-family: var(--font-display);
    line-height: 1.1;
    padding-bottom: .35rem;
}
.date-block small:first-child {
    display: block;
    background: var(--forest);
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: .25rem 0;
}
.date-block strong { display: block; font-size: 1.55rem; color: var(--forest); margin-top: .2rem; }
.date-block small:last-child { display: block; font-size: .7rem; color: var(--muted); font-weight: 600; text-transform: uppercase; }

/* ===== SUBMIT CHOICES ===== */
.submit-choice {
    width: 100%;
    height: 100%;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: .15rem;
    padding: 1rem;
    border-radius: var(--radius);
    border: 1.5px solid var(--line);
    background: var(--paper);
    color: var(--ink);
    transition: all .15s ease;
}
.submit-choice i { font-size: 1.35rem; color: var(--amber-600); margin-bottom: .35rem; }
.submit-choice strong { font-family: var(--font-display); font-weight: 600; color: var(--forest); }
.submit-choice small { color: var(--muted); font-size: .8rem; line-height: 1.3; }
.submit-choice:hover { border-color: var(--forest-500); }
.submit-choice.active { border-color: var(--forest); background: var(--sage-100); box-shadow: 0 0 0 3px rgba(47, 115, 98, .12); }

/* ===== AUTH ===== */
.auth-shell {
    min-height: calc(100vh - 64px);
    display: grid;
    place-items: center;
    padding: 3rem 1rem;
    background:
        radial-gradient(60% 60% at 100% 0%, rgba(227, 163, 64, .14), transparent 70%),
        radial-gradient(60% 60% at 0% 100%, rgba(47, 115, 98, .12), transparent 70%),
        var(--cream);
}
.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 2.25rem;
}
.auth-card .auth-mark { width: 56px; height: 56px; margin-bottom: 1rem; }

/* ===== REVEAL ===== */
.reveal { opacity: 0; transform: translateY(10px); transition: opacity .5s ease, transform .5s ease; }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ===== RESPONSIVE ===== */
@media (max-width: 991.98px) {
    .stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stat-strip > a:nth-child(2) { border-right: 0; border-radius: 0 var(--radius-lg) 0 0; }
    .stat-strip > a:nth-child(1) { border-radius: var(--radius-lg) 0 0 0; }
    .stat-strip > a:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
    .stat-strip > a:nth-child(3) { border-radius: 0 0 0 var(--radius-lg); }
    .stat-strip > a:nth-child(4) { border-radius: 0 0 var(--radius-lg) 0; }
}
@media (max-width: 768px) {
    .section { padding: 3.25rem 0; }
    .home-hero { padding: 2.75rem 0 4rem; }
    .page-header, .page-hero { padding: 2.25rem 0 2.75rem; }
    /* Detail pages pull the white card up 3.5rem over the hero; leave room so
       the last line (e.g. "3 min read" under an article title) isn't covered. */
    /* !important to beat the phone rule ".page-hero { padding: ... !important }" further down. */
    .page-hero.detail-hero { padding-bottom: 5rem !important; }
    .quick-grid { grid-template-columns: 1fr 1fr; }
    .quick-link { padding: .75rem .8rem; gap: .6rem; }
    .quick-link .qi { width: 34px; height: 34px; font-size: 1rem; }
    .quick-link small { display: none; }
    .stat-strip .num { font-size: 1.6rem; }
    .stat-strip > a { padding: 1rem; }
    .feature-band { padding: 1.75rem; }
    .panel { padding: 1.25rem; border-radius: var(--radius); }
    .filter-bar .form-select { flex: 1 1 140px; }
    .program-row { grid-template-columns: auto 1fr; }
    .program-row > :last-child:not(:nth-child(2)) { grid-column: 2; }
}

/* ==========================================================================
   MOBILE APP SHELL
   Phones get an app: bottom tabs, compact auto-hiding header, sheets,
   swipeable rails, sticky actions. Desktop (≥ 992px) is unchanged.
   ========================================================================== */

/* Smooth cross-page transitions (Chrome, Edge, Safari 18+; ignored elsewhere) */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .18s; }
.mo-tabbar { view-transition-name: mo-tabbar; }
.mo-nav { view-transition-name: mo-nav; }

html { -webkit-tap-highlight-color: transparent; }
a, button, .chip, .mo-card.is-link { touch-action: manipulation; }

.mo-nav-tools, .mo-back, .mo-tabbar, .mo-actionbar { display: none; }
.mo-flash {
    position: fixed; left: 50%; bottom: calc(5.5rem + env(safe-area-inset-bottom)); z-index: 2000;
    transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
    background: var(--forest-950); color: #fff; font-weight: 600; font-size: .92rem;
    padding: .65rem 1.1rem; border-radius: 999px; box-shadow: var(--shadow-lg);
    transition: opacity .2s ease, transform .2s ease;
}
.mo-flash.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 991.98px) {
    body.has-tabbar { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
    body.has-tabbar.has-actionbar { padding-bottom: calc(128px + env(safe-area-inset-bottom)); }

    /* ---- Header: 56px, glassy, slides away on scroll-down ---- */
    .mo-nav { padding: calc(.35rem + env(safe-area-inset-top)) 0 .35rem; transition: transform .25s ease, box-shadow .2s ease; }
    body.nav-hidden .mo-nav { transform: translateY(-110%); }
    body.scrolled .mo-nav { box-shadow: 0 6px 18px -14px rgba(8, 28, 24, .45); }
    .mo-nav > .container { flex-wrap: nowrap; gap: .25rem; padding-left: .75rem; padding-right: .5rem; }
    .mo-nav .navbar-toggler, .mo-nav .navbar-collapse { display: none !important; }
    .mo-brand img { width: 34px; height: 34px; }
    .mo-brand-word { font-size: .92rem; }
    .mo-nav.is-detail .mo-brand-word { display: none; }
    .mo-nav-tools { display: flex; gap: .15rem; margin-left: auto; }
    .mo-back { display: grid; margin-left: -.35rem; }
    .mo-icon-btn {
        width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent;
        place-items: center; display: grid; color: var(--forest); font-size: 1.3rem;
    }
    .mo-icon-btn:active { background: var(--sand); transform: scale(.94); }

    /* ---- Bottom tab bar ---- */
    .mo-tabbar {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030;
        display: grid; grid-template-columns: repeat(5, 1fr);
        padding: .3rem .25rem calc(.3rem + env(safe-area-inset-bottom));
        background: rgba(255, 253, 248, .94);
        -webkit-backdrop-filter: saturate(160%) blur(16px); backdrop-filter: saturate(160%) blur(16px);
        border-top: 1px solid var(--line);
        transition: transform .2s ease;
    }
    .mo-tabbar a {
        display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .1rem;
        min-height: 52px; border-radius: 14px; text-decoration: none !important;
        color: #7b8581; font-size: .68rem; font-weight: 600; letter-spacing: .01em;
        transition: color .15s ease, transform .1s ease;
    }
    .mo-tabbar a i { font-size: 1.32rem; line-height: 1.15; }
    .mo-tabbar a.active { color: var(--forest); }
    .mo-tabbar a.active i { transform: translateY(-1px); }
    .mo-tabbar a.active span { font-weight: 700; }
    .mo-tabbar a:active { transform: scale(.9); }
    body.typing .mo-tabbar, body.typing .mo-actionbar { transform: translateY(150%); }

    /* ---- Sticky action bar (detail pages) ---- */
    .mo-actionbar {
        position: fixed; left: .6rem; right: .6rem; z-index: 1029;
        bottom: calc(66px + env(safe-area-inset-bottom));
        display: flex; gap: .4rem; padding: .4rem;
        background: rgba(255, 253, 248, .96);
        -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
        border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 14px 30px -18px rgba(8, 28, 24, .55);
        transition: transform .2s ease;
    }
    .mo-actionbar a, .mo-actionbar button {
        flex: 1 1 0; min-width: 0; min-height: 48px; border: 0; border-radius: 14px;
        display: flex; align-items: center; justify-content: center; gap: .4rem;
        background: var(--sand); color: var(--forest); font-weight: 700; font-size: .88rem; text-decoration: none !important;
    }
    .mo-actionbar .primary { background: var(--forest); color: #fff; flex-grow: 1.4; }
    .mo-actionbar a:active, .mo-actionbar button:active { transform: scale(.96); }
    .mo-actionbar span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

    /* Detail heroes already show these buttons; the bar replaces them on phones */
    .hide-on-phone { display: none !important; }
}

/* ---- Bottom sheets ---- */
.mo-sheet.offcanvas-bottom {
    height: auto; max-height: 88vh; max-height: 88dvh;
    border-radius: 24px 24px 0 0; border: 0 !important;
    background: var(--paper);
    padding-bottom: env(safe-area-inset-bottom);
    transition: transform .28s cubic-bezier(.2, .8, .2, 1);
}
.mo-sheet.mo-sheet-full { height: 92vh; max-height: 92vh; height: 92dvh; max-height: 92dvh; }
.mo-sheet-grip { width: 40px; height: 5px; border-radius: 3px; background: var(--line-strong); margin: .6rem auto 0; }
.mo-sheet .offcanvas-header { padding: .6rem 1.25rem .25rem; }
.mo-sheet .offcanvas-body { padding: .5rem 1.25rem 1.5rem; }
.mo-sheet-label { font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 1.1rem 0 .55rem; }
.mo-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.mo-tile {
    display: flex; align-items: center; gap: .65rem; padding: .8rem .85rem; min-height: 60px;
    border-radius: 16px; background: var(--cream); border: 1px solid var(--line);
    color: var(--ink) !important; font-weight: 600; font-size: .9rem; text-align: left; text-decoration: none !important; line-height: 1.2;
}
.mo-tile i { font-size: 1.25rem; color: var(--forest-600); flex: 0 0 auto; }
.mo-tile small { display: block; font-weight: 500; color: var(--muted); font-size: .74rem; margin-top: .1rem; }
.mo-tile:active { transform: scale(.97); background: var(--sand); }
.mo-account { display: flex; align-items: center; gap: .8rem; padding: .25rem 0 .9rem; }
.mo-account strong { display: block; }
.mo-account small { color: var(--muted); }
.mo-avatar {
    width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto;
    background: linear-gradient(135deg, var(--amber), var(--forest-500)); color: #fff; font-weight: 700; font-family: var(--font-display);
}
.mo-install {
    display: flex; align-items: center; gap: .8rem; width: 100%; margin-top: 1.25rem; padding: .85rem;
    border: 0; border-radius: 18px; text-align: left; position: relative; isolation: isolate; overflow: hidden;
    background: radial-gradient(120% 140% at 100% 0%, var(--forest-700), var(--forest) 55%, var(--forest-900)); color: #fff;
}
.mo-install::before { content: ''; position: absolute; inset: 0; z-index: -1; background-image: var(--pattern-amber); background-size: 68px; opacity: .12; }
.mo-install img { border-radius: 12px; }
.mo-install strong { display: block; }
.mo-install small { color: rgba(255, 255, 255, .78); }
.mo-install .btn { margin-left: auto; }
.mo-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.mo-result {
    display: flex; align-items: center; gap: .8rem; padding: .6rem .25rem; border-radius: 14px;
    color: var(--ink) !important; text-decoration: none !important;
}
.mo-result:active { background: var(--sand); }
.mo-result strong { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mo-result small { display: block; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mo-result-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: 0 0 auto; background: var(--sage-100); color: var(--forest-600); font-size: 1.1rem; }
.mo-result-icon.amber { background: var(--amber-100); color: var(--amber-700); }
.mo-result-icon.clay { background: #f6e1d6; color: #8a4320; }
.offcanvas-backdrop.show { opacity: .4; }

/* ---- Stories (homepage, phones) ---- */
.stories { display: none; }
.story { display: flex; flex-direction: column; align-items: center; gap: .35rem; width: 76px; flex: 0 0 76px; text-decoration: none !important; scroll-snap-align: start; }
.story-ring {
    position: relative; width: 68px; height: 68px; border-radius: 50%; padding: 3px;
    background: conic-gradient(from 210deg, var(--amber), #f0c56d, var(--forest-500), var(--amber));
    transition: transform .12s ease;
}
.story-ring.live { background: conic-gradient(from 0deg, #e3a340, #d9572c, #e3a340, #f0c56d, #e3a340); }
.story:active .story-ring { transform: scale(.93); }
.story-avatar {
    width: 100%; height: 100%; border-radius: 50%; border: 3px solid var(--cream);
    display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem;
    background: var(--mono-bg, var(--sage-100)); color: var(--mono-fg, var(--forest-600));
}
.story-avatar.tone-0 { --mono-bg: var(--sage-100); --mono-fg: var(--forest-600); }
.story-avatar.tone-1 { --mono-bg: var(--amber-100); --mono-fg: var(--amber-700); }
.story-avatar.tone-2 { --mono-bg: #e8e3f3; --mono-fg: #4a3a7a; }
.story-avatar.tone-3 { --mono-bg: #f6e1d6; --mono-fg: #8a4320; }
.story-avatar.tone-4 { --mono-bg: #dcebf2; --mono-fg: #1f5670; }
.story-jummah .story-ring { background: linear-gradient(135deg, var(--forest-500), var(--forest)); }
.story-jummah .story-avatar { background: var(--forest); color: var(--amber); font-size: 1.5rem; }
.story-badge {
    position: absolute; left: 50%; bottom: -5px; transform: translateX(-50%);
    background: var(--forest); color: #fff; border: 2px solid var(--cream);
    font-size: .62rem; font-weight: 700; line-height: 1; padding: .2rem .38rem; border-radius: 6px; white-space: nowrap;
}
.story-ring.live .story-badge { background: #d9572c; }
.story-name {
    font-size: .7rem; font-weight: 600; color: var(--ink-soft); text-align: center; line-height: 1.2;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 76px;
}

/* ---- Generated cover art (no photos in the data yet) ---- */
.art {
    position: relative; height: 104px; display: grid; place-items: center; isolation: isolate; overflow: hidden;
    background: var(--mono-bg, var(--sage-100));
    border-radius: var(--radius) var(--radius) 0 0;
}
.art::before { content: ''; position: absolute; inset: 0; background-image: var(--pattern-forest); background-size: 52px; opacity: .08; z-index: -1; }
.art.tone-0 { --mono-bg: var(--sage-100); }
.art.tone-1 { --mono-bg: var(--amber-100); }
.art.tone-2 { --mono-bg: #e8e3f3; }
.art.tone-3 { --mono-bg: #f6e1d6; }
.art.tone-4 { --mono-bg: #dcebf2; }
.art .monogram { width: 64px; height: 64px; font-size: 1.4rem; border-radius: 20px; box-shadow: 0 8px 20px -10px rgba(8, 28, 24, .45); background: #fff; }
.biz-card { overflow: hidden; }

/* ---- Rails: horizontal, swipeable, snapping (phones) ---- */
@media (max-width: 767.98px) {
    .m-rail {
        display: flex !important; flex-wrap: nowrap !important; gap: .75rem !important;
        overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
        margin-left: calc(var(--rail-gutter, .75rem) * -1) !important; margin-right: calc(var(--rail-gutter, .75rem) * -1) !important;
        padding: .25rem var(--rail-gutter, .75rem) .75rem !important; scroll-padding-inline: var(--rail-gutter, .75rem);
        scrollbar-width: none;
        --bs-gutter-x: 0; --bs-gutter-y: 0;
    }
    .m-rail::-webkit-scrollbar { display: none; }
    .m-rail > * { flex: 0 0 84% !important; max-width: 84% !important; width: auto !important; margin: 0 !important; padding: 0 !important; scroll-snap-align: start; }
    .m-rail.m-rail-sm > * { flex-basis: 62% !important; max-width: 62% !important; }
    .m-rail > .link-arrow { flex: 0 0 auto !important; align-self: center; padding: 0 1rem !important; }
    .m-rail .mo-card { height: 100%; }
    .m-rail .skeleton { min-height: 96px; }
}

/* ---- Homepage on phones: a feed, not a brochure ---- */
@media (max-width: 767.98px) {
    .stories {
        display: flex; gap: .55rem; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none;
        margin: .9rem -.75rem 1rem; padding: .25rem .75rem .35rem;
    }
    .stories::-webkit-scrollbar { display: none; }
    .home-hero { padding: 1.1rem 0 1.5rem !important; }
    .home-hero h1 { font-size: 1.55rem !important; line-height: 1.15; margin-bottom: 0; }
    .home-hero h1 em { display: inline; }
    .home-hero .salaam { font-size: 1rem; margin-bottom: .15rem; }
    .home-hero .lead, .home-hero .quick-grid { display: none !important; }
    .home-hero .row { --bs-gutter-y: 0; }
    .stat-strip { display: none !important; }
    .section { padding: 1.75rem 0 !important; }
    .section-head { margin-bottom: .85rem !important; align-items: flex-end; }
    .section-head p { display: none; }
    .section-title { font-size: 1.3rem !important; margin-bottom: 0; }
    .section-head .eyebrow { margin-bottom: .2rem; font-size: .7rem; }
    .feature-band { padding: 1.4rem !important; border-radius: var(--radius-lg); }
    .feature-band h2 { font-size: 1.35rem; }
    .mo-footer { padding: 2.5rem 0 1.5rem; }
    .mo-card.is-link:active { transform: scale(.985); }
}
.home-hero .story-name { color: rgba(255, 255, 255, .86); }
.home-hero .story-avatar { border-color: var(--forest); }
.home-hero .story-badge { border-color: var(--forest); }
@media (max-width: 767.98px) {
    .mo-footer .row > :not(:first-child) { display: none; }
    .mo-footer .row { --bs-gutter-y: 1rem; }
}

/* ---- List pages on phones ---- */
@media (max-width: 767.98px) {
    /* iOS zooms the page when a focused field is under 16px */
    input.form-control, select.form-select, textarea.form-control { font-size: 16px; }

    .page-hero, .page-header { padding: 1.1rem 0 2.4rem !important; }
    .page-hero h1, .page-header h1 { font-size: 1.6rem !important; margin-bottom: .3rem; }
    .page-hero .eyebrow, .page-hero .hero-stats { display: none; }
    .page-hero .lead, .page-header .lead {
        font-size: .92rem; line-height: 1.45;
        display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
    }
    .filter-bar { padding: .55rem; gap: .45rem; border-radius: 18px; margin-top: -1.4rem; }
    .filter-bar .search-field { flex: 1 1 100%; }
    .filter-bar .form-select { flex: 1 1 0 !important; min-width: 0; padding-top: .5rem; padding-bottom: .5rem; }

    #view-tabs {
        display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px;
        border: 0; border-radius: 16px; background: var(--sand); margin-top: 1rem !important;
    }
    #view-tabs .nav-link {
        width: 100%; border: 0 !important; border-radius: 12px; margin: 0;
        padding: .6rem .4rem; font-size: .88rem; font-weight: 600; color: var(--muted);
        display: flex; align-items: center; justify-content: center; gap: .15rem; white-space: nowrap;
    }
    #view-tabs .nav-link.active { background: var(--paper); color: var(--forest); box-shadow: var(--shadow-sm); }
    #view-tabs .nav-link::after { display: none; }

    .chip-scroller { margin-left: -.75rem; margin-right: -.75rem; padding-left: .75rem; padding-right: .75rem; scrollbar-width: none; }
    .chip-scroller::-webkit-scrollbar { display: none; }
    .results-meta { margin: .75rem 0 .5rem; font-size: .85rem; }
    .breadcrumb, .mo-crumbs { display: none !important; }
    .detail-hero, .page-hero.detail { padding-top: 1.25rem !important; }
}

/* ---- Masjid list card ---- */
.masjid-card .monogram { width: 48px; height: 48px; border-radius: 50%; font-size: 1rem; flex: 0 0 auto; }
.masjid-card .card-title { font-size: 1.08rem; }
.jm-row { display: flex; align-items: center; gap: .6rem; margin-top: .75rem; }
.jm-label { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); flex: 0 0 auto; }
@media (max-width: 767.98px) {
    .masjid-card .mo-card-body { padding: 1rem 1rem .85rem; }
    .masjid-card .jm-note { display: none; }
    .masjid-card .mo-card-foot { padding: .55rem 1rem; }
    .masjid-card .time-pill { font-size: .8rem; padding: .25rem .55rem; }
    #masjids-grid, .row.g-3 { --bs-gutter-y: .75rem; }
    .today-card { gap: .8rem; }
    .today-card .when { min-width: 72px; padding: .45rem .4rem; font-size: .82rem; }
    .mo-card-body { padding: 1rem; }
}

/* ---- Listing confirmed against the organizer's own page ---- */
.confirmed-badge {
    display: inline-flex; align-items: center; gap: .3rem; margin-top: .45rem;
    font-size: .72rem; font-weight: 700; color: var(--forest-600);
    background: var(--sage-100); padding: .18rem .5rem; border-radius: 999px;
}
.confirmed-badge i { color: var(--forest-500); }

/* ---- Detail hero with a cover photo (masjid pages) ---- */
.page-hero.has-photo {
    background:
        linear-gradient(180deg, rgba(8, 28, 24, .35) 0%, rgba(8, 28, 24, .72) 55%, rgba(8, 28, 24, .94) 100%),
        var(--hero-photo) center / cover no-repeat,
        var(--forest);
}
.page-hero.has-photo::before { display: none; }
.page-hero.has-photo h1, .page-hero.has-photo .lead { text-shadow: 0 2px 12px rgba(0, 0, 0, .35); }
@media (min-width: 768px) { .page-hero.has-photo { padding-top: 7rem !important; } }
@media (max-width: 767.98px) { .page-hero.has-photo { padding-top: 9.5rem !important; } }
.masjid-avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; box-shadow: 0 0 0 2px var(--paper), 0 0 0 3.5px var(--amber); background: var(--sand); }
.chip-near { gap: .35rem; font-weight: 700; color: var(--forest) !important; }
.chip-near[aria-pressed="true"] { color: #fff !important; }
.text-forest { color: var(--forest-600) !important; }
.story-avatar { overflow: hidden; }
.story-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.jm-ok { color: var(--forest-500); font-size: 1rem; align-self: center; margin-left: .15rem; }

/* ---- Visiting a masjid guide ---- */
.guide-steps { display: grid; gap: 1rem; }
.guide-step { display: flex; gap: 1rem; align-items: flex-start; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.25rem 1.35rem; }
.guide-step h2 { font-size: 1.2rem; margin-bottom: .35rem; }
.guide-step p { color: var(--ink-soft); margin-bottom: .6rem; }
.guide-icon { flex: 0 0 auto; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 1.35rem; background: var(--amber-100); color: var(--amber-700); }
@media (max-width: 575.98px) { .guide-step { padding: 1rem; gap: .8rem; } .guide-icon { width: 40px; height: 40px; font-size: 1.15rem; } }
.guide-link { display: flex; align-items: center; gap: .8rem; padding: .9rem 1rem; border-radius: var(--radius); background: var(--amber-100); color: var(--forest-950) !important; text-decoration: none !important; }
.guide-link > i:first-child { font-size: 1.35rem; color: var(--amber-700); }
.guide-link strong { display: block; }
.guide-link small { color: var(--ink-soft); }
.faq-list { display: grid; gap: .6rem; }
.faq-item { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 1.15rem; }
.faq-item summary { cursor: pointer; list-style: none; padding: 1rem 0; font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; color: var(--forest); display: flex; justify-content: space-between; gap: 1rem; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 1.4rem; line-height: 1; color: var(--amber-700); transition: transform .2s ease; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { color: var(--ink-soft); padding-bottom: 1rem; margin: 0; }

/* ---- Games page ---- */
.game-card { overflow: hidden; text-decoration: none !important; }
.game-art { height: 132px; font-size: 3rem; color: var(--forest); }
.game-art i { filter: drop-shadow(0 6px 14px rgba(8, 28, 24, .18)); }
.game-play { display: inline-flex; align-items: center; gap: .2rem; background: var(--forest); color: #fff; font-weight: 700; font-size: .8rem; padding: .3rem .7rem; border-radius: 999px; }
.game-card.is-soon { opacity: .75; }

/* ---- "Please confirm before you go" disclaimer (events and programs) ---- */
.confirm-note { display: flex; gap: .65rem; align-items: flex-start; margin-top: .9rem; padding: .8rem .95rem; border-radius: var(--radius);
    background: var(--amber-100); border: 1px solid #f0d9ae; color: var(--ink-soft); font-size: .88rem; line-height: 1.45; }
.confirm-note i { color: var(--amber-700); font-size: 1.05rem; margin-top: .05rem; flex: 0 0 auto; }
.confirm-note strong { color: var(--forest-950); }
