/* Self-hosted fonts (SIL OFL 1.1, via @fontsource): copied into /assets/fonts by the build.
   Cormorant Garamond — display; Onest — text; JetBrains Mono — labels and figures.
   Latin and Cyrillic subsets, with their extended ranges and Vietnamese: each file is fetched only
   when a page uses characters from its unicode-range. Other scripts use the reader's system fonts
   (stacks by language in site.css). Extended subsets first: the browser checks later rules first. */
@font-face { font-family: "Onest"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/assets/fonts/onest-cyrillic-ext.woff2?v=268f03691b) format("woff2-variations"), url(/assets/fonts/onest-cyrillic-ext.woff2?v=268f03691b) format("woff2"); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-display: swap; font-weight: 100 800;
  src: url(/assets/fonts/jetbrains-cyrillic-ext.woff2?v=593ccd6fe3) format("woff2-variations"), url(/assets/fonts/jetbrains-cyrillic-ext.woff2?v=593ccd6fe3) format("woff2"); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-display: swap; font-weight: 300;
  src: url(/assets/fonts/cormorant-cyrillic-ext-300.woff2?v=b53d6bd529) format("woff2"); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-display: swap; font-weight: 500;
  src: url(/assets/fonts/cormorant-cyrillic-ext-500.woff2?v=acab2d007a) format("woff2"); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "Cormorant Garamond"; font-style: italic; font-display: swap; font-weight: 400;
  src: url(/assets/fonts/cormorant-cyrillic-ext-400i.woff2?v=91b622f3d9) format("woff2"); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "Onest"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/assets/fonts/onest-vietnamese.woff2?v=d852d4d094) format("woff2-variations"), url(/assets/fonts/onest-vietnamese.woff2?v=d852d4d094) format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-display: swap; font-weight: 100 800;
  src: url(/assets/fonts/jetbrains-vietnamese.woff2?v=2288795da8) format("woff2-variations"), url(/assets/fonts/jetbrains-vietnamese.woff2?v=2288795da8) format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-display: swap; font-weight: 300;
  src: url(/assets/fonts/cormorant-vietnamese-300.woff2?v=69385da076) format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-display: swap; font-weight: 500;
  src: url(/assets/fonts/cormorant-vietnamese-500.woff2?v=f245c41ee2) format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Cormorant Garamond"; font-style: italic; font-display: swap; font-weight: 400;
  src: url(/assets/fonts/cormorant-vietnamese-400i.woff2?v=4a82e13d26) format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Onest"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/assets/fonts/onest-latin-ext.woff2?v=14e7d3079b) format("woff2-variations"), url(/assets/fonts/onest-latin-ext.woff2?v=14e7d3079b) 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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-display: swap; font-weight: 100 800;
  src: url(/assets/fonts/jetbrains-latin-ext.woff2?v=79bfdab9ba) format("woff2-variations"), url(/assets/fonts/jetbrains-latin-ext.woff2?v=79bfdab9ba) 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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-display: swap; font-weight: 300;
  src: url(/assets/fonts/cormorant-latin-ext-300.woff2?v=7e86fb56e3) 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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-display: swap; font-weight: 500;
  src: url(/assets/fonts/cormorant-latin-ext-500.woff2?v=3de1b0f235) 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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Cormorant Garamond"; font-style: italic; font-display: swap; font-weight: 400;
  src: url(/assets/fonts/cormorant-latin-ext-400i.woff2?v=96ec6109d0) 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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Onest"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/assets/fonts/onest-cyrillic.woff2?v=68e5e01d62) format("woff2-variations"), url(/assets/fonts/onest-cyrillic.woff2?v=68e5e01d62) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/assets/fonts/onest-latin.woff2?v=052df74533) format("woff2-variations"), url(/assets/fonts/onest-latin.woff2?v=052df74533) 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-display: swap; font-weight: 100 800;
  src: url(/assets/fonts/jetbrains-cyrillic.woff2?v=d274604c40) format("woff2-variations"), url(/assets/fonts/jetbrains-cyrillic.woff2?v=d274604c40) 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-display: swap; font-weight: 100 800;
  src: url(/assets/fonts/jetbrains-latin.woff2?v=18be452724) format("woff2-variations"), url(/assets/fonts/jetbrains-latin.woff2?v=18be452724) 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: "Cormorant Garamond"; font-style: normal; font-display: swap; font-weight: 300;
  src: url(/assets/fonts/cormorant-cyrillic-300.woff2?v=f892c7e0f8) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-display: swap; font-weight: 300;
  src: url(/assets/fonts/cormorant-latin-300.woff2?v=8973d65ce7) 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: "Cormorant Garamond"; font-style: normal; font-display: swap; font-weight: 500;
  src: url(/assets/fonts/cormorant-cyrillic-500.woff2?v=30aec8d9cd) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-display: swap; font-weight: 500;
  src: url(/assets/fonts/cormorant-latin-500.woff2?v=8197bf5361) 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: "Cormorant Garamond"; font-style: italic; font-display: swap; font-weight: 400;
  src: url(/assets/fonts/cormorant-cyrillic-400i.woff2?v=109ce34012) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Cormorant Garamond"; font-style: italic; font-display: swap; font-weight: 400;
  src: url(/assets/fonts/cormorant-latin-400i.woff2?v=e48e580270) 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; }
/* metric-compatible fallbacks keep text from jumping while fonts arrive */
@font-face { font-family: "Cormorant Fallback"; src: local("Georgia"), local("Times New Roman"); size-adjust: 86%; ascent-override: 92%; descent-override: 28%; line-gap-override: 0%; }
@font-face { font-family: "Onest Fallback"; src: local("Segoe UI"), local("Arial"); size-adjust: 104.5%; ascent-override: 98%; descent-override: 26%; line-gap-override: 0%; }

/* Logris — design system v2 ("observatory of a living crystal").
   Themes: LIGHT (warm paper), DARK_LOW_GLARE (deep space), SYSTEM.
   The crystal stage is always a dark observation window, in both themes. */

