/* Пятый угол — Design System */

:root {
  --bg-primary: #E0DEE2;
  --bg-secondary: #F3F2F3;
  --bg-white: #FFFFFF;
  --brand-dark: #1C2226;
  --accent-gold: #ce9f59;
  --accent-gold-hover: #D5A972;
  --text-primary: #23272B;
  --text-secondary: #6D7075;
  --text-muted: #8A8D91;
  --border: #D5D3D6;
  --container: 1320px;
  --radius-ui: 4px;
  --aside-narrow: 280px;
  --aside-wide: 340px;
  --bg-hero: #13181b;
  --bg-homepage: #eae9eb;
  --bg-author: #f5f5f5;

  /* Fluid type — min ~360px, max ~1320px (8 токенов) */
  --text-hero: clamp(2.25rem, 1.35rem + 4vw, 4rem);                      /* 36→64  hero H1 */
  --text-h2: clamp(1.75rem, 1.25rem + 2.2vw, 2.625rem);                  /* 28→42  секции h2 */
  --text-h3-lg: clamp(1.375rem, 1.15rem + 1.1vw, 1.75rem);               /* 22→28  hero-подзаголовок, имя автора */
  --text-h3: clamp(1.125rem, 1rem + 0.55vw, 1.375rem);                    /* 18→22  цитаты, карточка, hero-текст, MAX CTA */
  --text-body: clamp(1.0625rem, 0.98rem + 0.42vw, 1.25rem);              /* 17→20  body, итог, plain-цитата, профиль */
  --text-md: clamp(0.875rem, 0.8125rem + 0.21vw, 1rem);                    /* 14→16  колонки, numbered, лид */
  --text-sm: clamp(0.8125rem, 0.78rem + 0.17vw, 0.875rem);                /* 13→14  метки, сайдбар, кнопки, footer, stat */

  --leading-body: 1.7;
  --leading-relaxed: 1.73;
  --leading-snug: 1.3;
  --leading-tight: 1.2;
  --leading-h2: 1.19;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', 'Manrope', sans-serif;
  font-size: var(--text-body);
  line-height: var(--leading-body);
  color: var(--text-primary);
  background: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-ui);
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 40px;
}

h1, h2, h3, h4 {
  font-family: 'Playfair Display', 'Cormorant Garamond', serif;
  font-weight: 700;
  color: var(--text-primary);
}

h2 {
  font-size: var(--text-h2);
  line-height: var(--leading-h2);
  margin-bottom: 30px;
  padding-bottom: 14px;
  position: relative;
}

h2::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 130px;
  height: 2px;
  background: var(--accent-gold);
}

/* ─── MAX Button ─── */

.btn-max,
.hero-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 56px;
  padding: 0 32px;
  background: var(--accent-gold);
  color: var(--brand-dark);
  border: none;
  border-radius: var(--radius-ui);
  font-family: 'Inter', sans-serif;
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
  white-space: nowrap;
}

.btn-max:hover,
.hero-button:hover {
  background: var(--accent-gold-hover);
  transform: translateY(-1px);
}

.btn-max:active,
.hero-button:active {
  transform: translateY(0);
}

.btn-max img,
.hero-button img {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.hero-button {
  font-weight: 800;
  letter-spacing: 0.06em;
  text-decoration: none;
  transition: opacity 0.25s ease, max-height 0.25s ease, margin 0.25s ease, background 0.25s ease, transform 0.25s ease;
  overflow: hidden;
}

/* ==========================================
   ПЯТЫЙ УГОЛ
   HERO SECTION
   ========================================== */

.hero {
  position: relative;
  padding: 0;
  min-height: 0;
  background: transparent;
  --hero-decor-aspect: 1.6418;
  --site-top-bar-decor-max: 110px;
  --site-top-bar-decor-base: 134px;
  --article-decor-max-height: var(--site-top-bar-decor-max);
  --article-decor-mobile-scale: 1.265;
}

.hero__bar {
  position: sticky;
  top: 0;
  z-index: 100;
  overflow-x: clip;
  overflow-y: visible;
  min-height: 530px;
  background-color: var(--bg-hero);
  padding: 88px 0 48px;
  transition: padding 0.25s ease;
}

.hero--shrunk {
  height: 0;
  min-height: 0;
  margin: 0;
  overflow: visible;
}

.hero--shrunk .hero__bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--site-top-bar-decor-base);
  min-height: var(--site-top-bar-decor-base);
  padding: 0;
  transition: none;
}

.hero-container {
  position: relative;
  z-index: 1;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  overflow: visible;
}

.hero-container::after {
  content: '';
  position: absolute;
  top: 44%;
  right: 0;
  transform: translateY(-50%);
  width: 887px;
  height: 645px;
  background-image: url('../images/ugol-hero.png');
  background-repeat: no-repeat;
  background-position: right center;
  background-size: auto 544px;
  pointer-events: none;
  z-index: 0;
  transition: width 0.25s ease, height 0.25s ease, background-size 0.25s ease, top 0.25s ease, right 0.25s ease;
}

.hero--shrunk .hero-left {
  display: flex;
  align-items: center;
  grid-column: 1 / 3;
  position: relative;
  z-index: 1;
  max-width: none;
  width: auto;
  flex: none;
  min-width: 0;
}

.hero--shrunk .hero-brand {
  align-items: center;
  gap: 24px;
}

.hero--shrunk .hero-headings {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

.hero--shrunk .hero-avatar {
  width: 96px;
  height: 96px;
}

.hero--shrunk .hero-brand__photo {
  width: 96px;
  height: 96px;
}

.hero--shrunk .hero-title {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
}

.hero--shrunk .hero-subtitle {
  font-size: clamp(0.875rem, 2vw, 1.125rem);
}

.hero--shrunk .hero-description,
.hero--shrunk .hero-button {
  display: none;
}

.hero--shrunk .hero-container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--aside-narrow) var(--aside-wide);
  column-gap: 20px;
  align-items: center;
  align-self: stretch;
  flex: 0 1 auto;
  width: min(100%, var(--container));
  max-width: var(--container);
  margin: 0 auto;
  height: 100%;
  min-height: 0;
  overflow-x: clip;
  transition: row-gap 0.25s ease, column-gap 0.25s ease;
}

.hero .hero-aside {
  display: none;
}

