/* =============================================================
   DIGITAL TELOMERE — Vol. I, No. 4
   Light-academia dossier on chrome-metallic & paper-aged stock.
   Palette: chrome-metallic on aged paper.
   ============================================================= */

:root {
    /* Palette (from DESIGN.md) */
    --parchment-ivory: #ECE6D6;
    --foxed-cream:     #D8CFB7;
    --iron-gall-ink:   #1F1B16;
    --gunmetal:        #3A3D44;
    --chrome-mid:      #A8B0B6;
    --chrome-highlight:#E8ECEE;
    --chrome-shadow:   #5C6671;
    --graphite-blue:   #2C4A6E;
    --manuscript-red:  #8A1C1C;

    /* Type */
    --font-mono: "JetBrains Mono", ui-monospace, monospace;
    --font-serif: "Cormorant Garamond", "Lora", Georgia, serif;
    --font-quote: "Space Mono", "JetBrains Mono", monospace;
    --font-hand:  "Caveat", "Bradley Hand", cursive;

    /* Scale */
    --base-size: 1.0625rem;     /* ~17px */
    --line-height: 1.55;
    --measure: 62ch;

    /* Cursor proximity (rAF-driven) */
    --cursor-x: 50%;
    --cursor-y: 50%;
    --cursor-angle: 0deg;

    /* Scroll-driven counter strip */
    --rail-shift: 0px;

    /* Page tilt per section */
    --section-tilt: 0deg;
}

/* ----- Reset ----- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

html {
    font-size: 100%;
    background: var(--parchment-ivory);
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-serif);
    font-size: var(--base-size);
    line-height: var(--line-height);
    color: var(--iron-gall-ink);
    background: var(--parchment-ivory);
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
    cursor: default;
}

.defs-svg {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
    pointer-events: none;
}

/* =============================================================
   PAPER SUBSTRATE — fixed parchment + foxing corners
   ============================================================= */
.paper-substrate {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.paper-fill {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: var(--parchment-ivory);
}

.foxing-corner {
    position: absolute;
    width: 38vmin;
    height: 38vmin;
    pointer-events: none;
    opacity: 0.55;
    mix-blend-mode: multiply;
}

.foxing-tl {
    top: 0;
    left: 0;
    background: radial-gradient(circle at 18% 22%,
        rgba(138, 110, 60, 0.32) 0%,
        rgba(138, 110, 60, 0.18) 18%,
        rgba(138, 110, 60, 0.06) 38%,
        transparent 62%);
}

.foxing-br {
    bottom: 0;
    right: 0;
    background: radial-gradient(circle at 78% 78%,
        rgba(120, 90, 50, 0.28) 0%,
        rgba(120, 90, 50, 0.14) 18%,
        rgba(120, 90, 50, 0.05) 38%,
        transparent 62%);
}

/* =============================================================
   TOP BAR — department mark + chrome dot
   ============================================================= */
.top-bar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 1.6rem;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 50;
    background: linear-gradient(to bottom,
        rgba(236, 230, 214, 0.92),
        rgba(236, 230, 214, 0.0));
    backdrop-filter: blur(0.6px);
    pointer-events: none;
}

.dept-mark {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.62rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gunmetal);
    display: flex;
    align-items: center;
    gap: 0.4em;
    pointer-events: auto;
}

.dept-mark-glyph {
    color: var(--manuscript-red);
    font-size: 0.5rem;
    transform: translateY(-1px);
}

.dept-mark.fading { opacity: 0.32; transition: opacity 1200ms ease-out; }

/* ----- Chrome Dot ----- */
.chrome-dot {
    position: relative;
    width: 14px;
    height: 14px;
    border: 0;
    padding: 0;
    background: transparent;
    cursor: pointer;
    pointer-events: auto;
    border-radius: 50%;
    isolation: isolate;
}

