/* ============================================================
   AETHERIX — Demo Walkthrough page (#demo-walkthrough)
   Scoped under .dw so nothing leaks into the rest of the site.
   ============================================================ */

.dw-step {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 12px;
}

.dw-step-n {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 700;
    background: rgba(var(--accent-rgb), 0.14);
    color: var(--accent);
    border: 1px solid rgba(var(--accent-rgb), 0.35);
}

/* screenshot figures ------------------------------------------------ */

.dw-shot {
    margin: 14px 0 4px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-input);
}

.dw-shot img {
    display: block;
    width: 100%;
    height: auto;
    /* Screenshots are tall; cap them so a page scroll stays usable and let
       the reader open the full image in a new tab. */
    max-height: 520px;
    object-fit: cover;
    object-position: top center;
}

.dw-shot figcaption {
    padding: 9px 13px;
    font-size: 0.78rem;
    color: var(--text-secondary);
    border-top: 1px solid var(--border);
    background: var(--code-bg);
}

.dw-shot figcaption a { color: var(--accent); text-decoration: none; }
.dw-shot figcaption a:hover { text-decoration: underline; }

/* the "what it means" / "likely question" callouts -------------------- */

.dw-means,
.dw-ask {
    border-left: 3px solid var(--border-bright);
    padding: 10px 14px;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    margin-top: 12px;
    font-size: 0.88rem;
    line-height: 1.7;
}

.dw-means {
    border-left-color: rgba(var(--success-rgb), 0.55);
    background: rgba(var(--success-rgb), 0.06);
}

.dw-ask {
    border-left-color: rgba(var(--warning-rgb), 0.55);
    background: rgba(var(--warning-rgb), 0.06);
}

.dw-label {
    display: block;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.dw-means .dw-label { color: var(--success); }
.dw-ask .dw-label { color: var(--warning); }

/* tier table --------------------------------------------------------- */

.dw-tier {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 0.76rem;
    font-weight: 700;
}

.dw-tier.t1 { background: rgba(var(--success-rgb), 0.16); color: var(--success); }
.dw-tier.t2 { background: rgba(var(--accent-rgb), 0.16); color: var(--accent); }
.dw-tier.t3 { background: rgba(var(--quantum-rgb), 0.16); color: var(--quantum); }
.dw-tier.t4 { background: rgba(var(--warning-rgb), 0.16); color: var(--warning); }
.dw-tier.tx { background: rgba(var(--danger-rgb), 0.16); color: var(--danger); }

/* module output blocks ------------------------------------------------ */

.dw-mod {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px 18px;
    margin-bottom: 18px;
    background: var(--bg-card);
}

.dw-mod-head {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.dw-mod-head h3 { font-size: 1.02rem; margin: 0; }

.dw-mod .mock-terminal { margin-top: 10px; }

@media (max-width: 620px) {
    .dw-shot img { max-height: 340px; }
}

/* ============================================================
   Inline YouTube player on the Study Resources page (#study).
   The iframe is created only on first play, so nothing is
   requested from YouTube — and no cookies are set — on page load.
   ============================================================ */

.yt-player {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #000;
}

.yt-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: radial-gradient(ellipse at center, rgba(var(--quantum-rgb), 0.16), #05070d 70%);
}

.yt-frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.yt-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
    padding: 20px;
}

.yt-placeholder-icon { font-size: 2.4rem; opacity: 0.9; }
.yt-placeholder-title { font-size: 1rem; font-weight: 600; color: var(--text-primary); }
.yt-placeholder-sub { font-size: 0.8rem; color: var(--text-muted); }

.yt-nowplaying {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 10px 14px;
    background: var(--bg-input);
    border-top: 1px solid var(--border);
}

.yt-np-label {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--success);
    white-space: nowrap;
}

.yt-np-title {
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
    min-width: 0;
}

.yt-np-out { font-size: 0.78rem; color: var(--accent); text-decoration: none; white-space: nowrap; }
.yt-np-out:hover { text-decoration: underline; }

.yt-np-close {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    border-radius: 6px;
    width: 26px;
    height: 26px;
    cursor: pointer;
    line-height: 1;
    flex-shrink: 0;
}
.yt-np-close:hover { border-color: var(--danger); color: var(--danger); }

.yt-row.playing td { background: rgba(var(--success-rgb), 0.08); }
.yt-row.playing td:first-child { box-shadow: inset 3px 0 0 var(--success); }

@media (max-width: 620px) {
    .yt-np-title { flex-basis: 100%; }
}
