/* ==========================================================================
   COMPONENTS.CSS - Navigation, Buttons, Figures, Images & UI Elements
   ========================================================================== */

/* --- NAVIGATION SECTIONS --- */
.nav-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-icon {
    display: none;
    /* Hidden when sidebar is expanded */
    width: 24px;
    height: 24px;
    line-height: 1;
    text-decoration: none;
}

.nav-icon img {
    width: 100%;
    height: 100%;
    display: block;
}

.nav-label {
    font-size: 0.8rem;
    color: var(--dim-gold);
    margin: 30px 0 10px;
    letter-spacing: 2px;
    border-bottom: 1px solid var(--dim-gold);
    padding-bottom: 5px;
    text-transform: uppercase;
}

/* --- STATUS DOT --- */
.dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--gold);
    border-radius: 50%;
    animation: blink 2s infinite;
    margin-right: 6px;
}

/* --- NAVIGATION LINKS --- */
.ledger-list,
.ledger-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ledger-list ul {
    padding-left: 15px;
    border-left: 1px solid var(--dim-gold);
    margin-top: 5px;
}

summary.novella-title {
    color: var(--gold-muted);
    font-weight: bold;
    cursor: pointer;
    outline: none;
    padding: 5px 0;
}

.ledger-list li a {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--gold-muted);
    opacity: 0.7;
    text-decoration: none;
    padding: 6px 0;
    transition: all 0.2s ease;
    font-size: 0.98rem;
}

.ledger-list li a:hover {
    opacity: 1;
    color: var(--gold);
}

.nav-glyph {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    color: rgba(137, 185, 189, 0.72);
    opacity: 0.86;
}

.nav-glyph svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nav-text {
    min-width: 0;
}

.sidebar-nav {
    display: grid;
    gap: 18px;
    margin-top: 24px;
}

.nav-group {
    min-width: 0;
}

.nav-group-label {
    margin: 0 0 8px;
    color: rgba(199, 168, 106, 0.54);
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.14em;
    line-height: 1.2;
    text-transform: uppercase;
}

.nav-group--archive {
    position: relative;
    padding-top: 16px;
    border-top: 1px solid rgba(137, 185, 189, 0.22);
}

.nav-group--archive::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 0;
    width: 46px;
    height: 1px;
    background: rgba(137, 185, 189, 0.72);
}

.nav-group--archive .nav-group-label,
.nav-group--archive .nav-glyph {
    color: rgba(137, 185, 189, 0.72);
}

.nav-group--archive .ledger-list li a {
    color: rgba(190, 214, 215, 0.78);
}

.nav-group--archive .ledger-list li a:hover {
    color: var(--archive-paper);
}

/* Appears In component - links to narratives */
.appears-in {
    margin-top: 2.4em;
    margin-bottom: 1.2em;
    padding: 14px 16px;
    border: 1px solid rgba(115, 93, 33, 0.55);
    background: linear-gradient(180deg, rgba(255, 204, 51, 0.03) 0%, rgba(0, 0, 0, 0) 100%);
}

.appears-in-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
}

.appears-in-group+.appears-in-group {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dotted rgba(115, 93, 33, 0.55);
}

.appears-in-label {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--dim-gold);
}

.appears-in-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.appears-in-links a {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border: 1px solid rgba(220, 176, 69, 0.45);
    background: rgba(255, 204, 51, 0.04);
    border-radius: 999px;
    color: var(--gold-muted);
    text-decoration: none;
    font-size: 0.78rem;
    line-height: 1.3;
    letter-spacing: 0.02em;
    transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.appears-in-links a:hover {
    border-color: var(--gold);
    color: var(--gold);
    background: rgba(255, 204, 51, 0.1);
}

/* --- ARCHIVE INDEXES --- */
.archive-index {
    display: grid;
    gap: 42px;
}

.archive-index-group h2 {
    margin-top: 0;
    margin-bottom: 18px;
    font-size: clamp(1.15rem, 2vw, 1.45rem);
}

.archive-subheading {
    margin: 28px 0 14px;
    text-align: left;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--dim-gold);
    letter-spacing: 0.16em;
}

.archive-index-note {
    max-width: 62ch;
    margin: -4px 0 20px;
    color: rgba(184, 169, 130, 0.86);
    font-size: 0.95rem;
    line-height: 1.6;
}

.archive-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.prose .archive-card,
.archive-card {
    min-height: 148px;
    padding: 18px;
    border: 1px solid rgba(115, 93, 33, 0.72);
    border-bottom: 1px solid rgba(115, 93, 33, 0.72);
    background:
        linear-gradient(180deg, rgba(255, 204, 51, 0.055), rgba(255, 204, 51, 0.015)),
        rgba(13, 13, 13, 0.72);
    color: var(--gold-muted);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
    box-sizing: border-box;
    transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.prose .archive-card:hover,
.archive-card:hover,
.prose .archive-card:focus-visible,
.archive-card:focus-visible {
    border-color: var(--gold);
    border-bottom-color: var(--gold);
    background-color: rgba(255, 204, 51, 0.05);
    box-shadow: 0 0 0 1px rgba(255, 204, 51, 0.16), 0 12px 24px rgba(0, 0, 0, 0.28);
    transform: translateY(-2px);
    outline: none;
}

.archive-card-kicker,
.archive-card span:last-child {
    font-family: var(--font-mono);
    color: var(--dim-gold);
    font-size: 0.68rem;
    line-height: 1.5;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.archive-card strong {
    color: var(--gold);
    font-family: var(--font-display);
    font-size: 1.12rem;
    line-height: 1.25;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.archive-card-work {
    color: rgba(137, 185, 189, 0.78) !important;
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.09em;
    line-height: 1.45;
    text-transform: uppercase;
}

.library-series-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.library-series-card {
    border: 1px solid rgba(115, 93, 33, 0.72);
    background:
        linear-gradient(180deg, rgba(255, 204, 51, 0.055), rgba(255, 204, 51, 0.015)),
        rgba(13, 13, 13, 0.72);
    min-height: 210px;
    padding: 20px;
    box-sizing: border-box;
}

.library-series-header {
    border-bottom: 1px dotted rgba(115, 93, 33, 0.72);
    padding-bottom: 16px;
    margin-bottom: 14px;
}

.library-series-header h3 {
    margin: 10px 0 8px;
    text-align: left;
    color: var(--gold);
    font-size: 1.14rem;
    line-height: 1.25;
}

.prose .library-series-header h3 a,
.library-series-header h3 a {
    color: inherit;
    border-bottom-color: transparent;
}

.prose .library-series-header h3 a:hover,
.prose .library-series-header h3 a:focus-visible,
.library-series-header h3 a:hover,
.library-series-header h3 a:focus-visible {
    color: var(--archive-paper);
    border-bottom-color: rgba(137, 185, 189, 0.58);
}

.library-series-header p {
    margin: 0;
    color: var(--dim-gold);
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    line-height: 1.5;
    text-transform: uppercase;
}

.library-series-header .library-series-status {
    margin: 0 0 10px;
    color: var(--gold-muted);
    font-family: var(--font-serif);
    font-size: 0.98rem;
    letter-spacing: 0;
    line-height: 1.45;
    text-transform: none;
}

.library-record-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.library-record-list li {
    margin: 0;
}

.prose .library-record-list a,
.library-record-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border: 1px solid rgba(115, 93, 33, 0.44);
    border-bottom: 1px solid rgba(115, 93, 33, 0.44);
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.28);
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.prose .library-record-list a:hover,
.library-record-list a:hover,
.prose .library-record-list a:focus-visible,
.library-record-list a:focus-visible {
    border-color: var(--gold);
    border-bottom-color: var(--gold);
    background: rgba(255, 204, 51, 0.06);
    outline: none;
}

.library-record-title {
    color: var(--gold);
    font-family: var(--font-display);
    font-size: 0.98rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.25;
    text-transform: uppercase;
}

.library-record-meta {
    color: var(--dim-gold);
    flex-shrink: 0;
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* Subcategory headers (e.g., PRIMARY, SECONDARY, MINOR under Characters) */
.subcategory-header {
    font-size: 0.65rem;
    color: var(--dim-gold);
    letter-spacing: 1px;
    margin-top: 10px;
    margin-bottom: 5px;
    opacity: 0.7;
    font-weight: bold;
}

.ledger-list li.active a {
    opacity: 1;
    color: var(--gold);
    text-shadow: 0 0 15px var(--gold);
    border-left: 2px solid var(--gold);
    padding-left: 10px;
    background: linear-gradient(to right, rgba(255, 204, 51, 0.15), transparent);
}

/* --- NAV BUTTONS --- */
.scan-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 80px;
    padding-top: 40px;
    border-top: 1px solid var(--dim-gold);
}

.nav-half {
    width: 48%;
}

.nav-half.right {
    text-align: right;
}

.scan-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 1px solid var(--dim-gold);
    padding: 15px 20px;
    color: var(--gold-muted);
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 2px;
    transition: all 0.3s;
    background: rgba(0, 0, 0, 0.5);
}

.scan-btn:hover {
    border-color: var(--gold);
    color: var(--gold);
    background: rgba(255, 204, 51, 0.1);
    box-shadow: 0 0 20px rgba(255, 204, 51, 0.3);
}

.scan-arrow {
    color: var(--dim-gold);
    font-family: var(--font-serif);
    font-size: 1.08rem;
    font-weight: 400;
    line-height: 1;
    transform: translateY(-1px);
}

.scan-btn:hover .scan-arrow {
    color: var(--gold);
}

/* --- SIDEBAR TOGGLE BUTTON --- */
.sidebar-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    width: 44px;
    height: 44px;
    background: var(--panel-bg);
    border: 2px solid var(--gold);
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    /* Always visible */
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.sidebar-toggle:hover {
    background: var(--gold);
    box-shadow: 0 0 15px rgba(255, 204, 51, 0.5);
}

.sidebar-toggle:focus {
    outline: none;
}

.sidebar-toggle:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 4px;
}

