/* ===========================
   Minimal — Swiss Clean Design
=========================== */

* { box-sizing: border-box; }

:root {
  /* Clean palette */
  --bg: #fafafa;
  --surface: #ffffff;
  --surface-muted: #f5f5f5;
  --text: #1a1a1a;
  --text-muted: #777777;
  /* Подпись под изображением: --text-muted даёт на этом фоне 4.29:1,
     то есть ниже нормы WCAG AA (фаза 72). */
  --text-caption: #6e6e6e;
  --text-light: #999999;
  --accent: #0055ff;
  --accent-light: #e8f0ff;
  --border: #ebebeb;
  --border-light: #f0f0f0;

  /* Spacing */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.25rem;
  --sp-6: 1.5rem;
  --sp-8: 2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;
  --sp-16: 4rem;
  --sp-20: 5rem;
  --sp-24: 6rem;

  /* Geometry */
  --radius: 4px;
  --radius-lg: 8px;
  --max-width: 960px;
  --container-padding: var(--sp-6);

  /* Typography */
  --font-sans: 'DM Sans', system-ui, -apple-system, sans-serif;
  --font-serif: 'DM Serif Display', Georgia, serif;

  /* Transitions */
  --t-fast: 0.15s ease;
  --t-base: 0.2s ease;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111111;
    --surface: #1a1a1a;
    --surface-muted: #222222;
    --text: #e8e8e8;
    --text-muted: #888888;
    --text-caption: #9a9a9a;
    --text-light: #666666;
    --accent: #4488ff;
    --accent-light: #1a2a44;
    --border: #2a2a2a;
    --border-light: #222222;
  }
}

h1, h2, h3, h4, h5, h6, p { margin: 0; }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
}

::selection {
  background: var(--accent);
  color: white;
}

/* ===========================
   Layout
=========================== */
body main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

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

body > main > .container {
  padding-top: var(--sp-16);
  padding-bottom: var(--sp-16);
}

.container-central {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 60vh;
  gap: var(--sp-6);
}

.container-central h1 {
  font-family: var(--font-serif);
  font-size: 6rem;
  font-weight: 400;
  line-height: 1;
  color: var(--text);
}

.container-central p {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 400px;
}

.container-central a {
  display: inline-block;
  padding: var(--sp-3) var(--sp-8);
  color: var(--accent);
  font-weight: 500;
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: var(--t-base);
}

.container-central a:hover {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

/* ===========================
   Header — Minimal
=========================== */
body > header {
  padding: var(--sp-6) 0;
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1rem;
}

.logo img {
  width: 28px;
  height: 28px;
  border-radius: 4px;
}

nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: var(--sp-8);
}

nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--t-fast);
  position: relative;
}

nav a:hover {
  color: var(--text);
}

nav a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--text);
  transition: var(--t-base);
}

nav a:hover::after {
  width: 100%;
}

#nav-toggle { display: none; }
.hamburger {

  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--sp-3);
}
.hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text);
  margin: 5px 0;
}

/* ===========================
   Section Spacing
=========================== */
section + section {
  margin-top: var(--sp-20);
}

.articles h2,
.comments h2 {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 400;
  margin-bottom: var(--sp-10);
  color: var(--text);
}

/* ===========================
   Article Cards — Clean Grid
=========================== */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-12) var(--sp-8);
}

.card {
  background: transparent;
  border: none;
  border-radius: 0;
  overflow: hidden;
}

.card a {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  height: 100%;
  gap: var(--sp-4);
}

.card-image {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  display: block;
  border-radius: var(--radius-lg);
  transition: var(--t-base);
}

.card:hover .card-image {
  opacity: 0.85;
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.card h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--text);
  line-height: 1.3;
}

.card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.card time {
  font-size: 0.8rem;
  color: var(--text-light);
}

/* Featured first card */
.articles-grid .card:first-child {
  grid-column: 1 / -1;
}

.articles-grid .card:first-child a {
  flex-direction: row;
  gap: var(--sp-8);
}

.articles-grid .card:first-child .card-image {
  width: 60%;
  aspect-ratio: 16 / 10;
}

.articles-grid .card:first-child .card-body {
  justify-content: center;
  gap: var(--sp-4);
}

.articles-grid .card:first-child h3 {
  font-size: 1.8rem;
}

.articles-grid .card:first-child p {
  font-size: 1rem;
}

/* ===========================
   About Section
=========================== */
.about-section {
  margin-top: var(--sp-20);
  border-top: 1px solid var(--border);
  padding-top: var(--sp-16);
}

