/* Homepage materials editorial block v2 */
#insights.materials-editorial {
  --materials-cyan: var(--ai-cyan, #5de2ff);
  --materials-violet: #b8a7dc;
  --materials-surface: #0b0c0f;
  --materials-surface-raised: #101116;
  --materials-line: rgba(255, 255, 255, 0.1);
  --materials-text: rgba(255, 255, 255, 0.96);
  --materials-muted: rgba(255, 255, 255, 0.62);
  position: relative;
  display: block;
  width: 100%;
  padding: clamp(92px, 9vw, 144px) 0;
  border-top: 1px solid var(--materials-line);
  background:
    radial-gradient(circle at 18% 8%, rgba(184, 167, 220, 0.065), transparent 32%),
    linear-gradient(180deg, #07080a 0%, #090a0d 100%);
  overflow: clip;
  isolation: isolate;
}

#insights.materials-editorial::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(90deg, transparent 0, rgba(255,255,255,0.018) 50%, transparent 100%);
  pointer-events: none;
}

.materials-editorial-shell {
  width: min(100% - 80px, 1400px);
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

.materials-editorial-header {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(320px, 5fr);
  grid-template-areas:
    "heading intro"
    "heading archive";
  column-gap: clamp(40px, 6vw, 96px);
  row-gap: 18px;
  align-items: end;
}

.materials-editorial-heading { grid-area: heading; max-width: 760px; }
.materials-editorial-intro { grid-area: intro; max-width: 560px; align-self: end; }
.materials-editorial-archive { grid-area: archive; justify-self: start; }

.materials-editorial-eyebrow,
.materials-editorial-label {
  margin: 0;
  color: var(--materials-cyan);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  line-height: 1.5;
  text-transform: uppercase;
}

.materials-editorial-eyebrow { margin-bottom: 18px; }

.materials-editorial-heading h2 {
  margin: 0;
  max-width: 780px;
  color: var(--materials-text);
  font-size: clamp(42px, 5.2vw, 76px);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 0.98;
  text-wrap: balance;
}

.materials-editorial-intro p {
  margin: 0;
  color: var(--materials-muted);
  font-size: clamp(16px, 1.45vw, 19px);
  line-height: 1.72;
}

.materials-editorial-archive,
.materials-editorial-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  color: var(--materials-cyan);
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.09em;
  line-height: 1.3;
  text-transform: uppercase;
}

.materials-editorial-archive {
  gap: 12px;
  margin-top: 4px;
  padding: 0 2px;
}

.materials-editorial-archive span,
.materials-editorial-link span {
  display: inline-block;
  transition: transform 220ms ease;
}

.materials-editorial-layout {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(360px, 5fr);
  gap: 22px;
  min-width: 0;
  margin-top: clamp(34px, 4.5vw, 66px);
}

.materials-editorial-secondary {
  display: grid;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 22px;
  min-width: 0;
}

.materials-editorial-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--materials-line);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(255,255,255,0.028), rgba(255,255,255,0.012)), var(--materials-surface);
  padding: clamp(28px, 3.2vw, 48px);
  display: flex;
  flex-direction: column;
  opacity: 1;
  transform: none;
  transition: border-color 260ms ease, background-color 260ms ease;
}

.materials-editorial-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, rgba(184,167,220,0.72), rgba(93,226,255,0.22), transparent 76%);
  opacity: 0.55;
}

.materials-editorial-card--featured {
  min-height: 610px;
  background:
    linear-gradient(150deg, rgba(184,167,220,0.07), transparent 42%),
    var(--materials-surface-raised);
}

.materials-editorial-card--secondary {
  min-height: 294px;
  padding: clamp(26px, 2.5vw, 38px);
}

.materials-editorial-number {
  position: absolute;
  top: 8px;
  right: 20px;
  color: #fff;
  font-size: clamp(92px, 10vw, 158px);
  font-weight: 800;
  letter-spacing: -0.08em;
  line-height: 1;
  opacity: 0.035;
  pointer-events: none;
  user-select: none;
}

.materials-editorial-card--secondary .materials-editorial-number {
  top: 4px;
  right: 16px;
  font-size: clamp(76px, 7vw, 112px);
}

