/* ==========================================================================
   Scribd Clone — site.css
   ========================================================================== */

/* ── Base ─────────────────────────────────────────────────────────────────── */
body {
    background-color: #ffffff;
    color: #1a1a1a;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ── Scrollbar hide (carousels) ───────────────────────────────────────────── */
.hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
.hide-scrollbar::-webkit-scrollbar { display: none; }

/* ── Custom scrollbar (dropdowns) ────────────────────────────────────────── */
.custom-scrollbar::-webkit-scrollbar { width: 6px; }
.custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
.custom-scrollbar::-webkit-scrollbar-thumb { background-color: #cbd5e1; border-radius: 20px; }
.custom-scrollbar::-webkit-scrollbar-thumb:hover { background-color: #94a3b8; }

/* ── Carousel Navigation Buttons ─────────────────────────────────────────── */
/* Sharper, higher-contrast buttons with stronger shadow */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background-color: #ffffff;
    border: 1.5px solid #b0b7c0;          /* darker border → sharper */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.18), 0 1px 4px rgba(0,0,0,0.12);
    cursor: pointer;
    z-index: 20;
    transition: all 0.15s ease;
    color: #1a1a1a;                        /* near-black icon → brighter */
    font-size: 13px;
    -webkit-font-smoothing: antialiased;
}
.carousel-btn:hover {
    background-color: #f3f4f6;
    color: #000000;
    border-color: #6b7280;
    box-shadow: 0 8px 20px rgba(0,0,0,0.22), 0 2px 6px rgba(0,0,0,0.14);
}
.carousel-btn.right { right: -22px; }
.carousel-btn.left  { left:  -22px; }

/* ── Document Card ───────────────────────────────────────────────────────── */
/*
   Responsive sizing via CSS custom property + clamp:
   - Mobile  (<640px):  2 cols  → each card ≈ (100vw − gaps) / 2
   - iPad    (768-1023): 3.5 cols visible → fixed ~200px with scroll
   - Desktop (≥1024px): 6 cols → fixed width in carousel
   In a CSS grid (taxonomy level4 / search) the grid-cols-* Tailwind classes
   handle columns; here we only control the carousel card fixed width.
*/
.doc-card {
    /* Carousel context: fixed width, snap */
    min-width: 160px;
    width: 160px;
    scroll-snap-align: start;
}
/* Mobile: slightly wider cards so 2 nearly fill the screen */
@media (max-width: 639px) {
    .doc-card {
        min-width: calc(50vw - 24px);
        width:     calc(50vw - 24px);
    }
}
/* Tablet 640–767px: 3 cards visible comfortably */
@media (min-width: 640px) and (max-width: 767px) {
    .doc-card { min-width: 180px; width: 180px; }
}
/* Tablet 768–1023px: ~3.5 cols — 200px cards let the 4th peek */
@media (min-width: 768px) and (max-width: 1023px) {
    .doc-card { min-width: 200px; width: 200px; }
}
/* Desktop ≥1024px: 6 columns visible in a 1200px container */
@media (min-width: 1024px) {
    .doc-card { min-width: 178px; width: 178px; }
}
@media (min-width: 1280px) {
    .doc-card { min-width: 186px; width: 186px; }
}

/* ── Category Card (homepage explore carousel) ────────────────────────────── */
.category-card:hover { border-color: #d1d5db; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); }
.category-card:hover .view-all-text { color: #008560; }
.category-card:hover .view-all-icon { transform: translateX(4px); color: #008560; }

/* ── Stacked-paper graphic (Explore subcategory cards) ───────────────────── */
.stacked-paper-graphic {
    position: absolute;
    right: -15px;
    top: 50%;
    transform: translateY(-50%) rotate(8deg);
    width: 100px;
    height: 120px;
    background: #ffffff;
    border: 1px solid #d1d5db;            /* slightly darker border */
    box-shadow: -2px 4px 14px rgba(0,0,0,0.10);
    border-radius: 4px;
    padding: 12px 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 1;
}
.stacked-paper-graphic::before,
.stacked-paper-graphic::after {
    content: '';
    position: absolute;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 4px;
}
.stacked-paper-graphic::before {
    top: 4px; left: -4px; right: 4px; bottom: -4px;
    z-index: -1;
    transform: rotate(-3deg);
    box-shadow: -1px 2px 8px rgba(0,0,0,0.06);
}
.stacked-paper-graphic::after {
    top: 8px; left: -8px; right: 8px; bottom: -8px;
    z-index: -2;
    transform: rotate(-6deg);
}
/* Paper lines — brighter/darker for sharp visibility */
.paper-line          { height: 4px; background: #d1d5db; border-radius: 2px; width: 100%; }
.paper-line.medium   { width: 80%; }
.paper-line.short    { width: 60%; }

/* Hover rotate animation */
.group\/cat:hover .stacked-paper-graphic { transform: translateY(-50%) rotate(12deg); }

/* ── Tab states ──────────────────────────────────────────────────────────── */
.tab-active   { border-bottom: 2px solid #111827; color: #111827; font-weight: 700; }
.tab-inactive { color: #374151; border-bottom: 2px solid transparent; }   /* was #6b7280 → darker */
.tab-inactive:hover { color: #111827; }

/* ── PDF Viewer ──────────────────────────────────────────────────────────── */
/* NOTE: body.single-pdf-layout no longer locks body height/overflow.
   The sticky sidebars (h-[calc(100vh-64px)]) handle their own scroll
   independently, so the body scrolls freely and the footer is always reachable. */

.pdf-toolbar-btn {
    padding: 0.5rem; color: #374151; border-radius: 0.375rem;
    transition: background-color 0.2s; display: flex; align-items: center; justify-content: center;
}
.pdf-toolbar-btn:hover { background-color: #f3f4f6; }

.pdf-sidebar-btn {
    width: 2.5rem; height: 2.5rem; display: flex; flex-direction: column;
    align-items: center; justify-content: center; color: #374151;
    border-radius: 0.375rem; transition: background-color 0.2s;
    margin-bottom: 0.5rem; margin-left: auto; margin-right: auto;
}
.pdf-sidebar-btn:hover { background-color: #f3f4f6; }
.pdf-sidebar-btn.active { background-color: #e5e7eb; color: #000; }

.pdf-page-container { box-shadow: 0 2px 10px rgba(0,0,0,0.1); }

/* ── Action grid buttons (single-doc sidebar) ────────────────────────────── */
.action-grid-btn {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 0.75rem; border-radius: 0.5rem; border: 1px solid transparent;
    transition: all 0.2s; font-size: 0.875rem; color: #374151;
    background-color: #fff; box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.action-grid-btn:hover { border-color: #e5e7eb; background-color: #f9fafb; }

/* ── Sticky PDF floating controls (mobile) ───────────────────────────────── */
.sticky-pdf-controls { position: sticky; top: 130px; float: right; }

/* ── Comments ────────────────────────────────────────────────────────────── */
.comment-list { list-style: none; padding: 0; margin: 0; }
.comment-list .comment { margin-bottom: 2rem; }
.comment-list .children { list-style: none; padding-left: 2rem; margin-top: 1.5rem; border-left: 2px solid #e5e7eb; }
.comment-body { display: flex; gap: 1rem; background: #f9fafb; padding: 1.5rem; border-radius: 0.5rem; border: 1px solid #f3f4f6; }
.comment-author .avatar { border-radius: 50%; width: 48px; height: 48px; object-fit: cover; }
.comment-meta { font-size: 0.875rem; color: #6b7280; margin-bottom: 0.5rem; }
.comment-meta a { color: #6b7280; }
.comment-meta a:hover { color: #111827; text-decoration: underline; }
.comment-content p { margin-bottom: 1rem; color: #374151; line-height: 1.6; }
.comment-content p:last-child { margin-bottom: 0; }
.reply { margin-top: 0.5rem; }
.bypostauthor > .comment-body { border-color: #d1fae5; background: #ecfdf5; }

/* ── Legal / FAQ / Contact pages ─────────────────────────────────────────── */
/* Prevent heading text from overflowing narrow mobile screens */
article.max-w-\[860px\] {
    overflow-x: hidden;      /* contain any overflow inside the card */
}
article.max-w-\[860px\] header h1 {
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}
.legal-content {
    word-break:      break-word;
    overflow-wrap:   break-word;
    overflow-x:      hidden;
    box-sizing:      border-box;
    width:           100%;
    max-width:       100%;
    min-width:       0;
}
.legal-content p    { margin-bottom: 1.25rem; font-size: 15px; color: #374151; line-height: 1.75; }
.legal-content h2   {
    font-size: 1.15rem; font-weight: 700; color: #111827;
    margin-top: 2.5rem; margin-bottom: 1rem;
    padding-bottom: 0.5rem; border-bottom: 1px solid #f3f4f6;
    word-break: break-word; overflow-wrap: break-word;
    box-sizing: border-box; width: 100%; max-width: 100%; min-width: 0; display: block;
}
.legal-content h3   {
    font-size: 1.05rem; font-weight: 700; color: #111827;
    margin-top: 1.75rem; margin-bottom: 0.75rem;
    word-break: break-word; overflow-wrap: break-word;
    box-sizing: border-box; width: 100%; max-width: 100%; min-width: 0; display: block;
}
.legal-content ul,
.legal-content ol   { margin-bottom: 1.25rem; padding-left: 1.5rem; color: #374151; font-size: 15px; line-height: 1.75; }
.legal-content ul   { list-style-type: disc; }
.legal-content ol   { list-style-type: decimal; }
.legal-content li   { margin-bottom: 0.5rem; }
.legal-content a    { color: #008560; text-decoration: underline; font-weight: 500; word-break: break-all; }
.legal-content a:hover { color: #006c4d; }
.legal-content strong { color: #111827; }

/* Reduce padding on very small screens for legal article containers */
@media (max-width: 480px) {
    article.max-w-\[860px\] { padding: 1.5rem !important; }
    article.max-w-\[860px\] header h1 { font-size: 1.5rem !important; }
}

/* =========================================================================
   PDF VIEWER — Scroll, Zoom, Fullscreen, Print
   ========================================================================= */

/* ── Issue 8: Proper page-by-page scrolling ─────────────────────────────── */
#pdf-render-area {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}
#pdf-render-area > [data-page] {
    width: 100%;
    display: flex;
    justify-content: center;
    background: #e5e5e5;
    padding: 16px 8px;
    border-bottom: 3px solid #d1d5db;  /* clear visual page separator */
}
#pdf-render-area > [data-page]:last-child { border-bottom: none; }

/* Page images/canvases */
#pdf-render-area .pdf-page-canvas {
    display: block;
    width: 100%;
    max-width: 800px;
    background: #fff;
    box-shadow: 0 2px 16px rgba(0,0,0,0.12);
    border: 1px solid #e5e7eb;
}

/* ── Issue 1: Zoom wrapper — allows transform without clipping ───────────── */
#pdf-zoom-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform-origin: top center;
    transition: transform 0.2s ease;
}

/* ── Issue 5: Fullscreen — proper scroll inside fullscreen element ───────── */
#pdf-scroll-container {
    overflow-y: auto;        /* allows scroll inside fullscreen */
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;  /* smooth on iOS */
}
#pdf-scroll-container:fullscreen,
#pdf-scroll-container:-webkit-full-screen,
#pdf-scroll-container:-moz-full-screen {
    overflow-y: auto !important;
    background: #323639;
    padding: 24px;
}
#pdf-scroll-container:fullscreen #pdf-render-area,
#pdf-scroll-container:-webkit-full-screen #pdf-render-area,
#pdf-scroll-container:-moz-full-screen #pdf-render-area {
    max-width: 900px;
    margin: 0 auto;
}

/* ── Issue 2: Print — only PDF pages, nothing else ──────────────────────── */
@media print {
    /* Hide everything */
    header,
    footer,
    aside,
    nav,
    .lg\\:flex.w-14,           /* inner left toolbar */
    .lg\\:flex.h-14,           /* top toolbar */
    #panel-related,
    #sheet-overview,
    #sheet-more,
    #sheet-overview-backdrop,
    #sheet-more-backdrop,
    #embed-modal,
    .fixed.bottom-0,           /* mobile bottom bar */
    .lg\\:hidden.bg-white.px-4, /* mobile top info block */
    #mobile-share-block,
    .xl\\:hidden.bg-white,     /* inline related docs */
    [id^="btn-"],              /* all buttons */
    .carousel-btn              { display: none !important; }

    /* Show only PDF render area */
    body, html                 { background: #fff !important; overflow: visible !important; }
    main                       { display: block !important; padding: 0 !important; margin: 0 !important; }
    #pdf-scroll-container      { overflow: visible !important; padding: 0 !important; }
    #pdf-render-area           { display: block !important; }
    #pdf-render-area > [data-page] {
        padding: 0 !important;
        border: none !important;
        background: #fff !important;
        page-break-after: always;
        break-after: page;
        display: block !important;
    }
    #pdf-render-area .pdf-page-canvas {
        width: 100% !important;
        max-width: 100% !important;
        box-shadow: none !important;
        border: none !important;
        page-break-inside: avoid;
        break-inside: avoid;
    }
    /* Remove transform zoom for print */
    #pdf-zoom-wrapper          { transform: none !important; }
}

/* =========================================================================
   PDF TEXT LAYER — transparent text overlay for R2 WebP viewer
   Enables text selection/copy over image-based pages, same as Scribd.
   ========================================================================= */

/* Text layer container — absolutely positioned over each page image */
.pdf-text-layer {
    position:         absolute;
    top:              0;
    left:             0;
    overflow:         hidden;
    line-height:      1;
    pointer-events:   auto;
    user-select:      text;
    -webkit-user-select: text;
    z-index:          2;
}

/* Text spans rendered by PDF.js — transparent by default, visible when selected */
.pdf-text-layer span,
.pdf-text-layer br {
    color:            transparent;
    position:         absolute;
    white-space:      pre;
    cursor:           text;
    transform-origin: 0 0;
    /* Transparent fill — text is invisible until selected */
    -webkit-text-fill-color: transparent;
}

/* Show dark highlight when user selects text */
.pdf-text-layer span::selection,
.pdf-text-layer ::selection {
    background:            rgba(0, 133, 96, 0.25); /* brand-green highlight */
    -webkit-text-fill-color: transparent;
}

/* Ensure each page wrapper allows the text layer to overflow correctly */
#pdf-render-area > [data-page] {
    position: relative; /* text layer uses position:absolute inside this */
}

/* =========================================================================
   DOWNLOAD SHEET — radio button styling
   ========================================================================= */
#dl-format-options label {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #f3f4f6;
}
#dl-format-options label:last-child {
    border-bottom: none;
}

/* =========================================================================
   WORD-LEVEL TEXT LAYER (secure-viewer v3)
   Appended by PyMuPDF pipeline upgrade. No visual changes to existing UI.
   ========================================================================= */

/* Page box: relative container for image + text layer */
.sv-page-box {
    position: relative;
    display: inline-block;
    max-width: 800px;
    width: 100%;
    background: #fff;
    box-shadow: 0 2px 14px rgba(0,0,0,0.18);
}

/* Image fills the box */
.sv-page-box .pdf-page-img {
    display: block;
    width: 100%;
    height: auto;
}

/* Text layer: absolutely covers the image */
.sv-text-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none; /* enabled by JS once spans are built */
    /* transparent text — visible only when selected */
    color: transparent;
    -webkit-text-fill-color: transparent;
}

/* Each word span — font-size set in px by JS (ResizeObserver) */
.sv-text-layer span {
    position: absolute;
    cursor: text;
    pointer-events: all;
    user-select: text;
    -webkit-user-select: text;
    white-space: nowrap;
    overflow: hidden;
    /* Text is transparent so image shows through, but selectable */
    color: transparent;
    -webkit-text-fill-color: transparent;
    line-height: 1;
    /* font-size set dynamically by JS to match word height in px */
    font-size: 12px; /* initial fallback — overwritten immediately by ResizeObserver */
}

/* Browser selection highlight — brand-green tint */
.sv-text-layer span::selection {
    background: rgba(0, 133, 96, 0.40);
    -webkit-text-fill-color: transparent;
    color: transparent;
}
.sv-text-layer span::-moz-selection {
    background: rgba(0, 133, 96, 0.40);
    color: transparent;
}

/* Scale wrapper — used instead of CSS zoom (Issue 5 fix) */
#sv-scale-wrap {
    transform-origin: top center;
    width: 100%;
    will-change: transform;
}


/* =========================================================================
   PAGE CONTENT — page.php (.page-content) and singlel.php (.entry-content)
   Moved from inline <style> blocks — no PHP values, pure static CSS.
   ========================================================================= */
.page-content p,
.entry-content p                { margin-bottom: 1.5rem; }
.page-content h1, .page-content h2, .page-content h3, .page-content h4,
.entry-content h1, .entry-content h2, .entry-content h3, .entry-content h4 {
    color: #111827; font-weight: 700;
    margin-top: 2.5rem; margin-bottom: 1.25rem; line-height: 1.2;
}
.page-content h2  { font-size: 2rem;    border-bottom: 1px solid #e5e7eb; padding-bottom: 0.5rem; }
.page-content h3  { font-size: 1.5rem; }
.entry-content h2 { font-size: 1.875rem; }
.entry-content h3 { font-size: 1.5rem; }
.page-content ul, .entry-content ul  { list-style-type: disc;    padding-left: 1.5rem; margin-bottom: 1.5rem; }
.page-content ol, .entry-content ol  { list-style-type: decimal; padding-left: 1.5rem; margin-bottom: 1.5rem; }
.page-content li, .entry-content li  { margin-bottom: 0.75rem; }
.page-content a,  .entry-content a   { color: #008560; text-decoration: underline; font-weight: 500; transition: color 0.2s; }
.page-content a:hover, .entry-content a:hover { color: #006c4d; }
.page-content blockquote  { border-left: 4px solid #e5e7eb; padding-left: 1.25rem; margin-left: 0; color: #4b5563; font-size: 1.125rem; }
.entry-content blockquote { border-left: 4px solid #008560; padding-left: 1rem;    margin-left: 0; font-style: italic; color: #4b5563; }
.page-content table  { width: 100%; border-collapse: collapse; margin-bottom: 2rem; }
.page-content th, .page-content td { border: 1px solid #e5e7eb; padding: 0.75rem 1rem; text-align: left; }
.page-content th { background-color: #f9fafb; font-weight: 600; color: #111827; }
.page-content img, .entry-content img { border-radius: 0.375rem; max-width: 100%; height: auto; margin: 2rem 0; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.entry-content figure    { margin: 2rem 0; }
.entry-content figcaption { text-align: center; font-size: 0.875rem; color: #6b7280; margin-top: 0.5rem; }

/* =========================================================================
   CATEGORY PICKER WIDGET — scribd_render_cat_picker() in functions.php
   Moved from inline <style> per-render — one copy is enough.
   ========================================================================= */
.scp-wrap     { position: relative; }
.scp-input    { width: 100%; padding: 10px 14px; border: 1.5px solid #d1d5db; border-radius: 8px; font-size: 15px; box-sizing: border-box; outline: none; font-family: inherit; transition: border-color .15s; }
.scp-input:focus { border-color: #008560; }
.scp-dropdown { display: none; position: absolute; top: calc(100% + 4px); left: 0; right: 0; background: #fff; border: 1.5px solid #d1d5db; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.12); z-index: 99999; max-height: 320px; overflow-y: auto; }
@media (max-width: 768px) { .scp-dropdown { z-index: 999999; max-height: 200px; position: fixed; left: 16px; right: 16px; width: auto; } }
.scp-wrap.open .scp-dropdown { display: block; }
.scp-item     { padding: 9px 14px 9px 28px; font-size: 14px; color: #374151; cursor: pointer; transition: background .1s; }
.scp-item.scp-parent { padding-left: 14px; font-weight: 700; color: #111; }
.scp-item:hover, .scp-item.focused { background: #f0fdf4; color: #008560; }
.scp-item.selected { background: #f0fdf4; color: #008560; font-weight: 700; }
.scp-empty    { padding: 16px 14px; font-size: 14px; color: #9ca3af; text-align: center; }
.scp-clear    { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: none; border: none; color: #9ca3af; cursor: pointer; font-size: 14px; padding: 4px; }

/* =========================================================================
   DASHBOARD — page-dashboard.php (.ds-wrap, .ds-card, etc.)
   Moved from inline <style> block at top of dashboard template.
   ========================================================================= */
.ds-wrap    { display: flex; min-height: calc(100vh - 130px); background: #f3f4f6; }
.ds-side    { width: 240px; flex-shrink: 0; background: #fff; border-right: 1px solid #e5e7eb; padding: 24px 0; display: flex; flex-direction: column; }
.ds-main    { flex: 1; padding: 32px 28px; min-width: 0; overflow-x: hidden; }
.ds-nav-a   { display: flex; align-items: center; gap: 10px; padding: 10px 20px; font-size: 14px; font-weight: 500; color: #374151; text-decoration: none; border-left: 3px solid transparent; transition: all .12s; }
.ds-nav-a:hover { background: #f9fafb; color: #111; }
.ds-nav-a.on    { background: #f0fdf4; color: #008560; border-left-color: #008560; font-weight: 700; }
.ds-nav-a i { width: 18px; text-align: center; font-size: 14px; }
.ds-card    { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 24px; margin-bottom: 24px; }
.ds-input   { width: 100%; padding: 10px 14px; border: 1.5px solid #d1d5db; border-radius: 8px; font-size: 15px; box-sizing: border-box; outline: none; font-family: inherit; transition: border-color .15s; }
.ds-input:focus { border-color: #008560; }
.ds-label   { display: block; font-size: 14px; font-weight: 600; color: #374151; margin-bottom: 6px; }
.ds-btn     { background: #008560; color: #fff; font-weight: 700; font-size: 15px; padding: 11px 24px; border: none; border-radius: 9px; cursor: pointer; transition: background .15s; }
.ds-btn:hover { background: #006b4e; }
.ds-btn-sm  { font-size: 13px; padding: 7px 14px; border-radius: 7px; }
.ds-btn-red { background: #dc2626; }
.ds-btn-red:hover { background: #b91c1c; }
.ds-btn-gray { background: #f3f4f6; color: #374151; border: 1px solid #d1d5db; }
.ds-btn-gray:hover { background: #e5e7eb; }
.ds-empty   { text-align: center; padding: 52px 24px; color: #9ca3af; }
.ds-empty i { font-size: 44px; margin-bottom: 14px; display: block; }
.ds-dropzone { border: 2.5px dashed #d1d5db; border-radius: 12px; padding: 36px 24px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; background: #fafafa; }
.ds-dropzone.drag     { border-color: #008560; background: #f0fdf4; }
.ds-dropzone.has-file { border-color: #008560; border-style: solid; background: #f0fdf4; }
.ds-progress-wrap { height: 8px; background: #e5e7eb; border-radius: 99px; overflow: hidden; margin: 10px 0; }
.ds-progress-bar  { height: 100%; background: #008560; border-radius: 99px; width: 0%; transition: width .3s; }
.ds-step    { display: none; }
.ds-step.active { display: block; }
@media (max-width: 640px) {
    .ds-wrap  { flex-direction: column; }
    .ds-side  { width: 100%; flex-direction: row; flex-wrap: wrap; border-right: none; border-bottom: 1px solid #e5e7eb; padding: 8px 0; }
    .ds-nav-a { flex: 1; min-width: 100px; border-left: none; border-bottom: 3px solid transparent; justify-content: center; padding: 8px 6px; font-size: 12px; }
    .ds-nav-a.on { border-bottom-color: #008560; border-left: none; }
    .ds-nav-a span.ds-label-text { display: none; }
    .ds-main  { padding: 18px 14px; }
}

/* =========================================================================
   META FIELDS — inc/meta-fields.php admin sidebar box
   Moved from inline <style> inside the meta box render function.
   ========================================================================= */
.sm-row  { margin-bottom: 10px; font-size: 13px; line-height: 1.6; }
.sm-ok   { color: #008560; font-weight: 600; }
.sm-warn { color: #b45309; font-weight: 600; }
.sm-bad  { color: #b91c1c; font-weight: 600; }
.sm-dim  { color: #6b7280; font-size: 12px; display: block; margin-top: 2px; }
.sm-pill { display: inline-block; padding: 2px 8px; border-radius: 9999px; font-size: 11px; font-weight: 700; letter-spacing: .3px; }
.sm-pill-blue  { background: #dbeafe; color: #1d4ed8; }
.sm-pill-green { background: #dcfce7; color: #15803d; }
.sm-pill-red   { background: #fee2e2; color: #b91c1c; }
.sm-pill-gray  { background: #f3f4f6; color: #6b7280; }
#sm-btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
#sm-log { margin-top: 8px; font-size: 12px; color: #555; font-family: monospace; min-height: 16px; }
.sm-progress-wrap { background: #e5e7eb; border-radius: 4px; height: 6px; margin: 6px 0 2px; overflow: hidden; }
.sm-progress-bar  { height: 6px; background: #2563eb; border-radius: 4px; transition: width .4s ease; }
