/* Self-hosted, SIL Open Font License: Newsreader (Production Type), Noto Naskh Arabic (Google). */
@font-face {
    font-family: "Newsreader";
    font-style: italic;
    font-weight: 400 700;
    font-display: swap;
    src: url("/assets/fonts/newsreader-italic-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "Newsreader";
    font-style: italic;
    font-weight: 400 700;
    font-display: swap;
    src: url("/assets/fonts/newsreader-italic-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Newsreader";
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url("/assets/fonts/newsreader-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "Newsreader";
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url("/assets/fonts/newsreader-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Noto Naskh Arabic";
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url("/assets/fonts/noto-naskh-arabic.woff2") format("woff2");
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC7, U+10EC9-10EEE, U+10EF0-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1;
}

/*
 * Editorial magazine theme — niche-track pilot sites only (see
 * src/render/magazine.ts). Everything is scoped under .theme-magazine so the
 * shared style.css keeps serving the other sites unchanged.
 */

.theme-magazine {
    --paper: #fbf9f5;
    --paper-2: #f3efe7;
    --surface: #ffffff;
    --ink: #16140f;
    --ink-2: #3a362e;
    --muted: #6d665a;
    --rule: #e2dccf;
    --rule-strong: #16140f;
    --accent: #8a1538;
    --serif: "Newsreader", "Iowan Old Style", Georgia, "Times New Roman", serif;
    --arabic: "Noto Naskh Arabic", "Geeza Pro", "Times New Roman", serif;
    --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --display: var(--serif);
    --text: var(--serif);
    --measure: 690px;
    --gutter: 20px;

    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: "kern", "liga";
}

.theme-magazine[dir="rtl"],
.theme-magazine [dir="rtl"] {
    --display: var(--arabic);
    --text: var(--arabic);
}

.theme-magazine *,
.theme-magazine *::before,
.theme-magazine *::after {
    box-sizing: border-box;
}

.theme-magazine a {
    color: inherit;
    text-decoration: none;
}

.theme-magazine img {
    max-width: 100%;
    display: block;
}

.theme-magazine ::selection {
    background: color-mix(in srgb, var(--accent) 22%, transparent);
}

.mag-container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.mag-visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ── Header ─────────────────────────────────────────────────────────────── */

.mag-topbar {
    border-bottom: 1px solid var(--rule);
    font-size: 13px;
    color: var(--muted);
}

.mag-topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 38px;
}

.mag-topbar-end {
    display: flex;
    align-items: center;
    gap: 18px;
}

.mag-locales {
    display: flex;
    gap: 12px;
}

.mag-locales span[aria-current] {
    color: var(--ink);
    font-weight: 600;
}

.mag-locales a:hover,
.mag-advertise-link:hover {
    color: var(--ink);
}

.mag-advertise-link {
    color: var(--accent);
    font-weight: 600;
}

.mag-masthead {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-top: 26px;
    padding-bottom: 16px;
}

.mag-brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
}

.mag-mark,
.mag-mark svg {
    display: block;
    width: 48px;
    height: 48px;
    flex: none;
}

.mag-wordmark {
    font-family: var(--serif);
    font-size: 44px;
    line-height: 1;
    letter-spacing: -0.02em;
    font-variation-settings: "opsz" 72;
    direction: ltr;
}

.mag-wordmark-name {
    font-weight: 700;
}

.mag-wordmark-tld {
    font-weight: 400;
    color: var(--muted);
}

.mag-tagline {
    margin: 10px 0 0;
    font-family: var(--text);
    font-style: italic;
    font-size: 17px;
    color: var(--ink-2);
}

.theme-magazine[dir="rtl"] .mag-tagline {
    font-style: normal;
}

.mag-nav {
    display: flex;
    justify-content: center;
    gap: 28px;
    border-top: 1px solid var(--rule-strong);
    border-bottom: 3px double var(--rule-strong);
    padding-top: 11px;
    padding-bottom: 11px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.mag-nav a {
    position: relative;
    color: var(--ink-2);
}

.mag-nav a:hover,
.mag-nav a[aria-current] {
    color: var(--ink);
}

.mag-nav a[aria-current]::after {
    content: "";
    position: absolute;
    inset-inline: 0;
    bottom: -12px;
    height: 3px;
    background: var(--accent);
}

/* ── Shared typographic pieces ──────────────────────────────────────────── */

.mag-kicker {
    margin: 0 0 10px;
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
}

.theme-magazine[dir="rtl"] .mag-kicker,
.theme-magazine[dir="rtl"] .mag-section-label {
    letter-spacing: 0;
    text-transform: none;
    font-size: 14px;
}

.mag-meta {
    margin: 0;
    font-family: var(--sans);
    font-size: 13px;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.mag-section-label {
    margin: 0;
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink);
}

.mag-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    border-top: 2px solid var(--rule-strong);
    padding-top: 10px;
    margin-bottom: 4px;
}

.mag-section-head a {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
}

/* ── Home ───────────────────────────────────────────────────────────────── */

.mag-main {
    padding-top: 30px;
    padding-bottom: 56px;
}

.mag-front {
    display: grid;
    grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr);
    gap: 40px;
    padding-bottom: 36px;
}

.mag-lead a:hover .mag-lead-title,
.mag-top-list a:hover .mag-top-title,
.mag-river-item a:hover h3 {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}

.mag-lead-media {
    margin: 0 0 18px;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--paper-2);
}

