/**
 * Turkpidya Single Post Styles
 * Encyclopedia Edition - Ottoman Scholar Theme
 *
 * @package Kadence Child Theme
 * @since 1.0.0
 */

/* ========================================
   1. CSS VARIABLES (extend existing)
   ======================================== */
:root {
    --tp-crimson: #E30A17;
    --tp-crimson-dark: #B5080F;
    --tp-gold: #C9A227;
    --tp-gold-light: #D4B44A;
    --tp-charcoal: #1a1a1a;
    --tp-cream: #F9F6EE;
    --tp-cream-dark: #F0EBE0;
    --tp-text-body: #2D2D2D;
    --tp-text-muted: #6B6B6B;
    --tp-border-subtle: #E0DDD5;
    --tp-content-width: 720px;
}

/* ========================================
   PAPER TEXTURE - Ottoman Manuscript Feel
   ======================================== */
.single-post .site-main,
.single-post .content-area,
.single-post #primary {
    background:
        /* Subtle noise texture */
        url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E"),
        /* Cream gradient base */
        linear-gradient(180deg,
            rgba(249, 246, 238, 1) 0%,
            rgba(245, 241, 232, 1) 50%,
            rgba(249, 246, 238, 1) 100%);
    background-attachment: scroll;
}

/* Add subtle vignette effect for manuscript feel */
.single-post .entry-content-wrap {
    position: relative;
}

.single-post .entry-content-wrap::before {
    content: '';
    position: absolute;
    top: 80px;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    background: radial-gradient(
        ellipse at center,
        transparent 60%,
        rgba(224, 221, 213, 0.15) 100%
    );
}

@media (min-width: 1024px) {
    body.single-post {
        background: var(--tp-cream);
    }

    .single-post .site-main,
    .single-post .content-area,
    .single-post #primary {
        background: transparent;
    }

    .single-post .entry-content-wrap::before {
        display: none;
    }
}

/* ========================================
   2. TYPOGRAPHY (Literata for body)
   ======================================== */
.single-post .entry-content {
    font-family: 'Literata', Georgia, serif;
    font-size: 18px;
    line-height: 1.75;
    color: var(--tp-text-body);
    position: relative;
}

/* ========================================
   3. READING PROGRESS BAR
   ======================================== */
.tp-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--tp-crimson), var(--tp-crimson-dark));
    width: 0%;
    z-index: 9999;
    transition: width 0.1s ease-out;
}

/* ========================================
   4. STICKY MINI-HEADER
   ======================================== */
.tp-sticky-header {
    /* Position below main header */
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    background: white;
    border-bottom: 1px solid var(--tp-border-subtle);
    padding: 12px 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    z-index: 9998;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.tp-sticky-header.visible {
    transform: translateY(0);
}

.tp-sticky-header-crescent {
    color: var(--tp-gold);
    opacity: 0.5;
    font-size: 14px;
}

.tp-sticky-header-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.tp-sticky-header-title {
    font-family: 'Playfair Display', serif;
    font-size: 14px;
    color: var(--tp-charcoal);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.tp-sticky-header-section {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--tp-text-muted);
    min-width: 0;
}

.tp-sticky-header-section-label {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 10px;
    color: var(--tp-text-muted);
    white-space: nowrap;
}

.tp-sticky-header-section-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tp-sticky-header-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--tp-text-muted);
    flex-shrink: 0;
}

.tp-sticky-progress-bar {
    width: 100px;
    height: 4px;
    background: var(--tp-border-subtle);
    border-radius: 2px;
    overflow: hidden;
}

.tp-sticky-progress-fill {
    height: 100%;
    background: var(--tp-crimson);
    width: 0%;
    transition: width 0.1s ease-out;
}

.tp-sticky-time-remaining {
    font-size: 12px;
    color: var(--tp-text-muted);
    white-space: nowrap;
}

@media (max-width: 768px) {
    .tp-sticky-header {
        padding: 10px 4%;
        gap: 10px;
    }
    .tp-sticky-header-title {
        font-size: 12px;
    }
    .tp-sticky-header-section-label {
        display: none;
    }
    .tp-sticky-header-progress {
        flex-direction: column;
        align-items: flex-end;
        gap: 4px;
    }
    .tp-sticky-progress-bar {
        width: 60px;
    }
}

/* ========================================
   5. META BAR (reading time, updated badge)
   ======================================== */
.tp-meta-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 14px;
    color: var(--tp-text-muted);
    margin: 20px 0 30px;
    padding: 15px 0;
    border-top: 1px solid var(--tp-border-subtle);
    border-bottom: 1px solid var(--tp-border-subtle);
}

.tp-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.tp-meta-separator {
    width: 4px;
    height: 4px;
    background: var(--tp-gold);
    border-radius: 50%;
}

.tp-reading-time {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(201, 162, 39, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid rgba(201, 162, 39, 0.2);
}

.tp-reading-time svg {
    width: 14px;
    height: 14px;
    fill: var(--tp-gold);
}

.tp-updated-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(227, 10, 23, 0.08);
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid rgba(227, 10, 23, 0.15);
    font-size: 12px;
    color: var(--tp-crimson);
}

.tp-updated-badge svg {
    width: 12px;
    height: 12px;
    fill: currentColor;
}

/* ========================================
   6. SHARE BUTTONS
   ======================================== */
.tp-share-wrapper {
    position: relative;
    display: inline-block;
}

.tp-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--tp-charcoal);
    color: white;
    border: none;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Literata', serif;
}

