/* Copyright (c) 2026 Mohammad Najm. All rights reserved. */
/*
 * The blog's own pages, on top of watchlog.io's stylesheet (site.css, generated): the header,
 * footer, buttons, sections, frames, cards and call to action are the site's classes; this
 * adds the list, the post and Ghost's editor cards. Colours come only from the design tokens
 * (var(--…), tints with color-mix), as on the site. Selectors on Ghost's cards start with
 * .gh-content so they win over Ghost's own card styles, which load after this file.
 */

.bp-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- The heading of a list (home, tag, author) ---------- */
.bp-head {
  position: relative;
  isolation: isolate;
}
section.s.bp-head {
  padding-block: clamp(36px, 6vw, 72px) 0;
}
.bp-head::before {
  position: absolute;
  z-index: -1;
  left: 0;
  top: 0;
  width: min(760px, 100%);
  height: 360px;
  background: radial-gradient(closest-side, var(--tint-10), transparent);
  content: '';
  pointer-events: none;
}
.bp-h1 {
  max-width: 22ch;
  margin: 12px 0 14px;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.bp-head .bp-sub {
  max-width: 62ch;
  margin: 0;
}
.bp-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 8px;
  margin: 0 0 6px;
  color: var(--text-muted);
}
.bp-crumbs a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text-soft);
}
.bp-crumbs a:hover {
  color: var(--text);
}

/* The topics and search. On a phone the topics scroll sideways in one row. */
.bp-filter {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 28px;
}
.bp-pills {
  flex: 1;
  min-width: 0;
}
.bp-pills ul,
.bp-post-tags ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.bp-pill,
.bp-search {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface-1);
  font-size: 14px;
  color: var(--text-soft);
  white-space: nowrap;
  cursor: pointer;
}
.bp-pill:hover,
.bp-search:hover {
  border-color: var(--text-muted);
  color: var(--text);
}
.bp-pill[aria-current='page'] {
  border-color: var(--primary-border);
  background: var(--tint-14);
  color: var(--text);
}
.bp-search {
  flex: none;
}
@media (max-width: 640px) {
  .bp-pills ul {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    margin-inline: -20px;
    padding-inline: 20px;
    /* The row fades at the right edge: there is more to scroll to. */
    mask-image: linear-gradient(90deg, var(--bg) 85%, transparent);
  }
  .bp-pills ul::-webkit-scrollbar {
    display: none;
  }
  .bp-search span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .bp-search {
    width: 44px;
    padding: 0;
    justify-content: center;
  }
}

/* ---------- The list ---------- */
section.s.bp-list {
  padding-block: 36px 88px;
}
.s .bp-list-h {
  max-width: none;
  margin: 0 0 20px;
  font-size: 22px;
  letter-spacing: -0.01em;
}
.bp-tag,
.bp-new {
  font-family: var(--font-code);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
}
.bp-new {
  color: var(--text-muted);
}
.bp-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
}

/* A picture's frame in the list: 16:10, the picture cropped from its top left. */
.bp-lead-media,
.bp-card-media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--surface-2);
}
.bp-lead-media img,
.bp-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left top;
}

/* The newest post, large: picture and text side by side from 1024 px. */
.bp-lead {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px 44px;
  align-items: center;
  margin-bottom: 64px;
}
@media (min-width: 1024px) {
  .bp-lead {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  }
}
.bp-lead-media {
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 40px 120px color-mix(in srgb, var(--bg) 85%, transparent);
}
.bp-lead-eyebrow {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 0;
}
.s .bp-lead-title {
  max-width: none;
  margin: 12px 0 14px;
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.12;
  letter-spacing: -0.02em;
}
.bp-lead-excerpt {
  margin: 0 0 18px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-muted);
}

