/* ==========================================================================
   Wadifa v2 — public site. Royal blue / navy / yellow, Almarai.
   Mobile-first (360px), RTL/LTR via logical properties.
   ========================================================================== */

:root {
  --font: "Almarai", "Segoe UI", Tahoma, system-ui, -apple-system, sans-serif;

  /* Comfort light theme: no pure white, softer contrast (less glare on long reading) */
  --bg: #e4e8ee;
  --surface: #f3f5f8;
  --surface-2: #eaeef3;
  --line: #d3dae4;
  --line-strong: #bfc9d6;
  --text: #2a313c;
  --muted: #556174;
  --card: #f8f9fb;
  --card-hover: #ffffff;
  --primary: #4057aa;
  --primary-hover: #34488f;
  --primary-ink: #ffffff;
  --primary-soft: #eef2ff;
  --primary-softer: #e6ebf4;
  --navy: #011d45;
  --navy-2: #1a3a8f;
  --accent: #efba25;
  --accent-strong: #ffd043;
  --accent-soft: #fff6d6;
  --accent-ink: #1f252e;
  --urgent: #c2410c;
  --urgent-soft: #fdebe4;
  --soon: #8a5a00;
  --soon-soft: #fff4d6;
  --open: #0e7c86;
  --open-soft: #e3f6f7;
  --closed: #66748c;
  --closed-soft: #eef1f6;
  --info: #1b6fb0;
  --info-soft: #e7f2fb;
  --tg: #229ed9;
  --wa: #1fa855;
  --fb: #1877f2;

  --radius-sm: 10px;
  --radius: 15px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgb(16 34 87 / 5%);
  --shadow: 0 1px 2px rgb(16 34 87 / 4%), 0 8px 24px -16px rgb(16 34 87 / 18%);
  --shadow-lg: 0 24px 60px -20px rgb(1 29 69 / 38%);

  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 24px; --space-6: 32px; --space-7: 48px; --space-8: 64px;

  --topbar-h: 64px;
  --tabbar-h: 64px;
  --container: 1180px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a1020; --surface: #111a2e; --surface-2: #16213a; --card: #16213a; --card-hover: #1b2848; --line: #223052; --line-strong: #2d3d63;
    --text: #e7ecf6; --muted: #9ba9c4; --primary: #93a6ff; --primary-hover: #adbcff; --primary-ink: #0a1020;
    --primary-soft: #1b2750; --primary-softer: #141f3d; --accent-soft: #3a3010; --accent-ink: #1f252e;
    --urgent: #ff8a65; --urgent-soft: #3d1e14; --soon: #ffd043; --soon-soft: #352b0e; --open: #5fd4dc; --open-soft: #0f3236;
    --closed: #9ba9c4; --closed-soft: #1c2740; --info: #7cc0f2; --info-soft: #12304a;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 10px 30px -14px rgb(0 0 0 / 60%);
    --shadow-lg: 0 24px 60px -20px rgb(0 0 0 / 70%);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a1020; --surface: #111a2e; --surface-2: #16213a; --card: #16213a; --card-hover: #1b2848; --line: #223052; --line-strong: #2d3d63;
  --text: #e7ecf6; --muted: #9ba9c4; --primary: #93a6ff; --primary-hover: #adbcff; --primary-ink: #0a1020;
  --primary-soft: #1b2750; --primary-softer: #141f3d; --accent-soft: #3a3010; --accent-ink: #1f252e;
  --urgent: #ff8a65; --urgent-soft: #3d1e14; --soon: #ffd043; --soon-soft: #352b0e; --open: #5fd4dc; --open-soft: #0f3236;
  --closed: #9ba9c4; --closed-soft: #1c2740; --info: #7cc0f2; --info-soft: #12304a;
  --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 10px 30px -14px rgb(0 0 0 / 60%);
  --shadow-lg: 0 24px 60px -20px rgb(0 0 0 / 70%);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--topbar-h) + 12px); }
body {
  font-family: var(--font); font-size: 1rem; line-height: 1.7; color: var(--text); background: var(--bg);
  min-height: 100vh; padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
html[lang="ar"] body { line-height: 1.85; }
img, svg { display: block; max-width: 100%; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }
h1, h2, h3 { line-height: 1.4; font-weight: 800; letter-spacing: -.01em; }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3 { letter-spacing: 0; }
h1 { font-size: clamp(1.5rem, 1.2rem + 1.6vw, 2.2rem); }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.02rem; }
button, input, select, textarea { font: inherit; color: inherit; }
input, select, textarea { font-family: "Almarai Field", var(--font); line-height: 1.6; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--accent-soft); }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85em; }

.ic { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
[dir="rtl"] .ic.flip { transform: scaleX(-1); }
[dir="ltr"] .ic.flip-back { transform: scaleX(-1); }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--space-4); }
.narrow { max-width: 680px; }
.narrow-wide { max-width: 860px; }
.stack > * + * { margin-block-start: var(--space-4); }
.stack-lg > * + * { margin-block-start: var(--space-5); }
.stack-xl > * + * { margin-block-start: var(--space-7); }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.visually-hidden, .hp {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; inset-inline-start: var(--space-3); top: -60px; z-index: 200;
  background: var(--primary); color: var(--primary-ink); padding: 10px 16px; border-radius: var(--radius-sm);
}
.skip-link:focus { top: var(--space-3); color: var(--primary-ink); }
.main { display: block; padding-block-end: var(--space-7); outline: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 44px; padding: 10px 20px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 700; font-size: .95rem; line-height: 1.2; cursor: pointer; text-align: center; white-space: nowrap;
  transition: background-color .15s var(--ease), border-color .15s var(--ease), transform .15s var(--ease), box-shadow .15s var(--ease), color .15s;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--primary); color: var(--primary-ink); box-shadow: 0 6px 16px -8px rgb(64 87 170 / 60%); }
.btn--primary:hover { background: var(--primary-hover); color: var(--primary-ink); }
.btn--accent { background: var(--accent-strong); color: var(--accent-ink); }
.btn--accent:hover { background: var(--accent); color: var(--accent-ink); }
.btn--ghost { background: var(--surface); border-color: var(--line-strong); color: var(--text); }
.btn--ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn--light { background: rgb(255 255 255 / 12%); border-color: rgb(255 255 255 / 40%); color: #fff; }
.btn--light:hover { background: rgb(255 255 255 / 20%); color: #fff; }
.btn--text { background: transparent; color: var(--muted); }
.btn--text:hover { color: var(--text); }
.btn--telegram { background: var(--tg); color: #fff; }
.btn--telegram:hover { color: #fff; filter: brightness(1.05); }
.btn--whatsapp { background: var(--wa); color: #fff; }
.btn--whatsapp:hover { color: #fff; filter: brightness(1.05); }
.btn--block { width: 100%; }
.btn--sm { min-height: 38px; padding: 6px 14px; font-size: .88rem; }
.btn--lg { min-height: 52px; font-size: 1.02rem; padding-inline: 24px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
  background: transparent; border: 0; color: var(--text); cursor: pointer;
}
.icon-btn:hover { background: var(--primary-soft); color: var(--primary); }
.icon-btn .ic { width: 22px; height: 22px; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--surface) 92%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(12px); backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line); box-shadow: 0 1px 0 rgb(16 34 87 / 3%);
}
.topbar__inner { height: var(--topbar-h); display: flex; align-items: center; gap: var(--space-3); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--navy); font-weight: 800; font-size: 1.15rem; }
:root[data-theme="dark"] .brand { color: var(--text); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand { color: var(--text); } }
.brand:hover { color: var(--primary); }
.brand__mark { width: 34px; height: 34px; }
.brand__bg { fill: var(--primary); }
.brand__check { fill: none; stroke: var(--accent-strong); stroke-width: 3.6; stroke-linecap: round; stroke-linejoin: round; }
.topnav { display: none; }
.topbar__actions { margin-inline-start: auto; display: flex; align-items: center; gap: 2px; }
.topbar__cta { display: none; margin-inline: 6px; }
.lang-btn {
  display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding-inline: 10px; border-radius: 12px;
  font-weight: 800; color: var(--text); font-size: .9rem;
}
.lang-btn:hover { background: var(--primary-soft); color: var(--primary); }

.search-panel { border-top: 1px solid var(--line); background: var(--surface); padding-block: var(--space-3); box-shadow: var(--shadow); }
.search-panel__form { position: relative; display: flex; gap: var(--space-2); align-items: center; }
.search-field {
  position: relative; flex: 1; display: flex; align-items: center; gap: var(--space-2); min-width: 0;
  background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 14px; padding-inline: 14px; min-height: 50px;
}
.search-field:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); background: var(--surface); }
.search-field .ic { color: var(--muted); }
.search-field input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font-size: 1rem; padding-block: 10px; }
.search-field input::-webkit-search-cancel-button { display: none; }

