/**
 * Nimmo — Single Post Redesign
 * Palette: Pure Black + White — zero blue
 * Fonts: Fraunces (display) · Lora (body) · Instrument Sans (UI)
 */

/* ================================================================
   DESIGN TOKENS — BLACK / WHITE / GREY ONLY
   ================================================================ */
:root {
  /* Premium Dark Monochrome Palette */
  --sp-navy:        #0a0a0a;
  --sp-navy-soft:   #1a1a1a;
  --sp-blue:        #0a0a0a;
  --sp-blue-mid:    #2a2a2a;
  --sp-blue-bright: #4a4a4a;
  --sp-blue-tint:   #f0f0f0;
  --sp-blue-pale:   #f7f7f7;

  /* Neutrals */
  --sp-ink:         #0a0a0a;
  --sp-ink-soft:    #1a1a1a;
  --sp-ink-muted:   #555555;
  --sp-ink-faint:   #999999;
  --sp-rule:        #e5e5e5;
  --sp-rule-strong: #d0d0d0;
  --sp-bg:          #ffffff;
  --sp-bg-warm:     #f6f6f6;
  --sp-bg-blue:     #f4f4f4;

  /* Typography */
  --sp-font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sp-font-body:    'Lora', Georgia, serif;
  --sp-font-ui:      'Instrument Sans', system-ui, sans-serif;
  --sp-font-mono:    'JetBrains Mono', 'Fira Code', monospace;

  /* Sizing */
  --sp-col:         680px;
  --sp-wide:        1000px;
  --sp-max:         1280px;

  /* Motion */
  --sp-ease:        cubic-bezier(0.4, 0, 0.2, 1);
  --sp-fast:        0.15s var(--sp-ease);
  --sp-mid:         0.25s var(--sp-ease);
  --sp-slow:        0.4s  var(--sp-ease);

  /* Premium Shadows */
  --sp-shadow-xs:   0 1px 3px rgba(0,0,0,.06);
  --sp-shadow-sm:   0 2px 8px rgba(0,0,0,.08);
  --sp-shadow-md:   0 4px 20px rgba(0,0,0,.10);
  --sp-shadow-lg:   0 8px 40px rgba(0,0,0,.14);
  --sp-shadow-xl:   0 16px 60px rgba(0,0,0,.12);
  --sp-shadow-blue: 0 4px 20px rgba(0,0,0,.12);

  /* Accent gradient */
  --sp-accent-gradient: linear-gradient(135deg, #0a0a0a 0%, #333333 100%);
}

/* ================================================================
   RESET OVERRIDES — Strip Nimmo theme from single posts
   ================================================================ */

/* ---- HIDE SKIP LINK COMPLETELY ---- */
.nr-skip-link,
.sp-skip-link,
a[href="#main"].nr-skip-link,
a[href="#main"].sp-skip-link {
  display: none !important;
}

/* ---- HIDE DUPLICATE PAGE TITLE BAR ON SINGLE POSTS ---- */
body.single #pagetitle,
body.single .page-title.bg-overlay,
body.single .page-title-wrap,
body.single #page-title {
  display: none !important;
}

body.single {
  background: #ffffff !important;
  background-color: #ffffff !important;
  color: #1a1a1a !important;
  font-family: var(--sp-font-body);
}

body.single .content-inner,
body.single .site-content,
body.single .content-area,
body.single #page,
body.single #content,
body.single .page-wrapper,
body.single .wrapper,
body.single main,
body.single #main {
  background: #ffffff !important;
  background-color: #ffffff !important;
  padding: 0;
  overflow-x: hidden;
}

/* Override blog-redesign paper background on single posts */
body.single .nr-post-wrapper,
body.single .nr-entry-content,
body.single [class*="nr-"] {
  background: #ffffff !important;
}

/* Aggressively reset any dark wrappers from theme.css */
body.single .ct-inner-content,
body.single .site-main,
body.single #content-single-wrap,
body.single .sp-article-inner,
body.single .sp-article,
body.single .sp-content-col {
  background: #ffffff !important;
  color: #1a1a1a !important;
}

body.single #primary {
  width: 100%;
  max-width: 100%;
  padding: 0;
  float: none;
  background: #ffffff !important;
}

body.single .container.content-container {
  max-width: 100%;
  width: 100%;
  padding: 0;
  margin: 0;
  background: #ffffff !important;
}

body.single .row.content-row {
  margin: 0;
}

/* ================================================================
   BUTTON CLARITY OVERRIDES — Ensure all buttons are sharp & clear
   ================================================================ */

/* Share button in sticky nav */
.sp-nav-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--sp-font-ui);
  font-size: 0.8125rem;
  font-weight: 700;
  color: #ffffff !important;
  background: #111111 !important;
  border: none;
  border-radius: 99px;
  padding: 8px 18px;
  cursor: pointer;
  letter-spacing: 0.01em;
  transition: background var(--sp-fast), transform var(--sp-fast), box-shadow var(--sp-fast);
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
}

.sp-nav-share-btn:hover {
  background: #000000 !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0,0,0,.12);
}

/* Clap button */
.sp-clap-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--sp-font-ui);
  font-size: 0.875rem;
  font-weight: 700;
  color: #111111 !important;
  background: #eef3ff !important;
  border: 1.5px solid #111111 !important;
  border-radius: 99px;
  padding: 7px 16px;
  cursor: pointer;
  transition: all var(--sp-fast);
  user-select: none;
}

.sp-clap-btn:hover {
  background: #111111 !important;
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
}

/* Floating sidebar buttons — handled in main .sp-float-btn block below */

/* TOC toggle button */
.sp-toc__label {
  cursor: pointer;
  color: #111111 !important;
  font-weight: 700;
}

/* Post nav items */
.sp-post-nav__item {
  background: #f8f8f8 !important;
  border: 1px solid #e0e0e0 !important;
  border-radius: 12px;
  padding: 20px 24px;
  text-decoration: none;
  transition: all var(--sp-mid);
}

.sp-post-nav__item:hover {
  background: #ffffff !important;
  border-color: #111111 !important;
  box-shadow: 0 4px 20px rgba(0,0,0,.12);
  transform: translateY(-2px);
}

/* Meta row share button */
.sp-meta-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--sp-font-ui);
  font-size: 0.8125rem;
  font-weight: 600;
  color: #555555;
  background: transparent;
  border: 1.5px solid #e0e0e0;
  border-radius: 99px;
  padding: 6px 14px;
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.4,0,0.2,1);
}

.sp-meta-share-btn:hover {
  color: #111111;
  border-color: #111111;
  background: #f9f9f9;
}



/* ================================================================
   READING PROGRESS BAR
   ================================================================ */
#nr-reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, #0a0a0a 0%, #4a4a4a 50%, #0a0a0a 100%);
  z-index: 99999;
  transition: width 0.08s linear;
  box-shadow: 0 0 16px rgba(0,0,0,.15);
}