.about-section h1 {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 400;
  margin-bottom: var(--sp-8);
  color: var(--text);
}

.about-section h2 {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: var(--sp-10);
  margin-bottom: var(--sp-4);
}

.about-section p {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: var(--sp-4);
  max-width: 640px;
}

.about-section ul {
  margin: var(--sp-4) 0;
  padding-left: var(--sp-6);
}

.about-section li {
  font-size: 1rem;
  margin-bottom: var(--sp-3);
  line-height: 1.7;
  color: var(--text-muted);
}

.about-section li strong {
  color: var(--text);
  font-weight: 500;
}

/* === SCDL Anchor Pages (D-69-08-02) === */
/* Приём темы: голая типографика, ни рамок, ни плашек — только воздух и
   разрядка. --sp-12 вместо --sp-10: у .about-section h2 уже стоит --sp-10. */
.scdl-page {
  max-width: 640px;
}
.scdl-page h2 {
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  color: var(--text);
  margin-top: var(--sp-12);
  margin-bottom: var(--sp-4);
}
.scdl-revision {
  color: var(--text-muted);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  margin-top: var(--sp-12);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--border);
}

/* ===========================
   Comments
=========================== */
.comments-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-3);
}

.comment {
  padding: var(--sp-6) 0;
  border-bottom: 1px solid var(--border-light);
}

.comment:last-child {
  border-bottom: none;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--sp-3);
}

.comment-author-link {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  font-size: 0.9rem;
}

.comment-source-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  opacity: 0.6;
}

.comment-date {
  font-size: 0.8rem;
  color: var(--text-light);
}

.comment-content {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ===========================
   Comments CTA
=========================== */
.comments-cta {
  text-align: center;
  padding: var(--sp-10) 0;
  border-top: 1px solid var(--border-light);
  margin-top: var(--sp-4);
}

.comments-cta p {
  color: var(--text-muted);
  margin-bottom: var(--sp-4);
  font-size: 0.95rem;
}

.comments-cta a {
  display: inline-block;
  padding: var(--sp-3) var(--sp-8);
  background: var(--text);
  color: var(--bg);
  font-weight: 500;
  border-radius: var(--radius);
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--t-base);
}

.comments-cta a:hover {
  opacity: 0.85;
}

/* ===========================
   Article Hero
=========================== */
.article-hero {
  margin-bottom: var(--sp-12);
}

.article-hero img {
  width: 100%;
  border-radius: var(--radius-lg);
  aspect-ratio: 21 / 9;
  object-fit: cover;
  max-height: 45vh;
}

.article-hero h1 {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 400;
  color: var(--text);
  margin-top: var(--sp-8);
  margin-bottom: var(--sp-4);
  line-height: 1.15;
}

.article-hero .article-meta {
  display: flex;
  gap: var(--sp-6);
  align-items: center;
}

.article-hero .article-meta span,
.article-hero .article-meta time {
  font-size: 0.85rem;
  color: var(--text-light);
}

.article-content {
  font-size: 1.1rem;
  line-height: 1.85;
  color: var(--text);
  max-width: 680px;
}

.article-content h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 400;
  margin: var(--sp-12) 0 var(--sp-5);
}

.article-content p {
  margin-bottom: var(--sp-6);
  color: var(--text-muted);
}

/* ===========================
   Breadcrumb
=========================== */
.breadcrumb {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0 0 var(--sp-8) 0;
  gap: var(--sp-2);
  font-size: 0.8rem;
}

.breadcrumb a {
  color: var(--text-light);
  text-decoration: none;
}

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

.breadcrumb li + li::before {
  content: "/";
  margin-right: var(--sp-2);
  color: var(--border);
}

.breadcrumb .active {
  color: var(--text-muted);
}

/* ===========================
   Auth Page
=========================== */
.auth-card {
  max-width: 380px;
  margin: var(--sp-16) auto;
}

.auth-card h1 {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 400;
  color: var(--text);
  margin-bottom: var(--sp-2);
}

.auth-card .auth-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: var(--sp-10);
}

.auth-card label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: var(--sp-2);
}

.auth-card input[type="email"],
.auth-card input[type="password"],
.auth-card input[type="text"] {
  width: 100%;
  padding: var(--sp-3) var(--sp-4);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.95rem;
  font-family: var(--font-sans);
  margin-bottom: var(--sp-5);
  transition: var(--t-fast);
  outline: none;
}

.auth-card input:focus {
  border-color: var(--text);
}

