/*
 * Relacje inwestorskie (podstrona).
 * Język wizualny z art-direction.md: ciemne pole, cienkie linie pomiarowe, jeden zielony sygnał.
 * Podpis strony: „szyna indeksu” — numerowany spis sekcji z linią, którą sygnał wypełnia w miarę czytania.
 *
 * Spis komponentów:
 *   .ir-head        nagłówek strony + .ir-facts (pasek faktów)
 *   .ir-layout      siatka: szyna | treść
 *   .ir-rail        szyna indeksu (desktop: przyklejona kolumna; mobile: przyklejony pasek z rozwijaną listą)
 *   .ir-section     sekcja treści z numerem i tytułem
 *   .ir-prose       tekst ciągły            .ir-lead     akapit wprowadzający
 *   .ir-label       etykieta techniczna     .ir-note     dopisek
 *   .ir-debut       fakt z datą debiutu     .ir-names    lista firm
 *   .ir-table       tabela (warianty --members, --shareholders, --calendar; składana wg szerokości kontenera)
 *   .ir-badge       status                  .ir-cv       życiorys (plik)
 *   .ir-legend      rozwijana legenda       .ir-criteria lista kryteriów
 *   .ir-share       pasek struktury akcjonariatu
 *   .ir-docs/.ir-doc    lista dokumentów PDF
 *   .ir-links/.ir-link  odnośniki zewnętrzne
 *   .ir-card, .ir-dl    dane w ramce        .ir-empty    stan pusty
 */

.ir {
    --ir-header-h: 85px;
    --ir-bar-h: 56px;
    --ir-space-2: 8px;
    --ir-space-3: 12px;
    --ir-space-4: 16px;
    --ir-space-5: 20px;
    --ir-space-6: 24px;
    --ir-space-8: 32px;
    --ir-space-12: 48px;
    --ir-space-18: 72px;
    --ir-text-label: 12px;
    --ir-text-small: 14px;
    --ir-text-body: 16px;
    --ir-text-lead: clamp(18px, 1.5vw, 21px);
    --ir-text-strong: rgba(242, 244, 238, .86);
    --ir-leading-tight: 1.06;
    --ir-leading-body: 1.62;
    --ir-measure: 68ch;
    --ir-signal-hover: color-mix(in oklab, var(--signal) 82%, white);
    padding-top: clamp(130px, 14vw, 190px);
    padding-bottom: clamp(80px, 9vw, 140px);
}

/* ---------- Nagłówek strony ---------- */
.ir-head h1 {
    margin: 0 0 var(--ir-space-8);
    max-width: 14ch;
    font-size: clamp(44px, 7vw, 104px);
    font-weight: 500;
    line-height: 1;
    letter-spacing: -.05em;
    text-wrap: balance;
}
.ir-head__intro {
    margin: 0;
    max-width: 58ch;
    color: var(--muted);
    font-size: var(--ir-text-lead);
    line-height: 1.5;
    text-wrap: pretty;
}
.ir-facts {
    margin: var(--ir-space-12) 0 0;
    display: flex;
    flex-wrap: wrap;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}
.ir-facts > div {
    flex: 1 1 200px;
    padding: var(--ir-space-5) var(--ir-space-6) var(--ir-space-5) 0;
}
.ir-facts > div + div { padding-left: var(--ir-space-6); border-left: 1px solid var(--line); }
.ir-facts dt, .ir-label, .ir-table thead th, .ir-table td::before, .ir-dl dt {
    color: var(--muted);
    font-family: var(--mono);
    font-size: var(--ir-text-label);
    font-weight: 700;
    letter-spacing: .08em;
    line-height: 1.4;
    text-transform: uppercase;
}
.ir-facts dd { margin: 6px 0 0; font-size: 18px; font-variant-numeric: tabular-nums; }
.ir-label { margin: 0 0 var(--ir-space-3); }

/* ---------- Siatka ---------- */
.ir-layout {
    margin-top: var(--ir-space-18);
    display: grid;
    grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
    gap: clamp(40px, 6vw, 104px);
    align-items: start;
}
.ir-content { min-width: 0; container-type: inline-size; }

