:root {
  --blog-max-width: 70rem;
  --blog-blue: #2563eb;
  --blog-soft-blue: rgba(37, 99, 235, 0.08);
  --blog-border: #e2e8f0;
  --blog-radius: 1.5rem;
}

body.blog-page,
body.blog-article {
  font-family: 'Inter', sans-serif;
  background: #f8fafc;
  color: #0f172a;
}

.blog-article article > * + * {
  margin-top: clamp(2rem, 3.5vw, 3.5rem);
}

.site-header__actions {
  align-items: center;
}

.header-menu-group {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.analysis-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 1.1rem;
  border-radius: 9999px;
  background: linear-gradient(120deg, #ebf3ff, #f4f7ff);
  border: 1px solid #dbeafe;
  color: #0f172a;
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.analysis-trigger:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.18);
  background: linear-gradient(120deg, #e0ecff, #f7faff);
}

.analysis-trigger:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.analysis-trigger__icon {
  transition: transform 0.2s ease;
}

.analysis-trigger--open .analysis-trigger__icon {
  transform: rotate(180deg);
}

.analysis-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
  z-index: 40;
  display: none;
}

.analysis-backdrop[hidden] {
  display: none;
}

.analysis-panel {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  max-width: 420px;
  height: 100%;
  background: #fff;
  box-shadow: -20px 0 40px rgba(15, 23, 42, 0.2);
  transition: transform 0.25s ease;
  transform: translateX(100%);
  z-index: 50;
  display: flex;
  flex-direction: column;
}

.analysis-panel--open {
  transform: translateX(0);
  right: 0;
}

.analysis-panel__inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.analysis-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #e2e8f0;
}

.analysis-panel__title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1f2937;
}

.analysis-panel__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f1f5f9;
  color: #1e293b;
}

.analysis-panel__close:hover {
  background: #e2e8f0;
}

.analysis-panel__content {
  padding: 1rem 1.5rem 2rem;
  overflow-y: auto;
  display: grid;
  gap: 1.5rem;
}

.analysis-section__title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #1f2937;
}

.analysis-section__descr {
  font-size: 0.9rem;
  color: #475569;
  margin-bottom: 0.75rem;
}

.analysis-link {
  display: block;
  padding: 0.55rem 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid transparent;
  color: #1f2937;
  font-weight: 500;
  transition: all 0.2s ease;
  background: #f8fafc;
  margin-bottom: 0.4rem;
}

.analysis-link:hover,
.analysis-link:focus-visible {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
  outline: none;
}

.quick-box {
  border: 1px solid var(--blog-border);
  border-radius: 1.5rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  background: #fff;
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.08);
}

.quick-box h2 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.quick-box .quick-grid {
  display: grid;
  gap: 1rem;
}

.quick-box .quick-grid article {
  border: 1px solid #e2e8f0;
  border-radius: 1.25rem;
  padding: 1rem;
  background: #f8fafc;
}

.quick-box .quick-grid h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #0f172a;
}

.quick-box .quick-grid p {
  font-size: 0.95rem;
  line-height: 1.5;
  color: #475569;
}

.cta-card {
  border: 1px solid #bfdbfe;
  border-radius: 1.5rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  background: linear-gradient(120deg, #eef2ff, #f5fbff);
  box-shadow: 0 20px 50px rgba(37, 99, 235, 0.15);
  text-align: left;
}

.cta-card h2 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #1e3a8a;
  margin-bottom: 0.5rem;
}

.cta-card p {
  color: #1d4ed8;
  margin-bottom: 1rem;
}

.cta-card .cta-buttons {
  justify-content: flex-start;
}

.cta-card .cta-buttons a {
  padding: 0.65rem 1.2rem;
  border-radius: 0.9rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.cta-card .btn--primary,
.cta-card a[href*="#form"] {
  background: #2563eb;
  color: #fff;
}

.cta-card .btn--secondary {
  background: #0f172a;
  color: #fff;
  border-color: #0f172a;
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.25);
}

.cta-card .btn--primary:hover,
.cta-card a[href*="#form"]:hover {
  background: #1d4ed8;
}

.cta-card .btn--secondary:hover {
  background: #1e293b;
  border-color: #1e293b;
  color: #fff;
  box-shadow: 0 20px 35px rgba(15, 23, 42, 0.3);
}