/* Arrow icon - points left when expanded (to collapse), right when collapsed (to expand) */
.sidebar-toggle .hamburger {
    position: relative;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 8px 12px 8px 0;
    border-color: transparent var(--gold) transparent transparent;
    transition: all 0.3s ease;
}

.sidebar-toggle:hover .hamburger {
    border-right-color: var(--bg);
}

/* When collapsed, arrow points right (to expand) */
.sidebar-toggle.active .hamburger {
    border-width: 8px 0 8px 12px;
    border-color: transparent transparent transparent var(--gold);
}

.sidebar-toggle.active:hover .hamburger {
    border-left-color: var(--bg);
    border-right-color: transparent;
}

/* --- VISUAL ARCHIVE LOGS (ART) --- */
figure.archive-figure {
    margin: 4rem auto;
    max-width: 95%;
    background: #000;
    padding: 0 0 15px 0;
    /* Add bottom padding for the caption */
    border: none;
    border-radius: 12px / 50px;
    box-shadow:
        0 0 0 4px #1a1a1a,
        /* Physical Bezel edge */
        0 8px 30px rgba(0, 0, 0, 0.8),
        /* Soft shadow */
        0 0 15px rgba(255, 204, 51, 0.1);
    /* Ambient glow */
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.45s cubic-bezier(0.23, 1, 0.32, 1);
    cursor: crosshair;
}

.page-home figure.archive-figure {
    max-width: 380px;
    margin-top: 2rem;
}

.page-home .archive-img {
    max-height: 520px;
    object-fit: cover;
}

.ledger-list li.active .nav-glyph {
    color: var(--archive-rust);
    opacity: 1;
}

.home-portal {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
    gap: clamp(28px, 5vw, 56px);
    align-items: stretch;
    margin: 0 auto 52px;
}

.portal-copy {
    padding-top: 8px;
}

.portal-primary {
    font-size: clamp(1.42rem, 2.4vw, 1.95rem);
    line-height: 1.42;
    color: var(--gold);
    margin-top: 0;
    text-shadow: 0 0 14px rgba(255, 204, 51, 0.12);
}

.portal-actions {
    display: grid;
    gap: 14px;
}

.prose .portal-action,
.portal-action {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 132px;
    padding: 18px 20px;
    border: 1px solid rgba(115, 93, 33, 0.78);
    border-bottom: 1px solid rgba(115, 93, 33, 0.78);
    background:
        linear-gradient(180deg, rgba(255, 204, 51, 0.065), rgba(255, 204, 51, 0.015)),
        rgba(13, 13, 13, 0.72);
    box-sizing: border-box;
    transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.prose .portal-action:hover,
.portal-action:hover,
.prose .portal-action:focus-visible,
.portal-action:focus-visible {
    border-color: var(--gold);
    border-bottom-color: var(--gold);
    background-color: rgba(255, 204, 51, 0.05);
    box-shadow: 0 0 0 1px rgba(255, 204, 51, 0.16), 0 12px 24px rgba(0, 0, 0, 0.28);
    transform: translateY(-2px);
    outline: none;
}

.portal-action span {
    color: var(--gold);
    font-family: var(--font-display);
    font-size: 1.08rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1.2;
    text-transform: uppercase;
}

.portal-action strong {
    margin-top: 12px;
    color: var(--dim-gold);
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    line-height: 1.55;
    text-transform: uppercase;
}

.archive-dossier {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin: 0 0 54px;
}

.dossier-panel {
    border-top: 1px solid rgba(115, 93, 33, 0.8);
    border-bottom: 1px solid rgba(115, 93, 33, 0.45);
    padding: 18px 2px 16px;
}

.dossier-label {
    display: block;
    margin-bottom: 12px;
    color: var(--dim-gold);
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.dossier-panel h2 {
    margin: 0 0 12px;
    text-align: left;
    font-size: 1rem;
    letter-spacing: 0.08em;
}

.dossier-panel p {
    margin: 0 0 14px;
    color: var(--gold-muted);
    font-size: 1rem;
    line-height: 1.55;
}

.prose .dossier-panel a,
.dossier-panel a {
    color: var(--gold);
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.home-portrait {
    margin-top: 18px;
}

.archive-img {
    position: relative;
    display: block;
    width: 100%;
    height: auto;
    filter: grayscale(100%) sepia(100%) hue-rotate(5deg) brightness(0.82) contrast(1.15);
    opacity: 0.9;
    z-index: 1;
    transition: filter 0.45s ease, opacity 0.45s ease;
    border-radius: inherit;
}

/* --- THE SCANNER EFFECT & BULGE (ACTIVE STATES) --- */
figure.archive-figure:is(:hover, :active, :focus-within, .is-selected) {
    box-shadow:
        0 0 0 6px var(--dim-gold),
        0 20px 50px rgba(0, 0, 0, 0.9),
        0 0 30px rgba(255, 204, 51, 0.3);
}

figure.archive-figure:is(:hover, :active, :focus-within, .is-selected) .archive-img {
    filter: sepia(0.45) saturate(1.05) contrast(1.25) brightness(1.14);
    opacity: 1;
    animation: engram-flicker 6s linear infinite;
}

/* Glass Bulge Reflection Layer */
figure.archive-figure::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%,
            rgba(255, 255, 255, 0.05) 0%,
            transparent 70%);
    pointer-events: none;
    z-index: 5;
    opacity: 0.5;
    transition: opacity 0.5s ease;
}

figure.archive-figure:is(:hover, :active, :focus-within, .is-selected)::before {
    opacity: 1;
}

/* Scanlines & Screen Texture */
figure.archive-figure::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 50%),
        radial-gradient(ellipse at center, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
    background-size: 100% 3px, 100% 100%;
    pointer-events: none;
    z-index: 4;
    opacity: 0.7;
    transition: opacity 0.5s ease;
}

figure.archive-figure:is(:hover, :active, :focus-within, .is-selected)::after {
    opacity: 0.9;
}

/* On touch/mobile devices keep idle state static until selected. */
@media (hover: none), (pointer: coarse), (max-width: 900px) {
    figure.archive-figure .archive-img,
    .featured-image img,
    .character-profile-image img {
        animation: none;
    }
}

figcaption.archive-caption {
    margin: 8px 20px 0;
    padding-top: 0;
    font-family: 'SFMono-Regular', Consolas, monospace;
    font-size: 0.62rem;
    color: var(--dim-gold);
    text-transform: uppercase;
    letter-spacing: 0.16em;
    display: block;
    text-align: center;
    position: relative;
    z-index: 6;
    opacity: 0.7;
}

@media (max-width: 768px) {
    figure.archive-figure {
        max-width: 100%;
        padding-bottom: 10px;
    }

    .page-home figure.archive-figure {
        max-width: min(100%, 280px);
    }

    figcaption.archive-caption {
        margin: 6px 10px 0;
        font-size: 0.5rem;
        letter-spacing: 0.08em;
        text-align: center;
    }

    figcaption.archive-caption span {
        display: inline;
    }
}

@media (max-width: 480px) {
    figcaption.archive-caption {
        margin: 5px 8px 0;
        font-size: 0.46rem;
        letter-spacing: 0.06em;
    }
}


/* --- IMAGES --- */

/* --- IMAGES --- */
.featured-image {
    margin: 4rem 0;
    text-align: center;
    position: relative;
    display: block;
    width: 100%;
    background: #000;
    border-radius: 12px / 40px;
    box-shadow:
        0 0 0 3px #111,
        0 15px 35px rgba(0, 0, 0, 0.7);
    overflow: hidden;
    transition: all 0.5s ease;
}

.featured-image img {
    position: relative;
    width: 100%;
    max-width: 100%;
    height: auto;
    filter: grayscale(100%) sepia(95%) brightness(0.82) contrast(1.12);
    z-index: 1;
    transition: filter 0.45s ease;
    border: none;
}

.featured-image:is(:hover, :active, :focus-within, .is-selected) img {
    filter: sepia(0.4) contrast(1.2) brightness(1.14);
    animation: engram-flicker 6s linear infinite;
}

/* Bulge & Scanlines for Featured Image */
.featured-image::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.03) 0%, transparent 60%);
    z-index: 3;
    pointer-events: none;
}

.featured-image::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1) 1px, transparent 1px, transparent 3px);
    z-index: 2;
    pointer-events: none;
    opacity: 0.5;
}

.image-caption {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: var(--dim-gold);
    font-style: italic;
    text-align: center;
}

