/* ── Typography: Plus Jakarta Sans ─────────────────────────── */
.btt-single,
.btt-single *:not(code):not(pre) {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}
.btt-content code,
.btt-content pre {
  font-family: 'Courier New', Courier, monospace;
}

/* ============================================================
   BTT — Single Tech Post  (assets/single.css)
   ============================================================ */

/* ── CSS custom properties ─────────────────────────────────── */
/* FIX: --btt-header-h was used in scroll-margin-top calculations
   throughout the file but never defined, causing calc() to fall back
   to 0px and headings to scroll behind sticky headers. Define it here;
   override in your theme's root stylesheet if the header height differs. */
:root {
  --btt-header-h: 64px;
}

/* ── Layout ────────────────────────────────────────────────── */
.btt-single {
  background: var(--btt-bg);
  min-height: 60vh;
}

.btt-single__layout {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 24px 36px; /* FIX: top padding matches hero margin-top so sidebar aligns with article, not the breadcrumb */
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 36px;
  align-items: start;
}

.btt-single__main {
  min-width: 0;
}

/* ── Breadcrumb ────────────────────────────────────────────── */
.btt-breadcrumb {
  background: #0f172a;
  padding: 11px 24px;
}

.btt-breadcrumb__list {
  max-width: 1280px;
  margin: 0 auto;
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.btt-breadcrumb__list li {
  color: #fff;
}

.btt-breadcrumb__list li + li::before {
  content: '›';
  margin-right: 6px;
  color: #fff;
}

.btt-breadcrumb__list a,
.btt-breadcrumb__list [aria-current] {
  color: #fff !important;
  text-decoration: none;
  transition: opacity .2s;
}

.btt-breadcrumb__list a:hover {
  opacity: .75;
}

/* ── Hero — title + action button ─────────────────────────── */
.btt-hero {
  display: grid;
  grid-template-columns: 260px 1fr;
  background: var(--btt-white);
  border: 1px solid var(--btt-border);
  border-radius: var(--btt-radius-lg);
  box-shadow: var(--btt-shadow);
  overflow: hidden;
  margin: 0; /* FIX: removed margin-top:20px — layout padding now owns that space so sidebar aligns with hero top edge */
}

.btt-hero__img {
  background: linear-gradient(160deg, #e8f4fd 0%, #dbeafe 100%);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  padding: 12px;
  flex-shrink: 0;
}

.btt-hero__img img {
  width: 100%;
  height: 100%;
  max-height: 260px;
  object-fit: contain;
  object-position: center center;
  display: block;
}

.btt-hero__body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}

.btt-hero__title {
  font-size: clamp(16px, 1.9vw, 24px);
  font-weight: 800;
  color: var(--btt-slate);
  line-height: 1.3;
  margin: 0;
}

.btt-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btt-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--btt-radius);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  transition: transform .15s, background .2s, box-shadow .15s, opacity .2s;
}

.btt-btn:hover {
  transform: translateY(-1px);
}

.btt-btn--primary {
  background: #2563eb;
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, .28);
}

.btt-btn--primary:hover {
  background: #1d4ed8;
}

/* ── Key sections dropdown ────────────────────────────────── */
.btt-key-sections {
  margin: 14px 0 18px;
  background: var(--btt-white);
  border: 1px solid var(--btt-border);
  border-left: 4px solid #2563eb;
  border-radius: var(--btt-radius);
  box-shadow: 0 1px 4px rgba(15,23,42,.05);
  overflow: hidden;
}

.btt-key-sections__header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: #f8fafc;
  border-bottom: 1px solid var(--btt-border);
  color: var(--btt-slate);
  font-weight: 800;
  font-size: 14px;
}

.btt-key-sections__icon {
  color: #2563eb;
  font-size: 16px;
}

.btt-key-sections__body {
  padding: 4px 18px 14px;
}

.btt-key-sections__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.btt-key-sections__item {
  border-top: 1px solid var(--btt-border);
}

.btt-key-sections__item:first-child {
  border-top: none;
}

