/*
 * A post's page (Modules\Blog\Post), the owner's design, on blog.css: the way back, the
 * category, the title (its second line orange), the excerpt, the team with the date and
 * the reading time, the share buttons, the cover; beside it the newsletter under the
 * gift, the related posts, the categories (blog.css) and the gifts; "Contents" before the
 * first section (Headings). The post itself: post-content.css.
 *
 * Concentric corners (DESIGN.md §4.5): the boxes R 28 (blog.css); the gifts' button is a
 * pill. Contrast: the category label's colours carry white words at ≥ 4.5:1; the title's
 * orange line #e06c00 is large text (≥ 3:1 on the page's #f8f9fc); the gifts' button and
 * the newsletter's are 19 px / 800, white on #e06c00 (3.33:1, large text).
 */

/* The side is as long as the post: it scrolls with it (no sticking); a little wider. */
.hs-post-page .hs-post-page__aside {
  position: static;
}

@media (min-width: 1280px) {
  .hs-post-page .hs-blog__layout {
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 40px;
  }
}

.hs-post {
  min-width: 0;
}

/* ─── Head ─────────────────────────────────────────────────────────────── */

.hs-post__cat {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  max-width: 100%;
  margin-top: 18px;
  padding: 5px 12px 5px 9px;
  border-radius: var(--hs-r-pill, 999px);
  background: var(--hs-cat, var(--hs-orange-700, #c2410c));
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
  text-decoration: none;
}

.hs-post__cat .hs-icon {
  flex: none;
}

.hs-post__cat span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hs-post__cat:hover,
.hs-post__cat:focus {
  color: #fff;
  text-decoration: underline;
}

.hs-post__cat:focus-visible {
  outline: 3px solid var(--hs-focus, #1f2547);
  outline-offset: 2px;
}

.hs-post__title {
  display: flex;
  flex-direction: column;
  margin-top: 14px;
  color: var(--hs-ink, #1f2547);
  font-size: clamp(28px, 3.1vw, 42px);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.hs-post__accent {
  color: var(--hs-orange-600, #e06c00);
}

.hs-post__lead {
  max-width: 62ch;
  margin-top: 14px;
  color: var(--hs-muted, #5b6180);
  font-size: 17px;
  line-height: 1.6;
}

.hs-post__bar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 20px;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
}

.hs-post__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: center;
  color: var(--hs-muted, #5b6180);
  font-size: 14px;
  font-weight: 600;
}

.hs-post__author {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: var(--hs-ink, #1f2547);
  font-weight: 700;
}

.hs-post__logo {
  width: 24px;
  height: 24px;
}

.hs-post__fact {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  white-space: nowrap;
}

.hs-post__fact .hs-icon {
  flex: none;
}

/* Share: round buttons, 44 px (a finger's). */
.hs-post__share {
  display: flex;
  gap: 8px;
  align-items: center;
}

.hs-blog .hs-post__share-link,
.hs-blog .hs-post__share-link:is(:hover, :focus, :active) {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--hs-surface, #fff);
  box-shadow:
    0 0 0 1px rgb(31 37 71 / 10%),
    0 6px 14px -10px rgb(31 37 71 / 45%);
  color: var(--hs-ink, #1f2547);
  cursor: pointer;
  text-decoration: none;
  transition:
    color 0.15s ease,
    background-color 0.15s ease,
    box-shadow 0.15s ease;
}

.hs-blog .hs-post__share-link[hidden] {
  display: none;
}

.hs-blog .hs-post__share-link:hover {
  background: #eef5ff;
  box-shadow:
    0 0 0 1px rgb(0 112 224 / 35%),
    0 6px 14px -10px rgb(31 37 71 / 45%);
  color: var(--hs-blue-600, #0070e0);
}

.hs-blog .hs-post__share-link.is-copied {
  background: #ecfdf3;
  box-shadow: 0 0 0 1px rgb(21 128 61 / 40%);
  color: #15803d;
}

.hs-blog .hs-post__share-link:focus-visible {
  outline: 3px solid var(--hs-focus, #1f2547);
  outline-offset: 2px;
}

/* The cover: wide, rounded (it stands on its own: R 20). */
.hs-post__cover {
  overflow: hidden;
  aspect-ratio: 16 / 10;
  margin: 24px 0 0;
  border-radius: calc(var(--hs-radius-lg, 20px) * var(--hs-corner-scale, 1));
  corner-shape: var(--hs-corner-shape, round);
  background: #eef0f6;
}

@media (min-width: 768px) {
  .hs-post__cover {
    aspect-ratio: 2 / 1;
  }
}

.hs-post__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hs-post__content {
  margin-top: 28px;
}

.hs-post__pages {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
  font-weight: 700;
}

/* ─── The side ─────────────────────────────────────────────────────────── */

/* A box's title with a link on its right ("See all"). */
.hs-blog-box__head {
  display: flex;
  gap: 12px;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
}

.hs-blog-box__head .hs-blog-box__title {
  margin: 0;
}

.hs-blog-box__more {
  display: inline-flex;
  flex: none;
  gap: 4px;
  align-items: center;
  color: var(--hs-blue-600, #0070e0);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.hs-blog-box__more:hover {
  color: var(--hs-blue-700, #185c9f);
  text-decoration: underline;
}

.hs-blog-box__more:focus-visible {
  outline: 3px solid var(--hs-focus, #1f2547);
  outline-offset: 2px;
}

/*
 * The newsletter under the gift: centred; the form in one line (the newsletter's pill,
 * its button inside) where the box has room, stacked where it has not.
 */
.hs-blog-news--gift {
  container: hs-news / inline-size;
  padding-top: 16px;
  background:
    radial-gradient(circle at 18% 22%, rgb(255 205 220 / 70%), transparent 42%),
    radial-gradient(circle at 85% 30%, rgb(214 222 255 / 75%), transparent 45%),
    linear-gradient(180deg, #fff5f8, #f8f5ff 60%, #fff);
  text-align: center;
}

.hs-blog-news__art {
  display: block;
  width: 150px;
  height: auto;
  margin: 0 auto 4px;
  filter: drop-shadow(0 14px 18px rgb(225 29 72 / 18%));
}

.hs-blog-news--gift .hs-blog-news__title {
  font-size: 22px;
  text-wrap: balance;
}

.hs-blog-news--gift .hs-blog-news__text {
  margin: 8px auto 18px;
  font-size: 14.5px;
  text-wrap: pretty;
}

.hs-blog-news--gift .hs-newsletter__consent {
  text-align: left;
}

@container hs-news (max-width: 299px) {
  .hs-blog-news--gift .hs-newsletter__row,
  .hs-blog-news--gift .hs-newsletter__row:hover,
  .hs-blog-news--gift .hs-newsletter__row:focus-within {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    height: auto;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
  }

  .hs-blog-news--gift .hs-newsletter .hs-newsletter__email {
    flex: none;
    width: 100%;
    height: 50px;
    padding: 0 18px;
    border: 1px solid var(--hs-border-strong, #8a90ab);
    border-radius: var(--hs-r-pill, 999px);
    background: var(--hs-surface, #fff);
  }

  .hs-blog-news--gift .hs-newsletter .hs-newsletter__email:focus {
    border-color: var(--hs-blue-600, #0070e0);
    box-shadow: inset 0 0 0 1px var(--hs-blue-600, #0070e0);
  }

  .hs-blog-news--gift .hs-newsletter .hs-newsletter__submit {
    justify-content: center;
    width: 100%;
  }
}

/* Related posts: a landscape picture, the title (up to three lines), the date. */
.hs-blog-related__list {
  display: grid;
  gap: 14px;
}

.hs-blog-related__link {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  color: var(--hs-ink, #1f2547);
  text-decoration: none;
}

.hs-blog-related__image {
  display: grid;
  place-items: center;
  width: 96px;
  height: 68px;
  border-radius: calc(var(--hs-radius-md, 14px) * var(--hs-corner-scale, 1));
  corner-shape: var(--hs-corner-shape, round);
  background: #f1f3f8;
  object-fit: cover;
  color: var(--hs-orange, #f09820);
}

.hs-blog-related__text {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.hs-blog-related__name {
  display: -webkit-box;
  overflow: hidden;
  font-size: 14.5px;
  font-weight: 800;
  line-height: 1.35;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.hs-blog-related__link:hover .hs-blog-related__name {
  color: var(--hs-blue-700, #185c9f);
  text-decoration: underline;
}

.hs-blog-related__link:focus-visible {
  outline: 3px solid var(--hs-focus, #1f2547);
  outline-offset: 2px;
}

.hs-blog-related__date {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  color: var(--hs-muted, #5b6180);
  font-size: 12.5px;
  font-weight: 600;
}

/* The gifts: the owner's drawing, the words, the way to the shop. */
.hs-blog-promo {
  overflow: hidden;
  padding-top: 8px;
  background:
    radial-gradient(circle at 20% 18%, rgb(214 222 255 / 80%), transparent 40%),
    radial-gradient(circle at 82% 22%, rgb(255 210 224 / 70%), transparent 42%),
    linear-gradient(180deg, #f6f3ff, #fff6f9 55%, #fff);
  text-align: center;
}

.hs-blog-promo__art {
  display: block;
  width: min(100%, 250px);
  height: auto;
  margin: 0 auto;
}

.hs-blog-promo__title {
  margin-top: 4px;
  color: var(--hs-ink, #1f2547);
  font-size: 22px;
  font-weight: 900;
  line-height: 1.18;
  text-wrap: balance;
}

.hs-blog-promo__text {
  max-width: 30ch;
  margin: 8px auto 18px;
  color: var(--hs-muted, #5b6180);
  font-size: 14.5px;
  line-height: 1.5;
  text-wrap: pretty;
}

.hs-blog-promo__button {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 24px;
  border-radius: var(--hs-r-pill, 999px);
  background: var(--hs-orange-600, #e06c00);
  box-shadow: 0 14px 26px -16px rgb(224 108 0 / 80%);
  color: #fff;
  font-size: 19px;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.hs-blog-promo__button:hover,
.hs-blog-promo__button:focus {
  background: var(--hs-orange-700, #c2410c);
  color: #fff;
}

.hs-blog-promo__button:focus-visible {
  outline: 3px solid var(--hs-focus, #1f2547);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: no-preference) {
  .hs-blog-promo__button .hs-icon,
  .hs-blog-box__more .hs-icon {
    transition: transform 0.2s ease;
  }

  .hs-blog-promo__button:hover .hs-icon,
  .hs-blog-box__more:hover .hs-icon {
    transform: translateX(3px);
  }
}

/* ─── Contents (Headings) ──────────────────────────────────────────────── */

/*
 * Before the first section: the sections, numbered as their headings (blue circles; a
 * "Without number" one gets a dot). The box R 20, its rows 12 px in: R 8 (concentric).
 * Its room is the post's box gap (post-content.css).
 */
.hs-post-toc {
  padding: 16px 12px 12px;
  border-radius: calc(var(--hs-radius-lg, 20px) * var(--hs-corner-scale, 1));
  corner-shape: var(--hs-corner-shape, round);
  background: #f4f7ff;
  box-shadow: inset 0 0 0 1px rgb(0 112 224 / 12%);
}

.hs-post-toc__title {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0 8px 6px;
  color: var(--hs-ink, #1f2547);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.3;
}

.hs-post-toc__title .hs-icon {
  color: var(--hs-blue-600, #0070e0);
}

.hs-blog .hs-post-toc__list {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hs-post-toc__link {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 44px;
  padding: 6px 8px;
  border-radius: max(calc((var(--hs-radius-lg, 20px) - 12px) * var(--hs-corner-scale, 1)), var(--hs-r-min, 4px));
  corner-shape: var(--hs-corner-shape, round);
  color: var(--hs-ink, #1f2547);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.hs-post-toc__link:hover {
  background: #e6eeff;
  color: var(--hs-blue-700, #185c9f);
}

.hs-post-toc__link:focus-visible {
  outline: 3px solid var(--hs-focus, #1f2547);
  outline-offset: 0;
}

.hs-post-toc__n {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--hs-blue-600, #0070e0);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
}

.hs-post-toc__n--plain {
  background: none;
}

.hs-post-toc__n--plain::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--hs-blue-600, #0070e0);
  content: '';
}

@media (prefers-reduced-motion: no-preference) {
  html:has(.hs-post-toc) {
    scroll-behavior: smooth;
  }
}
