:root {
    --cl-blue: #3478f6;
    --cl-cyan: #49d8ff;
    --cl-red: #ff334f;
    --cl-ink: #05080d;
    --cl-panel: #0b111a;
    --cl-line: #26374d;
    --cl-text: #f7f9ff;
    --cl-muted: #aebbd0;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.custody-library,
.custody-reader {
    color: var(--cl-text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.custody-library {
    position: relative;
    width: min(1480px, calc(100% - 40px));
    margin: 72px auto;
    padding: clamp(26px, 4vw, 58px);
    overflow: hidden;
    background:
        linear-gradient(rgba(73, 216, 255, .028) 1px, transparent 1px),
        linear-gradient(90deg, rgba(73, 216, 255, .028) 1px, transparent 1px),
        radial-gradient(circle at 88% 8%, rgba(52, 120, 246, .18), transparent 34%),
        linear-gradient(145deg, #0b111a, #05080d 72%);
    background-size: 36px 36px, 36px 36px, auto, auto;
    border: 1px solid #30445f;
    border-radius: 30px;
    box-shadow: 0 35px 110px rgba(0, 0, 0, .55), inset 0 1px rgba(255, 255, 255, .04);
}

.custody-library::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 48%;
    height: 3px;
    background: linear-gradient(90deg, var(--cl-cyan), var(--cl-blue), transparent);
    box-shadow: 0 0 24px rgba(73, 216, 255, .65);
}

.custody-library__glow {
    position: absolute;
    width: 420px;
    height: 420px;
    right: -260px;
    top: -250px;
    border: 1px solid rgba(73, 216, 255, .18);
    border-radius: 50%;
    box-shadow: 0 0 0 48px rgba(52, 120, 246, .03), 0 0 0 96px rgba(52, 120, 246, .025);
    pointer-events: none;
}

.custody-library__header {
    position: relative;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 32px;
    padding-bottom: 34px;
}

.custody-library__eyebrow,
.custody-reader-article__type,
.custody-reader-article__status,
.custody-reader-article__section-no {
    color: #72a9ff;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 2.8px;
    text-transform: uppercase;
}

.custody-library__header h2 {
    max-width: 850px;
    margin: 12px 0 10px;
    font-size: clamp(38px, 5vw, 74px);
    line-height: .96;
    letter-spacing: -2.5px;
}

.custody-library__header p {
    max-width: 760px;
    margin: 0;
    color: var(--cl-muted);
    font-size: clamp(16px, 1.4vw, 20px);
    line-height: 1.65;
}

.custody-library__counter {
    display: grid;
    min-width: 142px;
    padding: 18px;
    text-align: right;
    background: rgba(6, 12, 21, .75);
    border: 1px solid #304868;
    border-radius: 16px;
}

.custody-library__counter strong {
    color: #76a9ff;
    font-size: 34px;
    line-height: 1;
}

.custody-library__counter span {
    margin-top: 7px;
    color: #8594aa;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

.custody-library__controls {
    position: relative;
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
    gap: 14px;
    padding: 15px;
    background: rgba(3, 7, 12, .82);
    border: 1px solid #25364d;
    border-radius: 18px;
}

.custody-library__search {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 15px;
    background: #0b121d;
    border: 1px solid #2b405d;
    border-radius: 11px;
}

.custody-library__search > span:not(.sr-only) {
    color: #6fa8ff;
    font-size: 23px;
}

.custody-library__search input {
    width: 100%;
    min-height: 48px;
    color: white;
    font: inherit;
    background: transparent;
    border: 0;
    outline: 0;
}

.custody-library__search:focus-within {
    border-color: var(--cl-cyan);
    box-shadow: 0 0 0 3px rgba(73, 216, 255, .1);
}

.custody-library__filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: end;
    gap: 7px;
}

.custody-library__filters button {
    min-height: 48px;
    padding: 0 15px;
    color: #9eacc1;
    font: inherit;
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
    background: #0b121d;
    border: 1px solid #263a55;
    border-radius: 10px;
    cursor: pointer;
}

.custody-library__filters button:hover,
.custody-library__filters button:focus-visible,
.custody-library__filters button.is-active {
    color: white;
    background: linear-gradient(135deg, #3478f6, #1e4fb4);
    border-color: #6ea2ff;
}

.custody-library__status {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 4px 18px;
    color: #8698b1;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.custody-library__status span:first-child {
    display: flex;
    align-items: center;
    gap: 9px;
}

.custody-library__status i,
.custody-reader-article__status i {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #45db98;
    border-radius: 50%;
    box-shadow: 0 0 14px #45db98;
    animation: custody-pulse 1.8s ease-in-out infinite;
}

.custody-library__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.custody-library-card {
    position: relative;
    display: grid;
    grid-template-columns: minmax(190px, .72fr) minmax(0, 1.28fr);
    min-height: 350px;
    overflow: hidden;
    background: linear-gradient(145deg, #111b2a, #080d15 68%);
    border: 1px solid #345174;
    border-radius: 20px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .34);
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.custody-library-card--featured {
    grid-column: 1 / -1;
}

.custody-library-card:hover {
    transform: translateY(-4px);
    border-color: #5c96f4;
    box-shadow: 0 26px 70px rgba(0, 0, 0, .5), 0 0 28px rgba(52, 120, 246, .12);
}

.custody-library-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .08) 46%, transparent 60%);
    transform: translateX(-130%);
    pointer-events: none;
}

.custody-library-card:hover::after {
    animation: custody-scan 1s ease;
}

.custody-library-card__visual {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: end;
    min-height: 350px;
    padding: 0;
    overflow: hidden;
    background: #07101a;
    border-right: 1px solid #2d496d;
}

.custody-library-card__visual::before,
.custody-library-card__visual::after {
    display: none;
    content: none;
}

.custody-library-card__feature-image {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 43% center;
    transform: scale(1.01);
    transition: transform .5s ease, filter .5s ease;
}

.custody-library-card:hover .custody-library-card__feature-image {
    transform: scale(1.035);
    filter: saturate(1.06) contrast(1.03);
}

.custody-library-card__image-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(3, 7, 12, .1) 35%, rgba(3, 7, 12, .88) 100%),
        linear-gradient(90deg, transparent 65%, rgba(3, 8, 14, .32));
    pointer-events: none;
}