/* The cards: the site's dark panel, three across at 1024 px, two at 700, one on a phone. */
.bp-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}
@media (min-width: 700px) {
  .bp-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1024px) {
  .bp-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.bp-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-1);
  transition: border-color 0.2s;
}
.bp-card:hover {
  border-color: var(--border-strong);
}
.bp-card-media {
  border-bottom: 1px solid var(--border);
}
.bp-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 20px 22px 22px;
}
.bp-card-title {
  font-size: 19px;
  line-height: 1.3;
  letter-spacing: -0.005em;
}
.bp-card-excerpt {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-muted);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}
.bp-card .bp-meta {
  margin-top: auto;
  padding-top: 4px;
}
/* The whole card (and the large post) follows its title's link; the focus ring frames it. */
.bp-card-title a::after,
.bp-lead-title a::after {
  position: absolute;
  inset: 0;
  content: '';
}
.bp-card-title a:focus-visible,
.bp-lead-title a:focus-visible {
  outline: none;
}
.bp-card:has(.bp-card-title a:focus-visible) {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}
.bp-lead:has(.bp-lead-title a:focus-visible) .bp-lead-media {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}
.bp-card:hover .bp-card-title a,
.bp-lead:hover .bp-lead-title a {
  text-decoration: underline;
  text-decoration-color: var(--primary-border);
  text-underline-offset: 4px;
}

/* No picture: the site's grid and green glow, the logo and the post's topic. */
.bp-ph {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background:
    radial-gradient(closest-side at 50% 42%, var(--tint-16), transparent 75%), var(--surface-2);
}
.bp-ph-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-position: center;
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(closest-side, var(--bg), transparent);
  mask-image: radial-gradient(closest-side, var(--bg), transparent);
}
.bp-ph .bp-ph-logo {
  position: relative;
  object-fit: contain;
  width: 44px;
  height: 44px;
  filter: drop-shadow(0 0 22px var(--primary-glow));
}
.bp-lead .bp-ph .bp-ph-logo {
  width: 64px;
  height: 64px;
}
.bp-ph-kicker {
  position: relative;
  max-width: 80%;
  overflow: hidden;
  font-family: var(--font-code);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--text-muted);
}

/* Pages: newer, the page number, older. */
.bp-pages {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 48px;
}
.bp-pages [data-off] {
  visibility: hidden;
}
.bp-page-n {
  font-size: 14px;
  color: var(--text-muted);
}
@media (max-width: 479px) {
  .bp-page-n {
    order: -1;
    width: 100%;
    text-align: center;
  }
  .bp-pages [data-off] {
    display: none;
  }
  .bp-pages .btn {
    flex: 1 1 0;
    justify-content: center;
  }
}

/* Author */
.bp-author-head {
  display: flex;
  align-items: center;
  gap: 16px;
}
.bp-avatar {
  flex: none;
  width: 36px;
  height: 36px;
  border: 2px solid var(--bg);
  border-radius: 50%;
  background: var(--surface-2);
  object-fit: cover;
}
.bp-avatar.big {
  width: 64px;
  height: 64px;
}

/* ---------- A post ---------- */
.bp-post-head {
  max-width: 760px;
  padding-top: clamp(28px, 5vw, 56px);
}
.bp-title {
  margin: 6px 0 0;
  font-size: clamp(34px, 5.4vw, 52px);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.bp-standfirst {
  margin: 18px 0 0;
  font-size: 20px;
  line-height: 1.5;
  color: var(--text-muted);
}
.bp-byline {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 26px;
}
.bp-avatars {
  display: flex;
}
.bp-avatars .bp-avatar + .bp-avatar {
  margin-left: -10px;
}
.bp-avatar-none {
  display: inline-block;
  overflow: hidden;
  font-size: 0;
  background:
    radial-gradient(circle at 50% 38%, var(--text-muted) 0 17%, transparent 18%),
    radial-gradient(circle at 50% 100%, var(--text-muted) 0 38%, transparent 39%), var(--surface-3);
}
.bp-authors a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text);
}
.bp-authors a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* The picture in the site's frame (.lp-frame), whole (any proportion), without the fade. */
.bp-hero {
  margin: 36px auto 0;
}
.bp-hero .bp-frame {
  width: min(1040px, 100%);
  margin: 0 auto;
  aspect-ratio: 5 / 3;
}
.bp-hero .bp-frame::after {
  content: none;
}
.bp-hero .bp-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.bp-hero figcaption {
  margin-top: 12px;
  font-size: 14px;
  text-align: center;
  color: var(--text-muted);
}

