/* =====================================================================================================
   ATROPI — Foundation design system · WordPress theme base.css
   Ported 1:1 from the approved homepage (_build/parts/00-base.css): tokens (Day + Night) · reset · typography
   · layout · components · reveal system · global chrome. Sections 0 (fonts) and 17–19 (WordPress, languages,
   RTL) are theme additions. base-rtl.css is GENERATED from this file: after editing run `node tools/build.mjs`.
   Contract: THEME-CONTRACT.md (theme) + _build/FOUNDATION.md (design system).
   ===================================================================================================== */

/* ---------------------------------------------------------------- 0. FONTS (self-hosted, assets/fonts/*.woff2)
   Same files + descriptors Google Fonts served to the approved static page (variable woff2 declared per
   weight), so rendering is identical. Plus Jakarta Sans has no basic Cyrillic -> Manrope covers Russian
   (html[lang^="ru"] stack). Vazirmatn (Arabic + Latin) is the fa/ar stack. No requests to Google. */
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/plus-jakarta-sans-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/plus-jakarta-sans-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/plus-jakarta-sans-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url(../fonts/plus-jakarta-sans-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 800; font-display: swap; src: url(../fonts/plus-jakarta-sans-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/plus-jakarta-sans-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: 'Plus Jakarta Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/plus-jakarta-sans-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: 'Plus Jakarta Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/plus-jakarta-sans-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: 'Plus Jakarta Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url(../fonts/plus-jakarta-sans-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: 'Plus Jakarta Sans'; font-style: normal; font-weight: 800; font-display: swap; src: url(../fonts/plus-jakarta-sans-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: 'JetBrains Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/jetbrains-mono-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/jetbrains-mono-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/jetbrains-mono-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/jetbrains-mono-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/jetbrains-mono-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/jetbrains-mono-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/jetbrains-mono-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: 'JetBrains Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/jetbrains-mono-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: 'JetBrains Mono'; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/jetbrains-mono-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: 'Manrope'; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/manrope-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/manrope-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/manrope-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 700; font-display: swap; src: url(../fonts/manrope-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 800; font-display: swap; src: url(../fonts/manrope-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
/* fa · ar mono word space: JetBrains Mono's space is 0.6em, so Arabic-script words inside mono labels (eyebrows,
   proof labels, key-fact terms, card footers …) drift apart. This face lends Vazirmatn's space (0.27em) to the fa/ar
   mono stack (section 18) and nothing else; it carries JetBrains Mono's vertical metrics, so as the stack's primary
   font it leaves baselines and line boxes exactly where JetBrains Mono puts them. Glyphs: JetBrains / Vazirmatn. */
@font-face { font-family: 'Atropi Mono Space'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(../fonts/vazirmatn-latin.woff2) format('woff2'); unicode-range: U+0020, U+00A0; ascent-override: 102%; descent-override: 30%; line-gap-override: 0%; }
@font-face { font-family: 'Vazirmatn'; font-style: normal; font-weight: 400; 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, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC7, U+10EC9-10EEE, U+10EF0-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1; }
@font-face { font-family: 'Vazirmatn'; font-style: normal; font-weight: 500; 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, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC7, U+10EC9-10EEE, U+10EF0-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1; }
@font-face { font-family: 'Vazirmatn'; font-style: normal; font-weight: 600; 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, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC7, U+10EC9-10EEE, U+10EF0-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1; }
@font-face { font-family: 'Vazirmatn'; font-style: normal; font-weight: 700; 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, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC7, U+10EC9-10EEE, U+10EF0-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1; }
@font-face { font-family: 'Vazirmatn'; font-style: normal; font-weight: 800; 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, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC7, U+10EC9-10EEE, U+10EF0-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1; }
@font-face { font-family: 'Vazirmatn'; font-style: normal; font-weight: 400; 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: 'Vazirmatn'; font-style: normal; font-weight: 500; 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: 'Vazirmatn'; font-style: normal; font-weight: 600; 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: 'Vazirmatn'; font-style: normal; font-weight: 700; 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: 'Vazirmatn'; font-style: normal; font-weight: 800; 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; }


/* ---------------------------------------------------------------- 1. TOKENS — shared (theme-agnostic) */
:root {
  /* type */
  --font-sans: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  --fs-h1: clamp(44px, 6.2vw, 92px);
  --fs-h2: clamp(34px, 4.2vw, 60px);
  --fs-h3: clamp(20px, 1.6vw, 24px);
  --fs-lead: clamp(17px, 1.25vw, 20px);
  --fs-body: 16px;
  --fs-sm: 14px;
  --fs-xs: 12px;

  /* space scale (4px base) */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px;
  --s-7: 48px; --s-8: 64px; --s-9: 96px; --s-10: 128px;

  /* layout */
  --container: 1280px;
  --gutter: clamp(16px, 4vw, 40px);
  --section-pad: clamp(96px, 12vw, 168px);
  --header-h: 72px;
  --rail-safe: 120px;            /* content keeps clear of the Story Rail at >=1200px */

  /* shape */
  --r-xs: 6px; --r-sm: 10px; --r-md: 16px; --r-lg: 24px; --r-xl: 32px; --r-pill: 999px;

  /* motion */
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --dur-micro: 160ms;
  --dur-ui: 420ms;
  --dur-reveal: 900ms;
  --dur-intro: 1600ms;

  /* z-index scale */
  --z-base: 1;
  --z-raised: 10;
  --z-rail: 30;
  --z-progress: 45;
  --z-header: 50;
  --z-chat: 60;
  --z-cookie: 62;
  --z-backdrop: 80;
  --z-drawer: 90;
  --z-skip: 100;

  /* fixed brand constants (identical in both themes) */
  --brand-hex: #1167EB;
  --ink-hex: #0A1628;
  --grad-ink: linear-gradient(155deg, #0A1730 0%, #0D2453 52%, #1352C2 130%);   /* "ink panel" surface, both themes */
  --noise: 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%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------------------------------------------------------------- 1a. TOKENS — Day (default) */
:root,
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #F4F7FB;
  --bg-2: #EAF0F8;
  --surface: #FFFFFF;
  --surface-2: #F8FAFD;
  --surface-3: #EEF3F9;
  --surface-glass: rgba(255, 255, 255, .66);
  --surface-float: rgba(255, 255, 255, .94);     /* dropdowns, popovers */

  --ink: #0A1628;
  --text: #34425C;
  --muted: #5F6E88;          /* refined from #66758F for AA on --bg / --bg-2 */
  --faint: #98A4B8;          /* decorative only — never body text */

  --line: rgba(10, 22, 40, .08);
  --line-strong: rgba(10, 22, 40, .14);
  --grid: rgba(17, 103, 235, .06);

  --brand: #1167EB;
  --brand-600: #0A55C8;
  --brand-400: #4B8DF8;
  --brand-100: #DCE9FE;
  --brand-50: #EEF4FF;
  --brand-ink: #0B4FBE;      /* brand-coloured text on --brand-50 tints (AA) */
  --on-brand: #FFFFFF;

  --violet: #6B5BD6;
  --cyan: #08A6C9;

  --bull: #077F55;           /* text-safe (AA on white & --bg) */
  --bull-vivid: #10A673;     /* fills, candles, lines */
  --bull-bg: #E3F6EE;
  --bear: #CF333D;
  --bear-vivid: #EA4650;
  --bear-bg: #FDECEC;
  --gold: #B4841C;
  --gold-2: #E9C46A;

  --shadow-sm: 0 1px 2px rgba(10, 22, 40, .05), 0 1px 1px rgba(10, 22, 40, .03);
  --shadow-md: 0 8px 24px -8px rgba(17, 52, 120, .14), 0 2px 6px rgba(10, 22, 40, .05);
  --shadow-lg: 0 30px 60px -20px rgba(17, 52, 120, .22), 0 10px 20px -10px rgba(10, 22, 40, .08);
  --shadow-xl: 0 50px 100px -30px rgba(17, 52, 120, .30), 0 18px 36px -18px rgba(10, 22, 40, .12);
  --glow: 0 0 0 1px rgba(17, 103, 235, .18), 0 12px 40px -10px rgba(17, 103, 235, .45);

  --btn-bg: linear-gradient(180deg, #1C70EF 0%, #0E5FDD 100%);
  --btn-bg-hover: linear-gradient(180deg, #1667E6 0%, #0A55C8 100%);
  --brand-glow: rgba(17, 103, 235, .42);
  --spot: rgba(17, 103, 235, .075);
  --spot-ring: rgba(17, 103, 235, .55);
  --glass-border: rgba(255, 255, 255, .75);
  --glass-hi: rgba(255, 255, 255, .9);
  --overlay: rgba(10, 22, 40, .34);
  --scroll-thumb: rgba(10, 22, 40, .22);
  --noise-opacity: .03;

  --grad-text: linear-gradient(100deg, #0A1628 0%, #1167EB 55%, #6B5BD6 100%);
  --grad-brand: linear-gradient(135deg, #1167EB 0%, #4B8DF8 100%);
  --field-a: rgba(17, 103, 235, .10);
  --field-b: rgba(107, 91, 214, .08);
  --field-c: rgba(8, 166, 201, .08);

  --logo-a: #0A1628;         /* logo gradient — Day: ink */
  --logo-b: #3B3357;
}

/* ---------------------------------------------------------------- 1b. TOKENS — Night */
:root[data-theme="dark"] {
  /* Night — ATROPI brand book (2026) §2.4–2.6 & §3: background C4 #2D0C3C mixed with black (C4·60 = #1B0724, the brand
     book's dark-mode example), surfaces stepping up to C4 and C4 + C3, text C1 / white, accents from C2 #55197C and its
     tints, semantic colours from the brand UI palette (green #31B07A, red #D6494A, yellow #F1CB5B). */
  color-scheme: dark;
  --bg: #1B0724;             /* C4 · 60 */
  --bg-2: #240A30;           /* C4 · 80 */
  --surface: #2D0C3C;        /* C4 */
  --surface-2: #381846;      /* C4 + 8% C3 */
  --surface-3: #40214E;      /* C4 + 14% C3 */
  --surface-glass: rgba(45, 12, 60, .62);
  --surface-float: rgba(36, 10, 48, .96);

  --ink: #F5F3F6;            /* C1 · tint */
  --text: #D1C6D6;           /* C3 · tint */
  --muted: #AB9EB1;          /* C4 · tint (AA on bg / surface) */
  --faint: #816D8A;          /* decorative only */

  --line: rgba(230, 226, 232, .09);
  --line-strong: rgba(230, 226, 232, .16);
  --grid: rgba(179, 160, 187, .08);

  --brand: #9975B0;          /* C2 · tint 60 — lines, fills, strokes */
  --brand-hex: #9975B0;      /* theme-independent brand references (ink panels, underlines) */
  --brand-600: #55197C;      /* C2 */
  --brand-400: #BBA3CB;      /* C2 · tint 40 */
  --brand-100: rgba(153, 117, 176, .20);
  --brand-50: rgba(153, 117, 176, .10);
  --brand-ink: #C8B4D5;      /* brand-coloured text (AA on every Night surface) */
  --on-brand: #FFFFFF;

  --violet: #B3A0BB;         /* C3 */
  --cyan: #C7BBCC;           /* secondary data series: silvery C3 tint (no cyan in the brand palette) */

  --bull: #5AC097;           /* brand green · tint 20 (text-safe) */
  --bull-vivid: #31B07A;     /* brand green */
  --bull-bg: rgba(49, 176, 122, .14);
  --bear: #E06D6E;           /* brand red · tint 20 (text-safe) */
  --bear-vivid: #D6494A;     /* brand red */
  --bear-bg: rgba(214, 73, 74, .14);
  --gold: #F1CB5B;           /* brand yellow */
  --gold-2: #F7DF96;

  --shadow-sm: 0 1px 2px rgba(9, 2, 12, .5), 0 0 0 1px rgba(230, 226, 232, .03);
  --shadow-md: 0 12px 30px -12px rgba(9, 2, 12, .7), 0 2px 6px rgba(9, 2, 12, .4), inset 0 1px 0 rgba(230, 226, 232, .05);
  --shadow-lg: 0 40px 80px -28px rgba(9, 2, 12, .8), 0 12px 24px -12px rgba(9, 2, 12, .55), 0 0 0 1px rgba(187, 163, 203, .07);
  --shadow-xl: 0 60px 120px -36px rgba(9, 2, 12, .88), 0 20px 40px -20px rgba(9, 2, 12, .65), 0 0 0 1px rgba(187, 163, 203, .09);
  --glow: 0 0 0 1px rgba(153, 117, 176, .40), 0 14px 44px -10px rgba(153, 117, 176, .50);

  --btn-bg: linear-gradient(180deg, #774796 0%, #55197C 100%);       /* C2 · tint 80 → C2 (brand gradient family) */
  --btn-bg-hover: linear-gradient(180deg, #8459A0 0%, #5E2287 100%);
  --brand-glow: rgba(153, 117, 176, .45);
  --spot: rgba(153, 117, 176, .10);
  --spot-ring: rgba(187, 163, 203, .55);
  --glass-border: rgba(230, 226, 232, .09);
  --glass-hi: rgba(230, 226, 232, .06);
  --overlay: rgba(9, 2, 12, .66);
  --scroll-thumb: rgba(230, 226, 232, .18);
  --noise-opacity: .045;

  --grad-text: linear-gradient(100deg, #F5F3F6 0%, #BBA3CB 55%, #B3A0BB 100%);  /* C1 → C2·40 → C3 */
  --grad-brand: linear-gradient(135deg, #55197C 0%, #9975B0 100%);              /* C2 → C2·60 */
  --grad-ink: linear-gradient(155deg, #240A30 0%, #3A1250 55%, #55197C 135%);   /* brand G4 (C4 → C2): ink panels */
  --field-a: rgba(119, 71, 150, .22);
  --field-b: rgba(179, 160, 187, .08);
  --field-c: rgba(85, 25, 124, .16);

  --logo-a: #e6e2e8;         /* logo on C4: brand gradient G2 (C1 → C3) — the original stops */
  --logo-b: #b3a0bb;
}

/* ---------------------------------------------------------------- 2. RESET */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
  scrollbar-color: var(--scroll-thumb) transparent;
  scrollbar-width: thin;
  background: var(--bg);
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
/* global 3% noise layer (beneath content, above the canvas background) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: var(--noise);
  opacity: var(--noise-opacity);
}
img, picture, video, canvas, svg { display: block; max-width: 100%; }
img, video { height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
ul[role="list"], ol[role="list"], .list-reset { list-style: none; padding: 0; }
p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }
h1, h2, h3, h4, h5, h6 { color: var(--ink); font-weight: 700; line-height: 1.15; text-wrap: balance; }
p, li { text-wrap: pretty; }
[hidden] { display: none !important; }
main:focus { outline: none; }

::selection { background: var(--brand-100); color: var(--ink); }
:root[data-theme="dark"] ::selection { background: rgba(153, 117, 176, .35); color: #FFFFFF; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--scroll-thumb); border-radius: 10px; border: 3px solid var(--bg); }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
a:not([class]):focus-visible { border-radius: 4px; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* ---------------------------------------------------------------- 3. TYPOGRAPHY */
.h1, .h2, .h3, .display { color: var(--ink); text-wrap: balance; }
.h1, .display { font-size: var(--fs-h1); line-height: 1.02; font-weight: 700; letter-spacing: -0.035em; }
.h2 { font-size: var(--fs-h2); line-height: 1.06; font-weight: 700; letter-spacing: -0.03em; }
.h3 { font-size: var(--fs-h3); line-height: 1.25; font-weight: 650; letter-spacing: -0.012em; }
.h4 { font-size: 18px; line-height: 1.35; font-weight: 650; color: var(--ink); letter-spacing: -0.01em; }
.lead { font-size: var(--fs-lead); line-height: 1.6; color: var(--text); max-width: 62ch; text-wrap: pretty; }
.body { font-size: var(--fs-body); line-height: 1.65; }
.small { font-size: var(--fs-sm); line-height: 1.6; }
.micro { font-size: var(--fs-xs); line-height: 1.5; }
.muted { color: var(--muted); }
.ink { color: var(--ink); }
.brand-c { color: var(--brand); }
.mono, .num { font-family: var(--font-mono); font-variant-numeric: tabular-nums slashed-zero; font-feature-settings: "tnum" on, "zero" on; letter-spacing: 0; }
.num { font-weight: 500; }
.up { color: var(--bull); }
.down { color: var(--bear); }
.text-grad, .text-grad .wi, .text-grad .c {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.text-grad:has(.wi) { background: none; }
.text-brand { color: var(--brand); }

/* eyebrow / kicker */
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: var(--text); line-height: 1;
}
.eyebrow-num {
  display: inline-grid; place-items: center;
  min-width: 34px; height: 24px; padding: 0 7px;
  border-radius: var(--r-xs);
  background: var(--brand-50);
  box-shadow: inset 0 0 0 1px var(--brand-100);
  color: var(--brand-ink);
  font-weight: 600; letter-spacing: .06em;
}
.eyebrow-num + span { display: inline-flex; align-items: center; gap: 12px; }
.eyebrow-num + span::before { content: ""; width: 28px; height: 1px; background: currentColor; opacity: .35; }
.kicker {
  display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 10px; row-gap: 2px;
  font-size: 15px; line-height: 1.5; color: var(--muted); max-width: 60ch;
}
.kicker-name { color: var(--ink); font-weight: 650; letter-spacing: -0.01em; display: inline-flex; align-items: baseline; gap: 10px; }
.kicker-name::after { content: ""; width: 16px; height: 1px; background: var(--line-strong); transform: translateY(-4px); }
@media (max-width: 640px) {
  .kicker { flex-direction: column; align-items: flex-start; }
  .chapter-head.is-center > .kicker { align-items: center; }
  .kicker-name::after { display: none; }
}

/* chapter head */
.chapter-head { display: flex; flex-direction: column; align-items: flex-start; max-width: 880px; margin-bottom: clamp(48px, 6vw, 88px); }
.chapter-head > .eyebrow { margin-bottom: 22px; }
.chapter-head > .kicker { margin-bottom: 18px; }
.chapter-head > .h2 { max-width: 20ch; }
.chapter-head > .lead,
.chapter-head > .h2 + p { margin-top: 24px; }
.chapter-head > .lead + .lead { margin-top: 14px; }
.chapter-head-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.chapter-head.is-center { align-items: center; text-align: center; margin-inline: auto; }
.chapter-head.is-center > .kicker { justify-content: center; }
.chapter-head.is-center > .lead { margin-inline: auto; }
.chapter-head.is-center > .h2 { max-width: 22ch; }
.chapter-head.is-split { max-width: none; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); column-gap: clamp(32px, 6vw, 96px); align-items: end; }
.chapter-head.is-split > .chapter-head-main { display: flex; flex-direction: column; align-items: flex-start; }
.chapter-head.is-split > .chapter-head-main > .eyebrow { margin-bottom: 22px; }
.chapter-head.is-split > .chapter-head-main > .kicker { margin-bottom: 18px; }
.chapter-head.is-split > .chapter-head-aside { padding-bottom: 6px; }
.chapter-head.is-split > .chapter-head-aside > .lead + .lead { margin-top: 14px; }
@media (max-width: 900px) {
  .chapter-head.is-split { grid-template-columns: 1fr; }
  .chapter-head.is-split > .chapter-head-aside { margin-top: 24px; padding-bottom: 0; }
}

/* ---------------------------------------------------------------- 4. LAYOUT */
.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container-wide { width: 100%; max-width: 1520px; margin-inline: auto; padding-inline: var(--gutter); }
.container-narrow { width: 100%; max-width: calc(880px + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
@media (min-width: 1200px) {
  /* keep content clear of the fixed Story Rail on the left */
  .container, .container-wide, .container-narrow {
    padding-inline: max(var(--gutter), calc(var(--rail-safe) - max(0px, (100vw - var(--container) - 2 * var(--gutter)) / 2)));
  }
}
.chapter { position: relative; padding-block: var(--section-pad); isolation: isolate; overflow-x: clip; }
.chapter--tight { padding-block: clamp(64px, 8vw, 112px); }
.chapter--flush { padding-block: 0; }
.chapter--alt { background: var(--bg-2); }
.chapter--surface { background: var(--surface); }
.stack { display: flex; flex-direction: column; gap: var(--stack-gap, 16px); }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--cluster-gap, 12px); }
.grid-auto { display: grid; gap: var(--grid-gap, 20px); grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--grid-min, 280px)), 1fr)); }
.hairline { height: 1px; background: var(--line); border: 0; }

/* ---------------------------------------------------------------- 5. ICONS */
.ico { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.ico-sm { width: 18px; height: 18px; }
.ico-xs { width: 14px; height: 14px; }
.ico-fill { fill: currentColor; stroke: none; }

/* ---------------------------------------------------------------- 6. BUTTONS */
.btn {
  --bh: 48px;
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: var(--bh); padding: 0 24px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  font-family: var(--font-sans); font-size: 15px; font-weight: 600; line-height: 1; letter-spacing: -0.005em;
  white-space: nowrap; text-decoration: none; cursor: pointer;
  isolation: isolate; overflow: hidden;
  transform: translate3d(var(--mag-x, 0px), var(--mag-y, 0px), 0) scale(var(--btn-s, 1));
  transition: background-color .25s ease, color .25s ease, border-color .25s ease, box-shadow .4s var(--ease-out), transform .5s var(--ease-out);
  user-select: none;
}
.btn .ico { width: 18px; height: 18px; }
.btn-arrow { transition: transform .4s var(--ease-out); }
/*rtl:ignore*/
.btn:hover .btn-arrow, .link-arrow:hover .btn-arrow, a:hover > .btn-arrow { transform: translateX(3px); }
.btn:active { --btn-s: .975; }
.btn.is-magnetic-active { transition: background-color .25s ease, color .25s ease, border-color .25s ease, box-shadow .4s var(--ease-out), transform .18s linear; }

.btn-primary {
  color: var(--on-brand);
  background: var(--btn-bg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .24), inset 0 -1px 0 rgba(0, 0, 0, .08), 0 1px 2px rgba(10, 22, 40, .14), 0 10px 24px -10px var(--brand-glow);
}
:root[data-theme="dark"] .btn-primary { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .24), inset 0 -1px 0 rgba(0, 0, 0, .08), 0 1px 2px rgba(44, 12, 59, .14), 0 10px 24px -10px var(--brand-glow); } /* brand Night */
.btn-primary::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .32) 50%, transparent 70%);
  transform: translateX(-130%);
  transition: transform .9s var(--ease-out);
}
.btn-primary:hover { background: var(--btn-bg-hover); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .24), 0 1px 2px rgba(10, 22, 40, .14), 0 16px 36px -12px var(--brand-glow), 0 0 0 4px var(--brand-50); }
:root[data-theme="dark"] .btn-primary:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .24), 0 1px 2px rgba(44, 12, 59, .14), 0 16px 36px -12px var(--brand-glow), 0 0 0 4px var(--brand-50); } /* brand Night */
.btn-primary:hover::before { transform: translateX(130%); }

.btn-ghost { color: var(--ink); background: transparent; border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--surface); border-color: var(--brand-400); box-shadow: var(--shadow-sm); color: var(--ink); }
:root[data-theme="dark"] .btn-ghost:hover { background: rgba(255, 255, 255, .04); }

