/* Блог: список статей и страница статьи. Токены и блоки — из site.css и blocks.css, здесь только то, чего там нет */

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ═══════════ HERO ═══════════ */

.bl-hero .hero-inner { z-index: 1; padding: 96px 32px 104px; }
.bl-hero .hero-box { background-position: center; }

/* ═══════════ ПОЛОСА: сетка газетной страницы — главная статья, рядом три, ниже колонки с линейками ═══════════ */

.pg { padding: 72px 24px 0; }
.pg-in { max-width: 1280px; margin: 0 auto; }
.pg-rub { display: flex; gap: 32px; border-bottom: 1px solid var(--hairline); overflow-x: auto; scrollbar-width: none; }
.pg-rub::-webkit-scrollbar { display: none; }
.pg-tab { position: relative; flex-shrink: 0; height: 52px; padding: 0; font-size: 15px; font-weight: 500; color: var(--nl-stone); transition: color .15s ease; }
.pg-tab small { margin-left: 2px; font-size: 13px; font-weight: 400; color: var(--nl-stone); }
.pg-tab:hover, .pg-tab[aria-selected="true"] { color: var(--ink); }
.pg-tab::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; transform-origin: left; transform: scaleX(0);
  background: linear-gradient(90deg, var(--accent-indigo), var(--accent-violet)); transition: transform .45s cubic-bezier(.2,.8,.2,1); }
.pg-tab[aria-selected="true"]::after { transform: scaleX(1); }

.pg-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 48px; padding-top: 40px; overflow-x: clip; }
.pg-card { position: relative; min-width: 0; }
.pg-card[hidden] { display: none; }
.pg-card a { display: block; color: inherit; }
.pg-card h3 { margin: 0; font-weight: 500; color: var(--ink); transition: color .15s ease; }
.pg-card a:hover h3 { color: var(--accent-indigo-dark); }
.pg-rubric { margin: 0; font-size: 13px; line-height: 18px; color: var(--nl-stone); }
.pg-dek { margin: 8px 0 0; color: var(--nl-slate); }
.pg-read { margin: 10px 0 0; font-size: 13px; line-height: 18px; color: var(--nl-stone); }
/* иллюстрация в карточке: целиком, чуть подъезжает под курсором */
.pg-pic { display: block; overflow: hidden; border-radius: 16px; background: var(--brand-primary-soft); }
.pg-pic img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.pg-card a:hover .pg-pic img { transform: scale(1.04); }

/* главная: иллюстрация целиком и крупный заголовок */
.pg-card[data-slot="lead"] { grid-column: span 7; grid-row: span 3; padding-bottom: 40px; }
.pg-card[data-slot="lead"] .pg-pic { aspect-ratio: 3 / 2; margin-bottom: 22px; border-radius: 26px; }
.pg-card[data-slot="lead"] h3 { margin-top: 4px; font-size: 36px; line-height: 44px; letter-spacing: -.5px; }
.pg-card[data-slot="lead"] .pg-dek { font-size: 17px; line-height: 27px; }

/* рядом с главной: миниатюра слева, линейка сверху */
.pg-card[data-slot="side"] { grid-column: span 5; padding: 24px 0; border-top: 1px solid var(--hairline); }
.pg-card[data-slot="side"][data-first] { padding-top: 0; border-top: 0; }
.pg-card[data-slot="side"] a { display: grid; grid-template-columns: 168px minmax(0, 1fr); column-gap: 22px; align-items: start; }
.pg-card[data-slot="side"] .pg-pic { aspect-ratio: 1 / 1; }
.pg-card[data-slot="side"] h3 { margin-top: 2px; font-size: 21px; line-height: 28px; letter-spacing: -.2px; }
.pg-card[data-slot="side"] .pg-dek { font-size: 15px; line-height: 23px; }