.materials-editorial-label {
  margin-bottom: clamp(28px, 4vw, 54px);
  padding-right: 84px;
}

.materials-editorial-card--secondary .materials-editorial-label {
  margin-bottom: 24px;
  padding-right: 68px;
}

.materials-editorial-card h3 {
  margin: 0;
  max-width: 18ch;
  color: var(--materials-text);
  font-size: clamp(34px, 3.25vw, 52px);
  font-weight: 650;
  letter-spacing: -0.045em;
  line-height: 1.08;
  text-wrap: balance;
  overflow-wrap: break-word;
}

.materials-editorial-card--secondary h3 {
  max-width: 25ch;
  font-size: clamp(25px, 2.05vw, 32px);
  line-height: 1.14;
}

body.lang-ru .materials-editorial-card--featured h3 {
  max-width: 20ch;
  font-size: clamp(32px, 2.85vw, 47px);
  line-height: 1.12;
}

body.lang-ru .materials-editorial-card--secondary h3 {
  max-width: 29ch;
  font-size: clamp(23px, 1.72vw, 29px);
  line-height: 1.18;
}

.materials-editorial-summary {
  margin: 22px 0 0;
  max-width: 62ch;
  color: var(--materials-muted);
  font-size: 16px;
  line-height: 1.68;
}

.materials-editorial-card--featured .materials-editorial-summary {
  max-width: 54ch;
  font-size: clamp(16px, 1.35vw, 18px);
}

.materials-editorial-diagram {
  margin-top: auto;
  padding-top: 34px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  max-width: 100%;
  color: rgba(235, 229, 250, 0.78);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.5;
  text-transform: uppercase;
}

.materials-editorial-diagram--compact {
  gap: 7px 9px;
  font-size: 10px;
  letter-spacing: 0.065em;
}

.materials-editorial-diagram span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.materials-editorial-arrow {
  color: var(--materials-cyan);
  opacity: 0.74;
}

.materials-editorial-ledger {
  margin: auto 0 0;
  padding: 28px 0 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 20px;
  list-style: none;
}

.materials-editorial-ledger li {
  min-width: 0;
  padding: 11px 0;
  border-top: 1px solid rgba(255,255,255,0.09);
  color: rgba(255,255,255,0.66);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.04em;
  line-height: 1.35;
  text-transform: uppercase;
  overflow-wrap: break-word;
}

.materials-editorial-link {
  align-self: flex-start;
  gap: 10px;
  margin-top: 26px;
}

.materials-editorial-card--featured .materials-editorial-link { margin-top: 24px; }

.materials-editorial-archive:focus-visible,
.materials-editorial-link:focus-visible {
  outline: 2px solid var(--materials-cyan);
  outline-offset: 5px;
  border-radius: 4px;
}

@media (hover: hover) and (pointer: fine) {
  .materials-editorial-card:hover { border-color: rgba(255,255,255,0.19); }
  .materials-editorial-card--featured:hover { border-color: rgba(184,167,220,0.3); }
  .materials-editorial-archive:hover span,
  .materials-editorial-link:hover span { transform: translateX(4px); }
}

#insights.is-visible .materials-editorial-card {
  animation: materials-editorial-enter 680ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

#insights.is-visible .materials-editorial-secondary .materials-editorial-card:first-child { animation-delay: 80ms; }
#insights.is-visible .materials-editorial-secondary .materials-editorial-card:last-child { animation-delay: 160ms; }

@keyframes materials-editorial-enter {
  from { opacity: 0.72; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1180px) {
  .materials-editorial-shell { width: min(100% - 64px, 1120px); }
  .materials-editorial-header { grid-template-columns: minmax(0, 1fr) minmax(320px, 0.78fr); }
  .materials-editorial-layout { grid-template-columns: 1fr; }
  .materials-editorial-card--featured { min-height: 520px; }
  .materials-editorial-secondary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
  }
  .materials-editorial-card--secondary { min-height: 330px; }
}