.tp-share-btn:hover {
    background: var(--tp-crimson);
}

.tp-share-btn svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.tp-share-dropdown {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--tp-charcoal);
    border: 1px solid var(--tp-gold);
    border-radius: 6px;
    padding: 8px;
    margin-bottom: 10px;
    display: none;
    flex-direction: column;
    gap: 4px;
    min-width: 160px;
    z-index: 100;
    box-shadow: 0 8px 25px rgba(0,0,0,0.25);
}

.tp-share-dropdown.active {
    display: flex;
    animation: tpDropUp 0.2s ease-out;
}

@keyframes tpDropUp {
    from { opacity: 0; transform: translateX(-50%) translateY(10px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.tp-share-dropdown::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: var(--tp-charcoal);
    border-bottom: none;
}

.tp-share-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: white;
    text-decoration: none;
    font-size: 13px;
    border-radius: 4px;
    transition: background 0.2s ease;
    cursor: pointer;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
}

.tp-share-dropdown-item:hover {
    background: rgba(201, 162, 39, 0.2);
    color: var(--tp-gold);
}

.tp-share-dropdown-item svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* ========================================
   7. CONTENT ENHANCEMENTS
   ======================================== */

/* Lead Paragraph */
.single-post .entry-content > p:first-of-type {
    font-size: 1.15em;
    line-height: 1.8;
}

/* Section Headings */
.single-post .entry-content h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    font-weight: 500;
    color: var(--tp-charcoal);
    margin: 2.5em 0 0.75em;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--tp-border-subtle);
    position: relative;
}

.single-post .entry-content h2::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--tp-crimson);
}

.single-post .entry-content h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--tp-charcoal);
    margin: 1.8em 0 0.6em;
}

/* Copy Section Link */
.tp-section-link {
    opacity: 0;
    color: var(--tp-gold);
    cursor: pointer;
    font-size: 0.6em;
    transition: opacity 0.2s ease;
    text-decoration: none;
    margin-left: 12px;
}

.single-post .entry-content h2:hover .tp-section-link,
.single-post .entry-content h3:hover .tp-section-link {
    opacity: 1;
}

.tp-section-link:hover {
    color: var(--tp-crimson);
}

.tp-section-link.copied {
    color: var(--tp-crimson);
}

/* Lists - Ottoman Star Markers */
.single-post .entry-content ul:not(.wp-block-gallery) {
    list-style: none;
    padding-left: 0;
}

.single-post .entry-content ul:not(.wp-block-gallery) li {
    position: relative;
    padding-left: 32px;
    margin-bottom: 14px;
}

.single-post .entry-content ul:not(.wp-block-gallery) li::before {
    content: '\2726'; /* Four-pointed star - Ottoman style */
    position: absolute;
    left: 4px;
    color: var(--tp-crimson);
    font-size: 12px;
    top: 5px;
    opacity: 0.85;
}

/* Nested list items use smaller marker */
.single-post .entry-content ul:not(.wp-block-gallery) ul li::before {
    content: '\25C6'; /* Diamond for nested */
    font-size: 8px;
    color: var(--tp-gold);
    top: 7px;
}

/* Blockquotes */
.single-post .entry-content blockquote {
    background: var(--tp-cream-dark);
    border-left: 4px solid var(--tp-crimson);
    padding: 20px 24px;
    margin: 2em 0;
    font-style: italic;
}

.single-post .entry-content blockquote p {
    margin-bottom: 0;
}

/* Images with captions */
.single-post .entry-content figure {
    margin: 2em 0;
    border: 1px solid var(--tp-border-subtle);
    background: white;
}

.single-post .entry-content figure img {
    display: block;
    width: 100%;
}

.single-post .entry-content figcaption {
    padding: 12px 16px;
    font-size: 13px;
    color: var(--tp-text-muted);
    background: var(--tp-cream);
    border-top: 1px solid var(--tp-border-subtle);
}

/* ========================================
   8. TOC STYLING (Kadence TOC)
   Ottoman Manuscript Style Double Border
   ======================================== */
.single-post .wp-block-kadence-tableofcontents,
.single-post .ez-toc-container {
    background: linear-gradient(135deg, rgba(249, 246, 238, 0.98), rgba(240, 235, 224, 0.98));
    border: 2px solid var(--tp-gold);
    outline: 1px solid var(--tp-gold);
    outline-offset: 4px;
    padding: 28px 32px;
    margin: 40px 0;
    position: relative;
    box-shadow:
        inset 0 0 0 1px rgba(201, 162, 39, 0.3),
        0 4px 20px rgba(0, 0, 0, 0.06);
}

/* Decorative corner ornaments */
.single-post .wp-block-kadence-tableofcontents::before,
.single-post .wp-block-kadence-tableofcontents::after,
.single-post .ez-toc-container::before,
.single-post .ez-toc-container::after {
    content: '\2726'; /* Four-pointed star */
    position: absolute;
    font-size: 14px;
    color: var(--tp-gold);
    line-height: 1;
}

.single-post .wp-block-kadence-tableofcontents::before,
.single-post .ez-toc-container::before {
    top: -8px;
    left: -8px;
}

.single-post .wp-block-kadence-tableofcontents::after,
.single-post .ez-toc-container::after {
    bottom: -8px;
    right: -8px;
}

/* Additional corner ornaments via inner wrapper */
.single-post .wp-block-kadence-tableofcontents .kb-table-of-content-wrap,
.single-post .ez-toc-container > nav {
    position: relative;
}