/* ================================================================
   FLOATING NAV BAR (Medium-style sticky top)
   ================================================================ */
.sp-sticky-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--sp-rule);
  height: 60px;
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 16px;
  transition: box-shadow var(--sp-mid);
}

.sp-sticky-nav.scrolled {
  box-shadow: 0 4px 24px rgba(0,0,0,.08);
  border-bottom-color: var(--sp-rule-strong);
}

.sp-sticky-nav__title {
  font-family: var(--sp-font-ui);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--sp-ink);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity var(--sp-mid), transform var(--sp-mid);
}

.sp-sticky-nav.title-visible .sp-sticky-nav__title {
  opacity: 1;
  transform: translateY(0);
}

.sp-sticky-nav__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Share button in nav */
.sp-nav-share-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--sp-font-ui);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--sp-bg);
  background: var(--sp-blue);
  border: none;
  border-radius: 99px;
  padding: 7px 16px;
  cursor: pointer;
  transition: background var(--sp-fast), transform var(--sp-fast);
}

.sp-nav-share-btn:hover {
  background: var(--sp-navy);
  transform: translateY(-1px);
}

/* ================================================================
   ARTICLE WRAPPER
   ================================================================ */
.sp-article {
  position: relative;
  padding-bottom: 80px;
}

/* ================================================================
   HERO IMAGE — Full Bleed
   ================================================================ */
.sp-hero {
  width: 100%;
  height: 560px;
  overflow: hidden;
  position: relative;
  margin-bottom: 0;
  background: #f0f0f0;
  border-radius: 16px;
  box-shadow: var(--sp-shadow-xl), 0 0 0 1px rgba(0,0,0,.06);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sp-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,0.4) 100%);
  pointer-events: none;
  z-index: 1;
}

.sp-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  transition: transform 0.8s var(--sp-ease);
}

.sp-hero:hover img {
  transform: scale(1.02);
}

.sp-hero figcaption {
  position: absolute;
  bottom: 16px;
  right: 20px;
  font-family: var(--sp-font-ui);
  font-size: 0.75rem;
  color: rgba(255,255,255,0.9);
  background: rgba(0,0,0,0.5);
  padding: 4px 12px;
  border-radius: 6px;
  backdrop-filter: blur(8px);
  z-index: 2;
}

/* ================================================================
   CONTENT COLUMN — Centered Reading Column
   ================================================================ */
.sp-content-col {
  max-width: var(--sp-col);
  margin: 0 auto;
  padding: 0 24px;
}

/* ================================================================
   PUBLICATION LABEL
   ================================================================ */
.sp-pub-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 40px 0 0;
  margin-bottom: 24px;
}

.sp-pub-label__icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--sp-rule);
}

.sp-pub-label__name {
  font-family: var(--sp-font-ui);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--sp-ink-soft);
  text-decoration: none;
  transition: color var(--sp-fast);
}

.sp-pub-label__name:hover {
  color: var(--sp-blue);
}

/* ================================================================
   POST TITLE & SUBTITLE
   ================================================================ */
.sp-title {
  font-family: var(--sp-font-display);
  font-optical-sizing: auto;
  font-size: clamp(2.2rem, 6vw, 3.5rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--sp-navy);
  margin: 0 0 20px;
  transition: opacity 0.6s var(--sp-ease);
  text-wrap: pretty;
}

.sp-subtitle {
  font-family: var(--sp-font-body);
  font-size: clamp(1.15rem, 2.4vw, 1.4rem);
  font-weight: 400;
  font-style: italic;
  color: var(--sp-ink-muted);
  line-height: 1.65;
  margin: 0 0 36px;
  text-wrap: pretty;
}

/* ================================================================
   AUTHOR META ROW — Medium's signature row
   ================================================================ */
.sp-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  border-top: 2px solid var(--sp-navy);
  border-bottom: 1px solid var(--sp-rule);
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.sp-meta-row__author {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.sp-meta-row__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--sp-navy);
  transition: border-color var(--sp-fast), box-shadow var(--sp-fast);
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

.sp-meta-row__avatar:hover {
  border-color: var(--sp-blue);
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
}

.sp-meta-row__info {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}

.sp-meta-row__written-by {
  font-family: var(--sp-font-ui);
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--sp-ink-muted);
  letter-spacing: 0.02em;
  line-height: 1.2;
  margin-bottom: 1px;
}

.sp-meta-row__name {
  font-family: var(--sp-font-ui);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--sp-ink);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sp-meta-row__name:hover {
  color: var(--sp-blue);
}

.sp-meta-row__byline {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--sp-font-ui);
  font-size: 0.8125rem;
  color: var(--sp-ink-muted);
}

.sp-meta-row__byline-sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--sp-ink-faint);
  flex-shrink: 0;
}

.sp-meta-row__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Clap Button */
.sp-clap-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--sp-font-ui);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--sp-blue);
  background: var(--sp-blue-tint);
  border: 1.5px solid var(--sp-blue);
  border-radius: 99px;
  padding: 6px 14px;
  cursor: pointer;
  transition: all var(--sp-fast);
  user-select: none;
}

.sp-clap-btn:hover {
  background: var(--sp-blue);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--sp-shadow-blue);
}

.sp-clap-btn.clapped {
  background: var(--sp-blue);
  color: #fff;
  animation: sp-clap-pop 0.35s var(--sp-ease);
}

@keyframes sp-clap-pop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.15) translateY(-2px); }
  70%  { transform: scale(0.95); }
  100% { transform: scale(1) translateY(-1px); }
}

.sp-clap-icon {
  width: 17px;
  height: 17px;
  transition: transform var(--sp-fast);
}

.sp-clap-btn:hover .sp-clap-icon {
  transform: rotate(-8deg) scale(1.1);
}

/* Reading time pill */
.sp-reading-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--sp-font-ui);
  font-size: 0.8125rem;
  color: var(--sp-ink-muted);
  background: var(--sp-bg-warm);
  border: 1px solid var(--sp-rule);
  border-radius: 99px;
  padding: 5px 12px;
}

.sp-reading-pill svg {
  width: 13px;
  height: 13px;
  stroke: var(--sp-blue);
}

/* ================================================================
   FACT KICKER — randomly selected fact-rich sentence
   ================================================================ */
.sp-kicker {
  position: relative;
  margin: 36px 0 40px;
  padding: 24px 28px 24px 32px;
  background: var(--sp-bg-warm);
  border-radius: 4px;
  box-shadow: var(--sp-shadow-xs);
}

/* Top-left decorative corner strip */
.sp-kicker::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--sp-navy) 0%, var(--sp-navy) 60px, transparent 60px, transparent 100%);
  border-radius: 4px 4px 0 0;
}

/* Left vertical accent strip */
.sp-kicker::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--sp-navy);
  border-radius: 4px 0 0 4px;
}

