/* =========================================================
   CREDENTIALS
   1. Homepage teaser  "The Archive Index"         .crh-*
   2. Registry page    certifications.html          .crp-* .crx-*
   3. Fullscreen document viewer                    .crv-*
   ---------------------------------------------------------
   Monochrome only (r = g = b). Real certificate images are
   shown in their original colours on the registry page.
   Shared pieces (.pj-label, .pj-btn, .pj-link, .pj-arrow)
   come from projects.css.
   ========================================================= */

:root {
    --cr-bg: #050505;
    --cr-surface: #101010;
    --cr-surface-2: #161616;
    --cr-border: #252525;
    --cr-border-strong: #3d3d3d;
    --cr-muted: #666666;          /* decorative / large only */
    --cr-secondary: #a3a3a3;
    --cr-text: #ffffff;
    --cr-highlight: #f5f5f5;
    --cr-ease: var(--mono-ease, cubic-bezier(0.22, 0.61, 0.36, 1));
}


/* =========================================================
   1. HOMEPAGE TEASER — "The Archive Index"
   ---------------------------------------------------------
   CREDENTIALS set edge to edge (sized from its own width
   with container units, so it can never overflow), a large
   outlined "04" behind it, a thin archival divider, and one
   information row.

   With JS (.crh.is-js) the heading starts as a grey outline
   and fills with white from left to right as the section
   scrolls in (--crh-fill 0 → 1, one way). Then the "04",
   the row items and the issuer monograms stagger in
   (.is-in). Without JS everything is solid and visible.
   ========================================================= */

@property --crh-fill {
    syntax: "<number>";
    inherits: true;
    initial-value: 0;
}

.crh {
    position: relative;
    padding: 112px 0 120px;
}

.crh-inner {
    --crh-fill: 1;
    border-top: 1px solid var(--cr-border);
}

.crh.is-js .crh-inner {
    --crh-fill: 0;
    transition: --crh-fill 0.35s linear;
}

.crh-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;

    padding-top: 20px;
}

.crh-lede {
    margin: 0;

    font-size: 14px;
    line-height: 1.5;

    color: var(--cr-secondary);
}

/* ---------- Display: CREDENTIALS + 04 ---------- */

.crh-display {
    position: relative;
    container-type: inline-size;

    /* room for the part of the "04" that rises above the word */
    padding-top: 10.5cqi;
    margin-top: clamp(24px, 3vw, 48px);

    /* belt and braces: nothing here may ever widen the page */
    overflow-x: clip;
}

.crh-word {
    position: relative;
    z-index: 1;

    margin: 0;

    font-size: 10.9vw;                  /* fallback without container units */
    font-size: 15.7cqi;                 /* "CREDENTIALS" ≈ 98% of the width */
    font-weight: 800;
    line-height: 0.8;
    letter-spacing: -0.05em;
    text-transform: uppercase;
    white-space: nowrap;

    color: var(--cr-text);
}

.crh-word__base,
.crh-word__fill {
    display: block;
}

/* the white copy that wipes in over the outline */
.crh-word__fill {
    position: absolute;
    inset: 0;

    display: none;
}

.crh.is-js .crh-word__base {
    color: rgba(255, 255, 255, 0.03);
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.3);
}

.crh.is-js .crh-word__fill {
    display: block;
    clip-path: inset(-12% calc(100% - var(--crh-fill) * 100%) -12% 0);
}

/* thin scan line riding the fill edge; fades at both ends */
.crh.is-js .crh-display::after {
    content: "";

    position: absolute;
    left: calc(var(--crh-fill) * 100%);
    bottom: -2%;
    z-index: 2;

    width: 1px;
    height: calc(100% - 10.5cqi + 4%);

    background: linear-gradient(rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.9) 30%, rgba(255, 255, 255, 0.9) 70%, rgba(255, 255, 255, 0));

    opacity: calc(min(1, var(--crh-fill) * 14) * min(1, (1 - var(--crh-fill)) * 14));
    pointer-events: none;
}