@media (min-width: 768px) {
  .quick-box .quick-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.cta-buttons a {
  flex: 0 1 auto;
}

details[open] > summary svg {
  transform: rotate(180deg);
}

@media (max-width: 640px) {
  .analysis-panel {
    max-width: 100%;
  }

  .analysis-panel__content {
    padding: 1rem 1.25rem 2.5rem;
  }
}

.blog-hero {
  width: 100%;
  padding: clamp(1.5rem, 3vw, 3.5rem) 1.25rem 1rem;
}

.blog-hero__inner {
  max-width: var(--blog-max-width);
  margin: 0 auto;
  background: linear-gradient(130deg, #eef2ff, #e0f2fe);
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 2rem;
  padding: clamp(1.75rem, 3vw, 3.25rem);
  box-shadow: 0 30px 80px rgba(37, 99, 235, 0.18);
}

.blog-hero__eyebrow {
  font-size: 0.9rem;
  font-weight: 600;
  color: #1d4ed8;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.blog-hero__title {
  font-size: clamp(2.2rem, 4vw, 3rem);
  line-height: 1.2;
  margin: 0.6rem 0 0.75rem;
}

.blog-hero__text {
  max-width: 48rem;
  line-height: 1.65;
  color: #0f172a;
}

.blog-hero__actions {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.blog-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.95rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  border: 1px solid transparent;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.blog-btn--primary {
  background: #1d4ed8;
  color: #fff;
  box-shadow: 0 15px 35px rgba(37, 99, 235, 0.35);
}

.blog-btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 45px rgba(37, 99, 235, 0.45);
}

.blog-btn--secondary {
  border-color: rgba(15, 23, 42, 0.2);
  color: #0f172a;
  background: #fff;
}

body.blog-page .blog-finder {
  width: 100%;
  padding: 0 1.25rem 2.5rem;
}

body.blog-page .blog-finder__inner {
  max-width: var(--blog-max-width);
  margin: 0 auto;
  border: 1px solid var(--blog-border);
  border-radius: 1.75rem;
  background: #fff;
  padding: clamp(1.25rem, 2.5vw, 2rem);
  box-shadow: 0 22px 55px rgba(15, 23, 42, 0.08);
}

body.blog-page .blog-finder__head {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

body.blog-page .blog-finder__title {
  font-size: 1.35rem;
  font-weight: 600;
  color: #0f172a;
}

body.blog-page .blog-finder__hint {
  color: #475569;
  line-height: 1.6;
  max-width: 52rem;
}

body.blog-page .blog-finder__form {
  margin-top: 1rem;
}

body.blog-page .blog-finder__input-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  border-radius: 9999px;
  padding: 0.75rem 1rem;
  transition: box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

body.blog-page .blog-finder__input-wrap:focus-within {
  border-color: #93c5fd;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

body.blog-page .blog-finder__icon {
  width: 1.1rem;
  height: 1.1rem;
  color: #64748b;
  flex: 0 0 auto;
}

body.blog-page .blog-finder__input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 1rem;
  color: #0f172a;
  min-width: 120px;
}

body.blog-page .blog-finder__input::placeholder {
  color: #94a3b8;
}

body.blog-page .blog-finder__clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  border: 1px solid transparent;
  background: transparent;
  color: #64748b;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

body.blog-page .blog-finder__clear svg {
  width: 1rem;
  height: 1rem;
}

body.blog-page .blog-finder__clear:hover {
  background: #e2e8f0;
  color: #0f172a;
}

body.blog-page .blog-finder__clear:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

body.blog-page .blog-finder__chips {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

body.blog-page .blog-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.95rem;
  border-radius: 9999px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 600;
  font-size: 0.85rem;
  line-height: 1.1;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

body.blog-page .blog-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.12);
}

body.blog-page .blog-chip:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

body.blog-page .blog-chip.is-active {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #fff;
  box-shadow: 0 16px 32px rgba(37, 99, 235, 0.25);
}

body.blog-page .blog-finder__status {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  color: #64748b;
  font-size: 0.9rem;
}

body.blog-page .blog-finder__count {
  font-weight: 600;
  color: #0f172a;
}

body.blog-page .blog-finder__sep {
  color: #cbd5e1;
}

body.blog-page .blog-finder__jump {
  color: #1d4ed8;
  font-weight: 600;
  text-decoration: none;
}

body.blog-page .blog-finder__jump:hover {
  text-decoration: underline;
}

body.blog-page .blog-finder__noresults {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px dashed #cbd5e1;
  border-radius: 1rem;
  background: #f8fafc;
}

.post-grid-section {
  max-width: var(--blog-max-width);
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
}

.post-grid-headline {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.post-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.post-card {
  background: #fff;
  border: 1px solid var(--blog-border);
  border-radius: 1.5rem;
  padding: 1.5rem;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  height: 100%;
}

.post-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.post-card__tag {
  font-size: 0.8rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: var(--blog-soft-blue);
  color: var(--blog-blue);
  font-weight: 600;
}

.post-card h2 {
  font-size: 1.2rem;
  line-height: 1.35;
  margin: 0;
}

.post-card p {
  color: #475569;
  line-height: 1.6;
  margin: 0;
  flex-grow: 1;
}

.post-card__meta {
  font-size: 0.85rem;
  color: #64748b;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.post-card__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.8rem 1.3rem;
  border-radius: 0.9rem;
  background: #1d4ed8;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease;
}

.post-card__cta svg {
  width: 1rem;
  height: 1rem;
}

.post-card__cta:hover {
  background: #1e3a8a;
}

.blog-cta {
  max-width: var(--blog-max-width);
  margin: 0 auto 3rem;
  padding: 0 1.25rem;
}

[hidden] {
  display: none !important;
}

.blog-cta__inner {
  border-radius: 1.75rem;
  border: 1px solid rgba(16, 185, 129, 0.2);
  background: linear-gradient(120deg, #ecfccb, #d1fae5);
  padding: clamp(1.5rem, 2.5vw, 2.75rem);
  text-align: center;
  box-shadow: 0 25px 60px rgba(16, 185, 129, 0.25);
}

.blog-cta__inner h2 {
  font-size: 1.6rem;
  margin-bottom: 0.75rem;
  color: #064e3b;
}

.blog-cta__inner p {
  color: #065f46;
  margin-bottom: 1.25rem;
}

.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.cta-buttons a {
  min-width: 160px;
  text-align: center;
}

.blog-cta__inner .blog-btn--primary {
  background: #047857;
  box-shadow: 0 15px 35px rgba(4, 120, 87, 0.25);
}

.toc-card {
  border: 1px solid var(--blog-border);
  border-radius: 1.4rem;
  padding: 1.25rem 1.5rem;
  background: #fff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.toc-card h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.8rem;
  color: #0f172a;
}

.toc-card ol {
  counter-reset: toc;
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc-card a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #1d4ed8;
  text-decoration: none;
  font-weight: 500;
}

.toc-card a::before {
  counter-increment: toc;
  content: counter(toc) ".";
  color: #475569;
  font-weight: 600;
}

.related-posts {
  border: 1px solid var(--blog-border);
  border-radius: 1.5rem;
  padding: 1.5rem;
  background: #fff;
  box-shadow: 0 25px 60px rgba(15, 23, 42, 0.08);
}

.related-posts h2 {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.related-posts__grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.related-post {
  border: 1px solid rgba(37, 99, 235, 0.15);
  border-radius: 1rem;
  padding: 1rem;
  background: var(--blog-soft-blue);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.related-post strong {
  font-size: 1rem;
}

.related-post p {
  font-size: 0.9rem;
  color: #475569;
  margin: 0;
  flex-grow: 1;
}

.related-post a {
  color: #1d4ed8;
  font-weight: 600;
  text-decoration: none;
}

.article-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.article-link {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(37, 99, 235, 0.3);
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.article-link:hover,
.article-link:focus-visible {
  border-color: #1d4ed8;
  background: rgba(37, 99, 235, 0.15);
  outline: none;
}

.hero-card {
  background: #fff;
  border: 1px solid var(--blog-border);
  border-radius: 2rem;
  padding: clamp(1.5rem, 2.5vw, 2.75rem);
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.09);
}

.hero-card .tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: var(--blog-soft-blue);
  color: var(--blog-blue);
  font-weight: 600;
  font-size: 0.85rem;
}

.hero-card .tag + .tag {
  margin-left: 0.45rem;
}

.grid-card,
.box {
  background: #fff;
  border: 1px solid var(--blog-border);
  border-radius: 1.4rem;
  padding: 1.25rem;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
}

.grid-card + .grid-card {
  margin-top: 1rem;
}

.box {
  background: #f8fafc;
  border-color: rgba(37, 99, 235, 0.25);
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--blog-border);
  border-radius: 1.3rem;
  background: #fff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
  margin-top: 1.25rem;
}

.table-scroll table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
}

.table-scroll th,
.table-scroll td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
}

.table-scroll th {
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
  font-weight: 600;
}

details {
  border: 1px solid var(--blog-border);
  border-radius: 1.2rem;
  background: #fff;
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.08);
  padding: 0;
  overflow: hidden;
}

details + details {
  margin-top: 1rem;
}

details summary {
  list-style: none;
  font-weight: 600;
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  cursor: pointer;
  width: 100%;
  padding: 1rem 1.25rem;
}

details[open] summary {
  border-bottom: 1px solid var(--blog-border);
}

details > *:not(summary) {
  padding: 0 1.25rem 1rem;
}

details summary::-webkit-details-marker {
  display: none;
}

details summary svg {
  transition: transform 0.2s ease;
}

details[open] summary svg {
  transform: rotate(180deg);
}

@media (max-width: 768px) {
  .blog-hero__inner,
  .post-grid-section,
  .blog-cta__inner {
    border-radius: 1.25rem;
  }
}

@media (max-width: 640px) {
  body.blog-page .blog-finder__input-wrap {
    padding: 0.65rem 0.85rem;
  }

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

  .post-card {
    padding: 1.25rem;
  }

  table {
    font-size: 0.9rem;
  }
}
