/*
 * Stream test (/tools/stream-test and shared results). Loaded by those
 * pages only; every colour is a site.css token. The root's data-phase
 * (idle, waiting, receiving, analyzing, done, interrupted, expired, busy)
 * drives the signal path; speedtest.js only feeds --st-flow / --st-thick
 * and the timeline.
 */

.st-section { padding-block: var(--rh-s6) var(--rh-s8); }
.st-title { margin: 0 0 var(--rh-s4); text-align: center; font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem); }

.st { display: grid; gap: var(--rh-s4); max-width: 64rem; margin-inline: auto; min-width: 0; }

/* ── Setup: server, key ──────────────────────────────────────────────── */

.st-setup {
    display: grid; gap: var(--rh-s3); padding: var(--rh-s4);
    border: 1px solid var(--rh-border); border-radius: var(--rh-r-md); background: var(--rh-surface); min-width: 0;
}
.st-setup[hidden] { display: none; }
.st-setup .rh-field, .st-setup__key { min-width: 0; }
.st-setup form { margin: 0; }
.st-setup__key[hidden], .st-getkey[hidden] { display: none; }
.st-getkey { display: grid; gap: 0.375rem; min-width: 0; }
.st-getkey__row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--rh-s3); }
.st-getkey__btn { min-height: 44px; }
/* The invisible (interaction-only) widget still mounts a 300×65 frame: keep it
   out of the flow until Cloudflare asks for a click, so nothing shifts. */
