:root {
  color-scheme: dark;
  --bg: #08090b;
  --surface: #111316;
  --surface-raised: #17191d;
  --text: #f4f2e9;
  --text-soft: #b8b7b0;
  --text-faint: #7f817e;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.18);
  --accent: #eec319;
  --accent-ink: #191705;
  --radius: 16px;
  --font-ar: 'Noto Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
  --font-ku: 'Vazirmatn', 'Noto Sans Arabic', 'Segoe UI', sans-serif;
  --border: var(--line);
  --border-strong: var(--line-strong);
  --muted: #92918a;
  --accent-strong: #fbd534;
  --accent-foreground: #fbd534;
  font-family: Roboto, system-ui, -apple-system, 'Segoe UI', sans-serif;
}

@font-face { font-family: Roboto; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/roboto-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: Roboto; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/roboto-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: Roboto; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/roboto-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: Roboto; font-style: normal; font-weight: 900; font-display: swap; src: url('/fonts/roboto-latin-900-normal.woff2') format('woff2'); }
@font-face { font-family: 'Noto Sans Arabic'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/noto-sans-arabic-arabic-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Noto Sans Arabic'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/noto-sans-arabic-arabic-700-normal.woff2') format('woff2'); }
@font-face { font-family: Vazirmatn; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/vazirmatn-arabic-400-normal.woff2') format('woff2'); }
@font-face { font-family: Vazirmatn; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/vazirmatn-arabic-700-normal.woff2') format('woff2'); }
html[lang='ar'] body { font-family: var(--font-ar); }
html[lang='ku'] body, html[lang='ckb'] body { font-family: var(--font-ku); }
html[data-theme='light'] { color-scheme: light; --bg: #f5f4ef; --surface: #ffffff; --surface-raised: #fbfaf5; --text: #1d1d1a; --text-soft: #44433e; --text-faint: #6b6a63; --muted: #6b6a63; --line: rgba(31,30,25,0.11); --line-strong: rgba(31,30,25,0.19); --accent-foreground: #745a00; }
button { font: inherit; cursor: pointer; }
.article-site-shell > .site-header { width: min(1180px, calc(100% - 40px)); margin: 16px auto 0; }
.article-site-shell > .mobile-service-nav { width: min(1172px, calc(100% - 48px)); margin-inline: auto; }
@media (max-width: 620px) {
  .article-site-shell > .site-header { width: calc(100% - 24px); margin-top: 8px; }
  .article-site-shell > .mobile-service-nav { width: calc(100% - 32px); }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--text); background: var(--bg); }
body::selection { color: var(--accent-ink); background: var(--accent); }
a { color: inherit; text-decoration: none; text-underline-offset: 0.2em; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
img { display: block; max-width: 100%; }
.shell { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.shell-narrow { width: min(760px, calc(100% - 40px)); margin-inline: auto; }

.button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 17px; color: var(--accent-ink); background: var(--accent); border-radius: 11px; font-size: 0.8rem; font-weight: 800; }
.button:hover { background: #f8d645; }

.journal-hero { padding-block: 92px 64px; }
.journal-label { margin: 0 0 18px; color: var(--accent); font-size: 0.78rem; font-weight: 800; }
.journal-hero h1, .article-header h1, .not-found h1 { max-width: 920px; margin: 0; font-size: clamp(3.1rem, 8vw, 6.2rem); line-height: 0.98; letter-spacing: -0.04em; }
.journal-hero > p:last-child { max-width: 680px; margin: 30px 0 0; color: var(--text-soft); font-size: 1.15rem; line-height: 1.7; }
.journal-grid { display: grid; grid-template-columns: 1.25fr 0.75fr; gap: 20px; padding-bottom: 120px; }
.journal-card { display: grid; grid-template-rows: 240px 1fr; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.journal-card.featured { grid-row: span 2; grid-template-rows: 390px 1fr; }
.journal-card-image { overflow: hidden; background: var(--surface-raised); }
.journal-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 220ms ease; }
.journal-card:hover .journal-card-image img { transform: scale(1.025); }
.journal-card-body { display: flex; flex-direction: column; align-items: flex-start; padding: 25px; }
.article-meta { display: flex; flex-wrap: wrap; gap: 14px; color: var(--text-faint); font-size: 0.72rem; font-weight: 700; }
.journal-card h2 { margin: 18px 0 0; font-size: 1.35rem; line-height: 1.2; letter-spacing: -0.03em; }
.journal-card.featured h2 { font-size: clamp(2rem, 4vw, 3rem); }
.journal-card h2 a:hover { color: var(--accent); }
.journal-card p { margin: 14px 0 26px; color: var(--text-soft); font-size: 0.9rem; line-height: 1.7; }
.text-link { margin-top: auto; color: var(--accent); font-size: 0.8rem; font-weight: 800; }
.journal-empty { grid-column: 1 / -1; padding: 60px; color: var(--text-soft); text-align: center; border: 1px solid var(--line); border-radius: var(--radius); }

.article-page { padding-top: 86px; }
.article-header { text-align: center; }
.back-link { display: inline-block; margin-bottom: 28px; color: var(--accent); font-size: 0.82rem; font-weight: 800; }
.article-header .article-meta { justify-content: center; }
.article-header h1 { margin-top: 24px; font-size: clamp(3rem, 7vw, 5.1rem); }
.article-header > p { max-width: 680px; margin: 26px auto 0; color: var(--text-soft); font-size: 1.15rem; line-height: 1.72; }
.article-hero-media { height: min(650px, 55vw); min-height: 380px; margin-top: 60px; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; }
.article-hero-media img { width: 100%; height: 100%; object-fit: cover; }
.article-body { padding-block: 72px 86px; }
.article-body h2 { margin: 56px 0 18px; font-size: 2rem; line-height: 1.2; letter-spacing: -0.03em; }
.article-body h3 { margin: 38px 0 14px; font-size: 1.4rem; }
.article-body p, .article-body li { color: var(--text-soft); font-size: 1.05rem; line-height: 1.85; }
.article-body p { margin: 0 0 24px; }
.article-body ul, .article-body ol { margin: 0 0 30px; padding-inline-start: 25px; }
.article-body li { padding-inline-start: 7px; margin-bottom: 9px; }
.article-body strong { color: var(--text); }
.article-body a { color: var(--accent); text-decoration: underline; }
.article-body code { padding: 0.12em 0.38em; color: var(--text); background: var(--surface-raised); border-radius: 5px; font-family: ui-monospace, monospace; font-size: 0.9em; }
.article-body blockquote { margin: 42px 0; padding: 24px 28px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; }
.article-body blockquote p { margin: 0; color: var(--text); }
.article-cta { margin-bottom: 110px; padding: 42px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); }
.article-cta h2 { margin: 0; font-size: 2.2rem; letter-spacing: -0.03em; }
.article-cta p { margin: 14px 0 24px; color: var(--text-soft); line-height: 1.7; }
.not-found { min-height: 72vh; padding-block: 120px; }
.not-found p { margin: 24px 0; color: var(--text-soft); }

.journal-filters { display: grid; grid-template-columns: 2fr 1fr 1fr auto auto; gap: 16px; align-items: end; }
.journal-filters label { display: grid; gap: 9px; min-width: 0; color: var(--text-soft); font-size: 0.85rem; }
.journal-filters input, .journal-filters select { width: 100%; min-width: 0; min-height: 46px; padding: 10px 12px; color: var(--text); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px; font: inherit; font-size: 16px; }
.journal-filters select option { background: var(--bg); color: var(--text); }
.journal-filters .text-link { padding-block: 13px; }
.journal-filters :focus-visible, .article-language-links a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.journal-count { margin-block: 24px; color: var(--text-faint); }
.article-language-links { display: flex; flex-wrap: wrap; gap: 12px; margin-block: 22px; }
.article-language-links a { padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: 10px; }
.article-language-links a[aria-current='page'] { border-color: var(--accent); color: var(--accent); }
[dir='rtl'] .article-header, [dir='rtl'] .article-body, [dir='rtl'] .journal-card { text-align: start; }
@media (max-width: 860px) { .journal-filters { grid-template-columns: 1fr 1fr; } .journal-filters label:first-child { grid-column: 1 / -1; } }
@media (max-width: 620px) { .journal-filters { grid-template-columns: 1fr; } .journal-filters label:first-child { grid-column: auto; } }

.site-footer { border-top: 1px solid var(--line); }
.site-footer .shell { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; padding-block: 34px; color: var(--text-faint); font-size: 0.76rem; }
.site-footer strong { color: var(--text); }
.site-footer a:hover { color: var(--accent); }

@media (max-width: 860px) {
  .journal-grid { grid-template-columns: 1fr; }
  .journal-card, .journal-card.featured { grid-row: auto; grid-template-columns: minmax(220px, 0.8fr) 1fr; grid-template-rows: 1fr; }
  .journal-card.featured h2 { font-size: 2rem; }
}

@media (max-width: 620px) {
  .shell, .shell-narrow { width: min(100% - 26px, 760px); }
  .journal-hero { padding-block: 64px 44px; }
  .journal-hero h1, .article-header h1, .not-found h1 { font-size: 2.8rem; }
  .journal-grid { padding-bottom: 80px; }
  .journal-card, .journal-card.featured { grid-template-columns: 1fr; grid-template-rows: 220px 1fr; }
  .article-page { padding-top: 56px; }
  .article-header > p { font-size: 1rem; }
  .article-hero-media { width: 100%; height: 330px; min-height: 0; margin-top: 44px; border-inline: 0; border-radius: 0; }
  .article-body { padding-block: 50px 62px; }
  .article-body h2 { font-size: 1.7rem; }
  .article-body p, .article-body li { font-size: 1rem; }
  .article-cta { padding: 28px 24px; }
  .article-cta h2 { font-size: 1.8rem; }
  .site-footer .shell { flex-direction: column; }
}

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