.hero--shrunk .hero-aside {
  display: grid;
  grid-column: 3;
  position: relative;
  grid-template-columns: 1fr;
  width: 100%;
  max-width: var(--aside-wide);
  min-width: 0;
  align-self: center;
  --article-aside-decor-base: var(--site-top-bar-decor-base);
  min-height: var(--article-aside-decor-base);
  transition: min-height 0.25s ease;
}

.hero--shrunk .hero-container::after {
  display: none;
}

.hero-left {
  position: relative;
  z-index: 1;
  flex: 0 1 640px;
  max-width: 640px;
}

.hero-brand {
  display: flex;
  align-items: center;
  gap: 32px;
  transition: gap 0.25s ease;
}

.hero-headings {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hero-avatar {
  width: 148px;
  height: 148px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  flex-shrink: 0;
  transition: width 0.25s ease, height 0.25s ease;
}

.hero-brand__photo {
  display: block;
  flex-shrink: 0;
  width: 148px;
  height: 148px;
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  line-height: 0;
  border: 2px solid #fff;
  box-sizing: border-box;
  transition: opacity 0.25s ease, width 0.25s ease, height 0.25s ease;
}

.hero-brand__photo .hero-avatar {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  border: 0;
  border-radius: 0;
  flex-shrink: 0;
  object-fit: cover;
}

.hero-title {
  margin: 0;
  font-family: "Playfair Display", serif;
  font-size: var(--text-hero);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.02em;
  color: #fff;
  text-transform: uppercase;
  font-synthesis: none;
  transition: font-size 0.25s ease;
}

.hero-subtitle {
  margin: 0;
  font-family: "Playfair Display", serif;
  font-size: var(--text-h3-lg);
  font-weight: 400;
  line-height: 1.15;
  color: var(--accent-gold);
  transition: font-size 0.25s ease;
}

.hero-description {
  width: 560px;
  max-width: 100%;
  font-family: "Inter", sans-serif;
  font-size: var(--text-h3);
  font-weight: 300;
  line-height: var(--leading-body);
  color: #fff;
  margin-top: 36px;
  margin-bottom: 40px;
  overflow: hidden;
  transition: opacity 0.25s ease, max-height 0.25s ease, margin 0.25s ease;
}

@media (max-width: 1024px) {
  .hero-container::after {
    width: 726px;
    height: 500px;
    background-size: auto 500px;
  }

  .hero-container {
    align-items: flex-start;
  }

  .hero-left {
    max-width: 100%;
    flex: 1 1 auto;
  }

  .hero-brand {
    gap: 20px;
  }

  .hero-headings {
    gap: 8px;
  }

  .hero-description {
    max-width: 100%;
  }
}

/* ─── Homepage Grid ─── */

.homepage {
  background: var(--bg-homepage);
  padding-top: 60px;
  padding-bottom: 60px;
  overflow-x: clip;
}

.hero--shrunk ~ .homepage {
  padding-top: calc(var(--hero-bar-height) + 160px);
}

.homepage__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 640px);
  grid-template-rows: auto auto;
  column-gap: 20px;
  row-gap: 34px;
  align-items: start;
  width: 100%;
  min-width: 0;
}

.who-writes {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}

.homepage__grid > .who-writes__stats {
  grid-column: 1;
  grid-row: 2;
  min-width: 0;
}

.homepage__aside {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 20px;
  align-items: stretch;
  min-width: 0;
}

.latest {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Section labels */

.who-writes__label,
.latest__label {
  font-family: 'Playfair Display', serif;
  font-size: var(--text-sm);
  line-height: var(--leading-tight);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.who-writes__label {
  margin-bottom: 28px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.who-writes__label::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 72px;
  height: 2px;
  background: var(--accent-gold);
}

.latest__label {
  margin: 0 0 12px;
  padding: 0;
  position: static;
}

h2.latest__label {
  font-size: var(--text-sm);
  line-height: var(--leading-tight);
}

h2.latest__label::after {
  display: none;
}

.who-writes__profile {
  display: flex;
  gap: 26px;
  align-items: flex-start;
  margin-bottom: 0;
}

.who-writes__photo {
  width: 190px;
  height: 260px;
  object-fit: cover;
  flex-shrink: 0;
}

.who-writes__info {
  min-width: 0;
}

.who-writes__name {
  font-family: 'Playfair Display', serif;
  font-size: var(--text-h3-lg);
  line-height: var(--leading-snug);
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-primary);
  white-space: nowrap;
}

.who-writes__bio {
  font-family: 'Inter', sans-serif;
  font-size: var(--text-md);
  line-height: var(--leading-relaxed);
  font-weight: 400;
  color: var(--text-primary);
}

.article-card__excerpt,
.resume-card p {
  font-family: 'Inter', sans-serif;
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  font-weight: 400;
  color: var(--text-primary);
}

.who-writes__stats {
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  flex: 0 0 auto;
}

.stat__icon {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  object-fit: contain;
  border-radius: 0;
}

.stat__label {
  font-family: 'Inter', sans-serif;
  font-size: clamp(0.6rem, 0.5rem + 0.55vw, 0.8rem);
  line-height: var(--leading-tight);
  color: var(--text-primary);
}

/* MAX CTA card */

.max-cta {
  background: var(--bg-hero);
  padding: 28px;
  border-radius: var(--radius-ui);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 32px;
  align-self: stretch;
}

.max-cta__text {
  font-family: 'Playfair Display', serif;
  font-size: var(--text-h3);
  line-height: 1.5;
  font-weight: 400;
  color: #fff;
}

.max-cta__line {
  width: 48px;
  height: 2px;
  background: var(--accent-gold);
}

.max-cta--horizontal {
  flex-direction: row;
  align-items: center;
  gap: 24px 32px;
  margin-bottom: 48px;
}

.max-cta--horizontal .max-cta__text {
  flex: 1;
  min-width: 0;
}

.max-cta--horizontal .max-cta__line {
  width: 2px;
  height: 48px;
  flex-shrink: 0;
}

.max-cta--horizontal .btn-max {
  width: auto;
  flex-shrink: 0;
  white-space: nowrap;
}

/* Latest article */

.article-card {
  width: 100%;
  max-width: none;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-ui);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  transition: border-color 0.25s ease;
}