/* The column: 720 px of text; wide cards to 1040, full cards to the window's edges. */
.bp-canvas {
  display: grid;
  grid-template-columns:
    [full-start] minmax(max(20px, env(safe-area-inset-left, 0px)), 1fr)
    [wide-start] minmax(0, 160px)
    [main-start] min(720px, calc(100% - 40px))
    [main-end] minmax(0, 160px)
    [wide-end] minmax(max(20px, env(safe-area-inset-right, 0px)), 1fr)
    [full-end];
}
.bp-canvas > * {
  grid-column: main-start / main-end;
  min-width: 0;
}
.bp-canvas > .kg-width-wide {
  grid-column: wide-start / wide-end;
}
.bp-canvas > .kg-width-full {
  grid-column: full-start / full-end;
}

/* Ghost's font settings (Design → Typography) reach the post's text only: the header and
   footer stay the site's. */
.gh-content {
  padding-top: 48px;
  font-family: var(--gh-font-body, var(--font-ui));
  font-size: 18px;
  line-height: 1.7;
  color: var(--text-soft);
  overflow-wrap: break-word;
}
.gh-content > * {
  margin-block: 0;
}
.gh-content > * + * {
  margin-top: 1.35em;
}
.gh-content :is(h1, h2, h3, h4, h5, h6) {
  font-family: var(--gh-font-heading, var(--font-ui));
  color: var(--text);
  text-wrap: balance;
  scroll-margin-top: 80px;
}
.gh-content > :is(h1, h2) {
  margin-top: 2em;
  font-size: clamp(26px, 3.4vw, 32px);
  line-height: 1.2;
  letter-spacing: -0.015em;
}
.gh-content > h3 {
  margin-top: 1.7em;
  font-size: 23px;
  line-height: 1.3;
}
.gh-content > h4 {
  margin-top: 1.6em;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.35;
}
.gh-content > :is(h5, h6) {
  margin-top: 1.6em;
  font-size: 17px;
  font-weight: 700;
}
.gh-content > :is(h1, h2, h3, h4, h5, h6) + * {
  margin-top: 0.6em;
}
.gh-content > :first-child {
  margin-top: 0;
}
.gh-content
  a:not(
    .kg-btn,
    .kg-bookmark-container,
    .kg-file-card-container,
    [class*='kg-product-card-button'],
    [class*='kg-header-card-button']
  ) {
  color: var(--link);
  text-decoration: underline;
  text-decoration-color: var(--primary-border);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.gh-content a:not(.kg-btn, .kg-bookmark-container, .kg-file-card-container):hover {
  text-decoration-color: var(--primary);
}
.gh-content strong,
.gh-content b {
  color: var(--text);
  font-weight: 650;
}
.gh-content :is(ul, ol) {
  padding-left: 1.4em;
}
.gh-content ul {
  list-style: disc;
}
.gh-content ol {
  list-style: decimal;
}
.gh-content li + li,
.gh-content li > :is(ul, ol) {
  margin-top: 0.5em;
}
.gh-content li::marker {
  color: var(--text-muted);
}
.gh-content mark {
  padding: 0 2px;
  border-radius: 3px;
  background: var(--tint-22);
  color: var(--text);
}
.gh-content sup,
.gh-content sub {
  line-height: 0;
}

/* Quotes: a green rule; the alternative style large and centred. */
.gh-content blockquote:not(.kg-blockquote-alt) {
  margin-inline: 0;
  padding: 2px 0 2px 22px;
  border-left: 3px solid var(--primary);
  font-size: 20px;
  line-height: 1.6;
  color: var(--text);
}
.gh-content .kg-blockquote-alt {
  margin-inline: 0;
  padding: 0.4em 1em;
  border: 0;
  font-size: clamp(22px, 3vw, 26px);
  font-style: normal;
  line-height: 1.45;
  text-align: center;
  color: var(--text);
}
.gh-content blockquote p {
  margin: 0;
}
.gh-content blockquote p + p {
  margin-top: 0.8em;
}

/* Code: the site's mono; inline as in the docs, blocks scroll sideways and never wrap. With
   JavaScript a bar (language, Copy) sits in the block's top padding, which is reserved from
   the first paint (html.js), so nothing moves when it arrives. */
.gh-content code {
  padding: 1px 5px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface-2);
  font-family: var(--font-code);
  font-size: 0.86em;
  color: var(--text);
}
.gh-content pre {
  overflow-x: auto;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-1);
  font-family: var(--font-code);
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
  white-space: pre;
  overflow-wrap: normal;
  word-break: normal;
  tab-size: 4;
}
.gh-content pre code {
  padding: 0;
  border: 0;
  background: none;
  font-size: inherit;
  white-space: inherit;
}
html.js .gh-content pre {
  padding-top: 62px;
}
.bp-code {
  position: relative;
}
.bp-code > pre {
  margin: 0;
}
.bp-code-bar {
  position: absolute;
  top: 1px;
  left: 1px;
  right: 1px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 44px;
  padding-left: 18px;
  border-bottom: 1px solid var(--border);
  border-radius: 11px 11px 0 0;
  background: var(--surface-1);
  font-family: var(--font-code);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.bp-code-bar .copy {
  height: 44px;
  min-width: 76px;
  margin: 0;
  padding: 0 16px;
  border: 0;
  border-left: 1px solid var(--border);
  border-radius: 0 11px 0 0;
  font-family: var(--font-ui);
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
}
.bp-code-bar .copy:hover {
  color: var(--text);
}
.bp-code-bar .copy:focus-visible {
  outline-offset: -2px;
}
.gh-content .kg-code-card figcaption {
  margin-top: 10px;
}

/* Pictures and galleries, with captions. */
.gh-content figure {
  margin-inline: 0;
}
.gh-content figcaption {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
  color: var(--text-muted);
}
.gh-content .kg-width-full figcaption {
  padding-inline: 20px;
}
.gh-content > img,
.gh-content .kg-image-card img {
  display: block;
  max-width: 100%;
  height: auto;
  margin-inline: auto;
}
.gh-content .kg-image-card:not(.kg-width-full) img,
.gh-content > img {
  border: 1px solid var(--border);
  border-radius: 12px;
}
.gh-content .kg-width-full img {
  width: 100%;
}
.gh-content .kg-image-card,
.gh-content .kg-gallery-card,
.gh-content .kg-embed-card,
.gh-content .kg-video-card,
.gh-content .kg-code-card,
.gh-content .kg-bookmark-card,
.gh-content .kg-callout-card,
.gh-content .kg-toggle-card,
.gh-content .kg-audio-card,
.gh-content .kg-file-card,
.gh-content .kg-product-card,
.gh-content .kg-header-card,
.gh-content .kg-button-card,
.gh-content table {
  margin-top: 1.8em;
}
.gh-content
  :is(
    .kg-image-card,
    .kg-gallery-card,
    .kg-embed-card,
    .kg-video-card,
    .kg-code-card,
    .kg-bookmark-card,
    .kg-callout-card,
    .kg-toggle-card,
    .kg-audio-card,
    .kg-file-card,
    .kg-product-card,
    .kg-header-card,
    .kg-button-card,
    table
  )
  + * {
  margin-top: 1.8em;
}
.gh-content .kg-gallery-image img {
  border-radius: 10px;
}

/* Bookmarks: a card like the site's. */
.gh-content .kg-bookmark-card a.kg-bookmark-container {
  display: flex;
  min-height: 148px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-1);
  color: var(--text);
  text-decoration: none;
  box-shadow: none;
  transition: border-color 0.2s;
}
.gh-content .kg-bookmark-card a.kg-bookmark-container:hover {
  border-color: var(--border-strong);
}
.gh-content .kg-bookmark-content {
  padding: 20px 22px;
}
.gh-content .kg-bookmark-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
}
.gh-content .kg-bookmark-description {
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
}
.gh-content .kg-bookmark-metadata {
  margin-top: 14px;
  font-size: 14px;
  color: var(--text-muted);
}
.gh-content .kg-bookmark-icon {
  border: 0;
  border-radius: 4px;
}
.gh-content .kg-bookmark-author,
.gh-content .kg-bookmark-publisher {
  color: var(--text-muted);
}
/* Ghost dims these with opacity; the muted token is already the site's quiet text at 4.5:1. */
.gh-content .kg-bookmark-description,
.gh-content .kg-bookmark-metadata > :not(img),
.gh-content .kg-file-card-caption,
.gh-content .kg-file-card-metadata,
.gh-content .kg-file-card-metadata *,
.gh-content .kg-product-card-description,
.gh-content .kg-product-card .kg-product-card-description p {
  opacity: 1;
}
.gh-content .kg-bookmark-thumbnail img {
  border: 0;
  border-radius: 0;
}