.btn-light { color: #0A1628; background: #FFFFFF; box-shadow: 0 1px 2px rgba(10, 22, 40, .12), 0 10px 24px -12px rgba(0, 0, 0, .35); }
:root[data-theme="dark"] .btn-light { color: #2C0C3B; box-shadow: 0 1px 2px rgba(44, 12, 59, .12), 0 10px 24px -12px rgba(0, 0, 0, .35); } /* brand Night */
.btn-light:hover { background: #F1F6FF; }
.btn-soft { color: var(--brand-ink); background: var(--brand-50); border-color: var(--brand-100); }
.btn-soft:hover { background: var(--brand-100); }

.btn-sm { --bh: 40px; padding: 0 18px; font-size: 14px; gap: 8px; }
.btn-sm .ico { width: 16px; height: 16px; }
.btn-lg { --bh: 58px; padding: 0 30px; font-size: 16px; }
.btn-block { width: 100%; }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px; border-radius: var(--r-pill);
  color: var(--ink); border: 1px solid var(--line);
  background: transparent;
  transition: background-color .25s, border-color .25s, color .25s, transform .4s var(--ease-out);
}
.icon-btn:hover { background: var(--surface); border-color: var(--line-strong); }
:root[data-theme="dark"] .icon-btn:hover { background: rgba(255, 255, 255, .05); }
.icon-btn .ico { width: 20px; height: 20px; }

.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; color: var(--brand); transition: color .2s; }
.link-arrow .ico { width: 18px; height: 18px; }
.link-arrow:hover { color: var(--brand-600); }
:root[data-theme="dark"] .link-arrow:hover { color: var(--brand-400); }

/* ---------------------------------------------------------------- 7. SURFACES & SMALL COMPONENTS */
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(22px, 2.4vw, 32px);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .5s var(--ease-out), border-color .3s ease, transform .5s var(--ease-out);
}
.card-hover:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.card-flat { box-shadow: none; }
.card-ink { background: var(--grad-ink); color: #C9D6EE; border-color: rgba(255, 255, 255, .08); --logo-a: #e6e2e8; --logo-b: #b3a0bb; }
:root[data-theme="dark"] .card-ink { color: #DED8E2; } /* brand Night */
.card-ink :is(h2, h3, h4, .h2, .h3, .h4) { color: #fff; }

.glass {
  background: var(--surface-glass);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid var(--glass-border);
  box-shadow: inset 0 1px 0 var(--glass-hi), var(--shadow-md);
}

/* spotlight — JS writes --mx/--my (px) on [data-spotlight] / .spotlight while the pointer moves */
.spotlight { --mx: 50%; --my: 50%; }
.spotlight::before,
.spotlight::after { content: ""; position: absolute; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .5s var(--ease-out); }
.spotlight::before { inset: 0; background: radial-gradient(520px circle at var(--mx) var(--my), var(--spot), transparent 55%); }
.spotlight::after {
  inset: -1px; padding: 1px;
  background: radial-gradient(260px circle at var(--mx) var(--my), var(--spot-ring), transparent 65%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.spotlight:hover::before, .spotlight:hover::after, .spotlight.is-lit::before, .spotlight.is-lit::after { opacity: 1; }

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  height: 34px; padding: 0 14px 0 12px;
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  color: var(--ink); font-size: 13px; font-weight: 600; line-height: 1; letter-spacing: -0.005em;
  white-space: nowrap;
}
.pill-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--bull-vivid); flex: none; }
.pill-dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid var(--bull-vivid); opacity: 0; animation: dot-ping 2.4s var(--ease-out) infinite; }
@keyframes dot-ping { 0% { transform: scale(.4); opacity: .9; } 70%, 100% { transform: scale(1.5); opacity: 0; } }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 8px;
  border-radius: var(--r-xs);
  background: var(--bg-2);
  border: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 500; line-height: 1; letter-spacing: .02em;
  color: var(--text); white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.chip.up { background: var(--bull-bg); color: var(--bull); border-color: transparent; }
.chip.down { background: var(--bear-bg); color: var(--bear); border-color: transparent; }
.chip.brand { background: var(--brand-50); color: var(--brand-ink); border-color: var(--brand-100); }

/* delta triangle (CSS only, no glyphs) */
.delta { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.delta::before { content: ""; width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; }
.delta.up::before { border-bottom: 5px solid currentColor; }
.delta.down::before { border-top: 5px solid currentColor; }

/* price-tick flash (Atropi.flash uses WAAPI; these classes are a CSS-only alternative) */
@keyframes flash-up { 0%, 30% { background-color: var(--bull-bg); color: var(--bull); } 100% { background-color: transparent; } }
@keyframes flash-down { 0%, 30% { background-color: var(--bear-bg); color: var(--bear); } 100% { background-color: transparent; } }
.flash-up { animation: flash-up .9s var(--ease-out); }
.flash-down { animation: flash-down .9s var(--ease-out); }

/* sparkline (Atropi.sparkline) */
.spark { width: 100%; height: auto; overflow: visible; color: var(--brand); }
.spark.up { color: var(--bull-vivid); }
.spark.down { color: var(--bear-vivid); }
.spark-line { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.spark-area { stroke: none; }

/* decorative layers */
.grid-bg {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 56px 56px;
  background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
}
.grid-bg.is-full { -webkit-mask-image: none; mask-image: none; }
.grid-paper {
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 56px 56px;
}
.noise { position: absolute; inset: 0; z-index: -1; pointer-events: none; background-image: var(--noise); opacity: calc(var(--noise-opacity) * 1.6); border-radius: inherit; }
.lightfield {
  position: absolute; z-index: -1; pointer-events: none;
  width: var(--lf-size, 720px); aspect-ratio: 1; border-radius: 50%;
  left: var(--lf-x, 50%); top: var(--lf-y, 0%); transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, var(--lf-color, var(--field-a)), transparent);
}

/* ---------------------------------------------------------------- 8. REVEAL SYSTEM (gated by html.js) */
html.js [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 24px, 0);
  transition: opacity var(--dur-reveal) var(--ease-out), transform var(--dur-reveal) var(--ease-out), clip-path 1.1s var(--ease-out);
  transition-delay: var(--rd, 0ms);
}
html.js [data-reveal="fade"] { transform: none; }
html.js [data-reveal="scale"] { transform: scale(.955); }
html.js [data-reveal="left"] { transform: translate3d(-36px, 0, 0); }
html.js [data-reveal="right"] { transform: translate3d(36px, 0, 0); }
html.js [data-reveal="mask"] { opacity: 1; transform: none; clip-path: inset(0 0 100% 0 round var(--r-lg)); }
html.js [data-reveal="draw"] { opacity: 1; transform: none; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.6s var(--ease-io); transition-delay: var(--rd, 0ms); }
html.js [data-reveal].is-in { opacity: 1; transform: none; }
/* WP: the reveal ends clipped only where the clip is the effect (mask wipe). The approved front page keeps its
   original end state (inset(0) on every reveal — its pixels include those cropped shadows); inner pages don't
   crop card shadows / hover lifts / satellites any more. Same specificity as the original rule. */
html.js :is([data-reveal="mask"], :where(.atropi-ctx-front) [data-reveal]).is-in { clip-path: inset(0 0 0 0 round 0); }
html.js [data-reveal="draw"].is-in { stroke-dashoffset: 0; }

/* word / char masks created by Atropi.split() for [data-split] */
[data-split] .w { display: inline-block; vertical-align: top; }
html.js [data-split] .w { overflow: hidden; padding: .1em .02em .14em; margin: -.1em -.02em -.14em; }
html.js [data-split] .wi,
html.js [data-split] .c {
  display: inline-block;
  transform: translate3d(0, 108%, 0);
  transition: transform var(--dur-reveal) var(--ease-out);
  transition-delay: calc(var(--rd, 0ms) + var(--i, 0) * 40ms);
  will-change: transform;
}
html.js [data-split] .c { transition-delay: calc(var(--rd, 0ms) + var(--i, 0) * 18ms); }
html.js [data-split].is-in .wi,
html.js [data-split].is-in .c { transform: none; }
html.js [data-split].is-done .wi,
html.js [data-split].is-done .c { will-change: auto; }

/* ---------------------------------------------------------------- 9. THEME TRANSITION + VIEW TRANSITION */
html.theme-fade, html.theme-fade *, html.theme-fade *::before, html.theme-fade *::after {
  transition: background-color .45s ease, border-color .45s ease, color .45s ease, fill .45s ease, stroke .45s ease, box-shadow .45s ease !important;
}
html.theme-switching *, html.theme-switching *::before, html.theme-switching *::after { transition: none !important; }
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 2; }