/* Character profile images */
.character-profile-image {
    float: right;
    max-width: 300px;
    margin: 0 0 2rem 2rem;
    position: relative;
    background: #000;
    border-radius: 8px / 30px;
    box-shadow:
        0 0 0 2px #222,
        0 10px 25px rgba(0, 0, 0, 0.6);
    overflow: hidden;
}

.character-profile-image img {
    width: 100%;
    height: auto;
    border: none;
    filter: grayscale(100%) sepia(0.75) brightness(0.9);
    transition: filter 0.4s ease;
    display: block;
}

.character-profile-image:is(:hover, :active, :focus-within, .is-selected) img {
    filter: sepia(0.3) brightness(1.08) contrast(1.16);
    animation: engram-flicker 6s linear infinite;
}

.character-profile-image::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.05) 50%);
    background-size: 100% 2px;
    pointer-events: none;
    opacity: 0.4;
}

/* Author record */
.about-archive-profile {
    display: grid;
    grid-template-columns: minmax(180px, 250px) minmax(0, 1fr);
    gap: clamp(26px, 5vw, 46px);
    align-items: start;
    max-width: 920px;
    margin: 0 auto;
}

.author-photo {
    margin: 0;
    text-align: center;
}

.author-photo--archive {
    position: sticky;
    top: 32px;
    padding: 10px;
    border: 1px solid rgba(199, 168, 106, 0.42);
    background:
        linear-gradient(180deg, rgba(137, 185, 189, 0.07), rgba(0, 0, 0, 0)),
        rgba(5, 6, 7, 0.58);
}

.author-photo--archive::before,
.author-photo--archive::after {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    border-color: rgba(137, 185, 189, 0.34);
    border-style: solid;
    pointer-events: none;
}

.author-photo--archive::before {
    top: -1px;
    left: -1px;
    border-width: 1px 0 0 1px;
}

.author-photo--archive::after {
    right: -1px;
    bottom: -1px;
    border-width: 0 1px 1px 0;
}

.author-photo img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border: 1px solid rgba(137, 185, 189, 0.2);
    filter: sepia(0.18) saturate(0.82) contrast(1.08) brightness(0.92);
    display: block;
}

.author-photo figcaption {
    margin-top: 10px;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    color: var(--dim-gold);
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.about-record {
    max-width: 680px;
}

.about-record-card {
    margin: 0 0 28px;
}

.about-signal-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    margin: 30px 0;
    border: 1px solid rgba(91, 80, 56, 0.7);
    background: rgba(91, 80, 56, 0.38);
}

.about-signal-grid div {
    padding: 16px;
    background: rgba(5, 6, 7, 0.66);
}

.about-signal-grid span {
    display: block;
    margin-bottom: 8px;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    color: var(--data-ghost);
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.about-signal-grid strong {
    display: block;
    color: var(--archive-paper);
    font-family: var(--font-display);
    font-size: 0.95rem;
    line-height: 1.35;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.about-cta-row {
    margin-top: 36px;
    text-align: left;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* --- SEARCH --- */
.search-section {
    margin-top: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--dim-gold);
}

.search-section .nav-label {
    margin: 0;
    border-bottom: none;
    cursor: pointer;
    transition: color 0.2s ease;
}

.search-section .nav-label:hover {
    color: var(--gold);
}

.search-link {
    text-decoration: none;
}

.search-container {
    max-width: 800px;
    margin: 0 auto;
}

.search-intro {
    color: var(--dim-gold);
    font-size: 0.9rem;
    margin-bottom: 30px;
    text-align: center;
}

/* Custom Search UI */
.search-input-wrapper {
    position: relative;
    margin-bottom: 20px;
}

.search-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.search-filter-label {
    display: block;
    font-size: 0.7rem;
    opacity: 0.8;
    margin-bottom: 4px;
}

.search-input {
    width: 100%;
    padding: 15px 45px 15px 15px;
    background: var(--panel-bg);
    border: 1px solid var(--dim-gold);
    border-radius: 4px;
    color: var(--gold-muted);
    font-family: 'SFMono-Regular', Consolas, monospace;
    font-size: 1rem;
    box-sizing: border-box;
}

.search-input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 10px rgba(255, 204, 51, 0.2);
    outline: none;
}

.search-input::placeholder {
    color: var(--dim-gold);
    opacity: 0.7;
}

.search-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--dim-gold);
    font-size: 1.5rem;
    cursor: pointer;
    display: none;
    padding: 5px 10px;
    line-height: 1;
}

.search-clear:hover {
    color: var(--gold);
}

.search-clear:focus-visible {
    color: var(--gold);
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

.search-results {
    margin-top: 20px;
}

.search-loading,
.search-error,
.search-no-results {
    color: var(--dim-gold);
    text-align: center;
    padding: 20px;
    font-style: italic;
}

.search-count {
    color: var(--dim-gold);
    font-size: 0.85rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--dim-gold);
}

.search-result {
    display: block;
    border: 1px solid var(--dim-gold);
    background: var(--panel-bg);
    padding: 15px;
    margin-bottom: 10px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.search-result:hover {
    border-color: var(--gold);
    box-shadow: 0 0 10px rgba(255, 204, 51, 0.1);
}

.search-result:focus-visible {
    border-color: var(--gold);
    box-shadow: 0 0 0 2px rgba(255, 204, 51, 0.45);
    outline: none;
}

.search-result-title {
    color: var(--gold);
    font-weight: bold;
    margin-bottom: 8px;
}

.search-result:hover .search-result-title {
    text-shadow: 0 0 8px var(--gold);
}

.search-result-excerpt {
    color: var(--gold-muted);
    font-size: 0.9rem;
    opacity: 0.8;
    line-height: 1.5;
}

.search-result-excerpt mark {
    background: rgba(255, 204, 51, 0.3);
    color: var(--gold);
    padding: 1px 2px;
}

/* --- READING PROGRESS BAR --- */
.reading-progress-shell {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 16px;
    z-index: 9999;
    --reading-progress: 0;
    pointer-events: none;
}

.reading-progress {
    position: absolute;
    top: 0;
    left: 0;
    width: calc(var(--reading-progress, 0) * 100%);
    height: 100%;
    transition: width 0.12s ease-out;
}

/* --- READING META (time) --- */
.reading-meta {
    display: flex;
    gap: 20px;
    margin-top: 10px;
    font-size: 0.8rem;
    color: var(--dim-gold);
    font-family: 'SFMono-Regular', Consolas, monospace;
    letter-spacing: 1px;
}

.reading-time {
    opacity: 0.8;
}

/* --- UNDER CONSTRUCTION / REDACTED CONTENT --- */
.archive-redacted {
    border: 1px dashed var(--dim-gold);
    padding: 30px 20px;
    margin: 20px 0;
    text-align: center;
    background: rgba(255, 204, 51, 0.02);
}

.archive-redacted-icon {
    font-size: 2rem;
    margin-bottom: 15px;
    opacity: 0.6;
}

.archive-redacted-title {
    font-size: 0.9rem;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.archive-redacted-message {
    color: var(--dim-gold);
    font-size: 0.85rem;
    line-height: 1.6;
    max-width: 400px;
    margin: 0 auto;
    font-style: italic;
}

.archive-redacted-code {
    margin-top: 15px;
    font-family: 'SFMono-Regular', Consolas, monospace;
    font-size: 0.7rem;
    color: var(--dim-gold);
    opacity: 0.5;
}

/* --- TRANSMISSION INTERRUPTED (Preview End Cards) --- */
.transmission-interrupted {
    margin-top: 64px;
    margin-left: auto;
    margin-right: auto;
    padding: 36px clamp(20px, 4vw, 44px) 30px;
    border: 1px solid rgba(220, 176, 69, 0.45);
    background:
        radial-gradient(circle at 50% -20%, rgba(255, 204, 51, 0.08) 0%, rgba(255, 204, 51, 0) 60%),
        linear-gradient(180deg, rgba(9, 9, 9, 0.92) 0%, rgba(5, 5, 5, 0.95) 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow:
        inset 0 0 0 1px rgba(255, 204, 51, 0.08),
        0 14px 28px rgba(0, 0, 0, 0.35);
}

.page-library .transmission-interrupted,
.page-library .scan-nav,
.page-library .terminal-footer {
    max-width: var(--story-measure);
    margin-left: auto;
    margin-right: auto;
}

.page-library .document--verse .scan-nav,
.page-library .document--verse .terminal-footer,
.page-library .document--epigraph .scan-nav,
.page-library .document--epigraph .terminal-footer {
    max-width: min(100%, 38rem);
}

.transmission-interrupted::before {
    content: "";
    position: absolute;
    top: 10px;
    left: 22px;
    right: 22px;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 204, 51, 0.5) 16%, rgba(255, 204, 51, 0.5) 84%, transparent 100%);
}

.transmission-interrupted::after {
    content: "";
    position: absolute;
    inset: 8px;
    border: 1px solid rgba(115, 93, 33, 0.4);
    pointer-events: none;
}

.transmission-interrupted-icon {
    font-size: 1.45rem;
    margin-bottom: 12px;
    color: var(--gold-muted);
    opacity: 0.85;
    letter-spacing: 0.22em;
    line-height: 1;
}

.transmission-interrupted-title {
    font-family: var(--font-display);
    font-size: clamp(1rem, 2.1vw, 1.2rem);
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    margin-bottom: 12px;
    text-shadow: 0 0 8px rgba(255, 204, 51, 0.2);
    font-weight: 650;
}

.transmission-interrupted-message {
    color: var(--gold-muted);
    font-size: 1rem;
    line-height: 1.65;
    max-width: 42ch;
    margin: 0 auto 18px;
}

.transmission-interrupted-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.transmission-interrupted-cta {
    display: inline-block;
    margin-top: 10px;
    padding: 11px 24px;
    border: 1px solid rgba(255, 204, 51, 0.75);
    background: rgba(255, 204, 51, 0.06);
    color: var(--gold);
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.18em;
    font-family: var(--font-mono);
    transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    z-index: 1;
}

.transmission-interrupted-cta--primary {
    background: rgba(199, 168, 106, 0.14);
    color: var(--archive-paper);
}

.transmission-interrupted-cta:hover {
    background: rgba(255, 204, 51, 0.16);
    border-color: var(--gold);
    color: #ffe9a6;
    transform: translateY(-1px);
    box-shadow: 0 0 0 1px rgba(255, 204, 51, 0.18), 0 0 16px rgba(255, 204, 51, 0.22);
}

.transmission-interrupted-code {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px dotted rgba(115, 93, 33, 0.65);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--dim-gold);
    opacity: 0.7;
    letter-spacing: 0.08em;
}