/* the record number: large, faint solid grey, behind the word.
   (Solid, not outlined: Figtree's glyphs have overlapping contours
   that an outline would expose as stray lines.) */
.crh-num {
    position: absolute;
    top: 0;
    right: 0.4cqi;
    z-index: 0;

    font-size: 24vw;                    /* fallback */
    font-size: 25cqi;
    font-weight: 200;
    line-height: 0.74;
    letter-spacing: -0.06em;
    font-variant-numeric: tabular-nums;

    color: rgba(255, 255, 255, 0.055);

    pointer-events: none;
    user-select: none;
}

.crh.is-js .crh-num {
    opacity: 0;
    transform: translateY(8%);
    transition: opacity 1.2s var(--cr-ease), transform 1.4s var(--cr-ease);
}

.crh.is-in .crh-num {
    opacity: 1;
    transform: none;
}

/* ---------- Archival divider ---------- */

.crh-rule {
    display: flex;
    align-items: center;
    gap: 16px;

    margin-top: clamp(20px, 2.6vw, 36px);
}

.crh-rule__bar {
    position: relative;
    flex: 1;
    height: 1px;

    background: var(--cr-border);
}

/* end ticks */
.crh-rule__bar::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -3px;
    height: 7px;

    background:
        linear-gradient(var(--cr-border-strong), var(--cr-border-strong)) left / 1px 100% no-repeat,
        linear-gradient(var(--cr-border-strong), var(--cr-border-strong)) right / 1px 100% no-repeat;
}

/* progress: the divider whitens with the heading */
.crh.is-js .crh-rule__bar::before {
    content: "";
    position: absolute;
    inset: 0;

    background: linear-gradient(90deg, var(--cr-text), rgba(255, 255, 255, 0.35));

    transform: scaleX(var(--crh-fill));
    transform-origin: left;
}

.crh-rule__ref {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;

    color: var(--cr-muted);
}

/* ---------- Information row ---------- */

.crh-row {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 24px 56px;

    padding-top: 32px;
}

.crh-count {
    display: flex;
    align-items: baseline;
    gap: 12px;

    margin: 0;
}

.crh-count strong {
    font-size: 44px;
    font-weight: 300;
    line-height: 1;
    letter-spacing: -0.04em;
    font-variant-numeric: tabular-nums;

    color: var(--cr-text);
}

.crh-count span,
.crh-period span {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;

    color: var(--cr-secondary);
}

.crh-period {
    display: grid;
    gap: 6px;

    margin: 0;
}

.crh-period span {
    color: var(--cr-muted);
}

.crh-period b {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-variant-numeric: tabular-nums;

    color: var(--cr-highlight);
}

.crh-monos {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;

    margin: 0;
    padding: 0;
    list-style: none;
}

.crh-monos li {
    display: inline-grid;
    place-items: center;

    min-width: 40px;
    height: 40px;
    padding: 0 10px;

    border: 1px solid var(--cr-border);
    border-radius: 99px;

    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;

    color: var(--cr-secondary);

    transition: color 0.4s var(--cr-ease), border-color 0.4s var(--cr-ease);
}

.crh-monos li:hover {
    color: var(--cr-text);
    border-color: var(--cr-border-strong);
}

/* CTA → /certifications */
.crh-btn {
    position: relative;

    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    min-height: 56px;
    padding: 0 8px 0 26px;

    overflow: hidden;
    isolation: isolate;

    border: 1px solid var(--cr-text);
    border-radius: 99px;

    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    white-space: nowrap;

    color: var(--cr-text);

    transition: color 0.45s var(--cr-ease);
}

.crh-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;

    background: var(--cr-text);

    transform: translateY(101%);
    transition: transform 0.45s var(--cr-ease);
}

.crh-btn__icon {
    display: grid;
    place-items: center;
    flex: none;

    width: 40px;
    height: 40px;

    border-radius: 50%;
    background: var(--cr-text);
    color: #000;

    transition: background-color 0.45s var(--cr-ease), color 0.45s var(--cr-ease);
}

