blockquote {
  color: #cccccc;
  border-left: 3px solid #aaa;
  padding-left: 1em;
  margin: 0;
}

hr {
  border-top: 3px dotted rgb(153, 153, 200);
}

p {
  font-family: "Roboto", sans-serif;
  line-height: 1.5;
  letter-spacing: 0.05em;
}

a {
  color: inherit;
  text-decoration: none; /* убираем стандартное подчёркивание */
  border-bottom: 2px solid #4ecca3; /* наше подчёркивание */
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

a:hover,
a:focus {
  background: #4ecca3; /* фон при наведении */
  color: #1e1e1e; /* тёмный текст для контраста */
  border-bottom: 2px solid #4ecca3; /* оставляем подчёркивание */
}

code {
  background: none; /* убираем фон */
  color: inherit; /* цвет текста как у окружения */
  padding: 0; /* убираем отступы */
  border-radius: 0; /* убираем скругления */
}

/* для WebKit-браузеров (Chrome, Edge, Safari) */
::-webkit-scrollbar {
  height: 6px; /* тоненькая горизонтальная */
}

::-webkit-scrollbar-thumb {
  background: #4ecca3; /* цвет бегунка */
  border-radius: 3px;
}

::-webkit-scrollbar-track {
  background: #393e46; /* фон полосы */
}

/* для Firefox */
* {
  scrollbar-width: thin; /* тонкий скроллбар */
  scrollbar-color: #4ecca3 #393e46; /* бегунок + фон */
}

/*.telegram-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: #008000;
    color: #fff !important;
    font-weight: 600;
    font-size: 15px;
    line-height: 1;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    transition: background-color 0.2s ease;
    border-bottom: none !important;
}*/

/*.telegram-button:hover {
    background-color: #006400;
}*/

/*.telegram-button svg {
    fill: #fff;
    width: 16px;
    height: 16px;
    vertical-align: middle;
}*/

/*.max-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: #0078ff;
    color: #fff !important;
    font-weight: 600;
    font-size: 15px;
    line-height: 1;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    transition: background-color 0.2s ease;
    border-bottom: none !important;
    margin-top: 8px;
}*/

/*.max-button:hover {
    background-color: #0060cc;
}*/

/*.max-button svg {
    fill: #fff;
    width: 16px;
    height: 16px;
    vertical-align: middle;
}*/

.subscribe-buttons {
  display: flex;
  gap: 10px;
  margin: 18px 0 10px 0;
  align-items: center; /* ← важно */
}

.max-button {
  margin-top: 5px;
}

.telegram-button,
.max-button {
  display: inline-flex;
  align-items: center;

  padding: 5px 16px;

  font-size: 14px;
  font-weight: 600;

  border-radius: 10px;

  text-decoration: none;
  /* border: 1px solid rgba(255, 255, 255, 0.06); */

  transition: all 0.15s ease;
}

.telegram-button {
  color: #c9d1d9 !important;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.max-button {
  color: #c9d1d9 !important;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.telegram-button:hover {
  background: rgba(255, 255, 255, 0.04);
}

.max-button:hover {
  background: rgba(255, 255, 255, 0.04);
}

.telegram-button svg,
.max-button svg {
  fill: white;
  width: 16px;
  height: 16px;
}

.post-content {
  background: #1b1f27;
  border-radius: 20px;
  padding: 0px 20px;
  margin-top: 40px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.posts {
  background: #1b1f27;
  border-radius: 20px;
  padding: 25px 30px 30px 50px;
  margin-top: 20px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.tag-cloud {
  background: #1b1f27;
  border-radius: 20px;
  padding: 25px 30px 30px 50px;
  margin-top: 20px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.post-tags {
  margin-top: 2rem;
}

.post-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

body {
  background: #0f1117;
}

blockquote {
  border-left: 3px solid #3ddc97;
  padding-left: 15px;
  color: #c9d1d9;
}

.list-item {
  background: #1b1f27;
  border-radius: 18px;
  padding: 0px 30px 30px;
  margin-top: 20px;
  margin-bottom: 20px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/*body {
    font-family: "Merriweather", Georgia, serif;
    font-size: 20px;
    line-height: 1.65;
}*/

/*code,
pre {
    font-family: "JetBrains Mono", monospace;
}*/

body {
  color: #c9d1d9; /* основной текст */
}

p {
  color: #c9d1d9;
}

.description {
  color: #c9d1d9; /* вторичный текст */
}

time {
  color: #8b949e;
}

img {
  border: none;
}

.post-media img,
.post-media video {
  width: 100%;
  /* max-height: 260px; */
  object-fit: cover;
  border-radius: 12px;
  margin-top: 0.8rem;
}

.expert-block {
  background: var(--theme);
  border: 1px solid var(--border);
  padding: 24px;
  border-radius: 12px;
  margin: 32px 0;
}

.expert-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.expert-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
}

.expert-meta {
  flex: 1;
}

.expert-name {
  font-weight: 700;
  font-size: 18px;
  color: var(--primary);
}

.expert-role {
  font-size: 14px;
  color: var(--secondary);
}

.expert-button {
  background: var(--primary);
  color: var(--theme);
  padding: 8px 14px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
  transition: 0.2s;
}

.expert-button:hover {
  opacity: 0.9;
}

.expert-content {
  margin-top: 16px;
  line-height: 1.6;
  color: var(--content);
}

.expert-block {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.expert-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
}

@media (max-width: 600px) {
  .expert-header {
    grid-template-columns: auto 1fr;
  }

  .expert-button {
    grid-column: span 2;
    text-align: center;
  }
}

.post-author {
  display: flex;
  align-items: center;
  gap: 10px;

  margin-top: 14px;
  padding-top: 10px;

  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.author-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;

  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.05);
}

.author-name {
  font-size: 0.9rem;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.post-author:hover .author-name {
  opacity: 1;
}

.post-author {
  display: flex;
  align-items: center;
  justify-content: space-between;

  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.author-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.author-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
}

.author-name {
  font-size: 0.9rem;
  opacity: 0.85;
}

.reading-time {
  font-size: 0.85rem;
  opacity: 0.6;
  white-space: nowrap;
}

.post-note {
  font-size: 0.8rem;
  color: #888;
  margin-top: 4px;
}

.post-author {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
}

.author-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.post-badges {
  display: flex;
  gap: 6px;
}

.badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;

  background: rgba(255, 255, 255, 0.06);
  color: #aab3c5;

  border: 1px solid rgba(255, 255, 255, 0.08);
  text-decoration: none;
}

@media (max-width: 600px) {
  .post-author {
    flex-wrap: wrap;
    gap: 6px;
  }

  .author-right {
    width: 100%;
    justify-content: flex-start;
  }
}

.mastodon-post {
  font-size: 0.8rem;
}

.post-media iframe {
  padding-top: 10px;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
}

.banner-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 30px 0;
}

.banner-grid img {
  width: 100%;
  height: auto;
  border-radius: 12px;
}

/* 📱 мобилки */
@media (max-width: 768px) {
  .banner-grid {
    grid-template-columns: 1fr;
  }
}

.banner-grid a {
  text-decoration: none;
  border: none !important;
  box-shadow: none !important;
}

.banner-grid a:hover {
  text-decoration: none;
  border: none !important;
  box-shadow: none !important;
}

.banner-grid img {
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

.banner-grid a {
  all: unset; /* 💥 полностью сбрасывает стили ссылки */
  display: block;
  cursor: pointer;
}

.banner-grid a:hover {
  all: unset;
  display: block;
  cursor: pointer;
}

.banner-grid img {
  width: 100%;
  border-radius: 12px;
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

.banner-grid a:hover img {
  opacity: 0.75;
  transform: scale(0.97);
}

.image-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

.image-row img {
  width: 100%;
  cursor: pointer;
  border-radius: 8px;
  transition: transform 0.2s ease;
}

.image-row img:hover {
  transform: scale(1.03);
}

#modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  justify-content: center;
  align-items: center;
}

#modal img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 10px;
}

.related-posts {
  margin-top: 3rem;
}

.related-container {
  padding: 1.4rem;

  border-radius: 18px;

  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.related-item {
  padding: 1rem 0;
}

.related-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.6rem;
}

.related-link {
  font-size: 1.05rem;
  font-weight: 600;

  text-decoration: none;
  border-bottom: 1px solid rgba(120, 255, 180, 0.7);

  transition: all 0.15s ease;
}

.related-link {
  font-size: 1.05rem;
  font-weight: 600;

  text-decoration: none;
  border-bottom: 1px solid rgba(120, 255, 180, 0.7);

  transition:
    background 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease;
}

.related-link:hover {
  background: #78ffb4;
  color: #08111b;

  border-color: #78ffb4;
}

.related-date {
  opacity: 0.65;
  font-size: 0.9rem;
  white-space: nowrap;
}

.related-description {
  margin-top: 0.65rem;

  color: #9aa4b2;

  line-height: 1.7;
  font-size: 0.95rem;
}

.related-link {
  font-size: 1.05rem;
  font-weight: 600;

  text-decoration: none;
  border-bottom: 1px solid rgba(120, 255, 180, 0.7);

  padding: 0 0.15rem;

  transition:
    background 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease;
}

.related-posts h1 {
  font-size: 2rem;
  line-height: 1.2;

  margin-bottom: 1.5rem;
}

.tg-comments-wrapper {
  margin-top: 2rem;
}

.tg-comments-inner {
  max-height: 850px;
  overflow: hidden;

  position: relative;

  transition: max-height 0.3s ease;
}

.tg-comments-inner::after {
  content: "";

  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;

  height: 120px;

  background: linear-gradient(
    to bottom,
    rgba(8, 17, 27, 0),
    rgba(8, 17, 27, 1)
  );

  pointer-events: none;
}

.tg-comments-inner.expanded {
  max-height: 9999px;
}

.tg-comments-inner.expanded::after {
  display: none;
}

.tg-comments-toggle {
  margin-top: 1rem;

  background: transparent;
  border: 1px solid rgba(120, 255, 180, 0.25);

  color: #78ffb4;

  padding: 0.7rem 1rem;
  border-radius: 12px;

  cursor: pointer;

  font: inherit;

  transition: all 0.15s ease;
}

.tg-comments-toggle:hover {
  background: #78ffb4;
  color: #08111b;
}

.tg-comments-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  margin-top: 1rem;

  padding: 0.7rem 1rem;

  border-radius: 12px;

  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);

  color: #c9d1d9;

  font: inherit;
  font-weight: 600;

  cursor: pointer;

  transition:
    background 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease,
    transform 0.15s ease;
}

.tg-comments-toggle:hover {
  background: #78ffb4;

  color: #08111b;

  border-color: #78ffb4;

  transform: translateY(-1px);
}

.post-meta-row {
  display: flex;
  align-items: center;
  gap: 1rem;

  flex-wrap: wrap;

  margin-top: 0.7rem;
}

.post-meta-row .post-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.post-content .title h1 {
  margin-top: 20px;
  margin-bottom: 1rem;
  font-family: Inter, system-ui, sans-serif;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.post-meta-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.4rem;
}

.post-embed-card {
  margin: 20px 0;
  padding: 16px 18px;

  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;

  background: rgba(255, 255, 255, 0.02);

  transition:
    background 0.2s ease,
    border-color 0.2s ease;
}

.post-embed-title {
  margin: 0 0 10px 0;

  font-size: 1.35rem;
  line-height: 1.25;
}

.post-embed-description {
  margin: 0 0 14px 0;

  opacity: 0.82;
  line-height: 1.55;
}

.post-embed-link {
  display: inline-block;

  font-size: 0.95rem;
  font-weight: 600;

  text-decoration: none;
}

.post-embed-title {
  margin: 0 0 10px 0;

  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.25;
}