.single-post .wp-block-kadence-tableofcontents .kb-table-of-content-wrap::before,
.single-post .ez-toc-container > nav::before {
    content: '\2726';
    position: absolute;
    top: -20px;
    right: 0;
    font-size: 14px;
    color: var(--tp-gold);
}

.single-post .wp-block-kadence-tableofcontents .kb-table-of-content-wrap::after,
.single-post .ez-toc-container > nav::after {
    content: '\2726';
    position: absolute;
    bottom: -20px;
    left: 0;
    font-size: 14px;
    color: var(--tp-gold);
}

.single-post .wp-block-kadence-tableofcontents .kb-table-of-content-nav__title,
.single-post .ez-toc-title {
    font-family: 'Playfair Display', serif;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--tp-gold);
    margin-bottom: 16px;
}

.single-post .wp-block-kadence-tableofcontents .kb-table-of-content-nav__title::before,
.single-post .ez-toc-title::before {
    content: none;
}

.single-post .wp-block-kadence-tableofcontents ul,
.single-post .ez-toc-list {
    list-style: none;
    counter-reset: toc-counter;
    padding: 0;
    margin: 0;
}

.single-post .entry-content .wp-block-kadence-tableofcontents ul,
.single-post .entry-content .ez-toc-container ul {
    list-style: none;
    padding-left: 0;
}

.single-post .wp-block-kadence-tableofcontents ul li,
.single-post .ez-toc-list li {
    counter-increment: toc-counter;
    margin-bottom: 8px;
    padding-left: 0;
}

.single-post .entry-content .wp-block-kadence-tableofcontents ul li,
.single-post .entry-content .ez-toc-container ul li {
    padding-left: 0;
}

.single-post .wp-block-kadence-tableofcontents ul li::before,
.single-post .ez-toc-list li::before {
    content: none;
}

.single-post .entry-content .wp-block-kadence-tableofcontents ul li::before,
.single-post .entry-content .ez-toc-container ul li::before {
    content: none !important;
    display: none !important;
}

.single-post .wp-block-kadence-tableofcontents ul li a,
.single-post .ez-toc-list li a {
    display: flex;
    align-items: baseline;
    gap: 12px;
    color: var(--tp-text-body);
    text-decoration: none;
    font-size: 15px;
    transition: all 0.2s ease;
}

.single-post .wp-block-kadence-tableofcontents ul li a::before,
.single-post .ez-toc-list li a::before {
    content: counter(toc-counter) ".";
    color: var(--tp-gold);
    font-weight: 600;
    min-width: 24px;
}

.single-post .wp-block-kadence-tableofcontents ul li a:hover,
.single-post .ez-toc-list li a:hover {
    color: var(--tp-crimson);
}

/* Active TOC item */
.single-post .wp-block-kadence-tableofcontents ul li a.active,
.single-post .ez-toc-list li a.active {
    color: var(--tp-crimson);
    font-weight: 600;
}

.single-post .wp-block-kadence-tableofcontents ul li a.active::before,
.single-post .ez-toc-list li a.active::before {
    color: var(--tp-crimson);
}

/* ========================================
   9. SEE ALSO BOX
   ======================================== */
.tp-see-also-box {
    background: var(--tp-cream-dark);
    border-left: 4px solid var(--tp-gold);
    padding: 20px 24px;
    margin: 2.5em 0;
}

.tp-see-also-title {
    font-family: 'Playfair Display', serif;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--tp-gold);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tp-see-also-list {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 0;
    margin: 0;
}

@media (max-width: 600px) {
    .tp-see-also-list {
        grid-template-columns: 1fr;
    }
}

.tp-see-also-list li {
    padding-left: 0;
    margin-bottom: 0;
}

.tp-see-also-list li::before {
    content: none;
}

.tp-see-also-list li a {
    color: var(--tp-crimson);
    text-decoration: none;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.tp-see-also-list li a::before {
    content: '\2192'; /* Arrow */
    color: var(--tp-gold);
    transition: transform 0.2s ease;
}

.tp-see-also-list li a:hover {
    color: var(--tp-charcoal);
}

.tp-see-also-list li a:hover::before {
    transform: translateX(4px);
}

/* ========================================
   10. AUTHOR BOX (Encyclopedia Style)
   ======================================== */
.tp-author-box {
    background: white;
    border: 1px solid var(--tp-border-subtle);
    border-top: 3px solid var(--tp-charcoal);
    padding: 24px;
    margin-top: 3em;
}

.tp-author-box-title {
    font-family: 'Playfair Display', serif;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--tp-text-muted);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--tp-border-subtle);
}

.tp-author-box-content {
    display: flex;
    gap: 20px;
}

.tp-author-avatar {
    flex-shrink: 0;
}

.tp-author-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 2px solid var(--tp-gold);
}

.tp-author-info {
    flex: 1;
}

.tp-author-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    color: var(--tp-charcoal);
    margin-bottom: 4px;
}

.tp-author-name a {
    color: inherit;
    text-decoration: none;
}

.tp-author-name a:hover {
    color: var(--tp-crimson);
}

.tp-author-bio {
    font-size: 14px;
    color: var(--tp-text-muted);
    line-height: 1.6;
    margin-top: 8px;
}

.tp-author-links {
    margin-top: 12px;
    display: flex;
    gap: 12px;
}

.tp-author-link {
    font-size: 13px;
    color: var(--tp-crimson);
    text-decoration: none;
}