/* ---------- Szyna indeksu ---------- */
.ir-rail {
    position: sticky;
    top: calc(var(--ir-header-h) + var(--ir-space-8));
    padding-left: var(--ir-space-6);
}
.ir-rail__toggle { display: none; }
.ir-rail__list {
    margin: 0;
    padding: 0;
    list-style: none;
    max-height: calc(100vh - var(--ir-header-h) - 2 * var(--ir-space-8));
    max-height: calc(100dvh - var(--ir-header-h) - 2 * var(--ir-space-8));
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: var(--line-strong) transparent;
}
.ir-rail__list a {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    gap: var(--ir-space-3);
    align-items: baseline;
    min-height: 44px;
    padding: 11px var(--ir-space-2) 11px 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.35;
    text-decoration: none;
    touch-action: manipulation;
    transition: color var(--duration-fast) var(--ease-field);
}
.ir-rail__no {
    font-family: var(--mono);
    font-size: var(--ir-text-label);
    font-variant-numeric: tabular-nums;
    letter-spacing: .04em;
}
.ir-rail__list a[aria-current] { color: var(--text); }
.ir-rail__list a[aria-current] .ir-rail__no { color: var(--signal); }
.ir-rail__list a:focus-visible { outline-offset: -2px; }
.ir-rail__progress {
    position: absolute;
    inset: 0 auto 0 0;
    width: 1px;
    background: var(--line);
}
.ir-rail__progress span {
    display: block;
    width: 100%;
    height: 100%;
    background: var(--signal);
    transform: scaleY(var(--ir-progress, 0));
    transform-origin: top;
}

/* ---------- Sekcja ---------- */
.ir-section {
    padding-block: var(--ir-space-18);
    border-top: 1px solid var(--line);
    /* html already reserves the fixed header through scroll-padding-top */
    scroll-margin-top: var(--ir-space-6);
}
.ir-section:first-child { padding-top: var(--ir-space-12); }
.ir-section:last-child { padding-bottom: 0; }
.ir-section__no {
    margin: 0 0 var(--ir-space-4);
    color: var(--signal);
    font-family: var(--mono);
    font-size: var(--ir-text-label);
    font-weight: 700;
    letter-spacing: .08em;
}
.ir-section__head h2 {
    margin: 0 0 var(--ir-space-8);
    font-size: clamp(30px, 3.4vw, 50px);
    font-weight: 500;
    line-height: var(--ir-leading-tight);
    letter-spacing: -.035em;
    text-wrap: balance;
}

/* ---------- Tekst ---------- */
.ir-prose { max-width: var(--ir-measure); }
.ir-prose p {
    margin: 0 0 var(--ir-space-5);
    color: var(--ir-text-strong);
    font-size: 17px;
    line-height: var(--ir-leading-body);
}
.ir-prose p:first-child { color: var(--text); font-size: var(--ir-text-lead); line-height: 1.5; }
.ir-prose p:last-child { margin-bottom: 0; }
.ir-prose strong { color: var(--text); font-weight: 700; }
.ir-lead {
    margin: 0 0 var(--ir-space-8);
    max-width: 62ch;
    color: var(--ir-text-strong);
    font-size: var(--ir-text-lead);
    line-height: 1.5;
    text-wrap: pretty;
}
.ir-note { margin: var(--ir-space-6) 0 0; max-width: var(--ir-measure); color: var(--muted); font-size: var(--ir-text-small); }

/* ---------- Debiut ---------- */
.ir-debut { display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr); gap: clamp(32px, 6cqw, 88px); align-items: start; }
.ir-debut__date {
    margin: 0;
    font-size: clamp(52px, 11cqw, 112px);
    font-weight: 500;
    line-height: .95;
    letter-spacing: -.055em;
    font-variant-numeric: tabular-nums;
}
.ir-debut__copy > p:first-child { margin: 0 0 var(--ir-space-8); color: var(--ir-text-strong); font-size: var(--ir-text-lead); line-height: 1.5; }
.ir-names { margin: 0; padding: 0; list-style: none; }
.ir-names li { padding: var(--ir-space-4) 0; border-top: 1px solid var(--line); font-size: 17px; }
.ir-names li:last-child { border-bottom: 1px solid var(--line); }

