/* ==========================================================================
   Design tokens — extracted from apple.com/iphone-17-pro at 393px viewport
   ========================================================================== */

:root {
  /* Surfaces */
  --bg-base: #000000;
  --bg-alt: #1d1d1f;
  --bg-tile: #1d1d1f;
  --bg-tile-on-alt: #000000;

  /* Text: neutral base, near-white emphasis. Contrast step is deliberately small. */
  --text-primary: #f5f5f7;
  --text-body: #a1a1a6;
  --text-muted: #86868b;
  --text-dim: #6e6e73;

  --accent: #ff791b;
  --link: #2997ff;

  --hairline: rgba(245, 245, 247, 0.10);

  /* Layout */
  --gutter: 24px;
  --content-max: 692px;
  --radius: 28px;
  --radius-sm: 18px;
  --card-w: clamp(258px, calc(100vw - 69px), 340px);
  --card-gap: 20px;

  --section-pt: 96px;
  --section-pb: 96px;
  --block-gap: 72px;

  --nav-bar-h: 52px;
  --nav-inset: 8px;
  --nav-side: 12px;
  --nav-h: calc(var(--nav-bar-h) + var(--nav-inset));
  --nav-w: min(100% - (var(--nav-side) * 2), calc(var(--content-max) + 40px));

  --ease: cubic-bezier(0.28, 0.11, 0.32, 1);
}

/* ==========================================================================
   Reset
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 12px);
}

body {
  margin: 0;
  background: var(--bg-base);
  color: var(--text-body);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.4705;
  letter-spacing: -0.374px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img,
picture,
video {
  display: block;
  max-width: 100%;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

a {
  color: var(--link);
  text-decoration: none;
}

/* ==========================================================================
   Typography scale
   ========================================================================== */

.t-eyebrow {
  font-size: 17px;
  line-height: 1.2353;
  font-weight: 600;
  letter-spacing: -0.374px;
  color: var(--accent);
}

.t-hero {
  font-size: clamp(34px, 10.2vw, 44px);
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: 0;
  background: linear-gradient(180deg, #4d51bd 0%, #c3c9ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.t-headline {
  font-size: clamp(28px, 8.1vw, 32px);
  line-height: 1.125;
  font-weight: 600;
  letter-spacing: 0.128px;
  color: var(--text-primary);
}

.t-section {
  font-size: clamp(26px, 7.1vw, 28px);
  line-height: 1.1428;
  font-weight: 600;
  letter-spacing: 0.196px;
  background: linear-gradient(180deg, #4d51bd 0%, #c3c9ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.t-manifesto {
  font-size: 24px;
  line-height: 1.3334;
  font-weight: 600;
  letter-spacing: 0.216px;
  color: var(--text-primary);
}

.t-card-head {
  font-size: 21px;
  line-height: 1.1905;
  font-weight: 600;
  letter-spacing: 0.231px;
  color: var(--text-primary);
}

.t-subhead {
  font-size: 19px;
  line-height: 1.2105;
  font-weight: 600;
  letter-spacing: 0.228px;
  color: var(--text-primary);
}

.t-body {
  font-size: 17px;
  line-height: 1.4705;
  font-weight: 400;
  letter-spacing: -0.374px;
}

.t-body-sm {
  font-size: 14px;
  line-height: 1.4285;
  font-weight: 400;
  letter-spacing: -0.224px;
}

.t-caption {
  font-size: 12px;
  line-height: 1.3334;
  font-weight: 400;
  letter-spacing: -0.12px;
  color: var(--text-dim);
}

/* Emphasis: the one contrast step that carries meaning across the whole site. */
b,
strong,
.hl {
  font-weight: 600;
  color: var(--text-primary);
}

.text-soft {
  color: #d2d2d7;
}

.text-grad {
  background: linear-gradient(180deg, #4d51bd 0%, #c3c9ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

/* ==========================================================================
   Layout primitives
   ========================================================================== */

.row {
  width: min(100% - (var(--gutter) * 2), var(--content-max));
  margin-inline: auto;
}

.section {
  padding-top: var(--section-pt);
  padding-bottom: var(--section-pb);
  background: var(--bg-base);
}

.section--alt {
  background: var(--bg-alt);
  --bg-tile: var(--bg-tile-on-alt);
}

.section + .section {
  padding-top: var(--section-pt);
}

.block + .block {
  margin-top: var(--block-gap);
}

#s8-logic > .block + .row {
  margin-top: var(--block-gap);
}

.copy > p + p {
  margin-top: 1em;
}

.copy > p.p-follow {
  position: relative;
  margin-top: 0.85em;
}

.copy > p.p-follow > b.text-grad {
  display: block;
  box-decoration-break: slice;
  -webkit-box-decoration-break: slice;
}

.copy > p.p-follow::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 0;
  bottom: 0;
  width: 2px;
  border-radius: 2px;
  background: var(--accent);
}

.copy > p.p-apart {
  margin-top: 48px;
}

.copy > p.p-aside {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.4285;
  letter-spacing: -0.224px;
  color: var(--text-dim);
}

.copy {
  color: var(--text-body);
}

/* ==========================================================================
   Local navigation
   ========================================================================== */

.localnav {
  position: sticky;
  top: 0;
  z-index: 9990;
  height: var(--nav-h);
  padding-top: var(--nav-inset);
  pointer-events: none;
}

.localnav-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: var(--nav-w);
  height: var(--nav-bar-h);
  margin-inline: auto;
  padding: 0 20px 0 22px;
  gap: 12px;
  border: 1px solid var(--hairline);
  border-radius: 22px;
  background: rgba(0, 0, 0, 0.52);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  pointer-events: auto;
}

/* The current heading slides vertically in the direction the page scrolls.
   Text repeats the on-page heading; long ones wrap to two smaller lines. */
.localnav-title {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  height: 40px;
  overflow: hidden;
  font-size: 17px;
  font-weight: 500;
  line-height: 20px;
  letter-spacing: -0.374px;
  color: #d2d2d7;
}

.localnav-title-text.is-long {
  font-size: 14px;
  line-height: 18px;
  letter-spacing: -0.15px;
}

.localnav-title-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  will-change: transform, opacity;
}