/* --- AUDIO LOG / VIDEO EMBED --- */
.audio-log {
    margin: 30px 0;
    border: 1px solid var(--dim-gold);
    background: var(--panel-bg);
    position: relative;
}

.audio-log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid var(--dim-gold);
    background: rgba(255, 204, 51, 0.05);
}

.audio-log-label {
    font-family: 'SFMono-Regular', Consolas, monospace;
    font-size: 0.75rem;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.audio-log-label::before {
    content: "▶ ";
    animation: pulse-icon 2.8s ease-in-out infinite;
}

@keyframes pulse-icon {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

.audio-log-status {
    font-family: 'SFMono-Regular', Consolas, monospace;
    font-size: 0.65rem;
    color: var(--dim-gold);
    letter-spacing: 1px;
}

.audio-log-embed {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.audio-log-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.audio-log-actions {
    padding: 12px 15px;
    border-top: 1px dashed var(--dim-gold);
    border-bottom: 1px dashed var(--dim-gold);
    text-align: center;
    background: rgba(255, 204, 51, 0.03);
}

.audio-log-yt-btn {
    display: inline-block;
    border: 1px solid rgba(255, 204, 51, 0.75);
    padding: 9px 16px;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.68rem;
    font-family: var(--font-mono);
    background: rgba(255, 204, 51, 0.06);
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.audio-log-yt-btn:hover {
    background: rgba(255, 204, 51, 0.14);
    border-color: var(--gold);
    color: #ffe9a6;
}

.audio-log-footer {
    padding: 8px 15px;
    border-top: 1px solid var(--dim-gold);
    font-family: 'SFMono-Regular', Consolas, monospace;
    font-size: 0.65rem;
    color: var(--dim-gold);
    opacity: 0.6;
    display: flex;
    justify-content: space-between;
}

.audio-log-footer span:first-child::before {
    content: "// ";
}

.short-story-promo {
    margin-top: 28px;
    margin-bottom: 14px;
    padding: 16px 18px;
    border: 1px solid rgba(115, 93, 33, 0.7);
    background: linear-gradient(180deg, rgba(255, 204, 51, 0.06) 0%, rgba(255, 204, 51, 0.02) 100%);
    text-align: center;
}

.short-story-promo-label {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    color: var(--dim-gold);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.short-story-promo-link {
    display: inline-block;
    color: var(--gold);
    border: 1px solid rgba(255, 204, 51, 0.65);
    padding: 9px 16px;
    text-transform: uppercase;
    font-family: var(--font-mono);
    letter-spacing: 0.12em;
    font-size: 0.68rem;
    background: rgba(255, 204, 51, 0.06);
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.short-story-promo-link:hover {
    background: rgba(255, 204, 51, 0.16);
    border-color: var(--gold);
    color: #ffe9a6;
}

/* --- SIGNAL UPLINK (Newsletter Signup) --- */
.uplink-section {
    display: block !important;
    /* Override .nav-section flex */
    margin-top: 30px;
}

.uplink-section .nav-icon {
    display: none;
    /* Hide icon in expanded mode */
}

.signal-uplink {
    padding: 15px 0 0;
    border: none;
    background: transparent;
}

.signal-uplink-header {
    font-family: 'SFMono-Regular', Consolas, monospace;
    font-size: 0.8rem;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.signal-uplink-header::before {
    content: "◈ ";
    opacity: 0.7;
}

.signal-uplink-desc {
    font-size: 0.9rem;
    color: var(--dim-gold);
    line-height: 1.5;
    margin-bottom: 10px;
}

.signal-uplink-placeholder {
    display: flex;
    justify-content: space-between;
    font-family: 'SFMono-Regular', Consolas, monospace;
    font-size: 0.65rem;
    color: var(--dim-gold);
    opacity: 0.5;
    padding-top: 8px;
    border-top: 1px dotted var(--dim-gold);
}

.sidebar-email-link {
    display: inline-block;
    color: var(--gold-muted);
    text-decoration: none;
    border-bottom: 1px dotted var(--dim-gold);
    font-size: 0.92rem;
    line-height: 1.5;
}

.sidebar-email-link:hover {
    color: var(--gold);
    border-bottom-color: var(--gold);
}

/* When newsletter is active, this replaces the placeholder */
.signal-uplink-form input[type="email"] {
    width: 100%;
    padding: 8px 10px;
    background: var(--panel-bg);
    border: 1px solid var(--dim-gold);
    color: var(--gold-muted);
    font-family: 'SFMono-Regular', Consolas, monospace;
    font-size: 0.8rem;
    margin-bottom: 8px;
}

.signal-uplink-form input[type="email"]:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 5px rgba(255, 204, 51, 0.2);
}

.signal-uplink-form button {
    width: 100%;
    padding: 8px;
    background: rgba(255, 204, 51, 0.1);
    border: 1px solid var(--gold);
    color: var(--gold);
    font-family: 'SFMono-Regular', Consolas, monospace;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.signal-uplink-form button:hover {
    background: var(--gold);
    color: var(--bg);
}

/* --- CONTACT GRID (Uplink Hub) --- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 0;
    grid-template-areas:
        "email socials";
}

.contact-transmission {
    max-width: 860px;
    margin: 0 auto;
}

.contact-record-card {
    margin: 0 auto 28px;
}

.area-email {
    grid-area: email;
}

.area-socials {
    grid-area: socials;
}

.uplink-card {
    border: 1px solid rgba(91, 80, 56, 0.78);
    background:
        linear-gradient(180deg, rgba(137, 185, 189, 0.045), rgba(0, 0, 0, 0)),
        rgba(5, 6, 7, 0.66);
    display: flex;
    flex-direction: column;
    min-height: 100%;
    position: relative;
}

.uplink-header {
    padding: 13px 16px;
    border-bottom: 1px solid rgba(91, 80, 56, 0.72);
    font-family: var(--font-mono);
    color: var(--gold);
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    background: rgba(255, 204, 51, 0.025);
}

.uplink-status {
    color: var(--data-ghost);
    font-size: 0.62rem;
    letter-spacing: 0.12em;
    opacity: 0.78;
}

.card-body {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.vertical-space {
    justify-content: space-between;
}

.uplink-card p {
    margin: 0 0 10px 0;
    font-size: 1rem;
    color: var(--gold-muted);
    min-height: 0;
    line-height: 1.55;
}

.code-block {
    margin-top: 12px;
    padding: 12px 13px;
    border: 1px solid rgba(137, 185, 189, 0.18);
    background: rgba(0, 0, 0, 0.36);
    color: var(--archive-paper);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.03em;
    overflow-wrap: anywhere;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    margin-top: 18px;
    padding: 10px 18px;
    border: 1px solid rgba(199, 168, 106, 0.75);
    background: rgba(199, 168, 106, 0.07);
    color: var(--gold);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.action-btn:hover,
.action-btn:focus-visible {
    border-color: var(--gold);
    background: rgba(199, 168, 106, 0.14);
    color: var(--archive-paper);
    transform: translateY(-1px);
}

/* ... (skip) ... */

.freq-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid var(--dim-gold);
    padding: 10px;
    color: var(--gold-muted);
    text-decoration: none;
    transition: all 0.2s;
    margin-bottom: 10px;
    font-size: 0.85rem;
    /* Match code-block size */
}

.freq-link:hover:not(.disabled) {
    border-color: var(--gold);
    color: var(--gold);
    background: rgba(255, 204, 51, 0.05);
}

.freq-id {
    font-size: 0.7rem;
    opacity: 0.6;
    font-family: monospace;
    width: 60px;
}

.freq-name {
    font-weight: bold;
    flex-grow: 1;
}

.status-badge {
    font-size: 0.6rem;
    padding: 2px 5px;
    border: 1px solid #ff6b6b;
    color: #ff6b6b;
    opacity: 0.8;
}

.meta-note {
    margin-top: 15px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--dim-gold);
    opacity: 0.6;
}

/* --- COMM ARRAY (Social Grid) --- */
/* --- COMM ARRAY (Social Grid) --- */
.comm-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)) !important;
    justify-items: stretch !important;
    gap: 15px !important;
    margin-top: 15px !important;
}

/* Specificity fix: Ensure buttons override .prose a styles */
.prose .comm-btn,
.comm-btn {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    aspect-ratio: 1 !important;
    border: 1px solid var(--dim-gold) !important;
    border-bottom: 1px solid var(--dim-gold) !important;
    /* Forces reset of prose dotted border */
    background: rgba(0, 0, 0, 0.5) !important;
    text-decoration: none !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    overflow: hidden !important;
    padding: 15px !important;
    box-sizing: border-box !important;
    text-align: center !important;
}

.comm-btn:hover:not(.disabled) {
    border-color: var(--gold);
    background: rgba(255, 204, 51, 0.1);
    box-shadow: 0 0 15px rgba(255, 204, 51, 0.3);
    transform: translateY(-2px);
}

.comm-btn:focus-visible:not(.disabled) {
    border-color: var(--gold);
    background: rgba(255, 204, 51, 0.1);
    box-shadow: 0 0 0 2px rgba(255, 204, 51, 0.5);
    transform: translateY(-2px);
    outline: none;
}

.comm-icon {
    width: 32px;
    /* Slightly larger */
    height: 32px;
    flex-shrink: 0;
    /* Gold filter: converts any color to gold tint */
    filter: brightness(0) invert(78%) sepia(50%) saturate(600%) hue-rotate(5deg);
    opacity: 0.7;
    transition: all 0.3s;
    margin-bottom: 8px;
    display: block;
}

.comm-btn:hover:not(.disabled) .comm-icon {
    /* Remove filter to reveal original brand colors */
    filter: none;
    opacity: 1;
    transform: scale(1.15);
}

.comm-btn:focus-visible:not(.disabled) .comm-icon {
    filter: none;
    opacity: 1;
    transform: scale(1.15);
}

.comm-label {
    font-size: 0.6rem;
    color: var(--dim-gold);
    font-family: 'SFMono-Regular', Consolas, monospace;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 1px;
    width: 100%;
}

.comm-btn:hover:not(.disabled) .comm-label {
    color: var(--gold);
    opacity: 1;
}

.comm-btn:focus-visible:not(.disabled) .comm-label {
    color: var(--gold);
    opacity: 1;
}

/* Disabled/Inactive Frequencies */
.comm-btn.disabled {
    cursor: default;
    opacity: 0.4;
    filter: grayscale(1);
    border-style: dotted;
    border-color: rgba(212, 175, 55, 0.2);
}

.comm-btn.disabled:hover {
    transform: none;
    box-shadow: none;
    background: rgba(0, 0, 0, 0.5);
    border-color: rgba(212, 175, 55, 0.2);
}

.comm-btn.disabled .comm-icon {
    filter: brightness(0) invert(30%) sepia(50%) saturate(100%) hue-rotate(5deg);
}

.comm-void {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 0.5rem;
    color: #ff6b6b;
    border: 1px solid #ff6b6b;
    padding: 1px 3px;
    font-family: monospace;
    letter-spacing: 1px;
    opacity: 0.8;
}

@media (max-width: 400px) {
    .comm-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1100px) {
    .contact-grid {
        grid-template-areas:
            "email"
            "socials";
        grid-template-columns: 1fr !important;
    }
}

.page-about .sidebar .nav-section,
.page-about .sidebar .ledger-list {
    opacity: 0.9;
}

.sidebar-copyright {
    margin-top: 15px;
    font-size: 0.72rem;
    opacity: 0.68;
    line-height: 1.45;
}

.page-contact .comm-btn {
    aspect-ratio: auto !important;
    min-height: 92px !important;
    background: rgba(5, 6, 7, 0.58) !important;
}

.page-contact .comm-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

/* Author-first home */
.page-home .document {
    max-width: 980px;
    padding-top: clamp(18px, 4vh, 44px);
}

.page-home .document>header {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.author-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(210px, 0.48fr);
    gap: clamp(28px, 5vw, 64px);
    align-items: center;
    margin: 0 auto clamp(24px, 4vw, 42px);
    padding: clamp(8px, 1.5vw, 18px) 0 clamp(22px, 4vw, 44px);
    border-bottom: 1px solid rgba(91, 80, 56, 0.36);
}

.author-hero-copy {
    min-width: 0;
    max-width: 620px;
}

.author-hero-kicker {
    display: block;
    margin-bottom: 16px;
    color: rgba(137, 185, 189, 0.72);
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.author-hero h2 {
    margin: 0 0 20px;
    max-width: 10ch;
    text-align: left;
    color: var(--archive-paper);
    font-size: clamp(3rem, 7.2vw, 6.2rem);
    line-height: 0.9;
    letter-spacing: 0;
}

.author-hero-line {
    max-width: 34rem;
    margin: 0 0 28px;
    color: var(--gold);
    font-size: clamp(1.18rem, 2vw, 1.46rem);
    line-height: 1.42;
}

.author-hero-note {
    max-width: 38rem;
    margin: 0 0 14px;
    color: var(--archive-paper);
    font-size: 1rem;
    line-height: 1.68;
}

.author-hero-actions {
    display: inline-grid;
    margin-top: 12px;
    gap: 11px;
    align-items: start;
    max-width: min(100%, 26rem);
}

.author-primary-action,
.author-secondary-action {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-display);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.author-primary-action {
    position: relative;
    min-width: min(100%, 21rem);
    padding: 0 0 13px;
    border-bottom: 0 !important;
    color: var(--archive-paper);
    font-size: 0.96rem;
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
}

.author-primary-action::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: rgba(199, 168, 106, 0.58);
}

.author-primary-action::after {
    content: "\2192";
    margin-left: 12px;
    color: rgba(199, 168, 106, 0.82);
    font-family: var(--font-serif);
    font-size: 1.05rem;
    line-height: 1;
    transform: translateY(-1px);
    transition: color 0.2s ease, transform 0.2s ease;
}

.author-primary-action:hover {
    color: var(--gold);
    transform: translateX(3px);
}

.author-primary-action:hover::after {
    color: var(--gold);
    transform: translate(4px, -1px);
}

.author-secondary-action {
    width: fit-content;
    color: rgba(215, 207, 184, 0.54);
    font-size: 0.72rem;
    line-height: 1.4;
    text-decoration: none;
    border-bottom: 0 !important;
    transition: color 0.2s ease;
}

.author-secondary-action:hover {
    color: var(--gold);
    text-decoration-color: rgba(199, 168, 106, 0.72);
}

.book-cover-signal {
    position: relative;
    margin: 0;
    justify-self: end;
    width: min(100%, 260px);
    padding: 8px;
    border: 1px solid rgba(91, 80, 56, 0.54);
    background: rgba(5, 6, 7, 0.46);
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.28);
}

.book-cover-signal::before,
.book-cover-signal::after {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    border-color: rgba(137, 185, 189, 0.4);
    border-style: solid;
    pointer-events: none;
}

.book-cover-signal::before {
    top: -1px;
    left: -1px;
    border-width: 1px 0 0 1px;
}

.book-cover-signal::after {
    right: -1px;
    bottom: -1px;
    border-width: 0 1px 1px 0;
}

.book-cover-signal img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 5 / 8;
    object-fit: cover;
    border: 1px solid rgba(137, 185, 189, 0.2);
    filter: sepia(0.08) contrast(1.05) brightness(0.96);
}