/* ---------------------------------------------------------------- 10. SKIP LINK */
.skip-link {
  position: fixed; left: 16px; top: 12px; z-index: var(--z-skip);
  padding: 12px 18px; border-radius: var(--r-pill);
  background: var(--ink); color: var(--bg); font-weight: 600; font-size: 14px;
  transform: translateY(-160%); transition: transform .3s var(--ease-out);
}
.skip-link:focus, .skip-link:focus-visible { transform: none; }

/* ---------------------------------------------------------------- 11. HEADER */
.site-header {
  position: sticky; top: 0; z-index: var(--z-header);
  height: var(--header-h);
  transition: transform .55s var(--ease-out);
}
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--surface-glass);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .4) inset, 0 10px 30px -20px rgba(17, 52, 120, .25);
  opacity: 0;
  transition: opacity .45s var(--ease-out);
}
:root[data-theme="dark"] .site-header::before { box-shadow: 0 10px 30px -20px rgba(0, 0, 0, .8); }
.site-header.is-scrolled::before, .site-header.menu-open::before { opacity: 1; }
.site-header.menu-open::before { background: var(--surface-float); }
.site-header.is-hidden { transform: translate3d(0, -110%, 0); }
.header-inner { position: relative; height: 100%; display: flex; align-items: center; gap: 20px; }