.article-card:hover {
  border-color: var(--accent-gold);
}

.article-card::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  width: 72px;
  height: 2px;
  background: var(--accent-gold);
}

.article-card__image {
  width: 100%;
  height: 180px;
  max-height: 200px;
  object-fit: cover;
  object-position: bottom;
}

/* WebP: picture не ломает flex-раскладку карточек */
.article-card > picture {
  display: contents;
}

.author-figure picture {
  display: block;
  width: 100%;
  line-height: 0;
}

.article-card__body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.article-card__title {
  font-family: 'Playfair Display', serif;
  font-size: var(--text-h3);
  line-height: var(--leading-snug);
  font-weight: 600;
  color: var(--text-primary);
}

.article-card__link {
  display: inline-block;
  font-family: 'Playfair Display', serif;
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--accent-gold);
  margin-top: 4px;
  transition: color 0.25s ease, transform 0.25s ease;
}

.article-card__link:hover {
  color: var(--accent-gold-hover);
  transform: translateX(4px);
}

.hero-brand__photo:hover {
  opacity: 0.85;
}

.hero-brand__photo:focus-visible {
  outline: 2px solid var(--accent-gold);
  outline-offset: 2px;
}

/* ─── Articles catalog ─── */

.articles-catalog {
  padding-bottom: 80px;
}

.articles-catalog__main {
  display: flex;
  flex-direction: column;
  gap: 48px;
  min-width: 0;
}

.articles-catalog__header {
  max-width: 720px;
}

.articles-catalog__title {
  font-family: 'Playfair Display', serif;
  font-size: var(--text-h2);
  line-height: var(--leading-snug);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.articles-catalog__title::after {
  content: '';
  display: block;
  width: 130px;
  height: 2px;
  background: var(--accent-gold);
  margin-top: 16px;
}

.articles-catalog__lead {
  font-family: 'Inter', sans-serif;
  font-size: var(--text-md);
  line-height: var(--leading-relaxed);
  color: var(--text-primary);
}

.articles-catalog__lead-br {
  display: none;
}

@media (min-width: 901px) {
  .articles-catalog__lead-br {
    display: block;
  }

  .articles-catalog__lead {
    max-width: 36em;
  }
}

.articles-catalog__featured {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.articles-catalog__featured .article-card--featured {
  flex: 1;
  min-height: 360px;
}

.articles-catalog__max-cta {
  margin-top: -28px;
  margin-bottom: 0;
}

.articles-catalog__grid-label {
  margin: 0 0 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  position: relative;
}

h2.articles-catalog__grid-label::after {
  content: '';
  display: block;
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 72px;
  height: 2px;
  background: var(--accent-gold);
}

.articles-catalog__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: -28px;
}

/* Горизонтальные: 1-я, 6-я, 11-я…; между ними по 4 вертикальные (2×2) */
.articles-catalog__grid .article-card:nth-child(5n + 1) {
  grid-column: 1 / -1;
  box-shadow: 0 8px 32px rgba(28, 34, 38, 0.08);
}

.articles-catalog__grid .article-card:nth-child(5n + 1)::before {
  width: 130px;
}

.articles-catalog__grid .article-card:nth-child(5n + 1) .article-card__image {
  height: 240px;
  max-height: 280px;
}

.article-card__date {
  font-family: 'Inter', sans-serif;
  font-size: var(--text-sm);
  line-height: var(--leading-tight);
  font-weight: 400;
  color: var(--text-muted);
}

.article-card--featured {
  border-color: var(--accent-gold);
  box-shadow: 0 8px 32px rgba(28, 34, 38, 0.08);
}

.article-card--featured::before {
  width: 130px;
}

.article-card--featured .article-card__image {
  height: 300px;
  max-height: 360px;
}

@media (min-width: 901px) {
  .article-card--featured {
    flex-direction: row;
    align-items: stretch;
    gap: 28px;
    padding: 20px;
  }

  .article-card--featured .article-card__image {
    width: 42%;
    max-width: 480px;
    height: auto;
    min-height: 320px;
    max-height: none;
    flex-shrink: 0;
    align-self: stretch;
    object-fit: cover;
  }

  .article-card--featured .article-card__body {
    flex: 1;
    justify-content: center;
    padding: 8px 0;
  }

  .article-card--featured .article-card__title {
    font-size: clamp(1.25rem, 2vw, 1.75rem);
  }

  .articles-catalog__grid .article-card:nth-child(5n + 1) {
    flex-direction: row;
    align-items: stretch;
    gap: 28px;
    padding: 20px;
    min-height: 280px;
  }

  .articles-catalog__grid .article-card:nth-child(5n + 1) .article-card__image {
    width: 42%;
    max-width: 480px;
    height: auto;
    min-height: 240px;
    max-height: none;
    flex-shrink: 0;
    align-self: stretch;
    object-fit: cover;
  }

  .articles-catalog__grid .article-card:nth-child(5n + 1) .article-card__body {
    flex: 1;
    justify-content: center;
    padding: 8px 0;
  }

  .articles-catalog__grid .article-card:nth-child(5n + 1) .article-card__title {
    font-size: clamp(1.15rem, 1.8vw, 1.625rem);
  }
}

@media (min-width: 1201px) {
  .articles-catalog .author-page__inner {
    grid-template-rows: auto auto auto auto auto;
    row-gap: 48px;
    column-gap: 20px;
    align-items: stretch;
  }

  .articles-catalog .author-main {
    display: contents;
  }

  .articles-catalog .author-sidebar {
    display: contents;
  }

  .articles-catalog__header {
    grid-column: 1 / 3;
    grid-row: 1;
    max-width: none;
  }

  .articles-catalog__featured {
    grid-column: 1 / 3;
    grid-row: 2;
    min-height: 0;
    height: 100%;
  }

  .articles-catalog__max-cta {
    grid-column: 1 / 3;
    grid-row: 3;
  }

  .articles-catalog__grid-label {
    grid-column: 1 / 3;
    grid-row: 4;
    margin: 0;
    align-self: end;
  }

  .articles-catalog__grid {
    grid-column: 1 / 3;
    grid-row: 5;
    margin-top: -28px;
  }

  .articles-catalog .resume-card {
    grid-column: 3;
    grid-row: 1 / 4;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    margin: 0;
  }

  .articles-catalog .sidebar-card {
    margin-bottom: 0;
  }

  .articles-catalog__sidebar-stack {
    grid-column: 3;
    grid-row: 5;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    gap: 32px;
    min-width: 0;
    margin-top: -28px;
  }

  .articles-catalog__sidebar-stack .sidebar-card--sticky {
    position: sticky;
    top: calc(var(--article-top-height, 0px) + 32px);
    z-index: 1;
  }

  .articles-catalog .article-card--featured {
    height: 100%;
    min-height: 480px;
  }

  .articles-catalog .article-card--featured .article-card__image {
    width: 44%;
    max-width: none;
    min-height: 100%;
    height: 100%;
  }
}

@media (max-width: 900px) {
  .articles-catalog__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1200px) {
  .articles-catalog .author-main {
    display: flex;
    flex-direction: column;
    gap: 48px;
    min-width: 0;
    width: 100%;
  }

  .articles-catalog .author-sidebar {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 20px;
    width: 100%;
    min-width: 0;
  }

  .articles-catalog__sidebar-stack {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    min-width: 0;
  }

  .articles-catalog .author-sidebar > *,
  .articles-catalog__sidebar-stack > * {
    width: 100%;
    max-width: 100%;
    flex: none;
    grid-column: auto;
    grid-row: auto;
  }
}

@media (max-width: 900px) {
  .articles-catalog .author-page__inner {
    padding-left: 24px;
    padding-right: 24px;
    box-sizing: border-box;
  }

  .articles-catalog .author-sidebar,
  .articles-catalog__sidebar-stack,
  .articles-catalog .sidebar-card {
    min-width: 0;
    box-sizing: border-box;
  }
}

@media (max-width: 768px) {
  .articles-catalog {
    padding-bottom: 64px;
  }

  .articles-catalog__main {
    gap: 40px;
  }

  .articles-catalog__featured .article-card--featured {
    min-height: 420px;
  }

  .article-card--featured .article-card__image {
    height: 260px;
    max-height: 300px;
  }
}

/* ─── Author Page ─── */

.author-page {
  background: var(--bg-author);
  padding: 60px 0;
}

.author-page__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--aside-narrow) var(--aside-wide);
  column-gap: 20px;
  align-items: start;
}