.book-cover-signal figcaption {
    margin-top: 8px;
    color: rgba(137, 185, 189, 0.62);
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.12em;
    text-align: center;
    text-transform: uppercase;
}

.home-pathways {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(16px, 3vw, 28px);
    max-width: 680px;
}

.home-pathway {
    display: block;
    padding-top: 16px;
    border-top: 1px solid rgba(91, 80, 56, 0.54);
    border-bottom: 0 !important;
    text-decoration: none;
}

.home-pathway span {
    display: block;
    margin-bottom: 8px;
    color: rgba(137, 185, 189, 0.64);
    font-family: var(--font-mono);
    font-size: 0.64rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.home-pathway strong {
    display: block;
    color: var(--gold);
    font-family: var(--font-display);
    font-size: 1.02rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.home-pathway:hover {
    border-top-color: rgba(199, 168, 106, 0.78);
}

.home-pathway:hover strong {
    color: var(--archive-paper);
}

@media (max-width: 760px) {
    .page-home .document {
        padding-top: 8px;
    }

    .author-hero {
        grid-template-columns: 1fr;
        gap: 18px;
        padding-bottom: 26px;
    }

    .author-hero h2 {
        font-size: clamp(2.65rem, 13vw, 3.7rem);
    }

    .author-hero-line {
        margin-bottom: 22px;
    }

    .book-cover-signal {
        justify-self: center;
        width: min(44vw, 150px);
    }

    .home-pathways {
        grid-template-columns: 1fr;
    }

    .about-archive-profile {
        grid-template-columns: 1fr;
    }

    .author-photo--archive {
        position: relative;
        top: auto;
        max-width: 220px;
        margin: 0 auto;
    }

    .about-signal-grid {
        grid-template-columns: 1fr;
    }

    .about-cta-row {
        text-align: center;
    }

    .page-contact .comm-grid {
        grid-template-columns: 1fr !important;
    }
}

/* --- VISUAL DIRECTION PASS: FRACTURED ASTRONOMICAL ARCHIVE --- */
.logo,
.ledger-list li.active a,
.library-series-header h3,
.library-record-title,
.portal-action span,
.dossier-panel h2,
.prose .dossier-panel a,
.dossier-panel a,
.archive-card strong {
    text-shadow: none;
}

.ledger-list li.active a {
    border-left-color: var(--archive-rust);
    background: linear-gradient(to right, rgba(158, 76, 63, 0.12), transparent);
}

.sidebar.collapsed .ledger-list li a {
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border-left: 0;
    border-bottom: 1px solid rgba(91, 80, 56, 0.28);
    background: rgba(5, 6, 7, 0.22);
    box-sizing: border-box;
}

.sidebar.collapsed .ledger-list li.active a {
    border-left: 0;
    border-bottom-color: rgba(158, 76, 63, 0.74);
    background: rgba(158, 76, 63, 0.12);
}

.sidebar.collapsed .nav-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.sidebar.collapsed .nav-glyph {
    width: 22px;
    height: 22px;
    flex-basis: 22px;
}

.ledger-list li a:hover,
.scan-btn:hover,
.search-section .nav-label:hover,
.search-clear:hover,
.comm-btn:hover:not(.disabled) .comm-label {
    color: var(--archive-paper);
}

.home-portal,
.archive-index {
    position: relative;
}

.home-portal {
    padding: clamp(24px, 4vw, 42px) 0 clamp(24px, 4vw, 42px);
    border-top: 1px solid rgba(91, 80, 56, 0.54);
    border-bottom: 1px solid rgba(91, 80, 56, 0.38);
    overflow: hidden;
}

.portal-primary {
    color: var(--archive-paper);
    text-shadow: none;
}

.portal-copy p:not(.portal-primary),
.page-lede {
    color: rgba(184, 169, 130, 0.9);
}

.portal-actions {
    align-content: center;
}

.prose .portal-action,
.portal-action {
    min-height: 112px;
    padding: 18px 0 18px 22px;
    border: 0;
    border-left: 2px solid rgba(91, 80, 56, 0.82);
    border-bottom: 1px solid rgba(91, 80, 56, 0.34);
    background:
        linear-gradient(90deg, rgba(13, 18, 19, 0.72), rgba(13, 18, 19, 0.26) 70%, transparent),
        linear-gradient(180deg, rgba(215, 207, 184, 0.018), rgba(0, 0, 0, 0));
    position: relative;
    box-shadow: none;
}

.prose .portal-action::before,
.portal-action::before {
    content: "";
    position: absolute;
    top: 13px;
    left: -5px;
    width: 8px;
    height: 8px;
    border: 1px solid rgba(137, 185, 189, 0.45);
    background: var(--bg);
    transform: rotate(45deg);
}

.prose .portal-action:hover,
.portal-action:hover,
.prose .portal-action:focus-visible,
.portal-action:focus-visible {
    border-left-color: var(--archive-rust);
    border-bottom-color: rgba(137, 185, 189, 0.42);
    background-color: transparent;
    box-shadow: none;
    transform: translateX(4px);
}

.portal-action span,
.archive-card strong,
.library-series-header h3 {
    color: var(--archive-paper);
}

.portal-action strong,
.archive-card-kicker,
.archive-card span:last-child,
.library-series-header p,
.library-record-meta,
.dossier-label {
    color: rgba(137, 185, 189, 0.68);
}

.archive-dossier {
    gap: clamp(18px, 3vw, 30px);
}

.dossier-panel {
    border-top-color: rgba(137, 185, 189, 0.34);
    border-bottom-color: rgba(91, 80, 56, 0.38);
    position: relative;
}

.dossier-panel::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 0;
    width: 44px;
    height: 1px;
    background: var(--archive-rust);
}

.dossier-panel p,
.archive-card,
.library-series-card {
    color: var(--gold-muted);
}

.prose .archive-card,
.archive-card,
.library-series-card {
    border-color: rgba(91, 80, 56, 0.62);
    background:
        linear-gradient(135deg, rgba(215, 207, 184, 0.028) 0 1px, transparent 1px 24px),
        linear-gradient(180deg, rgba(13, 18, 19, 0.88), rgba(9, 10, 10, 0.86));
    box-shadow: inset 0 1px 0 rgba(215, 207, 184, 0.04);
    clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%);
}

