.telegram-heading {
  padding-block: 38px 28px;
  overflow-wrap: anywhere;
}

.telegram-heading h1 {
  font-size: clamp(2rem, 4.2vw, 3.9rem);
  line-height: 1.08;
  margin: 0;
  max-width: 25ch;
}

.telegram-heading p {
  color: var(--muted);
  margin: 12px 0 0;
}

.telegram-list-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.telegram-list-heading .button {
  flex-shrink: 0;
}

.telegram-list {
  padding-bottom: 48px;
}

.telegram-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 5px;
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 24px;
  margin-bottom: 12px;
  padding: clamp(14px, 2.3vw, 24px);
}

.telegram-card time {
  color: var(--muted);
  font-size: .83rem;
}

.telegram-card h2 {
  font-size: clamp(1.15rem, 2.3vw, 1.55rem);
  line-height: 1.25;
  margin: 6px 0 0;
  overflow-wrap: anywhere;
}

.telegram-card h2 a:hover,
.telegram-neighbors a:hover {
  color: var(--orange);
  text-decoration: underline;
  text-underline-offset: .17em;
}

.telegram-card p {
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.57;
  margin: 8px 0 0;
  max-width: 74ch;
  overflow-wrap: anywhere;
}

.telegram-card-image {
  flex: 0 0 clamp(88px, 17vw, 176px);
  aspect-ratio: 4 / 3;
}

.telegram-card-image img {
  background: var(--soft);
  border-radius: 3px;
  display: block;
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.telegram-pagination,
.telegram-pagination ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.telegram-pagination {
  margin-top: 22px;
}

.telegram-pagination ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.telegram-pagination a,
.telegram-pagination [aria-current] {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--ink);
  display: inline-grid;
  min-width: 36px;
  min-height: 39px;
  padding: 0 8px;
  place-items: center;
  font-size: .85rem;
}

.telegram-pagination a:hover,
.telegram-pagination [aria-current] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.telegram-post {
  padding-bottom: 44px;
}

.telegram-post .telegram-heading,
.telegram-content,
.telegram-neighbors {
  max-width: 800px;
  margin-inline: auto;
}

.telegram-content {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: clamp(16px, 3.5vw, 34px);
  font-size: clamp(.98rem, 1.8vw, 1.08rem);
  line-height: 1.64;
  overflow-wrap: anywhere;
}

.telegram-caption + .telegram-caption,
.telegram-poll,
.telegram-preview {
  margin-top: 1em;
}

.telegram-caption a,
.telegram-preview a,
.telegram-back {
  color: var(--orange);
  text-decoration: underline;
  text-underline-offset: .16em;
}

.telegram-caption blockquote {
  background: var(--paper);
  border-left: 3px solid var(--orange);
  margin-inline: 0;
  padding: 8px 14px;
}

.telegram-caption pre {
  white-space: pre-wrap;
}

.telegram-media {
  display: grid;
  gap: 8px;
  margin-bottom: 20px;
}

.telegram-media img,
.telegram-media video,
.telegram-media audio {
  display: block;
  max-width: 100%;
}

.telegram-media img,
.telegram-media video {
  max-height: min(660px, 75vh);
  object-fit: contain;
  border-radius: 3px;
}

.telegram-album {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.telegram-post-actions,
.telegram-neighbors {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-top: 24px;
}

.telegram-neighbors {
  justify-content: space-between;
  color: var(--orange);
  font-size: .91rem;
}

@media (max-width: 560px) {
  .telegram-heading { padding-block: 23px 18px; }
  .telegram-list-heading { flex-wrap: wrap; align-items: start; gap: 12px; }
  .telegram-card { gap: 12px; }
  .telegram-card p { font-size: .85rem; }
}

@media (max-width: 380px) {
  .telegram-card-image { flex-basis: 66px; }
  .telegram-card { padding: 12px; }
}