/* ---------- Tabele ---------- */
.ir-table-wrap + .ir-table-wrap { margin-top: var(--ir-space-12); }
.ir-table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.45; }
.ir-table caption {
    padding-bottom: var(--ir-space-3);
    color: var(--text);
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -.015em;
    text-align: left;
}
.ir-table th, .ir-table td { padding: 18px var(--ir-space-5) 18px 0; text-align: left; vertical-align: top; }
.ir-table th:last-child, .ir-table td:last-child { padding-right: 0; }
.ir-table thead th { padding-block: var(--ir-space-3); border-bottom: 1px solid var(--line-strong); vertical-align: bottom; }
.ir-table tbody th, .ir-table tbody td, .ir-table tfoot th, .ir-table tfoot td { border-bottom: 1px solid var(--line); }
.ir-table tbody th, .ir-table tfoot th { color: var(--text); font-weight: 600; }
.ir-table tbody td { color: var(--ir-text-strong); }
.ir-table tfoot th, .ir-table tfoot td { border-bottom: 0; border-top: 1px solid var(--line-strong); color: var(--text); font-weight: 700; }
.ir-table .is-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
@container (min-width: 781px) {
    .ir-table--members { table-layout: fixed; }
    .ir-table--members thead th:nth-child(1) { width: 15%; }
    .ir-table--members thead th:nth-child(2) { width: 24%; }
    .ir-table--members thead th:nth-child(3) { width: 13%; }
    .ir-table--members thead th:nth-child(4) { width: 19%; }
    .ir-table--members thead th:nth-child(5) { width: 20%; }
    .ir-table--members .is-icon { text-align: center; }
    .ir-name__part { display: block; }
}
.ir-table--calendar th { width: 11rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ir-table--calendar tbody th { font-family: var(--mono); font-size: 14px; font-weight: 400; color: var(--signal); }
.ir-table--calendar tbody td { color: var(--text); font-size: 17px; }

.ir-badge {
    display: inline-flex;
    align-items: baseline;
    gap: var(--ir-space-2);
    color: var(--text);
    font-family: var(--mono);
    font-size: var(--ir-text-label);
    line-height: 1.8;
    white-space: nowrap;
}
.ir-badge::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--signal); transform: translateY(-1px); }
.ir-badge--pending { color: var(--muted); }
.ir-badge--pending::before { background: transparent; box-shadow: inset 0 0 0 1px var(--muted); }

