/* ── AWS re:Invent 2026 na żywo (/reinvent-2026): oś czasu + okno z podsumowaniem ── */
.ri { display: flex; flex-direction: column; height: var(--ri-h, 70vh); --ri-lab: 58px; }
/* strona w wysokości ekranu: tytuł i stopka stoją, przewija się tylko oś czasu */
html.ri-page, html.ri-page body { height: 100%; overflow: hidden; overscroll-behavior: none; }
html.ri-page main { padding-top: clamp(16px, 4vh, 48px); padding-bottom: 20px; }
@media (max-height: 760px) {
    .ri-head h1 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); margin-top: 10px; }
    .ri-head .lead { margin-top: 10px; font-size: 0.95rem; }
    .ri-search { margin-top: 16px; padding: 8px 14px; }
}

/* nagłówek strony stoi w miejscu, przewija się tylko oś czasu (własne okno, krawędzie wygaszone maską, bez teł: zmiana motywu nie robi prostokątów) */
.ri-head { padding-bottom: 8px; }
/* ramka osi: przewijane okno + nazwa bieżącego dnia na górze (bez tła: ogłoszenia znikają pod nią w wygaszonym pasie maski) */
.ri-frame { position: relative; flex: 1; min-height: 0; margin-top: 14px; overflow: hidden; opacity: 0; animation: text-in 0.8s ease-out 0.9s forwards; }
.ri-scroll {
    height: 100%; overflow-y: auto; overscroll-behavior: contain;
    margin-right: -12px; padding-right: 12px;
    scrollbar-width: thin; scrollbar-color: var(--divider) transparent;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, transparent calc(var(--ri-lab) - 4px), #000 calc(var(--ri-lab) + 18px), #000 calc(100% - 48px), transparent 100%);
            mask-image: linear-gradient(to bottom, transparent 0, transparent calc(var(--ri-lab) - 4px), #000 calc(var(--ri-lab) + 18px), #000 calc(100% - 48px), transparent 100%);
}
.ri-day-head.ri-float {
    position: absolute; top: 0; left: 0; right: 0; z-index: 2; margin: 0; pointer-events: none;
    will-change: transform;
}
/* pole wyszukiwania zwija się, gdy ktoś przewija oś, i wraca na górze listy */
.ri-find { max-height: 90px; overflow: hidden; transition: max-height 0.55s cubic-bezier(0.45, 0, 0.55, 1), opacity 0.4s ease-in-out; }
.ri.ri-compact .ri-find { max-height: 0; opacity: 0; }
.ri-scroll::-webkit-scrollbar { width: 6px; }
.ri-scroll::-webkit-scrollbar-thumb { background: var(--divider); border-radius: 3px; }
.ri-head h1 { margin-bottom: 0; }
.ri-search {
    display: flex; align-items: center; gap: 12px; margin-top: 26px; margin-bottom: 2px; max-width: 560px;
    padding: 11px 16px; border: 1px solid var(--tag-border); border-radius: 999px; background: none;
    transition: border-color 0.3s ease;
    opacity: 0; animation: text-in 0.8s ease-out 0.8s forwards;
}
.ri-search:focus-within { border-color: var(--accent); }
.ri-search svg { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--fg-subtle); stroke-width: 2; stroke-linecap: round; }
.ri-search input {
    flex: 1; min-width: 0; background: none; border: none; outline: none;
    font-family: inherit; font-size: 1rem; font-weight: 300; color: var(--fg);
}
.ri-search input::placeholder { color: var(--fg-subtle); }
.ri-search input::-webkit-search-cancel-button { display: none; }
.ri-count { flex: none; font-size: 0.62rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg-subtle); }
.ri-empty { margin: 24px 0 0; color: var(--fg-subtle); }
.ri-item[hidden], .ri-day[hidden] { display: none; }
mark.ri-hit { background: none; color: var(--accent); }
.ri-live { display: inline-flex; align-items: center; gap: 8px; margin-right: 4px; color: var(--accent); font-weight: 500; font-size: 0.8em; letter-spacing: 0.16em; text-transform: uppercase; vertical-align: 0.08em; animation: ri-blink 1.6s ease-in-out infinite; }
@keyframes ri-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
.ri-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: ri-pulse 1.6s ease-in-out infinite; }
@keyframes ri-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* oś czasu: cienka linia po lewej, bursztynowe wypełnienie rośnie przy przewijaniu */
.ri-stream { position: relative; padding: 0 0 0 44px; }
.ri-rail { position: absolute; left: 6px; top: 29px; bottom: 0; width: 1px; background: var(--divider); }
.ri-rail-fill { position: absolute; left: 0; top: 0; width: 1px; height: 0; background: var(--accent); transition: height 0.25s linear; }