.auth-card button[type="submit"],
.auth-card .auth-submit {
  width: 100%;
  padding: var(--sp-3) var(--sp-6);
  background: var(--text);
  color: var(--bg);
  font-weight: 500;
  font-size: 0.95rem;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--t-base);
  margin-top: var(--sp-2);
}

.auth-card button[type="submit"]:hover,
.auth-card .auth-submit:hover {
  opacity: 0.85;
}

.auth-card .auth-error {
  color: #d32f2f;
  font-size: 0.85rem;
  margin-bottom: var(--sp-4);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  margin: var(--sp-8) 0;
  color: var(--text-light);
  font-size: 0.85rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-socials {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-3);
}

.auth-social {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: var(--t-fast);
}

.auth-social img {
  width: 22px;
  height: 22px;
}

.auth-social:hover {
  border-color: var(--text);
  color: var(--text);
}

/* ===========================
   Search Page
=========================== */
.search-section {
  padding: var(--sp-10) 0;
}

.search-section h1 {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 400;
  margin-bottom: var(--sp-8);
}

.search-form {
  display: flex;
  gap: var(--sp-3);
}

.search-form input {
  flex: 1;
  padding: var(--sp-3) var(--sp-4);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.95rem;
  font-family: var(--font-sans);
  outline: none;
  transition: var(--t-fast);
}

.search-form input:focus {
  border-color: var(--text);
}

.search-form button {
  padding: var(--sp-3) var(--sp-6);
  background: var(--text);
  color: var(--bg);
  font-weight: 500;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--t-base);
}

.search-form button:hover {
  opacity: 0.85;
}

/* ===========================
   Footer
=========================== */
footer {
  margin-top: var(--sp-24);
  padding: var(--sp-10) 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  justify-content: center;
}

footer p {
  font-size: 0.8rem;
  color: var(--text-light);
}

/* === SCDL: строка доверия в подвале (D-69-08-02) === */
/* --text-light (#999) на --bg (#fafafa) даёт 2.9:1 — копировать цвет копирайта
   нельзя. Строка доверия берёт --text (15.9:1), ссылки — --accent (5.1:1). */
.footer-inner {
  flex-wrap: wrap;
  gap: var(--sp-2);
}
.footer-trust {
  flex: 0 0 100%;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: var(--sp-2);
  line-height: 2;
}
.footer-trust a {
  color: var(--accent);
  padding-inline: var(--sp-2);
}

/* ===========================
   Links
=========================== */
a {
  color: var(--accent);
  text-decoration: none;
  transition: var(--t-fast);
}

a:hover {
  color: var(--text);
}

/* ===========================
   Responsive
=========================== */
@media (max-width: 768px) {
  body > main > .container {
    padding-top: var(--sp-10);
    padding-bottom: var(--sp-10);
    padding-inline: var(--sp-4);
  }

  .articles-grid {
    grid-template-columns: 1fr;
    gap: var(--sp-8);
  }

  .articles-grid .card:first-child a {
    flex-direction: column;
    gap: var(--sp-4);
  }

  .articles-grid .card:first-child .card-image {
    width: 100%;
    aspect-ratio: 3 / 2;
  }

  .articles-grid .card:first-child h3 {
    font-size: 1.3rem;
  }

  .articles-grid .card h3 {
    font-size: 1.15rem;
    line-height: 1.4;
  }

  .articles-grid .card p {
    font-size: 0.9rem;
  }

  nav ul {
    display: none;
  }

  .hamburger {
    display: block;
    width: 48px;
    height: 48px;
    min-height: 48px;
    min-width: 48px;
    position: relative;
  }

  .hamburger:focus {
    outline: 2px solid var(--text);
    outline-offset: 2px;
  }

  .container-central h1 {
    font-size: clamp(2rem, 10vw, 3.5rem);
  }

  .articles h2,
  .comments h2 {
    font-size: 1.5rem;
  }

  /* Larger touch targets */
  input, button, textarea, select {
    font-size: 16px;
  }

  .articles-grid .card a {
    min-height: 48px;
  }
}

/* =========================
   Comment replies
========================= */
.comment-replies {
  margin-top: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.comment--reply {
  margin-left: var(--space-lg);
  border-left: 2px solid var(--accent-color, var(--border-color));
  background: transparent;
}

/* ===========================
   Accessibility: Skip Link
=========================== */
.skip-link {
  position: fixed;
  top: -100%;
  white-space: nowrap;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-color);
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  text-decoration: none;
  z-index: 9999;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 0.5rem;
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* ===========================
   Reading Progress Bar
=========================== */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(0,0,0,0.05);
  z-index: 1000;
  pointer-events: none;
}

