/* lrx.st :: decayed cyberpunk archive
   Palette: sepia-nostalgic on aged paper
   Fonts: IBM Plex Mono, Major Mono Display, Special Elite, Share Tech Mono
*/

/* ---------- root ---------- */
:root {
    --paper: #F0E4CC;
    --paper-foxed: #D9C5A0;
    --ink: #3A2A1B;
    --sepia-mid: #7A4F2E;
    --amber: #B8742E;
    --stamp-red: #A12B1F;
    --mimeo-blue: #2D3A3F;
    --olive: #5B6F4A;
    --shadow-tight: rgba(58, 42, 27, 0.22);
    --shadow-mid: rgba(58, 42, 27, 0.18);
    --shadow-diffuse: rgba(58, 42, 27, 0.14);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    background: var(--paper);
    color: var(--ink);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 14.5px;
    line-height: 1.65;
    letter-spacing: 0.01em;
    overflow-x: hidden;
    min-height: 100%;
}

body {
    position: relative;
    min-height: 100vh;
    background-color: var(--paper);
    background-image:
        radial-gradient(ellipse at 20% 8%, rgba(122, 79, 46, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse at 90% 70%, rgba(122, 79, 46, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 100%, rgba(58, 42, 27, 0.10) 0%, transparent 70%);
}

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

/* ---------- substrate (background paper grid) ---------- */
.substrate {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.substrate-grid {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.55;
}

.substrate-vignette {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 50% 50%, transparent 35%, rgba(58, 42, 27, 0.12) 88%, rgba(58, 42, 27, 0.22) 100%);
    mix-blend-mode: multiply;
}

.substrate-fiber {
    position: absolute;
    inset: 0;
    background-image:
        repeating-radial-gradient(circle at 12% 18%, rgba(122, 79, 46, 0.04) 0, transparent 0.6px),
        repeating-radial-gradient(circle at 78% 62%, rgba(122, 79, 46, 0.03) 0, transparent 0.6px),
        repeating-radial-gradient(circle at 36% 82%, rgba(58, 42, 27, 0.025) 0, transparent 0.6px);
    background-size: 220px 220px, 280px 280px, 320px 320px;
    opacity: 0.85;
    mix-blend-mode: multiply;
}

/* ---------- ripple plane ---------- */
.ripple-plane {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.ripple-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.85;
}

.ripple-circle {
    fill: none;
    stroke: var(--amber);
    stroke-width: 1.6;
}

/* amber-shift on text when ripple passes */
.amber-shift {
    color: var(--amber) !important;
    transition: color 240ms ease;
}

/* ---------- sidebar ---------- */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    z-index: 30;
    background-color: var(--paper-foxed);
    background-image:
        linear-gradient(180deg, rgba(58, 42, 27, 0.08) 0%, transparent 14%),
        linear-gradient(0deg, rgba(58, 42, 27, 0.10) 0%, transparent 18%),
        repeating-linear-gradient(0deg, transparent 0, transparent 22px, rgba(122, 79, 46, 0.08) 22px, rgba(122, 79, 46, 0.08) 23px);
    border-right: 2px solid var(--ink);
    box-shadow:
        2px 0 4px var(--shadow-tight),
        6px 0 18px var(--shadow-diffuse);
    overflow: visible;
    transform: rotate(-0.3deg);
    transform-origin: top left;
    opacity: 0;
    animation: sidebar-unfurl 600ms ease-out forwards;
}

@keyframes sidebar-unfurl {
    0%   { opacity: 0; transform: rotate(-1deg) translateX(-12px); }
    100% { opacity: 1; transform: rotate(-0.3deg) translateX(0); }
}

.sidebar-inner {
    position: relative;
    padding: 28px 22px 22px 22px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.sidebar-head {
    border-bottom: 1px dashed var(--sepia-mid);
    padding-bottom: 14px;
    margin-bottom: 18px;
}

.folder-stamp {
    display: flex;
    flex-direction: column;
    gap: 4px;
    border: 1.5px solid var(--stamp-red);
    padding: 8px 10px;
    transform: rotate(-1.4deg);
    margin-bottom: 14px;
    background: rgba(161, 43, 31, 0.04);
}

.folder-num {
    font-family: 'Major Mono Display', monospace;
    font-size: 11px;
    color: var(--stamp-red);
    letter-spacing: 0.08em;
}

.folder-class {
    font-family: 'Share Tech Mono', monospace;
    font-size: 9.5px;
    color: var(--stamp-red);
    letter-spacing: 0.06em;
    opacity: 0.85;
}

.custodian {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 10.5px;
    color: var(--sepia-mid);
}

.custodian-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 9.5px;
    letter-spacing: 0.08em;
    opacity: 0.7;
}

.custodian-sig {
    font-family: 'Special Elite', monospace;
    font-size: 14px;
    color: var(--ink);
    letter-spacing: 0.02em;
}

.custodian-date {
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    color: var(--sepia-mid);
    letter-spacing: 0.04em;
}

/* ---------- tab nav (manila folder tabs) ---------- */
.tab-nav {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 22px;
}

.tab-item {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 14px 10px 12px;
    background-color: var(--paper);
    border: 1px solid var(--sepia-mid);
    border-right: none;
    color: var(--ink);
    text-decoration: none;
    cursor: pointer;
    transform: translateX(0);
    transition:
        transform 280ms cubic-bezier(0.6, 0.02, 0.3, 1),
        background-color 280ms ease,
        box-shadow 280ms ease;
    box-shadow:
        1px 1px 0 var(--shadow-tight),
        2px 4px 6px var(--shadow-mid);
    clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%);
}