.ir-icon { flex: none; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.ir-table .is-date { font-variant-numeric: tabular-nums; }
.ir-cv { display: inline-flex; align-items: center; justify-content: center; color: var(--signal); vertical-align: top; }
a.ir-cv { min-width: 44px; min-height: 44px; margin: -12px; touch-action: manipulation; transition: color var(--duration-fast) var(--ease-field); }
.ir-cv .ir-icon { width: 22px; height: 22px; }
.ir-cv--pending { color: var(--line-strong); }

/* ---------- Legenda (kryteria niezależności) ---------- */
.ir-legend { margin-top: var(--ir-space-8); border: 1px solid var(--line); background: var(--surface); }
.ir-legend summary {
    display: flex;
    align-items: center;
    gap: var(--ir-space-4);
    min-height: 60px;
    padding: var(--ir-space-4) var(--ir-space-5);
    cursor: pointer;
    list-style: none;
    touch-action: manipulation;
}
.ir-legend summary::-webkit-details-marker { display: none; }
.ir-legend summary:focus-visible { outline-offset: -2px; }
.ir-legend__title { flex: 1; min-width: 0; font-size: 17px; font-weight: 600; }
.ir-legend__count { color: var(--muted); font-family: var(--mono); font-size: var(--ir-text-label); white-space: nowrap; }
.ir-legend__chevron, .ir-rail__chevron {
    flex: none;
    width: 9px;
    height: 9px;
    margin: -4px 4px 0;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    transition: transform var(--duration-fast) var(--ease-field);
}
.ir-legend[open] .ir-legend__chevron { transform: translateY(4px) rotate(225deg); }
.ir-legend__body { padding: 0 var(--ir-space-5) var(--ir-space-5); }
.ir-legend__body > p { margin: 0 0 var(--ir-space-5); max-width: var(--ir-measure); color: var(--muted); font-size: var(--ir-text-small); }
.ir-criteria { margin: 0; padding: 0; list-style: none; }
.ir-criteria li {
    display: grid;
    grid-template-columns: 30px minmax(0, 15rem) minmax(0, 1fr);
    gap: var(--ir-space-4);
    padding: var(--ir-space-4) 0;
    border-top: 1px solid var(--line);
}
.ir-criteria__no { color: var(--signal); font-family: var(--mono); font-size: var(--ir-text-label); line-height: 1.75; }
.ir-criteria h3 { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.45; }
.ir-criteria p { margin: 0; color: var(--ir-text-strong); font-size: 15px; line-height: 1.55; }
.ir-criteria strong { color: var(--text); }

/* ---------- Akcjonariat ---------- */
.ir-share { display: flex; gap: 3px; height: 14px; margin-bottom: var(--ir-space-8); }
.ir-share__part { flex: 0 1 0; min-width: 4px; }
.ir-share__part--1 { background: var(--signal); }
.ir-share__part--2 { background: var(--text); }
.ir-share__part--3 { background: var(--line-strong); }
.ir-share__swatch { display: inline-block; width: 10px; height: 10px; margin-right: var(--ir-space-3); }

/* ---------- Dokumenty ---------- */
.ir-docs, .ir-links, .ir-people { margin: 0; padding: 0; list-style: none; }
.ir-docs li { border-top: 1px solid var(--line); }
.ir-docs li:last-child { border-bottom: 1px solid var(--line); }
.ir-doc {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    gap: var(--ir-space-5);
    align-items: center;
    min-height: 76px;
    padding: var(--ir-space-5) 0;
    text-decoration: none;
    touch-action: manipulation;
}
.ir-doc__icon { color: var(--signal); }
.ir-doc__body { display: grid; gap: 4px; min-width: 0; }
.ir-doc__title { font-size: 18px; font-weight: 600; line-height: 1.3; letter-spacing: -.01em; transition: color var(--duration-fast) var(--ease-field); }
.ir-doc__detail { color: var(--muted); font-size: var(--ir-text-small); line-height: 1.45; }
.ir-doc__meta { color: var(--muted); font-family: var(--mono); font-size: var(--ir-text-label); white-space: nowrap; }
.ir-doc__action { font-size: 13px; font-weight: 700; white-space: nowrap; }
.ir-doc__action > span[aria-hidden] { display: inline-block; margin-left: 6px; color: var(--signal); transition: transform var(--duration-fast) var(--ease-field); }

/* ---------- Odnośniki zewnętrzne ---------- */
.ir-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--ir-space-4); }
.ir-link {
    position: relative;
    display: grid;
    align-content: end;
    gap: var(--ir-space-2);
    min-height: 190px;
    padding: var(--ir-space-6);
    border: 1px solid var(--line-strong);
    background: var(--surface);
    text-decoration: none;
    touch-action: manipulation;
    transition: border-color var(--duration-fast) var(--ease-field);
}
.ir-link__label { font-size: clamp(26px, 5cqw, 38px); font-weight: 500; line-height: 1.1; letter-spacing: -.035em; }
.ir-link__detail { color: var(--muted); font-size: var(--ir-text-small); }
.ir-link__arrow {
    position: absolute;
    top: var(--ir-space-5);
    right: var(--ir-space-6);
    color: var(--signal);
    font-size: 22px;
    line-height: 1;
    transition: transform var(--duration-fast) var(--ease-field);
}

/* ---------- Ramka z danymi, kontakt, stan pusty ---------- */
.ir-card { margin-top: var(--ir-space-8); max-width: 620px; padding: var(--ir-space-6); border: 1px solid var(--line); background: var(--surface); }
.ir-dl { margin: 0; }
.ir-dl > div { display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); gap: var(--ir-space-4); align-items: baseline; padding: var(--ir-space-3) 0; border-top: 1px solid var(--line); }
.ir-dl dd { margin: 0; font-size: 17px; }
.ir-contact-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-block: -12px; text-underline-offset: 5px; touch-action: manipulation; }
.ir-people { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: var(--ir-space-4); }
.ir-people .ir-card { margin-top: 0; max-width: none; }
.ir-people__name { margin: 0 0 var(--ir-space-2); font-size: 20px; font-weight: 600; }
.ir-people .ir-contact-link { display: flex; margin-block: 0; }
.ir-empty {
    display: flex;
    align-items: center;
    gap: var(--ir-space-4);
    margin: 0;
    max-width: 620px;
    padding: var(--ir-space-5) var(--ir-space-6);
    border: 1px dashed var(--line-strong);
    color: var(--muted);
    font-size: 15px;
}
.ir-empty > span { flex: none; width: 8px; height: 8px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--signal); }

