/* Byte A Cookie — single post. Loaded with the LiveCanvas template "Single Posts", after bac-base.css; the related cards come from bac-blog.css. */

/* ============================================================
   1. Reading progress (bac-post.js sets the scale)
   ============================================================ */

.bac-page .bac-post-progress {
  position: fixed;
  top: var(--bac_adminbar_h, 0);
  left: 0;
  z-index: 1031;
  width: 100%;
  height: 2px;
  background: var(--bac-gold);
  transform: scaleX(0);
  transform-origin: 0 50%;
  pointer-events: none;
}

/* ============================================================
   2. Head — category, title, lede, byline, image
   ============================================================ */

.bac-page .bac-post-head .bac-post-cat {
  display: inline-block;
  margin-bottom: 18px;
}
.bac-page .bac-post-head .bac-post-cat:not(:empty)::after { content: none; } /* beats the card separator of bac-blog.css, which loads later */
.bac-page .bac-post-head__title {
  margin-bottom: 22px;
  font-weight: 300;
  font-size: 1.875rem; /* fallback */
  font-size: clamp(1.875rem, 3.4vw, 2.875rem);
  line-height: 1.16;
  letter-spacing: -0.02em;
  color: var(--bac-ink);
  text-wrap: balance; /* progressive: browsers without it wrap normally */
}
.bac-page .bac-post-head__sub { margin-bottom: 26px; }
.bac-page .bac-post-head__sub:empty { display: none; } /* no excerpt written */

.bac-page .bac-post-avatar {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bac-ink);
}
.bac-page .bac-post-avatar--lg {
  width: 64px;
  height: 64px;
}

.bac-page .bac-post-byline {
  display: flex;
  align-items: center;
  padding-top: 20px;
  border-top: 1px solid var(--bac-line-strong);
}
.bac-page .bac-post-byline .bac-post-avatar { margin-right: 14px; }
.bac-page .bac-post-byline__name {
  margin-bottom: 3px;
  font-size: 0.90625rem;
  font-weight: 600;
  color: var(--bac-ink);
}

.bac-page .bac-post-head__media { padding-top: 75%; } /* 4:3, next to the title from lg (gy-4 spaces it below the title on smaller screens) */

/* ============================================================
   3. Article text — the Gutenberg content of the post
   ============================================================ */

.bac-page .bac-post-content { max-width: 68ch; }
.bac-page .bac-post-content p,
.bac-page .bac-post-content li {
  font-size: 1.03125rem;
  line-height: 1.75;
  color: var(--bac-ink);
}
.bac-page .bac-post-content p { margin-bottom: 20px; }
.bac-page .bac-post-content ul,
.bac-page .bac-post-content ol {
  margin: 0 0 22px;
  padding-left: 20px;
}
.bac-page .bac-post-content li { margin-bottom: 8px; }
.bac-page .bac-post-content strong { font-weight: 600; }
.bac-page .bac-post-content p a,
.bac-page .bac-post-content li a {
  color: var(--bac-gold-deep);
  text-underline-offset: 3px;
}

.bac-page .bac-post-content h2 {
  margin: 2.25rem 0 16px; /* fallback */
  margin: clamp(2.25rem, 4.4vw, 3.25rem) 0 16px;
  font-weight: 300;
  font-size: 1.375rem; /* fallback */
  font-size: clamp(1.375rem, 2.3vw, 1.8125rem);
  line-height: 1.22;
  letter-spacing: -0.015em;
  color: var(--bac-ink);
}
.bac-page .bac-post-content h3 {
  margin: 2rem 0 12px;
  font-weight: 400;
  font-size: 1.1875rem;
  line-height: 1.3;
  color: var(--bac-ink);
}
.bac-page .bac-post-content > :first-child { margin-top: 0; }

/* Contents links land the heading under the sticky header (anchors are spans inside the headings). */
.bac-page .bac-post-content h2,
.bac-page .bac-post-content h3,
.bac-page .bac-post-content .ez-toc-section {
  scroll-margin-top: 6rem; /* fallback */
  scroll-margin-top: calc(var(--bac_hdr_h, 81px) + var(--bac_adminbar_h, 0px) + 1rem);
}

.bac-page .bac-post-content blockquote {
  margin: 2rem 0; /* fallback */
  margin: clamp(2rem, 4vw, 2.75rem) 0;
  padding: 6px 0 6px 1.25rem; /* fallback */
  padding: 6px 0 6px clamp(1.125rem, 2.4vw, 1.75rem);
  border-left: 1px solid var(--bac-gold);
}
.bac-page .bac-post-content blockquote p {
  font-weight: 200;
  font-style: italic;
  font-size: 1.3125rem; /* fallback */
  font-size: clamp(1.3125rem, 2.3vw, 1.75rem);
  line-height: 1.4;
}
.bac-page .bac-post-content blockquote cite {
  font-family: var(--bac-font-mono);
  font-style: normal;
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bac-gold-deep);
}