@media (min-width: 1201px) {
  .author-page__inner {
    align-items: stretch;
  }

  .author-sidebar .sidebar-card--sticky {
    position: sticky;
    top: 32px;
    z-index: 1;
  }

  .author-page--home .author-sidebar .sidebar-card--sticky {
    top: calc(var(--hero-bar-height, 0px) + 32px);
    transition: top 0.25s ease;
  }

  .author-page:not(.author-page--home) .author-sidebar .sidebar-card--sticky {
    top: calc(var(--article-top-height, 0px) + 32px);
    transition: top 0.25s ease;
  }

  .homepage__aside .max-cta {
    order: 1;
    flex: 1 1 var(--aside-narrow);
    min-width: 0;
    width: var(--aside-narrow);
    max-width: var(--aside-narrow);
  }

  .homepage__aside .latest {
    order: 2;
    flex: 1 1 var(--aside-wide);
    min-width: 0;
    width: var(--aside-wide);
    max-width: var(--aside-wide);
  }
}

.author-main {
  grid-column: 1 / 3;
  min-width: 0;
}

.author-sidebar {
  grid-column: 3;
  width: 100%;
  max-width: var(--aside-wide);
  min-width: 0;
}

/* Author cards */

.quote-block,
.summary-callout,
.sidebar-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-ui);
}

.quote-block {
  padding: 24px;
  margin-bottom: 48px;
}

.quote-block:not(.quote-block--plain) {
  display: flex;
  align-items: flex-start;
  gap: 40px;
}

.quote-block--plain {
  border-left: 4px solid var(--accent-gold);
}

.quote-block__mark {
  width: 36px;
  flex-shrink: 0;
  border-radius: 0;
}

.quote-block p {
  font-family: 'Playfair Display', serif;
  font-size: var(--text-h3);
  line-height: 1.64;
  font-style: italic;
  color: var(--text-primary);
  flex: 1;
  min-width: 0;
}

.quote-block--plain p {
  font-style: normal;
  font-size: var(--text-body);
  line-height: var(--leading-body);
}

.author-figure {
  margin: 0 0 48px;
  border: 1px solid var(--border);
  border-radius: var(--radius-ui);
  background: var(--bg-white);
  padding: 14px;
  position: relative;
}

.author-figure::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  width: 72px;
  height: 2px;
  background: var(--accent-gold);
}

.author-figure__image {
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: clamp(280px, 50vw, 320px);
  object-fit: cover;
  object-position: bottom;
  border-radius: var(--radius-ui);
}

.text-columns {
  columns: 2;
  column-gap: 48px;
  font-size: var(--text-md);
  line-height: 1.75;
  color: var(--text-primary);
  margin-bottom: 48px;
  text-align: justify;
}

.text-columns p + p {
  margin-top: 20px;
}

.author-section__lead {
  font-size: var(--text-md);
  line-height: 1.78;
  color: var(--text-primary);
  margin-bottom: 48px;
}

.numbered-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px 24px;
  margin-bottom: 48px;
}

.numbered-item {
  display: flex;
  flex-direction: column;
  font-size: var(--text-md);
  line-height: 1.75;
}

.numbered-item:nth-child(odd) {
  position: relative;
}

.numbered-item:nth-child(odd)::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(
    to bottom,
    transparent,
    var(--border) 20%,
    var(--border) 80%,
    transparent
  );
  pointer-events: none;
}

.numbered-item__head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.numbered-item__num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-gold);
  color: #fff;
  font-size: var(--text-sm);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.numbered-item h4 {
  font-family: 'Inter', sans-serif;
  font-size: inherit;
  font-weight: 700;
  line-height: 1.25;
  margin: 0;
  flex: 1;
  min-width: 0;
}

.numbered-item p {
  margin-top: 20px;
  font-size: inherit;
  line-height: inherit;
  color: var(--text-primary);
  padding-right: 8px;
}

.summary-callout {
  padding: 24px;
  display: flex;
  gap: 24px;
  align-items: flex-start;
  font-family: 'Playfair Display', serif;
}

.summary-callout__icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 0;
}