.ri-day { position: relative; }
.ri-day + .ri-day { margin-top: 64px; }
.ri-day[hidden] + .ri-day { margin-top: 0; }
.ri-day-head {
    position: relative; display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap;
    margin: 0 0 8px -44px; padding: 14px 0 14px 44px;
    font-size: clamp(1.1rem, 1.8vw, 1.4rem); font-weight: 400;
    border-bottom: 1px solid var(--panel-border);
}
.ri-day-dot { position: absolute; left: 2px; top: 50%; width: 9px; height: 9px; margin-top: -4px; border-radius: 50%; background: var(--accent); }
.ri-day-count { font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg-subtle); }

.ri-list { list-style: none; margin: 0; padding: 0; }
.ri-item { position: relative; padding: 22px 0; border-bottom: 1px solid var(--panel-border); }
.ri-item:last-child { border-bottom: none; }
.ri-node {
    position: absolute; left: -40px; top: 30px; width: 5px; height: 5px; border-radius: 50%;
    background: var(--fg-subtle);
    transition: background-color 0.6s ease-in-out;
}
.ri-item.passed .ri-node { background: var(--accent); }

.ri-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-bottom: 8px; }
.ri-row time { font-size: 0.8rem; font-weight: 400; font-variant-numeric: tabular-nums; color: var(--fg-muted); }
.ri-tag, .ri-status { font-size: 0.62rem; font-weight: 400; letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg-subtle); }
.ri-status { padding: 2px 8px; border: 1px solid var(--panel-border); border-radius: 999px; }

.ri-title {
    display: block; width: 100%; padding: 0; margin: 0; text-align: left; cursor: pointer;
    background: none; border: none; color: var(--fg);
    font-family: inherit; font-size: clamp(1.05rem, 1.7vw, 1.3rem); font-weight: 300; line-height: 1.45;
    transition: color 0.35s ease;
}
.ri-title:hover, .ri-title:focus-visible { color: var(--accent); outline: none; }

/* wejście elementów przy przewijaniu (tylko z JS) */
html.ri-js .ri-item { opacity: 0; transform: translateY(12px); transition: opacity 0.8s ease-in-out, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1); }
html.ri-js .ri-item.in { opacity: 1; transform: translateY(0); }

.ri-end { margin: 40px 0 0; font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg-subtle); }
.ri-credit { margin: 40px 0 56px; max-width: 640px; font-size: 0.9rem; color: var(--fg-subtle); }