.tp-author-link:hover {
    text-decoration: underline;
}

@media (max-width: 600px) {
    .tp-author-box-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .tp-author-links {
        justify-content: center;
    }
}

/* ========================================
   11. TAGS SECTION (Scholarly Style)
   ======================================== */
.tp-tags-section {
    margin-top: 2em;
    padding-top: 1.5em;
    border-top: 1px solid var(--tp-border-subtle);
}

.tp-tags-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--tp-text-muted);
    margin-bottom: 10px;
}

.tp-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tp-tag-link {
    font-size: 13px;
    color: var(--tp-text-muted);
    text-decoration: none;
    padding: 4px 12px;
    border: 1px solid var(--tp-border-subtle);
    border-radius: 3px;
    transition: all 0.2s ease;
}

.tp-tag-link:hover {
    border-color: var(--tp-gold);
    color: var(--tp-gold);
    background: rgba(201, 162, 39, 0.05);
}

/* ========================================
   12. RELATED ARTICLES NAVIGATION
   ======================================== */
.tp-related-section {
    background: var(--tp-cream-dark);
    padding: 60px 5%;
    margin-top: 60px;
    position: relative;
}

.tp-related-section::before {
    content: '';
    position: absolute;
    top: 80px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--tp-gold) 20%, var(--tp-crimson) 50%, var(--tp-gold) 80%, transparent);
}

.tp-related-container {
    max-width: 1200px;
    margin: 0 auto;
}

.tp-related-header {
    text-align: center;
    margin-bottom: 40px;
}

.tp-related-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: var(--tp-charcoal);
    display: inline-flex;
    align-items: center;
    gap: 20px;
}

.tp-related-title::before,
.tp-related-title::after {
    content: '\25C6';
    font-size: 10px;
    color: var(--tp-gold);
}

.tp-related-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

@media (max-width: 768px) {
    .tp-related-nav {
        grid-template-columns: 1fr;
    }
}

.tp-related-card {
    background: white;
    border: 1px solid var(--tp-border-subtle);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

.tp-related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
    border-color: var(--tp-gold);
}

.tp-related-direction {
    padding: 12px 20px;
    background: var(--tp-cream);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--tp-gold);
    display: flex;
    align-items: center;
    gap: 8px;
}

.tp-related-card-image {
    height: 140px;
    background-size: cover;
    background-position: center;
    background-color: var(--tp-cream-dark);
}

.tp-related-card-content {
    padding: 20px;
}

.tp-related-card-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    color: var(--tp-charcoal);
    margin-bottom: 8px;
    line-height: 1.3;
}

.tp-related-card-excerpt {
    font-size: 14px;
    color: var(--tp-text-muted);
    line-height: 1.5;
}

.tp-related-card-category {
    margin-top: 12px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--tp-crimson);
    display: flex;
    align-items: center;
    gap: 6px;
}

.tp-related-card-category::before {
    content: '\25C6';
    font-size: 6px;
    color: var(--tp-gold);
}

/* ========================================
   13. FLOATING ELEMENTS
   ======================================== */


/* Jump to Section (Mobile) */
.tp-jump-to-btn {
    display: flex !important;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    background: var(--tp-charcoal);
    border: 2px solid var(--tp-gold);
    border-radius: 50%;
    color: var(--tp-gold);
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

.tp-jump-to-btn:hover {
    background: var(--tp-gold);
    color: var(--tp-charcoal);
    transform: scale(1.1);
}

.tp-jump-to-btn svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

@media (max-width: 768px) {
    .tp-jump-to-btn {
    display: flex !important;
        display: flex;
    }
}

/* Font Size Controls - Ottoman Sidebar Panel */
.tp-font-controls {
    position: fixed;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 0;
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    /* Ottoman panel styling */
    background: linear-gradient(135deg, rgba(249, 246, 238, 0.98), rgba(240, 235, 224, 0.98));
    border: 2px solid var(--tp-gold);
    padding: 12px 8px;
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.1),
        inset 0 0 0 1px rgba(201, 162, 39, 0.2);
}

/* Decorative top ornament */
.tp-font-controls::before {
    content: '\2726';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    color: var(--tp-gold);
    background: var(--tp-cream);
    padding: 0 4px;
}

/* Panel label */
.tp-font-controls::after {
    content: 'Aa';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Playfair Display', serif;
    font-size: 10px;
    color: var(--tp-gold);
    background: var(--tp-cream);
    padding: 0 6px;
    letter-spacing: 0.05em;
}

.tp-font-controls.visible {
    opacity: 1;
    pointer-events: auto;
}

@media (max-width: 1200px) {
    .tp-font-controls {
        display: none;
    }
}

.tp-font-btn {
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--tp-border-subtle);
    color: var(--tp-text-muted);
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.tp-font-btn:hover {
    color: var(--tp-crimson);
    background: rgba(227, 10, 23, 0.05);
}

.tp-font-btn.active {
    background: var(--tp-charcoal);
    color: var(--tp-gold);
}

.tp-font-btn:last-child {
    border-bottom: none;
}

.tp-font-btn-increase { font-size: 18px; }
.tp-font-btn-decrease { font-size: 11px; }
.tp-font-btn-reset { font-size: 13px; }

/* Mobile Reading Tools */
.tp-mobile-tools {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1002;
    display: none;
}