.prose .archive-card:hover,
.archive-card:hover,
.prose .archive-card:focus-visible,
.archive-card:focus-visible {
    border-color: rgba(137, 185, 189, 0.48);
    border-bottom-color: rgba(137, 185, 189, 0.48);
    background-color: transparent;
    box-shadow: inset 0 1px 0 rgba(215, 207, 184, 0.08), 0 10px 24px var(--archive-shadow);
    transform: translateY(-1px);
}

.library-series-card {
    min-height: 224px;
    padding: 22px;
    position: relative;
}

.library-series-card::before {
    content: "";
    position: absolute;
    top: 0;
    right: 18px;
    width: 1px;
    height: 34px;
    background: rgba(137, 185, 189, 0.32);
}

.library-series-header {
    border-bottom-color: rgba(137, 185, 189, 0.24);
}

.library-record-list {
    counter-reset: library-record;
}

.library-record-list li {
    counter-increment: library-record;
}

.prose .library-record-list a,
.library-record-list a {
    border: 0;
    border-bottom: 1px solid rgba(91, 80, 56, 0.34);
    padding: 11px 0 11px 30px;
    background: transparent;
    position: relative;
}

.prose .library-record-list a::before,
.library-record-list a::before {
    content: attr(data-sequence);
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(158, 76, 63, 0.86);
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.05em;
}

.prose .library-record-list a:hover,
.library-record-list a:hover,
.prose .library-record-list a:focus-visible,
.library-record-list a:focus-visible {
    border-bottom-color: rgba(137, 185, 189, 0.5);
    background: linear-gradient(90deg, rgba(137, 185, 189, 0.055), transparent 72%);
}

.library-record-title {
    color: rgba(215, 207, 184, 0.94);
}

/* --- LIBRARY SERIES LANDING PAGES --- */
.series-landing {
    display: grid;
    gap: clamp(30px, 5vw, 54px);
}

.series-breadcrumb {
    display: flex;
    align-items: center;
    gap: 9px;
    color: rgba(137, 185, 189, 0.58);
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.prose .series-breadcrumb a,
.series-breadcrumb a {
    color: rgba(215, 207, 184, 0.82);
    border-bottom-color: rgba(137, 185, 189, 0.32);
}

.series-hero {
    min-height: clamp(420px, 62vw, 570px);
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(170px, 0.65fr);
    align-items: center;
    gap: clamp(28px, 5vw, 70px);
    padding: clamp(32px, 6vw, 72px);
    border-top: 1px solid rgba(137, 185, 189, 0.38);
    border-bottom: 1px solid rgba(91, 80, 56, 0.72);
    background: #070909;
    box-sizing: border-box;
    overflow: hidden;
    position: relative;
    isolation: isolate;
}

.series-hero::before,
.series-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.series-hero::before {
    z-index: -1;
    background:
        radial-gradient(circle at 78% 40%, rgba(137, 185, 189, 0.15), transparent 31%),
        linear-gradient(90deg, rgba(5, 7, 7, 0.98) 0%, rgba(5, 7, 7, 0.84) 48%, rgba(5, 7, 7, 0.34) 100%);
}

.series-hero::after {
    z-index: 3;
    inset: 12px;
    border: 1px solid rgba(137, 185, 189, 0.12);
    clip-path: polygon(0 0, calc(100% - 26px) 0, 100% 26px, 100% 100%, 0 100%);
}

.series-hero-visual {
    position: absolute;
    z-index: -2;
    inset: -4%;
    width: 108%;
    height: 108%;
    object-fit: cover;
    opacity: 0.56;
    filter: saturate(0.62) contrast(1.15) brightness(0.66);
}

.series-hero-copy,
.series-hero-art {
    position: relative;
    z-index: 2;
}

.series-hero-copy {
    max-width: 600px;
}

.series-hero-copy h1 {
    max-width: 9ch;
    margin: 15px 0 22px;
    color: var(--archive-paper);
    font-size: clamp(2.45rem, 6vw, 5.6rem);
    line-height: 0.96;
    letter-spacing: 0.035em;
    text-align: left;
    text-shadow: 0 8px 34px rgba(0, 0, 0, 0.78);
}

.prose .series-hero-lede,
.series-hero-lede {
    max-width: 48ch;
    margin: 0 0 18px;
    color: rgba(215, 207, 184, 0.9);
    font-size: clamp(1rem, 1.8vw, 1.22rem);
    line-height: 1.65;
}

.prose .series-hero-status,
.series-hero-status {
    max-width: 52ch;
    margin: 0 0 27px;
    color: rgba(137, 185, 189, 0.72);
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    line-height: 1.55;
    text-transform: uppercase;
}

.prose .series-primary-action,
.series-primary-action {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    padding: 0 22px;
    border: 1px solid rgba(199, 168, 106, 0.78);
    color: var(--archive-paper);
    background: rgba(158, 76, 63, 0.14);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.prose .series-primary-action:hover,
.prose .series-primary-action:focus-visible,
.series-primary-action:hover,
.series-primary-action:focus-visible {
    border-color: var(--archive-paper);
    background: rgba(158, 76, 63, 0.28);
    color: #fff;
    transform: translateY(-2px);
}

.series-hero-art {
    width: min(100%, 250px);
    margin: 0 auto;
}

.series-hero-art img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid rgba(199, 168, 106, 0.46);
    box-shadow: 18px 26px 54px rgba(0, 0, 0, 0.6);
    transform: rotate(1.4deg);
}

.series-hero-art--sigil {
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border: 1px solid rgba(137, 185, 189, 0.28);
    border-radius: 50%;
    color: rgba(215, 207, 184, 0.72);
    box-shadow:
        0 0 0 18px rgba(137, 185, 189, 0.025),
        0 0 70px rgba(137, 185, 189, 0.12);
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 8vw, 5.4rem);
    letter-spacing: 0.08em;
}