/* ------------------------------------------------------------ tokens */
:root {
  color-scheme: light;
  --bg: #F3F1EA;
  --surface: #FBFAF6;
  --surface-2: #E9E6DC;
  --text: #121528;
  --text-2: #484B62;
  --line: #D8D4C7;
  --line-strong: #8B887C;
  --link: #2E49B0;
  --focus: #2E49B0;
  --btn-bg: #121528;
  --btn-text: #FBFAF6;
  --gold: #8A6420;
  --chip-open-bg: #DCEFEC;
  --chip-open-text: #0B4A45;
  --chip-open-line: #7DBDB4;
  --lattice: rgba(18, 21, 40, 0.06);
  --glass: rgba(251, 250, 246, 0.78);
  /* simplified crystal mark facets */
  --m-u0: #4FA8F2; --m-u1: #8ED0FA; --m-u2: #3B90EA; --m-u3: #1F66CC; --m-l0: #1C5BC0; --m-l1: #15469E; --m-l2: #2A70D4; --m-l3: #0D327E; --m-heart: #C88A1E;
  --m-seam: rgba(255, 255, 255, 0.55);
  --n-u0: #CFD3DE; --n-u1: #E1E3EA; --n-u2: #C7CCD8; --n-u3: #BAC0CF; --n-l0: #B4BBCB; --n-l1: #ACB3C4; --n-l2: #BEC4D2; --n-l3: #A2AABD;
  /* direction accents */
  --a-care: #B3437A; --a-language: #3554D1; --a-explore: #0A7A8F; --a-living: #7442C2; --a-core: #8A6420;

  --f-display: "Cormorant Garamond", "Cormorant Fallback", Georgia, serif;
  --f-text: "Onest", "Onest Fallback", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --wrap: 1320px;
  --gut: clamp(18px, 4vw, 48px);
  --header-h: 69px; /* bar 68 + border; the compact landscape bar is 53 */
  --safe-l: env(safe-area-inset-left, 0px); --safe-r: env(safe-area-inset-right, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-start: var(--safe-l); --safe-end: var(--safe-r);
  --r: 14px;
  --ease: cubic-bezier(.22, .8, .2, 1);
  --t-quick: 160ms; --t-med: 320ms; --t-slow: 720ms;
  /* the observation window (always dark) */
  --stage-a: #0B1A3A; --stage-b: #02060F; --stage-ink: #E4E7F0; --stage-ink-2: #A2A9C0; --stage-line: rgba(170, 200, 255, 0.18);
  /* a crystal's place: by day a window into the night depth, by night open to the depth itself */
  --stage-bg: radial-gradient(70% 60% at 50% 45%, var(--stage-a), var(--stage-b) 75%);
  --stage-shadow: 0 30px 80px -40px rgba(4, 12, 40, .6), inset 0 0 0 1px var(--stage-line);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #060A14; --surface: #0C1222; --surface-2: #141C32;
    --text: #DADEE8; --text-2: #A3AAC1; --line: #1C2540; --line-strong: #5E6786;
    --link: #AFBDFF; --focus: #E2C48A; --btn-bg: #E9DFC6; --btn-text: #0E111C; --gold: #E2C48A;
    --chip-open-bg: #0E2E2B; --chip-open-text: #A6E6DC; --chip-open-line: #2D6B63;
    --lattice: rgba(170, 190, 255, 0.05); --glass: rgba(6, 10, 20, 0.72);
    --m-u0: #7CC9FF; --m-u1: #B8E6FF; --m-u2: #5DB0F7; --m-u3: #2F7FE3; --m-l0: #2A6FD6; --m-l1: #1E57B8; --m-l2: #3A86E8; --m-l3: #123E92; --m-heart: #FFE3A6;
    --m-seam: rgba(255, 255, 255, 0.45);
    --n-u0: #39435E; --n-u1: #48536F; --n-u2: #343E58; --n-u3: #2E374F; --n-l0: #2B344B; --n-l1: #272F45; --n-l2: #313A53; --n-l3: #22293E;
    --a-care: #E88EBF; --a-language: #93A9FF; --a-explore: #62CBE0; --a-living: #B997F2; --a-core: #E2C48A;
    --stage-bg: radial-gradient(closest-side at 50% 46%, rgba(18, 38, 86, .5), rgba(8, 16, 40, .18) 62%, transparent 100%);
    --stage-shadow: none;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #060A14; --surface: #0C1222; --surface-2: #141C32;
  --text: #DADEE8; --text-2: #A3AAC1; --line: #1C2540; --line-strong: #5E6786;
  --link: #AFBDFF; --focus: #E2C48A; --btn-bg: #E9DFC6; --btn-text: #0E111C; --gold: #E2C48A;
  --chip-open-bg: #0E2E2B; --chip-open-text: #A6E6DC; --chip-open-line: #2D6B63;
  --lattice: rgba(170, 190, 255, 0.05); --glass: rgba(6, 10, 20, 0.72);
  --m-u0: #7CC9FF; --m-u1: #B8E6FF; --m-u2: #5DB0F7; --m-u3: #2F7FE3; --m-l0: #2A6FD6; --m-l1: #1E57B8; --m-l2: #3A86E8; --m-l3: #123E92; --m-heart: #FFE3A6;
  --m-seam: rgba(255, 255, 255, 0.45);
  --n-u0: #39435E; --n-u1: #48536F; --n-u2: #343E58; --n-u3: #2E374F; --n-l0: #2B344B; --n-l1: #272F45; --n-l2: #313A53; --n-l3: #22293E;
  --a-care: #E88EBF; --a-language: #93A9FF; --a-explore: #62CBE0; --a-living: #B997F2; --a-core: #E2C48A;
  --stage-bg: radial-gradient(closest-side at 50% 46%, rgba(18, 38, 86, .5), rgba(8, 16, 40, .18) 62%, transparent 100%);
  --stage-shadow: none;
}

/* ------------------------------------------------------------- scripts
   Latin names inside any text keep the Logris faces; the letters of other scripts come from the
   reader's system fonts (no global font download for every visitor). */
:root:lang(ar), :root:lang(fa), :root:lang(ur) {
  --f-text: "Onest", "Segoe UI", "Noto Sans Arabic", "Geeza Pro", Tahoma, sans-serif;
  --f-display: "Cormorant Garamond", "Noto Naskh Arabic", "Segoe UI", "Geeza Pro", "Times New Roman", serif; }
:root:lang(he) { --f-text: "Onest", "Segoe UI", "Noto Sans Hebrew", "Arial Hebrew", Arial, sans-serif; --f-display: "Cormorant Garamond", "Noto Serif Hebrew", "Times New Roman", serif; }
:root:lang(hi), :root:lang(mr) { --f-text: "Onest", "Nirmala UI", "Noto Sans Devanagari", "Kohinoor Devanagari", "Devanagari Sangam MN", sans-serif; --f-display: "Cormorant Garamond", "Noto Serif Devanagari", "Nirmala UI", "Kohinoor Devanagari", serif; }
:root:lang(bn) { --f-text: "Onest", "Nirmala UI", "Noto Sans Bengali", "Kohinoor Bangla", "Bangla Sangam MN", sans-serif; --f-display: "Cormorant Garamond", "Noto Serif Bengali", "Nirmala UI", serif; }
:root:lang(ta) { --f-text: "Onest", "Nirmala UI", "Noto Sans Tamil", "Tamil Sangam MN", sans-serif; --f-display: "Cormorant Garamond", "Noto Serif Tamil", "Nirmala UI", serif; }
:root:lang(th) { --f-text: "Onest", "Leelawadee UI", "Noto Sans Thai", Thonburi, Tahoma, sans-serif; --f-display: "Cormorant Garamond", "Noto Serif Thai", "Leelawadee UI", Thonburi, serif; }
:root:lang(zh-Hans) { --f-text: "Onest", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC", sans-serif; --f-display: "Cormorant Garamond", "Songti SC", "Noto Serif SC", "Source Han Serif SC", SimSun, serif; }
:root:lang(zh-Hant) { --f-text: "Onest", "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", "Source Han Sans TC", sans-serif; --f-display: "Cormorant Garamond", "Songti TC", "Noto Serif TC", "Source Han Serif TC", PMingLiU, serif; }
:root:lang(ja) { --f-text: "Onest", "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", Meiryo, "Noto Sans JP", sans-serif; --f-display: "Cormorant Garamond", "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif; }
:root:lang(ko) { --f-text: "Onest", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif; --f-display: "Cormorant Garamond", AppleMyungjo, "Noto Serif KR", Batang, serif; }
:root:lang(el) { --f-text: "Onest", "Segoe UI", "Noto Sans", Arial, sans-serif; --f-display: "Cormorant Garamond", "Noto Serif", Georgia, serif; }
/* labels in the mono face keep it for Latin and digits; the letters of other scripts come from the text
   stack, never from a system monospace (which would set Arabic or Devanagari in a typewriter face) */
:root:lang(ar), :root:lang(fa), :root:lang(ur), :root:lang(he), :root:lang(hi), :root:lang(mr), :root:lang(bn), :root:lang(ta),
:root:lang(th), :root:lang(zh-Hans), :root:lang(zh-Hant), :root:lang(ja), :root:lang(ko), :root:lang(el) { --f-mono: "JetBrains Mono", var(--f-text); }
/* CJK: no letter-spacing tricks meant for Latin capitals, and lines break between characters */
:root:lang(zh-Hans) .eyebrow, :root:lang(zh-Hant) .eyebrow, :root:lang(ja) .eyebrow, :root:lang(ko) .eyebrow { letter-spacing: .04em; }

/* ------------------------------------------------------------- right-to-left
   Layout follows the reading direction through logical properties and grid/flex order; arrows of
   direction turn with it. The crystal, its rotation and its labels are a picture: never mirrored. */
[dir="rtl"] { --safe-start: var(--safe-r); --safe-end: var(--safe-l); }
[dir="rtl"] .arw { display: inline-block; transform: scaleX(-1); }
[dir="rtl"] .hero::before { background: radial-gradient(60% 70% at 22% 40%, color-mix(in oklab, var(--m-u2) 12%, transparent), transparent 70%); }
/* cursive scripts and scripts whose letters hang from one headline (Devanagari, Bengali): no letter-spacing
   (it would break the joining and the headline); Latin names keep theirs */
:root:is(:lang(ar), :lang(fa), :lang(ur), :lang(hi), :lang(mr), :lang(bn)) :is(.eyebrow, .fig, .h-label, .num, .chip, .nav-n, .dir-n, .stage-enter span, .ex-hint, .lang-group, .foot-h, .show-in, .open-mark, .filter legend, .crumb, .facts dt) { letter-spacing: normal; }

/* ------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 1.0625rem/1.65 var(--f-text); font-kerning: normal; font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip;
}
h1, h2, h3 { margin: 0 0 .45em; line-height: 1.1; text-wrap: balance; }
/* a word longer than its line (very large text in a narrow column) breaks instead of being clipped; at normal sizes nothing changes */
h1, h2, h3, h4, p, li, dt, dd, a, label, button, figcaption { overflow-wrap: anywhere; }
h3 { font: 600 1.12rem/1.3 var(--f-text); letter-spacing: -0.005em; }
p { margin: 0 0 1em; text-wrap: pretty; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: .2em; transition: color var(--t-quick); }
a:hover { text-decoration-thickness: 2px; }
ul, ol { margin: 0; padding: 0; }
abbr[title] { text-decoration: none; }
svg { display: block; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
main:focus { outline: none; }
/* page organism: one tree behind the glass. The deep layer sits under the content; each text that
   touches the glass carries its own layer between its background and its letters. */
body { position: relative; }
.organism { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; contain: strict; }
.organism-deep { position: absolute; top: 0; left: 0; width: 100%; display: block; will-change: transform; }
main, .site-footer { position: relative; z-index: 1; }
.organism-host { isolation: isolate; }
.organism-rel { position: relative; }
.organism-contact { position: absolute; left: -10px; top: -10px; width: calc(100% + 20px); height: calc(100% + 20px); display: block; pointer-events: none; z-index: -1; }
.crystal-lost .organism, .crystal-lost .organism-contact { visibility: hidden; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gut)); margin: 0 auto; padding-inline: max(var(--gut), var(--safe-start)) max(var(--gut), var(--safe-end)); }
.skip { position: absolute; inset-inline-start: 12px; top: 0; transform: translateY(calc(-100% - 8px)); z-index: 60; background: var(--btn-bg); color: var(--btn-text); padding: 12px 16px; border-radius: 10px; }
.skip:focus { transform: translateY(12px); } /* hidden by its own height, so large text never lets it cover the header */
[hidden] { display: none !important; }

/* typography roles */
.display, .display-2, .display-3 { font-family: var(--f-display); font-weight: 300; letter-spacing: -0.012em; }
.display { font-size: clamp(2.6rem, 1.6rem + 4.2vw, 5.6rem); line-height: 1.02; }
.display-2 { font-size: clamp(2.1rem, 1.5rem + 2.4vw, 3.6rem); line-height: 1.06; }
.display-3 { font-size: clamp(1.6rem, 1.3rem + 1vw, 2.15rem); line-height: 1.1; font-weight: 500; }
:lang(ru) .display { font-size: clamp(2.35rem, 1.45rem + 3.7vw, 4.9rem); }
.lead { font-size: clamp(1.08rem, 1rem + .35vw, 1.28rem); color: var(--text-2); max-width: 58ch; line-height: 1.6; }
.lead-sm { color: var(--text-2); max-width: 60ch; }
.eyebrow, .fig, .h-label, .num, .chip, .foot-h, .nav-n, .dir-n {
  font-family: var(--f-mono); font-weight: 500; letter-spacing: .12em; text-transform: uppercase; font-size: .72rem; line-height: 1.5;
}
.eyebrow { color: var(--text-2); margin-bottom: 1.4em; }
.fig { color: var(--text-2); margin: 0 0 1em; letter-spacing: .08em; }
.h-label { color: var(--text-2); margin: 2.4em 0 1em; font-size: .74rem; }
.num { color: var(--gold); margin-bottom: .8em; }
.fine { font-size: .9rem; color: var(--text-2); margin-top: 28px; max-width: 70ch; }

/* ----------------------------------------------------------- crystal marks */
.mark .f-u0, .logo .f-u0 { fill: var(--m-u0); } .mark .f-u1, .logo .f-u1 { fill: var(--m-u1); }
.mark .f-u2, .logo .f-u2 { fill: var(--m-u2); } .mark .f-u3, .logo .f-u3 { fill: var(--m-u3); }
.mark .f-l0, .logo .f-l0 { fill: var(--m-l0); } .mark .f-l1, .logo .f-l1 { fill: var(--m-l1); }
.mark .f-l2, .logo .f-l2 { fill: var(--m-l2); } .mark .f-l3, .logo .f-l3 { fill: var(--m-l3); }
.mark .heart, .logo .heart, .facet-mark .heart { fill: var(--m-heart); }
.mark .seams line, .logo .seams line { stroke: var(--m-seam); stroke-width: .9; }
.facet-mark .lit { fill: var(--accent, var(--a-core)); }
.facet-mark .n-u0 { fill: var(--n-u0); } .facet-mark .n-u1 { fill: var(--n-u1); } .facet-mark .n-u2 { fill: var(--n-u2); } .facet-mark .n-u3 { fill: var(--n-u3); }
.facet-mark .n-l0 { fill: var(--n-l0); } .facet-mark .n-l1 { fill: var(--n-l1); } .facet-mark .n-l2 { fill: var(--n-l2); } .facet-mark .n-l3 { fill: var(--n-l3); }
[data-dir="care"] { --accent: var(--a-care); } [data-dir="language"] { --accent: var(--a-language); }
[data-dir="explore"] { --accent: var(--a-explore); } [data-dir="living"] { --accent: var(--a-living); } [data-dir="core"] { --accent: var(--a-core); }
.facet-mark { width: 14px; height: auto; flex: none; }

/* ------------------------------------------------------------- header */
.site-header { position: sticky; top: 0; z-index: 40; background: var(--glass); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); view-transition-name: site-header; }
.bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0 28px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; padding: 6px 0; }
.brand-mark { height: 34px; width: auto; }
.crystal-slot, .brand-crystal { position: relative; }
.crystal-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.crystal-still { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transition: opacity var(--t-med); }
[data-live="on"] > .crystal-still, [data-live="on"] > picture > .crystal-still { opacity: 0; }
[data-live="lost"] > .crystal-canvas { visibility: hidden; }
.brand-crystal { display: inline-block; width: 30px; height: 46px; flex: none; margin: -6px -4px; }
.brand-word { font: 500 min(1.35rem, 7vw)/1 var(--f-display); letter-spacing: .34em; text-transform: uppercase; margin-inline-end: -.34em; }
.nav-desktop { margin-inline-start: auto; }
.nav-desktop ul, .nav-mobile nav ul { list-style: none; display: flex; gap: 4px; }
.nav-desktop a, .nav-mobile nav a { display: flex; align-items: baseline; gap: 8px; padding: 10px 14px; color: var(--text); text-decoration: none; border-radius: 999px; font-weight: 500; font-size: .98rem; transition: background-color var(--t-quick); }
.nav-n { font-size: .62rem; color: var(--text-2); letter-spacing: .08em; }
.nav-desktop a:hover, .nav-mobile nav a:hover { background: var(--surface-2); }
.nav-desktop a[aria-current="page"], .nav-mobile nav a[aria-current="page"] { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.tools { display: flex; align-items: center; gap: 12px; }
/* language menu: a disclosure (works without scripts); lang.js puts the reader's languages first */
.lang-menu { position: relative; }
.lang-menu > summary { list-style: none; display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 12px 0 10px; border-radius: 999px; cursor: pointer; color: var(--text-2); font: 600 .74rem/1 var(--f-mono); letter-spacing: .06em; box-shadow: inset 0 0 0 1px var(--line); }
.lang-menu > summary::-webkit-details-marker { display: none; }
.lang-menu > summary:hover, .lang-menu[open] > summary { color: var(--text); background: var(--surface-2); }
.lang-pop { position: absolute; inset-inline-end: 0; top: calc(100% + 8px); z-index: 50; width: min(280px, calc(100vw - 32px)); max-height: min(62svh, 480px); overflow: auto; overscroll-behavior: contain; padding: 10px; border-radius: 16px; background: var(--bg); border: 1px solid var(--line); box-shadow: 0 24px 60px -24px rgba(4, 10, 30, .45); display: grid; gap: 8px; }
.lang-find { width: 100%; min-height: 40px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font: 400 .95rem/1.2 var(--f-text); }
.lang-group { margin: 4px 8px 2px; font: 500 .66rem/1.4 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--text-2); }
.lang-list { list-style: none; display: grid; gap: 1px; margin: 0; padding: 0; }
.lang-list a { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 40px; padding: 8px 10px; border-radius: 10px; color: var(--text); text-decoration: none; font: 400 .98rem/1.25 var(--f-text); }
.lang-list a:hover, .lang-list a:focus-visible { background: var(--surface-2); }
.lang-list a[aria-current="true"]::after { content: ""; width: 7px; height: 7px; transform: rotate(45deg); background: var(--gold); flex: none; }
.lang-none { margin: 6px 10px; color: var(--text-2); font-size: .92rem; }
.sheet .lang-pop { position: static; width: 100%; box-shadow: none; max-height: none; }
.lang-foot { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; padding: 0; }
/* every language's name in its own script needs the system's fallback fonts (Arabic, Indic, CJK, Thai…):
   finding and loading them is most of the page's first layout on a phone. The footer's list is laid out
   when it comes near the viewport; its height is kept from then on (auto) */