.tp-mobile-tools-fab {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--tp-charcoal);
    border: 2px solid var(--tp-gold);
    color: var(--tp-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

.tp-mobile-tools-fab:hover {
    background: var(--tp-gold);
    color: var(--tp-charcoal);
    transform: translateY(-2px);
}

.tp-mobile-tools-fab svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.tp-mobile-tools-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(2px);
    z-index: 1000;
    display: none;
}

.tp-mobile-tools-backdrop.active {
    display: block;
}

.tp-mobile-tools-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    border-top: 3px solid var(--tp-gold);
    box-shadow: 0 -10px 30px rgba(0,0,0,0.2);
    padding: 16px 20px 20px;
    transform: translateY(100%);
    transition: transform 0.25s ease;
    z-index: 1001;
}

.tp-mobile-tools-sheet.active {
    transform: translateY(0);
}

.tp-mobile-tools-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.tp-mobile-tools-title {
    font-family: 'Playfair Display', serif;
    font-size: 13px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--tp-gold);
}

.tp-mobile-tools-close {
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: var(--tp-charcoal);
}

.tp-mobile-tools-actions {
    display: grid;
    gap: 12px;
}

.tp-mobile-jump {
    border: 1px solid var(--tp-border-subtle);
    background: var(--tp-cream);
    border-radius: 10px;
    padding: 12px;
}

.tp-mobile-jump-title {
    font-family: 'Playfair Display', serif;
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--tp-gold);
    margin-bottom: 10px;
}

.tp-mobile-jump-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 220px;
    overflow-y: auto;
}

.tp-mobile-jump-list li {
    border-top: 1px solid var(--tp-border-subtle);
}

.tp-mobile-jump-list li:first-child {
    border-top: none;
}

.tp-mobile-jump-list a {
    display: block;
    padding: 10px 6px;
    text-decoration: none;
    color: var(--tp-charcoal);
    font-size: 14px;
}

.tp-mobile-jump-list a:active,
.tp-mobile-jump-list a:hover {
    color: var(--tp-crimson);
}