.summary-callout p {
  font-size: var(--text-body);
  line-height: var(--leading-body);
  font-style: italic;
}

.summary-callout__title {
  font-weight: 700;
  font-style: italic;
}

/* ─── Sidebar ─── */

.author-page--home .sidebar-card--about {
  display: none;
}

.sidebar-card {
  padding: 32px;
  margin-bottom: 32px;
}

.sidebar-card:last-child {
  margin-bottom: 0;
}

.sidebar-card--sticky {
  box-sizing: border-box;
  height: calc(32px * 2 + 72px + 20px + 48px);
  align-self: flex-start;
}

.sidebar-card--sticky .author-profile {
  height: 100%;
}

.sidebar-card--sticky .author-profile__main {
  max-height: 72px;
  overflow: hidden;
}

.sidebar-card__title {
  font-family: 'Playfair Display', serif;
  font-size: var(--text-sm);
  line-height: var(--leading-tight);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 24px;
  display: flex;
  gap: 20px;
  align-items: center;
}

.sidebar-card__title-icon,
.sidebar-list__icon {
  width: 30px;
  flex-shrink: 0;
  border-radius: 0;
}

.sidebar-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-list li {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: var(--text-primary);
}

.resume-card p:not(:last-child) {
  padding-bottom: 20px;
  margin-bottom: 20px;
  position: relative;
}

.resume-card p:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 80px;
  border-bottom: 1px solid var(--accent-gold);
}

.author-profile {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.author-profile__main {
  display: flex;
  gap: 20px;
  align-items: center;
}

.author-profile__photo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.author-profile__info {
  flex: 1;
  min-width: 0;
}

.author-profile__name {
  font-family: 'Playfair Display', serif;
  font-size: var(--text-body);
  font-weight: 600;
  line-height: var(--leading-snug);
  margin-bottom: 4px;
}

.author-profile__role {
  font-size: var(--text-sm);
  line-height: 1.57;
  color: var(--text-primary);
}

.author-profile .btn-max {
  height: 48px;
  min-width: 0;
}

.max-cta .btn-max,
.author-profile .btn-max {
  width: 100%;
  justify-content: center;
  padding: 0 16px;
  font-size: var(--text-sm);
  letter-spacing: 0.06em;
}

.max-cta--horizontal .btn-max {
  width: auto;
}

/* ─── Footer ─── */

.site-footer {
  background: var(--brand-dark);
  padding: 32px 0;
  font-family: 'Playfair Display', 'Cormorant Garamond', serif;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  column-gap: 24px;
  row-gap: 16px;
}

.site-footer__copy,
.site-footer__nav,
.site-footer__legal,
.site-footer__credits {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.5);
}

.site-footer__nav a,
.site-footer__credits a {
  transition: color 0.25s ease;
}

.site-footer__copy {
  margin: 0;
  line-height: 1.4;
  flex-shrink: 0;
}

.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin: 0;
  flex-shrink: 0;
}

.site-footer__legal > span[aria-hidden="true"] {
  color: rgba(255, 255, 255, 0.35);
}

.site-footer__privacy,
.site-footer__cookies {
  font-family: 'Playfair Display', 'Cormorant Garamond', serif;
  font-size: var(--text-sm);
  font-weight: 400;
  font-style: normal;
  letter-spacing: normal;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.25s ease;
}

.site-footer__privacy:hover,
.site-footer__cookies:hover {
  color: rgba(255, 255, 255, 0.8);
}

.site-footer__cookies {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  text-align: left;
}

.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  align-items: center;
  justify-content: center;
  color: var(--accent-gold);
  flex: 1 1 auto;
  min-width: 0;
}

.site-footer__nav > span[aria-hidden="true"] {
  color: rgba(255, 255, 255, 0.5);
}

.site-footer__credits {
  margin: 0;
  line-height: 1.4;
  flex-shrink: 0;
  text-align: right;
}

.site-footer__nav a:hover,
.site-footer__credits a:hover {
  color: rgba(255, 255, 255, 0.8);
}

@media (max-width: 1100px) {
  .site-footer__inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    row-gap: 16px;
  }

  .site-footer__nav,
  .site-footer__legal {
    justify-content: center;
    flex: 0 1 auto;
  }

  .site-footer__credits {
    text-align: center;
  }
}

@media (max-width: 480px) {
  .site-footer {
    padding: 28px 0;
  }

  .site-footer__inner {
    row-gap: 14px;
  }

  .site-footer__nav {
    gap: 8px 14px;
  }

  .site-footer__legal {
    flex-direction: column;
    gap: 10px;
  }

  .site-footer__legal > span[aria-hidden="true"] {
    display: none;
  }
}

/* ─── Scroll to top ─── */

.scroll-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 150;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: none;
  border-radius: var(--radius-ui);
  background: var(--accent-gold);
  color: var(--brand-dark);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease, background 0.25s ease;
}

.scroll-top--visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.scroll-top:hover {
  background: var(--accent-gold-hover);
}

.scroll-top:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

@media (max-width: 768px) {
  .scroll-top {
    right: 16px;
    bottom: 16px;
    width: 44px;
    height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-top {
    transition: opacity 0.01ms, visibility 0.01ms;
    transform: none;
  }

  .scroll-top--visible {
    transform: none;
  }
}

/* ─── Consent banner (ФЗ-152 / cookie) ─── */

.consent-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  padding: 16px 20px 24px;
  pointer-events: none;
  transform: translateY(0);
  opacity: 1;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.consent-banner--hide {
  transform: translateY(12px);
  opacity: 0;
}

.consent-banner__card {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  max-width: 560px;
  margin: 0 auto;
  padding: 20px 22px;
  background: #fff;
  border: 1px solid #e6e7e8;
  border-radius: 6px;
  box-shadow: 0 8px 28px rgba(28, 34, 38, 0.12);
}

.consent-banner__icon {
  flex-shrink: 0;
  display: flex;
  color: var(--accent-gold);
  margin-top: 1px;
}

.consent-banner__body {
  flex: 1;
  min-width: 0;
}

.consent-banner__text {
  margin: 0;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-secondary);
}

.consent-banner__text a {
  color: var(--accent-gold);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.25s ease;
}

.consent-banner__text a:hover {
  color: var(--accent-gold-hover);
}

.consent-banner__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-top: 14px;
}