.foot .lang-foot { content-visibility: auto; contain-intrinsic-block-size: auto 600px; }
/* the reserved height until then: measured for the 40 names in a footer column of each layout */
@media (max-width: 760px) { .foot .lang-foot { contain-intrinsic-block-size: auto 860px; } }
@media (max-width: 380px) { .foot .lang-foot { contain-intrinsic-block-size: auto 520px; } }
.lang-foot a { color: var(--text); text-decoration: none; display: inline-block; padding-block: 4px; }
.lang-foot a:hover { text-decoration: underline; }
.lang-foot a[aria-current="true"] { color: var(--gold); }
.theme { display: none; border: 1px solid var(--line); border-radius: 999px; padding: 2px; }
.js .theme { display: inline-flex; }
.theme button { display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 999px; background: none; color: var(--text-2); cursor: pointer; }
.theme button:hover { color: var(--text); }
.theme button[aria-pressed="true"] { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-strong); }
.ti { width: 14px; height: 14px; display: block; border-radius: 50%; position: relative; }
.ti-sun { border: 2px solid currentColor; width: 10px; height: 10px; box-shadow: 0 -6px 0 -4px currentColor, 0 6px 0 -4px currentColor, 6px 0 0 -4px currentColor, -6px 0 0 -4px currentColor; }
.ti-moon { box-shadow: inset 4px -2px 0 0 currentColor; transform: rotate(-20deg); }
.ti-auto { border: 2px solid currentColor; background: linear-gradient(90deg, currentColor 50%, transparent 50%); }
.ti-globe { width: 13px; height: 13px; border: 1.5px solid currentColor; }
.ti-globe::before { content: ""; position: absolute; inset: -1.5px 3px; border: 1.5px solid currentColor; border-radius: 50%; }
.ti-globe::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1.5px solid currentColor; translate: 0 -50%; }
.nav-mobile { display: none; margin-inline-start: auto; }
.nav-mobile summary { list-style: none; cursor: pointer; display: grid; place-items: center; width: 46px; height: 46px; border: 1px solid var(--line); border-radius: 999px; }
.nav-mobile summary::-webkit-details-marker { display: none; }
.burger, .burger::before, .burger::after { display: block; width: 18px; height: 1.5px; background: currentColor; position: relative; transition: transform var(--t-med) var(--ease), background-color var(--t-quick); }
.burger::before, .burger::after { content: ""; position: absolute; left: 0; }
.burger::before { top: -6px; } .burger::after { top: 6px; }
.nav-mobile[open] .burger { background: transparent; }
.nav-mobile[open] .burger::before { transform: translateY(6px) rotate(45deg); }
.nav-mobile[open] .burger::after { transform: translateY(-6px) rotate(-45deg); }
.sheet { position: absolute; left: 0; right: 0; top: 100%; background: var(--bg); border-bottom: 1px solid var(--line); padding: 12px var(--gut) 22px; display: grid; gap: 16px; }
.nav-mobile:not([open]) .sheet { display: none; } /* closed content must not take part in layout or overflow */
.sheet nav ul { flex-direction: column; }
.sheet nav a { padding: 14px; font-size: 1.15rem; border-radius: 12px; }
.sheet .tools { justify-content: space-between; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 14px; }
.sheet .lang-menu[open] { flex: 1 1 100%; order: 2; }
.lang-menu > summary { white-space: nowrap; }
/* em follows the browser text-size setting: large text switches to the compact menu earlier */
@media (max-width: 860px), (max-width: 53.75em) { .nav-desktop, .tools-desktop { display: none; } .nav-mobile { display: block; } }
/* the offer of the reader's own language: a quiet toast over the bottom of the page (no layout shift) */
.suggest { position: fixed; z-index: 45; inset-inline: max(12px, var(--safe-start)) max(12px, var(--safe-end)); bottom: calc(12px + var(--safe-b)); max-width: 560px; margin-inline: auto; background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 16px; box-shadow: 0 18px 50px -20px rgba(4, 10, 30, .55); }
.suggest[hidden] { display: none; }
.suggest-in { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 14px; }
.suggest p { margin: 0 auto 0 0; font-size: .95rem; }
.suggest .btn { min-height: 36px; padding: 6px 14px; font-size: .88rem; }