.tab-item:hover {
    transform: translateX(-12px);
    background-color: #f4ead2;
}

.tab-item.active {
    transform: translateX(-36px);
    background-color: var(--paper);
    box-shadow:
        2px 1px 0 var(--shadow-tight),
        6px 6px 14px var(--shadow-mid),
        12px 0 22px var(--shadow-diffuse);
    z-index: 5;
}

.tab-item.active::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: var(--stamp-red);
}

.tab-id {
    font-family: 'Share Tech Mono', monospace;
    font-size: 9.5px;
    color: var(--sepia-mid);
    letter-spacing: 0.08em;
    opacity: 0.85;
}

.tab-label {
    font-family: 'Major Mono Display', monospace;
    font-size: 12px;
    color: var(--ink);
    letter-spacing: 0.06em;
}

/* ---------- thread rail ---------- */
.thread-rail {
    position: absolute;
    left: 4px;
    top: 230px;
    bottom: 80px;
    width: 12px;
    pointer-events: none;
    overflow: visible;
}

.thread-svg {
    width: 12px;
    height: 100%;
    overflow: visible;
}

#thread-line {
    stroke: var(--stamp-red);
    stroke-width: 2;
    filter: drop-shadow(0 0 1px rgba(161, 43, 31, 0.4));
}

#thread-marker {
    fill: var(--stamp-red);
    filter: drop-shadow(0 1px 1px rgba(58, 42, 27, 0.4));
}

/* ---------- sidebar foot ---------- */
.sidebar-foot {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px dashed var(--sepia-mid);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.audio-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border: 1px solid var(--sepia-mid);
    background-color: rgba(240, 228, 204, 0.5);
    cursor: pointer;
    user-select: none;
    transition: background-color 200ms ease;
}

.audio-toggle:hover { background-color: rgba(240, 228, 204, 0.8); }

.audio-toggle .audio-led {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--sepia-mid);
    box-shadow: inset 0 0 2px rgba(0,0,0,0.3);
    transition: background 200ms ease, box-shadow 200ms ease;
}

.audio-toggle[data-state="on"] .audio-led {
    background: var(--amber);
    box-shadow: 0 0 4px var(--amber), inset 0 0 2px rgba(0,0,0,0.2);
}

.audio-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 9.5px;
    color: var(--sepia-mid);
    letter-spacing: 0.06em;
}

.folder-meta {
    font-family: 'Share Tech Mono', monospace;
    font-size: 9px;
    color: var(--sepia-mid);
    letter-spacing: 0.06em;
    line-height: 1.6;
    opacity: 0.75;
}

/* ---------- main column ---------- */
.dossier-main {
    position: relative;
    margin-left: 280px;
    padding: 80px 40px 200px 60px;
    min-height: 100vh;
    z-index: 5;
}