.custody-library-card__index {
    position: absolute;
    top: 20px;
    left: 20px;
    padding: 7px 9px;
    color: #d8e7ff;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 2px;
    background: rgba(4, 10, 18, .75);
    border: 1px solid rgba(120, 173, 255, .45);
    border-radius: 999px;
    backdrop-filter: blur(8px);
}

.custody-library-card__visual-caption {
    position: absolute;
    z-index: 1;
    right: 22px;
    bottom: 22px;
    left: 22px;
    display: grid;
    gap: 5px;
}

.custody-library-card__visual-caption strong {
    color: white;
    font-size: clamp(20px, 2.2vw, 31px);
    line-height: 1;
    letter-spacing: -1px;
}

.custody-library-card__visual-caption small {
    color: #94bfff;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 1.8px;
}

.custody-library-card__body {
    display: flex;
    flex-direction: column;
    padding: clamp(24px, 4vw, 48px);
}

.custody-library-card__meta,
.custody-library-card__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.custody-library-card__meta {
    color: #8496b1;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 1.4px;
    text-transform: uppercase;
}

.custody-library-card__meta span {
    color: #6ea6ff;
}

.custody-library-card__body h3 {
    max-width: 920px;
    margin: 21px 0 16px;
    font-size: clamp(28px, 3.4vw, 52px);
    line-height: 1;
    letter-spacing: -1.8px;
}

.custody-library-card__body > p {
    max-width: 880px;
    margin: 0;
    color: #bac5d5;
    font-size: 17px;
    line-height: 1.65;
}

.custody-library-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0;
    margin: 22px 0;
    list-style: none;
}

.custody-library-card__tags li {
    padding: 7px 10px;
    color: #9eb5d5;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .5px;
    text-transform: uppercase;
    background: #0c1522;
    border: 1px solid #2a3e59;
    border-radius: 999px;
}

.custody-library-card__actions {
    margin-top: auto;
}

.custody-library-card__open,
.custody-reader-evidence__actions a,
.custody-reader-evidence__actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 50px;
    padding: 0 18px;
    color: white;
    font: inherit;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .8px;
    text-decoration: none;
    text-transform: uppercase;
    background: linear-gradient(135deg, #3478f6, #1d4eb5);
    border: 1px solid #6ea3ff;
    border-radius: 10px;
    box-shadow: 0 12px 28px rgba(52, 120, 246, .22);
    cursor: pointer;
}