.localnav-title-line {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.localnav-title b {
  font-weight: 600;
  color: #fff;
}

.localnav-title .is-grad {
  font-weight: 600;
  background: linear-gradient(180deg, #4d51bd 0%, #c3c9ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

/* Lock only the root. body keeps overflow-x: hidden by default; once html is
   no longer visible that value stops propagating to the viewport and turns
   body into its own scroll container, so the sticky header would jump back to
   the top of the document. html clipping covers both axes meanwhile. */
html.nav-locked {
  overflow: hidden;
}

html.nav-locked body {
  overflow: visible;
}

/* Full-screen cosmos behind the open menu, same sky as the interludes. */
.localnav > .nav-sky {
  position: fixed;
  inset: 0;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s var(--ease), visibility 0.3s;
}

.localnav > .nav-sky::before,
.localnav > .nav-sky::after {
  animation-play-state: paused;
}

.localnav[data-open="true"] > .nav-sky {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.localnav[data-open="true"] > .nav-sky::before,
.localnav[data-open="true"] > .nav-sky::after {
  animation-play-state: running;
}

.localnav-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: -0.12px;
  color: var(--text-muted);
  flex: 0 0 auto;
}

.localnav-toggle .chev {
  width: 8px;
  height: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 0.3s var(--ease);
}

.localnav[data-open="true"] .localnav-toggle .chev {
  transform: rotate(-135deg) translate(-2px, -2px);
}

.localnav-menu {
  position: fixed;
  top: calc(var(--nav-h) + 6px);
  left: 0;
  right: 0;
  width: var(--nav-w);
  margin-inline: auto;
  max-height: calc(100dvh - var(--nav-h) - 18px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  border-radius: 22px;
  pointer-events: auto;
  border: 1px solid var(--hairline);
  background: rgba(0, 0, 0, 0.52);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  padding: 8px 0 32px;
  transform: translateY(-8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s;
}

.localnav[data-open="true"] .localnav-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.localnav-menu a {
  display: block;
  padding: 14px 0;
  font-size: 17px;
  font-weight: 400;
  letter-spacing: -0.374px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--hairline);
}

.localnav-menu a .num {
  display: inline-block;
  width: 30px;
  color: var(--text-dim);
  font-size: 14px;
}

.localnav-menu a.nav-sub {
  padding: 8px 0 8px 30px;
  font-size: 15px;
  color: var(--text-body);
  border-bottom-color: rgba(245, 245, 247, 0.06);
}

.localnav-menu a.nav-sub .num {
  width: 44px;
  font-size: 12px;
}

.nav-group-bar {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--hairline);
}

.nav-group-bar > a {
  flex: 1;
  min-width: 0;
  border-bottom: none;
  padding-right: 8px;
}

.nav-group-toggle {
  flex: 0 0 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
}

.nav-group-toggle .chev {
  width: 8px;
  height: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 0.3s var(--ease);
}

.nav-group[data-open="true"] > .nav-group-bar .nav-group-toggle .chev {
  transform: rotate(-135deg) translate(-2px, -2px);
}

.nav-group-panel[hidden] {
  display: none;
}

.localnav-menu a.nav-sub--deep {
  padding-left: 54px;
}

.localnav-menu a.nav-sub--deep .num {
  width: 52px;
}

.nav-group--nested .nav-group-bar {
  border-bottom-color: rgba(245, 245, 247, 0.06);
}

.block[id],
.gcard[id],
.story[id],
.section[id],
.gallery-wrap[id],
.interlude[id] {
  scroll-margin-top: calc(var(--nav-h) + 16px);
}

/* ==========================================================================
   Hero
   ========================================================================== */

.section--hero {
  padding-top: 40px;
  padding-bottom: var(--section-pb);
}

.hero-head {
  text-align: center;
}

.hero-head .t-eyebrow {
  margin-bottom: 8px;
}

.hero-media {
  margin-top: 32px;
  margin-bottom: 40px;
}

/* ==========================================================================
   Section header
   ========================================================================== */

.section-header {
  margin-bottom: 32px;
}

.section-lead-media {
  margin-bottom: 40px;
}

.section-header .t-eyebrow {
  margin-bottom: 6px;
}

.section-header .section-sub {
  margin-top: 14px;
  color: var(--text-muted);
  max-width: 34em;
}

/* ==========================================================================
   Story block (long-form screen)
   ========================================================================== */

.story .story-title {
  margin-bottom: 28px;
}

.t-headline.story-title {
  margin-bottom: 28px;
}

.story-title--sub {
  font-size: 22px;
  line-height: 1.18;
  letter-spacing: 0.18px;
}

.t-headline.story-title.story-title--sub {
  margin-bottom: 12px;
}

.story .media {
  margin-bottom: 28px;
}

.t-headline.story-title + .media,
.gap-after-title {
  margin-top: 0;
}

.row:has(> .t-headline.story-title) + .gallery-wrap {
  margin-top: 0;
}

/* ==========================================================================
   Media placeholder slots
   ========================================================================== */

.media {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(245, 245, 247, 0.07), transparent 62%),
    linear-gradient(180deg, #141416 0%, #0a0a0b 100%);
  box-shadow: inset 0 0 0 1px var(--hairline);
  display: grid;
  place-items: center;
  isolation: isolate;
}

.section--alt .media {
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(245, 245, 247, 0.06), transparent 62%),
    linear-gradient(180deg, #0e0e10 0%, #050506 100%);
}

.media--hero {
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
}

.media--square {
  aspect-ratio: 1 / 1;
  border-radius: 0;
  box-shadow: none;
}

.media--wide {
  aspect-ratio: 4 / 3;
}

.media--card {
  aspect-ratio: 4 / 3;
  border-radius: 0;
  box-shadow: none;
}

.media--band {
  aspect-ratio: 16 / 10;
}

.media__ph {
  display: grid;
  gap: 10px;
  justify-items: center;
  text-align: center;
  padding: 20px;
  max-width: 88%;
}

.media__id {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(245, 245, 247, 0.9);
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  background: rgba(245, 245, 247, 0.08);
  border: 1px solid rgba(245, 245, 247, 0.14);
  border-radius: 999px;
  padding: 7px 14px;
  word-break: break-all;
}

.media__hint {
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: -0.12px;
  color: var(--text-dim);
}

.media > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media.has-image .media__ph {
  display: none;
}

/* ==========================================================================
   Gallery (horizontal carousel)
   ========================================================================== */

.gallery-wrap {
  margin-top: 8px;
}

.gallery-wrap + .block {
  margin-top: var(--block-gap);
}

.gallery {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-padding-inline-start: var(--gutter);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.gallery::-webkit-scrollbar {
  display: none;
}

.gallery-track {
  display: flex;
  align-items: stretch;
  gap: var(--card-gap);
  padding-inline-start: max(var(--gutter), calc((100% - var(--content-max)) / 2));
  padding-inline-end: 0;
}

/* Конечный padding у flex-трека внутри прокрутки не создаёт прокручиваемое
   место, и последняя карточка встаёт в правый край. Зазор равен боковому
   полю колонки, тому же, что у ведущего изображения над каруселью. */
.gallery-track::after {
  content: "";
  flex: 0 0 max(var(--gutter), calc((100vw - var(--content-max)) / 2));
  margin-inline-start: calc(-1 * var(--card-gap));
}

.gcard {
  flex: 0 0 auto;
  width: var(--card-w);
  scroll-snap-align: start;
  position: relative;
}

.card {
  height: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-tile);
  display: flex;
  flex-direction: column;
}

/* Text-only tile: copy pinned to the bottom, mirroring Apple's caption offset. */
.card--text {
  justify-content: flex-end;
  min-height: 250px;
  padding: 28px;
}

.card--text .card-body {
  color: var(--text-body);
}

.card--text .card-body > * + * {
  margin-top: 10px;
}

.card--text .card-list {
  margin-top: 14px;
  color: var(--text-body);
}

/* Бренды секции 8: ширина обычная. Слот сверху на 20% ниже удвоенного 4:3 и одного размера в каждой карточке. */
#s8-brands .card--text {
  justify-content: flex-start;
  min-height: 0;
  padding: 0;
}

#s8-brands .card--text .media--card {
  flex: 0 0 auto;
  width: 100%;
  aspect-ratio: 5 / 6;
}

#s8-brands .card--text .card-body {
  padding: 22px 28px 28px;
}