/* rozwinięcie ogłoszenia w miejscu, na osi: kropka rośnie, od niej bursztynowa linia, punkty wpadają po kolei na mini-osi */
.ri-node { transition: background-color 0.6s ease-in-out, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.5s ease-in-out; }
.ri-node::after {
    content: ''; position: absolute; left: 8px; top: 2px; width: 11px; height: 1px; background: var(--accent);
    transform: scaleX(0); transform-origin: left center; transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.ri-item.open .ri-node { background: var(--accent); transform: scale(1.8); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.ri-item.open .ri-node::after { transform: scaleX(1); transition-delay: 0.1s; }
.ri-item.open .ri-title { color: var(--fg); font-weight: 400; }
.ri-row, .ri-title { transition: opacity 0.6s ease-in-out, color 0.35s ease; }
.ri-stream.has-open .ri-item:not(.open) .ri-row,
.ri-stream.has-open .ri-item:not(.open) .ri-title { opacity: 0.38; }
.ri-stream.has-open .ri-item:not(.open) .ri-title:hover { opacity: 0.8; }

.ri-exp { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.7s cubic-bezier(0.45, 0, 0.55, 1); }
.ri-item.open .ri-exp { grid-template-rows: 1fr; }
.ri-exp-in { min-height: 0; overflow: hidden; }
.ri-exp-body { position: relative; padding: 20px 0 8px 24px; max-width: 860px; cursor: pointer; }
.ri-points { margin: 0; padding: 0; list-style: none; }
.ri-points li {
    position: relative; margin: 0 0 12px; line-height: 1.6; color: var(--fg-muted);
    opacity: 0; transform: translateY(8px);
    transition: opacity 0.35s ease-in-out, transform 0.35s ease-in-out;
}
.ri-item.open .ri-points li {
    opacity: 1; transform: none;
    transition: opacity 0.6s ease-in-out calc(0.25s + var(--i, 0) * 0.09s), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1) calc(0.25s + var(--i, 0) * 0.09s);
}
.ri-points li::before { content: ''; position: absolute; left: -20px; top: 0.72em; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.ri-links { opacity: 0; transition: opacity 0.35s ease-in-out; }
.ri-item.open .ri-links { opacity: 1; transition: opacity 0.6s ease-in-out calc(0.35s + var(--n, 4) * 0.09s); }
.ri-links { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 22px; }
.ri-links .btn { margin-top: 0; }
.ri-links .btn.ri-blog { background: none; border-color: var(--fg-subtle); color: var(--fg); }
.ri-links .btn.ri-blog:hover, .ri-links .btn.ri-blog:focus-visible { background: none; border-color: var(--accent); color: var(--accent); outline: none; }

@media (max-width: 640px) {
    .ri-head .lead { font-size: 0.98rem; }
    .ri-stream { padding-left: 28px; }
    .ri-day-head { margin-left: -28px; padding-left: 28px; }
    .ri-day-head { flex-wrap: nowrap; gap: 10px; font-size: 1.02rem; white-space: nowrap; }
    .ri-day-count { font-size: 0.56rem; letter-spacing: 0.12em; }
    .ri-day-head.ri-float { margin: 0; }
    .ri-node { left: -24px; }
    .ri-node::after { display: none; }
    .ri-exp-body { padding-left: 18px; }
    .ri-points li::before { left: -14px; }
    .ri-stream { padding-left: 28px; }
}
@media (prefers-reduced-motion: reduce) {
    html.ri-js .ri-item { opacity: 1; transform: none; }
    .ri-dot, .ri-live { animation: none; opacity: 1; }
}

/* ── Telefon: przewija się cała strona; pod menu przyklejony pasek z dniami i lupą ── */
.ri-bar { display: none; }
@media (max-width: 700px) {
    html.ri-page, html.ri-page body { height: auto; overflow: visible; overscroll-behavior: auto; }
    html.ri-page main { padding-bottom: 8px; }
    .ri { display: block; height: auto; }
    .ri-find { display: none; }
    .ri-head { padding-bottom: 4px; }
    .ri-head .lead { margin-bottom: 0; }
    .ri-frame { overflow: visible; margin-top: 0; }
    .ri-scroll { height: auto; overflow: visible; margin-right: 0; padding-right: 0; -webkit-mask-image: none; mask-image: none; }
    .ri-day-head.ri-float { display: none; }
    .ri-stream { padding-top: 8px; }
    .ri-rail { top: 37px; }
    .ri-credit { margin: 28px 0 20px; }
    .ri-end { margin-top: 14px; }
    .ri-day + .ri-day { margin-top: 28px; }
    .ri-day[hidden] + .ri-day { margin-top: 0; }
    .ri-credit { margin: 22px 0 12px; }

    .ri-bar {
        position: sticky; top: var(--ri-bar-top, 64px); z-index: 20;
        display: flex; align-items: center; gap: 10px;
        margin: 18px -28px 0; padding: 10px 28px;
        background: var(--bg); border-bottom: 1px solid var(--panel-border);
        opacity: 0; animation: text-in 0.8s ease-out 0.85s forwards;
    }
    html.sky-on .ri-bar { background: transparent !important; }
    .ri-bar-days { flex: 1; min-width: 0; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
    .ri-bar-days::-webkit-scrollbar { display: none; }
    .ri-chip {
        flex: none; padding: 7px 12px; border-radius: 999px; cursor: pointer;
        background: none; border: 1px solid var(--tag-border); color: var(--fg-muted);
        font-family: inherit; font-size: 0.66rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase;
        transition: color 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
    }
    .ri-chip.on { border-color: var(--accent); color: var(--accent); }
    .ri-bar-find { display: none; flex: 1; min-width: 0; align-items: center; gap: 10px; }
    .ri-bar-find input {
        flex: 1; min-width: 0; padding: 7px 0; background: none; border: none; outline: none;
        font-family: inherit; font-size: 16px; font-weight: 300; color: var(--fg);   /* 16px: iOS nie powiększa strony przy fokusie */
    }
    .ri-bar-find input::placeholder { color: var(--fg-subtle); }
    .ri-bar-find input::-webkit-search-cancel-button { display: none; }
    .ri-bar.searching .ri-bar-days { display: none; }
    .ri-bar.searching .ri-bar-find { display: flex; }
    .ri-bar-btn {
        flex: none; width: 34px; height: 34px; padding: 0; border-radius: 50%; cursor: pointer;
        display: flex; align-items: center; justify-content: center;
        background: none; border: 1px solid var(--tag-border); color: var(--fg-muted);
    }
    .ri-bar-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
    .ri-bar-btn .i-close, .ri-bar.searching .ri-bar-btn .i-search { display: none; }
    .ri-bar.searching .ri-bar-btn .i-close { display: block; }
    .ri-bar.searching .ri-bar-btn { border-color: var(--accent); color: var(--accent); }
}

/* samoczynne zwinięcie poza ekranem: bez animacji */
.ri-item.snap, .ri-item.snap * { transition: none !important; }
/* przewinięcie przy samoczynnym zwijaniu koryguje JS; korekta przeglądarki (scroll anchoring) by się z nią dublowała */
html.ri-page, html.ri-page body, .ri-scroll { overflow-anchor: none; }
.ri-nowrap { white-space: nowrap; }
.ri-tz { margin-left: 5px; font-size: 0.6rem; letter-spacing: 0.12em; color: var(--fg-subtle); }