/* Instant suggestions (grouped) */
.suggest {
  position: absolute; inset-inline: var(--space-4); top: calc(100% + 6px); z-index: 60; list-style: none; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  max-height: 70vh; overflow: auto; text-align: start;
}
.search-card .suggest, .hero .suggest, .results-search .suggest { inset-inline: 0; }
.suggest__group { padding: 8px 12px 4px; font-size: .72rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.suggest a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; color: var(--text); }
.suggest a:hover, .suggest [aria-selected="true"] a { background: var(--primary-soft); }
.suggest__body { min-width: 0; flex: 1; }
.suggest strong { display: block; font-weight: 700; line-height: 1.45; }
.suggest small { color: var(--muted); display: block; line-height: 1.5; }
.suggest__ic { flex: none; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.suggest__ic .ic { width: 16px; height: 16px; }
.suggest__pill { flex: none; font-size: .7rem; font-weight: 800; padding: 1px 8px; border-radius: 999px; background: var(--open-soft); color: var(--open); }
.suggest__pill--closed { background: var(--closed-soft); color: var(--closed); }
.suggest__all a { justify-content: center; font-weight: 700; color: var(--primary); border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; margin-top: 4px; }

/* ---------- Bottom tab bar (mobile) ---------- */
.tabbar {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 50;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  background: color-mix(in srgb, var(--surface) 95%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-top: 1px solid var(--line);
}
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted); font-size: .74rem; font-weight: 700; position: relative; }
.tabbar .ic { width: 24px; height: 24px; }
.tabbar a[aria-current="page"] { color: var(--primary); }
.tabbar a[aria-current="page"]::before { content: ""; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); }

/* ---------- Hero (home) ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff; isolation: isolate;
  background:
    radial-gradient(60% 80% at 85% 10%, rgb(255 208 67 / 18%) 0%, transparent 60%),
    radial-gradient(70% 90% at 0% 100%, rgb(64 87 170 / 55%) 0%, transparent 60%),
    linear-gradient(135deg, var(--navy) 0%, #0d2a6b 55%, var(--navy-2) 100%);
  padding-block: var(--space-6) calc(var(--space-8) + 40px);
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background:
    repeating-linear-gradient(115deg, transparent 0 46px, rgb(255 255 255 / 4%) 46px 47px),
    radial-gradient(circle at 1px 1px, rgb(255 255 255 / 9%) 1px, transparent 0) 0 0 / 22px 22px;
  -webkit-mask-image: linear-gradient(to bottom, #000 40%, transparent);
  mask-image: linear-gradient(to bottom, #000 40%, transparent);
}
.hero::after {
  content: ""; position: absolute; inset-inline-end: -60px; bottom: -80px; width: 340px; height: 340px; z-index: -1;
  border-radius: 50%; border: 40px solid rgb(255 208 67 / 8%);
}
.hero__inner { position: relative; }
.hero__kicker {
  display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; font-weight: 700;
  background: rgb(255 255 255 / 10%); border: 1px solid rgb(255 255 255 / 18%); padding: 4px 14px; border-radius: 999px;
}
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-strong); box-shadow: 0 0 0 0 rgb(255 208 67 / 60%); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgb(255 208 67 / 0%); } 100% { box-shadow: 0 0 0 0 rgb(255 208 67 / 0%); } }
.hero__title { margin-block: var(--space-4) var(--space-3); max-width: 26ch; font-size: clamp(1.75rem, 1.2rem + 2.8vw, 3rem); line-height: 1.3; }
.hero__title .hl { color: var(--accent-strong); display: block; }
.hero__sub { color: rgb(255 255 255 / 82%); max-width: 58ch; font-size: 1.02rem; }

/* Guided search card overlapping the hero */
.search-card {
  position: relative; z-index: 5; margin-block-start: calc(-1 * (var(--space-8) + 8px));
  background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); border: 1px solid var(--line);
  padding: var(--space-4);
}
.search-card__title { font-size: 1rem; font-weight: 800; color: var(--navy); margin-block-end: var(--space-3); text-align: center; }
:root[data-theme="dark"] .search-card__title { color: var(--text); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .search-card__title { color: var(--text); } }
.search-card__form { position: relative; display: grid; gap: var(--space-2); grid-template-columns: minmax(0, 1fr) auto; }
.search-card__form .search-field { grid-column: 1 / -1; }
.select {
  min-height: 50px; padding: 10px 14px; padding-inline-end: 40px; border-radius: 14px; border: 1px solid var(--line-strong);
  background-color: var(--surface-2);
  appearance: none; -webkit-appearance: none; font-weight: 700; color: var(--text); min-width: 0;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-size: 6px 6px; background-repeat: no-repeat; background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%;
}
[dir="rtl"] .select { background-position: 14px 50%, 20px 50%; }
.select:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); outline: none; }
.search-card__submit { min-height: 50px; border-radius: 14px; padding-inline: 22px; }
.popular { display: flex; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; align-items: center; gap: 6px; margin-block-start: var(--space-3); list-style: none; padding: 0 0 2px; font-size: .85rem; }
.popular::-webkit-scrollbar { display: none; }
.popular li { flex: none; }
.popular__label { color: var(--muted); font-weight: 700; margin-inline-end: 4px; }
.popular a { display: inline-flex; align-items: center; min-height: 32px; padding: 2px 12px; border-radius: 999px; background: var(--primary-softer); border: 1px solid var(--line); color: var(--primary); font-weight: 700; }
.popular a:hover { background: var(--primary-soft); border-color: var(--primary); }

/* ---------- Section headings ---------- */
.sec { margin-block-start: var(--space-7); }
.sec-title { text-align: center; margin-block-end: var(--space-5); }
.sec-title h2 { color: var(--primary); font-size: clamp(1.3rem, 1.1rem + .9vw, 1.75rem); }
.sec-title h2::after { content: ""; display: block; width: 46px; height: 4px; border-radius: 4px; background: var(--accent); margin: 10px auto 0; }
.sec-title p { color: var(--muted); max-width: 60ch; margin: var(--space-2) auto 0; font-size: .95rem; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-block-end: var(--space-3); }
.section-head h2 { display: inline-flex; align-items: center; gap: 10px; color: var(--navy); }
:root[data-theme="dark"] .section-head h2 { color: var(--text); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .section-head h2 { color: var(--text); } }
.section-head h2 .ic { color: var(--primary); }
.link-more { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-size: .9rem; min-height: 44px; }

