:root {
  --atj-bg: #f5f7fa;
  --atj-surface: #ffffff;
  --atj-surface-2: #f8fafc;
  --atj-text: #1f2933;
  --atj-heading: #111827;
  --atj-muted: #667085;
  --atj-border: #e5e7eb;
  --atj-accent: #e8590c;
  --atj-accent-hover: #c94707;
  --atj-link: #0b5cad;
  --atj-visited: #6d4aff;
  --atj-tip-bg: #ecfdf5;
  --atj-tip: #059669;
  --atj-warn-bg: #fff4e6;
  --atj-warn: #e8590c;
  --atj-error-bg: #fef2f2;
  --atj-error: #dc2626;
  --atj-info-bg: #eff6ff;
  --atj-info: #2563eb;
  --atj-radius-sm: 10px;
  --atj-radius: 16px;
  --atj-radius-lg: 24px;
  --atj-shadow: 0 8px 28px rgba(15, 23, 42, .08);
  --atj-shadow-sm: 0 3px 12px rgba(15, 23, 42, .07);
  --atj-container: 1240px;
  --atj-font: "Golos Text", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --atj-heading-font: "Manrope", "Inter", system-ui, sans-serif;
  --atj-mono: "JetBrains Mono", Consolas, Monaco, monospace;
}

[data-theme="dark"] {
  --atj-bg: #0f172a;
  --atj-surface: #111827;
  --atj-surface-2: #172033;
  --atj-text: #e5e7eb;
  --atj-heading: #f9fafb;
  --atj-muted: #9ca3af;
  --atj-border: #273449;
  --atj-accent: #ff7a1a;
  --atj-accent-hover: #f97316;
  --atj-link: #60a5fa;
  --atj-visited: #c4b5fd;
  --atj-shadow: 0 8px 28px rgba(0, 0, 0, .28);
  --atj-shadow-sm: 0 3px 12px rgba(0, 0, 0, .24);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--atj-bg);
  color: var(--atj-text);
  font-family: var(--atj-font);
  font-size: 18px;
  line-height: 1.68;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
body.menu-open { overflow: hidden; }
a { color: var(--atj-link); text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:visited { color: var(--atj-visited); }
a:hover { color: var(--atj-accent); }
img { max-width: 100%; height: auto; display: block; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }

.screen-reader-text,
.skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link:focus {
  position: fixed;
  z-index: 9999;
  top: 16px;
  left: 16px;
  padding: 10px 14px;
  border-radius: var(--atj-radius-sm);
  background: var(--atj-accent);
  color: #fff;
}
.container {
  width: min(calc(100% - 32px), var(--atj-container));
  margin-inline: auto;
}
.narrow-container { width: min(calc(100% - 32px), 760px); }
.wide-container { width: min(calc(100% - 32px), 1060px); }
.section { padding: 44px 0; }
.section-muted { background: var(--atj-surface-2); border-block: 1px solid var(--atj-border); }
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--atj-accent);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 24px;
}
.section-head.compact { margin-top: 56px; }
.section-head h2,
.archive-header h1,
.home-title,
.entry-title {
  margin: 6px 0 0;
  color: var(--atj-heading);
  font-family: var(--atj-heading-font);
  line-height: 1.12;
  letter-spacing: -.025em;
}
.home-title { max-width: 930px; font-size: clamp(34px, 4vw, 58px); }
.section-head h2 { font-size: clamp(28px, 3vw, 38px); }
.section-link {
  font-size: 15px;
  font-weight: 800;
  color: var(--atj-accent);
  text-decoration: none;
}