.chrome-dot-core {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background:
        conic-gradient(from var(--cursor-angle),
            var(--chrome-highlight) 0deg,
            var(--chrome-mid) 110deg,
            var(--chrome-shadow) 200deg,
            var(--chrome-mid) 290deg,
            var(--chrome-highlight) 360deg);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.7),
        inset 0 -1px 0 rgba(40, 50, 60, 0.4),
        0 0 0 1px rgba(58, 61, 68, 0.4);
    z-index: 2;
}

.chrome-dot-halo {
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    background: radial-gradient(circle,
        rgba(168, 176, 182, 0.28) 0%,
        rgba(168, 176, 182, 0.0) 70%);
    animation: chrome-pulse 2.5s ease-in-out infinite;
    z-index: 1;
}

.chrome-dot.slow .chrome-dot-halo { animation-duration: 4.2s; }
.chrome-dot.stopped .chrome-dot-halo { animation: none; opacity: 0.18; }

@keyframes chrome-pulse {
    0%, 100% { transform: scale(0.85); opacity: 0.45; }
    50%      { transform: scale(1.25); opacity: 0.78; }
}

/* ----- Anchor Sheet (fold-out) ----- */
.anchor-sheet {
    position: fixed;
    top: 2.4rem;
    right: 1.2rem;
    width: 280px;
    transform: translateY(-12px) scaleY(0.0);
    transform-origin: top right;
    opacity: 0;
    transition:
        transform 360ms cubic-bezier(.22,.85,.32,1),
        opacity 220ms ease-out;
    z-index: 49;
    pointer-events: none;
}

.anchor-sheet.open {
    transform: translateY(0) scaleY(1);
    opacity: 1;
    pointer-events: auto;
}

.anchor-sheet-inner {
    position: relative;
    background: var(--foxed-cream);
    border: 1px solid var(--gunmetal);
    border-radius: 1px;
    padding: 1.1rem 1.2rem 0.9rem;
    box-shadow:
        0 12px 28px -10px rgba(31, 27, 22, 0.35),
        0 2px 0 rgba(31, 27, 22, 0.12);
    background-image:
        linear-gradient(180deg, rgba(216, 207, 183, 0.6), rgba(216, 207, 183, 0.95)),
        repeating-linear-gradient(0deg,
            transparent 0,
            transparent 18px,
            rgba(58, 61, 68, 0.05) 18px,
            rgba(58, 61, 68, 0.05) 19px);
}

.anchor-sheet-stamp {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.62rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gunmetal);
    border-bottom: 1px solid var(--gunmetal);
    padding-bottom: 0.5rem;
    margin-bottom: 0.7rem;
}

.anchor-list {
    list-style: none;
    padding: 0;
    margin: 0 0 0.5rem;
}

.anchor-list li {
    margin: 0.2rem 0;
}

.anchor-list a {
    display: flex;
    align-items: baseline;
    gap: 0.6em;
    text-decoration: none;
    color: var(--iron-gall-ink);
    font-family: var(--font-serif);
    font-size: 1.05rem;
    padding: 0.18rem 0.2rem;
    transition: color 200ms ease, transform 220ms ease;
}

.anchor-list a:hover {
    color: var(--graphite-blue);
    transform: translateX(2px);
}

.anchor-num {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--gunmetal);
    min-width: 1.8em;
}

.anchor-label { font-style: italic; }

.anchor-sheet-foot {
    font-family: var(--font-hand);
    color: var(--graphite-blue);
    font-size: 0.95rem;
    text-align: right;
    border-top: 1px dotted var(--gunmetal);
    padding-top: 0.4rem;
    margin-top: 0.4rem;
}

/* =============================================================
   FOLIO LAYOUT — single column on a hairline-ruled page
   ============================================================= */
.folio {
    position: relative;
    z-index: 2;
    padding: 4.6rem 1.5rem 12vh;
    max-width: 100%;
}

.gathering {
    position: relative;
    max-width: var(--measure);
    margin: 0 auto;
    padding: 6rem 0 9rem;
    transform: rotate(var(--section-tilt));
    transition: transform 700ms cubic-bezier(.22,.85,.32,1);
}