.reading-progress span {
  display: block;
  height: 100%;
  background: var(--accent-color);
  width: 0%;
  transition: width 0.1s linear;
}

/* ===========================
   Reading Time
=========================== */
.reading-time {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.reading-time::before {
  content: "⏱";
  font-size: 0.9em;
}

/* ===========================
   Animation Variables
=========================== */
:root {
  --t-anim-fast: 0.15s;
  --t-anim-base: 0.3s;
  --t-anim-slow: 0.5s;
  --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ===========================
   Scroll Animations
=========================== */

@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(15px);
}

.animate-on-scroll.is-visible {
  animation: fadeSlideUp 0.5s var(--ease-out) forwards;
}

/* Stagger: cascading card appearance */
.articles-grid .animate-on-scroll.is-visible:nth-child(2) { animation-delay: 0.1s; }
.articles-grid .animate-on-scroll.is-visible:nth-child(3) { animation-delay: 0.15s; }
.articles-grid .animate-on-scroll.is-visible:nth-child(4) { animation-delay: 0.2s; }
.articles-grid .animate-on-scroll.is-visible:nth-child(5) { animation-delay: 0.25s; }
.articles-grid .animate-on-scroll.is-visible:nth-child(6) { animation-delay: 0.3s; }

/* Fade-in for lazy-loaded images */
@keyframes imgFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

img[loading="lazy"] {
  opacity: 0;
  animation: none;
}

img[loading="lazy"].is-loaded {
  animation: imgFadeIn 0.4s var(--ease-out) forwards;
}

/* ===========================
   Interactive Transitions
=========================== */
.card {
  transition: transform var(--t-anim-base) var(--ease-out);
}

.card:hover {
  transform: translateY(-2px);
}

.card-image {
  transition: opacity var(--t-anim-base) var(--ease-out);
}

.breadcrumb a {
  transition: color var(--t-anim-fast);
}

.comment-date {
  transition: color var(--t-anim-fast);
}

/* ===========================
   Cookie Banner
=========================== */

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--surface);
  border-top: 1px solid var(--border);
  transform: translateY(100%);
  opacity: 0;
  transition: transform var(--t-anim-slow), opacity var(--t-anim-slow);
}

.cookie-banner.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.cookie-banner__inner {
  max-width: var(--max-width);
  margin-inline: auto;
  padding: var(--sp-4) var(--container-padding);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
}

.cookie-banner__inner p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 0;
  line-height: 1.5;
}

.cookie-banner__actions {
  display: flex;
  gap: var(--sp-3);
  flex-shrink: 0;
}

.cookie-banner__btn {
  padding: var(--sp-2) var(--sp-5);
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: var(--t-fast);
}

.cookie-banner__btn--accept {
  background: var(--text);
  color: var(--bg);
  border: 1px solid var(--text);
}

.cookie-banner__btn--accept:hover {
  opacity: 0.85;
}

.cookie-banner__btn--more {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.cookie-banner__btn--more:hover {
  color: var(--text);
  border-color: var(--text);
}

@media (max-width: 600px) {
  .cookie-banner__inner {
    flex-direction: column;
    text-align: center;
  }
}

/* ===========================
   Scroll to Top
=========================== */

.scroll-to-top {
  position: fixed;
  bottom: var(--sp-6);
  right: var(--sp-6);
  z-index: 999;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity var(--t-anim-base), visibility var(--t-anim-base), transform var(--t-anim-base), background var(--t-anim-fast), color var(--t-anim-fast);
}

.scroll-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-to-top:hover {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

/* ===========================
   Share Buttons
=========================== */

.share-buttons {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
  padding: var(--sp-8) 0;
  margin-top: var(--sp-4);
  border-top: 1px solid var(--border-light);
  flex-wrap: wrap;
}

.share-buttons__label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-light);
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
  transition: color var(--t-anim-fast), opacity var(--t-anim-fast);
}

.share-btn:hover {
  color: var(--text);
}

.share-btn svg {
  flex-shrink: 0;
}

