@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@500&display=swap');


/* ====== ESTILO MANUSCRITO  ====== */
/* 
em,
i,
p > em,
p > i {
    font-family: "Caveat", cursive, "Times New Roman", Times, serif;
    font-style: normal;
    font-weight: 500;
    font-size: 1.2em;
    line-height: 1.15;
    color: rgba(0, 0, 0, 0.78);
    display: inline-block;
    transform: translateY(0.18em);
    opacity: 0.96;
} */

/* ====== ANOTAÇÃO à DIREITA para itálicos pós blockquotes ====== */
blockquote + p > em:only-child,
blockquote + p > i:only-child {
    display: block !important;
    text-align: right !important;
    /* margin-top: 0.4rem;
    max-width: 92%; */
    font-family: "Caveat", cursive, "Times New Roman", Times, serif;
    font-style: normal;
    font-weight: 500;
    font-size: 1.2em;
    line-height: 1.15;
    color: rgba(0, 0, 0, 0.78);
    display: inline-block;
    transform: translateY(0.18em);
    opacity: 0.96;
}

/* ====== BLOCKQUOTES estilo papel original ====== */

blockquote:not([class]) {
    position: relative;
    margin: 1.5rem auto 1.5rem 2.5rem;
    padding: 1.5rem 1.5rem 1.5rem 3rem;
    max-width: 65ch;
    font-size: 1.7rem;
    font-family: 'Times New Roman', Times, serif;
    text-align: justify;
    line-height: 2rem;
    border-left: 3px solid var(--ghost-accent-color);
    background: linear-gradient(135deg, #f8f8f8 0%, #f0f0f0 52%, #e8e8e8 100%);
    box-shadow: 0 10px 22px rgba(0,0,0,0.14), 0 4px 10px rgba(0,0,0,0.10);
    transform: rotate(-0.6deg);
    transition: transform 200ms ease, box-shadow 200ms ease;
}


/* grid container */
.highlights-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
    margin: 2rem 0;
    width: calc(100% + 12vw);
    margin-left: calc(-6vw);
    max-width: 1200px;
}

/* cada par blockquote + anotação */
.bq-pair {
    display: flex;
    flex-direction: column;
}

/* sobrescreve o rotate e ajusta margens pro contexto de grid */
.bq-pair blockquote:not([class]) {
    transform: none;
    margin: 0 0 0.5rem 0 !important;
    max-width: 100%;
}

/* mobile: uma coluna */
@media (max-width: 768px) {
    .highlights-grid {
        grid-template-columns: 1fr;
    }
}

/* ====== ÍNDICE FLUTUANTE LATERAL (estilo Notion) ====== */

#book-toc-float {
    position: fixed;
    top: 50%;
    right: 1.6rem;
    transform: translateY(-50%);
    z-index: 100;
    padding: 2rem 0 2rem 2rem;
}

@media (max-width: 1000px) {
    #book-toc-float { display: none; }
}

/* ── Traços ── */
.btf-ticks {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-end;
    transition: opacity 200ms ease;
}

.btf-tick {
    height: 2px;
    border-radius: 2px;
    background: rgba(0, 0, 0, 0.15);
    transition: background 200ms;
    display: block;
}

.btf-tick.btf-tick-active {
    background: rgba(0, 0, 0, 0.5);
}

/* ── Painel expandido: aparece sobre os traços ── */
.btf-panel {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%) translateX(6px);
    width: 19rem;
    max-height: 70vh;
    overflow-y: auto;
    background: var(--background-color, #fff);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 6px;
    padding: 1rem 1.2rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.10), 0 1px 4px rgba(0, 0, 0, 0.06);
    scrollbar-width: thin;

    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease, transform 180ms ease;
}

#book-toc-float:hover .btf-ticks {
    opacity: 0;
    pointer-events: none;
}

#book-toc-float:hover .btf-panel {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(-50%) translateX(0);
}

.btf-title {
    font-size: 1.05rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--tertiary-text-color, #999);
    margin: 0 0 0.6rem;
}

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

.btf-item {
    margin: 0;
    padding: 0;
}

.btf-item a {
    display: block;
    padding: 0.3rem 0.4rem;
    font-size: 1.25rem;
    color: var(--secondary-text-color, #555);
    text-decoration: none;
    border-radius: 4px;
    transition: background 100ms, color 100ms;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

.btf-item a:hover {
    background: var(--hero-background-color, #f4f4f4);
    color: var(--primary-text-color, #111);
}

.btf-h3 a {
    padding-left: 1.1rem;
    font-size: 1.15rem;
    color: var(--tertiary-text-color, #777);
}

.btf-active a {
    color: var(--ghost-accent-color, #7c3aed);
    font-weight: 600;
}


/* ====== STICKY CHAPTER HEADERS — Fase A (CSS puro) ====== */

body.post-template-custom-book-tiny-feature-image .site-content,
body.tag-hash-book-reading .site-content,
body.tag-books .site-content {
    overflow: visible;
}

/* ====== Fase B — Proxy fixed ====== */

body.post-template-custom-book-tiny-feature-image .book-sticky-chapter-proxy,
body.tag-hash-book-reading .book-sticky-chapter-proxy,
body.tag-books .book-sticky-chapter-proxy {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9998;
    box-sizing: border-box;
    visibility: hidden;
    pointer-events: none;
    margin: 0;
    padding-top: 0.8rem;
    padding-bottom: 1rem;
    background: var(--background-color, #fff);
    box-shadow: 0 6px 12px -6px rgba(0, 0, 0, 0.12);
    will-change: transform;
}

body.post-template-custom-book-tiny-feature-image .gh-content > h3.is-sticky-proxied,
body.tag-hash-book-reading .gh-content > h3.is-sticky-proxied,
body.tag-books .gh-content > h3.is-sticky-proxied {
    visibility: hidden;
}