.custody-library-card__open:hover,
.custody-library-card__open:focus-visible {
    background: linear-gradient(135deg, #4e8cff, #2863d9);
    transform: translateY(-1px);
}

.custody-library-card__actions > span {
    color: #7f91a9;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.custody-library__empty {
    display: grid;
    place-items: center;
    min-height: 230px;
    text-align: center;
    background: #080d15;
    border: 1px dashed #344962;
    border-radius: 18px;
}

.custody-library__empty[hidden] { display: none; }
.custody-library__empty strong { font-size: 24px; }
.custody-library__empty span { color: #94a5bb; }

.custody-library__scalable-note {
    margin: 24px 0 0;
    color: #6f829d;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    text-align: center;
    text-transform: uppercase;
}

/* Full-screen archive reader */
.custody-reader {
    width: 100vw;
    max-width: none;
    height: 100dvh;
    max-height: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: #05080d;
    border: 0;
}

.custody-reader[open] { display: grid; grid-template-rows: auto 1fr; }
.custody-reader::backdrop { background: rgba(0, 0, 0, .9); backdrop-filter: blur(10px); }

.custody-reader__topbar {
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 20px;
    min-height: 70px;
    padding: 0 clamp(18px, 4vw, 60px);
    background: rgba(4, 8, 14, .96);
    border-bottom: 1px solid #273950;
}

.custody-reader__brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    text-decoration: none;
}

.custody-reader__brand .custody-reader__logo {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    overflow: hidden;
    background: #05080d;
    border: 1px solid #4d73a5;
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(52, 120, 246, .22);
}

.custody-reader__logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.custody-reader__brand strong {
    font-size: 12px;
    letter-spacing: 1.8px;
    text-transform: uppercase;
}

.custody-reader__close {
    min-height: 42px;
    padding: 0 14px;
    color: #b9c6d9;
    font: inherit;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
    background: #0b1420;
    border: 1px solid #304663;
    border-radius: 9px;
    cursor: pointer;
}

.custody-reader__close span { margin-left: 8px; color: white; font-size: 20px; }
.custody-reader__close:hover { color: white; border-color: #6da3ff; }

.custody-reader__progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background: #111b29;
}

.custody-reader__progress span {
    display: block;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--cl-cyan), var(--cl-blue), var(--cl-red));
    box-shadow: 0 0 12px var(--cl-blue);
}

.custody-reader__viewport { overflow-y: auto; overscroll-behavior: contain; scroll-behavior: smooth; }

.custody-reader-article__hero {
    display: block !important;
    padding: clamp(58px, 7vw, 100px) max(6vw, calc((100vw - 1280px) / 2));
    background:
        radial-gradient(circle at 82% 20%, rgba(52, 120, 246, .23), transparent 30%),
        radial-gradient(circle at 18% 100%, rgba(255, 51, 79, .12), transparent 32%),
        linear-gradient(145deg, #0b1422, #05080d 70%);
    border-bottom: 1px solid #263950;
}

.custody-reader-article__hero-inner {
    display: block !important;
    width: min(100%, 1120px);
    margin: 0 auto;
}

.custody-reader-article__feature {
    position: relative;
    width: 100%;
    margin: 0 0 36px;
    overflow: hidden;
    background: #070c13;
    border: 1px solid #3b5679;
    border-radius: 22px;
    box-shadow:
        0 28px 80px rgba(0, 0, 0, .48),
        0 0 34px rgba(52, 120, 246, .12),
        inset 0 1px 0 rgba(255, 255, 255, .06);
}

.custody-reader-article__feature::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 58%, rgba(2, 6, 11, .82) 100%);
    pointer-events: none;
}

.custody-reader-article__feature img {
    display: block;
    width: 100%;
    max-height: 560px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    object-position: center;
}

.custody-reader-article__feature figcaption {
    position: absolute;
    z-index: 1;
    right: 24px;
    bottom: 20px;
    left: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    color: #dce6f5;
    font-size: 12px;
    font-weight: 750;
    letter-spacing: .25px;
}

.custody-reader-article__feature figcaption span {
    color: #7eafff;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 1.6px;
    text-transform: uppercase;
}

.custody-reader-article__layout--managed {
    display: block;
    width: min(1120px, calc(100% - 40px));
    margin-inline: auto;
}

.custody-reader-article__layout--managed .custody-reader-article__content {
    width: 100%;
    max-width: 920px;
    margin-inline: auto;
}

.custody-managed-story {
    color: #c8d5e7;
    font-size: clamp(17px, 1.45vw, 20px);
    line-height: 1.9;
    white-space: pre-line;
}

.custody-managed-video {
    position: relative;
    width: 100%;
    margin: 0 0 42px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #000;
    border: 1px solid #365f9b;
    border-radius: 20px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .48), 0 0 35px rgba(52, 120, 246, .14);
}

.custody-managed-video iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.custody-reader-article__badges {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin: 0 0 28px;
}

