/* ═══════════════════════════════════════════════════════════════
   THE COURT'S OWN WORDS  ·  Pillar-0 — "The Record Indicts Itself"
   Self-contained page styles. The np-tabs CSS block (bottom of file)
   is lifted verbatim from /story/calls-for-help.html.
   ═══════════════════════════════════════════════════════════════ */

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

:root {
    --bg:          #0c0c12;
    --surface:     #12121c;
    --card:        #161622;
    --elevated:    #1a1a2e;
    --border:      #2a2a3c;
    --border-dim:  #1e1e2e;
    --text:        #e1d9eb;   /* primary */
    --text-bright: #f0f0f0;
    --text-white:  #ffffff;
    --text-subtle: #b0b0b0;
    --text-dim:    #a0a0a0;
    --text-muted:  #707070;
    --red:         #ff5545;
    --gold:        #ffb732;
    --green:       #4eecc8;
    --blue:        #3a86ba;
    --purple:      #b990e6;
    --mono:        'IBM Plex Mono', 'Consolas', monospace;
    --sans:        'IBM Plex Sans', system-ui, -apple-system, sans-serif;
}

html { scroll-behavior: smooth; }
body {
    background-color: var(--bg);
    background-image: radial-gradient(ellipse at center top, rgba(58,134,186,0.13), transparent 62%);
    background-attachment: fixed;
    color: var(--text);
    font-family: var(--sans);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

/* ── shared container ───────────────────────────── */
.cow-wrap { max-width: 1080px; margin: 0 auto; padding: 0 36px; }

/* ── HERO ───────────────────────────────────────── */
.cow-hero {
    max-width: 1080px;
    margin: 0 auto;
    padding: 60px 36px 26px;
    text-align: center;
}
.cow-badge {
    display: inline-block;
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 700;
    color: var(--red);
    letter-spacing: 5px;
    text-transform: uppercase;
    margin-bottom: 22px;
    padding: 8px 22px;
    border: 1px solid rgba(255,85,69,0.42);
    border-radius: 4px;
    background: rgba(255,85,69,0.05);
}
.cow-hero h1 {
    font-size: 47px;
    font-weight: 700;
    color: var(--text-white);
    line-height: 1.12;
    letter-spacing: -0.5px;
    margin-bottom: 22px;
}
.cow-hero h1 .hot { color: var(--red); }
.cow-hero .sub {
    font-size: 19px;
    color: var(--text-subtle);
    max-width: 740px;
    margin: 0 auto;
    line-height: 1.62;
}
.cow-hero .sub strong { color: var(--text-bright); font-weight: 600; }
.cow-rule {
    max-width: 1080px;
    height: 2px;
    margin: 34px auto 0;
    background: linear-gradient(90deg, transparent, rgba(78,236,200,0.5) 22%, rgba(255,85,69,0.5) 78%, transparent);
}

/* ── ORIENTATION + VERIFY NOTE ──────────────────── */
.cow-intro {
    max-width: 1080px;
    margin: 34px auto 0;
    padding: 0 36px;
}
.cow-note {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--blue);
    border-radius: 6px;
    padding: 20px 24px;
    margin: 18px 0;
}
.cow-note p { font-size: 16px; color: var(--text); margin-bottom: 10px; }
.cow-note p:last-child { margin-bottom: 0; }
.cow-note strong { color: var(--text-bright); }
.cow-note .lede { font-size: 16.5px; }

/* legend chips */
.cow-legend { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 14px; }
.cow-legend .li {
    display: flex; align-items: baseline; gap: 9px;
    font-size: 13.5px; color: var(--text-subtle);
}
.cow-legend .li b { color: var(--text-bright); font-weight: 600; }

/* ── TIER BADGES ────────────────────────────────── */
.tier {
    display: inline-flex; align-items: center; justify-content: center;
    font-family: var(--mono);
    font-size: 12px; line-height: 1;
    padding: 3px 6px;
    border-radius: 3px;
    border: 1px solid var(--border);
    vertical-align: middle;
}
.tier-lock   { color: var(--green);  border-color: rgba(78,236,200,0.4);  background: rgba(78,236,200,0.07); }
.tier-diamond{ color: var(--gold);   border-color: rgba(255,183,50,0.4);  background: rgba(255,183,50,0.07); }
.tier-tri    { color: var(--purple); border-color: rgba(185,144,230,0.4); background: rgba(185,144,230,0.07); }