/* Media tile: the image absorbs surplus height so copy stays pinned to the
   bottom edge across every card in a set. */
.card--media {
  justify-content: flex-end;
}

.card--media .media--card {
  flex: 1 1 auto;
  aspect-ratio: auto;
  min-height: 232px;
}

.card--media .media--square {
  flex: 0 0 auto;
  aspect-ratio: 1 / 1;
  min-height: 0;
}

.card--split .card-body > * + * {
  margin-top: 10px;
}

.card--split .t-card-head:nth-of-type(2) {
  margin-top: 22px;
}

.card--media .card-body {
  flex: 0 0 auto;
  padding: 26px 28px 30px;
  color: var(--text-body);
}

.card--media .card-body > * + * {
  margin-top: 12px;
}

.card-body .story-more p + p {
  margin-top: 12px;
}

.card--media .card-body .t-body-sm + .t-body-sm {
  margin-top: 12px;
}

.prose-ol .prose-list {
  margin-top: 8px;
}

#s3-cluster .card-title,
#s3-other .card-title {
  font-size: 19px;
  line-height: 1.22;
}

.dept-label {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
}

.dept-label--lead {
  display: block;
  margin-bottom: 2px;
}

#s3-cluster .card-list,
#s3-other .card-list {
  gap: 0;
}

#s3-cluster .card-list li,
#s3-other .card-list li {
  font-size: 14px;
  line-height: 1.4285;
  letter-spacing: -0.224px;
}

.card-list {
  display: grid;
  gap: 14px;
  margin-top: 4px;
}

.card-list--hub {
  margin-top: 22px;
  gap: 8px;
}

.name-list {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.name-list li {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 17px;
  line-height: 1.35;
  letter-spacing: -0.3px;
}

.card-list li {
  position: relative;
  padding-left: 16px;
  font-size: 15px;
  line-height: 1.45;
  letter-spacing: -0.2px;
}

.card-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-dim);
}

.card-list .lead {
  display: block;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 3px;
}

/* Dot navigation */
.dotnav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding-top: 28px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 10px;
  background: rgba(245, 245, 247, 0.25);
  transition: width 0.32s var(--ease), background-color 0.32s var(--ease);
}

.dot.current {
  width: 32px;
  background: rgba(245, 245, 247, 0.8);
}

/* ==========================================================================
   Stacked tiles (non-carousel card set)
   ========================================================================== */

.tile-stack {
  display: grid;
  gap: var(--card-gap);
}

.tile-stack .card {
  min-height: 0;
}

.tile-stack .card--text {
  justify-content: flex-start;
  min-height: 0;
  padding: 32px 28px;
}

/* Stacked tiles are full width, so the media becomes a fixed band rather than
   a flexible filler. */
.tile-stack .card--media {
  justify-content: flex-start;
}

.tile-stack .card--media .media--card {
  flex: 0 0 auto;
  aspect-ratio: 16 / 10;
  min-height: 0;
}

/* ==========================================================================
   Interlude — лирическое отступление на фоне космоса
   ========================================================================== */

/* Отступление живёт прямо в <section>, минуя .row, поэтому фон идёт от края
   до края и разрывает ритм чередующихся секций. */