.custody-reader-article__badges > span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: auto;
    margin: 0;
    padding: 9px 12px;
    color: #a8b8ce;
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    background: rgba(7, 14, 24, .82);
    border: 1px solid #2d425f;
    border-radius: 999px;
}

.custody-reader-article__badges .custody-reader-article__status {
    color: #78acff;
    border-color: #3d6090;
}

.custody-reader-article__badges .custody-reader-article__verified {
    color: #68e3ab;
    border-color: rgba(69, 219, 152, .4);
}

.custody-reader-article__badges .custody-reader-article__type {
    color: #ff8192;
    border-color: rgba(255, 51, 79, .38);
}

.custody-reader-article__badges .custody-reader-article__discipline {
    color: #aabbd2;
}

.custody-reader-article__hero h2 {
    display: block !important;
    width: min(100%, 980px);
    max-width: 980px;
    margin: 0;
    font-size: clamp(40px, 5vw, 72px);
    line-height: .98;
    letter-spacing: clamp(-3.5px, -.3vw, -1.5px);
}

.custody-reader-article__dek {
    display: block !important;
    width: min(100%, 840px);
    max-width: 840px;
    margin: 24px 0 0;
    color: #b9c6d8;
    font-size: clamp(18px, 1.6vw, 23px);
    line-height: 1.6;
}

.custody-reader-article__byline {
    display: grid !important;
    grid-template-columns: 1.15fr 1.8fr .65fr .7fr;
    gap: 10px;
    width: min(100%, 1040px);
    margin: 38px 0 0;
}

.custody-reader-article__byline > div {
    display: grid;
    align-content: start;
    gap: 7px;
    min-width: 0;
    padding: 16px 17px;
    background: rgba(5, 11, 19, .72);
    border: 1px solid #293e5b;
    border-radius: 11px;
}

.custody-reader-article__byline small {
    color: #6f91c1;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 1.25px;
    text-transform: uppercase;
}

.custody-reader-article__byline strong {
    color: #dbe5f4;
    font-size: 12px;
    line-height: 1.45;
    letter-spacing: .15px;
}

.custody-reader-article__layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 860px);
    justify-content: center;
    gap: clamp(45px, 7vw, 110px);
    padding: clamp(54px, 8vw, 110px) 30px 130px;
}

.custody-reader-article__rail {
    position: sticky;
    top: 35px;
    align-self: start;
    display: grid;
    gap: 5px;
    padding: 18px;
    background: #080e17;
    border: 1px solid #273b57;
    border-radius: 14px;
}

.custody-reader-article__rail span {
    padding: 8px 10px 14px;
    color: #6e9de2;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.custody-reader-article__rail a {
    padding: 10px;
    color: #8ea0b9;
    font-size: 13px;
    text-decoration: none;
    border-radius: 7px;
}