.bac-page .bac-post-content figure { margin: 2rem 0; }
.bac-page .bac-post-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--bac-radius);
}
.bac-page .bac-post-content figcaption {
  margin-top: 8px;
  font-size: 0.8125rem;
  color: var(--bac-ink-2);
}
.bac-page .bac-post-content hr {
  margin: 2.5rem 0;
  border: 0;
  border-top: 1px solid var(--bac-line-strong);
  opacity: 1;
}

/* Videos: picostrap wraps every embed in Bootstrap's .ratio-16x9 (inc/setup.php); WordPress reserves its own space above it in .wp-has-aspect-ratio blocks, so the video sat under an empty box. */
.bac-page .bac-post-content .wp-has-aspect-ratio .wp-block-embed__wrapper::before { content: none; }
/* Video captions: in the video-only posts they hold the whole text, so they read at the size of the paragraphs. */
.bac-page .bac-post-content .wp-block-embed figcaption {
  margin-top: 16px;
  font-size: 1.03125rem;
  line-height: 1.75;
  color: var(--bac-ink);
}

@media (max-width: 575.98px) {
  .bac-page .bac-post-content p,
  .bac-page .bac-post-content li,
  .bac-page .bac-post-content .wp-block-embed figcaption { font-size: 1rem; }
}
@media (min-width: 1200px) {
  .bac-page .bac-post-content p,
  .bac-page .bac-post-content li,
  .bac-page .bac-post-content .wp-block-embed figcaption { font-size: 1.125rem; }
}

/* ============================================================
   4. After the text — note and author
   ============================================================ */

.bac-page .bac-post-content .bac-post-note {
  margin-top: 2rem; /* fallback */
  margin-top: clamp(2rem, 4vw, 2.75rem);
  padding-top: 18px;
  border-top: 1px solid var(--bac-line-strong);
  font-size: 0.84375rem;
  line-height: 1.6;
  color: var(--bac-ink-2);
}

.bac-page .bac-post-author {
  display: flex;
  align-items: flex-start;
  margin-top: 2rem; /* fallback */
  margin-top: clamp(2rem, 4vw, 2.75rem);
  padding: 1.25rem; /* fallback */
  padding: clamp(1.25rem, 2.4vw, 1.75rem);
  border: 1px solid var(--bac-line-strong);
  border-radius: 3px;
  background: var(--bac-paper-3);
}
.bac-page .bac-post-author .bac-post-avatar { margin-right: 20px; }
.bac-page .bac-post-author__label {
  margin-bottom: 6px;
  font-family: var(--bac-font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bac-gold-deep);
}
.bac-page .bac-post-author__name {
  margin-bottom: 8px;
  font-weight: 300;
  font-size: 1.25rem;
  color: var(--bac-ink);
}
.bac-page .bac-post-content .bac-post-author__text p {
  margin-bottom: 12px;
  font-size: 0.90625rem;
  line-height: 1.6;
  color: var(--bac-ink-2);
}

/* ============================================================
   5. Side column — contents (Easy Table of Contents) and share
   ============================================================ */

@media (min-width: 992px) {
  .bac-page .bac-post-aside {
    position: -webkit-sticky;
    position: sticky;
    top: 2rem; /* fallback */
    top: calc(var(--bac_hdr_h, 0px) + var(--bac_adminbar_h, 0px) + 2rem);
  }
}

.bac-page .bac-post-toc { margin-bottom: 22px; }
.bac-page .bac-post-toc__label {
  margin-bottom: 6px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--bac-line-strong);
  font-family: var(--bac-font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bac-ink-2);
}
/* Markup of the plugin: #ez-toc-container > nav > ul.ez-toc-list > li > a.ez-toc-link */
.bac-page .bac-post-toc ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.bac-page .bac-post-toc ul ul { padding-left: 12px; }
.bac-page .bac-post-toc .ez-toc-link {
  display: block;
  padding: 9px 0 9px 12px;
  border-left: 1px solid var(--bac-line-strong);
  font-size: 0.84375rem;
  line-height: 1.4;
  color: var(--bac-ink-2);
  text-decoration: none;
  transition: color 200ms ease, border-color 200ms ease;
}
.bac-page .bac-post-toc .ez-toc-link:hover {
  border-left-color: var(--bac-gold-deep);
  color: var(--bac-ink);
}
.bac-page .bac-post-toc .ez-toc-link:focus-visible {
  outline: 2px solid var(--bac-gold);
  outline-offset: 2px;
}

.bac-page .bac-post-share__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-right: 8px;
  padding: 0;
  border: 1px solid var(--bac-line-strong);
  border-radius: 50%;
  background: transparent;
  color: var(--bac-ink-2);
  cursor: pointer;
  transition: border-color 200ms ease, color 200ms ease;
}
.bac-page .bac-post-share__btn:hover,
.bac-page .bac-post-share__btn--done {
  border-color: var(--bac-gold);
  color: var(--bac-gold-deep);
}
.bac-page .bac-post-share__btn:focus-visible {
  outline: 2px solid var(--bac-gold);
  outline-offset: 2px;
}
.bac-page .bac-post-share__btn svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}