.interlude {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin: var(--block-gap) 0;
  padding: 84px 0;
  background:
    radial-gradient(60% 18% at 50% 50%, rgba(170, 160, 255, 0.10), transparent 70%),
    linear-gradient(118deg, transparent 32%, rgba(150, 140, 240, 0.05) 44%, rgba(205, 195, 255, 0.09) 50%, rgba(150, 140, 240, 0.05) 56%, transparent 68%),
    radial-gradient(90% 70% at 18% 12%, rgba(88, 66, 168, 0.34), transparent 62%),
    radial-gradient(80% 60% at 85% 84%, rgba(26, 74, 138, 0.30), transparent 64%),
    linear-gradient(180deg, #05050a 0%, #0b0814 52%, #04040a 100%);
  border-block: 1px solid var(--hairline);
}

#s1 > .interlude {
  border-block: none;
}

.section > .interlude:last-child {
  margin-bottom: 0;
}

.section:has(> .interlude:last-child) {
  padding-bottom: 0;
}

/* Звёздное поле набрано точечными градиентами: ассетов не требует и не
   добавляет запросов. Мелкие звёзды лежат в плитках с попарно взаимно
   простыми размерами, поэтому повтор узора на высоте отступления не виден. */
.interlude::before,
.interlude::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.interlude::before {
  background-image:
    radial-gradient(circle at 11px 17px, rgba(245, 245, 247, 0.70) 0 0.3px, transparent 0.6px),
    radial-gradient(circle at 58px 43px, rgba(245, 245, 247, 0.55) 0 0.25px, transparent 0.55px),
    radial-gradient(circle at 83px 89px, rgba(245, 245, 247, 0.65) 0 0.3px, transparent 0.6px),
    radial-gradient(circle at 34px 76px, rgba(220, 225, 255, 0.60) 0 0.25px, transparent 0.55px),

    radial-gradient(circle at 23px 101px, rgba(245, 245, 247, 0.80) 0 0.35px, transparent 0.7px),
    radial-gradient(circle at 97px 29px, rgba(245, 245, 247, 0.65) 0 0.3px, transparent 0.6px),
    radial-gradient(circle at 131px 118px, rgba(200, 210, 255, 0.75) 0 0.35px, transparent 0.7px),
    radial-gradient(circle at 66px 62px, rgba(245, 245, 247, 0.50) 0 0.25px, transparent 0.55px),

    radial-gradient(circle at 47px 157px, rgba(245, 245, 247, 0.90) 0 0.4px, transparent 0.8px),
    radial-gradient(circle at 181px 53px, rgba(255, 236, 214, 0.85) 0 0.4px, transparent 0.8px),
    radial-gradient(circle at 139px 191px, rgba(245, 245, 247, 0.70) 0 0.3px, transparent 0.65px),
    radial-gradient(circle at 211px 137px, rgba(210, 215, 255, 0.75) 0 0.35px, transparent 0.7px),

    radial-gradient(circle at 73px 241px, rgba(245, 245, 247, 0.95) 0 0.45px, transparent 0.9px),
    radial-gradient(circle at 263px 89px, rgba(245, 245, 247, 0.85) 0 0.4px, transparent 0.8px),
    radial-gradient(circle at 197px 271px, rgba(190, 200, 255, 0.90) 0 0.45px, transparent 0.9px),

    radial-gradient(circle at 41px 9px, rgba(245, 245, 247, 0.60) 0 0.25px, transparent 0.55px),
    radial-gradient(circle at 7px 63px, rgba(245, 245, 247, 0.70) 0 0.3px, transparent 0.6px),
    radial-gradient(circle at 71px 97px, rgba(215, 220, 255, 0.55) 0 0.25px, transparent 0.55px),
    radial-gradient(circle at 79px 37px, rgba(245, 245, 247, 0.65) 0 0.3px, transparent 0.6px),

    radial-gradient(circle at 113px 71px, rgba(245, 245, 247, 0.75) 0 0.35px, transparent 0.7px),
    radial-gradient(circle at 29px 13px, rgba(255, 238, 220, 0.60) 0 0.3px, transparent 0.6px),
    radial-gradient(circle at 151px 109px, rgba(245, 245, 247, 0.55) 0 0.25px, transparent 0.55px),
    radial-gradient(circle at 53px 121px, rgba(205, 212, 255, 0.70) 0 0.3px, transparent 0.65px),

    radial-gradient(circle at 167px 19px, rgba(245, 245, 247, 0.85) 0 0.35px, transparent 0.75px),
    radial-gradient(circle at 19px 197px, rgba(245, 245, 247, 0.70) 0 0.3px, transparent 0.65px),
    radial-gradient(circle at 101px 229px, rgba(210, 215, 255, 0.80) 0 0.35px, transparent 0.7px),
    radial-gradient(circle at 187px 163px, rgba(245, 245, 247, 0.60) 0 0.25px, transparent 0.55px),

    radial-gradient(circle at 239px 191px, rgba(245, 245, 247, 0.90) 0 0.4px, transparent 0.8px),
    radial-gradient(circle at 131px 31px, rgba(255, 236, 214, 0.80) 0 0.35px, transparent 0.75px),
    radial-gradient(circle at 37px 251px, rgba(195, 205, 255, 0.85) 0 0.4px, transparent 0.8px);
  background-size:
    97px 103px, 97px 103px, 97px 103px, 97px 103px,
    149px 131px, 149px 131px, 149px 131px, 149px 131px,
    227px 211px, 227px 211px, 227px 211px, 227px 211px,
    307px 293px, 307px 293px, 307px 293px,
    89px 109px, 89px 109px, 89px 109px, 89px 109px,
    163px 127px, 163px 127px, 163px 127px, 163px 127px,
    199px 239px, 199px 239px, 199px 239px, 199px 239px,
    281px 257px, 281px 257px, 281px 257px;
  animation: interlude-twinkle-dust 4.3s ease-in-out infinite alternate;
}

/* Крупные звёзды разбиты на три группы, вперемешку по площади. Яркость
   группы — анимируемая переменная, поэтому группы мерцают по очереди внутри
   одного псевдоэлемента. Без поддержки @property звёзды просто горят ровно. */