/* ── STICKY JUMP NAV ────────────────────────────── */
.cow-jump {
    position: sticky;
    top: 0;
    z-index: 90;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 9px 18px;
    margin-top: 30px;
    background: rgba(12,12,18,0.93);
    backdrop-filter: blur(8px);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.cow-jump a {
    font-family: var(--mono);
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-subtle);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-decoration: none;
    padding: 4px 11px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--card);
    transition: all 0.18s;
    white-space: nowrap;
}
.cow-jump a:hover { color: var(--text-white); border-color: var(--blue); background: rgba(58,134,186,0.12); }

/* ── MAIN CONTENT ───────────────────────────────── */
.cow-main { max-width: 1080px; margin: 0 auto; padding: 14px 36px 90px; }

/* section heading */
.cow-sec { margin: 64px 0 0; scroll-margin-top: 58px; }
.cow-sec-kicker {
    font-family: var(--mono);
    font-size: 13px;
    font-weight: 700;
    color: var(--red);
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 10px;
}
.cow-sec h2 {
    font-size: 30px;
    font-weight: 700;
    color: var(--text-white);
    line-height: 1.22;
    margin-bottom: 12px;
}
.cow-sec .deck {
    font-size: 16.5px;
    color: var(--text-subtle);
    max-width: 820px;
    line-height: 1.6;
    margin-bottom: 8px;
}
.cow-sec .deck strong { color: var(--text-bright); }

/* theme header (T1..T10) */
.cow-theme { margin-top: 54px; scroll-margin-top: 58px; }
.cow-theme-head {
    display: flex; align-items: flex-start; gap: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 8px;
}
.cow-theme-tag {
    flex: 0 0 auto;
    font-family: var(--mono);
    font-size: 18px;
    font-weight: 700;
    color: #000;
    background: var(--gold);
    border-radius: 5px;
    padding: 7px 12px;
    line-height: 1;
    min-width: 52px;
    text-align: center;
}
.cow-theme-title { font-size: 21px; font-weight: 700; color: var(--text-white); line-height: 1.3; }
.cow-theme-title .arrow { color: var(--red); font-weight: 700; }
.cow-theme-sub { font-size: 14px; color: var(--text-dim); margin-top: 4px; font-family: var(--mono); letter-spacing: 0.5px; }
.cow-divider {
    font-family: var(--mono);
    font-size: 13px;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 1px;
    margin: 26px 0 6px;
    padding-bottom: 7px;
    border-bottom: 1px dashed rgba(255,183,50,0.3);
}

/* ── INVERSION SPLIT-SCREEN ─────────────────────── */
.cow-inv {
    display: grid;
    grid-template-columns: 1fr 1.12fr;
    gap: 14px 16px;
    margin: 20px 0;
}
.cow-real, .cow-spin {
    border-radius: 7px;
    padding: 16px 19px;
    border: 1px solid var(--border);
}
.cow-real {
    background: linear-gradient(180deg, rgba(78,236,200,0.05), rgba(78,236,200,0.015));
    border-color: rgba(78,236,200,0.26);
}
.cow-spin {
    background: linear-gradient(180deg, rgba(255,85,69,0.055), rgba(255,85,69,0.015));
    border-color: rgba(255,85,69,0.28);
}
.cow-real-h, .cow-spin-h {
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 11px;
    padding-bottom: 9px;
    border-bottom: 1px solid var(--border-dim);
}
.cow-real-h { color: var(--green); }
.cow-spin-h { color: var(--red); }
.cow-real p {
    font-size: 16px;
    color: var(--text);
    line-height: 1.62;
}
.cow-real p + p { margin-top: 10px; }
.cow-real strong { color: var(--text-bright); font-weight: 600; }
.cow-real .src {
    display: block;
    margin-top: 12px;
    font-family: var(--mono);
    font-size: 12.5px;
    color: var(--text-dim);
    line-height: 1.5;
}

