/* ============================================================================
   Release / build-record pages (/releases/*)

   Loaded per-page via `extraCss` in src/releases/releases.json, so the weight
   never lands on the marketing pages. Everything here is scoped under `.rd`
   and built from the redesign token set (redesign.css :root), so a release
   page inherits the site's palette, type scale, and motion rather than
   introducing a second design language.
   ========================================================================== */

/* ---------- Masthead ---------- */
.rd .rel-mast {
    padding-block: clamp(2.5rem, 2rem + 3vw, 4.5rem) clamp(1.5rem, 1rem + 2vw, 2.5rem);
    border-bottom: 1px solid var(--border-color);
}
.rd .rel-h1 {
    font-family: var(--font-heading);
    font-size: var(--step-5);
    font-weight: 400;
    line-height: 1.02;
    letter-spacing: -0.012em;
    margin-top: 1rem;
    text-wrap: balance;
}
.rd .rel-h1 .rel-thin {
    color: var(--text-muted);
    font-style: italic;
    font-weight: 300;
}
.rd .rel-lede {
    font-size: var(--step-1);
    line-height: 1.5;
    color: var(--text-secondary);
    max-width: 62ch;
    margin-top: 1.15rem;
}
.rd .rel-meta {
    margin-top: 1.35rem;
    font-family: var(--font-mono);
    font-size: var(--step--1);
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

/* ---------- Stat band ---------- */
.rd .rel-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
    gap: 1px;
    background: var(--border-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    margin-top: 2.25rem;
}
.rd .rel-stat {
    background: var(--surface);
    padding: 1.1rem 1.25rem;
}
.rd .rel-stat .n {
    display: block;
    font-family: var(--font-heading);
    font-size: var(--step-3);
    color: var(--accent-gold);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.rd .rel-stat .l {
    display: block;
    margin-top: 0.55rem;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-tertiary);
}

/* ---------- Status chips ---------- */
.rd .rel-chip {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    white-space: nowrap;
    border: 1px solid transparent;
    line-height: 1.6;
    flex-shrink: 0;
}
.rd .rel-chip.is-ok {
    color: #8fbf9a;
    background: rgba(143, 191, 154, 0.12);
    border-color: rgba(143, 191, 154, 0.3);
}
.rd .rel-chip.is-new {
    color: var(--accent-gold);
    background: var(--rd-glow-gold);
    border-color: rgba(217, 177, 73, 0.38);
}

/* ---------- Legend ---------- */
.rd .rel-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem 1.75rem;
    margin-top: 1.5rem;
    padding: 1rem 1.25rem;
    border: 1px dashed var(--border-accent);
    border-radius: 10px;
    font-size: var(--step--1);
    color: var(--text-secondary);
}
.rd .rel-legend .li {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

/* ---------- Layout + table of contents ---------- */
.rd .rel-layout {
    display: grid;
    grid-template-columns: 1fr;
    padding-block: clamp(2.5rem, 2rem + 3vw, 4rem);
}
.rd .rel-toc {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--surface);
    padding: 1rem;
    margin-bottom: 2.25rem;
}
.rd .rel-toc-label {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    padding: 0 0 0.75rem 0.6rem;
}
.rd .rel-toc-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1px;
}
.rd .rel-toc a {
    display: flex;
    gap: 0.65rem;
    align-items: baseline;
    padding: 0.4rem 0.6rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: var(--step--1);
    border-left: 2px solid transparent;
    border-radius: 0 6px 6px 0;
    transition: color var(--duration-fast) var(--rd-ease),
                background var(--duration-fast) var(--rd-ease),
                border-color var(--duration-fast) var(--rd-ease);
}
.rd .rel-toc a .num {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    min-width: 1.1em;
}
.rd .rel-toc a:hover {
    color: var(--text-primary);
    background: var(--rd-glow-warm);
}
.rd .rel-toc a.is-active {
    color: var(--text-primary);
    border-left-color: var(--accent-gold);
    background: var(--rd-glow-gold);
}
.rd .rel-toc a.is-active .num { color: var(--accent-gold); }

@media (min-width: 560px) {
    .rd .rel-toc-list { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
    .rd .rel-layout {
        grid-template-columns: 228px minmax(0, 1fr);
        gap: 3.5rem;
        align-items: start;
    }
    .rd .rel-toc {
        position: sticky;
        top: calc(var(--rd-nav-h) + 1rem);
        max-height: calc(100vh - var(--rd-nav-h) - 2rem);
        overflow-y: auto;
        margin-bottom: 0;
        border: 0;
        background: transparent;
        padding: 0;
    }
    .rd .rel-toc-list { grid-template-columns: 1fr; }
}

.rd .rel-main { min-width: 0; }

/* ---------- Sections ---------- */
.rd .rel-main section {
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid var(--border-color);
    scroll-margin-top: calc(var(--rd-nav-h) + 1rem);
}
.rd .rel-main section:first-of-type {
    border-top: 0;
    margin-top: 0;
    padding-top: 0;
}
.rd .rel-eyebrow {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-mono);
    font-size: var(--step--1);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent-gold);
    margin-bottom: 0.75rem;
}
.rd .rel-eyebrow .rel-idx { color: var(--text-muted); }
.rd .rel-main h2 {
    font-family: var(--font-heading);
    font-weight: 400;
    font-size: var(--step-3);
    line-height: 1.12;
    letter-spacing: -0.01em;
    margin-bottom: 0.85rem;
    text-wrap: balance;
}
.rd .rel-main h3 {
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: var(--step-0);
    color: var(--text-primary);
    letter-spacing: 0.01em;
    margin: 2rem 0 0.5rem;
}
.rd .rel-intro {
    color: var(--text-secondary);
    max-width: 68ch;
    margin-bottom: 1.35rem;
}
.rd .rel-intro strong { color: var(--text-primary); font-weight: 600; }