.crh-btn:hover,
.crh-btn:focus-visible {
    color: #000;
}

.crh-btn:focus-visible {
    outline: 1px solid var(--cr-text);
    outline-offset: 4px;
}

.crh-btn:hover::before,
.crh-btn:focus-visible::before {
    transform: translateY(0);
}

.crh-btn:hover .crh-btn__icon,
.crh-btn:focus-visible .crh-btn__icon {
    background: #000;
    color: var(--cr-text);
}

.crh-btn:hover .pj-arrow,
.crh-btn:focus-visible .pj-arrow {
    transform: translate(2px, -2px);
}

/* ---------- Staggered entrance ---------- */

.crh.is-js .crh-step {
    opacity: 0;
    transform: translateY(14px);
    transition:
        opacity 0.8s var(--cr-ease) calc(0.25s + var(--d, 0) * 0.11s),
        transform 1s var(--cr-ease) calc(0.25s + var(--d, 0) * 0.11s);
}

.crh.is-js .crh-monos li {
    opacity: 0;
    transform: scale(0.86);
    transition:
        opacity 0.6s var(--cr-ease),
        transform 0.7s var(--cr-ease),
        color 0.4s var(--cr-ease),
        border-color 0.4s var(--cr-ease);
}

.crh.is-js .crh-monos li:nth-child(1) { transition-delay: 0.5s, 0.5s, 0s, 0s; }
.crh.is-js .crh-monos li:nth-child(2) { transition-delay: 0.58s, 0.58s, 0s, 0s; }
.crh.is-js .crh-monos li:nth-child(3) { transition-delay: 0.66s, 0.66s, 0s, 0s; }
.crh.is-js .crh-monos li:nth-child(n+4) { transition-delay: 0.74s, 0.74s, 0s, 0s; }

.crh.is-in .crh-step,
.crh.is-in .crh-monos li {
    opacity: 1;
    transform: none;
}

/* ---------- Responsive ---------- */

@media (max-width: 1199px) {
    .crh-row {
        grid-template-columns: auto auto minmax(0, 1fr);
        gap: 24px 40px;
    }

    .crh-btn {
        grid-column: 1 / -1;
        justify-self: start;
    }
}

@media (max-width: 767px) {
    .crh {
        padding: 80px 0 88px;
    }

    .crh-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .crh-display {
        margin-top: 28px;
    }

    .crh-row {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 24px 20px;
        padding-top: 24px;
    }

    .crh-count {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .crh-count strong {
        font-size: 36px;
    }

    .crh-period b {
        font-size: 12px;
        letter-spacing: 0.04em;
        white-space: nowrap;
    }

    .crh-monos {
        grid-column: 1 / -1;
    }

    .crh-btn {
        grid-column: 1 / -1;
        justify-self: stretch;
        padding-left: 20px;
        letter-spacing: 0.12em;
    }
}

@media (max-width: 359px) {
    .crh-row {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {
    .crh.is-js .crh-inner,
    .crh.is-js .crh-num,
    .crh.is-js .crh-step,
    .crh.is-js .crh-monos li,
    .crh-btn,
    .crh-btn::before {
        transition: none !important;
    }
}


/* =========================================================
   2. REGISTRY PAGE
   ========================================================= */

.page-registry {
    background-color: var(--cr-bg);
}

.crp {
    position: relative;
}

/* ---------- Introduction ---------- */

.crp-hero {
    padding: 200px 0 88px;
}

.crp-hero__top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;

    padding-bottom: 20px;
    border-bottom: 1px solid var(--cr-border);
}

.crp-hero__body {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 48px 64px;
    align-items: end;

    padding-top: 56px;
}

.crp-hero__title {
    margin: 0;

    font-size: clamp(60px, 10.4vw, 176px);
    font-weight: 500;
    line-height: 0.88;
    letter-spacing: -0.055em;

    color: var(--cr-text);
}

.crp-hero__title .dot {
    color: var(--cr-muted);
}

.crp-hero__lede {
    max-width: 36ch;
    margin: 0 0 32px;

    font-size: 18px;
    line-height: 1.6;

    color: var(--cr-secondary);
}

.crp-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));

    margin: 0;

    border-top: 1px solid var(--cr-border);
}

