/* Keops theme family "magazine" (konouz design KZD, owner OK 2026-12-06; mockups mds/konouz-design/mockups/, design.css there =
   the approved source). Layout + colours after the Jannah demo (look only: no code, no library). RTL first, logical properties.
   Own class prefix mg- (no clash with the base names); the base atoms (breadcrumb, pager, empty) keep theirs. A site's colours and
   section colours = _private/<site>/customization.css. */

/* ---------- 1. family defaults (a site overrides them in its customization.css) ---------- */
:root {
  --kx-brand: #0088ff; --kx-brand-dark: #0066cc; --kx-night: #1f2024; --kx-night-2: #161619; --kx-hot: #f05555;
  --kx-ink: #2c2f34; --kx-text: #2c2f34; --kx-muted: #767676; --kx-line: #e8e8e8; --kx-band: #f2f3f5; --kx-paper: #fff;
  --kx-radius: 4px; --kx-font: 'Cairo', system-ui, sans-serif; --kx-font-ar: 'Cairo', Tahoma, sans-serif; --kx-wrap: 1200px;
  --kx-font-verse: 'Amiri', 'Cairo', serif;   /* poem verses only (D4, owner 2026-12-06) */
}
/* Amiri (SIL OFL, html/vendor/fonts/amiri/): a browser downloads it only on a page that shows verses */
@font-face { font-family: 'Amiri'; font-weight: 400; font-display: swap; src: url('/html/vendor/fonts/amiri/amiri-400-arabic.woff2') format('woff2'); }
@font-face { font-family: 'Amiri'; font-weight: 700; font-display: swap; src: url('/html/vendor/fonts/amiri/amiri-700-arabic.woff2') format('woff2'); }
/* konouz design — mockup CSS = the future html/themes/magazine/assets/theme.css (+ _private/konouz/customization.css for §1).
   Layout and colours taken from the Jannah demo (look only: no code, no library). RTL first, logical properties everywhere. */