@property --tw-1 { syntax: "<number>"; inherits: false; initial-value: 1; }
@property --tw-2 { syntax: "<number>"; inherits: false; initial-value: 1; }
@property --tw-3 { syntax: "<number>"; inherits: false; initial-value: 1; }

.interlude::after {
  background-image:
    radial-gradient(circle at 12% 9%, rgba(255, 255, 255, var(--tw-1)) 0 1.1px, rgba(180, 190, 255, calc(0.55 * var(--tw-1))) 1.9px, rgba(150, 160, 255, calc(0.18 * var(--tw-1))) 3.4px, transparent 6px),
    radial-gradient(circle at 93% 51%, rgba(255, 255, 255, var(--tw-1)) 0 1.2px, rgba(180, 190, 255, calc(0.60 * var(--tw-1))) 2.1px, rgba(150, 160, 255, calc(0.20 * var(--tw-1))) 3.8px, transparent 7px),
    radial-gradient(circle at 38% 95%, rgba(255, 255, 255, var(--tw-1)) 0 0.9px, rgba(180, 190, 255, calc(0.50 * var(--tw-1))) 1.7px, rgba(150, 160, 255, calc(0.16 * var(--tw-1))) 3.2px, transparent 5.5px),

    radial-gradient(circle at 81% 14%, rgba(255, 255, 255, var(--tw-2)) 0 1.3px, rgba(180, 190, 255, calc(0.60 * var(--tw-2))) 2.1px, rgba(150, 160, 255, calc(0.20 * var(--tw-2))) 3.8px, transparent 7px),
    radial-gradient(circle at 7% 44%, rgba(255, 255, 255, var(--tw-2)) 0 1px, rgba(180, 190, 255, calc(0.50 * var(--tw-2))) 1.8px, rgba(150, 160, 255, calc(0.16 * var(--tw-2))) 3.3px, transparent 6px),
    radial-gradient(circle at 76% 88%, rgba(255, 255, 255, var(--tw-2)) 0 1px, rgba(180, 190, 255, calc(0.55 * var(--tw-2))) 1.8px, rgba(150, 160, 255, calc(0.18 * var(--tw-2))) 3.3px, transparent 6px),

    radial-gradient(circle at 46% 27%, rgba(255, 255, 255, var(--tw-3)) 0 0.9px, rgba(255, 215, 175, calc(0.55 * var(--tw-3))) 1.7px, rgba(255, 190, 140, calc(0.18 * var(--tw-3))) 3.2px, transparent 5.5px),
    radial-gradient(circle at 63% 66%, rgba(255, 255, 255, var(--tw-3)) 0 0.9px, rgba(255, 215, 175, calc(0.50 * var(--tw-3))) 1.7px, rgba(255, 190, 140, calc(0.16 * var(--tw-3))) 3.2px, transparent 5.5px),
    radial-gradient(circle at 22% 79%, rgba(255, 255, 255, var(--tw-3)) 0 1.3px, rgba(180, 190, 255, calc(0.60 * var(--tw-3))) 2.1px, rgba(150, 160, 255, calc(0.20 * var(--tw-3))) 3.8px, transparent 7px);
  animation:
    interlude-twinkle-1 5.2s ease-in-out infinite,
    interlude-twinkle-2 5.2s ease-in-out -1.73s infinite,
    interlude-twinkle-3 5.2s ease-in-out -3.47s infinite;
}

/* Мелкие частицы и группы крупных звёзд мерцают с разными периодами и
   фазами, поэтому небо не пульсирует целиком в один такт. */
@keyframes interlude-twinkle-1 {
  0%, 100% { --tw-1: 1; }
  45%      { --tw-1: 0.12; }
  60%      { --tw-1: 0.35; }
}

@keyframes interlude-twinkle-2 {
  0%, 100% { --tw-2: 1; }
  45%      { --tw-2: 0.12; }
  60%      { --tw-2: 0.35; }
}

@keyframes interlude-twinkle-3 {
  0%, 100% { --tw-3: 1; }
  45%      { --tw-3: 0.12; }
  60%      { --tw-3: 0.35; }
}

@keyframes interlude-twinkle-dust {
  from { opacity: 1; }
  to   { opacity: 0.35; }
}

.interlude-mark {
  display: block;
  width: 28px;
  height: 1px;
  margin: 0 auto 22px;
  background: rgba(245, 245, 247, 0.35);
}

.interlude-quote {
  text-align: center;
  text-wrap: balance;
  color: var(--text-primary);
  font-size: 17px;
  line-height: 1.5;
  letter-spacing: -0.35px;
  font-weight: 300;
  font-style: normal;
}

.interlude-quote + .interlude-quote {
  margin-top: 1em;
}

.interlude-quote--sm {
  font-size: 15px;
  line-height: 1.47;
  letter-spacing: -0.24px;
}

.interlude-factors {
  margin: 16px 0;
  padding-left: 1.35em;
  text-align: left;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 300;
  line-height: 1.47;
  letter-spacing: -0.24px;
  list-style: decimal;
}

.interlude-factors li + li {
  margin-top: 10px;
}

/* Длинное отступление читается колонкой, а не репликой по центру.
   По ширине на этой колонке строки растягиваются, поэтому край левый. */
.interlude--copy .interlude-quote,
.interlude--copy .interlude-factors,
.interlude--copy .interlude-factors li {
  text-align: start;
  text-wrap: pretty;
  hyphens: manual;
}

.interlude .text-btn {
  display: flex;
  width: fit-content;
  margin-top: 28px;
  margin-inline: auto;
}

/* Справка внутри отступления читается как текст, а не как реплика: прямое
   начертание, размер основного текста, выравнивание по левому краю. */
.interlude-note {
  margin-top: 26px;
  color: var(--text-primary);
  font-style: normal;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.2;
  text-align: left;
  letter-spacing: -0.2px;
}

.interlude-mark + .interlude-note {
  margin-top: 0;
}

.interlude-note + .interlude-note {
  margin-top: 1em;
}

.interlude-list {
  margin-top: 18px;
  text-align: left;
}

