/* =====================================================================
   Concours Radar — "Moroccan premium, light & minimal"
   Ivory & sand, Majorelle blue, terracotta, saffron, zellige green.
   Fraunces + Inter (fr) · Reem Kufi + IBM Plex Sans Arabic (ar).
   RTL via logical properties. No dark theme on purpose (editorial light).
   ===================================================================== */
:root {
  --bg: #FBF8F2;
  --bg-2: #F5EFE4;
  --sand: #EFE6D6;
  --surface: #FFFFFF;
  --ink: #161A2E;
  --ink-2: #393E55;
  --muted: #6E7183;
  --faint: #9A9CAA;
  --line: #EAE2D4;
  --line-2: #DCD0BC;

  --brand: #3E4BD0;          /* Majorelle */
  --brand-ink: #2C369F;
  --brand-soft: #EDEEFC;
  --brand-tint: #F6F6FE;

  --c-open: #17845A;     --c-open-soft: #E4F3EB;
  --c-closing: #C4513A;  --c-closing-soft: #FBE9E3;
  --c-soon: #3E4BD0;     --c-soon-soft: #EDEEFC;
  --c-exam: #6B48C2;     --c-exam-soft: #EFE9FB;
  --c-results: #0E7C89;  --c-results-soft: #E1F2F3;
  --c-expected: #B07A10; --c-expected-soft: #FAF0D9;
  --c-closed: #8C8D97;   --c-closed-soft: #F0EDE7;

  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --r-lg: 22px;
  --r: 16px;
  --r-sm: 11px;
  --shadow-1: 0 1px 0 rgba(22, 26, 46, .03), 0 1px 3px rgba(22, 26, 46, .04);
  --shadow-2: 0 1px 2px rgba(22, 26, 46, .04), 0 12px 32px -16px rgba(22, 26, 46, .18);
  --shadow-3: 0 2px 6px rgba(22, 26, 46, .05), 0 28px 60px -28px rgba(22, 26, 46, .28);
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 32px);
  --octa: polygon(50% 0, 64.65% 14.64%, 85.36% 14.64%, 85.36% 35.36%, 100% 50%, 85.36% 64.65%, 85.36% 85.36%, 64.65% 85.36%, 50% 100%, 35.36% 85.36%, 14.64% 85.36%, 14.64% 64.65%, 0 50%, 14.64% 35.36%, 14.64% 14.64%, 35.36% 14.64%);
  --zellige: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='88' viewBox='0 0 88 88'%3E%3Cg fill='none' stroke='%233E4BD0' stroke-width='.8'%3E%3Cpath d='M44 14l8.8 8.8h12.4v12.4L74 44l-8.8 8.8v12.4H52.8L44 74l-8.8-8.8H22.8V52.8L14 44l8.8-8.8V22.8h12.4z'/%3E%3Cpath d='M44 26l5.2 5.2h7.6v7.6L62 44l-5.2 5.2v7.6h-7.6L44 62l-5.2-5.2h-7.6v-7.6L26 44l5.2-5.2v-7.6h7.6z'/%3E%3Cpath d='M0 0l14 14M88 0L74 14M0 88l14-14M88 88L74 74M44 0v14M44 74v14M0 44h14M74 44h14'/%3E%3C/g%3E%3C/svg%3E");
  --band: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='14' viewBox='0 0 56 14'%3E%3Cpath d='M7 0l2 3h3v3l2 1-2 1v3H9l-2 3-2-3H2V8L0 7l2-1V3h3z' fill='%233E4BD0'/%3E%3Cpath d='M21 4l1.2 1.8h1.8v1.8L25 7l-1 .4v1.8h-1.8L21 11l-1.2-1.8H18V7.4L17 7l1-.4V5.8h1.8z' fill='%23B07A10'/%3E%3Cpath d='M35 0l2 3h3v3l2 1-2 1v3h-3l-2 3-2-3h-3V8l-2-1 2-1V3h3z' fill='%2317845A'/%3E%3Cpath d='M49 4l1.2 1.8h1.8v1.8L53 7l-1 .4v1.8h-1.8L49 11l-1.2-1.8H46V7.4L45 7l1-.4V5.8h1.8z' fill='%23C4513A'/%3E%3C/svg%3E");
  color-scheme: light;
}
[dir="rtl"] {
  --serif: "Reem Kufi", "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  --sans: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; font-feature-settings: "cv11", "ss01"; }
[dir="rtl"] body { line-height: 1.8; font-feature-settings: normal; }
img, svg { max-width: 100%; }
a { color: var(--brand); text-decoration: none; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .5em; color: var(--ink); }
h1, h2 { font-family: var(--serif); font-weight: 560; letter-spacing: -.015em; line-height: 1.12; font-optical-sizing: auto; }
h1 { font-size: clamp(32px, 4.6vw, 52px); }
h2 { font-size: clamp(24px, 2.8vw, 34px); }
h3 { font: 600 17px/1.35 var(--sans); letter-spacing: -.005em; }
[dir="rtl"] h1, [dir="rtl"] h2 { font-weight: 600; letter-spacing: 0; line-height: 1.45; }
[dir="rtl"] h3 { line-height: 1.6; }
p { margin: 0 0 1em; }
em { font-style: italic; }
small { font-size: .86em; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--brand-soft); color: var(--brand-ink); }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 10px; }
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 820px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums lining-nums; }
.ic { width: 18px; height: 18px; flex: none; vertical-align: -3px; }
.ic-xl { width: 54px; height: 54px; color: var(--faint); }
[dir="rtl"] .ic-flip { transform: scaleX(-1); }
kbd { font: 600 11px/1 var(--sans); padding: 3px 6px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 6px; color: var(--muted); background: var(--surface); }
.octa { clip-path: var(--octa); }

