/* algareeda.com — one stylesheet, RTL first. Colours: deep teal + amber. */

/* ---------- Fonts: IBM Plex Sans Arabic (SIL Open Font License), self-hosted ---------- */
@font-face { font-family: 'Plex Arabic'; font-weight: 400; font-display: swap; src: url('fonts/plex-arabic-400-arabic.woff2') format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: 'Plex Arabic'; font-weight: 400; font-display: swap; src: url('fonts/plex-arabic-400-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: 'Plex Arabic'; font-weight: 600; font-display: swap; src: url('fonts/plex-arabic-600-arabic.woff2') format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: 'Plex Arabic'; font-weight: 600; font-display: swap; src: url('fonts/plex-arabic-600-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: 'Plex Arabic'; font-weight: 700; font-display: swap; src: url('fonts/plex-arabic-700-arabic.woff2') format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: 'Plex Arabic'; font-weight: 700; font-display: swap; src: url('fonts/plex-arabic-700-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122, U+2212; }

:root {
    --teal-900: #082c2b;
    --teal-800: #0b3b3a;
    --teal-700: #0f5f5b;
    --teal-100: #dcefec;
    --amber: #f2b134;
    --amber-ink: #8a5a00;       /* amber for text on light backgrounds (AA contrast) */
    --amber-soft: #fdf3dc;
    --hot: #e4572e;
    --ink: #14201f;
    --ink-2: #3f4f4d;
    --muted: #63706e;
    --bg: #f5f3ee;
    --surface: #ffffff;
    --border: #e3e0d8;
    --radius: 14px;
    --shadow: 0 1px 2px rgba(11, 59, 58, .06), 0 6px 20px -12px rgba(11, 59, 58, .25);
    --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1rem; }
body {
    margin: 0;
    font-family: 'Plex Arabic', 'Segoe UI', Tahoma, sans-serif;
    font-size: 17px;
    line-height: 1.75;
    color: var(--ink);
    background: var(--bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-700); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--teal-800); }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.4; margin: 0 0 .5em; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 16px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; inset-inline-start: 8px; top: -60px; z-index: 1000; padding: .5rem 1rem; background: var(--amber); color: var(--teal-900); font-weight: 700; border-radius: 8px; }
.skip-link:focus { top: 8px; }

/* ---------- Header ---------- */
.site-header { background: var(--teal-800); color: #fff; }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 14px; }
.brand { display: flex; align-items: center; gap: .7rem; color: #fff; text-decoration: none; min-width: 0; }
.brand:hover { color: #fff; }
.brand-mark { width: 44px; height: 44px; flex: 0 0 auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.brand-name { font-size: 1.55rem; font-weight: 700; letter-spacing: -.01em; }
.brand-tag { font-size: .82rem; color: #a9c9c6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.header-trending {
    display: inline-flex; align-items: center; gap: .5rem; flex: 0 0 auto;
    padding: .45rem .95rem; border-radius: 999px;
    background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18);
    color: #fff; font-weight: 600; font-size: .9rem; text-decoration: none;
}
.header-trending:hover { background: rgba(255, 255, 255, .15); color: #fff; }

.live-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--hot); box-shadow: 0 0 0 0 rgba(228, 87, 46, .6); animation: pulse 1.8s infinite; flex: 0 0 auto; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(228, 87, 46, .55); } 70% { box-shadow: 0 0 0 8px rgba(228, 87, 46, 0); } 100% { box-shadow: 0 0 0 0 rgba(228, 87, 46, 0); } }

.site-nav { background: var(--teal-900); }
.nav-scroll { display: flex; gap: .25rem; overflow-x: auto; scrollbar-width: none; }
.nav-scroll::-webkit-scrollbar { display: none; }
.nav-scroll a { flex: 0 0 auto; padding: .6rem .85rem; color: #d6e7e5; text-decoration: none; font-weight: 600; font-size: .95rem; border-bottom: 3px solid transparent; }
.nav-scroll a:hover { color: #fff; }
.nav-scroll a[aria-current="page"] { color: #fff; border-bottom-color: var(--amber); }

.trend-strip { background: var(--amber-soft); color: var(--ink); border-bottom: 1px solid #f0dfb5; }
.trend-strip-row { display: flex; align-items: center; gap: .75rem; padding-block: .5rem; overflow: hidden; }
.trend-strip-label { flex: 0 0 auto; font-weight: 700; font-size: .88rem; color: var(--amber-ink); }
.trend-strip-list { display: flex; gap: .4rem; margin: 0; padding: 0; list-style: none; overflow-x: auto; scrollbar-width: none; }
.trend-strip-list::-webkit-scrollbar { display: none; }
.trend-strip-list li { flex: 0 0 auto; }
.trend-strip-list a, .trend-strip-list span { display: block; padding: .15rem .7rem; border-radius: 999px; font-size: .85rem; white-space: nowrap; background: #fff; border: 1px solid #f0dfb5; color: var(--ink-2); text-decoration: none; }
.trend-strip-list a { color: var(--teal-800); font-weight: 600; border-color: var(--amber); }
.trend-strip-list a:hover { background: var(--amber); }

/* ---------- Layout ---------- */
main { padding-block: 24px 48px; }
.layout { display: grid; gap: 28px; }
@media (min-width: 960px) { .layout { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; } .layout-side { position: sticky; top: 16px; } }

.page-title { font-size: 1.7rem; margin-bottom: .4em; }
.page-title-sub { font-size: 1rem; font-weight: 600; color: var(--muted); margin-inline-start: .4rem; }
.page-intro { color: var(--ink-2); margin-top: 0; }
.section-title { font-size: 1.2rem; margin: 2rem 0 1rem; display: flex; align-items: center; gap: .6rem; }
.section-title::after { content: ""; flex: 1; height: 2px; background: var(--border); }
.empty { padding: 2rem; background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius); text-align: center; color: var(--ink-2); }

/* ---------- Cards ---------- */
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0 0 .4rem; font-size: .82rem; }
.cat-label { font-weight: 700; color: var(--teal-700); text-decoration: none; }
.cat-label:hover { text-decoration: underline; }
.search-chip { display: inline-flex; align-items: center; gap: .3rem; padding: .05rem .55rem; border-radius: 999px; background: #fde8e1; color: #a3361a; font-weight: 600; }
.search-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--hot); }
.card-time { font-size: .82rem; color: var(--muted); }

.lead-card { display: grid; background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
@media (min-width: 720px) { .lead-card { grid-template-columns: 1.15fr 1fr; } }
.lead-card { align-items: center; }
.lead-media { align-self: stretch; display: flex; align-items: center; background: var(--teal-800); }
.lead-media img { width: 100%; aspect-ratio: 16 / 9; object-fit: contain; }
.lead-body { padding: 20px 22px; display: flex; flex-direction: column; justify-content: center; }
.lead-title { font-size: 1.55rem; margin-bottom: .4rem; }
.lead-title a, .card-title a { color: var(--ink); text-decoration: none; }
.lead-title a:hover, .card-title a:hover { color: var(--teal-700); text-decoration: underline; }
.lead-summary { color: var(--ink-2); margin: 0 0 .6rem; }

.card-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.card { display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.card-media img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.card-title { font-size: 1.08rem; margin-bottom: .35rem; }
.card-summary { font-size: .93rem; color: var(--ink-2); margin: 0 0 .6rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card .card-time { margin-top: auto; }

.pager { display: flex; justify-content: center; align-items: center; gap: 1rem; margin-top: 2rem; font-weight: 600; }
.pager a { padding: .45rem 1rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); text-decoration: none; }

/* ---------- Sidebar ---------- */
.side-box { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-bottom: 18px; }
.side-title { display: flex; align-items: center; gap: .55rem; font-size: 1.05rem; margin-bottom: .8rem; }
.side-note, .side-text { font-size: .84rem; color: var(--muted); margin: .8rem 0 0; }
.side-text { font-size: .92rem; color: var(--ink-2); margin: 0; }
.trend-rank { list-style: none; margin: 0; padding: 0; }
.trend-rank li { display: flex; gap: .7rem; padding: .55rem 0; border-top: 1px solid var(--border); }
.trend-rank li:first-child { border-top: 0; padding-top: 0; }
.rank-n { flex: 0 0 1.8rem; height: 1.8rem; display: grid; place-items: center; border-radius: 8px; background: var(--teal-100); color: var(--teal-800); font-weight: 700; font-size: .9rem; }
.trend-rank li:nth-child(-n+3) .rank-n { background: var(--amber); color: var(--teal-900); }
.rank-body { display: flex; flex-direction: column; line-height: 1.45; min-width: 0; }
.rank-body a, .rank-topic { font-weight: 600; overflow-wrap: anywhere; }
.rank-topic { color: var(--ink); }
.rank-traffic { font-size: .8rem; color: var(--muted); }

/* ---------- Article ---------- */
.breadcrumbs { display: flex; gap: .4rem; font-size: .88rem; color: var(--muted); margin-bottom: .8rem; }
.breadcrumbs a { color: var(--muted); }
.article-head { margin-bottom: 1rem; }
.article-title { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.25rem); letter-spacing: -.01em; }
.article-summary { font-size: 1.12rem; color: var(--ink-2); margin: 0 0 .8rem; }
.byline { display: flex; flex-wrap: wrap; gap: .45rem; font-size: .88rem; color: var(--muted); margin: 0; }
.byline a { color: var(--ink-2); font-weight: 600; }
.article-figure { margin: 0 0 1.4rem; border-radius: var(--radius); overflow: hidden; }

.why-box { background: var(--amber-soft); border: 1px solid #f0dfb5; border-inline-start: 5px solid var(--amber); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 1.2rem; }
.why-title { display: flex; align-items: center; gap: .55rem; font-size: 1.02rem; margin-bottom: .3rem; color: var(--amber-ink); }
.why-box p { margin: 0; }
.why-box .why-meta { font-size: .88rem; color: var(--ink-2); margin-top: .4rem; }

.key-points { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 20px; margin-bottom: 1.4rem; }
.key-points h2 { font-size: 1.05rem; color: var(--teal-800); }
.key-points ul { margin: 0; padding-inline-start: 1.2rem; }
.key-points li { margin-bottom: .3rem; }
.key-points li::marker { color: var(--amber-ink); }

.article-body { font-size: 1.1rem; line-height: 1.95; }
.article-body h2 { font-size: 1.3rem; margin-top: 1.6em; }
.article-body blockquote { margin: 1.2em 0; padding: .6em 1.1em; border-inline-start: 4px solid var(--teal-700); background: var(--teal-100); border-radius: 0 10px 10px 0; color: var(--ink-2); }
.article-body ul, .article-body ol { padding-inline-start: 1.4rem; }

.sources { margin-top: 2rem; padding-top: 1.2rem; border-top: 2px solid var(--border); }
.sources h2 { font-size: 1.05rem; }
.sources ol { padding-inline-start: 1.4rem; font-size: .95rem; margin: 0; }
.sources li { margin-bottom: .25rem; overflow-wrap: anywhere; }
.src-outlet { color: var(--muted); font-size: .85rem; }
.ai-note { font-size: .86rem; color: var(--muted); margin-top: 1rem; }

.tags { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; margin: 1.2rem 0; }
.tags li { padding: .15rem .75rem; border-radius: 999px; background: var(--teal-100); color: var(--teal-800); font-size: .85rem; font-weight: 600; }

.share { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin: 1.4rem 0; }
.share-label { font-weight: 700; margin-inline-end: .2rem; }
.share-btn { padding: .4rem .95rem; border-radius: 999px; font: inherit; font-size: .9rem; font-weight: 600; color: #fff; text-decoration: none; border: 0; cursor: pointer; }
.share-btn:hover { color: #fff; filter: brightness(1.08); }
.share-btn.wa { background: #1f8f4d; }
.share-btn.fb { background: #1661c9; }
.share-btn.tg { background: #1d87b8; }
.share-btn.x { background: #111; }
.share-btn.copy { background: var(--surface); color: var(--ink); border: 1px solid var(--border); }
.share-btn.copy:hover { color: var(--ink); }

.related-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.related-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .75rem 1rem; border-top: 1px solid var(--border); }
.related-list li:first-child { border-top: 0; }
.related-list a { font-weight: 600; color: var(--ink); text-decoration: none; }
.related-list a:hover { color: var(--teal-700); text-decoration: underline; }
.related-list time { flex: 0 0 auto; font-size: .82rem; color: var(--muted); }

/* ---------- Trending page ---------- */
.trend-table { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.trend-table li { display: flex; gap: .9rem; align-items: flex-start; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; }
.trend-table li:nth-child(-n+3) .rank-n { background: var(--amber); color: var(--teal-900); }
.trend-table li.has-article { border-inline-start: 4px solid var(--teal-700); }
.trend-main { min-width: 0; }
.trend-name { font-weight: 700; font-size: 1.08rem; margin: 0; overflow-wrap: anywhere; }
.trend-sub { font-size: .85rem; color: var(--muted); margin: 0; }
.trend-article { display: inline-block; margin-top: .35rem; font-weight: 600; }
.trend-article::before { content: "← "; }
.story-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.story-list li { padding: .7rem 1rem; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; justify-content: space-between; gap: .2rem 1rem; }
.story-list li:first-child { border-top: 0; }

/* ---------- Weather pages (templates/weather-*.php) ---------- */
.wx-icon { width: 30px; height: 30px; flex: 0 0 auto; vertical-align: middle; }
.wx-answer { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); border-inline-start: 5px solid var(--amber); padding: 14px 18px; margin-bottom: 1.2rem; }
.wx-answer p { margin: 0 0 .5rem; }
.wx-answer p:last-child { margin-bottom: 0; }
.wx-updated { font-size: .86rem; color: var(--muted); }

.wx-now { display: grid; gap: 14px 24px; background: linear-gradient(135deg, var(--teal-800), var(--teal-700)); color: #fff; border-radius: var(--radius); padding: 18px 22px; margin-bottom: 1.2rem; box-shadow: var(--shadow); }
@media (min-width: 640px) { .wx-now { grid-template-columns: auto 1fr; align-items: center; } }
.wx-now-main { display: flex; align-items: center; gap: 14px; }
.wx-now-main .wx-icon { width: 76px; height: 76px; }
.wx-now-temp { font-size: 3.2rem; font-weight: 700; line-height: 1; margin: 0; }
.wx-now-label { margin: .3rem 0 0; color: #d6e7e5; font-weight: 600; }
.wx-now-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px 16px; margin: 0; }
.wx-now-facts div { min-width: 0; }
.wx-now-facts dt { font-size: .8rem; color: #a9c9c6; }
.wx-now-facts dd { margin: 0; font-weight: 700; }
.wx-now .wx-updated { grid-column: 1 / -1; color: #a9c9c6; margin: 0; }

.table-scroll { overflow-x: auto; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.wx-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.wx-table th, .wx-table td { padding: .55rem .8rem; text-align: start; border-top: 1px solid var(--border); white-space: nowrap; }
.wx-table thead th { border-top: 0; background: var(--teal-100); color: var(--teal-800); font-size: .85rem; }
.wx-table tbody th { font-weight: 700; }
.wx-table tbody th a { color: var(--ink); }
.wx-table small { color: var(--muted); font-weight: 400; }
.wx-cond { display: flex; align-items: center; gap: .45rem; }
.wx-table .wx-icon { width: 26px; height: 26px; }
.wx-max { color: #b4441f; font-weight: 700; }
.wx-min { color: var(--teal-700); font-weight: 700; }
.wx-hours tbody tr:nth-child(even) { background: #faf9f6; }

.wx-parts { list-style: none; margin: 0 0 .8rem; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.wx-parts li { display: flex; flex-direction: column; align-items: center; gap: .2rem; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px; text-align: center; }
.wx-parts .wx-icon { width: 40px; height: 40px; }
.wx-parts strong { font-size: 1.4rem; }
.wx-part-name { font-weight: 700; }
.wx-part-name small, .wx-part-label { color: var(--muted); font-size: .85rem; font-weight: 400; }

.wx-nearby { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.wx-nearby li { display: flex; flex-direction: column; background: var(--surface); border-radius: 10px; box-shadow: var(--shadow); padding: 10px 14px; }
.wx-nearby a { font-weight: 700; }
.wx-nearby span { display: flex; align-items: center; gap: .3rem; font-size: .9rem; color: var(--ink-2); }
.wx-nearby .wx-icon { width: 22px; height: 22px; }

.faq-item { background: var(--surface); border-radius: 10px; box-shadow: var(--shadow); margin-bottom: 8px; }
.faq-item summary { cursor: pointer; padding: .75rem 1rem; font-weight: 700; }
.faq-item p { margin: 0; padding: 0 1rem .9rem; color: var(--ink-2); }
.wx-credit { font-size: .84rem; color: var(--muted); margin-top: 1.4rem; }

.side-links-top { margin: 0 0 .6rem; font-weight: 600; }
.side-sub { font-size: .82rem; font-weight: 700; color: var(--muted); margin: .7rem 0 .3rem; }
.city-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.city-links a { display: block; padding: .1rem .65rem; border-radius: 999px; background: var(--teal-100); color: var(--teal-800); font-size: .86rem; font-weight: 600; text-decoration: none; }
.city-links a:hover, .city-links a[aria-current="page"] { background: var(--teal-800); color: #fff; }
.side-news { list-style: none; margin: 0; padding: 0; }
.side-news li { padding: .5rem 0; border-top: 1px solid var(--border); font-weight: 600; line-height: 1.5; }
.side-news li:first-child { border-top: 0; padding-top: 0; }
.side-news time { display: block; font-size: .8rem; color: var(--muted); font-weight: 400; }

/* Weather box on the home and category pages (templates/weather-box.php) */
.wx-box-list { list-style: none; margin: 0; padding: 0; }
.wx-box-list li { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .4rem 0; border-top: 1px solid var(--border); }
.wx-box-list li:first-child { border-top: 0; padding-top: 0; }
.wx-box-list a { font-weight: 600; }
.wx-box-list span { display: flex; align-items: center; gap: .3rem; font-size: .92rem; color: var(--ink-2); }
.wx-box-list .wx-icon { width: 24px; height: 24px; }

/* ---------- Static pages, 404 ---------- */
.prose { max-width: 760px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px 28px; }
.prose h2 { font-size: 1.2rem; margin-top: 1.5em; color: var(--teal-800); }
.contact-email { font-size: 1.1rem; font-weight: 600; }
.notfound { text-align: center; padding: 3rem 1rem; }
.btn { display: inline-block; padding: .55rem 1.3rem; margin: .3rem; border-radius: 999px; background: var(--teal-800); color: #fff; font-weight: 600; text-decoration: none; }
.btn:hover { color: #fff; background: var(--teal-700); }
.btn-ghost { background: transparent; color: var(--teal-800); border: 2px solid var(--teal-800); }
.btn-ghost:hover { color: #fff; }

/* ---------- Footer ---------- */
.site-footer { background: var(--teal-900); color: #c4dad8; font-size: .93rem; }
.footer-grid { display: grid; gap: 24px; padding-block: 36px 20px; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-brand { font-size: 1.3rem; font-weight: 700; color: #fff; margin: 0 0 .4rem; }
.footer-title { font-weight: 700; color: var(--amber); margin: 0 0 .5rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .3rem; }
.site-footer a { color: #e3efee; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); padding-block: 14px 18px; font-size: .84rem; }
.footer-bottom p { margin: 0; }

/* ---------- Back to top button (templates/footer.php) ---------- */
.back-to-top {
    position: fixed;
    bottom: 20px;
    inset-inline-end: 20px;
    z-index: 900;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--teal-700);
    border-radius: 50%;
    background: var(--teal-800);
    color: var(--amber);
    cursor: pointer;
    box-shadow: 0 6px 18px -4px rgba(8, 44, 43, .4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity .25s ease, transform .25s ease, visibility .25s, background-color .15s ease;
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--teal-700); }
.back-to-top:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
@media (max-width: 575.98px) {
    .back-to-top { bottom: 14px; inset-inline-end: 14px; width: 42px; height: 42px; }
}

/* ---------- Small screens ---------- */
@media (max-width: 575.98px) {
    body { font-size: 16px; }
    .brand-name { font-size: 1.3rem; }
    .brand-tag { display: none; }
    .brand-mark { width: 38px; height: 38px; }
    .header-trending { font-size: .82rem; padding: .35rem .75rem; }
    .lead-title { font-size: 1.3rem; }
    .prose { padding: 18px; }
    .article-body { font-size: 1.05rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Guide pages (templates/guide.php) ---------- */
.guide-status { display: inline-block; padding: .1rem .7rem; border-radius: 999px; font-size: .84rem; font-weight: 700; margin-bottom: .5rem !important; }
.guide-status.is-official { background: var(--teal-100); color: var(--teal-800); }
.guide-status.is-expected { background: #fde8e1; color: #a3361a; }
.guide-schedule td { white-space: normal; min-width: 14rem; }
.guide-schedule tr.is-past { color: var(--muted); }
.guide-schedule tr.is-past th::after { content: " (تم)"; font-weight: 400; font-size: .85rem; }
.guide-schedule tr.is-today { background: var(--amber-soft); }
.today-chip { display: inline-block; padding: 0 .5rem; border-radius: 999px; background: var(--amber); color: var(--teal-900); font-size: .8rem; }
.guide-body { margin-top: 1.4rem; }
.guide-body h3 { font-size: 1.12rem; margin-top: 1.2em; }
.guide-body table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); font-size: .98rem; margin: 1em 0; }
.guide-body th, .guide-body td { padding: .5rem .8rem; border-top: 1px solid var(--border); text-align: start; }
.guide-body thead th { background: var(--teal-100); color: var(--teal-800); border-top: 0; }
