/* ==========================================================================
   resources/views/home/pages/blog/show.blade.php — moved verbatim from the view's <style> block(s) (2026-09-11)
   ========================================================================== */
/* ═══════════════════════════════════════════════════════════════
   SINGLE BLOG POST — PREMIUM DESIGN v2
═══════════════════════════════════════════════════════════════ */

/* ─── Base ──────────────────────────────────────────────────── */
.sp-wrap { background: var(--white); }

/* ─── Reading progress bar ──────────────────────────────────── */
#sp-progress {
    position: fixed;
    top: 0; left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, var(--blue), var(--rv-primary-bright), var(--rv-primary-soft));
    background-size: 200% 100%;
    animation: spBarShimmer 2s linear infinite;
    z-index: 9999;
    transition: width .1s linear;
    border-radius: 0 2px 2px 0;
}
@keyframes spBarShimmer {
    0%   { background-position: 0% 0; }
    100% { background-position: 200% 0; }
}

/* ─── Hero ──────────────────────────────────────────────────── */
.sp-hero {
    position: relative;
    overflow: hidden;
    background: #07101f;
    display: flex;
    flex-direction: column;
    min-height: 280px;
}

/* Subtle colour tint layer for when there's no image */
.sp-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}
.sp-hero-bg::before {
    content: '';
    position: absolute;
    top: -80px; left: -60px;
    width: 560px; height: 560px;
    background: radial-gradient(circle, rgba(109, 92, 230,.12) 0%, transparent 65%);
    border-radius: 50%;
}
.sp-hero-bg::after {
    content: '';
    position: absolute;
    bottom: -60px; right: -40px;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(139, 92, 246,.08) 0%, transparent 65%);
    border-radius: 50%;
}

/* Featured image — visible, rich, cinematic */
.sp-hero-img {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: center 30%;
    z-index: 0;
    opacity: 1;
    filter: saturate(1.05) brightness(.72);
}

/* Directional overlay: strong left for text legibility, fades right so image breathes */
.sp-hero-fade {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(to right, rgba(7,16,31,.93) 0%, rgba(7,16,31,.78) 45%, rgba(7,16,31,.38) 100%),
        linear-gradient(to top,   rgba(7,16,31,.85) 0%, rgba(7,16,31,.1)  60%, transparent 100%);
}

.sp-hero-inner {
    position: relative;
    z-index: 2;
    padding: 52px 0 56px;
}

/* ── Breadcrumb ── */
.sp-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .72rem;
    font-weight: 700;
    color: rgba(255,255,255,.38);
    text-decoration: none;
    margin-bottom: 22px;
    letter-spacing: .08em;
    text-transform: uppercase;
    transition: color .18s, gap .18s;
}
.sp-back:hover { color: rgba(255,255,255,.75); gap: 10px; text-decoration: none; }
.sp-back svg { width: 11px; height: 11px; }

/* ── Category pill ── */
.sp-cat {
    display: inline-flex;
    align-items: center;
    font-size: .65rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--rv-primary-soft);
    background: rgba(109, 92, 230,.14);
    border: 1px solid rgba(147,197,253,.2);
    border-radius: 99px;
    padding: 4px 14px;
    margin-bottom: 16px;
    text-decoration: none;
    transition: background .18s, color .18s;
}
.sp-cat:hover { background: rgba(109, 92, 230,.28); color: var(--rv-primary-pale); text-decoration: none; }

/* ── Title ── */
.sp-title {
    font-family: var(--font-h);
    font-size: clamp(1.6rem, 3.5vw, 2.45rem);
    font-weight: 800;
    color: #f0f6ff;
    letter-spacing: -.038em;
    line-height: 1.17;
    margin: 0 0 22px;
    max-width: 720px;
}

/* ── Divider line ── */
.sp-hero-divider {
    width: 44px;
    height: 3px;
    background: linear-gradient(90deg, var(--rv-primary), var(--rv-primary-bright));
    border-radius: 2px;
    margin-bottom: 22px;
}

/* ── Meta row ── */
.sp-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 16px;
}
.sp-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .78rem;
    color: rgba(255,255,255,.48);
    font-weight: 500;
}
.sp-meta-item svg { width: 12px; height: 12px; opacity: .65; flex-shrink: 0; }
.sp-meta-sep {
    width: 3px; height: 3px;
    border-radius: 50%;
    background: rgba(255,255,255,.18);
}
.sp-author-chip { display: flex; align-items: center; gap: 7px; }
.sp-author-avatar {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--rv-primary), var(--rv-primary-bright));
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    border: 1.5px solid rgba(255,255,255,.14);
}
.sp-author-avatar svg { width: 13px; height: 13px; color: #fff; }

/* ─── Body wrapper ──────────────────────────────────────────── */
.sp-body {
    padding: 72px 0 110px;
    background: var(--white);
}

.sp-layout {
    display: grid;
    grid-template-columns: 1fr 296px;
    gap: 72px;
    align-items: start;
    min-width: 0;
}

/* Prevent article from growing beyond its grid cell */
#sp-article { min-width: 0; overflow-wrap: break-word; }

/* ─── Excerpt / lead paragraph ──────────────────────────────── */
.sp-excerpt {
    font-family: var(--font-h);
    font-size: 1.18rem;
    font-weight: 500;
    color: var(--text2);
    line-height: 1.7;
    position: relative;
    padding: 20px 24px 20px 28px;
    margin: 0 0 44px;
    letter-spacing: -.01em;
    background: var(--blue-light);
    border-radius: 0 14px 14px 0;
    border-left: 4px solid var(--blue);
}
.sp-excerpt::before {
    content: '\201C';
    position: absolute;
    top: -8px; left: 14px;
    font-size: 4rem;
    line-height: 1;
    color: var(--blue);
    opacity: .2;
    font-family: Georgia, serif;
}

/* ═══════════════════════════════════════════════════════════════
   ARTICLE CONTENT — PREMIUM TYPOGRAPHY
═══════════════════════════════════════════════════════════════ */
.sp-content {
    font-family: var(--font-b);
    font-size: 1.025rem;
    color: var(--text2);
    line-height: 1.88;
    /* Prevent long URLs/words from blowing out the layout on mobile */
    overflow-wrap: break-word;
    word-break: break-word;
    min-width: 0;
}

/* ── Headings ── */
.sp-content h1,
.sp-content h1,
.sp-content h2,
.sp-content h3,
.sp-content h4,
.sp-content h5,
.sp-content h6 {
    font-family: var(--font-h);
    color: var(--text);
    letter-spacing: -.03em;
    line-height: 1.2;
    margin: 2.4em 0 .75em;
    scroll-margin-top: calc(var(--nav-height, 64px) + 16px);
}
.sp-content h1 {
    font-size: 1.95rem;
    font-weight: 800;
    border-bottom: 2px solid var(--border);
    padding-bottom: .4em;
}
.sp-content h2 {
    font-size: 1.45rem;
    font-weight: 800;
    padding-bottom: .45em;
    border-bottom: 1.5px solid var(--border);
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.sp-content h2::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 1.2em;
    background: linear-gradient(180deg, var(--blue) 0%, var(--rv-primary-bright) 100%);
    border-radius: 3px;
    flex-shrink: 0;
    margin-bottom: -1px;
}
.sp-content h3 {
    font-size: 1.18rem;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: flex-start;
    gap: 9px;
}
.sp-content h3::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 1em;
    background: linear-gradient(180deg, var(--blue) 0%, var(--rv-primary-bright) 100%);
    border-radius: 2px;
    flex-shrink: 0;
    opacity: .6;
}

