/* TMS Blog Hub article style (plugin 1.1.0). Everything is scoped to .tmsbh-article, and to
   body.tmsbh-styled for the title, so nothing else on the site changes. Colours and fonts come from
   the panel's site settings (TMSBH_Style::vars) as custom properties: on .tmsbh-article itself and
   on body.tmsbh-styled. The values below are only the defaults. */
.tmsbh-article {
  --tmsbh-accent: #2563eb;
  --tmsbh-ink: #111827;
  --tmsbh-text: #374151;
  --tmsbh-muted: #6b7280;
  --tmsbh-line: #e5e7eb;
  --tmsbh-soft: #eff4ff;
  --tmsbh-soft-2: #dbe6fe;
  --tmsbh-radius: 14px;
  max-width: var(--tmsbh-width, 760px);
  margin: 0 auto;
  padding: 0 0 48px;
  color: var(--tmsbh-text);
  font-size: var(--tmsbh-size, 18px);
  line-height: var(--tmsbh-line, 1.75);
  overflow-wrap: break-word;
}
body.tmsbh-styled .page-header,
body.tmsbh-styled .entry-header {
  max-width: var(--tmsbh-width, 760px);
  margin-left: auto;
  margin-right: auto;
}
@supports (color: color-mix(in srgb, red 50%, white)) {
  .tmsbh-article {
    --tmsbh-soft: color-mix(in srgb, var(--tmsbh-accent) 8%, #fff);
    --tmsbh-soft-2: color-mix(in srgb, var(--tmsbh-accent) 16%, #fff);
  }
}
/* The post's own title: some sites hide the theme's title everywhere because their pages carry
   their own heading (Elementor); a Blog Hub post has no other title, so it is shown here. */
body.tmsbh-styled .page-header .entry-title,
body.tmsbh-styled .entry-header .entry-title {
  display: block !important;
  visibility: visible !important;
  color: var(--tmsbh-ink, inherit);
  font-size: clamp(30px, 4.2vw, 44px);
  line-height: 1.18;
  letter-spacing: -0.02em;
  font-weight: 800;
  margin: 40px 0 0;
}
body.tmsbh-styled .post-tags { max-width: var(--tmsbh-width, 760px); margin: 0 auto 40px; }

/* Fonts: only when the panel chose one; otherwise the theme's own heading and text fonts stay. */
.tmsbh-article.tmsbh-bf { font-family: var(--tmsbh-body); }
.tmsbh-article.tmsbh-hf h2, .tmsbh-article.tmsbh-hf h3, .tmsbh-article.tmsbh-hf h4,
.tmsbh-article.tmsbh-hf summary, .tmsbh-article.tmsbh-hf th, .tmsbh-article.tmsbh-hf .tmsbh-box-title,
.tmsbh-article.tmsbh-hf aside[data-box]::before, .tmsbh-article.tmsbh-hf .tmsbh-body ol > li::before,
body.tmsbh-styled.tmsbh-hf .page-header .entry-title, body.tmsbh-styled.tmsbh-hf .entry-header .entry-title {
  font-family: var(--tmsbh-head);
}

/* Meta line: category, reading time, date */
.tmsbh-article .tmsbh-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
  margin: 14px 0 26px; font-size: 14px; color: var(--tmsbh-muted); line-height: 1.4;
}
.tmsbh-article .tmsbh-meta .tmsbh-cat {
  background: var(--tmsbh-soft-2); color: var(--tmsbh-accent);
  font-weight: 700; font-size: 12px; letter-spacing: .06em; text-transform: uppercase;
  padding: 5px 12px; border-radius: 999px; text-decoration: none;
}
.tmsbh-article .tmsbh-meta .tmsbh-dot { width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .5; }

/* Featured image */
.tmsbh-article .tmsbh-hero { margin: 0 0 32px; }
.tmsbh-article .tmsbh-hero img {
  display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover;
  border-radius: var(--tmsbh-radius); box-shadow: 0 18px 40px -22px rgba(15, 23, 42, .45);
}

/* Lead paragraph */
.tmsbh-article .tmsbh-body > p:first-child { font-size: 20px; line-height: 1.7; color: var(--tmsbh-ink); }

/* Contents */
.tmsbh-article .tmsbh-toc {
  margin: 0 0 36px; border: 1px solid var(--tmsbh-line); border-radius: var(--tmsbh-radius);
  background: #fafbfc; font-size: 16px; line-height: 1.5;
}
.tmsbh-article .tmsbh-toc summary {
  cursor: pointer; list-style: none; padding: 16px 20px; font-weight: 700; color: var(--tmsbh-ink);
  display: flex; justify-content: space-between; align-items: center;
}
.tmsbh-article .tmsbh-toc summary::-webkit-details-marker { display: none; }
.tmsbh-article .tmsbh-toc summary::after { content: "+"; font-size: 22px; font-weight: 400; color: var(--tmsbh-accent); }
.tmsbh-article .tmsbh-toc[open] summary::after { content: "\2212"; }
.tmsbh-article .tmsbh-body .tmsbh-toc ol { margin: 0; padding: 0 20px 16px; columns: 2 260px; column-gap: 28px; counter-reset: tmsbh-toc; }
.tmsbh-article .tmsbh-body .tmsbh-toc ol > li {
  list-style: none; position: relative; margin: 0 0 8px; padding-left: 32px; break-inside: avoid; counter-increment: tmsbh-toc;
}
.tmsbh-article .tmsbh-body .tmsbh-toc ol > li::before {
  content: counter(tmsbh-toc); position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%;
  background: var(--tmsbh-soft-2); color: var(--tmsbh-accent); font-size: 12px; font-weight: 700; line-height: 22px; text-align: center;
}
.tmsbh-article .tmsbh-body .tmsbh-toc a { color: var(--tmsbh-text); text-decoration: none; }
.tmsbh-article .tmsbh-body .tmsbh-toc a:hover { color: var(--tmsbh-accent); text-decoration: underline; }

/* Headings */
.tmsbh-article h2, .tmsbh-article h3, .tmsbh-article h4 {
  color: var(--tmsbh-ink); letter-spacing: -0.01em; scroll-margin-top: 100px;
}
.tmsbh-article h2 { font-size: var(--tmsbh-h2, 28px); line-height: 1.3; font-weight: 800; margin: 56px 0 16px; padding-top: 4px; }
.tmsbh-article h2::before {
  content: ""; display: block; width: 44px; height: 4px; border-radius: 4px; margin-bottom: 14px;
  background: var(--tmsbh-accent);
}
.tmsbh-article h3 { font-size: 21px; line-height: 1.4; font-weight: 700; margin: 34px 0 10px; }
.tmsbh-article h4 { font-size: 18px; font-weight: 700; margin: 26px 0 8px; }
.tmsbh-article p { margin: 0 0 20px; }
.tmsbh-article strong { color: var(--tmsbh-ink); font-weight: 700; }

/* Links */
.tmsbh-article .tmsbh-body a, .tmsbh-article .tmsbh-faq a {
  color: var(--tmsbh-accent); text-decoration: underline; text-decoration-thickness: 1.5px;
  text-underline-offset: 3px; text-decoration-color: var(--tmsbh-soft-2);
}
.tmsbh-article .tmsbh-body a:hover { text-decoration-color: currentColor; }

/* Lists */
.tmsbh-article ul, .tmsbh-article ol { margin: 0 0 24px; padding-left: 0; }
.tmsbh-article .tmsbh-body ul > li { list-style: none; position: relative; padding-left: 30px; margin: 0 0 10px; }
.tmsbh-article .tmsbh-body ul > li::before {
  content: ""; position: absolute; left: 4px; top: .62em; width: 9px; height: 9px; border-radius: 50%;
  background: var(--tmsbh-accent); box-shadow: 0 0 0 4px var(--tmsbh-soft-2);
}
.tmsbh-article .tmsbh-body ol { counter-reset: tmsbh; }
.tmsbh-article .tmsbh-body ol > li {
  list-style: none; position: relative; padding-left: 44px; margin: 0 0 14px; counter-increment: tmsbh;
}
.tmsbh-article .tmsbh-body ol > li::before {
  content: counter(tmsbh); position: absolute; left: 0; top: .1em; width: 30px; height: 30px; border-radius: 50%;
  background: var(--tmsbh-accent); color: #fff; font-size: 15px; font-weight: 700; line-height: 30px; text-align: center;
}

/* Quotes become cards (example messages, replies) */
.tmsbh-article blockquote {
  margin: 0 0 24px; padding: 20px 24px; border: 0; border-left: 4px solid var(--tmsbh-accent);
  background: var(--tmsbh-soft); border-radius: 0 var(--tmsbh-radius) var(--tmsbh-radius) 0;
  font-style: normal; color: var(--tmsbh-ink); font-size: 17px;
}
.tmsbh-article blockquote p:last-child { margin-bottom: 0; }

/* Boxes: <aside data-box="takeaways|tip|note|warning|cta"> */
.tmsbh-article aside[data-box] {
  margin: 0 0 32px; padding: 22px 24px; border-radius: var(--tmsbh-radius); font-size: 17px;
  background: var(--tmsbh-soft); border: 1px solid var(--tmsbh-soft-2);
}
.tmsbh-article aside[data-box] > :last-child { margin-bottom: 0; }
.tmsbh-article aside[data-box] > :first-child { margin-top: 0; }
.tmsbh-article aside[data-box]::before {
  display: block; font-weight: 800; font-size: 13px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--tmsbh-accent); margin-bottom: 8px;
}
.tmsbh-article aside[data-box="takeaways"]::before { content: "Key takeaways"; }
.tmsbh-article aside[data-box="tip"]::before { content: "Tip"; }
.tmsbh-article aside[data-box="note"]::before { content: "Good to know"; }
.tmsbh-article aside[data-box="warning"] { background: #fff7ed; border-color: #fed7aa; }
.tmsbh-article aside[data-box="warning"]::before { content: "Watch out"; color: #c2410c; }
.tmsbh-article aside[data-box="warning"] ul > li::before { background: #ea580c; box-shadow: 0 0 0 4px #ffedd5; }
.tmsbh-article aside[data-box="cta"] {
  background: var(--tmsbh-ink); border: 0; color: #e5e7eb; padding: 30px 32px; margin-top: 44px;
}
.tmsbh-article aside[data-box="cta"]::before { content: none; }
.tmsbh-article aside[data-box="cta"] strong, .tmsbh-article aside[data-box="cta"] h2, .tmsbh-article aside[data-box="cta"] h3, .tmsbh-article aside[data-box="cta"] h4 { color: #fff; }
.tmsbh-article aside[data-box] h2 { font-size: 22px; margin: 0 0 10px; }
.tmsbh-article aside[data-box] h2::before { display: none; }
.tmsbh-article aside[data-box="cta"] a {
  display: inline-block; margin-top: 6px; background: var(--tmsbh-accent); color: #fff !important;
  text-decoration: none !important; font-weight: 700; padding: 12px 24px; border-radius: 999px; font-size: 16px;
}
.tmsbh-article aside[data-box="cta"] a:hover { filter: brightness(1.08); }

/* Tables */
.tmsbh-article .tmsbh-table { overflow-x: auto; margin: 0 0 28px; border: 1px solid var(--tmsbh-line); border-radius: var(--tmsbh-radius); }
.tmsbh-article table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 1.5; margin: 0; border: 0; }
.tmsbh-article th {
  background: var(--tmsbh-ink); color: #fff; text-align: left; font-weight: 700; padding: 14px 16px;
  border: 0;
}
.tmsbh-article td { padding: 13px 16px; border: 0; border-top: 1px solid var(--tmsbh-line); vertical-align: top; }
.tmsbh-article tbody tr:nth-child(odd) > td { background: transparent; }
.tmsbh-article tbody tr:nth-child(even) > td { background: #f9fafb; }
.tmsbh-article table tbody > tr:hover > td { background: var(--tmsbh-soft); }

/* Images inside the text */
.tmsbh-article figure { margin: 0 0 28px; }
.tmsbh-article .tmsbh-body img { max-width: 100%; height: auto; border-radius: 10px; }
.tmsbh-article figcaption { font-size: 14px; color: var(--tmsbh-muted); text-align: center; margin-top: 8px; }

/* FAQ as an accordion */
.tmsbh-article .tmsbh-faq { margin: 56px 0 0; }
.tmsbh-article .tmsbh-faq details {
  border: 1px solid var(--tmsbh-line); border-radius: 12px; margin: 0 0 12px; background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.tmsbh-article .tmsbh-faq details[open] { border-color: var(--tmsbh-soft-2); box-shadow: 0 10px 30px -18px rgba(15, 23, 42, .35); }
.tmsbh-article .tmsbh-faq summary {
  cursor: pointer; list-style: none; padding: 18px 56px 18px 20px; position: relative;
  font-weight: 700; color: var(--tmsbh-ink); font-size: 17px; line-height: 1.45;
}
.tmsbh-article .tmsbh-faq summary::-webkit-details-marker { display: none; }
.tmsbh-article .tmsbh-faq summary::after {
  content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; border-radius: 50%; background: var(--tmsbh-soft-2); color: var(--tmsbh-accent);
  text-align: center; line-height: 28px; font-size: 20px; font-weight: 500;
}
.tmsbh-article .tmsbh-faq details[open] summary::after { content: "\2212"; }
.tmsbh-article .tmsbh-faq details > div { padding: 0 20px 6px; font-size: 17px; }

/* "Related guides" / "More on this topic" (cluster links) */
.tmsbh-article .tmsbh-box {
  margin: 48px 0 0; padding: 24px; border-radius: var(--tmsbh-radius); background: #fafbfc; border: 1px solid var(--tmsbh-line);
}
.tmsbh-article .tmsbh-box-title { font-size: 19px; margin: 0 0 12px; }
.tmsbh-article .tmsbh-box ul { list-style: none; margin: 0; padding: 0; }
.tmsbh-article .tmsbh-box li { position: relative; margin: 0 0 8px; padding-left: 26px; line-height: 1.5; }
.tmsbh-article .tmsbh-box li:last-child { margin-bottom: 0; }
.tmsbh-article .tmsbh-box li::before { content: "\2192"; position: absolute; left: 0; top: 0; color: var(--tmsbh-accent); font-weight: 700; }
.tmsbh-article .tmsbh-box a { color: var(--tmsbh-ink); font-weight: 600; text-decoration: none; }
.tmsbh-article .tmsbh-box a:hover { color: var(--tmsbh-accent); text-decoration: underline; }

@media (max-width: 640px) {
  .tmsbh-article { font-size: 17px; padding-left: 2px; padding-right: 2px; }
  .tmsbh-article .tmsbh-body > p:first-child { font-size: 18px; }
  .tmsbh-article h2 { font-size: calc(var(--tmsbh-h2, 28px) * .86); margin-top: 44px; }
  .tmsbh-article h3 { font-size: 19px; }
  .tmsbh-article .tmsbh-body .tmsbh-toc ol { columns: 1; }
  .tmsbh-article aside[data-box="cta"] { padding: 24px; }
  .tmsbh-article th, .tmsbh-article td { padding: 11px 12px; font-size: 15px; }
}
@media print {
  .tmsbh-article .tmsbh-toc, .tmsbh-article aside[data-box="cta"] { display: none; }
}

/* 1.3.0: the image inside the post (after the first section) */
.tmsbh-article figure.tmsbh-figure { margin: 32px 0; }
.tmsbh-article figure.tmsbh-figure img {
  display: block; width: 100%; height: auto; border-radius: var(--tmsbh-radius);
}