.mag-lead-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mag-lead-title {
    margin: 0 0 14px;
    font-family: var(--display);
    font-weight: 600;
    font-size: clamp(32px, 3.6vw, 52px);
    line-height: 1.06;
    letter-spacing: -0.015em;
    font-variation-settings: "opsz" 72;
    text-wrap: balance;
}

.theme-magazine[dir="rtl"] .mag-lead-title {
    line-height: 1.35;
    letter-spacing: 0;
    font-weight: 700;
}

.mag-lead-dek {
    margin: 0 0 14px;
    font-family: var(--text);
    font-size: 20px;
    line-height: 1.5;
    color: var(--ink-2);
    max-width: 640px;
}

.mag-top {
    border-inline-start: 1px solid var(--rule);
    padding-inline-start: 28px;
}

.mag-top .mag-section-label {
    border-bottom: 2px solid var(--rule-strong);
    padding-bottom: 10px;
}

.mag-top-list {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: top;
}

.mag-top-list li {
    counter-increment: top;
    border-bottom: 1px solid var(--rule);
}

.mag-top-list a {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 10px;
    padding: 16px 0;
}

.mag-top-list a::before {
    content: counter(top);
    grid-row: span 2;
    font-family: var(--serif);
    font-size: 26px;
    line-height: 1;
    font-weight: 600;
    color: var(--accent);
}

.mag-top-title {
    font-family: var(--display);
    font-size: 19px;
    line-height: 1.28;
    font-weight: 600;
    margin-bottom: 6px;
}

.mag-river-section {
    padding-top: 8px;
}

.mag-river {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 40px;
}

.mag-river-item {
    border-bottom: 1px solid var(--rule);
}

.mag-river-item a {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    padding: 20px 0;
}

.mag-river-text {
    flex: 1 1 auto;
    min-width: 0;
}

.mag-river-item h3 {
    margin: 6px 0 6px;
    font-family: var(--display);
    font-size: 21px;
    line-height: 1.25;
    font-weight: 600;
    text-wrap: pretty;
}