/* the verbatim quote — primary content */
.cow-q {
    font-size: 16.5px;
    color: var(--text-bright);
    line-height: 1.66;
    font-style: normal;
    position: relative;
    padding-left: 2px;
}
.cow-q .cow-em {
    font-weight: 700;
    color: var(--text-white);
    box-shadow: inset 0 -2px 0 rgba(255,85,69,0.34);
}
.cow-q-line { display: block; margin-bottom: 8px; }
.cow-q-line:last-child { margin-bottom: 0; }
.cow-q .spk {
    font-family: var(--mono); font-size: 12px; font-weight: 700;
    color: var(--gold); letter-spacing: 0.5px; margin-right: 6px;
}
.cow-q .spk.court { color: var(--blue); }
.cow-then {
    display: inline-block; font-family: var(--mono); font-size: 12px; font-weight: 700;
    color: var(--red); letter-spacing: 1px; margin: 0 5px;
}
.cow-q-after { margin-top: 10px; font-size: 15px; color: var(--text-subtle); line-height: 1.55; }
.cow-q-after .cow-em { font-weight: 700; color: var(--text-bright); }
.cow-cite {
    margin-top: 13px;
    padding-top: 11px;
    border-top: 1px solid var(--border-dim);
    font-family: var(--mono);
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.55;
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
}
.cow-cite .who { color: var(--text-bright); font-weight: 600; }
.cow-cite .pg  { color: var(--red); font-weight: 600; }
.cow-cite .doc { color: var(--text-subtle); }
.cow-caveat {
    margin-top: 9px;
    font-size: 13px;
    color: var(--gold);
    line-height: 1.5;
    font-family: var(--mono);
}
.cow-caveat::before { content: "⚠ "; }

/* source button row — spans both columns, full-width viewer */
.cow-src { grid-column: 1 / -1; margin-top: 2px; }

/* keep np-tabs single buttons left-aligned & accent-tied to the "relabel" side */
.cow-src .np-tabs { grid-template-columns: 1fr; }
.cow-src .np-tab {
    justify-content: flex-start;
    text-align: left;
    text-transform: none;
    letter-spacing: 0.3px;
    font-size: 12.5px;
    color: var(--text-subtle);
    border-color: var(--border);
    border-left: 3px solid rgba(255,85,69,0.55);
    padding: 9px 14px;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    min-height: 38px;
}
.cow-src .np-tab::before { content: "▸ VIEW THE FILED PAGE  ·  "; color: var(--red); font-weight: 700; letter-spacing: 1px; }
.cow-src .np-tab:hover { color: var(--text-white); background: rgba(255,85,69,0.08); border-left-color: var(--red); }
.cow-src .np-tab.active { color: #000; background: var(--text-subtle); }

@media (max-width: 860px) {
    .cow-inv { grid-template-columns: 1fr; }
}

/* ── STRONGEST 10 (marquee) ─────────────────────── */
.cow-strong { counter-reset: strong; }
.cow-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 9px;
    padding: 18px 20px 20px;
    margin: 18px 0;
    position: relative;
}
.cow-card::before {
    counter-increment: strong;
    content: counter(strong);
    position: absolute;
    top: -14px; left: 18px;
    font-family: var(--mono);
    font-size: 15px;
    font-weight: 700;
    color: #000;
    background: var(--red);
    border-radius: 5px;
    padding: 4px 11px;
    line-height: 1;
    box-shadow: 0 2px 10px rgba(0,0,0,0.4);
}
.cow-card .cow-cardtitle {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-white);
    line-height: 1.32;
    margin: 8px 0 4px;
    padding-left: 2px;
}
.cow-card .cow-cardtitle .flag {
    font-family: var(--mono); font-size: 11px; font-weight: 700;
    color: var(--gold); letter-spacing: 1px;
    border: 1px solid rgba(255,183,50,0.4); border-radius: 3px;
    padding: 2px 6px; margin-left: 8px; vertical-align: middle;
    white-space: nowrap;
}
.cow-card .cow-themetags {
    font-family: var(--mono); font-size: 12px; color: var(--text-muted);
    letter-spacing: 1px; margin-bottom: 12px; padding-left: 2px;
}
.cow-card .cow-inv { margin-bottom: 0; }

/* "just outside the 10" note */
.cow-outside {
    background: var(--card);
    border: 1px solid var(--border-dim);
    border-radius: 7px;
    padding: 16px 20px;
    margin-top: 22px;
    font-size: 15px;
    color: var(--text-subtle);
    line-height: 1.65;
}
.cow-outside b { color: var(--text-bright); }
.cow-outside .hd {
    font-family: var(--mono); font-size: 12px; font-weight: 700;
    color: var(--text-dim); letter-spacing: 2px; text-transform: uppercase;
    margin-bottom: 8px;
}