.sp-kicker__text {
  font-family: var(--sp-font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  font-style: italic;
  line-height: 1.65;
  color: var(--sp-ink-soft);
  margin: 0;
  padding: 0 0 0 20px;
  position: relative;
  z-index: 1;
}

.sp-kicker__text::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.15em;
  bottom: 0.15em;
  width: 2px;
  background: var(--sp-ink-faint);
  opacity: 0.3;
}

/* Bottom decorative rule with end-stops */
.sp-kicker__text::after {
  content: "";
  display: block;
  margin-top: 14px;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, var(--sp-rule) 0%, var(--sp-rule) calc(100% - 24px), transparent 100%);
  position: relative;
}

/* ================================================================
   TABLE OF CONTENTS — Medium-style inline or sidebar
   ================================================================ */
.sp-toc {
  background: var(--sp-bg-warm);
  border: 1px solid var(--sp-rule);
  border-radius: 14px;
  padding: 24px 28px;
  margin: 0 0 48px;
  box-shadow: var(--sp-shadow-xs);
}

.sp-toc__label {
  font-family: var(--sp-font-ui);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sp-blue);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
}

.sp-toc__label svg {
  transition: transform var(--sp-fast);
}

.sp-toc.collapsed .sp-toc__label svg {
  transform: rotate(-90deg);
}

.sp-toc__list {
  list-style: none;
  margin: 0;
  padding: 0;
  transition: max-height 0.3s var(--sp-ease), opacity 0.3s var(--sp-ease);
  max-height: 600px;
  overflow: hidden;
}

.sp-toc.collapsed .sp-toc__list {
  max-height: 0;
  opacity: 0;
}

.sp-toc__list li {
  margin: 0;
}

.sp-toc__list a {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--sp-font-ui);
  font-size: 0.875rem;
  color: var(--sp-ink-soft);
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: color var(--sp-fast), padding-left var(--sp-fast);
  line-height: 1.45;
}

.sp-toc__list a::before {
  content: '';
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sp-rule);
  flex-shrink: 0;
  margin-top: 1px;
  transition: background var(--sp-fast), transform var(--sp-fast);
}

.sp-toc__list a:hover,
.sp-toc__list a.sp-toc--active {
  color: var(--sp-blue);
  padding-left: 4px;
}

.sp-toc__list a:hover::before,
.sp-toc__list a.sp-toc--active::before {
  background: var(--sp-blue);
  transform: scale(1.4);
}

.sp-toc__list .sp-toc--h3 a {
  padding-left: 18px;
  font-size: 0.8125rem;
}

.sp-toc__list .sp-toc--h4 a {
  padding-left: 34px;
  font-size: 0.75rem;
}

/* ================================================================
   ARTICLE BODY — The Reading Experience
   ================================================================ */
.sp-body {
  font-family: var(--sp-font-body);
  font-size: 1.125rem;
  line-height: 1.82;
  color: #1a1a1a;
  background: #ffffff;
  counter-reset: figure;
}

/* First paragraph drop cap */
.sp-body > p:first-of-type::first-letter {
  font-family: var(--sp-font-display);
  font-size: 4.8em;
  font-weight: 800;
  float: left;
  line-height: 0.7;
  margin-right: 0.08em;
  margin-top: 0.1em;
  color: var(--sp-navy);
}

.sp-body p {
  margin: 0 0 1.65em;
}

/* Headings */
.sp-body h1,
.sp-body h2,
.sp-body h3,
.sp-body h4,
.sp-body h5,
.sp-body h6 {
  font-family: var(--sp-font-display);
  font-optical-sizing: auto;
  color: var(--sp-navy);
  margin: 2.2em 0 0.7em;
  line-height: 1.18;
  scroll-margin-top: 72px;
}

.sp-body h2 {
  font-size: clamp(1.6rem, 3.2vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  position: relative;
}

.sp-body h3 {
  font-size: clamp(1.25rem, 2.6vw, 1.45rem);
  font-weight: 700;
}

.sp-body h4 {
  font-family: var(--sp-font-ui);
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--sp-ink);
}

/* Links */
.sp-body a {
  color: var(--sp-blue);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--sp-fast), text-decoration-color var(--sp-fast);
}

.sp-body a:hover {
  color: var(--sp-navy);
  text-decoration-color: var(--sp-navy);
}

.sp-body a:focus-visible {
  outline: 2px solid var(--sp-blue);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Strong / Em */
.sp-body strong { font-weight: 700; color: var(--sp-ink); }
.sp-body em     { font-style: italic; }

/* Blockquote — full reset of parent theme.css pseudo-elements */

/* 1. Kill the 110×110px white circle (::after) from theme.css */
.sp-body blockquote::after,
.entry-content blockquote::after,
body.single blockquote::after {
  content: '' !important;
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  background: none !important;
}

/* 2. Kill the broken FontAwesome gradient ::before, replace with clean CSS mark */
.sp-body blockquote::before,
.entry-content blockquote::before,
body.single blockquote::before {
  content: '\201C' !important;
  font-family: Georgia, 'Times New Roman', serif !important;
  font-size: 3.5rem !important;
  line-height: 1 !important;
  /* Strip every background-clip / gradient / fill trick from parent */
  background: none !important;
  background-color: transparent !important;
  background-image: none !important;
  -webkit-background-clip: unset !important;
  background-clip: unset !important;
  -webkit-text-fill-color: #cccccc !important;
  color: #cccccc !important;
  position: absolute !important;
  top: 12px !important;
  left: 16px !important;
  z-index: 3 !important;
  pointer-events: none !important;
}

/* 3. Clean container */
.sp-body blockquote {
  position: relative;
  margin: 2.5em 0;
  padding: 24px 28px 24px 56px;
  background-color: #f9f9f9;
  background-image: none;
  border-left: 4px solid var(--sp-navy);
  border-radius: 0 12px 12px 0;
  overflow: visible;
  box-shadow: var(--sp-shadow-xs);
}

.sp-body blockquote p {
  font-family: var(--sp-font-display);
  font-optical-sizing: auto;
  font-size: clamp(1.1rem, 2.2vw, 1.375rem);
  font-style: italic;
  font-weight: 500;
  color: var(--sp-navy);
  line-height: 1.55;
  margin-bottom: 0.5em;
}

.sp-body blockquote cite {
  font-family: var(--sp-font-ui);
  font-size: 0.8125rem;
  color: var(--sp-ink-muted);
  font-style: normal;
}


/* Code */
.sp-body pre,
.sp-body code {
  font-family: var(--sp-font-mono);
}

.sp-body pre {
  background: #0d0d0d;
  color: #c9d1d9;
  padding: 28px 32px;
  border-radius: 14px;
  overflow-x: auto;
  margin: 2.5em 0;
  font-size: 0.875em;
  line-height: 1.7;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 8px 32px rgba(0,0,0,.18);
  position: relative;
}

.sp-body :not(pre) > code {
  background: var(--sp-blue-tint);
  color: var(--sp-blue);
  padding: 0.15em 0.45em;
  border-radius: 5px;
  font-size: 0.875em;
  border: 1px solid rgba(0,0,0,.12);
}

/* Images */
.sp-body img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  display: block;
  margin: 2em auto;
}