.crp-meta > div {
    display: grid;
    gap: 6px;

    padding: 16px 16px 16px 0;

    border-bottom: 1px solid var(--cr-border);
}

.crp-meta > div:nth-child(even) {
    padding-left: 16px;
    border-left: 1px solid var(--cr-border);
}

.crp-meta dt {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;

    color: var(--cr-muted);
}

.crp-meta dd {
    margin: 0;

    font-size: 15px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;

    color: var(--cr-text);
}

.crp-meta dd span {
    color: var(--cr-muted);
}

/* ---------- Split archive ---------- */

.crp-archive {
    padding-bottom: 128px;
}

.crp-split {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 0 64px;
    align-items: start;
}

.crp-colhead {
    display: flex;
    justify-content: space-between;
    gap: 16px;

    padding: 14px 0;

    border-top: 1px solid var(--cr-text);
    border-bottom: 1px solid var(--cr-border);

    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-variant-numeric: tabular-nums;

    color: var(--cr-muted);
}

.crp-colhead span:first-child {
    color: var(--cr-secondary);
}

/* ---------- Record index ---------- */

.crp-index {
    position: relative;

    margin: 0;
    padding: 0;
    list-style: none;
}

.crp-rec {
    position: relative;
    z-index: 1;
}

.crp-rec__btn {
    position: relative;

    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) auto 16px;
    gap: 6px 16px;
    align-items: center;

    width: 100%;
    padding: 26px 16px 26px 20px;

    border: 0;
    border-bottom: 1px solid var(--cr-border);
    background: transparent;

    text-align: left;
    color: var(--cr-secondary);
    cursor: pointer;

    transition: background-color 0.4s var(--cr-ease), color 0.4s var(--cr-ease);
}

.crp-rec__btn:hover {
    background-color: rgba(255, 255, 255, 0.025);
    color: var(--cr-highlight);
}

.crp-rec__btn:focus-visible {
    outline: 1px solid var(--cr-text);
    outline-offset: -1px;
}

.crp-rec__code {
    align-self: start;
    padding-top: 2px;

    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.1em;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;

    color: var(--cr-muted);

    transition: color 0.4s var(--cr-ease), text-shadow 0.4s var(--cr-ease);
}

.crp-rec__main {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.crp-rec__inst {
    overflow: hidden;

    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    text-overflow: ellipsis;
    white-space: nowrap;

    color: var(--cr-muted);

    transition: color 0.4s var(--cr-ease);
}

.crp-rec__title {
    font-size: 19px;
    font-weight: 500;
    line-height: 1.25;
    letter-spacing: -0.01em;

    color: inherit;
}

.crp-rec__meta {
    display: grid;
    justify-items: end;
    gap: 6px;
    align-self: start;
    padding-top: 2px;

    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;

    color: var(--cr-muted);
}

.crp-rec__meta span:last-child {
    color: var(--cr-secondary);
}

.crp-rec__state {
    display: grid;
    place-items: center;
}

.crp-rec__sel {
    display: none;
}

.crp-rec__state svg {
    width: 14px;
    height: 14px;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.3;

    opacity: 0;
    transform: translateX(-6px);

    transition: opacity 0.4s var(--cr-ease), transform 0.4s var(--cr-ease);
}

/* hover: brighten number, show arrow */
.crp-rec__btn:hover .crp-rec__code,
.crp-rec__btn:focus-visible .crp-rec__code {
    color: var(--cr-text);
    text-shadow: 0 0 14px rgba(255, 255, 255, 0.45);
}

.crp-rec__btn:hover .crp-rec__inst {
    color: var(--cr-secondary);
}

.crp-rec__btn:hover .crp-rec__state svg,
.crp-rec__btn:focus-visible .crp-rec__state svg {
    opacity: 0.7;
    transform: translateX(0);
}

/* selected */
.crp-rec.is-selected .crp-rec__btn {
    color: var(--cr-text);
}

.crp-rec.is-selected .crp-rec__code {
    color: var(--cr-text);
    text-shadow: 0 0 14px rgba(255, 255, 255, 0.45);
}

.crp-rec.is-selected .crp-rec__inst {
    color: var(--cr-secondary);
}

.crp-rec.is-selected .crp-rec__state svg {
    opacity: 1;
    transform: translateX(0);
}

/* Sliding selection marker (desktop) */
.crp-index__marker {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    z-index: 0;

    height: 0;

    border-left: 1px solid var(--cr-text);
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015) 55%, rgba(255, 255, 255, 0));

    pointer-events: none;

    transition: transform 0.55s var(--cr-ease), height 0.55s var(--cr-ease);
}