.btt-key-sections__item a {
  display: block;
  padding: 10px 6px;
  text-decoration: none;
  color: var(--btt-blue);
  font-size: 14px;
  font-weight: 600;
  transition: color .15s, padding-left .15s;
}

.btt-key-sections__item a:hover {
  color: var(--btt-blue-lt);
  padding-left: 9px;
}

/* ── Meta bar ──────────────────────────────────────────────── */
.btt-meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 0;
  margin-bottom: 16px;
}

.btt-meta-bar__item {
  flex: 1 1 90px;
  min-width: 80px;
  max-width: 170px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  background: var(--btt-white);
  border: 1px solid var(--btt-border);
  border-radius: var(--btt-radius);
  padding: 10px 14px;
  box-shadow: 0 1px 4px rgba(15,23,42,.05);
  transition: box-shadow .2s;
}

.btt-meta-bar__item:hover {
  box-shadow: var(--btt-shadow);
}

.btt-meta-bar__label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--btt-muted);
}

.btt-meta-bar__value {
  font-size: 14px;
  font-weight: 700;
  color: var(--btt-slate);
  text-decoration: none;
}

.btt-meta-bar__value--brand,
.btt-meta-bar__value--author {
  color: var(--btt-blue);
}

.btt-meta-bar__value--brand:hover,
.btt-meta-bar__value--author:hover {
  text-decoration: underline;
}

/* ── TOC ───────────────────────────────────────────────────── */
.btt-toc {
  background: var(--btt-white);
  border: 1px solid var(--btt-border);
  border-left: 4px solid var(--btt-blue);
  border-radius: var(--btt-radius);
  margin-bottom: 20px;
}

/* FIX: Added display:block to .btt-toc__toggle so that the native
   ::marker pseudo-element is fully suppressed across all browsers
   (list-style:none alone doesn't remove it in Safari/Firefox). */
.btt-toc__toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  font-size: 15px;
  font-weight: 700;
  color: var(--btt-slate);
  cursor: pointer;
  list-style: none;
  display: block; /* suppresses ::marker in all browsers */
  display: flex;  /* restore flex — last declaration wins */
  user-select: none;
}

.btt-toc__toggle::-webkit-details-marker {
  display: none;
}

/* FIX: Also suppress the standard ::marker pseudo-element
   which was leaking through in Firefox and Chrome 86+. */
.btt-toc__toggle::marker {
  display: none;
  content: '';
}

.btt-toc__toggle:hover {
  background: #f8fafc;
}

.btt-toc__icon {
  font-size: 16px;
  color: var(--btt-blue);
}

.btt-toc__chevron {
  margin-left: auto;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--btt-muted);
  border-bottom: 2px solid var(--btt-muted);
  transform: rotate(45deg);
  transition: transform .22s;
  flex-shrink: 0;
}

details[open].btt-toc .btt-toc__chevron {
  transform: rotate(-135deg);
}

.btt-toc__body {
  padding: 4px 18px 14px;
}

.btt-toc__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.btt-toc__item {
  border-top: 1px solid var(--btt-border);
}

.btt-toc__item:first-child {
  border-top: none;
}

.btt-toc__item a {
  display: block;
  padding: 9px 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--btt-blue);
  text-decoration: none;
  transition: color .15s, padding-left .15s;
}

.btt-toc__item a:hover {
  color: var(--btt-blue-lt);
  padding-left: 8px;
}

.btt-toc__item--h3 a {
  padding-left: 18px;
  font-size: 13px;
  color: var(--btt-muted);
  font-weight: 500;
}

.btt-toc__item--h3 a:hover {
  color: var(--btt-blue);
  padding-left: 24px;
}

/* ── Post content wrapper ──────────────────────────────────── */
.btt-content {
  background: var(--btt-white);
  border: 1px solid var(--btt-border);
  border-radius: var(--btt-radius-lg);
  padding: 32px 36px;
  margin-bottom: 18px;
  box-shadow: var(--btt-shadow);
  font-size: 16.5px;
  line-height: 1.85;
  color: var(--btt-slate);
}