.gathering.tilted { --section-tilt: -0.6deg; }

.page-number {
    position: absolute;
    left: -9rem;
    top: 6.4rem;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: var(--gunmetal);
    opacity: 0.7;
    text-transform: uppercase;
}

@media (max-width: 1100px) {
    .page-number { left: 0; top: 1rem; }
}

/* ----- Title plate (front) ----- */
.title-plate {
    position: relative;
    margin: 1rem 0 3rem;
    padding: 2.2rem 2rem 1.6rem;
    transform: rotate(-0.3deg);
}

.title-plate-paper {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: visible;
}

.title-plate-bg {
    fill: var(--foxed-cream);
    filter: drop-shadow(0 3px 0 rgba(31, 27, 22, 0.08))
            drop-shadow(0 6px 14px rgba(31, 27, 22, 0.18));
}

.title-plate-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.title-plate-eyebrow {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.6rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--manuscript-red);
    margin-bottom: 0.6rem;
}

.title-plate-headline {
    font-family: var(--font-mono);
    font-size: 2.75rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--iron-gall-ink);
    line-height: 1.18;
    margin: 0 0 0.8rem;
    display: inline-flex;
    align-items: baseline;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.05em;
}

.typed-text {
    display: inline-block;
    white-space: pre-wrap;
}

.typed-caret {
    display: inline-block;
    color: var(--manuscript-red);
    animation: caret-blink 1.05s steps(1) infinite;
    margin-left: 0.05em;
    transform: translateY(-0.06em);
}

@keyframes caret-blink {
    0%, 49%   { opacity: 1; }
    50%, 100% { opacity: 0; }
}

.title-plate-byline {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 500;
    color: var(--gunmetal);
    font-size: 1.05rem;
    max-width: 36em;
    margin: 0 auto;
}

/* ----- Chrome rule (guillotine edge) ----- */
.chrome-rule {
    position: relative;
    height: 5px;
    margin-top: 1.1rem;
    background:
        linear-gradient(165deg,
            var(--chrome-highlight) 0%,
            var(--chrome-mid) 52%,
            var(--chrome-shadow) 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.85),
        inset 0 -1px 0 rgba(40, 50, 60, 0.5),
        0 1px 0 rgba(31, 27, 22, 0.1);
}

.chrome-rule::after {
    content: "";
    position: absolute;
    left: 0; right: 0;
    top: 1px;
    height: 1px;
    background: rgba(255, 255, 255, 0.55);
}

.chrome-rule-thin { height: 3px; }

/* ----- Front-plate kicker ----- */
.kicker {
    text-align: center;
    font-family: var(--font-serif);
    font-style: italic;
    color: var(--gunmetal);
    font-size: 1.18rem;
    max-width: 36em;
    margin: 2.6rem auto 0;
    line-height: 1.5;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 720ms ease-out, transform 720ms ease-out;
}

.gathering.in-view .kicker { opacity: 1; transform: translateY(0); }

/* =============================================================
   SECTION PLATES (II–V)
   ============================================================= */
.section-plate {
    position: relative;
    margin-bottom: 2.4rem;
    transform: rotate(-0.4deg);
}

.section-plate-paper {
    display: inline-block;
    background: var(--foxed-cream);
    padding: 0.8rem 1.4rem 0.7rem;
    position: relative;
    box-shadow:
        0 2px 0 rgba(31, 27, 22, 0.08),
        0 6px 14px -4px rgba(31, 27, 22, 0.18);
    clip-path: polygon(
        0% 8%, 1% 0%, 18% 4%, 32% 0%, 48% 5%, 64% 1%,
        82% 4%, 96% 0%, 100% 6%,
        99% 92%, 100% 100%, 84% 96%, 70% 100%, 54% 95%,
        38% 99%, 22% 96%, 6% 100%, 0% 94%
    );
}

.section-plate-tag {
    display: block;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.62rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--manuscript-red);
    margin-bottom: 0.25rem;
}