/* ---------- Quick stats ---------- */
.quick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); margin-block-start: var(--space-5); }
.quick__item {
  display: flex; align-items: center; gap: var(--space-3); padding: var(--space-4); background: var(--surface); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); min-width: 0;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s;
}
.quick__item:hover { color: var(--text); transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.quick__icon { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.quick__icon .ic { width: 22px; height: 22px; }
.quick__item--accent .quick__icon { background: var(--accent-soft); color: var(--soon); }
.quick__item--open .quick__icon { background: var(--open-soft); color: var(--open); }
.quick__item--urgent .quick__icon { background: var(--urgent-soft); color: var(--urgent); }
.quick__num { display: block; font-size: 1.45rem; font-weight: 800; line-height: 1.1; color: var(--primary); }
.quick__label { display: block; font-size: .8rem; color: var(--muted); font-weight: 700; line-height: 1.35; }

/* ---------- Diploma tiles ---------- */
.dipl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); list-style: none; padding: 0; }
.dipl__card {
  position: relative; display: grid; gap: 6px; justify-items: center; text-align: center; height: 100%;
  padding: var(--space-5) var(--space-3) var(--space-4); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); color: var(--text); box-shadow: var(--shadow-sm); transition: transform .2s var(--ease), box-shadow .2s, border-color .2s;
}
.dipl__card:hover { color: var(--text); transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--primary); }
.dipl__icon { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); margin-block-end: 4px; }
.dipl__icon .ic { width: 26px; height: 26px; }
.dipl__name { font-weight: 800; font-size: 1rem; line-height: 1.35; }
.dipl__scale { font-size: .78rem; color: var(--muted); font-weight: 700; }
.dipl__count { margin-block-start: 4px; font-size: .78rem; font-weight: 800; padding: 2px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--soon); }
.dipl li:last-child:nth-child(odd) { grid-column: 1 / -1; }
.note { display: flex; gap: 8px; align-items: flex-start; justify-content: center; font-size: .8rem; color: var(--muted); margin-block-start: var(--space-3); text-align: center; }
.note .ic { width: 15px; height: 15px; margin-block-start: 3px; }

/* ---------- Feed + side panel ---------- */
.split { display: grid; gap: var(--space-4); }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden; min-width: 0;
}
.card__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2); padding: var(--space-4) var(--space-4) var(--space-3); border-bottom: 1px solid var(--line); }
.card__head h2 { display: inline-flex; align-items: center; gap: 10px; font-size: 1.1rem; color: var(--navy); }
:root[data-theme="dark"] .card__head h2 { color: var(--text); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .card__head h2 { color: var(--text); } }
.card__head h2 .ic { color: var(--primary); }
.card__sub { flex-basis: 100%; color: var(--muted); font-size: .84rem; }
.card__foot { padding: var(--space-3) var(--space-4); border-top: 1px solid var(--line); text-align: center; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: #e5484d; box-shadow: 0 0 0 0 rgb(229 72 77 / 50%); animation: live 1.8s infinite; flex: none; }
@keyframes live { 70% { box-shadow: 0 0 0 7px rgb(229 72 77 / 0%); } 100% { box-shadow: 0 0 0 0 rgb(229 72 77 / 0%); } }

.pills { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: var(--space-3) var(--space-4) 0; }
.pills::-webkit-scrollbar { display: none; }
.pill {
  flex: none; min-height: 34px; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface);
  font-weight: 700; font-size: .82rem; color: var(--muted); cursor: pointer;
}
.pill[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }

.feed { list-style: none; padding: var(--space-3); display: grid; gap: 8px; }
.feed__item { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: var(--space-3); padding: 12px var(--space-4); position: relative; }
.feed__item { background: var(--card); border: 1px solid var(--line-strong); border-radius: 12px; padding: 12px var(--space-3); overflow: hidden; }
.feed__item::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: 4px; background: var(--primary); }
.feed__item--convocation_written::before, .feed__item--convocation_oral::before { background: var(--info); }
.feed__item--results::before, .feed__item--waiting_list::before { background: var(--open); }
.feed__item--postponed::before, .feed__item--deadline_extended::before, .feed__item--modified::before { background: var(--accent); }
.feed__item--cancelled::before { background: var(--urgent); }
.feed__item:hover { background: var(--card-hover); }
.feed__icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.feed__icon .ic { width: 19px; height: 19px; }
.feed__item--convocation_written .feed__icon, .feed__item--convocation_oral .feed__icon { background: var(--info-soft); color: var(--info); }
.feed__item--results .feed__icon, .feed__item--waiting_list .feed__icon { background: var(--open-soft); color: var(--open); }
.feed__item--postponed .feed__icon, .feed__item--deadline_extended .feed__icon, .feed__item--modified .feed__icon { background: var(--soon-soft); color: var(--soon); }
.feed__item--cancelled .feed__icon { background: var(--urgent-soft); color: var(--urgent); }
.feed__type { font-size: .74rem; font-weight: 800; color: var(--primary); display: flex; align-items: center; gap: 8px; }
.feed__item--convocation_written .feed__type, .feed__item--convocation_oral .feed__type { color: var(--info); }
.feed__item--results .feed__type, .feed__item--waiting_list .feed__type { color: var(--open); }
.feed__item--postponed .feed__type, .feed__item--deadline_extended .feed__type, .feed__item--modified .feed__type { color: var(--soon); }
.feed__item--cancelled .feed__type { color: var(--urgent); }
.feed__time { color: var(--muted); font-weight: 700; margin-inline-start: auto; white-space: nowrap; }
.feed__title { display: block; color: var(--text); font-weight: 800; line-height: 1.45; }
.feed__title::after { content: ""; position: absolute; inset: 0; }
.feed__meta { color: var(--muted); font-size: .82rem; line-height: 1.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed__empty { padding: var(--space-6) var(--space-4); text-align: center; color: var(--muted); }

/* ---------- Competition rows (listing, home, similar) ---------- */
.rows { display: grid; gap: 10px; }
.rows--plain { border-radius: 0; border: 0; box-shadow: none; background: transparent; }
.job-row {
  position: relative; display: grid; gap: 4px var(--space-3); align-items: center; padding: 14px var(--space-4);
  grid-template-columns: 44px minmax(0, 1fr); grid-template-areas: "av main" "av side";
  transition: background-color .15s;
}
.job-row { background: var(--card); border: 1px solid var(--line-strong); border-radius: 14px; box-shadow: var(--shadow-sm); overflow: hidden; }
.job-row::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: 4px; background: var(--primary); }
.job-row--soon::before, .job-row--urgent::before { background: var(--accent); }
.job-row--closed::before { background: var(--line-strong); }
.job-row:hover { background: var(--card-hover); border-color: var(--primary); }
.job-row__av {
  grid-area: av; align-self: start; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary); font-size: .72rem; font-weight: 800; letter-spacing: .02em;
}
.job-row__av .ic { width: 20px; height: 20px; }
.job-row__av--collectivites { background: var(--open-soft); color: var(--open); }
.job-row__av--universites { background: var(--accent-soft); color: var(--soon); }
.job-row__av--etablissements { background: var(--info-soft); color: var(--info); }
.job-row__main { grid-area: main; min-width: 0; }
.job-row__inst { display: block; color: var(--muted); font-size: .8rem; font-weight: 700; line-height: 1.45; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job-row__title { font-size: 1rem; line-height: 1.5; font-weight: 800; margin-block: 2px 4px; }
.job-row__title a { color: var(--text); }
.job-row__title a::after { content: ""; position: absolute; inset: 0; }
.job-row__title a:focus-visible { outline: none; }
.job-row__title a:focus-visible::after { outline: 3px solid var(--accent); outline-offset: -3px; border-radius: 10px; }
.job-row__meta { list-style: none; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .78rem; }
.job-row__meta li { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-weight: 700; }
.job-row__meta .ic { width: 15px; height: 15px; }
.chip-s { display: inline-flex; align-items: center; gap: 4px; padding: 1px 9px; border-radius: 7px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text); font-weight: 700; font-size: .76rem; line-height: 1.7; }
.chip-s--scale { background: var(--primary-soft); border-color: transparent; color: var(--primary); }
.chip-s--dipl { background: var(--accent-soft); border-color: transparent; color: var(--soon); }
.job-row__side { grid-area: side; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.job-row__date { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: .8rem; font-weight: 700; }
.job-row__date .ic { width: 14px; height: 14px; }
.job-row--closed .job-row__title a { color: var(--muted); }
.job-row--closed .job-row__av { background: var(--closed-soft); color: var(--closed); }

.badge {
  display: inline-flex; align-items: center; gap: 6px; flex: none; white-space: nowrap;
  padding: 2px 10px; border-radius: 999px; font-size: .76rem; font-weight: 800; line-height: 1.7;
}
.badge .ic { width: 14px; height: 14px; }
.badge--urgent { background: var(--urgent-soft); color: var(--urgent); }
.badge--soon { background: var(--soon-soft); color: var(--soon); }
.badge--open { background: var(--open-soft); color: var(--open); }
.badge--closed, .badge--unknown { background: var(--closed-soft); color: var(--closed); }
.badge--stage, .badge--convocation_written, .badge--convocation_oral { background: var(--info-soft); color: var(--info); }
.badge--results, .badge--waiting_list { background: var(--open-soft); color: var(--open); }
.badge--postponed, .badge--deadline_extended, .badge--modified { background: var(--soon-soft); color: var(--soon); }
.badge--cancelled { background: var(--urgent-soft); color: var(--urgent); }

/* Legacy cards (kept for pages that still use a grid) */
.card-grid, .card-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-3); }
.card-grid > *, .card-list > * { min-width: 0; }