.sp-body figure {
  margin: 2.5em 0;
  counter-increment: figure;
}

.sp-body figcaption {
  font-family: var(--sp-font-ui);
  font-size: 0.8125rem;
  color: var(--sp-ink-muted);
  text-align: center;
  margin-top: 10px;
  line-height: 1.5;
}

/* Wide images (break out of column on large screens) */
@media (min-width: 900px) {
  .sp-body .alignwide,
  .sp-body figure.size-full,
  .sp-body figure.size-large {
    margin-left: calc((var(--sp-wide) - var(--sp-col)) / -2);
    margin-right: calc((var(--sp-wide) - var(--sp-col)) / -2);
    max-width: var(--sp-wide);
  }
}

/* ================================================================
   LISTS — Properly aligned bullets and numbers
   ================================================================ */
.sp-body ul,
.sp-body ol {
  padding-left: 1.75em;
  margin: 0 0 1.65em;
  list-style-position: outside;
}

.sp-body ul {
  list-style-type: disc;
}

.sp-body ol {
  list-style-type: decimal;
}

.sp-body li {
  margin-bottom: 0.6em;
  line-height: 1.78;
  padding-left: 0.25em;
}

/* Nested lists */
.sp-body ul ul,
.sp-body ol ol,
.sp-body ul ol,
.sp-body ol ul {
  margin-top: 0.4em;
  margin-bottom: 0.4em;
  padding-left: 1.5em;
}

/* Bullet colour — black */
.sp-body ul li::marker {
  color: #111111;
  font-size: 0.9em;
}

.sp-body ol li::marker {
  color: #111111;
  font-weight: 700;
  font-family: var(--sp-font-ui);
  font-size: 0.9375em;
}

/* WordPress block list alignment fix */
.sp-body .wp-block-list,
.sp-body .wp-block-list li,
.entry-content ul,
.entry-content ol {
  padding-left: 1.75em !important;
  list-style-position: outside !important;
}

.entry-content li {
  padding-left: 0.25em;
  margin-bottom: 0.6em;
  line-height: 1.78;
}

/* HR — Medium separator dots */
.sp-body hr {
  border: none;
  text-align: center;
  margin: 3em 0;
  height: auto;
}

.sp-body hr::before {
  content: '· · ·';
  font-family: var(--sp-font-display);
  font-size: 1.5rem;
  color: var(--sp-ink-faint);
  letter-spacing: 0.5em;
}

/* Tables */
.sp-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 2em 0;
  font-size: 0.9375rem;
}

.sp-body th {
  background: var(--sp-navy);
  color: #ffffff;
  font-family: var(--sp-font-ui);
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 2px solid var(--sp-navy);
}

.sp-body td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--sp-rule);
  vertical-align: top;
}

.sp-body tr:nth-child(even) td {
  background: var(--sp-bg-warm);
}

/* Key highlight box */
.sp-body .wp-block-pullquote,
.sp-body .pullquote {
  border: none;
  padding: 0;
}

/* ================================================================
   FLOATING SHARE/ENGAGEMENT BAR (Left side)
   ================================================================ */
/* ================================================================
   FLOATING SIDE BAR — Medium-Style Left Sidebar
   ================================================================ */
.sp-float-bar {
  position: fixed;
  left: max(16px, calc(50% - var(--sp-col)/2 - 220px));
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateY(-50%) translateX(-8px);
}

.sp-float-bar.visible {
  opacity: 1;
  pointer-events: all;
  transform: translateY(-50%) translateX(0);
}

/* ---- CLAP BUTTON — Medium heart/clap style ---- */
.sp-float-clap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.sp-float-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1.5px solid #e0e0e0;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #555555;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
  position: relative;
  padding: 0;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.sp-float-btn:hover {
  border-color: #111111;
  color: #111111;
  transform: scale(1.1);
  box-shadow: 0 3px 12px rgba(0,0,0,.12);
  background: #f9f9f9;
}

.sp-float-btn:focus-visible {
  outline: 2px solid #111111;
  outline-offset: 2px;
}

.sp-float-btn.active,
.sp-float-btn.clapped {
  background: #111111;
  border-color: #111111;
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
}

/* ---- SVG icons inside float buttons ---- */
.sp-float-btn svg {
  width: 18px;
  height: 18px;
  display: block;
  flex-shrink: 0;
  pointer-events: none;
}

/* Clap count beneath clap button */
.sp-float-clap-count {
  font-family: var(--sp-font-ui);
  font-size: 0.6875rem;
  font-weight: 700;
  color: #555555;
  min-height: 16px;
  text-align: center;
  line-height: 1.2;
  margin-top: 3px;
  transition: color 0.15s;
}

.sp-float-clap-count.has-claps {
  color: #111111;
}

/* Divider between clap and share buttons */
.sp-float-bar::before {
  content: '';
  display: block;
  width: 1px;
  height: 24px;
  background: #e0e0e0;
  border-radius: 2px;
  margin: 4px 0;
  order: 3;
}

/* Tooltip — appears to the right so it doesn't overlap content */
.sp-float-btn::after {
  content: attr(data-tip);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%) translateX(-6px);
  white-space: nowrap;
  background: #111111;
  color: #ffffff;
  font-family: var(--sp-font-ui);
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 6px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s, transform 0.15s;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

.sp-float-btn::after:empty {
  display: none;
}

.sp-float-btn:hover::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}



/* ================================================================
   TAG PILLS
   ================================================================ */
.sp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 48px 0 0;
  padding: 32px 0 0;
  border-top: 1px solid var(--sp-rule);
}

.sp-tag {
  font-family: var(--sp-font-ui);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--sp-ink-soft);
  background: var(--sp-bg-warm);
  border: 1px solid var(--sp-rule);
  border-radius: 99px;
  padding: 7px 18px;
  text-decoration: none;
  transition: all var(--sp-fast);
  letter-spacing: 0.01em;
}

.sp-tag:hover {
  background: var(--sp-navy);
  border-color: var(--sp-navy);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,.10);
}

/* ================================================================
   AUTHOR CARD — E-E-A-T
   ================================================================ */
.sp-author-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  align-items: start;
  padding: 48px 0;
  margin: 48px 0 0;
  border-top: 2px solid var(--sp-navy);
  border-bottom: 1px solid var(--sp-rule);
}

.sp-author-card__avatar-wrap {
  position: relative;
}

.sp-author-card__avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--sp-navy);
  display: block;
  box-shadow: 0 4px 16px rgba(0,0,0,.10);
}