/* ── CONTRAST BLOCK (emails / Guertin on record — INPUT) ─ */
.cow-contrast {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--blue);
    border-radius: 7px;
    padding: 20px 22px;
    margin: 20px 0;
}
.cow-contrast .ct-h {
    font-family: var(--mono); font-size: 12px; font-weight: 700;
    color: var(--blue); letter-spacing: 2px; text-transform: uppercase;
    margin-bottom: 6px;
}
.cow-contrast .ct-note { font-size: 15px; color: var(--text-subtle); line-height: 1.6; margin-bottom: 14px; }
.cow-contrast .ct-note strong { color: var(--text-bright); }
.cow-msg {
    border-top: 1px solid var(--border-dim);
    padding: 13px 0 3px;
}
.cow-msg .from {
    font-family: var(--mono); font-size: 12.5px; font-weight: 700;
    color: var(--text-bright); letter-spacing: 0.5px; margin-bottom: 6px;
}
.cow-msg .from .meta { color: var(--text-muted); font-weight: 400; }
.cow-msg .body { font-size: 15.5px; color: var(--text); line-height: 1.64; }
.cow-msg .body .cow-em { font-weight: 700; color: var(--text-white); }
.cow-msg .gloss { display:block; margin-top: 5px; font-size: 13px; color: var(--text-dim); font-style: italic; }
.cow-linkout {
    display: inline-flex; align-items: center; gap: 8px;
    margin-top: 16px;
    font-family: var(--mono); font-size: 13px; font-weight: 700;
    color: var(--blue); text-decoration: none; letter-spacing: 0.5px;
    padding: 9px 16px; border: 1px solid rgba(58,134,186,0.45); border-radius: 5px;
    background: rgba(58,134,186,0.06); transition: all 0.18s;
}
.cow-linkout:hover { color: var(--text-white); border-color: var(--blue); background: rgba(58,134,186,0.14); }

/* ── REBUTTAL RECEIPTS (report analysis ◆) ──────── */
.cow-receipts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 20px 0; }
@media (max-width: 760px) { .cow-receipts { grid-template-columns: 1fr; } }
.cow-receipt {
    background: linear-gradient(180deg, rgba(255,183,50,0.045), transparent);
    border: 1px solid var(--border);
    border-top: 2px solid rgba(255,183,50,0.5);
    border-radius: 7px;
    padding: 16px 18px;
}
.cow-receipt .rc-claim {
    font-size: 16px; font-weight: 700; color: var(--text-white);
    line-height: 1.4; margin-bottom: 9px;
}
.cow-receipt .rc-body { font-size: 14.5px; color: var(--text); line-height: 1.6; }
.cow-receipt .rc-body em { color: var(--text-bright); font-style: normal; font-weight: 600; }
.cow-receipt .rc-cite {
    margin-top: 11px; padding-top: 9px; border-top: 1px solid var(--border-dim);
    font-family: var(--mono); font-size: 12px; color: var(--text-dim); line-height: 1.5;
}

/* ── SYSTEMIC TERMINUS ──────────────────────────── */
.cow-terminus {
    background: linear-gradient(180deg, rgba(255,85,69,0.06), var(--surface));
    border: 1px solid rgba(255,85,69,0.3);
    border-radius: 9px;
    padding: 24px 26px;
    margin: 20px 0;
}
.cow-terminus .tm-stats { display: flex; flex-wrap: wrap; gap: 30px; margin-bottom: 16px; }
.cow-terminus .tm-stat .n { font-family: var(--mono); font-size: 34px; font-weight: 700; color: var(--red); line-height: 1; }
.cow-terminus .tm-stat .l { font-size: 13px; color: var(--text-subtle); margin-top: 6px; max-width: 200px; line-height: 1.4; }
.cow-terminus .tm-q { font-size: 16px; color: var(--text); line-height: 1.62; }
.cow-terminus .tm-q em { color: var(--text-bright); font-style: normal; }
.cow-terminus .rc-cite {
    margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border-dim);
    font-family: var(--mono); font-size: 12px; color: var(--text-dim);
}