/* Closing-soon mini list */
.mini { list-style: none; padding: var(--space-2) 0; }
.mini li { position: relative; display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: var(--space-3); align-items: center; padding: 10px var(--space-4); }
.mini li + li { border-top: 1px solid var(--line); }
.mini li:hover { background: var(--surface-2); }
.mini__days { display: grid; place-items: center; text-align: center; width: 52px; height: 52px; border-radius: 14px; background: var(--soon-soft); color: var(--soon); line-height: 1.05; }
.mini__days b { font-size: 1.25rem; font-weight: 800; }
.mini__days small { font-size: .66rem; font-weight: 800; }
.mini__days--urgent { background: var(--urgent-soft); color: var(--urgent); }
.mini a { color: var(--text); font-weight: 800; line-height: 1.45; display: block; font-size: .92rem; }
.mini a::after { content: ""; position: absolute; inset: 0; }
.mini small { color: var(--muted); font-size: .78rem; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Category tiles (field / employer type) */
.cats { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
.cat {
  display: flex; align-items: center; gap: var(--space-3); padding: 14px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); color: var(--text); height: 100%; transition: border-color .2s, box-shadow .2s, transform .2s var(--ease);
}
.cat:hover { color: var(--text); border-color: var(--primary); box-shadow: var(--shadow); transform: translateY(-2px); }
.cat__icon { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.cat__icon .ic { width: 21px; height: 21px; }
.cat__name { display: block; font-weight: 800; font-size: .9rem; line-height: 1.4; }
.cat__count { display: block; font-size: .76rem; color: var(--muted); font-weight: 700; }

/* ---------- CTA band ---------- */
.band {
  position: relative; overflow: hidden; display: grid; gap: var(--space-4); align-items: center;
  padding: var(--space-6) var(--space-5); border-radius: var(--radius-lg); color: #fff;
  background: radial-gradient(60% 120% at 100% 0%, rgb(255 208 67 / 22%), transparent 60%), linear-gradient(135deg, var(--primary) 0%, var(--navy-2) 60%, var(--navy) 100%);
}
.band h2 { font-size: clamp(1.3rem, 1.1rem + 1vw, 1.8rem); }
.band h2 .hl { color: var(--accent-strong); }
.band p { color: rgb(255 255 255 / 85%); max-width: 56ch; }
.band__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.band__icon { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: rgb(255 255 255 / 12%); color: var(--accent-strong); }
.band__icon .ic { width: 28px; height: 28px; }

/* Older CTA (results page) */
.cta { display: grid; gap: var(--space-4); padding: var(--space-5); border-radius: var(--radius-lg); background: linear-gradient(135deg, var(--primary-soft), var(--surface)); border: 1px solid var(--line); }
.cta__icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; background: var(--primary); color: var(--primary-ink); }
.cta__icon .ic { width: 24px; height: 24px; }
.cta p { color: var(--muted); }
.cta__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.cta--compact { margin-block-start: var(--space-6); }

/* ---------- Page heads ---------- */
.page-hero { background: linear-gradient(180deg, var(--primary-softer), var(--bg)); border-bottom: 1px solid var(--line); padding-block: var(--space-4) var(--space-5); }
.page-hero h1 { color: var(--navy); margin-block-start: var(--space-2); font-size: clamp(1.4rem, 1.15rem + 1.2vw, 2rem); }
:root[data-theme="dark"] .page-hero h1 { color: var(--text); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .page-hero h1 { color: var(--text); } }
.page-hero .lead { margin-block-start: var(--space-1); }
.page-head { padding-block: var(--space-5) var(--space-4); }
.page-head h1 { margin-block-start: var(--space-2); }
.page-head--center { text-align: center; }
.page-head__icon { width: 56px; height: 56px; margin: 0 auto var(--space-3); display: grid; place-items: center; border-radius: 18px; background: var(--primary-soft); color: var(--primary); }
.page-head__icon .ic { width: 28px; height: 28px; }
.lead { color: var(--muted); font-size: 1.02rem; margin-block-start: var(--space-2); max-width: 64ch; }
.page-head--center .lead { margin-inline: auto; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: .84rem; color: var(--muted); padding-block-start: var(--space-4); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--primary); }
.crumbs .ic { width: 14px; height: 14px; opacity: .6; }
.page-head .crumbs, .page-hero .crumbs { padding-block-start: 0; }

/* ---------- Listing ---------- */
.listing { margin-block-start: var(--space-4); }
.listing__search { position: relative; display: flex; gap: var(--space-2); margin-block-end: var(--space-3); }
.listing__search .search-field { background: var(--surface); }
.stabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line-strong); margin-block-end: var(--space-3); }
.stabs::-webkit-scrollbar { display: none; }
.stabs a {
  flex: none; position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 8px 14px;
  color: var(--muted); font-weight: 800; font-size: .92rem;
}
.stabs a:hover { color: var(--text); }
.stabs a[aria-current="page"] { color: var(--primary); }
.stabs a[aria-current="page"]::after { content: ""; position: absolute; inset-inline: 10px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--primary); }
.stabs__n { min-width: 24px; padding: 0 7px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: .72rem; line-height: 1.7; text-align: center; color: var(--muted); }
.stabs a[aria-current="page"] .stabs__n { background: var(--primary-soft); border-color: transparent; color: var(--primary); }
.listing__bar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-block-end: var(--space-3); }
.listing__count { font-weight: 800; color: var(--muted); font-size: .92rem; }
.listing__sort { display: flex; align-items: center; gap: 6px; }
.listing__sort .select { min-height: 40px; padding-block: 6px; font-size: .85rem; border-radius: 12px; }
.filters-toggle { position: relative; }
.dot-count { min-width: 20px; height: 20px; padding-inline: 6px; border-radius: 999px; background: var(--accent-strong); color: var(--accent-ink); font-size: .72rem; display: inline-grid; place-items: center; }
.chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; margin-block-end: var(--space-3); }
.chips:empty { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 4px 12px; border-radius: 999px;
  font-size: .84rem; font-weight: 700; background: var(--surface); border: 1px solid var(--line-strong); color: var(--text);
}
.chip--active { background: var(--primary-soft); border-color: transparent; color: var(--primary); }
.chip--active:hover { background: var(--primary); color: var(--primary-ink); }
.chip .ic { width: 14px; height: 14px; }