.series-hero-art--sigil::before,
.series-hero-art--sigil::after {
    content: "";
    position: absolute;
    inset: 12%;
    border: 1px dotted rgba(199, 168, 106, 0.28);
    border-radius: 50%;
}

.series-hero-art--sigil::after {
    inset: 26%;
    border-style: solid;
    border-color: rgba(158, 76, 63, 0.38);
}

.series-records {
    padding: clamp(8px, 2vw, 18px) 0;
    border-top: 1px solid rgba(91, 80, 56, 0.64);
    border-bottom: 1px solid rgba(91, 80, 56, 0.46);
}

.series-record-list a {
    min-height: 46px;
    box-sizing: border-box;
}

.series-footer-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 30px;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.prose .series-footer-actions a,
.series-footer-actions a {
    color: rgba(215, 207, 184, 0.8);
    border-bottom-color: rgba(137, 185, 189, 0.34);
}

.access-notice {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    margin: 0 auto 2.4rem;
    padding: 18px 22px 18px 26px;
    border: 1px solid rgba(91, 80, 56, 0.72);
    border-left: 3px solid rgba(158, 76, 63, 0.9);
    background:
        linear-gradient(90deg, rgba(158, 76, 63, 0.14), transparent 38%),
        linear-gradient(135deg, rgba(137, 185, 189, 0.05) 0 1px, transparent 1px 18px),
        rgba(5, 6, 7, 0.62);
    box-shadow:
        inset 0 1px 0 rgba(215, 207, 184, 0.05),
        0 16px 32px rgba(0, 0, 0, 0.2);
    clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%);
    color: var(--gold-muted);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.11em;
    line-height: 1.5;
    position: relative;
    text-transform: uppercase;
}

.access-notice::before {
    content: "";
    position: absolute;
    top: 14px;
    right: 16px;
    width: 8px;
    height: 8px;
    border: 1px solid rgba(137, 185, 189, 0.58);
    transform: rotate(45deg);
}

.access-notice::after {
    content: "NV//VOCEM//PUBLIC-RELEASE";
    position: absolute;
    right: 22px;
    bottom: 12px;
    color: rgba(137, 185, 189, 0.42);
    font-size: 0.58rem;
    letter-spacing: 0.16em;
}

.access-notice-kicker {
    color: rgba(137, 185, 189, 0.74);
    font-size: 0.62rem;
    letter-spacing: 0.22em;
}

.access-notice strong {
    color: var(--archive-paper);
    font-family: var(--font-display);
    font-size: clamp(0.98rem, 2vw, 1.18rem);
    font-weight: 700;
    letter-spacing: 0.12em;
    line-height: 1.25;
}

.sidebar-toggle {
    border-color: rgba(91, 80, 56, 0.86);
    background: rgba(5, 6, 7, 0.92);
    box-shadow: none;
}

.sidebar-toggle:hover {
    background: rgba(137, 185, 189, 0.12);
    box-shadow: none;
}

.sidebar-toggle .hamburger {
    border-color: transparent var(--gold-muted) transparent transparent;
}

.sidebar-toggle:hover .hamburger {
    border-right-color: var(--archive-paper);
}

.scan-btn,
.transmission-interrupted-cta,
.short-story-promo-link,
.audio-log-yt-btn,
.signal-uplink-form button,
.comm-btn {
    box-shadow: none !important;
}

.scan-btn:hover,
.transmission-interrupted-cta:hover,
.short-story-promo-link:hover,
.audio-log-yt-btn:hover,
.signal-uplink-form button:hover,
.comm-btn:hover:not(.disabled) {
    box-shadow: none !important;
}

.reading-progress-shell {
    isolation: isolate;
    overflow: visible;
}

.reading-progress-shell::before,
.reading-progress-shell::after,
.reading-progress::before,
.reading-progress__canvas,
.reading-progress__texture,
.reading-progress__particles,
.reading-progress__head {
    content: "";
    position: absolute;
    pointer-events: none;
}

.reading-progress-shell::before,
.reading-progress-shell::after {
    left: 0;
    right: 0;
}

.reading-progress-shell::before {
    z-index: 0;
}

.reading-progress-shell::after {
    z-index: 1;
}

.reading-progress {
    z-index: 2;
    overflow: visible;
}

.reading-progress__canvas {
    inset: 0;
    z-index: 5;
    display: none;
    width: 100%;
    height: 100%;
}

.reading-progress::before {
    z-index: 3;
}

.reading-progress__texture {
    inset: 0;
    z-index: 1;
}

.reading-progress__particles {
    z-index: 2;
}

.reading-progress__head {
    z-index: 3;
}

html[data-progress-concept="void"] .reading-progress-shell {
    height: 22px;
}

html[data-progress-concept="void"] .reading-progress__canvas,
html[data-progress-concept="signal"] .reading-progress__canvas {
    display: block;
}

html[data-progress-concept="void"] .reading-progress,
html[data-progress-concept="void"] .reading-progress-shell::before,
html[data-progress-concept="void"] .reading-progress-shell::after {
    opacity: 0;
}

html[data-progress-concept="void"] .reading-progress-shell::before {
    top: 0;
    height: 18px;
    background:
        linear-gradient(180deg, rgba(215, 207, 184, 0.08), transparent 42%),
        linear-gradient(90deg, rgba(3, 4, 4, 0.95), rgba(22, 22, 19, 0.82) 48%, rgba(3, 4, 4, 0.95));
    opacity: 0.76;
}

html[data-progress-concept="void"] .reading-progress-shell::after {
    top: 9px;
    height: 1px;
    background: linear-gradient(90deg, rgba(215, 207, 184, 0.05), rgba(215, 207, 184, 0.18), rgba(215, 207, 184, 0.05));
    box-shadow: 0 1px 12px rgba(0, 0, 0, 0.74);
}

html[data-progress-concept="void"] .reading-progress {
    top: 7px;
    height: 5px;
    background:
        linear-gradient(180deg, rgba(215, 207, 184, 0.32), rgba(199, 168, 106, 0.1) 42%, rgba(0, 0, 0, 0)),
        linear-gradient(90deg, rgba(2, 3, 3, 0.16), rgba(26, 26, 22, 0.76) 48%, rgba(97, 91, 73, 0.82) 82%, rgba(215, 207, 184, 0.8) 96%, rgba(199, 168, 106, 0.92));
    box-shadow:
        0 0 14px rgba(215, 207, 184, 0.1),
        0 1px 0 rgba(199, 168, 106, 0.2);
}

html[data-progress-concept="void"] .reading-progress::before {
    top: 2px;
    left: 0;
    right: -30px;
    height: 1px;
    background: linear-gradient(90deg, rgba(14, 14, 12, 0.08), rgba(184, 169, 130, 0.42) 68%, rgba(215, 207, 184, 0.95) 93%, rgba(199, 168, 106, 0.78));
    box-shadow: 0 0 8px rgba(215, 207, 184, 0.22);
}

html[data-progress-concept="void"] .reading-progress__texture {
    background:
        radial-gradient(circle at 20% 50%, rgba(158, 76, 63, 0.3) 0 1px, transparent 1.4px),
        radial-gradient(circle at 63% 43%, rgba(215, 207, 184, 0.4) 0 1px, transparent 1.5px),
        radial-gradient(circle at 81% 62%, rgba(199, 168, 106, 0.32) 0 0.9px, transparent 1.3px),
        radial-gradient(circle at 34% 24%, rgba(215, 207, 184, 0.22) 0 0.8px, transparent 1.2px),
        linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.22) 52%, rgba(215, 207, 184, 0.2));
    background-size: 137px 5px, 193px 5px, 89px 5px, 241px 5px, 100% 100%;
    mix-blend-mode: screen;
    opacity: 0.84;
}

