/* ============================================================
   ELEXO KNOWLEDGE — blog + documentation
   Same visual language as the Elexo landing: royal violet,
   cosmic backdrop, glass surfaces, Vazirmatn + Space Grotesk.
   ============================================================ */

@font-face {
    font-family: 'Vazirmatn';
    font-style: normal;
    font-weight: 300 900;
    font-display: swap;
    src: url('../fonts/vazirmatn-arabic.woff2') format('woff2');
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
    font-family: 'Vazirmatn';
    font-style: normal;
    font-weight: 300 900;
    font-display: swap;
    src: url('../fonts/vazirmatn-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Space Grotesk';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('../fonts/space-grotesk-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --bg: #0A0512;
    --bg-deep: #05030A;
    --surface: rgba(23, 15, 43, 0.58);
    --surface-2: rgba(15, 9, 30, 0.78);
    --primary: #8B5CF6;
    --primary-soft: #A78BFA;
    --primary-pale: #C4B5FD;
    --secondary: #D946EF;
    --brand-a: #40D2FF;
    --brand-b: #8D94FF;
    --brand-c: #C467FF;
    --gold: #FBBF24;
    --cyan: #67E8F9;
    --text: #F3F0FA;
    --muted: #9B93B3;
    --muted-dim: rgba(155, 147, 179, 0.8); /* AA: 4.62:1 on --bg */
    --line: rgba(167, 139, 250, 0.14);
    --line-strong: rgba(167, 139, 250, 0.32);
    --glass-blur: blur(18px) saturate(140%);
    --radius-sm: 14px;
    --radius: 22px;
    --radius-lg: 30px;
    --shell: min(1240px, calc(100% - 48px));
    --font: 'Vazirmatn', Tahoma, sans-serif;
    --latin: 'Space Grotesk', 'Vazirmatn', sans-serif;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --nav-h: 78px;
    --grad-brand: linear-gradient(112deg, #40D2FF 0%, #8D94FF 52%, #C467FF 100%);
    --grad-violet: linear-gradient(135deg, #A78BFA 0%, #8B5CF6 42%, #D946EF 100%);
    --shadow-1: 0 24px 70px rgba(3, 1, 10, 0.55);
    --glow: 0 0 24px rgba(139, 92, 246, 0.45);
    --ac: #A78BFA;
    --ac-soft: rgba(167, 139, 250, 0.16);
    --ac-line: rgba(167, 139, 250, 0.34);
}

.accent-violet { --ac: #A78BFA; --ac-soft: rgba(167, 139, 250, 0.16); --ac-line: rgba(167, 139, 250, 0.36); }
.accent-cyan { --ac: #67E8F9; --ac-soft: rgba(103, 232, 249, 0.13); --ac-line: rgba(103, 232, 249, 0.32); }
.accent-blue { --ac: #7DD3FC; --ac-soft: rgba(125, 211, 252, 0.13); --ac-line: rgba(125, 211, 252, 0.32); }
.accent-magenta { --ac: #E879F9; --ac-soft: rgba(232, 121, 249, 0.14); --ac-line: rgba(232, 121, 249, 0.34); }
.accent-gold { --ac: #FBBF24; --ac-soft: rgba(251, 191, 36, 0.13); --ac-line: rgba(251, 191, 36, 0.32); }
.accent-teal { --ac: #5EEAD4; --ac-soft: rgba(94, 234, 212, 0.13); --ac-line: rgba(94, 234, 212, 0.32); }

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    direction: rtl;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-h) + 28px);
    -webkit-text-size-adjust: 100%;
    overflow-x: clip;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    font-size: 16px;
    line-height: 1.85;
    min-height: 100vh;
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.is-locked { overflow: hidden; }

img, svg, canvas { display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }
::selection { background: rgba(139, 92, 246, 0.45); color: #fff; }
a, button { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }

:focus-visible { outline: 2px solid rgba(196, 181, 253, 0.8); outline-offset: 3px; border-radius: 6px; }

input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #05030A; }
::-webkit-scrollbar-thumb { background: rgba(139, 92, 246, 0.34); border-radius: 10px; border: 2px solid #05030A; }
::-webkit-scrollbar-thumb:hover { background: rgba(167, 139, 250, 0.52); }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }

.shell { width: var(--shell); margin-inline: auto; }
.skiplink, .skip {
    position: fixed; top: 12px; right: 50%; z-index: 400;
    transform: translate(50%, -160%);
    padding: 10px 18px; border-radius: 10px;
    background: var(--primary); color: #fff; font-size: 0.8rem; font-weight: 700;
    transition: transform 0.3s var(--ease);
}
.skip:focus { transform: translate(50%, 0); }

/* ---------- Backdrop ---------- */
.backdrop { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.backdrop__aurora {
    position: absolute; inset: -30% -10% auto;
    height: 110vh;
    background:
        radial-gradient(46% 40% at 78% 8%, rgba(139, 92, 246, 0.2), transparent 66%),
        radial-gradient(34% 30% at 16% 16%, rgba(64, 210, 255, 0.1), transparent 70%),
        radial-gradient(40% 34% at 52% 0%, rgba(217, 70, 239, 0.12), transparent 70%);
    filter: blur(12px);
}
.backdrop__grid {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(167, 139, 250, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(167, 139, 250, 0.045) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: radial-gradient(70% 50% at 50% 0%, #000 0%, transparent 78%);
    -webkit-mask-image: radial-gradient(70% 50% at 50% 0%, #000 0%, transparent 78%);
    opacity: 0.55;
}
.backdrop__orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.4; will-change: transform; }
.backdrop__orb--1 { width: 420px; height: 420px; top: 24vh; left: -180px; background: rgba(64, 210, 255, 0.14); animation: orbDriftA 26s ease-in-out infinite alternate; }
.backdrop__orb--2 { width: 520px; height: 520px; bottom: -220px; right: -160px; background: rgba(217, 70, 239, 0.12); animation: orbDriftB 34s ease-in-out infinite alternate; }
@keyframes orbDriftA { to { transform: translate3d(70px, -46px, 0) scale(1.14); } }
@keyframes orbDriftB { to { transform: translate3d(-64px, 54px, 0) scale(1.08); } }
.backdrop__noise {
    position: absolute; inset: 0; opacity: 0.24; mix-blend-mode: soft-light;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.42'/%3E%3C/svg%3E");
}

main { position: relative; z-index: 2; }

/* ---------- Reading progress ---------- */
.reading-progress {
    position: fixed; inset-inline: 0; top: 0; height: 3px; z-index: 120;
    background: transparent; opacity: 0; transition: opacity 0.3s ease;
}
.reading-progress.is-on { opacity: 1; }
.reading-progress span {
    display: block; height: 100%; width: 0;
    background: var(--grad-brand);
    box-shadow: 0 0 12px rgba(141, 148, 255, 0.7);
    transition: width 0.1s linear;
}

/* ---------- Page-load progress ---------- */
/* Fixed and pointer-transparent: it never shifts layout, so CLS stays 0. */
.page-load {
    position: fixed; inset-inline: 0; top: 0; height: 2px; z-index: 130;
    pointer-events: none; opacity: 1; transition: opacity 0.4s ease 0.12s;
}
.page-load i {
    display: block; height: 100%; width: 8%;
    background: var(--grad-brand);
    box-shadow: 0 0 12px rgba(141, 148, 255, 0.7);
    transition: width 0.45s cubic-bezier(0.22, 0.85, 0.3, 1);
}
.page-load.is-done { opacity: 0; }
.page-load.is-done i { width: 100%; transition: width 0.25s ease-out; }
@media (prefers-reduced-motion: reduce) {
    .page-load, .page-load i { transition: none; }
}

/* ---------- Navigation ---------- */
.nav {
    position: fixed; inset-inline: 0; top: 0; z-index: 110;
    border-bottom: 1px solid transparent;
    transition: background 0.4s ease, border-color 0.4s ease, backdrop-filter 0.4s ease, box-shadow 0.4s ease;
}
.nav.is-scrolled {
    background: rgba(8, 4, 16, 0.72);
    border-bottom-color: rgba(167, 139, 250, 0.12);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    box-shadow: 0 20px 50px rgba(3, 1, 10, 0.35);
}
.nav__inner {
    width: min(1280px, calc(100% - 44px));
    height: var(--nav-h);
    margin-inline: auto;
    display: flex; align-items: center; justify-content: space-between; gap: 18px;
}
.brand { display: inline-flex; align-items: center; gap: 11px; flex-shrink: 0; }
.brand__mark {
    width: 42px; height: 42px;
    display: grid; place-items: center;
    border-radius: 13px;
    border: 1px solid rgba(167, 139, 250, 0.28);
    background: linear-gradient(140deg, rgba(139, 92, 246, 0.24), rgba(64, 210, 255, 0.08));
    box-shadow: 0 8px 22px rgba(139, 92, 246, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.brand__mark svg { width: 24px; height: 20px; }
.brand__text { display: flex; flex-direction: column; line-height: 1.35; }
.brand__text strong { font-family: var(--latin); font-size: 0.96rem; font-weight: 700; letter-spacing: 0.17em; }
.brand__text small { font-size: 0.58rem; color: var(--muted); letter-spacing: 0.02em; }

.nav__links { display: flex; align-items: center; gap: 2px; }
.nav__links > a {
    position: relative; padding: 8px 11px; border-radius: 10px;
    font-size: 0.81rem; color: var(--muted);
    transition: color 0.25s ease, background 0.25s ease;
}
.nav__links > a:hover { color: var(--text); background: rgba(139, 92, 246, 0.1); }
.nav__links > a.is-active { color: #fff; }
.nav__links > a.is-active::after {
    content: ''; position: absolute; bottom: 2px; inset-inline: 30%; height: 1px;
    background: var(--grad-brand); box-shadow: 0 0 8px rgba(141, 148, 255, 0.7);
}
.nav__actions { display: flex; align-items: center; gap: 10px; }

.nav__search {
    display: inline-flex; align-items: center; gap: 8px;
    height: 37px; padding: 0 10px 0 8px;
    border: 1px solid var(--line); border-radius: 11px;
    background: rgba(23, 15, 43, 0.5);
    color: var(--muted); font-size: 0.76rem;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    transition: border-color 0.25s ease, color 0.25s ease, background 0.25s ease;
}
.nav__search:hover { color: var(--text); border-color: var(--line-strong); background: rgba(139, 92, 246, 0.12); }
.nav__search .ico { width: 16px; height: 16px; color: var(--primary-soft); }
.nav__kbd {
    font-family: var(--latin); font-size: 0.62rem; line-height: 1;
    padding: 4px 6px; border-radius: 6px;
    border: 1px solid rgba(167, 139, 250, 0.2);
    background: rgba(167, 139, 250, 0.08);
    color: var(--muted);
}

.btn {
    position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 9px;
    height: 46px; padding: 0 20px; border-radius: 14px;
    border: 1px solid transparent;
    font-family: var(--font); font-size: 0.86rem; font-weight: 700;
    white-space: nowrap; cursor: pointer; isolation: isolate;
    transition: transform 0.3s var(--ease), box-shadow 0.3s ease, border-color 0.3s ease, background 0.3s ease, color 0.3s ease;
}
.btn .ico { width: 18px; height: 18px; }
.btn--primary {
    color: #fff;
    background: linear-gradient(112deg, #7C3AED 0%, #6D28D9 34%, #C026D3 66%, #6D28D9 100%); /* AA: white text >=4.7:1 */
    background-size: 220% auto;
    box-shadow: 0 12px 32px rgba(139, 92, 246, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.28);
    transition: transform 0.3s var(--ease), box-shadow 0.3s ease, background-position 0.7s var(--ease);
}
.btn--primary::before {
    content: ''; position: absolute; inset: 0; border-radius: inherit; z-index: -1;
    background: linear-gradient(135deg, rgba(64, 210, 255, 0.42), transparent 48%);
    opacity: 0.65;
}
.btn--primary:hover {
    transform: translateY(-2px); background-position: 100% 0;
    box-shadow: 0 18px 44px rgba(139, 92, 246, 0.42), 0 0 34px -6px rgba(217, 70, 239, 0.55), 0 0 0 1px rgba(196, 181, 253, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.32);
}
.btn--ghost {
    color: var(--text); background: rgba(23, 15, 43, 0.5);
    border-color: var(--line);
    backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
}
.btn--ghost .ico { color: var(--primary-soft); }
.btn--ghost:hover { transform: translateY(-2px); border-color: var(--line-strong); background: rgba(139, 92, 246, 0.12); }
.btn--sm { height: 37px; padding: 0 14px; font-size: 0.76rem; border-radius: 11px; gap: 7px; }
.btn--sm .ico { width: 15px; height: 15px; }
.btn--lg { height: 54px; padding: 0 26px; font-size: 0.93rem; border-radius: 16px; }
.btn:active { transform: translateY(1px) scale(0.99); }

.burger { display: none; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: rgba(23, 15, 43, 0.5); padding: 11px 10px; }
.burger span { display: block; height: 1.5px; background: var(--text); border-radius: 2px; transition: transform 0.3s var(--ease), opacity 0.3s ease; }
.burger span + span { margin-top: 5px; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.mobile-menu {
    position: fixed; inset: var(--nav-h) 0 auto 0; z-index: 105;
    max-height: calc(100vh - var(--nav-h)); overflow-y: auto;
    padding: 18px 24px 26px;
    background: rgba(8, 4, 16, 0.97);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    box-shadow: 0 30px 60px rgba(3, 1, 10, 0.6);
}
.mobile-menu nav { display: flex; flex-direction: column; }
.mobile-menu nav a { padding: 13px 4px; border-bottom: 1px solid rgba(167, 139, 250, 0.08); color: var(--muted); }
.mobile-menu nav a:hover { color: var(--text); }
.mobile-menu__foot { display: grid; gap: 10px; margin-top: 18px; }

/* ---------- Typography helpers ---------- */
.eyebrow {
    display: inline-flex; align-items: center; gap: 9px;
    font-family: var(--latin); font-size: 0.67rem; font-weight: 600;
    letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted);
}
.eyebrow--fa { font-family: var(--font); letter-spacing: 0; text-transform: none; font-size: 0.76rem; font-weight: 600; }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--brand-a); box-shadow: 0 0 12px var(--brand-a); position: relative; flex-shrink: 0; }
.pulse::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid rgba(64, 210, 255, 0.5); animation: pulseRing 2.4s ease-out infinite; }
@keyframes pulseRing { 0% { transform: scale(0.7); opacity: 0.9; } 100% { transform: scale(1.7); opacity: 0; } }

.grad {
    background: linear-gradient(112deg, #40D2FF 0%, #8D94FF 30%, #C467FF 58%, #40D2FF 82%, #8D94FF 100%);
    background-size: 260% auto;
    -webkit-background-clip: text; background-clip: text; color: transparent;
    animation: gradShift 11s ease-in-out infinite alternate;
}
.grad-violet { background: var(--grad-violet); -webkit-background-clip: text; background-clip: text; color: transparent; }
@keyframes gradShift { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }

.section { position: relative; padding: clamp(56px, 7vw, 96px) 0; }
.section--tight { padding: clamp(38px, 5vw, 64px) 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 34px; }
.section-head__body { max-width: 660px; }
.section-title { margin: 10px 0 8px; font-size: clamp(1.5rem, 2.6vw, 2.2rem); font-weight: 800; line-height: 1.45; letter-spacing: -0.2px; }
.section-lead { font-size: 0.92rem; line-height: 1.95; color: var(--muted); max-width: 60ch; }
.section-link {
    display: inline-flex; align-items: center; gap: 7px;
    font-size: 0.8rem; font-weight: 600; color: var(--primary-pale); flex-shrink: 0;
    padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line);
    transition: border-color 0.25s ease, background 0.25s ease;
}
.section-link .ico { width: 15px; height: 15px; transition: transform 0.3s var(--ease); }
.section-link:hover { border-color: var(--line-strong); background: rgba(139, 92, 246, 0.1); }
.section-link:hover .ico { transform: translateX(-3px); }

/* ---------- Hero ---------- */
.hero { position: relative; isolation: isolate; padding: calc(var(--nav-h) + clamp(54px, 8vw, 96px)) 0 clamp(38px, 5vw, 64px); text-align: center; }
.hero::before {
    content: ''; position: absolute; inset: calc(var(--nav-h) * -1) 0 auto; height: min(820px, 88vh);
    z-index: -1; pointer-events: none;
    background:
        radial-gradient(36% 44% at var(--mx, 50%) var(--my, 34%), rgba(139, 92, 246, 0.3), transparent 68%),
        radial-gradient(24% 30% at 16% 38%, rgba(64, 210, 255, 0.1), transparent 72%),
        radial-gradient(30% 34% at 86% 24%, rgba(217, 70, 239, 0.12), transparent 70%);
    filter: blur(28px);
    opacity: 0.95;
}
.hero__badge {
    position: relative; overflow: hidden;
    display: inline-flex; align-items: center; gap: 10px;
    padding: 7px 15px; border-radius: 999px;
    border: 1px solid rgba(167, 139, 250, 0.26);
    background: rgba(23, 15, 43, 0.55);
    color: var(--muted); font-size: 0.73rem;
    backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.03) inset, 0 14px 40px rgba(3, 1, 10, 0.35);
}
.hero__badge::after {
    content: ''; position: absolute; top: 0; bottom: 0; left: -60%; width: 38%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
    transform: skewX(-18deg); animation: badgeSheen 7s ease-in-out infinite;
}
@keyframes badgeSheen { 0%, 58% { left: -60%; } 88%, 100% { left: 135%; } }
.hero__badge strong { color: var(--primary-pale); font-weight: 700; }
.hero h1 {
    margin: 22px auto 0; max-width: 980px;
    font-size: clamp(2.15rem, 5.6vw, 4.15rem);
    font-weight: 800; line-height: 1.32; letter-spacing: -1.1px;
    text-shadow: 0 30px 90px rgba(139, 92, 246, 0.22);
    text-wrap: balance;
}
.hero h1 .grad { filter: drop-shadow(0 0 26px rgba(196, 103, 255, 0.32)); }
.hero h1 span { display: inline-block; }
.hero__lead {
    margin: 20px auto 0; max-width: 640px;
    color: var(--muted); font-size: clamp(0.9rem, 1.15vw, 1.02rem); line-height: 2.05;
}
.hero__search { margin: 34px auto 0; max-width: 720px; }
.searchbar {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 8px 8px 8px;
    border-radius: 18px;
    border: 1px solid rgba(167, 139, 250, 0.26);
    background: linear-gradient(180deg, rgba(30, 20, 55, 0.78), rgba(15, 9, 30, 0.82));
    box-shadow: 0 24px 60px rgba(3, 1, 10, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.searchbar:focus-within { border-color: rgba(167, 139, 250, 0.5); box-shadow: 0 24px 70px rgba(3, 1, 10, 0.6), 0 0 0 4px rgba(139, 92, 246, 0.12); }
.searchbar__icon { width: 20px; height: 20px; color: var(--primary-soft); margin-inline-start: 10px; flex-shrink: 0; }
.searchbar input {
    flex: 1; min-width: 0; height: 46px;
    background: transparent; border: 0; outline: 0;
    color: var(--text); font-family: var(--font); font-size: 0.95rem;
}
.searchbar input::placeholder { color: var(--muted-dim); }
.searchbar .btn { flex-shrink: 0; height: 46px; border-radius: 12px; }
.hero__chips { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin-top: 18px; }
.hero__chips > span { font-size: 0.72rem; color: var(--muted-dim); margin-inline-end: 2px; }
.chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px; border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(23, 15, 43, 0.45);
    color: var(--muted); font-size: 0.72rem;
    transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
.chip:hover { color: var(--text); border-color: var(--ac-line); background: var(--ac-soft); }
.chip .ico { width: 13px; height: 13px; }
.hero__stats { display: flex; justify-content: center; margin-top: 36px; flex-wrap: wrap; }
.hero__stat { display: flex; flex-direction: column; align-items: center; gap: 2px; padding-inline: clamp(20px, 4vw, 54px); }
.hero__stat strong {
    font-family: var(--latin); font-size: 1.62rem; font-weight: 600; letter-spacing: -0.5px;
    background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent;
    filter: drop-shadow(0 6px 18px rgba(139, 92, 246, 0.25));
}
.hero__stat span { font-size: 0.67rem; color: var(--muted); }
.hero__stat + .hero__stat { border-inline-start: 1px solid var(--line); }

/* ---------- Page header (inner pages) ---------- */
.page-head { position: relative; padding: calc(var(--nav-h) + 42px) 0 14px; }
.page-head__top { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.page-head h1 { margin-top: 12px; font-size: clamp(1.75rem, 3.8vw, 2.85rem); font-weight: 800; line-height: 1.42; letter-spacing: -0.5px; }
.page-head p { margin-top: 10px; max-width: 680px; color: var(--muted); font-size: 0.92rem; line-height: 2; }
.page-head__search { width: min(100%, 420px); }
.page-head__search .searchbar { padding: 5px; border-radius: 14px; }
.page-head__search input { height: 40px; font-size: 0.85rem; }
.page-head__search .btn { height: 40px; border-radius: 10px; }

.breadcrumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 0.72rem; color: var(--muted-dim); }
.breadcrumbs a { color: var(--muted); transition: color 0.2s ease; }
.breadcrumbs a:hover { color: var(--primary-pale); }
.breadcrumbs .sep { opacity: 0.5; font-size: 0.62rem; }
.breadcrumbs [aria-current="page"] { color: var(--primary-pale); }

/* ---------- Post cards ---------- */
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.post-grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.post-card {
    position: relative;
    display: flex; flex-direction: column;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(27, 18, 49, 0.62), rgba(13, 8, 26, 0.76));
    box-shadow: 0 18px 48px rgba(3, 1, 10, 0.32);
    overflow: hidden;
    transition: transform 0.4s var(--ease), border-color 0.4s ease, box-shadow 0.4s ease;
}
.post-card::before {
    content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none; border-radius: inherit;
    background: radial-gradient(240px circle at var(--px, 50%) var(--py, 0%), rgba(255, 255, 255, 0.1), transparent 62%);
    opacity: 0; transition: opacity 0.35s ease;
}
.post-card::after {
    content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
    background: radial-gradient(120% 80% at 50% 0%, var(--ac-soft), transparent 62%);
    opacity: 0; transition: opacity 0.4s ease;
}
.post-card:hover { transform: translateY(-5px); border-color: var(--ac-line); box-shadow: 0 30px 70px rgba(3, 1, 10, 0.5), 0 0 0 1px var(--ac-line), 0 0 44px -14px var(--ac); }
.post-card:hover::before { opacity: 1; }
.post-card:hover::after { opacity: 1; }
.post-card > * { position: relative; z-index: 1; }

.post-card__art {
    position: relative; height: 168px; overflow: hidden;
    background:
        radial-gradient(70% 120% at 18% 0%, var(--ac-soft), transparent 62%),
        linear-gradient(150deg, rgba(24, 15, 43, 0.9), rgba(9, 5, 19, 0.95));
    border-bottom: 1px solid var(--line);
}
.post-card__art::before {
    content: ''; position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: radial-gradient(90% 90% at 45% 20%, #000, transparent 78%);
    -webkit-mask-image: radial-gradient(90% 90% at 45% 20%, #000, transparent 78%);
}
.post-card__art::after {
    content: ''; position: absolute;
    width: 190px; height: 190px; border-radius: 50%;
    top: -74px; inset-inline-start: -34px;
    border: 1px solid var(--ac-line);
    box-shadow: inset 0 0 50px var(--ac-soft), 0 0 40px var(--ac-soft);
    opacity: 0.7;
}
.post-card__art--photo::before { display: block; background: linear-gradient(180deg, rgba(6, 3, 14, 0.05) 40%, rgba(6, 3, 14, 0.68)); mask-image: none; -webkit-mask-image: none; }
.post-card__art--photo::after { display: none; }
.post-card__photo {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; display: block;
    transition: transform 0.6s var(--ease);
}
.post-card:hover .post-card__photo { transform: scale(1.05); }
.post-card__art--photo .post-card__type { z-index: 1; }
.post-card__num {
    position: absolute; bottom: -18px; inset-inline-end: 18px;
    font-family: var(--latin); font-size: 5.6rem; font-weight: 500; line-height: 1;
    color: transparent; -webkit-text-stroke: 1px var(--ac-line);
    opacity: 0.8;
}
.post-card__type {
    position: absolute; top: 14px; inset-inline-start: 14px;
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 10px; border-radius: 8px;
    border: 1px solid var(--ac-line);
    background: rgba(10, 5, 18, 0.55);
    color: var(--ac); font-size: 0.64rem; font-weight: 600;
    backdrop-filter: blur(8px);
}
.post-card__body { display: flex; flex-direction: column; flex: 1; gap: 10px; padding: 20px 20px 18px; }
.post-card__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; font-size: 0.68rem; color: var(--muted-dim); }
.post-card__meta span { display: inline-flex; align-items: center; gap: 5px; }
.post-card__meta .ico { width: 13px; height: 13px; }
.post-card__cat { color: var(--ac); font-weight: 600; }
.post-card__title { font-size: 1.04rem; font-weight: 700; line-height: 1.7; transition: color 0.25s ease; }
.post-card:hover .post-card__title { color: #fff; }
.post-card__excerpt { font-size: 0.78rem; line-height: 1.95; color: var(--muted); flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 12px; border-top: 1px solid rgba(167, 139, 250, 0.09); margin-top: 2px; }
.post-card__author { font-size: 0.68rem; color: var(--muted-dim); }
.post-card__more { display: inline-flex; align-items: center; gap: 5px; font-size: 0.72rem; font-weight: 600; color: var(--primary-pale); }
.post-card__more .ico { width: 14px; height: 14px; transition: transform 0.3s var(--ease); }
.post-card:hover .post-card__more .ico { transform: translateX(-3px); }

/* Featured post (blog page) */
.post-feature {
    position: relative;
    display: grid; grid-template-columns: 1.05fr 1fr;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: linear-gradient(135deg, rgba(32, 20, 58, 0.7), rgba(11, 6, 22, 0.85));
    overflow: hidden; margin-bottom: 28px;
    box-shadow: 0 30px 80px rgba(3, 1, 10, 0.45);
}
.post-feature::before {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(320px circle at var(--px, 70%) var(--py, 30%), rgba(255, 255, 255, 0.07), transparent 62%);
    opacity: 0; transition: opacity 0.4s ease;
}
.post-feature:hover::before { opacity: 1; }
.post-feature > * { position: relative; z-index: 1; }
.post-feature__art { position: relative; min-height: 340px; overflow: hidden; border-inline-start: 1px solid var(--line); }
.post-feature__art::before {
    content: ''; position: absolute; inset: 0;
    background:
        radial-gradient(60% 80% at 72% 24%, var(--ac-soft), transparent 65%),
        conic-gradient(from 210deg at 68% 42%, rgba(64, 210, 255, 0.1), rgba(139, 92, 246, 0.18), rgba(217, 70, 239, 0.1), rgba(64, 210, 255, 0.1));
}
.post-feature__art::after {
    content: ''; position: absolute; inset: 18%;
    border-radius: 50%; border: 1px solid var(--ac-line);
    box-shadow: 0 0 90px var(--ac-soft), inset 0 0 60px var(--ac-soft);
    animation: floatRing 14s ease-in-out infinite alternate;
}
@keyframes floatRing { from { transform: translateY(-8px) scale(0.98); } to { transform: translateY(10px) scale(1.03); } }
.post-feature__art--grid::before {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        radial-gradient(60% 80% at 72% 24%, var(--ac-soft), transparent 65%);
    background-size: 34px 34px, 34px 34px, auto;
}
.post-feature__chapter {
    position: absolute; bottom: -8px; inset-inline-start: 22px;
    font-family: var(--latin); font-size: 9rem; line-height: 1; font-weight: 500;
    color: transparent; -webkit-text-stroke: 1px var(--ac-line);
}
.post-feature__body { display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: clamp(26px, 4vw, 46px); }
.post-feature__body .post-card__title { font-size: clamp(1.35rem, 2.3vw, 1.9rem); line-height: 1.55; }
.post-feature__art--photo::before,
.post-feature__art--photo::after { display: none; }
.post-feature__art--photo::before {
    display: block;
    background: linear-gradient(180deg, rgba(6, 3, 14, 0) 45%, rgba(6, 3, 14, 0.72));
}
.post-feature__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.post-feature__art--photo .post-card__type,
.post-feature__art--photo .post-feature__chapter { z-index: 1; }
.post-feature__body .post-card__excerpt { -webkit-line-clamp: 4; font-size: 0.85rem; }
.post-feature__body .post-card__foot { border-top: 0; padding-top: 4px; margin-top: 6px; justify-content: flex-start; gap: 18px; }

/* ---------- Filters ---------- */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 26px; }
.filter {
    display: inline-flex; align-items: center; gap: 7px;
    height: 38px; padding: 0 15px; border-radius: 11px;
    border: 1px solid var(--line);
    background: rgba(23, 15, 43, 0.45);
    color: var(--muted); font-size: 0.76rem;
    transition: all 0.25s ease;
}
.filter:hover { color: var(--text); border-color: var(--line-strong); }
.filter.is-active {
    color: #fff; border-color: rgba(167, 139, 250, 0.5);
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.26), rgba(217, 70, 239, 0.16));
    box-shadow: 0 8px 22px rgba(139, 92, 246, 0.18);
}
.filter__count { font-family: var(--latin); font-size: 0.64rem; padding: 2px 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.06); color: var(--muted); }
.filter.is-active .filter__count { background: rgba(255, 255, 255, 0.14); color: #fff; }
.filters__sort { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; font-size: 0.72rem; color: var(--muted-dim); }

/* ---------- Product / docs cards ---------- */
.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.product-card {
    position: relative; display: flex; gap: 18px;
    padding: 24px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: linear-gradient(150deg, rgba(27, 18, 49, 0.6), rgba(12, 7, 24, 0.78));
    overflow: hidden;
    transition: transform 0.4s var(--ease), border-color 0.4s ease, box-shadow 0.4s ease;
}
.product-card::before {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background:
        radial-gradient(260px circle at var(--px, 92%) var(--py, 0%), rgba(255, 255, 255, 0.09), transparent 60%),
        radial-gradient(90% 120% at 100% 0%, var(--ac-soft), transparent 58%);
    opacity: 0.55; transition: opacity 0.4s ease;
}
.product-card:hover { transform: translateY(-4px); border-color: var(--ac-line); box-shadow: 0 26px 60px rgba(3, 1, 10, 0.45), 0 0 40px -16px var(--ac); }
.product-card:hover::before { opacity: 1; }
.product-card > * { position: relative; z-index: 1; }
.product-card__icon {
    width: 52px; height: 52px; flex-shrink: 0;
    display: grid; place-items: center;
    border-radius: 15px;
    border: 1px solid var(--ac-line);
    background: var(--ac-soft);
    color: var(--ac);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.product-card__icon .ico { width: 24px; height: 24px; }
.product-card__body { flex: 1; min-width: 0; }
.product-card__kicker { display: flex; align-items: center; gap: 8px; font-family: var(--latin); font-size: 0.63rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ac); }
.product-card__body h3 { margin-top: 4px; font-size: 1.06rem; font-weight: 700; }
.product-card__body p { margin-top: 6px; font-size: 0.78rem; line-height: 1.9; color: var(--muted); }
.product-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(167, 139, 250, 0.09); }
.product-card__count { font-size: 0.68rem; color: var(--muted-dim); }
.product-card__count strong { font-family: var(--latin); color: var(--text); font-weight: 600; }
.product-card__go { display: inline-flex; align-items: center; gap: 5px; font-size: 0.72rem; font-weight: 600; color: var(--primary-pale); }
.product-card__go .ico { width: 14px; height: 14px; transition: transform 0.3s var(--ease); }
.product-card:hover .product-card__go .ico { transform: translateX(-3px); }

/* ---------- Quick paths ---------- */
/* --path-cols comes from the number of documents the page actually found, so
   one or two cards still stretch across the shell instead of leaving a hole. */
.paths { display: grid; grid-template-columns: repeat(var(--path-cols, 3), minmax(0, 1fr)); gap: 14px; }
.paths--single { max-width: calc((100% - 28px) / 3); }
.path {
    position: relative; overflow: hidden;
    display: flex; align-items: flex-start; gap: 14px;
    padding: 18px 20px; border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: rgba(23, 15, 43, 0.42);
    transition: border-color 0.3s ease, background 0.3s ease, transform 0.3s var(--ease), box-shadow 0.3s ease;
}
.path::before {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(220px circle at var(--px, 50%) var(--py, 0%), rgba(255, 255, 255, 0.09), transparent 62%);
    opacity: 0; transition: opacity 0.3s ease;
}
.path:hover { border-color: var(--ac-line); background: var(--ac-soft); transform: translateY(-3px); box-shadow: 0 16px 40px -22px var(--ac); }
.path:hover::before { opacity: 1; }
.path > * { position: relative; z-index: 1; }
.path__num { font-family: var(--latin); font-size: 1rem; color: var(--ac); padding-top: 2px; }
.path strong { display: block; font-size: 0.84rem; }
.path small { display: block; margin-top: 3px; font-size: 0.7rem; color: var(--muted); line-height: 1.8; }
.path .ico { width: 16px; height: 16px; margin-inline-start: auto; color: var(--muted); flex-shrink: 0; margin-top: 4px; }

/* ---------- Doc product page ---------- */
.doc-top { padding-top: calc(var(--nav-h) + 32px); }
.doc-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr) 220px; gap: 34px; align-items: start; padding-top: 20px; padding-bottom: 60px; }
.doc-side { position: sticky; top: calc(var(--nav-h) + 22px); max-height: calc(100vh - var(--nav-h) - 44px); overflow-y: auto; padding-inline-end: 4px; }
.doc-side::-webkit-scrollbar { width: 5px; }
.doc-side__back { display: inline-flex; align-items: center; gap: 6px; font-size: 0.72rem; color: var(--muted); margin-bottom: 14px; }
.doc-side__back:hover { color: var(--primary-pale); }
.doc-side__product { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 12px; border: 1px solid var(--ac-line); background: var(--ac-soft); margin-bottom: 14px; }
.doc-side__product .ico { width: 20px; height: 20px; color: var(--ac); }
.doc-side__product strong { font-size: 0.86rem; }
.doc-side__product small { display: block; font-size: 0.62rem; color: var(--muted); }
.doc-side__group { margin-bottom: 16px; }
.doc-side__group > span { display: block; padding: 0 10px 6px; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.04em; color: var(--muted-dim); }
.doc-side__group a { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 8px; font-size: 0.74rem; color: var(--muted); border-inline-start: 1px solid transparent; }
.doc-side__group a:hover { color: var(--text); background: rgba(139, 92, 246, 0.08); }
.doc-side__group a.is-active { color: #fff; background: linear-gradient(90deg, var(--ac-soft), transparent); border-inline-start-color: var(--ac); }
.doc-side__group a span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-side__group a .ico { width: 13px; height: 13px; opacity: 0.5; flex-shrink: 0; }

.doc-main { min-width: 0; }
.doc-head { padding-bottom: 22px; border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.doc-head__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 14px; font-size: 0.68rem; color: var(--muted-dim); }
.doc-head__meta span { display: inline-flex; align-items: center; gap: 5px; }
.doc-head__meta .ico { width: 13px; height: 13px; }
.doc-head h1 { margin-top: 12px; font-size: clamp(1.6rem, 3.2vw, 2.35rem); font-weight: 800; line-height: 1.5; letter-spacing: -0.3px; }
.doc-head__lead { margin-top: 10px; color: var(--muted); font-size: 0.9rem; line-height: 2; max-width: 66ch; }
.doc-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 7px; border: 1px solid var(--line); background: rgba(23, 15, 43, 0.5); font-size: 0.64rem; color: var(--muted); }
.tag .ico { width: 11px; height: 11px; }

.doc-toc { position: sticky; top: calc(var(--nav-h) + 22px); font-size: 0.72rem; padding-inline-start: 16px; border-inline-start: 1px solid var(--line); }
.doc-layout--wide { grid-template-columns: 250px minmax(0, 1fr); }
.article-layout--wide { grid-template-columns: minmax(0, 1fr); }
.article-layout--wide .article { margin-inline: auto; }

.doc-nav-mobile { display: none; }

.doc-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 38px; padding-top: 24px; border-top: 1px solid var(--line); }
.doc-pager--single { grid-template-columns: 1fr; }
.doc-pager a { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border-radius: 14px; border: 1px solid var(--line); background: rgba(23, 15, 43, 0.4); transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s var(--ease); }
.doc-pager a:hover { border-color: var(--ac-line); background: var(--ac-soft); transform: translateY(-2px); }
.doc-pager small { font-size: 0.62rem; color: var(--muted-dim); }
.doc-pager strong { font-size: 0.8rem; }
.doc-pager a.next { text-align: left; align-items: flex-end; }
.doc-pager a .ico { width: 14px; height: 14px; color: var(--muted); }
.doc-pager a.next .ico { transform: scaleX(-1); }

/* ---------- Article ---------- */
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 46px; align-items: start; padding-bottom: 40px; }
.article { min-width: 0; max-width: 820px; }
.article-head { padding-top: calc(var(--nav-h) + 36px); }
.article-head .breadcrumbs { margin-bottom: 18px; }
.article-head__cat { display: inline-flex; align-items: center; gap: 7px; color: var(--ac); font-size: 0.72rem; font-weight: 700; }
.article-head h1 { margin-top: 12px; font-size: clamp(1.9rem, 4.2vw, 3.15rem); font-weight: 800; line-height: 1.42; letter-spacing: -0.6px; }
.article-head__lead { margin-top: 14px; color: var(--muted); font-size: clamp(0.9rem, 1.2vw, 1rem); line-height: 2.05; max-width: 70ch; }
.article-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 18px; margin-top: 22px; padding-bottom: 22px; border-bottom: 1px solid var(--line); font-size: 0.72rem; color: var(--muted-dim); }
.article-meta__author { display: flex; align-items: center; gap: 9px; color: var(--text); }
.article-meta__avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-family: var(--latin); font-size: 0.66rem; font-weight: 700; color: #fff; background: var(--grad-violet); box-shadow: 0 6px 16px rgba(139, 92, 246, 0.3); }
.article-meta span { display: inline-flex; align-items: center; gap: 5px; }
.article-meta .ico { width: 14px; height: 14px; }
.article-meta__spacer { flex: 1; }
.article-meta__share { display: flex; gap: 6px; }
.article-meta__share a, .article-meta__share button { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; border: 1px solid var(--line); color: var(--muted); transition: all 0.25s ease; }
.article-meta__share a:hover, .article-meta__share button:hover { color: var(--text); border-color: var(--line-strong); background: rgba(139, 92, 246, 0.1); }
.article-meta__share .ico { width: 15px; height: 15px; }

.article-cover {
    position: relative; height: clamp(230px, 34vw, 340px);
    border-radius: var(--radius-lg); overflow: hidden;
    border: 1px solid var(--line); margin: 26px 0 34px;
    background:
        radial-gradient(70% 110% at 24% 6%, var(--ac-soft), transparent 62%),
        linear-gradient(150deg, rgba(27, 17, 50, 0.92), rgba(8, 4, 17, 0.96));
    box-shadow: 0 30px 80px rgba(3, 1, 10, 0.45);
}
.article-cover::before {
    content: ''; position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 38px 38px;
    mask-image: radial-gradient(85% 85% at 40% 10%, #000, transparent 82%);
    -webkit-mask-image: radial-gradient(85% 85% at 40% 10%, #000, transparent 82%);
}
.article-cover::after {
    content: ''; position: absolute; width: 46%; aspect-ratio: 1; border-radius: 50%;
    top: -22%; inset-inline-start: -6%;
    border: 1px solid var(--ac-line);
    box-shadow: 0 0 120px var(--ac-soft), inset 0 0 80px var(--ac-soft);
}
.article-cover__chapter {
    position: absolute; bottom: -22px; inset-inline-end: 28px;
    font-family: var(--latin); font-size: clamp(7rem, 15vw, 12rem); line-height: 1; font-weight: 500;
    color: transparent; -webkit-text-stroke: 1px var(--ac-line); opacity: 0.85;
}
.article-cover__label {
    position: absolute; top: 22px; inset-inline-start: 22px;
    display: inline-flex; align-items: center; gap: 8px;
    padding: 7px 13px; border-radius: 9px;
    border: 1px solid var(--ac-line); background: rgba(8, 4, 16, 0.55); color: var(--ac);
    font-size: 0.68rem; font-weight: 600; backdrop-filter: blur(8px);
}
.article-cover__label .ico { width: 14px; height: 14px; }
.article-cover--photo::before { display: block; background: linear-gradient(180deg, rgba(6, 3, 14, 0) 52%, rgba(6, 3, 14, 0.66)); mask-image: none; -webkit-mask-image: none; }
.article-cover--photo::after { display: none; }
.article-cover--photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.article-cover--photo .article-cover__label { z-index: 1; }

.article-toc { padding-top: calc(var(--nav-h) + 36px); }
.article-toc__inner { position: sticky; top: calc(var(--nav-h) + 24px); padding: 18px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: rgba(23, 15, 43, 0.42); }

/* On-page contents (doc_toc_html): a rail that lights up the section being read. */
.toc__title { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 0.72rem; font-weight: 800; color: var(--muted); }
.toc__count { min-width: 20px; padding: 1px 6px; border-radius: 9px; background: var(--ac-soft); color: var(--ac); font-family: var(--latin); font-size: 0.62rem; line-height: 1.5; text-align: center; }
.toc__list { list-style: none; margin: 0; padding: 0; border-inline-start: 1px solid var(--line); }
.toc__item { position: relative; padding-inline-start: 12px; }
.toc__item::before { content: ''; position: absolute; inset-inline-start: -1px; top: 5px; bottom: 5px; width: 2px; border-radius: 2px; background: transparent; transition: background 0.25s var(--ease); }
.toc__item + .toc__item { margin-top: 2px; }
.toc__item a { display: block; padding: 4px 0; font-size: 0.72rem; color: var(--muted-dim); line-height: 1.7; transition: color 0.2s ease; }
.toc__item a:hover { color: var(--text); }
.toc__item a.is-active { color: var(--primary-pale); }
.toc__item:has(a.is-active)::before { background: var(--ac); }
.toc__item--sub { padding-inline-start: 24px; }
.toc__item--sub a { font-size: 0.67rem; }

/* ---------- Prose ---------- */
.prose { font-size: 1.02rem; line-height: 2.15; color: #DCD6EA; }
.prose > * + * { margin-top: 18px; }
.prose .lead { font-size: 1.1rem; line-height: 2.15; color: var(--text); padding-bottom: 6px; }
.prose h2 { margin-top: 44px; font-size: clamp(1.3rem, 2.2vw, 1.65rem); font-weight: 800; line-height: 1.55; color: #fff; position: relative; }
.prose h2::before { content: ''; display: inline-block; width: 18px; height: 2px; border-radius: 2px; background: var(--ac); vertical-align: 6px; margin-inline-end: 10px; box-shadow: 0 0 10px var(--ac-line); }
.prose h3 { margin-top: 30px; font-size: 1.08rem; font-weight: 700; color: #fff; }
.prose p { color: #C9C2DA; }
.prose a { color: var(--primary-pale); text-decoration: underline; text-decoration-color: rgba(167, 139, 250, 0.45); text-underline-offset: 4px; transition: color 0.2s ease; }
.prose a:hover { color: #fff; }
.prose strong { color: #fff; font-weight: 700; }
.prose ul, .prose ol { padding-inline-start: 4px; }
.prose ul li, .prose ol li { position: relative; padding-inline-start: 24px; margin-top: 8px; }
.prose ul li::before { content: ''; position: absolute; inset-inline-start: 6px; top: 0.95em; width: 6px; height: 6px; border-radius: 50%; background: var(--ac); box-shadow: 0 0 8px var(--ac-line); }
.prose ol { counter-reset: item; }
.prose ol li { counter-increment: item; }
.prose ol li::before { content: counter(item, persian); position: absolute; inset-inline-start: 0; top: 0.35em; font-size: 0.66rem; color: var(--ac); border: 1px solid var(--ac-line); width: 18px; height: 18px; display: grid; place-items: center; border-radius: 6px; }
.prose blockquote { padding: 16px 20px; border-inline-start: 2px solid var(--ac); background: var(--ac-soft); border-radius: 0 12px 12px 0; color: var(--text); }
.prose code { font-family: var(--latin); font-size: 0.86em; padding: 2px 6px; border-radius: 6px; background: rgba(167, 139, 250, 0.12); border: 1px solid rgba(167, 139, 250, 0.16); color: #E9E3FA; direction: ltr; unicode-bidi: embed; }
.prose hr { border: 0; height: 1px; background: var(--line); margin: 34px 0; }
.prose img { max-width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line); }
.prose img.is-wide { width: 100%; }
.prose figure { margin: 26px 0 0; }
.prose figcaption { margin-top: 10px; font-size: 0.76rem; color: var(--muted-dim); text-align: center; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: rgba(16, 10, 30, 0.5); }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.82rem; min-width: 460px; }
.prose th, .prose td { padding: 11px 14px; text-align: right; border-bottom: 1px solid rgba(167, 139, 250, 0.09); }
.prose th { background: rgba(167, 139, 250, 0.07); color: var(--text); font-weight: 700; font-size: 0.76rem; }
.prose tr:last-child td { border-bottom: 0; }
.prose td { color: var(--muted); }
.prose tbody tr:hover td { background: rgba(139, 92, 246, 0.04); }

/* Code blocks */
.code {
    margin-top: 24px; border-radius: 14px; overflow: hidden;
    border: 1px solid rgba(167, 139, 250, 0.18);
    background: #080410;
    box-shadow: 0 18px 44px rgba(3, 1, 10, 0.4);
    direction: ltr; text-align: left;
}
.code__bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; border-bottom: 1px solid rgba(167, 139, 250, 0.12); background: rgba(167, 139, 250, 0.05); }
.code__lang { font-family: var(--latin); font-size: 0.62rem; letter-spacing: 0.12em; color: var(--muted); }
.code__copy { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font); font-size: 0.64rem; color: var(--muted); padding: 4px 8px; border-radius: 6px; border: 1px solid transparent; transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease; }
.code__copy:hover { color: var(--text); border-color: var(--line); background: rgba(139, 92, 246, 0.1); }
.code__copy.is-done { color: #6EE7B7; }
.code pre { margin: 0; padding: 16px 18px; overflow-x: auto; }
.code code { display: block; padding: 0; border: 0; background: none; color: #C7D2FE; font-family: var(--latin); font-size: 0.8rem; line-height: 1.85; white-space: pre; }

/* Callouts */
.callout { display: flex; gap: 12px; padding: 16px 18px; border-radius: 14px; border: 1px solid; margin-top: 24px; }
.callout__icon { width: 26px; height: 26px; flex-shrink: 0; display: grid; place-items: center; border-radius: 8px; font-family: var(--latin); font-size: 0.76rem; font-weight: 700; }
.callout strong { display: block; font-size: 0.82rem; margin-bottom: 3px; color: #fff; }
.callout p { font-size: 0.79rem; line-height: 1.95; margin: 0; color: var(--muted); }
.callout--info { border-color: rgba(103, 232, 249, 0.22); background: rgba(103, 232, 249, 0.06); }
.callout--info .callout__icon { background: rgba(103, 232, 249, 0.13); color: #67E8F9; }
.callout--warn { border-color: rgba(251, 191, 36, 0.25); background: rgba(251, 191, 36, 0.06); }
.callout--warn .callout__icon { background: rgba(251, 191, 36, 0.14); color: #FBBF24; }

/* Steps */
.steps { counter-reset: step; margin-top: 24px; display: grid; gap: 12px; }
.prose .steps li { position: relative; padding: 14px 18px; padding-inline-start: 52px; border-radius: 12px; border: 1px solid var(--line); background: rgba(23, 15, 43, 0.36); margin: 0; counter-increment: step; }
.prose .steps li::before { content: counter(step, persian); position: absolute; inset-inline-start: 14px; top: 14px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 8px; background: var(--ac-soft); border: 1px solid var(--ac-line); color: var(--ac); font-size: 0.7rem; }
.steps strong { display: block; font-size: 0.84rem; color: #fff; }
.steps p { margin: 3px 0 0; font-size: 0.78rem; color: var(--muted); line-height: 1.9; }

/* Flow diagram */
.flow { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 22px 18px; margin-top: 26px; border-radius: 16px; border: 1px solid var(--line); background: linear-gradient(150deg, rgba(27, 18, 49, 0.55), rgba(11, 6, 22, 0.7)); }
.flow__step { display: flex; flex-direction: column; align-items: center; gap: 3px; flex: 1; min-width: 0; }
.flow__step span { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; border: 1px solid var(--ac-line); background: var(--ac-soft); color: var(--ac); font-family: var(--latin); font-size: 0.78rem; }
.flow__step strong { font-size: 0.76rem; }
.flow__step small { font-size: 0.62rem; color: var(--muted); }
.flow__line { width: 26px; height: 1px; flex-shrink: 0; background: linear-gradient(90deg, transparent, var(--ac-line), transparent); position: relative; }
.flow__line::after { content: ''; position: absolute; inset-inline-end: 0; top: -2px; width: 5px; height: 5px; border-inline-end: 1px solid var(--ac-line); border-bottom: 1px solid var(--ac-line); transform: rotate(-45deg); }

/* Article footer */
.article-foot { margin-top: 44px; padding-top: 26px; border-top: 1px solid var(--line); }
.article-foot h2 { font-size: 1.15rem; margin-bottom: 14px; }
.related-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.related {
    display: flex; flex-direction: column; gap: 5px; padding: 16px 18px;
    border-radius: 14px; border: 1px solid var(--line); background: rgba(23, 15, 43, 0.38);
    transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s var(--ease);
}
.related:hover { border-color: var(--ac-line); background: var(--ac-soft); transform: translateY(-2px); }
.related small { font-size: 0.63rem; color: var(--ac); }
.related strong { font-size: 0.82rem; line-height: 1.7; }
.related span { font-size: 0.68rem; color: var(--muted-dim); display: inline-flex; align-items: center; gap: 5px; margin-top: 2px; }
.related .ico { width: 12px; height: 12px; }

/* ---------- Docs hub ---------- */
.docs-hero { padding-top: calc(var(--nav-h) + 48px); }
.docs-hero__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 38px; align-items: center; }
.docs-hero h1 { margin-top: 14px; font-size: clamp(2rem, 4.4vw, 3.2rem); font-weight: 800; line-height: 1.4; letter-spacing: -0.6px; }
.docs-hero p { margin-top: 14px; max-width: 56ch; color: var(--muted); line-height: 2.05; font-size: 0.95rem; }
.docs-hero__search { margin-top: 24px; max-width: 480px; }
.docs-hero__meta { display: flex; gap: 22px; margin-top: 22px; font-size: 0.72rem; color: var(--muted-dim); }
.docs-hero__meta strong { font-family: var(--latin); color: var(--text); font-weight: 600; margin-inline-end: 4px; }
.doc-hero__badge {
    display: inline-grid; place-items: center;
    width: 56px; height: 56px; margin-bottom: 16px;
    border-radius: 16px; border: 1px solid var(--ac-line);
    background: var(--ac-soft); color: var(--ac);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.doc-hero__badge .ico { width: 26px; height: 26px; }
.doc-group + .doc-group { margin-top: 40px; padding-top: 34px; border-top: 1px solid var(--line); }
.doc-group__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 26px 0 16px; }
.doc-group:first-of-type .doc-group__head { margin-top: 30px; }
.doc-group__head h2 { font-size: clamp(1.1rem, 2vw, 1.4rem); font-weight: 800; letter-spacing: -0.2px; }
.doc-group__head span { font-size: 0.68rem; color: var(--muted-dim); white-space: nowrap; }
.path .doc-item__meta { color: var(--muted-dim); font-size: 0.64rem; }
.doc-group .paths { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.console {
    position: relative; border-radius: 20px; overflow: hidden;
    border: 1px solid rgba(167, 139, 250, 0.2);
    background: linear-gradient(160deg, rgba(22, 14, 40, 0.9), rgba(7, 3, 15, 0.96));
    box-shadow: 0 34px 90px rgba(3, 1, 10, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.console__bar { display: flex; align-items: center; gap: 6px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.console__bar i { width: 8px; height: 8px; border-radius: 50%; background: rgba(167, 139, 250, 0.25); }
.console__bar i:nth-child(1) { background: rgba(248, 113, 113, 0.55); }
.console__bar i:nth-child(2) { background: rgba(251, 191, 36, 0.55); }
.console__bar i:nth-child(3) { background: rgba(52, 211, 153, 0.55); }
.console__bar span { margin-inline-start: auto; font-family: var(--latin); font-size: 0.62rem; color: var(--muted-dim); direction: ltr; }
.console__body { padding: 20px; font-family: var(--latin); font-size: 0.72rem; line-height: 2.1; direction: ltr; text-align: left; color: #A5B4FC; }
.console__body .c-key { color: #F0ABFC; }
.console__body .c-str { color: #6EE7B7; }
.console__body .c-mut { color: #6B7280; }
.console__body .c-accent { color: #67E8F9; }

/* ---------- Search page ---------- */
.search-page { padding-top: calc(var(--nav-h) + 42px); }
.search-page__form { margin-top: 22px; max-width: 720px; }
.search-page__meta { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 26px 0 18px; font-size: 0.76rem; color: var(--muted); }
.search-page__meta strong { color: var(--text); }
.search-list { display: grid; gap: 10px; max-width: 900px; }
.result-row {
    display: flex; align-items: flex-start; gap: 14px;
    padding: 16px 18px; border-radius: 14px;
    border: 1px solid var(--line); background: rgba(23, 15, 43, 0.4);
    transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s var(--ease);
}
.result-row:hover { border-color: var(--ac-line); background: var(--ac-soft); transform: translateY(-2px); }
.result-row__icon { width: 38px; height: 38px; flex-shrink: 0; display: grid; place-items: center; border-radius: 11px; border: 1px solid var(--ac-line); background: var(--ac-soft); color: var(--ac); }
.result-row__icon .ico { width: 18px; height: 18px; }
.result-row__body { min-width: 0; flex: 1; }
.result-row__top { display: flex; align-items: center; gap: 8px; font-size: 0.62rem; }
.result-row__type { padding: 2px 7px; border-radius: 5px; border: 1px solid var(--ac-line); color: var(--ac); }
.result-row__cat { color: var(--muted-dim); }
.result-row__body strong { display: block; margin-top: 5px; font-size: 0.9rem; }
.result-row__body p { margin-top: 2px; font-size: 0.74rem; line-height: 1.85; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.result-row__go { align-self: center; color: var(--muted); }
.result-row__go .ico { width: 16px; height: 16px; }
.result-row:hover .result-row__go { color: var(--primary-pale); }
mark { background: rgba(251, 191, 36, 0.22); color: #FDE68A; border-radius: 3px; padding: 0 2px; }

/* ---------- CTA band ---------- */
.cta-band {
    position: relative; overflow: hidden;
    margin: clamp(40px, 6vw, 76px) auto 0;
    padding: clamp(30px, 4.4vw, 52px);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(167, 139, 250, 0.22);
    background:
        radial-gradient(60% 140% at 90% 0%, rgba(167, 139, 250, 0.18), transparent 60%),
        linear-gradient(135deg, rgba(32, 20, 58, 0.72), rgba(9, 5, 19, 0.9));
    display: flex; align-items: center; justify-content: space-between; gap: 26px;
    box-shadow: 0 30px 80px rgba(3, 1, 10, 0.4);
}
.cta-band::before {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(340px circle at var(--px, 84%) var(--py, 0%), rgba(255, 255, 255, 0.08), transparent 62%);
    opacity: 0; transition: opacity 0.4s ease;
}
.cta-band:hover::before { opacity: 1; }
.cta-band::after { content: ''; position: absolute; width: 300px; height: 300px; border-radius: 50%; border: 1px solid rgba(167, 139, 250, 0.2); top: -150px; inset-inline-start: -80px; box-shadow: 0 0 90px rgba(139, 92, 246, 0.18); }
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 { font-size: clamp(1.2rem, 2.3vw, 1.7rem); font-weight: 800; line-height: 1.6; }
.cta-band p { margin-top: 6px; color: var(--muted); font-size: 0.82rem; max-width: 52ch; }
.cta-band__actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.footer { position: relative; z-index: 2; overflow: hidden; margin-top: clamp(60px, 8vw, 110px); border-top: 1px solid var(--line); background: rgba(7, 3, 15, 0.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.footer__watermark {
    position: absolute; bottom: -0.22em; left: 50%; transform: translateX(-50%);
    font-family: var(--latin); font-size: clamp(7rem, 19vw, 16rem); font-weight: 700; line-height: 1;
    letter-spacing: -0.05em; white-space: nowrap; pointer-events: none; user-select: none;
    color: transparent; -webkit-text-stroke: 1px rgba(167, 139, 250, 0.09);
}
.footer .shell { position: relative; z-index: 1; }
.footer__top { display: grid; grid-template-columns: 1.3fr repeat(3, 0.8fr); gap: 34px; padding: 48px 0 34px; }
.footer__brand p { margin-top: 14px; max-width: 34ch; font-size: 0.76rem; line-height: 2; color: var(--muted); }
.footer__social { display: flex; gap: 8px; margin-top: 16px; }
.footer__social a { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); color: var(--muted); transition: all 0.25s ease; }
.footer__social a:hover { color: var(--text); border-color: var(--line-strong); background: rgba(139, 92, 246, 0.1); transform: translateY(-2px); }
.footer__social .ico { width: 16px; height: 16px; }
.footer__col { display: flex; flex-direction: column; align-items: flex-start; gap: 9px; }
.footer__col h3 { font-size: 0.74rem; color: var(--text); margin-bottom: 3px; }
.footer__col a { font-size: 0.73rem; color: var(--muted); line-height: 1.7; transition: color 0.2s ease; }
.footer__col a:hover { color: var(--primary-pale); }
.footer__all { display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; color: var(--primary-pale) !important; }
.footer__all .ico { width: 13px; height: 13px; }
.footer__bottom { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; padding: 18px 0 24px; border-top: 1px solid rgba(167, 139, 250, 0.1); font-size: 0.68rem; color: var(--muted-dim); }
.footer__note { color: var(--muted-dim); }

.to-top {
    position: fixed; bottom: 24px; inset-inline-start: 24px; z-index: 90;
    width: 42px; height: 42px; display: grid; place-items: center;
    border-radius: 12px; border: 1px solid var(--line);
    background: rgba(15, 9, 30, 0.82); color: var(--muted);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    opacity: 0; visibility: hidden; transform: translateY(10px);
    transition: all 0.3s var(--ease);
}
.to-top.is-on { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { color: #fff; border-color: var(--line-strong); background: rgba(139, 92, 246, 0.18); }
.to-top .ico { width: 18px; height: 18px; transform: rotate(180deg); }

/* ---------- Search modal ---------- */
.search-modal { position: fixed; inset: 0; z-index: 300; display: flex; align-items: flex-start; justify-content: center; padding: 8vh 20px 20px; }
.search-modal[hidden] { display: none; }
.search-modal__backdrop { position: absolute; inset: 0; background: rgba(3, 1, 8, 0.72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); animation: fadeIn 0.25s ease; }
.search-modal__panel {
    position: relative; width: min(680px, 100%);
    border-radius: 20px; border: 1px solid rgba(167, 139, 250, 0.28);
    background: linear-gradient(180deg, rgba(24, 15, 44, 0.98), rgba(10, 6, 21, 0.99));
    box-shadow: 0 40px 120px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    overflow: hidden;
    animation: modalIn 0.32s var(--ease);
}
@keyframes fadeIn { from { opacity: 0; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(-14px) scale(0.98); } }
.search-modal__head { display: flex; align-items: center; gap: 12px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.search-modal__head > .ico { width: 20px; height: 20px; color: var(--primary-soft); flex-shrink: 0; }
.search-modal__head input { flex: 1; min-width: 0; height: 36px; background: transparent; border: 0; outline: 0; color: var(--text); font-family: var(--font); font-size: 0.95rem; }
.search-modal__head input::placeholder { color: var(--muted-dim); }
.search-modal__close { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; border: 1px solid var(--line); color: var(--muted); }
.search-modal__close:hover { color: var(--text); border-color: var(--line-strong); }
.search-modal__close .ico { width: 16px; height: 16px; }
.search-modal__body { max-height: min(56vh, 440px); overflow-y: auto; padding: 14px; }
.search-hints { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; padding: 2px 4px 10px; }
.search-hints > span { font-size: 0.66rem; color: var(--muted-dim); margin-inline-end: 3px; }
.search-hints button { padding: 5px 10px; border-radius: 7px; border: 1px solid var(--line); background: rgba(23, 15, 43, 0.5); color: var(--muted); font-size: 0.68rem; }
.search-hints button:hover { color: var(--text); border-color: var(--line-strong); }
.search-results { display: grid; gap: 6px; }
.search-result { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 11px; border: 1px solid transparent; }
.search-result:hover, .search-result.is-focused { border-color: var(--ac-line); background: var(--ac-soft); }
.search-result__icon { width: 32px; height: 32px; flex-shrink: 0; display: grid; place-items: center; border-radius: 9px; border: 1px solid var(--ac-line); background: var(--ac-soft); color: var(--ac); }
.search-result__icon .ico { width: 15px; height: 15px; }
.search-result__body { min-width: 0; flex: 1; }
.search-result__body strong { display: block; font-size: 0.8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-result__body small { display: block; font-size: 0.64rem; color: var(--muted-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-result__type { font-size: 0.6rem; padding: 2px 6px; border-radius: 5px; border: 1px solid var(--ac-line); color: var(--ac); flex-shrink: 0; }
.search-empty { padding: 34px 20px; text-align: center; }
.search-empty strong { display: block; font-size: 0.95rem; }
.search-empty p { margin: 6px 0 14px; font-size: 0.76rem; color: var(--muted); }
.search-modal__foot { display: flex; align-items: center; gap: 16px; padding: 10px 18px; border-top: 1px solid var(--line); font-size: 0.65rem; color: var(--muted-dim); }
.search-modal__foot span { display: inline-flex; align-items: center; gap: 5px; }
.search-modal__foot a { margin-inline-start: auto; color: var(--primary-pale); }
.search-modal kbd { font-family: var(--latin); font-size: 0.6rem; padding: 2px 5px; border-radius: 5px; border: 1px solid var(--line); background: rgba(167, 139, 250, 0.07); }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- Utilities ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }
.empty-state { padding: 50px 20px; text-align: center; border: 1px dashed var(--line-strong); border-radius: var(--radius); color: var(--muted); }

/* ---------- Taxonomy: archives & hubs ---------- */
.arch-hero { position: relative; padding-top: calc(var(--nav-h) + 48px); }
.arch-hero__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 38px; align-items: center; }
.arch-hero h1 { margin-top: 12px; font-size: clamp(1.9rem, 4.2vw, 3rem); font-weight: 800; line-height: 1.42; letter-spacing: -0.6px; }
.arch-hero__lead { margin-top: 14px; max-width: 58ch; color: var(--muted); font-size: 0.94rem; line-height: 2.05; }
.arch-hero__meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.arch-hero__search { margin-top: 24px; max-width: 480px; }
.cat-about { padding: clamp(22px, 3vw, 34px); border-radius: 22px; border: 1px solid var(--line); background: linear-gradient(150deg, var(--ac-soft), rgba(17, 11, 32, 0.72) 55%); }
.cat-about__head { margin-bottom: 22px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.cat-about .section-title { margin-top: 8px; }
.cat-about .prose { max-width: 78ch; }
.cat-about .prose > :first-child { margin-top: 0; }

.meta-pill {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 7px 13px; border-radius: 999px;
    border: 1px solid var(--line); background: rgba(23, 15, 43, 0.45);
    color: var(--muted); font-size: 0.72rem;
}
.meta-pill .ico { width: 14px; height: 14px; color: var(--primary-soft); }
.meta-pill--link { transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease; }
.meta-pill--link:hover { color: var(--text); border-color: var(--line-strong); background: rgba(139, 92, 246, 0.1); }

/* Category tiles */
.cat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.cat-card {
    position: relative; display: flex; flex-direction: column; gap: 10px;
    padding: 22px; border-radius: var(--radius);
    border: 1px solid var(--line);
    background: linear-gradient(150deg, rgba(27, 18, 49, 0.62), rgba(12, 7, 24, 0.8));
    overflow: hidden;
    transition: transform 0.4s var(--ease), border-color 0.4s ease, box-shadow 0.4s ease;
}
.cat-card::before {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background:
        radial-gradient(240px circle at var(--px, 88%) var(--py, 0%), rgba(255, 255, 255, 0.09), transparent 60%),
        radial-gradient(90% 120% at 100% 0%, var(--ac-soft), transparent 58%);
    opacity: 0.6; transition: opacity 0.4s ease;
}
.cat-card:hover { transform: translateY(-4px); border-color: var(--ac-line); box-shadow: 0 26px 60px rgba(3, 1, 10, 0.45), 0 0 40px -16px var(--ac); }
.cat-card:hover::before { opacity: 1; }
.cat-card > * { position: relative; z-index: 1; }
.cat-card__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cat-card__mark {
    width: 38px; height: 38px; display: grid; place-items: center;
    border-radius: 11px; border: 1px solid var(--ac-line);
    background: var(--ac-soft); color: var(--ac);
}
.cat-card__mark .ico { width: 17px; height: 17px; }
.cat-card__count { display: inline-flex; align-items: baseline; gap: 5px; font-family: var(--latin); font-size: 1.35rem; font-weight: 600; color: var(--ac); }
.cat-card__count small { font-family: var(--font); font-size: 0.66rem; font-weight: 500; color: var(--muted-dim); }
.cat-card h3 { font-size: 1.02rem; font-weight: 700; }
.cat-card p { flex: 1; font-size: 0.78rem; line-height: 1.95; color: var(--muted); }
.cat-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 12px; border-top: 1px solid rgba(167, 139, 250, 0.09); }
.cat-card__date { font-size: 0.67rem; color: var(--muted-dim); }
.cat-card__go { display: inline-flex; align-items: center; gap: 5px; font-size: 0.72rem; font-weight: 600; color: var(--primary-pale); }
.cat-card__go .ico { width: 14px; height: 14px; transition: transform 0.3s var(--ease); }
.cat-card:hover .cat-card__go .ico { transform: translateX(-3px); }

/* Tag cloud */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-cloud--lg { gap: 10px; }
.tag-pill {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 7px 13px; border-radius: 999px;
    border: 1px solid var(--line); background: rgba(23, 15, 43, 0.45);
    color: var(--muted); font-size: 0.74rem;
    transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease, transform 0.25s var(--ease);
}
.tag-cloud--lg .tag-pill { padding: 9px 16px; font-size: 0.78rem; }
.tag-pill strong { font-family: var(--latin); font-size: 0.63rem; font-weight: 600; padding: 1px 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.06); color: var(--muted-dim); }
.tag-pill:hover { color: var(--text); border-color: var(--line-strong); background: rgba(139, 92, 246, 0.1); transform: translateY(-2px); }
.tag-pill--hot { color: var(--primary-pale); border-color: rgba(167, 139, 250, 0.34); background: rgba(139, 92, 246, 0.1); }
.tag-pill--hot strong { color: var(--primary-pale); background: rgba(255, 255, 255, 0.1); }

a.tag:hover { color: var(--text); border-color: var(--line-strong); background: rgba(139, 92, 246, 0.1); }
a.post-card__cat:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

/* Blog landing */
.hero--blog { padding-bottom: clamp(20px, 3vw, 32px); }
.blog-search__hint { margin-top: 10px; font-size: 0.72rem; color: var(--muted-dim); }
.blog-count {
    display: inline-flex; align-items: center; flex-shrink: 0;
    font-family: var(--latin); font-size: 0.74rem; color: var(--muted-dim);
    padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line);
}

/* ---------- Responsive ---------- */
@media (max-width: 1120px) {
    .doc-layout { grid-template-columns: 230px minmax(0, 1fr); }
    .doc-toc { display: none; }
    .article-layout { grid-template-columns: minmax(0, 1fr) 230px; gap: 32px; }
}

@media (max-width: 980px) {
    .nav__links { display: none; }
    .burger { display: block; }
    .nav__search span, .nav__kbd { display: none; }
    .nav__search { width: 38px; padding: 0; justify-content: center; }
    .nav__panel { display: none; }
    .hero__stats { gap: 18px; }
    .hero__stat + .hero__stat { padding-inline-start: 18px; margin-inline-start: 0; }
    .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .post-feature { grid-template-columns: 1fr; }
    .post-feature__art { min-height: 230px; border-inline-start: 0; border-bottom: 1px solid var(--line); }
    .paths { grid-template-columns: 1fr; }
    .paths--single { max-width: none; }
    .doc-group .paths { grid-template-columns: 1fr; }
    .docs-hero__grid { grid-template-columns: 1fr; }
    .arch-hero__grid { grid-template-columns: 1fr; }
    .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .console { order: -1; }
    .article-layout { grid-template-columns: 1fr; }
    .article-toc { order: -1; padding-top: calc(var(--nav-h) + 22px); }
    .article-toc__inner { position: static; }
    .article-layout:not(.article-layout--wide) .article-head { padding-top: 18px; }
    .article { max-width: none; }
    .footer__top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
    .doc-layout { grid-template-columns: 1fr; }
    .doc-toc { order: -1; position: static; display: block; margin-bottom: 18px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: rgba(23, 15, 43, 0.5); }
    .doc-side { position: static; max-height: none; display: none; margin-bottom: 6px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(16, 10, 30, 0.6); }
    .doc-side.is-open { display: block; }
    .doc-nav-mobile { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 16px; padding: 9px 13px; border-radius: 10px; border: 1px solid var(--line); background: rgba(23, 15, 43, 0.5); font-size: 0.76rem; color: var(--muted); }
    .doc-nav-mobile .ico { width: 16px; height: 16px; color: var(--primary-soft); }
}

@media (max-width: 760px) {
    .shell { width: calc(100% - 32px); }
    .nav__inner { width: calc(100% - 32px); }
    .hero { padding-top: calc(var(--nav-h) + 44px); }
    .hero h1 { font-size: clamp(1.9rem, 8vw, 2.6rem); }
    .searchbar .btn span { display: none; }
    .searchbar .btn { width: 46px; padding: 0; }
    .section-head { flex-direction: column; align-items: flex-start; gap: 14px; }
    .post-grid, .post-grid--two, .product-grid, .related-grid, .cat-grid { grid-template-columns: 1fr; }
    .arch-hero { padding-top: calc(var(--nav-h) + 34px); }
    .arch-hero .console { display: none; }
    .arch-hero__search { max-width: none; }
    .post-feature__body { padding: 22px; }
    .page-head__search { width: 100%; }
    .filters { gap: 6px; }
    .filter { height: 34px; padding: 0 12px; font-size: 0.7rem; }
    .filters__sort { display: none; }
    .docs-hero { padding-top: calc(var(--nav-h) + 34px); }
    .console__body { font-size: 0.64rem; padding: 16px; }
    .flow { flex-wrap: wrap; gap: 14px; }
    .flow__line { display: none; }
    .flow__step { flex: 0 0 calc(50% - 8px); }
    .footer__top { grid-template-columns: 1fr; gap: 26px; padding-top: 34px; }
    .footer__bottom { flex-direction: column; align-items: flex-start; gap: 6px; }
    .cta-band { flex-direction: column; align-items: flex-start; }
    .article-head { padding-top: calc(var(--nav-h) + 28px); }
    .article-meta__spacer { display: none; }
    .article-meta__share { width: 100%; }
    .doc-pager { grid-template-columns: 1fr; }
    .doc-pager a.next { text-align: right; align-items: flex-start; }
    .search-modal { padding-top: 4vh; }
    .search-modal__foot span:nth-child(2) { display: none; }
    .prose { font-size: 0.97rem; }
    .prose .lead { font-size: 1.02rem; }
    .to-top { bottom: 16px; inset-inline-start: 16px; }
}

@media (max-width: 480px) {
    .brand__text small { display: none; }
    .hero__badge { font-size: 0.68rem; }
    .hero__chips { gap: 6px; }
    .hero__stats { gap: 12px; }
    .hero__stat + .hero__stat { padding-inline-start: 12px; }
    .hero__stat strong { font-size: 1.15rem; }
    .post-card__art { height: 150px; }
    .article-cover__chapter { font-size: 6rem; }
    .code code { font-size: 0.72rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
    .reveal { opacity: 1; transform: none; }
}

/* ---------- API docs ---------- */
.api-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.api-link {
    display: flex; align-items: center; gap: 12px; padding: 14px 16px;
    border-radius: 14px; border: 1px solid var(--line); background: rgba(23, 15, 43, 0.38);
    transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s var(--ease);
}
.api-link:hover { border-color: var(--ac-line); background: var(--ac-soft); transform: translateY(-2px); }
.api-link .ico { width: 20px; height: 20px; color: var(--ac); flex-shrink: 0; }
.api-link span { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.api-link strong { font-size: 0.78rem; line-height: 1.6; word-break: break-word; }
.api-link small { font-size: 0.64rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.page-api-docs .doc-layout { grid-template-columns: 250px minmax(0, 1fr); }
.page-api-docs .doc-head h1 { letter-spacing: -0.2px; }
.page-api-docs .prose h3 { margin-top: 26px; }
.page-api-docs .prose table code { white-space: nowrap; }
.page-api-docs .code + .code { margin-top: 12px; }
@media (max-width: 1120px) {
    .page-api-docs .doc-layout { grid-template-columns: 230px minmax(0, 1fr); }
}
@media (max-width: 900px) {
    .page-api-docs .doc-layout { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
    .api-links { grid-template-columns: 1fr; }
    .page-api-docs .prose table code { white-space: normal; }
}

/* Blog pagination */
.blog-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 38px;
}
.blog-pager__pages { display: flex; align-items: center; gap: 6px; }
.blog-pager__num,
.blog-pager__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 40px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--muted);
    font-size: 0.78rem;
    transition: border-color 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease);
}
.blog-pager__num { min-width: 40px; font-family: var(--latin); }
.blog-pager__num:hover,
.blog-pager__btn:hover { color: var(--text); border-color: var(--line-strong); background: rgba(139, 92, 246, 0.1); }
.blog-pager__num[aria-current="page"] {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, #8B5CF6, #40D2FF);
    cursor: default;
}
.blog-pager__btn.is-disabled { opacity: 0.35; pointer-events: none; }
.blog-pager .ico { width: 15px; height: 15px; }
@media (max-width: 600px) {
    .blog-pager__num,
    .blog-pager__btn { height: 36px; padding: 0 11px; }
    .blog-pager__btn { font-size: 0.72rem; }
}

/* ============================================================
   ERROR PAGES — 400 / 401 / 403 / 404 / 405 / 429 / 500 / 503
   ============================================================ */
.err {
    position: relative;
    padding: calc(var(--nav-h) + clamp(24px, 4vw, 54px)) 0 clamp(28px, 4vw, 54px);
    overflow: clip;
}

.err__aurora {
    position: absolute;
    inset: -22% -14% auto;
    height: min(740px, 96vw);
    pointer-events: none;
    background:
        radial-gradient(46% 58% at 20% 28%, var(--ac-soft) 0%, transparent 70%),
        radial-gradient(38% 48% at 82% 14%, rgba(64, 210, 255, 0.1) 0%, transparent 72%),
        radial-gradient(30% 40% at 58% 62%, rgba(196, 103, 255, 0.09) 0%, transparent 75%);
    filter: blur(6px);
    opacity: 0.95;
}

.err__grid {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.92fr);
    gap: clamp(28px, 4.5vw, 62px);
    align-items: center;
}

.err__copy { position: relative; z-index: 1; }

.err__eyebrow { margin-top: 18px; }

.err__code-wrap {
    position: relative;
    width: fit-content;
    margin: 14px 0 4px;
    isolation: isolate;
}

.err__ring {
    position: absolute;
    inset: -26% -18%;
    border-radius: 50%;
    border: 1px dashed var(--ac-line);
    transform: rotate(-12deg) skewX(-6deg);
    opacity: 0.55;
    animation: err-spin 34s linear infinite;
    z-index: -1;
}

.err__ring::after {
    content: "";
    position: absolute;
    inset: 14%;
    border-radius: 50%;
    border: 1px solid var(--ac-line);
    opacity: 0.6;
}

@keyframes err-spin {
    to { transform: rotate(348deg) skewX(-6deg); }
}

.err__code {
    display: block;
    font-family: var(--latin);
    font-size: clamp(76px, 11.5vw, 158px);
    font-weight: 700;
    line-height: 0.82;
    letter-spacing: -0.06em;
    background: linear-gradient(150deg, var(--ac) 0%, #8D94FF 46%, #C467FF 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.07);
    filter: drop-shadow(0 22px 46px rgba(3, 1, 10, 0.55));
}

.err__title {
    margin: 14px 0 12px;
    font-size: clamp(1.55rem, 3.1vw, 2.35rem);
    font-weight: 800;
    line-height: 1.5;
    letter-spacing: -0.3px;
}

.err__lead {
    max-width: 56ch;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 2;
}

.err__hint {
    margin-top: 8px;
    max-width: 56ch;
    color: var(--muted-dim);
    font-size: 0.84rem;
    line-height: 1.95;
}

.err__search {
    margin-top: 22px;
    max-width: 540px;
}

.err__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

.err__actions .btn { flex-shrink: 0; }

.err__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 24px;
}

.err__chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 13px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 9, 30, 0.45);
    color: var(--muted);
    font-size: 0.68rem;
    line-height: 1.2;
}

.err__chip .ico {
    width: 14px;
    height: 14px;
    color: var(--ac);
}

.err__chip--wide { border-color: var(--ac-line); }

.err__panel {
    position: relative;
    z-index: 1;
}

.err__console {
    position: relative;
    box-shadow: 0 30px 80px rgba(3, 1, 10, 0.62);
    border-color: var(--ac-line);
    background:
        linear-gradient(180deg, rgba(30, 19, 56, 0.9) 0%, rgba(11, 6, 23, 0.94) 100%);
}

.err__console::before {
    content: "";
    position: absolute;
    inset: -18% -12% auto auto;
    width: 62%;
    height: 62%;
    border-radius: 50%;
    background: var(--ac-soft);
    filter: blur(46px);
    z-index: -1;
    opacity: 0.85;
}

.err__console .console__body {
    min-height: 196px;
    padding: 22px 20px;
    font-size: 0.73rem;
    line-height: 2.15;
}

.err__line.is-cmd { color: #C4B5FD; }
.err__line.is-comment { color: var(--muted-dim); }
.err__line.is-out { color: var(--ac); }

.err__term {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 18px;
    border-top: 1px solid var(--line);
    font-family: var(--latin);
    font-size: 0.62rem;
    color: var(--muted-dim);
    direction: ltr;
}

.err__term > span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.err__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--ac);
    box-shadow: 0 0 12px var(--ac);
}

.err__note {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-top: 14px;
    padding: 13px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: rgba(15, 9, 30, 0.46);
}

.err__note .ico {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
    margin-top: 4px;
    color: var(--primary-soft);
}

.err__note p {
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.9;
}

.err__suggest { padding-top: clamp(28px, 4vw, 46px); }

@media (max-width: 980px) {
    .err__grid { grid-template-columns: 1fr; align-items: start; }
    .err__panel { margin-top: 4px; }
    .err__console .console__body { min-height: 0; }
}

@media (max-width: 600px) {
    .err { padding-top: calc(var(--nav-h) + 18px); }
    .err__code { font-size: clamp(68px, 22vw, 104px); }
    .err__actions .btn { width: 100%; justify-content: center; }
    .err__chip--wide { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .err__ring { animation: none; }
}

/* ============================================================
   REPORTAGE / ADVERTORIAL — /r and /r/{slug}
   Same royal-violet language as the rest of the site, raised one
   notch: poster-scale hero, brand lockup, spec chips and a sticky
   advertiser rail. The disclosure block is part of the design, not
   an afterthought — a paid page should look paid.
   ============================================================ */

.rep-hero {
    position: relative;
    overflow: clip;
    padding-top: calc(var(--nav-h) + 54px);
    padding-bottom: clamp(34px, 5vw, 62px);
    border-bottom: 1px solid var(--line);
    background:
        radial-gradient(120% 90% at 88% -10%, color-mix(in srgb, var(--ac) 16%, transparent) 0%, transparent 58%),
        linear-gradient(180deg, rgba(139, 92, 246, 0.07) 0%, transparent 70%);
}

.rep-hero__aura {
    position: absolute;
    inset-inline-end: -140px;
    inset-block-start: -80px;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--ac) 34%, transparent) 0%, transparent 66%);
    filter: blur(26px);
    opacity: 0.65;
    pointer-events: none;
}

.rep-hero__mesh {
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 74px),
        repeating-linear-gradient(0deg, var(--line) 0 1px, transparent 1px 74px);
    mask-image: radial-gradient(78% 62% at 78% 8%, #000 0%, transparent 72%);
    opacity: 0.5;
    pointer-events: none;
}

.rep-hero__orbit {
    position: absolute;
    inset-inline-end: clamp(-180px, -14vw, -60px);
    inset-block-start: clamp(30px, 8vw, 90px);
    width: min(420px, 46vw);
    aspect-ratio: 1;
    pointer-events: none;
}
.rep-hero__orbit i {
    position: absolute;
    inset: 0;
    border: 1px solid color-mix(in srgb, var(--ac) 32%, transparent);
    border-radius: 50%;
    animation: rep-orbit 26s linear infinite;
}
.rep-hero__orbit i:nth-child(2) { inset: 13%; opacity: 0.72; animation-duration: 19s; animation-direction: reverse; }
.rep-hero__orbit i:nth-child(3) { inset: 27%; opacity: 0.5; animation-duration: 31s; }
.rep-hero__orbit i::after {
    content: '';
    position: absolute;
    inset-inline-start: 50%;
    inset-block-start: -4px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ac);
    box-shadow: 0 0 16px var(--ac);
}

@keyframes rep-orbit { to { transform: rotate(360deg); } }

.rep-hero__inner { position: relative; z-index: 1; max-width: min(1000px, 100%); }

.rep-topline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
    margin-top: 26px;
}

.rep-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--gold, #FBBF24) 46%, transparent);
    background: color-mix(in srgb, var(--gold, #FBBF24) 12%, transparent);
    color: var(--gold, #FBBF24);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.2px;
}
.rep-badge .ico { width: 14px; height: 14px; }

.rep-dates { display: inline-flex; flex-wrap: wrap; gap: 8px 16px; font-size: 0.72rem; color: var(--muted-dim); }
.rep-dates span { display: inline-flex; align-items: center; gap: 5px; }
.rep-dates .ico { width: 13px; height: 13px; }

.rep-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 24px;
    padding: 14px 18px;
    width: fit-content;
    max-width: 100%;
    border-radius: var(--radius);
    border: 1px solid var(--line-strong);
    background: var(--surface);
    backdrop-filter: var(--glass-blur);
    box-shadow: var(--shadow-1);
}
.rep-brand__logo {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    border-radius: 14px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--line);
}
.rep-brand__logo img { width: 100%; height: 100%; object-fit: contain; }
.rep-brand__logo--mono {
    font-family: var(--latin);
    font-size: 1.16rem;
    font-weight: 700;
    color: #0b0614;
    background: var(--grad-brand);
    border: none;
}
.rep-brand__logo--mark { background: rgba(255, 255, 255, 0.06); }
.rep-brand__logo--mark svg { width: 58%; height: 58%; }
.rep-brand__text { display: flex; flex-direction: column; gap: 2px; }
.rep-brand__text strong { font-size: 0.94rem; font-weight: 800; }
.rep-brand__text a { font-family: var(--latin); font-size: 0.72rem; color: var(--ac); }
.rep-brand__text a:hover { color: var(--text); }

.rep-title {
    margin-top: 26px;
    font-size: clamp(2.05rem, 5.4vw, 3.9rem);
    font-weight: 800;
    line-height: 1.32;
    letter-spacing: -0.9px;
    max-width: 24ch;
    background: linear-gradient(180deg, #fff 0%, #cfc4ea 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.rep-lead {
    margin-top: 16px;
    max-width: 62ch;
    font-size: clamp(0.96rem, 1.35vw, 1.1rem);
    line-height: 2.1;
    color: var(--muted);
}

.rep-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 26px;
    list-style: none;
}
.rep-facts li {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 132px;
    padding: 12px 16px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: var(--surface-2);
}
.rep-facts span { font-size: 0.68rem; color: var(--muted-dim); }
.rep-facts strong { font-size: 0.88rem; font-weight: 800; color: var(--ac); }

.rep-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 30px; }

.rep-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 13px 22px;
    border-radius: 14px;
    font-size: 0.86rem;
    font-weight: 800;
    transition: transform 0.25s var(--ease), box-shadow 0.25s ease, border-color 0.25s ease;
}
.rep-btn .ico { width: 16px; height: 16px; }
.rep-btn--primary {
    color: #0b0614;
    background: var(--grad-brand);
    box-shadow: 0 16px 40px color-mix(in srgb, var(--ac) 34%, transparent);
}
.rep-btn--primary:hover { transform: translateY(-2px); color: #0b0614; box-shadow: 0 20px 52px color-mix(in srgb, var(--ac) 46%, transparent); }
.rep-btn--block { width: 100%; justify-content: center; }

.rep-scroll { display: inline-flex; align-items: center; gap: 7px; font-size: 0.78rem; color: var(--muted); }
.rep-scroll .ico { width: 15px; height: 15px; transform: rotate(90deg); }
.rep-scroll:hover { color: var(--primary-pale); }

.rep-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 306px;
    gap: 46px;
    align-items: start;
    padding-top: clamp(30px, 4vw, 52px);
    padding-bottom: 56px;
}
.rep-article { min-width: 0; max-width: 830px; }

.rep-box {
    position: relative;
    overflow: clip;
    margin-top: 44px;
    padding: clamp(22px, 3vw, 34px);
    border-radius: var(--radius-lg);
    border: 1px solid var(--line-strong);
    background: var(--surface-2);
    box-shadow: var(--shadow-1);
}
.rep-box__glow {
    position: absolute;
    inset-inline-end: -70px;
    inset-block-start: -70px;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--ac) 40%, transparent) 0%, transparent 70%);
    filter: blur(14px);
}
.rep-box__kicker { position: relative; font-size: 0.7rem; font-weight: 700; color: var(--ac); }
.rep-box h2 { position: relative; margin-top: 10px; font-size: clamp(1.16rem, 2.1vw, 1.5rem); line-height: 1.6; color: #fff; }
.rep-box p { position: relative; margin-top: 10px; font-size: 0.84rem; line-height: 2; color: var(--muted); max-width: 58ch; }
.rep-box .rep-btn { position: relative; margin-top: 18px; }

.rep-disclosure {
    margin-top: 38px;
    padding: 20px 22px;
    border-radius: var(--radius);
    border: 1px dashed var(--line-strong);
    background: rgba(155, 147, 179, 0.05);
}
.rep-disclosure h2 { display: flex; align-items: center; gap: 8px; font-size: 0.84rem; color: var(--text); }
.rep-disclosure h2 .ico { width: 16px; height: 16px; color: var(--ac); }
.rep-disclosure p { margin-top: 10px; font-size: 0.78rem; line-height: 2.05; color: var(--muted); }
.rep-disclosure code { font-family: var(--latin); font-size: 0.74rem; color: var(--primary-pale); }
.rep-disclosure a { display: inline-flex; align-items: center; gap: 7px; margin-top: 12px; font-size: 0.76rem; color: var(--ac); }
.rep-disclosure a .ico { width: 14px; height: 14px; }

.rep-rail { position: sticky; top: calc(var(--nav-h) + 20px); }
.rep-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--surface);
    backdrop-filter: var(--glass-blur);
}
.rep-card__head { display: flex; align-items: center; gap: 11px; }
.rep-card__head strong { font-size: 0.86rem; }
.rep-card__facts { display: flex; flex-direction: column; gap: 9px; }
.rep-card__facts div { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.rep-card__facts div:last-child { padding-bottom: 0; border-bottom: none; }
.rep-card__facts dt { font-size: 0.7rem; color: var(--muted-dim); }
.rep-card__facts dd { font-size: 0.76rem; font-weight: 700; color: var(--text); text-align: end; }
.rep-card__site { font-family: var(--latin); font-size: 0.72rem; color: var(--muted); text-align: center; }
.rep-card__site:hover { color: var(--ac); }
.rep-card__note { font-size: 0.66rem; line-height: 1.9; color: var(--muted-dim); text-align: center; }

/* ---------- /r index ---------- */

.rep-archive { padding-top: clamp(26px, 4vw, 44px); padding-bottom: 64px; }
.rep-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
    gap: 20px;
}
.rep-tile {
    display: flex;
    flex-direction: column;
    gap: 11px;
    padding: 20px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--surface);
    transition: transform 0.3s var(--ease), border-color 0.3s ease, box-shadow 0.3s ease;
}
.rep-tile:hover {
    transform: translateY(-4px);
    border-color: var(--ac-line);
    box-shadow: 0 26px 60px rgba(3, 1, 10, 0.5);
}
.rep-tile__badge {
    align-self: flex-start;
    padding: 4px 11px;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--gold, #FBBF24) 44%, transparent);
    color: var(--gold, #FBBF24);
    font-size: 0.64rem;
    font-weight: 800;
}
.rep-tile__brand { display: flex; align-items: center; gap: 10px; font-size: 0.78rem; color: var(--muted); }
.rep-tile__brand img { width: 40px; height: 40px; border-radius: 12px; object-fit: contain; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); }
.rep-tile__mono {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    font-family: var(--latin);
    font-size: 1rem;
    font-weight: 700;
    color: #0b0614;
    background: var(--grad-brand);
}
.rep-tile__mark {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid var(--line-strong);
    background: rgba(255, 255, 255, 0.06);
}
.rep-tile__mark svg { width: 56%; height: 56%; }
.rep-tile__title { font-size: 1.04rem; font-weight: 800; line-height: 1.7; color: var(--text); }
.rep-tile__lead { font-size: 0.78rem; line-height: 2; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.rep-tile__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); font-size: 0.68rem; color: var(--muted-dim); }
.rep-tile__more { display: inline-flex; align-items: center; gap: 6px; color: var(--ac); }
.rep-tile__more .ico { width: 13px; height: 13px; }

@media (max-width: 1080px) {
    .rep-layout { grid-template-columns: minmax(0, 1fr) 264px; gap: 32px; }
}

@media (max-width: 980px) {
    .rep-layout { grid-template-columns: 1fr; }
    .rep-rail { position: static; }
    .rep-card { flex-direction: row; flex-wrap: wrap; align-items: center; }
    .rep-card__facts { flex: 1 1 240px; }
    .rep-hero__orbit { opacity: 0.5; }
    .rep-title { max-width: none; }
}

@media (max-width: 600px) {
    .rep-hero { padding-top: calc(var(--nav-h) + 26px); }
    .rep-brand { width: 100%; }
    .rep-facts li { flex: 1 1 calc(50% - 5px); min-width: calc(50% - 5px); }
    .rep-actions { gap: 12px 16px; }
    .rep-btn--primary { width: 100%; justify-content: center; }
    .rep-card { flex-direction: column; align-items: stretch; }
    .rep-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .rep-hero__orbit i { animation: none; }
    .rep-tile, .rep-btn--primary { transition: none; }
}

/* Editor block alignment (class based so the sanitiser keeps it on save). */
.prose .align-start { text-align: start; }
.prose .align-center { text-align: center; }
.prose .align-end { text-align: end; }