/* ---------- Hover tylko tam, gdzie jest wskaźnik ---------- */
@media (hover: hover) and (pointer: fine) {
    .ir-rail__list a:hover { color: var(--text); }
    .ir-doc:hover .ir-doc__title { color: var(--ir-signal-hover); }
    a.ir-cv:hover { color: var(--ir-signal-hover); }
    .ir-doc:hover .ir-doc__action > span[aria-hidden] { transform: translateY(3px); }
    .ir-link:hover { border-color: var(--signal); }
    .ir-link:hover .ir-link__arrow { transform: translate(3px, -3px); }
}

/* ---------- Tabele i listy składane wg szerokości kolumny treści ---------- */
@container (max-width: 780px) {
    .ir-table--members thead, .ir-table--shareholders thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
    }
    .ir-table--members, .ir-table--members tbody, .ir-table--members tr, .ir-table--members th, .ir-table--members td, .ir-table--members caption,
    .ir-table--shareholders, .ir-table--shareholders tbody, .ir-table--shareholders tfoot, .ir-table--shareholders tr, .ir-table--shareholders th, .ir-table--shareholders td { display: block; width: auto; }
    .ir-table--members caption { border-bottom: 1px solid var(--line-strong); }
    .ir-table--members tr, .ir-table--shareholders tr { padding: var(--ir-space-5) 0; border-bottom: 1px solid var(--line); }
    .ir-table--members tbody tr, .ir-table--shareholders tbody tr, .ir-table--shareholders tfoot tr {
        display: grid;
        grid-template-columns: minmax(0, 13rem) minmax(0, 1fr);
        column-gap: var(--ir-space-6);
    }
    .ir-table--members tbody th, .ir-table--shareholders tbody th, .ir-table--shareholders tfoot th { grid-row: 1 / span 6; }
    .ir-table--members tbody td, .ir-table--shareholders tbody td, .ir-table--shareholders tfoot td { grid-column: 2; }
    .ir-table--shareholders tbody tr:first-child { border-top: 1px solid var(--line-strong); }
    .ir-table--shareholders tfoot tr { border-bottom: 0; }
    .ir-table--members tbody th, .ir-table--shareholders tbody th, .ir-table--shareholders tfoot th {
        padding: 0 0 var(--ir-space-3);
        border: 0;
        font-size: 19px;
        letter-spacing: -.01em;
    }
    .ir-table--members tbody td, .ir-table--shareholders tbody td, .ir-table--shareholders tfoot td {
        display: grid;
        grid-template-columns: minmax(0, 12rem) minmax(0, 1fr);
        gap: var(--ir-space-4);
        align-items: baseline;
        padding: 7px 0;
        border: 0;
        text-align: left;
        white-space: normal;
    }
    .ir-table td::before { content: attr(data-label); }
    .ir-table--members .ir-cv { justify-self: start; }
    .ir-table--members a.ir-cv { margin: -12px 0 -12px -11px; }
    .ir-table--shareholders td.is-num { text-align: left; }
}
@container (max-width: 620px) {
    .ir-table--members tbody tr, .ir-table--shareholders tbody tr, .ir-table--shareholders tfoot tr { display: block; }
    .ir-debut { grid-template-columns: minmax(0, 1fr); }
    .ir-criteria li { grid-template-columns: 30px minmax(0, 1fr); }
    .ir-criteria p { grid-column: 2; }
    .ir-doc { grid-template-columns: auto minmax(0, 1fr); row-gap: var(--ir-space-3); align-items: start; }
    .ir-doc__icon { padding-top: 2px; }
    .ir-doc__meta { grid-column: 2; }
    .ir-doc__action { grid-column: 2; }
    .ir-links { grid-template-columns: minmax(0, 1fr); }
    .ir-link { min-height: 150px; }
    .ir-table--calendar thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    .ir-table--calendar, .ir-table--calendar tbody, .ir-table--calendar tr, .ir-table--calendar th, .ir-table--calendar td { display: block; width: auto; }
    .ir-table--calendar caption { display: block; border-bottom: 1px solid var(--line-strong); }
    .ir-table--calendar tr { padding: var(--ir-space-4) 0; border-bottom: 1px solid var(--line); }
    .ir-table--calendar tbody th { padding: 0 0 6px; border: 0; }
    .ir-table--calendar tbody td { padding: 0; border: 0; }
}
@container (max-width: 420px) {
    .ir-table--members tbody td, .ir-table--shareholders tbody td, .ir-table--shareholders tfoot td, .ir-dl > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
    .ir-legend__count { display: none; }
}