.mag-river-dek {
    margin: 0;
    font-family: var(--text);
    font-size: 16px;
    line-height: 1.5;
    color: var(--ink-2);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mag-river-thumb {
    flex: none;
    width: 132px;
    height: 88px;
    object-fit: cover;
    background: var(--paper-2);
}

.mag-empty {
    padding: 80px 0;
    text-align: center;
    font-family: var(--display);
}

/* ── Archive (re-uses the shared .news-card markup as a ruled list) ────── */

.theme-magazine .page-intro {
    border-bottom: 2px solid var(--rule-strong);
    padding-bottom: 14px;
    margin-bottom: 8px;
}

.theme-magazine .page-intro h1 {
    margin: 0 0 6px;
    font-family: var(--display);
    font-size: clamp(32px, 4vw, 46px);
    font-weight: 600;
    letter-spacing: -0.01em;
}

.theme-magazine .page-intro p {
    margin: 0;
    color: var(--muted);
}

.theme-magazine .page-intro > * + * {
    margin-top: 4px;
}

.theme-magazine .archive-count {
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.theme-magazine .month-heading {
    margin: 30px 0 0;
    font-family: var(--sans);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.theme-magazine .month-count {
    color: var(--muted);
    font-weight: 600;
}

.theme-magazine .news-grid,
.theme-magazine .digest-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 40px;
    gap: 0 40px;
}

.theme-magazine .news-card {
    background: none;
    border: 0;
    border-bottom: 1px solid var(--rule);
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
}

.theme-magazine .news-card a {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 16px;
    padding: 18px 0;
}

.theme-magazine .news-card .card-image {
    flex: none;
    width: 112px;
    height: 76px;
    object-fit: cover;
    border-radius: 0;
}

.theme-magazine .news-card .card-content {
    padding: 0;
    flex: 1 1 auto;
    min-width: 0;
}

.theme-magazine .news-card h3 {
    margin: 4px 0;
    font-family: var(--display);
    font-size: 19px;
    line-height: 1.28;
    font-weight: 600;
}

.theme-magazine .news-card p {
    margin: 0;
    font-family: var(--text);
    font-size: 15px;
    color: var(--ink-2);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.theme-magazine .article-meta {
    font-size: 13px;
    color: var(--muted);
}

.theme-magazine .pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 28px;
}

.theme-magazine .pagination a,
.theme-magazine .pagination span {
    min-width: 36px;
    padding: 6px 10px;
    border: 1px solid var(--rule);
    text-align: center;
    font-size: 14px;
}

.theme-magazine .pagination [aria-current],
.theme-magazine .pagination strong {
    background: var(--ink);
    color: var(--paper);
    border-color: var(--ink);
}

/* ── Article ────────────────────────────────────────────────────────────── */

.mag-article {
    max-width: var(--measure);
    margin: 0 auto;
}

.mag-article-header {
    padding-top: 10px;
}

.mag-article-title {
    margin: 0 0 16px;
    font-family: var(--display);
    font-weight: 600;
    font-size: clamp(32px, 4.4vw, 54px);
    line-height: 1.07;
    letter-spacing: -0.018em;
    font-variation-settings: "opsz" 72;
    text-wrap: balance;
}

.theme-magazine[dir="rtl"] .mag-article-title {
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0;
}

.mag-standfirst {
    margin: 0 0 22px;
    font-family: var(--text);
    font-size: 21px;
    line-height: 1.5;
    color: var(--ink-2);
}

.mag-byline {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 14px;
    border-top: 1px solid var(--rule-strong);
    border-bottom: 1px solid var(--rule);
    padding: 12px 0;
    margin-bottom: 26px;
    font-family: var(--sans);
    font-size: 14px;
    color: var(--muted);
}

.mag-byline .mag-mark,
.mag-byline .mag-mark svg {
    width: 22px;
    height: 22px;
}

.mag-byline-desk {
    color: var(--ink);
    font-weight: 600;
}

.mag-byline-meta {
    white-space: nowrap;
}

.mag-dot {
    margin: 0 10px;
}

.mag-figure {
    margin: 0 0 28px;
}

.mag-figure img {
    width: 100%;
    height: auto;
    background: var(--paper-2);
}

.mag-figure figcaption {
    margin-top: 8px;
    font-size: 13px;
    color: var(--muted);
}

.mag-figure figcaption a {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.mag-body {
    font-family: var(--text);
    font-size: 19px;
    line-height: 1.72;
    color: var(--ink);
    font-feature-settings: "kern", "liga", "onum";
}

.theme-magazine[dir="rtl"] .mag-body {
    font-size: 20px;
    line-height: 1.95;
    font-feature-settings: normal;
}

.mag-body p {
    margin: 0 0 1.1em;
}

.mag-body > p:first-child::first-letter {
    float: inline-start;
    font-size: 3.4em;
    line-height: 0.86;
    font-weight: 600;
    margin-block: 0.06em 0;
    margin-inline-end: 0.08em;
    color: var(--accent);
}

.theme-magazine[dir="rtl"] .mag-body > p:first-child::first-letter {
    float: none;
    font-size: inherit;
    line-height: inherit;
    margin: 0;
    color: inherit;
    font-weight: inherit;
}

.mag-body h2,
.mag-body h3 {
    margin: 1.7em 0 0.55em;
    font-family: var(--display);
    font-weight: 600;
    line-height: 1.22;
    letter-spacing: -0.005em;
}

.mag-body h2 {
    font-size: 27px;
}

.mag-body h3 {
    font-size: 22px;
}

.mag-body ul,
.mag-body ol {
    padding-inline-start: 1.3em;
    margin: 0 0 1.1em;
}

.mag-body li {
    margin-bottom: 0.4em;
}

.mag-body li::marker {
    color: var(--accent);
}

.mag-body a {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.mag-body strong {
    font-weight: 700;
}

.mag-body blockquote {
    margin: 1.4em 0;
    padding-inline-start: 18px;
    border-inline-start: 3px solid var(--accent);
    font-style: italic;
    color: var(--ink-2);
}

.theme-magazine .table-wrap {
    margin: 1.6em 0;
    border-top: 2px solid var(--rule-strong);
}

.theme-magazine .table-wrap table {
    font-family: var(--sans);
    font-size: 15px;
    font-variant-numeric: tabular-nums lining-nums;
}

.theme-magazine .table-wrap th {
    background: none;
    border-bottom: 1px solid var(--rule-strong);
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-2);
}

.theme-magazine[dir="rtl"] .table-wrap th {
    letter-spacing: 0;
    text-transform: none;
    font-size: 14px;
}

.theme-magazine .table-wrap td {
    border-bottom: 1px solid var(--rule);
}

.theme-magazine .table-wrap tbody tr:nth-child(even) td {
    background: color-mix(in srgb, var(--paper-2) 55%, transparent);
}

.mag-sources {
    margin: 40px 0 0;
    padding-top: 14px;
    border-top: 2px solid var(--rule-strong);
    font-family: var(--sans);
}

.mag-sources h2 {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.theme-magazine[dir="rtl"] .mag-sources h2 {
    letter-spacing: 0;
    text-transform: none;
    font-size: 15px;
}

.mag-sources ol {
    margin: 0 0 14px;
    padding-inline-start: 1.2em;
    font-size: 15px;
}

.mag-sources li {
    margin: 3px 0;
}

.mag-sources ol a {
    color: var(--ink-2);
    text-decoration: underline;
    text-underline-offset: 2px;
    overflow-wrap: anywhere;
}

.mag-disclosure {
    margin: 0;
    padding: 12px 14px;
    background: var(--paper-2);
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--ink-2);
}

.mag-disclosure a {
    color: var(--accent);
    font-weight: 600;
}

/* ── Guides (evergreen pages) ───────────────────────────────────────────── */

.mag-guides-rail {
    padding: 4px 0 36px;
}

.mag-guides {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0 28px;
}

.mag-guide-card {
    display: block;
    padding: 16px 0 18px;
    border-bottom: 1px solid var(--rule);
}

.mag-guide-card h3 {
    margin: 6px 0 8px;
    font-family: var(--display);
    font-size: 20px;
    line-height: 1.25;
    font-weight: 600;
    text-wrap: pretty;
}

.mag-guide-card:hover h3 {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}

.mag-guides-index .mag-guides {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 2px solid var(--rule-strong);
}

.mag-changelog {
    margin: 40px 0 0;
    padding-top: 14px;
    border-top: 2px solid var(--rule-strong);
    font-family: var(--sans);
}

.mag-changelog h2 {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.theme-magazine[dir="rtl"] .mag-changelog h2 {
    letter-spacing: 0;
    text-transform: none;
    font-size: 15px;
}

.mag-changelog ul {
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 15px;
    color: var(--ink-2);
}

.mag-changelog li {
    padding: 6px 0;
    border-bottom: 1px solid var(--rule);
}

.mag-changelog time {
    display: inline-block;
    min-width: 7.5em;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.mag-related {
    max-width: 1180px;
    margin: 56px auto 0;
}

.mag-about h1 {
    margin: 10px 0 16px;
    font-family: var(--display);
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.12;
    font-weight: 600;
}

.mag-about h2 {
    margin: 1.6em 0 0.4em;
    font-family: var(--display);
    font-size: 23px;
    font-weight: 600;
}

.mag-about p {
    font-family: var(--text);
    font-size: 18px;
    line-height: 1.7;
}

.mag-about a {
    color: var(--accent);
    text-decoration: underline;
}

/* ── Advertise strip + footer ───────────────────────────────────────────── */

.theme-magazine .advertise-strip {
    margin-top: 0;
    background: var(--paper-2);
    border-top: 1px solid var(--rule);
}

.theme-magazine .advertise-strip p {
    font-size: 14px;
    color: var(--ink-2);
}

.theme-magazine .advertise-strip a {
    color: var(--accent);
}

.mag-footer {
    border-top: 3px double var(--rule-strong);
    background: var(--paper);
    padding: 34px 0 24px;
    font-size: 14px;
}

.mag-footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 32px;
    flex-wrap: wrap;
}

.mag-brand-small .mag-mark,
.mag-brand-small .mag-mark svg {
    width: 32px;
    height: 32px;
}

.mag-brand-small .mag-wordmark {
    font-size: 26px;
}

.mag-footer-brand p {
    margin: 10px 0 0;
    max-width: 380px;
    color: var(--muted);
    font-family: var(--text);
    font-size: 15px;
}

.mag-footer-nav {
    display: grid;
    grid-template-columns: repeat(2, auto);
    gap: 8px 32px;
    font-weight: 600;
}

.mag-footer-nav a:hover {
    color: var(--accent);
}

.mag-footer-legal {
    margin-top: 26px;
    padding-top: 14px;
    border-top: 1px solid var(--rule);
    color: var(--muted);
    font-size: 13px;
}

.mag-footer-legal p {
    margin: 0;
}

/* ── Arabic UI sizing: Arabic glyphs read smaller than Latin at the same size ─ */

.theme-magazine[dir="rtl"] .mag-topbar,
.theme-magazine[dir="rtl"] .mag-meta,
.theme-magazine[dir="rtl"] .mag-byline,
.theme-magazine[dir="rtl"] .mag-figure figcaption {
    font-size: 14px;
}

.theme-magazine[dir="rtl"] .mag-nav {
    font-size: 16px;
    letter-spacing: 0;
}

.theme-magazine[dir="rtl"] .mag-kicker,
.theme-magazine[dir="rtl"] .mag-section-label,
.theme-magazine[dir="rtl"] .mag-section-head a {
    font-size: 15px;
}

.theme-magazine[dir="rtl"] .mag-top-title {
    font-size: 21px;
    line-height: 1.5;
}

.theme-magazine[dir="rtl"] .mag-river-item h3,
.theme-magazine[dir="rtl"] .news-card h3 {
    font-size: 22px;
    line-height: 1.5;
}

.theme-magazine[dir="rtl"] .table-wrap table,
.theme-magazine[dir="rtl"] .mag-disclosure {
    font-size: 15px;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
    .mag-front {
        grid-template-columns: minmax(0, 1fr);
        gap: 28px;
    }

    .mag-top {
        border-inline-start: 0;
        padding-inline-start: 0;
    }

    .mag-river,
    .theme-magazine .news-grid,
    .theme-magazine .digest-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .mag-guides,
    .mag-guides-index .mag-guides {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .mag-guides,
    .mag-guides-index .mag-guides {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 600px) {
    .theme-magazine {
        --gutter: 16px;
    }

    .mag-dateline {
        display: none;
    }

    .mag-topbar-inner {
        justify-content: flex-end;
    }

    .mag-masthead {
        padding-top: 18px;
        padding-bottom: 12px;
    }

    .mag-mark,
    .mag-mark svg {
        width: 36px;
        height: 36px;
    }

    .mag-brand {
        gap: 10px;
    }

    .mag-wordmark {
        font-size: 32px;
    }

    .mag-tagline {
        font-size: 15px;
    }

    .mag-nav {
        gap: 20px;
        font-size: 13px;
        overflow-x: auto;
        justify-content: flex-start;
        scrollbar-width: none;
    }

    .mag-nav::-webkit-scrollbar {
        display: none;
    }

    .mag-byline {
        row-gap: 4px;
    }

    .mag-nav a[aria-current]::after {
        bottom: -12px;
    }

    .mag-main {
        padding-top: 20px;
    }

    .mag-lead-dek,
    .mag-standfirst {
        font-size: 18px;
    }

    .mag-body {
        font-size: 18px;
    }

    .theme-magazine[dir="rtl"] .mag-body {
        font-size: 19px;
    }

    .mag-river-thumb,
    .theme-magazine .news-card .card-image {
        width: 92px;
        height: 64px;
    }

    .mag-footer-nav {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Advertise banner under the menu (client mockup 2026-10-14). */
.ad-banner { background: var(--accent); color: #fff; border-radius: 10px; margin: 18px auto 6px; max-width: 1200px; }
.ad-banner-inner { display: flex; align-items: center; gap: 18px 28px; flex-wrap: wrap; padding: 16px 22px; }
.ad-banner-text { display: flex; flex-direction: column; gap: 2px; flex: 1 1 260px; min-width: 0; }
.ad-banner-title { font-size: 19px; font-weight: 700; line-height: 1.25; }
.ad-banner-sub { font-size: 14px; opacity: 0.88; }
.ad-banner a { color: #fff; text-decoration: none; }
.ad-banner-email { font-size: 20px; font-weight: 700; letter-spacing: 0.01em; overflow-wrap: anywhere; }
.ad-banner-cta { background: #fff; color: var(--accent) !important; font-weight: 700; font-size: 14px; padding: 10px 18px; border-radius: 999px; white-space: nowrap; }
.ad-banner-cta:hover { opacity: 0.9; }
@media (max-width: 600px) {
  .ad-banner { margin: 12px 12px 4px; border-radius: 8px; }
  .ad-banner-inner { padding: 14px 16px; gap: 10px; }
  .ad-banner-email { font-size: 17px; }
  .ad-banner-cta { width: 100%; text-align: center; }
}