.filters { position: fixed; inset: 0; z-index: 80; visibility: hidden; pointer-events: none; }
.filters.is-open { visibility: visible; pointer-events: auto; }
.filters__backdrop { position: absolute; inset: 0; background: rgb(1 29 69 / 50%); opacity: 0; transition: opacity .25s var(--ease); }
.filters.is-open .filters__backdrop { opacity: 1; }
.filters__panel {
  position: absolute; inset-inline: 0; bottom: 0; max-height: 88vh; overflow: auto; background: var(--surface);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0; padding: var(--space-4) var(--space-4) calc(var(--space-4) + env(safe-area-inset-bottom));
  transform: translateY(100%); transition: transform .3s var(--ease); box-shadow: var(--shadow-lg);
}
.filters.is-open .filters__panel { transform: translateY(0); }
.filters__panel::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 4px; background: var(--line-strong); margin: 0 auto var(--space-3); }
.filters__head { display: flex; align-items: center; justify-content: space-between; margin-block-end: var(--space-2); }
.filters__actions { position: sticky; bottom: calc(-1 * var(--space-4)); background: var(--surface); padding-block: var(--space-3) var(--space-1); display: grid; gap: 4px; }
body.no-scroll { overflow: hidden; }

.facet { border: 0; padding: 0; margin: 0; padding-block: var(--space-3); }
.facet + .facet { border-top: 1px solid var(--line); }
.facet legend { font-weight: 800; font-size: .88rem; color: var(--navy); padding: 0; margin-block-end: var(--space-2); display: flex; align-items: center; gap: 8px; }
:root[data-theme="dark"] .facet legend { color: var(--text); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .facet legend { color: var(--text); } }
.facet legend .ic { width: 16px; height: 16px; color: var(--primary); }
.opts { display: grid; gap: 2px; }
.opt { position: relative; display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 10px; border-radius: 10px; cursor: pointer; font-size: .9rem; font-weight: 700; color: var(--text); }
.opt:hover { background: var(--surface-2); }
.opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.opt__mark { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--surface); }
.opt input:checked ~ .opt__mark { border: 5px solid var(--primary); }
.opt input:focus-visible ~ .opt__mark { outline: 3px solid var(--accent); outline-offset: 2px; }
.opt__name { flex: 1; min-width: 0; line-height: 1.4; }
.opt__n { flex: none; font-size: .74rem; font-weight: 800; color: var(--muted); background: var(--surface-2); border-radius: 999px; padding: 0 8px; }
.opt:has(input:checked) { background: var(--primary-soft); color: var(--primary); }
.opt--zero { opacity: .45; }
.opts--scroll { max-height: 260px; overflow: auto; }

.field { display: grid; gap: 6px; margin-block-end: var(--space-4); border: 0; padding: 0; }
.field label, .field legend { font-weight: 700; font-size: .9rem; }
.field input[type="search"], .field input[type="email"], .field input[type="text"], .field select {
  width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line-strong);
  background: var(--surface-2); font-size: 1rem; appearance: none; -webkit-appearance: none;
}
.field select {
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-size: 6px 6px; background-repeat: no-repeat; background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; padding-inline-end: 40px;
}
[dir="rtl"] .field select { background-position: 14px 50%, 20px 50%; }
.field input:focus, .field select:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); outline: none; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.segmented legend { grid-column: 1 / -1; margin-block-end: 6px; }
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.segmented span { display: grid; place-items: center; min-height: 44px; border-radius: 12px; border: 1px solid var(--line-strong); font-weight: 700; font-size: .9rem; background: var(--surface-2); }
.segmented input:checked + span { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.segmented input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }

.listing__results { position: relative; min-height: 200px; }
.listing__results[aria-busy="true"] .rows { opacity: .45; pointer-events: none; transition: opacity .15s; }
.listing__results[aria-busy="true"]::after {
  content: ""; position: absolute; inset-inline: 0; top: 0; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent); background-size: 50% 100%; animation: loading 1s linear infinite;
}
@keyframes loading { from { background-position: -50% 0; } to { background-position: 150% 0; } }

.pager { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); margin-block-start: var(--space-5); }
.pager__info { color: var(--muted); font-size: .9rem; font-weight: 700; }

.empty { text-align: center; padding: var(--space-7) var(--space-4); background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); }
.empty--page { border: 0; background: transparent; padding-block: var(--space-8); }
.empty__icon { width: 56px; height: 56px; margin: 0 auto var(--space-3); display: grid; place-items: center; border-radius: 50%; background: var(--primary-soft); color: var(--primary); }
.empty__icon .ic { width: 26px; height: 26px; }
.empty__code { font-size: 4.5rem; font-weight: 800; line-height: 1; color: var(--primary); opacity: .25; }
.empty p { color: var(--muted); margin-block: var(--space-2) var(--space-4); }

/* ---------- Detail ---------- */
.detail { margin-block-start: var(--space-3); }
.detail__head { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-5) var(--space-4); box-shadow: var(--shadow-sm); position: relative; overflow: hidden; }
.detail__head::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: 5px; background: linear-gradient(var(--primary), var(--accent)); }
.org { display: inline-flex; align-items: center; gap: 10px; min-width: 0; color: var(--muted); font-size: .88rem; font-weight: 700; }
.org__avatar { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); font-size: .7rem; font-weight: 800; }
.org__avatar .ic { width: 18px; height: 18px; }
.org__name { overflow: hidden; text-overflow: ellipsis; }
.org--lg { color: var(--text); }
.org--lg:hover .org__name { color: var(--primary); }
.detail__title { margin-block: var(--space-3); font-size: clamp(1.35rem, 1.1rem + 1.4vw, 2rem); color: var(--navy); }
:root[data-theme="dark"] .detail__title { color: var(--text); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .detail__title { color: var(--text); } }
.detail__sub { color: var(--muted); font-size: .9rem; margin-block: calc(-1 * var(--space-2)) var(--space-3); }
.detail__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 2px 12px; border-radius: 999px; font-size: .8rem; font-weight: 700; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); }
.tag--scale { background: var(--primary-soft); border-color: transparent; color: var(--primary); }
.tag--dipl { background: var(--accent-soft); border-color: transparent; color: var(--soon); }
a.tag:hover { color: var(--primary); border-color: var(--primary); }
.tag-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }

.detail__layout { display: grid; gap: var(--space-4); margin-block-start: var(--space-4); }
.summary-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-4); box-shadow: var(--shadow); display: grid; gap: var(--space-4); }
.summary-box__title { font-size: .95rem; color: var(--navy); display: flex; align-items: center; gap: 8px; }
:root[data-theme="dark"] .summary-box__title { color: var(--text); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .summary-box__title { color: var(--text); } }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); }
.facts__item { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); min-width: 0; }
.facts__item dt { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .76rem; font-weight: 700; }
.facts__item dt .ic { width: 15px; height: 15px; }
.facts__item dd { font-weight: 800; margin-block-start: 2px; overflow-wrap: anywhere; line-height: 1.5; font-size: .95rem; }
.facts__item dd small { font-weight: 700; color: var(--muted); }
.facts__item--wide { grid-column: 1 / -1; }
.facts__item--deadline { grid-column: 1 / -1; }
.facts__item--deadline dd { font-size: 1.25rem; }
.facts__item--urgent { background: var(--urgent-soft); border-color: transparent; }
.facts__item--urgent dd, .facts__item--urgent dt { color: var(--urgent); }
.facts__item--soon { background: var(--soon-soft); border-color: transparent; }
.facts__item--soon dd, .facts__item--soon dt { color: var(--soon); }
.facts__item--open { background: var(--open-soft); border-color: transparent; }
.facts__item--open dt { color: var(--open); }
.summary-box__row { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.summary-box__row .btn { flex: 1 1 auto; font-size: .88rem; }
.facts__note { font-size: .74rem; color: var(--muted); }

.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; font-weight: 700; margin-block: var(--space-3); }
.notice .ic { margin-block-start: 4px; }
.notice--warn { background: var(--soon-soft); color: var(--soon); }
.notice--ok { background: var(--open-soft); color: var(--open); }
.notice--error { background: var(--urgent-soft); color: var(--urgent); }

.share { margin-block-start: var(--space-4); }
.share__label { font-weight: 700; font-size: .9rem; margin-block-end: var(--space-2); }
.share__buttons { display: flex; gap: var(--space-2); }
.share__btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 48px; height: 48px; padding-inline: 14px; border-radius: 12px; border: 0; cursor: pointer; color: #fff; font-weight: 700; }
.share__btn .ic { width: 22px; height: 22px; }
.share__btn--wa { background: var(--wa); flex: 1; }
.share__btn--tg { background: var(--tg); }
.share__btn--fb { background: var(--fb); }
.share__btn--copy { background: var(--surface-2); color: var(--text); border: 1px solid var(--line-strong); }
.share__btn:hover { color: #fff; filter: brightness(1.06); }
.share__btn--copy:hover { color: var(--text); }
.share__btn.is-done { background: var(--open); color: #fff; }

.block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-4) var(--space-4) var(--space-5); }
.block + .block, .ad-slot + .block { margin-block-start: var(--space-3); }
.block h2 { margin-block-end: var(--space-3); color: var(--navy); font-size: 1.1rem; display: flex; align-items: center; gap: 10px; }
.block h2::before { content: ""; width: 4px; height: 1.1em; border-radius: 4px; background: var(--accent); }
:root[data-theme="dark"] .block h2 { color: var(--text); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .block h2 { color: var(--text); } }
.block__note { display: flex; gap: 8px; align-items: flex-start; margin-block-start: var(--space-3); font-size: .8rem; color: var(--muted); }
.block__note .ic { margin-block-start: 4px; width: 15px; height: 15px; }
.prose p + p { margin-block-start: var(--space-3); }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.checklist, .numbered { padding: 0; list-style: none; display: grid; gap: 10px; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; }
.checklist .ic { flex: none; width: 20px; height: 20px; padding: 3px; margin-block-start: 3px; border-radius: 50%; background: var(--open-soft); color: var(--open); stroke-width: 3; }
.numbered { counter-reset: n; }
.numbered li { counter-increment: n; display: flex; gap: 10px; align-items: flex-start; }
.numbered li::before { content: counter(n); flex: none; width: 26px; height: 26px; margin-block-start: 1px; border-radius: 8px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); font-size: .8rem; font-weight: 800; }
.block--source { display: grid; gap: var(--space-3); }
.source { color: var(--muted); font-size: .9rem; }
.source a { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; }
.source .ic { width: 14px; height: 14px; }
.similar { margin-block-start: var(--space-7); }
.ad-slot {
  min-height: 250px; margin-block: var(--space-6); padding: var(--space-2) var(--space-3) var(--space-3); overflow: hidden;
  border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line);
}
.ad-slot__label { display: block; text-align: center; font-size: .7rem; color: var(--muted); letter-spacing: .04em; margin-block-end: var(--space-2); }
/* Auto ads inserted by Google: keep them away from text and buttons */
ins.adsbygoogle:not(.ad-slot ins) { margin-block: var(--space-6) !important; }

/* ---------- Panels / alerts ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-5); box-shadow: var(--shadow-sm); }
.panel h2 { margin-block-end: var(--space-2); color: var(--navy); }
:root[data-theme="dark"] .panel h2 { color: var(--text); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .panel h2 { color: var(--text); } }
.panel--telegram, .panel--whatsapp { display: grid; gap: var(--space-3); align-items: center; }
.panel__icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--tg) 15%, transparent); color: var(--tg); }
.panel__icon .ic { width: 26px; height: 26px; }
.panel--whatsapp .panel__icon { background: color-mix(in srgb, var(--wa) 15%, transparent); color: var(--wa); }
.panel p { color: var(--muted); }
.pick { border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.pick summary { cursor: pointer; padding: 12px 14px; font-weight: 700; min-height: 48px; display: flex; align-items: center; }
.pick__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 0 10px 12px; max-height: 280px; overflow: auto; }
.check { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 4px 6px; border-radius: 8px; cursor: pointer; font-size: .9rem; }
.check:hover { background: var(--surface); }
.check input { width: 18px; height: 18px; accent-color: var(--primary); flex: none; }
.check--field { margin-block-end: var(--space-4); min-height: 44px; padding: 0; }

/* ---------- Footer ---------- */
.footer { background: var(--navy); color: rgb(255 255 255 / 78%); padding-block: var(--space-7) var(--space-4); margin-block-start: var(--space-8); position: relative; }
.footer::before { content: ""; position: absolute; inset-inline: 0; top: 0; height: 4px; background: linear-gradient(90deg, var(--primary), var(--accent-strong)); }
.footer__grid { display: grid; gap: var(--space-5); }
.footer .brand, .footer .brand:hover { color: #fff; }
.footer__tagline { margin-block: var(--space-2); }
.footer__note { display: flex; gap: 8px; align-items: flex-start; font-size: .8rem; background: rgb(255 255 255 / 6%); border-radius: 10px; padding: 10px 12px; }
.footer__note .ic { margin-block-start: 3px; width: 15px; height: 15px; }
.footer__title { color: #fff; font-weight: 800; margin-block-end: var(--space-2); grid-column: 1 / -1; }
.footer__links { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--space-4); align-content: start; }
.footer__links a { color: rgb(255 255 255 / 72%); min-height: 38px; display: flex; align-items: center; font-size: .9rem; }
.footer__links a:hover { color: var(--accent-strong); }
.footer__bottom { font-size: .8rem; padding-block-start: var(--space-4); margin-block-start: var(--space-5); border-top: 1px solid rgb(255 255 255 / 12%); }

/* ---------- Tracking: follow card, timeline, results feed ---------- */
.nav-count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding-inline: 5px; margin-inline-start: 6px; border-radius: 999px; background: var(--accent-strong); color: var(--accent-ink); font-size: .68rem; font-weight: 800; line-height: 1; }
.tabbar .nav-count { position: absolute; top: 6px; margin-inline-start: 22px; }

.follow-card { margin-block-start: var(--space-4); padding: var(--space-4); border-radius: var(--radius-lg); border: 1px solid var(--line); background: linear-gradient(160deg, var(--primary-soft), var(--surface) 70%); display: grid; gap: var(--space-3); }
.follow-card__head { display: flex; gap: var(--space-3); align-items: flex-start; }
.follow-card__icon { flex: none; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: var(--accent-strong); color: var(--accent-ink); }
.follow-card__icon .ic { width: 22px; height: 22px; }
.follow-card.is-following .follow-card__icon { animation: ring 1.2s var(--ease) 1; }
@keyframes ring { 20% { transform: rotate(-12deg); } 40% { transform: rotate(10deg); } 60% { transform: rotate(-6deg); } 80% { transform: rotate(3deg); } }
.follow-card__title { font-size: 1.05rem; margin: 0; color: var(--navy); }
:root[data-theme="dark"] .follow-card__title { color: var(--text); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .follow-card__title { color: var(--text); } }
.follow-card__text { color: var(--muted); font-size: .88rem; line-height: 1.6; }
.follow-card.is-following [data-follow-push] { background: var(--surface); color: var(--text); border-color: var(--line-strong); box-shadow: none; }
.follow-card__status:empty { display: none; }
.follow-card__status { font-size: .88rem; font-weight: 700; color: var(--primary); }
.follow-card__count { font-size: .8rem; color: var(--muted); }