/* ---------- evidence sheet ---------- */
.sheet {
    position: relative;
    width: 720px;
    max-width: 100%;
    margin: 0 auto 110px auto;
    padding: 64px 60px 78px 84px;
    background-color: var(--paper);
    background-image:
        radial-gradient(ellipse at 12% 6%, rgba(122, 79, 46, 0.10) 0%, transparent 28%),
        radial-gradient(ellipse at 92% 88%, rgba(122, 79, 46, 0.10) 0%, transparent 32%),
        radial-gradient(ellipse at 50% 50%, transparent 60%, rgba(58, 42, 27, 0.05) 100%);
    border: 1px solid var(--paper-foxed);
    box-shadow:
        1px 1px 0 var(--shadow-tight),
        4px 4px 8px var(--shadow-mid),
        18px 18px 36px var(--shadow-diffuse);
    transition: transform 380ms ease, box-shadow 380ms ease;
    z-index: 6;
}

.sheet::before {
    /* foxed ragged border feathering */
    content: '';
    position: absolute;
    inset: -2px;
    border: 2px solid transparent;
    background:
        repeating-linear-gradient(0deg, var(--paper-foxed) 0 2px, transparent 2px 5px),
        repeating-linear-gradient(90deg, var(--paper-foxed) 0 2px, transparent 2px 6px);
    background-clip: padding-box, border-box;
    pointer-events: none;
    opacity: 0.35;
    mix-blend-mode: multiply;
    z-index: -1;
}

.sheet::after {
    /* paper fiber overlay */
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(2deg, transparent 0 19px, rgba(122, 79, 46, 0.02) 19px 20px),
        radial-gradient(circle at 16% 24%, rgba(122, 79, 46, 0.05) 0, transparent 1px),
        radial-gradient(circle at 78% 56%, rgba(58, 42, 27, 0.04) 0, transparent 1px);
    pointer-events: none;
    mix-blend-mode: multiply;
    opacity: 0.85;
}

.sheet:hover {
    transform: translateY(-6px) rotate(var(--rest-rot, 0deg));
    box-shadow:
        2px 2px 0 var(--shadow-tight),
        8px 10px 14px var(--shadow-mid),
        26px 28px 50px var(--shadow-diffuse);
}

.sheet.sheet-active { will-change: transform; }

.sheet .hole {
    position: absolute;
    top: 28px;
    left: 32px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--paper-foxed);
    box-shadow:
        inset 1px 1px 2px rgba(58, 42, 27, 0.55),
        inset -1px -1px 1px rgba(255, 248, 224, 0.5),
        0 0 0 1px rgba(58, 42, 27, 0.18);
}

.sheet-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px 16px;
    padding-bottom: 10px;
    margin-bottom: 22px;
    border-bottom: 1px dashed var(--sepia-mid);
}

.file-id {
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    color: var(--sepia-mid);
    letter-spacing: 0.08em;
}

.file-stamp {
    font-family: 'Major Mono Display', monospace;
    font-size: 11px;
    color: var(--stamp-red);
    letter-spacing: 0.1em;
    border: 1.5px solid var(--stamp-red);
    padding: 2px 8px;
    transform: rotate(-2deg);
    background: rgba(161, 43, 31, 0.04);
}

.file-date {
    font-family: 'Share Tech Mono', monospace;
    font-size: 10.5px;
    color: var(--sepia-mid);
    letter-spacing: 0.06em;
    opacity: 0.85;
}

/* ---------- hero / file 0 ---------- */
.sheet-hero {
    transform: rotate(-1.4deg);
    --rest-rot: -1.4deg;
}

.hero-title {
    font-family: 'Major Mono Display', monospace;
    font-size: 38px;
    line-height: 1.1;
    color: var(--ink);
    margin-bottom: 14px;
    letter-spacing: 0.06em;
    min-height: 1.1em;
}

.typewriter {
    position: relative;
    display: inline-block;
}

.typewriter::after {
    content: '_';
    display: inline-block;
    margin-left: 4px;
    color: var(--amber);
    animation: blink 1s steps(1) infinite;
}

.typewriter.done::after { display: none; }

