/* Blog hub (blog.html only). Generated by build-blog-hub.js. Each card and topic sets --t, its topic colour; colour
   marks things (bars, dots, icons) while text stays in the ink colour, so contrast never depends on the topic. */

/* brand colours (this page does not load tools.css, where they are defined for other pages) */
.bh {
  --dl-purple: #a349a4;
  --dl-purple-dark: #7d3480;
  --dl-ink: #303d4e;
  --dl-muted: #5f6b7a;
  --dl-line: #e3e6ea;
}

/* ---- hero (the selector matches the weight of style.css's section spacing rule, and wins by coming later) */
main.page-sections.bh > section.bh-hero {
  position: relative;
  padding: 128px 0 56px;
  background:
    radial-gradient(620px 340px at 92% 12%, rgba(163, 73, 164, 0.16), transparent 70%),
    radial-gradient(540px 320px at 0% 100%, rgba(47, 125, 140, 0.1), transparent 70%),
    linear-gradient(180deg, #fbf7fb, #fff);
}

.bh-crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  font-size: 14px;
  color: var(--dl-muted);
}

.bh-crumbs li + li::before {
  content: "/";
  margin-right: 6px;
  color: #b9bfc8;
}

.bh-crumbs a {
  color: var(--dl-purple-dark);
}

.bh-hero h1 {
  margin: 0 0 14px;
  font-family: "Montserrat", sans-serif;
  font-size: clamp(34px, 4.6vw, 54px);
  font-weight: 800;
  line-height: 1.1;
  color: var(--dl-ink);
}

.bh-lead-text {
  max-width: 560px;
  margin: 0 0 24px;
  font-size: var(--fs-lead);
  line-height: 1.6;
  color: var(--dl-muted);
}

.bh-search {
  position: relative;
  max-width: 520px;
}

.bh-search i {
  position: absolute;
  top: 50%;
  left: 20px;
  transform: translateY(-50%);
  color: var(--dl-purple);
  font-size: 17px;
  pointer-events: none;
}

.bh-search input {
  width: 100%;
  padding: 15px 20px 15px 50px;
  border: 1px solid var(--dl-line);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(48, 61, 78, 0.08);
  font-size: 16px;
  color: var(--dl-ink);
}

.bh-search input:focus {
  outline: 3px solid rgba(163, 73, 164, 0.35);
  border-color: var(--dl-purple);
}

/* ---- topic tiles: the filters */
.bh-topics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.bh-topic {
  --t: var(--dl-purple);
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 10px 14px;
  border: 1px solid var(--dl-line);
  border-radius: 14px;
  background: #fff;
  color: var(--dl-ink);
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.bh-topic:first-child {
  grid-column: span 2;
}

.bh-topic i {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--t) 13%, #fff);
  color: var(--t);
  font-size: 17px;
}

.bh-topic-name {
  flex: 1;
  font-size: 15px;
  line-height: 1.25;
}

.bh-topic-count {
  min-width: 30px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #f1f3f6;
  font-size: 13px;
  text-align: center;
  color: var(--dl-muted);
}

.bh-topic:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--t) 45%, #fff);
  box-shadow: 0 10px 24px rgba(48, 61, 78, 0.1);
  color: var(--dl-ink);
}

.bh-topic.is-active {
  border-color: var(--t);
  background: var(--t);
  color: #fff;
  box-shadow: 0 10px 24px color-mix(in srgb, var(--t) 35%, transparent);
}

.bh-topic.is-active i {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.bh-topic.is-active .bh-topic-count {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.bh-topic:focus-visible,
.bh-empty a:focus-visible {
  outline: 3px solid var(--dl-purple);
  outline-offset: 3px;
}

/* ---- the list */
main.page-sections.bh > section.bh-list {
  padding: 44px 0 72px;
  scroll-margin-top: 90px;
}

.bh-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 16px;
  margin-bottom: 22px;
}

.bh-bar h2 {
  margin: 0;
  font-family: "Montserrat", sans-serif;
  font-size: clamp(24px, 2.6vw, 30px);
  font-weight: 800;
  color: var(--dl-ink);
}

.bh-count {
  margin: 0;
  font-size: 15px;
  color: var(--dl-muted);
}

/* the topic colour across the top */

/* the newest card leads: two columns wide, picture beside the text */
.bh-lead {
  grid-column: span 2;
}

.bh-lead .bh-card-link {
  flex-direction: row;
}

.bh-lead .bh-art {
  flex: 0 0 42%;
  aspect-ratio: auto;
  min-height: 300px;
}

.bh-lead .bh-body {
  justify-content: center;
  padding: 28px 30px;
}

.bh-lead .bh-title {
  font-size: clamp(22px, 2.2vw, 28px);
}

.bh-lead .bh-excerpt {
  flex: 0 1 auto;
  font-size: 16px;
}

.bh-empty {
  margin: 30px 0 0;
  padding: 28px;
  border: 1px dashed var(--dl-line);
  border-radius: 16px;
  text-align: center;
  color: var(--dl-muted);
}

/* ---- sizes */

@media (max-width: 991px) {
  main.page-sections.bh > section.bh-hero {
    padding: 112px 0 40px;
  }
}

@media (max-width: 767px) {

  .bh-lead {
    grid-column: auto;
  }

  .bh-lead .bh-card-link {
    flex-direction: column;
  }

  .bh-lead .bh-art {
    flex: none;
    aspect-ratio: 16 / 10;
    min-height: 0;
  }

  .bh-lead .bh-body {
    padding: 16px 20px 18px;
  }
}

@media (max-width: 575px) {
  main.page-sections.bh > section.bh-hero {
    padding: 100px 0 32px;
  }

  .bh-topic {
    gap: 9px;
    min-height: 52px;
    padding: 8px 10px;
  }

  .bh-topic i {
    width: 30px;
    height: 30px;
    font-size: 15px;
  }

  .bh-topic-name {
    font-size: 13.5px;
  }

  .bh-topic-count {
    min-width: 26px;
    padding: 2px 7px;
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bh-topic {
    transition: none;
  }
}