.sp-author-card__badge {
  position: absolute;
  bottom: 0;
  right: -2px;
  width: 22px;
  height: 22px;
  background: var(--sp-blue);
  border-radius: 50%;
  border: 2px solid var(--sp-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sp-author-card__badge svg {
  width: 11px;
  height: 11px;
  stroke: #fff;
  fill: none;
}

.sp-author-card__meta {}

.sp-author-card__written-by {
  font-family: var(--sp-font-ui);
  font-size: 0.9375rem;
  font-weight: 400;
  color: var(--sp-ink-muted);
  margin-bottom: 6px;
  line-height: 1.4;
}

/* Inline name link inside "Written by …" */
.sp-author-card__name--inline {
  font-family: var(--sp-font-display);
  font-optical-sizing: auto;
  font-size: 1rem;
  font-weight: 700;
  color: var(--sp-navy);
  text-decoration: none;
  display: inline;
  line-height: inherit;
  transition: color var(--sp-fast);
}
.sp-author-card__name--inline:hover {
  color: var(--sp-blue);
}

.sp-author-card__name {
  font-family: var(--sp-font-display);
  font-optical-sizing: auto;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--sp-navy);
  text-decoration: none;
  margin-bottom: 8px;
  display: block;
  line-height: 1.2;
  transition: color var(--sp-fast);
}

.sp-author-card__name:hover {
  color: var(--sp-blue);
}

.sp-author-card__bio {
  font-family: var(--sp-font-body);
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--sp-ink-muted);
  margin: 0 0 14px;
}

.sp-author-card__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sp-author-card__link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--sp-font-ui);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--sp-ink-muted);
  background: var(--sp-bg-warm);
  border: 1px solid var(--sp-rule);
  border-radius: 99px;
  padding: 5px 12px;
  text-decoration: none;
  transition: all var(--sp-fast);
}

.sp-author-card__link:hover {
  background: var(--sp-blue-tint);
  border-color: var(--sp-blue);
  color: var(--sp-blue);
}

.sp-author-card__link svg {
  width: 12px;
  height: 12px;
}

/* ================================================================
   POST NAVIGATION — Prev/Next
   ================================================================ */
.sp-post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 56px 0 0;
  padding: 40px 0 0;
  border-top: 1px solid var(--sp-rule);
}

.sp-post-nav__item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-decoration: none;
  padding: 24px;
  border: 1px solid var(--sp-rule);
  border-radius: 14px;
  transition: all var(--sp-mid);
  background: var(--sp-bg);
  position: relative;
  overflow: hidden;
}

.sp-post-nav__item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--sp-navy);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--sp-mid);
}

.sp-post-nav__item:hover {
  border-color: var(--sp-ink);
  box-shadow: var(--sp-shadow-lg);
  transform: translateY(-3px);
}

.sp-post-nav__item:hover::before {
  transform: scaleX(1);
}

.sp-post-nav__item--prev {
  text-align: left;
}

.sp-post-nav__item--next {
  text-align: right;
  grid-column: 2;
}

.sp-post-nav__label {
  font-family: var(--sp-font-ui);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sp-blue);
  display: flex;
  align-items: center;
  gap: 4px;
}

.sp-post-nav__item--next .sp-post-nav__label {
  justify-content: flex-end;
}

.sp-post-nav__title {
  font-family: var(--sp-font-display);
  font-optical-sizing: auto;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--sp-navy);
  line-height: 1.3;
  transition: color var(--sp-fast);
}

.sp-post-nav__item:hover .sp-post-nav__title {
  color: var(--sp-blue);
}

/* ================================================================
   MORE FROM SECTION (Related Posts)
   ================================================================ */
.sp-more {
  background: var(--sp-bg-warm);
  padding: 80px 24px;
  margin-top: 80px;
  border-top: 1px solid var(--sp-rule);
  position: relative;
}

.sp-more::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--sp-navy);
  border-radius: 0 0 4px 4px;
}

.sp-more__inner {
  max-width: var(--sp-wide);
  margin: 0 auto;
}

.sp-more__header {
  margin-bottom: 36px;
}

.sp-more__eyebrow {
  font-family: var(--sp-font-ui);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sp-blue);
  margin-bottom: 6px;
}

.sp-more__title {
  font-family: var(--sp-font-display);
  font-optical-sizing: auto;
  font-size: clamp(1.4rem, 3vw, 1.875rem);
  font-weight: 700;
  color: var(--sp-navy);
  margin: 0;
}

.sp-more__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.sp-card {
  background: var(--sp-bg);
  border: 1px solid var(--sp-rule);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  transition: all var(--sp-mid);
  box-shadow: var(--sp-shadow-xs);
}

.sp-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 48px rgba(0,0,0,.12);
  border-color: var(--sp-ink);
}

.sp-card__img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  transition: transform 0.5s var(--sp-ease);
}

.sp-card:hover .sp-card__img {
  transform: scale(1.03);
}

.sp-card__img-wrap {
  overflow: hidden;
  flex-shrink: 0;
}

.sp-card__body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sp-card__cat {
  font-family: var(--sp-font-ui);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sp-blue);
}

.sp-card__title {
  font-family: var(--sp-font-display);
  font-optical-sizing: auto;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--sp-navy);
  line-height: 1.3;
  flex: 1;
  transition: color var(--sp-fast);
}

.sp-card:hover .sp-card__title {
  color: var(--sp-blue);
}

.sp-card__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sp-font-ui);
  font-size: 0.75rem;
  color: var(--sp-ink-muted);
  margin-top: auto;
}

.sp-card__meta-sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--sp-ink-faint);
}

/* ================================================================
   COMMENTS SECTION — Styled
   ================================================================ */
.sp-comments-wrap {
  max-width: var(--sp-col);
  margin: 0 auto;
  padding: 0 24px 80px;
}

/* ================================================================
   PAGE ENTRY ANIMATIONS
   ================================================================ */
@keyframes sp-fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.sp-pub-label  { animation: sp-fade-up 0.5s var(--sp-ease) 0.05s both; }
.sp-title      { animation: sp-fade-up 0.5s var(--sp-ease) 0.10s both; }
.sp-subtitle   { animation: sp-fade-up 0.5s var(--sp-ease) 0.15s both; }
.sp-meta-row   { animation: sp-fade-up 0.5s var(--sp-ease) 0.20s both; }

/* ================================================================
   SHARE MODAL / TOOLTIP
   ================================================================ */
.sp-share-toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--sp-navy);
  color: #fff;
  font-family: var(--sp-font-ui);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 99px;
  z-index: 99999;
  pointer-events: none;
  opacity: 0;
  transition: all var(--sp-mid);
  white-space: nowrap;
}

.sp-share-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ================================================================
   PAGE LAYOUT — Two-column grid (article + sidebar)
   ================================================================ */