.crp-hint {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;

    margin: 20px 0 0;

    font-size: 11px;
    letter-spacing: 0.06em;

    color: var(--cr-muted);
}

.crp-hint kbd,
.crv__keys kbd {
    display: inline-grid;
    place-items: center;

    min-width: 22px;
    height: 22px;
    padding: 0 6px;

    border: 1px solid var(--cr-border);
    border-radius: 4px;
    background: transparent;
    box-shadow: none;

    font-family: inherit;
    font-size: 10px;
    font-weight: 500;

    color: var(--cr-secondary);
}

.crp-hint__sep {
    margin: 0 4px;
}

.crp-rec__slot:empty {
    display: none;
}

/* ---------- Exhibition ---------- */

.crp-exhibit-col {
    position: sticky;
    top: 24px;
}

.crp-exhibit {
    outline: none;

    transition: opacity 0.18s var(--cr-ease), transform 0.18s var(--cr-ease);
}

.crp-exhibit.is-out {
    opacity: 0;
    transform: translateY(6px);
}

.crx-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;

    padding: 14px 0;

    border-top: 1px solid var(--cr-text);

    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-variant-numeric: tabular-nums;

    color: var(--cr-muted);
}

.crx-code strong {
    font-weight: 500;
    color: var(--cr-text);
}

.crx-figure {
    margin: 0;
}

.crx-frame {
    position: relative;

    display: block;
    width: 100%;
    padding: clamp(20px, 3.4vw, 48px);

    border: 1px solid var(--cr-border);
    background:
        radial-gradient(90% 70% at 50% 0%, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0) 65%),
        var(--cr-surface);

    cursor: zoom-in;

    transition: border-color 0.5s var(--cr-ease);
}

.crx-frame:hover {
    border-color: var(--cr-border-strong);
}

.crx-frame:focus-visible {
    outline: 1px solid var(--cr-text);
    outline-offset: 3px;
}

.crx-sheet {
    position: relative;

    display: block;
    width: min(100%, calc(60vh * var(--ar, 1.414)));
    margin: 0 auto;

    background: var(--cr-surface-2);
    box-shadow:
        0 40px 70px -30px rgba(0, 0, 0, 0.95),
        0 12px 24px -12px rgba(0, 0, 0, 0.8),
        0 0 0 1px rgba(255, 255, 255, 0.06);
}

.crx-sheet img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;

    opacity: 0;
    transform: scale(0.985);

    transition: opacity 0.5s var(--cr-ease), transform 0.7s var(--cr-ease);
}

.crp-exhibit.is-loaded .crx-sheet img {
    opacity: 1;
    transform: none;
}

.crx-expand {
    position: absolute;
    right: 14px;
    bottom: 14px;

    display: inline-flex;
    align-items: center;
    gap: 8px;

    padding: 8px 12px;

    border: 1px solid var(--cr-border-strong);
    border-radius: 99px;
    background: rgba(5, 5, 5, 0.85);

    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;

    color: var(--cr-text);

    opacity: 0;
    transform: translateY(4px);

    transition: opacity 0.4s var(--cr-ease), transform 0.4s var(--cr-ease);
}