.share-btn--vk:hover { color: #4680C2; }
.share-btn--tg:hover { color: #2AABEE; }
.share-btn--tw:hover { color: #1DA1F2; }

@media (max-width: 600px) {
  .share-buttons {
    justify-content: center;
  }
  .share-buttons__label {
    width: 100%;
    text-align: center;
  }
}

/* ===========================
   Related Articles
=========================== */

.related-articles {
  margin-top: var(--sp-16);
  padding-top: var(--sp-10);
  border-top: 1px solid var(--border);
}

.related-articles__heading {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: var(--sp-8);
  color: var(--text);
}

.related-articles__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-8);
}

.related-card {
  background: transparent;
  border: none;
  overflow: hidden;
}

.related-card a {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  text-decoration: none;
  color: inherit;
}

.related-card .card-image {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: var(--radius-lg);
}

.related-card .card-body {
  padding: 0;
}

.related-card h3 {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.3;
  margin: 0 0 var(--sp-1);
  color: var(--text);
}

.related-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 768px) {
  .related-articles__grid {
    grid-template-columns: 1fr;
    gap: var(--sp-6);
  }
}

/* ===========================
   Subscribe Form (Footer)
=========================== */

.footer-subscribe {
  padding: var(--sp-16) var(--container-padding) var(--sp-8);
  max-width: 480px;
  margin-inline: auto;
  text-align: center;
}

.subscribe-block__title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--text);
  margin: 0 0 var(--sp-2);
}

.subscribe-block__text {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0 0 var(--sp-6);
}

.subscribe-form__group {
  display: flex;
  gap: 0;
}

.subscribe-form__input {
  flex: 1;
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--border);
  border-right: none;
  border-radius: var(--radius) 0 0 var(--radius);
  font-size: 0.9rem;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  outline: none;
  min-width: 0;
  transition: border-color var(--t-anim-fast);
}

.subscribe-form__input:focus {
  border-color: var(--text);
}

.subscribe-form__input::placeholder {
  color: var(--text-light);
}

.subscribe-form__btn {
  padding: var(--sp-3) var(--sp-6);
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.9rem;
  font-weight: 500;
  font-family: var(--font-sans);
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--t-anim-fast), color var(--t-anim-fast);
}

.subscribe-form__btn:hover {
  background: var(--text);
  color: var(--bg);
}

.subscribe-form__success {
  margin-top: var(--sp-4);
  font-size: 0.9rem;
  color: #16a34a;
  font-weight: 500;
}

.subscribe-form__success.is-visible {
  display: block !important;
}

@media (max-width: 600px) {
  .auth-socials {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .subscribe-form__group {
    flex-direction: column;
  }
  .subscribe-form__input {
    border-right: 1px solid var(--border);
    border-radius: var(--radius) var(--radius) 0 0;
  }
  .subscribe-form__btn {
    border-radius: 0 0 var(--radius) var(--radius);
  }
}

/* ===========================
   Accessibility
=========================== */

@media (prefers-reduced-motion: reduce) {
  .animate-on-scroll {
    opacity: 1;
    transform: none;
  }
  .animate-on-scroll.is-visible {
    animation: none;
  }
  img[loading="lazy"] {
    opacity: 1;
  }
  img[loading="lazy"].is-loaded {
    animation: none;
  }
  .cookie-banner {
    transition: none;
  }
  .scroll-to-top {
    transition: none;
  }
}

/* Article Content Typography */
.article-body {
  line-height: 1.75;
}
.article-body h1,
.article-body h2,
.article-body h3 {
  margin-block: 1.5rem 1rem;
}
.article-body p {
  margin-block: 1rem;
}
.article-body ul,
.article-body ol {
  margin-block: 1rem;
  padding-left: 1.5rem;
}
.article-body li {
  margin-block: 0.35rem;
}
.article-body blockquote {
  border-left: 3px solid currentColor;
  padding-left: 1rem;
  margin: 1.5rem 0;
  opacity: 0.85;
  font-style: italic;
}

/* Featured Image */
.featured-image {
  display: block;
  width: 100%;
  max-width: 680px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  margin: 0 auto var(--space-xl, 2rem);
  border-radius: var(--border-radius, 8px);
}
/* Article Content Images */
.article-body img {
  display: block;
  max-width: min(50%, 620px);
  height: auto;
  margin: 1.5rem auto;
  border-radius: 8px;
}

/* Article Tables */
.article-body table {
  width: 100%;
  margin: 1.5rem 0;
  border-collapse: collapse;
  border: 1px solid rgba(128, 128, 128, 0.3);
  border-radius: 8px;
  overflow: hidden;
  display: block;
  overflow-x: auto;
  white-space: nowrap;
}
.article-body table thead,
.article-body table tbody,
.article-body table tfoot {
  display: table;
  width: 100%;
  table-layout: fixed;
}
.article-body table thead {
  background: rgba(128, 128, 128, 0.35);
  font-weight: 700;
}
.article-body table th,
.article-body table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border: 1px solid rgba(128, 128, 128, 0.4);
  white-space: normal;
  word-break: break-word;
}
.article-body table th {
  font-weight: 700;
  text-align: center;
}
.article-body table tbody tr:nth-child(even) {
  background: rgba(128, 128, 128, 0.1);
}
.article-body table tbody tr:hover {
  background: rgba(128, 128, 128, 0.15);
}
@media (max-width: 768px) {
  .article-body table {
    font-size: 0.85rem;
  }
  .article-body table th,
  .article-body table td {
    padding: 0.5rem;
  }
  .article-body img {
    max-width: 100%;
  }
}

