.blog-page {
  min-height: 100vh;
  background: var(--ids__background);
  color: var(--ids__text);
}

.blog-main {
  width: min(calc(100% - 40px), 980px);
  margin-inline: auto;
  padding: 72px 0 120px;
}

.blog-header {
  padding: 0;
}

.blog-header h1 {
  max-width: 9em;
  margin: 0;
  font-size: 64px;
  line-height: 0.96;
  font-weight: 400;
  letter-spacing: 0;
}

.blog-telegram {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  justify-items: start;
  width: max-content;
  max-width: 100%;
  margin-top: 24px;
  padding: 0;
  background: transparent;
  font-size: 14px;
  line-height: 1.2;
}

.blog-page aside.blog-telegram {
  margin-bottom: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
}

.blog-telegram p {
  margin: 0;
  padding: 0.3em 0.5em;
  border-radius: var(--ids__radius-s);
  background: var(--ids__surface);
  color: var(--ids__text-caption);
  white-space: nowrap;
}

.blog-telegram a {
  display: inline-block;
  justify-self: start;
  padding: 0.3em 0.5em;
  border-radius: var(--ids__radius-s);
  background: var(--ids__surface);
  white-space: nowrap;
}

.blog-thoughts {
  max-width: 42em;
  margin-top: 64px;
}

.blog-entry {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 24px;
  align-items: baseline;
}

.blog-entry + ids-footnote + .blog-entry {
  margin-top: 24px;
}

.blog-entry > * {
  min-width: 0;
}

.blog-entry time {
  color: var(--ids__text-caption);
  font-size: 14px;
  line-height: 1.25;
}

.blog-page h2.blog-thought-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
  font-weight: 400;
  letter-spacing: 0;
}

.blog-thought-title ids-footnote-link {
  position: relative;
  display: inline-block;
  color: var(--ids__link);
}

.blog-thought-title ids-footnote-link:hover {
  color: var(--ids__hover);
}

.blog-thought-title ids-footnote-link label {
  position: relative;
  display: block;
}

.blog-thought-title .ids-footnote-link__button {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  opacity: 0;
  transform: none;
}

.blog-page ids-footnote:has(aside.ids-footnote) {
  position: fixed;
  z-index: 140;
  inset: 0;
  display: grid;
  padding: 20px;
  place-items: center;
  background: color-mix(in srgb, var(--ids__surface) 78%, transparent);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.blog-page .ids-footnote-wrap {
  position: static;
  left: auto;
  top: auto !important;
  width: min(100%, 640px);
}

.blog-page aside.ids-footnote {
  position: relative;
  inset: auto;
  width: 100%;
  max-height: calc(100dvh - 40px);
  padding: 0;
  overflow: auto;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-size: 16px;
}

.blog-page aside.ids-footnote p {
  font-size: 20px;
  line-height: 1.35;
}

.blog-page aside.ids-footnote p:first-child::before {
  display: none;
  content: none;
}

.blog-page aside.ids-footnote .ids-footnote__close {
  position: sticky;
  z-index: 2;
  top: 0;
  display: block;
  width: auto;
  min-height: 0;
  margin: 0 0 1.25em auto;
  padding: 0.3em 0.5em;
  border: 0;
  background: var(--ids__surface);
  color: var(--ids__link);
  font: inherit;
  font-size: 16px;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
}

.blog-page aside.ids-footnote .ids-footnote__close:hover {
  color: var(--ids__hover);
}

.blog-page aside.ids-footnote .ids-footnote__close svg {
  display: none;
}

html:has(.blog-page aside.ids-footnote) {
  overflow: hidden;
}

@media (width < 900px) {
  .blog-page .ids__navbar {
    position: static;
    width: max-content;
    max-width: 100%;
    margin: 0;
    padding: 14px 20px 0;
  }

  .blog-main {
    padding-top: 40px;
  }

  .blog-header h1 {
    font-size: 48px;
  }

  .blog-telegram {
    margin-top: 18px;
    font-size: 11px;
  }

  .blog-thoughts {
    margin-top: 48px;
  }

  .blog-entry {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .blog-entry time {
    font-size: 13px;
  }

  .blog-page h2.blog-thought-title {
    font-size: 16px;
  }

  .blog-page aside.ids-footnote p {
    font-size: 16px;
  }
}

@media (width < 480px) {
  .blog-header h1 {
    font-size: 40px;
  }
}

@media (width >= 360px) and (width < 900px) {
  .blog-telegram {
    font-size: 13px;
  }
}

@media (width >= 900px) {
  .blog-page .ids__navbar ul li {
    font-size: max(14px, 0.8em);
  }
}