.interlude-list li {
  position: relative;
  padding-left: 20px;
  color: var(--text-body);
  font-size: 15px;
  line-height: 1.47;
  letter-spacing: -0.24px;
}

.interlude-list li + li {
  margin-top: 12px;
}

.interlude-list li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 9px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(245, 245, 247, 0.45);
}

/* ==========================================================================
   Footnote / WIP
   ========================================================================== */

.fnref {
  color: var(--accent);
  font-size: 0.78em;
  vertical-align: super;
  line-height: 0;
  padding-left: 1px;
}

.footnote {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--hairline);
  color: var(--text-dim);
  font-style: italic;
}

.badge-wip {
  display: inline-block;
  font-size: 12px;
  line-height: 1;
  letter-spacing: -0.12px;
  color: var(--accent);
  border: 1px solid rgba(255, 121, 27, 0.4);
  border-radius: 999px;
  padding: 6px 12px;
  margin-bottom: 18px;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.brand-link,
.term,
.dept-link {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.term {
  display: inline;
  text-align: left;
  cursor: pointer;
}

.brand-link,
.fnref {
  cursor: pointer;
}

.nowrap {
  white-space: nowrap;
}

.brand-link:focus-visible,
.term:focus-visible,
.dept-link:focus-visible,
.text-btn:focus-visible,
.back-link:focus-visible,
.gateway-go:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 3px;
  border-radius: 2px;
}

.dept-link {
  display: block;
  margin-top: 6px;
  font-size: 14px;
}

.p-lead {
  font-style: italic;
  font-weight: 600;
  color: var(--text-primary);
}

.is-future {
  opacity: 0.5;
}

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

.modal--full {
  padding: 0;
}

.modal--full .modal__panel {
  width: 100%;
  height: 100%;
  max-height: none;
  border-radius: 0;
  padding: calc(56px + env(safe-area-inset-top)) var(--gutter) calc(28px + env(safe-area-inset-bottom));
}

.modal--full .modal__panel > :not(.modal__x):not(.modal__back) {
  max-width: var(--content-max);
  margin-inline: auto;
}

.modal--full .modal__x,
.modal--full .modal__back {
  top: calc(14px + env(safe-area-inset-top));
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
}

.modal__panel {
  position: relative;
  width: min(100%, 560px);
  max-height: min(85vh, 720px);
  overflow: auto;
  background: #1d1d1f;
  border-radius: 28px;
  padding: 56px 24px 28px;
}

.modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  color: var(--link);
  font-size: 14px;
  line-height: 1.2;
}

.modal__body {
  margin-top: 16px;
}

.modal__body p + p,
.modal__body .story-more {
  margin-top: 1em;
}

.modal__body h3 {
  margin: 28px 0 10px;
}

.modal__body .prose-list li {
  padding-left: 16px;
}

.footer {
  background: var(--bg-base);
  border-top: 1px solid var(--hairline);
  padding: 40px 0 56px;
}

.footer p + p {
  margin-top: 10px;
}

/* ==========================================================================
   Scroll reveal
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  will-change: opacity, transform;
}

.reveal.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .interlude::before,
  .interlude::after {
    animation: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ==========================================================================
   Wider viewports — the layout stays mobile-first, just centred and capped.
   ========================================================================== */

/* ==========================================================================
   Views, gateway, subpages, glossary
   ========================================================================== */

[hidden] {
  display: none !important;
}

.gateway:not([hidden]) {
  position: relative;
  isolation: isolate;
  min-height: calc(100svh - var(--nav-h));
  display: grid;
  grid-template-rows: 1fr 1fr;
}

.gateway-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: 0;
  aspect-ratio: auto;
}

.gateway-media .media__hint {
  display: none;
}

.gateway-media .media__ph {
  padding: 0;
}

.gateway-path {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  padding: 28px var(--gutter) 32px;
  overflow: auto;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0.82) 72%);
}

.gateway-path + .gateway-path {
  border-top: 1px solid rgba(245, 245, 247, 0.16);
}

.gateway-kicker {
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.12px;
}

.gateway-title {
  color: var(--text-primary);
  font-size: 22px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.gateway-copy,
.gateway-micro {
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: -0.22px;
}

.gateway-copy {
  color: #d2d2d7;
}

.gateway-micro {
  color: var(--text-muted);
  font-style: italic;
}

.gateway-go {
  align-self: flex-start;
  margin-top: 6px;
  padding: 10px 18px;
  border-radius: 999px;
  background: #f5f5f7;
  color: #000;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.2px;
}

.page-bar {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 28px;
}

.back-link {
  color: var(--link);
  font-size: 17px;
}

.crumbs {
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1.4;
}

.crumbs a {
  color: var(--text-muted);
}

.crumbs [aria-current="page"] {
  color: var(--text-primary);
}

.wide-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 50px;
  margin-top: 24px;
  padding: 14px 20px;
  border-radius: 999px;
  background: #f5f5f7;
  color: #000;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.374px;
  transition: opacity 0.2s var(--ease);
}

.wide-btn:active {
  opacity: 0.8;
}

.wide-btn:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 3px;
}

.text-btn {
  display: inline-flex;
  margin-top: 18px;
  color: var(--link);
  font-size: 17px;
  line-height: 1.3;
  text-align: left;
}

.prose-list,
.prose-ol {
  margin-top: 14px;
}

.prose-list {
  display: grid;
  gap: 10px;
}

.prose-list li {
  position: relative;
  padding-left: 16px;
}

.prose-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-dim);
}

.prose-ol {
  list-style: decimal;
  padding-left: 1.25em;
}

.prose-ol li {
  display: list-item;
  margin-top: 12px;
}

.name-list--sub {
  margin-top: 8px;
  gap: 6px;
  padding-left: 14px;
}

.name-list--sub li {
  font-weight: 400;
  font-size: 15px;
  color: var(--text-body);
}

.tree-note {
  margin-top: 14px;
}

.tree-note + .tree-note {
  margin-top: 4px;
}