.sp-page-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  box-sizing: border-box;
}

/* Desktop: article + sidebar side by side */
@media (min-width: 1120px) {
  .sp-page-layout {
    grid-template-columns: 1fr 300px;
    gap: 0 48px;
    align-items: start;
    padding: 0 32px;
  }

  #content-single-wrap {
    padding: 0 !important;
    max-width: 100% !important;
  }
}

@media (min-width: 1440px) {
  .sp-page-layout {
    padding: 0 48px;
    gap: 0 56px;
  }
}

/* ================================================================
   RIGHT SIDEBAR
   ================================================================ */
.sp-sidebar {
  display: none; /* hidden on mobile by default */
}

@media (min-width: 1120px) {
  .sp-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding-top: 40px;
  }
}

/* ================================================================
   AD SLOTS
   ================================================================ */
.sp-ad-slot {
  width: 100%;
  background: #fafafa;
  border: 1px dashed #ddd;
  border-radius: 8px;
  overflow: hidden;
  box-sizing: border-box;
}

/* Sidebar top slot: 300×250 */
.sp-ad-slot--sidebar {
  width: 300px;
  min-height: 250px;
}

/* Sidebar sticky top slot scrolls with page */
.sp-ad-slot--sticky {
  position: sticky;
  top: 80px;
}

/* Inline slot: mobile/tablet only, below article */
.sp-ad-slot--inline {
  display: block;
  margin: 32px 0 0;
  min-height: 100px;
  width: 100%;
}

/* On desktop where sidebar exists, hide inline ad */
@media (min-width: 1120px) {
  .sp-ad-slot--inline {
    display: none;
  }
}

/* Ad placeholder (shown when no code entered) */
.sp-ad-slot__placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: inherit;
  padding: 24px 16px;
  gap: 6px;
  text-align: center;
}

.sp-ad-slot__label {
  font-family: var(--sp-font-ui);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #aaa;
}

.sp-ad-slot__size {
  font-family: var(--sp-font-ui);
  font-size: 0.75rem;
  color: #ccc;
}

/* Sidebar lower slot: 300×600 */
.sp-ad-slot--sidebar:last-of-type,
.sp-sidebar .sp-ad-slot:last-of-type {
  min-height: 300px;
}

/* ================================================================
   SIDEBAR SUBSCRIBE WIDGET
   ================================================================ */
.sp-sidebar-widget {
  background: #ffffff;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  overflow: hidden;
}

.sp-sidebar-sub {
  padding: 24px 20px;
  background: #111111;
  color: #ffffff;
}

.sp-sidebar-sub__eyebrow {
  font-family: var(--sp-font-ui);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.5);
  margin: 0 0 8px;
}

.sp-sidebar-sub__title {
  font-family: var(--sp-font-display);
  font-optical-sizing: auto;
  font-size: 1.0625rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.35;
  margin: 0 0 20px;
}

.sp-sidebar-sub__btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 16px;
  background: #ffffff;
  color: #111111;
  font-family: var(--sp-font-ui);
  font-size: 0.8125rem;
  font-weight: 700;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.15s ease;
  box-sizing: border-box;
}

.sp-sidebar-sub__btn:hover {
  background: #f0f0f0;
  transform: translateY(-1px);
  color: #111111;
}

/* ================================================================
   MOBILE BOTTOM SHARE BAR
   ================================================================ */
.sp-mobile-bar {
  display: none; /* hidden on desktop */
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-top: 1px solid var(--sp-rule);
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  display: none;
  align-items: center;
  justify-content: space-around;
  gap: 4px;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  box-shadow: 0 -4px 24px rgba(0,0,0,.10);
}

.sp-mobile-bar.visible {
  transform: translateY(0);
}

.sp-mobile-bar__btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 16px;
  border-radius: 12px;
  border: none;
  background: transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.15s ease;
  flex: 1;
  max-width: 80px;
  min-height: 52px;
  -webkit-tap-highlight-color: transparent;
}

.sp-mobile-bar__btn:hover {
  background: rgba(0,0,0,.04);
}

.sp-mobile-bar__btn span {
  font-family: var(--sp-font-ui);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #555;
  white-space: nowrap;
}

.sp-mobile-bar__btn:active {
  transform: scale(0.93);
}