.consent-banner__btn {
  appearance: none;
  border: none;
  border-radius: var(--radius-ui);
  min-height: 36px;
  padding: 0 18px;
  background: var(--accent-gold);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 0.25s ease;
}

.consent-banner__btn:hover {
  background: var(--accent-gold-hover);
}

.consent-banner__decline {
  appearance: none;
  border: none;
  background: transparent;
  padding: 0;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.25s ease;
}

.consent-banner__decline:hover {
  color: var(--text-secondary);
}

.privacy-page.author-page__inner {
  grid-template-columns: 1fr;
}

.privacy-page__main {
  grid-column: 1;
  max-width: 820px;
}

.privacy-page .article-prose ul {
  margin: 0 0 20px;
  padding-left: 1.25em;
}

.privacy-page .article-prose li + li {
  margin-top: 8px;
}

.privacy-page .article-prose a {
  color: var(--accent-gold);
  transition: color 0.25s ease;
}

.privacy-page .article-prose a:hover {
  color: var(--accent-gold-hover);
}

/* ─── Responsive ─── */

@media (max-width: 1200px) {
  .homepage__grid {
    grid-template-columns: minmax(0, 190px) minmax(0, 1fr);
    column-gap: 26px;
    row-gap: 20px;
  }

  .who-writes__name {
    white-space: normal;
  }

  .homepage__aside {
    margin-top: 40px;
  }

  .homepage__aside .max-cta,
  .homepage__aside .latest {
    flex: 1 1 0;
    width: auto;
    max-width: none;
    min-width: 0;
  }

  .author-page__inner {
    grid-template-columns: 1fr;
    row-gap: 20px;
  }

  .article-top__inner {
    grid-template-columns: 1fr;
    row-gap: 16px;
  }

  .article-top__home {
    grid-column: auto;
    grid-row: auto;
    min-width: 0;
  }

  .article-top__aside {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: clamp(8px, 1.2vw, 16px);
    align-items: center;
    justify-self: start;
    max-width: clamp(280px, calc(280px + (100vw - 711px) * 60 / 489), 340px);
    width: auto;
    min-width: 0;
    --article-aside-decor-base: clamp(92px, calc(92px + (100vw - 711px) * 42 / 489), 134px);
    min-height: var(--article-aside-decor-base);
  }

  .article-top--shrunk .article-top__inner {
    row-gap: 11.2px;
  }

  .article-top__decor {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    align-self: center;
    width: auto;
    max-width: var(--article-aside-decor-base);
    max-height: var(--article-decor-max-height);
    height: var(--article-aside-decor-base);
    min-width: 0;
    margin-left: 0;
    object-fit: contain;
    object-position: right center;
    pointer-events: none;
  }

  .article-top__back {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    align-self: center;
    min-width: 0;
    padding-right: 0;
    z-index: auto;
    position: static;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .hero--shrunk {
    --site-top-bar-decor-base: clamp(92px, calc(92px + (100vw - 711px) * 42 / 489), 134px);
  }

  .hero--shrunk .hero__bar {
    height: var(--site-top-bar-decor-base);
    min-height: var(--site-top-bar-decor-base);
  }

  .author-main,
  .author-sidebar {
    grid-column: auto;
    max-width: none;
  }

  .author-sidebar {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
  }

  .author-sidebar .sidebar-card {
    margin-bottom: 0;
  }

  .author-sidebar .resume-card,
  .author-sidebar .sidebar-card--sticky {
    flex: 1 1 0;
    min-width: 0;
  }

  .author-sidebar .sidebar-card--about {
    flex: 1 1 100%;
  }

  .author-sidebar .sidebar-card--sticky {
    position: static;
  }

  .who-writes,
  .who-writes__profile {
    display: contents;
  }

  .who-writes__label {
    grid-column: 1 / -1;
  }

  .who-writes__photo {
    grid-column: 1;
    grid-row: 2 / 4;
    align-self: start;
    max-width: 100%;
  }

  .who-writes__info {
    grid-column: 2;
    grid-row: 2;
    min-width: 0;
  }

  .homepage__grid > .who-writes__stats {
    grid-column: 2;
    grid-row: 3;
  }

  .homepage__aside {
    grid-column: 1 / -1;
    grid-row: 4;
  }
}

/* Планшет: на страницах статей «Про риск…» и «Об авторе» в один ряд */
@media (min-width: 768px) and (max-width: 1200px) {
  .author-page:not(.author-page--home):not(.articles-catalog) .author-sidebar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: stretch;
  }

  .author-page:not(.author-page--home):not(.articles-catalog) .author-sidebar .resume-card,
  .author-page:not(.author-page--home):not(.articles-catalog) .author-sidebar .sidebar-card--about {
    flex: none;
    width: auto;
    max-width: none;
    min-width: 0;
  }

  .author-page:not(.author-page--home):not(.articles-catalog) .author-sidebar .resume-card {
    grid-column: 1;
    grid-row: 1;
  }

  .author-page:not(.author-page--home):not(.articles-catalog) .author-sidebar .sidebar-card--about {
    grid-column: 2;
    grid-row: 1;
  }

  .author-page:not(.author-page--home):not(.articles-catalog) .author-sidebar .sidebar-card--sticky {
    grid-column: 1 / -1;
    grid-row: 2;
    flex: none;
    width: 100%;
    max-width: none;
  }
}

@media (max-width: 640px) {
  .homepage__aside {
    flex-direction: column;
  }

  .homepage__aside .max-cta,
  .homepage__aside .latest {
    flex: 1 1 auto;
    width: 100%;
    max-width: none;
  }

  .author-sidebar .resume-card,
  .author-sidebar .sidebar-card--sticky {
    flex: 1 1 100%;
    width: 100%;
    max-width: none;
  }
}

@media (max-width: 900px) {
  .container {
    padding: 0 24px;
  }

  .hero-container {
    padding: 0 24px;
  }

  .hero-container::after {
    width: 726px;
    height: 432px;
    background-size: auto 432px;
  }

  .homepage__grid {
    row-gap: 24px;
  }

  .who-writes__stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    justify-items: center;
  }

  .text-columns {
    columns: 1;
  }

  .numbered-grid {
    grid-template-columns: 1fr;
  }

  .numbered-item:nth-child(odd)::after {
    display: none;
  }
}