.btt-content h2,
.btt-content h3,
.btt-content h4 {
  font-weight: 800;
  color: var(--btt-slate);
  line-height: 1.35;
  margin: 1.8em 0 .6em;
  scroll-margin-top: calc(var(--btt-header-h) + 16px);
}

.btt-content h2 {
  font-size: 23px;
  border-bottom: 2px solid var(--btt-border);
  padding-bottom: 10px;
}

.btt-content h3 {
  font-size: 19px;
  margin-top: 1.4em;
}

.btt-content p {
  margin: 0 0 1em;
}

.btt-content a {
  color: var(--btt-blue);
}

.btt-content a:hover {
  color: var(--btt-blue-lt);
}

.btt-content code {
  font-family: 'Courier New', monospace;
  font-size: 12.5px;
  background: #f1f5f9;
  border: 1px solid var(--btt-border);
  border-radius: 4px;
  padding: 2px 6px;
}

.btt-content pre {
  background: #1e293b;
  color: #e2e8f0;
  border-radius: var(--btt-radius);
  padding: 18px;
  overflow-x: auto;
  font-size: 13px;
  margin: 1em 0;
  line-height: 1.6;
}

.btt-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--btt-radius);
  margin: .8em 0;
}

/* ── Resource / comparison card grid ───────────────────────── */
.btt-fw-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin: 1.4em 0;
}

.btt-fw-card {
  background: var(--btt-white);
  border: 1px solid var(--btt-border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 4px rgba(15,23,42,.06);
  transition: box-shadow .22s, transform .22s;
}

.btt-fw-card:hover {
  box-shadow: 0 8px 28px rgba(15,23,42,.12);
  transform: translateY(-3px);
}

/* Thin accent stripe at top */
.btt-fw-card__accent {
  height: 4px;
  width: 100%;
  flex-shrink: 0;
}

/* Card body */
.btt-fw-card__body {
  padding: 14px 16px 10px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Card headline */
.btt-fw-card__model {
  font-size: 15.5px;
  font-weight: 800;
  color: var(--btt-slate);
  line-height: 1.3;
  word-break: break-word;
}

/* Specs — 2-column tile grid */
.btt-fw-card__specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.btt-fw-spec {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: #f8fafc;
  border: 1px solid var(--btt-border);
  border-radius: 6px;
  padding: 6px 9px;
}

.btt-fw-spec__k {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--btt-muted);
}

.btt-fw-spec__v {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--btt-slate);
  word-break: break-word;
  line-height: 1.35;
}

/* Footer: icon + source name + open button */
.btt-fw-card__footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px 12px;
  border-top: 1px solid var(--btt-border);
  margin-top: auto;
}

.btt-fw-card__logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  font-size: 10px;
  font-weight: 900;
  color: #fff;
  flex-shrink: 0;
  letter-spacing: -.3px;
}

.btt-fw-card__service {
  font-size: 13px;
  font-weight: 600;
  color: var(--btt-muted);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btt-fw-card__btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 9px 18px;
  border-radius: 7px;
  font-size: 13.5px;
  font-weight: 700;
  color: #fff !important;
  text-decoration: none !important;
  flex-shrink: 0;
  transition: opacity .15s, transform .15s;
}

.btt-fw-card__btn:hover {
  opacity: .88;
  transform: scale(1.03);
}

/* ── Definition List ───────────────────────────────────────── */
.btt-content dl {
  display: grid;
  grid-template-columns: minmax(150px,200px) 1fr;
  border: 1px solid var(--btt-border);
  border-radius: var(--btt-radius);
  overflow: hidden;
  font-size: 13.5px;
  margin: 1em 0;
}

.btt-content dt {
  background: #f1f5f9;
  font-weight: 700;
  color: var(--btt-slate);
  padding: 10px 14px;
  border-top: 1px solid var(--btt-border);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .4px;
}

.btt-content dd {
  padding: 10px 14px;
  border-top: 1px solid var(--btt-border);
  margin: 0;
  color: var(--btt-slate);
  line-height: 1.6;
}

.btt-content dt:first-of-type,
.btt-content dd:first-of-type {
  border-top: none;
}

