@view-transition { navigation: auto; }

:root {
  --bg: #000;
  --fg: #fff;
  --yellow: #f4e600;
  --yellow-hover: #fff35a;
  --line: rgba(255, 255, 255, .16);
  --muted: rgba(255, 255, 255, .68);

  --ease: cubic-bezier(.22, 1, .36, 1);
  --d1: .2s;
  --d2: .32s;
  --d3: .45s;

  --font: "Tektur", "Noto Kufi Arabic", "Noto Sans Devanagari", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --header-h: 72px;
  --gutter: 44px;
}

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

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

:lang(ar) body { line-height: 1.6; }

img { max-width: 100%; }

.page { overflow-x: clip; }

/* ---------- Прогресс чтения ---------- */
.progress {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  z-index: 90;
  height: 2px;
  pointer-events: none;
}

.progress__bar {
  display: block;
  height: 100%;
  background: var(--yellow);
  transform: scaleX(0);
  transform-origin: left;
}

[dir="rtl"] .progress__bar { transform-origin: right; }

/* ---------- Каркас ---------- */
.news-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px var(--gutter) 120px;
}

.i18n-fade { transition: opacity var(--d1) var(--ease), transform var(--d1) var(--ease); }
.is-lang-switching .i18n-fade { opacity: 0; transform: translateY(4px); }

.topbar { margin-bottom: 48px; }

.back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 18px 0 12px;
  border: 1px solid rgba(255, 255, 255, .22);
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: .02em;
  text-transform: uppercase;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: border-color var(--d1) var(--ease), transform var(--d1) var(--ease);
}

.back__arrow { display: block; transition: transform var(--d2) var(--ease); }
.back:hover { border-color: #fff; }
.back:hover .back__arrow { transform: translateX(-4px); }
.back:active { transform: scale(.97); }
.back:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; }

[dir="rtl"] .back { padding: 0 12px 0 18px; }
[dir="rtl"] .back__arrow { transform: scaleX(-1); }
[dir="rtl"] .back:hover .back__arrow { transform: scaleX(-1) translateX(-4px); }
:lang(ar) .back, :lang(hi) .back { letter-spacing: 0; }

/* виды страницы появляются плавно, когда данные загружены */
.view { animation: view-in .7s var(--ease) both; }
.view[hidden] { display: none; }

@keyframes view-in {
  from { opacity: 0; transform: translateY(16px); }
}

/* ---------- Статья ---------- */
.article { max-width: 860px; margin: 0 auto; }

.article__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-bottom: 24px;
  font-size: 15px;
  color: var(--muted);
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 12px;
  background: var(--yellow);
  color: #000;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
}

:lang(ar) .chip, :lang(hi) .chip { letter-spacing: 0; }

.article__dot {
  width: 4px;
  height: 4px;
  background: rgba(255, 255, 255, .4);
}

.article__title {
  margin: 0;
  font-size: clamp(34px, 4.4vw, 58px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -.01em;
  text-wrap: balance;
}

:lang(ar) .article__title, :lang(hi) .article__title { line-height: 1.35; letter-spacing: 0; }

.article__lead {
  margin: 28px 0 0;
  font-size: 22px;
  line-height: 1.5;
  color: #fff;
}

.article__cover {
  position: relative;
  max-width: 720px;
  margin: 56px auto;
}

.article__cover > img,
.article__cover > .stat-cover {
  display: block;
  width: 100%;
  height: auto;
  background-color: #0a0a0a;
  clip-path: polygon(0 0, calc(100% - 44px) 0, 100% 44px, 100% 100%, 44px 100%, 0 calc(100% - 44px));
}

.article__cover-corner {
  position: absolute;
  width: 28px;
  height: 28px;
  border: 0 solid var(--yellow);
  pointer-events: none;
}

.article__cover-corner--tl { top: -12px; left: -12px; border-top-width: 2px; border-left-width: 2px; }
.article__cover-corner--br { right: -12px; bottom: -12px; border-right-width: 2px; border-bottom-width: 2px; }

.article__body {
  max-width: 720px;
  margin: 0 auto;
}

.article__body h2 {
  margin: 56px 0 18px;
  font-size: clamp(24px, 2.4vw, 32px);
  font-weight: 500;
  line-height: 1.2;
}

.article__body p {
  margin: 0 0 18px;
  font-size: 18px;
  line-height: 1.7;
  color: var(--muted);
}

/* хронология */
.timeline {
  position: relative;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  position: relative;
  padding: 0 0 26px;
  padding-inline-start: 34px;
}

.timeline li::before {
  content: "";
  position: absolute;
  top: 7px;
  inset-inline-start: 0;
  width: 10px;
  height: 10px;
  background: var(--yellow);
}

.timeline li::after {
  content: "";
  position: absolute;
  top: 24px;
  bottom: 0;
  inset-inline-start: 4.5px;
  width: 1px;
  background: var(--line);
}

.timeline li:last-child { padding-bottom: 0; }
.timeline li:last-child::after { display: none; }
.timeline li:last-child::before { background: #ff4b3a; }

.timeline__date {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--yellow);
}

:lang(ar) .timeline__date, :lang(hi) .timeline__date { letter-spacing: 0; }

.timeline li:last-child .timeline__date { color: #ff6a5c; }

.timeline p { margin: 0; }

/* выноска «Важно» */
.callout {
  margin: 48px 0;
  padding: 28px 30px;
  background: #fff;
  color: #000;
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 0 100%);
}

[dir="rtl"] .callout { clip-path: polygon(22px 0, 100% 0, 100% 100%, 0 100%, 0 22px); }

.callout .callout__title {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 500;
  text-transform: uppercase;
  color: #000;
}

.callout p {
  margin: 0;
  color: rgba(0, 0, 0, .78);
}

/* список советов */
.checklist {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: tip;
}

.checklist li {
  position: relative;
  padding: 18px 0;
  padding-inline-start: 48px;
  border-top: 1px solid var(--line);
  font-size: 18px;
  line-height: 1.6;
  color: #fff;
  counter-increment: tip;
}

.checklist li:last-child { border-bottom: 1px solid var(--line); }

.checklist li::before {
  content: counter(tip, decimal-leading-zero);
  position: absolute;
  top: 20px;
  inset-inline-start: 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--yellow);
}