@media (max-width: 768px) {
  .homepage__grid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }

  .author-page:not(.author-page--home) .author-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  .author-page:not(.author-page--home) .author-sidebar .resume-card,
  .author-page:not(.author-page--home) .author-sidebar .sidebar-card--about,
  .author-page:not(.author-page--home) .author-sidebar .sidebar-card--sticky {
    flex: 1 1 100%;
    width: 100%;
    max-width: none;
    grid-column: auto;
    grid-row: auto;
  }

  .articles-catalog__sidebar-stack {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
  }

  .who-writes {
    display: block;
  }

  .who-writes__profile {
    display: flex;
    gap: 16px;
    align-items: flex-start;
  }

  .who-writes__photo,
  .who-writes__info,
  .homepage__grid > .who-writes__stats,
  .homepage__aside {
    grid-column: auto;
    grid-row: auto;
  }

  .homepage__aside {
    margin-top: 0;
  }

  .homepage__grid > .who-writes__stats {
    margin-bottom: 24px;
  }

  .quote-block:not(.quote-block--plain) {
    gap: 20px;
  }

  .quote-block__mark {
    width: 28px;
    height: auto;
  }

  .summary-callout {
    gap: 20px;
  }

  .summary-callout__icon {
    width: 28px;
    height: auto;
  }

  .hero__bar {
    padding: 48px 0 40px;
  }

  .hero-container::after {
    width: 100%;
    height: 340px;
    background-size: auto 340px;
  }

  .hero-brand {
    gap: 16px;
  }

  .hero-headings {
    gap: 6px;
  }

  .hero-avatar {
    width: 122px;
    height: 122px;
  }

  .hero-brand__photo {
    width: 122px;
    height: 122px;
  }

  .hero-description {
    line-height: 1.6;
    margin-top: 28px;
    margin-bottom: 24px;
  }

  .hero-button {
    width: 100%;
    justify-content: center;
    margin-top: 96px;
  }

  .hero--shrunk .hero-brand {
    gap: 16px;
  }

  .hero--shrunk .hero-avatar {
    width: 72px;
    height: 72px;
  }

  .hero--shrunk .hero-brand__photo {
    width: 72px;
    height: 72px;
  }

  .hero--shrunk .hero-title {
    font-size: clamp(1.125rem, 5.5vw, 1.75rem);
  }

  .hero--shrunk .hero-subtitle {
    font-size: clamp(0.75rem, 3.5vw, 1rem);
  }
}

/* ─── Article page ─── */

.article-top {
  position: sticky;
  top: 0;
  z-index: 100;
  overflow-x: clip;
  overflow-y: visible;
  background: var(--brand-dark);
  --site-top-bar-decor-max: 110px;
  --site-top-bar-decor-base: 134px;
  --article-decor-max-height: var(--site-top-bar-decor-max);
  --article-decor-mobile-scale: 1.265;
}

.article-top__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--aside-narrow) var(--aside-wide);
  column-gap: 20px;
  align-items: center;
  transition: row-gap 0.25s ease;
}

.article-top__home {
  grid-column: 1 / 3;
  position: relative;
  z-index: 1;
  min-width: 0;
  display: flex;
  align-items: center;
}

.article-top__aside {
  grid-column: 3;
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  width: 100%;
  max-width: 340px;
  min-width: 0;
  align-self: center;
  --article-aside-decor-base: var(--site-top-bar-decor-base);
  min-height: var(--article-aside-decor-base);
  transition: min-height 0.25s ease;
}

.article-top__decor {
  grid-column: 1;
  grid-row: 1;
  height: var(--article-aside-decor-base);
  max-height: var(--article-decor-max-height);
  max-width: min(100%, var(--article-aside-decor-base));
  width: auto;
  object-fit: contain;
  object-position: left center;
  justify-self: start;
  pointer-events: none;
  border-radius: 0;
  transition: height 0.25s ease, max-height 0.25s ease, max-width 0.25s ease;
}

.article-top .hero-brand {
  align-items: center;
  gap: 24px;
  transition: gap 0.25s ease;
}

.article-top .hero-avatar {
  width: 96px;
  height: 96px;
  transition: width 0.25s ease, height 0.25s ease;
}

.article-top .hero-brand__photo {
  width: 96px;
  height: 96px;
}

.article-top .hero-title {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  transition: font-size 0.25s ease;
}

.article-top .hero-subtitle {
  font-size: clamp(0.875rem, 2vw, 1.125rem);
  transition: font-size 0.25s ease;
}

.article-top__back {
  grid-column: 1;
  grid-row: 1;
  position: relative;
  z-index: 1;
  justify-self: end;
  align-self: center;
  margin-top: 0;
  padding-right: 32px;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.25s ease, transform 0.25s ease, font-size 0.25s ease;
}

.article-top__back.article-card__link:hover {
  color: var(--accent-gold-hover);
  transform: translateX(-4px);
}

.article-top--shrunk .article-top__back {
  font-size: clamp(0.6125rem, 1.4vw, 0.7875rem);
}

.article-top--shrunk .article-top__aside {
  min-height: calc(var(--article-aside-decor-base) * 0.7);
}

.article-top--shrunk .article-top__decor {
  height: calc(var(--article-aside-decor-base) * 0.7);
  max-height: calc(var(--article-decor-max-height) * 0.7);
  max-width: calc(var(--article-aside-decor-base) * 0.7);
}

.article-top--shrunk .hero-brand {
  gap: 16.8px;
}

.article-top--shrunk .hero-avatar {
  width: 67.2px;
  height: 67.2px;
}

.article-top--shrunk .hero-brand__photo {
  width: 67.2px;
  height: 67.2px;
}

.article-top--shrunk .hero-title {
  font-size: clamp(1.05rem, 2.1vw, 1.575rem);
}

.article-top--shrunk .hero-subtitle {
  font-size: clamp(0.6125rem, 1.4vw, 0.7875rem);
}