/* Fix: auto-reveal hidden elements that never enter viewport */
.animate-on-scroll:not(.is-visible) {
  animation: aos-fallback-reveal 0.5s ease forwards;
  animation-delay: 1.5s;
}
@keyframes aos-fallback-reveal {
  to { opacity: 1; transform: translateY(0); }
}

/* === Contacts === */
.contacts-hero { margin-bottom: 2rem; }
.contacts-hero h1 { font-family: var(--font-heading); margin-bottom: 0.5rem; }
.contacts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-bottom: 3rem; }
.contacts-form-section h2 { font-family: var(--font-heading); margin-bottom: 1rem; }
.contacts-form .form-group { margin-bottom: 1rem; }
.contacts-form .form-group label { display: block; font-weight: 600; margin-bottom: 0.3rem; font-size: 0.9rem; }
.contacts-form .form-group input,
.contacts-form .form-group textarea {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1px solid var(--border-color, #ccc);
  border-radius: 4px;
  font-size: 0.95rem;
  font-family: inherit;
  background: var(--surface, #fff);
  color: var(--text, #333);
}
.contacts-form .form-group textarea { min-height: 120px; resize: vertical; }
.contacts-form .btn-submit {
  padding: 0.8rem 2rem;
  background: var(--accent-color, #333);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}
.contacts-form .btn-submit:hover { opacity: 0.9; }
.contacts-info h3 { font-family: var(--font-heading); margin-bottom: 0.5rem; }
.contacts-info p { margin-bottom: 0.5rem; }
.contacts-info a { color: var(--accent-color, #333); }
.social-links { list-style: none; padding: 0; }
.social-links li { margin-bottom: 0.3rem; }
@media (max-width: 768px) {
  .contacts-grid { grid-template-columns: 1fr; }
}

/* ============================================
   Тач-цели, не покрытые селекторами плана 69-09.
   Правила 69-09 поднимали только те классы, у которых объявление размера
   УЖЕ существовало; у элементов ниже min-height не был объявлен вовсе,
   поэтому сканер mobile_css_test их не видел, а палец получал 24–41 px.
   Порог 48 px — параграф 15.1 (domain/techseo.TouchTargetMinPx).
   ============================================ */
@media (max-width: 768px) {
  .comment-author-link,
  .subscribe-form__input,
  .subscribe-form__btn,
  .cookie-banner__btn,
  .author-link,
  .share-btn,
  .comment-cta-button,
  .breadcrumb li a {
    min-height: 48px;
  }

  .comment-author-link,
  .subscribe-form__btn,
  .cookie-banner__btn,
  .author-link,
  .share-btn,
  .comment-cta-button,
  .breadcrumb li a {
    display: inline-flex;
    align-items: center;
  }

  .subscribe-form__btn,
  .cookie-banner__btn,
  .share-btn {
    justify-content: center;
  }

  /* Иконочные кнопки шеринга узкие по содержимому: в editorial и luxe замер дал
     42×48 и 43.6×48 — высота порог держит, ширина нет. Порог книги про ОБЕ
     стороны. */
  .share-btn {
    min-width: 48px;
  }
}

/* === Изображение с подписью (фаза 72, §16.2е книги) ===
   Цвет подписи вынесен в отдельный токен --text-caption, а не взят у
   --text-muted: последний даёт на светлом фоне темы 4.29:1, то есть ниже
   нормы AA. Ширину обёртка не ограничивает — картинки статьи у minimal идут
   во всю ширину полосы. */
figure {
  margin: var(--sp-10) 0;
}

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

figcaption {
  margin-top: var(--sp-3);
  font-size: 0.8125rem;
  line-height: 1.6;
  letter-spacing: 0.015em;
  color: var(--text-caption);
}