.tp-mobile-font-controls {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.tp-mobile-font-controls .tp-font-btn {
    width: 100%;
    height: 40px;
    border: 1px solid var(--tp-border-subtle);
    background: var(--tp-cream);
    border-radius: 6px;
    border-bottom: 1px solid var(--tp-border-subtle);
}

.tp-mobile-font-controls .tp-font-btn.active {
    border-color: var(--tp-charcoal);
}

@media (max-width: 1200px) {
    .tp-mobile-tools {
        display: block;
    }
}

/* Font size states */
body.tp-font-small .entry-content { font-size: 16px; }
body.tp-font-large .entry-content { font-size: 20px; }
body.tp-font-xlarge .entry-content { font-size: 22px; }

/* ========================================
   14. MODALS
   ======================================== */

/* Cite Modal */
.tp-cite-modal {
    display: none;
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 9998;
    align-items: center;
    justify-content: center;
}

.tp-cite-modal.active {
    display: flex;
}

.tp-cite-modal-content {
    background: white;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.tp-cite-modal-header {
    background: var(--tp-charcoal);
    color: white;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tp-cite-modal-title {
    font-family: 'Playfair Display', serif;
    font-size: 16px;
    letter-spacing: 0.05em;
}

.tp-cite-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.tp-cite-modal-body {
    padding: 24px;
}

.tp-cite-format {
    margin-bottom: 24px;
}

.tp-cite-format-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--tp-gold);
    margin-bottom: 8px;
}

.tp-cite-format-text {
    background: var(--tp-cream);
    padding: 16px;
    font-size: 14px;
    line-height: 1.6;
    border: 1px solid var(--tp-border-subtle);
    font-family: 'Literata', serif;
}

.tp-cite-copy-btn {
    background: var(--tp-charcoal);
    color: white;
    border: none;
    padding: 8px 16px;
    font-size: 12px;
    cursor: pointer;
    margin-top: 8px;
    transition: background 0.2s;
}

.tp-cite-copy-btn:hover {
    background: var(--tp-crimson);
}

/* Jump Overlay */
.tp-jump-overlay {
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    z-index: 10001;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.tp-jump-overlay.active {
    display: flex;
    animation: tpFadeIn 0.25s ease-out;
}

@keyframes tpFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.tp-jump-overlay-content {
    background: white;
    width: 90%;
    max-width: 400px;
    max-height: 80vh;
    overflow-y: auto;
    border-top: 4px solid var(--tp-gold);
    animation: tpSlideUp 0.3s ease-out;
}

@keyframes tpSlideUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

.tp-jump-overlay-header {
    background: var(--tp-charcoal);
    color: white;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 80px;
}

.tp-jump-overlay-title {
    font-family: 'Playfair Display', serif;
    font-size: 14px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--tp-gold);
}

.tp-jump-overlay-close {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

.tp-jump-overlay-list {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: jump-counter;
}

.tp-jump-overlay-list li {
    border-bottom: 1px solid var(--tp-border-subtle);
    padding-left: 0;
}

.tp-jump-overlay-list li::before {
    content: none;
}

.tp-jump-overlay-list li:last-child {
    border-bottom: none;
}

.tp-jump-overlay-list a {
    display: block;
    padding: 16px 20px;
    color: var(--tp-text-body);
    text-decoration: none;
    font-size: 15px;
    transition: all 0.2s ease;
}

.tp-jump-overlay-list a:hover {
    background: var(--tp-cream);
    color: var(--tp-crimson);
    padding-left: 28px;
}

.tp-jump-overlay-list a::before {
    content: counter(jump-counter) ".";
    counter-increment: jump-counter;
    color: var(--tp-gold);
    font-weight: 600;
    margin-right: 12px;
}

/* Share Quote Popup */
.tp-share-quote-popup {
    position: absolute;
    background: var(--tp-charcoal);
    border: 1px solid var(--tp-gold);
    border-radius: 6px;
    padding: 8px 4px;
    display: none;
    z-index: 9999;
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
    transform: translateX(-50%);
}

.tp-share-quote-popup.active {
    display: flex;
    gap: 4px;
    animation: tpPopIn 0.2s ease-out;
}

@keyframes tpPopIn {
    from { opacity: 0; transform: translateX(-50%) translateY(10px) scale(0.9); }
    to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

.tp-share-quote-popup::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: var(--tp-charcoal);
    border-bottom: none;
}

.tp-share-quote-btn {
    background: transparent;
    border: none;
    color: white;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.tp-share-quote-btn:hover {
    color: var(--tp-gold);
}

.tp-share-quote-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.tp-share-quote-divider {
    width: 1px;
    background: rgba(255,255,255,0.2);
}

/* ========================================
   15. PRINT STYLES
   ======================================== */
@media print {
    /* ============================================
       FORCE HIDE EVERYTHING EXCEPT ARTICLE
       ============================================ */

    /* Hide ALL headers - comprehensive list */
    #masthead,
    .site-header,
    .kadence-breadcrumbs,
    .site-branding,
    header.banner,
    .header-desktop,
    .header-mobile,
    .mobile-header-navigation,
    #mobile-drawer,
    .popup-drawer,
    .primary-menu-wrap,
    .secondary-menu-wrap,
    .header-navigation,
    .site-header-container,
    .site-top-header-wrap,
    .site-main-header-wrap,
    .site-bottom-header-wrap,
    .kadence-sticky-header,
    .transparent-header,
    .header-row,
    .site-header-wrap,
    #header {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        overflow: hidden !important;
    }

    /* Hide ALL footers */
    .site-footer,
    footer:not(.entry-footer),
    #colophon,
    .site-footer-wrap,
    .site-bottom-footer-wrap,
    .site-below-footer-wrap,
    .site-above-footer-wrap,
    .footer-widget-area,
    .footer-row,
    #footer {
        display: none !important;
        visibility: hidden !important;
    }

    /* Hide sidebar */
    .sidebar,
    aside,
    .widget-area,
    .site-sidebar,
    #secondary {
        display: none !important;
        visibility: hidden !important;
    }

    /* Hide ALL related/similar posts sections */
    .similar-posts,
    .kadence-related-posts,
    .related-posts,
    .jetpack-related-posts,
    .yarpp-related,
    .jp-relatedposts,
    [class*="similar-posts"],
    [class*="related-posts"],
    .rp4wp-related-posts {
        display: none !important;
        visibility: hidden !important;
    }

    /* Hide post navigation */
    .post-navigation,
    .navigation,
    .posts-navigation,
    nav.navigation,
    .nav-links,
    .nav-previous,
    .nav-next {
        display: none !important;
        visibility: hidden !important;
    }

    /* Hide comments */
    .comments-area,
    .comment-respond,
    #comments,
    #respond {
        display: none !important;
        visibility: hidden !important;
    }

    /* Hide our custom elements */
    .tp-progress-bar,
    .tp-progress-fill,
    .tp-sticky-header,
    .tp-jump-to-btn,
    .tp-font-controls,
    .tp-mobile-tools,
    .tp-mobile-tools-sheet,
    .tp-mobile-tools-backdrop,
    .tp-share-dropdown,
    .tp-share-wrapper,
    .tp-share-quote-popup,
    .tp-jump-overlay,
    .tp-cite-modal,
    .tp-share-btn,
    .tp-section-link,
    .tp-related-section,
    .tp-article-actions,
    .tp-article-info-actions,
    .tp-tags-section,
    .tp-nav-section,
    .tp-meta-bar,
    .tp-see-also-box,
    .tp-author-box {
        display: none !important;
        visibility: hidden !important;
    }

    /* Hide TOC */
    .wp-block-kadence-tableofcontents,
    .ez-toc-container,
    .lwptoc,
    .toc-container,
    [class*="table-of-contents"] {
        display: none !important;
        visibility: hidden !important;
    }

    /* Hide admin bar */
    #wpadminbar {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
    }

    html.wp-toolbar,
    body.admin-bar {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    /* Hide social sharing and misc */
    .sharedaddy,
    .post-tags,
    .entry-tags,
    .tags-links,
    .entry-footer,
    .entry-meta,
    .post-meta,
    [class*="share-buttons"],
    [class*="social-share"] {
        display: none !important;
        visibility: hidden !important;
    }

    /* ============================================
       PRINT-FRIENDLY ARTICLE STYLING
       ============================================ */

    html {
        margin: 0 !important;
        padding: 0 !important;
    }

    body {
        background: white !important;
        font-size: 12pt !important;
        line-height: 1.6 !important;
        color: #000 !important;
        margin: 0 !important;
        padding: 0 !important;
        font-family: Georgia, "Times New Roman", serif !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* Main content area - full width */
    .site,
    .site-container,
    .site-inner,
    main,
    #main,
    .content-wrap,
    .site-main,
    .content-container,
    .content-area,
    #primary {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        float: none !important;
        display: block !important;
    }

    /* Article container */
    article,
    .hentry,
    .post,
    .entry-content-wrap {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 20pt !important;
        box-shadow: none !important;
        border: none !important;
    }

    /* Entry header (title area) - SHOW */
    .entry-header {
        display: block !important;
        visibility: visible !important;
        margin-bottom: 20pt !important;
        padding-bottom: 10pt !important;
        border-bottom: 1pt solid #ccc !important;
    }

    .entry-title {
        font-size: 24pt !important;
        color: #000 !important;
        margin: 0 0 10pt 0 !important;
        font-family: Georgia, serif !important;
        display: block !important;
        visibility: visible !important;
    }

    /* Entry content - SHOW */
    .entry-content {
        display: block !important;
        visibility: visible !important;
        font-size: 12pt !important;
        line-height: 1.7 !important;
        color: #000 !important;
        background: white !important;
        box-shadow: none !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .entry-content p {
        margin-bottom: 12pt !important;
        orphans: 3;
        widows: 3;
    }

    .entry-content h2 {
        font-size: 18pt !important;
        margin-top: 24pt !important;
        margin-bottom: 12pt !important;
        page-break-after: avoid;
        color: #000 !important;
        border-bottom: 1pt solid #ccc !important;
        padding-bottom: 6pt !important;
    }

    .entry-content h2::after {
        display: none !important;
    }

    .entry-content h3 {
        font-size: 14pt !important;
        margin-top: 18pt !important;
        margin-bottom: 8pt !important;
        page-break-after: avoid;
        color: #000 !important;
    }

    /* Images */
    .entry-content img,
    .wp-block-image img {
        max-width: 100% !important;
        height: auto !important;
        page-break-inside: avoid;
    }

    figure {
        margin: 12pt 0 !important;
        page-break-inside: avoid;
    }

    figcaption {
        font-size: 10pt !important;
        color: #666 !important;
        font-style: italic !important;
    }

    /* Links */
    .entry-content a {
        color: #000 !important;
        text-decoration: underline !important;
    }

    /* Lists */
    .entry-content ul,
    .entry-content ol {
        margin-left: 20pt !important;
        padding-left: 0 !important;
    }

    .entry-content li {
        margin-bottom: 6pt !important;
    }

    .entry-content ul li::before {
        display: none !important;
    }

    /* Blockquotes */
    .entry-content blockquote {
        margin: 12pt 20pt !important;
        padding: 10pt 15pt !important;
        border-left: 3pt solid #999 !important;
        font-style: italic !important;
        background: #f5f5f5 !important;
        page-break-inside: avoid;
    }

    /* Article info box - keep but simplify */
    .tp-article-info-box {
        display: block !important;
        visibility: visible !important;
        margin-top: 24pt !important;
        padding: 15pt !important;
        border: 1pt solid #ccc !important;
        background: #f9f9f9 !important;
        page-break-inside: avoid;
    }

    .tp-article-info-box::before,
    .tp-article-info-box::after {
        display: none !important;
    }

    .tp-article-info-box .tp-article-info-actions {
        display: none !important;
    }

    .tp-article-info-title {
        color: #000 !important;
        font-size: 12pt !important;
    }

    .tp-article-info-title::before {
        display: none !important;
    }

    /* Featured image */
    .post-thumbnail,
    .entry-thumbnail {
        display: block !important;
        margin-bottom: 15pt !important;
    }

    .post-thumbnail img {
        max-width: 100% !important;
        height: auto !important;
    }

    /* Page breaks */
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }

    table, figure, img {
        page-break-inside: avoid;
    }

    /* Page setup */
    @page {
        margin: 2cm;
        size: A4;
    }

    @page :first {
        margin-top: 2.5cm;
    }
}