/* ---------- buttons, chips, status ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 15px/1 var(--sans); padding: 13px 18px; border-radius: 12px; border: 1px solid transparent; cursor: pointer; text-decoration: none !important; transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .1s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 9px 13px; font-size: 14px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn-brand { background: var(--brand); color: #fff; box-shadow: 0 8px 20px -12px rgba(62, 75, 208, .7); }
.btn-brand:hover { background: var(--brand-ink); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: #000; }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--ink-2); }
.btn-soft { background: var(--bg-2); color: var(--ink-2); border-color: var(--line); }
.btn-soft:hover { background: var(--sand); }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 15px; color: var(--ink); }
.link-arrow .ic { color: var(--brand); transition: transform .15s; }
.link-arrow:hover { text-decoration: none; color: var(--brand); }
.link-arrow:hover .ic { transform: translateX(3px); }
[dir="rtl"] .link-arrow:hover .ic { transform: scaleX(-1) translateX(3px); }
.link-ext { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 999px; font: 550 14px/1.2 var(--sans); background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); text-decoration: none !important; transition: border-color .15s, color .15s, background .15s; }
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip .ic { width: 16px; height: 16px; color: var(--brand); }
.chip b { font-weight: 600; color: var(--faint); font-size: 12px; }
.chip-x .ic { width: 14px; height: 14px; }
.count { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 8px; font: 600 12.5px/1 var(--sans); background: var(--bg-2); color: var(--muted); border-radius: 999px; vertical-align: middle; margin-inline-start: 8px; border: 1px solid var(--line); font-variant-numeric: tabular-nums; }

.st-open { --c: var(--c-open); --s: var(--c-open-soft); }
.st-closing { --c: var(--c-closing); --s: var(--c-closing-soft); }
.st-soon { --c: var(--c-soon); --s: var(--c-soon-soft); }
.st-exam { --c: var(--c-exam); --s: var(--c-exam-soft); }
.st-results { --c: var(--c-results); --s: var(--c-results-soft); }
.st-expected { --c: var(--c-expected); --s: var(--c-expected-soft); }
.st-closed { --c: var(--c-closed); --s: var(--c-closed-soft); }
.st-all { --c: var(--ink-2); --s: var(--bg-2); }
.status { display: inline-flex; align-items: center; gap: 7px; font: 600 12px/1 var(--sans); color: var(--c); letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
[dir="rtl"] .status { letter-spacing: 0; text-transform: none; font-size: 13px; }
.status i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); flex: none; }
.st-closing .status i, .status.st-closing i { animation: ping 1.8s ease-out infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c) 55%, transparent); } 100% { box-shadow: 0 0 0 7px transparent; } }
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: 999px; font: 600 12.5px/1 var(--sans); color: var(--c); background: var(--s); white-space: nowrap; }
.pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.pill-lg { font-size: 13.5px; padding: 8px 13px; }
.lg { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex: none; }
.tag { display: inline-flex; align-items: center; gap: 6px; font: 550 13px/1.2 var(--sans); color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); padding: 5px 10px; border-radius: 8px; text-decoration: none !important; }
a.tag:hover { border-color: var(--brand); color: var(--brand); }
.tag .ic { width: 15px; height: 15px; color: var(--muted); }
.tag-plain { background: transparent; }
.tag-ok { color: var(--c-open); border-color: color-mix(in srgb, var(--c-open) 30%, var(--line)); background: var(--c-open-soft); }
.tag-ok .ic { color: var(--c-open); }
.tag-warn { color: var(--c-expected); border-color: color-mix(in srgb, var(--c-expected) 30%, var(--line)); background: var(--c-expected-soft); }
.tag-warn .ic { color: var(--c-expected); }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c-open); animation: live 2.2s infinite; flex: none; }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(23, 132, 90, .45); } 70% { box-shadow: 0 0 0 8px rgba(23, 132, 90, 0); } 100% { box-shadow: 0 0 0 0 rgba(23, 132, 90, 0); } }
.badge-octa { display: grid; place-items: center; width: 44px; height: 44px; clip-path: var(--octa); background: var(--brand-soft); color: var(--brand); flex: none; }
.badge-octa .ic { width: 20px; height: 20px; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 22px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none !important; flex: none; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand-name { font: 600 21px/1 var(--serif); letter-spacing: -.02em; }
[dir="rtl"] .brand-name { font-size: 22px; letter-spacing: 0; }
.brand-name b { color: var(--brand); font-weight: inherit; }
.main-nav { display: flex; align-items: center; gap: 2px; flex: 1; }
.main-nav a { color: var(--ink-2); font: 500 14.5px/1 var(--sans); padding: 10px 12px; border-radius: 10px; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; white-space: nowrap; }
.main-nav a:hover { background: var(--bg-2); color: var(--ink); }
.main-nav a.is-cur { color: var(--brand); background: var(--brand-tint); }
.nav-count { font: 650 11.5px/1 var(--sans); background: var(--c-open-soft); color: var(--c-open); padding: 3px 7px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.header-tools { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }
.qs-open { display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 10px 0 13px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); color: var(--muted); font: 500 14px/1 var(--sans); cursor: pointer; min-width: 190px; box-shadow: var(--shadow-1); }
.qs-open:hover { border-color: var(--brand); color: var(--ink); }
.qs-open .qs-open-label { flex: 1; text-align: start; }
.lang-switch { display: inline-grid; place-items: center; min-width: 44px; height: 40px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink) !important; font: 600 14px/1 "IBM Plex Sans Arabic", var(--sans); text-decoration: none !important; }
.lang-switch:hover { border-color: var(--brand); }
.nav-toggle { display: none; width: 42px; height: 40px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); cursor: pointer; }
.nav-toggle .ic { width: 22px; height: 22px; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(36px, 6vw, 76px) 0 clamp(36px, 5vw, 64px); background: radial-gradient(900px 520px at 78% 40%, #FFFFFF 0%, transparent 70%), var(--bg); border-bottom: 1px solid var(--line); }
[dir="rtl"] .hero { background: radial-gradient(900px 520px at 22% 40%, #FFFFFF 0%, transparent 70%), var(--bg); }
.hero::before { content: ""; position: absolute; inset: 0; background-image: var(--zellige); opacity: .07; mask-image: radial-gradient(70% 90% at 50% 0%, #000 0%, transparent 75%); -webkit-mask-image: radial-gradient(70% 90% at 50% 0%, #000 0%, transparent 75%); pointer-events: none; }
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.hero-copy { min-width: 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font: 600 13px/1.2 var(--sans); color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); padding: 8px 14px 8px 12px; border-radius: 999px; margin-bottom: 26px; box-shadow: var(--shadow-1); }
.eyebrow b { color: var(--c-open); font-weight: 650; }
.eyebrow .sep { width: 1px; height: 14px; background: var(--line-2); }
.hero-title { font-size: clamp(38px, 5.8vw, 70px); font-weight: 520; line-height: 1.02; letter-spacing: -.03em; margin-bottom: 20px; }
.hero-title em { font-style: italic; color: var(--brand); font-weight: 480; }
[dir="rtl"] .hero-title { font-weight: 600; line-height: 1.32; letter-spacing: 0; }
[dir="rtl"] .hero-title em { font-style: normal; }
.lede { font-size: clamp(16.5px, 1.5vw, 19px); color: var(--ink-2); max-width: 36em; margin-bottom: 28px; line-height: 1.6; }
.hero-search { position: relative; display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 18px; padding: 7px; padding-inline-start: 18px; box-shadow: var(--shadow-3); max-width: 640px; transition: border-color .15s, box-shadow .15s; }
.hero-search:focus-within { border-color: var(--brand); box-shadow: var(--shadow-3), 0 0 0 4px var(--brand-soft); }
.hero-search > .ic { color: var(--muted); width: 21px; height: 21px; }
.hero-search input { flex: 1; min-width: 0; width: 100%; border: 0; outline: 0; font: 500 17px/1.3 var(--sans); color: var(--ink); background: transparent; padding: 11px 4px; }
.hero-search input::placeholder { color: var(--faint); }
.hero-search .btn { padding: 14px 22px; border-radius: 13px; }
.intents { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 0; max-width: 660px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 0; margin: 34px 0 0; max-width: 640px; border-top: 1px solid var(--line); padding-top: 22px; }
.hero-stats > div { flex: 1 1 0; min-width: 120px; padding-inline-end: 18px; margin-inline-end: 18px; border-inline-end: 1px solid var(--line); display: flex; flex-direction: column-reverse; gap: 4px; }
.hero-stats > div:last-child { border-inline-end: 0; margin-inline-end: 0; }
.hero-stats dt { font-size: 13px; color: var(--muted); line-height: 1.35; }
.hero-stats dd { margin: 0; font: 520 36px/1 var(--serif); letter-spacing: -.02em; font-variant-numeric: tabular-nums lining-nums; }
.hero-stats dd a { color: var(--ink); text-decoration: none; }
.hero-stats .is-hot dd a { color: var(--c-closing); }
.hero-stats .is-open dd a { color: var(--c-open); }

/* radar (light) */
.hero-radar { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.radar { position: relative; width: min(100%, 460px); aspect-ratio: 1; isolation: isolate; }
.radar-frame { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; overflow: visible; }
.radar-frame .oct { fill: #fff; stroke: var(--line-2); stroke-width: .35; }
.radar-frame .oct-2 { fill: none; stroke: var(--brand); stroke-opacity: .16; stroke-width: .25; }
.radar-grid { position: absolute; inset: 0; width: 100%; height: 100%; }
.radar-grid .disc { fill: url(#rg); }
.radar-grid .ring { fill: none; stroke: var(--brand); stroke-opacity: .18; stroke-width: .3; }
.radar-grid .ring-hot { stroke: var(--c-closing); stroke-opacity: .5; stroke-dasharray: 1 1.2; }
.radar-grid .axis { stroke: var(--brand); stroke-opacity: .08; stroke-width: .2; }
.radar-grid .ring-label { fill: var(--faint); font: 600 2.3px/1 "Inter", "IBM Plex Sans Arabic", sans-serif; text-anchor: middle; }
.radar-sweep { position: absolute; inset: 14%; border-radius: 50%; background: conic-gradient(from 0deg, rgba(62, 75, 208, .20) 0deg, rgba(62, 75, 208, .06) 32deg, transparent 75deg, transparent 360deg); animation: sweep 7s linear infinite; pointer-events: none; }
[dir="rtl"] .radar-sweep { animation-direction: reverse; background: conic-gradient(from 0deg, transparent 0deg, transparent 285deg, rgba(62, 75, 208, .06) 328deg, rgba(62, 75, 208, .20) 360deg); }
@keyframes sweep { to { transform: rotate(360deg); } }
.radar-core { position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; clip-path: var(--octa); background: var(--brand); }
.blip { position: absolute; width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2.5px #fff, 0 2px 8px color-mix(in srgb, var(--c) 60%, transparent); transition: transform .15s; z-index: 2; }
.blip.st-closing { width: 13px; height: 13px; margin: -6.5px 0 0 -6.5px; animation: blip 2.4s ease-in-out infinite; animation-delay: calc(var(--i) * -.2s); }
.blip:hover, .blip:focus-visible { transform: scale(1.45); z-index: 5; animation: none; text-decoration: none; }
@keyframes blip { 0%, 100% { box-shadow: 0 0 0 2.5px #fff, 0 0 0 4px color-mix(in srgb, var(--c) 30%, transparent); } 50% { box-shadow: 0 0 0 2.5px #fff, 0 0 0 9px color-mix(in srgb, var(--c) 0%, transparent); } }
.blip-tip { position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translate(-50%, 4px); background: var(--ink); color: #fff; font: 600 12.5px/1.35 var(--sans); padding: 8px 11px; border-radius: 10px; width: max-content; max-width: 230px; box-shadow: var(--shadow-3); opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s; text-align: start; }
.blip-tip small { display: block; color: #C9CCDA; font-weight: 500; margin-top: 2px; }
.blip:hover .blip-tip, .blip:focus-visible .blip-tip { opacity: 1; transform: translate(-50%, 0); }
.radar-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 16px; margin: 30px 0 6px; font-size: 13px; color: var(--ink-2); }
.radar-legend span { display: inline-flex; gap: 7px; align-items: center; }
.radar-note { font-size: 12.5px; color: var(--muted); margin: 0; text-align: center; }

/* typeahead + quick search */
.ta-results, .qs-results { list-style: none; margin: 0; padding: 6px; }
.ta-results { position: absolute; inset-inline: 0; top: calc(100% + 8px); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-3); z-index: 20; max-height: 430px; overflow: auto; }
.ta-results li a, .qs-results li a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 11px; color: var(--ink); text-decoration: none; }
.ta-results li a[aria-selected="true"], .ta-results li a:hover, .qs-results li a[aria-selected="true"], .qs-results li a:hover { background: var(--brand-tint); }
.ta-results .t, .qs-results .t { flex: 1; min-width: 0; font-weight: 600; font-size: 14.5px; line-height: 1.35; }
.ta-results .t small, .qs-results .t small { display: block; color: var(--muted); font-weight: 500; font-size: 12.5px; }
.ta-results .pill, .qs-results .pill { flex: none; }

/* ---------- sections ---------- */
.section { padding: clamp(44px, 6vw, 84px) 0; }
.section + .section:not(.section-sand) { padding-top: 0; }
.section-sand { background: var(--bg-2); border-block: 1px solid var(--line); }
.section-sand + .section { padding-top: clamp(44px, 6vw, 84px); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 26px; flex-wrap: wrap; }
.section-head h2 { margin-bottom: 6px; display: flex; align-items: center; flex-wrap: wrap; }
.section-head p { color: var(--muted); margin: 0; max-width: 46em; }
.kicker { display: inline-flex; align-items: center; gap: 8px; font: 650 12px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--brand); margin-bottom: 12px; }
[dir="rtl"] .kicker { letter-spacing: 0; text-transform: none; font-size: 13.5px; }
.kicker::before { content: ""; width: 10px; height: 10px; clip-path: var(--octa); background: currentColor; }
.kicker.k-hot { color: var(--c-closing); }
.grid { display: grid; gap: 16px; }
.cards { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.months { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.two-col { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(28px, 5vw, 64px); }
.sub-head { margin: 40px 0 16px; font: 600 18px/1.3 var(--sans); }

/* closing-soon strip */
.strip { position: relative; }
.strip-track { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 300px); gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 18px; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.strip-track > * { scroll-snap-align: start; }
.strip-nav { display: flex; gap: 8px; }
.strip-nav button { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); cursor: pointer; display: grid; place-items: center; }
.strip-nav button:hover { border-color: var(--brand); color: var(--brand); }
[dir="rtl"] .strip-nav .ic { transform: scaleX(-1); }

/* cards */
.card { position: relative; display: flex; flex-direction: column; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 18px 0; box-shadow: var(--shadow-1); transition: transform .18s ease, box-shadow .18s ease, border-color .18s; overflow: hidden; }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); border-color: var(--line-2); }
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 26px; }
.card-cat { display: grid; place-items: center; width: 28px; height: 28px; clip-path: var(--octa); background: var(--bg-2); color: var(--muted); }
.card-cat .ic { width: 14px; height: 14px; }
.card-title { font: 600 16.5px/1.38 var(--sans); letter-spacing: -.008em; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
[dir="rtl"] .card-title { line-height: 1.65; letter-spacing: 0; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card:has(.card-title a:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.card-title a:focus-visible { outline: none; }
.card-org { color: var(--muted); font-size: 13.5px; margin: -2px 0 0; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--ink-2); font-size: 13px; }
.card-meta li { display: inline-flex; align-items: center; gap: 5px; }
.card-meta .ic { width: 14px; height: 14px; color: var(--faint); }
.card-foot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; padding: 14px 0 16px; border-top: 1px solid var(--line); }
.when { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.when .lbl { font-size: 12px; color: var(--muted); }
.when time, .when .val { font: 600 15px/1.2 var(--sans); color: var(--ink); }
.when .val.exp { color: var(--c-expected); }
.cd { display: flex; align-items: baseline; gap: 4px; color: var(--c); line-height: 1; white-space: nowrap; }
.cd b { font: 560 30px/1 var(--serif); letter-spacing: -.02em; font-variant-numeric: tabular-nums lining-nums; }
.cd span { font: 600 12.5px/1 var(--sans); }
.cd.cd-today b { font-size: 20px; }
.progress { position: absolute; inset-inline: 0; bottom: 0; height: 3px; background: var(--s); }
.progress i { display: block; height: 100%; width: calc(var(--p) * 100%); background: var(--c); border-radius: 0 3px 3px 0; }
[dir="rtl"] .progress i { margin-inline-start: 0; border-radius: 3px 0 0 3px; }
.mini { padding-bottom: 0; min-height: 228px; }
.mini .card-title { -webkit-line-clamp: 3; font-size: 15.5px; }

/* domain tiles */
.tiles { grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 12px; }
.tile { display: grid; grid-template-columns: auto 1fr; column-gap: 14px; row-gap: 2px; align-items: center; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); color: var(--ink); text-decoration: none !important; transition: border-color .15s, transform .15s, box-shadow .15s; }
.tile:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); transform: translateY(-2px); box-shadow: var(--shadow-2); }
.tile .badge-octa { grid-row: span 3; align-self: start; }
.tile-name { font: 600 15.5px/1.3 var(--sans); }
.tile-desc { font-size: 13px; color: var(--muted); line-height: 1.45; }
.tile-count { font-size: 13px; color: var(--muted); }
.tile-count b { color: var(--c-open); font-weight: 600; }

/* agenda (upcoming exams) */
.agenda { list-style: none; margin: 0 0 18px; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.agenda li { display: grid; grid-template-columns: 64px 1fr auto; gap: 16px; align-items: center; padding: 14px 18px; border-top: 1px solid var(--line); position: relative; }
.agenda li:first-child { border-top: 0; }
.agenda li:hover { background: var(--brand-tint); }
.date-chip { display: grid; place-items: center; text-align: center; line-height: 1; padding: 8px 0 9px; border-radius: 12px; background: var(--s, var(--bg-2)); color: var(--c, var(--ink)); }
.date-chip b { font: 560 24px/1 var(--serif); font-variant-numeric: tabular-nums lining-nums; }
.date-chip span { font: 600 11.5px/1 var(--sans); margin-top: 4px; text-transform: uppercase; letter-spacing: .04em; }
[dir="rtl"] .date-chip span { text-transform: none; letter-spacing: 0; }
.agenda a { font-weight: 600; color: var(--ink); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.agenda a::after { content: ""; position: absolute; inset: 0; }
.agenda small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.agenda .cd b { font-size: 22px; }
.level-list { list-style: none; margin: 0 0 32px; padding: 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.level-list li + li { border-top: 1px solid var(--line); }
.level-list a { display: flex; justify-content: space-between; align-items: center; padding: 13px 18px; color: var(--ink); font-weight: 550; text-decoration: none; }
.level-list a:hover { background: var(--brand-tint); color: var(--brand); }
.level-list b { font: 600 12.5px/1 var(--sans); color: var(--muted); background: var(--bg-2); padding: 4px 9px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.month-col { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; }
.month-col h3 { display: flex; justify-content: space-between; align-items: baseline; font: 560 22px/1.2 var(--serif); text-transform: capitalize; border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-bottom: 12px; }
[dir="rtl"] .month-col h3 { font-weight: 600; }
.month-col h3 span { font: 600 13px/1 var(--sans); color: var(--muted); }
.month-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.month-col li { font-size: 14px; line-height: 1.4; }
.month-col li a { font-weight: 650; color: var(--ink); }
.month-col li a:hover { color: var(--brand); }
.month-col li small { display: block; color: var(--muted); font-size: 12.5px; }
.month-col .more { color: var(--muted); font-weight: 600; }

/* AI / developers */
.dev { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(24px, 4vw, 52px); align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(24px, 4vw, 48px); position: relative; overflow: hidden; }
.dev::before { content: ""; position: absolute; inset-block: 0; inset-inline-end: 0; width: 46%; background-image: var(--zellige); opacity: .05; pointer-events: none; }
.dev-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; }
.code { margin: 0; background: #12152A; border-radius: 16px; padding: 18px 20px; font: 500 13px/1.7 var(--mono); color: #DADDF0; overflow-x: auto; text-align: left; direction: ltr; position: relative; box-shadow: var(--shadow-3); }
.code .c-mute { color: #6E7499; } .code .c-key { color: #9DB3FF; } .code .c-str { color: #7FD8AE; } .code .c-num { color: #F2C27A; }
.code-tabs { display: flex; gap: 6px; margin-bottom: 14px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.code-tabs::-webkit-scrollbar { display: none; }
.code-tabs button { flex: none; white-space: nowrap; font: 600 13px/1 var(--sans); padding: 9px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); cursor: pointer; }
.code-tabs button:hover { border-color: var(--brand); color: var(--brand); }
.code-tabs button[aria-selected="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }

/* FAQ */
.faq { display: grid; gap: 0; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 0; font: 600 16.5px/1.4 var(--sans); display: flex; justify-content: space-between; gap: 18px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; width: 12px; height: 12px; flex: none; clip-path: var(--octa); background: var(--line-2); transition: transform .3s, background .2s; }
.faq details[open] summary::after { transform: rotate(45deg); background: var(--brand); }
.faq details p { color: var(--ink-2); margin: -4px 0 20px; max-width: 52em; }

/* ---------- page head / hubs / list ---------- */
.page-head { position: relative; padding: clamp(28px, 4vw, 52px) 0 clamp(22px, 3vw, 34px); border-bottom: 1px solid var(--line); overflow: hidden; }
.page-head::before { content: ""; position: absolute; inset: 0; background-image: var(--zellige); opacity: .045; mask-image: linear-gradient(90deg, transparent 30%, #000 100%); -webkit-mask-image: linear-gradient(90deg, transparent 30%, #000 100%); pointer-events: none; }
[dir="rtl"] .page-head::before { mask-image: linear-gradient(270deg, transparent 30%, #000 100%); -webkit-mask-image: linear-gradient(270deg, transparent 30%, #000 100%); }
.page-head > .wrap { position: relative; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13.5px; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--brand); }
.crumbs span[aria-hidden] { color: var(--line-2); }
.page-head-row { display: flex; gap: 20px; align-items: flex-start; }
.page-head-row .badge-octa { width: 64px; height: 64px; margin-top: 2px; }
.page-head-row .badge-octa .ic { width: 28px; height: 28px; }
.lede-sm { color: var(--ink-2); font-size: 17px; max-width: 54em; margin-bottom: 0; }
.hub-stats { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 18px 0 0; padding: 0; list-style: none; font-size: 14px; color: var(--muted); }
.hub-stats li { display: inline-flex; align-items: center; gap: 8px; }
.hub-stats b { font: 560 20px/1 var(--serif); color: var(--ink); font-variant-numeric: tabular-nums lining-nums; }
.season { margin-top: 22px; max-width: 560px; }
.season h2 { font: 600 13px/1 var(--sans); color: var(--muted); margin-bottom: 10px; letter-spacing: 0; }
.season ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; align-items: end; height: 64px; }
.season li { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 5px; height: 100%; font-size: 10.5px; color: var(--faint); }
.season li i { display: block; width: 100%; min-height: 3px; height: calc(var(--v) * 44px + 3px); background: var(--brand-soft); border-radius: 4px 4px 2px 2px; }
.season li.on i { background: var(--brand); }
.season li.now { color: var(--ink); font-weight: 700; }
.list-layout { display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: 32px; padding-block: 30px 72px; align-items: start; }
.filters { position: sticky; top: 92px; }
.filters-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 4px 16px 16px; }
.filters-box summary { list-style: none; display: flex; align-items: center; gap: 8px; font-weight: 650; padding: 13px 0 9px; pointer-events: none; }
.filters-box summary::-webkit-details-marker { display: none; }
.filter-form { display: grid; gap: 18px; }
.filter-form fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 1px; }
.filter-form legend, .field > span { font: 650 12px/1 var(--sans); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; }
[dir="rtl"] .filter-form legend, [dir="rtl"] .field > span { text-transform: none; letter-spacing: 0; font-size: 13.5px; }
.radio { position: relative; display: flex; align-items: center; gap: 10px; padding: 7px 9px; border-radius: 9px; cursor: pointer; font-size: 14.5px; color: var(--ink-2); }
.radio:hover { background: var(--bg); }
.radio input { position: absolute; opacity: 0; pointer-events: none; }
.radio:has(input:checked) { background: var(--brand-tint); color: var(--brand); font-weight: 600; }
.radio:has(input:focus-visible) { outline: 2px solid var(--brand); }
.radio small { margin-inline-start: auto; color: var(--faint); font-weight: 600; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.pill-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; }
.field { display: grid; gap: 0; }
.field input, .field select, .field textarea, .list-search input, .sort-form select { width: 100%; font: 500 15px/1.4 var(--sans); color: var(--ink); background: var(--surface); border: 1px solid var(--line-2); border-radius: 11px; padding: 10px 12px; outline: none; transition: border-color .15s, box-shadow .15s; }
.field input:focus, .field select:focus, .field textarea:focus, .list-search input:focus, .sort-form select:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.check { display: flex; gap: 9px; align-items: center; font-size: 14px; color: var(--ink-2); }
.check input { width: 17px; height: 17px; accent-color: var(--brand); }
.filter-actions { display: flex; gap: 8px; }
.list-search { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 15px; padding: 6px; padding-inline-start: 16px; margin-bottom: 16px; box-shadow: var(--shadow-1); }
.list-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.list-search > .ic { color: var(--muted); }
.list-search input { border: 0; box-shadow: none !important; padding: 9px 4px; font-size: 16px; }
.results-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.results-count { margin: 0; color: var(--ink-2); }
.results-count b { font-weight: 650; }
.sort-form label { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.sort-form select { width: auto; padding: 8px 10px; font-size: 14px; }
.active-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }

/* agenda-style rows */
.rows { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.row { position: relative; display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 18px 20px; border-top: 1px solid var(--line); transition: background .15s; }
.row:first-child { border-top: 0; }
.row:hover { background: var(--brand-tint); }
.row .date-chip { align-self: start; }
.date-chip.dc-none { background: var(--bg-2); color: var(--faint); }
.date-chip.dc-none b { font-size: 18px; }
.row-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-bottom: 6px; position: relative; z-index: 2; }
.row-tags .tag { padding: 3px 8px; font-size: 12.5px; }
.row-title { font: 600 17px/1.38 var(--sans); margin: 0 0 3px; letter-spacing: -.008em; }
[dir="rtl"] .row-title { line-height: 1.65; letter-spacing: 0; }
.row-title a { color: var(--ink); }
.row-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.row-title a:hover { text-decoration: none; }
.row-org { color: var(--muted); font-size: 14px; margin: 0 0 8px; }
.row-side { display: grid; justify-items: end; gap: 4px; text-align: end; min-width: 92px; }
.row-side .when .lbl { text-align: end; }
.pager { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 24px; color: var(--muted); font-size: 14px; }
.empty { text-align: center; background: var(--surface); border: 1px dashed var(--line-2); border-radius: var(--r-lg); padding: 44px 20px; color: var(--muted); }
.hub-faq { margin-top: 44px; }
.hub-faq h2 { font-size: 24px; }
.month-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 22px; flex-wrap: wrap; }

/* ---------- detail ---------- */
.detail-head { position: relative; padding: clamp(26px, 4vw, 48px) 0 clamp(24px, 3vw, 36px); border-bottom: 1px solid var(--line); background: linear-gradient(180deg, color-mix(in srgb, var(--s) 55%, var(--bg)) 0%, var(--bg) 100%); overflow: hidden; }
.detail-head::before { content: ""; position: absolute; inset: 0; background-image: var(--zellige); opacity: .05; mask-image: linear-gradient(90deg, transparent 35%, #000 100%); -webkit-mask-image: linear-gradient(90deg, transparent 35%, #000 100%); pointer-events: none; }
[dir="rtl"] .detail-head::before { mask-image: linear-gradient(270deg, transparent 35%, #000 100%); -webkit-mask-image: linear-gradient(270deg, transparent 35%, #000 100%); }
.detail-head > .wrap { position: relative; }
.detail-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 18px; }
.detail-title { font-size: clamp(28px, 3.9vw, 46px); max-width: 24em; margin-bottom: 10px; font-weight: 540; }
.detail-alt { font-size: 17px; color: var(--muted); margin-bottom: 12px; max-width: 46em; }
.detail-alt[lang="ar"] { font-family: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif; }
[dir="ltr"] .detail-alt[dir="rtl"] { text-align: left; }
[dir="rtl"] .detail-alt[dir="ltr"] { text-align: right; font-family: "Inter", var(--sans); }
.detail-org { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; margin-bottom: 0; }
.detail-org .ic { color: var(--muted); }
.dates-band { position: relative; display: grid; grid-template-columns: repeat(var(--n, 4), 1fr); margin-top: 30px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-1); }
.dates-band .step { position: relative; padding: 18px 20px 18px; border-inline-start: 1px solid var(--line); }
.dates-band .step:first-child { border-inline-start: 0; }
.dates-band .step dt { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.dates-band .step dt::before { content: ""; width: 9px; height: 9px; clip-path: var(--octa); background: var(--line-2); flex: none; }
.dates-band .step dd { margin: 0; font: 560 21px/1.2 var(--serif); color: var(--ink); }
[dir="rtl"] .dates-band .step dd { font-weight: 600; font-size: 19px; }
.dates-band .step dd small { display: block; font: 500 12.5px/1.3 var(--sans); color: var(--muted); margin-top: 4px; }
.dates-band .is-done dt::before { background: var(--c-open); }
.dates-band .is-done dd { color: var(--muted); }
.dates-band .is-current { background: color-mix(in srgb, var(--s) 60%, var(--surface)); }
.dates-band .is-current dt { color: var(--c); font-weight: 650; }
.dates-band .is-current dt::before { background: var(--c); }
.dates-band .is-current dd { color: var(--c); }
.dates-band .is-current::after { content: ""; position: absolute; inset-inline: 0; top: -1px; height: 3px; background: var(--c); }
.dates-band .is-empty dd { color: var(--faint); }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 40px; padding-block: 36px 64px; align-items: start; }
.detail-aside { position: sticky; top: 92px; display: grid; gap: 14px; }
.block { margin-bottom: 34px; }
.block h2 { font-size: 24px; margin-bottom: 14px; }
.h-sm { font: 650 14px/1.2 var(--sans) !important; color: var(--muted); margin-bottom: 12px !important; text-transform: uppercase; letter-spacing: .06em; }
[dir="rtl"] .h-sm { text-transform: none; letter-spacing: 0; font-size: 15px !important; }
.prose { font-size: 17px; color: var(--ink-2); max-width: 44em; line-height: 1.7; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; color: var(--ink-2); font-size: 16px; }
.checks .ic { color: var(--c-open); margin-top: 3px; width: 18px; height: 18px; }
.kv { display: grid; grid-template-columns: 1fr 1fr; margin: 0; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.kv > div { padding: 14px 18px; border-bottom: 1px solid var(--line); }
.kv > div:nth-child(odd) { border-inline-end: 1px solid var(--line); }
.kv dt { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.kv dd { margin: 3px 0 0; font-weight: 550; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow-2); }
.panel-quiet { box-shadow: none; background: transparent; border-style: dashed; }
.countdown-panel { position: relative; overflow: hidden; }
.countdown-panel::before { content: ""; position: absolute; inset-inline-end: 18px; top: 18px; width: 64px; height: 64px; clip-path: var(--octa); background: var(--s); }
.countdown-panel > * { position: relative; }
.cd-big { display: flex; align-items: baseline; gap: 10px; margin: 0; color: var(--c); }
.cd-big b { font: 520 72px/1 var(--serif); letter-spacing: -.04em; font-variant-numeric: tabular-nums lining-nums; }
.cd-big span { font: 600 17px/1 var(--sans); }
.cd-sub { color: var(--ink-2); margin: 10px 0 20px; font-size: 14.5px; }
.cd-kicker { color: var(--muted); font-weight: 600; margin: 0 0 6px; font-size: 14px; }
.cd-month-big { font: 540 34px/1.15 var(--serif); color: var(--c-expected); margin: 0 0 8px; text-transform: capitalize; }
.cta-stack { display: grid; gap: 8px; margin-bottom: 12px; }
.cta-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cta-row .btn { padding-inline: 10px; }
.cta-row .btn-wide { grid-column: 1 / -1; }
.verif { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.verif .ic { width: 22px; height: 22px; color: var(--c-open); flex: none; }
.verif.unv .ic { color: var(--c-expected); }
.verif b { color: var(--ink); }
.format-links { display: flex; flex-wrap: wrap; gap: 8px; }
.format-links a { display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink-2); font-size: 14px; font-weight: 550; }
.format-links a:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }
.disclaimer { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-2); background: var(--c-expected-soft); border-radius: 12px; padding: 13px 15px; }
.disclaimer .ic { color: var(--c-expected); margin-top: 2px; }

/* ---------- calendar ---------- */
.cal { padding-block: 26px 72px; }
.cal-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-top: 18px; }
.legend-inline { display: inline-flex; flex-wrap: wrap; gap: 14px; font-size: 13.5px; color: var(--muted); }
.legend-inline span { display: inline-flex; align-items: center; gap: 7px; }
.cal-months { position: sticky; top: 68px; z-index: 5; display: flex; gap: 8px; overflow-x: auto; padding: 12px 0; margin-bottom: 8px; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); scrollbar-width: thin; }
.cal-months a { flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); font-weight: 600; font-size: 14px; text-transform: capitalize; text-decoration: none; }
.cal-months a:hover { border-color: var(--brand); color: var(--brand); }
.cal-months small { color: var(--muted); font-weight: 500; }
.cal-months b { font-size: 11.5px; background: var(--bg-2); padding: 2px 7px; border-radius: 999px; color: var(--muted); }
.cal-month { margin-top: 34px; }
.cal-month h2 { text-transform: capitalize; display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.cal-month h2 span { color: var(--muted); font-size: .62em; }
.cal-month h2 a { font: 600 14px/1 var(--sans); margin-inline-start: auto; }
.cal-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.cal-item { position: relative; display: grid; grid-template-columns: 70px 160px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 12px 18px; border-top: 1px solid var(--line); }
.cal-item:not(.new-day) { border-top-color: transparent; padding-top: 4px; }
.cal-item:first-child { border-top: 0; }
.cal-item:hover { background: var(--brand-tint); }
.cal-day { display: flex; align-items: baseline; gap: 6px; }
.cal-day b { font: 560 24px/1 var(--serif); font-variant-numeric: tabular-nums lining-nums; }
.cal-day span { font-size: 12.5px; color: var(--muted); text-transform: capitalize; }
.cal-type { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--c); }
.ev-closing { --c: var(--c-closing); --s: var(--c-closing-soft); } .ev-soon { --c: var(--c-soon); --s: var(--c-soon-soft); } .ev-exam { --c: var(--c-exam); --s: var(--c-exam-soft); } .ev-results { --c: var(--c-results); --s: var(--c-results-soft); }
.cal-title { color: var(--ink); font-weight: 550; line-height: 1.45; }
.cal-title::after { content: ""; position: absolute; inset: 0; }
.cal-org { font-size: 12.5px; color: var(--muted); font-weight: 600; }

/* ---------- explore / org list ---------- */
.explore { padding-block: 30px 72px; }
.explore .block h2 { margin-bottom: 18px; }
.org-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px; }
.org-list a { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 12px; align-items: center; padding: 12px 15px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; color: var(--ink); text-decoration: none; }
.org-list a:hover { border-color: var(--brand); }
.org-list b { font-size: 14px; color: var(--brand); }
.org-list span { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.org-list em { font-style: normal; font-size: 12px; font-weight: 650; color: var(--muted); background: var(--bg-2); padding: 3px 8px; border-radius: 999px; }

/* ---------- forms / notices / prose pages ---------- */
.form { display: grid; gap: 16px; margin: 28px 0 72px; }
.form-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hp { position: absolute; left: -9999px; }
.notice { display: flex; gap: 10px; align-items: center; padding: 14px 16px; border-radius: 12px; margin-top: 24px; font-weight: 550; }
.notice-ok { background: var(--c-open-soft); color: var(--c-open); }
.notice-err { background: var(--c-closing-soft); color: var(--c-closing); }
.prose-page { padding-block: 34px 72px; }
.prose-page h2 { margin-top: 40px; font-size: 26px; }
.prose-page h3 { margin-top: 26px; }
.prose-page p, .prose-page li { color: var(--ink-2); font-size: 16.5px; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin: 0 0 30px; padding: 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.stat-row > div { padding: 18px 20px; border-inline-start: 1px solid var(--line); }
.stat-row > div:first-child { border-inline-start: 0; }
.stat-row dt { font-size: 13px; color: var(--muted); }
.stat-row dd { margin: 4px 0 0; font: 540 30px/1.1 var(--serif); font-variant-numeric: tabular-nums lining-nums; }
.api-doc code { font-family: var(--mono); font-size: .9em; background: var(--bg-2); padding: 2px 6px; border-radius: 6px; }
.api-doc .code code { background: none; padding: 0; }
.endpoints { display: grid; gap: 8px; margin: 0 0 22px; padding: 0; list-style: none; }
.endpoints li { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 13px 15px; }
.endpoints .verb { font: 700 11px/1 var(--mono); color: #fff; background: var(--c-open); padding: 4px 6px; border-radius: 5px; margin-inline-end: 9px; }
.endpoints .verb.post { background: var(--brand); }
.endpoints a, .endpoints code.u { font-family: var(--mono); font-size: 14px; word-break: break-all; }
.endpoints p { margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin: 0 0 22px; }
.tools-grid div { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.tools-grid b { font-family: var(--mono); font-size: 13.5px; color: var(--brand); }
.tools-grid p { margin: 6px 0 0; font-size: 14px; color: var(--muted); }

/* ---------- footer ---------- */
.site-footer { position: relative; background: var(--bg-2); color: var(--ink-2); padding: 64px 0 26px; border-top: 1px solid var(--line); }
.site-footer::before { content: ""; position: absolute; inset-inline: 0; top: -1px; height: 14px; background-image: var(--band); background-repeat: repeat-x; background-size: 56px 14px; opacity: .85; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 36px; }
.footer-brand p { font-size: 14px; color: var(--muted); max-width: 34em; }
.footer-brand .brand { margin-bottom: 16px; }
.footer-meta { font-size: 13px !important; color: var(--faint) !important; }
.site-footer h2 { font: 650 12px/1.2 var(--sans); text-transform: uppercase; letter-spacing: .1em; color: var(--ink); margin-bottom: 16px; }
[dir="rtl"] .site-footer h2 { text-transform: none; letter-spacing: 0; font-size: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.site-footer a { color: var(--ink-2); font-size: 14px; display: inline-flex; gap: 8px; align-items: center; }
.site-footer a:hover { color: var(--brand); }
.site-footer .ic { width: 16px; height: 16px; color: var(--brand); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; border-top: 1px solid var(--line-2); margin-top: 44px; padding-top: 22px; font-size: 13px; color: var(--muted); }

/* ---------- quick search dialog ---------- */
.qs { width: min(680px, calc(100vw - 24px)); max-height: min(72vh, 640px); margin: 10vh auto auto; padding: 0; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); color: var(--ink); box-shadow: 0 40px 100px -30px rgba(22, 26, 46, .45); overflow: hidden; }
.qs::backdrop { background: rgba(22, 26, 46, .32); backdrop-filter: blur(5px); }
.qs-form { display: flex; align-items: center; gap: 10px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.qs-form > .ic { color: var(--muted); width: 21px; height: 21px; }
.qs-form input { flex: 1; min-width: 0; border: 0; outline: 0; font: 500 17px/1.3 var(--sans); color: var(--ink); background: transparent; }
.qs-close { border: 0; background: none; cursor: pointer; padding: 0; }
.qs-results { max-height: calc(min(72vh, 640px) - 72px); overflow: auto; }
.qs-empty { padding: 16px 20px; color: var(--muted); margin: 0; font-size: 14px; }

/* ---------- responsive ---------- */
@media (max-width: 1120px) {
  .main-nav a.nav-hide-md { display: none; }
  .qs-open { min-width: 0; }
  .qs-open kbd { display: none; }
}
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .radar { width: min(74vw, 340px); }
  .hero-radar { margin-top: 10px; }
  .blip-tip { display: none; }
  .two-col, .dev { grid-template-columns: minmax(0, 1fr); }
  .list-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .filters { position: static; }
  .filters-box summary { pointer-events: auto; cursor: pointer; }
  .detail-grid { grid-template-columns: minmax(0, 1fr); }
  .detail-aside { position: static; order: -1; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-toggle { display: inline-grid; place-items: center; }
  .main-nav { position: fixed; inset: 68px 0 auto 0; flex-direction: column; align-items: stretch; gap: 2px; padding: 12px var(--gutter) 22px; margin: 0; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: 0 30px 60px -30px rgba(22, 26, 46, .3); transform: translateY(-8px); opacity: 0; visibility: hidden; transition: .18s ease; }
  .main-nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .main-nav a, .main-nav a.nav-hide-md { display: flex; padding: 13px 12px; font-size: 16px; }
  .dates-band { grid-template-columns: 1fr 1fr; }
  .dates-band .step:nth-child(3) { border-inline-start: 0; }
  .dates-band .step:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 720px) {
  body { font-size: 15.5px; }
  .header-inner { gap: 8px; height: 62px; }
  .main-nav { inset: 62px 0 auto 0; }
  .brand-name { font-size: 19px; }
  .brand-mark { width: 30px; height: 30px; }
  .qs-open { width: 42px; padding: 0; justify-content: center; }
  .qs-open .qs-open-label, .qs-open kbd { display: none; }
  .hero-title { font-size: clamp(36px, 10vw, 44px); }
  .hero-search { padding-inline-start: 14px; border-radius: 16px; }
  .hero-search .btn { padding: 12px 15px; font-size: 14px; }
  .hero-search input { font-size: 16px; }
  .hero-stats > div { min-width: 0; padding-inline-end: 10px; margin-inline-end: 10px; }
  .hero-stats dd { font-size: 28px; }
  .hero-stats dt { font-size: 12px; }
  .row { grid-template-columns: 54px minmax(0, 1fr); gap: 12px; padding: 16px; }
  .row-side { grid-column: 2; justify-items: start; text-align: start; grid-auto-flow: column; justify-content: start; align-items: baseline; gap: 10px; }
  .row-side .when { flex-direction: row; gap: 6px; align-items: baseline; }
  .date-chip b { font-size: 20px; }
  .kv { grid-template-columns: 1fr; }
  .kv > div:nth-child(odd) { border-inline-end: 0; }
  .cal-item { grid-template-columns: 50px minmax(0, 1fr); gap: 2px 12px; }
  .cal-type, .cal-title { grid-column: 2; }
  .cal-org { display: none; }
  .cal-day { grid-row: span 2; flex-direction: column; gap: 0; align-self: start; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .form-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .page-head-row { gap: 14px; }
  .page-head-row .badge-octa { width: 48px; height: 48px; }
  .page-head-row .badge-octa .ic { width: 22px; height: 22px; }
  .stat-row { grid-template-columns: 1fr; }
  .stat-row > div { border-inline-start: 0; border-top: 1px solid var(--line); }
  .stat-row > div:first-child { border-top: 0; }
  .agenda li { grid-template-columns: 54px minmax(0, 1fr); }
  .agenda .cd { display: none; }
  .cd-big b { font-size: 60px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .site-footer, .filters, .detail-aside .cta-row, .hero-radar, .strip-nav { display: none !important; }
  body { background: #fff; }
}