.st-captcha:not(.is-interactive) { height: 0; overflow: hidden; line-height: 0; }
.st-getkey__btn.is-loading { cursor: progress; opacity: 1; display: inline-flex; align-items: center; gap: 0.5rem; }
.st-getkey__btn.is-loading::before { content: ""; width: 1em; height: 1em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: st-spin 0.7s linear infinite; }
@keyframes st-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .st-getkey__btn.is-loading::before { animation-duration: 2s; } }
.st-setup__hint { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--rh-s2); margin: 0; color: var(--rh-muted); font-size: var(--rh-fs-sm); }
.st-setup__ttl { font-variant-numeric: tabular-nums; }
@media (min-width: 720px) {
    .st-setup { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .st-setup__hint { grid-column: 1 / -1; }
}

/* ── Stage ───────────────────────────────────────────────────────────── */

.st-stage {
    display: grid; gap: var(--rh-s5); min-width: 0;
    padding: clamp(var(--rh-s4), 3vw, var(--rh-s6));
    border: 1px solid var(--rh-border); border-radius: var(--rh-r-lg);
    background: var(--rh-surface);
}

/* Signal path: OBS → link → monitor → link → platforms */
.st-chain {
    display: flex; flex-direction: column; align-items: center; gap: 0;
    margin: 0; padding: 0; list-style: none; min-width: 0;
}
.st-chain > li { min-width: 0; }

.st-node--obs { display: flex; align-items: center; gap: var(--rh-s2); }
.st-node__icon {
    display: grid; place-items: center; width: 3.25rem; height: 3.25rem; border-radius: 50%;
    border: 2px solid var(--rh-border-strong); background: var(--rh-surface-2); color: var(--rh-faint);
    transition: border-color 0.4s ease, color 0.4s ease, box-shadow 0.4s ease;
}
.st-node__icon svg { width: 1.45rem; height: 1.45rem; }
.st-node__name { color: var(--rh-text-2); font-size: var(--rh-fs-sm); font-weight: 600; letter-spacing: 0.02em; }
.st[data-phase="waiting"] .st-node__icon { animation: st-call 1.8s ease-out infinite; color: var(--rh-info); border-color: var(--rh-info-soft); }
.st[data-phase="receiving"] .st-node__icon,
.st[data-phase="analyzing"] .st-node__icon,
.st[data-phase="done"] .st-node__icon,
.st--shared .st-node__icon { border-color: var(--rh-accent); color: var(--rh-accent-text); box-shadow: 0 0 0 4px var(--rh-accent-soft); }

/* Links: a dashed wire, and the flowing pulses over it while a signal arrives */
.st-link { position: relative; align-self: stretch; height: 2.25rem; }
.st-link::before {
    content: ""; position: absolute; top: 0; bottom: 0; left: 50%;
    border-left: 2px dashed var(--rh-border-strong); transition: border-color 0.4s ease;
}
.st-link--out { height: 1.25rem; }
.st-link__flow {
    --st-thick: 2px; --st-flow: 0px;
    position: absolute; top: 0; bottom: 0; left: 50%; width: var(--st-thick); transform: translateX(-50%);
    border-radius: 999px; opacity: 0; transition: opacity 0.5s ease;
    background: repeating-linear-gradient(180deg, transparent 0, var(--rh-accent) 12px, transparent 24px, transparent 30px);
    background-position: 0 var(--st-flow);
}
.st[data-phase="receiving"] .st-link--in .st-link__flow,
.st[data-phase="analyzing"] .st-link--in .st-link__flow { opacity: 1; }
.st[data-phase="receiving"] .st-link--in::before,
.st[data-phase="analyzing"] .st-link--in::before { border-color: transparent; }
.st[data-phase="done"] .st-link--in::before,
.st--shared .st-link--in::before,
.st-stage.is-final .st-link--out::before { border-left-style: solid; border-color: var(--rh-accent-border); }

/* Monitor: the RelayHalo node, with the live preview */
.st-relay { width: 100%; }
.st-monitor {
    position: relative; padding: 0.35rem; border: 1px solid var(--rh-border-strong); border-radius: var(--rh-r-md);
    background: var(--rh-screen); box-shadow: var(--rh-shadow-3);
    transition: border-color 0.5s ease, box-shadow 0.5s ease;
}
.st[data-phase="receiving"] .st-monitor,
.st[data-phase="analyzing"] .st-monitor { border-color: var(--rh-accent-border); box-shadow: var(--rh-shadow-3), 0 0 0 4px var(--rh-accent-soft); }
.st-monitor__screen { border-radius: var(--rh-r-sm); background: var(--rh-screen); }
.st-monitor .rh-preview__video { background: var(--rh-screen); }
.st-monitor__idle {
    background:
        repeating-linear-gradient(0deg, color-mix(in srgb, var(--rh-on-screen) 2.5%, transparent) 0 1px, transparent 1px 3px),
        radial-gradient(ellipse at center, var(--rh-scene-sky-1) 0%, var(--rh-screen) 75%);
    color: var(--rh-faint);
}
.st-monitor__idle p {
    margin: 0; font: 500 var(--rh-fs-sm)/1.3 var(--rh-mono); letter-spacing: 0.14em; text-transform: uppercase;
}
.st-monitor__idle .st-monitor__format { color: var(--rh-text-2); font-size: var(--rh-fs-lg); letter-spacing: 0.04em; text-transform: none; }
.st[data-phase="receiving"] .st-monitor__idle p,
.st[data-phase="analyzing"] .st-monitor__idle p { color: var(--rh-accent-text); animation: st-blink 1.6s ease-in-out infinite; }

.st-tag {
    position: absolute; z-index: 2; display: inline-flex; align-items: center; gap: 0.35rem;
    padding: 0.15rem 0.45rem; border-radius: 4px; pointer-events: none;
    background: var(--rh-scrim); color: var(--rh-on-screen); font: 500 0.6875rem/1.4 var(--rh-mono); letter-spacing: 0.06em;
}
.st-tag[hidden] { display: none; }
.st-tag--live { top: 0.85rem; left: 0.85rem; background: var(--rh-live); color: var(--rh-on-live); font-family: var(--rh-font); font-weight: 600; text-transform: uppercase; }
.st-tag--live i { width: 0.4rem; height: 0.4rem; border-radius: 50%; background: currentColor; animation: st-blink 1.2s ease-in-out infinite; }
.st-tag--format { top: 0.85rem; right: 0.85rem; font-variant-numeric: tabular-nums; }
.st-tag--node { bottom: 0.85rem; left: 0.85rem; color: var(--rh-accent-text); }

/* Platforms: a bus from the monitor, one node each */
.st-fan { width: 100%; }
.st-dests {
    position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--rh-s2);
    margin: 0; padding: 1.1rem 0 0; list-style: none;
}
.st-dest { position: relative; min-width: 0; }
/* ::before is the node's own stub, ::after the bus segment to the next node */
.st-dest::before {
    content: ""; position: absolute; top: -1.1rem; left: 50%; height: 1.1rem;
    border-left: 2px dashed var(--rh-border-strong); transition: border-color 0.5s ease;
}
.st-dest:not(:last-child)::after {
    content: ""; position: absolute; top: -1.1rem; left: 50%; width: calc(100% + var(--rh-s2));
    border-top: 2px dashed var(--rh-border-strong);
}
.st-stage.is-final .st-dest::after { border-top-style: solid; border-color: var(--rh-accent-border); }
.st-dest__node {
    display: flex; flex-direction: column; align-items: center; gap: 0.35rem; width: 100%; min-width: 0;
    padding: 0.55rem 0.4rem; border: 1px solid var(--rh-border); border-radius: var(--rh-r-md);
    background: var(--rh-surface-2); color: var(--rh-text); font: inherit; text-align: center; cursor: default;
    transition: border-color 0.5s ease, background-color 0.5s ease;
}
.st-dest__node:focus-visible { outline: 2px solid var(--rh-focus); outline-offset: 2px; }
.st-dest .rh-platform { width: 2rem; height: 2rem; border-radius: 50%; filter: grayscale(0.7); opacity: 0.6; transition: filter 0.5s ease, opacity 0.5s ease; }
.st-dest__text { display: grid; min-width: 0; }
.st-dest__name { overflow: hidden; color: var(--rh-text-2); font-size: var(--rh-fs-sm); font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.st-dest__status { font-size: 0.75rem; font-weight: 600; }
.st-dest__status:empty { display: none; }

.st-dest.is-ok .st-dest__node, .st-dest.is-warn .st-dest__node, .st-dest.is-fail .st-dest__node { cursor: help; }
.st-dest.is-ok .rh-platform, .st-dest.is-warn .rh-platform, .st-dest.is-fail .rh-platform { filter: none; opacity: 1; }
.st-dest.is-ok .st-dest__node { border-color: color-mix(in srgb, var(--rh-success) 40%, transparent); background: var(--rh-success-soft); }
.st-dest.is-ok .st-dest__status { color: var(--rh-success); }
.st-dest.is-ok::before { border-left-style: solid; border-color: var(--rh-success); }
.st-dest.is-warn .st-dest__node { border-color: color-mix(in srgb, var(--rh-warn) 45%, transparent); background: var(--rh-warn-soft); }
.st-dest.is-warn .st-dest__status { color: var(--rh-warn); }
.st-dest.is-warn::before { border-left-style: solid; border-color: var(--rh-warn); }
.st-dest.is-fail .st-dest__node { border-color: color-mix(in srgb, var(--rh-danger) 45%, transparent); background: var(--rh-danger-soft); }
.st-dest.is-fail .st-dest__status { color: var(--rh-danger); }
.st-dest.is-fail::before { border-left-style: solid; border-color: var(--rh-danger); }
.st-stage.is-final .st-dest:nth-child(2) .st-dest__node, .st-stage.is-final .st-dest:nth-child(2)::before, .st-stage.is-final .st-dest:nth-child(2) .rh-platform { transition-delay: 0.15s; }
.st-stage.is-final .st-dest:nth-child(3) .st-dest__node, .st-stage.is-final .st-dest:nth-child(3)::before, .st-stage.is-final .st-dest:nth-child(3) .rh-platform { transition-delay: 0.3s; }

.st-dest__why {
    position: absolute; z-index: 5; top: calc(100% + 0.4rem); left: 50%; width: max-content; max-width: min(15rem, 80vw);
    padding: 0.45rem 0.65rem; border: 1px solid var(--rh-border-strong); border-radius: var(--rh-r-sm);
    background: var(--rh-surface-3); box-shadow: var(--rh-shadow-2); color: var(--rh-text); font-size: var(--rh-fs-sm); line-height: 1.35;
    opacity: 0; visibility: hidden; pointer-events: none; transform: translate(-50%, -4px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}
.st-dest:first-child .st-dest__why { left: 0; transform: translate(0, -4px); }
.st-dest:last-child .st-dest__why { left: auto; right: 0; transform: translate(0, -4px); }
.st-dest__why[hidden] { display: none; }
.st-dest:hover .st-dest__why, .st-dest:focus-within .st-dest__why, .st-dest.is-open .st-dest__why { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.st-dest:first-child:hover .st-dest__why, .st-dest:first-child:focus-within .st-dest__why, .st-dest:first-child.is-open .st-dest__why,
.st-dest:last-child:hover .st-dest__why, .st-dest:last-child:focus-within .st-dest__why, .st-dest:last-child.is-open .st-dest__why { transform: none; }

/* Wide screens: the path runs left to right, platforms stacked on a vertical bus */
@media (min-width: 860px) {
    .st-chain { display: grid; grid-template-columns: auto minmax(2rem, 1fr) minmax(0, 36rem) minmax(1.25rem, 0.45fr) 10.5rem; align-items: center; }
    .st-node--obs { flex-direction: column; }
    .st-link, .st-link--out { height: 2rem; }
    .st-link::before { top: 50%; bottom: auto; left: 0; right: 0; border-left: 0; border-top: 2px dashed var(--rh-border-strong); }
    .st[data-phase="receiving"] .st-link--in::before,
    .st[data-phase="analyzing"] .st-link--in::before { border-color: transparent; }
    .st[data-phase="done"] .st-link--in::before,
    .st--shared .st-link--in::before,
    .st-stage.is-final .st-link--out::before { border-top-style: solid; border-color: var(--rh-accent-border); }
    .st-link__flow {
        top: 50%; bottom: auto; left: 0; right: 0; width: auto; height: var(--st-thick); transform: translateY(-50%);
        background: repeating-linear-gradient(90deg, transparent 0, var(--rh-accent) 12px, transparent 24px, transparent 30px);
        background-position: var(--st-flow) 0;
    }
    .st-dests { grid-template-columns: minmax(0, 1fr); gap: var(--rh-s3); padding: 0 0 0 1.1rem; }
    .st-dest:not(:last-child)::after { top: 50%; left: -1.1rem; width: 0; height: calc(100% + var(--rh-s3)); border-top: 0; border-left: 2px dashed var(--rh-border-strong); }
    .st-stage.is-final .st-dest::after { border-left-style: solid; border-color: var(--rh-accent-border); }
    .st-dest::before { top: 50%; left: -1.1rem; width: 1.1rem; height: 0; border-left: 0; border-top: 2px dashed var(--rh-border-strong); }
    .st-dest.is-ok::before { border-top-style: solid; border-color: var(--rh-success); }
    .st-dest.is-warn::before { border-top-style: solid; border-color: var(--rh-warn); }
    .st-dest.is-fail::before { border-top-style: solid; border-color: var(--rh-danger); }
    .st-dest__node { flex-direction: row; gap: 0.6rem; padding: 0.4rem 0.75rem 0.4rem 0.4rem; border-radius: 999px; text-align: left; }
    .st-dest__why, .st-dest:first-child .st-dest__why, .st-dest:last-child .st-dest__why { left: auto; right: 0; transform: translate(0, -4px); }
    .st-dest:hover .st-dest__why, .st-dest:focus-within .st-dest__why, .st-dest.is-open .st-dest__why { transform: none; }
}

/* ── Timeline: the bitrate, drawn over the window ────────────────────── */

.st-timeline { display: grid; gap: 0.4rem; min-width: 0; }
.st-timeline__bar { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--rh-s2) var(--rh-s4); }
.st-status { margin: 0; color: var(--rh-text); font-weight: 600; }
.st[data-phase="waiting"] .st-status { color: var(--rh-info); }
.st[data-phase="receiving"] .st-status,
.st[data-phase="analyzing"] .st-status { color: var(--rh-accent-text); }
.st[data-phase="interrupted"] .st-status,
.st[data-phase="expired"] .st-status,
.st[data-phase="busy"] .st-status { color: var(--rh-warn); }
/* OBS dropped mid-test: the link stops flowing until the signal returns */
.st[data-signal="lost"] .st-status { color: var(--rh-warn); }
.st[data-signal="lost"] .st-link--in .st-link__flow { opacity: 0.2; }
.st-legend { display: inline-flex; gap: var(--rh-s4); color: var(--rh-faint); font-size: 0.75rem; }
.st-legend > span { display: inline-flex; align-items: center; gap: 0.4rem; }
.st-legend > span::before { content: ""; width: 2px; height: 0.7rem; border-radius: 1px; }
.st-legend__kf::before { background: var(--rh-text-2); height: 0.45rem !important; align-self: flex-end; }
.st-legend__drop::before { background: var(--rh-danger); }

.st-timeline__plot {
    position: relative; height: clamp(6rem, 12vw, 8rem); overflow: hidden;
    border: 1px solid var(--rh-border); border-radius: var(--rh-r-sm);
    background-color: var(--rh-bg);
    background-image: linear-gradient(90deg, color-mix(in srgb, var(--rh-text) 5%, transparent) 1px, transparent 1px);
    background-size: calc(100% / 6) 100%;
}
.st-tl { position: absolute; inset: 0; display: block; width: 100%; height: 100%; color: var(--rh-accent); overflow: visible; }
.st-tl line, .st-tl path { vector-effect: non-scaling-stroke; }
.st-tl__grid { stroke: var(--rh-border); stroke-width: 1; stroke-dasharray: 3 5; }
.st-tl__area { stroke: none; }
.st-tl__line { fill: none; stroke: var(--rh-accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round;  }
.st-tl__kf line { stroke: var(--rh-text-2); stroke-width: 1.5; opacity: 0.75; }
.st-tl__drops line { stroke: var(--rh-danger); stroke-width: 2; opacity: 0.9; }
.st-tl__head { stroke: var(--rh-accent); stroke-width: 1.5; opacity: 0; transition: opacity 0.3s ease; }
.st[data-phase="receiving"] .st-tl__head,
.st[data-phase="analyzing"] .st-tl__head { opacity: 0.9; }
.st-tl__label { position: absolute; right: 0.45rem; color: var(--rh-faint); font: 600 0.6875rem/1 var(--rh-mono); pointer-events: none; }
.st-tl__label--top { top: calc(8% + 0.25rem); }
.st-tl__label--mid { top: calc(54% + 0.25rem); }
.st-tl__value {
    position: absolute; top: 0.4rem; left: 0; transform: translateX(0.45rem); padding: 0.1rem 0.4rem; border-radius: 4px;
    background: color-mix(in srgb, var(--rh-surface) 85%, transparent); color: var(--rh-accent-text); font: 500 var(--rh-fs-sm)/1.3 var(--rh-mono);
    font-variant-numeric: tabular-nums; white-space: nowrap; pointer-events: none;
}
.st-tl__value.is-end { transform: translateX(calc(-100% - 0.45rem)); }
.st-tl__value:empty, .st-tl__value[hidden] { display: none; }
.st-timeline__axis { display: flex; justify-content: space-between; color: var(--rh-faint); font: 600 0.6875rem/1 var(--rh-mono); }

/* ── Checks: grey until measured, then their tone ────────────────────── */

.st-checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--rh-s2); margin: 0; padding: 0; list-style: none; }
@media (min-width: 560px) { .st-checks { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 980px) { .st-checks { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.st-check {
    display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "dot label" "dot value"; align-items: center; gap: 0.05rem 0.55rem;
    min-width: 0; padding: 0.55rem 0.75rem; border: 1px solid var(--rh-border); border-radius: var(--rh-r-sm); background: var(--rh-surface-2);
    transition: border-color 0.4s ease, background-color 0.4s ease;
}
.st-check__dot { grid-area: dot; width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--rh-surface-3); box-shadow: inset 0 0 0 1px var(--rh-border-strong); transition: background-color 0.4s ease, box-shadow 0.4s ease; }
.st-check__label { grid-area: label; overflow: hidden; color: var(--rh-muted); font-size: 0.75rem; text-overflow: ellipsis; white-space: nowrap; }
.st-check__value { grid-area: value; overflow: hidden; color: var(--rh-faint); font-size: var(--rh-fs-sm); font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.st-check.is-in .st-check__value { color: var(--rh-text); }
.st-check.is-in .st-check__dot { animation: st-pop 0.45s ease-out; }
.st-check.is-in.is-ok { border-color: color-mix(in srgb, var(--rh-success) 40%, transparent); }
.st-check.is-in.is-ok .st-check__dot { background: var(--rh-success); box-shadow: 0 0 0 3px var(--rh-success-soft); }
.st-check.is-in.is-warn { border-color: color-mix(in srgb, var(--rh-warn) 45%, transparent); }
.st-check.is-in.is-warn .st-check__dot { background: var(--rh-warn); box-shadow: 0 0 0 3px var(--rh-warn-soft); }
.st-check.is-in.is-bad { border-color: color-mix(in srgb, var(--rh-danger) 45%, transparent); }
.st-check.is-in.is-bad .st-check__dot { background: var(--rh-danger); box-shadow: 0 0 0 3px var(--rh-danger-soft); }

/* ── Verdict ─────────────────────────────────────────────────────────── */

.st-results[hidden] { display: none; }
.st-result { display: grid; gap: var(--rh-s3); animation: st-in 0.45s ease both; }
.st-result__head {
    display: flex; flex-wrap: wrap; align-items: center; gap: var(--rh-s4) var(--rh-s6); padding: var(--rh-s4) var(--rh-s5);
    border: 1px solid var(--rh-border); border-radius: var(--rh-r-md); background: var(--rh-surface);
}
.st-grade { display: inline-flex; align-items: baseline; gap: var(--rh-s3); padding: 0.4rem 0.9rem; border-radius: 999px; }
.st-grade__label { font-weight: 600; }
.st-grade__score { color: var(--rh-text); font-size: 1.75rem; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.st-grade__score small { color: var(--rh-muted); font-size: var(--rh-fs-sm); font-weight: 600; }
.st-result--ok .st-grade { background: var(--rh-success-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rh-success) 45%, transparent); color: var(--rh-success); }
.st-result--warn .st-grade { background: var(--rh-warn-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rh-warn) 45%, transparent); color: var(--rh-warn); }
.st-result--bad .st-grade { background: var(--rh-danger-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rh-danger) 45%, transparent); color: var(--rh-danger); }
.st-result--pending .st-grade { background: var(--rh-info-soft); color: var(--rh-info); }
.st-result__nums { display: flex; flex-wrap: wrap; gap: var(--rh-s3) var(--rh-s6); margin: 0; }
.st-result__nums div { min-width: 0; }
.st-result__nums dt { color: var(--rh-muted); font-size: 0.75rem; }
.st-result__nums dd { margin: 0; color: var(--rh-text); font-size: 1.25rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.st-result__nums small { color: var(--rh-muted); font-size: var(--rh-fs-sm); font-weight: 600; }
.st-result__note { margin: 0; color: var(--rh-warn); font-size: var(--rh-fs-sm); }
.st-result__clean { margin: 0; color: var(--rh-success); font-weight: 600; }
.st-fixes { display: grid; gap: var(--rh-s2); margin: 0; padding: 0; list-style: none; }
.st-fix {
    display: grid; gap: 0.25rem var(--rh-s3); align-items: baseline; padding: var(--rh-s3) var(--rh-s4);
    border: 1px solid var(--rh-border); border-left: 3px solid var(--rh-warn); border-radius: var(--rh-r-sm); background: var(--rh-surface);
}
.st-fix--critical { border-left-color: var(--rh-danger); }
.st-fix__issue { color: var(--rh-text); font-weight: 600; }
.st-fix__arrow { display: none; color: var(--rh-faint); }
.st-fix__setting { color: var(--rh-text-2); font-size: var(--rh-fs-md); overflow-wrap: anywhere; }
@media (min-width: 720px) {
    .st-fix { grid-template-columns: minmax(10rem, 0.8fr) auto minmax(0, 2fr); }
    .st-fix__arrow { display: inline; }
}

/* ── Actions ─────────────────────────────────────────────────────────── */

.st-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--rh-s2); }
.st-actions[hidden] { display: none; }
/* .rh-btn sets display: inline-flex, which beats the hidden attribute. */
.st-actions [hidden] { display: none; }
.st-share-url { flex: 1 1 100%; max-width: 32rem; }
.st-share-url[hidden] { display: none; }
.st-error { margin: 0; color: var(--rh-danger); text-align: center; font-weight: 600; }
.st-error[hidden] { display: none; }
.st-signup {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--rh-s3);
    padding: var(--rh-s4) var(--rh-s5); border: 1px solid var(--rh-accent-border); border-radius: var(--rh-r-md); background: var(--rh-accent-soft);
}
.st-signup[hidden] { display: none; }
.st-signup p { margin: 0; color: var(--rh-text); font-weight: 600; }

@keyframes st-call {
    0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--rh-info) 40%, transparent); }
    70% { box-shadow: 0 0 0 0.8rem transparent; }
    100% { box-shadow: 0 0 0 0 transparent; }
}
@keyframes st-blink { 50% { opacity: 0.35; } }
@keyframes st-pop { 0% { transform: scale(0.4); } 60% { transform: scale(1.35); } 100% { transform: scale(1); } }
@keyframes st-in { from { opacity: 0; transform: translateY(8px); } }

@media (prefers-reduced-motion: reduce) {
    .st *, .st *::before { animation: none !important; transition: none !important; }
}