/* Callouts: the panel with a rule in the callout's colour (the site's status colours). */
.gh-content .kg-callout-card {
  --c: var(--border-strong);
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--c);
  border-radius: 12px;
  background: color-mix(in srgb, var(--c) 7%, var(--surface-1));
  color: var(--text-soft);
}
.gh-content .kg-callout-card-blue {
  --c: var(--info);
}
.gh-content .kg-callout-card-green {
  --c: var(--ok);
}
.gh-content .kg-callout-card-yellow {
  --c: var(--warning);
}
.gh-content .kg-callout-card-red {
  --c: var(--critical);
}
.gh-content .kg-callout-card-pink {
  --c: var(--chart-6);
}
.gh-content .kg-callout-card-purple {
  --c: var(--chart-4);
}
.gh-content .kg-callout-card-accent {
  --c: var(--primary);
}
.gh-content .kg-callout-card-white {
  --c: var(--text-muted);
}
.gh-content .kg-callout-card.kg-callout-card-accent a {
  color: var(--link);
}
.gh-content .kg-callout-text {
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-soft);
}
.gh-content .kg-callout-emoji {
  font-size: 20px;
  line-height: 1.5;
}

/* Toggles: the panel; the heading is the switch. Without JavaScript they stay open. */
.gh-content .kg-toggle-card {
  padding: 4px 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-1);
  box-shadow: none;
}
.gh-content .kg-toggle-heading {
  align-items: center;
  min-height: 52px;
}
.gh-content .kg-toggle-card h4.kg-toggle-heading-text {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}
.gh-content .kg-toggle-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0 -12px 0 8px;
  color: var(--text-muted);
}
.gh-content .kg-toggle-card-icon svg {
  width: 14px;
  height: 14px;
}
.gh-content .kg-toggle-content {
  font-size: 17px;
  color: var(--text-soft);
}
.gh-content .kg-toggle-card[data-kg-toggle-state='open'] .kg-toggle-content,
html:not(.js) .gh-content .kg-toggle-content {
  padding-bottom: 16px;
}
html:not(.js) .gh-content .kg-toggle-content {
  height: auto !important;
  overflow: visible;
}
html:not(.js) .gh-content .kg-toggle-card-icon {
  display: none;
}