/* Headings nested inside a <li> (ul/ol) — the editor sometimes wraps a list
   item's text in <h1>-<h6>. Their block margins + flex layout + decorative::before bar blow up the list item into a huge empty box with the number/
   bullet floating alone at the top. Render them as plain inline bold text
   flowing right next to the bullet/number instead. */
.sp-content li h1,
.sp-content li h2,
.sp-content li h3,
.sp-content li h4,
.sp-content li h5,
.sp-content li h6 {
    display: inline;
    margin: 0;
    padding: 0;
    font-size: inherit;
    font-weight: 700;
    color: inherit;
    line-height: inherit;
    border: none !important;
    background: none !important;
}
.sp-content li h1::before,
.sp-content li h2::before,
.sp-content li h3::before,
.sp-content li h4::before,
.sp-content li h5::before,
.sp-content li h6::before {
    content: none !important;
}

/* ── "Problem" callout headings — auto-detected by JS from heading text ── */
.sp-content h2.sp-problem-heading,
.sp-content h3.sp-problem-heading {
    background: linear-gradient(135deg, var(--rv-danger-wash) 0%, #fff7ed 100%);
    border: 1.5px solid var(--rv-danger-pale);
    border-bottom: 1.5px solid var(--rv-danger-pale);
    border-radius: 14px;
    padding: 14px 20px;
    color: var(--rv-danger);
}
.sp-content h2.sp-problem-heading::before,
.sp-content h3.sp-problem-heading::before {
    content: '';
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background-color: #fee2e2;
    border: 1.5px solid #fca5a5;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url("data:image/svg+xml;utf8,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23dc2626'%20stroke-width='2.3'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M10.29%203.86L1.82%2018a2%202%200%200%200%201.71%203h16.94a2%202%200%200%200%201.71-3L13.71%203.86a2%202%200%200%200-3.42%200z'/%3E%3Cline%20x1='12'%20y1='9'%20x2='12'%20y2='13'/%3E%3Cline%20x1='12'%20y1='17'%20x2='12.01'%20y2='17'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 16px 16px;
}
[data-theme="dark"] .sp-content h2.sp-problem-heading,
[data-theme="dark"] .sp-content h3.sp-problem-heading {
    background: linear-gradient(135deg, rgba(220,38,38,.12) 0%, rgba(249,115,22,.08) 100%);
    border-color: rgba(248,113,113,.35);
    color: #fca5a5;
}
[data-theme="dark"] .sp-content h2.sp-problem-heading::before,
[data-theme="dark"] .sp-content h3.sp-problem-heading::before {
    background-color: rgba(220,38,38,.18);
    border-color: rgba(248,113,113,.4);
}

/* ── "Mistake" callout headings — auto-detected by JS from heading text ── */
.sp-content h2.sp-mistake-heading,
.sp-content h3.sp-mistake-heading {
    background: linear-gradient(135deg, var(--rv-warning-wash) 0%, #fff7ed 100%);
    border: 1.5px solid var(--rv-warning-soft);
    border-bottom: 1.5px solid var(--rv-warning-soft);
    border-radius: 14px;
    padding: 14px 20px;
    color: #92400e;
}
.sp-content h2.sp-mistake-heading::before,
.sp-content h3.sp-mistake-heading::before {
    content: '';
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background-color: var(--rv-warning-wash);
    border: 1.5px solid var(--rv-warning-soft);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url("data:image/svg+xml;utf8,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23d97706'%20stroke-width='2.3'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Ccircle%20cx='12'%20cy='12'%20r='10'/%3E%3Cline%20x1='12'%20y1='8'%20x2='12'%20y2='12'/%3E%3Cline%20x1='12'%20y1='16'%20x2='12.01'%20y2='16'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 16px 16px;
}
[data-theme="dark"] .sp-content h2.sp-mistake-heading,
[data-theme="dark"] .sp-content h3.sp-mistake-heading {
    background: linear-gradient(135deg, rgba(217,119,6,.14) 0%, rgba(249,115,22,.08) 100%);
    border-color: rgba(252,211,77,.35);
    color: var(--rv-warning-soft);
}
[data-theme="dark"] .sp-content h2.sp-mistake-heading::before,
[data-theme="dark"] .sp-content h3.sp-mistake-heading::before {
    background-color: rgba(217,119,6,.18);
    border-color: rgba(252,211,77,.4);
}

/* ── "Problem" card — wraps a Problem heading + everything until the next
     Problem heading (so "How to Fix It" stays nested inside the same card) ── */
.sp-content .sp-problem-card {
    border: 1.5px solid var(--rv-danger-pale);
    border-radius: 16px;
    padding: 0 24px 26px;
    margin: 2.4em 0;
    background: #fff;
    box-shadow: 0 6px 24px rgba(220,38,38,.07);
    overflow: hidden;
}
.sp-content .sp-problem-card > .sp-problem-heading {
    margin: 0 -24px 20px;
    border: none;
    border-bottom: 1.5px solid var(--rv-danger-pale);
    border-radius: 0;
}
.sp-content .sp-problem-card > *:first-child { margin-top: 0 !important; }
.sp-content .sp-problem-card > *:last-child { margin-bottom: 0 !important; }
[data-theme="dark"] .sp-content .sp-problem-card {
    background: var(--rv-surface);
    border-color: rgba(248,113,113,.35);
    box-shadow: 0 6px 24px rgba(0,0,0,.3);
}
[data-theme="dark"] .sp-content .sp-problem-card > .sp-problem-heading {
    border-bottom-color: rgba(248,113,113,.35);
}

/* ── "Mistake" card — wraps a Mistake heading + everything until the next
     Mistake heading (so "Why It's a Problem" / "How to Avoid It" stay nested) ── */
.sp-content .sp-mistake-card {
    border: 1.5px solid var(--rv-warning-soft);
    border-radius: 16px;
    padding: 0 24px 26px;
    margin: 2.4em 0;
    background: #fff;
    box-shadow: 0 6px 24px rgba(217,119,6,.07);
    overflow: hidden;
}
.sp-content .sp-mistake-card > .sp-mistake-heading {
    margin: 0 -24px 20px;
    border: none;
    border-bottom: 1.5px solid var(--rv-warning-soft);
    border-radius: 0;
}
.sp-content .sp-mistake-card > *:first-child { margin-top: 0 !important; }
.sp-content .sp-mistake-card > *:last-child { margin-bottom: 0 !important; }
[data-theme="dark"] .sp-content .sp-mistake-card {
    background: var(--rv-surface);
    border-color: rgba(252,211,77,.35);
    box-shadow: 0 6px 24px rgba(0,0,0,.3);
}
[data-theme="dark"] .sp-content .sp-mistake-card > .sp-mistake-heading {
    border-bottom-color: rgba(252,211,77,.35);
}

/* ── FAQ accordion — built by JS from the numbered-list + heading + answer
     pattern the rich-text editor emits under "Frequently Asked Questions" ── */
.sp-content .sp-faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 1.6em 0 2em;
}
.sp-content .sp-faq-item {
    border: 1.5px solid var(--border);
    border-radius: 14px;
    background: var(--white);
    overflow: hidden;
    transition: border-color .2s, box-shadow .2s;
}
.sp-content .sp-faq-item.active {
    border-color: var(--blue-mid);
    box-shadow: 0 4px 20px rgba(109, 92, 230,.08);
}
.sp-content .sp-faq-q {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 16px 20px;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
}
.sp-content .sp-faq-num {
    width: 28px; height: 28px;
    border-radius: 8px;
    background: var(--blue);
    color: #fff;
    font-family: var(--font-h);
    font-weight: 800;
    font-size: .8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background .2s;
}
.sp-content .sp-faq-item.active .sp-faq-num { background: linear-gradient(135deg, var(--blue) 0%, var(--rv-primary-bright) 100%); }
.sp-content .sp-faq-q-text {
    flex: 1;
    font-family: var(--font-h);
    font-weight: 700;
    font-size: 1rem;
    color: var(--text);
    line-height: 1.4;
}
.sp-content .sp-faq-chevron {
    width: 18px; height: 18px;
    color: var(--muted2);
    flex-shrink: 0;
    transition: transform .25s ease, color .2s;
}
.sp-content .sp-faq-item.active .sp-faq-chevron { transform: rotate(180deg); color: var(--blue); }
.sp-content .sp-faq-a {
    max-height: 0;
    overflow: hidden;
    padding: 0 20px;
    transition: max-height .3s ease, padding .3s ease;
}
.sp-content .sp-faq-item.active .sp-faq-a { padding: 0 20px 26px 62px; }
.sp-content .sp-faq-a p {
    margin: 0 0 .6em;
    color: var(--text2);
    font-size: .95rem;
    line-height: 1.75;
}
[data-theme="dark"] .sp-content .sp-faq-item { background: var(--rv-surface); border-color: var(--rv-border); }
[data-theme="dark"] .sp-content .sp-faq-item.active { border-color: var(--rv-primary); box-shadow: 0 4px 20px rgba(0,0,0,.3); }

.sp-content h4 {
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--text);
    padding-left: 14px;
    border-left: 3px solid var(--blue-mid);
    margin-left: 0;
}

.sp-content h5 {
    font-size: .82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--blue);
    background: var(--blue-light);
    border: 1px solid var(--blue-mid);
    border-radius: 6px;
    display: inline-block;
    padding: 4px 12px;
    margin-bottom: .6em;
}