.crx-expand svg,
.crv-btn svg,
.crv-nav svg {
    width: 12px;
    height: 12px;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.4;
}

.crx-frame:hover .crx-expand,
.crx-frame:focus-visible .crx-expand {
    opacity: 1;
    transform: none;
}

.crx-cap {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 16px;

    margin-top: 12px;

    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;

    color: var(--cr-muted);
}

/* Document-unavailable state */
.crx-missing {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;

    width: 100%;
    max-height: 62vh;
    padding: clamp(24px, 5vw, 64px);

    border: 1px dashed var(--cr-border-strong);
    background:
        repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 14px),
        var(--cr-surface);
}

.crx-missing__label {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--cr-secondary);
}

.crx-missing__title {
    margin: 0;
    font-size: clamp(22px, 2.4vw, 32px);
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--cr-text);
}

.crx-missing__text {
    max-width: 44ch;
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--cr-secondary);
}

/* Metadata */
.crx-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;

    margin-top: 36px;
}

.crx-title {
    margin: 0;

    font-size: clamp(26px, 2.6vw, 38px);
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -0.03em;

    color: var(--cr-text);
}

.crx-data {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 32px;

    margin: 0;
}

.crx-row {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 12px;
    align-items: baseline;

    padding: 12px 0;

    border-top: 1px solid var(--cr-border);
}

.crx-row:has(.crx-topics),
.crx-row:has(.crx-dim:only-child) {
    grid-column: 1 / -1;
}

.crx-row dt {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;

    color: var(--cr-muted);
}

.crx-row dd {
    margin: 0;

    font-size: 14px;
    line-height: 1.5;

    color: var(--cr-highlight);
}

.crx-dim {
    color: var(--cr-secondary);
}

.crx-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 0;

    margin: 0;
    padding: 0;
    list-style: none;
}

.crx-topics li + li::before {
    content: "/";
    margin: 0 10px;
    color: var(--cr-border-strong);
}

.crx-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 16px;
}

.crx-actions .pj-link {
    margin-left: 8px;
}

.crx-onreq {
    display: inline-flex;
    align-items: center;
    gap: 10px;

    min-height: 44px;
    margin-left: 8px;

    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;

    color: var(--cr-secondary);
}

.crx-onreq::before {
    content: "";
    width: 7px;
    height: 7px;
    border: 1px solid currentColor;
    border-radius: 50%;
}

.crp-noscript {
    margin: 24px 0 0;
    padding: 0;
    list-style: none;
}

/* ---------- Outro ---------- */

.crp-outro {
    padding-bottom: 128px;
}

.crp-outro__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;

    padding-top: 40px;

    border-top: 1px solid var(--cr-border);
}

.crp-outro h2 {
    margin: 16px 0 0;

    font-size: clamp(32px, 4vw, 56px);
    font-weight: 500;
    line-height: 1;
    letter-spacing: -0.04em;

    color: var(--cr-text);
}

.crp-outro__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}


/* =========================================================
   3. FULLSCREEN VIEWER
   ========================================================= */

html.crv-lock,
html.crv-lock body {
    overflow: hidden;
}

.crv {
    position: fixed;
    inset: 0;
    z-index: 10000;

    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;

    background: var(--cr-bg);
    color: var(--cr-text);

    opacity: 0;
    transition: opacity 0.26s var(--cr-ease);
}

.crv[hidden] {
    display: none;
}

.crv.is-open {
    opacity: 1;
}

.crv__bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 16px;

    padding: 14px 24px;

    position: relative;
    z-index: 2;
    border-bottom: 1px solid var(--cr-border);
    background: var(--cr-bg);
}

.crv__id {
    min-width: 0;
}

.crv__code {
    display: block;

    overflow: hidden;

    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    text-overflow: ellipsis;
    white-space: nowrap;

    color: var(--cr-secondary);
}