/* Buttons: the site's primary button. A header card's button keeps the colours chosen in the
   editor (they are inline styles). */
.gh-content .kg-button-card a.kg-btn,
.gh-content .kg-product-card a.kg-product-card-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 18px;
  border: 1px solid var(--primary);
  border-radius: 8px;
  background: var(--primary);
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 600;
  color: var(--on-primary);
  text-decoration: none;
  transition:
    box-shadow 0.2s,
    background 0.2s;
}
.gh-content .kg-button-card a.kg-btn:hover,
.gh-content .kg-product-card a.kg-product-card-button:hover {
  background: var(--primary-hover);
  box-shadow: 0 0 24px var(--primary-glow);
  opacity: 1;
}

/* Divider */
.gh-content > hr,
.gh-content hr {
  height: 1px;
  margin-block: 2.6em;
  border: 0;
  background: var(--border);
}
.gh-content > hr + * {
  margin-top: 0;
}

/* Embeds: video players at 16:9, everything within the column. */
.gh-content .kg-embed-card {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.gh-content iframe {
  max-width: 100%;
  border: 0;
}
.gh-content .kg-embed-card iframe:is([src*='youtube'], [src*='vimeo'], [src*='loom']) {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
}
.gh-content .kg-embed-card iframe {
  background: var(--surface-1);
}
.gh-content .kg-video-card,
.gh-content .kg-video-card video {
  border-radius: 12px;
}

/* Tables (markdown and HTML cards): scroll sideways when wider than the column. */
.gh-content table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.5;
  -webkit-overflow-scrolling: touch;
}
.gh-content th,
.gh-content td {
  min-width: 8em;
  padding: 10px 14px;
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
  color: var(--text-soft);
}
.gh-content th {
  background: var(--surface-1);
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

/* Audio, file, product and header cards: the dark panel, the site's type. */
.gh-content .kg-audio-card,
.gh-content .kg-file-card a.kg-file-card-container,
.gh-content .kg-product-card-container {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-1);
  box-shadow: none;
  color: var(--text);
}
.gh-content .kg-file-card a.kg-file-card-container:hover {
  border-color: var(--border-strong);
}
.gh-content .kg-file-card-title,
.gh-content .kg-audio-title,
.gh-content .kg-product-card-title {
  font-family: var(--font-ui);
  color: var(--text);
}
.gh-content .kg-file-card-caption,
.gh-content .kg-file-card-metadata,
.gh-content .kg-product-card-description,
.gh-content .kg-audio-current-time,
.gh-content .kg-audio-time,
.gh-content .kg-audio-duration {
  color: var(--text-muted);
}
.gh-content .kg-file-card-icon,
.gh-content .kg-file-card-icon svg,
.gh-content .kg-audio-play-icon,
.gh-content .kg-audio-pause-icon,
.gh-content .kg-audio-unmute-icon,
.gh-content .kg-audio-mute-icon,
.gh-content .kg-audio-playback-rate {
  color: var(--primary);
}
.gh-content .kg-audio-thumbnail.placeholder {
  background: var(--tint-14);
  color: var(--primary);
}
.gh-content .kg-product-card-image {
  border-radius: 10px;
}
.gh-content .kg-header-card:not(.kg-width-full) {
  border-radius: 16px;
}
/* Ghost leaves a full-width header card's text without side padding: on a phone the heading
   would touch the window's edges. */
.gh-content .kg-header-card .kg-header-card-text {
  padding-inline: max(24px, 4vmax);
}
.gh-content .kg-header-card h2,
.gh-content .kg-header-card h3 {
  font-family: var(--gh-font-heading, var(--font-ui));
}
.gh-content .kg-signup-card,
.gh-content .kg-cta-card {
  border-radius: 16px;
}

/* After the text: tags, subscribe (Ghost members, only when on), comments. */
.bp-post-tags {
  margin-top: 48px;
}
.bp-post-tags ul {
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.bp-subscribe {
  margin-top: 40px;
}
.bp-subscribe .lp-card {
  align-items: flex-start;
}
.bp-subscribe .ctas {
  margin-top: 8px;
}
.bp-comments {
  margin-top: 48px;
}

/* The closing call to action and the related posts. */
.bp-post + section.s.last {
  padding-top: 72px;
}
section.s.bp-related {
  padding-top: 0;
  padding-bottom: 88px;
}