.sp-content h6 {
    font-family: var(--font-h);
    font-size: .82rem;
    font-weight: 700;
    color: var(--muted);
    letter-spacing: .04em;
    text-transform: uppercase;
    margin: 1.8em 0 .5em;
    line-height: 1.3;
}

/* ── Paragraphs ── */
.sp-content p { margin: 0 0 1em; }
.sp-content > * + * { margin-top: 0; }

/* ── Links ── */
.sp-content a {
    color: var(--blue);
    text-decoration: none;
    background-image: linear-gradient(var(--blue), var(--blue));
    background-size: 0 1.5px;
    background-repeat: no-repeat;
    background-position: 0 100%;
    font-weight: 600;
    transition: background-size .25s ease, color .15s;
}
.sp-content a:hover {
    color: var(--blue-dark);
    background-size: 100% 1.5px;
}

/* ── Strong / em ── */
.sp-content strong {
    color: var(--text);
    font-weight: 700;
}
.sp-content thead strong,
.sp-content .sp-thead-row strong {
    color: #fff;
}
.sp-content em {
    color: var(--text2);
    font-style: italic;
}

/* ── Unordered lists ── */
.sp-content ul {
    list-style: none;
    margin: 0 0 1.75em;
    padding: 0;
}
.sp-content ul li {
    position: relative;
    padding: 5px 0 5px 28px;
    color: var(--text2);
    line-height: 1.7;
    margin: 0;
}
.sp-content ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 14px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blue) 0%, var(--rv-primary-bright) 100%);
    box-shadow: 0 0 0 3px var(--blue-light);
}
/* nested ul */
.sp-content ul ul {
    margin: 6px 0 6px 12px;
}
.sp-content ul ul li::before {
    width: 5px; height: 5px;
    background: var(--muted2);
    box-shadow: none;
    top: 13px;
}