.site-header {
  position: sticky;
  z-index: 1000;
  top: 0;
  background: color-mix(in srgb, var(--atj-surface) 92%, transparent);
  border-bottom: 1px solid var(--atj-border);
  backdrop-filter: blur(14px);
}
.header-inner {
  min-height: 74px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
}
.site-branding { display: grid; gap: 2px; min-width: 190px; }
.site-logo-text {
  color: var(--atj-heading) !important;
  font-family: var(--atj-heading-font);
  font-size: 22px;
  font-weight: 900;
  text-decoration: none;
  letter-spacing: -.02em;
}
.site-tagline { color: var(--atj-muted); font-size: 12px; line-height: 1.25; max-width: 240px; }
.primary-nav .menu,
.primary-nav ul {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  margin: 0;
  list-style: none;
}
.primary-nav a {
  display: inline-flex;
  padding: 9px 11px;
  border-radius: 999px;
  color: var(--atj-heading);
  text-decoration: none;
  font-weight: 750;
  font-size: 14px;
}
.primary-nav a:hover,
.primary-nav .current-menu-item > a {
  background: var(--atj-surface-2);
  color: var(--atj-accent);
}
.header-actions { display: flex; align-items: center; gap: 8px; }
.search-toggle,
.theme-toggle,
.menu-toggle {
  border: 1px solid var(--atj-border);
  background: var(--atj-surface);
  color: var(--atj-heading);
  border-radius: 999px;
  min-width: 42px;
  height: 42px;
  box-shadow: var(--atj-shadow-sm);
}
.menu-toggle { display: none; place-items: center; gap: 4px; padding: 0 10px; }
.menu-toggle span:not(.screen-reader-text) { width: 19px; height: 2px; background: currentColor; display: block; }
.header-search {
  padding: 12px 0 18px;
  border-top: 1px solid var(--atj-border);
  background: var(--atj-surface);
}
.search-form { display: flex; gap: 10px; }
.search-field {
  width: 100%;
  border: 1px solid var(--atj-border);
  border-radius: 999px;
  padding: 13px 18px;
  color: var(--atj-text);
  background: var(--atj-bg);
}
.search-submit,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: var(--atj-accent);
  color: #fff !important;
  padding: 12px 18px;
  font-weight: 850;
  text-decoration: none;
}
.button:hover,
.search-submit:hover { background: var(--atj-accent-hover); }
.button-secondary {
  background: var(--atj-surface-2);
  color: var(--atj-heading) !important;
  border: 1px solid var(--atj-border);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
  gap: 18px;
  margin-top: 28px;
}
.hero-card {
  background: var(--atj-surface);
  border: 1px solid var(--atj-border);
  border-radius: var(--atj-radius-lg);
  overflow: hidden;
  box-shadow: var(--atj-shadow-sm);
}
.hero-card:not(.hero-card-main) { display: grid; grid-template-columns: 128px 1fr; }
.hero-card-main { grid-row: span 3; }
.hero-image { aspect-ratio: 16/9; background: var(--atj-surface-2); display: grid; place-items: center; overflow: hidden; text-decoration: none; }
.hero-card:not(.hero-card-main) .hero-image { aspect-ratio: 1/1; height: 100%; }
.hero-image img,
.post-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.hero-card:hover img,
.post-card:hover img { transform: scale(1.035); }
.hero-content { padding: 18px; }
.hero-content h2 { margin: 10px 0 8px; font-size: clamp(20px, 2.3vw, 34px); line-height: 1.14; }
.hero-card:not(.hero-card-main) h2 { font-size: 17px; line-height: 1.22; }
.hero-content h2 a,
.post-card-title a { color: var(--atj-heading); text-decoration: none; }
.hero-content p { margin: 0 0 12px; color: var(--atj-muted); }
.cat-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 5px 9px;
  background: color-mix(in srgb, var(--atj-accent) 12%, var(--atj-surface));
  color: var(--atj-accent) !important;
  text-decoration: none;
  font-size: 12px;
  font-weight: 850;
}
.card-meta { color: var(--atj-muted); font-size: 13px; font-weight: 650; }
.image-fallback { font-size: 52px; opacity: .6; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.post-card {
  overflow: hidden;
  background: var(--atj-surface);
  border: 1px solid var(--atj-border);
  border-radius: var(--atj-radius);
  box-shadow: var(--atj-shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.post-card:hover { transform: translateY(-3px); box-shadow: var(--atj-shadow); }
.post-card-image { aspect-ratio: 16/9; display: grid; place-items: center; background: var(--atj-surface-2); overflow: hidden; text-decoration: none; }
.post-card-body { padding: 16px; display: grid; gap: 10px; }
.post-card-title { margin: 0; font-family: var(--atj-heading-font); font-size: 20px; line-height: 1.25; letter-spacing: -.015em; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-card p { margin: 0; color: var(--atj-muted); font-size: 15px; line-height: 1.5; }
.topic-cloud,
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.topic-cloud a,
.category-tile {
  border: 1px solid var(--atj-border);
  border-radius: var(--atj-radius);
  background: var(--atj-surface);
  color: var(--atj-heading);
  text-decoration: none;
  padding: 16px;
  box-shadow: var(--atj-shadow-sm);
  font-weight: 800;
}
.category-tile { display: grid; gap: 4px; }
.category-tile small { color: var(--atj-muted); font-weight: 600; }

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 18px 0;
  color: var(--atj-muted);
  font-size: 14px;
}
.breadcrumbs a { color: var(--atj-muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--atj-accent); }
.reading-progress {
  position: fixed;
  z-index: 1100;
  top: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--atj-accent);
}
.article-header { padding-top: 20px; padding-bottom: 18px; }
.entry-title { font-size: clamp(32px, 4.1vw, 56px); margin-top: 12px; }
.entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
  margin-top: 18px;
  color: var(--atj-muted);
  font-size: 14px;
  font-weight: 650;
}
.entry-meta span,
.entry-meta a { display: inline-flex; align-items: center; gap: 7px; color: var(--atj-muted); text-decoration: none; }
.entry-meta img { border-radius: 50%; }
.article-lead {
  margin-top: 24px;
  padding: 20px 22px;
  border-left: 4px solid var(--atj-accent);
  border-radius: 0 var(--atj-radius) var(--atj-radius) 0;
  background: var(--atj-surface-2);
  font-size: 21px;
  line-height: 1.62;
  color: var(--atj-heading);
}
.article-lead p { margin: 0; }
.article-cover { margin-top: 16px; margin-bottom: 34px; }
.article-cover img { border-radius: var(--atj-radius-lg); box-shadow: var(--atj-shadow-sm); width: 100%; }
.article-cover figcaption { color: var(--atj-muted); font-size: 14px; margin-top: 10px; text-align: center; }
.article-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 760px) 300px;
  gap: 34px;
  align-items: start;
}
.article-toc,
.article-sidebar { position: relative; }
.toc-box,
.sticky-box { position: sticky; top: 96px; }
.toc-box {
  border: 1px solid var(--atj-border);
  border-radius: var(--atj-radius);
  background: var(--atj-surface);
  padding: 14px;
  box-shadow: var(--atj-shadow-sm);
  max-height: calc(100vh - 120px);
  overflow: auto;
}
.toc-title { font-size: 13px; font-weight: 900; color: var(--atj-heading); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 10px; }
.toc-box a { display: block; color: var(--atj-muted); text-decoration: none; font-size: 14px; line-height: 1.35; padding: 7px 0; border-top: 1px solid var(--atj-border); }
.toc-box a:hover,
.toc-box a.active { color: var(--atj-accent); }
.toc-box .toc-h3 { padding-left: 12px; font-size: 13px; }
.article-main { min-width: 0; }
.entry-content {
  background: var(--atj-surface);
  border: 1px solid var(--atj-border);
  border-radius: var(--atj-radius-lg);
  box-shadow: var(--atj-shadow-sm);
  padding: clamp(22px, 4vw, 42px);
}
.entry-content > *:first-child { margin-top: 0; }
.entry-content > *:last-child { margin-bottom: 0; }
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
  color: var(--atj-heading);
  font-family: var(--atj-heading-font);
  line-height: 1.24;
  letter-spacing: -.015em;
}
.entry-content h2 { margin: 58px 0 18px; font-size: clamp(27px, 3vw, 34px); }
.entry-content h3 { margin: 38px 0 14px; font-size: clamp(22px, 2.3vw, 26px); }
.entry-content h4 { margin: 28px 0 12px; font-size: 21px; }
.entry-content p { margin: 0 0 22px; }
.entry-content ul,
.entry-content ol { padding-left: 1.4em; margin-bottom: 24px; }
.entry-content li + li { margin-top: 8px; }
.entry-content blockquote {
  margin: 30px 0;
  padding: 18px 22px;
  border-left: 4px solid var(--atj-accent);
  background: var(--atj-surface-2);
  border-radius: 0 var(--atj-radius) var(--atj-radius) 0;
  color: var(--atj-heading);
  font-weight: 650;
}
.entry-content code {
  font-family: var(--atj-mono);
  font-size: .9em;
  background: var(--atj-surface-2);
  border: 1px solid var(--atj-border);
  border-radius: 6px;
  padding: .08em .35em;
}
.entry-content pre {
  overflow-x: auto;
  background: #111827;
  color: #e5e7eb;
  padding: 18px;
  border-radius: var(--atj-radius);
}
.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 28px 0;
  font-size: 16px;
  line-height: 1.45;
  display: block;
  overflow-x: auto;
  border: 1px solid var(--atj-border);
  border-radius: var(--atj-radius);
}
.entry-content thead { background: var(--atj-surface-2); color: var(--atj-heading); }
.entry-content th,
.entry-content td { padding: 12px 14px; border-bottom: 1px solid var(--atj-border); vertical-align: top; min-width: 140px; }
.entry-content tbody tr:nth-child(even) { background: color-mix(in srgb, var(--atj-surface-2) 55%, transparent); }
.entry-content figure { margin: 30px 0; }
.entry-content figcaption { margin-top: 10px; color: var(--atj-muted); font-size: 14px; text-align: center; }
.entry-content .wp-block-image img { border-radius: var(--atj-radius); }