/* ========================================
   16. RTL SUPPORT
   ======================================== */
[dir="rtl"] .tp-see-also-list li a::before,
body.rtl-lang .tp-see-also-list li a::before {
    content: '\2190'; /* Left arrow for RTL */
}

[dir="rtl"] .tp-see-also-list li a:hover::before,
body.rtl-lang .tp-see-also-list li a:hover::before {
    transform: translateX(-4px);
}

[dir="rtl"] .tp-related-direction,
body.rtl-lang .tp-related-direction {
    flex-direction: row-reverse;
}

[dir="rtl"] .single-post .entry-content h2::after,
body.rtl-lang .single-post .entry-content h2::after {
    left: auto;
    right: 0;
}

[dir="rtl"] .tp-section-link,
body.rtl-lang .tp-section-link {
    margin-left: 0;
    margin-right: 12px;
}

    right: auto;
    left: 20px;
}

[dir="rtl"] .tp-jump-to-btn,
body.rtl-lang .tp-jump-to-btn {
    display: flex !important;
    right: auto;
    left: 20px;
}

[dir="rtl"] .tp-mobile-tools,
body.rtl-lang .tp-mobile-tools {
    right: auto;
    left: 20px;
}

[dir="rtl"] .tp-font-controls,
body.rtl-lang .tp-font-controls {
    left: auto;
    right: 20px;
}

[dir="rtl"] .single-post .entry-content ul:not(.wp-block-gallery) li,
body.rtl-lang .single-post .entry-content ul:not(.wp-block-gallery) li {
    padding-left: 0;
    padding-right: 28px;
}

[dir="rtl"] .single-post .entry-content ul:not(.wp-block-gallery) li::before,
body.rtl-lang .single-post .entry-content ul:not(.wp-block-gallery) li::before {
    left: auto;
    right: 0;
}

[dir="rtl"] .single-post .entry-content blockquote,
body.rtl-lang .single-post .entry-content blockquote {
    border-left: none;
    border-right: 4px solid var(--tp-crimson);
}