/* ── Ordered lists ── */
.sp-content ol {
    list-style: none;
    margin: 0 0 1.75em;
    padding: 0;
    counter-reset: sp-ol;
}
.sp-content ol li {
    position: relative;
    padding: 6px 0 6px 40px;
    color: var(--text2);
    line-height: 1.7;
    margin: 0;
    counter-increment: sp-ol;
}
.sp-content ol li::before {
    content: counter(sp-ol);
    position: absolute;
    left: 0;
    top: 7px;
    width: 24px; height: 24px;
    border-radius: 7px;
    background: var(--blue);
    color: #fff;
    font-size: .72rem;
    font-weight: 800;
    font-family: var(--font-h);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.sp-content ol ol {
    margin: 6px 0 6px 12px;
    counter-reset: sp-ol-sub;
}
.sp-content ol ol li { counter-increment: sp-ol-sub; }
.sp-content ol ol li::before {
    content: counter(sp-ol-sub, lower-alpha);
    background: var(--bg2);
    color: var(--muted);
    font-size: .68rem;
}

/* ── Blockquote ── */
.sp-content blockquote {
    position: relative;
    margin: 2.4em 0;
    padding: 28px 28px 28px 36px;
    background: linear-gradient(135deg, var(--blue-light) 0%, rgba(139, 92, 246,.04) 100%);
    border-radius: 0 16px 16px 0;
    border-left: 4px solid var(--blue);
    font-style: italic;
    color: var(--text2);
    font-size: 1.06rem;
    line-height: 1.75;
    overflow: hidden;
}
.sp-content blockquote::before {
    content: '\201C';
    position: absolute;
    top: -10px; right: 20px;
    font-size: 6rem;
    line-height: 1;
    color: var(--blue);
    opacity: .1;
    font-family: Georgia, serif;
    pointer-events: none;
}
.sp-content blockquote p { margin: 0; }
.sp-content blockquote cite {
    display: block;
    margin-top: 12px;
    font-size: .82rem;
    font-style: normal;
    font-weight: 600;
    color: var(--muted);
    letter-spacing: .01em;
}
.sp-content blockquote cite::before { content: '— '; }

/* ── Inline code ── */
.sp-content code {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 2px 8px;
    font-size: .86em;
    font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
    color: var(--rv-primary-bright);
    font-weight: 500;
    white-space: nowrap;
}

/* ── Code blocks ── */
.sp-content pre {
    position: relative;
    background: var(--rv-ink-panel);
    color: #e8e8f2;
    border-radius: 14px;
    padding: 24px 28px;
    overflow-x: auto;
    font-size: .87em;
    margin: 2em 0;
    line-height: 1.72;
    border: 1px solid rgba(255,255,255,.06);
    box-shadow: 0 8px 32px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.04);
}
.sp-content pre::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--rv-primary), var(--rv-primary-bright), var(--rv-primary-soft));
    border-radius: 14px 14px 0 0;
}
.sp-content pre code {
    background: none;
    border: none;
    padding: 0;
    color: inherit;
    font-size: inherit;
    white-space: pre;
}

/* ── Images ── */
.sp-content img {
    max-width: 100%;
    border-radius: 14px;
    margin: 2em 0;
    box-shadow: 0 8px 40px rgba(22, 22, 29,.14);
    display: block;
    border: 1px solid var(--border);
}

/* ── HR ── */
.sp-content hr {
    border: none;
    margin: 3em 0;
    height: 1px;
    position: relative;
    background: transparent;
}
.sp-content hr::before {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 80px; height: 2px;
    background: linear-gradient(90deg, transparent, var(--blue), var(--rv-primary-bright), transparent);
    border-radius: 2px;
}
.sp-content hr::after {
    content: '✦';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    color: var(--muted2);
    font-size: .7rem;
    background: var(--white);
    padding: 0 8px;
}

/* ── Tables ── */
.sp-content .sp-table-wrap {
    overflow-x: auto;
    margin: 2.2em 0;
    border-radius: 16px;
    border: 1.5px solid var(--border);
    box-shadow: 0 4px 24px rgba(22, 22, 29,.07), 0 1px 4px rgba(22, 22, 29,.04);
    background: var(--white);
}
.sp-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: .925rem;
    margin: 0;
    border-radius: 16px;
    overflow: hidden;
}

/* Header row */
.sp-content thead tr,
.sp-content tr.sp-thead-row {
    background: var(--rv-primary);
}
.sp-content th,
.sp-content td.sp-th {
    padding: 16px 18px;
    height: 52px;
    text-align: center;
    font-family: var(--font-h);
    font-weight: 700;
    font-size: .72rem;
    color: #fff !important;
    text-transform: uppercase;
    letter-spacing: .09em;
    border-bottom: none;
    white-space: nowrap;
    position: relative;
    background: transparent !important;
}
/* First header cell stays left-aligned (label column) */
.sp-content th:first-child,
.sp-content td.sp-th:first-child {
    text-align: left;
}
.sp-content th:not(:last-child)::after,
.sp-content td.sp-th:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0; top: 20%; bottom: 20%;
    width: 1px;
    background: rgba(255,255,255,.25);
}