/* источники */
.sources {
  max-width: 720px;
  margin: 64px auto 0;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.sources__title {
  margin: 0 0 16px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .55);
}

:lang(ar) .sources__title, :lang(hi) .sources__title { letter-spacing: 0; }

.sources__list {
  margin: 0;
  padding: 0;
  padding-inline-start: 22px;
  color: rgba(255, 255, 255, .45);
  font-size: 15px;
  line-height: 1.5;
}

.sources__list li { margin-bottom: 10px; }

.sources__list a {
  color: rgba(255, 255, 255, .78);
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, .25);
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
  transition: color var(--d1) var(--ease), text-decoration-color var(--d1) var(--ease);
}

.sources__list a:hover { color: #fff; text-decoration-color: var(--yellow); }

[dir="rtl"] .sources__list a { direction: ltr; unicode-bidi: isolate; }

/* призыв проверить */
.cta {
  max-width: 1100px;
  margin: 96px auto 0;
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  border: 1px solid var(--line);
  background:
    radial-gradient(80% 140% at 100% 0%, rgba(31, 163, 122, .22), transparent 60%),
    radial-gradient(60% 120% at 0% 100%, rgba(244, 230, 0, .1), transparent 60%),
    #050505;
}

.cta__title {
  margin: 0;
  font-size: clamp(24px, 2.6vw, 34px);
  font-weight: 500;
  line-height: 1.15;
  text-transform: uppercase;
}

:lang(ar) .cta__title, :lang(hi) .cta__title { line-height: 1.4; }

.cta__desc {
  margin: 12px 0 0;
  max-width: 52ch;
  font-size: 17px;
  line-height: 1.55;
  color: var(--muted);
}

.btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  height: 60px;
  padding: 0 22px 0 26px;
  background: var(--yellow);
  color: #000;
  font: 500 20px/1 var(--font);
  letter-spacing: .02em;
  text-transform: uppercase;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: background-color var(--d1) var(--ease), transform var(--d1) var(--ease);
}

.btn__label {
  background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 0 2px;
  padding-bottom: 3px;
  transition: background-size var(--d2) var(--ease);
}

.btn__arrow { display: block; transition: transform var(--d2) var(--ease); }
.btn:hover { background: var(--yellow-hover); }
.btn:hover .btn__label { background-size: 100% 2px; }
.btn:hover .btn__arrow { transform: translateX(4px); }
.btn:active { transform: scale(.97); }
.btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

[dir="rtl"] .btn { padding: 0 26px 0 22px; }
[dir="rtl"] .btn__label { background-position: 100% 100%; }
[dir="rtl"] .btn__arrow { transform: scaleX(-1); }
[dir="rtl"] .btn:hover .btn__arrow { transform: scaleX(-1) translateX(4px); }
:lang(ar) .btn, :lang(hi) .btn { letter-spacing: 0; }

/* ---------- Список новостей ---------- */
.list__title {
  margin: 0 0 40px;
  font-size: clamp(36px, 4.4vw, 58px);
  font-weight: 500;
  line-height: 1.05;
  text-transform: uppercase;
}

.list__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.ncard {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  background: #070707;
  color: #fff;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: border-color var(--d2) var(--ease), transform var(--d2) var(--ease);
}

.ncard:hover { border-color: rgba(255, 255, 255, .4); }
.ncard:active { transform: scale(.985); }
.ncard:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; }

.ncard__media {
  aspect-ratio: 520 / 272;
  overflow: hidden;
}

.ncard__media img,
.ncard__media .stat-cover {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .8s var(--ease);
}