@keyframes blink {
    0%, 50%   { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.hero-sub {
    font-family: 'Special Elite', monospace;
    font-size: 14.5px;
    color: var(--sepia-mid);
    margin-bottom: 30px;
    letter-spacing: 0.02em;
}

.stamp-mask {
    display: inline-block;
    padding: 4px 12px;
    background-color: rgba(184, 116, 46, 0.10);
    border-bottom: 1px dotted var(--sepia-mid);
}

.stamp-cluster {
    display: flex;
    gap: 18px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

/* ---------- rubber stamps ---------- */
.rubber-stamp {
    display: inline-block;
    font-family: 'Major Mono Display', monospace;
    font-size: 14px;
    letter-spacing: 0.1em;
    color: var(--stamp-red);
    border: 2.5px solid var(--stamp-red);
    padding: 6px 14px;
    background: rgba(161, 43, 31, 0.04);
    position: relative;
    opacity: 0;
    transform: scale(1.6) rotate(0deg);
    transition: transform 220ms ease, opacity 220ms ease, filter 200ms ease;
    cursor: pointer;
    user-select: none;
    filter: blur(0.4px);
    text-transform: uppercase;
}

.rubber-stamp::before {
    /* missing-ink dropouts */
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        radial-gradient(circle at 12% 24%, var(--paper) 0 1.5px, transparent 1.6px),
        radial-gradient(circle at 78% 16%, var(--paper) 0 1.2px, transparent 1.3px),
        radial-gradient(circle at 32% 78%, var(--paper) 0 1.4px, transparent 1.5px),
        radial-gradient(circle at 88% 64%, var(--paper) 0 1px, transparent 1.1px);
    mix-blend-mode: lighten;
    opacity: 0.7;
}

.rubber-stamp.struck {
    opacity: 0.92;
    transform: scale(1) rotate(var(--stamp-rot, -3deg));
}

.stamp-1 { --stamp-rot: -7deg; }
.stamp-2 { --stamp-rot: 4deg; }
.stamp-3 { --stamp-rot: 10deg; }

.rubber-stamp:hover {
    filter: blur(0.2px);
    opacity: 1;
}

.rubber-stamp.re-strike {
    animation: ink-spread 300ms ease;
}

@keyframes ink-spread {
    0%   { transform: scale(1.15) rotate(var(--stamp-rot, -3deg)); filter: blur(0.8px); }
    100% { transform: scale(1) rotate(var(--stamp-rot, -3deg)); filter: blur(0.4px); }
}

.stamp-mid {
    font-size: 16px;
    padding: 8px 18px;
}

.stamp-final {
    --stamp-rot: 6deg;
}

.stamp-decl {
    --stamp-rot: -5deg;
}

/* ---------- body text ---------- */
.body-paragraph {
    margin-bottom: 18px;
    color: var(--ink);
    font-size: 14.5px;
    line-height: 1.65;
    letter-spacing: 0.01em;
}

.section-title {
    font-family: 'Major Mono Display', monospace;
    font-size: 26px;
    color: var(--ink);
    letter-spacing: 0.08em;
    margin-bottom: 24px;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--ink);
    text-transform: uppercase;
}

/* ---------- redactions ---------- */
.redaction {
    display: inline-block;
    position: relative;
    padding: 1px 6px;
    background-color: var(--ink);
    color: var(--ink);
    margin: 0 1px;
    cursor: pointer;
    user-select: none;
    transition: background-color 380ms ease, color 380ms ease;
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 500;
}

.redaction::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(90deg, rgba(58, 42, 27, 1) 0 3px, rgba(45, 30, 22, 0.92) 3px 5px);
    pointer-events: none;
    transition: opacity 360ms ease;
}

.redaction:hover { /* hover handled by JS for 800ms dwell */ }

.redaction.revealed {
    background-color: transparent;
    color: var(--amber);
}

.redaction.revealed::before { opacity: 0; }

.redaction.revealed::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(0deg, transparent 0 2px, rgba(184, 116, 46, 0.18) 2px 3px);
    pointer-events: none;
    mix-blend-mode: screen;
}

