/* ==========================================================================
   Modern Single Post — single-modern-styles.css
   Clean, light sidebar design · Proper responsive 3-column layout
   ========================================================================== */

/* ---------- UAGB TOC SVG Fix ---------- */
/* The UAGB Table of Contents collapse chevron has no width/height,
   causing it to blow up to full container size. Constrain it. */
.uagb-toc__title svg {
    width: 20px;
    height: 20px;
    display: inline-block;
    vertical-align: middle;
    margin-left: 8px;
    cursor: pointer;
    flex-shrink: 0;
}

/* ---------- Astra Overrides ---------- */
/* Force Astra to give us full width and hide its own sidebars */
.modern-single-post .site-content {
    padding-top: 0;
}

/* Remove blue background behind header on single posts */
.modern-single-post .main-header-bar-wrap,
.modern-single-post .main-header-bar,
.modern-single-post .site-header,
.modern-single-post #masthead {
    background-color: #ffffff !important;
}

.modern-single-post .ast-container {
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.modern-single-post #primary {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Hide Astra's own sidebar — we have our own */
.modern-single-post #secondary,
.modern-single-post .sidebar-main,
.modern-single-post aside.widget-area {
    display: none !important;
}

/* Remove Astra content margin when sidebar is present */
/* Remove Astra content margin when sidebar is present */
.modern-single-post .ast-left-sidebar #primary,
.modern-single-post .ast-right-sidebar #primary,
.modern-single-post .ast-separate-container #primary {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Aggressively force full width on all wrappers */
.modern-single-post .hfeed,
.modern-single-post .site-content,
.modern-single-post #content,
.modern-single-post .ast-container {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    float: none !important;
}

/* ---------- Custom Properties ---------- */
:root {
    --ms-primary: #2563eb;
    --ms-primary-light: #eff6ff;
    --ms-primary-hover: #1d4ed8;
    --ms-accent: #0ea5e9;
    --ms-text: #1e293b;
    --ms-text-muted: #64748b;
    --ms-text-light: #94a3b8;
    --ms-bg: #f8fafc;
    --ms-white: #ffffff;
    --ms-border: #e2e8f0;
    --ms-border-light: #f1f5f9;
    --ms-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --ms-shadow-md: 0 4px 20px rgba(0, 0, 0, 0.06);
    --ms-shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.08);
    --ms-radius: 16px;
    --ms-radius-sm: 10px;
    --ms-font: 'Georgia', 'Times New Roman', serif;
    --ms-font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --ms-font-display: 'Georgia', serif;
}

/* ---------- Container — 3-column grid ---------- */
/* ---------- Container — 3-column grid ---------- */
.ms-single-container {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr) 300px;
    gap: 10px;
    /* Reduced to 10px */
    max-width: 100%;
    /* Force full width on large screens */
    margin: 0 auto;
    padding: 10px 10px 60px;
    /* Reduced outer padding */
    align-items: start;
    /* REQUIRED for position: sticky to work in CSS Grid */
    font-family: var(--ms-font-sans);
    color: var(--ms-text);
    background: var(--ms-bg);
}

/* Ensure Sidebars stay visible on large screens */
.ms-sidebar {
    display: block;
}

/* ---------- Sidebars (shared) ---------- */
.ms-sidebar__inner {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Make Left Sidebar Sticky (TOC, Share, Progress) */
.ms-sidebar--left {
    position: -webkit-sticky;
    position: sticky;
    top: 90px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

/* ---------- Widgets ---------- */
.ms-widget {
    background: var(--ms-white);
    border: 1px solid var(--ms-border);
    border-radius: var(--ms-radius);
    padding: 24px;
    box-shadow: var(--ms-shadow-sm);
}

.ms-widget__title {
    font-family: var(--ms-font-sans);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ms-text-muted);
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--ms-border-light);
}

.ms-widget__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ms-widget__list li {
    margin: 0;
}

.ms-widget__list li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--ms-border-light);
    color: var(--ms-text);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.ms-widget__list li:last-child a {
    border-bottom: none;
}

.ms-widget__list li a:hover {
    color: var(--ms-primary);
}

.ms-widget__count {
    font-size: 0.78rem;
    color: var(--ms-text-light);
    background: var(--ms-border-light);
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
}

/* ---- TOC Widget Constraints ---- */
#toc-widget {
    max-height: 70vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--ms-border-light) transparent;
}

#toc-widget::-webkit-scrollbar {
    width: 6px;
}