/* ------------------------------------------------------------ buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .55em; min-height: 46px; padding: 11px 22px; border-radius: 999px; font: 600 .98rem/1.2 var(--f-text); text-decoration: none; cursor: pointer; border: 1px solid transparent; position: relative; transition: background-color var(--t-quick), color var(--t-quick), border-color var(--t-quick), transform var(--t-quick) var(--ease); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--btn-bg); color: var(--btn-text); }
.btn-primary:hover { background: var(--link); color: var(--btn-text); }
:root[data-theme="dark"] .btn-primary:hover { background: #fff; color: #0E111C; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-primary:hover { background: #fff; color: #0E111C; } }
.btn-quiet { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-quiet:hover { border-color: var(--text); }
.btn-lg { min-height: 54px; padding: 14px 26px; font-size: 1.02rem; }
.btn-sm { min-height: 38px; padding: 7px 14px; font-size: .9rem; }
.btn-crystal { width: 9px; height: 16px; background: linear-gradient(160deg, #B8E6FF, #3B90EA 50%, #15469E); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }

/* ------------------------------------------------------------- chips */
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--text-2); letter-spacing: .06em; font-size: .66rem; max-width: 100%; }
.chip::before { content: ""; width: 6px; height: 6px; transform: rotate(45deg); flex: none; border: 1.5px solid currentColor; }
.chip-stage[data-stage="in_development"]::before { background: linear-gradient(135deg, currentColor 50%, transparent 50%); }
.chip-stage[data-stage="prototype"]::before, .chip-stage[data-stage="experimental"]::before { background: currentColor; }
.chip-stage[data-stage="research_prototype"]::before, .chip-stage[data-stage="research"]::before { border-style: dotted; }
.chip-access[data-access="public_prototype"] { background: var(--chip-open-bg); color: var(--chip-open-text); border-color: var(--chip-open-line); }
.chip-access[data-access="public_prototype"]::before { background: currentColor; }
.chip-access[data-access="none"] { border-style: dashed; }
.chip-access[data-access="none"]::before { border-radius: 50%; transform: none; width: 6px; height: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* ------------------------------------------------------------- hero */
.hero { position: relative; overflow: clip; }
.hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 70% at 78% 40%, color-mix(in oklab, var(--m-u2) 12%, transparent), transparent 70%); pointer-events: none; }
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(28px, 5vw, 80px); align-items: center; min-height: min(88svh, 860px); padding-block: clamp(40px, 7vw, 96px); }
.hero h1 { max-width: 7.15em; } /* em, not ch: ch follows the fallback font and would reflow on swap */
:lang(ru) .hero h1 { max-width: 8.1em; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.honesty { display: flex; gap: 10px; align-items: baseline; margin-top: 26px; font-size: .92rem; color: var(--text-2); max-width: 52ch; }
.honesty .dot { width: 7px; height: 7px; flex: none; transform: rotate(45deg) translateY(-1px); background: var(--a-explore); }
.hero-stage { margin: 0; display: grid; gap: 14px; justify-items: center; align-self: start; padding-top: clamp(0px, 3vw, 40px); } /* top-anchored: text reflow on font swap must not move the stage */
.stage-frame { position: relative; width: 100%; max-width: 440px; aspect-ratio: 4 / 5; border-radius: 28px; background: var(--stage-bg); box-shadow: var(--stage-shadow); display: grid; place-items: center; overflow: hidden; view-transition-name: crystal-stage; }
.stage-frame { --crystal-inset-top: 14px; --crystal-inset-right: 14px; --crystal-inset-bottom: 62px; --crystal-inset-left: 14px; }
.stage-frame .crystal-still { padding: 0; } /* rendered with the live view's insets */
.stage-enter { position: absolute; inset: 0; border: 0; background: transparent; cursor: zoom-in; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 18px; color: var(--stage-ink); }
.stage-enter span { font: 500 .72rem/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; padding: 10px 16px; border-radius: 999px; background: rgba(6, 12, 30, .6); box-shadow: inset 0 0 0 1px var(--stage-line); opacity: .85; transition: opacity var(--t-med), transform var(--t-med) var(--ease); }
.stage-enter:hover span, .stage-enter:focus-visible span { opacity: 1; transform: translateY(-3px); }
.stage-enter:focus-visible { outline-offset: -6px; border-radius: 28px; }
.hero-stage .fig { text-align: center; max-width: 40ch; }

/* ------------------------------------------------------------- explorer (inside the crystal) */
.hero[data-mode="inside"] .hero-grid { display: none; }
.explorer { --ex-layout: wide; --ex-h: clamp(520px, calc(100svh - var(--header-h)), 980px); position: relative; display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(320px, .9fr); height: var(--ex-h); }
.ex-stage { position: relative; background: radial-gradient(70% 60% at 50% 45%, var(--stage-a), var(--stage-b) 75%); overflow: hidden; view-transition-name: crystal-stage; touch-action: pan-y; }
.ex-canvas, .ex-still { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.ex-still { object-fit: contain; padding: 14% 4% 6%; transition: opacity var(--t-slow); }
.ex-stage[data-live="on"] .ex-still { opacity: 0; }
.ex-hotspots { position: absolute; inset: 0; pointer-events: none; }
.hotspot { position: absolute; left: 0; top: 0; pointer-events: auto; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border-radius: 999px; border: 1px solid rgba(226, 196, 138, .35); background: rgba(5, 10, 26, .55); color: var(--stage-ink); font: 500 .8rem/1.2 var(--f-text); cursor: pointer; transform: translate(-50%, -50%); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transition: border-color var(--t-quick), background-color var(--t-quick), opacity var(--t-med); white-space: nowrap; }
.hotspot::after { content: ""; position: absolute; inset: -10px -6px; border-radius: 999px; }
.hotspot[data-compact]::after { inset: -9px; }
.hotspot .hs-dot { width: 9px; height: 9px; transform: rotate(45deg); background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.hotspot:hover, .hotspot:focus-visible, .hotspot[aria-pressed="true"] { border-color: #E2C48A; background: rgba(12, 20, 44, .82); }
.hotspot:focus-visible { outline-color: #E2C48A; }
.ex-stage[data-sel] .hotspot:not([aria-pressed="true"]) { opacity: .55; }
/* labels that would collide collapse to their dot; the name stays accessible and returns on hover/focus */
.hotspot[data-compact] { padding: 8px; gap: 0; }
.hotspot[data-compact] .hs-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.hotspot[data-compact]:hover, .hotspot[data-compact]:focus-visible { z-index: 2; padding: 6px 12px 6px 8px; gap: 8px; }
.hotspot[data-compact]:hover .hs-label, .hotspot[data-compact]:focus-visible .hs-label { position: static; width: auto; height: auto; clip-path: none; }
.ex-tools { position: absolute; left: max(18px, var(--safe-l)); right: 18px; top: 16px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; pointer-events: none; }
.ex-tools > * { pointer-events: auto; max-width: 100%; }
.ex-tools .stage-btn[data-exit] { text-align: start; }
.ex-tools .ico { display: none; }
.ex-nav, .ex-tools-end { display: flex; flex-wrap: wrap; gap: 6px; }
.ex-tools-end { margin-inline-start: auto; }
.stage-btn:disabled { opacity: .4; cursor: default; border-color: var(--stage-line); }
.stage-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--stage-line); background: rgba(5, 10, 26, .6); color: var(--stage-ink); font: 500 .88rem/1 var(--f-text); cursor: pointer; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.stage-btn:hover { border-color: rgba(226, 196, 138, .6); }
.stage-btn:focus-visible { outline-color: #E2C48A; }
.ex-zoom { display: flex; gap: 6px; }
.ex-stage[data-ready="2d"] .ex-zoom, .ex-stage[data-live="lost"] .ex-zoom { display: none; } /* a still image has nothing to zoom */
.ex-zoom .stage-btn { width: 44px; justify-content: center; padding: 0; font-size: 1.15rem; }
.ex-hint { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); margin: 0; font: 500 .7rem/1.4 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--stage-ink-2); text-align: center; width: max-content; max-width: 90%; }
.ex-panel { background: var(--surface); border-inline-start: 1px solid var(--line); padding-block: clamp(24px, 3vw, 40px) calc(clamp(24px, 3vw, 40px) + var(--safe-b)); padding-inline: clamp(24px, 3vw, 40px) max(clamp(24px, 3vw, 40px), var(--safe-end)); display: flex; flex-direction: column; gap: 18px; height: var(--ex-h); overflow: auto; overscroll-behavior: contain; }
.ex-panel h2 { margin: 0; }
.ex-panel h2:focus { outline: none; }
.ex-dirs { list-style: none; display: grid; gap: 4px; }
.ex-dir { width: 100%; min-height: 48px; display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid transparent; background: none; color: var(--text); text-align: start; font: 500 1rem/1.3 var(--f-text); cursor: pointer; transition: background-color var(--t-quick), border-color var(--t-quick); }
.ex-dir .facet-mark { width: 14px; grid-column: 1; }
.ex-dir > span:not(.count) { grid-column: 2; } /* the name keeps its column even without an icon */
.ex-dir > .count { grid-column: 3; }
.ex-dir:hover { background: var(--surface-2); }
.ex-dir[aria-pressed="true"] { background: var(--surface-2); border-color: var(--accent); }
.ex-dir .count { font: 500 .7rem/1 var(--f-mono); color: var(--text-2); }
.ex-detail { border-top: 1px solid var(--line); padding-top: 18px; display: grid; gap: 14px; }
.ex-detail[data-dir] { animation: ex-in var(--t-med) var(--ease); }
@keyframes ex-in { from { opacity: 0; transform: translateY(6px); } }
.ex-detail h3 { font: 500 1.7rem/1.1 var(--f-display); margin: 0; }
.ex-detail > p { color: var(--text-2); margin: 0; }
/* where the panel scrolls on its own, the chosen direction stays named at its top */
.ex-panel #ex-title { position: sticky; top: calc(-1 * clamp(24px, 3vw, 40px)); z-index: 1; background: var(--surface); padding-block: 10px 8px; margin-block: -10px -8px; box-shadow: 0 1px 0 var(--line); }
.ex-projects { list-style: none; display: grid; gap: 10px; }
.ex-projects li { border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: grid; gap: 8px; background: var(--bg); scroll-margin-top: 96px; }
.ex-projects strong { font: 500 1.25rem/1.15 var(--f-display); }
.ex-proj { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 44px; margin: -6px 0; padding: 6px 0; border: 0; background: none; color: var(--text); text-align: start; cursor: pointer; }
.ex-proj .chev { width: 9px; height: 9px; flex: none; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-3px); transition: transform var(--t-quick); color: var(--text-2); }
.ex-proj[aria-expanded="true"] .chev { transform: rotate(-135deg) translateX(-2px); }
.ex-projects li[data-open] { border-color: var(--accent); }
/* a project with its own crystal (Life Signal's palace) shows it beside its name, as on its card and page */
.ex-projects li.has-crystal { grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; }
.ex-projects li.has-crystal > * { grid-column: 1; }
.ex-projects li.has-crystal > .ex-proj-crystal { grid-column: 2; grid-row: 1 / span 3; width: 46px; height: 69px; align-self: start; }
.ex-summary { color: var(--text) !important; font-size: .95rem !important; line-height: 1.55; }
/* the compact strip of directions (phones only) */
.ex-dock { display: none; }
.ex-chips { list-style: none; display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; padding: 2px 2px 4px; margin: 0 -2px; }
.ex-chips::-webkit-scrollbar { display: none; }
.ex-chips li { scroll-snap-align: start; flex: none; }
.ex-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px 0 12px; border-radius: 999px; border: 1px solid var(--stage-line); background: rgba(5, 10, 26, .7); color: var(--stage-ink); font: 500 .86rem/1 var(--f-text); white-space: nowrap; cursor: pointer; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.ex-chip .facet-mark { width: 11px; }
.ex-chip[aria-pressed="true"] { border-color: #E2C48A; background: rgba(14, 22, 48, .92); }
.ex-chip:focus-visible, .ex-to-detail:focus-visible { outline-color: #E2C48A; }
.ex-to-detail { margin-top: 8px; width: 100%; min-height: 44px; border-radius: 12px; border: 1px solid rgba(226, 196, 138, .55); background: rgba(14, 22, 48, .88); color: var(--stage-ink); font: 500 .92rem/1 var(--f-text); cursor: pointer; }
.ex-projects p { margin: 0; font-size: .92rem; color: var(--text-2); }
.ex-links { display: flex; flex-wrap: wrap; gap: 8px; }
.ex-fallback { font-size: .85rem; color: var(--text-2); border-inline-start: 2px solid var(--line-strong); padding-inline-start: 10px; margin: 0; }

/* ------------------------------------------------------------- bands */
.band { padding-block: clamp(64px, 9vw, 128px); }
.section-head { display: grid; gap: 4px; margin-bottom: clamp(28px, 4vw, 56px); max-width: 70ch; }
.section-head .display-2 { margin-bottom: .3em; }
.more { margin: 36px 0 0; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); }

/* directions atlas */
.dir-grid { list-style: none; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.dir-card { grid-column: span 2; position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 26px; display: flex; flex-direction: column; gap: 10px; transition: border-color var(--t-med), transform var(--t-med) var(--ease), box-shadow var(--t-med); }
.dir-card:nth-child(4), .dir-card:nth-child(5) { grid-column: span 3; }
.dir-card::after { content: ""; position: absolute; left: 26px; right: 26px; top: 0; height: 2px; background: var(--accent); opacity: .8; }
.dir-card:hover { transform: translateY(-2px); box-shadow: 0 22px 50px -34px rgba(10, 20, 60, .45); border-color: var(--line-strong); }
.dir-top { display: flex; justify-content: space-between; align-items: flex-start; }
.dir-mark { width: 22px; }
/* small living crystals on cards and rows: the project's own crystal, or the family view with its direction lit */
.card-crystal { width: 56px; height: 84px; flex: none; }
.dir-crystal { width: 52px; height: 78px; margin-block-start: -8px; margin-inline-start: -10px; }
.open-crystal { width: 56px; height: 84px; margin-block: -10px 10px; margin-inline-start: -12px; }
.prow-crystal { width: 46px; height: 69px; }
.dir-n { color: var(--text-2); }
.dir-card h3 { font: 500 1.75rem/1.1 var(--f-display); margin: 6px 0 0; }
.dir-card > p { color: var(--text-2); margin: 0; }
.dir-projects { list-style: none; display: grid; gap: 2px; margin-top: 6px; border-top: 1px solid var(--line); padding-top: 10px; }
.dir-projects a { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px; align-items: baseline; padding: 6px 0; color: var(--text); text-decoration: none; font-weight: 500; }
.dir-projects a:hover span:first-child { text-decoration: underline; text-underline-offset: .2em; }
.open-mark { font: 500 .62rem/1.3 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--chip-open-text); background: var(--chip-open-bg); padding: 3px 7px; border-radius: 999px; white-space: nowrap; }
.show-in { margin-top: auto; padding-top: 12px; font: 500 .74rem/1.4 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--gold); text-decoration: none; display: inline-flex; gap: 6px; align-self: flex-start; }
.show-in:hover { text-decoration: underline; }

/* open today */
.open-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.open-card { position: relative; border-radius: 22px; padding: clamp(26px, 3vw, 40px); background: radial-gradient(120% 90% at 100% 0%, color-mix(in oklab, var(--accent) 16%, transparent), transparent 60%), var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; min-height: 340px; }
.open-mark-svg { width: 28px; margin-bottom: 18px; }
.open-card h3 { margin: 0; } .open-card h3 a { color: var(--text); text-decoration: none; }
.open-card h3 a:hover { text-decoration: underline; text-decoration-thickness: 1px; }
.open-card > p { color: var(--text-2); max-width: 46ch; }
.open-actions { margin-top: auto; padding-top: 16px; }
.action-note { font-size: .82rem; color: var(--text-2); margin: 10px 0 0; }

/* manifesto */
.bce-list { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.bce-list li { padding: 32px 32px 12px 0; }
.bce-list li + li { padding-inline-start: 32px; border-inline-start: 1px solid var(--line); }
.bce-list p:not(.num) { color: var(--text-2); }
.glyph { height: 52px; width: auto; margin-bottom: 22px; }
.glyph .g-line { fill: none; stroke: var(--text); stroke-width: 1.2; stroke-linejoin: round; }
.glyph .g-join { fill: var(--m-heart); }
.glyph .g-fill { fill: var(--m-u1); }
.glyph .g-fill.f-u0 { fill: var(--m-u0); } .glyph .g-fill.f-u1 { fill: var(--m-u1); } .glyph .g-fill.f-u2 { fill: var(--m-u2); } .glyph .g-fill.f-u3 { fill: var(--m-u3); }
.glyph .g-fill.f-l0 { fill: var(--m-l0); } .glyph .g-fill.f-l1 { fill: var(--m-l1); } .glyph .g-fill.f-l2 { fill: var(--m-l2); } .glyph .g-fill.f-l3 { fill: var(--m-l3); }
.glyph .g-thin { stroke: var(--text-2); stroke-width: .8; }
.points { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-top: clamp(40px, 6vw, 72px); }
.points li { border-top: 1px solid var(--text); padding-top: 18px; }
.points p { color: var(--text-2); }

/* contact band */
.contact-band { background: color-mix(in oklab, var(--surface) 72%, transparent); }
.contact-in { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 28px 64px; align-items: end; }
.contact-action { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.mail-link { font: 300 clamp(1.6rem, 1.2rem + 1.6vw, 2.6rem)/1.1 var(--f-display); color: var(--text); text-decoration: none; border-bottom: 1px solid var(--line-strong); padding-bottom: 4px; overflow-wrap: anywhere; }
.mail-link:hover { border-color: var(--text); }
.pending { border-inline-start: 2px solid var(--line-strong); padding-inline-start: 16px; color: var(--text-2); }
.pending-title { display: block; color: var(--text); }

/* ------------------------------------------------------------ pages */
.page-head { padding-block: clamp(48px, 8vw, 112px) clamp(24px, 4vw, 48px); }
.page-head .display { max-width: 18ch; margin-bottom: .3em; }
.catalog { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); padding-bottom: 96px; align-items: start; }
.catalog-side { position: sticky; top: 92px; display: grid; gap: 22px; }
.filter { border: 1px solid var(--line); border-radius: var(--r); padding: 14px 18px 16px; margin: 0; display: none; gap: 8px; }
.js .filter { display: grid; }
.filter legend { font: 500 .72rem/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--text-2); padding: 0 6px; }
.filter label { display: flex; gap: 10px; align-items: center; cursor: pointer; min-height: 32px; }
.filter input { accent-color: var(--link); width: 18px; height: 18px; }
.dir-nav ul { list-style: none; display: grid; gap: 2px; }
.dir-nav a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: var(--text); text-decoration: none; font-weight: 500; }
.dir-nav a:hover { background: var(--surface-2); }
.legend { border-top: 1px solid var(--line); padding-top: 18px; font-size: .9rem; }
.legend h2 { font: 600 .98rem/1.3 var(--f-text); }
.legend p, .legend dd { color: var(--text-2); }
.legend dl { margin: 0; display: grid; gap: 14px; }
.legend dd { margin: 6px 0 0; }
.group { margin-bottom: clamp(48px, 6vw, 80px); scroll-margin-top: 92px; }
.group-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px; align-items: start; margin-bottom: 18px; }
.group-mark { width: 26px; margin-top: 6px; }
.group-head p { color: var(--text-2); margin: 0 0 8px; }
.group-head .show-in { padding-top: 0; }
.prows { list-style: none; border-top: 1px solid var(--line); container-type: inline-size; }
.prow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 8px 24px; align-items: center; padding: 22px 0; border-bottom: 1px solid var(--line); }
.prow-name { font: 500 1.55rem/1.15 var(--f-display); margin: 0; }
.prow-name a { color: var(--text); text-decoration: none; display: inline-block; padding-block: 2px; }
.prow-name a:hover { text-decoration: underline; text-decoration-thickness: 1px; }
.prow-alias { font-size: .85rem; color: var(--text-2); margin: 2px 0 0; }
.prow-text { margin: 6px 0 0; color: var(--text-2); font-size: .97rem; max-width: 62ch; }
.prow-status { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
/* the row stacks when its own width is small for the text size (narrow window or very large text) */
@container (max-width: 42rem) { .prow { grid-template-columns: auto minmax(0, 1fr); } .prow-status, .prow-action { grid-column: 2; } .prow-status { flex-direction: row; flex-wrap: wrap; } }

/* project */
.project-hero { border-bottom: 1px solid var(--line); background: radial-gradient(80% 120% at 100% 0%, color-mix(in oklab, var(--accent) 14%, transparent), transparent 55%); }
.crumb { padding-top: 32px; font: 500 .74rem/1.5 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); }
.crumb a { color: var(--text-2); text-decoration: none; display: inline-block; padding-block: 3px; } .crumb a:hover { color: var(--text); text-decoration: underline; }
.project-title { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(20px, 3vw, 40px); align-items: start; padding: clamp(24px, 4vw, 48px) 0 clamp(36px, 5vw, 64px); }
.project-mark { width: clamp(40px, 5vw, 64px); margin-top: 12px; }
.project-head { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(260px, .75fr); gap: clamp(24px, 4vw, 64px); align-items: center; padding-bottom: clamp(28px, 4vw, 48px); }
.project-head .project-title { grid-template-columns: minmax(0, 1fr); padding-bottom: 0; }
.project-return { margin: 26px 0 0; }
.project-crystal { margin: 0; display: grid; gap: 12px; justify-items: center; }
.project-stage { width: 100%; max-width: 380px; aspect-ratio: 4 / 5; border-radius: 24px; overflow: hidden; background: var(--stage-bg); box-shadow: var(--stage-shadow); --crystal-inset-top: 14px; --crystal-inset-right: 14px; --crystal-inset-bottom: 14px; --crystal-inset-left: 14px; }
.project-stage .crystal-still { padding: 0; }
.project-crystal .fig { text-align: center; max-width: 42ch; text-wrap: balance; }
.project-title h1 { margin-bottom: .15em; }
.aka { color: var(--text-2); font-size: 1.05rem; margin-bottom: .9em; }
.project-title .chips { margin-top: 18px; }
.project-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: clamp(36px, 6vw, 88px); padding-block: clamp(36px, 5vw, 64px); }
.summary { font: 300 clamp(1.4rem, 1.2rem + .8vw, 1.85rem)/1.35 var(--f-display); color: var(--text); }
.focus { list-style: none; counter-reset: f; display: grid; gap: 12px; }
.focus li { counter-increment: f; display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.focus li::before { content: counter(f, decimal-leading-zero); font: 500 .74rem/1.9 var(--f-mono); color: var(--gold); }
.crosses { list-style: none; display: grid; gap: 10px; }
.crosses li { position: relative; padding-inline-start: 26px; color: var(--text-2); }
.crosses li::before { content: "—"; position: absolute; inset-inline-start: 0; }
.note { margin-top: 2.2em; background: var(--surface); border: 1px solid var(--line); border-inline-start: 3px solid var(--accent, var(--link)); border-radius: 12px; padding: 16px 20px; }
.note .h-label { margin: 0 0 .6em; }
.note p { margin: 0; color: var(--text-2); }
.project-side { display: grid; gap: 18px; align-content: start; }
.facts { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 6px 20px; }
.facts div { display: grid; gap: 6px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.facts div:last-child { border-bottom: 0; }
.facts dt { font: 500 .68rem/1 var(--f-mono); text-transform: uppercase; letter-spacing: .1em; color: var(--text-2); }
.facts dd { margin: 0; }
.action-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; }
.uc { border: 1px dashed var(--line-strong); border-radius: var(--r); padding: 20px; }
.uc h2 { font: 600 1.05rem/1.3 var(--f-text); }
.uc p:not(.fig) { color: var(--text-2); font-size: .95rem; margin: 0; }
.in-crystal { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: center; padding: 18px 20px; border-radius: var(--r); background: radial-gradient(90% 120% at 0% 50%, #0E2148, #03070F); color: var(--stage-ink); text-decoration: none; border: 1px solid #1B2A4C; }
.in-crystal-mark { width: 26px; }
.in-crystal .fig { color: var(--stage-ink-2); margin: 0; display: block; }
.in-crystal-name { display: block; font: 500 1.35rem/1.2 var(--f-display); }
.in-crystal-go { display: block; font-size: .85rem; color: #E2C48A; margin-top: 4px; }
.in-crystal:hover { border-color: #E2C48A; }
.related { padding-bottom: 32px; }
.pager { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; padding-block: 24px 96px; }
.pager a { display: grid; gap: 4px; padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--r); color: var(--text); text-decoration: none; transition: border-color var(--t-quick); }
.pager a[rel="next"] { text-align: end; }
.pager a:hover { border-color: var(--line-strong); }
.pager .fig { margin: 0; }
.pager-name { font: 500 1.4rem/1.2 var(--f-display); }

/* approach */
.principles { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(32px, 5vw, 72px); border-top: 1px solid var(--line); }
.principles li { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 16px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.num-xl { font: 300 2.6rem/1 var(--f-display); color: var(--gold); margin: 0; }
.principles p:not(.num-xl) { color: var(--text-2); margin: 0; }

/* contact page */
.contact-page { padding-bottom: 112px; align-items: start; }
.contact-card { background: radial-gradient(120% 100% at 100% 0%, color-mix(in oklab, var(--a-core) 14%, transparent), transparent 60%), var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: clamp(28px, 4vw, 48px); display: grid; gap: 18px; justify-items: start; }
.mail-big { font: 300 clamp(1.8rem, 1.2rem + 2.4vw, 3.2rem)/1.1 var(--f-display); color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.mail-big:hover { text-decoration: underline; text-decoration-thickness: 1px; }
.pending-card { border-style: dashed; }

/* 404 */
.nf { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; padding-block: clamp(56px, 9vw, 120px); }
.nf-stage { width: clamp(120px, 18vw, 220px); aspect-ratio: 1 / 2; border-radius: 24px; background: radial-gradient(70% 60% at 50% 45%, var(--stage-a), var(--stage-b) 75%); display: grid; place-items: center; }
.nf-mark { width: 50%; height: auto; filter: drop-shadow(0 0 18px rgba(70, 150, 255, .5)); }
.nf-text { display: grid; gap: 28px; }
.nf section + section { border-top: 1px solid var(--line); padding-top: 28px; }
.nf .cta { margin-top: 18px; }

/* ------------------------------------------------------------ footer */
.site-footer { padding-bottom: var(--safe-b); padding-top: 64px; }
.foot { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 32px; padding-bottom: 44px; }
.brand-lg .brand-mark { height: 40px; } .brand-lg .brand-word { font-size: 1.6rem; } .brand-lg .brand-crystal { width: 36px; height: 56px; }
.foot-brand p { color: var(--text-2); max-width: 36ch; margin-top: 16px; }
.foot-h { color: var(--text-2); margin-bottom: 14px; font-size: .68rem; }
.foot ul:not(.lang-foot) { list-style: none; display: grid; gap: 4px; }
.foot ul:not(.lang-foot) a { color: var(--text); text-decoration: none; display: inline-block; padding-block: 4px; }
.foot ul:not(.lang-foot) a:hover { text-decoration: underline; }
.foot-legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; border-top: 1px solid var(--line); padding-block: 22px 30px; font-size: .85rem; color: var(--text-2); }
.foot-legal p { margin: 0; } .foot-legal a { color: var(--text-2); }

/* ------------------------------------------------------------ motion */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: 260ms; animation-timing-function: var(--ease); }
  ::view-transition-group(crystal-stage) { animation-duration: 640ms; animation-timing-function: var(--ease); }
  @supports (animation-timeline: view()) {
    .dir-card, .open-card, .prow, .bce-list li { animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% entry 40%; }
    @keyframes reveal { from { opacity: .001; transform: translateY(18px); } to { opacity: 1; transform: none; } }
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* -------------------------------------------------------- responsive */
@media (max-width: 1100px) {
  .dir-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dir-card, .dir-card:nth-child(4), .dir-card:nth-child(5) { grid-column: span 1; }
  .dir-card:nth-child(5) { grid-column: 1 / -1; }
  .catalog { grid-template-columns: minmax(0, 1fr); }
  .catalog-side { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catalog-side .legend { grid-column: 1 / -1; }
  .project-grid { grid-template-columns: minmax(0, 1fr); }
  .foot { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); min-height: 0; gap: 20px; padding-top: 28px; }
  .hero-stage { order: -1; padding-top: 0; }
  .stage-frame { max-width: none; aspect-ratio: 16 / 11; border-radius: 22px; }
  .stage-frame { --crystal-inset-bottom: 58px; }
  .hero-stage .fig { display: none; }
  .two, .contact-in, .open-grid, .bce-list, .points, .principles, .pager { grid-template-columns: minmax(0, 1fr); }
  .bce-list li, .bce-list li + li { padding: 26px 0 8px; border-inline-start: 0; border-bottom: 1px solid var(--line); }
  .dir-grid { grid-template-columns: minmax(0, 1fr); }
  .dir-card:nth-child(5) { grid-column: auto; }
  .catalog-side { grid-template-columns: minmax(0, 1fr); }
  .prow { grid-template-columns: auto minmax(0, 1fr); }
  .prow-status, .prow-action { grid-column: 2; }
  .prow-status { flex-direction: row; flex-wrap: wrap; }
  .project-title { grid-template-columns: minmax(0, 1fr); }
  .project-head { grid-template-columns: minmax(0, 1fr); }
  .project-stage { max-width: none; aspect-ratio: 16 / 11; }
  .project-mark { width: 40px; }
  .pager a[rel="next"] { text-align: start; }
  .foot { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .nf { grid-template-columns: minmax(0, 1fr); }
  .hotspot { font-size: .74rem; padding: 5px 10px 5px 7px; }
}
@media (max-width: 380px) { .foot { grid-template-columns: minmax(0, 1fr); } .cta .btn { width: 100%; } .stage-btn { padding: 8px 12px; font-size: .8rem; } }

/* ------------------------------------------------- explorer compositions
   wide  — desktop: scene and panel side by side (base rules above)
   stack — tall medium windows (tablet portrait, 2/3 split view): scene on top, directions as a row, projects right below
   split — medium windows that are not tall (tablet landscape, unfolded foldable, narrow desktop window): two panes, each the window's height
   phone — narrow windows (phones, folded foldable, 1/2 split view): tall scene with a strip of directions, projects below
   short — phone sideways: compact bar, two panes */
@media (max-width: 1099.98px) {
  .explorer { --ex-layout: stack; grid-template-columns: minmax(0, 1fr); height: auto; }
  .ex-stage { height: clamp(360px, 54svh, 680px); }
  .ex-panel { height: auto; overflow: visible; border-inline-start: 0; border-top: 1px solid var(--line); }
  .ex-dirs { display: flex; flex-wrap: wrap; gap: 8px; }
  .ex-dirs li { flex: none; }
  .ex-dir { width: auto; grid-template-columns: 14px auto auto; gap: 10px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 999px; }
}
@media (max-width: 1099.98px) and (min-width: 640px) and (min-aspect-ratio: 5 / 6) {
  .explorer { --ex-layout: split; --ex-h: max(460px, calc(100svh - var(--header-h))); grid-template-columns: minmax(0, 1.15fr) minmax(300px, 1fr); height: var(--ex-h); }
  .ex-stage { height: auto; }
  .ex-panel { height: var(--ex-h); overflow: auto; border-top: 0; border-inline-start: 1px solid var(--line); }
  .ex-dirs { display: grid; gap: 4px; }
  .ex-dir { width: 100%; grid-template-columns: 18px minmax(0, 1fr) auto; border-color: transparent; border-radius: 12px; }
  .ex-dir[aria-pressed="true"] { border-color: var(--accent); }
}
@media (max-width: 599.98px) {
  .explorer { --ex-layout: phone; }
  .ex-stage { height: clamp(380px, calc(100svh - var(--header-h) - 76px), 760px); }
  .ex-hint, .ex-dirs { display: none; }
  .ex-dock { display: block; position: absolute; left: 0; right: 0; bottom: 0; padding: 28px max(12px, var(--safe-r)) calc(12px + var(--safe-b)) max(12px, var(--safe-l)); background: linear-gradient(to top, rgba(2, 6, 15, .88) 40%, rgba(2, 6, 15, 0)); }
  .ex-panel { gap: 14px; }
}
@media (max-height: 500px) and (orientation: landscape) {
  :root { --header-h: 53px; }
  .bar { min-height: 52px; }
  .brand-mark { height: 28px; }
  .hero-grid { min-height: 0; grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); padding-block: 18px 28px; gap: 28px; }
  .hero h1, :lang(ru) .hero h1 { font-size: clamp(1.9rem, 10svh, 3rem); max-width: 14em; }
  .hero .lead { font-size: 1rem; }
  .cta { margin-top: 18px; }
  .hero-stage { order: 0; padding-top: 0; }
  .stage-frame { aspect-ratio: 3 / 4; max-height: calc(100svh - var(--header-h) - 36px); width: auto; height: calc(100svh - var(--header-h) - 36px); }
  .explorer { --ex-layout: short; --ex-h: max(300px, calc(100svh - var(--header-h))); grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); height: var(--ex-h); }
  .ex-stage { height: auto; }
  .ex-panel { height: var(--ex-h); overflow: auto; border-top: 0; border-inline-start: 1px solid var(--line); padding-top: 18px; }
  .ex-panel .display-3 { font-size: 1.5rem; }
  .ex-panel #ex-title { top: -18px; }
  .ex-hint, .ex-dock { display: none; }
  .ex-dirs { display: grid; gap: 2px; }
  .ex-dir { width: 100%; grid-template-columns: 18px minmax(0, 1fr) auto; border-color: transparent; border-radius: 12px; padding: 8px 12px; }
  .ex-dir[aria-pressed="true"] { border-color: var(--accent); }
  /* a low stage keeps its height for the crystal: the tools stand in two columns at its sides, as icons
     (their names stay their accessible names and tooltips) */
  .ex-tools { top: 12px; bottom: 12px; flex-wrap: nowrap; align-items: flex-start; }
  .ex-nav, .ex-tools-end, .ex-zoom { flex-direction: column; flex-wrap: nowrap; }
  .ex-tools .stage-btn { width: 44px; padding: 0; gap: 0; justify-content: center; }
  .ex-tools .stage-btn .lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
  .ex-tools .ico { display: inline; }
}
/* foldables and dual screens that report their segments: keep each pane on its own segment, never across the fold */
@media (horizontal-viewport-segments: 2) {
  .explorer { --ex-layout: split; --ex-h: calc(100dvh - var(--header-h)); grid-template-columns: env(viewport-segment-width 0 0, 1fr) env(viewport-segment-width 1 0, 1fr); column-gap: calc(env(viewport-segment-left 1 0, 0px) - env(viewport-segment-right 0 0, 0px)); height: var(--ex-h); }
  .ex-stage { height: auto; }
  .ex-panel { height: var(--ex-h); overflow: auto; border-top: 0; }
  .hero-grid.wrap { max-width: none; padding-inline: 0; grid-template-columns: env(viewport-segment-width 0 0, 1fr) env(viewport-segment-width 1 0, 1fr); column-gap: calc(env(viewport-segment-left 1 0, 0px) - env(viewport-segment-right 0 0, 0px)); }
  .hero-grid > * { min-width: 0; padding-inline: max(20px, var(--safe-start)) 20px; box-sizing: border-box; }
  .hero-grid .stage-frame { max-width: 100%; }
}
@media (vertical-viewport-segments: 2) {
  .explorer { --ex-layout: stack; grid-template-columns: minmax(0, 1fr); height: auto; row-gap: calc(env(viewport-segment-top 0 1, 0px) - env(viewport-segment-bottom 0 0, 0px)); }
  .ex-stage { height: calc(env(viewport-segment-height 0 0, 54svh) - var(--header-h)); }
}
/* touch: comfortable targets in the header and menu */
@media (pointer: coarse) {
  .lang-menu > summary, .lang-list a { min-height: 44px; }
  .theme button { width: 44px; height: 44px; }
  .btn-sm { min-height: 44px; }
  .dir-projects a { min-height: 44px; align-items: center; padding-block: 4px; }
  .show-in, .crumb a, .foot ul:not(.lang-foot) a, .lang-foot a { display: inline-flex; align-items: center; min-height: 44px; }
  .dir-nav a { min-height: 44px; }
  .mail-link, .mail-big { display: inline-block; padding-block: 8px; }
  .filter label { min-height: 44px; }
  .filter input { width: 22px; height: 22px; }
  .suggest .btn, .brand { min-height: 44px; }
  .prow-name a, .open-card h3 a { display: inline-flex; align-items: center; min-height: 44px; }
  .foot-legal a { display: inline-block; padding-block: 12px; }
}
@media print { .site-header, .site-footer, .suggest, .filter, .explorer, .stage-enter, .organism, .organism-contact { display: none !important; } .hero[data-mode="inside"] .hero-grid { display: grid !important; } body { background: #fff; color: #000; } *, *::before, *::after { animation: none !important; } }