/* ---------- annotations / marginalia ---------- */
.annotation {
    position: absolute;
    font-family: 'Special Elite', monospace;
    font-size: 13px;
    color: var(--stamp-red);
    transform: rotate(-3deg);
    opacity: 0;
    transition: opacity 600ms ease;
    max-width: 200px;
    line-height: 1.3;
    pointer-events: none;
    z-index: 8;
}

.annotation.visible { opacity: 0.85; }

.annotation-tr { top: 24px; right: -12px; transform: rotate(4deg); }
.annotation-tl { top: 30px; left: -8px; transform: rotate(-5deg); }
.annotation-br { bottom: 30px; right: -10px; transform: rotate(-2deg); }
.annotation-bl { bottom: 28px; left: -10px; transform: rotate(3deg); color: var(--mimeo-blue); }

.annotation-text {
    display: inline-block;
    border-bottom: 1px solid currentColor;
    padding-bottom: 1px;
}

/* ---------- paperclip ---------- */
.paperclip {
    position: absolute;
    top: -18px;
    right: 60px;
    z-index: 9;
    transform: rotate(8deg);
    filter: drop-shadow(1px 2px 1px rgba(58, 42, 27, 0.3));
}

.paperclip-right {
    top: 80px;
    right: -14px;
    transform: rotate(-12deg);
}

/* ---------- exhibit callout / schematic ---------- */
.exhibit-callout {
    position: relative;
    margin: 22px 0;
    padding: 14px 14px 30px 14px;
    border: 1px solid var(--olive);
    background: rgba(91, 111, 74, 0.04);
}

.callout-tag {
    display: inline-block;
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    color: var(--olive);
    background: var(--paper);
    padding: 2px 8px;
    border: 1px solid var(--olive);
    position: absolute;
    top: -10px;
    left: 14px;
    letter-spacing: 0.08em;
}

.schematic-fig {
    display: block;
    width: 100%;
    height: auto;
    margin: 8px 0 6px 0;
}

.callout-cap {
    display: block;
    font-family: 'Special Elite', monospace;
    font-size: 12px;
    color: var(--sepia-mid);
    margin-top: 6px;
    text-align: center;
    letter-spacing: 0.02em;
}

/* ---------- transmission log ---------- */
.trans-log {
    list-style: none;
    counter-reset: trans;
    margin: 22px 0;
    padding-left: 0;
}

.trans-entry {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 14px;
    align-items: baseline;
    padding: 10px 8px;
    border-bottom: 1px dotted var(--sepia-mid);
    counter-increment: trans;
}

.trans-entry::before {
    content: counter(trans, decimal-leading-zero) ' >';
    grid-column: 1 / 2;
    grid-row: 1 / 2;
    display: none;
}

.trans-time {
    font-family: 'Share Tech Mono', monospace;
    font-size: 11.5px;
    color: var(--amber);
    letter-spacing: 0.06em;
    background: rgba(184, 116, 46, 0.08);
    padding: 2px 6px;
    text-align: center;
}

.trans-body {
    font-size: 14px;
    color: var(--ink);
    line-height: 1.55;
}

.mono-id {
    font-family: 'Share Tech Mono', monospace;
    color: var(--sepia-mid);
    background: rgba(122, 79, 46, 0.08);
    padding: 1px 4px;
    font-size: 12.5px;
}

/* ---------- exhibit photo / tape ---------- */
.exhibit-photo {
    position: relative;
    margin: 26px auto;
    padding: 16px 14px 18px 14px;
    background-color: #efe2c4;
    border: 1px solid var(--paper-foxed);
    box-shadow:
        1px 1px 0 var(--shadow-tight),
        4px 4px 8px var(--shadow-mid);
    width: 86%;
    transform: rotate(-1.2deg);
    cursor: pointer;
    transition: transform 360ms ease, box-shadow 360ms ease;
}

.exhibit-photo:hover {
    transform: rotate(-0.6deg) translateY(-3px);
    box-shadow:
        2px 2px 0 var(--shadow-tight),
        8px 10px 14px var(--shadow-mid);
}

.exhibit-photo.peeled .tape-tl { transform: translate(-6px, -10px) rotate(-22deg); }

.exhibit-art {
    display: block;
    width: 100%;
    height: auto;
}

