/* =========================================================
   ep-design.css — the 2026 design of the classic theme (views in app/Views/themes/classic/ep).
   Loaded only when epDesignOn(). Every rule is scoped to .ep / .ep-* so the old pages keep their own CSS.

   Layout: a light masthead with the logo at full size, one full-width brand bar for navigation,
   then stacked sections — each opened by a brand bar carrying the logo's flame, and laid out in its own grid
   (cards · lead+text · photo+list · mosaic · opinion strip · video band). No black surfaces: depth comes from
   the maroon and its flame accents on warm paper tones.
   ========================================================= */
:root {
  --bg: #f4f1f0;
  --surface: #ffffff;
  --surface-2: #ebe6e5;
  --ink: #221b1b;
  --muted: #6e6564;
  --line: #e0d9d8;
  --brand: #93171e;
  --brand-deep: #6f0f15;
  --brand-text: #93171e;
  --on-brand: #ffffff;
  --on-brand-soft: rgba(255, 255, 255, .16);
  --on-brand-line: rgba(255, 255, 255, .55);
  --flame: #f08a1d;
  --flame-2: #e0452a;
  --on-flame: #2b1407;
  --shade: rgba(84, 12, 17, .86);
  --on-shade: #ffffff;
  --photo-bg: #ddd6d5;
  --shadow: 0 1px 2px rgba(70, 20, 20, .06), 0 8px 22px rgba(70, 20, 20, .06);
  --shadow-up: 0 2px 4px rgba(70, 20, 20, .08), 0 14px 30px rgba(70, 20, 20, .13);
  --logo-light: block;
  --logo-dark: none;
  --font-display: 'Noto Kufi Arabic', 'Segoe UI', Tahoma, sans-serif;
  --font-text: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
  --r: 10px;
}
body.dark-mode {
  --bg: #171313; --surface: #241e1e; --surface-2: #1d1818; --ink: #f1ebea; --muted: #a89f9e; --line: #3a3131;
  --brand: #93171e; --brand-deep: #6f0f15; --brand-text: #f27d83; --on-brand: #ffffff;
  --on-brand-soft: rgba(255, 255, 255, .16); --on-brand-line: rgba(255, 255, 255, .55);
  --flame: #f39a3a; --flame-2: #e8573d; --on-flame: #2b1407; --shade: rgba(66, 10, 14, .9); --on-shade: #ffffff;
  --photo-bg: #2d2626; --shadow: 0 1px 2px rgba(0, 0, 0, .4); --shadow-up: 0 12px 28px rgba(0, 0, 0, .5);
  --logo-light: none; --logo-dark: block;
}

body.ep-on { background: var(--bg); padding-top: 0 !important; } /* the old fixed mobile header reserved space at the top */
.ep { color: var(--ink); font-family: var(--font-text); font-size: 15px; line-height: 1.7; text-align: start; }
/* reset: the old theme styles bare elements (links turn brand-coloured on hover, headings and lists get margins)
   — written with :where() so it never outranks a component rule */
.ep, .ep *, .ep *::before, .ep *::after { box-sizing: border-box; }
:where(.ep) a, :where(.ep) a:hover, :where(.ep) a:focus, :where(.ep) a:active { color: inherit; text-decoration: none; }
:where(.ep) h1, :where(.ep) h2, :where(.ep) h3 { margin: 0; letter-spacing: 0; }
:where(.ep) p { margin: 0; }
:where(.ep) ul, :where(.ep) ol { margin: 0; padding: 0; }
:where(.ep) img { max-width: 100%; }
.ep-logo img, .ep-slide img, .ep-thumb img, .ep-ph img, .ep-over img, .ep-ad img { display: block; }
.ep button { font: inherit; color: inherit; cursor: pointer; }
.ep [hidden], .ep[hidden] { display: none !important; }
.ep-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ep :focus-visible { outline: 2px solid var(--flame); outline-offset: 2px; }
.ep-wrap { max-width: 1180px; margin-inline: auto; padding-inline: 16px; }
.ep-ico { width: 1em; height: 1em; flex: none; fill: currentColor; }
.ep-stripe { height: 4px; background: linear-gradient(to left, var(--flame), var(--flame-2) 45%, var(--brand)); }

/* top strip */
.ep-top { background: var(--surface-2); border-bottom: 1px solid var(--line); font-size: 13px; }
.ep-top .ep-wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 46px; flex-wrap: wrap; padding-block: 6px; }
.ep-date { display: flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; min-width: 0; }
.ep-date .ep-ico { color: var(--brand-text); font-size: 16px; }
.ep-date .hijri { color: var(--muted); }
.ep-top-tools { display: flex; align-items: center; gap: 8px; }
.ep-adlink { font: 600 12.5px var(--font-display); color: var(--brand-text); padding-inline: 4px 8px; }
.ep-soc { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); color: var(--ink); font-size: 14px; transition: background .15s, color .15s, border-color .15s; }
.ep-soc:hover { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.ep-theme-form { margin: 0; display: flex; }
.ep-theme { height: 30px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); display: inline-flex; align-items: center; gap: 6px; padding: 0 9px; font-size: 14px; color: var(--brand-text); }

/* masthead */
.ep-head .ep-wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 18px; }
.ep-brand { display: flex; align-items: center; gap: 18px; min-width: 0; }
.ep-logo img { height: 92px; width: auto; }
.ep-logo .l-light { display: var(--logo-light); }
.ep-logo .l-dark { display: var(--logo-dark); }
.ep-editor { border-inline-start: 3px solid var(--flame); padding-inline-start: 12px; line-height: 1.5; }
.ep-editor small { display: block; color: var(--brand-text); font: 600 12px var(--font-display); }
.ep-editor strong { font: 700 15px var(--font-display); white-space: nowrap; }
.ep-head-ad { flex: 0 1 728px; min-width: 0; }
.ep-head-ad img { width: 100%; height: auto; border-radius: 6px; }