/* ── Notice boxes ───────────────────────────────────────────── */
.btt-content div[style*="border-left"] {
  border-radius: var(--btt-radius) !important;
  margin: 1.4em 0 !important;
  font-size: 14px;
  line-height: 1.7;
}

/* ── Details / summary ─────────────────────────────────────── */
.btt-content details {
  border: 1px solid var(--btt-border);
  border-left: 4px solid var(--btt-sky);
  border-radius: var(--btt-radius);
  margin: 1.2em 0;
  background: var(--btt-white);
}

.btt-content summary {
  padding: 13px 16px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  color: var(--btt-slate);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
}

.btt-content summary::-webkit-details-marker {
  display: none;
}

/* FIX: Suppress the standard ::marker pseudo-element on summary elements
   inside content, which was leaking through in modern browsers. */
.btt-content summary::marker {
  display: none;
  content: '';
}

.btt-content summary::after {
  content: '▸';
  margin-left: auto;
  color: var(--btt-muted);
  font-size: 14px;
  transition: transform .2s;
}

.btt-content details[open] > summary::after {
  transform: rotate(90deg);
}

.btt-content summary:hover {
  background: #f8fafc;
}

.btt-content details > *:not(summary) {
  padding: 0 16px 16px;
}

/* ── FAQ items ─────────────────────────────────────────────── */
.btt-faq-item {
  border: 1px solid var(--btt-border);
  border-radius: var(--btt-radius);
  margin: 8px 0;
  background: var(--btt-white);
  overflow: hidden;
  transition: box-shadow .2s;
}

.btt-faq-item[open] {
  box-shadow: 0 2px 12px rgba(15,23,42,.08);
  border-color: #bfdbfe;
}

.btt-faq-q {
  padding: 15px 18px;
  font-weight: 700;
  font-size: 15.5px;
  color: var(--btt-slate);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  user-select: none;
  line-height: 1.4;
}

.btt-faq-q::-webkit-details-marker {
  display: none;
}

/* FIX: Suppress ::marker on FAQ summary elements. */
.btt-faq-q::marker {
  display: none;
  content: '';
}

/* FIX: The original ::before used content:'❓' (an emoji) while simultaneously
   applying background-color, color:#fff, and border-radius to make a coloured
   circle — but an emoji character ignores CSS colour properties, so the circle
   background was invisible and the styling was wasted. Replaced with a plain
   "Q" text label that actually respects the colour rules. */