/* ---------- Mobile / tablet: szyna staje się paskiem ---------- */
@media (max-width: 980px) {
    .ir { --ir-space-18: 56px; }
    .ir-layout { grid-template-columns: minmax(0, 1fr); gap: 0; margin-top: var(--ir-space-12); }
    .ir-rail { position: static; padding-left: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
    .ir-js .ir-rail { border-bottom: 0; }
    .ir-rail__list { max-height: none; overflow: visible; padding-block: var(--ir-space-2); }
    .ir-rail__progress { display: none; }
    .ir-section { scroll-margin-top: calc(var(--ir-bar-h) + var(--ir-space-2)); }
    .ir-section:first-child { padding-top: var(--ir-space-12); }

    /* Z JS: przyklejony pasek „bieżąca sekcja” z rozwijaną listą. Bez JS zostaje zwykła lista powyżej treści. */
    .ir-js .ir-rail {
        position: sticky;
        top: var(--ir-header-h);
        z-index: 40;
        border-top: 0;
    }
    /* Full-bleed backing for the stuck bar (body clips horizontal overflow). */
    .ir-js .ir-rail::before {
        content: "";
        position: absolute;
        inset: 0 calc(50% - 50vw);
        z-index: -1;
        border-bottom: 1px solid var(--line);
        background: var(--ink);
    }
    .ir-js .ir-rail__toggle {
        display: flex;
        align-items: center;
        gap: var(--ir-space-4);
        width: 100%;
        height: var(--ir-bar-h);
        padding: 0;
        border: 0;
        background: none;
        color: var(--text);
        text-align: left;
        cursor: pointer;
        touch-action: manipulation;
    }
    .ir-js .ir-rail__toggle:focus-visible { outline-offset: -2px; }
    .ir-rail__current { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: var(--ir-space-3); font-size: 15px; font-weight: 600; }
    .ir-rail__current .ir-rail__no { color: var(--signal); font-weight: 400; }
    .ir-rail__current-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .ir-rail__count { color: var(--muted); font-family: var(--mono); font-size: var(--ir-text-label); white-space: nowrap; }
    .ir-rail__toggle[aria-expanded="true"] .ir-rail__chevron { transform: translateY(4px) rotate(225deg); }
    .ir-js .ir-rail__progress { display: block; inset: auto 0 -1px 0; width: auto; height: 2px; background: transparent; }
    .ir-js .ir-rail__progress span { transform: scaleX(var(--ir-progress, 0)); transform-origin: left; }
    .ir-js .ir-rail__list {
        position: absolute;
        inset: 100% calc(50% - 50vw) auto;
        max-height: calc(100vh - var(--ir-header-h) - var(--ir-bar-h) - var(--ir-space-6));
        max-height: calc(100dvh - var(--ir-header-h) - var(--ir-bar-h) - var(--ir-space-6));
        overflow-y: auto;
        overscroll-behavior: contain;
        padding: var(--ir-space-2) calc(50vw - 50%) var(--ir-space-4);
        border-bottom: 1px solid var(--line-strong);
        background: var(--ink);
        visibility: hidden;
        opacity: 0;
        transform: translateY(-6px);
        transition: opacity var(--duration-fast) var(--ease-field), transform var(--duration-fast) var(--ease-field), visibility 0s linear var(--duration-fast);
    }
    .ir-js .ir-rail.is-open .ir-rail__list { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
    .ir-js .ir-rail__list a { min-height: 48px; padding-block: 13px; font-size: 16px; }
}
@media (max-width: 768px) {
    .ir { --ir-header-h: 73px; padding-top: 120px; }
    .ir-facts > div { flex-basis: 100%; padding: var(--ir-space-4) 0; }
    .ir-facts > div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
    .ir-facts > div { display: flex; align-items: baseline; justify-content: space-between; gap: var(--ir-space-4); }
    .ir-facts dd { margin: 0; text-align: right; }
    .ir-card { padding: var(--ir-space-5); }
}

@media (prefers-reduced-motion: reduce) {
    .ir-rail__list, .ir-rail__list a, .ir-legend__chevron, .ir-rail__chevron, .ir-doc__title, .ir-doc__action > span[aria-hidden], .ir-link, .ir-link__arrow { transition: none; }
}