.atj-notice,
.wp-block-quote.is-style-atj-important,
.wp-block-group.is-style-atj-card {
  margin: 28px 0;
  padding: 18px 20px;
  border-radius: var(--atj-radius);
  border: 1px solid var(--atj-border);
}
.atj-notice p:last-child { margin-bottom: 0; }
.notice-title { display: block; margin-bottom: 8px; color: var(--atj-heading); }
.atj-notice-important { background: var(--atj-info-bg); border-left: 4px solid var(--atj-info); }
.atj-notice-warning { background: var(--atj-warn-bg); border-left: 4px solid var(--atj-warn); }
.atj-notice-tip { background: var(--atj-tip-bg); border-left: 4px solid var(--atj-tip); }
.atj-notice-error { background: var(--atj-error-bg); border-left: 4px solid var(--atj-error); }
.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 28px 0; }
.pros-cons > div { padding: 18px; border: 1px solid var(--atj-border); border-radius: var(--atj-radius); background: var(--atj-surface-2); }
.pros-cons h3 { margin-top: 0; }
.article-actions-bottom { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0 0; }
.author-box,
.related-posts,
.comments-area {
  margin-top: 34px;
  padding: 22px;
  border: 1px solid var(--atj-border);
  border-radius: var(--atj-radius-lg);
  background: var(--atj-surface);
  box-shadow: var(--atj-shadow-sm);
}
.author-box { display: grid; grid-template-columns: 72px 1fr; gap: 18px; align-items: start; }
.author-box img { border-radius: 50%; }
.author-label { color: var(--atj-accent); font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.author-box h2 { margin: 0 0 6px; color: var(--atj-heading); font-family: var(--atj-heading-font); }
.author-box p { margin: 0 0 10px; color: var(--atj-muted); font-size: 15px; }
.related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.ad-slot {
  margin: 24px 0;
  border: 1px dashed color-mix(in srgb, var(--atj-muted) 55%, transparent);
  border-radius: var(--atj-radius);
  background: color-mix(in srgb, var(--atj-surface-2) 78%, transparent);
  padding: 10px;
  text-align: center;
  color: var(--atj-muted);
}
.ad-label { display: block; margin-bottom: 7px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.ad-placeholder {
  display: grid;
  place-items: center;
  min-height: 90px;
  border-radius: 12px;
  background: repeating-linear-gradient(45deg, color-mix(in srgb, var(--atj-border) 50%, transparent) 0 8px, transparent 8px 16px);
  font-size: 14px;
}
.article-sidebar .ad-placeholder { min-height: 360px; }

.content-sidebar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 28px;
  align-items: start;
}
.archive-header { max-width: 820px; margin-bottom: 24px; }
.archive-header h1 { font-size: clamp(34px, 4vw, 52px); }
.archive-description,
.archive-header p { color: var(--atj-muted); max-width: 720px; }
.archive-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.archive-sidebar { position: sticky; top: 96px; }
.pagination-wrap { margin-top: 32px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  border: 1px solid var(--atj-border);
  border-radius: 999px;
  background: var(--atj-surface);
  text-decoration: none;
}
.page-numbers.current { background: var(--atj-accent); color: #fff; border-color: var(--atj-accent); }

.site-footer {
  margin-top: 56px;
  padding: 42px 0 22px;
  background: var(--atj-surface);
  border-top: 1px solid var(--atj-border);
}
.footer-grid { display: grid; grid-template-columns: 1.2fr .8fr 1fr; gap: 28px; }
.footer-about h2 { margin: 0 0 8px; color: var(--atj-heading); font-family: var(--atj-heading-font); }
.footer-about p,
.footer-note p { color: var(--atj-muted); font-size: 15px; }
.footer-socials { display: flex; flex-wrap: wrap; gap: 10px; }
.footer-socials a,
.footer-nav a { text-decoration: none; font-weight: 750; }
.footer-nav ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--atj-border);
  color: var(--atj-muted);
  font-size: 14px;
}
.empty-state {
  text-align: center;
  padding: 42px;
  border-radius: var(--atj-radius-lg);
  background: var(--atj-surface);
  border: 1px solid var(--atj-border);
  box-shadow: var(--atj-shadow-sm);
}
.error-code { color: var(--atj-accent); font-family: var(--atj-heading-font); font-weight: 900; font-size: clamp(72px, 12vw, 140px); line-height: 1; }