/* ── MARCH 5 ARC ────────────────────────────────── */
.cow-arc { counter-reset: arc; margin: 18px 0; }
.cow-step {
    display: grid; grid-template-columns: 40px 1fr; gap: 16px;
    padding: 14px 0;
    border-top: 1px solid var(--border-dim);
}
.cow-step::before {
    counter-increment: arc;
    content: counter(arc);
    font-family: var(--mono); font-size: 16px; font-weight: 700;
    color: var(--gold); align-self: start;
    border: 1px solid rgba(255,183,50,0.4); border-radius: 5px;
    width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
}
.cow-step .st-role { font-family: var(--mono); font-size: 12.5px; font-weight: 700; color: var(--text-bright); letter-spacing: 0.5px; margin-bottom: 5px; }
.cow-step .st-body { font-size: 15.5px; color: var(--text); line-height: 1.62; }
.cow-step .st-body .cow-em { font-weight: 700; color: var(--text-white); }
.cow-step .st-body .tr { color: var(--text-muted); font-family: var(--mono); font-size: 12.5px; }

/* ── MARQUEE FEATURE (predetermination) ─────────── */
.cow-feature {
    background: linear-gradient(135deg, rgba(255,85,69,0.09), rgba(12,12,18,0.5));
    border: 1px solid rgba(255,85,69,0.4);
    border-radius: 10px;
    padding: 28px 30px;
    margin: 22px 0;
    text-align: center;
}
.cow-feature .fq {
    font-size: 27px; font-weight: 700; color: var(--text-white);
    line-height: 1.32; letter-spacing: -0.3px; max-width: 760px; margin: 0 auto 14px;
}
.cow-feature .fq .cow-em { color: var(--red); box-shadow: none; }
.cow-feature .fmeta { font-size: 15.5px; color: var(--text-subtle); line-height: 1.6; max-width: 720px; margin: 0 auto 6px; }
.cow-feature .fcite { font-family: var(--mono); font-size: 13px; color: var(--text-dim); margin-top: 6px; }
.cow-feature .cow-src { max-width: 760px; margin: 16px auto 0; }

/* ◆ link-out to the Reports corpus (analysis layer — distinct from 🔒 inline viewers) */
.cow-rep-link {
    display: inline-flex; align-items: center; gap: 7px;
    margin-top: 10px;
    font-family: var(--mono); font-size: 12px; font-weight: 600;
    color: var(--gold); text-decoration: none; letter-spacing: 0.3px;
    padding: 6px 12px; border: 1px solid rgba(255,183,50,0.35); border-radius: 4px;
    background: rgba(255,183,50,0.05); transition: all 0.16s;
}
.cow-rep-link:hover { color: var(--text-white); border-color: var(--gold); background: rgba(255,183,50,0.12); }
.cow-rep-link .d { color: var(--gold); }

/* March-5 provenance + tier notes */
.cow-prov {
    background: var(--card);
    border: 1px solid var(--border-dim);
    border-left: 3px solid var(--gold);
    border-radius: 6px;
    padding: 14px 18px; margin: 14px 0 18px;
    font-size: 14px; color: var(--text-subtle); line-height: 1.6;
}
.cow-prov strong { color: var(--text-bright); }
.cow-tiernote {
    margin: 16px 0 6px;
    font-family: var(--mono); font-size: 13px; color: var(--text-subtle); line-height: 1.6;
    padding: 12px 16px; border: 1px dashed var(--border); border-radius: 6px;
}
.cow-tiernote .tier { margin-right: 4px; }