/* navigation bar */
.ep-nav { background: var(--brand); color: var(--on-brand); box-shadow: 0 4px 14px rgba(111, 15, 21, .28); position: sticky; top: 0; z-index: 1000; }
.ep-nav > .ep-wrap { display: flex; align-items: stretch; min-height: 54px; }
.ep-nav-links { display: flex; align-items: stretch; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.ep-nav-links::-webkit-scrollbar { display: none; }
.ep-nav-links a { display: flex; align-items: center; padding: 0 13px; font: 600 14.5px var(--font-display); white-space: nowrap; border-bottom: 3px solid transparent; border-top: 3px solid transparent; transition: background .15s, border-color .15s; }
.ep-nav-links a:hover { background: var(--brand-deep); border-bottom-color: var(--on-brand-line); }
.ep-nav-links a.is-on { background: var(--brand-deep); border-bottom-color: var(--flame); }
.ep-nav-links a .ep-ico { font-size: 19px; }
.ep-nav-tools { display: flex; align-items: stretch; flex: none; }
.ep-nav-btn { background: none; border: 0; display: flex; align-items: center; gap: 7px; padding: 0 13px; font: 600 14.5px var(--font-display); }
.ep-nav-btn:hover, .ep-nav-btn[aria-expanded="true"] { background: var(--brand-deep); }
.ep-nav-btn .ep-ico { font-size: 19px; }
.ep-drawer { background: var(--brand-deep); color: var(--on-brand); position: absolute; top: 100%; inset-inline: 0; max-height: calc(100vh - 60px); overflow-y: auto; box-shadow: 0 14px 30px rgba(60, 8, 12, .35); }
.ep-drawer .ep-wrap { padding-block: 14px 18px; }
.ep-drawer-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 22px; align-items: start; }
.ep-drawer-links a { display: block; }
.ep-drawer-links a.top { padding: 7px 0; font: 700 14.5px var(--font-display); border-bottom: 1px solid var(--on-brand-soft); }
.ep-drawer-links a.sub { padding: 5px 12px 5px 0; font: 500 13px var(--font-display); opacity: .85; }
.ep-drawer-links a:hover { color: var(--flame); opacity: 1; }
.ep-drawer-user { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; font: 600 14px var(--font-display); position: relative; }
.ep-drawer-user a { display: inline-flex; align-items: center; gap: 7px; }
.ep-drawer-user a:hover { color: var(--flame); }
.ep-drawer-user .dropdown-menu a, .ep-drawer-user .dropdown-menu a:hover { color: var(--ink); }
.ep-drawer-langs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.ep-drawer-langs a { padding: 3px 12px; border-radius: 999px; background: var(--on-brand-soft); font: 600 13px var(--font-display); }
.ep-drawer-langs a.is-on { background: var(--flame); color: var(--on-flame); }
/* the search box keeps the old .search-form class so the instant-search script attaches to it */
.ep .search-form.ep-search { display: block; position: relative; width: auto; right: auto; top: auto; background: none; box-shadow: none; padding: 0; margin-bottom: 14px; z-index: 2; }
.ep-search form { display: flex; gap: 8px; }
.ep-search input { flex: 1; min-width: 0; height: 44px; border-radius: 8px; border: 0; padding: 0 14px; font: 400 15px var(--font-text); background: var(--surface); color: var(--ink); }
.ep .search-form.ep-search button { position: static; width: 52px; height: 44px; border: 0 !important; border-radius: 8px; background: var(--flame); color: var(--on-flame) !important; font-size: 20px; line-height: 1; display: grid; place-items: center; }

/* breaking ticker */
.ep-ticker { display: flex; align-items: stretch; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); margin-top: 16px; overflow: hidden; min-height: 44px; }
.ep-ticker-label { background: var(--brand); color: var(--on-brand); font: 700 13.5px var(--font-display); display: flex; align-items: center; gap: 7px; padding: 0 14px; flex: none; }
.ep-ticker-label .ep-ico { color: var(--flame); font-size: 17px; }
.ep-ticker-text { flex: 1; min-width: 0; display: flex; align-items: center; padding: 0 14px; font: 600 14px var(--font-display); }
.ep-ticker-text a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ep-ticker-text a:hover { color: var(--brand-text); }