.custody-reader-article__rail a:hover { color: white; background: #111d2d; }

.custody-reader-article__content section { scroll-margin-top: 35px; }

.custody-reader-article__content section + section {
    margin-top: 78px;
    padding-top: 62px;
    border-top: 1px solid #23334a;
}

.custody-reader-article__content p,
.custody-reader-article__content li {
    color: #c2cad6;
    font-size: clamp(17px, 1.5vw, 20px);
    line-height: 1.85;
}

.custody-reader-article__content p { margin: 0 0 24px; }
.custody-reader-article__content li + li { margin-top: 10px; }
.custody-reader-article__content ul { padding-left: 24px; margin: 25px 0 30px; }

.custody-reader-article__lead {
    color: white !important;
    font-size: clamp(22px, 2.4vw, 32px) !important;
    line-height: 1.6 !important;
}

.custody-reader-article__content h3 {
    margin: 10px 0 25px;
    color: white;
    font-size: clamp(32px, 4vw, 56px);
    line-height: 1.04;
    letter-spacing: -1.8px;
}

.custody-reader-callout {
    margin: 42px 0;
    padding: clamp(22px, 4vw, 36px);
    background: #0a1320;
    border: 1px solid #304a6e;
    border-left: 4px solid var(--cl-blue);
    border-radius: 14px;
}

.custody-reader-callout--red { border-color: #593342; border-left-color: var(--cl-red); background: #160b11; }

.custody-reader-callout > span {
    display: block;
    margin-bottom: 10px;
    color: #73aaff;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 1.7px;
    text-transform: uppercase;
}

.custody-reader-callout--red > span { color: #ff7588; }
.custody-reader-callout p { margin: 0; color: white; }

.custody-reader-action-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 30px 0;
}

.custody-reader-action-grid div {
    display: grid;
    gap: 8px;
    padding: 22px;
    background: #09111c;
    border: 1px solid #273d59;
    border-radius: 12px;
}

.custody-reader-action-grid strong { color: white; font-size: 16px; }
.custody-reader-action-grid span { color: #9eacc0; font-size: 14px; line-height: 1.6; }

.custody-reader-evidence {
    padding: clamp(25px, 5vw, 48px) !important;
    background: linear-gradient(145deg, #0d1828, #080d15);
    border: 1px solid #345176 !important;
    border-radius: 18px;
}

.custody-reader-evidence dl { margin: 35px 0; border-top: 1px solid #2a405e; }
.custody-reader-evidence dl > div { display: grid; grid-template-columns: 140px 1fr; gap: 20px; padding: 15px 0; border-bottom: 1px solid #22344c; }
.custody-reader-evidence dt { color: #7caaff; font-size: 10px; font-weight: 900; letter-spacing: 1px; text-transform: uppercase; }
.custody-reader-evidence dd { margin: 0; color: #d4dbe6; font-size: 14px; line-height: 1.5; }

.custody-reader-evidence__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.custody-reader-evidence__actions button { background: #111b2a; border-color: #3a526f; }

.custody-reader-article__disclaimer {
    margin-top: 56px;
    padding: 24px 0 0;
    border-top: 1px solid #27374d;
}

.custody-reader-article__disclaimer strong { color: #ffcb68; font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase; }
.custody-reader-article__disclaimer p { margin-top: 10px; color: #8292a8; font-size: 14px; line-height: 1.7; }

body.custody-reader-is-open { overflow: hidden; }

@keyframes custody-scan { to { transform: translateX(130%); } }
@keyframes custody-pulse { 50% { opacity: .35; transform: scale(.75); } }
@keyframes custody-signal { to { opacity: .35; transform: scaleY(.7); } }

@media (max-width: 980px) {
    .custody-library__controls { grid-template-columns: 1fr; }
    .custody-library__filters { justify-content: start; }
    .custody-library-card { grid-template-columns: 1fr; }
    .custody-library-card__visual { min-height: 330px; border-right: 0; border-bottom: 1px solid #2d496d; }
    .custody-reader-article__layout { grid-template-columns: minmax(0, 760px); }
    .custody-reader-article__rail { display: none; }
    .custody-reader-article__byline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    .custody-library { width: calc(100% - 20px); margin: 42px auto; padding: 22px 14px; border-radius: 20px; }
    .custody-library__header { align-items: start; flex-direction: column; }
    .custody-library__counter { min-width: 110px; text-align: left; }
    .custody-library__filters { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
    .custody-library__filters button { flex: 0 0 auto; }
    .custody-library__status { align-items: start; flex-direction: column; }
    .custody-library-card__body { padding: 24px 20px; }
    .custody-library-card__meta, .custody-library-card__actions { align-items: start; flex-direction: column; }
    .custody-library-card__open { width: 100%; }
    .custody-reader__topbar { grid-template-columns: 1fr auto; min-height: 62px; padding: 0 12px; }
    .custody-reader__brand strong { display: none; }
    .custody-reader__close { font-size: 0; }
    .custody-reader__close span { margin: 0; font-size: 24px; }
    .custody-reader-article__hero { padding: 54px 22px; }
    .custody-reader-article__feature { margin-bottom: 28px; border-radius: 15px; }
    .custody-reader-article__feature figcaption { right: 15px; bottom: 13px; left: 15px; align-items: flex-start; flex-direction: column; gap: 3px; }
    .custody-reader-article__badges { margin-bottom: 22px; }
    .custody-reader-article__badges > span { padding: 8px 10px; font-size: 9px; }
    .custody-reader-article__hero h2 { font-size: clamp(38px, 12vw, 54px); }
    .custody-reader-article__byline { grid-template-columns: 1fr; margin-top: 28px; }
    .custody-reader-article__layout { padding: 45px 20px 90px; }
    .custody-reader-action-grid { grid-template-columns: 1fr; }
    .custody-reader-evidence dl > div { grid-template-columns: 1fr; gap: 6px; }
    .custody-reader-evidence__actions a, .custody-reader-evidence__actions button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .custody-library__status i,
    .custody-reader-article__status i { animation: none; }
    .custody-library-card, .custody-reader__viewport { scroll-behavior: auto; transition: none; }
}

/* =========================================================
   MANAGED CUSTODY RECORDS
   Use full reading width when there is no contents sidebar
   ========================================================= */

.custody-reader-article__layout--managed {
    grid-template-columns: minmax(0, 1fr);
}

.custody-reader-article__layout--managed .custody-reader-article__content {
    grid-column: 1;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}