.timeline { list-style: none; padding: 0; margin-block-start: var(--space-3); }
.timeline__step { position: relative; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: var(--space-3); padding-block-end: var(--space-4); }
.timeline__step::before { content: ""; position: absolute; inset-inline-start: 14px; top: 30px; bottom: 0; width: 2px; background: var(--line); }
.timeline__step:last-child::before { display: none; }
.timeline__step--done::before { background: var(--primary); }
.timeline__dot { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--line-strong); background: var(--surface); position: relative; z-index: 1; }
.timeline__dot .ic { width: 16px; height: 16px; stroke-width: 3; }
.timeline__step--done .timeline__dot { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.timeline__step--next .timeline__dot { border-color: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); }
.timeline__label { font-weight: 800; line-height: 1.5; padding-block-start: 3px; }
.timeline__step--todo .timeline__label { color: var(--muted); font-weight: 700; }
.timeline__next { display: inline-block; margin-inline-start: 6px; padding: 0 8px; border-radius: 999px; background: var(--accent-soft); color: var(--soon); font-size: .72rem; font-weight: 800; }
.timeline__date { color: var(--muted); font-size: .85rem; }
.timeline__link { display: inline-flex; align-items: center; gap: 6px; margin-block-start: 4px; font-size: .88rem; font-weight: 700; min-height: 32px; }
.timeline__link .ic { width: 15px; height: 15px; }
.doc-list { list-style: none; padding: 0; display: grid; gap: 4px; margin-block-start: var(--space-2); }
.doc-list a { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .9rem; min-height: 36px; }
.timeline-block { margin-block-end: var(--space-3); }

.results-search { position: relative; margin-block-end: var(--space-3); }
.tabs { display: flex; gap: 6px; overflow-x: auto; padding-block-end: 4px; margin-block-end: var(--space-4); scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { flex: none; min-height: 40px; display: inline-flex; align-items: center; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--muted); font-weight: 700; font-size: .9rem; background: var(--surface); }
.tabs a[aria-current="page"] { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.day-head { font-size: .88rem; color: var(--muted); font-weight: 800; margin-block: var(--space-4) var(--space-2); }
.event-list { list-style: none; padding: 0; display: grid; gap: var(--space-2); }
.event-item { position: relative; display: grid; gap: 4px; padding: 14px 16px; padding-inline-start: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.event-item::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: 4px; background: var(--info); }
.event-item--results::before, .event-item--waiting_list::before { background: var(--open); }
.event-item--postponed::before, .event-item--deadline_extended::before, .event-item--modified::before { background: var(--accent); }
.event-item--cancelled::before { background: var(--urgent); }
.event-item__type { font-size: .75rem; font-weight: 800; color: var(--info); }
.event-item--results .event-item__type, .event-item--waiting_list .event-item__type { color: var(--open); }
.event-item--postponed .event-item__type, .event-item--modified .event-item__type, .event-item--deadline_extended .event-item__type { color: var(--soon); }
.event-item--cancelled .event-item__type { color: var(--urgent); }
.event-item__title { color: var(--text); font-weight: 800; line-height: 1.5; }
.event-item__meta { color: var(--muted); font-size: .82rem; }
.event-item__doc { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; font-weight: 700; min-height: 32px; }
.event-item__doc .ic { width: 15px; height: 15px; }

.follow-item { display: grid; gap: 2px; }
.follow-item .job-row { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.follow-item__remove { justify-self: end; min-height: 36px; font-size: .85rem; }
.skeleton { height: 96px; border-radius: var(--radius); background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; border: 1px solid var(--line); animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.how { display: grid; gap: var(--space-3); }
.tiles { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); }
.tile { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); min-height: 52px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; color: var(--text); font-weight: 700; }
.tile:hover { border-color: var(--primary); color: var(--primary); }
.tile__count { flex: none; min-width: 28px; text-align: center; font-size: .8rem; font-weight: 800; color: var(--primary); background: var(--primary-soft); border-radius: 999px; padding: 1px 8px; }

/* ---------- ≥ 600px ---------- */
@media (min-width: 600px) {
  .container { padding-inline: var(--space-5); }
  .search-card { padding: var(--space-5); }
  .search-card__form { grid-template-columns: minmax(0, 1fr) 200px auto; }
  .search-card__form .search-field { grid-column: auto; }
  .popular { flex-wrap: wrap; overflow: visible; }
  .quick { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .dipl { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dipl li:last-child:nth-child(odd) { grid-column: auto; }
  .cats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .job-row { grid-template-columns: 44px minmax(0, 1fr) auto; grid-template-areas: "av main side"; }
  .job-row__side { flex-direction: column; align-items: flex-end; justify-content: center; text-align: end; }
  .band { grid-template-columns: auto minmax(0, 1fr) auto; padding: var(--space-6); }
  .cta { grid-template-columns: auto 1fr auto; align-items: center; }
  .panel--telegram, .panel--whatsapp { grid-template-columns: auto 1fr auto; }
  .pick__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- ≥ 960px (desktop) ---------- */
@media (min-width: 960px) {
  body { padding-bottom: 0; }
  :root { --topbar-h: 72px; }
  .tabbar { display: none; }
  .topnav { display: flex; gap: 2px; margin-inline-start: var(--space-6); }
  .topnav a { position: relative; padding: 8px 14px; color: var(--text); font-weight: 700; font-size: .95rem; }
  .topnav a:hover { color: var(--primary); }
  .topnav a[aria-current="page"] { color: var(--primary); }
  .topnav a[aria-current="page"]::after { content: ""; position: absolute; inset-inline: 14px; bottom: -2px; height: 3px; border-radius: 3px; background: var(--accent); }
  .topbar__cta { display: inline-flex; }
  .hero { padding-block: var(--space-8) calc(var(--space-8) + 56px); }
  .dipl { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .cats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cats--3 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .split { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); align-items: start; gap: var(--space-5); }
  .split__aside { position: sticky; top: calc(var(--topbar-h) + var(--space-4)); display: grid; gap: var(--space-4); }
  .footer__grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, .8fr) minmax(0, 1fr); }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); }
  .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }

  .listing__layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: var(--space-5); align-items: start; }
  .filters-toggle { display: none; }
  .filters { position: static; inset: auto; z-index: 1; visibility: visible; pointer-events: auto; }
  .filters__backdrop, .filters__close, .filters__panel::before { display: none; }
  .filters__panel { position: static; transform: none; max-height: none; overflow: visible; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding-block: var(--space-3); }
  .filters__actions { position: static; }
  .filters__submit { display: none; }

  .detail__layout { grid-template-columns: minmax(0, 1fr) 370px; align-items: start; gap: var(--space-5); }
  .detail__aside { order: 2; position: sticky; top: calc(var(--topbar-h) + var(--space-4)); }
  .detail__main { order: 1; }
  .detail__head { padding: var(--space-6); }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media print {
  .topbar, .tabbar, .footer, .share, .ad-slot, .filters, .summary-box .btn, .follow-card { display: none !important; }
  body { background: #fff; padding: 0; }
}
@media (min-width: 960px) {
  .visually-hidden-desktop { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .filters__head { margin: 0; }
}

.feed__more { display: block; margin: 0 auto var(--space-3); }

/* ---------- Grade guides ---------- */
.guide__tags { margin-block-start: var(--space-3); }
.guide__layout { margin-block-start: var(--space-5); }
.guide__aside { display: grid; gap: var(--space-4); }
.chart-card .card__head h2 { font-size: 1rem; }
.hbars { list-style: none; padding: var(--space-3) var(--space-4) var(--space-4); display: grid; gap: 10px; }
.hbars li { display: grid; grid-template-columns: 44px minmax(0, 1fr) 36px; align-items: center; gap: 10px; font-size: .85rem; font-weight: 700; }
.hbars__track { block-size: 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.hbars__fill { display: block; block-size: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--primary), var(--navy-2)); }
.hbars__n { text-align: end; color: var(--primary); }
.vbars { list-style: none; padding: var(--space-4) var(--space-3) var(--space-3); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 4px; align-items: end; block-size: 170px; }
.vbars li { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; block-size: 100%; }
.vbars__bar { inline-size: 100%; max-inline-size: 22px; border-radius: 6px 6px 2px 2px; background: var(--primary-soft); border: 1px solid color-mix(in srgb, var(--primary) 35%, transparent); }
.vbars li:hover .vbars__bar { background: var(--accent-strong); }
.vbars__m { font-size: .62rem; font-weight: 700; color: var(--muted); white-space: nowrap; }
.mini--plain .mini__days { background: var(--primary-soft); color: var(--primary); }
.guide-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .88rem; }
@media (min-width: 960px) { .guide__layout { margin-block-start: var(--space-5); } }