/* Body rows */
.sp-content tr {
    vertical-align: middle;
}
.sp-content td {
    padding: 16px 18px;
    height: 52px;
    text-align: center;
    border-bottom: 1px solid var(--border);
    color: var(--text2);
    vertical-align: middle !important;
    line-height: 1.55;
    transition: background .14s, color .14s;
}
/* First body cell (label) stays left-aligned */
.sp-content td:first-child {
    text-align: left;
    font-weight: 600;
    color: var(--text);
}
/* Kill <p>/heading margins inside table cells — the editor sometimes wraps
   td content in <p> or <h1>-<h6> tags, which carry large block margins
   (e.g. headings' 2.4em top margin) that break row height/alignment */
.sp-content td p,
.sp-content th p,
.sp-content td h1, .sp-content td h2, .sp-content td h3,
.sp-content td h4, .sp-content td h5, .sp-content td h6,
.sp-content th h1, .sp-content th h2, .sp-content th h3,
.sp-content th h4, .sp-content th h5, .sp-content th h6 {
    margin: 0 !important;
    padding: 0 !important;
    line-height: inherit;
}
/* Headings inside cells shouldn't look like document headings — match body text */
.sp-content td h1, .sp-content td h2, .sp-content td h3,
.sp-content td h4, .sp-content td h5, .sp-content td h6,
.sp-content th h1, .sp-content th h2, .sp-content th h3,
.sp-content th h4, .sp-content th h5, .sp-content th h6 {
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
    display: inline;
    border: none !important;
    border-bottom: none !important;
    padding-bottom: 0 !important;
}
.sp-content td h1::before, .sp-content td h2::before, .sp-content td h3::before,
.sp-content th h1::before, .sp-content th h2::before, .sp-content th h3::before {
    content: none !important;
}
.sp-content tbody tr:last-child td { border-bottom: none; }
.sp-content tbody tr:nth-child(even) td { background: var(--bg); }
/* Hover only on tbody rows, never on header */
.sp-content tbody tr:hover td {
    background: var(--blue-light) !important;
    color: var(--text);
}
/* Protect header row from any hover/zebra contamination */
.sp-content thead tr:hover th,
.sp-content tr.sp-thead-row:hover td.sp-th {
    background: transparent !important;
}
.sp-content tr.sp-thead-row:nth-child(even) td { background: transparent !important; }