[dir="rtl"] .tp-see-also-box,
body.rtl-lang .tp-see-also-box {
    border-left: none;
    border-right: 4px solid var(--tp-gold);
}

/* ========================================
   17. RESPONSIVE ADJUSTMENTS
   ======================================== */
@media (max-width: 768px) {
    .tp-meta-bar {
        flex-direction: column;
        gap: 10px;
    }

    .tp-meta-separator {
        display: none;
    }

    .tp-related-section {
        padding: 40px 5%;
    }

    .single-post .entry-content h2 {
        font-size: 1.4rem;
    }

    .tp-author-box {
        padding: 20px;
    }
}

/* ========================================
   FIX: SVG Sizing Override
   ======================================== */
.tp-meta-bar svg,
.tp-reading-time svg,
.tp-updated-badge svg,
.tp-share-btn svg,
.tp-share-dropdown-item svg,
.tp-jump-to-btn svg,
.tp-font-btn svg {
    width: 14px !important;
    height: 14px !important;
    max-width: 14px !important;
    max-height: 14px !important;
    display: inline-block !important;
}

.tp-updated-badge svg {
    width: 12px !important;
    height: 12px !important;
    max-width: 12px !important;
    max-height: 12px !important;
}


    width: 28px !important;
    height: 28px !important;
    max-width: 28px !important;
    max-height: 28px !important;
}

.tp-jump-to-btn svg {
    width: 24px !important;
    height: 24px !important;
    max-width: 24px !important;
    max-height: 24px !important;
}

/* Fix meta bar layout */
.tp-meta-bar {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 16px !important;
}

/* Fix for WordPress admin bar */
body.admin-bar .tp-sticky-header {
    /* Position below main header */
    top: 112px;
}

body.admin-bar .tp-progress-bar {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar .tp-sticky-header {
    /* Position below main header */
        top: 126px;
    }
    body.admin-bar .tp-progress-bar {
        top: 46px;
    }
}

/* ========================================
   ARTICLE INFO BOX
   ======================================== */
.tp-article-info-box {
    background: linear-gradient(135deg, rgba(249, 246, 238, 0.95), rgba(240, 235, 224, 0.95));
    border: 1px solid var(--tp-border-subtle);
    border-top: 3px solid var(--tp-gold);
    border-bottom: 3px solid var(--tp-gold);
    padding: 24px 28px;
    margin: 40px 0;
    position: relative;
}

.tp-article-info-box::before,
.tp-article-info-box::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid var(--tp-gold);
}

.tp-article-info-box::before {
    top: -2px;
    left: -2px;
    border-right: none;
    border-bottom: none;
}

.tp-article-info-box::after {
    bottom: -2px;
    right: -2px;
    border-left: none;
    border-top: none;
}

.tp-article-info-title {
    font-family: "Playfair Display", serif;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--tp-gold);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tp-article-info-title::before {
    content: "◆";
    font-size: 8px;
    color: var(--tp-crimson);
}

.tp-article-info-grid {
    display: grid;
    gap: 8px;
    margin-bottom: 20px;
}

.tp-article-info-row {
    display: flex;
    gap: 8px;
    font-size: 14px;
}

.tp-article-info-label {
    color: var(--tp-text-muted);
    min-width: 100px;
}

.tp-article-info-value {
    color: var(--tp-charcoal);
}

.tp-article-info-value a {
    color: var(--tp-crimson);
    text-decoration: none;
}

.tp-article-info-value a:hover {
    text-decoration: underline;
}

.tp-article-info-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.tp-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--tp-charcoal);
    color: white;
    border: none;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: "Literata", serif;
}

.tp-action-btn:hover {
    background: var(--tp-crimson);
}

.tp-action-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* ========================================
   CITATION MODAL
   ======================================== */
.tp-cite-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    padding: 20px;
}

.tp-cite-modal.active {
    display: flex;
}

.tp-cite-modal-content {
    background: white;
    max-width: 600px;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    max-height: 90vh;
    overflow-y: auto;
}

.tp-cite-modal-header {
    background: var(--tp-charcoal);
    color: white;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tp-cite-modal-title {
    font-family: "Playfair Display", serif;
    font-size: 18px;
}

.tp-cite-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
}

.tp-cite-modal-body {
    padding: 24px;
}

.tp-cite-format {
    margin-bottom: 20px;
}

.tp-cite-format-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
    color: var(--tp-charcoal);
}

.tp-cite-format-text {
    background: var(--tp-cream);
    padding: 12px 16px;
    font-size: 14px;
    border: 1px solid var(--tp-border-subtle);
    border-radius: 4px;
    margin-bottom: 8px;
}

.tp-cite-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--tp-gold);
    color: var(--tp-charcoal);
    border: none;
    font-size: 12px;
    cursor: pointer;
    border-radius: 4px;
}

.tp-cite-copy-btn:hover {
    background: var(--tp-crimson);
    color: white;
}

/* Fix sticky header crescent */
.tp-sticky-header-crescent {
    color: var(--tp-gold);
    display: flex;
    align-items: center;
}

.tp-sticky-header-crescent svg {
    width: 28px !important;
    height: 28px !important;
    fill: var(--tp-gold);
}

/* ========================================
   SMOOTH SCROLLING
   ======================================== */
html {
    scroll-behavior: smooth;
}

/* Offset for fixed header when scrolling to anchors */
html {
    scroll-padding-top: 80px;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}