.section-plate-title {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1.85rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--iron-gall-ink);
    margin: 0;
    line-height: 1.05;
}

/* =============================================================
   PROSE COLUMN
   ============================================================= */
.prose {
    position: relative;
}

.prose-line {
    margin: 0 0 1.2rem;
    font-family: var(--font-serif);
    font-size: var(--base-size);
    line-height: var(--line-height);
    color: var(--iron-gall-ink);
    position: relative;
    opacity: 0;
    transform: translateY(4px);
    transition:
        opacity 380ms ease-out,
        transform 380ms ease-out,
        filter 600ms cubic-bezier(.4,.0,.2,1),
        color 600ms ease;
}

.gathering.in-view .prose-line { opacity: 1; transform: translateY(0); }

.gathering.in-view .prose-line:nth-child(1) { transition-delay: 60ms; }
.gathering.in-view .prose-line:nth-child(2) { transition-delay: 280ms; }
.gathering.in-view .prose-line:nth-child(3) { transition-delay: 500ms; }
.gathering.in-view .prose-line:nth-child(4) { transition-delay: 720ms; }
.gathering.in-view .prose-line:nth-child(5) { transition-delay: 940ms; }
.gathering.in-view .prose-line:nth-child(6) { transition-delay: 1160ms; }
.gathering.in-view .prose-line:nth-child(7) { transition-delay: 1380ms; }

.prose-line.lead { font-size: 1.12rem; }

.dropcap {
    font-family: var(--font-serif);
    font-weight: 600;
    font-size: 3.4em;
    line-height: 0.86;
    float: left;
    padding: 0.06em 0.12em 0 0;
    color: var(--iron-gall-ink);
    font-feature-settings: "swsh" on;
}

/* ----- Marginalia ----- */
.margin-glyph {
    position: absolute;
    color: var(--graphite-blue);
    font-family: var(--font-hand);
    font-size: 0.95rem;
    pointer-events: none;
    opacity: 0;
    clip-path: inset(0 100% 0 0);
    transition:
        opacity 240ms ease-out,
        clip-path 380ms cubic-bezier(.22,.85,.32,1);
}

.margin-glyph.revealed {
    opacity: 1;
    clip-path: inset(0 0 0 0);
}

.margin-left {
    left: -3.2rem;
    top: 0.2em;
    width: 2.4rem;
    text-align: right;
}

.margin-right {
    right: -3.6rem;
    top: 0.2em;
    width: 2.6rem;
    text-align: left;
}

.margin-glyph svg {
    width: 1.4rem;
    height: 1.4rem;
    display: inline-block;
    color: var(--graphite-blue);
}

.margin-num {
    font-family: var(--font-hand);
    font-weight: 500;
    color: var(--graphite-blue);
    font-size: 1.05rem;
}

.margin-caveat {
    font-family: var(--font-hand);
    font-style: italic;
    color: var(--graphite-blue);
    font-size: 1.05rem;
}

@media (max-width: 900px) {
    .margin-left, .margin-right {
        position: static;
        display: inline-block;
        margin-left: 0.4em;
        text-align: left;
        width: auto;
    }
}

/* =============================================================
   ZOOM-FOCUS PASSAGES
   ============================================================= */
.focus-passage {
    position: relative;
    padding: 0.4em 0.8em;
    margin: 1.4rem 0;
    transition:
        transform 600ms cubic-bezier(.22,.85,.32,1),
        letter-spacing 600ms cubic-bezier(.22,.85,.32,1),
        filter 500ms ease,
        color 500ms ease,
        font-size 600ms cubic-bezier(.22,.85,.32,1);
    cursor: zoom-in;
}

.focus-passage::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(216, 207, 183, 0);
    transition: background 500ms ease;
    pointer-events: none;
    z-index: -1;
}

.focus-bracket {
    position: absolute;
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--gunmetal);
    font-size: 1.2rem;
    opacity: 0;
    transition: opacity 600ms ease, transform 600ms cubic-bezier(.22,.85,.32,1);
    pointer-events: none;
}