/* hero */
.ep-hero { display: grid; grid-template-columns: minmax(0, 2.15fr) minmax(0, 1fr); gap: 22px; margin-top: 16px; align-items: stretch; }
.ep-slider { position: relative; min-width: 0; }
.ep-slide-frame { position: relative; aspect-ratio: 16 / 9; max-width: 100%; border-radius: 14px; overflow: hidden; background: var(--photo-bg); box-shadow: var(--shadow); }
.ep-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .45s ease, visibility .45s; }
.ep-slide.is-on { opacity: 1; visibility: visible; }
.ep-slide > a > img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; }
.ep a.ep-badge:hover { color: var(--on-flame); }
.ep-badge { position: absolute; top: 14px; inset-inline-start: 14px; background: var(--flame); color: var(--on-flame); font: 700 12.5px var(--font-display); padding: 3px 11px; border-radius: 999px; }
.ep-cap { position: absolute; inset-inline: 40px; bottom: 0; background: var(--shade); color: var(--on-shade); border-inline-start: 4px solid var(--flame); border-radius: 12px 12px 0 0; padding: 13px 20px 15px; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.ep-cap h2, .ep-cap h3 { margin: 0; font: 700 22px/1.6 var(--font-display); text-wrap: balance; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ep-cap a:hover { color: var(--flame); }
.ep-cap time { font-size: 12px; opacity: .85; }
.ep-thumbs-row { position: relative; padding-inline: 40px; }
.ep-thumbs { background: linear-gradient(to left, var(--brand), var(--brand-deep)); border-radius: 0 0 14px 14px; padding: 8px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; }
.ep-thumb { padding: 0; border: 2px solid transparent; border-radius: 6px; overflow: hidden; background: var(--photo-bg); aspect-ratio: 16 / 10; opacity: .7; transition: opacity .15s, border-color .15s; }
.ep-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ep-thumb:hover, .ep-thumb.is-on { opacity: 1; }
.ep-thumb.is-on { border-color: var(--flame); }
.ep-arrow { position: absolute; top: 50%; translate: 0 -50%; width: 32px; height: 32px; border: 0; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow); color: var(--brand-text); font-size: 17px; display: grid; place-items: center; transition: background .15s, color .15s; }
.ep-arrow.prev { inset-inline-start: 2px; }
.ep-arrow.next { inset-inline-end: 2px; }
.ep-arrow:hover { background: var(--brand); color: var(--on-brand); }
.ep-side { min-width: 0; }
.ep-side-in { display: grid; gap: 14px; align-content: start; }
/* two image banners beside the slider: together exactly as tall as the slider, each scaled whole (never cropped) */
.ep-side--fit { position: relative; }
.ep-side--fit .ep-side-in { position: absolute; inset: 0; display: flex; flex-direction: column; }
.ep-side--fit .ep-ad--img, .ep-ads .ep-ad--img, .ep-side--fit .ep-ad--img :is(p, a), .ep-ads .ep-ad--img :is(p, a) { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; margin: 0; }
.ep-side--fit .ep-ad--img img, .ep-ads .ep-ad--img img { flex: 1 1 auto; min-height: 0; width: 100%; height: auto; object-fit: contain; }
/* in these fixed slots the artwork is always shown whole; spare room around it is filled with a blurred copy of itself */
.ep-side--fit .ep-ad--img, .ep-ads .ep-ad--img, .ep-wide .ep-ad--img { position: relative; isolation: isolate; background: var(--photo-bg) var(--img, none) center / cover no-repeat; }
.ep-side--fit .ep-ad--img::before, .ep-ads .ep-ad--img::before, .ep-wide .ep-ad--img::before { content: ""; position: absolute; inset: -24px; z-index: -1; background: inherit; filter: blur(20px); }
.ep-ad { display: block; background: var(--surface); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); }
.ep-ad img { width: 100%; height: auto; }

/* market prices */
.ep-prices { display: flex; align-items: stretch; background: var(--surface); color: var(--ink); border-radius: var(--r); box-shadow: var(--shadow); margin-top: 20px; overflow: hidden; min-height: 46px; }
.ep-prices-label { background: var(--brand); color: var(--on-brand); font: 700 13.5px var(--font-display); display: flex; align-items: center; gap: 8px; padding: 0 14px; flex: none; }
.ep-prices-label .ep-ico { color: var(--flame); font-size: 16px; }
.ep-prices .vr-prices-track-wrap { flex: 1; min-width: 0; }
.ep-prices .vr-price-item { height: 46px; padding: 0 18px; border-right: 1px solid var(--line); }
.ep-prices .vr-price-name { color: var(--muted); font: 600 12.5px var(--font-text); }
.ep-prices .vr-price-val { color: var(--brand-text); font: 800 15px var(--font-text); letter-spacing: 0; }
.ep-prices .vr-price-unit { color: var(--muted); font-size: 11px; }
.ep-prices .vr-price-chg.flat { color: var(--muted); background: var(--surface-2); }
.ep-prices .vr-prices-loading { color: var(--muted); }