#toc-widget::-webkit-scrollbar-track {
    background: transparent;
}

#toc-widget::-webkit-scrollbar-thumb {
    background-color: var(--ms-border-light);
    border-radius: 20px;
}

/* ---- TOC ---- */
#table-of-contents a {
    display: block;
    padding: 8px 0;
    border-bottom: 1px solid var(--ms-border-light);
    color: var(--ms-text);
    text-decoration: none;
    font-size: 18px;
    /* Updated to 18px */
    line-height: 1.5;
    transition: color 0.2s, padding-left 0.2s;
}

#table-of-contents li:last-child a {
    border-bottom: none;
}

#table-of-contents a:hover {
    color: var(--ms-primary);
    padding-left: 4px;
}

.ms-toc--indent-1 a {
    padding-left: 14px !important;
    font-size: 0.84rem !important;
}

.ms-toc--indent-2 a {
    padding-left: 28px !important;
    font-size: 0.8rem !important;
    color: var(--ms-text-muted);
}

/* ---- Share Buttons ---- */
.ms-share-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ms-share-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid var(--ms-border);
    border-radius: var(--ms-radius-sm);
    background: var(--ms-white);
    color: var(--ms-text);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--ms-font-sans);
}

.ms-share-btn:hover {
    border-color: var(--ms-primary);
    color: var(--ms-primary);
    background: var(--ms-primary-light);
}

.ms-share-btn--facebook:hover {
    color: #1877f2;
    border-color: #1877f2;
}

.ms-share-btn--twitter:hover {
    color: #1da1f2;
    border-color: #1da1f2;
}

.ms-share-btn--linkedin:hover {
    color: #0a66c2;
    border-color: #0a66c2;
}

/* ---- Reading Progress ---- */
.ms-progress__track {
    width: 100%;
    height: 6px;
    background: var(--ms-border-light);
    border-radius: 6px;
    overflow: hidden;
}

.ms-progress__fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--ms-primary), var(--ms-accent));
    border-radius: 6px;
    transition: width 0.15s ease-out;
}

.ms-progress__text {
    margin: 10px 0 0;
    font-size: 0.8rem;
    color: var(--ms-text-muted);
    font-weight: 500;
}

/* ---------- Author Card ---------- */
.ms-author-card {
    background: var(--ms-white);
    border: 1px solid var(--ms-border);
    border-radius: var(--ms-radius);
    padding: 28px 24px;
    text-align: center;
    box-shadow: var(--ms-shadow-sm);
}

.ms-author-card__avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 14px;
    border: 3px solid var(--ms-border-light);
}

.ms-author-card__name {
    font-family: var(--ms-font-display);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--ms-text);
    margin: 0 0 8px;
}

.ms-author-card__bio {
    font-size: 0.875rem;
    color: var(--ms-text-muted);
    line-height: 1.6;
    margin: 0;
}

/* ---- Recent Posts ---- */
.ms-recent-posts {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ms-recent-post {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--ms-border-light);
    text-decoration: none;
    transition: background 0.15s;
}

.ms-recent-post:last-child {
    border-bottom: none;
}

.ms-recent-post:hover .ms-recent-post__title {
    color: var(--ms-primary);
}

.ms-recent-post__thumb {
    width: 52px;
    height: 52px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--ms-border-light);
}

.ms-recent-post__thumb--empty {
    background: linear-gradient(135deg, var(--ms-primary-light), var(--ms-border-light));
}

.ms-recent-post__text {
    min-width: 0;
}

.ms-recent-post__title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--ms-text);
    margin: 0 0 4px;
    line-height: 1.35;
    transition: color 0.2s;
}

.ms-recent-post__date {
    font-size: 0.78rem;
    color: var(--ms-text-light);
}

/* ---- Tags ---- */
.ms-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ms-tag {
    display: inline-block;
    background: var(--ms-primary-light);
    color: var(--ms-primary);
    padding: 5px 12px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 500;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.ms-tag:hover {
    background: var(--ms-primary);
    color: var(--ms-white);
}

/* ================================================================
   MAIN CONTENT AREA
   ================================================================ */

.ms-content {
    min-width: 0;
    /* Prevent grid blowout */
}

.ms-article {
    background: var(--ms-white);
    border-radius: var(--ms-radius);
    overflow: hidden;
    border: 1px solid var(--ms-border);
    box-shadow: var(--ms-shadow-md);
}

/* ---- Header / Hero ---- */
.ms-header {
    position: relative;
    min-height: 380px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    background: linear-gradient(135deg, var(--ms-primary) 0%, var(--ms-accent) 100%);
}

.ms-header__image {
    position: absolute;
    inset: 0;
}

.ms-header__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ms-header__gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top,
            rgba(0, 0, 0, 0.75) 0%,
            rgba(0, 0, 0, 0.35) 40%,
            rgba(0, 0, 0, 0.05) 100%);
}

