/*
 * Verdict stage (2026-10) - scene 02's gauge and big number. Layout
 * lives in analysis_hero.html (Tailwind); analyze_dial.js plays the
 * gauge's entrance. Loaded only by index.html, after analyze_scenes.css.
 *
 * The halo and sizing are for every reader. Everything that hides or
 * recolours waits for a DRIVEN dial (`is-driven`, which analyze_dial.js
 * sets only with motion on), so no-JS, reduced-motion and print readers
 * get the plain stage at its final values.
 *
 * Unlayered, like analyze_scenes.css: these rules outrank Tailwind's
 * utilities - the travelling number's zone colour has to beat the
 * text-bull/-bear class its final score gave it.
 */

/* ------------------------------------------------------------------
   The stage - every reader
   ------------------------------------------------------------------ */
.verdict-halo {
    position: absolute;
    inset: 4% 14% 30%;
    border-radius: 9999px;
    filter: blur(72px);
    opacity: 0.16;
    pointer-events: none;
}
/* The mascot grows with the stage (its macro sets w-/h- per call
   site); the pulse ring just needs a little more breathing room. */
.verdict-stage .conviction-pulse-ring { inset: -10px; }
/* Short desktop screens (1366x768, 1280x800): trim the gauge box and
   the big number so the whole stage - badge through coverage/risk -
   still fits the scene's first viewport. The gauge itself barely
   shrinks: at these widths it's width-limited, not height-limited. */
@media (min-width: 1024px) and (max-height: 860px) {
    .verdict-stage .score-gauge-wrap { height: min(19rem, 34vh); }
    .verdict-stage .verdict-score { font-size: 5rem; }
}

/* ------------------------------------------------------------------
   The driven dial - the needle's sweep, told honestly
   ------------------------------------------------------------------ */
/* Until its sweep starts, the number stays hidden: a waiting needle's
   value never poses as the score. */
.verdict-stage.is-driven [data-dial-number] { transition: opacity 0.3s ease; }
.verdict-stage.is-driven.is-waiting [data-dial-number] { opacity: 0; }

/* On its way, the number wears the colour of the zone the needle is
   in (the gauge's own zones) - never a bull-green 32.6. No colour
   transition: like the gauge's hard-edged segments, it switches the
   moment the needle crosses, never trailing a frame behind. */
.verdict-stage.is-driven [data-dial-number][data-zone="bear"] {
    color: var(--color-bear);
    text-shadow: 0 0 18px color-mix(in srgb, var(--color-bear) 35%, transparent);
}
.verdict-stage.is-driven [data-dial-number][data-zone="neutral"] {
    color: var(--color-neutral-score);
    text-shadow: 0 0 18px color-mix(in srgb, var(--color-neutral-score) 35%, transparent);
}
.verdict-stage.is-driven [data-dial-number][data-zone="bull"] {
    color: var(--color-bull);
    text-shadow: 0 0 18px color-mix(in srgb, var(--color-bull) 35%, transparent);
}

/* The verdict lands: the rating and its context arrive with the
   needle, never ahead of it, and the number takes one small bow. */
.verdict-stage.is-driven .verdict-landing > * {
    opacity: 0;
    transform: translateY(0.5rem);
    transition: opacity 0.35s ease, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.verdict-stage.is-landed .verdict-landing > * { opacity: 1; transform: none; }
.verdict-stage.is-landed .verdict-landing > :nth-child(2) { transition-delay: 0.08s; }
.verdict-stage.is-landed .verdict-landing > :nth-child(3) { transition-delay: 0.16s; }
.verdict-stage.is-landed [data-dial-number] { animation: dial-land 0.5s ease-out; }
@keyframes dial-land { 40% { transform: scale(1.05); } }
/* The score's pulse ring belongs to the landing, too. */
.verdict-stage.is-driven:not(.is-landed) .conviction-pulse-ring { visibility: hidden; }
/* The stage warms as the needle climbs: --dial runs 0 at rest to 1 landed. */
.verdict-stage.is-driven .verdict-halo { opacity: calc(0.04 + 0.12 * var(--dial, 1)); }

@media print {
    .verdict-stage [data-dial-number],
    .verdict-stage .verdict-landing > * {
        opacity: 1 !important;
        transform: none !important;
    }
    .verdict-stage .conviction-pulse-ring { visibility: visible !important; }
}