.btt-faq-q::before {
  content: 'Q';
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  background: var(--btt-blue);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

.btt-faq-q::after {
  content: '+';
  margin-left: auto;
  flex-shrink: 0;
  font-size: 22px;
  font-weight: 300;
  color: var(--btt-muted);
  transition: transform .22s;
  line-height: 1;
}

.btt-faq-item[open] .btt-faq-q::after {
  transform: rotate(45deg);
  color: var(--btt-blue);
}

.btt-faq-q:hover {
  background: #f8fafc;
}

.btt-faq-a {
  padding: 0 18px 18px 54px;
  font-size: 15px;
  line-height: 1.75;
  color: var(--btt-slate);
  border-top: 1px solid var(--btt-border);
}

.btt-faq-a p {
  margin: .8em 0;
}

/* ── Step list ─────────────────────────────────────────────── */
.btt-content ol.btt-steps {
  list-style: none;
  padding: 0;
  margin: 1em 0;
  counter-reset: step-counter;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btt-content ol.btt-steps > li {
  counter-increment: step-counter;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--btt-white);
  border: 1px solid var(--btt-border);
  border-radius: var(--btt-radius);
  padding: 14px 16px;
  box-shadow: 0 1px 4px rgba(15,23,42,.05);
  transition: box-shadow .2s;
}

.btt-content ol.btt-steps > li:hover {
  box-shadow: 0 3px 12px rgba(15,23,42,.10);
}

.btt-content ol.btt-steps > li::before {
  content: counter(step-counter);
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: var(--btt-blue);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

/* ── Checklist ─────────────────────────────────────────────── */
.btt-content ul.btt-checklist {
  list-style: none;
  padding: 0;
  margin: 1em 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btt-content ul.btt-checklist > li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 14px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--btt-radius);
  font-size: 14px;
  line-height: 1.6;
}

.btt-content ul.btt-checklist > li::before {
  content: '✓';
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  background: var(--btt-green);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

/* ── Regular lists ─────────────────────────────────────────── */
.btt-content ol:not(.btt-steps) {
  padding-left: 0;
  margin: .8em 0;
  list-style: none;
  counter-reset: ol-counter;
}

.btt-content ol:not(.btt-steps) > li {
  counter-increment: ol-counter;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 0 8px;
  align-items: start;
  padding: 8px 0;
  border-bottom: 1px solid #f1f5f9;
}

.btt-content ol:not(.btt-steps) > li::before {
  content: counter(ol-counter) '.';
  grid-column: 1;
  grid-row: 1;
  font-weight: 700;
  color: var(--btt-blue);
  font-size: 13px;
  line-height: 1.7;
  margin-top: 1px;
}

.btt-content ol:not(.btt-steps) > li > * {
  grid-column: 2;
  min-width: 0;
}

.btt-content ol:not(.btt-steps) > li > p {
  margin: 0;
}

.btt-content ol:not(.btt-steps) > li > p + p {
  margin-top: .6em;
}

/* FIX: Nested lists inside ordered list items were also being pushed to
   grid-column 2 but had no left-padding, making them visually collapse.
   Restore sensible indent for nested lists. */
.btt-content ol:not(.btt-steps) > li > ul,
.btt-content ol:not(.btt-steps) > li > ol {
  margin-top: .4em;
  padding-left: 4px;
}

.btt-content ul:not(.btt-checklist) {
  list-style: none;
  padding: 0;
  margin: .8em 0;
}

.btt-content ul:not(.btt-checklist) > li {
  padding: 5px 0 5px 20px;
  position: relative;
  border-bottom: 1px solid #f1f5f9;
}

.btt-content ul:not(.btt-checklist) > li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--btt-blue);
  font-size: 12px;
  top: 7px;
}

/* ── Author box ────────────────────────────────────────────── */
.btt-author-box {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid var(--btt-border);
  border-radius: var(--btt-radius-lg);
  padding: 20px;
  margin: 0 0 18px;
  box-shadow: var(--btt-shadow);
}

.btt-author-box__avatar {
  flex: 0 0 auto;
  width: 88px;
  height: 88px;
}

.btt-author-box__avatar img {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  display: block;
  object-fit: cover;
  border: 3px solid #e2e8f0;
}

.btt-author-box__body {
  min-width: 0;
}

.btt-author-box__title {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--btt-muted);
  margin: 0 0 8px;
}

.btt-author-box__name {
  font-size: 18px;
  font-weight: 800;
  color: var(--btt-slate);
  margin: 0 0 8px;
}

.btt-author-box__bio {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.7;
  color: #475569;
}

.btt-author-box__link {
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  color: var(--btt-blue);
}

.btt-author-box__link:hover {
  text-decoration: underline;
}

/* ── Post meta footer strip ────────────────────────────────── */
.btt-post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding: 12px 18px;
  background: var(--btt-white);
  border: 1px solid var(--btt-border);
  border-radius: var(--btt-radius);
  font-size: 12px;
  color: var(--btt-muted);
  font-weight: 600;
  margin-bottom: 20px;
}

.btt-post-meta__cat {
  color: var(--btt-blue);
  text-decoration: none;
  font-weight: 700;
}

.btt-post-meta__cat:hover {
  text-decoration: underline;
}

/* ── Comments collapsible wrapper (single.php) ─────────────── */
.btt-comments-wrap {
  background: var(--btt-white);
  border: 1px solid var(--btt-border);
  border-radius: var(--btt-radius-lg);
  margin-bottom: 24px;
  overflow: hidden;
}

.btt-comments-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 22px;
  font-size: 15px;
  font-weight: 700;
  color: var(--btt-slate);
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.btt-comments-toggle::-webkit-details-marker {
  display: none;
}

/* FIX: Suppress ::marker on the comments toggle summary. */
.btt-comments-toggle::marker {
  display: none;
  content: '';
}