.ms-header__content {
    position: relative;
    z-index: 2;
    padding: 40px 44px;
    width: 100%;
    box-sizing: border-box;
}

/* KEY FIX: title no longer overflows */
.ms-header__title {
    font-family: var(--ms-font-display);
    font-size: clamp(1.6rem, 3vw, 2.5rem);
    font-weight: 700;
    color: #fff;
    line-height: 1.25;
    margin: 0 0 16px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.ms-header__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.85);
}

.ms-header__author {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.ms-header__avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.ms-header__cat {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    backdrop-filter: blur(6px);
    transition: background 0.2s;
}

.ms-header__cat:hover {
    background: rgba(255, 255, 255, 0.35);
}

/* ---- Post Body ---- */
.ms-body {
    padding: 48px 44px 56px;
}

.ms-body__content {
    font-family: var(--ms-font);
    font-size: 21px;
    /* Updated to 21px */
    line-height: 1.8;
    /* Adjusted for larger text */
    color: var(--ms-text);
}

.ms-body__content h2 {
    font-family: var(--ms-font-sans);
    font-size: 1.6rem;
    font-weight: 700;
    margin: 2.4em 0 0.8em;
    color: var(--ms-text);
    line-height: 1.3;
}

.ms-body__content h3 {
    font-family: var(--ms-font-sans);
    font-size: 1.3rem;
    font-weight: 600;
    margin: 2em 0 0.7em;
    color: var(--ms-text);
}

.ms-body__content h4 {
    font-family: var(--ms-font-sans);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 1.6em 0 0.5em;
    color: var(--ms-text-muted);
}

.ms-body__content p {
    margin: 0 0 1.5em;
}

.ms-body__content a {
    color: var(--ms-primary);
    text-decoration: underline;
    text-decoration-color: rgba(37, 99, 235, 0.3);
    text-underline-offset: 3px;
    transition: text-decoration-color 0.2s;
}

.ms-body__content a:hover {
    text-decoration-color: var(--ms-primary);
}

.ms-body__content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--ms-radius-sm);
    margin: 1.5em 0;
}

.ms-body__content blockquote {
    margin: 2em 0;
    padding: 20px 24px;
    border-left: 4px solid var(--ms-primary);
    background: var(--ms-primary-light);
    border-radius: 0 var(--ms-radius-sm) var(--ms-radius-sm) 0;
    font-style: italic;
    color: var(--ms-text-muted);
}

.ms-body__content blockquote p:last-child {
    margin-bottom: 0;
}

.ms-body__content ul,
.ms-body__content ol {
    padding-left: 1.5em;
    margin: 0 0 1.5em;
}

.ms-body__content li {
    margin-bottom: 0.5em;
}

.ms-body__content pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 20px 24px;
    border-radius: var(--ms-radius-sm);
    overflow-x: auto;
    font-size: 0.9rem;
    line-height: 1.7;
    margin: 1.5em 0;
}

.ms-body__content code {
    font-size: 0.9em;
    background: var(--ms-border-light);
    padding: 2px 6px;
    border-radius: 4px;
}

.ms-body__content pre code {
    background: none;
    padding: 0;
}

.ms-body__content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    font-size: 0.95rem;
}

.ms-body__content th,
.ms-body__content td {
    padding: 12px 16px;
    border: 1px solid var(--ms-border);
    text-align: left;
}

.ms-body__content th {
    background: var(--ms-border-light);
    font-weight: 600;
}

/* ================================================================
   CUSTOM COMPONENTS (TL;DR & FAQ)
   ================================================================ */

/* ---- TL;DR Box ---- */
.ms-tldr-box {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    border-radius: var(--ms-radius);
    padding: 24px 32px;
    margin: 2em 0;
    box-shadow: 0 4px 6px -1px rgba(14, 165, 233, 0.1), 0 2px 4px -1px rgba(14, 165, 233, 0.06);
    position: relative;
    overflow: hidden;
}

.ms-tldr-box::before {
    content: "TL;DR";
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 4rem;
    font-weight: 900;
    color: rgba(14, 165, 233, 0.05);
    transform: rotate(15deg);
    pointer-events: none;
    font-family: var(--ms-font-sans);
}

