/*
Theme Name: Topovysok
Theme URI: https://topovysok.ru/
Author: Topovysok
Description: Лёгкая классическая WordPress-тема для topovysok.ru: статические страницы, блог /blog/, раздел экспериментов на основе рубрики с настраиваемой URL-базой, единый шаблон публикаций, автор, SEO, 404, JSON-LD, robots.txt и XML sitemap.
Version: 1.7.4
Requires at least: 6.4
Requires PHP: 8.0
Text Domain: topovysok
*/

:root {
  --tv-bg: #ffffff;
  --tv-surface: #f6f7f9;
  --tv-surface-blue: #eaf1fb;
  --tv-text: #172033;
  --tv-muted: #687386;
  --tv-border: #dce2ea;
  --tv-accent: #0b57d0;
  --tv-accent-hover: #0848ae;
  --tv-content: 1120px;
  --tv-wide: 1520px;
  --tv-sidebar: 320px;
  --tv-radius: 16px;
  --tv-shadow: 0 12px 34px rgba(23, 32, 51, 0.07);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--tv-bg);
  color: var(--tv-text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--tv-accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--tv-accent-hover); }
button, input, textarea, select { font: inherit; }

.site-shell { min-height: 100vh; display: flex; flex-direction: column; }
.site-main { flex: 1; }
.container { width: min(calc(100% - 40px), var(--tv-wide)); margin-inline: auto; }
.article-container { width: min(calc(100% - 40px), var(--tv-content)); margin-inline: auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.95);
  border-bottom: 1px solid var(--tv-border);
  backdrop-filter: blur(10px);
}
.site-header__inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.site-branding { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 0 0 auto; }
.custom-logo-link { display: inline-flex; }
.custom-logo { max-height: 42px; width: auto; }
.site-title { margin: 0; font-weight: 800; letter-spacing: -.03em; font-size: 24px; }
.site-title a { color: var(--tv-text); text-decoration: none; }
.site-header__navigation { display: flex; align-items: center; justify-content: flex-end; min-width: 0; }