.btt-comments-toggle:hover {
  background: #f8fafc;
}

.btt-comments-toggle__icon {
  font-size: 18px;
}

.btt-comments-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: #2563eb;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  border-radius: 99px;
}

/* FIX: The original .btt-comments-toggle__chevron used a ::after pseudo
   on an empty <span>. An empty inline element has no height, so the
   pseudo-element collapsed and the chevron never rendered.
   Solution: give the span explicit dimensions and display so it
   establishes a proper formatting context for the ::after. */
.btt-comments-toggle__chevron {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btt-comments-toggle__chevron::after {
  content: '▾';
  font-size: 12px;
  color: var(--btt-muted);
  line-height: 1;
}

details[open] .btt-comments-toggle__chevron::after {
  content: '▴';
}

.btt-comments-body {
  padding: 0 22px 22px;
  border-top: 1px solid var(--btt-border);
}

/* ── Comment list ───────────────────────────────────────────── */
.btt-comments {
  padding-top: 4px;
}

.btt-comments__header {
  padding: 16px 0 4px;
}

.btt-comments__title {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

.btt-comments__title span {
  color: #2563eb;
}

.btt-comment-list {
  list-style: none;
  padding: 0;
  margin: 0 0 8px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Each comment */
.btt-comment {
  border-bottom: 1px solid #f1f5f9;
  padding: 16px 0;
}

.btt-comment:last-child {
  border-bottom: none;
}

.btt-comment.depth-2 { margin-left: 32px; }
.btt-comment.depth-3 { margin-left: 56px; }
.btt-comment.depth-4 { margin-left: 72px; }

.btt-comment__inner {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.btt-comment__avatar-img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 2px solid #f1f5f9;
}

.btt-comment__body {
  flex: 1;
  min-width: 0;
}

.btt-comment__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}

.btt-comment__author {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
}

.btt-comment__time {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 11.5px;
  color: #94a3b8;
}

.btt-comment__pending {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 10.5px;
  font-weight: 700;
  color: #d97706;
  background: #fef3c7;
  padding: 2px 7px;
  border-radius: 99px;
}

.btt-comment__text {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 13.5px;
  color: #334155;
  line-height: 1.7;
}

.btt-comment__text p {
  margin: 0 0 8px;
}

.btt-comment__text p:last-child {
  margin: 0;
}

.btt-comment__text a {
  color: #2563eb;
}

.btt-comment__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.btt-comment__reply-link {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: #2563eb;
  text-decoration: none;
  transition: color .15s;
}

.btt-comment__reply-link:hover {
  color: #1d4ed8;
}

.btt-comment__edit a {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
  text-decoration: none;
}

.btt-comment__pingback {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 12.5px;
  color: #64748b;
  padding: 8px 0;
}

/* ── Comment form ───────────────────────────────────────────── */
.btt-comment-form-wrap {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1.5px solid #f1f5f9;
}

.btt-cf-title {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 16px;
}

#cancel-comment-reply-link {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
  text-decoration: none;
  margin-left: 10px;
}

#cancel-comment-reply-link:hover {
  color: #ef4444;
}

.btt-cf-logged-in {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 12.5px;
  color: #64748b;
  margin: 0 0 16px;
  padding: 10px 14px;
  background: #f8f9fb;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.btt-cf-logged-in strong {
  color: #0f172a;
}

.btt-cf-logged-in a {
  color: #2563eb;
}

.btt-cf {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.btt-cf-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.btt-cf-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.btt-cf-field--full {
  grid-column: 1 / -1;
}

.btt-cf-label {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: .4px;
}

.btt-cf-required {
  color: #ef4444;
}

.btt-cf-input,
.btt-cf-textarea {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 13.5px;
  color: #0f172a;
  background: #f8f9fb;
  border: 1.5px solid #e2e8f0;
  border-radius: 9px;
  padding: 10px 13px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

.btt-cf-input:focus,
.btt-cf-textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,.1);
  background: #fff;
}

.btt-cf-textarea {
  resize: vertical;
  min-height: 120px;
}