@media (prefers-reduced-motion: reduce) {
  .article-top__inner,
  .article-top .hero-brand,
  .article-top .hero-avatar,
  .article-top .hero-brand__photo,
  .article-top .hero-title,
  .article-top .hero-subtitle,
  .article-top__aside,
  .article-top__decor,
  .article-top__back,
  .hero__bar,
  .hero .hero-brand,
  .hero .hero-avatar,
  .hero .hero-brand__photo,
  .hero .hero-title,
  .hero .hero-subtitle,
  .hero .hero-description,
  .hero .hero-button,
  .hero .hero-container::after,
  .hero .hero-aside,
  .hero .article-top__decor,
  .hero .article-top__back,
  .author-page:not(.author-page--home) .author-sidebar .sidebar-card--sticky {
    transition: none;
  }
}

.article-breadcrumb {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: 24px;
}

.article-breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.25s ease;
}

.article-breadcrumb a:hover {
  color: var(--text-primary);
}

.article-header {
  margin-bottom: 48px;
}

.article-header h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.25;
  margin-bottom: 20px;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: 32px;
}

.article-prose {
  font-size: var(--text-md);
  line-height: 1.75;
  color: var(--text-primary);
  margin-bottom: 48px;
  text-align: justify;
}

.article-prose p + p {
  margin-top: 20px;
}

@media (max-width: 768px) {
  .article-top {
    overflow-x: visible;
  }

  .hero--shrunk .hero__bar {
    overflow-x: visible;
  }

  .hero--shrunk .hero-container {
    overflow-x: visible;
  }

  .article-top .hero-brand {
    gap: 16px;
  }

  .article-top .hero-avatar {
    width: 72px;
    height: 72px;
  }

  .article-top .hero-brand__photo {
    width: 72px;
    height: 72px;
  }

  .article-top__back {
    font-size: clamp(0.6875rem, 3.2vw, 0.875rem);
  }

  .article-top .hero-title {
    font-size: clamp(1.125rem, 5.5vw, 1.75rem);
  }

  .article-top .hero-subtitle {
    font-size: clamp(0.75rem, 3.5vw, 1rem);
  }

  .article-top--shrunk .hero-brand {
    gap: 11.2px;
  }

.article-top--shrunk .hero-avatar {
  width: 50.4px;
  height: 50.4px;
}

.article-top--shrunk .hero-brand__photo {
  width: 50.4px;
  height: 50.4px;
}

  .article-top--shrunk .hero-title {
    font-size: clamp(0.7875rem, 3.85vw, 1.225rem);
  }

  .article-top--shrunk .hero-subtitle,
  .article-top--shrunk .article-top__back {
    font-size: clamp(0.525rem, 2.45vw, 0.7rem);
  }

  .max-cta--horizontal {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }

  .max-cta--horizontal .max-cta__line {
    width: 48px;
    height: 2px;
  }

  .max-cta--horizontal .btn-max {
    width: 100%;
    white-space: normal;
  }
}

@media (max-width: 710px) {
  .article-top__inner,
  .hero--shrunk .hero-container {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    column-gap: 12px;
    row-gap: 10px;
    align-items: center;
    transition: row-gap 0.25s ease, column-gap 0.25s ease;
  }

  .article-top__inner {
    padding-block: 16px;
  }

  .hero--shrunk {
    --site-top-bar-decor-base: clamp(72px, calc(92px + (100vw - 711px) * 42 / 489), 104px);
  }

  .hero--shrunk .hero__bar {
    height: calc(var(--site-top-bar-decor-base) * var(--article-decor-mobile-scale) + 44px);
    min-height: calc(var(--site-top-bar-decor-base) * var(--article-decor-mobile-scale) + 44px);
    padding-block: 16px;
  }

  .article-top__home,
  .hero--shrunk .hero-left {
    grid-column: 1;
    grid-row: 1;
  }

  .article-top__aside,
  .hero--shrunk .hero-aside {
    display: contents;
    --article-aside-decor-base: clamp(72px, calc(92px + (100vw - 711px) * 42 / 489), 104px);
  }

  .article-top--shrunk .article-top__inner {
    row-gap: 7px;
    column-gap: 8.4px;
  }

  .article-top__back {
    grid-column: 1;
    grid-row: 2;
    order: unset;
    flex: none;
    position: static;
    justify-self: start;
    align-self: start;
    padding-right: 0;
    font-size: clamp(0.75rem, 3.5vw, 1rem);
  }

  .article-top__decor {
    grid-column: 2;
    grid-row: 1 / span 2;
    order: unset;
    flex: none;
    justify-self: end;
    align-self: center;
    --decor-scale: var(--article-decor-mobile-scale);
    max-width: calc(var(--article-aside-decor-base) * var(--decor-scale));
    max-height: calc(var(--article-decor-max-height) * var(--decor-scale));
    height: calc(var(--article-aside-decor-base) * var(--decor-scale));
    margin-left: 0;
    object-position: right center;
  }

  .article-top--shrunk .article-top__decor {
    max-width: calc(var(--article-aside-decor-base) * 0.7 * var(--decor-scale));
    max-height: calc(var(--article-decor-max-height) * 0.7 * var(--decor-scale));
    height: calc(var(--article-aside-decor-base) * 0.7 * var(--decor-scale));
  }
}

@media (max-width: 480px) {
  .who-writes__profile {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    flex-direction: column;
  }

  .who-writes__photo {
    width: 100%;
    height: auto;
    object-fit: cover;
    flex-shrink: 0;
  }

  .who-writes__stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 16px;
    justify-items: center;
  }

  .stat {
    min-width: 0;
    width: 100%;
  }

  .hero-container::after {
    top: 54%;
    width: 100%;
    height: 284px;
    background-size: auto 284px;
  }
}

/* Планшет: «Про риск…» и «Об авторе» в один ряд (статьи и каталог) */
@media (min-width: 768px) and (max-width: 1200px) {
  .author-page:not(.author-page--home) .author-sidebar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    align-items: start;
  }

  .author-page:not(.author-page--home) .author-sidebar .resume-card {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    max-width: none;
    min-width: 0;
    margin: 0;
  }

  .author-page:not(.author-page--home) .author-sidebar .sidebar-card--about {
    grid-column: 2;
    grid-row: 1;
    width: 100%;
    max-width: none;
    min-width: 0;
    margin: 0;
  }

  .author-page:not(.author-page--home) .author-sidebar .sidebar-card--sticky {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    max-width: none;
    min-width: 0;
    margin: 0;
  }

  .author-page:not(.author-page--home) .author-sidebar .articles-catalog__sidebar-stack {
    display: contents;
  }
}