/* колонки: сплошная линейка сверху и вертикальные между ними */
.pg-card[data-slot="col"] { grid-column: span 4; padding: 28px 0 36px; }
.pg-card[data-slot="col"]::before { content: ''; position: absolute; top: 0; left: -24px; right: -24px; height: 1px; background: var(--hairline); }
.pg-card[data-slot="col"][data-first]::before { left: 0; }
.pg-card[data-slot="col"]::after { content: ''; position: absolute; top: 28px; bottom: 36px; left: -24px; width: 1px; background: var(--hairline); }
.pg-card[data-slot="col"][data-first]::after { display: none; }
.pg-card[data-slot="col"] .pg-pic { aspect-ratio: 3 / 2; margin-bottom: 16px; }
.pg-card[data-slot="col"] h3 { margin-top: 2px; font-size: 22px; line-height: 29px; letter-spacing: -.2px; }
.pg-card[data-slot="col"] .pg-dek { font-size: 15px; line-height: 23px; }

/* ═══════════ МАРШРУТЫ ЧТЕНИЯ: нити с бусинами на стекле ═══════════ */

.rt { padding: 120px 24px 0; }
.rt-in { max-width: 1280px; margin: 0 auto; }
.rt-stage { padding: 30px; }
.rt-card { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-radius: 14px; background: rgba(255,255,255,.72); }
.rt-col { padding: 26px 26px 14px; }
.rt-col + .rt-col { border-left: 1px solid var(--hairline); }
.rt-col h3 { margin: 0; font-size: 20px; line-height: 28px; font-weight: 500; color: var(--ink); }
.rt-col h3 a:hover { color: var(--accent-indigo-dark); }
.rt-col > p { min-height: 69px; margin: 6px 0 18px; font-size: 14px; line-height: 23px; color: var(--nl-slate); }
.rt-list { list-style: none; margin: 0; padding: 0; }
.rt-list li { position: relative; padding: 0 0 18px 22px; font-size: 15px; line-height: 22px; }
.rt-list li::before { content: ''; position: absolute; left: 0; top: 7px; width: 9px; height: 9px; border-radius: 50%; background: #7f8d99; transition: background-color .15s ease; }
.rt-list li:hover::before { background: var(--accent-violet); }
.rt-list li:not(:last-child)::after { content: ''; position: absolute; left: 3.5px; top: 20px; bottom: -3px; width: 2px;
  background: radial-gradient(circle, #b6bfc7 1px, transparent 1.2px) 0 0 / 2px 6px repeat-y; }
.rt-list a { color: var(--ink); }
.rt-list a:hover { color: var(--accent-indigo-dark); }

/* ═══════════ СТАТЬЯ ═══════════ */

.ar-progress { position: fixed; inset: 0 0 auto 0; z-index: 60; height: 3px; pointer-events: none; }
.ar-progress i { display: block; height: 100%; transform-origin: left; transform: scaleX(0); background: linear-gradient(90deg, var(--accent-indigo), var(--accent-violet)); }

/* иллюстрация всегда целиком: её края растворяются в фоне шапки, поэтому фон продолжает цвета краёв */
.ar-hero .hero-box { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: center; min-height: 460px;
  background: linear-gradient(90deg, var(--ar-l) 45%, var(--ar-r)); }
.ar-head { position: relative; z-index: 1; align-self: center; padding: 48px 16px 48px 56px; }
.ar-crumbs { display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 13px; line-height: 20px; color: var(--ink); opacity: .86; }
.ar-crumbs a:hover { text-decoration: underline; }
.ar-title { margin: 16px 0 0; font-size: clamp(30px, 3.2vw, 44px); line-height: 1.2; font-weight: 500; letter-spacing: -.6px; color: var(--ink); }
.ar-lead { margin: 16px 0 0; font-size: 18px; line-height: 28px; color: var(--ink); opacity: .92; }
.ar-meta { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 18px 0 0; font-size: 14px; line-height: 20px; color: var(--ink); opacity: .86; }
.ar-pic { display: block; }
.ar-pic img { display: block; width: 100%; height: auto;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%), linear-gradient(180deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%), linear-gradient(180deg, transparent, #000 7%, #000 93%, transparent);
  -webkit-mask-composite: source-in; mask-composite: intersect; }

.ar-wrap { display: grid; grid-template-columns: 232px minmax(0, 740px); gap: 0 88px; justify-content: center; max-width: 1180px; margin: 0 auto; padding: 72px 24px 0; }
.ar-side { position: sticky; top: 112px; align-self: start; }
.ar-toc ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--hairline); }
.ar-toc a { position: relative; display: block; padding: 7px 0 7px 16px; font-size: 14px; line-height: 20px; color: var(--nl-stone); transition: color .15s ease; }
.ar-toc a:hover, .ar-toc a.on { color: var(--ink); }
.ar-toc a::before { content: ''; position: absolute; left: -1px; top: 0; bottom: 0; width: 2px; transform-origin: top; transform: scaleY(0);
  background: linear-gradient(180deg, var(--accent-indigo), var(--accent-violet)); transition: transform .3s ease; }
.ar-toc a.on::before { transform: scaleY(1); }
.ar-toc-m { display: none; }

.ar-body { min-width: 0; font-size: 17px; line-height: 28px; color: var(--ink); }
.ar-body p, .ar-body ul, .ar-body ol { margin: 0 0 18px; }
.ar-body h2 { margin: 52px 0 16px; font-size: 28px; line-height: 36px; font-weight: 500; letter-spacing: -.4px; color: var(--ink); scroll-margin-top: 104px; }
.ar-body h3 { margin: 28px 0 6px; font-size: 19px; line-height: 27px; font-weight: 500; color: var(--ink); }
.ar-body a { text-decoration: underline; text-decoration-thickness: 1px; text-decoration-color: rgba(99,102,241,.5); text-underline-offset: 3px; transition: color .15s ease, text-decoration-color .15s ease; }
.ar-body a:hover { color: var(--accent-indigo-dark); text-decoration-color: currentColor; }
.ar-body b { font-weight: 500; }
.ar-body code { padding: 1px 6px; border-radius: 6px; background: var(--brand-primary-soft); font: inherit; font-size: .92em; word-break: break-word; }
.ar-body ul, .ar-body ol { list-style: none; padding: 0; }
.ar-body ul > li { position: relative; padding-left: 20px; margin-bottom: 8px; }
.ar-body ul > li::before { content: ''; position: absolute; left: 2px; top: 11px; width: 6px; height: 6px; border-radius: 50%; background: #7f8d99; }
.ar-body ol { counter-reset: n; }
.ar-body ol > li { position: relative; counter-increment: n; padding-left: 30px; margin-bottom: 10px; }
.ar-body ol > li::before { content: counter(n); position: absolute; left: 0; top: 0; min-width: 20px; font-size: 15px; font-weight: 500; color: var(--nl-stone); font-variant-numeric: tabular-nums; }

.brief { margin: 0 0 8px; padding: 22px 26px 12px; border-radius: 20px; background: var(--brand-primary-soft); }
.brief > b { display: block; margin-bottom: 10px; font-size: 15px; line-height: 22px; font-weight: 500; color: var(--nl-stone); }
.brief ul { margin: 0 0 8px; }
.brief li { font-size: 16px; line-height: 25px; }
.brief ul > li::before { top: 10px; }

.tbl { margin: 24px 0 26px; overflow-x: auto; border: 1px solid var(--hairline); border-radius: 14px; }
.tbl table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 23px; }
.tbl th { padding: 12px 16px; font-size: 13px; line-height: 18px; font-weight: 500; text-align: left; vertical-align: bottom; color: var(--nl-stone); }
.tbl td { padding: 12px 16px; border-top: 1px solid var(--hairline-soft); vertical-align: top; }

.sample { margin: 24px 0 26px; padding: 24px 28px 8px; border: 1px solid var(--hairline); border-radius: 14px; background: #fff; box-shadow: 0 40px 80px -60px rgba(40,24,110,.4); font-size: 16px; line-height: 25px; }
.sample p { margin: 0 0 14px; }
.sample .sample-h { padding-bottom: 12px; border-bottom: 1px solid var(--hairline); font-size: 18px; line-height: 26px; font-weight: 500; }
.sample .sample-s { margin: 18px 0 2px; font-size: 13px; line-height: 18px; color: var(--nl-stone); }

/* план по часам: те же нити с бусинами, что в маршрутах */
.ar-body ol.clock { margin: 26px 0; }
.ar-body ol.clock > li { padding: 0 0 22px 28px; margin: 0; }
.ar-body ol.clock > li::before { content: ''; left: 0; top: 9px; min-width: 0; width: 10px; height: 10px; border-radius: 50%; background: linear-gradient(135deg, var(--accent-indigo), var(--accent-violet)); }
.ar-body ol.clock > li:not(:last-child)::after { content: ''; position: absolute; left: 4px; top: 25px; bottom: 0; width: 2px;
  background: radial-gradient(circle, #b6bfc7 1px, transparent 1.2px) 0 0 / 2px 6px repeat-y; }
.ar-body ol.clock b { display: block; font-size: 18px; }

.note { margin: 44px 0 0; padding: 22px 26px 6px; border-radius: 20px; background: var(--brand-primary); color: #fff; }
.note > b { display: block; margin-bottom: 6px; font-size: 15px; line-height: 22px; }
.note p { font-size: 16px; line-height: 25px; color: rgba(255,255,255,.78); }
.ar-body .note a { color: #fff; text-decoration-color: rgba(255,255,255,.5); }
.ar-body .note a:hover { color: #fff; text-decoration-color: #fff; }

.ar-body ol.ar-src { font-size: 14px; line-height: 22px; color: var(--nl-slate); }
.ar-body ol.ar-src > li { padding-left: 26px; margin-bottom: 6px; overflow-wrap: anywhere; }
.ar-body ol.ar-src > li::before { font-size: 14px; }

.ar-more { padding: 96px 24px 0; }
.ar-more-in { max-width: 1180px; margin: 0 auto; }
.ar-more h2 { margin: 0 0 24px; font-size: 32px; line-height: 40px; font-weight: 500; letter-spacing: -.5px; color: var(--ink); }
.ar-rels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px; border-top: 1px solid var(--hairline); }
.ar-rel { position: relative; display: block; padding-top: 28px; }
.ar-rel + .ar-rel::before { content: ''; position: absolute; top: 28px; bottom: 0; left: -24px; width: 1px; background: var(--hairline); }
.ar-rel-pic { display: block; overflow: hidden; aspect-ratio: 3 / 2; margin-bottom: 14px; border-radius: 16px; background: var(--brand-primary-soft); }
.ar-rel-pic img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.ar-rel:hover .ar-rel-pic img { transform: scale(1.04); }
.ar-rel h3 { margin: 2px 0 0; font-size: 20px; line-height: 28px; font-weight: 500; color: var(--ink); transition: color .15s ease; }
.ar-rel:hover h3 { color: var(--accent-indigo-dark); }

/* ═══════════ УЗКИЕ ЭКРАНЫ ═══════════ */

@media (max-width: 1100px) {
  .ar-wrap { grid-template-columns: minmax(0, 740px); }
  .ar-side { display: none; }
  .ar-toc-m { display: block; margin: 0 0 20px; border: 1px solid var(--hairline); border-radius: 14px; }
  .ar-toc-m summary { padding: 12px 18px; font-size: 15px; font-weight: 500; cursor: pointer; }
  .ar-toc-m ul { margin: 0; padding: 0 18px 8px; }
  .ar-body .ar-toc-m li { padding: 0; margin: 0; font-size: 15px; line-height: 22px; }
  .ar-body .ar-toc-m li::before { display: none; }
  .ar-toc-m a { display: block; padding: 6px 0; text-decoration: none; color: var(--nl-slate); }
  .rt-card { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rt-col:nth-child(3) { border-left: 0; }
  .rt-col:nth-child(n + 3) { border-top: 1px solid var(--hairline); }
}

@media (max-width: 960px) {
  .pg-grid { column-gap: 32px; }
  .pg-card[data-slot="lead"], .pg-card[data-slot="side"] { grid-column: 1 / -1; grid-row: auto; }
  .pg-card[data-slot="lead"] { padding-bottom: 28px; }
  .pg-card[data-slot="side"][data-first] { padding-top: 24px; border-top: 1px solid var(--hairline); }
  .pg-card[data-slot="col"] { grid-column: span 6; }
  .pg-card[data-slot="col"]::before { left: 0; right: 0; }
  .pg-card[data-slot="col"]::after { display: none; }

  .ar-hero .hero-box { grid-template-columns: 1fr; min-height: 0; background: var(--ar-l); }
  .ar-pic { order: -1; width: 100%; max-width: 640px; margin: 0 auto; }
  .ar-pic img { -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent), linear-gradient(180deg, #000 88%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent), linear-gradient(180deg, #000 88%, transparent); }
  .ar-head { padding: 8px 32px 32px; }
  .ar-rels { grid-template-columns: 1fr; gap: 0; }
  .ar-rel { display: grid; grid-template-columns: 112px minmax(0, 1fr); column-gap: 18px; padding: 18px 0; }
  .ar-rel + .ar-rel { border-top: 1px solid var(--hairline); }
  .ar-rel + .ar-rel::before { display: none; }
  .ar-rel-pic { aspect-ratio: 1 / 1; margin: 0; border-radius: 12px; }
}

@media (max-width: 767px) {
  .bl-hero .hero-inner { padding: 56px 16px 48px; }
  .pg { padding: 40px 16px 0; }
  .pg-rub { gap: 22px; }
  .pg-grid { padding-top: 24px; }
  .pg-card[data-slot="lead"] .pg-pic { margin-bottom: 16px; border-radius: 20px; }
  .pg-card[data-slot="lead"] h3 { font-size: 26px; line-height: 33px; letter-spacing: -.3px; }
  .pg-card[data-slot="lead"] .pg-dek { font-size: 15px; line-height: 23px; }
  /* в ленте телефона все статьи одинаковые: текст слева, миниатюра справа */
  .pg-card[data-slot="side"], .pg-card[data-slot="col"] { grid-column: 1 / -1; padding: 18px 0; }
  .pg-card[data-slot="side"] a, .pg-card[data-slot="col"] a { display: grid; grid-template-columns: minmax(0, 1fr) 104px; column-gap: 16px; align-items: start; }
  .pg-card[data-slot="side"] .pg-pic, .pg-card[data-slot="col"] .pg-pic { order: 1; aspect-ratio: 1 / 1; margin: 0; border-radius: 12px; }
  .pg-card[data-slot="side"] h3, .pg-card[data-slot="col"] h3 { font-size: 18px; line-height: 24px; letter-spacing: 0; }
  .pg-card[data-slot="side"] .pg-dek, .pg-card[data-slot="col"] .pg-dek { display: none; }

  .rt { padding: 72px 16px 0; }
  .rt-stage { padding: 10px; }
  .rt-card { grid-template-columns: 1fr; }
  .rt-col { padding: 20px 18px 6px; }
  .rt-col + .rt-col { border-left: 0; border-top: 1px solid var(--hairline); }
  .rt-col:nth-child(n + 3) { border-top: 1px solid var(--hairline); }
  .rt-col > p { min-height: 0; }

  .ar-head { padding: 4px 18px 22px; }
  .ar-title { margin-top: 12px; font-size: 27px; line-height: 34px; letter-spacing: -.3px; }
  .ar-lead { font-size: 16px; line-height: 25px; }
  .ar-wrap { padding: 32px 16px 0; }
  .ar-body { font-size: 16px; line-height: 26px; }
  .ar-body h2 { margin: 40px 0 12px; font-size: 24px; line-height: 31px; }
  .ar-body ul > li::before { top: 10px; }
  .brief { padding: 18px 18px 8px; border-radius: 16px; }
  .brief li { font-size: 15px; line-height: 23px; }
  .tbl { overflow: visible; border: 0; border-radius: 0; }
  .tbl table, .tbl tbody, .tbl tr, .tbl td { display: block; width: 100%; }
  .tbl thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .tbl tr { padding: 14px 16px; border: 1px solid var(--hairline); border-radius: 14px; }
  .tbl tr + tr { margin-top: 8px; }
  .tbl td { padding: 0; border: 0; }
  .tbl td + td { margin-top: 8px; }
  .tbl td:first-child { font-weight: 500; }
  .tbl td + td::before { content: attr(data-l); display: block; font-size: 12px; line-height: 17px; color: var(--nl-stone); }
  .sample { padding: 18px 18px 4px; }
  .note { padding: 18px 18px 2px; border-radius: 16px; }
  .ar-more { padding: 64px 16px 0; }
  .ar-more h2 { font-size: 26px; line-height: 33px; margin-bottom: 16px; }
}