.btt-cf-field--cookie {
  flex-direction: row;
  align-items: center;
}

.btt-cf-cookie-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 12.5px;
  color: #64748b;
  cursor: pointer;
}

.btt-cf-cookie-label input[type="checkbox"] {
  width: 14px;
  height: 14px;
  accent-color: #2563eb;
  flex-shrink: 0;
}

.btt-cf-submit-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btt-cf-submit {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 11px 24px;
  background: #0f172a;
  color: #fff;
  border: none;
  border-radius: 99px;
  cursor: pointer;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 700;
  transition: background .18s, box-shadow .18s;
}

.btt-cf-submit:hover {
  background: #1e40af;
  box-shadow: 0 4px 14px rgba(15,23,42,.2);
}

/* ── Comments closed ────────────────────────────────────────── */
.btt-comments-closed {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 0;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 13.5px;
  color: #94a3b8;
}

.btt-comments-closed span {
  font-size: 18px;
}

.btt-comments-closed p {
  margin: 0;
}

/* ── Comment pagination ─────────────────────────────────────── */
.btt-comments-pagination {
  margin: 16px 0;
}

.btt-comments-pagination .page-numbers {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0;
}

.btt-comments-pagination .page-numbers a,
.btt-comments-pagination .page-numbers span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border-radius: 7px;
  border: 1.5px solid #e2e8f0;
  background: #fff;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  color: #475569;
  text-decoration: none;
  transition: border-color .15s, background .15s;
}

.btt-comments-pagination .page-numbers a:hover {
  border-color: #2563eb;
  color: #2563eb;
  background: #eff6ff;
}

.btt-comments-pagination .page-numbers .current {
  background: #0f172a;
  border-color: #0f172a;
  color: #fff;
}

/* ── Protected post ─────────────────────────────────────────── */
.btt-comments-protected {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 13.5px;
  color: #64748b;
  padding: 16px 0;
}

