/* Test del mese — test-engine.php. Testata condivisa con il blog (.bl-intro, css/blog.css);
   qui: modulo una domanda alla volta, risultato, percorso dei mesi. */

.ts-title { max-width: 16em; }

.ts-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
    margin: 26px 0 0;
    padding: 0;
    list-style: none;
    color: var(--nh-ink-2);
    font-size: .9375rem;
}

.ts-facts i { margin-right: 6px; color: var(--nh-sage); }

/* --------------------------------------------------------------------------
   Scheda del test
   -------------------------------------------------------------------------- */
.ts-stage {
    padding: clamp(8px, 2vw, 24px) 0 clamp(56px, 7vw, 96px);
    background: linear-gradient(180deg, #fff 0%, #f7f9f8 220px, #f7f9f8 100%);
}

.ts-wrap { max-width: calc(780px + 2 * var(--nh-gutter)); }

.ts-card {
    padding: clamp(24px, 4vw, 48px);
    border-radius: var(--nh-r-xl);
    background: #fff;
    box-shadow: 0 0 0 1px rgba(13, 38, 37, .05), 0 24px 60px -36px rgba(13, 38, 37, .35);
}

.ts-q { margin: 0 0 36px; padding: 0; border: 0; min-width: 0; }
.ts-q[hidden] { display: none; }
.ts-form.is-stepper .ts-q { margin-bottom: 0; }

.ts-q__text {
    display: block;
    margin: 0 0 22px;
    padding: 0;
    font-size: clamp(1.375rem, 1.1rem + 1vw, 1.875rem);
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.022em;
    text-wrap: balance;
}

.ts-q__n { color: var(--nh-sage); }
.ts-form.is-stepper .ts-q__n { display: none; }   /* il numero è già in "Domanda N di 5" */

.ts-options { display: grid; gap: 10px; }

.ts-option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border-radius: var(--nh-r-m);
    background: #fff;
    box-shadow: inset 0 0 0 1.5px var(--nh-line);
    cursor: pointer;
    transition: box-shadow .2s ease, background-color .2s ease;
}

.ts-option:hover { box-shadow: inset 0 0 0 1.5px var(--nh-sage); }

/* Radio vero, invisibile ma raggiungibile da tastiera e da lettore di schermo */
.ts-option input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.ts-option__mark {
    flex: none;
    position: relative;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    box-shadow: inset 0 0 0 2px rgba(13, 38, 37, .22);
    transition: box-shadow .2s ease;
}

.ts-option__mark::after {
    content: "";
    position: absolute;
    top: 5px;
    left: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--nh-sage);
    transform: scale(0);
    transition: transform .25s var(--nh-ease);
}

.ts-option__text { font-size: 1.0625rem; line-height: 1.4; }

.ts-option:has(input:checked) { background: var(--nh-sage-tint); box-shadow: inset 0 0 0 2px var(--nh-sage); }
.ts-option input:checked + .ts-option__mark { box-shadow: inset 0 0 0 2px var(--nh-sage); }
.ts-option input:checked + .ts-option__mark::after { transform: scale(1); }
.ts-option input:focus-visible + .ts-option__mark { outline: 3px solid rgba(36, 107, 106, .45); outline-offset: 3px; }

/* Avanzamento */
.ts-progress {
    height: 6px;
    margin-bottom: 14px;
    overflow: hidden;
    border-radius: 980px;
    background: var(--nh-mist);
}

.ts-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--nh-sage);
    transform: scaleX(0);
    transform-origin: 0 50%;
    transition: transform .5s var(--nh-ease);
}

.ts-step {
    margin: 0 0 18px;
    font-size: .8125rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--nh-ink-2);
}

.ts-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    margin-top: 30px;
}

.ts-nav .nh-btn[hidden] { display: none; }
.ts-nav .nh-btn:disabled { opacity: .4; cursor: not-allowed; }
.ts-form:not(.is-stepper) .ts-nav { justify-content: flex-end; }

@media (prefers-reduced-motion: no-preference) {
    .ts-form.is-stepper .ts-q:not([hidden]) { animation: nh-rise .45s var(--nh-ease) both; }
    .ts-result { animation: nh-rise .6s var(--nh-ease) both; }
}

/* --------------------------------------------------------------------------
   Risultato (tono dal campo "colore" del file)
   -------------------------------------------------------------------------- */