.crv__title {
    margin: 4px 0 0;

    overflow: hidden;

    font-size: 16px;
    font-weight: 500;
    letter-spacing: -0.01em;
    text-overflow: ellipsis;
    white-space: nowrap;

    color: var(--cr-text);
}

.crv__tools {
    display: flex;
    align-items: center;
    gap: 6px;
}

.crv__sep {
    width: 1px;
    height: 24px;
    margin: 0 6px;
    background: var(--cr-border);
}

.crv-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    min-width: 40px;
    height: 40px;
    padding: 0;

    border: 1px solid var(--cr-border);
    border-radius: 99px;
    background: transparent;

    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;

    color: var(--cr-text);
    cursor: pointer;

    transition: border-color 0.3s var(--cr-ease), background-color 0.3s var(--cr-ease), color 0.3s var(--cr-ease);
}

.crv-btn--text {
    padding: 0 14px;
}

.crv-btn[hidden] {
    display: none;
}

.crv-btn:hover,
.crv-btn:focus-visible {
    border-color: var(--cr-text);
    color: var(--cr-text);
}

.crv-btn:focus-visible,
.crv-nav:focus-visible {
    outline: 1px solid var(--cr-text);
    outline-offset: 2px;
}

.crv-btn:disabled {
    opacity: 0.35;
    cursor: default;
    border-color: var(--cr-border);
}

.crv-close {
    background: var(--cr-text);
    border-color: var(--cr-text);
    color: #000;
}

.crv-close:hover,
.crv-close:focus-visible {
    background: transparent;
    color: var(--cr-text);
}

.crv__zoom {
    min-width: 52px;

    font-size: 12px;
    font-weight: 500;
    text-align: center;
    font-variant-numeric: tabular-nums;

    color: var(--cr-secondary);
}

.crv__stage {
    position: relative;

    overflow: hidden;

    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

.crv__img {
    position: absolute;
    left: 50%;
    top: 50%;

    max-width: none;

    background: #fff;
    box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 1), 0 0 0 1px rgba(255, 255, 255, 0.08);

    transform-origin: center center;
    cursor: zoom-in;

    -webkit-user-drag: none;
}

.crv.is-animating .crv__img {
    transition: transform 0.3s var(--cr-ease);
}

.crv.is-zoomed .crv__img {
    cursor: grab;
}

.crv.is-dragging .crv__img {
    cursor: grabbing;
}

.crv__loading {
    position: absolute;
    left: 50%;
    bottom: 16px;

    margin: 0;

    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;

    color: var(--cr-secondary);

    opacity: 0;
    transform: translateX(-50%);
    transition: opacity 0.3s var(--cr-ease);
    pointer-events: none;
}

.crv.is-loading .crv__loading {
    opacity: 1;
    transition-delay: 0.4s;
}

.crv-nav {
    position: absolute;
    top: 50%;

    display: grid;
    place-items: center;

    width: 48px;
    height: 48px;

    border: 1px solid var(--cr-border);
    border-radius: 50%;
    background: rgba(5, 5, 5, 0.75);

    color: var(--cr-text);
    cursor: pointer;

    transform: translateY(-50%);
    transition: border-color 0.3s var(--cr-ease), opacity 0.3s var(--cr-ease);
}

.crv-nav[hidden] {
    display: none;
}

.crv-nav:hover {
    border-color: var(--cr-text);
}

.crv-nav--prev { left: 20px; }
.crv-nav--next { right: 20px; }

.crv.is-zoomed .crv-nav {
    opacity: 0.25;
}

.crv__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 24px;

    padding: 12px 24px;

    position: relative;
    z-index: 2;
    border-top: 1px solid var(--cr-border);
    background: var(--cr-bg);

    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-variant-numeric: tabular-nums;

    color: var(--cr-secondary);
}

.crv__note {
    color: var(--cr-muted);
}

.crv__keys {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;

    margin-left: auto;

    color: var(--cr-muted);
}