/* ✓ / ✗ tick/cross styling inside cells */
.sp-tbl-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px; height: 22px;
    border-radius: 50%;
    font-size: .8rem;
    font-weight: 700;
    flex-shrink: 0;
}
.sp-tbl-check--yes { background: var(--rv-success-wash); color: var(--rv-success-deep); }
.sp-tbl-check--no  { background: #fee2e2; color: var(--rv-danger); }

/* ─── Plain text fields ─────────────────────────────────────── */
.sp-plain {
    font-size: 1.025rem;
    color: var(--text2);
    line-height: 1.85;
    margin: 0 0 1.5em;
    white-space: pre-wrap;
}

/* ─── Post footer ───────────────────────────────────────────── */
.sp-footer {
    margin-top: 64px;
    padding-top: 32px;
    border-top: 1.5px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.sp-footer-back {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: .82rem;
    font-weight: 700;
    color: var(--muted);
    text-decoration: none;
    padding: 9px 20px;
    border: 1.5px solid var(--border);
    border-radius: 99px;
    background: var(--white);
    transition: all .18s;
    letter-spacing: -.01em;
}
.sp-footer-back:hover {
    border-color: var(--blue);
    color: var(--blue);
    background: var(--blue-light);
    text-decoration: none;
    gap: 11px;
}
.sp-footer-back svg { width: 13px; height: 13px; }

.sp-share {
    display: flex;
    align-items: center;
    gap: 8px;
}
.sp-share-label {
    font-size: .7rem;
    font-weight: 800;
    color: var(--muted2);
    text-transform: uppercase;
    letter-spacing: .09em;
    margin-right: 2px;
}
.sp-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px; height: 38px;
    border-radius: 11px;
    border: 1.5px solid var(--border);
    background: var(--white);
    color: var(--muted2);
    cursor: pointer;
    text-decoration: none;
    transition: all .18s;
}
.sp-share-btn:hover {
    border-color: var(--blue);
    color: var(--blue);
    background: var(--blue-light);
    transform: translateY(-2px);
    text-decoration: none;
}
.sp-share-btn svg { width: 15px; height: 15px; }

/* ─── Sidebar ───────────────────────────────────────────────── */
.sp-sidebar {
    position: sticky;
    top: var(--sp-sidebar-top, 92px);
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: calc(100vh - var(--sp-sidebar-top, 92px) - 16px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border, #e2e5f0) transparent;
    padding-bottom: 4px;
}
.sp-sidebar::-webkit-scrollbar { width: 4px; }
.sp-sidebar::-webkit-scrollbar-track { background: transparent; }
.sp-sidebar::-webkit-scrollbar-thumb { background: var(--border, #e2e5f0); border-radius: 4px; }

.sp-sidebar-card {
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(22, 22, 29,.05);
}

.sp-sidebar-head {
    padding: 13px 18px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    font-family: var(--font-h);
    font-size: .68rem;
    font-weight: 800;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .1em;
    display: flex;
    align-items: center;
    gap: 7px;
}
.sp-sidebar-head::before {
    content: '';
    display: inline-block;
    width: 3px; height: 12px;
    background: linear-gradient(180deg, var(--blue), var(--rv-primary-bright));
    border-radius: 2px;
    flex-shrink: 0;
}

.sp-sidebar-body { padding: 16px 18px; }

/* ─── Table of Contents ─────────────────────────────────────── */
.sp-toc-body { padding: 8px 12px 12px; }
.sp-toc-empty { font-size: .83rem; color: var(--muted); margin: 0; padding: 6px 6px; }

.sp-toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.sp-toc-link {
    display: block;
    padding: 7px 10px 7px 14px;
    border-radius: 8px;
    font-size: .83rem;
    font-family: var(--font-b);
    color: var(--muted);
    text-decoration: none;
    line-height: 1.45;
    transition: background .15s, color .15s, border-color .15s, padding-left .15s;
    border-left: 2px solid transparent;
    position: relative;
}
.sp-toc-link:hover {
    background: var(--bg);
    color: var(--blue);
    border-left-color: var(--blue);
    padding-left: 16px;
    text-decoration: none;
}
.sp-toc-link.active {
    background: var(--blue-light);
    color: var(--blue);
    border-left-color: var(--blue);
    font-weight: 700;
    padding-left: 16px;
}

.sp-toc-sub {
    list-style: none;
    margin: 0;
    padding: 0;
}
.sp-toc-link--h3 {
    padding-left: 26px;
    font-size: .79rem;
    color: var(--muted2);
}
.sp-toc-link--h3:hover {
    color: var(--blue);
    border-left-color: var(--blue);
    padding-left: 28px;
}
.sp-toc-link--h3.active {
    background: var(--blue-light);
    color: var(--blue);
    border-left-color: var(--blue);
    font-weight: 600;
    padding-left: 28px;
}

/* ─── Sidebar related articles list ─────────────────────────── */
.sp-rel-list { display: flex; flex-direction: column; }

.sp-rel-item {
    display: block;
    padding: 13px 0;
    text-decoration: none;
    border-bottom: 1px solid var(--border);
    transition: all .15s;
}
.sp-rel-item:last-child { border-bottom: none; padding-bottom: 2px; }
.sp-rel-item:first-child { padding-top: 2px; }
.sp-rel-item:hover { text-decoration: none; }
.sp-rel-item:hover .sp-rel-title { color: var(--blue); }

.sp-rel-cat {
    display: inline-block;
    font-size: .61rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--blue);
    background: var(--blue-light);
    border: 1px solid var(--blue-mid);
    border-radius: 99px;
    padding: 2px 8px;
    margin-bottom: 6px;
}
.sp-rel-title {
    font-family: var(--font-h);
    font-size: .84rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.38;
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color .15s;
}
.sp-rel-date {
    font-size: .71rem;
    color: var(--muted2);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ─── Related posts section ─────────────────────────────────── */
.sp-related {
    background: var(--bg);
    border-top: 1.5px solid var(--border);
    padding: 72px 0 88px;
}
.sp-related-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 36px;
    flex-wrap: wrap;
    gap: 12px;
}
.sp-related-title {
    font-family: var(--font-h);
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -.04em;
    margin: 0;
}
.sp-related-all {
    font-size: .82rem;
    font-weight: 700;
    color: var(--blue);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 18px;
    border: 1.5px solid var(--blue-mid);
    border-radius: 99px;
    background: var(--blue-light);
    transition: all .18s;
}
.sp-related-all:hover {
    background: var(--blue);
    color: #fff;
    border-color: var(--blue);
    gap: 9px;
    text-decoration: none;
}
.sp-related-all svg { width: 12px; height: 12px; }

.sp-related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* ─── Related card ──────────────────────────────────────────── */
.sp-rcard {
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    transition: box-shadow .22s, transform .22s, border-color .22s;
}
.sp-rcard:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
    border-color: var(--blue-mid);
    text-decoration: none;
}

.sp-rcard-img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    background: var(--bg2);
    transition: transform .35s ease;
}
.sp-rcard:hover .sp-rcard-img { transform: scale(1.04); }

.sp-rcard-img-ph {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, var(--rv-surface-4) 0%, var(--rv-surface-4) 60%, #ede9fe 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}
.sp-rcard-img-ph svg { width: 34px; height: 34px; color: var(--blue-mid); opacity: .55; }

.sp-rcard-body {
    padding: 20px 22px 22px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.sp-rcard-cat {
    font-size: .63rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--blue);
    background: var(--blue-light);
    border: 1px solid var(--blue-mid);
    border-radius: 99px;
    padding: 3px 10px;
    margin-bottom: 12px;
    display: inline-block;
    align-self: flex-start;
}
.sp-rcard-title {
    font-family: var(--font-h);
    font-size: .97rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -.025em;
    line-height: 1.34;
    margin: 0 0 auto;
    padding-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color .15s;
}
.sp-rcard:hover .sp-rcard-title { color: var(--blue); }
.sp-rcard-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}
.sp-rcard-date {
    font-size: .73rem;
    color: var(--muted2);
    display: flex;
    align-items: center;
    gap: 5px;
}
.sp-rcard-date svg { width: 11px; height: 11px; }
.sp-rcard-read {
    font-size: .75rem;
    font-weight: 700;
    color: var(--blue);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: gap .15s;
}
.sp-rcard:hover .sp-rcard-read { gap: 8px; }
.sp-rcard-read svg { width: 12px; height: 12px; }

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE — mobile-first from widest to narrowest
══════════════════════════════════════════════════════════════ */

/* ── 1280px: 150% OS scaling on 1920px displays ── */
@media (max-width: 1280px) {
    .sp-layout { gap: 40px; }
    .sp-body { padding: 48px 0 80px; }
    .sp-sidebar { --sp-sidebar-top: 84px; }
}

/* ── compact sidebar at reduced viewport heights (150% scaling) ── */
@media (max-height: 760px) {
    .sp-sidebar { --sp-sidebar-top: 76px; gap: 10px; }
    .sp-sidebar-head { padding: 9px 14px; font-size: .72rem; }
    .sp-sidebar-body { padding: 10px 14px; }
    .sp-toc-body { padding: 4px 8px 8px; }
    .sp-toc-link { padding: 5px 8px 5px 12px; font-size: .79rem; }
    .sp-sidebar-card { border-radius: 12px; }
}

/* ── 1100px: tighter gap + smaller sidebar ── */
@media (max-width: 1100px) {
    .sp-layout {
        grid-template-columns: 1fr 248px;
        gap: 28px;
    }
    .sp-content { font-size: .95rem; }
    .sp-content h2 { font-size: 1.25rem; }
    .sp-content h3 { font-size: 1.05rem; }
}

/* ── drop sidebar, 2-col related ── */
@media (max-width: 860px) {
    .sp-layout {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .sp-sidebar { display: none; }
    .sp-related-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── 860px: tablets ── */
@media (max-width: 860px) {
    .sp-hero-inner { padding: 48px 0 44px; }
    .sp-title {
        font-size: clamp(1.5rem, 4vw, 2rem);
        max-width: 100%;
    }
    .sp-body { padding: 56px 0 88px; }
    .sp-related { padding: 56px 0 72px; }
    .sp-related-title { font-size: 1.25rem; }
}

/* ── 640px: phablets / large phones ── */
@media (max-width: 640px) {
    /* Prevent any child from blowing out the viewport */
    .sp-wrap { overflow-x: hidden; max-width: 100vw; }

    /* Hero */
    .sp-hero { min-height: 260px; }
    .sp-hero-inner { padding: 36px 0 32px; }
    /* On small screens use a full uniform overlay instead of directional */
    .sp-hero-fade {
        background: rgba(7,16,31,.72) !important;
    }
    /* Decorative blobs are too big on mobile — shrink them */
    .sp-hero-bg::before {
        width: 280px; height: 280px;
        top: -40px; left: -30px;
    }
    .sp-hero-bg::after {
        width: 200px; height: 200px;
        bottom: -30px; right: -20px;
    }

    /* Hero text */
    .sp-back { margin-bottom: 14px; }
    .sp-cat  { font-size: .62rem; padding: 3px 10px; margin-bottom: 12px; }
    .sp-title {
        font-size: 1.45rem;
        letter-spacing: -.025em;
        line-height: 1.22;
        margin-bottom: 16px;
    }
    .sp-hero-divider { margin-bottom: 14px; }
    .sp-meta { gap: 4px 10px; }
    .sp-meta-item { font-size: .72rem; }
    .sp-author-avatar { width: 24px; height: 24px; }
    .sp-author-avatar svg { width: 11px; height: 11px; }

    /* Body */
    .sp-body { padding: 36px 0 64px; }

    /* Excerpt */
    .sp-excerpt {
        font-size: .975rem;
        padding: 16px 18px 16px 20px;
        margin-bottom: 32px;
        border-radius: 0 12px 12px 0;
    }
    .sp-excerpt::before { font-size: 3rem; top: -4px; left: 10px; }

    /* Article typography */
    .sp-content { font-size: .945rem; line-height: 1.82; }
    .sp-content h1 { font-size: 1.55rem; margin-top: 2em; }
    .sp-content h2 { font-size: 1.2rem; gap: 8px; }
    .sp-content h2::before { height: 1em; width: 3px; margin-top: 3px; flex-shrink: 0; }
    .sp-content h3 { font-size: 1.05rem; gap: 7px; }
    .sp-content h3::before { margin-top: 4px; flex-shrink: 0; }
    .sp-content h4 { font-size: .97rem; }
    .sp-content h5 { font-size: .78rem; }
    .sp-content p  { margin-bottom: .85em; }

    /* Lists */
    .sp-content ul li { padding-left: 22px; }
    .sp-content ol li { padding-left: 34px; }
    .sp-content ol li::before { width: 20px; height: 20px; font-size: .68rem; border-radius: 6px; top: 8px; }

    /* Blockquote */
    .sp-content blockquote {
        padding: 18px 16px 18px 20px;
        font-size: .97rem;
        margin: 1.8em 0;
        border-radius: 0 12px 12px 0;
    }
    .sp-content blockquote::before { font-size: 4rem; right: 10px; }

    /* Code */
    .sp-content code { font-size: .84em; padding: 2px 6px; }
    .sp-content pre {
        padding: 16px 16px;
        font-size: .82em;
        border-radius: 10px;
        margin: 1.6em 0;
    }

    /* Images */
    .sp-content img { margin: 1.4em 0; border-radius: 10px; }

    /* Tables — allow horizontal scroll, wrap text */
    .sp-content .sp-table-wrap {
        border-radius: 12px;
        margin: 1.6em 0;
    }
    .sp-content table { font-size: .82rem; }
    .sp-content th,
    .sp-content td { padding: 10px 12px; white-space: normal; }
    .sp-content th { font-size: .68rem; }

    /* HR */
    .sp-content hr { margin: 2em 0; }

    /* Post footer */
    .sp-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
        margin-top: 48px;
    }
    .sp-share { gap: 6px; }
    .sp-share-btn { width: 34px; height: 34px; border-radius: 9px; }

    /* Related section */
    .sp-related { padding: 40px 0 52px; }
    .sp-related-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 24px;
    }
    .sp-related-title { font-size: 1.2rem; }
    .sp-related-grid { grid-template-columns: 1fr; gap: 14px; }

    /* Related cards */
    .sp-rcard { border-radius: 14px; }
    .sp-rcard-body { padding: 16px 18px 18px; }
    .sp-rcard-title { font-size: .9rem; }
}

/* ── 480px: standard small phones ── */
@media (max-width: 480px) {
    .sp-hero { min-height: 240px; }
    .sp-hero-inner { padding: 32px 0 28px; }
    .sp-title { font-size: 1.32rem; line-height: 1.25; }
    .sp-meta-sep { display: none; }

    .sp-excerpt { font-size: .93rem; padding: 14px 14px 14px 18px; }

    .sp-content { font-size: .915rem; }
    .sp-content h2 { font-size: 1.12rem; margin-top: 2em; }
    .sp-content h3 { font-size: 1rem; }
    .sp-content pre  { padding: 14px 14px; font-size: .8em; }
    .sp-content th,
    .sp-content td   { padding: 9px 10px; font-size: .79rem; }

    .sp-body { padding: 28px 0 56px; }
}

/* ── 375px: iPhone-class ── */
@media (max-width: 375px) {
    .sp-title { font-size: 1.22rem; }
    .sp-content h2 { font-size: 1.08rem; }
    .sp-content h3 { font-size: .97rem; }
    .sp-content { font-size: .9rem; }
    .sp-content pre { font-size: .78em; }
    .sp-footer-back { font-size: .78rem; padding: 8px 16px; }
    .sp-share-btn { width: 32px; height: 32px; }
}

/* ── 320px: very small ── */
@media (max-width: 320px) {
    .sp-title { font-size: 1.12rem; }
    .sp-content { font-size: .875rem; }
    .sp-content h2 { font-size: 1rem; }
    .sp-content h3 { font-size: .93rem; }
    .sp-content th,
    .sp-content td { padding: 7px 8px; font-size: .75rem; }
    .sp-excerpt { font-size: .875rem; }
    .sp-rcard-body { padding: 12px 14px 14px; }
}

/* ═══════════════════════════════════════════════════════════════
   DARK MODE
═══════════════════════════════════════════════════════════════ */
[data-theme="dark"] .sp-wrap { background: var(--rv-page); }
[data-theme="dark"] .sp-body { background: var(--rv-page); }

/* Content typography dark fixes */
[data-theme="dark"] .sp-content code {
    background: var(--rv-surface-3);
    border-color: var(--rv-border);
    color: #c4b5fd;
}
[data-theme="dark"] .sp-content blockquote {
    background: linear-gradient(135deg, rgba(109, 92, 230,.08) 0%, rgba(139, 92, 246,.06) 100%);
    border-left-color: var(--rv-primary);
}
[data-theme="dark"] .sp-content ul li::before {
    background: linear-gradient(135deg, var(--rv-primary) 0%, #a78bfa 100%);
    box-shadow: 0 0 0 3px var(--rv-surface-2);
}
[data-theme="dark"] .sp-content ul ul li::before {
    background: #4a6080;
    box-shadow: none;
}
[data-theme="dark"] .sp-content ol li::before {
    background: var(--rv-primary);
}
[data-theme="dark"] .sp-content ol ol li::before {
    background: var(--rv-surface-3);
    color: var(--rv-muted);
}
[data-theme="dark"] .sp-content .sp-table-wrap {
    background: var(--rv-surface);
    border-color: var(--rv-border);
    box-shadow: 0 4px 24px rgba(0,0,0,.45);
}
[data-theme="dark"] .sp-content thead tr,
[data-theme="dark"] .sp-content tr.sp-thead-row {
    background: var(--rv-primary-deep);
}
[data-theme="dark"] .sp-content thead tr:hover th,
[data-theme="dark"] .sp-content tr.sp-thead-row:hover td.sp-th {
    background: transparent !important;
}
[data-theme="dark"] .sp-content tr.sp-thead-row:nth-child(even) td { background: transparent !important; }
[data-theme="dark"] .sp-content td { border-bottom-color: var(--rv-surface-3); }
[data-theme="dark"] .sp-content tbody tr:nth-child(even) td { background: var(--rv-surface-2); }
[data-theme="dark"] .sp-content tbody tr:hover td {
    background: var(--rv-surface-2);
    color: var(--rv-ink);
}
[data-theme="dark"] .sp-tbl-check--yes { background: #052e16; color: var(--rv-success-soft); }
[data-theme="dark"] .sp-tbl-check--no  { background: #450a0a; color: #f87171; }
[data-theme="dark"] .sp-content img {
    border-color: var(--rv-border);
    box-shadow: 0 8px 40px rgba(0,0,0,.4);
}
[data-theme="dark"] .sp-content hr::after { background: var(--rv-page); }
[data-theme="dark"] .sp-content a {
    color: var(--rv-primary);
    background-image: linear-gradient(var(--rv-primary), var(--rv-primary));
}
[data-theme="dark"] .sp-content a:hover { color: #6ba3ff; }
[data-theme="dark"] .sp-content strong { color: var(--text); }
[data-theme="dark"] .sp-content thead strong,
[data-theme="dark"] .sp-content .sp-thead-row strong { color: #fff; }

[data-theme="dark"] .sp-excerpt {
    background: rgba(109, 92, 230,.08);
    border-left-color: var(--rv-primary);
}
[data-theme="dark"] .sp-excerpt::before { color: var(--rv-primary); }

/* Sidebar dark */
[data-theme="dark"] .sp-sidebar-card { background: var(--rv-surface); border-color: var(--rv-border); }
[data-theme="dark"] .sp-sidebar-head { background: var(--rv-surface-2); border-bottom-color: var(--rv-border); }
[data-theme="dark"] .sp-toc-link:hover,
[data-theme="dark"] .sp-toc-link--h3:hover { background: var(--rv-surface-3); }
[data-theme="dark"] .sp-toc-link.active,
[data-theme="dark"] .sp-toc-link--h3.active { background: var(--rv-surface-2); }
[data-theme="dark"] .sp-rel-item { border-bottom-color: var(--rv-surface-3); }
[data-theme="dark"] .sp-rel-cat { background: var(--rv-surface-2); border-color: var(--rv-primary-pale); }

/* Footer dark */
[data-theme="dark"] .sp-footer { border-top-color: var(--rv-border); }
[data-theme="dark"] .sp-footer-back { background: var(--rv-surface); border-color: var(--rv-border); }
[data-theme="dark"] .sp-footer-back:hover { background: var(--rv-surface-2); border-color: var(--rv-primary); }
[data-theme="dark"] .sp-share-btn { background: var(--rv-surface); border-color: var(--rv-border); }
[data-theme="dark"] .sp-share-btn:hover { background: var(--rv-surface-2); border-color: var(--rv-primary); }

/* Related section dark */
[data-theme="dark"] .sp-related { background: #060c18; border-top-color: var(--rv-surface-3); }
[data-theme="dark"] .sp-related-all { background: var(--rv-surface-2); border-color: var(--rv-primary-pale); }
[data-theme="dark"] .sp-related-all:hover { background: var(--rv-primary); border-color: var(--rv-primary); }
[data-theme="dark"] .sp-rcard { background: var(--rv-surface); border-color: var(--rv-border); }
[data-theme="dark"] .sp-rcard:hover { border-color: rgba(109, 92, 230,.4); }
[data-theme="dark"] .sp-rcard-img-ph {
    background: linear-gradient(135deg, var(--rv-surface-2) 0%, var(--rv-primary-pale) 60%, #1a1040 100%);
}
[data-theme="dark"] .sp-rcard-cat { background: var(--rv-surface-2); border-color: var(--rv-primary-pale); }
[data-theme="dark"] .sp-rcard-foot { border-top-color: var(--rv-border); }