.chrono {
  display: grid;
  gap: 18px;
  margin-top: 8px;
}

.chrono-item {
  padding-left: 16px;
  border-left: 1px solid var(--hairline);
}

.s8-chrono-row {
  margin-top: 48px;
}

.chrono-item > p + p {
  margin-top: 12px;
}

.chrono-nest {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
}

.chrono-nest > li {
  position: relative;
  padding: 8px 0 8px 40px;
}

.chrono-nest > li::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--hairline);
}

.chrono-nest > li:last-child::before {
  bottom: auto;
  height: calc(8px + 0.72em);
}

.chrono-nest > li::after {
  content: "";
  position: absolute;
  left: 12px;
  top: calc(8px + 0.72em);
  width: 28px;
  height: 1px;
  background: var(--hairline);
}

.chrono-nest .chrono-nest {
  margin-top: 0;
}

.expand-panel {
  margin-top: 28px;
}

.expand-panel h3 {
  margin: 32px 0 12px;
}

.model-note {
  margin-bottom: 8px;
}

.table-scroll {
  overflow-x: auto;
  margin-top: 16px;
  -webkit-overflow-scrolling: touch;
}

.sheet-table {
  border-collapse: collapse;
  min-width: 560px;
  width: 100%;
  font-size: 13px;
  line-height: 1.35;
  letter-spacing: -0.12px;
}

.sheet-table th,
.sheet-table td {
  border-bottom: 1px solid var(--hairline);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

.sheet-table th {
  color: var(--text-primary);
  font-weight: 600;
}

.org {
  margin-top: 16px;
  padding: 16px;
  overflow-x: auto;
  border-radius: 16px;
  background: rgba(245, 245, 247, 0.04);
  color: var(--text-body);
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  font-size: 11px;
  line-height: 1.45;
  white-space: pre;
}

.nav-key {
  color: var(--accent);
  margin-left: 4px;
}

.nav-note .nav-key {
  margin-left: 0;
}

.nav-note {
  padding: 18px 0 0;
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1.4;
}

.footer-label {
  margin: 8px 0;
}

.footer-primary {
  display: block;
  padding: 14px 0;
  border-bottom: 1px solid var(--hairline);
  color: var(--text-primary);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.3px;
}

.footer-secondary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin: 18px 0 28px;
}

.footer-secondary a {
  color: var(--text-muted);
  font-size: 14px;
}

body[data-view="gateway"] .footer {
  display: none;
}

.modal__x {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(245, 245, 247, 0.1);
  color: var(--text-primary);
  font-size: 22px;
  line-height: 1;
}

.modal__media {
  margin-top: 16px;
}

.modal__hint {
  margin-top: 18px;
  color: var(--text-dim);
  font-style: italic;
}

.modal__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-top: 8px;
}

.modal__body ul,
.modal__body ol {
  margin-top: 12px;
}

.modal__body li + li {
  margin-top: 8px;
}

.modal__body li {
  padding-left: 0;
}

@media (min-width: 734px) {
  :root {
    --gutter: 32px;
    --section-pt: 120px;
    --section-pb: 120px;
    --card-w: 340px;
  }
}

/* Text-in-Card: text zone on top, media below, no overlap. */
.card--textin .card-body {
  padding: 26px 28px 18px;
}

.card--textin .card-body > * + * {
  margin-top: 12px;
}

.card--textin .media--card {
  flex: 0 0 auto;
  aspect-ratio: 4 / 3;
  min-height: 180px;
}

/* Storytelling Carousel: black field, full-width stage, text, dots. */
.story-carousel {
  background: #000;
  margin-top: var(--block-gap);
  padding-bottom: 8px;
}

.story-carousel .story-title {
  padding-top: 8px;
}

/* Product title sits above the lock frame, so the open card starts at the image. */
#s8-band > .row + #s8-product {
  margin-top: 0;
}

.story-carousel__stage .media--stage {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 0;
  box-shadow: none;
}

.story-carousel .gallery-track {
  gap: 0;
  padding-inline: 0;
}

.story-carousel .gallery-track::after {
  content: none;
}

.story-slide {
  min-height: 220px;
  padding: 28px var(--gutter) 8px;
  color: var(--text-body);
}

.story-slide .t-card-head {
  margin-bottom: 12px;
}

.story-carousel .media--stage video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.story-carousel--lead {
  margin-top: 32px;
}

.story-slide p + .t-card-head {
  margin-top: 22px;
}

#s8-popzis-more {
  margin-top: 22px;
}

#s8-popzis-more .t-subhead {
  margin-bottom: 12px;
}

#s8-popzis-more p + p {
  margin-top: 12px;
}

.story-slide .t-body-sm + .t-body-sm {
  margin-top: 12px;
}

/* Dark band: one black stretch inside a grey section, so consecutive
   storytelling blocks do not alternate black and grey every 72px. */
.band {
  background: #000;
  margin-top: var(--block-gap);
  padding: var(--block-gap) 0;
  --bg-tile: var(--bg-alt);
}

#s4 > .band {
  margin-top: calc(-1 * var(--section-pt));
  padding-top: var(--section-pt);
}

#s4-synergy > * + * {
  margin-top: var(--block-gap);
}

.band > :first-child {
  margin-top: 0;
}

.band > * + * {
  margin-top: var(--block-gap);
}

.band + .block,
.story-carousel + .block {
  margin-top: var(--block-gap);
}

.block-lede {
  margin-bottom: 28px;
}

/* Full-Bleed Lead */
.section-lead-media--bleed {
  margin-bottom: 40px;
}

.media--bleed {
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 80vh;
  border-radius: 0;
  box-shadow: none;
}

/* Editorial Card: no tile, rounded media, one paragraph with a white lead. */
.card--editorial {
  height: auto;
  background: none;
  border-radius: 0;
  overflow: visible;
}

.media--portrait {
  aspect-ratio: 4 / 5;
}

.card--editorial .card-body {
  padding: 22px 2px 0;
  color: var(--text-body);
  font-size: 17px;
  line-height: 1.4705;
  letter-spacing: -0.374px;
}