.crv__keys kbd + kbd {
    margin-left: -2px;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1199px) {
    .crp-hero {
        padding-top: 150px;
    }

    .crp-split {
        gap: 0 40px;
    }

    .crp-rec__btn {
        grid-template-columns: 56px minmax(0, 1fr) 16px;
    }

    .crp-rec__meta {
        grid-column: 2;
        grid-row: 2;
        display: flex;
        justify-items: start;
        gap: 12px;
    }

    .crp-rec__state {
        grid-column: 3;
        grid-row: 1;
    }

    .crx-data {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 991px) {
    .crp-hero__body {
        grid-template-columns: minmax(0, 1fr);
        gap: 32px;
    }

    .crp-split {
        grid-template-columns: minmax(0, 1fr);
    }

    .crp-exhibit-col {
        display: none;
    }

    .crp-index__marker {
        display: none;
    }

    .crp-rec.is-selected .crp-rec__btn {
        background: rgba(255, 255, 255, 0.04);
        box-shadow: inset 1px 0 0 var(--cr-text);
    }

    .crp-rec.is-selected .crp-rec__state svg {
        transform: rotate(90deg);
    }

    .crp-rec__slot {
        padding: 4px 0 40px;
        border-bottom: 1px solid var(--cr-border);
    }

    .crp-exhibit .crx-head {
        display: none;
    }

    .crx-sheet {
        width: 100%;
    }

    .crx-expand {
        opacity: 1;
        transform: none;
    }

    .crp-hint {
        display: none;
    }

    /* viewer: arrows sit above the footer bar */
    .crv-nav {
        top: auto;
        bottom: 60px;
        transform: none;
    }
}

@media (max-width: 767px) {
    .crp-hero {
        padding: 128px 0 56px;
    }

    .crp-hero__body {
        padding-top: 40px;
    }

    .crp-hero__lede {
        font-size: 16px;
    }

    .crp-archive,
    .crp-outro {
        padding-bottom: 88px;
    }

    .crp-rec__btn {
        grid-template-columns: 52px minmax(0, 1fr) 16px;
        gap: 6px 12px;
        min-height: 64px;
        padding: 20px 8px 20px 12px;
    }

    .crp-rec__title {
        font-size: 17px;
    }

    .crp-rec__inst {
        white-space: normal;
    }

    .crx-frame {
        padding: 14px;
    }

    .crx-expand {
        right: 8px;
        bottom: 8px;
        padding: 6px 10px;
    }

    .crx-row {
        grid-template-columns: 96px minmax(0, 1fr);
    }

    .crx-actions .pj-btn {
        flex: 1 1 100%;
    }

    .crx-actions .pj-link,
    .crx-onreq {
        margin-left: 0;
    }

    /* viewer: id + close on row 1, tools on row 2 */
    .crv__bar {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 12px;
        padding: 12px 16px;
    }

    .crv__tools {
        grid-column: 1 / -1;
        grid-row: 2;
        justify-content: space-between;
        gap: 4px;
    }

    .crv-close {
        grid-column: 2;
        grid-row: 1;
    }

    .crv-btn {
        min-width: 44px;
        height: 44px;
    }

    .crv-btn--text {
        padding: 0 12px;
    }

    .crv__sep {
        display: none;
    }

    .crv__foot {
        padding: 10px 16px;
        justify-content: center;
    }

    .crv__note {
        display: none;
    }

    .crv__keys {
        display: none;
    }
}

@media (max-width: 400px) {
    .crv-btn--text span {
        display: none;
    }

    .crv-btn--text {
        padding: 0;
    }
}

@media (hover: none) {
    .crx-expand {
        opacity: 1;
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .crp-rec__btn,
    .crp-rec__code,
    .crp-rec__state svg,
    .crp-index__marker,
    .crp-exhibit,
    .crx-sheet img,
    .crx-expand,
    .crv,
    .crv.is-animating .crv__img {
        transition: none !important;
    }
}