.ms-tldr-title {
    font-family: var(--ms-font-sans);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ms-primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.ms-tldr-title svg {
    width: 18px;
    height: 18px;
}

.ms-tldr-content {
    font-size: 1.05rem;
    color: var(--ms-text);
    line-height: 1.6;
}

.ms-tldr-content p:last-child {
    margin-bottom: 0;
}

/* TL;DR List Styles */
.ms-tldr-content ul {
    margin: 1em 0;
    padding-left: 0;
    list-style: none;
}

.ms-tldr-content li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 0.8em;
}

.ms-tldr-content li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--ms-primary);
    font-weight: 800;
}

/* ---- FAQ Accordion ---- */
.ms-faq-section {
    margin: 3em 0;
    background: var(--ms-white);
    border: 1px solid var(--ms-border);
    border-radius: var(--ms-radius);
    padding: 32px;
    box-shadow: var(--ms-shadow-sm);
}

.ms-faq-title {
    font-family: var(--ms-font-display);
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 0 24px;
    text-align: center;
    color: var(--ms-text);
}

.ms-faq-item {
    border-bottom: 1px solid var(--ms-border-light);
}

.ms-faq-item:last-child {
    border-bottom: none;
}

.ms-faq-item summary {
    padding: 20px 0;
    cursor: pointer;
    font-family: var(--ms-font-sans);
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--ms-text);
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: color 0.2s;
}

.ms-faq-item summary::-webkit-details-marker {
    display: none;
}

.ms-faq-item summary:hover {
    color: var(--ms-primary);
}

.ms-faq-item summary::after {
    content: '+';
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--ms-primary);
    transition: transform 0.2s ease;
}

.ms-faq-item[open] summary::after {
    transform: rotate(45deg);
}

.ms-faq-item[open] summary {
    color: var(--ms-primary);
    border-bottom: 1px solid transparent;
    /* Fix jumpiness */
}

