@layer base {
/* citations-anchor.css — anchor-ID chips + quote highlighting in slideout
 * Loads after source-citations.css; only adds new rules, no overrides
 * of existing ones unless explicitly noted.
 */

/* Anchor chips — same orange family as [N] chips, but subtly different
 * so a verified anchor citation reads as a more specific reference. */
.gf-citation.gf-citation-anchor {
    background: rgba(250, 82, 15, 0.16);
    border: 1px solid rgba(250, 82, 15, 0.36);
    color: #ff7d3d;
    padding: 0 6px;
    font-weight: 600;
    letter-spacing: 0.01em;
}
.gf-citation.gf-citation-anchor:hover {
    background: rgba(250, 82, 15, 0.28);
}

/* Unverified state: dimmed color, dashed border, "?" badge after the chip. */
.gf-citation.gf-citation-unverified {
    color: #b58970;
    background: rgba(250, 82, 15, 0.08);
    border-style: dashed;
}
.gf-citation.gf-citation-unverified::after {
    content: '?';
    margin-left: 4px;
    font-size: 0.85em;
    font-weight: 800;
    color: #d97f00;
    background: rgba(217, 127, 0, 0.18);
    border-radius: 999px;
    padding: 0 5px;
    line-height: 1.4;
    vertical-align: baseline;
}

/* The text-layer + highlight glyph layer (PDF.js) — sits absolutely over
 * the canvas, transparent, contains positioned <span>s for each text run. */
.gf-source-page-wrap {
    position: relative;
}
.gf-source-text-layer {
    position: absolute;
    top: 0;
    left: 0;
    overflow: hidden;
    opacity: 0.999;          /* keep elements selectable */
    line-height: 1;
    pointer-events: auto;
}
.gf-source-text-layer > span {
    color: transparent;
    position: absolute;
    white-space: pre;
    cursor: text;
    transform-origin: 0% 0%;
}

/* Quote highlight rendered on top of the (transparent) text spans.
 * `mark` keeps native semantics for accessibility. Override the legacy
 * yellow rule from source-citations.css with orange so the highlight
 * matches the orange citation-chip family. */
.gf-source-text-layer mark.gf-source-highlight,
mark.gf-source-highlight {
    background: rgba(250, 82, 15, 0.42);
    color: transparent;       /* text stays invisible — only the box is visible */
    padding: 0;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(214, 88, 25, 0.65);
}

}