html[data-progress-concept="void"] .reading-progress__particles {
    top: -16px;
    right: -14px;
    width: 190px;
    height: 38px;
    background:
        radial-gradient(circle at 7% 59%, rgba(215, 207, 184, 0.34) 0 1.1px, transparent 2.1px),
        radial-gradient(circle at 15% 32%, rgba(199, 168, 106, 0.44) 0 1.2px, transparent 2.2px),
        radial-gradient(circle at 21% 76%, rgba(215, 207, 184, 0.32) 0 1px, transparent 2px),
        radial-gradient(circle at 30% 47%, rgba(158, 76, 63, 0.42) 0 1.1px, transparent 2.1px),
        radial-gradient(circle at 38% 22%, rgba(215, 207, 184, 0.42) 0 1px, transparent 2px),
        radial-gradient(circle at 47% 70%, rgba(199, 168, 106, 0.38) 0 1.2px, transparent 2.3px),
        radial-gradient(circle at 55% 43%, rgba(215, 207, 184, 0.62) 0 1.5px, transparent 2.7px),
        radial-gradient(circle at 63% 60%, rgba(215, 207, 184, 0.42) 0 1.1px, transparent 2.2px),
        radial-gradient(circle at 71% 31%, rgba(199, 168, 106, 0.52) 0 1.4px, transparent 2.6px),
        radial-gradient(circle at 79% 68%, rgba(215, 207, 184, 0.38) 0 1px, transparent 2.1px),
        radial-gradient(circle at 87% 44%, rgba(158, 76, 63, 0.42) 0 1.2px, transparent 2.4px),
        radial-gradient(circle at 94% 57%, rgba(215, 207, 184, 0.44) 0 1px, transparent 2px),
        linear-gradient(90deg, transparent, rgba(215, 207, 184, 0.1) 42%, rgba(215, 207, 184, 0.22) 66%, transparent 88%);
    filter: drop-shadow(0 0 7px rgba(215, 207, 184, 0.3));
    mix-blend-mode: screen;
    opacity: 1;
}

html[data-progress-concept="void"] .reading-progress__head {
    top: -8px;
    right: -44px;
    width: 90px;
    height: 20px;
    background:
        radial-gradient(circle at 53% 50%, rgba(215, 207, 184, 0.22) 0 1px, transparent 1.8px),
        radial-gradient(circle at 41% 38%, rgba(199, 168, 106, 0.18) 0 1px, transparent 1.6px),
        radial-gradient(ellipse at 50% 50%, rgba(215, 207, 184, 0.58), transparent 58%),
        linear-gradient(90deg, transparent, rgba(215, 207, 184, 0.18) 28%, rgba(215, 207, 184, 0.96) 50%, rgba(199, 168, 106, 0.42) 66%, transparent 86%);
    background-size: 37px 20px, 53px 20px, 100% 100%, 100% 100%;
    filter: blur(0.15px);
    opacity: 0.86;
}

html[data-progress-concept="signal"] .reading-progress__particles {
    display: none;
}

html[data-progress-concept="signal"] .reading-progress-shell {
    height: 17px;
}

html[data-progress-concept="signal"] .reading-progress {
    opacity: 0;
}

html[data-progress-concept="signal"] .reading-progress-shell::before {
    top: 0;
    height: 14px;
    background:
        linear-gradient(180deg, rgba(137, 185, 189, 0.08), rgba(9, 10, 10, 0.02) 56%, transparent);
    opacity: 0.46;
}

html[data-progress-concept="signal"] .reading-progress-shell::after {
    top: 8px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(137, 185, 189, 0.12), transparent);
}

html[data-progress-concept="signal"] .reading-progress {
    top: 5px;
    height: 5px;
    background:
        repeating-linear-gradient(90deg, rgba(137, 185, 189, 0.82) 0 5px, rgba(137, 185, 189, 0.18) 5px 7px, transparent 7px 18px, rgba(199, 168, 106, 0.62) 18px 19px, transparent 19px 43px),
        repeating-linear-gradient(90deg, transparent 0 13px, rgba(137, 185, 189, 0.62) 13px 20px, transparent 20px 57px),
        repeating-linear-gradient(90deg, rgba(4, 7, 7, 0.54) 0 2px, transparent 2px 29px, rgba(4, 7, 7, 0.42) 29px 31px, transparent 31px 73px),
        linear-gradient(180deg, rgba(215, 207, 184, 0.2), rgba(137, 185, 189, 0.62) 48%, rgba(4, 7, 7, 0.1));
    background-position: 0 0, 19px 0, 7px 0, 0 0;
    background-blend-mode: screen, screen, multiply, normal;
    box-shadow:
        0 0 11px rgba(137, 185, 189, 0.1),
        0 0 1px rgba(137, 185, 189, 0.42);
}

html[data-progress-concept="signal"] .reading-progress__texture {
    background:
        radial-gradient(circle at 12% 55%, rgba(215, 207, 184, 0.45) 0 1px, transparent 1.4px),
        radial-gradient(circle at 52% 38%, rgba(158, 76, 63, 0.36) 0 1px, transparent 1.4px),
        radial-gradient(circle at 71% 62%, rgba(137, 185, 189, 0.36) 0 0.8px, transparent 1.2px),
        repeating-linear-gradient(90deg, transparent 0 17px, rgba(9, 10, 10, 0.44) 17px 19px, transparent 19px 83px);
    background-size: 179px 5px, 251px 5px, 107px 5px, 100% 100%;
    opacity: 0.78;
}

html[data-progress-concept="signal"] .reading-progress__head {
    top: -5px;
    right: -34px;
    width: 68px;
    height: 15px;
    background:
        radial-gradient(ellipse at 52% 50%, rgba(137, 185, 189, 0.78), transparent 54%),
        linear-gradient(90deg, transparent, rgba(137, 185, 189, 0.16) 26%, rgba(215, 207, 184, 0.72) 52%, rgba(137, 185, 189, 0.28) 66%, transparent 88%);
    animation: signal-lock-pulse 2.6s ease-in-out infinite;
}

.progress-concept-switcher {
    position: fixed;
    right: 18px;
    top: 30px;
    z-index: 10000;
    display: block;
    box-sizing: border-box;
    padding: 2px;
    border: 1px solid rgba(91, 80, 56, 0.5);
    border-radius: 999px;
    background: rgba(3, 4, 4, 0.72);
    backdrop-filter: blur(8px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.24);
}

.progress-concept-switcher button {
    appearance: none;
    position: relative;
    display: block;
    width: 42px;
    height: 22px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background:
        linear-gradient(90deg, rgba(199, 168, 106, 0.2), rgba(137, 185, 189, 0.18)),
        rgba(9, 10, 10, 0.8);
    color: transparent;
    cursor: pointer;
    font-size: 0;
    letter-spacing: 0;
    line-height: 0;
    box-shadow: inset 0 0 0 1px rgba(215, 207, 184, 0.08);
}

.progress-concept-switcher button::before,
.progress-concept-switcher button::after {
    content: "";
    position: absolute;
    pointer-events: none;
}

.progress-concept-switcher button::before {
    top: 4px;
    left: 4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 50%, rgba(255, 246, 222, 0.92), rgba(199, 168, 106, 0.86) 48%, rgba(91, 80, 56, 0.62));
    box-shadow:
        0 0 9px rgba(199, 168, 106, 0.34),
        0 0 1px rgba(255, 246, 222, 0.8);
    transition:
        transform 0.18s ease,
        background 0.18s ease,
        box-shadow 0.18s ease;
}

.progress-concept-switcher button::after {
    top: 10px;
    right: 6px;
    width: 13px;
    height: 2px;
    background:
        linear-gradient(90deg, rgba(137, 185, 189, 0.18), rgba(137, 185, 189, 0.62));
    box-shadow:
        -17px 0 0 rgba(199, 168, 106, 0.38),
        0 0 7px rgba(137, 185, 189, 0.18);
    opacity: 0.72;
}

.progress-concept-switcher button:hover,
.progress-concept-switcher button:focus-visible {
    background:
        linear-gradient(90deg, rgba(199, 168, 106, 0.27), rgba(137, 185, 189, 0.24)),
        rgba(9, 10, 10, 0.86);
    outline: none;
}

.progress-concept-switcher button:focus-visible {
    box-shadow:
        inset 0 0 0 1px rgba(215, 207, 184, 0.16),
        0 0 0 2px rgba(199, 168, 106, 0.22);
}

html[data-progress-concept="signal"] .progress-concept-switcher {
    border-color: rgba(137, 185, 189, 0.5);
}

html[data-progress-concept="signal"] .progress-concept-switcher button::before {
    transform: translateX(20px);
    background:
        radial-gradient(circle at 50% 50%, rgba(215, 242, 241, 0.92), rgba(137, 185, 189, 0.86) 48%, rgba(30, 55, 57, 0.72));
    box-shadow:
        0 0 9px rgba(137, 185, 189, 0.42),
        0 0 1px rgba(215, 242, 241, 0.8);
}

html[data-progress-concept="signal"] .progress-concept-switcher button::after {
    left: 6px;
    right: auto;
    background:
        repeating-linear-gradient(90deg, rgba(199, 168, 106, 0.6) 0 2px, transparent 2px 4px, rgba(199, 168, 106, 0.42) 4px 6px);
    box-shadow:
        17px 0 0 rgba(137, 185, 189, 0.36),
        0 0 7px rgba(199, 168, 106, 0.16);
}

@keyframes signal-lock-pulse {
    0%,
    100% {
        opacity: 0.58;
        transform: translateX(-1px) scaleX(0.92);
    }

    50% {
        opacity: 1;
        transform: translateX(1px) scaleX(1.04);
    }
}

@media (max-width: 900px) {
    .progress-concept-switcher {
        right: 8px;
        top: 15px;
    }
}

@media (max-width: 380px) {
    .progress-concept-switcher {
        right: 6px;
    }
}

.page-home .author-hero-actions .portal-action {
    min-height: 86px;
    padding-top: 14px;
    padding-bottom: 14px;
}