.card--editorial .card-body b:not(.ed-lead) {
  color: inherit;
}

.ed-lead {
  color: var(--text-primary);
  font-weight: 600;
}

/* Badge Carousel */
.badges .gcard {
  width: 200px;
}

.badge {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px 20px 24px;
  border-radius: var(--radius-sm);
  background: var(--bg-tile);
}

.badge-num {
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge-title {
  color: var(--text-primary);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.3px;
}

.badge p {
  font-size: 14px;
  line-height: 1.4285;
  letter-spacing: -0.224px;
  color: var(--text-body);
}

/* Tiles */
.tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.tile {
  width: 100%;
  height: 100%;
  min-height: 168px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 18px;
  text-align: left;
  border-radius: var(--radius-sm);
  background: var(--bg-tile);
}

.tile-title {
  color: var(--text-primary);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.3px;
}

.tile-copy {
  color: var(--text-body);
  font-size: 14px;
  line-height: 1.4;
}

.tile-more {
  margin-top: auto;
  color: var(--link);
  font-size: 14px;
}

.tile:focus-visible,
.more-link:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 3px;
}

/* Inline «ещё» */
.more-link {
  display: inline;
  color: var(--link);
}

.more-link[hidden] {
  display: none;
}

/* Story card «ещё»: the text opens in place and a hairline frame outlines
   the whole carousel; layout and width do not change. */
.story-carousel {
  position: relative;
}

.story-carousel::after {
  content: "";
  position: absolute;
  inset: 0 calc(var(--gutter) / 2);
  z-index: 3;
  border: 1px solid rgba(245, 245, 247, 0.45);
  border-radius: 28px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.32s var(--ease);
}

.story-carousel.is-more {
  clip-path: inset(0 calc(var(--gutter) / 2) round 28px);
}

.story-carousel.is-more::after {
  opacity: 1;
}

.story-carousel.is-more .gallery {
  overflow-x: hidden;
}

.story-carousel.is-more .dotnav {
  opacity: 0.3;
  pointer-events: none;
}

.story-x {
  right: calc(var(--gutter) / 2 + 12px);
  z-index: 4;
  background: rgba(0, 0, 0, 0.55);
}

.card[data-more-root] {
  position: relative;
  transition: box-shadow 0.7s var(--ease);
}

.card[data-more-root] > .story-x {
  position: absolute;
  top: 14px;
  right: 16px;
  z-index: 4;
}

.card[data-more-root].is-more {
  z-index: 2;
  box-shadow:
    0 -12px 28px rgba(77, 81, 189, 0.45),
    0 -4px 12px rgba(195, 201, 255, 0.28),
    0 12px 28px rgba(77, 81, 189, 0.45),
    0 4px 12px rgba(195, 201, 255, 0.28);
}

.gcard:has(> .card[data-more-root].is-more) {
  padding-bottom: var(--more-edge, 24px);
}

.gallery:has(.card[data-more-root].is-more) {
  position: relative;
  z-index: 2;
  margin-top: calc(-1 * var(--more-edge, 24px));
  padding-top: var(--more-edge, 24px);
  scroll-snap-type: none;
}

/* Карусель больше не обрезает свечение. Ряд держится сдвигом, пока overflow visible. */
.gallery.is-glow {
  overflow: visible;
}

.gallery.is-glow .gallery-track {
  transform: translateX(calc(-1 * var(--lock-x, 0px)));
}

.gallery-wrap:has(> .gallery.is-glow) {
  overflow-x: clip;
  overflow-y: visible;
}

.gallery:has(.card[data-more-root].is-more) .gcard {
  align-self: flex-start;
  height: var(--row-h);
}

.gallery:has(.card[data-more-root].is-more) .gcard:has(> .card.is-more) {
  height: auto;
}

.gallery:has(.card[data-more-root].is-more) .gcard:not(:has(> .card.is-more)) {
  pointer-events: none;
}

.gallery:has(.card[data-more-root].is-more) .gcard:not(:has(> .card.is-more)) .card {
  filter: brightness(0.12);
}

.gallery:has(.card[data-more-root].is-more) .gcard:not(:has(> .card.is-more))::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.92);
  pointer-events: none;
  z-index: 5;
  animation: more-dim 0.7s var(--ease) both;
}

@keyframes more-dim {
  from { opacity: 0; }
  to { opacity: 1; }
}

.gallery-wrap:has(.card[data-more-root].is-more) .dotnav {
  opacity: 0.3;
  pointer-events: none;
}

/* Close cross drawn with two strokes so it sits in the exact centre. */
.modal__x {
  font-size: 0;
}

.modal__x::before,
.modal__x::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 1.5px;
  border-radius: 1px;
  background: currentColor;
}

.modal__x::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.modal__x::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

/* Back chevron for a sheet opened from a term inside another sheet: no circle. */
.modal__back {
  position: absolute;
  top: 14px;
  left: 12px;
  width: 32px;
  height: 32px;
  color: var(--text-primary);
}

.modal__back::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 11px;
  height: 11px;
  border-left: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translate(-25%, -50%) rotate(45deg);
}

.modal__back:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
  border-radius: 50%;
}

/* Menu: idle items gray, the section on screen stays white. */
.localnav-menu a {
  position: relative;
  color: var(--text-muted);
}

.localnav-menu a.nav-sub {
  color: var(--text-dim);
}

.localnav-menu a.is-key .nav-name {
  background: linear-gradient(180deg, #4d51bd 0%, #c3c9ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.localnav-menu a.is-current {
  font-weight: 600;
  color: var(--text-primary);
}

.localnav-menu a.is-current:not(.nav-sub)::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  border-radius: 2px;
  background: var(--accent);
}

.localnav-menu a.is-current .num {
  color: var(--accent);
}

.localnav-menu a.is-read .num {
  color: rgba(255, 121, 27, 0.5);
}

.localnav-menu a.nav-sub.is-current {
  color: var(--text-primary);
}

