/*
 * Showcase theme for the congress touch screen.
 * Layered on top of quiz.css: every rule is scoped to html.showcase,
 * so turning QUIZ_SHOWCASE off in index.php restores the original look exactly.
 */


html.showcase {
    --sc-bg: #0f0614;
    --sc-plum: #2a1233;
    --sc-pink: #f7a8dc;
    --sc-violet: #b79bff;
    --sc-blood: #ff4467;
    --sc-teal: #6fe3ef;
    --sc-gold: #ffcf7a;
    --sc-mint: #8ff5c4;
    --sc-glass: linear-gradient(150deg, #ffffff14, #ffffff05 46%, #ffffff0a);
    --sc-edge: #ffd4f233;
    font-size: clamp(16px, .62vw + 8px, 22px);
    background: var(--sc-bg);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.showcase body {
    background:
        radial-gradient(ellipse 70% 60% at 85% 15%, #7a1d4d40, transparent 70%),
        radial-gradient(ellipse 60% 70% at 8% 90%, #3c1a6a55, transparent 70%),
        radial-gradient(ellipse 120% 80% at 50% 120%, #4a0a1e66, transparent 60%),
        var(--sc-bg);
    overflow-x: hidden;
    -webkit-user-select: none;
    user-select: none;
}

/* ---------- Living background ---------- */

.sc-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.sc-vignette {
    display: none; /* drawn inside the background canvas (one layer less to composite) */
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 85% 75% at 50% 45%, transparent 55%, #07020bcc 100%),
        linear-gradient(180deg, #0f061400, #0f061400 70%, #0f0614aa);
}

.showcase .site {
    position: relative;
    z-index: 1;
    width: min(1560px, calc(100% - 7vw));
}

/* ---------- Header with ECG line ---------- */

.showcase .masthead {
    position: relative;
    min-height: 6.2rem;
    border-bottom: 0;
    animation: sc-drop .9s cubic-bezier(.2, .8, .2, 1) both;
}

.showcase .header-logo {
    width: 8.6rem;
    height: 4rem;
    border: 0;
    border-radius: 1rem;
    background: #fbf7fd;
    box-shadow: 0 0 0 1px #ffffff40, 0 10px 30px #00000066, 0 0 40px #f7a8dc22;
}

.showcase .header-logo-elpen img { width: 5.6rem; }
.showcase .header-logo-platorel img { width: 6.4rem; }

.showcase .event {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: .02em;
    background: linear-gradient(90deg, #fff, #ffd2f0 40%, #c9b4ff 60%, #fff);
    background-size: 220% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: sc-sheen 7s linear infinite;
}

.sc-ecg {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -14px;
    height: 28px;
    width: 100%;
    overflow: visible;
    pointer-events: none;
}

.sc-ecg path {
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sc-ecg .sc-ecg-base { stroke: #ffffff1c; stroke-width: 1; }

.sc-ecg .sc-ecg-pulse {
    stroke: url(#sc-ecg-grad);
    stroke-dasharray: 180 1820;
    stroke-dashoffset: 2000;
    animation: sc-ecg 2.6s linear infinite;
}

.sc-ecg .sc-ecg-glow {
    stroke: #ff4467;
    stroke-width: 7;
    stroke-opacity: .28;
    stroke-dasharray: 180 1820;
    stroke-dashoffset: 2000;
    animation: sc-ecg 2.6s linear infinite;
}

.sc-ecg { will-change: transform; }

@keyframes sc-ecg {
    to { stroke-dashoffset: 0; }
}

/* ---------- Shared entrance motion ---------- */

@keyframes sc-drop {
    from { opacity: 0; transform: translateY(-18px); }
}

@keyframes sc-rise {
    from { opacity: 0; transform: translateY(34px) scale(.98); filter: blur(6px); }
}

@keyframes sc-sheen {
    to { background-position: -220% 0; }
}

.showcase main { padding-block: 2rem; }

.showcase .eyebrow {
    font-size: .82rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--sc-pink);
}

.showcase .eyebrow > span {
    flex-basis: 2.4rem;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--sc-blood), var(--sc-pink));
    box-shadow: 0 0 14px var(--sc-blood);
}

/* ---------- Intro / attract screen ---------- */

.showcase .hero {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: clamp(2rem, 5vw, 6rem);
}

.showcase .hero-copy > * { animation: sc-rise 1s cubic-bezier(.2, .8, .2, 1) both; }
.showcase .hero-copy > :nth-child(2) { animation-delay: .12s; }
.showcase .hero-copy > :nth-child(3) { animation-delay: .24s; }
.showcase .hero-copy > :nth-child(4) { animation-delay: .36s; }
.showcase .hero-copy > :nth-child(5) { animation-delay: .5s; }

.showcase .hero .eyebrow {
    text-transform: none;
    letter-spacing: .02em;
    font-size: 1rem;
    line-height: 1.45;
    max-width: 34ch;
}

.showcase .hero h1 {
    margin: 1.6rem 0 1.5rem;
    font-size: clamp(3.6rem, 7.2vw, 8.4rem);
    line-height: .98;
    letter-spacing: -.06em;
    background: linear-gradient(100deg, #ffffff 0%, #ffffff 38%, #ffd0ee 48%, #ffffff 58%, #ffffff 100%);
    background-size: 250% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
    will-change: transform;
    animation: sc-rise 1s cubic-bezier(.2, .8, .2, 1) .12s both, sc-sheen 6s ease-in-out 1.2s infinite;
}

.showcase .hero h1 em {
    margin-top: .14em;
    font-size: .56em;
    letter-spacing: -.03em;
    background: linear-gradient(100deg, #ff7aa8, #f7a8dc 35%, #c4a6ff 70%, #8fdcff);
    -webkit-background-clip: text;
    background-clip: text;
}

.showcase .intro-text {
    font-size: 1.35rem;
    line-height: 1.55;
    color: #e9dcef;
}

.showcase .intro-text strong {
    color: #fff;
    background: linear-gradient(90deg, #ff7aa8, #c4a6ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.showcase .facts { margin: 2.4rem 0 2.6rem; gap: 1rem; }

.showcase .facts > div {
    min-width: 8.5rem;
    padding: 1rem 1.3rem;
    border: 1px solid var(--sc-edge);
    border-radius: 1.1rem;
    background: var(--sc-glass);
}

.showcase .facts > div:first-child { padding-inline-start: 1.3rem; }
.showcase .facts > div + div { border-inline-start: 1px solid var(--sc-edge); }
.showcase .facts dt { font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; color: #cdb8d6; }
.showcase .facts dd { font-size: 2.2rem; font-weight: 800; font-variant-numeric: tabular-nums; }

/* Start button: "touch me" beacon */
.showcase .hero form { position: relative; display: inline-block; }

.showcase .hero .button {
    position: relative;
    min-height: 5rem;
    padding: 1rem 1.6rem 1rem 2.1rem;
    gap: 2.4rem;
    font-size: 1.3rem;
    border-radius: 1.4rem;
    animation: sc-heartbeat 1.6s ease-in-out infinite;
}

.showcase .hero form::before,
.showcase .hero form::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 1.4rem;
    border: 2px solid var(--sc-pink);
    pointer-events: none;
    animation: sc-beacon 2.4s cubic-bezier(.2, .7, .3, 1) infinite;
}

.showcase .hero form::after { animation-delay: 1.2s; }

@keyframes sc-beacon {
    0% { opacity: .9; transform: scale(1); }
    100% { opacity: 0; transform: scale(1.25, 1.7); }
}

@keyframes sc-heartbeat {
    0%, 40%, 100% { transform: scale(1); }
    12% { transform: scale(1.045); }
    24% { transform: scale(1.01); }
    32% { transform: scale(1.03); }
}

.sc-touch-hint {
    display: flex;
    align-items: center;
    gap: .7rem;
    margin-top: 1.6rem;
    color: #cdb8d6;
    font-size: .95rem;
    letter-spacing: .04em;
    animation: sc-rise 1s .8s both;
}

.sc-touch-hint i {
    width: .7rem;
    height: .7rem;
    border-radius: 50%;
    background: var(--sc-blood);
    box-shadow: 0 0 0 0 #ff4467aa;
    animation: sc-dot 1.6s infinite;
}

@keyframes sc-dot {
    0% { box-shadow: 0 0 0 0 #ff4467aa; }
    70% { box-shadow: 0 0 0 .9rem #ff446700; }
    100% { box-shadow: 0 0 0 0 #ff446700; }
}

/* Hero image becomes a floating, glowing lens */
.showcase .hero-visual.sc-ready {
    position: relative;
    border-radius: 2rem;
    overflow: visible;
    background: transparent;
    box-shadow: none;
    animation: sc-rise 1.2s cubic-bezier(.2, .8, .2, 1) .3s both;
    transform-style: preserve-3d;
    perspective: 1200px;
}

.showcase .hero-visual > .sc-tilt {
    position: relative;
    border-radius: 2rem;
    overflow: hidden;
    background: #d5d4d9;
    box-shadow:
        0 30px 80px #000000aa,
        0 0 0 1px #ffd4f266,
        0 0 70px #ff5c9a2e;
    transition: transform .6s cubic-bezier(.2, .8, .2, 1);
    /* Idle sway + float are pure CSS transforms: the GPU moves the already-drawn image
       instead of re-drawing it (and its glow) every frame. */
    will-change: transform;
    animation: sc-float 7s ease-in-out infinite;
}

.showcase .hero-visual.sc-ready::before,
.showcase .hero-visual.sc-ready::after { display: none; }

.showcase .sc-tilt::before,
.showcase .sc-tilt::after {
    content: "";
    display: block;
    aspect-ratio: 1125 / 150;
}

.showcase .sc-tilt::before {
    background: linear-gradient(90deg, #c5c7ca, #cdd0d2 17%, #c6c7ca 33%, #b4b8bb 50%, #a7abae 67%, #9da1a4 83%, #919598);
}

.showcase .sc-tilt::after {
    background: linear-gradient(90deg, #fdfdfd, #f9f9f9 17%, #e9ebed 33%, #dee0e2 50%, #d3d5d7 67%, #cbcdcf 83%, #c4c6c8);
}

.sc-glare {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 60%;
    z-index: 2;
    pointer-events: none;
    background: linear-gradient(115deg, transparent 20%, #ffffff40 50%, transparent 80%);
    will-change: transform;
    animation: sc-glare 6s ease-in-out infinite;
}

@keyframes sc-glare {
    0%, 100% { transform: translateX(-110%); }
    50% { transform: translateX(190%); }
}

@keyframes sc-float {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 -5px; }
}

.sc-halo {
    position: absolute;
    inset: -12% -10%;
    z-index: -1;
    border-radius: 50%;
    background:
        radial-gradient(closest-side at 30% 40%, #ff44674d, transparent),
        radial-gradient(closest-side at 72% 62%, #b79bff40, transparent),
        radial-gradient(closest-side at 55% 25%, #6fe3ef1f, transparent);
    pointer-events: none;
}


.sc-chip {
    position: absolute;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .75rem 1.05rem;
    border: 1px solid #ffffff38;
    border-radius: 1rem;
    background: #1a0b22cc;
    box-shadow: 0 18px 40px #00000080;
    color: #fff;
    font-size: .9rem;
    line-height: 1.25;
    animation: sc-rise .9s cubic-bezier(.2, .8, .2, 1) both;
}

.sc-chip b {
    font-size: 1.7rem;
    font-weight: 800;
    letter-spacing: -.04em;
    background: linear-gradient(90deg, #ff7aa8, #f7a8dc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-variant-numeric: tabular-nums;
}

.sc-chip small { display: block; color: #cdb8d6; font-size: .74rem; }
.sc-chip.one { left: -2.2rem; bottom: 12%; animation-delay: 1s; }
.sc-chip.two { right: -1.6rem; top: -2.2rem; animation-delay: 1.3s; }
.sc-chip.two { gap: .45rem; font-size: 1rem; font-weight: 600; white-space: nowrap; }
.sc-chip.two b { font-size: 1rem; letter-spacing: 0; background: linear-gradient(90deg, #ff7aa8, #c4a6ff); -webkit-background-clip: text; background-clip: text; }

/* ---------- Generic glass panel ---------- */

.showcase .panel {
    position: relative;
    padding: clamp(1.8rem, 3.2vw, 3.6rem);
    border: 1px solid var(--sc-edge);
    border-radius: 2rem;
    background:
        radial-gradient(ellipse 80% 60% at 100% 0%, #ff5c9a1c, transparent 60%),
        radial-gradient(ellipse 70% 60% at 0% 100%, #8b5cf61f, transparent 60%),
        linear-gradient(150deg, #2c1534e6, #170a1fee 70%);
    box-shadow: 0 40px 120px #00000088, inset 0 1px 0 #ffffff1f;
    animation: sc-rise .8s cubic-bezier(.2, .8, .2, 1) both;
    isolation: isolate;
}

.showcase .panel::before {
    content: "";
    position: absolute;
    inset: -1px;
    z-index: -1;
    padding: 1px;
    border-radius: inherit;
    background: conic-gradient(from var(--sc-angle, 0deg), transparent 0 70%, #ff4467 78%, #f7a8dc 84%, #b79bff 90%, transparent 96%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: sc-orbit 6s steps(180) infinite;
    will-change: transform;
    pointer-events: none;
}

@property --sc-angle {
    syntax: "<angle>";
    inherits: false;
    initial-value: 0deg;
}

@keyframes sc-orbit { to { --sc-angle: 360deg; } }

.showcase .panel h1 {
    font-size: clamp(1.7rem, 2.5vw, 2.9rem);
    line-height: 1.22;
    letter-spacing: -.035em;
    margin: 1.1rem 0 1.8rem;
    text-wrap: balance;
}

.showcase .button {
    min-height: 4.2rem;
    padding: .9rem 1.4rem .9rem 1.8rem;
    border: 0;
    border-radius: 1.2rem;
    background: linear-gradient(110deg, #ff7aa8, #f7a8dc 45%, #c4a6ff);
    background-size: 160% 100%;
    box-shadow: 0 14px 40px #ff5c9a55, 0 0 0 1px #ffffff55 inset, 0 1px 0 #ffffffaa inset;
    color: #22091f;
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: .01em;
    transition: transform .18s ease, box-shadow .25s ease, background-position .5s ease;
}

.showcase .button:hover { background-position: 100% 0; }
.showcase .button:active { transform: scale(.96); }

.showcase .button span {
    display: grid;
    place-items: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 50%;
    background: #22091f;
    color: #ffd0ee;
    font-size: 1.2rem;
    transition: transform .3s ease;
}

.showcase .button:hover span { transform: translateX(4px); }

/* ---------- Question screen ---------- */

.showcase .quiz-layout {
    grid-template-columns: minmax(14rem, 18rem) minmax(0, 1fr);
    gap: clamp(1.6rem, 3vw, 3.6rem);
}

.showcase .progress-panel {
    position: sticky;
    top: 1.5rem;
    padding: 1.8rem 1.5rem;
    border: 1px solid #ffffff1a;
    border-radius: 1.6rem;
    background: var(--sc-glass);
    animation: sc-rise .8s cubic-bezier(.2, .8, .2, 1) both;
}

.showcase .progress-count {
    font-size: 4.2rem;
    line-height: 1;
    margin: 1rem 0 1.1rem;
    background: linear-gradient(180deg, #fff, #f7a8dc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.showcase .progress-count span { -webkit-text-fill-color: #a892b3; }

.showcase progress { height: 8px; background: #ffffff14; box-shadow: inset 0 1px 2px #00000080; }
.showcase progress::-webkit-progress-bar { background: #ffffff14; }
.showcase progress::-webkit-progress-value {
    background: linear-gradient(90deg, #ff4467, #f7a8dc, #b79bff);
    box-shadow: 0 0 12px #ff4467;
    border-radius: 999px;
}
.showcase progress::-moz-progress-bar { background: linear-gradient(90deg, #ff4467, #f7a8dc, #b79bff); }

.showcase .steps { gap: .35rem; margin-top: 1.6rem; }
.showcase .steps li {
    min-height: 2.6rem;
    padding: .25rem .5rem;
    border-radius: .8rem;
    font-size: .92rem;
    transition: background .3s ease;
}
.showcase .steps .current {
    background: linear-gradient(90deg, #ff5c9a2e, transparent);
    box-shadow: inset 2px 0 0 var(--sc-blood);
}
.showcase .step-num { flex-basis: 2rem; height: 2rem; border-radius: .6rem; font-size: .85rem; }
.showcase .current .step-num {
    background: linear-gradient(135deg, #ff7aa8, #f7a8dc);
    border: 0;
    box-shadow: 0 0 18px #ff5c9a99;
    animation: sc-dot 1.6s infinite;
}
.showcase .answered .step-num { background: #8ff5c41a; color: var(--sc-mint); border-color: #8ff5c455; }

.showcase .question-panel legend { font-size: 1rem; margin-bottom: 1rem; color: #cdb8d6; }

.showcase .choices { gap: .9rem; }
.showcase .choices:has(> :nth-child(4)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.showcase .choice {
    grid-template-columns: 3.4rem minmax(0, 1fr) 1.6rem;
    gap: 1.1rem;
    min-height: 5.6rem;
    padding: 1rem 1.4rem 1rem 1.1rem;
    border: 1px solid #ffffff24;
    border-radius: 1.3rem;
    background: linear-gradient(140deg, #ffffff0d, #ffffff04);
    font-size: 1.3rem;
    font-weight: 650;
    overflow: hidden;
    transition: transform .2s cubic-bezier(.2, .8, .2, 1), border-color .2s ease, background .3s ease, box-shadow .3s ease;
    animation: sc-rise .7s cubic-bezier(.2, .8, .2, 1) both;
}

.showcase .choice:nth-child(1) { animation-delay: .15s; }
.showcase .choice:nth-child(2) { animation-delay: .25s; }
.showcase .choice:nth-child(3) { animation-delay: .35s; }
.showcase .choice:nth-child(4) { animation-delay: .45s; }
.showcase .choice:nth-child(5) { animation-delay: .55s; }

.showcase .choice:hover { border-color: #f7a8dc88; background: linear-gradient(140deg, #ffffff14, #ffffff06); }
.showcase .choice:active { transform: scale(.975); }

.showcase .choice:has(:checked) {
    border-color: transparent;
    background:
        linear-gradient(140deg, #5a1b4a, #331d5c) padding-box,
        linear-gradient(120deg, #ff4467, #f7a8dc, #b79bff) border-box;
    border: 2px solid transparent;
    box-shadow: 0 18px 50px #ff5c9a3d, 0 0 0 6px #ff5c9a14;
    transform: translateY(-2px);
}

.showcase .choice-key {
    min-height: 3.4rem;
    border-radius: 1rem;
    background: #ffffff10;
    box-shadow: inset 0 0 0 1px #ffffff1f;
    color: #ffd0ee;
    font-size: 1.15rem;
    font-weight: 800;
    transition: background .3s ease, transform .3s ease;
}

.showcase .choice:has(:checked) .choice-key {
    background: linear-gradient(135deg, #fff, #ffd0ee);
    color: #2a0b25;
    transform: rotate(-6deg) scale(1.06);
    box-shadow: 0 6px 20px #ff5c9a88;
}

.showcase .choice-radio { width: 1.4rem; height: 1.4rem; border-color: #ffffff55; transition: border .2s ease; }
.showcase .choice:has(:checked) .choice-radio { border: .42rem solid #fff; box-shadow: 0 0 14px #fff; }

.showcase .actions { margin-top: 2rem; }

.showcase .question-panel form:not(:has(:checked)) .actions .button {
    opacity: .45;
    filter: saturate(.4);
    box-shadow: none;
}

.showcase .question-panel form:has(:checked) .actions .button {
    animation: sc-heartbeat 1.6s ease-in-out infinite;
}

/* ---------- Feedback ---------- */

.showcase .feedback {
    position: relative;
    overflow: hidden;
    padding: 1.8rem clamp(1.2rem, 2.6vw, 2.6rem);
    border: 1px solid #ffffff1f;
    border-inline-start: 0;
    border-radius: 1.5rem;
    background: linear-gradient(140deg, #ffffff10, #ffffff03);
    animation: sc-rise .7s cubic-bezier(.2, .8, .2, 1) .1s both;
}

.showcase .feedback::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: var(--accent);
    box-shadow: 0 0 24px var(--accent);
}

.showcase .feedback.success { --accent: var(--sc-mint); background: linear-gradient(140deg, #8ff5c41c, #ffffff03 60%); }
.showcase .feedback.miss { --accent: var(--sc-blood); background: linear-gradient(140deg, #ff44671f, #ffffff03 60%); }
.showcase .feedback.miss { animation: sc-rise .7s cubic-bezier(.2, .8, .2, 1) .1s both, sc-shake .5s ease 0.85s; }

@keyframes sc-shake {
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}

.showcase .feedback .feedback-status {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .4rem .9rem;
    font-size: 1.05rem;
}

.showcase .feedback.success .feedback-status,
.showcase .feedback.miss .feedback-status { font-size: 1.55rem; letter-spacing: -.02em; }

.showcase .feedback.success .feedback-status::before,
.showcase .feedback.miss .feedback-status::before {
    display: grid;
    place-items: center;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 50%;
    font-size: 1.3rem;
    background: var(--accent);
    color: #12061a;
    box-shadow: 0 0 0 0 var(--accent);
    animation: sc-stamp .6s cubic-bezier(.2, 1.6, .4, 1) .35s both;
}

.showcase .feedback.success .feedback-status::before { content: "✓"; }
.showcase .feedback.miss .feedback-status::before { content: "✕"; }

@keyframes sc-stamp {
    from { transform: scale(2.4) rotate(-30deg); opacity: 0; }
}

.showcase .feedback h2 {
    font-size: clamp(1.6rem, 2.8vw, 3rem);
    line-height: 1.15;
    letter-spacing: -.035em;
    background: linear-gradient(100deg, #fff 30%, #ffd0ee 60%, #d6c6ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-wrap: balance;
}

.showcase .feedback h2.sc-long { font-size: clamp(1.25rem, 1.6vw, 1.7rem); line-height: 1.35; letter-spacing: -.015em; }
.showcase .feedback p { font-size: 1.1rem; }
.showcase .feedback .source, .showcase .review-body .source { font-size: .82rem; color: #d9b4cd; opacity: .85; }

.showcase .slide-figure {
    border-radius: 1.2rem;
    box-shadow: 0 20px 60px #000000aa, 0 0 0 1px #ffffff33;
}

.showcase .chart table { font-size: 1rem; }
.showcase .chart tbody tr { transition: background .3s ease; }
.showcase .chart tbody tr:hover { background: #ffffff0a; }
.showcase .sort-button { padding: .5rem .9rem; border-radius: .7rem; }

/* ---------- Results ---------- */

.showcase .results { width: min(100%, 64rem); text-align: center; }
.showcase .results .eyebrow { justify-content: center; }
.showcase .results h1 { font-size: clamp(2rem, 3.4vw, 3.6rem); }

.sc-gauge {
    position: relative;
    display: grid;
    place-items: center;
    width: clamp(15rem, 22vw, 20rem);
    aspect-ratio: 1;
    margin: 1.4rem auto .4rem;
}

.sc-gauge svg { position: absolute; inset: 0; width: 100%; height: 100%; rotate: -90deg; overflow: visible; }
.sc-gauge .track { fill: none; stroke: #ffffff12; stroke-width: 10; }
.sc-gauge .fill {
    fill: none;
    stroke: url(#sc-gauge-grad);
    stroke-width: 10;
    stroke-linecap: round;
    filter: drop-shadow(0 0 10px #ff5c9a);
    transition: stroke-dashoffset 2.2s cubic-bezier(.2, .8, .2, 1);
}

.showcase .sc-gauge .result-score { position: relative; font-size: clamp(4.4rem, 7vw, 6.6rem); }

.showcase .result-score {
    background: linear-gradient(180deg, #fff, #f7a8dc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-variant-numeric: tabular-nums;
}

.showcase .result-score span { -webkit-text-fill-color: #a892b3; }
.showcase .result-caption { font-size: 1.15rem; margin-bottom: 2rem; }
.showcase .result-list { text-align: start; border-top: 0; display: grid; gap: .6rem; }

.showcase .review {
    border: 1px solid #ffffff1a;
    border-radius: 1.1rem;
    background: #ffffff07;
    font-size: 1.05rem;
    animation: sc-rise .6s cubic-bezier(.2, .8, .2, 1) both;
}

.showcase .review:nth-child(1) { animation-delay: .5s; }
.showcase .review:nth-child(2) { animation-delay: .58s; }
.showcase .review:nth-child(3) { animation-delay: .66s; }
.showcase .review:nth-child(4) { animation-delay: .74s; }
.showcase .review:nth-child(5) { animation-delay: .82s; }
.showcase .review:nth-child(6) { animation-delay: .9s; }
.showcase .review:nth-child(7) { animation-delay: .98s; }

.showcase .review summary { min-height: 4rem; padding: .6rem 3rem .6rem 1.2rem; }
.showcase .review summary::after { inset-inline-end: 1.2rem; font-size: 1.4rem; }
.showcase .review[open] { background: #ffffff0d; border-color: #f7a8dc44; }
.showcase .review-body { padding: 0 1.4rem 1.4rem 1.4rem; }

.showcase .outcome {
    padding: .3rem .8rem;
    border-radius: 999px;
    font-size: .82rem;
    background: #f7a8dc1a;
}
.showcase .outcome.success { background: #8ff5c41f; color: var(--sc-mint); }
.showcase .outcome.miss { background: #ff44671f; color: #ff9fb2; }

.showcase .results > form { display: flex; justify-content: center; }

/* ---------- Footer ---------- */

.showcase .footer { border-top-color: #ffffff12; font-size: .85rem; }

/* ---------- Touch ripple & burst layer ---------- */

.sc-ripple {
    position: fixed;
    z-index: 50;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border-radius: 50%;
    border: 2px solid #ffd0ee;
    box-shadow: 0 0 20px #ff5c9a;
    pointer-events: none;
    animation: sc-ripple .7s cubic-bezier(.2, .8, .2, 1) forwards;
}

@keyframes sc-ripple {
    to { transform: scale(9); opacity: 0; border-width: .5px; }
}

.sc-fx:not(.on) { display: none; }

.sc-fx {
    position: fixed;
    inset: 0;
    z-index: 40;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* ---------- Responsive ---------- */

@media (max-width: 1000px) {
    .showcase .choices:has(> :nth-child(4)) { grid-template-columns: 1fr; }
    .showcase .quiz-layout { grid-template-columns: 1fr; }
    .showcase .progress-panel { position: static; }
    .showcase .steps { display: none; }
    .showcase .progress-count { font-size: 2.6rem; }
    .sc-chip.one { left: .6rem; }
    .sc-chip.two { right: .6rem; }
}

@media (max-width: 730px) {
    html.showcase { font-size: 15px; }
    .showcase .site { width: calc(100% - 32px); }
    .showcase .header-logo { width: clamp(65px, 19vw, 110px); height: 42px; }
    .showcase .hero { grid-template-columns: 1fr; }
    .showcase .hero h1 { font-size: clamp(2.6rem, 13vw, 4.6rem); }
    .showcase .choice { min-height: 4.4rem; font-size: 1.05rem; }
    .sc-chip { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .showcase *, .showcase *::before, .showcase *::after {
        animation: none !important;
        transition: none !important;
    }
    .sc-canvas { display: none; }
}

/* ======================================================================
 * Fit-to-screen: every screen fits the kiosk display without scrolling.
 * showcase.js also scales the root font size down if content is still too tall.
 * ====================================================================== */

.showcase .site { height: 100svh; min-height: 0; }
.showcase .masthead { min-height: 5.2rem; flex: none; }
.showcase main { min-height: 0; padding-block: 1.4rem; }
.showcase .footer { flex: none; min-height: 3rem; padding-block: .5rem; }

/* Once answered, the question is context only: keep it smaller. */
.showcase .question-panel:has(.feedback) h1 {
    font-size: clamp(1.2rem, 1.6vw, 1.75rem);
    margin: .7rem 0 1.1rem;
    color: #e9dcef;
}

.showcase .question-panel:has(.feedback) .actions { margin-top: 1.2rem; }
.showcase .feedback .source, .showcase .review-body .source { margin-top: 1.2rem; }
.showcase .feedback .slide-answer-label { margin-bottom: .8rem; }

/* Text left, figure/table right */
.showcase .question-panel.sc-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: clamp(1.4rem, 2.4vw, 2.8rem);
    align-items: center;
}

.showcase .question-panel.sc-split:not(:has(.chart)) { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }

.sc-media {
    display: grid;
    gap: 1rem;
    align-content: center;
    min-width: 0;
}

.showcase .sc-media .slide-figure {
    margin: 0 auto;
    width: 100%;
    max-height: 52svh;
    object-fit: contain;
    animation: sc-rise .8s cubic-bezier(.2, .8, .2, 1) .3s both;
}

.showcase .sc-media .chart { margin-top: 0; overflow: visible; }
.showcase .sc-media .chart table { font-size: .82rem; }
.showcase .sc-media .chart caption { font-size: .9rem; margin-bottom: .3rem; }
.showcase .sc-media .chart th, .showcase .sc-media .chart td { padding: .3rem .5rem; }

/* Results: score left, review list right */
.showcase .results.sc-split {
    display: grid;
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
    gap: clamp(1.6rem, 3vw, 3.4rem);
    align-items: center;
    width: min(100%, 92rem);
    max-height: 100%;
}

.sc-score-side { display: grid; justify-items: center; }
.showcase .sc-score-side .result-caption { margin-bottom: 1.4rem; }
.showcase .results.sc-split .result-list {
    margin: 0;
    max-height: calc(100svh - 16rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-inline-end: .3rem;
    scrollbar-width: thin;
    scrollbar-color: #f7a8dc55 transparent;
}

.showcase .review summary { min-height: 3.4rem; }

@media (max-width: 1000px) {
    .showcase .site { height: auto; min-height: 100svh; }
    .showcase .question-panel.sc-split,
    .showcase .results.sc-split { grid-template-columns: 1fr; }
    .showcase .results.sc-split .result-list { max-height: none; overflow: visible; }
}

/* ======================================================================
 * No jumping on load: content stays hidden (and entrance animations wait)
 * until showcase.js has applied the final size. showcase-boot.js adds
 * .sc-wait and removes it after 1.5s at the latest.
 * ====================================================================== */

html.showcase.sc-wait { overflow: hidden; }
html.showcase.sc-wait .site { visibility: hidden; }
html.showcase.sc-wait .site * { animation-play-state: paused !important; }

/* ======================================================================
 * Stable scrollbar: the content already fits the screen (see fit in showcase.js),
 * so decorative motion (rotating halo, floating image, pulsing buttons) must not
 * change the page height. Page scrolling is locked unless content really is taller
 * than the screen (.sc-tall, set by showcase.js) or on narrow screens.
 * ====================================================================== */

@media (min-width: 1001px) {
    html.showcase:not(.sc-tall),
    html.showcase:not(.sc-tall) body { overflow: hidden; }
}


/* ======================================================================
 * Wrong answer: the chosen option turns solid red with a ✕ and shakes
 * left-right, holds for a moment, then fades back to normal so the visitor
 * can choose again (class set by the server / showcase.js).
 * ====================================================================== */

/* Red layer that fades in/out smoothly (gradients can't transition directly). */
.showcase .choice::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, #ff3b5f, #d1123f);
    opacity: 0;
    transition: opacity .45s ease;
    pointer-events: none;
}

.showcase .choice > span { position: relative; z-index: 1; }
.showcase .choice > input { z-index: 2; }

.showcase .choice.is-wrong,
.showcase .choice.is-wrong:has(:checked) {
    border: 2px solid #ff8da3;
    background: #d1123f;
    color: #fff;
    box-shadow: 0 0 0 .4rem #ff446755, 0 0 50px #ff4467aa, 0 18px 50px #00000080;
    transform: none;
    animation: sc-wrong-shake .65s cubic-bezier(.36, .07, .19, .97) both, sc-wrong-glow 1.3s ease-in-out .65s infinite;
}

.showcase .choice.is-wrong::after { opacity: 1; transition-duration: .12s; }

.showcase .choice.is-wrong .choice-key,
.showcase .choice.is-wrong:has(:checked) .choice-key {
    background: #fff;
    color: #d1123f;
    transform: none;
    box-shadow: 0 6px 20px #00000055;
}

/* The radio circle becomes a white ✕ badge */
.showcase .choice.is-wrong .choice-radio,
.showcase .choice.is-wrong:has(:checked) .choice-radio {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border: 0;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 16px #ffffffaa;
    animation: sc-stamp .45s cubic-bezier(.2, 1.6, .4, 1) both;
}

.showcase .choice.is-wrong .choice-radio::before {
    content: "✕";
    color: #d1123f;
    font-size: 1.1rem;
    font-weight: 900;
    line-height: 1;
}

@keyframes sc-wrong-shake {
    0%, 100% { transform: translateX(0); }
    12% { transform: translateX(-18px) rotate(-.6deg); }
    26% { transform: translateX(16px) rotate(.5deg); }
    40% { transform: translateX(-13px); }
    54% { transform: translateX(10px); }
    68% { transform: translateX(-6px); }
    82% { transform: translateX(3px); }
}

@keyframes sc-wrong-glow {
    0%, 100% { box-shadow: 0 0 0 .4rem #ff446755, 0 0 50px #ff4467aa, 0 18px 50px #00000080; }
    50% { box-shadow: 0 0 0 .7rem #ff446733, 0 0 70px #ff4467cc, 0 18px 50px #00000080; }
}

/* While an option is red, the other options can't be tapped until it resets. */
.showcase .choices:has(.is-wrong) .choice { pointer-events: none; }

/* ---------- Answer on tap (no submit button) ---------- */
html.sc-js .question-panel form:has(input[name="action"][value="answer"]) .actions { display: none; }
.showcase .question-panel form.sc-busy .choice { pointer-events: none; }

/* ---------- PRELIPID: the slide's HbA1c chart as rising bars ---------- */
.hba1c-bars {
    margin: 0;
    padding: 1rem 1.1rem .9rem;
    border-radius: 1.2rem;
    background: #ffffff08;
    border: 1px solid #ffffff17;
    display: grid;
    gap: .55rem;
    min-width: 0;
}

.hba1c-bars figcaption {
    font-size: .82rem;
    font-weight: 750;
    letter-spacing: .08em;
    text-transform: uppercase;
    text-align: center;
    color: #fff;
}

.hba1c-bars .bars-note {
    margin: 0;
    justify-self: start;
    max-width: 70%;
    padding: .35rem .9rem .35rem .7rem;
    font-size: .74rem;
    font-weight: 650;
    line-height: 1.3;
    color: #fff;
    background: linear-gradient(90deg, #a3101c, #e3263a);
    clip-path: polygon(0 0, calc(100% - .8rem) 0, 100% 50%, calc(100% - .8rem) 100%, 0 100%);
}

.hba1c-bars .bars-plot {
    position: relative;
    padding-left: 1.3rem;
}

.hba1c-bars .bars-axis {
    position: absolute;
    left: 0;
    bottom: 3.6rem;
    transform: rotate(-90deg);
    transform-origin: left bottom;
    translate: .9rem 0;
    white-space: nowrap;
    font-size: .62rem;
    color: #ffffff99;
}

.hba1c-bars .bars {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: .45rem;
    align-items: end;
    /* plot area + label row */
    height: clamp(10rem, 38svh, 26rem);
    border-bottom: 1px solid #ffffff33;
}

.hba1c-bars .bar {
    --c: #8e8e93;
    --l: #e9e9ec;
    position: relative;
    height: 100%;
    display: grid;
    grid-template-rows: 1fr auto;
    align-items: end;
    justify-items: center;
}

.hba1c-bars .bar.tone-red { --c: #d81e2c; --l: #fbd9d6; }
.hba1c-bars .bar.tone-blue { --c: #2c55b4; --l: #d6def4; }

.hba1c-bars .bar-fill {
    grid-row: 1;
    width: 78%;
    height: calc(var(--h, 0) * 100%);
    border: .32rem solid var(--c);
    border-bottom: 0;
    background:
        linear-gradient(90deg, color-mix(in srgb, var(--c) 55%, transparent), transparent 22%, transparent 78%, color-mix(in srgb, var(--c) 55%, transparent)),
        linear-gradient(180deg, color-mix(in srgb, var(--c) 45%, var(--l)) 0%, var(--l) 35%, #ffffff 100%);
    transform-origin: 50% 100%;
    transform: scaleY(0);
    box-shadow: 0 0 1.2rem color-mix(in srgb, var(--c) 35%, transparent);
}

.hba1c-bars.is-ready .bar-fill {
    animation: sc-bar-rise 1s cubic-bezier(.2, .9, .25, 1.12) calc(.45s + var(--i, 0) * .11s) both;
}

@keyframes sc-bar-rise {
    from { transform: scaleY(0); }
    to { transform: scaleY(1); }
}

.hba1c-bars .bar-value {
    position: absolute;
    left: 50%;
    bottom: calc(var(--h, 0) * (100% - 3.2rem) + 3.2rem + .3rem);
    translate: -50% 0;
    white-space: nowrap;
    font-size: .84rem;
    font-weight: 800;
    color: #fff;
    font-variant-numeric: tabular-nums;
    opacity: 0;
}

.hba1c-bars .bar.tone-red .bar-value { color: #ff6b77; }
.hba1c-bars .bar.tone-blue .bar-value { color: #8fb0ff; }

.hba1c-bars.is-ready .bar-value {
    animation: sc-bar-pop .5s ease-out calc(.6s + var(--i, 0) * .11s) both;
}

.hba1c-bars .bar-label {
    grid-row: 2;
    height: 3.2rem;
    padding-top: .3rem;
    font-size: .66rem;
    line-height: 1.2;
    text-align: center;
    color: #ffffffcc;
    hyphens: manual;
}

/* The visitor's choice */
.hba1c-bars .bar-dose { white-space: nowrap; }
.hba1c-bars .bar.is-chosen .bar-label { color: #fff; font-weight: 800; letter-spacing: -.01em; }
.hba1c-bars .bar.is-chosen .bar-fill { box-shadow: 0 0 0 2px #fff, 0 0 1.6rem color-mix(in srgb, var(--c) 70%, #fff); }

.hba1c-bars .bar-pick {
    position: absolute;
    left: 50%;
    bottom: calc(var(--h, 0) * (100% - 3.2rem) + 3.2rem + 1.7rem);
    translate: -50% 0;
    white-space: nowrap;
    padding: .12rem .4rem;
    border-radius: 99rem;
    font-size: .5rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #2a0b1f;
    background: #fff;
    opacity: 0;
}

.hba1c-bars.is-ready .bar-pick { animation: sc-bar-pop .5s ease-out 1.6s both; }

@keyframes sc-bar-pop {
    from { opacity: 0; transform: translateY(.5rem); }
    to { opacity: 1; transform: none; }
}

.hba1c-bars .bars-foot {
    margin: 0;
    font-size: .6rem;
    line-height: 1.35;
    font-style: italic;
    color: #ffffffaa;
}

/* Bars are taller than the old picture: give the chart column more room. */
.showcase .question-panel.sc-split:has(.hba1c-bars) { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); }

@media (prefers-reduced-motion: reduce) {
    .hba1c-bars.is-ready .bar-fill, .hba1c-bars.is-ready .bar-value, .hba1c-bars.is-ready .bar-pick { animation: none; transform: none; opacity: 1; }
}

/* Q7 answer page: chart spans the whole panel under the question, source below it. */
.showcase .question-panel > .hba1c-bars {
    margin-top: 1.1rem;
    padding: 1.2rem 1.6rem 1rem;
    animation: sc-rise .7s cubic-bezier(.2, .8, .2, 1) .15s both;
}
.showcase .question-panel > .hba1c-bars figcaption { font-size: 1.05rem; }
.showcase .question-panel > .hba1c-bars .bars-note { font-size: .9rem; max-width: 46rem; }
.showcase .question-panel > .hba1c-bars .bars { height: clamp(11rem, 33svh, 24rem); gap: 1.4rem; }
.showcase .question-panel > .hba1c-bars .bar-fill { width: 64%; }
.showcase .question-panel > .hba1c-bars .bar-value { font-size: 1.05rem; }
.showcase .question-panel > .hba1c-bars .bar-label { font-size: .82rem; }
.showcase .question-panel > .hba1c-bars .bar-pick { font-size: .66rem; padding: .18rem .55rem; }
.showcase .question-panel > .hba1c-bars .bars-axis { font-size: .75rem; }
.showcase .question-panel > .hba1c-bars .bars-foot { font-size: .74rem; }
.showcase .question-panel > .chart-source { margin-top: .9rem; }

/* ---------- Footer link to the statistics ---------- */
.footer-link {
    color: #ffffff8c;
    text-decoration: none;
    border-bottom: 1px dotted #ffffff40;
    padding-block: .2rem;
}
.footer-link:hover, .footer-link:focus-visible { color: #fff; border-bottom-color: #f7a8dc; }

/* ---------- Statistics page (stats.php) ---------- */
html.sc-stats, html.sc-stats body { overflow: auto; }
.sc-stats main { padding-block: 2rem; }
.sc-stats .stats { padding: clamp(1.4rem, 3vw, 2.6rem); display: grid; gap: 1.4rem; }
.sc-stats .stats-head { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: end; justify-content: space-between; }
.sc-stats .stats-head h1 { margin: .3rem 0 0; }
.sc-stats .stats-actions { display: flex; flex-wrap: wrap; gap: .8rem; }
.sc-stats .stats-actions .button { text-decoration: none; }
.sc-stats .button.secondary { background: #ffffff14; color: #fff; box-shadow: inset 0 0 0 1px #ffffff2e; }
.sc-stats h2 { margin: .6rem 0 0; font-size: 1.15rem; }
.sc-stats .stats-empty, .sc-stats .stats-note { margin: 0; color: #ffffffb3; }
.sc-stats .stats-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: .9rem; }
.sc-stats .stats-tiles div { display: grid; gap: .25rem; padding: 1rem 1.2rem; border-radius: 1rem; background: #ffffff0a; border: 1px solid #ffffff17; }
.sc-stats .stats-tiles strong { font-size: 2.1rem; line-height: 1; font-variant-numeric: tabular-nums; background: linear-gradient(90deg, #fff, #f7a8dc); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sc-stats .stats-tiles div:first-child strong { background: linear-gradient(90deg, #ff4467, #f7a8dc); -webkit-background-clip: text; background-clip: text; }
.sc-stats .stats-tiles span { font-size: .8rem; color: #ffffffa6; }
.sc-stats .stats-table { width: min(100%, 34rem); border-collapse: collapse; font-size: .9rem; font-variant-numeric: tabular-nums; }
.sc-stats .stats-table th, .sc-stats .stats-table td { padding: .45rem .7rem; border-bottom: 1px solid #ffffff17; text-align: right; }
.sc-stats .stats-table th:first-child { text-align: left; }
.sc-stats .stats-table thead th { color: #ffffff99; font-weight: 600; }
.sc-stats .stats-questions { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 30rem), 1fr)); gap: 1rem; }
.sc-stats .stats-question { padding: 1rem 1.2rem; border-radius: 1rem; background: #ffffff08; border: 1px solid #ffffff14; }
.sc-stats .stats-question header { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .7rem; margin-bottom: .7rem; }
.sc-stats .stats-question h3 { margin: 0; font-size: 1rem; flex: 1; }
.sc-stats .stats-badge { font-size: .74rem; padding: .2rem .6rem; border-radius: 99rem; background: #8ff5c41f; color: var(--sc-mint, #8ff5c4); }
.sc-stats .stats-question ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.sc-stats .stats-question li { display: grid; grid-template-columns: 1.8rem minmax(0, 1fr) minmax(4rem, 7rem) 5.6rem; gap: .6rem; align-items: center; font-size: .84rem; }
.sc-stats .stats-letter { display: grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: .45rem; background: #ffffff12; font-weight: 700; font-size: .75rem; }
.sc-stats .stats-question li.is-correct .stats-letter { background: #8ff5c433; color: var(--sc-mint, #8ff5c4); }
.sc-stats .stats-text em { font-style: normal; font-size: .72rem; color: var(--sc-mint, #8ff5c4); margin-left: .3rem; }
.sc-stats .stats-question progress { width: 100%; height: .5rem; }
.sc-stats .stats-count { text-align: right; font-variant-numeric: tabular-nums; color: #ffffffcc; }
.sc-stats .stats-actions form { margin: 0; }
.sc-stats .stats-login { display: grid; gap: .6rem; width: min(100%, 24rem); }
.sc-stats .stats-login label { font-weight: 650; }
.sc-stats .stats-login input[type="password"], .sc-stats .stats-login input[type="text"] { font: inherit; font-size: 1.1rem; padding: .8rem 1rem; border-radius: .8rem; border: 1px solid #ffffff2e; background: #ffffff0f; color: #fff; }
.sc-stats .stats-login input:focus { outline: 2px solid #f7a8dc; outline-offset: 2px; }
.sc-stats .stats-login .button { justify-self: start; margin-top: .3rem; }
.sc-stats .stats-error { margin: 0; color: #ff9fb2; }
.sc-stats code { font-size: .9em; padding: .1rem .35rem; border-radius: .3rem; background: #ffffff14; }
.sc-stats .stats-total { display: grid; justify-items: start; gap: .4rem; padding: 1.6rem 2rem; border-radius: 1.2rem; background: #ffffff0a; border: 1px solid #ffffff17; width: fit-content; }
.sc-stats .stats-total strong { font-size: clamp(4rem, 10vw, 7rem); line-height: 1; font-variant-numeric: tabular-nums; background: linear-gradient(90deg, #ff4467, #f7a8dc); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sc-stats .stats-total span { font-size: 1.1rem; color: #ffffffcc; }

/* "Επόμενη ερώτηση" always bottom right, also when the answer is split in two columns. */
.showcase .question-panel > form.actions { display: flex; justify-content: flex-end; }
.showcase .question-panel.sc-split > form.actions { grid-column: 1 / -1; margin-top: .4rem; }

/* ---------- Login page (login.php) ---------- */
.sc-login main { display: grid; place-items: center; }
.sc-login .login-panel { width: min(100%, 30rem); justify-items: stretch; }
.sc-login .stats-login { width: 100%; }
.sc-login .stats-login .button { justify-self: stretch; justify-content: center; }

/* Password field with an eye button (assets/password-eye.js) */
.sc-stats .pw-field { position: relative; display: block; }
.sc-stats .pw-field input { width: 100%; padding-right: 3.4rem !important; box-sizing: border-box; }
.sc-stats .pw-eye {
    position: absolute; top: 50%; right: .45rem; translate: 0 -50%;
    width: 2.6rem; height: 2.6rem; display: grid; place-items: center;
    border: 0; border-radius: .6rem; background: transparent; color: #ffffffa6; cursor: pointer;
}
.sc-stats .pw-eye:hover, .sc-stats .pw-eye:focus-visible { color: #fff; background: #ffffff14; }
.sc-stats .pw-eye svg { width: 1.35rem; height: 1.35rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sc-stats .pw-eye[aria-pressed="false"] .pw-slash { display: none; }
.sc-stats .pw-eye[aria-pressed="true"] { color: #f7a8dc; }

/* ======================================================================
 * Right answer: the chosen option turns solid green with a ✓ and pops,
 * confetti flies (showcase.js), then the answer page opens.
 * ====================================================================== */
.showcase .choice.is-right::after { background: linear-gradient(135deg, #2fd391, #0f9a63); opacity: 1; transition-duration: .12s; }

.showcase .choice.is-right,
.showcase .choice.is-right:has(:checked) {
    border: 2px solid #8ff5c4;
    background: #0f9a63;
    color: #fff;
    box-shadow: 0 0 0 .4rem #2fd39155, 0 0 50px #2fd391aa, 0 18px 50px #00000080;
    transform: none;
    animation: sc-right-pop .55s cubic-bezier(.2, 1.5, .4, 1) both;
}

.showcase .choice.is-right .choice-key,
.showcase .choice.is-right:has(:checked) .choice-key {
    background: #fff;
    color: #0f9a63;
    transform: none;
    box-shadow: 0 6px 20px #00000055;
}

.showcase .choice.is-right .choice-radio,
.showcase .choice.is-right:has(:checked) .choice-radio {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border: 0;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 16px #ffffffaa;
    animation: sc-stamp .45s cubic-bezier(.2, 1.6, .4, 1) both;
}

.showcase .choice.is-right .choice-radio::before {
    content: "✓";
    color: #0f9a63;
    font-size: 1.15rem;
    font-weight: 900;
    line-height: 1;
}

@keyframes sc-right-pop {
    0% { transform: scale(1); }
    40% { transform: scale(1.045); }
    100% { transform: scale(1); }
}

/* While the right answer is shown, nothing else can be tapped. */
.showcase .choices:has(.is-right) .choice { pointer-events: none; }

/* ======================================================================
 * Question 7: one card. Bars start at zero and rise when their statin is tapped.
 * ====================================================================== */
.hba1c-bars.is-explore .bar-fill {
    transform: scaleY(0);
    transition: transform 1s cubic-bezier(.2, .9, .25, 1.12);
}
.hba1c-bars.is-explore .bar.is-up .bar-fill { transform: scaleY(1); }
.hba1c-bars.is-explore .bar-value { opacity: 0; transition: opacity .35s ease .45s; }
.hba1c-bars.is-explore .bar.is-up .bar-value { opacity: 1; }
/* An empty bar still shows a thin base line so the visitor sees where it will rise. */
.hba1c-bars.is-explore .bar::before {
    content: "";
    position: absolute;
    left: 11%;
    right: 11%;
    bottom: 3.2rem;
    height: 3px;
    border-radius: 2px;
    background: var(--c);
    opacity: .55;
}
.showcase .question-panel > .hba1c-bars.is-explore .bar::before { left: 18%; right: 18%; }

/* The six statins: compact, three per row, under the chart. */
.showcase .sc-explore { margin-top: 1rem; }
.showcase .sc-explore legend { margin-bottom: .6rem; }
.showcase .sc-explore .choices,
.showcase .sc-explore .choices:has(> :nth-child(4)) { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .7rem; }
.showcase .sc-explore .choice {
    min-height: 3.6rem;
    padding: .55rem 1rem .55rem .7rem;
    grid-template-columns: 2.4rem minmax(0, 1fr) 1.6rem;
    gap: .8rem;
    font-size: 1.1rem;
}
.showcase .sc-explore .choice-key { min-height: 2.4rem; height: 2.4rem; }
/* After the right statin was found the others can still be tapped to raise their bars. */
.showcase .sc-explore .choices:has(.is-right) .choice { pointer-events: auto; }
.showcase .sc-explore .choices:has(.is-right) .choice.is-right { pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
    .hba1c-bars.is-explore .bar-fill, .hba1c-bars.is-explore .bar-value { transition: none; }
}
/* Question 7 card: a slightly lower chart leaves room for the options, so the text stays larger. */
.showcase .question-panel > .hba1c-bars.is-explore .bars { height: clamp(9rem, 27svh, 20rem); }
/* Question 7 card: more room between the statin options and the source. */
.showcase .question-panel > .sc-explore + .chart-source { margin-top: 2rem; }
/* While a statin is red, nothing else can be tapped (also after the right one was found). */
.showcase .sc-explore.sc-busy .choices .choice { pointer-events: none; }
/* Results list, question 7: room between the answer («Ροσουβαστατίνη») and the chart. */
.showcase .review-body .hba1c-bars { margin-top: 1.4rem; }

/* ---------- Statistics: answers per questionnaire ---------- */
.sc-stats .stats-scroll { overflow-x: auto; max-width: 100%; border-radius: 1rem; background: #ffffff06; border: 1px solid #ffffff14; }
.sc-stats .stats-scroll .stats-table { width: 100%; }
.sc-stats .stats-per-question { min-width: 34rem; }
.sc-stats .stats-per-question td.is-right { color: var(--sc-mint, #8ff5c4); }
.sc-stats .stats-per-question td.is-wrong { color: #ff9fb2; }
.sc-stats .stats-attempts { min-width: 60rem; }
.sc-stats .stats-attempts th, .sc-stats .stats-attempts td { text-align: center; white-space: nowrap; }
.sc-stats .stats-attempts .stats-when { color: #ffffffcc; }
.sc-stats .stats-answer { font-size: .78rem; }
.sc-stats .stats-answer > span:last-child { display: block; margin-top: .2rem; }
.sc-stats .stats-answer .stats-letter { margin-inline: auto; }
.sc-stats .stats-answer.is-right { color: var(--sc-mint, #8ff5c4); }
.sc-stats .stats-answer.is-right .stats-letter { background: #8ff5c433; }
.sc-stats .stats-answer.is-wrong { color: #ff9fb2; }
.sc-stats .stats-answer.is-wrong .stats-letter { background: #ff446733; }
.sc-stats .stats-answer.is-none { color: #ffffff66; }
.sc-stats .stats-score { font-weight: 700; font-size: 1rem; }
/* The stats page grows with its tables: no fixed screen height, header and footer stay in place. */
html.sc-stats .site { height: auto; min-height: 100svh; }

/* Pages of 10 under the per-questionnaire table. */
.sc-stats #per-questionnaire { scroll-margin-top: 1rem; }
.sc-stats .stats-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem 1.4rem; }
.sc-stats .stats-pager-info { color: #ffffffb3; font-variant-numeric: tabular-nums; }
.sc-stats .stats-pager-links { display: flex; flex-wrap: wrap; gap: .5rem; }
.sc-stats .stats-page { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; white-space: nowrap; min-width: 3rem; min-height: 3rem; padding: 0 1rem; border-radius: .8rem; background: #ffffff0f; box-shadow: inset 0 0 0 1px #ffffff24; color: #fff; text-decoration: none; font-weight: 650; font-variant-numeric: tabular-nums; }
.sc-stats a.stats-page:hover, .sc-stats a.stats-page:focus-visible { background: #ffffff1f; }
.sc-stats .stats-page.is-current { background: linear-gradient(90deg, #ff4467, #f7a8dc); box-shadow: none; color: #1b0f22; }
.sc-stats .stats-page.is-gap { background: none; box-shadow: none; min-width: 1.5rem; padding: 0; color: #ffffff80; }