/* ===== Articles (editorial guide) ===== */
.art-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-block-start: var(--space-3); }
.art-filter a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font-weight: 700; font-size: .88rem; }
.art-filter a span { color: var(--muted); font-weight: 600; }
.art-filter a[aria-current="page"] { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.art-filter a[aria-current="page"] span { color: inherit; opacity: .8; }
.art-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--space-3); }
.art-card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-4); display: grid; gap: 8px; align-content: start; transition: border-color .15s, box-shadow .15s; }
.art-card:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); }
.art-card a { color: var(--navy); font-weight: 800; line-height: 1.55; font-size: 1rem; }
.art-card a::after { content: ""; position: absolute; inset: 0; }
.art-card p { color: var(--muted); font-size: .88rem; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.art-card small { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .78rem; }
.art-card small .ic, .art-meta .ic { width: 15px; height: 15px; }
.art-meta { display: flex; flex-wrap: wrap; gap: var(--space-4); margin-block-start: var(--space-2); color: var(--muted); font-size: .85rem; }
.art-meta span { display: inline-flex; align-items: center; gap: 6px; }
.art-toc { background: var(--surface); border: 1px solid var(--line); border-inline-start: 4px solid var(--accent); border-radius: var(--radius-lg); padding: var(--space-4); margin-block: var(--space-5) var(--space-4); }
.art-toc h2 { font-size: 1rem; color: var(--navy); margin-block-end: var(--space-2); }
.art-toc ol { margin: 0; padding-inline-start: 1.4em; display: grid; gap: 4px; }
.art-toc a { color: var(--text); font-size: .92rem; }
.art-toc a:hover { color: var(--primary); }
.art-body { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-5); font-size: 1.06rem; line-height: 2; }
.art-body h2 { color: var(--navy); font-size: 1.25rem; margin-block: var(--space-5) var(--space-2); scroll-margin-top: calc(var(--topbar-h) + 16px); display: flex; align-items: center; gap: 10px; }
.art-body h2::before { content: ""; width: 4px; height: 1.1em; border-radius: 4px; background: var(--accent); flex: none; }
.art-body > h2:first-child { margin-block-start: 0; }
.art-body ul, .art-body ol { padding-inline-start: 1.4em; display: grid; gap: 6px; margin-block: var(--space-3); }
.art-body li::marker { color: var(--primary); }
.art-body .ad-slot { margin-block: var(--space-5); }
.art-note { margin-block-start: var(--space-5) !important; padding: var(--space-3) var(--space-4); border-radius: var(--radius); background: var(--primary-softer); color: var(--muted); font-size: .9rem; line-height: 1.8; }
.fn-ref { font-size: .72em; line-height: 0; margin-inline-start: 1px; }
.fn-ref a { text-decoration: none !important; font-weight: 800; color: var(--primary); padding-inline: 2px; }
.art-notes { margin-block-start: var(--space-4); background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-4) var(--space-5); }
.art-notes h2 { font-size: 1rem; color: var(--navy); margin-block-end: var(--space-3); }
.art-notes ol { margin: 0; padding-inline-start: 1.6em; display: grid; gap: 8px; font-size: .84rem; line-height: 1.8; color: var(--muted); }
.art-notes li:target { background: var(--accent-soft, rgba(239, 186, 37, .18)); border-radius: 6px; }
.art-notes a { color: var(--primary); overflow-wrap: anywhere; }
.art-notes .fn-back { text-decoration: none; margin-inline-start: 4px; }
.art-box { margin-block-start: var(--space-4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-4); }
.art-box h2 { display: flex; align-items: center; gap: 8px; font-size: 1rem; color: var(--navy); margin-block-end: var(--space-3); }
.art-chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.mini--arts li { grid-template-columns: 40px minmax(0, 1fr); }
.mini--arts .mini__days { width: 40px; height: 40px; border-radius: 12px; }
.mini--arts .mini__days .ic { width: 18px; height: 18px; }
.mini--arts a { white-space: normal; }
@media (max-width: 640px) {
  .art-body { padding: var(--space-4); font-size: 1rem; line-height: 1.95; }
  .art-notes { padding: var(--space-4); }
}
.art-card { overflow: hidden; }
.art-card__img { display: block; width: calc(100% + 2 * var(--space-4)); max-width: none; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; margin: calc(-1 * var(--space-4)) calc(-1 * var(--space-4)) 4px; background: #1a3a8f; }
.art-cover { margin: var(--space-5) 0 0; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); background: #1a3a8f; }
.art-cover img { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630; }
/* Justified body text (articles, announcements, guides) */
.prose p, .prose li, .art-body p, .art-body li, .art-notes li { text-align: justify; text-justify: inter-word; }
.art-note { text-align: justify; }
.fn-ref { margin-inline-start: 0; }

/* Consent banner */
.consent { position: fixed; inset-inline: 12px; bottom: calc(var(--tabbar-h, 0px) + 12px + env(safe-area-inset-bottom)); z-index: 90; max-width: 560px; margin-inline: auto;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 14px 16px; font-size: .88rem; }
.consent p { margin: 0 0 10px; color: var(--text); }
.consent__btns { display: flex; gap: 8px; flex-wrap: wrap; }
.consent[hidden] { display: none; }
@media (min-width: 900px) { .consent { bottom: 16px; } }

/* Header on medium desktops: never wrap nav labels (French labels are longer) */
@media (min-width: 960px) {
  .topnav a { white-space: nowrap; }
  .brand__name { white-space: nowrap; }
  .brand__mark { flex: none; }
  .lang-btn { flex: none; }
}
@media (min-width: 960px) and (max-width: 1340px) {
  .topnav { margin-inline-start: var(--space-3); }
  .topnav a { padding: 8px 9px; font-size: .88rem; }
  .topnav a[aria-current="page"]::after { inset-inline: 9px; }
  .topbar__cta span { display: none; }
  .topbar__cta { padding-inline: 10px; }
}
@media (min-width: 960px) and (max-width: 1120px) {
  html[lang="fr"] .topnav a { padding: 8px 6px; font-size: .82rem; }
}