/* ---------- 2. base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 15px/1.75 var(--kx-font); color: var(--kx-ink); background: var(--kx-paper); }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--kx-brand); }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; line-height: 1.45; font-weight: 700; }
p { margin: 0 0 1em; }
.mg-wrap { max-width: var(--kx-wrap); margin-inline: auto; padding-inline: 16px; }
.kx-icon { width: 1em; height: 1em; fill: currentColor; vertical-align: -.125em; flex: none; }
.mg-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.mg-skip { position: absolute; inset-inline-start: 8px; top: -60px; background: var(--kx-brand); color: #fff; padding: 8px 14px; z-index: 99; }
.mg-skip:focus { top: 8px; }
:focus-visible { outline: 3px solid var(--kx-brand); outline-offset: 2px; }

/* ---------- 3. header (Jannah: top bar · logo row + ad · dark menu bar) ---------- */
.mg-top { border-bottom: 1px solid var(--kx-line); font-size: 13px; }
.mg-top .mg-wrap { display: flex; align-items: center; gap: 14px; min-height: 40px; }
.mg-top__date { color: var(--kx-muted); white-space: nowrap; }
.mg-ticker { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.mg-ticker__label { background: var(--kx-hot); color: #fff; padding: 0 10px; line-height: 26px; font-weight: 700; white-space: nowrap; }
.mg-ticker a { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mg-social { display: flex; gap: 2px; margin-inline-start: auto; }
.mg-social a { display: grid; place-items: center; width: 30px; height: 30px; color: #555; font-size: 15px; }
.mg-logo-row .mg-wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 22px; }
.mg-logo img { height: 62px; width: auto; }
.mg-menu { background: var(--kx-night); position: sticky; top: 0; z-index: 20; }
.mg-menu .mg-wrap { display: flex; align-items: stretch; min-height: 50px; }
.mg-nav { display: flex; list-style: none; margin: 0; padding: 0; }
.mg-nav > li { position: relative; }
.mg-nav > li > a { display: flex; align-items: center; gap: 6px; height: 50px; padding-inline: 15px; color: #fff; font-weight: 700; font-size: 15px; }
.mg-nav > li > a:hover, .mg-nav > li:focus-within > a { background: rgba(255,255,255,.08); color: #fff; }
.mg-nav > li > a[aria-current] { background: var(--kx-brand); }
.mg-nav .mg-sec-ico { color: var(--sec, #fff); }
.mg-drop { display: none; position: absolute; inset-inline-start: 0; top: 100%; min-width: 240px; background: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.15); border-top: 3px solid var(--kx-brand); padding: 8px 0; list-style: none; margin: 0; }
.mg-nav > li:hover .mg-drop, .mg-nav > li:focus-within .mg-drop, .mg-drop.is-open { display: block; }
.mg-drop a { display: flex; align-items: center; gap: 10px; padding: 8px 18px; font-size: 14px; }
.mg-drop a .kx-icon { color: var(--sec); }
.mg-drop a small { margin-inline-start: auto; color: var(--kx-muted); }
.mg-mega { display: none; position: absolute; inset-inline-end: 0; top: 100%; width: min(860px, 90vw); background: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.15); border-top: 3px solid var(--kx-brand); padding: 20px; grid-template-columns: repeat(3, 1fr); gap: 4px 20px; }
.mg-nav > li:hover .mg-mega, .mg-nav > li:focus-within .mg-mega, .mg-mega.is-open { display: grid; }
.mg-mega a { display: flex; gap: 10px; align-items: center; padding: 7px 4px; border-bottom: 1px dashed var(--kx-line); font-size: 14px; }
.mg-mega a .kx-icon { color: var(--sec); font-size: 18px; }
.mg-mega a small { margin-inline-start: auto; color: var(--kx-muted); }
.mg-menu__tools { margin-inline-start: auto; display: flex; align-items: center; gap: 6px; }
.mg-search { display: flex; align-items: center; background: rgba(255,255,255,.1); border-radius: 20px; padding-inline: 14px 6px; height: 34px; }
.mg-search input { background: none; border: 0; color: #fff; font: inherit; font-size: 13px; width: 170px; }
.mg-search input::placeholder { color: #b9bbc0; }
.mg-search button { background: none; border: 0; color: #fff; cursor: pointer; display: grid; place-items: center; width: 28px; height: 28px; }
.mg-burger { display: none; background: none; border: 0; color: #fff; font-size: 24px; width: 50px; cursor: pointer; }
.mg-menu__logo { display: none; }

/* phone drawer */
.mg-drawer { position: fixed; inset: 0; z-index: 50; }
.mg-drawer[hidden] { display: none; }
.mg-drawer__shade { position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.mg-drawer__panel { position: absolute; inset-block: 0; inset-inline-start: 0; width: min(330px, 86vw); background: var(--kx-night); color: #fff; overflow: auto; padding: 14px 18px 30px; }
.mg-drawer__panel .mg-search { margin: 12px 0 16px; }
.mg-drawer__panel .mg-search input { width: 100%; }
.mg-drawer__panel ul { list-style: none; margin: 0; padding: 0; }
.mg-drawer__panel li a { display: flex; align-items: center; gap: 12px; padding: 11px 4px; border-bottom: 1px solid rgba(255,255,255,.08); font-weight: 600; }
.mg-drawer__panel li a .kx-icon { color: var(--sec); font-size: 18px; }
.mg-drawer__panel li a small { margin-inline-start: auto; color: #9a9ca2; font-weight: 400; }
.mg-drawer__close { background: none; border: 0; color: #fff; font-size: 22px; float: inline-end; cursor: pointer; }

/* ---------- 4. ad slots (design component: the space is reserved, no jump; unit or none per page type) ---------- */
.mg-adw { display: grid; justify-items: center; gap: 4px; }
.mg-ad__label { display: block; text-align: center; font-size: 11px; line-height: 1.4; color: var(--kx-muted); }
.mg-adw .kx-space { inline-size: 100%; min-block-size: var(--kx-ad-h, 250px); background: #f6f7f9; }
.mg-adw--leader .kx-space { inline-size: 728px; max-inline-size: 100%; }
.mg-inad { margin: 28px 0; }
.mg-main > .mg-adw { margin-block: 26px; }
/* ---------- 5. page frame: main + sidebar (sidebar on the left in RTL, sticky) ---------- */
.mg-page { padding-block: 30px; }
.mg-cols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 34px; align-items: start; }
.mg-side { display: grid; gap: 34px; align-content: start; }
.mg-band { background: var(--kx-band); padding-block: 34px; margin-block: 10px 34px; }
.mg-band--night { background: var(--kx-night); color: #fff; }

/* ---------- 6. block title (Jannah: coloured title + coloured underline under the title only) ---------- */
.mg-bt { display: flex; align-items: center; gap: 14px; border-bottom: 1px solid var(--kx-line); margin-bottom: 20px; }
.mg-bt h2, .mg-bt h3 { position: relative; font-size: 18px; color: var(--sec, var(--kx-ink)); padding-bottom: 8px; margin-bottom: -1px; display: flex; align-items: center; gap: 8px; border-bottom: 2px solid var(--sec, var(--kx-brand)); }
.mg-bt__links { min-width: 0; margin-inline-start: auto; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.mg-bt__links a { font-size: 13px; color: var(--kx-muted); padding: 2px 8px; white-space: nowrap; }
.mg-bt__links a:hover, .mg-bt__links a[aria-current] { color: var(--sec, var(--kx-brand)); }
.mg-bt__more { margin-inline-start: auto; font-size: 13px; color: var(--sec, var(--kx-brand)); white-space: nowrap; display: flex; align-items: center; gap: 4px; }
.mg-band--night .mg-bt, .mg-block--night .mg-bt { border-color: rgba(255,255,255,.12); }
.mg-side .mg-bt h2, .mg-side .mg-bt h3 { font-size: 16px; }

/* ---------- 7. badges, meta, chips, buttons ---------- */
.mg-badge { display: inline-block; background: var(--sec, var(--kx-brand)); color: #fff; font-size: 12px; font-weight: 600; line-height: 1; padding: 6px 9px; border-radius: 2px; }
.mg-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-size: 12.5px; color: var(--kx-muted); }
.mg-meta span { display: inline-flex; align-items: center; gap: 5px; }
.mg-chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.mg-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--kx-line); border-radius: 20px; padding: 4px 13px; font-size: 13.5px; background: #fff; }
.mg-chip small { color: var(--kx-muted); }
.mg-chip:hover, .mg-chip[aria-current] { background: var(--sec, var(--kx-brand)); border-color: var(--sec, var(--kx-brand)); color: #fff; }
.mg-chip:hover small, .mg-chip[aria-current] small { color: #fff; }
.mg-letters { display: flex; flex-wrap: wrap; gap: 4px; }
.mg-letters a { display: grid; place-items: center; width: 34px; height: 34px; border-radius: var(--kx-radius); background: var(--kx-band); font-weight: 700; }
.mg-letters a:hover, .mg-letters a[aria-current] { background: var(--sec, var(--kx-brand)); color: #fff; }
.mg-btn { display: inline-flex; align-items: center; gap: 6px; background: var(--sec, var(--kx-brand)); color: #fff; border: 0; border-radius: 20px; padding: 7px 18px; font: 600 13.5px var(--kx-font); cursor: pointer; }
.mg-btn:hover { color: #fff; filter: brightness(.92); }
.mg-btn--line { background: #fff; color: var(--kx-ink); border: 1px solid var(--kx-line); }
.mg-btn--line:hover { color: var(--kx-brand); filter: none; border-color: var(--kx-brand); }

/* ---------- 8. cards ---------- */
.mg-ph { position: relative; overflow: hidden; border-radius: var(--kx-radius); background: #dde1e6; aspect-ratio: 16 / 10; }
.mg-ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
a:hover .mg-ph img, .mg-ov:hover img { transform: scale(1.04); }
.mg-ph .mg-badge { position: absolute; inset-block-start: 12px; inset-inline-start: 12px; z-index: 1; }
/* no photo (songs, poems, most dreams): a colour panel with the section icon + the title's first words — never a grey hole */
.mg-ph--none { display: grid; place-items: center; background: linear-gradient(135deg, var(--sec, var(--kx-brand)), color-mix(in srgb, var(--sec, var(--kx-brand)) 55%, #000)); color: #fff; text-align: center; padding: 16px; }
.mg-ph--none .kx-icon { font-size: 40px; opacity: .9; }
.mg-ph--none span { display: block; font-weight: 700; font-size: 15px; line-height: 1.5; margin-top: 8px; opacity: .95; }

/* overlay card (hero grid, bands) */
.mg-ov { position: relative; display: block; overflow: hidden; border-radius: var(--kx-radius); color: #fff; background: #333; min-height: 200px; }
.mg-ov img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.mg-ov::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.35) 45%, rgba(0,0,0,0) 70%); }
.mg-ov .mg-badge { position: absolute; inset-block-start: 14px; inset-inline-start: 14px; z-index: 2; }
.mg-ov__txt { position: absolute; inset-inline: 0; bottom: 0; padding: 18px; z-index: 2; }
.mg-ov__txt h3 { font-size: 18px; text-shadow: 0 1px 3px rgba(0,0,0,.4); }
.mg-ov__txt p { font-size: 13px; opacity: .9; margin: 6px 0 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mg-ov .mg-meta { color: #e6e6e6; margin-bottom: 4px; }
.mg-ov:hover { color: #fff; }

/* post card (vertical) */
.mg-post h3 { font-size: 17px; margin-top: 12px; }
.mg-post .mg-meta { margin-top: 8px; }
.mg-post p { font-size: 13.5px; color: #555; margin: 8px 0 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mg-post--big h3 { font-size: 21px; }

/* mini item (thumb + title), Jannah lists */
.mg-mini { display: grid; grid-template-columns: 110px 1fr; gap: 14px; align-items: start; }
.mg-mini .mg-ph { aspect-ratio: 3 / 2; }
.mg-mini .mg-ph--none .kx-icon { font-size: 24px; }
.mg-mini h4 { font-size: 14.5px; font-weight: 600; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mg-mini .mg-meta { margin-top: 4px; }
.mg-list { display: grid; gap: 18px; list-style: none; margin: 0; padding: 0; }
.mg-list--line > li + li { border-top: 1px solid var(--kx-line); padding-top: 16px; }

/* numbered list (Jannah "Most viewed": number in a circle) */
.mg-num { counter-reset: n; display: grid; gap: 0; list-style: none; margin: 0; padding: 0; }
.mg-num li { counter-increment: n; display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: center; padding-block: 10px; border-bottom: 1px solid var(--kx-line); }
.mg-num li::before { content: counter(n); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--sec, var(--kx-brand)); color: #fff; font-weight: 700; font-size: 13px; }
.mg-num a { font-weight: 600; font-size: 14.5px; line-height: 1.55; }
.mg-num small { display: block; color: var(--kx-muted); font-size: 12px; font-weight: 400; }
.mg-num--cols { grid-template-columns: 1fr 1fr; column-gap: 30px; }

/* grids */
.mg-grid { display: grid; gap: 26px; }
.mg-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mg-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mg-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ---------- 9. home blocks ---------- */
/* hero grid (Jannah: 1 big + 1 wide + 2 small) */
.mg-hero { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; grid-template-rows: 230px 230px; gap: 4px; margin-bottom: 34px; }
.mg-hero > a:first-of-type { grid-column: span 2; grid-row: span 2; }
.mg-hero > a:nth-of-type(2) { grid-column: span 2; }
.mg-hero > a:first-of-type .mg-ov__txt h3 { font-size: 27px; }
.mg-hero .mg-ov { min-height: 0; border-radius: 0; }
/* "1 big + list" block */
.mg-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 26px; }
.mg-split .mg-ov { min-height: 100%; }
/* two blocks side by side */
.mg-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 34px; }
/* dark block (Jannah "Sports") */
.mg-block--night { background: var(--kx-night); color: #fff; padding: 24px; border-radius: var(--kx-radius); }
.mg-block--night .mg-meta { color: #a6a8ad; }
.mg-block--night .mg-num li { border-color: rgba(255,255,255,.1); }
.mg-block--night a:hover { color: #fff; text-decoration: underline; }
/* tinted block (Jannah "Technology") */
.mg-block--tint { background: color-mix(in srgb, var(--sec) 7%, #fff); padding: 24px; border-radius: var(--kx-radius); }
.mg-block { margin-bottom: 40px; }
/* people tiles: singers, poets (initial in a circle, no photo exists) */
.mg-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.mg-person { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: var(--kx-radius); background: rgba(255,255,255,.06); }
.mg-band .mg-person, .mg-page .mg-person { background: #fff; border: 1px solid var(--kx-line); }
.mg-person__i { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--sec); color: #fff; font-weight: 700; font-size: 18px; }
.mg-person b { display: block; font-size: 14px; line-height: 1.4; }
.mg-person small { color: var(--kx-muted); font-size: 12px; }
.mg-block--night .mg-person small { color: #a6a8ad; }
/* era tiles (poetry band) */
.mg-eras { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.mg-era { position: relative; display: block; padding: 22px 16px 18px; border-radius: var(--kx-radius); background: #fff; border-top: 4px solid var(--sec); box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.mg-era b { display: block; font-size: 16px; }
.mg-era small { color: var(--kx-muted); }
.mg-era .kx-icon { position: absolute; inset-inline-end: 14px; top: 18px; color: var(--sec); font-size: 22px; opacity: .5; }
/* section tiles (sidebar "Categories" + section pages) */
.mg-secs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; list-style: none; margin: 0; padding: 0; }
.mg-secs a { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: var(--kx-radius); background: var(--kx-band); font-size: 13.5px; font-weight: 600; }
.mg-secs a .kx-icon { color: var(--sec); font-size: 16px; }
.mg-secs a small { margin-inline-start: auto; color: var(--kx-muted); font-weight: 400; font-size: 12px; }
.mg-secs a:hover { background: var(--sec); color: #fff; }
.mg-secs a:hover .kx-icon, .mg-secs a:hover small { color: #fff; }
/* social widget */
.mg-follow { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mg-follow a { display: flex; align-items: center; gap: 10px; color: #fff; padding: 10px 12px; border-radius: var(--kx-radius); font-size: 13px; font-weight: 600; }
.mg-follow a:hover { color: #fff; filter: brightness(.93); }
.mg-follow .kx-icon { font-size: 18px; }

/* ---------- 10. article page ---------- */
.mg-crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--kx-muted); margin-bottom: 14px; list-style: none; padding: 0; }
.mg-crumbs li + li::before { content: '/'; margin-inline-end: 6px; color: #bbb; }
.mg-art__badges { display: flex; gap: 6px; margin-bottom: 12px; }
.mg-art h1 { font-size: 32px; line-height: 1.5; }
.mg-art__sub { font-size: 17px; color: #555; margin-top: 6px; }
.mg-art__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding-block: 14px; border-bottom: 1px solid var(--kx-line); margin-block: 14px 16px; }
.mg-share { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 22px; }
.mg-share a { display: inline-flex; align-items: center; gap: 8px; height: 38px; min-width: 40px; justify-content: center; padding-inline: 12px; border-radius: 2px; color: #fff; font-size: 13px; font-weight: 600; }
.mg-share a:hover { color: #fff; filter: brightness(.9); }
.mg-share .s-wa { background: #25d366; } .mg-share .s-fb { background: #1877f2; } .mg-share .s-x { background: #000; }
.mg-share .s-tg { background: #229ed9; } .mg-share .s-link { background: #6c757d; } .mg-share .s-print { background: #3d4148; }
.mg-share .s-wa, .mg-share .s-fb { padding-inline: 18px; }
.mg-art__photo { margin: 0 0 24px; }
.mg-art__photo img { width: 100%; border-radius: var(--kx-radius); aspect-ratio: 16 / 9; object-fit: cover; }
.mg-art__photo figcaption { font-size: 12.5px; color: var(--kx-muted); text-align: center; margin-top: 6px; }
.mg-body { font-size: 18px; line-height: 2; color: #2b2b2b; }
.mg-body p { margin: 0 0 1.2em; }
.mg-body h2 { font-size: 23px; margin: 1.4em 0 .5em; }
.mg-body h3 { font-size: 20px; margin: 1.2em 0 .5em; }
.mg-body a { color: var(--kx-brand); text-decoration: underline; text-underline-offset: 3px; }
.mg-body blockquote { margin: 1.5em 0; padding: 4px 22px; border-inline-start: 4px solid var(--sec, var(--kx-brand)); color: var(--sec, var(--kx-brand)); font-size: 21px; line-height: 1.8; }
.mg-body > p:first-of-type::first-letter { float: inline-start; font-size: 3.6em; line-height: .9; margin-inline-end: 10px; margin-top: 8px; color: var(--sec, var(--kx-ink)); font-weight: 700; }
.mg-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 26px 0; font-size: 13px; }
.mg-tags b { margin-inline-end: 4px; }
.mg-tags a { background: var(--kx-band); padding: 3px 12px; border-radius: 2px; }
.mg-tags a:hover { background: var(--kx-brand); color: #fff; }
.mg-pn { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; border-block: 1px solid var(--kx-line); padding-block: 18px; margin: 28px 0; }
.mg-pn a { display: block; }
.mg-pn small { display: flex; align-items: center; gap: 4px; color: var(--kx-muted); font-size: 12px; }
.mg-pn b { display: block; font-size: 15px; line-height: 1.6; }
.mg-pn a:last-child { text-align: end; }
.mg-pn a:last-child small { justify-content: flex-end; }
.mg-sec { margin-top: 36px; }
/* lyrics: centered lines, stanzas */
.mg-lyrics { text-align: center; font-size: 19px; line-height: 2.2; padding: 26px 18px; background: color-mix(in srgb, var(--sec) 5%, #fff); border-radius: var(--kx-radius); border-top: 3px solid var(--sec); }
.mg-lyrics p { margin: 0 0 1.4em; }
.mg-lyrics p:last-child { margin: 0; }
/* page head band for items without photo (song, poem, poet, singer) */
.mg-headband { background: linear-gradient(135deg, var(--sec), color-mix(in srgb, var(--sec) 50%, #000)); color: #fff; border-radius: var(--kx-radius); padding: 26px; display: flex; gap: 20px; align-items: center; margin-bottom: 22px; }
.mg-headband__i { flex: none; display: grid; place-items: center; width: 74px; height: 74px; border-radius: 50%; background: rgba(255,255,255,.15); font-size: 32px; font-weight: 700; }
.mg-headband h1 { font-size: 28px; }
.mg-headband p { margin: 4px 0 0; opacity: .9; }
.mg-headband .mg-meta { color: rgba(255,255,255,.85); margin-top: 8px; }
.mg-headband a:hover { color: #fff; text-decoration: underline; }
/* poem: two half-verses per row (sadr | ajuz), Amiri */
.mg-poem { font-family: var(--kx-font-verse); font-size: 25px; line-height: 2.1; padding: 30px 24px; border: 1px solid var(--kx-line); border-radius: var(--kx-radius); background: #fffdf8; position: relative; }
.mg-poem__v { display: grid; grid-template-columns: 1fr 1fr; gap: 0 48px; text-align: center; }
.mg-poem__v + .mg-poem__v { border-top: 1px dotted #e6dcc4; }
.mg-poem__v span:first-child { text-align: start; }
.mg-poem__v span:last-child { text-align: end; }
.mg-poem__n { position: absolute; top: 10px; inset-inline-end: 14px; font: 12px var(--kx-font); color: var(--kx-muted); }
/* recipe */
.mg-facts { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 22px; }
.mg-facts span { display: inline-flex; gap: 8px; align-items: center; background: var(--kx-band); padding: 8px 14px; border-radius: var(--kx-radius); font-size: 14px; }
.mg-facts .kx-icon { color: var(--sec); }
.mg-recipe { display: grid; grid-template-columns: 300px 1fr; gap: 26px; align-items: start; }
.mg-ingr { background: color-mix(in srgb, var(--sec) 6%, #fff); border-radius: var(--kx-radius); padding: 18px 20px; border-top: 3px solid var(--sec); }
.mg-ingr ul { margin: 0; padding-inline-start: 18px; font-size: 15px; line-height: 2; }
.mg-steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.mg-steps li { counter-increment: s; display: grid; grid-template-columns: 38px 1fr; gap: 12px; font-size: 16.5px; line-height: 1.9; }
.mg-steps li::before { content: counter(s); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--sec); color: #fff; font-weight: 700; }

/* ---------- 11. section page ---------- */
.mg-sechead { border-radius: var(--kx-radius); padding: 28px; margin-bottom: 26px; background: color-mix(in srgb, var(--sec) 8%, #fff); border-inline-start: 5px solid var(--sec); }
.mg-sechead h1 { font-size: 28px; color: var(--sec); display: flex; align-items: center; gap: 10px; }
.mg-sechead p { color: #444; margin: 10px 0 16px; max-width: 760px; }
.mg-pager { display: flex; justify-content: center; gap: 6px; margin: 34px 0 10px; list-style: none; padding: 0; }
.mg-pager a, .mg-pager span { display: grid; place-items: center; min-width: 38px; height: 38px; padding-inline: 10px; border: 1px solid var(--kx-line); border-radius: var(--kx-radius); font-size: 14px; }
.mg-pager [aria-current] { background: var(--kx-brand); color: #fff; border-color: var(--kx-brand); }

/* ---------- 12. footer (Jannah: dark, columns, bottom bar) ---------- */
.mg-foot { background: var(--kx-night); color: #c9cbd0; margin-top: 40px; font-size: 14px; }
.mg-foot .mg-wrap { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 34px; padding-block: 46px 30px; }
.mg-foot h4 { color: #fff; font-size: 15px; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,.1); }
.mg-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.mg-foot a:hover { color: #fff; }
.mg-foot__logo { height: 52px; width: auto; margin-bottom: 14px; }
.mg-foot .mg-social a { color: #c9cbd0; background: rgba(255,255,255,.06); border-radius: 50%; width: 34px; height: 34px; }
.mg-foot .mg-social { margin: 16px 0 0; gap: 6px; }
.mg-foot__bar { background: var(--kx-night-2); font-size: 13px; }
.mg-foot__bar .mg-wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding-block: 16px; grid-template-columns: none; }
.mg-foot__bar nav { display: flex; gap: 18px; }
.mg-totop { position: fixed; inset-inline-end: 18px; bottom: 18px; width: 42px; height: 42px; border-radius: 50%; background: var(--kx-brand); color: #fff; display: grid; place-items: center; box-shadow: 0 4px 12px rgba(0,0,0,.2); }

/* ---------- 14. responsive ---------- */
@media (max-width: 1100px) {
  .mg-cols { grid-template-columns: minmax(0, 1fr) 280px; gap: 26px; }
  .mg-grid--4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mg-eras { grid-template-columns: repeat(3, 1fr); }
  .mg-search input { width: 110px; }
  .mg-nav > li > a { padding-inline: 10px; font-size: 14px; }
}
@media (max-width: 900px) {
  .mg-top__date, .mg-adw--leader, .mg-nav, .mg-menu__tools .mg-search { display: none; }
  .mg-logo-row { display: none; }
  .mg-burger, .mg-menu__logo { display: grid; place-items: center; }
  .mg-menu__logo { flex: 1; justify-content: center; }
  .mg-menu__logo img { height: 34px; width: auto; filter: brightness(0) invert(1); }
  .mg-menu .mg-wrap { padding-inline: 0; }
  .mg-cols { grid-template-columns: minmax(0, 1fr); }
  .mg-side { position: static; }
  .mg-hero { grid-template-columns: 1fr 1fr; grid-template-rows: 260px 160px; }
  .mg-hero > a:nth-of-type(2) { display: none; }
  .mg-hero > a:first-of-type { grid-column: span 2; grid-row: auto; }
  .mg-foot .mg-wrap { grid-template-columns: 1fr 1fr; }
  .mg-recipe { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  body { font-size: 15px; }
  .mg-ticker__label { display: none; }
  .mg-social { display: none; }
  .mg-foot .mg-social { display: flex; }
  .mg-split, .mg-pair, .mg-grid--2, .mg-grid--3 { grid-template-columns: minmax(0, 1fr); }
  .mg-people { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body { overflow-x: hidden; }
  .mg-grid--4 { grid-template-columns: 1fr 1fr; gap: 16px; }
  .mg-grid--4 .mg-post h3 { font-size: 15px; }
  .mg-grid--4 .mg-post p { display: none; }
  .mg-hero > a:first-of-type .mg-ov__txt h3 { font-size: 20px; }
  .mg-eras { grid-template-columns: 1fr 1fr; }
  .mg-num--cols { grid-template-columns: 1fr; }
  .mg-art h1 { font-size: 24px; }
  .mg-body { font-size: 17px; }
  .mg-share a span { display: none; }
  .mg-share .s-wa, .mg-share .s-fb { padding-inline: 12px; }
  .mg-poem { font-size: 21px; padding: 20px 12px; }
  .mg-poem__v { grid-template-columns: 1fr; gap: 0; }
  .mg-poem__v span:first-child, .mg-poem__v span:last-child { text-align: center; }
  .mg-poem__v span:last-child { padding-bottom: 8px; }
  .mg-headband { padding: 18px; gap: 14px; }
  .mg-headband__i { width: 54px; height: 54px; font-size: 24px; }
  .mg-headband h1 { font-size: 22px; }
  .mg-block--night, .mg-block--tint { padding: 16px; margin-inline: -16px; border-radius: 0; }
  .mg-foot .mg-wrap { grid-template-columns: 1fr; }
  .mg-pn { grid-template-columns: 1fr; }
  .mg-pn a:last-child { text-align: start; }
  .mg-pn a:last-child small { justify-content: flex-start; }
}

/* people tiles inside a dark block keep the dark look (after .mg-page .mg-person) */
.mg-page .mg-block--night .mg-person { background: rgba(255,255,255,.06); border-color: transparent; }


/* ---------- 15. pieces of the real pages (2026-12-06) ---------- */
a:hover { text-decoration: none; }
h1, h2, h3, h4 { color: inherit; text-wrap: balance; }
.mg-logo img, .mg-menu__logo img, .mg-foot__logo { display: block; }
.mg-nav > li > a .kx-icon { color: var(--sec, #fff); }
.mg-nav > li > a[aria-current] .kx-icon { color: #fff; }
.mg-nav > li > button { display: flex; align-items: center; gap: 6px; height: 50px; padding-inline: 15px; color: #fff; font: 700 15px var(--kx-font); background: none; border: 0; cursor: pointer; }
.mg-nav > li > button:hover, .mg-nav > li:focus-within > button { background: rgba(255,255,255,.08); }
.mg-burger .kx-icon { inline-size: 26px; block-size: 26px; }
.mg-drawer__panel .mg-drawer__logo { block-size: 36px; inline-size: auto; }
/* breadcrumb atom inside the magazine look */
.mg-page .kx-breadcrumb { font-size: 13px; color: var(--kx-muted); margin: 0 0 14px; gap: 6px; }
.mg-page .kx-breadcrumb a { color: var(--kx-muted); }
.mg-page .kx-breadcrumb a:hover { color: var(--kx-brand); }
/* article: title band when the article has no photo (songs, most dreams) */
.mg-art .mg-headband { margin-top: 4px; }
.mg-art .mg-headband h1 { color: #fff; }
.mg-body img { max-width: 100%; height: auto; border-radius: var(--kx-radius); }
.mg-body figure { margin: 1.4em 0; }
.mg-body ul, .mg-body ol { padding-inline-start: 1.4em; }
.mg-body table { border-collapse: collapse; width: 100%; font-size: 15px; margin: 1em 0; }
.mg-body td, .mg-body th { border: 1px solid var(--kx-line); padding: 6px 10px; }
.mg-body iframe { max-width: 100%; }
/* side widgets */
.mg-links { list-style: none; margin: 0; padding: 0; display: grid; }
.mg-links a, .mg-links span { display: block; padding: 8px 2px; border-bottom: 1px solid var(--kx-line); font-size: 14px; line-height: 1.6; }
.mg-links [aria-current] { color: var(--sec, var(--kx-brand)); font-weight: 700; }
.mg-links__more { display: inline-flex; align-items: center; gap: 4px; margin-top: 10px; font-size: 13px; color: var(--kx-brand); }
.mg-rest { columns: 2; column-gap: 26px; margin-top: 20px; }
.mg-rest a { display: block; break-inside: avoid; padding: 5px 0; font-size: 14px; border-bottom: 1px dashed var(--kx-line); }
/* poetry / recipes doors (home band) */
.mg-doors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.mg-door { display: flex; gap: 18px; align-items: center; padding: 22px; border-radius: var(--kx-radius); background: #fff; border-top: 4px solid var(--sec); box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.mg-door > .kx-icon { inline-size: 44px; block-size: 44px; color: var(--sec); flex: none; }
.mg-door b { display: block; font-size: 18px; }
.mg-door small { color: var(--kx-muted); font-size: 13.5px; }
.mg-door:hover b { color: var(--sec); }
.mg-empty { padding: 30px; text-align: center; color: var(--kx-muted); background: var(--kx-band); border-radius: var(--kx-radius); }
.mg-sub { font-size: 15px; margin-bottom: 12px; color: #c9cbd0; }
.mg-badge:hover { color: #fff; }
.mg-hero h3, .mg-ov h3 { color: #fff; }
.mg-block--night h2, .mg-block--night h3 { color: inherit; }
.mg-block--night .mg-bt h2 { color: var(--sec); }
.mg-sbox p { font-size: 14px; color: #555; }
[dir="rtl"] .mg-body > p:first-of-type::first-letter { float: none; font-size: inherit; line-height: inherit; margin: 0; color: inherit; font-weight: inherit; }
@media (max-width: 600px) { .mg-doors { grid-template-columns: 1fr; } .mg-rest { columns: 1; } }
/* poetry pages (D4 2026-12-06; mockups poem.html, poet.html) */
.mg-verse-font { font-family: var(--kx-font-verse); }
.mg-num.mg-verse-font a { font-size: 17px; }
.mg-num.mg-verse-font small { font-family: var(--kx-font); }
.mg-poem--free .mg-poem__v { grid-template-columns: 1fr; }
.mg-poem--free .mg-poem__v span:first-child { text-align: center; }
.mg-poem + .mg-adw, .mg-adw + .mg-poem { margin-block: 18px; }
.mg-headband--card { margin: 0; }
.mg-headband--card h2 { font-size: 20px; color: #fff; }
.mg-headband h1 { color: #fff; }
.mg-lead { font-size: 17px; line-height: 1.9; color: #444; margin: 6px 0 12px; }
.mg-more { margin: 0 0 18px; }
.mg-more > summary { display: inline-flex; cursor: pointer; list-style: none; border: 1px solid var(--sec, var(--kx-brand)); color: var(--sec, var(--kx-brand)); border-radius: 18px; padding: 3px 18px; font-size: 14px; margin-bottom: 10px; }
.mg-more > summary::-webkit-details-marker { display: none; }
.mg-more[open] > summary { opacity: .7; }
.mg-source { font-size: 13px; color: var(--kx-muted); margin: 8px 0 18px; }
.mg-faq details { border: 1px solid var(--kx-line); border-radius: var(--kx-radius); padding: 10px 14px; margin: 0 0 8px; background: #fff; }
.mg-faq summary { cursor: pointer; font-weight: 700; }
.mg-faq p { margin: 8px 0 0; line-height: 1.8; }
.mg-people--page { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.mg-poet-page .mg-sub, .mg-band .mg-sub, .mg-main > .mg-block:not(.mg-block--night) .mg-sub { color: var(--kx-ink); }
.mg-links small { color: var(--kx-muted); font-size: 12px; }
@media (max-width: 600px) { .mg-people--page { grid-template-columns: repeat(2, minmax(0, 1fr)); } }