.ms-faq-answer {
    padding: 0 0 24px;
    color: var(--ms-text-muted);
    font-size: 1rem;
    line-height: 1.6;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ================================================================
   CUSTOM COMPONENTS — Pros & Cons, Quote, Pro Tip
   ================================================================ */

/* ---- Pros & Cons ---- */
.ms-proscons {
    margin: 2.5em 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border-radius: var(--ms-radius);
    overflow: hidden;
    border: 1px solid var(--ms-border);
    box-shadow: var(--ms-shadow-sm);
}

.ms-proscons__col {
    padding: 28px 28px 24px;
}

.ms-proscons__col--pros {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-right: 1px solid #bbf7d0;
}

.ms-proscons__col--cons {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
}

.ms-proscons__heading {
    font-family: var(--ms-font-sans);
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ms-proscons__col--pros .ms-proscons__heading {
    color: #16a34a;
}

.ms-proscons__col--cons .ms-proscons__heading {
    color: #dc2626;
}

.ms-proscons__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ms-proscons__list li {
    position: relative;
    padding-left: 26px;
    margin-bottom: 10px;
    font-size: 0.95rem;
    line-height: 1.55;
    color: var(--ms-text);
}

.ms-proscons__list li:last-child {
    margin-bottom: 0;
}

.ms-proscons__col--pros .ms-proscons__list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 1px;
    color: #16a34a;
    font-weight: 800;
    font-size: 1rem;
}

.ms-proscons__col--cons .ms-proscons__list li::before {
    content: "✕";
    position: absolute;
    left: 0;
    top: 1px;
    color: #dc2626;
    font-weight: 800;
    font-size: 1rem;
}

@media (max-width: 600px) {
    .ms-proscons {
        grid-template-columns: 1fr;
    }

    .ms-proscons__col--pros {
        border-right: none;
        border-bottom: 1px solid #bbf7d0;
    }
}

/* ---- Quote Callout ---- */
.ms-quote {
    margin: 2.5em 0;
    padding: 32px 36px;
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
    border: 1px solid #e9d5ff;
    border-left: 5px solid #a855f7;
    border-radius: 0 var(--ms-radius) var(--ms-radius) 0;
    box-shadow: 0 4px 6px -1px rgba(168, 85, 247, 0.08);
    position: relative;
}

.ms-quote::before {
    content: "\201C";
    position: absolute;
    top: -8px;
    left: 16px;
    font-size: 5rem;
    font-family: Georgia, serif;
    color: rgba(168, 85, 247, 0.12);
    line-height: 1;
    pointer-events: none;
}

.ms-quote__text {
    font-family: var(--ms-font);
    font-size: 1.15rem;
    font-style: italic;
    line-height: 1.7;
    color: var(--ms-text);
    margin: 0 0 12px;
}

.ms-quote__text p:last-child {
    margin-bottom: 0;
}

.ms-quote__attribution {
    font-family: var(--ms-font-sans);
    font-size: 0.85rem;
    font-weight: 600;
    color: #7c3aed;
    margin: 0;
}

.ms-quote__attribution::before {
    content: "— ";
}

@media (max-width: 600px) {
    .ms-quote {
        padding: 24px 20px;
    }

    .ms-quote__text {
        font-size: 1.05rem;
    }
}

/* ---- Pro Tip Box ---- */
.ms-protip {
    margin: 2.5em 0;
    padding: 24px 32px;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 1px solid #fde68a;
    border-radius: var(--ms-radius);
    box-shadow: 0 4px 6px -1px rgba(251, 191, 36, 0.1), 0 2px 4px -1px rgba(251, 191, 36, 0.06);
    position: relative;
    overflow: hidden;
}

.ms-protip::before {
    content: "💡";
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 4rem;
    opacity: 0.08;
    transform: rotate(15deg);
    pointer-events: none;
}

.ms-protip__label {
    font-family: var(--ms-font-sans);
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #b45309;
    margin: 0 0 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ms-protip__content {
    font-size: 1rem;
    color: var(--ms-text);
    line-height: 1.65;
}

.ms-protip__content p:last-child {
    margin-bottom: 0;
}

/* ---- Post Navigation ---- */
.ms-post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 32px;
}

.ms-post-nav__link {
    display: block;
    padding: 20px 24px;
    background: var(--ms-white);
    border: 1px solid var(--ms-border);
    border-radius: var(--ms-radius);
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: var(--ms-shadow-sm);
}

.ms-post-nav__link:hover {
    border-color: var(--ms-primary);
    box-shadow: var(--ms-shadow-md);
}

.ms-post-nav__link--next {
    text-align: right;
}

.ms-post-nav__label {
    display: block;
    font-size: 0.8rem;
    color: var(--ms-text-muted);
    margin-bottom: 6px;
    font-weight: 500;
}

.ms-post-nav__title {
    font-size: 0.95rem;
    color: var(--ms-text);
    font-weight: 600;
    line-height: 1.4;
}

.ms-post-nav__link:hover .ms-post-nav__title {
    color: var(--ms-primary);
}

/* ================================================================
   RESPONSIVE
   ================================================================ */

/* Tablet: drop to 2-column, hide left sidebar */
@media (max-width: 1100px) {
    .ms-single-container {
        grid-template-columns: minmax(0, 1fr) 280px;
        /* Hide left sidebar first */
        gap: 32px;
        padding: 28px 24px 60px;
        max-width: 100%;
    }

    .ms-sidebar--left {
        display: none !important;
    }

    .ms-sidebar--right {
        order: 2;
    }

    .ms-content {
        order: 1;
    }

    .ms-header__content {
        padding: 32px 32px;
    }

    .ms-body {
        padding: 36px 32px 44px;
    }
}

/* Mobile: single column */
@media (max-width: 768px) {
    .ms-single-container {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 16px 16px 48px;
    }

    .ms-sidebar--right {
        order: 3;
    }

    .ms-content {
        order: 1;
    }

    .ms-header {
        min-height: 280px;
    }

    .ms-header__content {
        padding: 24px 20px;
    }

    .ms-header__title {
        font-size: clamp(1.3rem, 5vw, 1.8rem);
    }

    .ms-header__meta {
        gap: 10px;
        font-size: 0.8rem;
    }

    .ms-body {
        padding: 28px 20px 36px;
    }

    .ms-body__content {
        font-size: 1rem;
        line-height: 1.75;
    }

    .ms-post-nav {
        grid-template-columns: 1fr;
    }

    .ms-share-buttons {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .ms-share-btn span {
        display: none;
    }

    .ms-share-btn {
        padding: 10px 12px;
    }
}

/* Large screens: uphold the tight layout */
@media (min-width: 1600px) {
    .ms-single-container {
        grid-template-columns: 280px minmax(0, 1fr) 300px;
        gap: 10px;
        padding: 10px 10px 80px;
    }
}

/* ---- Print ---- */
@media print {

    .ms-sidebar,
    .ms-post-nav,
    .ms-share-buttons,
    .ms-progress {
        display: none !important;
    }

    .ms-single-container {
        display: block;
    }

    .ms-body {
        padding: 0;
    }
}

/* ==========================================================================
   AMAZON PRODUCT BOX — Premium Product Card
   ========================================================================== */
.sph-amz-box {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 24px;
    margin: 28px 0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.3s ease, transform 0.2s ease;
    position: relative;
    overflow: hidden;
}

.sph-amz-box:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Top accent bar */
.sph-amz-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ff9900, #ffb84d, #ff9900);
    background-size: 200% 100%;
}

/* --- Image --- */
.sph-amz-box__image-link {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 180px;
    min-height: 180px;
    margin-right: 24px;
    text-decoration: none !important;
    border: none !important;
}

.sph-amz-box__image {
    max-width: 160px;
    max-height: 200px;
    object-fit: contain;
    border-radius: 8px !important;
    margin: 0 !important;
    box-shadow: none !important;
    transition: transform 0.3s ease;
}

.sph-amz-box__image-link:hover .sph-amz-box__image {
    transform: scale(1.05);
}

/* --- Body --- */
.sph-amz-box__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* --- Brand --- */
.sph-amz-box__brand {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b7280;
    margin: 0 0 4px !important;
}

/* --- Title --- */
.sph-amz-box__title-link {
    text-decoration: none !important;
    border: none !important;
}

.sph-amz-box__title {
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    color: #111827 !important;
    line-height: 1.35 !important;
    margin: 0 !important;
    padding: 0 !important;
    transition: color 0.2s;
}

.sph-amz-box__title::after {
    display: none !important;
}

.sph-amz-box__title-link:hover .sph-amz-box__title {
    color: #c7511f !important;
}

/* --- Features --- */
.sph-amz-box__features {
    list-style: none !important;
    padding: 0 !important;
    margin: 4px 0 0 !important;
}

.sph-amz-box__features li {
    position: relative;
    padding-left: 18px !important;
    margin-bottom: 6px !important;
    font-size: 0.88rem;
    color: #4b5563;
    line-height: 1.45;
}

.sph-amz-box__features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #059669;
    font-weight: 700;
    font-size: 0.82rem;
}