/* ── Sidebar ───────────────────────────────────────────────── */
.btt-sidebar {
  position: sticky;
  top: calc(var(--btt-header-h) + 20px);
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.btt-sidebar-box {
  background: var(--btt-white);
  border: 1px solid var(--btt-border);
  border-radius: var(--btt-radius-lg);
  padding: 20px;
  box-shadow: var(--btt-shadow);
  overflow: hidden;
}

.btt-sidebar-box--recent {
  border-top: 3px solid #2563eb;
}

.btt-sidebar-box--topics {
  border-top: 3px solid var(--btt-sky);
}

/* Recent posts — attention-grabbing */
.btt-recent-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btt-recent-item {
  margin: 0;
}

.btt-recent-card {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 12px;
  align-items: stretch;
  text-decoration: none;
  color: inherit;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(15,23,42,.06);
  transition: transform .18s, box-shadow .18s, border-color .18s;
}

.btt-recent-card:hover {
  transform: translateY(-3px);
  border-color: #bfdbfe;
  box-shadow: 0 10px 28px rgba(37,99,235,.14);
}

.btt-recent-card__thumb {
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  background: linear-gradient(160deg, #dbeafe 0%, #e0f2fe 100%);
  min-height: 88px;
  overflow: hidden;
}

.btt-recent-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.btt-recent-card__thumb-fallback {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  color: #2563eb;
}

.btt-recent-card__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 12px 12px 0;
  min-width: 0;
}

.btt-recent-card__badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 3px 8px;
  border-radius: 99px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.btt-recent-card__title {
  font-size: 14px;
  line-height: 1.45;
  font-weight: 800;
  color: var(--btt-slate);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.btt-recent-card__meta {
  font-size: 11.5px;
  font-weight: 600;
  color: #64748b;
}

.btt-recent-empty {
  margin: 0;
  font-size: 14px;
  color: #64748b;
  line-height: 1.7;
}

/* Topic chips */
.btt-brand-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btt-brand-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  background: var(--btt-bg);
  color: var(--btt-slate);
  border: 1px solid var(--btt-border);
  transition: background .18s, color .18s, border-color .18s, box-shadow .18s;
}

.btt-brand-chip:hover,
.btt-brand-chip:focus-visible {
  background: #1d4ed8;
  color: #fff !important;
  border-color: #1d4ed8;
  box-shadow: 0 8px 20px rgba(29, 78, 216, .20);
  outline: none;
}

.btt-brand-chip__count {
  font-size: 10px;
  background: rgba(0,0,0,.08);
  border-radius: 99px;
  padding: 1px 6px;
  font-weight: 800;
}

.btt-brand-chip:hover .btt-brand-chip__count,
.btt-brand-chip:focus-visible .btt-brand-chip__count {
  background: rgba(255,255,255,.20);
  color: #fff;
}

/* ── Content tables — responsive ──────────────────────────── */

/* Base: make every inline table scrollable horizontally rather than
   blowing out the page width on narrow viewports. */
.btt-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.55;
  /* Render as a block so overflow-x actually works */
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.btt-content table td,
.btt-content table th {
  white-space: normal;
  min-width: 90px;
  vertical-align: top;
}

/* Zebra row fallback for rows without an inline background colour */
.btt-content table tbody tr:nth-child(even):not([style*="background"]) {
  background-color: #f8fafc;
}

/* Optional JS-injected wrapper (progressive enhancement).
   When single.php wraps tables in .btt-table-wrap, the table itself
   reverts to normal table display and the wrapper handles the scroll. */
.btt-table-wrap {
  position: relative;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.4em 0;
  border-radius: var(--btt-radius);
  border: 1px solid var(--btt-border);
  /* Shadow on right edge signals more content to scroll */
  box-shadow: inset -10px 0 14px -10px rgba(15,23,42,.10);
}

.btt-table-wrap table {
  display: table;   /* override block display set above */
  overflow: visible;
  margin: 0;
  border: none;
  border-radius: 0;
  width: 100%;
}

@media (max-width: 680px) {
  .btt-content table {
    font-size: 13px;
  }

  .btt-content table td,
  .btt-content table th {
    padding: 8px !important;
    min-width: 80px;
  }
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .btt-single__layout {
    grid-template-columns: 1fr;
  }

  .btt-sidebar {
    display: none;
  }
}

@media (max-width: 680px) {
  .btt-single__layout {
    padding: 14px 14px 24px; /* FIX: also halved mobile bottom padding */
  }

  .btt-hero {
    grid-template-columns: 1fr;
  }

  .btt-hero__img {
    min-height: 180px;
    max-height: 220px;
    padding: 10px;
  }

  .btt-hero__body {
    padding: 18px;
  }

  .btt-hero__title {
    font-size: 17px;
  }

  .btt-content {
    padding: 18px 16px;
    font-size: 15px;
  }

  .btt-content h2 {
    font-size: 18px;
  }

  .btt-content dl {
    grid-template-columns: 1fr;
  }

  .btt-content dt {
    border-top: 1px solid var(--btt-border);
    padding-bottom: 2px;
  }

  .btt-content dd {
    border-top: none;
    padding-top: 4px;
  }

  .btt-faq-a {
    padding-left: 18px;
  }

  .btt-meta-bar__item {
    min-width: 80px;
  }

  .btt-fw-grid {
    grid-template-columns: 1fr;
  }

  .btt-author-box {
    flex-direction: column;
  }

  .btt-author-box__avatar,
  .btt-author-box__avatar img {
    width: 72px;
    height: 72px;
  }

  .btt-recent-card {
    grid-template-columns: 76px 1fr;
  }

  /* FIX: Comment form two-column row collapses to single column on mobile
     so the email/name inputs don't overflow the viewport. */
  .btt-cf-row {
    grid-template-columns: 1fr;
  }

  /* FIX: Inputs and textareas are constrained to the available width
     and cannot grow beyond it, preventing horizontal overflow. */
  .btt-cf-input,
  .btt-cf-textarea {
    width: 100%;
    box-sizing: border-box;
    max-width: 100%;
  }

  /* FIX: Comments body padding reduced on mobile so form content
     doesn't push outside the card edge. */
  .btt-comments-body {
    padding: 0 14px 16px;
  }
}