/* ==========================================================================
   Flexable — Blog post (single)

   Loaded alongside base.css and privacy-policy.css. The legal pages already
   provide the shell this design shares with them — the 230px + 760px grid,
   the sticky TOC, the mobile chip rail, the type scale — so this file only
   carries what a blog post adds: the article meta row, the share button, and
   the rules that make WordPress editor output match the design.

   IMPORTANT — why the section rules hang off h2 rather than a wrapper:
   the mockup wraps each section in .article-section to get its dividers. The
   block editor emits a flat stream of h2/p/ul/img with no wrappers and no
   ids, so that class can never exist here. Styling the h2 itself reproduces
   the same rhythm on any post, whatever its structure.
   ========================================================================== */

/* ---------- Plain hero (entries with no headings) ---------- */

/* Applied by single-post.php when the post has too few headings to earn a
   table of contents — comparisons, glossary terms, short notes. The full hero
   is built for a 1,800-word article; over three paragraphs it reads as a
   title page. This trims it back to a headline and a byline.

   Loaded after privacy-policy.css, so these override .flxb-legal-hero
   without needing extra specificity. */

.flxb-legal-hero-plain {
  padding: 52px 0 0;
  border-bottom: 0;
}

.flxb-home .flxb-legal-hero-plain .flxb-legal-title {
  font-size: clamp(28px, 4.2vw, 42px);
  line-height: 1.08;
  letter-spacing: -0.04em;
  margin-bottom: 0;
  max-width: 760px;
}

.flxb-legal-hero-plain .flxb-article-meta {
  max-width: 760px;
}

/* The article already opens with a rule under the meta row, so the shell
   does not need its usual breathing room above the content. */
.flxb-legal-hero-plain + .flxb-legal-shell,
.flxb-legal-hero-plain ~ .flxb-legal-shell {
  padding-top: 34px;
}

@media (max-width: 760px) {
  .flxb-legal-hero-plain {
    padding: 38px 0 0;
  }

  .flxb-legal-hero-plain + .flxb-legal-shell,
  .flxb-legal-hero-plain ~ .flxb-legal-shell {
    padding-top: 26px;
  }
}

/* ---------- Article meta (author · date · share) ---------- */

.flxb-article-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 940px;
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--flxb-line);
}

.flxb-meta-left {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 13px;
  color: #85888b;
  min-width: 0;
}

.flxb-meta-left strong {
  color: #4d5054;
  font-weight: 600;
}

.flxb-home .flxb-meta-left a {
  line-height: inherit;
}

.flxb-home .flxb-meta-left a:hover {
  color: var(--flxb-ink);
}

.flxb-meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #b8babc;
  flex: 0 0 auto;
}

.flxb-share-btn {
  border: 0;
  background: transparent;
  padding: 6px 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #66696d;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  flex: 0 0 auto;
}

.flxb-share-btn:hover {
  color: var(--flxb-ink);
}

.flxb-share-btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

/* ---------- Article body ---------- */

.flxb-article-content {
  min-width: 0;
  overflow-wrap: break-word;
}

.flxb-home .flxb-article-intro {
  font-size: 17px;
  line-height: 1.8;
  color: #4e5257;
  padding-bottom: 34px;
  border-bottom: 1px solid var(--flxb-line);
  margin: 0 0 4px;
}

/* The divider rhythm the mockup gets from .article-section wrappers. */
.flxb-home .flxb-article-content h2 {
  font-size: 25px;
  line-height: 1.15;
  letter-spacing: -0.035em;
  font-weight: 700;
  color: var(--flxb-ink);
  margin: 38px 0 16px;
  padding-top: 42px;
  border-top: 1px solid var(--flxb-line);
}

/* No rule above the first heading — the intro already has one below it. */
.flxb-home .flxb-article-content > h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.flxb-home .flxb-article-content h3 {
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: -0.025em;
  margin: 30px 0 12px;
  font-weight: 700;
  color: var(--flxb-ink);
}

.flxb-home .flxb-article-content p {
  font-size: 15px;
  line-height: 1.78;
  color: #55595e;
  margin: 0 0 15px;
}

.flxb-home .flxb-article-content ul,
.flxb-home .flxb-article-content ol {
  margin: 14px 0 15px;
  padding-left: 19px;
  color: #55595e;
}

.flxb-home .flxb-article-content ul {
  list-style: disc;
}

.flxb-home .flxb-article-content ol {
  list-style: decimal;
}

