/* ==========================================================================
   Blog — extends .legal / .lg-* (css/legal.css) with the same design
   tokens from css/colors.css. Loaded after main.css + legal.css.
   ========================================================================== */

/* ---- Hero (blog index, full-page) -------------------------------------- */
.bl-hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 120px 24px 56px;
  background: var(--ink);
  isolation: isolate;
}
.bl-hero-grid {
  position: absolute;
  inset: 4%;
  pointer-events: none;
}
.bl-hero-grid span {
  position: absolute;
  background: var(--line-soft);
}
.bl-hero-grid span:nth-child(1) { left: 33.333%; top: 0; bottom: 0; width: 1px; }
.bl-hero-grid span:nth-child(2) { left: 66.666%; top: 0; bottom: 0; width: 1px; }
.bl-hero-grid span:nth-child(3) { top: 33.333%; left: 0; right: 0; height: 1px; }
.bl-hero-grid span:nth-child(4) { top: 66.666%; left: 0; right: 0; height: 1px; }

.bl-hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.bl-hero-title {
  font-size: clamp(40px, 7vw, 68px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.02;
  color: var(--paper);
  margin-bottom: 20px;
}
.bl-hero-lede {
  font-size: 18px;
  line-height: 1.6;
  color: var(--grey);
  max-width: 560px;
  margin: 0 auto;
}

.bl-hero-scroll {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--grey-dim);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  animation: lscrollbob 2.2s ease-in-out infinite;
}
.bl-hero-scroll:hover {
  color: var(--paper);
}

/* .bl-main sits directly under .bl-hero, which already clears the fixed
   nav itself — override .legal's own nav-clearance padding so the two
   sections don't double up on top spacing. */
main.legal.bl-main {
  padding-top: 64px;
}

/* ---- Post grid (blog index) ------------------------------------------- */
.bl-grid {
  margin-top: 8px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 640px) {
  .bl-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 26px;
  }
}
@media (min-width: 980px) {
  .bl-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
  }
}

.bl-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  background: rgba(var(--ink-rgb), 0.4);
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    transform 0.15s ease,
    box-shadow 0.15s ease;
}
/* Stretched link: the title link is the only real anchor in the card;
   this pseudo-element expands its hit area to cover the whole card so
   the entire card is clickable while keeping valid (non-nested) HTML. */
.bl-card-link::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
}
.bl-card:hover {
  transform: translateY(-4px);
}
.bl-card-cover {
  width: 100%;
  aspect-ratio: 16 / 10;
  display: block;
  background: var(--ink-raised);
  overflow: hidden;
  flex: none;
}
.bl-card-cover img,
.bl-card-cover svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.bl-card-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 1 1 0;
  min-width: 0;
  padding: 22px 22px 24px;
}
.bl-card-tag {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--safelight);
  margin-bottom: 10px;
}
.bl-card h2 {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.3;
  color: var(--paper);
  margin-bottom: 8px;
}
.bl-card h2 a {
  color: inherit;
}
.bl-card p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--grey);
  max-width: 62ch;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.bl-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  font-size: 12px;
  color: var(--grey-dim);
}
.bl-card-meta span:not(.bl-card-meta-dot) {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.bl-card-meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--grey-dim);
}
.bl-card-readmore {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 18px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--paper);
}
.bl-card:hover .bl-card-readmore {
  color: var(--safelight);
}

.bl-empty {
  margin-top: 28px;
  padding: 26px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius-l);
  color: var(--grey);
  font-size: 14.5px;
}

@media print {
  .bl-hero-grid,
  .bl-hero-scroll {
    display: none !important;
  }
  .bl-hero {
    min-height: auto;
    padding: 16px 0;
    background: none !important;
  }
}

/* ---- Article (single post) --------------------------------------------- */
.bl-article-head {
  /* Match the width of the rest of the article (cover image, CTA, related
     cards) instead of an arbitrary narrower cap — the old 760px value
     wrapped the title awkwardly while everything below it ran wider. */
  max-width: 100%;
}
.bl-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.bl-tag {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--safelight);
  padding: 5px 10px;
  border: 1px solid rgba(var(--safelight-rgb), 0.35);
  border-radius: var(--radius);
  background: rgba(var(--safelight-rgb), 0.07);
}