.ts-result { --ts-tone: var(--nh-sage); --ts-tint: var(--nh-sage-tint); outline: none; }
.ts-result--blu     { --ts-tone: #2f6690; --ts-tint: #e6eff6; }
.ts-result--arancio { --ts-tone: #b4621f; --ts-tint: #fbefe4; }
.ts-result--viola   { --ts-tone: #6b4c9a; --ts-tint: #f0ebf7; }
.ts-result--rosa    { --ts-tone: #b03a6a; --ts-tint: #fbebf1; }
.ts-result--rosso   { --ts-tone: #b23a3a; --ts-tint: #fbeaea; }
.ts-result--grigio  { --ts-tone: #5d6670; --ts-tint: #eef0f2; }
.ts-result--bruno   { --ts-tone: #8a5a33; --ts-tint: #f5ede5; }
.ts-result--giallo  { --ts-tone: #a07800; --ts-tint: #faf3dc; }
.ts-result--notte   { --ts-tone: #22313a; --ts-tint: #e9edf0; }
.ts-result--oro     { --ts-tone: #9a7520; --ts-tint: #f8f1de; }

.ts-result__head { display: flex; align-items: center; gap: 18px; }

.ts-result__icon {
    flex: none;
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 20px;
    background: var(--ts-tint);
    color: var(--ts-tone);
    font-size: 1.625rem;
    box-shadow: 0 10px 24px -14px var(--ts-tone);
}

.ts-result__eyebrow { margin: 0 0 4px; font-size: .8125rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ts-tone); }
.ts-result__title { margin: 0; font-weight: 700; font-size: clamp(1.625rem, 1.2rem + 1.6vw, 2.375rem); line-height: 1.1; letter-spacing: -0.028em; text-wrap: balance; }
.ts-result__text { margin: 20px 0 0; font-size: 1.125rem; line-height: 1.6; color: #2b2f33; }

.ts-result__grid { display: grid; gap: 14px; margin-top: 28px; }
@media (min-width: 760px) { .ts-result__grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); } }

.ts-result__box { padding: 22px 24px; border-radius: var(--nh-r-m); background: var(--nh-mist); }
.ts-result__box h3 { margin: 0 0 10px; font-size: .875rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--nh-ink-2); }
.ts-result__box h3 i { margin-right: 6px; color: var(--ts-tone); }
.ts-result__box p { margin: 0; line-height: 1.6; }
.ts-result__box strong { color: var(--ts-tone); }
.ts-result__box--allies { background: var(--ts-tint); }

.ts-allies { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; padding: 0; list-style: none; }
.ts-allies li { padding: 6px 12px; border-radius: 980px; background: #fff; font-size: .875rem; font-weight: 600; }
.ts-result__hint { font-size: .875rem; color: var(--nh-ink-2); }

.ts-result__actions { margin-top: 28px; }
.ts-result__note { margin: 22px 0 0; font-size: .8125rem; line-height: 1.5; color: #86868b; }

/* Mese non ancora arrivato */
.ts-locked { text-align: center; }
.ts-locked__icon { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--nh-mist); color: var(--nh-ink-2); font-size: 1.5rem; }
.ts-locked__title { margin: 18px 0 10px; font-weight: 700; font-size: 1.75rem; letter-spacing: -0.02em; }
.ts-locked p { max-width: 32em; margin: 0 auto 24px; color: var(--nh-ink-2); line-height: 1.6; }
.ts-locked .nh-actions { justify-content: center; }

/* --------------------------------------------------------------------------
   Il tuo percorso: Ayurveda e mesi vicini (precedente, corrente, successivo)
   -------------------------------------------------------------------------- */
.ts-path { padding-top: clamp(48px, 6vw, 80px); }
.ts-path__title { margin-bottom: 24px; }

.ts-path__list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 700px)  { .ts-path__list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1080px) { .ts-path__list { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.ts-step-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    height: 100%;
    padding: 22px;
    border-radius: var(--nh-r-l);
    background: #fff;
    box-shadow: 0 0 0 1px rgba(13, 38, 37, .07);
    color: inherit;
    text-decoration: none;
    transition: box-shadow .25s ease, transform .3s var(--nh-ease);
}

a.ts-step-card:hover { box-shadow: 0 0 0 1px rgba(36, 107, 106, .35), 0 18px 40px -26px rgba(13, 38, 37, .4); transform: translateY(-3px); }

.ts-step-card__dot {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    margin-bottom: 6px;
    border-radius: 50%;
    background: var(--nh-sage-tint);
    color: var(--nh-sage);
}

.ts-step-card__label { font-size: .75rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--nh-sage); }
.ts-step-card__title { font-size: 1.0625rem; font-weight: 700; line-height: 1.3; letter-spacing: -0.012em; }

.ts-step-card--current { background: var(--nh-sage-deep); color: #fff; box-shadow: none; }
.ts-step-card--current .ts-step-card__dot { background: rgba(255, 255, 255, .12); color: #9fe0d6; }
.ts-step-card--current .ts-step-card__label { color: #9fe0d6; }

.ts-step-card--ayurveda .ts-step-card__dot { background: #fbefe4; color: #b45309; }
.ts-step-card--ayurveda .ts-step-card__label { color: #b45309; }

.ts-step-card--locked { background: var(--nh-mist); box-shadow: none; color: var(--nh-ink-2); }
.ts-step-card--locked .ts-step-card__dot { background: #e6e6ea; color: #8a8a90; }
.ts-step-card--locked .ts-step-card__label { color: #8a8a90; }