.focus-bracket-tl {
    top: -0.3rem;
    left: -0.3rem;
    transform: translate(-12px, -12px);
}

.focus-bracket-br {
    bottom: -0.3rem;
    right: -0.3rem;
    transform: translate(12px, 12px);
}

/* When a passage is focused */
body.has-focus .prose-line:not(.is-focused) {
    filter: blur(4px) saturate(0.2);
    color: var(--chrome-shadow);
    pointer-events: none;
}

.focus-passage.is-focused {
    transform: scale(1.18);
    letter-spacing: 0.012em;
    color: var(--iron-gall-ink);
    cursor: zoom-out;
    z-index: 30;
    font-size: 1.32rem;
}

.focus-passage.is-focused::before {
    background: rgba(216, 207, 183, 0.35);
}

.focus-passage.is-focused .focus-bracket {
    opacity: 1;
}

.focus-passage.is-focused .focus-bracket-tl {
    transform: translate(0, 0);
}

.focus-passage.is-focused .focus-bracket-br {
    transform: translate(0, 0);
}

/* Focus overlay (release hint) */
.focus-overlay {
    position: fixed;
    inset: 0;
    background: rgba(31, 27, 22, 0.04);
    pointer-events: none;
    opacity: 0;
    transition: opacity 500ms ease;
    z-index: 25;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 14vh;
}

body.has-focus .focus-overlay {
    opacity: 1;
    pointer-events: auto;
    cursor: zoom-out;
}

.focus-hint {
    font-family: var(--font-hand);
    color: var(--graphite-blue);
    font-size: 1.1rem;
    background: var(--foxed-cream);
    padding: 0.4rem 1rem;
    border: 1px solid var(--gunmetal);
    border-radius: 1px;
    box-shadow: 0 2px 0 rgba(31, 27, 22, 0.12);
    opacity: 0.9;
}

/* =============================================================
   REDACTION & DISSENT
   ============================================================= */
.redact-line {
    position: relative;
    min-height: 3.5em;
}

.redact-strike-wrap {
    display: inline;
    position: relative;
}

.redact-text {
    color: var(--iron-gall-ink);
    transition: opacity 700ms ease;
}

.redact-strike {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    width: 100%;
    height: 2.4rem;
    transform: translateY(-50%) rotate(-1.4deg);
    pointer-events: none;
    opacity: 0;
    transition: opacity 800ms ease;
    overflow: visible;
}

.redact-line.struck .redact-strike { opacity: 0.62; }
.redact-line.struck .redact-text   { opacity: 0.32; }

.redact-revealed {
    display: block;
    margin-top: 0.6rem;
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 500;
    color: var(--manuscript-red);
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 700ms ease 600ms, transform 700ms ease 600ms;
}

.redact-line.struck .redact-revealed {
    opacity: 1;
    transform: translateY(0);
}

.emphasis-line {
    text-align: center;
    font-style: italic;
    color: var(--gunmetal);
    font-size: 1.08rem;
}

.single-underline {
    position: relative;
    color: var(--manuscript-red);
    font-weight: 600;
}

.single-underline::after {
    content: "";
    position: absolute;
    left: -2px;
    right: -2px;
    bottom: -2px;
    height: 2px;
    background:
        linear-gradient(90deg,
            transparent 0%,
            var(--manuscript-red) 8%,
            var(--manuscript-red) 92%,
            transparent 100%);
    transform: rotate(-0.6deg);
}

/* =============================================================
   FLOATING CHROME CARDS
   ============================================================= */
.chrome-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 30;
    overflow: hidden;
}