@media (max-width: 700px) {
  #insights.materials-editorial { padding: 82px 0; overflow: hidden; }
  .materials-editorial-shell { width: min(100% - 36px, 640px); }
  .materials-editorial-header {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "heading"
      "intro"
      "archive";
    row-gap: 0;
  }
  .materials-editorial-heading h2 { font-size: clamp(38px, 12vw, 56px); line-height: 1.02; }
  body.lang-ru .materials-editorial-heading h2 { font-size: clamp(36px, 10.8vw, 50px); }
  .materials-editorial-intro { margin-top: 24px; }
  .materials-editorial-intro p { font-size: 16px; line-height: 1.65; }
  .materials-editorial-archive {
    width: 100%;
    justify-content: space-between;
    margin-top: 26px;
    padding: 0 2px;
  }
  .materials-editorial-layout { margin-top: 38px; gap: 16px; }
  .materials-editorial-secondary { grid-template-columns: 1fr; gap: 16px; }
  .materials-editorial-card,
  .materials-editorial-card--secondary {
    min-height: 0;
    padding: 28px 24px;
    border-radius: 15px;
  }
  .materials-editorial-card--featured { min-height: 0; }
  .materials-editorial-label,
  .materials-editorial-card--secondary .materials-editorial-label {
    margin-bottom: 26px;
    padding-right: 60px;
    font-size: 10px;
    letter-spacing: 0.14em;
  }
  .materials-editorial-card h3,
  .materials-editorial-card--secondary h3,
  body.lang-ru .materials-editorial-card--featured h3,
  body.lang-ru .materials-editorial-card--secondary h3 {
    max-width: none;
    font-size: clamp(27px, 8.3vw, 38px);
    line-height: 1.13;
    letter-spacing: -0.04em;
  }
  body.lang-ru .materials-editorial-card h3 {
    font-size: clamp(25px, 7.2vw, 33px);
    line-height: 1.18;
  }
  .materials-editorial-summary,
  .materials-editorial-card--featured .materials-editorial-summary {
    margin-top: 18px;
    font-size: 15px;
    line-height: 1.66;
  }
  .materials-editorial-diagram { margin-top: 28px; padding-top: 0; }
  .materials-editorial-ledger {
    margin-top: 28px;
    padding-top: 0;
    grid-template-columns: 1fr;
  }
  .materials-editorial-number { right: 14px; font-size: 88px; }
  .materials-editorial-card--secondary .materials-editorial-number { right: 14px; font-size: 78px; }
  .materials-editorial-link {
    width: 100%;
    justify-content: space-between;
    margin-top: 24px;
    padding: 0 2px;
  }
}

@media (max-width: 350px) {
  .materials-editorial-shell { width: min(100% - 28px, 330px); }
  .materials-editorial-card,
  .materials-editorial-card--secondary { padding: 25px 20px; }
  .materials-editorial-heading h2,
  body.lang-ru .materials-editorial-heading h2 { font-size: 35px; }
  .materials-editorial-card h3,
  .materials-editorial-card--secondary h3,
  body.lang-ru .materials-editorial-card--featured h3,
  body.lang-ru .materials-editorial-card--secondary h3 { font-size: 25px; }
}

@media (max-height: 540px) and (orientation: landscape) and (max-width: 1100px) {
  #insights.materials-editorial { padding: 70px 0; }
  .materials-editorial-shell { width: min(100% - 48px, 960px); }
  .materials-editorial-header {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.9fr);
    grid-template-areas:
      "heading intro"
      "heading archive";
    column-gap: 34px;
  }
  .materials-editorial-heading h2,
  body.lang-ru .materials-editorial-heading h2 { font-size: clamp(34px, 5.6vw, 48px); }
  .materials-editorial-intro { margin-top: 0; }
  .materials-editorial-archive { width: auto; margin-top: 4px; }
  .materials-editorial-layout { grid-template-columns: 1fr; margin-top: 34px; }
  .materials-editorial-card--featured,
  .materials-editorial-card--secondary { min-height: 0; }
  .materials-editorial-secondary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  #insights.is-visible .materials-editorial-card {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .materials-editorial-archive span,
  .materials-editorial-link span { transition: none !important; }
}