.ncard__media .stat-cover { display: flex; transition: transform .8s var(--ease); }
.ncard:hover .ncard__media img,
.ncard:hover .ncard__media .stat-cover { transform: scale(1.04); }

.ncard__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 22px 22px 24px;
}

.ncard__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  font-size: 14px;
  color: var(--muted);
}

.ncard__title {
  margin: 16px 0 0;
  font-size: 21px;
  font-weight: 500;
  line-height: 1.25;
}

.ncard__excerpt {
  margin: 10px 0 0;
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--muted);
}

.missing__text { color: var(--muted); }

.link-more {
  color: var(--yellow);
  font-weight: 500;
}

/* ---------- Обложка-цифра (для новостей без картинки) ---------- */
.stat-cover {
  position: relative;
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: 100%;
  height: 100%;
  aspect-ratio: 520 / 272;
  padding: 7% 6% 6.5%; /* % — от ширины; cqi тут нельзя: он считается от родителя */
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px) 0 0 / 40px 40px,
    radial-gradient(90% 120% at 100% 0%, var(--sc-glow), transparent 60%),
    #050505;
  color: #fff;
  --sc-accent: var(--yellow);
  --sc-glow: rgba(244, 230, 0, .16);
}

.stat-cover--red { --sc-accent: #ff4b3a; --sc-glow: rgba(255, 75, 58, .2); }
.stat-cover--green { --sc-accent: #2fd39f; --sc-glow: rgba(31, 163, 122, .26); }

.stat-cover__corner {
  position: absolute;
  width: 4.5cqi;
  height: 4.5cqi;
  border: 0 solid rgba(255, 255, 255, .7);
}

.stat-cover__corner--tl { top: 4cqi; left: 4cqi; border-top-width: 2px; border-left-width: 2px; }
.stat-cover__corner--tr { top: 4cqi; right: 4cqi; border-top-width: 2px; border-right-width: 2px; }
.stat-cover__corner--bl { bottom: 4cqi; left: 4cqi; border-bottom-width: 2px; border-left-width: 2px; }
.stat-cover__corner--br { bottom: 4cqi; right: 4cqi; border-bottom-width: 2px; border-right-width: 2px; }

.stat-cover__value {
  font-size: 15cqi;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.02em;
  color: var(--sc-accent);
  white-space: nowrap;
}

.stat-cover__label {
  margin-top: 2.2cqi;
  max-width: 80%;
  font-size: max(12px, 3.2cqi);
  line-height: 1.3;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .78);
}

.article__cover > .stat-cover { display: flex; }

:lang(ar) .stat-cover__value { letter-spacing: 0; }
:lang(ar) .stat-cover__label, :lang(hi) .stat-cover__label { line-height: 1.5; }

/* ---------- Планшет ---------- */
@media (max-width: 1023px) {
  :root { --gutter: 24px; }

  .list__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cta { flex-direction: column; align-items: flex-start; padding: 32px; }
}

/* ---------- Телефон ---------- */
@media (max-width: 767px) {
  :root {
    --header-h: 114px;   /* шапка + кнопка обмена */
    --gutter: 16px;
  }

  body { font-size: 16px; }

  .news-page { padding: 20px var(--gutter) 72px; }
  .topbar { margin-bottom: 32px; }
  .back { font-size: 14px; }

  .article__meta { margin-bottom: 18px; font-size: 14px; }
  .article__dot { display: none; }
  .article__title { font-size: clamp(28px, 8.2vw, 36px); }
  .article__lead { margin-top: 20px; font-size: 18px; }

  .article__cover { margin: 36px 0; }
  .article__cover > img, .article__cover > .stat-cover { clip-path: polygon(0 0, calc(100% - 24px) 0, 100% 24px, 100% 100%, 24px 100%, 0 calc(100% - 24px)); }
  .article__cover-corner { width: 20px; height: 20px; }
  .article__cover-corner--tl { top: -8px; left: -8px; }
  .article__cover-corner--br { right: -8px; bottom: -8px; }

  .article__body h2 { margin: 40px 0 14px; font-size: 23px; }
  .article__body p { font-size: 16px; }

  .callout { margin: 36px 0; padding: 22px 20px; }
  .callout .callout__title { font-size: 19px; }

  .checklist li { padding: 16px 0; padding-inline-start: 40px; font-size: 16px; }
  .checklist li::before { top: 18px; font-size: 14px; }

  .cta { margin-top: 64px; padding: 26px 20px; gap: 22px; }
  .btn { height: 56px; font-size: 18px; }

  .list__grid { grid-template-columns: minmax(0, 1fr); }
}

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

  *, *::before, *::after {
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
  }
}

/* плавный скролл (Lenis) */
html.lenis, html.lenis body { height: auto; }
.lenis:not(.lenis-autoToggle).lenis-stopped { overflow: clip; }
.lenis [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-smooth iframe { pointer-events: none; }