.chrome-card {
    position: absolute;
    pointer-events: auto;
    width: 168px;
    padding: 0.8rem 0.9rem 0.7rem;
    border-radius: 2px;
    background:
        linear-gradient(165deg,
            var(--chrome-highlight) 0%,
            var(--chrome-mid) 52%,
            var(--chrome-shadow) 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.55),
        inset 0 -1px 0 rgba(40, 50, 60, 0.45),
        0 8px 18px -8px rgba(31, 27, 22, 0.45),
        0 2px 0 rgba(31, 27, 22, 0.12);
    transform-origin: center;
    transform:
        translate3d(var(--card-x, 0), var(--card-y, 0), 0)
        rotate(var(--card-rot, 0deg));
    transition: transform 320ms cubic-bezier(.22,.85,.32,1), box-shadow 320ms ease;
    isolation: isolate;
    color: var(--iron-gall-ink);
    will-change: transform;
}

.chrome-card-spec {
    position: absolute;
    inset: 0;
    border-radius: 2px;
    background: conic-gradient(from var(--cursor-angle, 0deg),
        rgba(255, 255, 255, 0.0) 0deg,
        rgba(255, 255, 255, 0.32) 45deg,
        rgba(255, 255, 255, 0.0) 95deg,
        rgba(40, 50, 60, 0.18) 180deg,
        rgba(255, 255, 255, 0.0) 270deg,
        rgba(255, 255, 255, 0.18) 320deg,
        rgba(255, 255, 255, 0.0) 360deg);
    mix-blend-mode: overlay;
    pointer-events: none;
    opacity: 0.85;
    z-index: 1;
}

.chrome-card::after {
    content: "";
    position: absolute;
    left: 0; right: 0;
    top: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.85);
    z-index: 2;
}

.chrome-card-body {
    position: relative;
    z-index: 3;
}

.chrome-card-label {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.55rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gunmetal);
    margin-bottom: 0.45rem;
    border-bottom: 1px solid rgba(58, 61, 68, 0.4);
    padding-bottom: 0.25rem;
}

.chrome-card-quote {
    font-family: var(--font-quote);
    font-weight: 700;
    font-size: 0.92rem;
    letter-spacing: -0.01em;
    line-height: 1.32;
    color: var(--iron-gall-ink);
    margin: 0 0 0.5rem;
    text-transform: lowercase;
}

.chrome-card-em {
    font-style: italic;
    font-weight: 400;
    color: var(--gunmetal);
}

.chrome-card-foot {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 0.72rem;
    color: var(--gunmetal);
    text-align: right;
}

.chrome-card-fold {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--foxed-cream);
    border: 1px solid var(--gunmetal);
    padding: 0.6rem 0.7rem;
    font-family: var(--font-serif);
    font-size: 0.78rem;
    font-style: italic;
    color: var(--iron-gall-ink);
    line-height: 1.35;
    box-shadow: 0 6px 14px -4px rgba(31, 27, 22, 0.32);
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity 280ms ease, transform 280ms ease;
    z-index: 4;
}

.chrome-card.expanded .chrome-card-fold {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.chrome-card:hover {
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.7),
        inset 0 -1px 0 rgba(40, 50, 60, 0.55),
        0 14px 28px -8px rgba(31, 27, 22, 0.55),
        0 2px 0 rgba(31, 27, 22, 0.18);
}

.chrome-card-1 { top: 18%; right: 3%; }
.chrome-card-2 { top: 46%; right: 4.5%; }
.chrome-card-3 { top: 72%; right: 3.5%; width: 184px; }
.chrome-card-4 { top: 92%; right: 4%; }

@media (max-width: 1100px) {
    .chrome-card-1 { right: 1.2%; }
    .chrome-card-2 { right: 1%; }
    .chrome-card-3 { right: 1.5%; }
    .chrome-card-4 { right: 1%; }
}

@media (max-width: 820px) {
    .chrome-layer { display: none; }
}

/* =============================================================
   TORN-EDGE DIVIDERS
   ============================================================= */
.torn-divider {
    width: 100%;
    height: 36px;
    margin: 1rem 0;
    pointer-events: none;
    filter: drop-shadow(0 3px 0 rgba(31, 27, 22, 0.08));
}

.torn-divider svg {
    width: 100%;
    height: 100%;
    display: block;
}