.exhibit-cap {
    display: block;
    margin-top: 8px;
    font-family: 'Special Elite', monospace;
    font-size: 12px;
    color: var(--sepia-mid);
    text-align: center;
    letter-spacing: 0.02em;
}

.tape {
    position: absolute;
    width: 60px;
    height: 22px;
    background-color: rgba(184, 116, 46, 0.42);
    background-image:
        repeating-linear-gradient(90deg, transparent 0 6px, rgba(255, 248, 224, 0.18) 6px 12px),
        linear-gradient(180deg, rgba(255, 248, 224, 0.25) 0%, transparent 50%);
    box-shadow: 0 1px 2px rgba(58, 42, 27, 0.22);
    transition: transform 380ms ease;
    pointer-events: none;
}

.tape-tl { top: -10px; left: 14px; transform: rotate(-12deg); }
.tape-br { bottom: -8px; right: 24px; transform: rotate(8deg); }

/* ---------- washi tape ---------- */
.washi-tape {
    position: absolute;
    top: -14px;
    right: 110px;
    width: 88px;
    height: 24px;
    background-color: rgba(91, 111, 74, 0.42);
    background-image:
        repeating-linear-gradient(45deg, transparent 0 4px, rgba(58, 42, 27, 0.10) 4px 5px),
        linear-gradient(180deg, rgba(255, 248, 224, 0.18) 0%, transparent 100%);
    transform: rotate(-6deg);
    box-shadow: 0 2px 3px rgba(58, 42, 27, 0.22);
    pointer-events: none;
}

/* ---------- marginalia notes ---------- */
.marg-list {
    list-style: none;
    padding-left: 0;
    margin: 24px 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.marg-note {
    font-family: 'Special Elite', monospace;
    font-size: 14px;
    line-height: 1.5;
    padding: 10px 14px 10px 30px;
    background: rgba(240, 228, 204, 0.6);
    border-left: 3px solid var(--sepia-mid);
    position: relative;
}

.marg-note::before {
    content: '\201C';
    position: absolute;
    left: 8px;
    top: 6px;
    font-size: 22px;
    color: var(--sepia-mid);
    line-height: 1;
}

.marg-hand-1 {
    color: var(--ink);
    transform: rotate(-0.8deg);
}

.marg-hand-2 {
    color: var(--mimeo-blue);
    border-left-color: var(--mimeo-blue);
    transform: rotate(0.6deg);
}

.marg-hand-2::before { color: var(--mimeo-blue); }

.margin-stamp {
    margin-top: 32px;
    text-align: center;
}

/* ---------- closure ---------- */
.signoff {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 14px;
    margin-top: 36px;
}

.signoff-line {
    font-family: 'Special Elite', monospace;
    font-size: 14px;
    color: var(--sepia-mid);
    letter-spacing: 0.02em;
}

/* ---------- responsive ---------- */
@media (max-width: 960px) {
    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        transform: none;
        animation: none;
        opacity: 1;
        border-right: none;
        border-bottom: 2px solid var(--ink);
    }

    .sidebar-inner {
        padding: 18px 16px;
    }

    .tab-nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
        margin-bottom: 10px;
    }

    .tab-item {
        flex: 1 1 30%;
        min-width: 120px;
        clip-path: none;
        border-right: 1px solid var(--sepia-mid);
        padding: 8px 10px;
    }

    .tab-item:hover, .tab-item.active {
        transform: translateY(-3px);
    }

    .thread-rail { display: none; }

    .dossier-main {
        margin-left: 0;
        padding: 40px 18px 120px 18px;
    }

    .sheet {
        width: 100%;
        padding: 44px 28px 60px 56px;
        margin-bottom: 60px;
        transform: rotate(0deg) !important;
    }

    .hero-title { font-size: 26px; }
    .section-title { font-size: 20px; }

    .annotation { position: relative; top: auto; right: auto; left: auto; bottom: auto; transform: none; margin: 12px 0; opacity: 0.85; max-width: 100%; }

    .stamp-cluster { gap: 10px; }
}

@media (max-width: 520px) {
    .hero-title { font-size: 22px; }
    .file-stamp { font-size: 9.5px; }
    .rubber-stamp { font-size: 12px; padding: 4px 10px; }
    .stamp-mid { font-size: 13px; padding: 6px 12px; }
}