.primary-nav ul { list-style: none; display: flex; align-items: center; justify-content: flex-end; gap: clamp(14px, 1.7vw, 24px); padding: 0; margin: 0; }
.primary-nav li { position: relative; margin: 0; }
.primary-nav a { display: inline-flex; align-items: center; min-height: 42px; color: var(--tv-text); font-size: 15px; line-height: 1.25; font-weight: 650; text-decoration: none; white-space: nowrap; }
.primary-nav a:hover, .primary-nav .current-menu-item > a, .primary-nav .current-menu-ancestor > a { color: var(--tv-accent); }
.primary-nav .current-menu-item > a::after, .primary-nav .current-menu-ancestor > a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -15px; height: 2px; border-radius: 2px; background: var(--tv-accent); }
.primary-nav .sub-menu { display: none; position: absolute; z-index: 60; top: calc(100% + 10px); left: -16px; min-width: 220px; padding: 10px; border: 1px solid var(--tv-border); border-radius: 12px; background: #fff; box-shadow: var(--tv-shadow); }
.primary-nav .menu-item-has-children:hover > .sub-menu, .primary-nav .menu-item-has-children:focus-within > .sub-menu { display: grid; gap: 2px; }
.primary-nav .sub-menu a { display: block; min-height: 0; padding: 9px 10px; border-radius: 8px; white-space: normal; }
.primary-nav .sub-menu a:hover { background: var(--tv-surface-blue); }
.menu-toggle { display: none; align-items: center; gap: 9px; border: 1px solid var(--tv-border); background: #fff; border-radius: 10px; padding: 8px 11px; color: var(--tv-text); font-size: 14px; font-weight: 700; cursor: pointer; }
.menu-toggle__icon { display: grid; gap: 3px; width: 18px; }
.menu-toggle__icon span { display: block; width: 100%; height: 2px; border-radius: 2px; background: currentColor; transition: transform .18s ease, opacity .18s ease; }
.menu-toggle[aria-expanded="true"] .menu-toggle__icon span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__icon span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] .menu-toggle__icon span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

.page-section { padding: 72px 0 88px; }
.page-header { margin-bottom: 34px; }
.page-header h1, .article-header h1 { margin: 0; color: var(--tv-text); letter-spacing: -.035em; line-height: 1.12; }
.page-header h1 { font-size: clamp(38px, 5vw, 64px); }
.article-header h1 { font-size: clamp(36px, 5vw, 58px); }

.back-link { display: inline-flex; margin-bottom: 24px; color: var(--tv-muted); font-size: 15px; text-decoration: none; }
.back-link:hover { color: var(--tv-accent); }
.article-page { padding: 58px 0 88px; }
.article-header { margin-bottom: 34px; }
.article-meta { margin-top: 18px; color: var(--tv-muted); font-size: 15px; line-height: 1.55; display: flex; flex-wrap: wrap; gap: 6px; }
.article-meta a { color: inherit; }
.article-meta a:hover { color: var(--tv-accent); }

.article-content { color: var(--tv-text); }
.article-content > :first-child { margin-top: 0; }
.article-content p { margin: 0 0 1.3em; }
.article-content .article-lead { color: #526071; font-size: 1.18em; line-height: 1.62; margin-bottom: 1.55em; }
.article-content h2, .article-content h3 { color: var(--tv-text); line-height: 1.2; letter-spacing: -.025em; scroll-margin-top: 100px; }
.article-content h2 { font-size: clamp(28px, 4vw, 38px); margin: 1.75em 0 .65em; }
.article-content h3 { font-size: clamp(22px, 3vw, 28px); margin: 1.55em 0 .55em; }
.article-content ul, .article-content ol { padding-left: 1.35em; margin: 0 0 1.35em; }
.article-content li + li { margin-top: .42em; }
.article-content blockquote { margin: 1.7em 0; padding: 4px 0 4px 24px; border-left: 4px solid var(--tv-border); color: #49566a; }
.article-content code { padding: .12em .35em; border-radius: 6px; background: var(--tv-surface); font-size: .92em; }
.article-content pre { overflow: auto; padding: 20px; border-radius: 12px; background: #111827; color: #f9fafb; font-size: 15px; line-height: 1.55; }
.article-content table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; margin: 1.5em 0; }
.article-content th, .article-content td { border: 1px solid var(--tv-border); padding: 10px 12px; text-align: left; }
.article-content th { background: var(--tv-surface); }

.article-featured-image { margin: 1.5em 0 2em; }
.article-featured-image img { display: block; width: 100%; border-radius: var(--tv-radius); box-shadow: var(--tv-shadow); }

.expert-comment {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin: 2em 0;
  padding: 22px 24px;
  background: var(--tv-surface-blue);
  border-left: 4px solid var(--tv-accent);
  border-radius: 0 14px 14px 0;
}
.expert-comment__avatar { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; display: block; background: #d8e4f8; }
.expert-comment__name { font-weight: 800; line-height: 1.2; }
.expert-comment__name a { color: var(--tv-text); text-decoration: none; }
.expert-comment__role { margin-top: 4px; color: var(--tv-muted); font-size: 14px; }
.expert-comment__text { margin-top: 12px; font-style: italic; }
.expert-comment__text > :last-child { margin-bottom: 0; }

.article-tags { margin-top: 38px; padding-top: 22px; border-top: 1px solid var(--tv-border); color: var(--tv-muted); font-size: 15px; }
.article-tags strong { color: var(--tv-text); }
.article-tags a { color: var(--tv-muted); }
.article-tags a:hover { color: var(--tv-accent); }

.author-card { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 22px; margin-top: 34px; padding: 26px; background: var(--tv-surface); border-radius: var(--tv-radius); }
.author-card__avatar { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; display: block; background: #e3e7ee; }
.author-card__name { font-size: 20px; line-height: 1.25; font-weight: 800; }
.author-card__name a { color: var(--tv-text); text-decoration: none; }
.author-card__bio { margin: 7px 0 10px; color: #4d596b; font-size: 15px; line-height: 1.6; }
.author-card__telegram { font-size: 15px; }

.related-posts { margin-top: 48px; }
.related-posts h2 { margin: 0 0 18px; font-size: 28px; letter-spacing: -.025em; }
.related-posts__list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.related-posts__list a { display: block; padding: 16px 18px; border: 1px solid var(--tv-border); border-radius: 12px; color: var(--tv-text); font-weight: 700; text-decoration: none; }
.related-posts__list a:hover { border-color: #b5c9e8; color: var(--tv-accent); background: #fbfdff; }

.blog-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 20px; }
.post-card { border: 1px solid var(--tv-border); border-radius: var(--tv-radius); overflow: hidden; background: #fff; transition: transform .16s ease, box-shadow .16s ease; }
.post-card:hover { transform: translateY(-2px); box-shadow: var(--tv-shadow); }
.post-card__image { display: block; aspect-ratio: 16 / 9; background: var(--tv-surface); }
.post-card__image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-card__body { padding: 22px; }
.post-card__date { color: var(--tv-muted); font-size: 14px; }
.post-card h2 { margin: 7px 0 9px; font-size: 26px; line-height: 1.22; letter-spacing: -.025em; }
.post-card h2 a { color: var(--tv-text); text-decoration: none; }
.post-card h2 a:hover { color: var(--tv-accent); }
.post-card__excerpt { color: #536072; font-size: 16px; }
.post-card__excerpt p { margin-bottom: 0; }

.pagination { margin-top: 36px; }
.pagination .nav-links { display: flex; gap: 8px; flex-wrap: wrap; }
.pagination .page-numbers { min-width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; padding: 0 12px; border: 1px solid var(--tv-border); border-radius: 10px; text-decoration: none; color: var(--tv-text); }
.pagination .page-numbers.current, .pagination a.page-numbers:hover { border-color: var(--tv-accent); color: var(--tv-accent); }

.site-footer { margin-top: 60px; border-top: 1px solid var(--tv-border); background: #fbfcfd; }
.site-footer__inner { min-height: 132px; display: flex; align-items: center; justify-content: space-between; gap: 36px; color: var(--tv-muted); font-size: 14px; }
.site-footer__brand { display: grid; gap: 5px; flex: 0 0 auto; }
.site-footer__title { color: var(--tv-text); font-size: 18px; font-weight: 800; letter-spacing: -.02em; text-decoration: none; }
.site-footer__title:hover { color: var(--tv-accent); }
.site-footer__copyright { color: var(--tv-muted); font-size: 13px; }
.footer-nav { min-width: 0; }
.footer-nav ul { list-style: none; display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px 20px; padding: 0; margin: 0; }
.footer-nav a { color: var(--tv-muted); font-size: 14px; font-weight: 600; text-decoration: none; }
.footer-nav a:hover, .footer-nav .current-menu-item > a { color: var(--tv-accent); }

.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.screen-reader-text:focus { position: fixed; z-index: 100000; top: 12px; left: 12px; width: auto; height: auto; margin: 0; clip: auto; padding: 10px 14px; background: #fff; border: 1px solid var(--tv-border); }

@media (max-width: 800px) {
  body { font-size: 17px; }
  .container, .article-container { width: min(calc(100% - 28px), var(--tv-wide)); }
  .site-header__inner { min-height: 64px; }
  .site-header__navigation { margin-left: auto; }
  .menu-toggle { display: inline-flex; }
  .primary-nav { display: none; position: absolute; top: 64px; left: 0; right: 0; max-height: calc(100vh - 64px); overflow-y: auto; background: #fff; border-bottom: 1px solid var(--tv-border); padding: 12px 14px 18px; box-shadow: 0 12px 24px rgba(23,32,51,.08); }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { align-items: stretch; flex-direction: column; gap: 2px; }
  .primary-nav li { width: 100%; }
  .primary-nav a { display: block; min-height: 0; padding: 10px 12px; border-radius: 9px; white-space: normal; }
  .primary-nav a:hover, .primary-nav .current-menu-item > a, .primary-nav .current-menu-ancestor > a { background: var(--tv-surface-blue); }
  .primary-nav .current-menu-item > a::after, .primary-nav .current-menu-ancestor > a::after { display: none; }
  .primary-nav .sub-menu { display: grid; position: static; min-width: 0; margin: 0 0 2px 14px; padding: 0 0 0 8px; border: 0; border-left: 1px solid var(--tv-border); border-radius: 0; box-shadow: none; }
  .page-section { padding: 48px 0 64px; }
  .article-page { padding: 40px 0 64px; }
  .blog-grid { grid-template-columns: 1fr; }
  .expert-comment { grid-template-columns: 1fr; }
  .author-card { grid-template-columns: 1fr; }
  .site-footer__inner { padding: 26px 0; align-items: flex-start; flex-direction: column; }
  .footer-nav ul { flex-wrap: wrap; }
}


/* 404 */
.error-404 { text-align: left; }
.error-404__code { margin: 0 0 8px; color: var(--tv-accent); font-size: 15px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.error-404__intro { max-width: 650px; color: var(--tv-muted); font-size: 18px; }
.error-404__search { max-width: 620px; margin-top: 28px; }
.error-404__search form { display: flex; gap: 10px; }
.error-404__search label { flex: 1; }
.error-404__search .search-field { width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid var(--tv-border); border-radius: 10px; background: #fff; color: var(--tv-text); }
.error-404__search .search-submit,
.error-404__actions a { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; padding: 10px 18px; border: 1px solid var(--tv-accent); border-radius: 10px; background: var(--tv-accent); color: #fff; font-weight: 700; text-decoration: none; cursor: pointer; }
.error-404__search .search-submit:hover,
.error-404__actions a:hover { background: var(--tv-accent-hover); color: #fff; }
.error-404__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.error-404__actions .button-secondary { background: #fff; color: var(--tv-accent); }
.error-404__actions .button-secondary:hover { background: var(--tv-surface-blue); color: var(--tv-accent-hover); }

@media (max-width: 560px) {
  .error-404__search form { flex-direction: column; }
  .error-404__search .search-submit { width: 100%; }
}

/* Author page /avtor/ */
.author-page { overflow: hidden; }
.author-hero {
  position: relative;
  overflow: hidden;
  padding: 68px 0 76px;
  background:
    radial-gradient(circle at 82% 18%, rgba(11,87,208,.14), transparent 31%),
    linear-gradient(145deg, #f9fbff 0%, #fff 55%, #f4f7fb 100%);
  border-bottom: 1px solid var(--tv-border);
}
.author-hero::before {
  content: "";
  position: absolute;
  width: 440px;
  height: 440px;
  right: -180px;
  bottom: -280px;
  border: 1px solid rgba(11,87,208,.14);
  border-radius: 50%;
  box-shadow: 0 0 0 54px rgba(11,87,208,.025), 0 0 0 108px rgba(11,87,208,.018);
  pointer-events: none;
}
.author-hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(300px, 430px) minmax(0, 1fr);
  gap: clamp(46px, 7vw, 96px);
  align-items: center;
}
.author-hero__photo-wrap { position: relative; width: min(100%, 430px); }
.author-hero__photo-backdrop {
  position: absolute;
  inset: 22px -22px -22px 22px;
  border-radius: 30px;
  background: var(--tv-accent);
  opacity: .09;
  transform: rotate(2.5deg);
}
.author-hero__photo {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: 50% 35%;
  border-radius: 30px;
  box-shadow: 0 26px 72px rgba(23,32,51,.18);
}
.author-eyebrow,
.author-section-label {
  margin: 0 0 12px;
  color: var(--tv-accent);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.author-hero h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(42px, 6vw, 74px);
  line-height: .98;
  letter-spacing: -.052em;
}
.author-hero__name {
  margin: 18px 0 0;
  color: var(--tv-text);
  font-size: clamp(25px, 3vw, 36px);
  font-weight: 800;
  letter-spacing: -.028em;
}
.author-hero__lead {
  max-width: 700px;
  margin: 18px 0 0;
  color: #536072;
  font-size: 18px;
  line-height: 1.68;
}
.author-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 30px;
}
.author-stat {
  min-height: 96px;
  padding: 16px;
  border: 1px solid rgba(23,32,51,.09);
  border-radius: 14px;
  background: rgba(255,255,255,.76);
  box-shadow: 0 8px 24px rgba(23,32,51,.035);
}
.author-stat strong { display: block; font-size: 19px; line-height: 1.2; letter-spacing: -.02em; }
.author-stat span { display: block; margin-top: 7px; color: var(--tv-muted); font-size: 13px; line-height: 1.35; }
.author-hero__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.tv-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border: 1px solid var(--tv-accent);
  border-radius: 11px;
  background: var(--tv-accent);
  color: #fff;
  font-size: 15px;
  font-weight: 750;
  text-decoration: none;
}
.tv-button:hover { background: var(--tv-accent-hover); color: #fff; }
.tv-button--secondary { background: #fff; color: var(--tv-accent); }
.tv-button--secondary:hover { background: var(--tv-surface-blue); color: var(--tv-accent-hover); }

.author-about { padding-top: 88px; }
.author-about__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(300px, .7fr);
  gap: clamp(42px, 7vw, 92px);
  align-items: start;
}
.author-about__main > h2,
.author-experiment__card > div > h2,
.author-latest__header h2,
.author-contacts__intro h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.12;
  letter-spacing: -.036em;
}
.author-about__copy { margin-top: 20px; color: #475568; font-size: 18px; }
.author-about__copy p { margin: 0 0 1.15em; }
.author-page__editable-content { margin-top: 28px; }
/* Keep editorial headings comfortably separated from the text around them. */
.author-page__editable-content h2 { margin-top: 2em; margin-bottom: .85em; }
.author-page__editable-content h3 { margin-top: 1.75em; margin-bottom: .7em; }
.author-page__editable-content h2 + p,
.author-page__editable-content h2 + ul,
.author-page__editable-content h2 + ol,
.author-page__editable-content h3 + p,
.author-page__editable-content h3 + ul,
.author-page__editable-content h3 + ol { margin-top: .15em; }
.author-focus {
  padding: 26px;
  border: 1px solid var(--tv-border);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--tv-shadow);
}
.author-focus__list { list-style: none; padding: 0; margin: 4px 0 0; }
.author-focus__list li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  column-gap: 12px;
  padding: 17px 0;
  border-top: 1px solid var(--tv-border);
}
.author-focus__list li:first-child { border-top: 0; padding-top: 7px; }
.author-focus__list span { grid-row: 1 / span 2; color: #9aa4b3; font-size: 12px; font-weight: 800; }
.author-focus__list strong { font-size: 17px; line-height: 1.3; }
.author-focus__list small { margin-top: 4px; color: var(--tv-muted); font-size: 13px; line-height: 1.5; }

.author-experiment { padding: 0 0 88px; }
.author-experiment__card {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  gap: 36px 70px;
  align-items: start;
  padding: clamp(30px, 5vw, 54px);
  border-radius: 24px;
  background: #101a2d;
  color: #fff;
  box-shadow: 0 24px 58px rgba(16,26,45,.16);
}
.author-experiment__card .author-section-label { color: #8db8ff; }
.author-experiment__card h2 { color: #fff; }
.author-experiment__card > p { margin: 24px 0 0; color: #c7d0df; font-size: 17px; }
.author-inline-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-top: 2px;
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
}
.author-experiment .author-inline-link { grid-column: 2; color: #b9d2ff; }
.author-experiment .author-inline-link:hover { color: #fff; }
.author-latest { padding-top: 0; }
.author-latest__header { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.author-posts-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.author-posts-grid .post-card h2 { font-size: 22px; }
.author-posts-grid .post-card__body { padding: 19px; }

.author-contacts { padding-top: 8px; }
.author-contacts__panel {
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
  gap: clamp(34px, 6vw, 76px);
  align-items: center;
  padding: clamp(30px, 5vw, 52px);
  border: 1px solid var(--tv-border);
  border-radius: 24px;
  background: linear-gradient(145deg, #f9fbff 0%, #fff 72%);
  box-shadow: var(--tv-shadow);
}
.author-contacts__intro > p:last-child { max-width: 520px; margin: 18px 0 0; color: var(--tv-muted); font-size: 16px; line-height: 1.65; }
.author-contacts__links { display: grid; gap: 12px; }
.author-contact {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-width: 0;
  padding: 17px 18px;
  border: 1px solid var(--tv-border);
  border-radius: 15px;
  background: #fff;
  color: var(--tv-text);
  text-decoration: none;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.author-contact:hover { transform: translateY(-2px); border-color: #b7c9e5; color: var(--tv-text); box-shadow: 0 10px 26px rgba(23,32,51,.07); }
.author-contact__icon {
  display: inline-flex;
  width: 46px;
  height: 46px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--tv-surface-blue);
  color: var(--tv-accent);
  font-size: 21px;
  line-height: 1;
  font-weight: 850;
}
.author-contact__icon--telegram { font-size: 20px; }
.author-contact__text { display: block; min-width: 0; }
.author-contact__text small { display: block; margin-bottom: 2px; color: var(--tv-muted); font-size: 12px; line-height: 1.35; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; }
.author-contact__text strong { display: block; overflow-wrap: anywhere; color: var(--tv-text); font-size: 17px; line-height: 1.4; }
.author-contact__arrow { color: var(--tv-accent); font-size: 21px; line-height: 1; transition: transform .16s ease; }
.author-contact:hover .author-contact__arrow { transform: translateX(3px); }

@media (max-width: 980px) {
  .author-hero__inner { grid-template-columns: minmax(250px, 340px) minmax(0, 1fr); gap: 42px; }
  .author-stats { grid-template-columns: 1fr 1fr; }
  .author-stat:last-child { grid-column: 1 / -1; }
  .author-about__grid { grid-template-columns: 1fr; }
  .author-focus { max-width: 680px; }
  .author-experiment__card { grid-template-columns: 1fr; }
  .author-experiment .author-inline-link { grid-column: auto; }
  .author-posts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .author-contacts__panel { grid-template-columns: 1fr; }
}


@media (max-width: 700px) {
  .author-hero { padding: 40px 0 52px; }
  .author-hero__inner { grid-template-columns: 1fr; gap: 38px; }
  .author-hero__photo-wrap { width: min(88%, 390px); margin-inline: auto; }
  .author-hero__photo-backdrop { inset: 14px -14px -14px 14px; border-radius: 24px; }
  .author-hero__photo { border-radius: 24px; }
  .author-hero__content { text-align: left; }
  .author-hero h1 { font-size: clamp(42px, 14vw, 62px); }
  .author-stats { grid-template-columns: 1fr 1fr; }
  .author-about { padding-top: 58px; }
  .author-experiment { padding-bottom: 64px; }
  .author-posts-grid { grid-template-columns: 1fr; }
  .author-latest__header { align-items: flex-start; flex-direction: column; }
  .author-contacts { padding-bottom: 64px; }
  .author-contacts__panel { padding: 28px 22px; border-radius: 18px; }
}


@media (max-width: 480px) {
  .author-stats { grid-template-columns: 1fr; }
  .author-stat:last-child { grid-column: auto; }
  .author-hero__actions { flex-direction: column; }
  .tv-button { width: 100%; }
  .author-focus { padding: 20px; }
  .author-experiment__card { padding: 26px 22px; border-radius: 18px; }
  .author-contact { grid-template-columns: 42px minmax(0, 1fr) auto; padding: 15px; }
  .author-contact__icon { width: 42px; height: 42px; }
  .author-contact__text strong { font-size: 15px; }
}


/* Front page migrated from the previous theme, restyled for v1.3.x */
.front-hero { padding: 64px 0 72px; }
.front-page-content__header { margin-bottom: 28px; }
.front-page-content__image { margin: 0 0 30px; }
.front-page-content__body { margin-top: 0; }
.front-page-content__body > p:first-of-type { color: #526071; font-size: 1.18em; line-height: 1.62; }
.front-section { padding: 72px 0 82px; border-top: 1px solid var(--tv-border); }
.front-section--muted { background: var(--tv-surface); }
.front-section__header { max-width: 780px; margin-bottom: 32px; }
.front-section__header h2 { margin: 0; font-size: clamp(32px, 4.5vw, 48px); line-height: 1.13; letter-spacing: -.035em; }
.front-kicker { margin: 0 0 8px; color: var(--tv-accent); font-size: 13px; line-height: 1.4; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.front-blog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.front-actions { display: flex; justify-content: center; margin-top: 28px; }
.front-button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 20px; border: 1px solid var(--tv-accent); border-radius: 10px; background: var(--tv-accent); color: #fff; font-size: 15px; font-weight: 750; text-decoration: none; }
.front-button:hover { background: var(--tv-accent-hover); color: #fff; }
.front-empty { max-width: 720px; color: var(--tv-muted); }
.front-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.front-stat { padding: 26px; border: 1px solid var(--tv-border); border-radius: var(--tv-radius); background: #fff; box-shadow: 0 8px 26px rgba(23,32,51,.035); }
.front-stat__value { color: var(--tv-accent); font-size: clamp(38px, 5vw, 56px); line-height: 1; font-weight: 850; letter-spacing: -.045em; }
.front-stat h3 { margin: 14px 0 8px; font-size: 20px; line-height: 1.3; letter-spacing: -.02em; }
.front-stat p { margin: 0; color: var(--tv-muted); font-size: 15px; line-height: 1.65; }
.front-purpose { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr); gap: clamp(32px, 6vw, 76px); align-items: center; }
.front-purpose__copy p { margin: 0 0 1.3em; }
.front-note { margin-top: 28px; padding: 18px 20px; border-left: 4px solid var(--tv-accent); border-radius: 0 12px 12px 0; background: var(--tv-surface-blue); color: #40506a; font-size: 16px; line-height: 1.6; }
.front-diagram { padding: 14px; border: 1px solid var(--tv-border); border-radius: var(--tv-radius); background: #fff; box-shadow: var(--tv-shadow); }
.front-diagram svg { display: block; width: 100%; height: auto; }
.front-timeline { position: relative; max-width: 900px; }
.front-timeline::before { content: ""; position: absolute; top: 8px; bottom: 8px; left: 116px; width: 1px; background: var(--tv-border); }
.front-timeline__item { position: relative; display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 48px; padding: 0 0 34px; }
.front-timeline__item:last-child { padding-bottom: 0; }
.front-timeline__item::before { content: ""; position: absolute; left: 110px; top: 6px; width: 13px; height: 13px; border: 3px solid var(--tv-accent); border-radius: 50%; background: #fff; }
.front-timeline__date { color: var(--tv-accent); font-size: 13px; line-height: 1.45; font-weight: 800; }
.front-timeline__item h3 { margin: -2px 0 7px; font-size: 22px; line-height: 1.25; letter-spacing: -.02em; }
.front-timeline__item p { margin: 0; color: var(--tv-muted); font-size: 16px; line-height: 1.65; }
.blog-intro { max-width: 720px; margin: 16px 0 0; color: var(--tv-muted); font-size: 18px; }

/* Legacy-compatible footer widget areas, styled like the new theme. */
.site-footer__widgets { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 28px; padding-top: 42px; }
.site-footer__widget-column { min-width: 0; }
.footer-widget { color: var(--tv-muted); font-size: 14px; line-height: 1.65; }
.footer-widget + .footer-widget { margin-top: 22px; }
.footer-widget__title { margin: 0 0 12px; color: var(--tv-text); font-size: 16px; line-height: 1.3; letter-spacing: -.015em; }
.footer-widget p { margin: 0 0 10px; }
.footer-widget ul { list-style: none; margin: 0; padding: 0; }
.footer-widget li + li { margin-top: 7px; }
.footer-widget a { color: var(--tv-muted); text-decoration: none; }
.footer-widget a:hover { color: var(--tv-accent); }

@media (max-width: 980px) {
  .front-blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .front-stats { grid-template-columns: 1fr; }
  .front-purpose { grid-template-columns: 1fr; }
  .front-diagram { max-width: 620px; }
  .site-footer__widgets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 800px) {
  .front-hero { padding: 42px 0 54px; }
  .front-section { padding: 52px 0 60px; }
  .front-blog-grid { grid-template-columns: 1fr; }
  .front-timeline::before { left: 10px; }
  .front-timeline__item { grid-template-columns: 1fr; gap: 8px; padding-left: 36px; }
  .front-timeline__item::before { left: 4px; top: 4px; }
  .front-timeline__date { font-size: 12px; }
  .site-footer__widgets { grid-template-columns: 1fr; padding-top: 30px; }
}


/* Content + right sidebar layouts. */
.content-sidebar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--tv-sidebar);
  gap: clamp(38px, 4.5vw, 64px);
  align-items: start;
}
.content-sidebar-layout__main { min-width: 0; width: 100%; max-width: var(--tv-content); }
.site-sidebar {
  position: sticky;
  top: 96px;
  align-self: start;
  justify-self: end;
  width: 100%;
  max-width: var(--tv-sidebar);
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.site-sidebar__inner {
  display: grid;
  gap: 18px;
}
.site-sidebar__widget {
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--tv-border);
  border-radius: var(--tv-radius);
  background: #fff;
  box-shadow: 0 8px 26px rgba(23,32,51,.035);
  color: #536072;
  font-size: 15px;
  line-height: 1.6;
}
.site-sidebar__widget + .site-sidebar__widget { margin-top: 0; }
.site-sidebar__title {
  margin: 0 0 14px;
  color: var(--tv-text);
  font-size: 19px;
  line-height: 1.3;
  letter-spacing: -.018em;
}
.site-sidebar__widget p { margin: 0 0 12px; }
.site-sidebar__widget p:last-child { margin-bottom: 0; }
.site-sidebar__widget ul,
.site-sidebar__widget ol { margin: 0; padding-left: 1.25em; }
.site-sidebar__widget ul { list-style: none; padding-left: 0; }
.site-sidebar__widget li + li { margin-top: 9px; }
.site-sidebar__widget a { color: var(--tv-text); text-decoration: none; }
.site-sidebar__widget a:hover { color: var(--tv-accent); }
.site-sidebar__widget img { border-radius: 10px; }
.site-sidebar__widget .wp-block-search__inside-wrapper { display: flex; gap: 8px; }
.site-sidebar__widget .wp-block-search__input,
.site-sidebar__widget input[type="search"] {
  min-width: 0;
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--tv-border);
  border-radius: 9px;
}
.site-sidebar__widget .wp-block-search__button,
.site-sidebar__widget input[type="submit"],
.site-sidebar__widget button {
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--tv-accent);
  border-radius: 9px;
  background: var(--tv-accent);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.article-layout {
  grid-template-columns: minmax(0, 1fr) var(--tv-sidebar);
  justify-content: space-between;
}
.article-layout .article-header h1 { font-size: clamp(36px, 4.6vw, 58px); }
.blog-layout .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.front-latest-layout .front-blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.front-latest-layout .front-actions { justify-content: flex-start; }

@media (max-width: 980px) {
  .content-sidebar-layout,
  .article-layout { grid-template-columns: 1fr; }
  .site-sidebar {
    position: static;
    width: 100%;
    max-width: none;
    max-height: none;
    overflow: visible;
    margin-top: 8px;
  }
  .site-sidebar__inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .front-latest-layout .front-blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .site-sidebar__inner { grid-template-columns: 1fr; }
  .blog-layout .blog-grid,
  .front-latest-layout .front-blog-grid { grid-template-columns: 1fr; }
  .front-latest-layout .front-actions { justify-content: center; }
}


/* =============================================================
 * Editorial typography system — v1.4.0
 * Keeps the 1120px content canvas while limiting long-form text
 * to a comfortable reading measure. Media and data may use the
 * full canvas width.
 * =========================================================== */
:root {
  --tv-reading: 860px;
  --tv-reading-wide: 980px;
  --tv-copy: #26344a;
  --tv-copy-soft: #4d5c72;
  --tv-rule: #e5e9ef;
}

body {
  line-height: 1.68;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
}

::selection {
  background: #dbe9ff;
  color: var(--tv-text);
}

/* Page and article titles: clear hierarchy without oversized display text. */
.page-header h1,
.article-header h1,
.front-page-content__header h1,
.front-section__header h2,
.author-page h1,
.author-page h2,
.post-card h2 {
  text-wrap: balance;
  overflow-wrap: break-word;
}

.article-main > .article-header,
.article-main > .back-link,
.article-container > .page-header,
.front-page-content__header {
  width: min(100%, var(--tv-reading-wide));
  margin-left: auto;
  margin-right: auto;
}

.page-header,
.article-header {
  margin-bottom: 40px;
}

.page-header h1 {
  font-size: clamp(40px, 4.4vw, 58px);
  line-height: 1.08;
  letter-spacing: -.04em;
}

.article-header h1,
.article-layout .article-header h1,
.front-page-content__header h1 {
  font-size: clamp(40px, 4.25vw, 56px);
  line-height: 1.08;
  letter-spacing: -.04em;
  font-weight: 820;
}

.article-meta {
  margin-top: 17px;
  font-size: 14px;
  line-height: 1.55;
  letter-spacing: .005em;
}

/* Long-form text. */
.article-content {
  color: var(--tv-copy);
  font-size: 18px;
  line-height: 1.76;
  letter-spacing: -.004em;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: auto;
}

.article-content :where(p, li, dd, figcaption) {
  text-wrap: pretty;
  orphans: 3;
  widows: 3;
}

.article-content > p,
.article-content > ul,
.article-content > ol,
.article-content > dl,
.article-content > h4,
.article-content > h5,
.article-content > h6 {
  max-width: var(--tv-reading);
  margin-left: auto;
  margin-right: auto;
}

.article-content > h2,
.article-content > h3 {
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
}

.article-content p {
  margin-top: 0;
  margin-bottom: 1.18em;
}

.article-content > p {
  margin-bottom: 1.22em;
}

.article-content .article-lead,
.front-page-content__body > p:first-of-type {
  max-width: 900px;
  margin: 0 auto 1.7em;
  color: #43536b;
  font-size: clamp(19px, 1.35vw, 21px);
  line-height: 1.68;
  letter-spacing: -.008em;
}

.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
  color: #142038;
  font-weight: 800;
  text-wrap: balance;
  scroll-margin-top: 104px;
}

.article-content h2 {
  margin-top: 2.15em;
  margin-bottom: .68em;
  font-size: clamp(30px, 3.1vw, 38px);
  line-height: 1.18;
  letter-spacing: -.032em;
}

.article-content h3 {
  margin-top: 1.85em;
  margin-bottom: .62em;
  font-size: clamp(24px, 2.3vw, 29px);
  line-height: 1.23;
  letter-spacing: -.025em;
}

.article-content h4 {
  margin-top: 1.65em;
  margin-bottom: .55em;
  font-size: 21px;
  line-height: 1.3;
  letter-spacing: -.018em;
}

.article-content h5,
.article-content h6 {
  margin-top: 1.5em;
  margin-bottom: .5em;
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: -.01em;
}

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

.article-content h2 + :where(p, ul, ol, blockquote, aside),
.article-content h3 + :where(p, ul, ol, blockquote, aside),
.article-content h4 + :where(p, ul, ol, blockquote, aside) {
  margin-top: 0;
}

.article-content strong,
.article-content b {
  color: #17233a;
  font-weight: 720;
}

.article-content a:not(.wp-element-button) {
  text-decoration-line: underline;
  text-decoration-thickness: .075em;
  text-decoration-color: color-mix(in srgb, var(--tv-accent) 48%, transparent);
  text-underline-offset: .17em;
  transition: color .15s ease, text-decoration-color .15s ease;
}

.article-content a:not(.wp-element-button):hover {
  text-decoration-color: currentColor;
}

/* Lists get stronger rhythm and visible markers. */
.article-content ul,
.article-content ol {
  margin-top: .25em;
  margin-bottom: 1.45em;
  padding-left: 1.45em;
}

.article-content li {
  padding-left: .16em;
}

.article-content li + li {
  margin-top: .52em;
}

.article-content li::marker {
  color: var(--tv-accent);
  font-weight: 750;
}

.article-content li > :where(ul, ol) {
  margin-top: .55em;
  margin-bottom: .7em;
}

.article-content li > p {
  margin-bottom: .55em;
}

.article-content dl {
  margin-top: 0;
  margin-bottom: 1.5em;
}

.article-content dt {
  margin-top: 1em;
  color: var(--tv-text);
  font-weight: 750;
}

.article-content dd {
  margin: .28em 0 0;
  color: var(--tv-copy-soft);
}

/* Editorial callouts and quotations. */
.article-content > blockquote,
.article-content > .wp-block-quote,
.article-content > aside:not(.expert-comment),
.article-content > .wp-block-pullquote {
  width: min(100%, 920px);
  max-width: 920px;
  margin: 2em auto;
}

.article-content blockquote,
.article-content .wp-block-quote {
  padding: 18px 24px;
  border: 0;
  border-left: 4px solid var(--tv-accent);
  border-radius: 0 14px 14px 0;
  background: #f7f9fc;
  color: #3f4e64;
  font-size: 1.02em;
  line-height: 1.7;
}

.article-content blockquote > :last-child,
.article-content .wp-block-quote > :last-child {
  margin-bottom: 0;
}

.article-content blockquote cite,
.article-content .wp-block-quote cite {
  display: block;
  margin-top: .9em;
  color: var(--tv-muted);
  font-size: 14px;
  font-style: normal;
}

.article-content > aside:not(.expert-comment) {
  padding: 20px 24px;
  border: 1px solid #d7e4f6;
  border-left: 4px solid var(--tv-accent);
  border-radius: 0 14px 14px 0;
  background: #f4f8fe;
  color: #354760;
  line-height: 1.68;
}

.article-content > aside:not(.expert-comment) > :last-child {
  margin-bottom: 0;
}

.article-content .wp-block-pullquote {
  padding: 30px 34px;
  border-top: 2px solid var(--tv-border);
  border-bottom: 2px solid var(--tv-border);
  color: #25344b;
  text-align: left;
}

/* Images and other visual blocks may use the full 1120px canvas. */
.article-featured-image,
.front-page-content__image {
  margin-top: 0;
  margin-bottom: clamp(34px, 4vw, 48px);
}

.article-featured-image img,
.front-page-content__image img,
.article-content .wp-block-image img,
.article-content img[class*="wp-image-"] {
  border-radius: 15px;
}

.article-content > .wp-block-image,
.article-content > .wp-block-gallery,
.article-content > .wp-block-embed,
.article-content > figure,
.article-content > .alignwide {
  max-width: 100%;
  margin: 2.25em auto;
}

.article-content > p:has(> img:only-child),
.article-content > p:has(> a:only-child > img:only-child) {
  max-width: 100%;
  margin: 2.25em auto;
  text-align: center;
}

.article-content > p:has(> img:only-child) img,
.article-content > p:has(> a:only-child > img:only-child) img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

.article-content figure img {
  display: block;
  max-width: 100%;
  height: 100%;
}

.article-content figcaption,
.article-content .wp-element-caption {
  max-width: 760px;
  margin: 10px auto 0;
  color: var(--tv-muted);
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}

.article-content iframe,
.article-content video {
  max-width: 100%;
  border-radius: 12px;
}

/* Tables: clear rows, comfortable cells, horizontal scroll on small screens. */
.article-content table {
  width: 100%;
  max-width: 100%;
  margin: 2.25em 0;
  overflow-x: auto;
  border: 1px solid var(--tv-border);
  border-radius: 14px;
  background: #fff;
  font-size: 16px;
  line-height: 1.5;
  box-shadow: 0 5px 18px rgba(23, 32, 51, .035);
}

.article-content th,
.article-content td {
  padding: 14px 16px;
  border: 0;
  border-bottom: 1px solid var(--tv-rule);
  vertical-align: top;
}

.article-content th {
  background: #f5f7fa;
  color: #17233a;
  font-weight: 750;
}

.article-content tr:last-child > td {
  border-bottom: 0;
}

.article-content caption {
  padding-bottom: 10px;
  color: var(--tv-muted);
  font-size: 14px;
  text-align: left;
}

/* Code, separators and small semantic elements. */
.article-content > pre,
.article-content > .wp-block-code {
  width: min(100%, 960px);
  max-width: 960px;
  margin: 2em auto;
}

.article-content pre {
  padding: 22px 24px;
  border: 1px solid #202b3d;
  border-radius: 14px;
  background: #111827;
  color: #f4f7fb;
  font-size: 15px;
  line-height: 1.62;
  box-shadow: 0 10px 28px rgba(17,24,39,.12);
}

.article-content code {
  padding: .14em .38em;
  border-radius: 6px;
  background: #f1f3f6;
  color: #24344e;
  font-size: .9em;
}

.article-content pre code {
  padding: 0;
  background: transparent;
  color: inherit;
  font-size: inherit;
}

.article-content hr,
.article-content .wp-block-separator {
  width: min(100%, var(--tv-reading));
  height: 1px;
  margin: 2.6em auto;
  border: 0;
  background: var(--tv-rule);
}

.article-content mark {
  padding: .06em .18em;
  background: #fff0ad;
  color: inherit;
}

/* Buttons inside editor content. */
.article-content .wp-block-button__link,
.article-content .wp-element-button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 10px;
  background: var(--tv-accent);
  color: #fff;
  font-size: 15px;
  line-height: 1.3;
  font-weight: 750;
  text-decoration: none;
}

.article-content .wp-block-button__link:hover,
.article-content .wp-element-button:hover {
  background: var(--tv-accent-hover);
  color: #fff;
}

/* Expert block follows the same editorial measure. */
.article-content > .expert-comment {
  width: min(100%, 920px);
  max-width: 920px;
  margin: 2.1em auto;
}

.expert-comment__text {
  color: #34455f;
  line-height: 1.68;
}

/* Cards, archives and sidebar: same rhythm and hierarchy as article text. */
.post-card__body {
  padding: 24px;
}

.post-card h2 {
  margin: 8px 0 10px;
  font-size: clamp(22px, 2vw, 27px);
  line-height: 1.22;
  letter-spacing: -.028em;
}

.post-card__excerpt {
  color: #536176;
  font-size: 16px;
  line-height: 1.62;
}

.post-card__date {
  font-size: 13px;
  line-height: 1.45;
  letter-spacing: .015em;
}

.site-sidebar__widget {
  color: #526076;
  line-height: 1.62;
}

.site-sidebar__title {
  margin-bottom: 15px;
  font-size: 18px;
  line-height: 1.25;
  font-weight: 800;
}

.site-sidebar__widget li + li {
  margin-top: 10px;
}

/* Front-page custom sections use the same vertical rhythm. */
.front-hero {
  padding-top: 60px;
  padding-bottom: 76px;
}

.front-page-content__header {
  margin-bottom: 30px;
}

.front-section {
  padding-top: 78px;
  padding-bottom: 86px;
}

.front-section__header {
  margin-bottom: 36px;
}

.front-section__header h2 {
  font-size: clamp(32px, 3.7vw, 46px);
  line-height: 1.14;
}

.front-purpose__copy {
  color: var(--tv-copy);
  font-size: 18px;
  line-height: 1.72;
}

.front-purpose__copy p {
  margin-bottom: 1.18em;
}

.front-note {
  line-height: 1.68;
}

.front-stat p,
.front-timeline__item p {
  line-height: 1.65;
}

/* Author page editable prose follows the same sitewide editorial rules. */
.author-page__editable-content {
  margin-top: 34px;
}

.author-page__editable-content h2 {
  margin-top: 2.15em;
  margin-bottom: .68em;
}

.author-page__editable-content h3 {
  margin-top: 1.85em;
  margin-bottom: .62em;
}

.author-hero__lead,
.author-about__copy,
.author-experiment__card > p,
.author-contacts__intro > p:last-child {
  text-wrap: pretty;
}

/* Keyboard accessibility for text links. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(11,87,208,.28);
  outline-offset: 3px;
}

@media (max-width: 980px) {
  :root {
    --tv-reading: 820px;
    --tv-reading-wide: 900px;
  }

  .article-content > p,
  .article-content > ul,
  .article-content > ol,
  .article-content > dl,
  .article-content > h2,
  .article-content > h3,
  .article-content > h4,
  .article-content > h5,
  .article-content > h6 {
    max-width: 100%;
  }
}

@media (max-width: 800px) {
  body {
    font-size: 17px;
    line-height: 1.65;
  }

  .page-header,
  .article-header {
    margin-bottom: 30px;
  }

  .page-header h1,
  .article-header h1,
  .article-layout .article-header h1,
  .front-page-content__header h1 {
    font-size: clamp(34px, 9.5vw, 46px);
    line-height: 1.09;
    letter-spacing: -.036em;
  }

  .article-content {
    font-size: 17px;
    line-height: 1.72;
  }

  .article-content .article-lead,
  .front-page-content__body > p:first-of-type {
    font-size: 18.5px;
    line-height: 1.66;
  }

  .article-content h2 {
    margin-top: 1.95em;
    font-size: clamp(27px, 7vw, 32px);
    line-height: 1.2;
  }

  .article-content h3 {
    margin-top: 1.7em;
    font-size: clamp(22px, 5.8vw, 26px);
  }

  .article-content h4 {
    font-size: 19px;
  }

  .article-content > blockquote,
  .article-content > .wp-block-quote,
  .article-content > aside:not(.expert-comment),
  .article-content > .wp-block-pullquote,
  .article-content > .expert-comment {
    width: 100%;
    max-width: 100%;
  }

  .article-content blockquote,
  .article-content .wp-block-quote,
  .article-content > aside:not(.expert-comment) {
    padding: 17px 18px;
  }

  .article-content table {
    margin: 1.8em 0;
    font-size: 14.5px;
  }

  .article-content th,
  .article-content td {
    min-width: 140px;
    padding: 11px 12px;
  }

  .article-content > .wp-block-image,
  .article-content > .wp-block-gallery,
  .article-content > .wp-block-embed,
  .article-content > figure,
  .article-content > p:has(> img:only-child),
  .article-content > p:has(> a:only-child > img:only-child) {
    margin-top: 1.8em;
    margin-bottom: 1.8em;
  }

  .front-hero {
    padding-top: 42px;
    padding-bottom: 56px;
  }

  .front-section {
    padding-top: 56px;
    padding-bottom: 62px;
  }

  .front-section__header {
    margin-bottom: 28px;
  }
}

@media (max-width: 480px) {
  .article-content {
    font-size: 16.5px;
    line-height: 1.7;
  }

  .article-content p {
    margin-bottom: 1.12em;
  }

  .article-content ul,
  .article-content ol {
    padding-left: 1.28em;
  }

  .article-content li + li {
    margin-top: .44em;
  }

  .article-content blockquote,
  .article-content .wp-block-quote,
  .article-content > aside:not(.expert-comment) {
    border-radius: 0 11px 11px 0;
  }

  .post-card__body {
    padding: 20px;
  }
}

/* =============================================================
 * Taxonomy/category archives — v1.4.2
 * =========================================================== */
.archive-page__header {
  width: min(100%, var(--tv-content));
  margin-left: 0;
  margin-right: 0;
  margin-bottom: clamp(30px, 4vw, 46px);
}

.archive-page__header h1 {
  max-width: 980px;
}

.archive-description {
  max-width: var(--tv-reading);
  margin-top: 16px;
  color: var(--tv-copy-soft);
  font-size: 18px;
  line-height: 1.7;
}

.archive-description > :first-child { margin-top: 0; }
.archive-description > :last-child { margin-bottom: 0; }


.archive-empty {
  max-width: 760px;
  padding: clamp(28px, 4vw, 42px);
  border: 1px solid var(--tv-border);
  border-radius: var(--tv-radius);
  background: var(--tv-surface);
}

.archive-empty h2 {
  margin: 0 0 10px;
  color: var(--tv-text);
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.2;
  letter-spacing: -.025em;
}

.archive-empty p {
  margin: 0;
  color: var(--tv-muted);
  font-size: 17px;
  line-height: 1.65;
}

/* Preserve the single left edge from the v1.4.1 typography pass. */
.article-main > .article-header,
.article-main > .back-link,
.article-container > .page-header,
.front-page-content__header,
.article-content > p,
.article-content > ul,
.article-content > ol,
.article-content > dl,
.article-content > h2,
.article-content > h3,
.article-content > h4,
.article-content > h5,
.article-content > h6,
.article-content .article-lead,
.front-page-content__body > p:first-of-type,
.article-content > blockquote,
.article-content > .wp-block-quote,
.article-content > aside:not(.expert-comment),
.article-content > .wp-block-pullquote,
.article-content > pre,
.article-content > .wp-block-code,
.article-content > hr,
.article-content > .wp-block-separator,
.article-content > .expert-comment {
  margin-left: 0;
  margin-right: 0;
}

@media (max-width: 700px) {
  .archive-page__header { margin-bottom: 28px; }
  .archive-description { font-size: 17px; }
  .archive-empty { padding: 24px 20px; }
}


/* =============================================================
 * Editorial section hierarchy — v1.4.5
 * Headings sit on the content edge; prose uses one subtle,
 * consistent inset. This creates the visual hierarchy shown in
 * the reference without producing multiple "stair-step" edges.
 * =========================================================== */
@media (min-width: 801px) {
  .article-content > p,
  .article-content > ul,
  .article-content > ol,
  .article-content > dl,
  .article-content > h4,
  .article-content > h5,
  .article-content > h6,
  .article-content .article-lead,
  .front-page-content__body > p:first-of-type {
    margin-left: 22px;
    margin-right: 0;
  }

  /* Keep section headings on the main left edge. */
  .article-content > h2,
  .article-content > h3 {
    margin-left: 0;
    margin-right: 0;
  }

  /* Editorial text blocks follow the same single inset as prose. */
  .article-content > blockquote,
  .article-content > .wp-block-quote,
  .article-content > aside:not(.expert-comment),
  .article-content > .wp-block-pullquote,
  .article-content > pre,
  .article-content > .wp-block-code,
  .article-content > hr,
  .article-content > .wp-block-separator,
  .article-content > .expert-comment {
    margin-left: 22px;
    margin-right: 0;
  }

  /* Wide visual/data blocks remain flush with the content canvas. */
  .article-content > .wp-block-image,
  .article-content > .wp-block-gallery,
  .article-content > .wp-block-embed,
  .article-content > figure,
  .article-content > .alignwide,
  .article-content > p:has(> img:only-child),
  .article-content > p:has(> a:only-child > img:only-child),
  .article-content > table {
    margin-left: 0;
    margin-right: 0;
  }
}

/* =============================================================
 * Natural word wrapping — v1.4.6
 * Keep headings compact and never split ordinary words with
 * automatic hyphenation. Long URLs may still wrap safely.
 * =========================================================== */
:root {
  --tv-heading-measure: 820px;
}

/* Section headings use a predictable editorial measure. */
.article-content > h2,
.article-content > h3 {
  width: min(100%, var(--tv-heading-measure));
  max-width: var(--tv-heading-measure);
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  -webkit-hyphens: none;
}

/* Never hyphenate normal prose automatically. Words move as a whole. */
.article-content,
.article-content :where(p, li, dd, dt, blockquote, aside, figcaption, th, td, h2, h3, h4, h5, h6),
.page-header h1,
.article-header h1,
.front-page-content__header h1,
.front-section__header h2,
.author-page h1,
.author-page h2,
.post-card h2 {
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
  -webkit-hyphens: none;
}

/* URLs and other genuinely unbroken link strings are the exception. */
.article-content a,
.author-contact__text a {
  overflow-wrap: anywhere;
  word-break: normal;
}

@media (max-width: 860px) {
  .article-content > h2,
  .article-content > h3 {
    width: 100%;
    max-width: 100%;
  }
}

/* Author page refinements: left-aligned portrait + three-photo "Кратко" gallery. */
.author-hero__photo-wrap {
  margin-left: 0;
  margin-right: auto;
}

/* The portrait placed in the editable author content must not be centered. */
.author-page__editable-content > .wp-block-image:first-child,
.author-page__editable-content > figure.wp-block-image:first-child,
.author-page__editable-content > p:first-child:has(> img) {
  width: fit-content;
  max-width: 100%;
  margin-left: 0 !important;
  margin-right: auto !important;
}
.author-page__editable-content > .wp-block-image:first-child img,
.author-page__editable-content > figure.wp-block-image:first-child img,
.author-page__editable-content > p:first-child:has(> img) img {
  display: block;
  margin-left: 0 !important;
  margin-right: auto !important;
}

.author-brief-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  width: calc(100% - 22px);
  max-width: 100%;
  margin: 30px 0 2.35em 22px;
}
.author-brief-gallery__item {
  overflow: hidden;
  margin: 0;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--tv-border);
  border-radius: 16px;
  background: var(--tv-surface);
  box-shadow: 0 8px 24px rgba(23,32,51,.055);
}
.author-brief-gallery__item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}
.author-brief-gallery__item--portrait img {
  object-position: 50% 44%;
}

@media (max-width: 760px) {
  .author-brief-gallery {
    grid-template-columns: 1fr;
    width: 100%;
    margin-left: 0;
    gap: 14px;
  }
  .author-brief-gallery__item { aspect-ratio: 16 / 10; }
  .author-hero__photo-wrap { margin-left: 0; margin-right: auto; }
}


/* =============================================================
 * Author page alignment refinements — v1.4.8
 * Keep editable author prose flush with the same left edge as
 * the portrait instead of inheriting the global 22px prose inset.
 * =========================================================== */
@media (min-width: 801px) {
  .author-page__editable-content > p,
  .author-page__editable-content > ul,
  .author-page__editable-content > ol,
  .author-page__editable-content > dl {
    margin-left: 0;
    margin-right: 0;
  }
}


/* ===========================================================
 * Publication cards, article byline and trust/schema UI — v1.5.0
 * =========================================================== */
.post-card--publication .post-card__image { aspect-ratio: 4 / 3; }
.post-card--publication { display: flex; flex-direction: column; }
.post-card--publication .post-card__body { display: flex; flex: 1 1 auto; flex-direction: column; padding: 24px; }
.post-card__category { align-self: flex-start; display: inline-flex; margin-bottom: 10px; padding: 5px 9px; border-radius: 999px; background: var(--tv-surface-blue); color: var(--tv-accent); font-size: 12px; line-height: 1; font-weight: 800; letter-spacing: .055em; text-decoration: none; text-transform: uppercase; }
.post-card__category:hover { background: #e8f0ff; color: var(--tv-accent-hover); }
.post-card--publication h2 { margin-top: 0; }
.post-card--publication .post-card__excerpt { margin: 0 0 20px; }
.post-card__footer { margin-top: auto; padding-top: 3px; }
.post-card__author-line { display: flex; align-items: center; gap: 10px; min-width: 0; }
.post-card__avatar { flex: 0 0 32px; width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: #e7ebf1; }
.post-card__author-meta { display: flex; align-items: center; gap: 7px; min-width: 0; color: var(--tv-muted); font-size: 12.5px; line-height: 1.35; white-space: nowrap; }
.post-card__author-name { max-width: 130px; overflow: hidden; color: var(--tv-text); font-weight: 750; text-decoration: none; text-overflow: ellipsis; }
.post-card__author-name:hover { color: var(--tv-accent); }
.post-card__meta-date { white-space: nowrap; }
.post-card__meta-date::before { content: "·"; margin-right: 7px; color: #a5afbd; }
.post-card__meta-date time { white-space: nowrap; }
.post-card__reading { white-space: nowrap; }
.post-card__read-more { display: inline-flex; align-items: center; align-self: flex-start; gap: 6px; margin-top: 17px; padding: 9px 13px; border: 1px solid #cbd9ef; border-radius: 10px; background: #fff; color: var(--tv-accent); font-size: 14px; font-weight: 800; text-decoration: none; }
.post-card__read-more:hover { border-color: var(--tv-accent); background: var(--tv-surface-blue); color: var(--tv-accent-hover); }

.article-byline { display: flex; align-items: center; gap: 10px; margin-top: 18px; color: var(--tv-muted); font-size: 13px; line-height: 1.35; }
.article-byline__avatar { flex: 0 0 32px; width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: #e7ebf1; }
.article-byline__items { display: flex; align-items: center; gap: 8px; min-width: 0; white-space: nowrap; }
.article-byline__items > * + *::before { content: "·"; margin-right: 8px; color: #a5afbd; }
.article-byline__author { color: var(--tv-text); font-weight: 760; text-decoration: none; }
.article-byline__author:hover, .article-byline__category:hover { color: var(--tv-accent); }
.article-byline__category { color: var(--tv-accent); font-weight: 700; text-decoration: none; }
.article-byline__updated { color: #68768b; }

.author-card { align-items: start; }
.author-card__content { min-width: 0; }
.author-card__topic-note { margin: 10px 0 8px; color: #243651; font-size: 15px; line-height: 1.55; font-weight: 750; }
.author-card__dates { margin: 0 0 12px; color: var(--tv-muted); font-size: 13px; line-height: 1.5; }
.author-card__links { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 18px; }
.author-card__all { color: var(--tv-accent); font-size: 14px; font-weight: 800; text-decoration: none; }
.author-card__all:hover { color: var(--tv-accent-hover); }
.author-card__telegram { color: var(--tv-muted); text-decoration: none; }
.author-card__telegram:hover { color: var(--tv-accent); }

@media (max-width: 540px) {
  .post-card__author-meta { gap: 6px; font-size: 12px; }
  .post-card__author-name { max-width: 112px; }
  .article-byline { gap: 8px; font-size: 12px; }
  .article-byline__items { gap: 6px; }
  .article-byline__items > * + *::before { margin-right: 6px; }
}

@media (max-width: 379px) {
  .post-card__reading,
  .article-byline__reading,
  .article-byline__category { display: none; }
  .post-card__author-meta { overflow: hidden; }
  .post-card__author-name { max-width: 110px; }
  .article-byline__items { max-width: calc(100vw - 92px); overflow: hidden; font-size: 11.5px; }
  .article-byline__updated { overflow: hidden; max-width: 115px; text-overflow: ellipsis; }
}


/* ===========================================================
 * Unified publication cards — v1.5.1
 * /blog/, categories and taxonomy archives share this exact UI.
 * =========================================================== */
.post-card--publication .post-card__top-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin-bottom: 10px;
}
.post-card--publication .post-card__category {
  margin-bottom: 0;
}
.post-card--publication .post-card__date--publication {
  color: var(--tv-muted);
  font-size: 13px;
  line-height: 1.3;
  white-space: nowrap;
}
.post-card--publication h2 {
  margin: 0 0 12px;
}
.post-card--publication .post-card__excerpt {
  min-height: calc(1.65em * 3);
  margin: 0 0 20px;
  line-height: 1.65;
}
.post-card--publication .post-card__footer {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-top: auto;
}
.post-card--publication .post-card__author-meta {
  white-space: nowrap;
}
.post-card--publication .post-card__author-name {
  max-width: 180px;
}

@media (max-width: 379px) {
  .post-card--publication .post-card__top-meta {
    gap: 7px;
  }
  .post-card--publication .post-card__reading {
    display: none;
  }
  .post-card--publication .post-card__author-name {
    max-width: calc(100vw - 112px);
  }
}


/* =============================================================
 * Unified left edge for long-form content — v1.7.2
 * Remove the legacy 22px editorial inset. Text on the homepage,
 * posts, pages and the author page starts from one common edge.
 * =========================================================== */
@media (min-width: 801px) {
  .article-content > p,
  .article-content > ul,
  .article-content > ol,
  .article-content > dl,
  .article-content > h4,
  .article-content > h5,
  .article-content > h6,
  .article-content .article-lead,
  .front-page-content__body > p:first-of-type,
  .article-content > blockquote,
  .article-content > .wp-block-quote,
  .article-content > aside:not(.expert-comment),
  .article-content > .wp-block-pullquote,
  .article-content > pre,
  .article-content > .wp-block-code,
  .article-content > hr,
  .article-content > .wp-block-separator,
  .article-content > .expert-comment,
  .author-page__editable-content > p,
  .author-page__editable-content > ul,
  .author-page__editable-content > ol,
  .author-page__editable-content > dl,
  .author-page__editable-content > h4,
  .author-page__editable-content > h5,
  .author-page__editable-content > h6 {
    margin-left: 0 !important;
    margin-right: 0;
  }

  .author-brief-gallery {
    width: 100%;
    margin-left: 0;
  }
}


/* =============================================================
 * Homepage update metadata + wider homepage prose — v1.7.4
 * =========================================================== */

/* Main homepage prose may use almost the full 1120px content canvas. */
.front-page-content__body > p:not(.front-page-update),
.front-page-content__body > ul,
.front-page-content__body > ol,
.front-page-content__body > dl,
.front-page-content__body > blockquote,
.front-page-content__body > .wp-block-quote,
.front-page-content__body > aside:not(.expert-comment),
.front-page-content__body > .wp-block-pullquote,
.front-page-content__body > pre,
.front-page-content__body > .wp-block-code,
.front-page-content__body > hr,
.front-page-content__body > .wp-block-separator,
.front-page-content__body > .expert-comment {
  width: min(100%, 1100px);
  max-width: 1100px;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* “Обновлено” is metadata for the hero image: small and flush right. */
.front-page-content__body > .front-page-update {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  margin: -14px 0 28px !important;
  padding: 0 !important;
  color: #7a8495;
  font-size: 14px !important;
  font-weight: 500;
  line-height: 1.45 !important;
  letter-spacing: .005em;
  text-align: right !important;
}

.front-page-content__body > .front-page-update::before {
  content: none !important;
  display: none !important;
}

@media (max-width: 700px) {
  .front-page-content__body > .front-page-update {
    margin-top: -10px !important;
    margin-bottom: 22px !important;
    font-size: 13px !important;
  }
}