/* --- Actions Area --- */
.sph-amz-box__actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #f3f4f6;
}

/* --- Price --- */
.sph-amz-box__price-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sph-amz-box__price {
    font-size: 1.35rem;
    font-weight: 800;
    color: #111827;
    letter-spacing: -0.02em;
}

/* --- Prime Badge --- */
.sph-amz-box__prime {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #00a8e1;
    background: #e0f4fd;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: 0.02em;
}

/* --- Buy Button --- */
.sph-amz-box__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 11px 24px;
    background: linear-gradient(180deg, #f7ca65 0%, #f0ad1e 100%);
    color: #111 !important;
    font-size: 0.92rem;
    font-weight: 700;
    text-decoration: none !important;
    border: 1px solid #c99417;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
    white-space: nowrap;
}

.sph-amz-box__btn:hover {
    background: linear-gradient(180deg, #f5c042 0%, #e89e0a 100%);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
    color: #111 !important;
}

/* --- ASIN (fallback mode) --- */
.sph-amz-box__asin {
    font-size: 0.82rem;
    color: #9ca3af;
    margin: 4px 0 12px !important;
    font-family: monospace;
}

/* --- Disclaimer --- */
.sph-amz-box__disclaimer {
    width: 100%;
    font-size: 0.72rem;
    color: #9ca3af;
    margin: 12px 0 0 !important;
    padding-top: 10px;
    border-top: 1px solid #f3f4f6;
    text-align: center;
}

/* --- Fallback box --- */
.sph-amz-box--fallback {
    justify-content: center;
    text-align: center;
    padding: 32px;
}

.sph-amz-box--fallback .sph-amz-box__body {
    align-items: center;
}

.sph-amz-box--fallback .sph-amz-box__title {
    font-size: 1.05rem !important;
}

/* --- Responsive --- */
@media (max-width: 600px) {
    .sph-amz-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 20px;
    }

    .sph-amz-box__image-link {
        width: auto;
        margin-right: 0;
        margin-bottom: 16px;
    }

    .sph-amz-box__image {
        max-width: 140px;
        max-height: 160px;
    }

    .sph-amz-box__features li {
        text-align: left;
    }

    .sph-amz-box__actions {
        justify-content: center;
    }

    .sph-amz-box__btn {
        width: 100%;
        justify-content: center;
    }
}