.brand { display: inline-flex; align-items: center; flex: none; border-radius: 6px; }
.brand .logo { width: 124px; height: auto; transition: opacity .2s; }
.brand:hover .logo { opacity: .86; }
.logo .logo-s1 { stop-color: var(--logo-a); }
.logo .logo-s2 { stop-color: var(--logo-b); }

.nav { margin-inline: auto; }
.nav-list { display: flex; align-items: center; gap: 2px; list-style: none; padding: 0; }
.nav-item { position: relative; }
.nav-item.has-mega { position: static; }
.nav-link {
  display: inline-flex; align-items: center; gap: 4px;
  height: 40px; padding: 0 14px;
  border-radius: var(--r-pill);
  font-size: 15px; font-weight: 550; color: var(--ink); letter-spacing: -0.005em;
  transition: background-color .25s, color .25s;
}
.nav-link:hover, .has-menu.is-open > .nav-link { background: var(--brand-50); color: var(--brand-ink); }
.nav-link .chev { width: 14px; height: 14px; stroke-width: 2; opacity: .7; transition: transform .4s var(--ease-out); }
.has-menu.is-open > .nav-link .chev, .has-menu.is-open > .lang-trigger .chev { transform: rotate(180deg); }

/* panels (shared) */
.menu-panel {
  position: absolute; z-index: 5;
  opacity: 0; visibility: hidden;
  transition: opacity .25s var(--ease-out), transform .5s var(--ease-out), visibility 0s linear .5s;
}
.menu-panel::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 18px; }  /* hover bridge */
.has-menu.is-open > .menu-panel { opacity: 1; visibility: visible; transition-delay: 0s; }
html:not(.js) .has-menu:hover > .menu-panel,
html:not(.js) .has-menu:focus-within > .menu-panel { opacity: 1; visibility: visible; transition-delay: 0s; }