.bl-byline {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
}
.bl-byline-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--safelight);
  color: var(--white-color);
  font-size: 15px;
  font-weight: 700;
  flex: none;
  overflow: hidden;
}
.bl-byline-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.bl-byline-text {
  font-size: 13.5px;
  line-height: 1.4;
}
.bl-byline-name {
  color: var(--paper);
  font-weight: 600;
}
.bl-byline-meta {
  color: var(--grey-dim);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.bl-cover {
  margin: 28px 0 8px;
  border-radius: var(--radius-l);
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 16 / 8;
  background: var(--ink-raised);
}
.bl-cover img,
.bl-cover svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bl-article-body {
  /* Match the cover image and header width instead of an independent
     72ch cap — that left the body text column (~727px) narrower than
     the image and title above it (880px). */
  max-width: 100%;
  margin-top: 36px;
}
.bl-article-body h2 {
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.3;
  color: var(--paper);
  margin: 40px 0 14px;
}
.bl-article-body h2:first-child {
  margin-top: 0;
}
.bl-article-body h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--paper);
  margin: 26px 0 10px;
}
.bl-article-body p,
.bl-article-body li {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-soft);
}
.bl-article-body > * + * {
  margin-top: 16px;
}
.bl-article-body ul,
.bl-article-body ol {
  margin: 14px 0 0;
  padding-left: 1.3em;
}
.bl-article-body ul {
  list-style: disc;
}
.bl-article-body ol {
  list-style: decimal;
}
.bl-article-body li + li {
  margin-top: 8px;
}
.bl-article-body li::marker {
  color: var(--grey-dim);
}
.bl-article-body strong {
  color: var(--paper);
  font-weight: 600;
}
.bl-article-body a:not(.btn) {
  color: var(--paper);
  text-decoration: none;
}
.bl-article-body a:not(.btn):hover {
  text-decoration-color: var(--safelight);
  color: var(--safelight);
}
.bl-article-body blockquote {
  margin: 20px 0;
  padding: 4px 0 4px 18px;
  border-left: 3px solid var(--safelight);
  font-size: 17px;
  line-height: 1.6;
  color: var(--paper);
  font-weight: 600;
}

.bl-note {
  margin-top: 8px;
  padding: 16px 18px;
  border-left: 3px solid var(--safelight);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: rgba(var(--safelight-rgb), 0.07);
}
.bl-note p {
  font-size: 14.5px;
  line-height: 1.65;
}
.bl-note strong:first-child {
  display: block;
  margin-bottom: 2px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--safelight);
}

.bl-cta {
  margin-top: 44px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  background: rgba(var(--ink-rgb), 0.4);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.bl-cta h3 {
  font-size: 19px;
  font-weight: 800;
  color: var(--paper);
}
.bl-cta p {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--grey);
}
.bl-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.bl-cta-actions .btn {
  width: auto;
  padding: 10px 18px;
}

.bl-share-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}
.bl-share-row .lg-backtop {
  margin-top: 0;
}
.bl-share {
  display: flex;
  align-items: center;
  gap: 10px;
}
.bl-share-label {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--grey-dim);
}
.bl-share-btn {
  width: 34px;
  height: 34px;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  color: var(--grey);
  background: transparent;
  font-size: 14px;
  cursor: pointer;
  transition:
    color 0.15s ease,
    border-color 0.15s ease;
}
.bl-share-btn:hover {
  color: var(--safelight);
  border-color: var(--safelight);
}

.bl-related {
  margin-top: 52px;
  padding-top: 36px;
  border-top: 1px solid var(--line);
  max-width: none;
}
.bl-related-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--safelight);
  margin-bottom: 16px;
}

/* Every card uses the same design (see .bl-card above), laid out in a
   responsive grid (see .bl-grid above). */
