/* مجلة البحوث الفقهية المعاصرة — site styles
   Colours come from the journal's emblem (navy and blue book, gold nib), as in the app. */

/* ---------- Fonts ---------- */
@font-face { font-family: "Plex Arabic"; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/plex-arabic-arabic-400.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-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; }
@font-face { font-family: "Plex Arabic"; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/plex-arabic-arabic-500.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-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; }
@font-face { font-family: "Plex Arabic"; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/plex-arabic-arabic-600.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-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; }
@font-face { font-family: "Plex Arabic"; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/plex-arabic-arabic-700.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-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; }
@font-face { font-family: "Plex Arabic"; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/plex-arabic-latin-400.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: "Plex Arabic"; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/plex-arabic-latin-500.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: "Plex Arabic"; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/plex-arabic-latin-600.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: "Plex Arabic"; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/plex-arabic-latin-700.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: "Amiri"; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/amiri-arabic-400.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-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; }
@font-face { font-family: "Amiri"; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/amiri-arabic-700.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-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; }
@font-face { font-family: "Amiri"; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/amiri-latin-400.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: "Amiri"; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/amiri-latin-700.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; }

/* ---------- Tokens ---------- */
:root {
  color-scheme: light;
  --navy: #0a3f6b;
  --navy-deep: #072d4d;
  --navy-2: #0b5c8e;
  --blue: #0094bc;
  --gold: #f7b71d;
  --gold-soft: #ffedc2;
  --sky: #ddf1fb;

  --bg: #f5f8fa;
  --surface: #ffffff;
  --surface-2: #eef3f6;
  --surface-3: #e5edf2;
  --ink: #14212b;
  --ink-2: #4f5f6a;
  --ink-3: #74838e;
  --line: #e1e8ec;
  --line-2: #c9d4db;
  --primary: var(--navy);
  --primary-ink: #ffffff;
  --link: #0b5c8e;
  --accent-ink: #8a6100;
  --accent-bg: #fff4d6;
  --chip-bg: var(--sky);
  --chip-ink: var(--navy);
  --mark: #ffe08a;
  --success: #1f7a4d;
  --success-bg: #e3f5ea;
  --danger: #b42318;
  --danger-bg: #fdecea;

  --band: linear-gradient(180deg, var(--navy) 0%, #0b4f80 100%);
  --band-ink: #ffffff;
  --band-ink-2: rgba(255, 255, 255, 0.78);

  --radius-lg: 24px;
  --radius: 18px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --shadow-1: 0 1px 2px rgba(10, 63, 107, 0.06), 0 1px 1px rgba(10, 63, 107, 0.04);
  --shadow-2: 0 12px 32px -14px rgba(10, 63, 107, 0.28);
  --shadow-cover: 0 18px 40px -16px rgba(4, 25, 45, 0.55), 0 2px 6px rgba(4, 25, 45, 0.18);

  --font-body: "Plex Arabic", "IBM Plex Sans Arabic", "Segoe UI", Tahoma, system-ui, sans-serif;
  --font-heading: "Amiri", "Traditional Arabic", "Times New Roman", serif;
  --container: 1220px;
  --header-h: 72px;
  --gutter: 20px;

  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%23fff' stroke-width='1.1'%3E%3Cpath d='M60 26 70 50 94 60 70 70 60 94 50 70 26 60 50 50Z'/%3E%3Crect x='42' y='42' width='36' height='36' transform='rotate(45 60 60)'/%3E%3Crect x='42' y='42' width='36' height='36'/%3E%3Cpath d='M0 26 10 50 34 60 10 70 0 94M120 26 110 50 86 60 110 70 120 94M26 0 50 10 60 34 70 10 94 0M26 120 50 110 60 86 70 110 94 120'/%3E%3Ccircle cx='60' cy='60' r='6'/%3E%3C/g%3E%3C/svg%3E");
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0b1620;
    --surface: #101e2a;
    --surface-2: #152737;
    --surface-3: #1b3043;
    --ink: #e4ecf1;
    --ink-2: #a9b8c2;
    --ink-3: #7f909c;
    --line: #223545;
    --line-2: #34495a;
    --primary: #7fd0ee;
    --primary-ink: #00344f;
    --link: #8fd6f2;
    --accent-ink: #f7c54d;
    --accent-bg: #3a2c05;
    --chip-bg: #123f5c;
    --chip-ink: #cdebfa;
    --mark: #6b5208;
    --success: #6fd29d;
    --success-bg: #0f3322;
    --danger: #ff9b8f;
    --danger-bg: #3d1410;
    --band: linear-gradient(180deg, #08243b 0%, #0b2f4d 100%);
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-2: 0 14px 34px -14px rgba(0, 0, 0, 0.6);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1620;
  --surface: #101e2a;
  --surface-2: #152737;
  --surface-3: #1b3043;
  --ink: #e4ecf1;
  --ink-2: #a9b8c2;
  --ink-3: #7f909c;
  --line: #223545;
  --line-2: #34495a;
  --primary: #7fd0ee;
  --primary-ink: #00344f;
  --link: #8fd6f2;
  --accent-ink: #f7c54d;
  --accent-bg: #3a2c05;
  --chip-bg: #123f5c;
  --chip-ink: #cdebfa;
  --mark: #6b5208;
  --success: #6fd29d;
  --success-bg: #0f3322;
  --danger: #ff9b8f;
  --danger-bg: #3d1410;
  --band: linear-gradient(180deg, #08243b 0%, #0b2f4d 100%);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-2: 0 14px 34px -14px rgba(0, 0, 0, 0.6);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-heading); font-weight: 700; line-height: 1.45; color: var(--ink); }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
mark { background: var(--mark); color: inherit; border-radius: 3px; padding: 0 1px; }
::selection { background: color-mix(in srgb, var(--blue) 30%, transparent); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--blue) 70%, transparent); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; background: var(--gold); color: #1c1400; padding: 10px 16px; border-radius: 10px; font-weight: 600; }
.skip-link:focus { top: 12px; }
.icon { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.flip-rtl { transform: scaleX(-1); }
.num { font-feature-settings: "tnum" 1; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container--narrow { max-width: 860px; }
.section { padding-block: 64px; }
.section--tight { padding-block: 40px; }
.stack > * + * { margin-top: 16px; }

@media (max-width: 640px) {
  :root { --gutter: 16px; --header-h: 64px; }
  body { font-size: 16px; }
  .section { padding-block: 44px; }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--navy);
  color: #fff;
  transition: box-shadow .2s ease;
}
:root[data-theme="dark"] .site-header { background: #08243b; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .site-header { background: #08243b; } }
.site-header.is-scrolled { box-shadow: 0 6px 24px -10px rgba(0, 0, 0, .45); }
.site-header__inner { display: flex; align-items: center; gap: 20px; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; min-width: 0; }
.brand:hover { text-decoration: none; }
.brand__mark { width: 44px; height: 44px; flex: none; background: #fff; border-radius: 12px; padding: 5px; box-shadow: 0 2px 8px rgba(0,0,0,.18); }
.brand__text { display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.brand__name { font-family: var(--font-heading); font-weight: 700; font-size: 19px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand__tagline { font-size: 11.5px; color: rgba(255,255,255,.72); white-space: nowrap; line-height: 1.4; }
.main-nav { display: flex; align-items: center; gap: 2px; margin-inline-start: auto; }
.main-nav a, .nav-menu > button {
  display: inline-flex; align-items: center; gap: 4px;
  color: rgba(255,255,255,.86); padding: 8px 12px; border-radius: 10px; font-size: 15px; font-weight: 500;
  background: none; border: 0; white-space: nowrap;
}
.main-nav a:hover, .nav-menu > button:hover { background: rgba(255,255,255,.1); color: #fff; text-decoration: none; }
.main-nav a[aria-current="page"], .nav-menu.is-current > button { color: #fff; background: rgba(255,255,255,.12); box-shadow: inset 0 -2px 0 var(--gold); }
.nav-menu { position: relative; }
.nav-menu .icon { width: 16px; height: 16px; transition: transform .2s; }
.nav-menu[data-open] > button .icon { transform: rotate(180deg); }
.nav-menu__panel {
  position: absolute; top: calc(100% + 8px); inset-inline-start: 0; min-width: 230px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-2); padding: 6px; display: none;
}
.nav-menu[data-open] .nav-menu__panel { display: block; }
.main-nav .nav-menu__panel a { display: flex; color: var(--ink); padding: 10px 12px; border-radius: 10px; }
.main-nav .nav-menu__panel a:hover { background: var(--surface-2); color: var(--ink); }
.main-nav .nav-menu__panel a[aria-current="page"] { background: var(--chip-bg); color: var(--chip-ink); box-shadow: none; }
.nav-menu__panel small { display: block; color: var(--ink-3); font-size: 12.5px; font-weight: 400; }
.header-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px;
  border: 0; background: rgba(255,255,255,.1); color: #fff;
}
.icon-btn:hover { background: rgba(255,255,255,.18); }
.icon-btn .icon { width: 21px; height: 21px; }
.search-trigger {
  display: inline-flex; align-items: center; gap: 10px; height: 42px; padding-inline: 14px 10px;
  border-radius: 12px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.8); font-size: 14.5px; min-width: 210px;
}
.search-trigger:hover { background: rgba(255,255,255,.14); color: #fff; }
.search-trigger kbd { margin-inline-start: auto; font-family: var(--font-body); font-size: 12px; border: 1px solid rgba(255,255,255,.25); border-radius: 6px; padding: 0 6px; line-height: 20px; }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
.menu-toggle { display: none; }

@media (max-width: 1180px) {
  .search-trigger { min-width: 0; width: 42px; padding: 0; justify-content: center; }
  .search-trigger span, .search-trigger kbd { display: none; }
}
@media (max-width: 1020px) {
  .main-nav { display: none; }
  .menu-toggle { display: inline-grid; }
  .header-actions { margin-inline-start: auto; }
}
@media (max-width: 560px) {
  .header-actions .theme-toggle { display: none; }
  .site-header__inner { gap: 10px; }
}
@media (max-width: 420px) {
  .brand { gap: 9px; }
  .brand__tagline { display: none; }
  .brand__name { font-size: 16.5px; }
  .brand__mark { width: 38px; height: 38px; border-radius: 10px; }
  .header-actions { gap: 4px; }
  .icon-btn, .search-trigger { width: 40px; height: 40px; }
}
.drawer .theme-toggle { width: auto; height: auto; display: flex; gap: 12px; padding: 12px; border-radius: 12px; background: none; color: var(--ink); font-weight: 500; width: 100%; justify-content: flex-start; }
.drawer .theme-toggle:hover { background: var(--surface-2); }
.drawer .theme-toggle .icon { color: var(--ink-3); }

/* Mobile drawer */
.drawer { position: fixed; inset: 0; z-index: 80; display: none; }
.drawer[data-open] { display: block; }
.drawer__backdrop { position: absolute; inset: 0; background: rgba(4, 20, 35, .55); backdrop-filter: blur(2px); }
.drawer__panel {
  position: absolute; inset-block: 0; inset-inline-end: 0; width: min(340px, 88vw);
  background: var(--surface); color: var(--ink); padding: 18px; overflow-y: auto;
  box-shadow: var(--shadow-2); animation: drawer-in .22s ease;
}
@keyframes drawer-in { from { transform: translateX(-24px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.drawer__head .icon-btn { background: var(--surface-2); color: var(--ink); }
.drawer nav a { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; color: var(--ink); font-weight: 500; }
.drawer nav a:hover { background: var(--surface-2); text-decoration: none; }
.drawer nav a[aria-current="page"] { background: var(--chip-bg); color: var(--chip-ink); }
.drawer nav .icon { color: var(--ink-3); }
.drawer__group { margin: 14px 12px 4px; font-size: 12.5px; color: var(--ink-3); font-weight: 600; }

/* ---------- Buttons, chips, inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 20px; border-radius: 14px; border: 1px solid transparent;
  font-weight: 600; font-size: 15.5px; line-height: 1.3; white-space: nowrap; text-align: center;
  background: var(--primary); color: var(--primary-ink); transition: transform .12s ease, background .15s, box-shadow .15s;
}
.btn:hover { text-decoration: none; filter: brightness(1.06); }
.btn:active { transform: translateY(1px); }
.btn .icon { width: 20px; height: 20px; }
.btn--gold { background: var(--gold); color: #2a1d00; box-shadow: 0 8px 20px -10px rgba(247, 183, 29, .8); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn--ghost:hover { background: var(--surface-2); filter: none; }
.btn--light { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.28); }
.btn--light:hover { background: rgba(255,255,255,.2); filter: none; }
.btn--sm { min-height: 38px; padding: 6px 14px; font-size: 14px; border-radius: 11px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .6; pointer-events: none; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 6px 15px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font-size: 14.5px; font-weight: 500; white-space: nowrap;
}
.chip:hover { border-color: var(--line-2); background: var(--surface-2); text-decoration: none; }
.chip[aria-current="true"], .chip.is-active { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.chip .count { font-size: 12.5px; padding: 0 7px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); line-height: 20px; }
.chip.is-active .count, .chip[aria-current="true"] .count { background: rgba(255,255,255,.22); color: inherit; }
:root[data-theme="dark"] .chip.is-active .count { background: rgba(0,0,0,.15); }
.chip--light { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.2); color: #fff; }
.chip--light:hover { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.3); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips--scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
.chips--scroll::-webkit-scrollbar { display: none; }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--accent-bg); color: var(--accent-ink); }
.pill--gold-outline { background: rgba(247,183,29,.12); color: var(--gold); border: 1px solid rgba(247,183,29,.55); }
.pill--sky { background: var(--chip-bg); color: var(--chip-ink); }

.page-badge {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; flex: none;
  min-width: 52px; height: 52px; padding-inline: 6px; border-radius: 13px; background: var(--chip-bg); color: var(--chip-ink);
  font-weight: 700; font-size: 17px; line-height: 1.1;
}
.page-badge small { font-size: 11px; font-weight: 500; opacity: .8; }
.page-badge--sub { min-width: 44px; height: 44px; font-size: 15px; background: var(--surface-2); color: var(--ink-2); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 600; font-size: 14.5px; }
.field .hint { font-size: 13px; color: var(--ink-3); }
.input, .select, .textarea {
  width: 100%; min-height: 50px; padding: 12px 16px; border-radius: 14px; border: 1px solid var(--line-2);
  background: var(--surface); color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
.textarea { min-height: 160px; resize: vertical; line-height: 1.8; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue) 18%, transparent); }
.field--error .input, .field--error .textarea { border-color: var(--danger); }
.error-text { color: var(--danger); font-size: 13.5px; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2374838e' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-size: 18px; background-position: left 14px center; padding-inline-end: 40px; }
.hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; opacity: 0; }
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-radius: 14px; background: var(--success-bg); color: var(--success); font-weight: 500; }
.alert .icon { margin-top: 4px; }
.alert--error { background: var(--danger-bg); color: var(--danger); }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; font-size: 15px; }
.switch input { appearance: none; width: 42px; height: 24px; border-radius: 999px; background: var(--line-2); position: relative; transition: background .2s; margin: 0; flex: none; cursor: pointer; }
.switch input::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: inset-inline-start .2s; }
.switch input:checked { background: var(--blue); }
.switch input:checked::after { inset-inline-start: 21px; }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1); }
.card--pad { padding: 24px; }
.card--link { display: block; color: inherit; transition: transform .15s ease, box-shadow .15s ease, border-color .15s; }
.card--link:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-2); border-color: var(--line-2); }

.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.section-title { display: flex; align-items: center; gap: 12px; font-size: clamp(24px, 3vw, 31px); }
.section-title::before { content: ""; width: 5px; height: 1.05em; border-radius: 3px; background: var(--gold); flex: none; }
.section-sub { color: var(--ink-2); margin: 6px 0 0; font-size: 15.5px; }
.section-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 15px; }
.section-link .icon { width: 18px; height: 18px; }

/* ---------- Bands (page heroes) ---------- */
.band { position: relative; background: var(--band); color: var(--band-ink); overflow: hidden; isolation: isolate; }
.band::before { content: ""; position: absolute; inset: 0; background-image: var(--pattern); background-size: 120px; opacity: .065; z-index: -1; }
.band::after { content: ""; position: absolute; inset: auto 0 0; height: 120px; background: linear-gradient(180deg, transparent, rgba(0,0,0,.08)); z-index: -1; }
.band h1, .band h2, .band h3 { color: #fff; }
.band--rounded { border-radius: 0 0 40px 40px; }
.page-band { padding: 34px 0 46px; }
.page-band h1 { font-size: clamp(30px, 4.4vw, 46px); line-height: 1.35; }
.page-band p.lead { color: var(--band-ink-2); font-size: 17px; max-width: 70ch; margin: 10px 0 0; }
.page-band .kicker { margin-bottom: 8px; }
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 14px; color: var(--band-ink-2); margin-bottom: 18px; }
.breadcrumbs a { color: var(--band-ink-2); }
.breadcrumbs a:hover { color: #fff; }
.breadcrumbs .icon { width: 14px; height: 14px; opacity: .6; }
.band-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.band-meta .chip { min-height: 34px; font-size: 14px; }

/* ---------- Home hero ---------- */
.hero { padding: 48px 0 72px; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr); gap: 56px; align-items: center; }
.hero__eyebrow { margin-bottom: 18px; }
.hero h1 { font-size: clamp(36px, 5.6vw, 62px); line-height: 1.25; letter-spacing: 0; }
.hero__tagline { color: var(--band-ink-2); font-size: clamp(17px, 2vw, 20px); margin: 12px 0 28px; }
.hero-search { position: relative; display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 20px; padding: 8px; box-shadow: 0 24px 48px -20px rgba(0,0,0,.5); max-width: 640px; }
.hero-search .icon { position: absolute; inset-inline-start: 22px; width: 24px; height: 24px; color: #74838e; pointer-events: none; }
.hero-search input { flex: 1; min-width: 0; border: 0; background: transparent; height: 52px; padding-inline: 50px 8px; font-size: 18px; color: #14212b; }
.hero-search input:focus { outline: none; }
.hero-search input::placeholder { color: #8796a0; }
.hero-search .btn { min-height: 52px; border-radius: 14px; padding-inline: 26px; }
.hero__quick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; color: var(--band-ink-2); font-size: 14.5px; }
.hero__quick .chip { min-height: 34px; font-size: 14px; padding: 4px 13px; }
.hero-issue { position: relative; text-align: center; }
.hero-issue__cover { position: relative; display: block; width: min(300px, 78%); margin: 0 auto; transform: rotate(-2.5deg); transition: transform .3s ease; }
.hero-issue__cover:hover { transform: rotate(0) scale(1.02); }
.hero-issue__cover img { width: 100%; aspect-ratio: 0.72; object-fit: cover; border-radius: 12px; box-shadow: var(--shadow-cover); background: var(--sky); }
.hero-issue__badge { position: absolute; top: -14px; inset-inline-end: -14px; background: var(--gold); color: #2a1d00; font-weight: 700; font-size: 14px; padding: 6px 14px; border-radius: 999px; box-shadow: 0 6px 16px -6px rgba(0,0,0,.4); transform: rotate(2.5deg); }
.hero-issue__title { font-family: var(--font-heading); font-size: 24px; margin-top: 26px; color: #fff; }
.hero-issue__sub { color: var(--band-ink-2); font-size: 14.5px; margin: 2px 0 16px; }
.hero-issue__actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
@media (max-width: 900px) {
  .hero { padding: 32px 0 56px; }
  .hero__grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .hero-issue__cover { width: min(230px, 62%); }
}
@media (max-width: 520px) {
  .hero-search { border-radius: 16px; padding: 6px; }
  .hero-search input { height: 46px; font-size: 16px; padding-inline: 42px 4px; }
  .hero-search .icon { inset-inline-start: 16px; width: 20px; height: 20px; }
  .hero-search .btn { min-height: 46px; padding-inline: 16px; }
}

/* Continue reading */
.resume { position: relative; z-index: 2; margin-top: -40px; }
.resume[hidden] { display: none; }
.resume__card { display: flex; align-items: center; gap: 16px; padding: 14px 18px; color: inherit; }
.resume__card img { width: 52px; aspect-ratio: .72; object-fit: cover; border-radius: 6px; box-shadow: var(--shadow-1); background: var(--sky); }
.resume__label { font-size: 13.5px; font-weight: 700; color: var(--accent-ink); }
.resume__title { font-weight: 600; }
.resume__progress { height: 6px; border-radius: 999px; background: var(--surface-3); margin-top: 8px; overflow: hidden; }
.resume__progress span { display: block; height: 100%; background: var(--blue); border-radius: inherit; }
.resume__body { flex: 1; min-width: 0; }
.resume__go { color: var(--ink-3); }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat { display: flex; align-items: center; gap: 14px; padding: 20px; }
.stat__icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--chip-bg); color: var(--chip-ink); flex: none; }
.stat__icon .icon { width: 24px; height: 24px; }
.stat__value { font-size: 28px; font-weight: 700; line-height: 1.15; color: var(--ink); }
.stat__label { color: var(--ink-2); font-size: 14.5px; }
@media (max-width: 900px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .stat { padding: 14px; gap: 10px; } .stat__icon { width: 40px; height: 40px; } .stat__value { font-size: 23px; } }

/* ---------- Issue cards ---------- */
.issue-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 28px 22px; }
.issue-card { display: block; color: inherit; }
.issue-card:hover { text-decoration: none; }
.issue-card__cover { position: relative; border-radius: 10px; overflow: hidden; background: var(--sky); aspect-ratio: .72; box-shadow: 0 10px 24px -14px rgba(10,63,107,.55), 0 1px 3px rgba(10,63,107,.15); transition: transform .2s ease, box-shadow .2s ease; }
.issue-card__cover img { width: 100%; height: 100%; object-fit: cover; }
.issue-card:hover .issue-card__cover { transform: translateY(-4px); box-shadow: 0 20px 36px -16px rgba(10,63,107,.6), 0 2px 6px rgba(10,63,107,.15); }
.issue-card__number { position: absolute; bottom: 10px; inset-inline-start: 10px; background: rgba(7, 45, 77, .88); color: #fff; font-weight: 700; font-size: 13px; padding: 3px 10px; border-radius: 999px; backdrop-filter: blur(4px); }
.issue-card__title { font-weight: 700; margin-top: 12px; font-size: 15.5px; line-height: 1.5; color: var(--ink); }
.issue-card__meta { color: var(--ink-3); font-size: 13.5px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.issue-scroller { display: grid; grid-auto-flow: column; grid-auto-columns: 170px; gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px var(--gutter) 18px; margin-inline: calc(var(--gutter) * -1); scrollbar-width: thin; }
.issue-scroller > * { scroll-snap-align: start; }
@media (max-width: 520px) { .issue-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 14px; } .issue-scroller { grid-auto-columns: 140px; gap: 16px; } }

/* ---------- Table of contents ---------- */
.toc { display: flex; flex-direction: column; gap: 10px; }
.toc-item { display: flex; gap: 16px; align-items: flex-start; padding: 16px 18px; }
.toc-item__body { flex: 1; min-width: 0; }
.toc-item__title { font-weight: 600; font-size: 17px; line-height: 1.65; color: var(--ink); display: block; }
a.toc-item__title:hover { color: var(--link); }
.toc-item__author { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: 14.5px; margin-top: 2px; }
.toc-item__author .icon { width: 16px; height: 16px; color: var(--ink-3); }
.toc-item__meta { color: var(--accent-ink); font-size: 13.5px; font-weight: 600; margin-top: 4px; }
.toc-item__actions { display: flex; gap: 6px; align-self: center; }
.toc-item--plain { background: transparent; border-style: dashed; box-shadow: none; }
.toc-item--plain .toc-item__title { font-weight: 500; color: var(--ink-2); }
.toc-section { padding: 0; overflow: hidden; }
.toc-section summary { list-style: none; display: flex; align-items: center; gap: 16px; padding: 16px 18px; cursor: pointer; }
.toc-section summary::-webkit-details-marker { display: none; }
.toc-section summary .chev { margin-inline-start: auto; color: var(--ink-3); transition: transform .2s; }
.toc-section[open] summary .chev { transform: rotate(180deg); }
.toc-section__list { border-top: 1px solid var(--line); padding: 6px 18px 12px; }
.toc-sub { display: flex; gap: 14px; align-items: center; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.toc-sub:last-child { border-bottom: 0; }
.toc-sub a { color: var(--ink); font-weight: 500; }
.toc-sub .muted { font-size: 13.5px; }
.read-link { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; white-space: nowrap; padding: 6px 12px; border-radius: 10px; background: var(--surface-2); color: var(--ink); }
.read-link:hover { background: var(--chip-bg); color: var(--chip-ink); text-decoration: none; }
.read-link .icon { width: 17px; height: 17px; }
@media (max-width: 640px) {
  .toc-item { padding: 14px; gap: 12px; flex-wrap: wrap; }
  .toc-item .page-badge { min-width: 44px; height: 46px; font-size: 15px; }
  .toc-item__title { font-size: 16px; }
  .toc-item__actions { width: 100%; justify-content: flex-end; margin-top: -4px; }
}

/* ---------- Issue page ---------- */
.issue-layout { position: relative; z-index: 1; display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 40px; align-items: start; margin-top: -24px; }
.issue-aside { position: sticky; top: calc(var(--header-h) + 20px); display: flex; flex-direction: column; gap: 14px; }
.issue-aside__cover img { width: 100%; aspect-ratio: .72; object-fit: cover; border-radius: 14px; box-shadow: var(--shadow-cover); background: var(--sky); }
.issue-aside .btn { width: 100%; }
.issue-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.issue-nav a { display: flex; flex-direction: column; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 13px; }
.issue-nav a:hover { text-decoration: none; border-color: var(--line-2); }
.issue-nav a span { color: var(--ink-3); }
.issue-nav a strong { font-size: 15px; }
.issue-nav a:last-child { text-align: end; }
.issue-main { padding-top: 56px; }
@media (max-width: 900px) {
  .issue-layout { grid-template-columns: minmax(0, 1fr); margin-top: 0; gap: 24px; }
  .issue-aside { position: static; display: grid; grid-template-columns: 140px 1fr; align-items: start; margin-top: -40px; }
  .issue-aside__cover { grid-row: span 3; }
  .issue-main { padding-top: 0; }
}
@media (max-width: 480px) { .issue-aside { grid-template-columns: 112px 1fr; gap: 10px; } .issue-aside .btn { min-height: 42px; font-size: 14px; padding-inline: 10px; } }

/* ---------- Article page ---------- */
.article-head .kicker { margin-bottom: 12px; }
.article-head h1 { font-size: clamp(28px, 4vw, 44px); max-width: 26ch; }
.byline { display: inline-flex; align-items: center; gap: 12px; margin-top: 18px; color: #fff; }
.byline:hover { text-decoration: none; }
.avatar { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--gold); color: #2a1d00; font-family: var(--font-heading); font-weight: 700; font-size: 22px; flex: none; }
.avatar--lg { width: 84px; height: 84px; font-size: 38px; }
.avatar--sky { background: var(--chip-bg); color: var(--chip-ink); }
.byline small { display: block; color: var(--band-ink-2); font-size: 13px; }
.byline strong { font-size: 17px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.fact { padding: 16px 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.fact__label { color: var(--ink-3); font-size: 13.5px; }
.fact__value { font-weight: 700; font-size: 17px; color: var(--ink); }
.fact__value a { color: inherit; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cite-box { position: relative; padding: 20px 22px; border-radius: 16px; background: var(--accent-bg); border: 1px solid color-mix(in srgb, var(--gold) 40%, transparent); }
.cite-box p { margin: 0; font-size: 15.5px; line-height: 1.9; color: var(--ink); padding-inline-end: 100px; }
.cite-box .btn { position: absolute; top: 14px; inset-inline-end: 14px; }
.cite-box__label { font-weight: 700; color: var(--accent-ink); font-size: 14px; margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
@media (max-width: 560px) { .cite-box p { padding-inline-end: 0; } .cite-box .btn { position: static; margin-top: 12px; } }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; }
.main-with-aside { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; align-items: start; }
.main-with-aside > aside { position: sticky; top: calc(var(--header-h) + 20px); display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 960px) { .two-col, .main-with-aside { grid-template-columns: minmax(0, 1fr); } .main-with-aside > aside { position: static; } }

.mini-list { display: flex; flex-direction: column; }
.mini-list a { display: flex; gap: 12px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--ink); }
.mini-list a:last-child { border-bottom: 0; }
.mini-list a:hover { text-decoration: none; color: var(--link); }
.mini-list .tag { flex: none; font-size: 12.5px; font-weight: 700; color: var(--accent-ink); background: var(--accent-bg); padding: 1px 9px; border-radius: 999px; }
.mini-list small { display: block; color: var(--ink-3); font-size: 13.5px; }

/* ---------- Search ---------- */
.search-band { padding: 34px 0 40px; }
.search-box { position: relative; max-width: 820px; }
.search-box .icon { position: absolute; inset-inline-start: 20px; top: 50%; transform: translateY(-50%); width: 24px; height: 24px; color: #74838e; pointer-events: none; }
.search-box input { width: 100%; height: 64px; border-radius: 18px; border: 0; padding-inline: 58px 120px; font-size: 19px; background: #fff; color: #14212b; box-shadow: 0 20px 40px -20px rgba(0,0,0,.5); }
.search-box input:focus { outline: 3px solid rgba(247,183,29,.75); outline-offset: 2px; }
.search-box .btn { position: absolute; inset-inline-end: 8px; top: 8px; min-height: 48px; }
.search-box__spinner { position: absolute; inset-inline-end: 118px; top: 50%; width: 20px; height: 20px; margin-top: -10px; border-radius: 50%; border: 2px solid #c9d4db; border-top-color: var(--blue); animation: spin .7s linear infinite; display: none; }
.is-loading .search-box__spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }
.search-hint { color: var(--band-ink-2); font-size: 14.5px; margin-top: 14px; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.search-hint span { display: inline-flex; align-items: center; gap: 6px; }
.search-hint .icon { width: 16px; height: 16px; color: var(--gold); }
@media (max-width: 560px) {
  .search-box input { height: 56px; font-size: 17px; padding-inline: 48px 16px; }
  .search-box .icon { inset-inline-start: 16px; }
  .search-box .btn { display: none; }
  .search-box__spinner { inset-inline-end: 16px; }
}
.search-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 32px; align-items: start; }
.filters { position: sticky; top: calc(var(--header-h) + 20px); padding: 20px; display: flex; flex-direction: column; gap: 20px; }
.filters h2 { font-family: var(--font-body); font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.filters fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.filters legend { font-weight: 600; font-size: 14px; color: var(--ink-2); margin-bottom: 8px; padding: 0; }
.range-inputs { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; color: var(--ink-3); font-size: 14px; }
.range-inputs .input { min-height: 44px; padding: 8px 12px; text-align: center; }
.filters .chips .chip { min-height: 32px; font-size: 13.5px; padding: 3px 11px; }
.filters-toggle { display: none; }
@media (max-width: 960px) {
  .search-layout { grid-template-columns: minmax(0, 1fr); }
  .filters { position: static; display: none; }
  .filters.is-open { display: flex; }
  .filters-toggle { display: inline-flex; }
}
.facets { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.facets::-webkit-scrollbar { display: none; }
.results-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 22px 0 14px; flex-wrap: wrap; }
.results-head .count { color: var(--ink-2); font-size: 15px; }
.results-head .select { width: auto; min-height: 40px; padding-block: 6px; font-size: 14.5px; }
.result-group { margin-top: 30px; }
.result-group__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.result-group__head h2 { font-family: var(--font-body); font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.result-group__head h2 .count { font-size: 13px; font-weight: 600; color: var(--ink-3); }
.results { display: flex; flex-direction: column; gap: 10px; }
.result { display: flex; gap: 16px; padding: 16px 18px; align-items: flex-start; }
.result__body { flex: 1; min-width: 0; }
.result__title { display: block; font-weight: 600; font-size: 17px; line-height: 1.65; color: var(--ink); }
a.result__title:hover { color: var(--link); }
.result__author { color: var(--ink-2); font-size: 14.5px; }
.result__excerpt { color: var(--ink-2); font-size: 15px; margin: 6px 0 0; line-height: 1.85; }
.result__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin-top: 8px; font-size: 13.5px; }
.result__meta .where { color: var(--accent-ink); font-weight: 600; }
.result__meta a { font-weight: 600; display: inline-flex; align-items: center; gap: 5px; }
.result__meta .icon { width: 16px; height: 16px; }
.type-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; background: var(--accent-bg); color: var(--accent-ink); flex: none; }
.type-icon .icon { width: 22px; height: 22px; }
.issue-hit { display: flex; gap: 18px; align-items: center; padding: 16px 18px; background: linear-gradient(90deg, var(--surface), var(--chip-bg)); }
.issue-hit img { width: 70px; aspect-ratio: .72; object-fit: cover; border-radius: 8px; box-shadow: var(--shadow-1); }
.researcher-hits { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 16px; }
.researcher-hits > span { color: var(--ink-3); font-size: 14px; margin-inline-end: 4px; }
.empty { text-align: center; padding: 56px 20px; }
.empty .icon-wrap { display: inline-grid; place-items: center; width: 72px; height: 72px; border-radius: 22px; background: var(--surface-2); color: var(--ink-3); margin-bottom: 14px; }
.empty .icon-wrap .icon { width: 34px; height: 34px; }
.empty h2 { font-family: var(--font-body); font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.empty p { color: var(--ink-2); }
.tips { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.tip { padding: 18px 20px; }
.tip h3 { font-family: var(--font-body); font-size: 15.5px; font-weight: 700; display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.tip h3 .icon { color: var(--blue); }
.tip p { margin: 0; color: var(--ink-2); font-size: 14.5px; }
.tip code { font-family: var(--font-body); background: var(--surface-2); border-radius: 6px; padding: 1px 7px; font-size: 14px; color: var(--ink); }

/* Search dialog */
.search-dialog { width: min(680px, calc(100vw - 24px)); max-height: min(78vh, 720px); padding: 0; border: 0; border-radius: 20px; background: var(--surface); color: var(--ink); box-shadow: 0 40px 80px -24px rgba(0,0,0,.55); margin-top: 8vh; overflow: hidden; }
.search-dialog[open] { display: flex; flex-direction: column; animation: pop .16s ease; }
.search-dialog::backdrop { background: rgba(4, 20, 35, .6); backdrop-filter: blur(3px); }
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.search-dialog__field { display: flex; align-items: center; gap: 12px; padding: 0 18px; border-bottom: 1px solid var(--line); }
.search-dialog__field .icon { width: 22px; height: 22px; color: var(--ink-3); }
.search-dialog__field input { flex: 1; min-width: 0; height: 64px; border: 0; background: transparent; font-size: 18px; }
.search-dialog__field input:focus { outline: none; }
.search-dialog__field kbd, .search-dialog__foot kbd { font-family: var(--font-body); font-size: 12px; border: 1px solid var(--line-2); border-radius: 6px; padding: 0 6px; color: var(--ink-3); line-height: 20px; }
.search-dialog__results { overflow-y: auto; padding: 8px; flex: 1; }
.search-dialog__group { font-size: 12.5px; font-weight: 700; color: var(--ink-3); padding: 10px 12px 4px; }
.search-dialog__item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--ink); }
.search-dialog__item:hover, .search-dialog__item[aria-selected="true"] { background: var(--surface-2); text-decoration: none; }
.search-dialog__item img { width: 34px; aspect-ratio: .72; object-fit: cover; border-radius: 4px; }
.search-dialog__item .ico { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--surface-2); color: var(--ink-3); flex: none; }
.search-dialog__item[aria-selected="true"] .ico { background: var(--surface); }
.search-dialog__item .ico .icon { width: 18px; height: 18px; }
.search-dialog__item b { display: block; font-weight: 600; font-size: 15px; line-height: 1.55; }
.search-dialog__item small { display: block; color: var(--ink-3); font-size: 13px; line-height: 1.5; }
.search-dialog__empty { padding: 28px 16px; text-align: center; color: var(--ink-3); }
.search-dialog__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-3); }
.search-dialog__foot a { font-weight: 600; }
.search-dialog__keys { display: flex; gap: 12px; }
@media (max-width: 560px) { .search-dialog { margin-top: 0; max-height: 88vh; border-radius: 0 0 20px 20px; width: 100vw; max-width: 100vw; } .search-dialog__keys { display: none; } }

/* ---------- Posts ---------- */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.post-card { display: flex; flex-direction: column; gap: 8px; padding: 22px; height: 100%; }
.post-card__top { display: flex; align-items: center; gap: 10px; color: var(--ink-3); font-size: 13.5px; }
.post-card h3 { font-size: 21px; line-height: 1.55; color: var(--ink); }
.post-card p { color: var(--ink-2); font-size: 15px; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.85; }
.post-card__foot { margin-top: auto; padding-top: 8px; color: var(--ink-3); font-size: 13.5px; display: flex; align-items: center; gap: 6px; }
.post-card__foot .icon { width: 16px; height: 16px; }
@media (max-width: 400px) { .post-grid { grid-template-columns: minmax(0, 1fr); } }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 22px; }

/* Reading prose */
.prose { font-size: 18.5px; line-height: 2.05; color: var(--ink); }
.prose p { margin: 0 0 1.1em; }
.prose h2, .prose h3 { margin: 1.6em 0 .6em; font-size: 1.35em; }
.prose ul, .prose ol { padding-inline-start: 1.4em; margin: 0 0 1.1em; }
.prose li { margin-bottom: .4em; }
.prose blockquote { margin: 1.2em 0; padding: 14px 20px; border-inline-start: 4px solid var(--gold); background: var(--accent-bg); border-radius: 0 12px 12px 0; }
.prose a { text-decoration: underline; text-underline-offset: 4px; }
.prose strong { color: var(--ink); }
.prose--rules ol { counter-reset: rule; list-style: none; padding: 0; }
.prose--rules > ol > li { counter-increment: rule; position: relative; padding: 16px 64px 16px 20px; margin-bottom: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; line-height: 1.95; font-size: 17px; }
.prose--rules > ol > li::before { content: counter(rule, arabic-indic); position: absolute; inset-inline-start: 16px; top: 14px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--chip-bg); color: var(--chip-ink); font-weight: 700; font-size: 16px; }
.prose--rules ol ol { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.prose--rules ol ol li { counter-increment: none; position: relative; padding-inline-start: 26px; font-size: 16px; }
.prose--rules ol ol li::before { content: ""; position: absolute; inset-inline-start: 6px; top: .85em; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
:root[dir="rtl"] .prose--rules > ol > li { padding: 16px 64px 16px 20px; }

.post-source { display: flex; gap: 14px; align-items: center; padding: 16px 18px; }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.post-nav a { display: flex; flex-direction: column; gap: 2px; padding: 14px 18px; color: var(--ink); }
.post-nav a span { color: var(--ink-3); font-size: 13px; display: inline-flex; align-items: center; gap: 4px; }
.post-nav a strong { font-weight: 600; line-height: 1.6; }
.post-nav a.next { text-align: end; align-items: flex-end; }
@media (max-width: 560px) { .post-nav { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Researchers ---------- */
.letters { display: flex; flex-wrap: wrap; gap: 6px; }
.letters a, .letters span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; font-weight: 700; font-size: 16px; }
.letters a { background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.letters a:hover { background: var(--chip-bg); color: var(--chip-ink); text-decoration: none; }
.letters span { color: var(--line-2); }
.letter-group { margin-top: 36px; }
.letter-group h2 { display: flex; align-items: center; gap: 12px; font-size: 30px; margin-bottom: 14px; }
.letter-group h2 small { font-family: var(--font-body); font-size: 14px; font-weight: 500; color: var(--ink-3); }
.name-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.name-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; color: var(--ink); }
.name-card .avatar { width: 40px; height: 40px; font-size: 18px; }
.name-card strong { font-weight: 600; line-height: 1.5; display: block; }
.name-card small { color: var(--ink-3); font-size: 13px; }
.name-card .count { margin-inline-start: auto; font-weight: 700; color: var(--chip-ink); background: var(--chip-bg); border-radius: 999px; padding: 0 10px; font-size: 13.5px; line-height: 26px; }
.filter-input { max-width: 420px; position: relative; }
.filter-input .icon { position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.filter-input .input { padding-inline-start: 44px; }

/* ---------- Editorial ---------- */
.member { display: flex; gap: 16px; align-items: flex-start; padding: 20px; }
.member h3 { font-family: var(--font-body); font-size: 17px; font-weight: 700; line-height: 1.55; }
.member p { margin: 4px 0 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.7; }
.member--chief { background: linear-gradient(135deg, var(--surface), var(--chip-bg)); }
.member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
@media (max-width: 400px) { .member-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- About ---------- */
.about-covers { display: flex; align-items: flex-end; justify-content: center; gap: 18px; }
.about-covers figure { margin: 0; text-align: center; }
.about-covers img { width: 150px; aspect-ratio: .72; object-fit: cover; border-radius: 10px; box-shadow: var(--shadow-cover); background: var(--sky); }
.about-covers figcaption { color: var(--ink-2); font-size: 14px; margin-top: 10px; font-weight: 600; }
.about-covers .arrow { color: var(--ink-3); align-self: center; font-size: 13px; text-align: center; }
.about-covers .arrow .icon { margin: 0 auto 4px; }
@media (max-width: 480px) { .about-covers img { width: 110px; } }

/* ---------- App promo ---------- */
.app-band { padding: 64px 0 0; }
.app-band__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 420px); gap: 48px; align-items: end; }
.app-band__copy { padding-bottom: 64px; }
.app-band h2 { font-size: clamp(30px, 4vw, 44px); }
.app-band p { color: var(--band-ink-2); font-size: 17px; max-width: 54ch; }
.app-features { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; margin: 24px 0 30px; padding: 0; list-style: none; }
.app-features li { display: flex; gap: 10px; align-items: flex-start; color: #fff; font-size: 15.5px; }
.app-features .icon { color: var(--gold); margin-top: 4px; }
.store-badges { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.store-badge { display: inline-flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 18px; border-radius: 14px; background: #000; color: #fff; border: 1px solid rgba(255,255,255,.25); }
.store-badge:hover { text-decoration: none; background: #111; }
.store-badge svg { width: 26px; height: 26px; }
.store-badge small { display: block; font-size: 11.5px; opacity: .8; line-height: 1.2; }
.store-badge b { display: block; font-size: 17px; line-height: 1.25; font-family: system-ui, sans-serif; }
.store-badge--soon { background: rgba(255,255,255,.08); cursor: default; }
.store-badge--soon:hover { background: rgba(255,255,255,.08); }
.phones { position: relative; height: 470px; }
.phone { position: absolute; bottom: 0; width: 230px; border-radius: 34px; padding: 9px; background: #0c1a26; box-shadow: 0 30px 60px -20px rgba(0,0,0,.6), inset 0 0 0 1.5px rgba(255,255,255,.12); }
.phone img { border-radius: 26px; width: 100%; aspect-ratio: 1206 / 2622; object-fit: cover; object-position: top; }
.phone--front { inset-inline-start: 0; z-index: 2; }
.phone--back { inset-inline-end: 0; bottom: 40px; transform: rotate(6deg); opacity: .95; }
@media (max-width: 900px) {
  .app-band__grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .app-band__copy { padding-bottom: 8px; }
  .phones { height: 380px; max-width: 400px; margin-inline: auto; width: 100%; }
  .phone { width: 190px; }
}
@media (max-width: 480px) { .app-features { grid-template-columns: minmax(0, 1fr); } .phones { height: 330px; } .phone { width: 160px; border-radius: 26px; } .phone img { border-radius: 19px; } }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.feature { padding: 22px; }
.feature .stat__icon { margin-bottom: 14px; }
.feature h3 { font-family: var(--font-body); font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.feature p { margin: 0; color: var(--ink-2); font-size: 15px; }

/* CTA */
.cta { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 24px; align-items: center; padding: 30px 32px; background: linear-gradient(120deg, var(--surface) 0%, var(--accent-bg) 100%); }
.cta__icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 18px; background: var(--gold); color: #2a1d00; }
.cta__icon .icon { width: 30px; height: 30px; }
.cta h2 { font-size: 26px; }
.cta p { margin: 4px 0 0; color: var(--ink-2); }
@media (max-width: 760px) { .cta { grid-template-columns: minmax(0, 1fr); text-align: start; padding: 24px; } }

/* ---------- Footer ---------- */
.site-footer { position: relative; margin-top: 24px; background: var(--navy-deep); color: rgba(255,255,255,.78); overflow: hidden; isolation: isolate; }
.site-footer::before { content: ""; position: absolute; inset: 0; background-image: var(--pattern); background-size: 120px; opacity: .04; z-index: -1; }
:root[data-theme="dark"] .site-footer { background: #061a2b; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .site-footer { background: #061a2b; } }
.site-footer a { color: rgba(255,255,255,.82); }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 36px; padding: 56px 0 40px; }
.footer-grid h2 { font-family: var(--font-body); font-size: 15px; font-weight: 700; color: #fff; margin-bottom: 14px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.footer-about p { font-size: 14.5px; margin-top: 14px; max-width: 40ch; }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; }
.footer-contact .icon { width: 18px; height: 18px; margin-top: 4px; color: var(--gold); }
.footer-contact a { direction: ltr; unicode-bidi: plaintext; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 18px 0 22px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; font-size: 13.5px; }
.socials { display: flex; gap: 8px; margin-top: 16px; }
.socials a { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: rgba(255,255,255,.08); }
.socials a:hover { background: rgba(255,255,255,.16); }
.socials svg { width: 18px; height: 18px; fill: currentColor; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-about { grid-column: 1 / -1; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; } }

/* ---------- Pagination ---------- */
.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 36px; }
.pagination a, .pagination span { display: inline-grid; place-items: center; min-width: 42px; height: 42px; padding-inline: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 600; font-size: 15px; }
.pagination a:hover { border-color: var(--line-2); text-decoration: none; background: var(--surface-2); }
.pagination [aria-current="page"] { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.pagination .is-disabled { opacity: .45; }
.pagination .icon { width: 18px; height: 18px; }

/* ---------- Misc ---------- */
.muted { color: var(--ink-3); }
.lead-text { font-size: 18px; color: var(--ink-2); line-height: 1.95; }
.divider { height: 1px; background: var(--line); border: 0; margin: 32px 0; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--ink); color: var(--bg); padding: 12px 20px; border-radius: 12px; font-weight: 600; font-size: 15px; z-index: 120; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; box-shadow: var(--shadow-2); }
.toast.is-visible { opacity: 1; transform: translateX(-50%); }
.error-page { text-align: center; padding: 80px 0; }
.error-page .code { font-family: var(--font-heading); font-size: 110px; line-height: 1; color: var(--gold); }
.error-page h1 { font-size: 34px; margin: 10px 0; }
.error-page .search-box { margin: 26px auto 0; }
.error-page .search-box input { box-shadow: var(--shadow-2); border: 1px solid var(--line); }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.info-card { display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px; }
.info-card h3 { font-family: var(--font-body); font-size: 14px; color: var(--ink-3); font-weight: 600; }
.info-card p, .info-card a { margin: 0; font-weight: 600; color: var(--ink); font-size: 16px; }
.info-card a[href^="mailto"] { direction: ltr; unicode-bidi: plaintext; }
.steps { counter-reset: step; display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 0; list-style: none; }
.steps li { counter-increment: step; display: flex; gap: 12px; align-items: flex-start; font-size: 15px; color: var(--ink-2); }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--chip-bg); color: var(--chip-ink); font-weight: 700; font-size: 14px; flex: none; }
.steps strong { color: var(--ink); display: block; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .site-footer, .actions, .toc-item__actions, .drawer, .search-dialog { display: none !important; }
  .band { background: none; color: #000; }
  .band h1, .band h2 { color: #000; }
}

/* App not yet in the stores */
.pill--soon { background: var(--gold); color: #2a1d00; font-size: 14px; padding: 5px 14px; }
.pill--soon .icon { width: 16px; height: 16px; }
.app-soon { display: flex; align-items: center; gap: 14px; max-width: 520px; padding: 16px 20px; border-radius: 16px; background: rgba(247, 183, 29, .14); border: 1px solid rgba(247, 183, 29, .6); color: #fff; }
.app-soon__icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--gold); color: #2a1d00; flex: none; }
.app-soon__icon .icon { width: 26px; height: 26px; }
.app-soon strong { display: block; font-size: 19px; line-height: 1.5; color: var(--gold); }
.app-soon span { display: block; font-size: 14.5px; color: var(--band-ink-2); line-height: 1.7; }

/* New-issue alerts */
.subscribe-card { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1.1fr); gap: 24px; align-items: center; padding: 28px 30px; background: linear-gradient(120deg, var(--surface) 0%, var(--chip-bg) 100%); }
.subscribe-card h2 { font-size: 26px; }
.subscribe-card p { margin: 4px 0 0; color: var(--ink-2); }
.subscribe__row { display: flex; gap: 8px; }
.subscribe__row .input { flex: 1; min-width: 0; text-align: start; }
.subscribe__row .btn { flex: none; }
.subscribe__note { margin: 8px 0 0; font-size: 13px; color: var(--ink-3); }
.subscribe__done { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--success-bg); color: var(--success); font-weight: 500; font-size: 14.5px; line-height: 1.8; }
.subscribe__done .icon { margin-top: 5px; flex: none; }
.footer-subscribe { margin-top: 18px; max-width: 420px; }
.footer-subscribe strong { display: block; color: #fff; margin-bottom: 8px; font-size: 15px; }
.subscribe--compact .input { min-height: 44px; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.2); color: #fff; }
.subscribe--compact .input::placeholder { color: rgba(255,255,255,.55); }
.subscribe--compact .btn { min-height: 44px; background: var(--gold); color: #2a1d00; }
.subscribe--compact .subscribe__note { color: rgba(255,255,255,.55); }
.subscribe--compact .subscribe__done { background: rgba(31,122,77,.25); color: #c8f0d9; }
@media (max-width: 900px) { .subscribe-card { grid-template-columns: minmax(0, 1fr); text-align: start; padding: 24px; } }
@media (max-width: 420px) { .subscribe__row { flex-direction: column; } }
.subscribe__row .input:placeholder-shown { direction: rtl; }