.comment-list { padding: 0; list-style: none; }
.comment-body { padding: 16px 0; border-bottom: 1px solid var(--atj-border); }
.comment-form input,
.comment-form textarea {
  width: 100%;
  border: 1px solid var(--atj-border);
  border-radius: var(--atj-radius-sm);
  background: var(--atj-bg);
  color: var(--atj-text);
  padding: 12px 14px;
}
.comment-form .submit { width: auto; background: var(--atj-accent); color: #fff; border-radius: 999px; border: 0; font-weight: 850; }

@media (max-width: 1180px) {
  .article-layout { grid-template-columns: minmax(0, 760px) 300px; }
  .article-toc { display: none; }
}
@media (max-width: 1024px) {
  .header-inner { grid-template-columns: auto auto auto; justify-content: space-between; }
  .menu-toggle { display: inline-grid; }
  .primary-nav {
    position: fixed;
    inset: 74px 0 auto;
    background: var(--atj-surface);
    border-bottom: 1px solid var(--atj-border);
    padding: 18px;
    transform: translateY(-130%);
    transition: transform .2s ease;
  }
  body.menu-open .primary-nav { transform: translateY(0); }
  .primary-nav .menu,
  .primary-nav ul { display: grid; gap: 8px; }
  .primary-nav a { padding: 12px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-card:not(.hero-card-main) { grid-template-columns: 160px 1fr; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topic-cloud,
  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .article-layout,
  .content-sidebar-layout { grid-template-columns: 1fr; }
  .article-sidebar,
  .archive-sidebar { position: static; }
  .sticky-box { position: static; }
  .article-sidebar .ad-placeholder { min-height: 180px; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  body { font-size: 17px; line-height: 1.68; }
  .container { width: min(calc(100% - 24px), var(--atj-container)); }
  .section { padding: 32px 0; }
  .section-head { align-items: start; flex-direction: column; }
  .site-tagline { display: none; }
  .header-inner { min-height: 66px; gap: 10px; }
  .primary-nav { inset: 66px 0 auto; }
  .search-form { flex-direction: column; }
  .hero-card:not(.hero-card-main) { grid-template-columns: 1fr; }
  .hero-card:not(.hero-card-main) .hero-image { aspect-ratio: 16/9; }
  .card-grid,
  .archive-grid,
  .related-grid { grid-template-columns: 1fr; }
  .topic-cloud,
  .category-grid { grid-template-columns: 1fr; }
  .entry-meta { gap: 8px 12px; }
  .article-lead { font-size: 18px; padding: 16px; }
  .entry-content { padding: 20px 16px; border-radius: var(--atj-radius); }
  .entry-content h2 { margin-top: 44px; }
  .pros-cons { grid-template-columns: 1fr; }
  .author-box { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

@media print {
  .site-header,
  .site-footer,
  .article-toc,
  .article-sidebar,
  .ad-slot,
  .article-actions-bottom,
  .related-posts,
  .comments-area,
  .reading-progress {
    display: none !important;
  }
  body { background: #fff; color: #111; font-size: 14pt; }
  .container,
  .narrow-container,
  .wide-container,
  .article-layout { width: 100%; max-width: none; display: block; }
  .entry-content { border: 0; box-shadow: none; padding: 0; }
  a { color: #111; text-decoration: none; }
}

/* === v1.1 header/footer polish: компактная шапка и нормальный футер вместо кладбища виджетов === */
.site-header {
  background: color-mix(in srgb, var(--atj-surface) 96%, transparent);
  box-shadow: 0 10px 30px rgba(15, 23, 42, .06);
}
.header-topline {
  background: #111827;
  color: #f9fafb;
  font-size: 13px;
  line-height: 1.35;
}
[data-theme="dark"] .header-topline { background: #050816; }
.header-topline-inner {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.header-topline-muted { color: rgba(249, 250, 251, .72); }
.header-main {
  min-height: 78px;
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(320px, 1fr) auto;
  align-items: center;
  gap: 22px;
}
.site-branding {
  min-width: 0;
  gap: 4px;
}
.site-logo-text,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.site-logo-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--atj-accent), #ffb36b);
  color: #fff;
  font-size: 17px;
  box-shadow: 0 8px 20px rgba(232, 89, 12, .22);
}
.site-logo-name {
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.site-tagline {
  max-width: 320px;
  font-size: 12px;
  color: var(--atj-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.header-search-inline .search-form {
  position: relative;
  gap: 0;
}
.header-search-inline .search-field {
  height: 46px;
  padding-inline: 18px 132px;
  border-radius: 16px;
  background: var(--atj-surface-2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55);
}
.header-search-inline .search-submit {
  position: absolute;
  right: 5px;
  top: 5px;
  height: 36px;
  padding: 0 16px;
  border-radius: 12px;
  font-size: 14px;
}
.header-actions {
  gap: 10px;
}
.search-toggle,
.theme-toggle,
.menu-toggle {
  min-width: 44px;
  height: 44px;
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .08);
}
.search-toggle { display: none; }
.header-nav-row {
  border-top: 1px solid var(--atj-border);
  background: var(--atj-surface);
}
.header-nav-inner {
  min-height: 48px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}
.nav-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--atj-muted);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.nav-label::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--atj-accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--atj-accent) 16%, transparent);
}
.primary-nav {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.primary-nav .menu,
.primary-nav ul {
  flex-wrap: nowrap;
  gap: 8px;
  width: max-content;
  min-width: 100%;
}
.primary-nav a {
  max-width: 245px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.primary-nav a:hover,
.primary-nav .current-menu-item > a,
.primary-nav .current-cat > a {
  border-color: color-mix(in srgb, var(--atj-accent) 28%, var(--atj-border));
  background: color-mix(in srgb, var(--atj-accent) 9%, var(--atj-surface));
}
.header-search {
  padding: 14px 0;
  box-shadow: 0 14px 28px rgba(15, 23, 42, .08);
}
.site-main {
  min-height: 52vh;
}
.breadcrumbs {
  margin-top: 22px;
  margin-bottom: 10px;
}

.site-footer {
  margin-top: 72px;
  padding: 0 0 22px;
  background: #0f172a;
  color: #d1d5db;
  border-top: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}
[data-theme="dark"] .site-footer { background: #050816; }
.footer-cta {
  padding: 34px 0;
  background:
    radial-gradient(circle at 20% 10%, rgba(232, 89, 12, .28), transparent 32%),
    linear-gradient(135deg, #111827, #1f2937);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.footer-cta-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
}
.footer-cta h2 {
  max-width: 760px;
  margin: 6px 0 8px;
  color: #fff;
  font-family: var(--atj-heading-font);
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.12;
  letter-spacing: -.025em;
}
.footer-cta p {
  max-width: 760px;
  margin: 0;
  color: rgba(249, 250, 251, .76);
  font-size: 16px;
}
.footer-main {
  display: grid;
  grid-template-columns: minmax(260px, 1.35fr) minmax(190px, .85fr) minmax(190px, .85fr) minmax(260px, 1.05fr);
  gap: 34px;
  padding: 42px 0 30px;
}
.footer-brand,
.footer-column {
  min-width: 0;
}
.footer-logo {
  color: #fff !important;
  font-family: var(--atj-heading-font);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -.02em;
  text-decoration: none;
}
.footer-brand p,
.footer-column p,
.footer-disclaimer {
  color: #a7b0c0;
  font-size: 14px;
  line-height: 1.65;
}
.footer-disclaimer {
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  background: rgba(255,255,255,.04);
}
.footer-column h2 {
  margin: 0 0 14px;
  color: #fff;
  font-family: var(--atj-heading-font);
  font-size: 16px;
  line-height: 1.25;
}
.footer-column ul,
.footer-nav ul,
.footer-category-list,
.footer-fallback-menu {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer-column li,
.footer-category-list li {
  min-width: 0;
}
.footer-column a,
.footer-category-list a,
.footer-socials a,
.footer-bottom a {
  color: #dbeafe;
  text-decoration: none;
}
.footer-column a,
.footer-category-list a {
  display: inline-flex;
  max-width: 100%;
  font-size: 14px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
}
.footer-column a:hover,
.footer-category-list a:hover,
.footer-bottom a:hover,
.footer-socials a:hover { color: #ffb36b; }
.footer-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.footer-socials a {
  padding: 8px 11px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 999px;
  background: rgba(255,255,255,.04);
  font-size: 13px;
  font-weight: 850;
}
.footer-mini-search .search-form {
  display: grid;
  gap: 10px;
}
.footer-mini-search .search-field {
  height: 44px;
  border-color: rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: #fff;
  border-radius: 14px;
}
.footer-mini-search .search-field::placeholder { color: rgba(255,255,255,.46); }
.footer-mini-search .search-submit {
  width: 100%;
  height: 42px;
  border-radius: 14px;
}
.footer-bottom {
  margin-top: 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.08);
  color: #8f9bad;
  font-size: 13px;
}
.footer-bottom span:nth-child(2) {
  color: #a7b0c0;
}
.footer-widgets { display: none; }

@media (max-width: 1180px) {
  .header-main { grid-template-columns: minmax(170px, 230px) minmax(260px, 1fr) auto; }
  .primary-nav a { max-width: 220px; }
  .footer-main { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
  .header-topline { display: none; }
  .header-main {
    min-height: 70px;
    grid-template-columns: minmax(160px, 1fr) auto;
    gap: 12px;
  }
  .header-search-inline { display: none; }
  .search-toggle { display: inline-grid; place-items: center; }
  .menu-toggle { display: inline-grid; }
  .header-actions { justify-self: end; }
  .header-nav-row {
    position: fixed;
    z-index: 999;
    inset: 70px 0 auto;
    transform: translateY(-130%);
    transition: transform .2s ease;
    box-shadow: 0 14px 28px rgba(15, 23, 42, .12);
  }
  body.menu-open .header-nav-row { transform: translateY(0); }
  .header-nav-inner {
    display: block;
    padding-top: 12px;
    padding-bottom: 14px;
  }
  .nav-label { margin-bottom: 10px; }
  .primary-nav {
    position: static;
    inset: auto;
    padding: 0;
    transform: none;
    border: 0;
    box-shadow: none;
  }
  .primary-nav .menu,
  .primary-nav ul {
    display: grid;
    width: auto;
    min-width: 0;
  }
  .primary-nav a {
    max-width: none;
    width: 100%;
    padding: 11px 12px;
  }
  .footer-cta-inner { grid-template-columns: 1fr; }
  .footer-cta-inner .button { justify-self: start; }
}
@media (max-width: 720px) {
  .header-main { min-height: 64px; }
  .site-logo-mark { width: 31px; height: 31px; border-radius: 10px; }
  .site-logo-text { font-size: 20px; }
  .site-tagline { display: none; }
  .search-toggle,
  .theme-toggle,
  .menu-toggle { min-width: 40px; height: 40px; border-radius: 13px; }
  .header-nav-row { inset: 64px 0 auto; }
  .footer-cta { padding: 28px 0; }
  .footer-main { grid-template-columns: 1fr; gap: 26px; padding-top: 34px; }
  .footer-bottom { flex-direction: column; gap: 9px; }
}

/* === v1.2: нормальная шапка, без унылой линейки меню; исправление карточек; реклама выключена по умолчанию === */
.site-header.atj-header-v2 {
  position: sticky;
  top: 0;
  isolation: isolate;
  overflow: visible;
  background: #0b1220;
  color: #f9fafb;
  border-bottom: 0;
  box-shadow: 0 16px 38px rgba(15, 23, 42, .18);
  backdrop-filter: none;
}
.admin-bar .site-header.atj-header-v2 { top: 32px; }
.header-bg-glow {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 0%, rgba(232, 89, 12, .42), transparent 34%),
    radial-gradient(circle at 88% 8%, rgba(96, 165, 250, .18), transparent 28%),
    linear-gradient(135deg, #080f1e 0%, #111827 48%, #0b1220 100%);
}
.header-shell {
  position: relative;
  padding-top: 8px;
  padding-bottom: 12px;
}
.atj-header-v2 .header-topline {
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  color: rgba(249, 250, 251, .86);
}
.atj-header-v2 .header-topline-inner {
  min-height: 32px;
  padding-inline: 0;
}
.header-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #fff;
}
.header-status span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 5px rgba(34, 197, 94, .14);
}
.atj-header-v2 .header-topline-muted {
  color: rgba(249, 250, 251, .62);
  font-size: 13px;
}
.atj-header-v2 .header-main {
  min-height: 76px;
  grid-template-columns: minmax(210px, 286px) minmax(320px, 1fr) auto;
  gap: 20px;
}
.atj-header-v2 .site-logo-text {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff !important;
  font-size: 0;
  text-decoration: none;
}
.atj-header-v2 .site-logo-mark {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background:
    radial-gradient(circle at 70% 18%, rgba(255,255,255,.34), transparent 23%),
    linear-gradient(135deg, #ff8a1f, #e8590c 56%, #9a3412);
  color: #fff;
  font-family: var(--atj-heading-font);
  font-size: 25px;
  font-weight: 950;
  box-shadow: 0 14px 30px rgba(232, 89, 12, .34), inset 0 1px 0 rgba(255,255,255,.24);
}
.site-logo-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.atj-header-v2 .site-logo-name {
  max-width: 210px;
  color: #fff;
  font-family: var(--atj-heading-font);
  font-size: 26px;
  font-weight: 950;
  letter-spacing: -.045em;
  line-height: 1;
}
.atj-header-v2 .site-tagline {
  display: block;
  max-width: 250px;
  color: rgba(249, 250, 251, .66);
  font-size: 12px;
  line-height: 1.25;
}
.atj-logo-wrap .custom-logo-link,
.atj-header-v2 .custom-logo-link {
  display: inline-flex;
  align-items: center;
}
.atj-header-v2 .custom-logo {
  max-height: 52px;
  width: auto;
}
.atj-header-v2 .header-search-inline .search-form {
  position: relative;
  display: flex;
}
.atj-header-v2 .header-search-inline .search-field {
  height: 50px;
  padding-inline: 48px 136px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 18px;
  background: rgba(255, 255, 255, .075);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 10px 26px rgba(0,0,0,.12);
}
.atj-header-v2 .header-search-inline .search-form::before {
  content: "🔎";
  position: absolute;
  left: 17px;
  top: 50%;
  z-index: 1;
  transform: translateY(-50%);
  opacity: .75;
}
.atj-header-v2 .header-search-inline .search-field::placeholder { color: rgba(255,255,255,.52); }
.atj-header-v2 .header-search-inline .search-submit {
  right: 6px;
  top: 6px;
  height: 38px;
  border-radius: 13px;
  background: linear-gradient(135deg, #ff8a1f, #e8590c);
  box-shadow: 0 10px 22px rgba(232, 89, 12, .28);
}
.atj-header-v2 .header-actions { gap: 9px; }
.atj-header-v2 .search-toggle,
.atj-header-v2 .theme-toggle,
.atj-header-v2 .menu-toggle {
  min-width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 16px;
  background: rgba(255, 255, 255, .075);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 10px 24px rgba(0,0,0,.12);
}
.atj-header-v2 .search-toggle:hover,
.atj-header-v2 .theme-toggle:hover,
.atj-header-v2 .menu-toggle:hover {
  background: rgba(255, 255, 255, .12);
  color: #fff;
}
.atj-header-v2 .header-search {
  margin-top: 8px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 18px;
  background: rgba(255,255,255,.07);
  box-shadow: 0 14px 30px rgba(0,0,0,.18);
}
.atj-header-v2 .header-search .search-field {
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.14);
  color: #fff;
}
.atj-header-v2 .header-search .search-field::placeholder { color: rgba(255,255,255,.52); }
.atj-header-v2 .header-nav-row {
  border-top: 1px solid rgba(255,255,255,.08);
  background: transparent;
}
.atj-header-v2 .header-nav-inner {
  min-height: 46px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}
.atj-header-v2 .nav-label {
  color: rgba(249, 250, 251, .7);
  font-size: 12px;
}
.atj-header-v2 .nav-label::before {
  background: #ff8a1f;
  box-shadow: 0 0 0 4px rgba(232, 89, 12, .18);
}
.atj-header-v2 .primary-nav {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.atj-header-v2 .primary-nav .menu,
.atj-header-v2 .primary-nav ul {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  min-width: 100%;
  width: max-content;
}
.atj-header-v2 .primary-nav a {
  max-width: 230px;
  padding: 9px 13px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 999px;
  background: rgba(255,255,255,.055);
  color: rgba(249, 250, 251, .88) !important;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
}
.atj-header-v2 .primary-nav a:hover,
.atj-header-v2 .primary-nav .current-menu-item > a,
.atj-header-v2 .primary-nav .current-cat > a {
  border-color: rgba(255, 138, 31, .5);
  background: rgba(232, 89, 12, .18);
  color: #fff !important;
}

/* Фикс карточек: картинка сверху, текст снизу. Без ползания текста по изображению, этот цирк закрыт. */
.card-grid,
.archive-grid,
.related-grid {
  align-items: stretch;
}
.post-card {
  position: relative;
  display: flex !important;
  flex-direction: column !important;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  isolation: isolate;
}
.post-card-image {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  aspect-ratio: 16 / 9;
  flex: 0 0 auto;
  min-height: 0;
  overflow: hidden;
  background: var(--atj-surface-2);
}
.post-card-image img {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
}
.post-card-body {
  position: relative;
  z-index: 2;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
  width: 100%;
  padding: 17px 18px 18px;
  background: var(--atj-surface);
}
.post-card-title {
  width: 100%;
  color: var(--atj-heading);
  overflow-wrap: anywhere;
}
.post-card .cat-pill {
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.post-card p { width: 100%; }
.post-card .card-meta { margin-top: auto; }

/* Пустые рекламные блоки не должны занимать место, если рекламу не включили. */
.ad-slot:empty { display: none; }

@media (max-width: 1180px) {
  .atj-header-v2 .header-main {
    grid-template-columns: minmax(190px, 250px) minmax(260px, 1fr) auto;
  }
  .atj-header-v2 .primary-nav a { max-width: 205px; }
}
@media (max-width: 1024px) {
  .admin-bar .site-header.atj-header-v2 { top: 46px; }
  .atj-header-v2 .header-topline { display: none; }
  .atj-header-v2 .header-shell { padding-block: 8px; }
  .atj-header-v2 .header-main {
    min-height: 58px;
    grid-template-columns: minmax(150px, 1fr) auto;
    gap: 12px;
  }
  .atj-header-v2 .header-search-inline { display: none; }
  .atj-header-v2 .search-toggle { display: inline-grid; place-items: center; }
  .atj-header-v2 .menu-toggle { display: inline-grid; }
  .atj-header-v2 .header-nav-row {
    position: fixed;
    z-index: 999;
    inset: 74px 12px auto;
    max-height: calc(100vh - 92px);
    padding: 12px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 22px;
    background: #0b1220;
    box-shadow: 0 22px 48px rgba(0,0,0,.34);
    transform: translateY(-140%);
    transition: transform .2s ease;
    overflow: auto;
  }
  body.menu-open .atj-header-v2 .header-nav-row { transform: translateY(0); }
  .atj-header-v2 .header-nav-inner {
    display: block;
    min-height: 0;
  }
  .atj-header-v2 .nav-label {
    display: flex;
    margin-bottom: 10px;
  }
  .atj-header-v2 .primary-nav {
    position: static;
    inset: auto;
    padding: 0;
    transform: none;
    border: 0;
    box-shadow: none;
    overflow: visible;
  }
  .atj-header-v2 .primary-nav .menu,
  .atj-header-v2 .primary-nav ul {
    display: grid;
    width: auto;
    min-width: 0;
    gap: 8px;
  }
  .atj-header-v2 .primary-nav a {
    width: 100%;
    max-width: none;
    justify-content: flex-start;
    padding: 12px 13px;
    border-radius: 14px;
  }
}
@media (max-width: 720px) {
  .admin-bar .site-header.atj-header-v2 { top: 0; }
  .atj-header-v2 .header-main { min-height: 54px; }
  .atj-header-v2 .site-logo-mark {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    font-size: 22px;
  }
  .atj-header-v2 .site-logo-name {
    max-width: 140px;
    font-size: 22px;
  }
  .atj-header-v2 .site-tagline { display: none; }
  .atj-header-v2 .search-toggle,
  .atj-header-v2 .theme-toggle,
  .atj-header-v2 .menu-toggle {
    min-width: 41px;
    height: 41px;
    border-radius: 14px;
  }
  .atj-header-v2 .header-actions { gap: 6px; }
  .atj-header-v2 .header-nav-row { inset: 70px 10px auto; }
  .post-card-body { padding: 15px; }
}

/* Если рекламы и виджетов нет, не держим пустые колонки. */
.content-sidebar-layout.no-sidebar {
  grid-template-columns: 1fr;
}
.content-sidebar-layout.no-sidebar .archive-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.article-layout.no-right-sidebar {
  grid-template-columns: 220px minmax(0, 760px);
  justify-content: center;
}
@media (max-width: 1180px) {
  .article-layout.no-right-sidebar { grid-template-columns: minmax(0, 760px); }
}
@media (max-width: 1024px) {
  .content-sidebar-layout.no-sidebar .archive-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .content-sidebar-layout.no-sidebar .archive-grid { grid-template-columns: 1fr; }
}