/* ── SOURCE LIBRARY ─────────────────────────────── */
.cow-srclib { margin: 22px 0 0; }
.cow-srclib .np-tabs {
    display: flex; flex-direction: column; gap: 6px;
    grid-template-columns: none;
}
.cow-srclib .np-tab {
    justify-content: flex-start; text-align: left; text-transform: none;
    white-space: normal; overflow: visible; text-overflow: clip;
    letter-spacing: 0.3px; font-size: 13px;
    color: var(--text-subtle); border-color: var(--border);
    border-left: 3px solid rgba(58,134,186,0.6);
    padding: 11px 15px; min-height: 42px;
}
.cow-srclib .np-tab::before { content: "▸ "; color: var(--blue); font-weight: 700; }
.cow-srclib .np-tab:hover { color: var(--text-white); background: rgba(58,134,186,0.10); border-left-color: var(--blue); }
.cow-srclib .np-tab.active { color: #000; background: var(--text-subtle); }

/* ── FOOTER ─────────────────────────────────────── */
.cow-foot {
    max-width: 1080px; margin: 60px auto 0; padding: 26px 36px 50px;
    border-top: 1px solid var(--border);
    font-size: 13.5px; color: var(--text-muted); line-height: 1.7;
}
.cow-foot a { color: var(--blue); text-decoration: none; }
.cow-foot a:hover { color: var(--text-white); }

@media (max-width: 620px) {
    .cow-hero h1 { font-size: 33px; }
    .cow-hero .sub { font-size: 17px; }
    .cow-sec h2 { font-size: 24px; }
    .cow-feature .fq { font-size: 21px; }
    .cow-main, .cow-hero, .cow-intro { padding-left: 20px; padding-right: 20px; }
    .cow-wrap { padding: 0 20px; }
}

/* ═══════════════════════════════════════════════════════════════
   NP-TABS  — lifted verbatim from /story/calls-for-help.html
   (exclusive-toggle source-PDF viewers; deep-links honored by np-tabs.js)
   ═══════════════════════════════════════════════════════════════ */
.np-block { margin: 26px 0; }
.np-tabs {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
}
.np-tabs.cols-3 { grid-template-columns: repeat(3, 1fr); }
.np-tabs.cols-2 { grid-template-columns: repeat(2, 1fr); }
.np-tab {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 700;
    color: #cccccc;
    background: var(--card);
    border: 1px solid #cccccc;
    border-radius: 4px;
    padding: 7px 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
    min-height: 35px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.np-tab:hover {
    color: var(--text-white);
    background: rgba(204,204,204,0.10);
}
.np-tab.active {
    color: #000;
    background: #cccccc;
}
.np-viewer {
    display: none;
    width: 100%;
    margin-top: 6px;
    background: var(--card);
    border: 1px solid #cccccc;
    border-radius: 4px;
    overflow: hidden;
}
.np-viewer.open { display: block; }
.np-viewer > iframe {
    display: block;
    width: 100%;
    height: 760px;
    border: 0;
    background: #1a1a2a;
}
.np-viewer > img {
    display: block;
    width: 100%;
    height: auto;
    background: #1a1a2a;
}
.np-viewer > iframe, .np-viewer > img { display: none; }
.np-viewer.open > iframe[data-active], .np-viewer.open > img[data-active] { display: block; }

/* ── Wide-tab variants (6+ buttons) ── */
.np-tabs.cols-6,
.np-tabs.cols-7 {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    grid-template-columns: none;
}
.np-tabs.cols-6 .np-tab,
.np-tabs.cols-7 .np-tab {
    flex: 1 1 auto;
    min-width: 0;
    white-space: normal;
    line-height: 1.2;
    padding: 8px 12px;
    letter-spacing: 1px;
    font-size: 10.5px;
}

/* ── CSV-driven content (PDF list / image grid / lightbox) ── */
.np-csv-content {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: var(--surface);
}
.np-loading {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--text-muted);
    padding: 20px;
    letter-spacing: 1px;
}

/* PDF nested-card list (scrollable) */
.np-card-list {
    position: absolute; inset: 0;
    overflow-y: auto;
    padding: 8px;
    display: flex; flex-direction: column; gap: 4px;
}
.np-card {
    font-family: var(--mono);
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    background: var(--card);
    border: 1px solid var(--border);
    border-left: 3px solid #cccccc;
    border-radius: 4px;
    padding: 10px 14px;
    text-align: left;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
    width: 100%;
    min-height: 40px;
    display: flex;
    align-items: center;
}
.np-card:hover { background: var(--elevated); border-color: #cccccc; color: var(--text-white); }
.np-card.active { background: var(--bg); color: #cccccc; border-color: #cccccc; }

/* Active-card overlay */
.np-card-overlay {
    position: absolute; inset: 0;
    display: none;
    flex-direction: column;
    background: var(--surface);
    z-index: 1;
}
.np-card-overlay.open { display: flex; }
.np-card-active {
    flex: 0 0 auto;
    margin: 8px 8px 4px;
    background: var(--bg) !important;
    border-color: #cccccc !important;
    color: #cccccc !important;
}
.np-pdf-frame {
    flex: 1 1 auto;
    width: 100%;
    border: 0;
    background: #1a1a2a;
}

/* Single-file passthrough */
.np-csv-content.np-single { overflow-y: auto; }
.np-single-img {
    display: block;
    width: 100%;
    height: auto;
    background: #1a1a2a;
    cursor: zoom-in;
}
.np-csv-content.np-single > .np-pdf-frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
.np-single-video {
    display: block;
    width: 100%;
    height: 100%;
    max-height: 100%;
    object-fit: contain;
    background: #000;
}
.np-embed-wrap { padding: 0; background: #000; }
.np-embed-wrap iframe { max-width: 100%; }

/* Image grid */
.np-img-grid {
    position: absolute; inset: 0;
    display: grid;
    gap: 6px;
    padding: 8px;
    overflow-y: auto;
}
.np-img-grid.cols-1 { grid-template-columns: 1fr; }
.np-img-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.np-img-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.np-img-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.np-img-grid.cols-5 { grid-template-columns: repeat(5, 1fr); }
div.np-img-thumb {
    aspect-ratio: 4 / 3;
    background-color: #1a1a2a;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: zoom-in;
    transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}
img.np-img-thumb {
    display: block;
    width: 100%;
    height: auto;
    background-color: #1a1a2a;
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: zoom-in;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.np-img-thumb:hover {
    border-color: #cccccc;
    box-shadow: 0 6px 18px rgba(204,204,204,0.18);
}
div.np-img-thumb:hover {
    transform: scale(1.02);
    z-index: 2;
    position: relative;
}

/* Fullscreen image lightbox */
.np-lightbox {
    position: fixed; inset: 0;
    display: none;
    z-index: 9999;
    background: rgba(0,0,0,0.94);
    align-items: center; justify-content: center;
}
.np-lightbox.open { display: flex; }
.np-lightbox .lb-img {
    max-width: 92vw; max-height: 88vh;
    display: block;
    background: #fff;
    border-radius: 4px;
}
.np-lightbox .lb-prev,
.np-lightbox .lb-next,
.np-lightbox .lb-close {
    position: absolute;
    width: 50px; height: 50px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    color: #fff;
    font-family: var(--mono);
    font-size: 26px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s, border-color 0.15s;
}
.np-lightbox .lb-prev:hover,
.np-lightbox .lb-next:hover,
.np-lightbox .lb-close:hover { background: rgba(255,255,255,0.18); border-color: rgba(255,255,255,0.35); }
.np-lightbox .lb-prev  { left: 24px; top: 50%; transform: translateY(-50%); }
.np-lightbox .lb-next  { right: 24px; top: 50%; transform: translateY(-50%); }
.np-lightbox .lb-close { top: 18px; right: 18px; font-size: 24px; }
.np-lightbox .lb-counter {
    position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%);
    font-family: var(--mono); font-size: 12px; color: rgba(255,255,255,0.65); letter-spacing: 2px;
}

@media (max-width: 820px) {
    .np-tabs { grid-template-columns: repeat(3, 1fr); }
    .np-tabs.cols-3 { grid-template-columns: repeat(3, 1fr); }
    .np-tabs.cols-6,
    .np-tabs.cols-7 { flex-wrap: wrap; }
    .np-tab { font-size: 10px; padding: 6px 8px; letter-spacing: 1px; }
    .np-viewer > iframe { height: 560px; }
    .cow-src .np-tab { font-size: 11.5px; }
}
@media (max-width: 520px) {
    .np-tabs { grid-template-columns: 1fr 1fr; gap: 4px; }
    .np-tabs.cols-3 { grid-template-columns: 1fr 1fr 1fr; gap: 4px; }
    .cow-src .np-tabs { grid-template-columns: 1fr; }
    .np-img-grid.cols-3, .np-img-grid.cols-4, .np-img-grid.cols-5 { grid-template-columns: repeat(2, 1fr); }
    .np-lightbox .lb-prev  { left: 8px; width: 40px; height: 40px; font-size: 22px; }
    .np-lightbox .lb-next  { right: 8px; width: 40px; height: 40px; font-size: 22px; }
}
