/* ===== Reading ISOC theme =====
 * Built from the society's own logo (navy #003068 crescent and mosque, gold
 * #a88018 calligraphy) and the homepage mockup: white pages, deep navy bands,
 * gold accents and underlines, serif headings over a humanist sans body,
 * prayer times as a row of cards, a navy footer.
 *
 * Token names are stable; pages and inline styles reference them, so a
 * retheme means editing this block only.
 */
:root {
    --bg: #ffffff;
    --bg-soft: #f6f7fa;
    --panel: #ffffff;
    --panel-alt: #eef1f6;

    /* Navy from the logo, and a lighter navy for links and hover. */
    --primary: #003068;
    --primary-dark: #002249;
    --primary-light: #1c4f96;
    --primary-soft: rgba(0, 48, 104, 0.07);
    --on-primary: #ffffff;

    /* Gold: the logo's antique gold for text, a brighter one for buttons. */
    --gold: #a88018;
    --gold-bright: #d4af4f;
    --gold-soft: rgba(212, 175, 79, 0.16);
    --cream: #f7efd8;

    --charcoal: #0b2247;
    --charcoal-soft: #1f3a66;

    --footer-bg: #002249;
    --footer-bar: #001a38;

    --accent: #a88018;
    --accent-soft: rgba(168, 128, 24, 0.14);

    --text: #16213a;
    --text-dim: #4a5670;
    --text-muted: #7b859c;

    --border: #d5dbe6;
    --border-soft: #e6eaf1;
    --shadow: 0 1px 3px rgba(0, 34, 73, 0.06);
    --shadow-lg: 0 10px 30px rgba(0, 34, 73, 0.16);

    --danger: #b0322a;
    --danger-soft: rgba(176, 50, 42, 0.10);
    --ok: #1f7a4d;

    --sans: 'Figtree', 'Segoe UI', system-ui, Arial, sans-serif;
    --serif: 'Lora', Georgia, 'Times New Roman', serif;

    --radius: 6px;
    --radius-sm: 4px;
    --maxw: 1160px;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #0c1626;
        --bg-soft: #111d31;
        --panel: #14213a;
        --panel-alt: #1b2b48;
        --primary: #7fa6e6;
        --primary-dark: #5d8bd6;
        --primary-light: #9dbdf2;
        --primary-soft: rgba(127, 166, 230, 0.12);
        --on-primary: #08132a;
        --gold: #d4af4f;
        --gold-bright: #e6c56a;
        --gold-soft: rgba(212, 175, 79, 0.16);
        --cream: #2a2a1e;
        --charcoal: #061128;
        --charcoal-soft: #16284a;
        --footer-bg: #061128;
        --footer-bar: #030b1c;
        --accent: #d4af4f;
        --accent-soft: rgba(212, 175, 79, 0.16);
        --text: #eef2f8;
        --text-dim: #b5bfd1;
        --text-muted: #8391ab;
        --border: #2b3c5c;
        --border-soft: #1f2f4d;
        --shadow: none;
        --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.5);
        --danger: #f07a72;
        --danger-soft: rgba(240, 122, 114, 0.14);
        --ok: #5fc48f;
    }
}

:root[data-theme="dark"] {
    --bg: #0c1626; --bg-soft: #111d31; --panel: #14213a; --panel-alt: #1b2b48;
    --primary: #7fa6e6; --primary-dark: #5d8bd6; --primary-light: #9dbdf2;
    --primary-soft: rgba(127, 166, 230, 0.12); --on-primary: #08132a;
    --gold: #d4af4f; --gold-bright: #e6c56a; --gold-soft: rgba(212, 175, 79, 0.16); --cream: #2a2a1e;
    --charcoal: #061128; --charcoal-soft: #16284a; --footer-bg: #061128; --footer-bar: #030b1c;
    --accent: #d4af4f; --accent-soft: rgba(212, 175, 79, 0.16);
    --text: #eef2f8; --text-dim: #b5bfd1; --text-muted: #8391ab;
    --border: #2b3c5c; --border-soft: #1f2f4d; --shadow: none; --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.5);
    --danger: #f07a72; --danger-soft: rgba(240, 122, 114, 0.14); --ok: #5fc48f;
}