/* section bar */
.ep-sec { margin-top: 34px; }
.ep-bar { display: flex; align-items: center; gap: 8px 12px; background: linear-gradient(to left, var(--brand), var(--brand-deep)); color: var(--on-brand); border-radius: var(--r); padding: 9px 14px; min-height: 48px; }
.ep-bar > .ep-ico { color: var(--flame); font-size: 23px; }
.ep-bar h2 { margin: 0; font: 700 18px/1.5 var(--font-display); white-space: nowrap; color: inherit; }
.ep-bar h2 a:hover { color: var(--flame); }
.ep-bar .rule { flex: 1; min-width: 12px; height: 1px; background: var(--on-brand-line); position: relative; }
.ep-bar .rule::before, .ep-bar .rule::after { content: ""; position: absolute; top: -3px; width: 1px; height: 7px; background: var(--on-brand-line); }
.ep-bar .rule::before { inset-inline-start: 0; }
.ep-bar .rule::after { inset-inline-end: 0; }
.ep-bar .more { display: inline-flex; align-items: center; gap: 3px; font: 600 12.5px var(--font-display); white-space: nowrap; background: var(--on-brand-soft); border-radius: 999px; padding: 3px 8px 3px 12px; transition: background .15s, color .15s; }
[dir="rtl"] .ep-bar .more { padding: 3px 12px 3px 8px; }
.ep-bar .more:hover { background: var(--flame); color: var(--on-flame); }
.ep-tabs { display: flex; gap: 4px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.ep-tabs::-webkit-scrollbar { display: none; }
.ep-tabs button { background: none; border: 0; font: 600 12.5px var(--font-display); padding: 4px 11px; border-radius: 999px; white-space: nowrap; }
.ep-tabs button.is-on, .ep-tabs button:hover { background: var(--on-brand-soft); }
.ep-body { margin-top: 16px; }

/* cards */
.ep-card { background: var(--surface); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; min-width: 0; transition: translate .2s ease, box-shadow .2s ease; }
.ep-card:hover, .ep-mini:hover { translate: 0 -3px; box-shadow: var(--shadow-up); }
.ep-ph { display: block; overflow: hidden; background: var(--photo-bg); aspect-ratio: 16 / 9.5; max-width: 100%; position: relative; }
.ep-ph img { width: 100%; height: 100%; object-fit: cover; transition: scale .35s ease; }
.ep-card:hover .ep-ph img, .ep-mini:hover .ep-ph img, .ep-lead:hover .ep-ph img, .ep-over:hover > a > img { scale: 1.04; }
.ep-card h3 { margin: 0; padding: 11px 14px 2px; font: 600 16px/1.8 var(--font-display); text-wrap: balance; }
.ep-card h3 a:hover, .ep-mini h3 a:hover, .ep-op h3 a:hover, .ep-rank a:hover, .ep-lead-text h3 a:hover { color: var(--brand-text); }
.ep-meta { padding: 2px 14px 12px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; margin-top: auto; }
.ep-mini { display: grid; grid-template-columns: 104px minmax(0, 1fr); background: var(--surface); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); min-width: 0; transition: translate .2s ease, box-shadow .2s ease; }
.ep-mini .ep-ph { aspect-ratio: auto; height: 100%; min-height: 92px; }
.ep-mini h3 { margin: 0; padding: 9px 12px 2px; font: 600 14.5px/1.8 var(--font-display); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ep-mini .ep-meta { padding: 0 12px 8px; }
.ep-mini.lg { grid-template-columns: 190px minmax(0, 1fr); }
.ep-mini.lg h3 { font-size: 15.5px; -webkit-line-clamp: 3; }
.ep-over { position: relative; border-radius: var(--r); overflow: hidden; background: var(--photo-bg); box-shadow: var(--shadow); min-height: 300px; min-width: 0; }
.ep-over > a > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: scale .35s ease; }
.ep-over .ep-cap { inset-inline: 28px; }
.ep-over .ep-cap h3 { font-size: 17.5px; line-height: 1.7; }

/* grids */
.ep-split { display: grid; grid-template-columns: minmax(0, 2.15fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.ep-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.ep-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.ep-grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.ep-stack { display: grid; gap: 16px; }
.ep-lead-row { display: grid; grid-template-columns: minmax(0, 2.05fr) minmax(0, 1fr); gap: 18px; }
.ep-lead { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); background: var(--surface); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); min-width: 0; }
.ep-lead .ep-ph { aspect-ratio: auto; height: 100%; min-height: 320px; }
.ep-lead-text { display: flex; flex-direction: column; padding: 20px 18px 16px; min-width: 0; }
.ep-lead-text::before { content: ""; width: 46px; height: 4px; border-radius: 2px; background: linear-gradient(to left, var(--flame), var(--flame-2)); margin-bottom: 12px; flex: none; }
.ep-lead-text h3 { margin: 0 0 8px; font: 700 18px/1.75 var(--font-display); text-wrap: balance; }
.ep-lead-text p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.9; }
.ep-lead-text time { display: block; margin-top: auto; padding-top: 10px; font-size: 12px; color: var(--muted); }
.ep-photo-list { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 18px; }
.ep-mosaic { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.ep-mosaic .ep-card h3 { font-size: 14.5px; }

/* opinion strip */
.ep-op { display: grid; grid-template-columns: minmax(0, 1fr) 76px; gap: 12px; align-items: center; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); border-inline-start: 4px solid var(--brand); padding: 12px 14px; min-width: 0; }
.ep-op h3 { margin: 0; font: 600 15px/1.8 var(--font-display); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ep-op .ep-ph { aspect-ratio: 1; border-radius: 50%; border: 2px solid var(--flame); }
.ep-op time { font-size: 12px; color: var(--muted); }

/* most read */
.ep-rank { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); margin: 0; padding: 4px 14px; list-style: none; counter-reset: rank; }
.ep-rank li { counter-increment: rank; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; align-items: start; padding: 11px 0; border-bottom: 1px solid var(--line); }
.ep-rank li:last-child { border-bottom: 0; }
.ep-rank li::before { content: counter(rank); font: 800 24px/1.25 var(--font-text); color: var(--flame-2); text-align: center; font-variant-numeric: tabular-nums; }
.ep-rank a { font: 600 14px/1.8 var(--font-display); display: block; }
.ep-rank time { font-size: 12px; color: var(--muted); }

/* video band */
.ep-video { background: linear-gradient(135deg, var(--brand-deep), var(--brand) 75%); border-radius: 16px; padding: 12px 16px 18px; color: var(--on-brand); }
.ep-video .ep-bar { background: none; padding-inline: 2px; }
.ep-video .ep-body { margin-top: 8px; }
.ep-video .ep-card { color: var(--ink); box-shadow: none; }
.ep-video .ep-card h3 { font-size: 14.5px; }
.ep-play { position: absolute; inset: 0; margin: auto; width: 48px; height: 48px; border-radius: 50%; background: var(--flame); color: var(--on-flame); display: grid; place-items: center; font-size: 20px; box-shadow: 0 0 0 6px var(--on-brand-soft); }