.sp-mobile-bar__btn--twitter  { color: #111111; }
.sp-mobile-bar__btn--facebook { color: #1877f2; }
.sp-mobile-bar__btn--whatsapp { color: #25d366; }
.sp-mobile-bar__btn--copy     { color: #555555; }
.sp-mobile-bar__btn--clap     { color: #111111; }

.sp-mobile-bar__btn--twitter svg  { color: #111111; }
.sp-mobile-bar__btn--facebook svg { color: #1877f2; }
.sp-mobile-bar__btn--whatsapp svg { color: #25d366; }
.sp-mobile-bar__btn--copy svg     { color: #555555; }
.sp-mobile-bar__btn--clap svg     { color: #111111; }

@media (max-width: 900px) {
  .sp-mobile-bar {
    display: flex;
  }

  /* Add bottom padding to article so mobile bar doesn't cover content */
  .sp-article,
  .sp-comments-wrap {
    padding-bottom: calc(80px + env(safe-area-inset-bottom));
  }
}

/* ================================================================
   RESPONSIVE — Comprehensive mobile overhaul
   ================================================================ */

/* ── Tablet (768px – 1119px) ── */
@media (max-width: 1119px) {
  .sp-float-bar {
    display: none;
  }

  .sp-sidebar {
    display: none;
  }

  .sp-page-layout {
    padding: 0 20px;
  }
}

/* ── Mobile landscape / small tablet (600px – 767px) ── */
@media (max-width: 767px) {
  /* Content column */
  .sp-content-col {
    padding: 0 0;
  }

  .sp-page-layout {
    padding: 0 16px;
  }

  /* Hero */
  .sp-hero {
    height: 220px !important;
    border-radius: 10px;
    border-width: 2px;
    margin-left: -16px;
    margin-right: -16px;
    width: calc(100% + 32px);
  }

  /* Title */
  .sp-title {
    font-size: clamp(1.625rem, 6.5vw, 2.25rem);
    line-height: 1.15;
    margin-bottom: 14px;
  }

  /* Subtitle */
  .sp-subtitle {
    font-size: 1rem;
    margin-bottom: 20px;
  }

  /* Meta row */
  .sp-meta-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 0;
    margin-bottom: 28px;
  }

  .sp-meta-row__author {
    width: 100%;
  }

  .sp-meta-row__actions {
    width: 100%;
    justify-content: flex-start;
    gap: 10px;
  }

  .sp-meta-row__byline {
    flex-wrap: wrap;
    gap: 4px 8px;
    font-size: 0.75rem;
  }

  /* Avatar */
  .sp-meta-row__avatar {
    width: 40px;
    height: 40px;
  }

  /* Category badge */
  .sp-cat-badge {
    font-size: 0.625rem;
    padding: 3px 9px;
  }

  /* TOC */
  .sp-toc {
    margin-bottom: 24px;
  }

  .sp-toc__label {
    padding: 14px 16px;
  }

  .sp-toc__list {
    padding: 0 16px 14px;
  }

  .sp-toc__list a {
    padding: 8px 0;
    font-size: 0.875rem;
  }

  /* Body */
  .sp-body {
    font-size: 17px !important;
    line-height: 1.75 !important;
  }

  .sp-body h2 {
    font-size: clamp(1.25rem, 5vw, 1.625rem) !important;
    margin-top: 2rem !important;
  }

  .sp-body h3 {
    font-size: clamp(1.0625rem, 4vw, 1.25rem) !important;
  }

  /* Blockquote */
  .sp-body blockquote,
  body.single blockquote {
    margin-left: -16px !important;
    margin-right: -16px !important;
    border-radius: 0 !important;
    padding: 18px 20px 18px 44px !important;
  }

  /* Images */
  .sp-body img {
    border-radius: 8px;
    margin-left: -16px;
    margin-right: -16px;
    width: calc(100% + 32px) !important;
    max-width: calc(100% + 32px) !important;
    border-radius: 0;
  }

  /* Inline share bar */
  .sp-inline-share {
    padding: 20px 0;
    margin: 28px 0 20px;
  }

  .sp-inline-share__btns {
    gap: 8px;
  }

  .sp-inline-share__btn {
    padding: 8px 14px;
    font-size: 0.75rem;
    gap: 5px;
  }

  /* Tags */
  .sp-tags {
    gap: 6px;
    margin-bottom: 24px;
  }

  /* Author card */
  .sp-author-card {
    grid-template-columns: 1fr;
    padding: 20px;
    gap: 16px;
  }

  .sp-author-card__avatar {
    width: 56px;
    height: 56px;
  }

  /* Post nav */
  .sp-post-nav {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 24px;
  }

  .sp-post-nav__item {
    padding: 16px 18px;
  }

  .sp-post-nav__item--next {
    grid-column: 1;
    text-align: left;
  }

  .sp-post-nav__item--next .sp-post-nav__label {
    justify-content: flex-start;
  }

  /* Related posts */
  .sp-more {
    padding: 32px 16px;
  }

  .sp-more__grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* Sticky nav */
  .sp-sticky-nav {
    padding: 0 16px;
  }

  .sp-sticky-nav__title {
    font-size: 0.8125rem;
  }

  /* Comments */
  .sp-comments-wrap {
    padding: 0 0 80px;
  }
}

/* ── Small phones (< 480px) ── */
@media (max-width: 479px) {
  .sp-page-layout {
    padding: 0 14px;
  }

  .sp-hero {
    height: 190px !important;
    margin-left: -14px;
    margin-right: -14px;
    width: calc(100% + 28px);
  }

  .sp-title {
    font-size: clamp(1.5rem, 7.5vw, 2rem);
  }

  .sp-body {
    font-size: 16px !important;
  }

  .sp-body img {
    margin-left: -14px;
    margin-right: -14px;
    width: calc(100% + 28px) !important;
    max-width: calc(100% + 28px) !important;
  }

  .sp-body blockquote,
  body.single blockquote {
    margin-left: -14px !important;
    margin-right: -14px !important;
  }

  /* Inline share — stack 2×2 */
  .sp-inline-share__btns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .sp-inline-share__btn {
    justify-content: center;
  }

  .sp-reading-pill svg { display: none; }
  .sp-clap-btn span   { display: none; }

  .sp-meta-row__byline-sep { display: none; }

  /* Mobile bar labels hidden on very small screens */
  .sp-mobile-bar__btn span {
    display: none;
  }

  .sp-mobile-bar {
    padding: 8px 4px calc(8px + env(safe-area-inset-bottom));
  }

  .sp-mobile-bar__btn {
    padding: 10px 8px;
    min-height: 44px;
  }
}

}

/* ================================================================
   DARK MODE
   ================================================================ */
@media (prefers-color-scheme: dark) {
  :root {
    --sp-navy:      #e8e8e8;
    --sp-navy-soft: #cccccc;
    --sp-blue:      #aaaaaa;
    --sp-blue-mid:  #888888;
    --sp-blue-bright: #666666;
    --sp-blue-tint: rgba(255,255,255,.06);
    --sp-blue-pale: rgba(255,255,255,.04);

    --sp-ink:       #e8e8e8;
    --sp-ink-soft:  #bbbbbb;
    --sp-ink-muted: #777777;
    --sp-ink-faint: #444444;
    --sp-rule:      #222222;
    --sp-rule-strong: #333333;
    --sp-bg:        #0d0d0d;
    --sp-bg-warm:   #111111;
    --sp-bg-blue:   #0d0d0d;
  }

  .sp-sticky-nav {
    background: rgba(13,13,13,.94);
    border-bottom-color: var(--sp-rule);
  }

  .sp-sticky-nav.scrolled {
    box-shadow: 0 4px 24px rgba(0,0,0,.4);
  }

  .sp-more { background: var(--sp-bg-warm); }
  .sp-more::before { background: #555; }

  body.single { background: var(--sp-bg); }

  .sp-kicker {
    background: rgba(255,255,255,0.03);
    box-shadow: none;
  }

  .sp-kicker::before {
    background: linear-gradient(90deg, #888 0%, #888 60px, transparent 60px, transparent 100%);
  }

  .sp-kicker::after {
    background: #888;
  }

  .sp-kicker__text {
    color: #ccc;
  }

  .sp-kicker__text::before {
    background: rgba(255,255,255,0.15);
    opacity: 0.5;
  }

  .sp-kicker__text::after {
    background: linear-gradient(90deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.08) calc(100% - 24px), transparent 100%);
  }

  .sp-featured-snippet {
    background: linear-gradient(135deg, #151515 0%, #111111 100%);
  }

  .sp-body blockquote {
    background-color: rgba(255,255,255,.03);
  }

  .sp-body pre {
    background: #000;
    border-color: rgba(255,255,255,.1);
  }

  .sp-body th {
    background: #1a1a1a;
    color: #e8e8e8;
  }

  .sp-author-card {
    border-top-color: #333;
  }

  .sp-tag:hover {
    background: #e8e8e8;
    border-color: #e8e8e8;
    color: #0d0d0d;
  }
}

/* ================================================================
   ACCESSIBILITY — Skip link hidden completely
   ================================================================ */
.sp-skip-link,
.nr-skip-link {
  display: none !important;
  visibility: hidden !important;
}

*:focus-visible {
  outline: 2px solid var(--sp-blue);
  outline-offset: 2px;
}

@media (forced-colors: active) {
  #nr-reading-progress,
  .sp-clap-btn.clapped,
  .sp-float-btn.active { background: Highlight; }
}

@media (prefers-reduced-motion: reduce) {
  .sp-pub-label, .sp-title, .sp-subtitle, .sp-meta-row,
  .sp-card, .sp-float-bar, .sp-clap-btn,
  .sp-toc__list, .sp-toc__list a { animation: none; transition: none; }
}

/* ================================================================
   PRINT
   ================================================================ */
@media print {
  .sp-sticky-nav, .sp-float-bar, #nr-reading-progress,
  .sp-nav-share-btn, .sp-clap-btn, .sp-more { display: none; }

  .sp-body { font-size: 11pt; color: #000; }
  .sp-title { font-size: 22pt; color: #000; }
  .sp-body a { color: #000; text-decoration: none; }
  .sp-body a::after { content: ' (' attr(href) ')'; font-size: 9pt; }
}

/* ================================================================
    FEATURED SNIPPET BOX — AI Citation Highlight
    ================================================================ */
.sp-featured-snippet {
  position: relative;
  background: linear-gradient(135deg, #fafafa 0%, #f0f0f0 100%);
  border: 1px solid var(--sp-rule);
  border-radius: 16px;
  padding: 32px 36px;
  margin: 0 0 40px;
  overflow: hidden;
  box-shadow: var(--sp-shadow-sm);
}

.sp-featured-snippet::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--sp-accent-gradient);
}

.sp-featured-snippet__label {
  font-family: var(--sp-font-ui);
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--sp-blue);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sp-featured-snippet__label svg {
  width: 14px;
  height: 14px;
}

.sp-featured-snippet__content {
  font-family: var(--sp-font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--sp-ink);
}

.sp-featured-snippet__source {
  font-family: var(--sp-font-ui);
  font-size: 0.75rem;
  color: var(--sp-ink-muted);
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--sp-rule);
}

/* ================================================================
    KEYBOARD NAVIGATION INDICATORS
    ================================================================ */
.sp-body kbd {
  display: inline-block;
  font-family: var(--sp-font-mono);
  font-size: 0.8125em;
  background: var(--sp-navy);
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  box-shadow: 0 2px 0 rgba(0,0,0,0.2);
  margin: 0 2px;
}

/* ================================================================
    HIGHLIGHTED TEXT — Search result emphasis
    ================================================================ */
.sp-body mark,
.sp-body .highlight {
  background: linear-gradient(120deg, rgba(255,229,100,0.4) 0%, rgba(255,229,100,0.4) 100%);
  color: var(--sp-ink);
  padding: 1px 4px;
  border-radius: 3px;
}

/* ================================================================
    SCROLL TO TOP BUTTON
    ================================================================ */
.sp-scroll-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--sp-navy);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s var(--sp-ease);
  box-shadow: var(--sp-shadow-md);
  z-index: 9999;
}

.sp-scroll-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.sp-scroll-top:hover {
  background: var(--sp-blue);
  transform: translateY(-4px);
  box-shadow: var(--sp-shadow-lg);
}

.sp-scroll-top svg {
  width: 20px;
  height: 20px;
}

/* ================================================================
    BREADCRUMBS
    ================================================================ */
.sp-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  font-family: var(--sp-font-ui);
  font-size: 0.8125rem;
  color: var(--sp-ink-muted);
  padding: 24px 0 8px;
}
.sp-breadcrumb__item {
  color: var(--sp-ink-muted);
  text-decoration: none;
  transition: color var(--sp-fast);
}
.sp-breadcrumb__item:hover { color: var(--sp-ink); }
.sp-breadcrumb__sep { color: var(--sp-ink-faint); }
.sp-breadcrumb__current {
  color: var(--sp-ink);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}

/* ================================================================
   CATEGORY BADGE
   ================================================================ */
.sp-cat-badge {
  display: inline-block;
  font-family: var(--sp-font-ui);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sp-ink);
  background: var(--sp-bg-warm);
  border: 1px solid var(--sp-rule);
  border-radius: 4px;
  padding: 4px 10px;
  text-decoration: none;
  margin-bottom: 16px;
  transition: all var(--sp-fast);
}
.sp-cat-badge:hover {
  background: var(--sp-ink);
  color: #ffffff;
  border-color: var(--sp-ink);
}

/* ================================================================
   FRESHNESS / LAST UPDATED BADGE
   ================================================================ */
.sp-freshness-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--sp-font-ui);
  font-size: 0.75rem;
  font-weight: 600;
  color: #2d7a2d;
  background: #f0faf0;
  border: 1px solid #c3e6c3;
  border-radius: 99px;
  padding: 4px 12px;
  margin-bottom: 12px;
}

/* Updated date in byline */
.sp-updated-label {
  font-size: 0.8125rem;
  color: var(--sp-ink-muted);
}

/* Word count */
.sp-word-count {
  font-size: 0.8125rem;
  color: var(--sp-ink-muted);
}

/* Comment count */
.sp-comment-count {
  font-size: 0.8125rem;
  color: var(--sp-ink-muted);
  text-decoration: none;
}
.sp-comment-count:hover { color: var(--sp-ink); }

/* ================================================================
   INLINE SHARE BAR (end of article)
   ================================================================ */
.sp-inline-share {
  border-top: 1px solid var(--sp-rule);
  border-bottom: 1px solid var(--sp-rule);
  padding: 24px 0;
  margin: 40px 0 32px;
}
.sp-inline-share__label {
  font-family: var(--sp-font-ui);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--sp-ink-muted);
  margin: 0 0 14px;
}
.sp-inline-share__btns {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.sp-inline-share__btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--sp-font-ui);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: 99px;
  border: 1.5px solid var(--sp-rule);
  background: #ffffff;
  color: var(--sp-ink-soft);
  text-decoration: none;
  cursor: pointer;
  transition: all var(--sp-fast);
  white-space: nowrap;
}
.sp-inline-share__btn:hover { transform: translateY(-1px); box-shadow: var(--sp-shadow-sm); }
.sp-inline-share__btn--twitter:hover  { background: #000; color: #fff; border-color: #000; }
.sp-inline-share__btn--facebook:hover { background: #1877f2; color: #fff; border-color: #1877f2; }
.sp-inline-share__btn--whatsapp:hover { background: #25d366; color: #fff; border-color: #25d366; }
.sp-inline-share__btn--copy:hover     { background: var(--sp-ink); color: #fff; border-color: var(--sp-ink); }

/* ================================================================
   AUTHOR POST COUNT
   ================================================================ */
.sp-author-card__post-count {
  font-family: var(--sp-font-ui);
  font-size: 0.8125rem;
  color: var(--sp-ink-muted);
  margin: 2px 0 8px;
}
.sp-author-card__post-count a {
  color: var(--sp-ink-muted);
  text-decoration: underline;
}
.sp-author-card__post-count a:hover { color: var(--sp-ink); }