/* ===== Reset ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--sans); font-size: 16px; font-weight: 400; line-height: 1.6;
    color: var(--text); background: var(--bg); min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
img, svg { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
strong, b { font-weight: 600; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ===== Header ===== */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: var(--panel); border-bottom: 1px solid var(--border-soft);
    box-shadow: 0 1px 0 rgba(0, 34, 73, 0.04);
}
.header-inner {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; height: 70px; position: relative;
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark {
    width: 46px; height: 46px; flex: 0 0 46px; border-radius: 50%;
    background: #fff; display: grid; place-items: center; overflow: hidden;
    color: var(--primary);
}
.brand-mark img { width: 46px; height: 46px; object-fit: cover; border-radius: 50%; }
.brand-mark svg { width: 30px; height: 30px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.brand-name {
    font-family: var(--serif); font-weight: 700; font-size: 1.12rem;
    letter-spacing: 0.04em; text-transform: uppercase; color: var(--primary);
}
.brand-sub {
    font-size: 0.66rem; color: var(--text-dim); margin-top: 3px;
    text-transform: uppercase; letter-spacing: 0.16em; font-weight: 600;
}

.nav { display: flex; align-items: center; gap: 2px; }
.nav a {
    padding: 9px 12px; font-size: 0.94rem; font-weight: 500; color: var(--text);
    border-bottom: 2px solid transparent; transition: color 0.15s, border-color 0.15s;
}
.nav a:hover { color: var(--primary); }
.nav a[aria-current="page"] { color: var(--primary); font-weight: 600; border-bottom-color: var(--gold-bright); }
.nav a.btn-join {
    margin-left: 10px; padding: 9px 20px; border: 1.5px solid var(--gold-bright);
    border-radius: var(--radius); color: var(--primary); font-weight: 600;
}
.nav a.btn-join:hover { background: var(--gold-bright); color: var(--primary-dark); border-bottom-color: var(--gold-bright); }
.nav a.nav-quiet { color: var(--text-muted); font-size: 0.85rem; }

.header-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.nav-toggle {
    display: none; background: none; border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 7px 10px; cursor: pointer; color: var(--primary);
}
.nav-toggle svg { width: 20px; height: 20px; }

@media (max-width: 860px) {
    .nav-toggle { display: block; }
    .header-actions + .nav { margin-left: 0; }
    .nav {
        position: absolute; top: 70px; left: -20px; right: -20px;
        flex-direction: column; align-items: stretch; gap: 0;
        background: var(--panel); border-bottom: 3px solid var(--gold-bright);
        padding: 6px 20px 14px; box-shadow: var(--shadow-lg); display: none;
    }
    .nav.open { display: flex; }
    .nav a { padding: 12px 4px; border-bottom: 1px solid var(--border-soft); }
    .nav a[aria-current="page"] { border-bottom-color: var(--gold-bright); }
    .nav a.btn-join { margin: 10px 0 0; text-align: center; border-bottom: 1.5px solid var(--gold-bright); }
}

/* ===== Headings: serif, navy, with the short gold underline ===== */
.section-head {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 14px; margin-bottom: 20px; flex-wrap: wrap;
}
.section-head h2, .page-head h1 {
    font-family: var(--serif); color: var(--primary); text-transform: uppercase;
    letter-spacing: 0.03em; font-weight: 700; position: relative; padding-bottom: 12px;
}
.section-head h2 { font-size: 1.45rem; }
.page-head h1 { font-size: clamp(1.7rem, 3.6vw, 2.3rem); }
.section-head h2::after, .page-head h1::after {
    content: ''; position: absolute; left: 0; bottom: 0; width: 44px; height: 3px; background: var(--gold-bright);
}
.section-head a { font-size: 0.92rem; color: var(--primary); font-weight: 600; }
.section-head a:hover { color: var(--gold); }
.page-head { padding: 40px 0 10px; }
.page-head p { color: var(--text-dim); margin-top: 16px; max-width: 64ch; font-size: 1.02rem; }

/* ===== Hero ===== */
/* A photo of Whiteknights Lake (Chris j wood, CC BY-SA 4.0, credited in the
   footer) behind a navy tint that is heaviest on the left, under the text,
   and lets the trees and sky through on the right. */
.hero {
    position: relative; color: #fff; padding: 72px 0 120px; overflow: hidden;
    background-color: #002249;
    background-image:
        linear-gradient(100deg, rgba(0, 30, 70, 0.93) 0%, rgba(0, 38, 85, 0.82) 40%, rgba(0, 40, 90, 0.42) 75%, rgba(0, 30, 70, 0.55) 100%),
        url('../images/hero.jpg');
    background-size: cover; background-position: center 40%;
}
.hero::before {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(180deg, rgba(0, 20, 50, 0.15) 0%, transparent 30%, transparent 70%, rgba(0, 20, 50, 0.35) 100%);
}
.hero h1, .hero p.lede, .hero .eyebrow { text-shadow: 0 2px 12px rgba(0, 20, 50, 0.45); }
.hero .wrap { position: relative; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.85fr); gap: 40px; align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; gap: 28px; } }