/* ads between sections */
.ep-ads-wrap { margin-top: 34px; }
.ep-ads-label { display: flex; align-items: center; gap: 12px; color: var(--muted); font: 600 11.5px var(--font-display); margin-bottom: 10px; }
.ep-ads-label::before, .ep-ads-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.ep-ads { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; }
/* three per row, all the same size (square: the shape of most of the banners); a shorter last row is centred */
.ep-ads .ep-ad { flex: 0 0 calc((100% - 36px) / 3); max-width: calc((100% - 36px) / 3); }
.ep-ads .ep-ad--img { aspect-ratio: 1 / 1; }
/* page-width banners, one above the other: as tall as the artwork needs, up to 250px */
.ep-wide { display: grid; gap: 14px; }
.ep-wide .ep-ad--img :is(p, a) { display: block; margin: 0; }
.ep-wide .ep-ad--img img { display: block; width: 100%; height: auto; max-height: 250px; object-fit: contain; }

/* prayer times + weather: the existing widgets (vr-widgets.js), re-dressed in light surfaces */
.ep-services { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 18px; margin-top: 34px; align-items: start; }
.ep-svc { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; min-width: 0; }
.ep-svc h2 { display: flex; align-items: center; gap: 8px; padding: 12px 16px; font: 700 15px var(--font-display); color: var(--brand-text); border-bottom: 1px solid var(--line); }
.ep-svc .vr-prayer-body { background: transparent !important; border-radius: 0; }
.ep-svc .vr-prayer-date-bar { border-bottom: 1px solid var(--line); }
.ep-svc .vr-prayer-date-hijri { color: var(--brand-text); }
.ep-svc .vr-prayer-date-miladi { color: var(--muted); }
.ep-svc .vr-prayer-list { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; padding: 12px 14px; }
.ep-svc .vr-prayer-item { flex-direction: column; gap: 2px; padding: 8px 4px; border: 1px solid var(--line); border-radius: 10px; text-align: center; }
.ep-svc .vr-prayer-item:hover { background: var(--bg); }
.ep-svc .vr-prayer-item.vr-prayer-next, .rtl-mode .ep-svc .vr-prayer-item.vr-prayer-next { background: var(--brand); border: 1px solid var(--brand); }
.ep-svc .vr-prayer-icon { width: auto; opacity: 1; }
.ep-svc .vr-prayer-name { flex: none; margin: 0; color: var(--ink); }
.ep-svc .vr-prayer-time { color: var(--ink); }
.ep-svc .vr-prayer-item.vr-prayer-next .vr-prayer-name, .ep-svc .vr-prayer-item.vr-prayer-next .vr-prayer-time { color: var(--on-brand); }
.ep-svc .vr-prayer-next-badge, .ep-svc .vr-prayer-source { display: none; }
.ep-svc .vr-prayer-countdown { display: flex; justify-content: center; align-items: baseline; gap: 10px; padding: 8px 14px 10px; border-top: 1px solid var(--line); }
.ep-svc .vr-prayer-countdown-label { margin: 0; font-size: 12px; color: var(--muted); }
.ep-svc .vr-prayer-countdown-time { font-size: 18px; color: var(--brand-text); }
.ep-svc .vr-weather-body { border-radius: 0; }

/* tags */
.ep-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ep-chips a { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px 14px; font: 600 13px var(--font-display); }
.ep-chips a:hover { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }

/* blocks that keep the old markup (ad spaces, polls, "latest posts" with its load-more) */
.ep .col-bn-ds, .ep .col-bn-mb { float: none; width: auto; padding: 0; min-height: 0; }
.ep .col-bn-ds > .row, .ep .col-bn-mb > .row { margin: 0; }
.ep-adspace { margin-top: 30px; }
/* an AdSense unit that Google did not fill can stay on the page as an empty box (up to ~350px tall):
   take the whole ad space out of the layout until the unit reports "filled" */
body.ep-on .col-bn-ds:has(ins.adsbygoogle[data-ad-status]:not([data-ad-status="filled"])),
body.ep-on .col-bn-mb:has(ins.adsbygoogle[data-ad-status]:not([data-ad-status="filled"])) { display: none !important; }
body.ep-on ins.adsbygoogle[data-ad-status]:not([data-ad-status="filled"]) { display: none !important; }
.ep-panel { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px; overflow: hidden; }
.ep-panel > .row { margin-inline: 0; }
.ep-legacy a:hover { color: var(--brand-text); }

/* footer */
.ep-foot { background: var(--surface); color: var(--ink); margin-top: 40px; }
.ep-foot-main { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1.2fr); gap: 34px; padding-block: 30px; }
.ep-foot .ep-logo { display: inline-block; margin-bottom: 12px; }
.ep-foot .ep-logo img { height: 74px; }
.ep-foot p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.9; }
.ep-foot .ep-editor { margin-top: 14px; }
.ep-foot-cats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ep-foot-main > div > :last-child { margin-bottom: 0; }
.ep-foot-links + h2, .ep-foot-soc + h2 { margin-top: 0; }
.ep-foot h2 { margin: 0 0 12px; font: 700 15px var(--font-display); color: var(--brand-text); display: flex; align-items: center; gap: 10px; }
.ep-foot h2::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.ep-foot-links { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 7px; }
.ep-foot-links a { font: 500 13.5px var(--font-display); }
.ep-foot-links a:hover { color: var(--brand-text); }
.ep-foot .ep-soc { background: var(--bg); width: 36px; height: 36px; font-size: 16px; }
.ep-foot .ep-soc:hover { background: var(--brand); }
.ep-foot-soc { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.ep-news { margin: 0 0 18px; }
.ep-news .newsletter { display: flex; gap: 8px; width: auto; height: auto; position: static; }
.ep-news input[name="url"] { display: none; }
.ep-news .newsletter-input { flex: 1; min-width: 0; height: 40px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); padding: 0 12px; font: 400 14px var(--font-text); }
.ep-news input::placeholder { color: var(--muted); }
.ep-news .newsletter .newsletter-button { position: static; width: auto; float: none; height: 40px; border: 0; border-radius: 8px; padding: 0 16px; background: var(--brand); color: var(--on-brand); font: 700 13.5px var(--font-display); }
.ep-foot-bottom { background: linear-gradient(to left, var(--brand), var(--brand-deep)); color: var(--on-brand); font-size: 12.5px; }
.ep-foot-bottom .ep-wrap { display: flex; justify-content: space-between; gap: 10px 20px; flex-wrap: wrap; padding-block: 12px; }
.ep-foot-bottom a { text-decoration: underline; text-underline-offset: 3px; }
.ep-foot-bottom a:hover { color: var(--flame); }