/* ---------- Feature panels ---------- */
.rd .rel-feats {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--surface);
    overflow: hidden;
}
.rd .rel-feat {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border-color);
}
.rd .rel-feat:first-child { border-top: 0; }
.rd .rel-feat-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.9rem;
    flex-wrap: wrap;
}
.rd .rel-feat h4 {
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: var(--step-0);
    color: var(--text-primary);
    margin: 0;
}
.rd .rel-feat p {
    margin: 0.4rem 0 0;
    color: var(--text-secondary);
    font-size: var(--step--1);
    line-height: 1.62;
    max-width: 76ch;
}
.rd .rel-feat code,
.rd .rel-code {
    font-family: var(--font-mono);
    font-size: 0.86em;
    background: var(--rd-glow-gold);
    color: var(--accent-gold);
    padding: 0.05em 0.35em;
    border-radius: 4px;
    word-break: break-word;
}

/* ---------- Callout ---------- */
.rd .rel-note {
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--accent-gold);
    background: var(--surface-alt);
    border-radius: 0 10px 10px 0;
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
}
.rd .rel-note .nh {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent-gold);
    margin-bottom: 0.4rem;
}
.rd .rel-note p {
    margin: 0;
    color: var(--text-secondary);
    font-size: var(--step--1);
    line-height: 1.62;
    max-width: 74ch;
}

/* ---------- Pipeline strip ---------- */
.rd .rel-pipe {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin: 0 0 1.5rem;
}
.rd .rel-pipe .stage {
    flex: 1 1 140px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--surface-alt);
    padding: 0.75rem 0.9rem;
}
.rd .rel-pipe .sl {
    font-family: var(--font-mono);
    font-size: 0.64rem;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--accent-gold);
    margin-bottom: 0.35rem;
}
.rd .rel-pipe .sd {
    font-size: var(--step--1);
    line-height: 1.5;
    color: var(--text-secondary);
}

/* ---------- Timeline ---------- */
.rd .rel-tl {
    border-left: 2px solid var(--border-accent);
    margin: 0.5rem 0 0 0.4rem;
}
.rd .rel-tl-item {
    position: relative;
    padding: 0.25rem 0 1.4rem 1.6rem;
}
.rd .rel-tl-item::before {
    content: "";
    position: absolute;
    left: -7px;
    top: 0.65rem;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--primary-bg);
    border: 2px solid var(--accent-gold);
}
.rd .rel-tl-item .date {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent-gold);
}
.rd .rel-tl-item .th {
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: var(--step-0);
    color: var(--text-primary);
    margin: 0.1rem 0;
}
.rd .rel-tl-item p {
    margin: 0;
    color: var(--text-secondary);
    font-size: var(--step--1);
    line-height: 1.6;
    max-width: 74ch;
}

/* ---------- Footer note + back link ---------- */
.rd .rel-foot {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    font-size: var(--step--1);
    color: var(--text-muted);
    max-width: 74ch;
}
.rd .rel-foot a { color: var(--accent-gold); }

/* ---------- Releases index ---------- */
.rd .rel-index-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 2.5rem;
}
@media (min-width: 760px) {
    .rd .rel-index-grid { grid-template-columns: repeat(2, 1fr); }
}
.rd .rel-index-card {
    display: block;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--surface);
    padding: 1.5rem;
    text-decoration: none;
    transition: border-color var(--duration-default) var(--rd-ease),
                transform var(--duration-default) var(--rd-ease);
}
.rd .rel-index-card:hover {
    border-color: var(--border-accent);
    transform: translateY(-2px);
}
.rd .rel-index-card .ver {
    font-family: var(--font-mono);
    font-size: var(--step--1);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent-gold);
}
.rd .rel-index-card h2 {
    font-family: var(--font-heading);
    font-weight: 400;
    font-size: var(--step-2);
    line-height: 1.15;
    color: var(--text-primary);
    margin: 0.6rem 0 0.5rem;
}
.rd .rel-index-card p {
    color: var(--text-secondary);
    font-size: var(--step--1);
    line-height: 1.6;
    margin: 0;
}