/* The ayah / hadith / wisdom of the day: a translucent card on the photo. */
.hero-quote {
    background: rgba(0, 22, 55, 0.62); border: 1px solid rgba(212, 175, 79, 0.45);
    border-top: 3px solid var(--gold-bright); border-radius: var(--radius);
    padding: 22px 24px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 10px 30px rgba(0, 10, 30, 0.35);
}
.hero-quote .hq-label {
    font-size: 0.7rem; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase;
    color: var(--gold-bright); margin-bottom: 12px;
}
.hero-quote .hq-arabic {
    font-family: 'Amiri', 'Noto Naskh Arabic', 'Scheherazade New', serif;
    font-size: 1.55rem; line-height: 1.9; color: #fff; text-align: right; margin-bottom: 12px;
}
.hero-quote .hq-en { font-family: var(--serif); font-size: 1.02rem; line-height: 1.6; color: rgba(255, 255, 255, 0.94); }
.hero-quote .hq-ref { margin-top: 12px; font-size: 0.8rem; color: var(--gold-bright); letter-spacing: 0.04em; }
.hero-quote .hq-ref::before { content: '— '; }
@media (max-width: 640px) {
    .hero-quote { padding: 18px; }
    .hero-quote .hq-arabic { font-size: 1.3rem; }
}
.eyebrow {
    display: inline-flex; align-items: center; gap: 14px;
    font-size: 0.74rem; letter-spacing: 0.22em; text-transform: uppercase; font-weight: 600;
    color: rgba(255, 255, 255, 0.85); margin-bottom: 18px;
}
.eyebrow::after { content: ''; width: 48px; height: 2px; background: var(--gold-bright); }
.hero h1 {
    font-family: var(--serif); font-size: clamp(2.2rem, 5.6vw, 3.9rem);
    line-height: 1.08; font-weight: 700; letter-spacing: -0.01em; max-width: 21ch;
}
.hero h1 em { font-style: normal; color: var(--gold-bright); }
.hero p.lede { color: rgba(255, 255, 255, 0.86); margin-top: 18px; max-width: 52ch; font-size: 1.12rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-actions .btn .ico { display: inline-flex; width: 18px; height: 18px; }
.hero-actions .btn .ico svg { width: 18px; height: 18px; }
.hero-actions .btn .short { display: none; }
/* On a phone the five actions become a row of icon tiles with short labels. */
@media (max-width: 640px) {
    .hero-actions { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
    .hero-actions .btn {
        flex-direction: column; gap: 6px; padding: 12px 4px 10px; font-size: 0.7rem; letter-spacing: 0.02em;
        white-space: nowrap;
    }
    .hero-actions .btn .ico { display: inline-flex; width: 24px; height: 24px; }
    .hero-actions .btn .ico svg { width: 24px; height: 24px; }
    .hero-actions .btn .full { display: none; }
    .hero-actions .btn .short { display: inline; }
    .hero-actions .btn-social .wa, .hero-actions .btn-social .ig { display: inline-flex; width: 24px; height: 24px; }
    .hero-actions .btn-social .wa svg, .hero-actions .btn-social .ig svg { width: 24px; height: 24px; }
}
.hero .btn-outline { border-color: rgba(255, 255, 255, 0.85); color: #fff; background: rgba(0, 30, 70, 0.25); }
.hero .btn-outline:hover { background: #fff; color: var(--primary); }
.hero .btn-social { border-color: rgba(255, 255, 255, 0.55); }
.hero .btn-social:hover { background: rgba(255, 255, 255, 0.12); border-color: var(--gold-bright); color: #fff; }
.hero .btn-social span { display: inline-flex; }
.hero .btn-social .wa { color: #5ee08a; }
.hero .btn-social .ig { color: #f2a2c8; }

/* Social links: icon buttons in the footer, and the icon inside the hero button. */
.social { display: flex; gap: 10px; margin-top: 4px; }
.social a {
    display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.3); border-radius: var(--radius);
    color: #fff; font-size: 0.9rem; transition: background 0.15s, border-color 0.15s;
}
.social a:hover { background: rgba(255, 255, 255, 0.1); border-color: var(--gold-bright); color: #fff; }
.social svg { width: 20px; height: 20px; }
.social .wa { color: #5ee08a; }
.social .ig { color: #f2a2c8; }

/* The next-prayer band overlaps the hero's bottom edge, as in the mockup. */
.overlap { margin-top: -64px; position: relative; z-index: 2; }

/* ===== Buttons ===== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 22px; border-radius: var(--radius); font-size: 0.95rem; font-weight: 600;
    cursor: pointer; border: 1.5px solid transparent; background: var(--panel-alt); color: var(--text);
    transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.12s;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn svg { width: 17px; height: 17px; flex: 0 0 17px; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-light); border-color: var(--primary-light); }
.btn-gold { background: var(--gold-bright); border-color: var(--gold-bright); color: #1a1a1a; }
.btn-gold:hover { background: #e0be63; border-color: #e0be63; }
.btn-outline { background: transparent; border-color: var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-sm { padding: 7px 14px; font-size: 0.86rem; }
.btn-wa { background: #25d366; border-color: #25d366; color: #06281a; }
.btn-wa:hover { background: #1eb856; border-color: #1eb856; }
.btn-block { width: 100%; }

/* ===== Cards & sections ===== */
section { padding: 30px 0; }
.card {
    background: var(--panel); border: 1px solid var(--border-soft);
    border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px;
}
.card h3 {
    font-family: var(--serif); font-size: 1.12rem; font-weight: 700; margin-bottom: 6px;
    color: var(--primary); text-transform: uppercase; letter-spacing: 0.03em;
}
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }

/* ===== Next prayer band ===== */
.next-prayer {
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px;
    background: linear-gradient(120deg, #0a2b5e, #003068 60%, #06356f);
    color: #fff; border-radius: var(--radius); padding: 26px 30px;
    box-shadow: var(--shadow-lg); border: 1px solid rgba(212, 175, 79, 0.35);
}
.next-prayer .np-label {
    display: block; color: var(--gold-bright); font-size: 0.74rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.2em; margin-bottom: 6px;
}
.next-prayer .np-name {
    font-family: var(--serif); font-size: 2.3rem; font-weight: 700; line-height: 1.05;
    text-transform: uppercase; letter-spacing: 0.02em;
}
.next-prayer .np-time { font-size: 1.05rem; opacity: 0.88; margin-top: 6px; }
.next-prayer .np-count {
    font-family: var(--serif); font-variant-numeric: tabular-nums; font-size: 2.6rem; font-weight: 700;
    letter-spacing: -0.01em; line-height: 1;
}
.next-prayer .np-count-label {
    font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.22em;
    opacity: 0.8; text-align: right; margin-top: 8px; font-weight: 600;
}
.np-right { text-align: right; padding-left: 24px; border-left: 1px solid rgba(255, 255, 255, 0.2); }
@media (max-width: 600px) { .np-right { border-left: none; padding-left: 0; text-align: left; } }

/* ===== Prayer cards (home) ===== */
.prayer-cards { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
@media (max-width: 900px) { .prayer-cards { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 480px) { .prayer-cards { grid-template-columns: repeat(2, 1fr); gap: 10px; } }
.pcard {
    background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 18px 10px 16px; text-align: center; box-shadow: var(--shadow);
}
.pcard.is-next { background: var(--cream); border-color: var(--gold-bright); }
.pcard.is-past { opacity: 0.72; }
.pcard .picon { width: 30px; height: 30px; margin: 0 auto 8px; color: var(--gold); }
.pcard .picon svg { width: 30px; height: 30px; }
.pcard .pname {
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--primary);
}
.pcard .ptime {
    font-family: var(--serif); font-size: 1.6rem; font-weight: 700; color: var(--text);
    font-variant-numeric: tabular-nums; margin-top: 2px; line-height: 1.15;
}
.pcard .pjam { font-size: 0.78rem; color: var(--text-dim); margin-top: 6px; min-height: 1.2em; }
.pcard .pjam strong { color: var(--gold); font-weight: 700; }

/* ===== Prayer tables ===== */
.prayer-table { width: 100%; border-collapse: collapse; }
.prayer-table th, .prayer-table td { padding: 14px 12px; text-align: left; }
.prayer-table thead th {
    font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.14em;
    color: var(--text-muted); font-weight: 700; border-bottom: 2px solid var(--primary);
}
.prayer-table tbody tr { border-bottom: 1px solid var(--border-soft); }
.prayer-table tbody tr:last-child { border-bottom: none; }
.prayer-table td.time { font-family: var(--serif); font-variant-numeric: tabular-nums; font-weight: 700; font-size: 1.1rem; }
.prayer-table td.jamaah { font-variant-numeric: tabular-nums; color: var(--gold); font-weight: 700; }
.prayer-table .pname { font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--primary); font-size: 0.86rem; }
.prayer-table .parabic { color: var(--text-muted); font-size: 0.95rem; }
.prayer-table tr.is-next { background: var(--cream); box-shadow: inset 4px 0 0 var(--gold-bright); }
.prayer-table tr.is-past td { color: var(--text-muted); }
.prayer-table tr.is-past td.jamaah { color: var(--text-muted); }

.month-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.month-table th, .month-table td { padding: 8px 9px; text-align: right; white-space: nowrap; }
.month-table th:first-child, .month-table td:first-child { text-align: left; }
.month-table thead th {
    position: sticky; top: 0; background: var(--panel);
    font-size: 0.67rem; text-transform: uppercase; letter-spacing: 0.1em;
    color: var(--text-muted); font-weight: 700; border-bottom: 2px solid var(--primary);
}
.month-table tbody tr:nth-child(even) { background: var(--bg-soft); }
.month-table tbody tr.today { background: var(--cream); font-weight: 700; box-shadow: inset 4px 0 0 var(--gold-bright); }
.month-table td { font-variant-numeric: tabular-nums; }
.month-table td small { display: block; font-size: 0.72rem; color: var(--gold); font-weight: 700; line-height: 1.2; }
.month-table.has-jamaat th, .month-table.has-jamaat td { padding: 6px 8px; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

@media (max-width: 560px) {
    .prayer-table .parabic { display: none; }
    .prayer-table .pname + .meta { display: none; }
    .prayer-table th, .prayer-table td { padding: 12px 6px; }
    .prayer-table td.jamaah { font-size: 0.92rem; }
}

/* ===== Badges ===== */
.badge {
    display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px;
    border-radius: 999px; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em;
    text-transform: uppercase; background: var(--panel-alt); color: var(--primary);
}
.badge-event { background: var(--primary); color: #fff; }
.badge-jumuah { background: var(--gold-bright); color: #1a1a1a; }
.badge-urgent { background: var(--danger); color: #fff; }
.badge-notice { background: var(--panel-alt); color: var(--primary); }
.badge-pinned { background: transparent; color: var(--gold); box-shadow: inset 0 0 0 1.5px var(--gold-bright); }
.badge-new { background: var(--primary); color: #fff; }
.meta { font-size: 0.86rem; color: var(--text-muted); }

/* ===== Announcements ===== */
.ann-list { display: grid; gap: 16px; }
.ann {
    background: var(--panel); border: 1px solid var(--border-soft); border-top: 4px solid var(--primary);
    border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px;
}
.ann.is-jumuah { border-top-color: var(--gold-bright); }
.ann.is-urgent { border-top-color: var(--danger); }
.ann.is-notice { border-top-color: var(--border); }
.ann-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.ann h3 { font-family: var(--serif); font-size: 1.15rem; font-weight: 700; line-height: 1.35; color: var(--primary); }
.ann p { color: var(--text-dim); margin-top: 8px; white-space: pre-wrap; }
.ann-meta { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 14px; font-size: 0.86rem; color: var(--text-muted); }
.ann-meta span { display: inline-flex; align-items: center; gap: 6px; }
.ann-meta svg { width: 15px; height: 15px; color: var(--gold); }

/* ===== Q&A ===== */
.qa { background: var(--panel); border: 1px solid var(--border-soft); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.qa + .qa { margin-top: 12px; }
.qa-q {
    width: 100%; text-align: left; background: none; border: none; cursor: pointer;
    padding: 18px 20px; display: flex; gap: 14px; align-items: flex-start; color: inherit;
}
.qa-q:hover { background: var(--bg-soft); }
.qa-q .qmark {
    flex: 0 0 28px; width: 28px; height: 28px; border-radius: 50%;
    background: var(--primary); color: var(--gold-bright); font-family: var(--serif);
    display: grid; place-items: center; font-weight: 700; font-size: 0.9rem;
}
.qa-q .qtext { flex: 1; font-weight: 600; line-height: 1.45; color: var(--primary); }
.qa-q .chev { flex: 0 0 18px; width: 18px; height: 18px; margin-top: 4px; transition: transform 0.2s; color: var(--gold); }
.qa.open .qa-q .chev { transform: rotate(180deg); }
.qa-a { display: none; padding: 0 20px 20px 62px; }
.qa.open .qa-a { display: block; }
.qa-a .atext { color: var(--text-dim); white-space: pre-wrap; }
.qa-a .afoot {
    margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border-soft);
    display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
    font-size: 0.78rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em;
}
@media (max-width: 560px) { .qa-a { padding-left: 20px; } }

/* ===== Forms ===== */
.field { margin-bottom: 20px; }
.field label {
    display: block; font-weight: 700; font-size: 0.78rem; margin-bottom: 7px;
    text-transform: uppercase; letter-spacing: 0.12em; color: var(--primary);
}
.field .hint { font-size: 0.86rem; color: var(--text-muted); margin-bottom: 9px; font-weight: 400; text-transform: none; letter-spacing: 0; }
.field input, .field select, .field textarea {
    width: 100%; padding: 12px 13px; border-radius: var(--radius-sm);
    border: 1px solid var(--border); background: var(--panel); color: var(--text);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.field textarea { min-height: 140px; resize: vertical; line-height: 1.6; }
.field input:focus, .field select:focus, .field textarea:focus {
    outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft);
}
.field .counter { font-size: 0.78rem; color: var(--text-muted); text-align: right; margin-top: 6px; }
.field .counter.over { color: var(--danger); font-weight: 700; }
.checkline { display: flex; gap: 11px; align-items: flex-start; }
.checkline input { width: auto; margin-top: 4px; flex: 0 0 auto; accent-color: var(--primary); }
.checkline label { font-weight: 400; font-size: 0.92rem; color: var(--text-dim); margin: 0; text-transform: none; letter-spacing: 0; }

.notice {
    border-radius: var(--radius-sm); padding: 14px 16px; font-size: 0.92rem;
    border-left: 4px solid var(--border); background: var(--bg-soft); color: var(--text-dim);
}
.notice-ok { background: rgba(31, 122, 77, 0.08); border-left-color: var(--ok); color: var(--ok); }
.notice-err { background: var(--danger-soft); border-left-color: var(--danger); color: var(--danger); }

.privacy-note {
    display: flex; gap: 12px; align-items: flex-start;
    background: var(--cream); border-left: 4px solid var(--gold-bright);
    padding: 16px 18px; font-size: 0.9rem; color: var(--text-dim); margin-bottom: 24px; border-radius: var(--radius-sm);
}
.privacy-note svg { width: 19px; height: 19px; flex: 0 0 19px; color: var(--gold); margin-top: 2px; }

.ref-code {
    font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
    font-size: 1.25rem; font-weight: 700; letter-spacing: 0.1em;
    background: var(--primary); padding: 9px 16px; border-radius: var(--radius-sm);
    display: inline-block; color: var(--gold-bright);
}

/* ===== States ===== */
.empty, .loading { text-align: center; padding: 46px 20px; color: var(--text-muted); }
.empty svg { width: 42px; height: 42px; margin: 0 auto 12px; opacity: 0.35; }
.spinner {
    width: 22px; height: 22px; border-radius: 50%; margin: 0 auto 12px;
    border: 2.5px solid var(--border); border-top-color: var(--gold-bright);
    animation: spin 0.75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.chip {
    padding: 7px 15px; border-radius: 999px; border: 1px solid var(--border);
    background: var(--panel); font-size: 0.86rem; font-weight: 600; cursor: pointer;
    color: var(--text); transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ===== Footer: navy ===== */
.site-footer { margin-top: 56px; background: var(--footer-bg); color: #fff; padding: 40px 0 0; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 28px; justify-content: space-between; padding-bottom: 32px; }
.footer-inner h4 {
    font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.18em;
    color: var(--gold-bright); margin-bottom: 12px; font-weight: 700;
}
.footer-inner li { margin-bottom: 7px; }
.footer-inner a { color: rgba(255, 255, 255, 0.88); font-size: 0.93rem; }
.footer-inner a:hover { color: var(--gold-bright); }
.footer-inner .meta { color: rgba(255, 255, 255, 0.75); }
.footer-bottom {
    padding: 16px 0; background: var(--footer-bar); color: rgba(255, 255, 255, 0.75);
    font-size: 0.82rem; display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between;
    margin-left: calc(-50vw + 50%); margin-right: calc(-50vw + 50%);
    padding-left: max(20px, calc(50vw - var(--maxw) / 2 + 20px));
    padding-right: max(20px, calc(50vw - var(--maxw) / 2 + 20px));
}

/* ===== Alert bell (admin header) ===== */
.bell { position: relative; display: inline-flex; align-items: center; padding: 8px 10px; color: var(--primary); }
.bell:hover { color: var(--gold); }
.bell svg { width: 22px; height: 22px; }
.bell-count {
    position: absolute; top: 2px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px;
    border-radius: 999px; background: var(--danger); color: #fff;
    font-size: 0.68rem; font-weight: 700; line-height: 18px; text-align: center;
}
.bell.has-alerts { color: var(--primary); }

/* ===== Admin ===== */
.admin-shell { max-width: 960px; }
.login-box { max-width: 430px; margin: 60px auto; }
.tabs { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 2px solid var(--border); margin-bottom: 24px; }
.tab {
    padding: 12px 18px; border: none; background: none; cursor: pointer; color: var(--text-dim);
    font-weight: 700; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.1em;
    border-bottom: 3px solid transparent; white-space: nowrap; margin-bottom: -2px;
}
.tab:hover { color: var(--primary); }
.tab.active { color: var(--primary); border-bottom-color: var(--gold-bright); }
.tab .count {
    display: inline-block; margin-left: 7px; padding: 1px 8px; border-radius: 999px;
    background: var(--danger); color: #fff; font-size: 0.72rem;
}
.admin-q {
    background: var(--panel); border: 1px solid var(--border-soft); border-left: 4px solid var(--primary);
    border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; margin-bottom: 14px;
}
.admin-q .aq-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.admin-q .aq-body { font-weight: 600; line-height: 1.5; white-space: pre-wrap; color: var(--primary); }
.admin-q .aq-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.admin-q textarea {
    margin-top: 14px; width: 100%; min-height: 120px; padding: 12px 13px;
    border-radius: var(--radius-sm); border: 1px solid var(--border);
    background: var(--panel); color: var(--text); resize: vertical; line-height: 1.6;
}
.admin-q textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.answered-block {
    margin-top: 14px; padding: 14px 16px; background: var(--bg-soft); border-left: 3px solid var(--gold-bright);
    border-radius: var(--radius-sm); white-space: pre-wrap; color: var(--text-dim); font-size: 0.93rem;
}
.stack { display: grid; gap: 14px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; }
.row > * { flex: 1 1 180px; }
.toast {
    position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(80px);
    background: var(--primary); color: #fff; padding: 13px 22px;
    border-radius: var(--radius); box-shadow: var(--shadow-lg); font-weight: 600;
    font-size: 0.9rem; z-index: 200; opacity: 0; transition: transform 0.25s, opacity 0.25s;
    max-width: calc(100vw - 40px);
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast.err { background: var(--danger); color: #fff; }

@media print {
    .site-header, .site-footer, .btn, .filters, .hero { display: none !important; }
    body { background: #fff; color: #000; }
    .card { box-shadow: none; border: 1px solid #ccc; }
}