.flxb-home .flxb-article-content li {
  font-size: 15px;
  line-height: 1.7;
  margin: 7px 0;
  padding-left: 3px;
}

.flxb-home .flxb-article-content strong,
.flxb-home .flxb-article-content b {
  color: #222326;
  font-weight: 600;
}

/* Prose links — the legal pages have none, so this is new. */
.flxb-home .flxb-article-content a {
  color: #087440;
  text-decoration: underline;
  text-decoration-color: #b5dcc4;
  text-underline-offset: 3px;
  line-height: inherit;
}

.flxb-home .flxb-article-content a:hover {
  text-decoration-color: #087440;
}

/* ---------- WordPress editor output ---------- */

/* Content pasted from Google Docs carries hundreds of inline
   `style="font-weight: 400"` spans. Inline styles beat stylesheets, so
   without this the body copy silently refuses the type above. Colour and
   family are neutralised for the same reason. */
.flxb-home .flxb-article-content span[style] {
  font-weight: inherit !important;
  color: inherit !important;
  font-family: inherit !important;
  background: none !important;
}

/* …but a span inside <b>/<strong> must stay bold. */
.flxb-home .flxb-article-content b span[style],
.flxb-home .flxb-article-content strong span[style] {
  font-weight: 600 !important;
}

/* Classic-editor images (`alignnone wp-image-*`) and block figures alike.
   The width/height attributes in the markup would otherwise force their
   intrinsic size and overflow the 760px column. */
.flxb-home .flxb-article-content img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid var(--flxb-line);
  background: var(--flxb-soft);
  margin: 30px 0 6px;
}

.flxb-home .flxb-article-content figure {
  margin: 30px 0 6px;
  max-width: 100%;
}

.flxb-home .flxb-article-content figure img {
  margin: 0;
}

.flxb-home .flxb-article-content figcaption,
.flxb-home .flxb-article-content .wp-caption-text {
  margin-top: 9px;
  font-size: 12px;
  line-height: 1.5;
  color: #929599;
}

/* A bare <img> that is not a link or figure still needs the caption gap. */
.flxb-home .flxb-article-content .wp-caption {
  max-width: 100% !important;
}

.flxb-home .flxb-article-content .alignleft,
.flxb-home .flxb-article-content .alignright,
.flxb-home .flxb-article-content .aligncenter,
.flxb-home .flxb-article-content .alignnone {
  float: none;
  margin-left: 0;
  margin-right: 0;
}

/* `<p><b>Pros</b></p>` — used as a sub-label throughout the existing posts.
   Without this it is indistinguishable from body copy. */
.flxb-home .flxb-article-content p > b:only-child,
.flxb-home .flxb-article-content p > strong:only-child {
  display: inline-block;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #3a3d40;
}

.flxb-home .flxb-article-content iframe,
.flxb-home .flxb-article-content video {
  max-width: 100%;
  border-radius: 14px;
}

/* Wide tables scroll inside the column instead of widening the page. */
.flxb-article-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin: 24px 0;
}

.flxb-article-content table th,
.flxb-article-content table td {
  border: 1px solid var(--flxb-line);
  padding: 9px 11px;
  text-align: left;
}

.flxb-article-content blockquote {
  margin: 24px 0;
  padding: 4px 0 4px 18px;
  border-left: 3px solid var(--flxb-active);
  color: #4e5257;
}

/* ---------- Closing CTA ---------- */

.flxb-home .flxb-end-link {
  display: inline-block;
  margin-top: 7px;
  font-size: 14px;
  font-weight: 700;
}

/* ---------- Responsive ---------- */

@media (max-width: 760px) {
  .flxb-article-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-top: 24px;
    padding-top: 18px;
  }

  .flxb-home .flxb-article-intro {
    font-size: 16px;
    padding-bottom: 28px;
  }

  .flxb-home .flxb-article-content h2 {
    font-size: 22px;
    padding-top: 34px;
    margin-top: 30px;
  }

  .flxb-home .flxb-article-content h3 {
    font-size: 17px;
  }

  .flxb-home .flxb-article-content img {
    border-radius: 12px;
    margin: 24px 0 6px;
  }
}

@media (max-width: 480px) {
  .flxb-home .flxb-article-content h2 {
    font-size: 20px;
    padding-top: 30px;
    margin-top: 26px;
  }

  .flxb-home .flxb-article-content ul,
  .flxb-home .flxb-article-content ol {
    padding-left: 17px;
  }
}