@media (max-width: 980px) {
  .ep-head .ep-wrap { flex-direction: column; gap: 12px; padding-block: 14px; }
  .ep-head-ad { flex: none; width: 100%; max-width: 728px; }
  .ep-logo img { height: 74px; }
  .ep-hero, .ep-split, .ep-lead-row, .ep-photo-list, .ep-mosaic { grid-template-columns: minmax(0, 1fr); }
  .ep-side-in { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ep-side--fit .ep-side-in { position: static; display: grid; }
  .ep-grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ep-foot-main { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ep-foot-about { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .ep-date .hijri { display: none; }
  .ep-adlink { display: none; }
  .ep-logo img { height: 62px; }
  .ep-editor strong { font-size: 14px; }
  .ep-nav-btn span { display: none; }
  .ep-cap { inset-inline: 12px; padding: 9px 12px 10px; }
  .ep-cap h2, .ep-cap h3 { font-size: 15.5px; }
  .ep-over .ep-cap { inset-inline: 12px; }
  .ep-over .ep-cap h3 { font-size: 15.5px; }
  .ep-over { min-height: 230px; }
  .ep-thumbs-row { padding-inline: 12px; }
  .ep-thumbs { gap: 6px; padding: 6px; }
  .ep-thumb:nth-child(n+5) { display: none; }
  .ep-arrow { display: none; }
  .ep-side-in, .ep-side--fit .ep-side-in { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .ep-ads .ep-ad { flex-basis: 100%; max-width: 340px; }
  .ep-side .ep-ad { max-width: 340px; }
  .ep-grid2, .ep-grid3 { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .ep-grid4 { gap: 12px; }
  .ep-lead { grid-template-columns: minmax(0, 1fr); }
  .ep-lead .ep-ph { min-height: 0; aspect-ratio: 16 / 9.5; height: auto; }
  .ep-mini.lg { grid-template-columns: 124px minmax(0, 1fr); }
  .ep-bar { flex-wrap: wrap; }
  .ep-bar h2 { font-size: 16.5px; }
  .ep-bar .ep-tabs { order: 9; flex-basis: 100%; }
  .ep-video { padding-inline: 12px; }
  .ep-services { grid-template-columns: minmax(0, 1fr); }
  .ep-svc .vr-prayer-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ep-foot-main { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .ep *, .ep *::before, .ep *::after { transition: none !important; }
}

/* ---------- inside the old pages (article, category, search…) the new chrome sits around the old content ---------- */
.ep-home { padding-bottom: 8px; }
body.ep-on #wrapper { margin-top: 18px; }
body.ep-on .scrollup, body.ep-on .scrollup i { background-color: var(--brand) !important; border-radius: 50% !important; }
body.ep-on .scrollup:hover, body.ep-on .scrollup:hover i { background-color: var(--brand-deep) !important; }

/* =========================================================
   INNER PAGES — article, category, tag, search, static pages, profile, sign-up…
   These pages keep their own templates (and the markup their scripts and "load more" rely on);
   the rules below dress that markup in the same surfaces, bars and type as the home page.
   ========================================================= */
:root { --ep-flame-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12.5 2C13 5.5 17 8 17 13a5 5 0 0 1-10 0c0-2 .8-3.6 2-5 .2 1.6.9 2.6 2 3C10.6 8 11.2 4.6 12.5 2zM6 20h12v2H6v-2z'/%3E%3C/svg%3E"); }

body.ep-on #wrapper { margin-top: 0; padding-top: 18px; padding-bottom: 8px; background: transparent; color: var(--ink); }
body.ep-on #wrapper .container { width: auto; max-width: 1180px; padding-inline: 16px; }
/* the old content blocks are floats; on phones the columns are not, so each column must contain its own floats
   (otherwise the new, non-floated column beside it is squeezed to zero width next to them) */
body.ep-on #content, body.ep-on #sidebar { display: flow-root; }

/* breadcrumb */
body.ep-on .page-breadcrumb .breadcrumb, body.ep-on .nav-breadcrumb .breadcrumb { background: none; padding: 0; margin: 0 0 12px; font: 600 12.5px var(--font-display); }
body.ep-on .breadcrumb .breadcrumb-item a, body.ep-on .breadcrumb .breadcrumb-item span, body.ep-on .breadcrumb > .active { color: var(--muted); }
body.ep-on .breadcrumb .breadcrumb-item a:hover { color: var(--brand-text); }

/* page titles and section heads become the brand bar */
body.ep-on .page-title, body.ep-on #wrapper .section .section-head {
  display: flex; align-items: center; gap: 10px; min-height: 48px; margin: 0 0 16px !important; padding: 9px 14px !important;
  background: linear-gradient(to left, var(--brand), var(--brand-deep)) !important; color: var(--on-brand) !important;
  border: 0 !important; border-radius: var(--r); font: 700 18px/1.5 var(--font-display); float: none; width: auto;
}
body.ep-on .page-title::before, body.ep-on #wrapper .section .section-head::before {
  content: ""; flex: none; width: 23px; height: 23px; background: var(--flame);
  -webkit-mask: var(--ep-flame-mask) center / contain no-repeat; mask: var(--ep-flame-mask) center / contain no-repeat;
}
body.ep-on #wrapper .section .section-head::after { display: none; }
body.ep-on .page-title span, body.ep-on .page-title strong { color: inherit; font: inherit; }
body.ep-on #wrapper .section .section-head .title, body.ep-on #wrapper .section .section-head .title a {
  margin: 0; padding: 0 !important; background: none !important; border: 0 !important; border-radius: 0 !important;
  color: var(--on-brand) !important; font: 700 18px/1.5 var(--font-display) !important; float: none;
}

/* post cards in lists (category, tag, search, all posts, related posts) — also what "load more" appends */
body.ep-on #content .post-item, body.ep-on #content .post-item-mid {
  position: relative; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 20px;
  transition: translate .2s ease, box-shadow .2s ease;
}
body.ep-on #content .post-item:hover, body.ep-on #content .post-item-mid:hover { translate: 0 -3px; box-shadow: var(--shadow-up); }
/* one picture ratio for every card, whichever of the old image markups a post uses */
body.ep-on #content .post-item .post-item-image, body.ep-on #content .post-item-mid .post-item-image { position: relative; height: auto !important; aspect-ratio: 16 / 9.5; margin: 0; border-radius: 0; overflow: hidden; background: var(--photo-bg); }
body.ep-on #content .post-item .post-item-image > a, body.ep-on #content .post-item-mid .post-item-image > a { display: block; height: 100%; }
body.ep-on #content .post-item .post-item-image img, body.ep-on #content .post-item-mid .post-item-image img { width: 100% !important; height: 100% !important; max-width: none; object-fit: cover; }
body.ep-on #content .post-item .post-item-image .img-container, body.ep-on #content .post-item-mid .post-item-image .img-container { position: absolute; inset: 0; width: 100% !important; height: 100% !important; }
body.ep-on #content .post-item .title, body.ep-on #content .post-item-mid .title { margin: 0; padding: 11px 14px 2px; font: 600 16px/1.8 var(--font-display); }
body.ep-on #content .post-item-mid .title { font-size: 14.5px; }
body.ep-on #content .post-item .title a, body.ep-on #content .post-item-mid .title a { color: var(--ink); }
body.ep-on #content .post-item .title a:hover, body.ep-on #content .post-item-mid .title a:hover { color: var(--brand-text); }
body.ep-on #content .post-item .post-meta, body.ep-on #content .post-item-mid .post-meta { margin: 0; padding: 2px 14px 10px; font-size: 12px; color: var(--muted); }
body.ep-on #content .post-item .description { margin: 0; padding: 0 14px 14px; font-size: 13.5px; line-height: 1.9; color: var(--muted); }
body.ep-on #content .post-item .category-label { border-radius: 999px; font: 700 12px var(--font-display); padding: 3px 11px; }
body.ep-on #content .post-item-horizontal { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: 12px; margin-bottom: 16px; }
body.ep-on #content .post-item-horizontal .title a { color: var(--ink); }
body.ep-on #content .post-item-horizontal .title a:hover { color: var(--brand-text); }
body.ep-on #content .text-muted { color: var(--muted); }

/* article */
body.ep-on #postDetailsPage .post-content { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: 22px 24px 18px; }
body.ep-on #postDetailsPage .post-content > .title { margin: 12px 0 10px; font: 700 28px/1.65 var(--font-display); color: var(--ink); text-wrap: balance; }
body.ep-on #postDetailsPage .post-content .category-label { border-radius: 999px; font: 700 12.5px var(--font-display); padding: 3px 12px; }
body.ep-on #postDetailsPage .post-summary { margin: 0 0 14px; padding-inline-start: 14px; border-inline-start: 4px solid var(--flame); }
body.ep-on #postDetailsPage .post-summary h2 { margin: 0; font: 600 16.5px/1.95 var(--font-text); color: var(--muted); }
body.ep-on #postDetailsPage .post-content .post-meta { margin: 0 0 14px; padding: 9px 0; border-block: 1px solid var(--line); font-size: 13px; color: var(--muted); }
body.ep-on #postDetailsPage .post-content .post-meta span, body.ep-on #postDetailsPage .post-content .post-meta span a { color: var(--muted); }
body.ep-on #postDetailsPage .post-image { border-radius: 8px; overflow: hidden; }
body.ep-on #postDetailsPage .post-image img { border-radius: 8px; }
body.ep-on #postDetailsPage .img-description { color: var(--muted); font-size: 12.5px; }
body.ep-on #postDetailsPage .post-text { font-size: 17.5px; line-height: 2.05; color: var(--ink); }
body.ep-on #postDetailsPage .post-text h2, body.ep-on #postDetailsPage .post-text h3, body.ep-on #postDetailsPage .post-text h4 { margin: 1.4em 0 .5em; font-family: var(--font-display); font-weight: 700; line-height: 1.7; color: var(--ink); }
body.ep-on #postDetailsPage .post-text h2 { font-size: 21px; }
body.ep-on #postDetailsPage .post-text h3 { font-size: 19px; }
body.ep-on #postDetailsPage .post-text a { color: var(--brand-text); text-decoration: underline; text-underline-offset: 4px; }
body.ep-on #postDetailsPage .post-text blockquote { margin: 18px 0; padding: 12px 16px; border: 0; border-inline-start: 4px solid var(--flame); border-radius: 6px; background: var(--bg); font-size: inherit; color: var(--ink); }
body.ep-on #postDetailsPage .post-text img { max-width: 100%; height: auto; border-radius: 8px; }
body.ep-on #postDetailsPage .post-tags .tags-title { margin: 18px 0 10px; font: 700 15px var(--font-display); color: var(--brand-text); }
body.ep-on #postDetailsPage .post-tags .tag-list li a { background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 4px 14px; font: 600 13px var(--font-display); color: var(--ink); }
body.ep-on #postDetailsPage .post-tags .tag-list li a:hover { background: var(--brand) !important; border-color: var(--brand) !important; color: var(--on-brand) !important; }
body.ep-on #postDetailsPage .post-next-prev { margin: 18px 0 0; padding: 0; border: 0; }
body.ep-on #postDetailsPage .post-next-prev .left, body.ep-on #postDetailsPage .post-next-prev .right { margin-bottom: 14px; }
body.ep-on #postDetailsPage .post-next-prev p { margin: 0 0 4px; font: 600 12.5px var(--font-display); }
body.ep-on #postDetailsPage .post-next-prev p a, body.ep-on #postDetailsPage .post-next-prev p span { color: var(--brand-text); }
body.ep-on #postDetailsPage .post-next-prev .title { margin: 0; font: 600 14.5px/1.8 var(--font-display); }
body.ep-on #postDetailsPage .post-next-prev .title a { color: var(--ink); }
body.ep-on #postDetailsPage .post-next-prev .title a:hover { color: var(--brand-text); }
body.ep-on #postDetailsPage .emoji-reactions-container, body.ep-on #postDetailsPage .about-author, body.ep-on #postDetailsPage .comment-section {
  background: var(--surface); border: 0; border-radius: var(--r); box-shadow: var(--shadow); padding: 16px 18px; margin: 18px 0;
}
body.ep-on #postDetailsPage .section-related-posts { margin-top: 26px; }
body.ep-on #postDetailsPage #comments { margin-top: 8px; }

/* static pages, contact, RSS list, profile, sign-up boxes */
body.ep-on #content .page-content, body.ep-on .page-contact, body.ep-on .profile-page-top, body.ep-on .widget-followers {
  background: var(--surface); border: 0; border-radius: var(--r); box-shadow: var(--shadow); padding: 18px 22px; color: var(--ink);
}
body.ep-on #content .page-content { font-size: 16.5px; line-height: 2; }
body.ep-on #content .page-content h2, body.ep-on #content .page-content h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.7; color: var(--ink); }
body.ep-on #content .page-content a { color: var(--brand-text); }
body.ep-on .login-box { background: var(--surface); border: 0; border-radius: 12px; box-shadow: var(--shadow-up); }
body.ep-on .login-box .auth-title { font-family: var(--font-display); font-weight: 700; color: var(--ink); }
body.ep-on .widget-followers .widget-head .title { font: 700 15px var(--font-display); color: var(--brand-text); }
body.ep-on .error-404 h1, body.ep-on .error-404 { color: var(--brand-text); }

/* controls */
body.ep-on #wrapper .btn-custom, body.ep-on #wrapper .btn-load-more { border-radius: 8px; font-family: var(--font-display); }
body.ep-on #wrapper .btn-load-more { border: 1px solid var(--brand); color: var(--brand-text); background: var(--surface); }
body.ep-on #wrapper .btn-load-more:hover { background: var(--brand); color: var(--on-brand); }
body.ep-on #wrapper .form-input, body.ep-on #wrapper .form-control { border-radius: 8px; }
body.ep-on #wrapper .pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 8px 0 24px; padding: 0; }
body.ep-on #wrapper .pagination > li > a, body.ep-on #wrapper .pagination > li > span {
  float: none; display: grid; place-items: center; min-width: 38px; height: 38px; margin: 0; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 8px !important; background: var(--surface); color: var(--ink); font: 600 14px var(--font-text);
}
body.ep-on #wrapper .pagination > li > a:hover { border-color: var(--brand); color: var(--brand-text); }
body.ep-on #wrapper .pagination > .active > a, body.ep-on #wrapper .pagination > .active > span { background: var(--brand) !important; border-color: var(--brand) !important; color: var(--on-brand) !important; }

/* the column beside inner pages */
.ep-aside { margin-bottom: 24px; }
.ep-stack--tight { gap: 12px; }
.ep-aside .ep-ad img { width: 100%; height: auto; }
.ep-aside .ep-ad p { margin: 0; }
.ep-panel.ep-foot-soc { margin: 0; }
.ep-svc--narrow .vr-prayer-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }

@media (max-width: 640px) {
  body.ep-on #postDetailsPage .post-content { padding: 16px 14px 14px; }
  body.ep-on #postDetailsPage .post-content > .title { font-size: 21px; line-height: 1.7; }
  body.ep-on #postDetailsPage .post-text { font-size: 16.5px; line-height: 2; }
  body.ep-on .page-title, body.ep-on #wrapper .section .section-head { font-size: 16.5px; }
  body.ep-on #content .page-content, body.ep-on .page-contact { padding: 14px; }
}