/* dropdown */
.dropdown {
  top: calc(100% + 12px); left: 50%;
  min-width: 260px; padding: 8px;
  border-radius: var(--r-md);
  background: var(--surface-float);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  transform: translate3d(-50%, 8px, 0);
}
.has-menu.is-open > .dropdown { transform: translate3d(-50%, 0, 0); }
html:not(.js) .has-menu:hover > .dropdown { transform: translate3d(-50%, 0, 0); }
.dropdown--end { left: auto; right: 0; transform: translate3d(0, 8px, 0); }
.has-menu.is-open > .dropdown--end { transform: none; }
.dd-links { list-style: none; padding: 0; display: grid; gap: 2px; }
.dd-link {
  display: flex; align-items: center; gap: 12px;
  min-height: 48px; padding: 8px 12px 8px 8px;
  border-radius: 12px;
  font-size: 14.5px; font-weight: 600; color: var(--ink);
  transition: background-color .2s;
}
.dd-link:hover, .dd-link:focus-visible { background: var(--surface-3); }
:root[data-theme="dark"] .dd-link:hover, :root[data-theme="dark"] .dd-link:focus-visible { background: rgba(255, 255, 255, .05); }
.dd-ico {
  display: grid; place-items: center; flex: none;
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--brand-50); color: var(--brand);
  box-shadow: inset 0 0 0 1px var(--brand-100);
  transition: background-color .25s, color .25s;
}
.dd-ico .ico { width: 18px; height: 18px; }
.dd-link:hover .dd-ico { background: var(--brand); color: #fff; box-shadow: none; }
.dd-link .dd-go { margin-left: auto; width: 16px; height: 16px; opacity: 0; /*rtl:ignore*/ transform: translateX(-4px); transition: opacity .25s, transform .35s var(--ease-out); color: var(--muted); }
.dd-link:hover .dd-go { opacity: 1; transform: none; }
.lang-badge {
  display: grid; place-items: center; flex: none;
  width: 34px; height: 26px; border-radius: 7px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: .04em;
  color: var(--muted); background: var(--bg-2); border: 1px solid var(--line);
}
/*rtl:remove*/
.dd-link[dir="rtl"] { flex-direction: row-reverse; }
/*rtl:raw:
.dd-link[dir="ltr"] { flex-direction: row-reverse; }
*/
.dd-link .check { margin-left: auto; width: 16px; height: 16px; color: var(--brand); stroke-width: 2; }
.dd-link.is-current .lang-badge { color: var(--brand-ink); background: var(--brand-50); border-color: var(--brand-100); }

/* mega menu */
.mega {
  top: calc(100% - 4px); left: 50%;
  width: min(1120px, calc(100vw - 48px));
  border-radius: var(--r-lg);
  background: var(--surface-float);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  backdrop-filter: blur(24px) saturate(150%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xl);
  transform: translate3d(-50%, 10px, 0) scale(.99);
  transform-origin: 50% 0;
  overflow: hidden;
}
.has-menu.is-open > .mega { transform: translate3d(-50%, 0, 0); }
html:not(.js) .has-menu:hover > .mega { transform: translate3d(-50%, 0, 0); }
.mega-grid { display: grid; grid-template-columns: minmax(0, 1.85fr) minmax(0, 1.05fr) minmax(0, .95fr); gap: 8px; padding: 14px; }
.mega-col { padding: 14px 10px 10px; }
.mega-col + .mega-col { border-left: 1px solid var(--line); padding-left: 18px; }
.mega-label {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 10px 10px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.mega-label .mega-count { color: var(--faint); letter-spacing: .04em; }
.mega-links { list-style: none; padding: 0; display: grid; gap: 2px; }
.mega-links--2 { grid-template-columns: 1fr 1fr; }
.mega-link {
  position: relative;
  display: flex; align-items: center; gap: 14px;
  min-height: 64px; padding: 10px 12px 10px 10px;
  border-radius: 14px;
  transition: background-color .2s;
}
.mega-link:hover, .mega-link:focus-visible { background: var(--surface-3); }
:root[data-theme="dark"] .mega-link:hover, :root[data-theme="dark"] .mega-link:focus-visible { background: rgba(255, 255, 255, .045); }
.mega-ico {
  position: relative; display: grid; place-items: center; flex: none;
  width: 42px; height: 42px; border-radius: 12px;
  color: var(--brand);
  background: linear-gradient(180deg, var(--surface) 0%, var(--brand-50) 100%);
  box-shadow: inset 0 0 0 1px var(--brand-100), 0 1px 2px rgba(10, 22, 40, .04);
  transition: color .3s, background .3s, box-shadow .3s, transform .5s var(--ease-spring);
}
:root[data-theme="dark"] .mega-ico { box-shadow: inset 0 0 0 1px var(--brand-100), 0 1px 2px rgba(44, 12, 59, .04); } /* brand Night */
:root[data-theme="dark"] .mega-ico { background: linear-gradient(180deg, rgba(153, 117, 176, .14), rgba(153, 117, 176, .05)); }
.mega-ico .ico { width: 21px; height: 21px; }
.mega-link:hover .mega-ico { color: #fff; background: var(--btn-bg); box-shadow: 0 8px 18px -8px var(--brand-glow); transform: translateY(-1px) rotate(-4deg); }
.mega-txt { display: flex; flex-direction: column; min-width: 0; }
.mega-title { font-size: 15px; font-weight: 650; color: var(--ink); line-height: 1.3; letter-spacing: -0.01em; }
.mega-desc { font-size: 12.5px; color: var(--muted); line-height: 1.4; margin-top: 2px; }
.mega-go { position: absolute; right: 12px; top: 50%; width: 16px; height: 16px; color: var(--muted); opacity: 0; /*rtl:ignore*/ transform: translate(-6px, -50%); transition: opacity .25s, transform .4s var(--ease-out); }
.mega-link:hover .mega-go, .mega-link:focus-visible .mega-go { opacity: 1; transform: translate(0, -50%); }
.has-menu.is-open .mega-links > li { animation: menu-in .55s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 28ms + 60ms); }
@keyframes menu-in { from { opacity: 0; transform: translate3d(0, 6px, 0); } to { opacity: 1; transform: none; } }

.mega-promo {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column;
  min-height: 100%; padding: 22px;
  border-radius: 18px;
  background: var(--grad-ink);
  color: #C7D4EC;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08), 0 20px 40px -24px rgba(10, 30, 80, .6);
  transition: transform .6s var(--ease-out), box-shadow .6s var(--ease-out);
}
:root[data-theme="dark"] .mega-promo { color: #DDD6E0; } /* brand Night */
:root[data-theme="dark"] .mega-promo { background: linear-gradient(155deg, #2B0D3F 0%, #3B1156 58%, #6A368C 140%); box-shadow: inset 0 0 0 1px rgba(200, 180, 213, .16), 0 20px 40px -24px rgba(0, 0, 0, .8); }
.mega-promo:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14), 0 26px 50px -24px rgba(17, 103, 235, .55); }
:root[data-theme="dark"] .mega-promo:hover { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14), 0 26px 50px -24px rgba(136, 94, 163, .55); } /* brand Night */
.mega-promo::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 85%);
  mask-image: linear-gradient(180deg, #000, transparent 85%);
}
.mega-promo::after {
  content: ""; position: absolute; z-index: -1; width: 260px; height: 260px; right: -90px; top: -110px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(75, 141, 248, .55), transparent);
}
:root[data-theme="dark"] .mega-promo::after { background: radial-gradient(closest-side, rgba(163, 131, 184, .55), transparent); } /* brand Night */
.mega-promo-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mega-promo .chip { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .12); color: #E6EEFF; }
.mega-promo-live { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-mono); font-size: 11px; color: #9FB4D9; letter-spacing: .04em; }
:root[data-theme="dark"] .mega-promo-live { color: #C7BBCC; } /* brand Night */
.mega-promo-live .pill-dot { width: 6px; height: 6px; background: #22C98E; }
.mega-promo-live .pill-dot::after { border-color: #22C98E; }
.mega-chart { width: 100%; height: auto; margin: 16px 0 14px; overflow: visible; }
.mega-chart .mc-grid { stroke: rgba(255, 255, 255, .06); stroke-width: 1; }
.mega-chart .mc-wick { stroke-width: 1; }
.mega-chart .mc-up { fill: #22C98E; stroke: #22C98E; }
.mega-chart .mc-dn { fill: #FF5D66; stroke: #FF5D66; }
.mega-chart .mc-line { fill: none; stroke: #8DB8FF; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
:root[data-theme="dark"] .mega-chart .mc-line { stroke: #C4AFD2; } /* brand Night */
html.js .mega-chart .mc-line { stroke-dashoffset: 1; }
.mega-chart .mc-area { fill: url(#mc-area-g); }
html.js .mega-chart .mc-area { opacity: 0; }
.mega-chart .mc-candle { transform-box: fill-box; transform-origin: 50% 50%; }
html.js .mega-chart .mc-candle { transform: scaleY(0); }
.mega-chart .mc-price { fill: #1167EB; }
:root[data-theme="dark"] .mega-chart .mc-price { fill: #885EA3; } /* brand Night */
.mega-chart .mc-price-t { fill: #fff; font-family: var(--font-mono); font-size: 8px; font-weight: 600; }
html.js .mega-chart .mc-price-g { opacity: 0; }
.mega-chart .mc-dash { stroke: rgba(141, 184, 255, .45); stroke-width: 1; stroke-dasharray: 2 3; }
:root[data-theme="dark"] .mega-chart .mc-dash { stroke: rgba(196, 175, 210, .45); } /* brand Night */
.has-menu.is-open .mega-chart .mc-candle { transform: none; transition: transform .7s var(--ease-out); transition-delay: calc(var(--i) * 26ms + 140ms); }
.has-menu.is-open .mega-chart .mc-line { stroke-dashoffset: 0; transition: stroke-dashoffset 1.2s var(--ease-io) .25s; }
.has-menu.is-open .mega-chart .mc-area { opacity: 1; transition: opacity .8s ease .7s; }
.has-menu.is-open .mega-chart .mc-price-g { opacity: 1; transition: opacity .4s ease 1.1s; }
.mega-promo-eyebrow { font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #8FA6CF; }
:root[data-theme="dark"] .mega-promo-eyebrow { color: #BCB0C2; } /* brand Night */
.mega-promo-title { display: block; font-size: 26px; line-height: 1.1; font-weight: 700; letter-spacing: -0.025em; color: #fff; margin-top: 4px; }
.mega-promo-text { display: block; font-size: 13.5px; line-height: 1.5; color: #B5C4E0; margin-top: 8px; }
:root[data-theme="dark"] .mega-promo-text { color: #D3C8D8; } /* brand Night */
.mega-promo-cta { display: inline-flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 16px; font-size: 14px; font-weight: 600; color: #fff; }
.mega-promo-cta .ico { width: 16px; height: 16px; transition: transform .4s var(--ease-out); }
/*rtl:ignore*/
.mega-promo:hover .mega-promo-cta .ico { transform: translateX(3px); }
.mega-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 14px 24px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}
:root[data-theme="dark"] .mega-foot { background: rgba(255, 255, 255, .02); }
.mega-facts { display: flex; flex-wrap: wrap; gap: 6px 22px; list-style: none; padding: 0; font-size: 13px; color: var(--text); }
.mega-facts li { display: inline-flex; align-items: center; gap: 8px; }
.mega-facts .ico { width: 16px; height: 16px; color: var(--brand); }
.mega-facts b { font-family: var(--font-mono); font-weight: 600; color: var(--ink); font-size: 12.5px; }

/* header right cluster */
.header-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.theme-toggle { position: relative; overflow: hidden; }
.tt-ico { width: 20px; height: 20px; overflow: visible; }
.tt-core { fill: currentColor; transition: r .6s var(--ease-out); r: 4.2px; }
.tt-mask-c { fill: #000; transition: cx .6s var(--ease-out), cy .6s var(--ease-out); cx: 30px; cy: -6px; r: 6.4px; }
.tt-rays { stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; fill: none; transform-origin: 12px 12px; transition: transform .6s var(--ease-out), opacity .35s ease; }
:root[data-theme="dark"] .tt-core { r: 7.6px; }
:root[data-theme="dark"] .tt-mask-c { cx: 17.4px; cy: 7.2px; }
:root[data-theme="dark"] .tt-rays { transform: rotate(-60deg) scale(.4); opacity: 0; }
.theme-toggle:hover .tt-rays { transform: rotate(30deg); }
:root[data-theme="dark"] .theme-toggle:hover .tt-rays { transform: rotate(-60deg) scale(.4); }

.lang { position: relative; }
.lang-trigger {
  display: inline-flex; align-items: center; gap: 6px;
  height: 40px; padding: 0 10px 0 11px;
  border-radius: var(--r-pill);
  font-size: 13.5px; font-weight: 600; color: var(--ink);
  transition: background-color .25s;
}
.lang-trigger:hover, .lang.is-open > .lang-trigger { background: var(--brand-50); }
.lang-trigger .ico { width: 18px; height: 18px; }
.lang-trigger .chev { width: 12px; height: 12px; stroke-width: 2; opacity: .6; transition: transform .4s var(--ease-out); }
.lang-code { font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; }

.login-link {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 14px 0 6px;
  border-radius: var(--r-pill);
  font-size: 14.5px; font-weight: 600; color: var(--ink);
  transition: background-color .25s, color .25s;
}
.login-link .login-ava { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line-strong); color: var(--ink); transition: border-color .25s, background-color .25s, color .25s; }
.login-link .ico { width: 16px; height: 16px; }
.login-link:hover { color: var(--brand-ink); }
.login-link:hover .login-ava { border-color: var(--brand); background: var(--brand); color: #fff; }
.header-cta { margin-left: 4px; }

.burger { display: none; position: relative; width: 44px; height: 44px; border-radius: var(--r-pill); border: 1px solid var(--line); color: var(--ink); }
.burger span { position: absolute; left: 13px; right: 13px; height: 1.6px; border-radius: 2px; background: currentColor; transition: transform .45s var(--ease-out), opacity .3s; }
.burger span:nth-child(1) { top: 16px; }
.burger span:nth-child(2) { top: 21px; right: 18px; }
.burger span:nth-child(3) { top: 26px; }
.burger:hover span:nth-child(2) { transform: translateX(5px); }

@media (max-width: 1279px) {
  .nav-link { padding: 0 11px; }
  .login-link { padding: 0; width: 40px; justify-content: center; }
  .login-link .login-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
  .lang-code { display: none; }
  .header-inner { gap: 12px; }
}
@media (max-width: 1023px) {
  :root { --header-h: 64px; }
  .nav, .header-actions .lang, .header-actions .login-link, .header-actions .theme-toggle { display: none; }
  .header-actions { margin-left: auto; }
  .burger { display: inline-block; }
  .brand .logo { width: 104px; }
}
@media (max-width: 400px) {
  .header-cta { padding: 0 14px; }
  .brand .logo { width: 96px; }
}

/* ---------------------------------------------------------------- 12. MOBILE DRAWER */
.drawer-backdrop {
  position: fixed; inset: 0; z-index: var(--z-backdrop);
  background: var(--overlay);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  opacity: 0; visibility: hidden;
  transition: opacity .45s var(--ease-out), visibility 0s linear .45s;
}
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: var(--z-drawer);
  width: min(440px, 100%);
  display: flex; flex-direction: column;
  background: var(--surface);
  box-shadow: var(--shadow-xl);
  transform: translate3d(104%, 0, 0);
  visibility: hidden;
  transition: transform .6s var(--ease-out), visibility 0s linear .6s;
  overscroll-behavior: contain;
}
html.drawer-open .drawer { transform: none; visibility: visible; transition-delay: 0s; }
html.drawer-open .drawer-backdrop { opacity: 1; visibility: visible; transition-delay: 0s; }
html.drawer-open, html.drawer-open body { overflow: hidden; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; height: 64px; padding: 0 16px 0 20px; border-bottom: 1px solid var(--line); flex: none; }
.drawer-head .logo { width: 104px; }
.drawer-close { width: 44px; height: 44px; }
.drawer-body { position: relative; flex: 1; overflow: hidden; }
.drawer-panel {
  position: absolute; inset: 0;
  overflow-y: auto; overscroll-behavior: contain;
  padding: 12px 20px 28px;
  transition: transform .55s var(--ease-out), opacity .4s var(--ease-out), visibility 0s linear .55s;
  transform: translate3d(100%, 0, 0); opacity: 0; visibility: hidden;
}
.drawer-panel.is-active { transform: none; opacity: 1; visibility: visible; transition-delay: 0s; }
.drawer-panel.is-behind { transform: translate3d(-28%, 0, 0); opacity: 0; }
.dm-list { list-style: none; padding: 0; }
.dm-list > li { border-bottom: 1px solid var(--line); }
.dm-link {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  min-height: 60px; padding: 8px 4px;
  font-size: 21px; font-weight: 650; letter-spacing: -0.02em; color: var(--ink); text-align: left;
}
.dm-link .ico { width: 20px; height: 20px; color: var(--muted); transition: transform .35s var(--ease-out), color .25s; }
.dm-link:hover .ico { /*rtl:ignore*/ transform: translateX(3px); color: var(--brand); }
html.drawer-open .drawer-panel.is-active .dm-list > li { animation: menu-in .6s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 45ms + 120ms); }
.dm-settings { margin-top: 22px; display: grid; gap: 10px; }
.dm-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%;
  min-height: 56px; padding: 8px 8px 8px 16px;
  border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line);
  font-size: 15px; font-weight: 600; color: var(--ink); text-align: left;
}
:root[data-theme="dark"] .dm-row { background: var(--surface-2); }
.dm-row--btn { padding-right: 14px; }
.dm-row-val { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 500; }
.dm-row-val .ico { width: 18px; height: 18px; }
.seg { display: inline-flex; padding: 3px; border-radius: var(--r-pill); background: var(--bg-2); border: 1px solid var(--line); }
:root[data-theme="dark"] .seg { background: var(--bg); }
.seg-btn { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: var(--r-pill); font-size: 13.5px; font-weight: 600; color: var(--muted); transition: background-color .3s, color .3s, box-shadow .3s; }
.seg-btn .ico { width: 16px; height: 16px; }
.seg-btn[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); }
:root[data-theme="dark"] .seg-btn[aria-pressed="true"] { background: var(--surface-3); }
.dp-back {
  display: inline-flex; align-items: center; gap: 6px;
  height: 44px; padding: 0 14px 0 8px; margin: 2px 0 6px -6px;
  border-radius: var(--r-pill);
  font-size: 14px; font-weight: 600; color: var(--brand-ink);
}
.dp-back:hover { background: var(--brand-50); }
.dp-back .ico { width: 18px; height: 18px; }
.dp-title { font-size: 30px; font-weight: 700; letter-spacing: -0.03em; color: var(--ink); line-height: 1.1; margin: 4px 0 20px; }
.drawer-panel .mega-label { margin: 22px 0 8px 2px; }
.drawer-panel .mega-links { gap: 0; }
.drawer-panel .mega-link { min-height: 60px; padding: 8px 6px; border-radius: 12px; }
.drawer-panel .mega-go { opacity: .5; transform: translate(0, -50%); right: 6px; }
.drawer-panel .mega-promo { margin-top: 22px; min-height: 0; }
.drawer-panel .mega-promo-eyebrow { margin-top: 18px; }
.drawer-panel .dd-links { gap: 4px; }
.drawer-panel .dd-link { min-height: 56px; font-size: 16px; }
.dm-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 22px; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.dm-stats > div { padding: 14px 12px; }
.dm-stats > div + div { border-left: 1px solid var(--line); }
.dm-stats dt { font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); line-height: 1.3; }
.dm-stats dd { margin-top: 6px; font-family: var(--font-mono); font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.dm-stats dd b { font-size: 19px; font-weight: 600; color: var(--ink); letter-spacing: -0.02em; }
.drawer-foot { flex: none; display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; padding: 14px 20px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); }
.drawer-foot .btn { width: 100%; }

/* ---------------------------------------------------------------- 13. STORY RAIL + TOP PROGRESS */
.story-rail {
  position: fixed; z-index: var(--z-rail);
  left: 14px; top: 50%;
  width: 96px; height: min(62vh, 560px);
  transform: translateY(-46%);
  display: none;
  pointer-events: none;
}
@media (min-width: 1200px) { html.js .story-rail { display: block; } }
.story-rail.is-ready { animation: rail-in 1.2s var(--ease-out) .4s both; }
@keyframes rail-in { from { opacity: 0; transform: translate(-10px, -46%); } to { opacity: 1; transform: translate(0, -46%); } }
.rail-svg { position: absolute; left: 46px; top: 0; width: 30px; height: 100%; overflow: visible; }
.rail-base { fill: none; stroke: var(--line-strong); stroke-width: 1; stroke-dasharray: 1.5 4; stroke-linecap: round; }
.rail-path { fill: none; stroke: var(--brand); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.rail-node { fill: var(--bg); stroke: var(--line-strong); stroke-width: 1.2; transition: fill .4s, stroke .4s; }
.rail-node.is-passed { fill: var(--brand); stroke: var(--brand); }
.rail-node.is-active { fill: var(--bg); stroke: var(--brand); stroke-width: 1.6; }
.rail-node.is-missing { opacity: .35; }
.rail-head { fill: var(--brand); }
.rail-head-ring { fill: none; stroke: var(--brand); stroke-width: 1; opacity: .5; transform-box: fill-box; transform-origin: center; animation: rail-ping 2.2s var(--ease-out) infinite; }
@keyframes rail-ping { 0% { transform: scale(.6); opacity: .7; } 80%, 100% { transform: scale(2.4); opacity: 0; } }
.rail-ticks { position: absolute; inset: 0; list-style: none; padding: 0; }
.rail-ticks li { position: absolute; left: 12px; width: 70px; height: 0; top: var(--y, 0); }
.rail-tick {
  position: absolute; left: 0; top: -14px; height: 28px; width: 70px;
  display: flex; align-items: center;
  pointer-events: auto; border-radius: 8px;
}
.rail-num { width: 22px; text-align: right; font-family: var(--font-mono); font-size: 10px; font-weight: 500; letter-spacing: .04em; color: var(--faint); transition: color .4s, transform .5s var(--ease-out); font-variant-numeric: tabular-nums; margin-left: 6px; }
.rail-tick:hover .rail-num, .rail-tick:focus-visible .rail-num { color: var(--ink); }
.rail-tick.is-passed .rail-num { color: var(--muted); }
.rail-tick.is-active .rail-num { color: var(--brand); font-weight: 600; transform: translateX(-2px); }
.rail-tick.is-missing { pointer-events: none; }
.rail-tip {
  position: absolute; left: 76px; top: 50%;
  padding: 6px 10px; border-radius: 8px;
  background: var(--ink); color: var(--bg);
  font-size: 12px; font-weight: 600; white-space: nowrap; letter-spacing: -0.005em;
  opacity: 0; transform: translate(-4px, -50%); transition: opacity .25s, transform .35s var(--ease-out);
  pointer-events: none; box-shadow: var(--shadow-md);
}
.rail-tick:hover .rail-tip, .rail-tick:focus-visible .rail-tip { opacity: 1; transform: translate(0, -50%); }
.rail-tick.is-active .rail-tip { display: none; }
.rail-label {
  position: absolute; left: 0; top: 0;
  writing-mode: vertical-rl;
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 10px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase;
  color: var(--text); white-space: nowrap;
  transform: translate3d(0, var(--ly, 0px), 0) translateY(-50%) rotate(180deg);
  transition: transform .8s var(--ease-out), opacity .4s;
}
.rail-label-text { display: block; transition: opacity .25s, transform .45s var(--ease-out); }
.rail-label.is-swapping .rail-label-text { opacity: 0; transform: translateY(-8px); }

.top-progress {
  position: fixed; left: 0; right: 0; top: var(--header-h); z-index: var(--z-progress);
  height: 2px; pointer-events: none;
  transition: transform .55s var(--ease-out);
}
.top-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-400) 70%, var(--cyan)); transform: scaleX(var(--progress, 0)); transform-origin: 0 50%; box-shadow: 0 0 10px var(--brand-glow); }
html.header-hidden .top-progress { transform: translate3d(0, calc(-1 * var(--header-h)), 0); }
@media (min-width: 1200px) { .top-progress { display: none; } }
html:not(.js) .top-progress { display: none; }

/* ---------------------------------------------------------------- 14. FOOTER */
.site-footer {
  position: relative; isolation: isolate;
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding-top: clamp(64px, 8vw, 104px);
  color: var(--text);
}
:root[data-theme="dark"] .site-footer { background: #15061C; }
.site-footer::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 360px; z-index: -1; pointer-events: none;
  background: radial-gradient(60% 100% at 15% 0%, var(--field-a), transparent 70%);
}
.ft-top { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 3fr); gap: clamp(40px, 6vw, 96px); padding-bottom: clamp(44px, 5vw, 64px); }
.ft-brand .logo { width: 140px; }
.ft-tagline { margin-top: 18px; font-size: 15px; color: var(--muted); max-width: 26ch; }
.ft-tagline b { color: var(--ink); font-weight: 650; }
.ft-social { display: flex; gap: 8px; margin-top: 24px; list-style: none; padding: 0; }
.ft-social a {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  color: var(--ink); border: 1px solid var(--line-strong);
  transition: background-color .3s, color .3s, border-color .3s, transform .5s var(--ease-spring);
}
.ft-social a:hover { background: var(--brand); border-color: var(--brand); color: #fff; transform: translateY(-3px); }
.ft-social svg { width: 18px; height: 18px; fill: currentColor; }
.ft-social .is-off { /* profile not available in this language: icon only, no link */
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  color: var(--faint); border: 1px dashed var(--line-strong); opacity: .7; cursor: default;
}
.ft-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
.ft-h { font-family: var(--font-mono); font-size: 11.5px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; line-height: 1.4; }
.ft-col ul { list-style: none; padding: 0; display: grid; gap: 4px; }
.ft-col a {
  position: relative; display: inline-flex; align-items: center; gap: 10px;
  min-height: 34px; font-size: 15px; font-weight: 500; color: var(--ink);
  transition: color .2s;
}
.ft-col a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 6px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: 0 50%; transition: transform .45s var(--ease-out); opacity: .5; }
.ft-col a:hover { color: var(--brand); }
.ft-col a:hover::after { transform: scaleX(1); }
.ft-col .ico { width: 17px; height: 17px; color: var(--muted); }
.ft-col a:hover .ico { color: var(--brand); }
.ft-pay {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px 28px;
  padding: 22px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.ft-pay-label { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.ft-pay-label .ico { width: 18px; height: 18px; color: var(--brand); }
/* payment methods (template-parts/components/payment-methods.php) — the methods listed on the Payments page.
   Marks keep each network's identity colour; names are real text. LTR island in RTL. */
.paym { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.paym-i {
  display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 13px 0 10px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  font-size: 13px; font-weight: 600; letter-spacing: -.005em; color: var(--ink); white-space: nowrap; line-height: 1;
}
.paym-g { width: 19px; height: 19px; flex: none; color: var(--paym-c, var(--ink)); }
.paym.is-compact .paym-t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.paym--btc { --paym-c: #F7931A; } .paym--eth { --paym-c: #627EEA; } .paym--usdt { --paym-c: #1BA27A; } .paym--usdc { --paym-c: #2775CA; }
.paym--ltc { --paym-c: #345D9D; } .paym--bnb { --paym-c: #D9A40A; } .paym--trx { --paym-c: #E3112E; } .paym--xrp { --paym-c: var(--ink); }
.paym--paypal { --paym-c: #0070E0; } .paym--pm { --paym-c: #E2241A; } .paym--visa { --paym-c: #1A1F71; } .paym--mc { --paym-c: #EB001B; } .paym--wire { --paym-c: var(--brand); }
.paym .pm-mc-a { fill: #EB001B; }
.paym .pm-mc-b { fill: #F79E1B; mix-blend-mode: multiply; opacity: .92; }
:root[data-theme="dark"] .paym .pm-mc-b { mix-blend-mode: screen; }
:root[data-theme="dark"] .paym--visa, :root[data-theme="dark"] .paym--xrp { --paym-c: var(--ink); }
:root[data-theme="dark"] .paym--eth { --paym-c: #9AA9F2; }
:root[data-theme="dark"] .paym--usdc { --paym-c: #6FA3E0; }
:root[data-theme="dark"] .paym--paypal { --paym-c: #5AA6F2; }
:root[data-theme="dark"] .paym--ltc { --paym-c: #8FA8E0; }
.ft-pay-list { justify-content: flex-end; }
.ft-pay-secure { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.ft-pay-secure .ico { width: 16px; height: 16px; color: var(--bull); }
.ft-legal { display: grid; grid-template-columns: 1fr 1fr; gap: 28px clamp(32px, 5vw, 80px); padding: clamp(36px, 4vw, 56px) 0; }
.ft-legal-col { display: grid; gap: 28px; align-content: start; }
.ft-note-h { display: flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); margin-bottom: 10px; }
.ft-note-h::before { content: ""; width: 14px; height: 1px; background: var(--brand); }
.ft-note p { font-size: 13px; line-height: 1.75; color: var(--muted); max-width: 72ch; }
.ft-note p + p { margin-top: 10px; }
.ft-or { max-width: none !important; display: flex; align-items: center; gap: 12px; margin: 12px 0 !important; font-family: var(--font-mono); font-size: 10.5px !important; letter-spacing: .2em; color: var(--faint) !important; }
.ft-or::before, .ft-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.ft-bottom {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px 28px;
  padding: 22px 0 calc(28px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
}
.ft-copy { font-size: 13.5px; color: var(--muted); }
.ft-legal-links { display: flex; flex-wrap: wrap; gap: 4px 22px; list-style: none; padding: 0; }
.ft-legal-links a { font-size: 13.5px; color: var(--text); display: inline-flex; min-height: 32px; align-items: center; transition: color .2s; }
.ft-legal-links a[href]:hover { color: var(--brand); }
.ft-top-btn { display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 6px 0 16px; border-radius: var(--r-pill); border: 1px solid var(--line-strong); font-size: 13.5px; font-weight: 600; color: var(--ink); transition: border-color .25s, background-color .25s; }
.ft-top-btn span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: var(--bg); transition: transform .5s var(--ease-spring); }
.ft-top-btn .ico { width: 15px; height: 15px; stroke-width: 2; }
.ft-top-btn:hover { border-color: var(--brand); }
.ft-top-btn:hover span { transform: translateY(-3px); background: var(--brand); color: #fff; }
@media (max-width: 1100px) {
  .ft-top { grid-template-columns: 1fr; }
  .ft-brand { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 32px; }
  .ft-brand .ft-tagline { margin-top: 0; }
  .ft-brand .ft-social { grid-column: 1 / -1; }
}
@media (max-width: 820px) {
  .ft-cols { grid-template-columns: 1fr 1fr; gap: 36px 24px; }
  .ft-legal { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .ft-brand { display: block; }
  .ft-brand .ft-tagline { margin-top: 16px; }
  .ft-bottom { flex-direction: column; align-items: flex-start; }
  .ft-pay { flex-direction: column; align-items: flex-start; }
  .ft-pay-list { justify-content: flex-start; }
}

/* ---------------------------------------------------------------- 15. COOKIE BAR · CHAT · FLOATING UI */
.cookie {
  position: fixed; z-index: var(--z-cookie);
  left: 20px; bottom: 20px;
  width: min(560px, calc(100vw - 40px));
  display: flex; align-items: center; gap: 14px;
  padding: 12px 12px 12px 16px;
  border-radius: 18px;
  color: var(--text); font-size: 14px; line-height: 1.5;
  transform: translate3d(0, 24px, 0); opacity: 0;
  transition: transform .7s var(--ease-out), opacity .5s var(--ease-out);
}
.cookie.is-visible { transform: none; opacity: 1; }
.cookie p { flex: 1; min-width: 0; }
.cookie-ico { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; flex: none; background: var(--brand-50); color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand-100); }
.cookie-ico .ico { width: 20px; height: 20px; }
@media (max-width: 720px) {
  .cookie { left: 12px; right: 12px; bottom: 12px; width: auto; gap: 12px; padding: 10px 10px 10px 14px; border-radius: 16px; font-size: 13px; line-height: 1.45; }
  .cookie-ico { display: none; }
  .cookie .btn { flex: none; padding: 0 16px; }
}

.chat { position: fixed; z-index: var(--z-chat); right: 20px; bottom: calc(20px + var(--cookie-offset, 0px)); transition: bottom .6s var(--ease-out); }
.chat-fab {
  position: relative; display: grid; place-items: center;
  width: 58px; height: 58px; border-radius: 50%;
  color: #fff; background: var(--btn-bg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 14px 30px -10px var(--brand-glow), 0 2px 6px rgba(10, 22, 40, .15);
  transition: transform .5s var(--ease-spring), box-shadow .4s;
}
:root[data-theme="dark"] .chat-fab { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 14px 30px -10px var(--brand-glow), 0 2px 6px rgba(44, 12, 59, .15); } /* brand Night */
.chat-fab:hover { transform: translateY(-2px) scale(1.04); }
.chat-fab::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--brand); animation: dot-ping 3.2s var(--ease-out) infinite; pointer-events: none; }
.chat-fab .ico { position: absolute; width: 24px; height: 24px; transition: transform .45s var(--ease-out), opacity .3s; }
.chat-fab .ico-close { opacity: 0; transform: rotate(-90deg) scale(.6); }
.chat.is-open .chat-fab .ico-chat { opacity: 0; transform: rotate(90deg) scale(.6); }
.chat.is-open .chat-fab .ico-close { opacity: 1; transform: none; }
.chat.is-open .chat-fab::before { animation: none; opacity: 0; }
.chat-badge { position: absolute; top: 3px; right: 3px; width: 12px; height: 12px; border-radius: 50%; background: #22C98E; box-shadow: 0 0 0 2.5px var(--bg); }
.chat-card {
  position: absolute; right: 0; bottom: 72px;
  width: min(320px, calc(100vw - 40px));
  padding: 18px; border-radius: 20px;
  transform-origin: 100% 100%;
  transform: translate3d(0, 10px, 0) scale(.96); opacity: 0; visibility: hidden;
  transition: transform .5s var(--ease-out), opacity .3s, visibility 0s linear .5s;
}
.chat.is-open .chat-card { transform: none; opacity: 1; visibility: visible; transition-delay: 0s; }
:root[data-theme="light"] .chat-card { background: var(--surface-float); }
.chat-head { display: flex; align-items: center; gap: 12px; }
.chat-ava { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--grad-ink); color: #fff; flex: none; }
.chat-ava .ico { width: 22px; height: 22px; }
.chat-ava::after { content: ""; position: absolute; right: -2px; bottom: -2px; width: 11px; height: 11px; border-radius: 50%; background: #22C98E; box-shadow: 0 0 0 2.5px var(--surface); }
.chat-title { font-size: 16px; font-weight: 700; color: var(--ink); line-height: 1.25; letter-spacing: -0.01em; }
.chat-sub { font-size: 13px; color: var(--muted); line-height: 1.4; }
.chat-bubble { margin: 16px 0 14px; padding: 12px 14px; border-radius: 4px 14px 14px 14px; background: var(--bg-2); display: inline-flex; gap: 5px; }
:root[data-theme="dark"] .chat-bubble { background: rgba(255, 255, 255, .05); }
.chat-bubble i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: typing 1.3s ease-in-out infinite; }
.chat-bubble i:nth-child(2) { animation-delay: .15s; }
.chat-bubble i:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%, 60%, 100% { transform: none; opacity: .45; } 30% { transform: translateY(-4px); opacity: 1; } }
.chat-card .btn { width: 100%; }
/* live chat window (data-chat-ws) */
.chat-head-t { flex: 1; min-width: 0; }
.chat.is-live .chat-card { display: flex; flex-direction: column; width: min(372px, calc(100vw - 40px)); height: min(560px, calc(100vh - 130px)); height: min(560px, calc(100dvh - 130px)); padding: 0; overflow: hidden; }
.chat.is-live[data-view="pre"] .chat-card { height: auto; max-height: calc(100dvh - 130px); }
.chat.is-live .chat-head { flex: none; padding: 14px 12px 12px 16px; border-bottom: 1px solid var(--line); }
.chat.is-live .chat-ava { width: 40px; height: 40px; border-radius: 13px; }
.chat.is-live .chat-ava::after { background: var(--faint); transition: background-color .3s; }
.chat[data-net="online"] .chat-ava::after { background: #22C98E; }
.chat[data-net="connecting"] .chat-ava::after { background: #F1B53D; }
.chat[data-net="offline"] .chat-ava::after { background: var(--bear-vivid); }
.chat.is-live .chat-title { font-size: 15px; }
.chat.is-live .chat-sub { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-min { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 10px; color: var(--muted); transition: background-color .2s, color .2s; }
.chat-min:hover { background: var(--surface-2); color: var(--ink); }
.chat-min .ico { width: 18px; height: 18px; }
.chat-body { position: relative; display: flex; flex-direction: column; flex: 1; min-height: 0; }
.chat-log { display: flex; flex-direction: column; gap: 10px; flex: 1; min-height: 0; padding: 16px 16px 26px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.chat-log:focus-visible { outline-offset: -3px; }
.chat-intro { align-self: flex-start; max-width: 88%; margin: 0; padding: 10px 13px; border-radius: 4px 15px 15px 15px; background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); font-size: 13.5px; line-height: 1.55; color: var(--text); }
:root[data-theme="dark"] .chat-intro { background: rgba(255, 255, 255, .05); }
.chat-msg { display: flex; flex-direction: column; gap: 3px; max-width: 84%; }
.chat-msg.is-agent { align-self: flex-start; align-items: flex-start; }
.chat-msg.is-me { align-self: flex-end; align-items: flex-end; }
.chat-b { padding: 9px 13px; border-radius: 15px; font-size: 14px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-msg.is-agent .chat-b { border-top-left-radius: 4px; background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); }
:root[data-theme="dark"] .chat-msg.is-agent .chat-b { background: rgba(255, 255, 255, .06); }
.chat-msg.is-me .chat-b { border-bottom-right-radius: 4px; background: var(--btn-bg); color: #fff; box-shadow: 0 8px 18px -12px var(--brand-glow); }
.chat-b a { color: var(--brand-ink); text-decoration: underline; text-underline-offset: 2px; }
.chat-msg.is-me .chat-b a { color: #fff; }
.chat-msg.is-pending .chat-b { opacity: .55; }
.chat-time { padding-inline: 4px; font-family: var(--font-mono); font-size: 10px; color: var(--faint); }
.chat-sys { align-self: center; max-width: 92%; font-size: 11.5px; line-height: 1.45; color: var(--muted); text-align: center; }
.chat-file { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; color: inherit !important; text-decoration: none !important; font-size: 13px; }
.chat-file .ico { width: 16px; height: 16px; flex: none; }
.chat-file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-file.is-img { display: block; margin: -4px -8px; }
.chat-file.is-img img { display: block; max-width: 230px; max-height: 220px; border-radius: 11px; }
.chat-b audio { display: block; width: 230px; max-width: 100%; height: 36px; }
.chat-typing { position: absolute; left: 16px; bottom: 4px; margin: 0; }
.chat-typing[hidden] { display: none; }
.chat-typing .chat-bubble { margin: 0; padding: 9px 12px; }
.chat-pre { display: grid; gap: 10px; flex: none; padding: 14px 16px 16px; border-top: 1px solid var(--line); }
.chat-pre-t { font-size: 15px; font-weight: 700; color: var(--ink); letter-spacing: -0.01em; }
.chat-pre-x { margin-top: -6px; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.chat-fl { display: grid; gap: 5px; font-size: 12px; font-weight: 600; color: var(--ink); }
.chat-fl input, .chat-compose textarea { width: 100%; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); transition: border-color .2s, box-shadow .2s; }
:root[data-theme="dark"] .chat-fl input, :root[data-theme="dark"] .chat-compose textarea { background: rgba(255, 255, 255, .05); }
.chat-fl input { height: 42px; padding: 0 12px; border-radius: 11px; font-size: 15px; font-weight: 400; }
.chat-fl input:focus, .chat-compose textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-50); }
.chat-fl input[aria-invalid="true"] { border-color: var(--bear); box-shadow: 0 0 0 4px var(--bear-bg); }
.chat-err { font-size: 12px; color: var(--bear); }
.chat-err[hidden] { display: none; }
.chat-legal { display: flex; align-items: flex-start; gap: 6px; font-size: 11px; line-height: 1.45; color: var(--muted); }
.chat-legal .ico { width: 13px; height: 13px; flex: none; margin-top: 1px; color: var(--bull); }
.chat-compose { display: flex; align-items: flex-end; gap: 6px; flex: none; padding: 10px; border-top: 1px solid var(--line); }
.chat-compose textarea { flex: 1; min-width: 0; height: 40px; min-height: 40px; max-height: 120px; padding: 9px 12px; border-radius: 12px; font-size: 14.5px; line-height: 1.45; resize: none; }
.chat-attach, .chat-send { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 12px; transition: background-color .2s, color .2s, transform .2s; }
.chat-attach { color: var(--muted); }
.chat-attach:hover { background: var(--surface-2); color: var(--ink); }
.chat-send { color: #fff; background: var(--btn-bg); box-shadow: 0 8px 18px -10px var(--brand-glow); }
.chat-send:active { transform: scale(.94); }
.chat-attach .ico, .chat-send .ico { width: 19px; height: 19px; }
.chat-foot { flex: none; margin: 0; padding: 0 12px 8px; text-align: center; }
.chat-change { font-size: 11px; color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.chat-change:hover { color: var(--ink); }
.chat[data-view="pre"] .chat-compose, .chat[data-view="pre"] .chat-foot, .chat[data-view="pre"] .chat-typing { display: none; }
.chat[data-view="chat"] .chat-pre { display: none; }
.chat-count { position: absolute; top: -3px; right: -3px; display: grid; place-items: center; min-width: 21px; height: 21px; padding: 0 6px; border-radius: 11px; background: var(--bear-vivid); color: #fff; font-size: 11px; font-weight: 700; line-height: 1; box-shadow: 0 0 0 2.5px var(--bg); }
.chat-count[hidden] { display: none; }
@media (max-width: 720px) {
  .chat { right: 14px; bottom: calc(14px + var(--cookie-offset, 0px)); }
  .chat-fab { width: 54px; height: 54px; }
  .chat.is-live .chat-card { width: calc(100vw - 28px); height: min(620px, calc(100dvh - 96px)); bottom: 66px; }
  .chat.is-live[data-view="pre"] .chat-card { max-height: calc(100dvh - 96px); }
  .chat-compose textarea, .chat-fl input { font-size: 16px; } /* no iOS zoom on focus */
}

/* ---------------------------------------------------------------- 16. REDUCED MOTION */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
  html.js [data-reveal] { transform: none !important; clip-path: none !important; transition: opacity .4s ease !important; transition-delay: 0s !important; }
  html.js [data-reveal="draw"] { stroke-dashoffset: 0 !important; }
  html.js [data-split] .wi, html.js [data-split] .c { transform: none !important; transition: none !important; }
  .btn { transform: none !important; }
  .pill-dot::after, .chat-fab::before, .rail-head-ring { display: none; }
  .has-menu.is-open .mega-links > li, html.drawer-open .drawer-panel.is-active .dm-list > li { animation: none; }
  html.js .mega-chart .mc-candle { transform: none; }
  html.js .mega-chart .mc-line { stroke-dashoffset: 0; }
  html.js .mega-chart .mc-area, html.js .mega-chart .mc-price-g { opacity: 1; }
}
html.reduced [data-reveal] { transform: none !important; }

/* ---------------------------------------------------------------- 17. WORDPRESS INTEGRATION (theme additions)
   Everything below is new in the WordPress theme; sections 0–16 are the approved homepage foundation. */
/* Logged-in admin bar: keep the sticky header, top progress and drawer clear of it. */
.admin-bar { --adminbar-h: 32px; }
@media screen and (max-width: 782px) { .admin-bar { --adminbar-h: 46px; } }
@media screen and (max-width: 600px) { .admin-bar { --adminbar-h: 0px; } }   /* WP makes the bar scroll away */
.admin-bar .site-header { top: var(--adminbar-h); }
.admin-bar .top-progress { top: calc(var(--header-h) + var(--adminbar-h)); }
.admin-bar .drawer, .admin-bar .drawer-backdrop { top: var(--adminbar-h); }
/* WordPress core content classes (post content, blocks, captions) */
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; word-wrap: normal !important;
}
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { display: block; margin-inline: auto; }
.wp-caption-text, .wp-element-caption { font-size: var(--fs-sm); line-height: 1.5; color: var(--muted); margin-top: 8px; }
/* Bidi helper: keep numbers / tickers / codes left-to-right inside RTL copy (`<span class="ltr">…</span>`). */
.ltr { /*rtl:ignore*/ direction: ltr; unicode-bidi: isolate; }

/* ---------------------------------------------------------------- 18. LANGUAGES — fa · ar (Vazirmatn) · ru (Manrope Cyrillic) */
html[lang^="fa"], html[lang^="ar"] {
  --font-sans: "Vazirmatn", "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Tahoma, Arial, sans-serif;
  --font-mono: "Atropi Mono Space", "JetBrains Mono", "Vazirmatn", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}
html[lang^="ru"] {
  --font-sans: "Plus Jakarta Sans", "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
/* Arabic script is cursive: never track it (negative or positive letter-spacing breaks the joins), give it
   ~0.1 more leading. Latin market data (.mono/.num/.chip) keeps its tracking. */
html:is([lang^="fa"], [lang^="ar"]) body *:not(.mono, .num, .chip, .lang-badge, .lang-code, .rail-num, .mega-count) { letter-spacing: 0 !important; }
html:is([lang^="fa"], [lang^="ar"]) body { line-height: 1.8; }
html:is([lang^="fa"], [lang^="ar"]) :is(h1, h2, h3, h4, h5, h6) { line-height: 1.3; }
html:is([lang^="fa"], [lang^="ar"]) :is(.h1, .display) { line-height: 1.14; }
html:is([lang^="fa"], [lang^="ar"]) .h2 { line-height: 1.2; }
html:is([lang^="fa"], [lang^="ar"]) .h3 { line-height: 1.4; }
html:is([lang^="fa"], [lang^="ar"]) .h4 { line-height: 1.5; }
html:is([lang^="fa"], [lang^="ar"]) :is(.lead, .small, .kicker) { line-height: 1.8; }
html:is([lang^="fa"], [lang^="ar"]) :is(.eyebrow, .mega-label, .ft-h, .ft-note-h, .ft-pay-label, .mega-promo-eyebrow, .dm-stats dt, .rail-label) { text-transform: none; }
html:is([lang^="fa"], [lang^="ar"]) .eyebrow { font-size: 13px; }
html:is([lang^="fa"], [lang^="ar"]) :is(.mega-label, .ft-h, .ft-note-h, .ft-pay-label, .mega-promo-eyebrow) { font-family: var(--font-sans); font-size: 12.5px; font-weight: 600; }
html:is([lang^="fa"], [lang^="ar"]) .dm-stats dt { font-family: var(--font-sans); font-size: 11px; }
html:is([lang^="fa"], [lang^="ar"]) .ft-note p { line-height: 2; }
html:is([lang^="fa"], [lang^="ar"]) [data-split] .w { padding-bottom: .22em; margin-bottom: -.22em; }
/* gradient words split into .wi boxes paint the gradient only inside their box: give the descender dots (ي ج ب …) room */
html:is([lang^="fa"], [lang^="ar"]) .text-grad .wi { padding-bottom: .26em; margin-bottom: -.26em; }

/* ---------------------------------------------------------------- 19. RTL (only emitted into base-rtl.css by tools/build.mjs)
   The rest of the RTL sheet is the automatic mirror of this file (rtlcss). Rules that must not flip carry
   rtl:ignore; directional icons mirror with the independent `scale` property so their hover nudges
   (transform) still compose; prices/tickers/charts stay LTR islands. */
/*rtl:raw:
[dir="rtl"] :is(.btn-arrow, .dd-go, .mega-go, .mega-promo-cta .ico, .dm-link .ico, .dm-row-val .ico, .dp-back .ico, .rtl-mirror, [data-rtl-mirror]) { scale: -1 1; }
[dir="rtl"] :is(.num, .mono, .delta, .ltr, .mega-promo-live, .lang-code, .lang-badge, .rail-num) { direction: ltr; unicode-bidi: isolate; }
[dir="rtl"] .mega-facts b, [dir="rtl"] .dm-stats dd b { direction: ltr; unicode-bidi: isolate; }
[dir="rtl"] .mega-chart, [dir="rtl"] canvas { direction: ltr; }
[dir="rtl"] .rail-label { direction: ltr; }
*/