.torn-divider-flipped { transform: scaleY(-1); }

/* =============================================================
   FOOTNOTE BRACKET (between sections)
   ============================================================= */
.footnote-bracket {
    margin-top: 3rem;
    text-align: center;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.6rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--manuscript-red);
}

.footnote-bracket span {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-top: 1px solid var(--gunmetal);
    border-bottom: 1px solid var(--gunmetal);
}

/* =============================================================
   FOOTNOTE RAIL — counter-scrolling
   ============================================================= */
.footnote-rail {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 7vh;
    min-height: 56px;
    z-index: 40;
    overflow: hidden;
    background:
        linear-gradient(to top,
            rgba(216, 207, 183, 0.94) 0%,
            rgba(216, 207, 183, 0.82) 70%,
            rgba(216, 207, 183, 0.0) 100%);
    border-top: 1px solid var(--gunmetal);
    pointer-events: none;
    transition: opacity 1200ms ease;
}

.footnote-rail::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(0deg,
            transparent 0,
            transparent 12px,
            rgba(58, 61, 68, 0.05) 12px,
            rgba(58, 61, 68, 0.05) 13px);
    pointer-events: none;
}

.footnote-rail.dim { opacity: 0.2; }

.footnote-rail-strip {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translate3d(var(--rail-shift, 0px), -50%, 0);
    white-space: nowrap;
    will-change: transform;
    padding-left: 100vw;
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 500;
    color: var(--gunmetal);
    font-size: 0.78rem;
}

.footnote-item {
    display: inline-block;
    padding: 0 2.2rem 0 0;
}

.footnote-item sup {
    font-family: var(--font-mono);
    font-weight: 700;
    font-style: normal;
    color: var(--manuscript-red);
    font-size: 0.6rem;
    margin-right: 0.18em;
    letter-spacing: 0.05em;
}

/* =============================================================
   HELIX MOTIF
   ============================================================= */
.helix {
    position: absolute;
    width: 60px;
    pointer-events: none;
    opacity: 0.5;
}

.helix-front {
    right: -5rem;
    top: 30%;
    height: 280px;
}

.helix-mid {
    right: -5rem;
    top: 50%;
    height: 240px;
    opacity: 0.42;
}

.helix-end {
    right: -5rem;
    top: 6rem;
    height: 320px;
    opacity: 0.55;
    animation: helix-unwind 6s ease-out forwards;
    transform-origin: top center;
}

@keyframes helix-unwind {
    0%   { transform: scaleY(0); opacity: 0; }
    20%  { opacity: 0.55; }
    100% { transform: scaleY(1); opacity: 0.55; }
}

.colophon.in-view .helix-end {
    animation: helix-unwind 6s ease-out forwards;
}

.helix svg {
    width: 100%;
    height: 100%;
    display: block;
}

@media (max-width: 1100px) {
    .helix { display: none; }
}

/* =============================================================
   COLOPHON
   ============================================================= */
.colophon {
    text-align: left;
}

.colophon-prose .prose-line {
    color: var(--gunmetal);
}

.colophon-mark {
    margin-top: 2.4rem !important;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--iron-gall-ink) !important;
    text-align: center;
    padding-top: 1.4rem;
    border-top: 1px solid var(--gunmetal);
}

.folio-foot {
    margin: 6rem auto 0;
    text-align: center;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.6rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--gunmetal);
    opacity: 0.6;
}

/* =============================================================
   MEDIA QUERIES — small screens
   ============================================================= */
@media (max-width: 700px) {
    .folio { padding: 4.6rem 1.2rem 16vh; }
    .gathering { padding: 4rem 0 6rem; }
    .title-plate-headline { font-size: 1.7rem; letter-spacing: 0.12em; }
    .section-plate-title { font-size: 1.3rem; }
    .prose-line.lead { font-size: 1.05rem; }
    .footnote-rail { height: 9vh; }
    .focus-passage.is-focused { transform: scale(1.06); font-size: 1.18rem; }
}
