/* ===== Simulazione di crisi "48 ore" ===== */
:root {
  --cr-bg: #0f1116;
  --cr-panel: #171a21;
  --cr-line: rgba(255, 255, 255, 0.09);
  --cr-text: #eef0f3;
  --cr-soft: rgba(238, 240, 243, 0.6);
  --cr-amber: #F2A541;
  --t-neg: #E0574C;
  --t-neu: #a7a9b0;
  --t-pos: #5DBB7A;
  --cr-mono: "IBM Plex Mono", ui-monospace, monospace;
  --accent: #1c1d20;
}
ol { list-style: none; }

.read-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 70; pointer-events: none; }
.read-progress span { display: block; height: 100%; background: var(--cr-amber); transform-origin: left; transform: scaleX(0); }

[data-split] .line { display: block; overflow: hidden; padding-bottom: 0.06em; }
[data-split] .line > span { display: inline-block; transform: translateY(110%); transition: transform 1.1s var(--ease-out); }
[data-split].is-in .line > span { transform: none; }
[data-split].is-in .line:nth-child(2) > span { transition-delay: 0.08s; }
.fade-up { opacity: 0; transform: translateY(30px); transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out); }
.fade-up.is-in { opacity: 1; transform: none; }

.cr-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600; color: #b5701a; margin-bottom: 1.4rem; }
.cr-h2 { font-size: clamp(2.3rem, 5.6vw, 4.6rem); font-weight: 600; line-height: 1; letter-spacing: -0.04em; margin-bottom: 1.6rem; }
.cr-intro { max-width: 620px; color: #4a4b50; font-size: clamp(1.02rem, 1.3vw, 1.15rem); line-height: 1.6; margin-bottom: 2.6rem; }

/* ===== Apertura ===== */
.page-crisi .header { color: #fff; }
.cr-hero { min-height: 100vh; min-height: 100svh; background: var(--cr-bg); color: var(--cr-text); display: flex; align-items: center; padding: 8rem 0 5rem; position: relative; overflow: hidden; }
.cr-hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 80% 30%, rgba(242,165,65,0.12), transparent 45%); pointer-events: none; }
.cr-eyebrow { font-family: var(--cr-mono); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--cr-amber); margin-bottom: 1.4rem; }
.cr-clock { font-family: var(--cr-mono); font-size: clamp(1.1rem, 2vw, 1.5rem); color: var(--cr-soft); margin-bottom: 1rem; display: flex; align-items: center; gap: 0.6rem; }
.cr-clock span { color: var(--cr-amber); }
.cr-clock i { width: 10px; height: 10px; border-radius: 50%; background: var(--t-neg); animation: blink 1.2s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0.1; } }
.cr-hero__title { font-size: clamp(3.4rem, 11vw, 10rem); font-weight: 600; line-height: 0.92; letter-spacing: -0.05em; margin-bottom: 2rem; }
.cr-hero__intro { max-width: 640px; font-size: clamp(1.1rem, 1.7vw, 1.4rem); line-height: 1.45; color: rgba(238,240,243,0.85); margin-bottom: 2.6rem; }
.pill-btn--light { color: var(--cr-bg); background: var(--cr-text); border-color: var(--cr-text); }
.pill-btn--light .pill-btn__fill { background: var(--cr-amber); }

.cr-meta { padding-top: clamp(3.5rem, 7vw, 6rem); }
.cr-disclaimer { margin-top: 2rem; font-size: 0.9rem; color: var(--muted); max-width: 760px; line-height: 1.6; }

/* ===== Sala crisi ===== */
.cr-room { background: var(--cr-bg); color: var(--cr-text); margin-top: clamp(4rem, 8vw, 6rem); padding: clamp(4rem, 7vw, 6rem) 0; min-height: 100vh; }
.cr-room__grid { display: grid; grid-template-columns: 1fr 330px; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.cr-main { min-height: 70vh; }

/* schermata iniziale */
.cr-start { padding: clamp(2rem, 6vw, 5rem) 0; }
.cr-start__ring { font-family: var(--cr-mono); color: var(--cr-amber); font-size: 0.9rem; letter-spacing: 0.1em; text-transform: uppercase; display: flex; align-items: center; gap: 0.8rem; margin-bottom: 1.6rem; }
.cr-start__ring i { width: 12px; height: 12px; border-radius: 50%; background: var(--t-neg); box-shadow: 0 0 0 0 rgba(224,87,76,0.6); animation: ring 1.4s infinite; }
@keyframes ring { 70% { box-shadow: 0 0 0 16px rgba(224,87,76,0); } 100% { box-shadow: 0 0 0 0 rgba(224,87,76,0); } }
.cr-start h2 { font-size: clamp(2rem, 4.6vw, 3.6rem); font-weight: 600; letter-spacing: -0.035em; line-height: 1.05; margin-bottom: 1.4rem; }
.cr-start p { color: var(--cr-soft); font-size: 1.1rem; line-height: 1.6; max-width: 560px; margin-bottom: 2.2rem; }

.cr-btn { display: inline-flex; align-items: center; gap: 0.6rem; border: 0; cursor: pointer; font: inherit; font-weight: 600; font-size: 1rem; padding: 1rem 1.6rem; border-radius: 999px; background: var(--cr-amber); color: #1a1205; transition: transform 0.4s var(--ease-out), background 0.3s; }
.cr-btn:hover { transform: translateY(-2px); background: #f7b968; }
.cr-btn--ghost { background: none; color: var(--cr-text); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.3); }
.cr-btn--ghost:hover { background: rgba(255,255,255,0.08); }

/* passo */
.cr-step { animation: stepIn 0.7s var(--ease-out); }
@keyframes stepIn { from { opacity: 0; transform: translateY(24px); } }
.cr-step__time { font-family: var(--cr-mono); font-size: 0.85rem; color: var(--cr-amber); letter-spacing: 0.06em; margin-bottom: 1.2rem; display: flex; gap: 1rem; align-items: center; }
.cr-step__time span { color: var(--cr-soft); }
.cr-msg { background: var(--cr-panel); border: 1px solid var(--cr-line); border-left: 3px solid var(--cr-amber); border-radius: 14px; padding: 1.3rem 1.4rem; margin-bottom: 2rem; }
.cr-msg small { display: block; font-family: var(--cr-mono); font-size: 0.75rem; color: var(--cr-soft); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.7rem; }
.cr-msg p { font-size: clamp(1.05rem, 1.5vw, 1.25rem); line-height: 1.5; }
.cr-q { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 600; letter-spacing: -0.03em; margin-bottom: 1.2rem; }
.cr-opts { display: grid; gap: 0.7rem; }
.cr-opt { display: grid; grid-template-columns: 2.2rem 1fr; gap: 0.6rem; align-items: start; text-align: left; border: 1px solid var(--cr-line); background: var(--cr-panel); color: var(--cr-text); font: inherit; font-size: 1.02rem; line-height: 1.5; padding: 1.1rem 1.2rem; border-radius: 14px; cursor: pointer; transition: border-color 0.3s, background 0.3s, opacity 0.4s, transform 0.4s var(--ease-out); }
.cr-opt:hover:not(:disabled) { border-color: rgba(242,165,65,0.6); transform: translateX(4px); }
.cr-opt b { font-family: var(--cr-mono); color: var(--cr-amber); font-weight: 500; }
.cr-opt:disabled { cursor: default; }
.cr-opt.is-other { opacity: 0.35; }
.cr-opt.is-chosen { border-color: var(--cr-text); background: #1f232c; }

/* esito */
.cr-out { margin-top: 1.6rem; border-top: 1px solid var(--cr-line); padding-top: 1.6rem; animation: stepIn 0.6s var(--ease-out); }
.cr-badge { display: inline-flex; align-items: center; gap: 0.5rem; font-family: var(--cr-mono); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; padding: 0.4rem 0.8rem; border-radius: 999px; margin-bottom: 1rem; }
.cr-badge.q2 { background: rgba(93,187,122,0.15); color: var(--t-pos); }
.cr-badge.q1 { background: rgba(242,165,65,0.15); color: var(--cr-amber); }
.cr-badge.q0 { background: rgba(224,87,76,0.15); color: var(--t-neg); }
.cr-out p { color: rgba(238,240,243,0.82); font-size: 1.05rem; line-height: 1.6; max-width: 640px; margin-bottom: 1.6rem; }
.cr-out__head { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: center; justify-content: space-between; margin-top: 0.6rem; }
.cr-out__note { font-family: var(--cr-mono); font-size: 0.78rem; color: var(--cr-soft); }

.cr-out__titles { display: none; gap: 0.5rem; margin-bottom: 1.4rem; }
.cr-out__titles li { font-size: 0.92rem; line-height: 1.4; padding: 0.6rem 0.8rem; border-radius: 10px; background: rgba(255,255,255,0.05); border-left: 3px solid var(--t-neu); }
.cr-out__titles li.n { border-left-color: var(--t-neg); } .cr-out__titles li.p { border-left-color: var(--t-pos); }
.cr-out__titles small { display: block; font-family: var(--cr-mono); font-size: 0.68rem; color: var(--cr-soft); margin-bottom: 0.2rem; }

/* audio */
.cr-start__btns { display: flex; flex-wrap: wrap; gap: 0.8rem; }
.cr-start__hint { margin-top: 1.2rem; font-size: 0.88rem !important; color: var(--cr-soft); }
.cr-ico { width: 18px; height: 18px; flex: none; }
.cr-dash__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.8rem; }
.cr-audio { display: inline-flex; align-items: center; gap: 0.4rem; border: 1px solid var(--cr-line); background: none; color: var(--cr-soft); font: inherit; font-size: 0.75rem; padding: 0.45rem 0.7rem; border-radius: 999px; cursor: pointer; white-space: nowrap; transition: color 0.3s, border-color 0.3s, background 0.3s; }
.cr-audio:hover { color: var(--cr-text); border-color: rgba(255,255,255,0.3); }
.cr-audio[aria-pressed="true"] { color: var(--cr-amber); border-color: rgba(242,165,65,0.45); }
.cr-audio[aria-pressed="true"] .cr-ico path:last-child { animation: wave 1.6s ease-in-out infinite; transform-origin: 13px 10px; }
@keyframes wave { 50% { opacity: 0.35; } }

/* cruscotto */
.cr-dash { position: sticky; top: 5.5rem; background: var(--cr-panel); border: 1px solid var(--cr-line); border-radius: 18px; padding: 1.3rem; }
.cr-dash__clock { font-family: var(--cr-mono); font-size: 1.7rem; white-space: nowrap; font-weight: 500; letter-spacing: 0.02em; margin-bottom: 0.2rem; }
.cr-dash__clock small { display: block; white-space: normal; font-size: 0.72rem; color: var(--cr-soft); font-weight: 400; margin-top: 0.3rem; }
.cr-steps { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; margin: 1rem 0 1.4rem; }
.cr-steps li { height: 6px; border-radius: 3px; background: rgba(255,255,255,0.1); transition: background 0.5s; }
.cr-steps li.is-now { background: var(--cr-amber); }
.cr-steps li.q2 { background: var(--t-pos); } .cr-steps li.q1 { background: #c98a33; } .cr-steps li.q0 { background: var(--t-neg); }
.cr-meters { display: grid; gap: 0.9rem; margin-bottom: 1.4rem; }
.cr-meter p { display: flex; justify-content: space-between; font-size: 0.82rem; color: var(--cr-soft); margin-bottom: 0.4rem; }
.cr-meter b { font-family: var(--cr-mono); color: var(--cr-text); font-weight: 500; transition: color 0.4s; }
.cr-meter b.is-up { color: var(--t-pos); } .cr-meter b.is-down { color: var(--t-neg); }
.cr-meter i { display: block; height: 6px; border-radius: 3px; background: rgba(255,255,255,0.08); overflow: hidden; }
.cr-meter em { display: block; height: 100%; width: 0; border-radius: 3px; background: var(--cr-text); transition: width 1s var(--ease-out), background 0.5s; }
.cr-meter[data-m="tono"] em { background: var(--t-neg); }
.cr-meter[data-m="rischio"] em { background: var(--cr-amber); }
.cr-feed { border-top: 1px solid var(--cr-line); padding-top: 1rem; }
.cr-feed__title { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; margin-bottom: 0.7rem; display: flex; justify-content: space-between; }
.cr-feed__title small { text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--cr-soft); }
.cr-feed ul { max-height: 260px; overflow-y: auto; display: grid; gap: 0.5rem; overscroll-behavior: contain; }
.cr-feed li { font-size: 0.85rem; line-height: 1.4; padding: 0.55rem 0.7rem; border-radius: 10px; background: rgba(255,255,255,0.04); border-left: 3px solid var(--t-neu); animation: feedIn 0.6s var(--ease-out) both; }
.cr-feed li small { display: block; font-family: var(--cr-mono); font-size: 0.68rem; color: var(--cr-soft); margin-bottom: 0.2rem; }
.cr-feed li.n { border-left-color: var(--t-neg); } .cr-feed li.p { border-left-color: var(--t-pos); }
.cr-feed .cr-feed__empty { border: 0; background: none; color: var(--cr-soft); padding-left: 0; animation: none; }
@keyframes feedIn { from { opacity: 0; transform: translateX(14px); } }

/* report finale */
.cr-end h2 { font-size: clamp(2rem, 4.6vw, 3.6rem); font-weight: 600; letter-spacing: -0.035em; line-height: 1.05; margin: 0.6rem 0 1rem; }
.cr-end__lead { color: rgba(238,240,243,0.82); font-size: 1.1rem; line-height: 1.6; max-width: 620px; margin-bottom: 2.2rem; }
.cr-end__score { font-family: var(--cr-mono); font-size: 0.85rem; color: var(--cr-amber); letter-spacing: 0.06em; text-transform: uppercase; }
.cr-chart { background: var(--cr-panel); border: 1px solid var(--cr-line); border-radius: 16px; padding: 1.2rem 1.2rem 0.8rem; margin-bottom: 2rem; }
.cr-chart h3, .cr-review h3 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; margin-bottom: 0.9rem; }
.cr-chart svg { display: block; width: 100%; height: 200px; overflow: visible; }
.cr-chart .ax { stroke: rgba(255,255,255,0.12); }
.cr-chart .ax-t { font: 400 11px var(--cr-mono); fill: var(--cr-soft); }
.cr-chart .line { fill: none; stroke: var(--t-neg); stroke-width: 2.5; stroke-linejoin: round; }
.cr-chart .area { fill: rgba(224,87,76,0.12); }
.cr-chart .pt { fill: var(--cr-bg); stroke: var(--t-neg); stroke-width: 2; }
.cr-dots { display: flex; flex-wrap: wrap; gap: 6px; margin: 0.4rem 0 2rem; }
.cr-dots span { width: 14px; height: 14px; border-radius: 50%; background: var(--t-neu); animation: feedIn 0.5s var(--ease-out) both; }
.cr-dots span.n { background: var(--t-neg); } .cr-dots span.p { background: var(--t-pos); }
.cr-review { display: grid; gap: 0.7rem; margin-bottom: 2.2rem; }
.cr-review li { background: var(--cr-panel); border: 1px solid var(--cr-line); border-radius: 14px; padding: 1rem 1.2rem; }
.cr-review li header { display: flex; flex-wrap: wrap; gap: 0.4rem 0.8rem; align-items: center; margin-bottom: 0.5rem; font-family: var(--cr-mono); font-size: 0.75rem; color: var(--cr-soft); }
.cr-review li p { font-size: 0.95rem; line-height: 1.55; color: rgba(238,240,243,0.82); }
.cr-review li .best { margin-top: 0.6rem; font-size: 0.88rem; color: var(--t-pos); }
.cr-end__actions { display: flex; flex-wrap: wrap; gap: 0.8rem; }

/* ===== Regole ===== */
.cr-rules { padding-top: clamp(7rem, 13vw, 11rem); }
.cr-rules__grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.cr-lessons li { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1.2rem; padding: 1.5rem 0; border-top: 1px solid var(--line); }
.cr-lessons li:last-child { border-bottom: 1px solid var(--line); }
.cr-lessons b { font-size: clamp(1.8rem, 3vw, 2.5rem); font-weight: 600; letter-spacing: -0.04em; color: #b5701a; line-height: 1; }
.cr-lessons h3 { font-size: 1.2rem; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 0.4rem; }
.cr-lessons p { color: #4a4b50; line-height: 1.55; }
.cr-law { background: #f4f3f1; border-radius: 18px; padding: clamp(1.4rem, 3vw, 2rem); }
.cr-law h3 { font-size: 1.2rem; font-weight: 600; margin-bottom: 1.4rem; }
.cr-law__line { position: relative; padding-left: 1.6rem; }
.cr-law__line::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 2px; background: #dcdad6; }
.cr-law__item { position: relative; padding-bottom: 1.3rem; }
.cr-law__item::before { content: ""; position: absolute; left: -1.6rem; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 3px #b5701a; }
.cr-law__item b { font-family: var(--cr-mono); font-size: 0.85rem; color: #b5701a; display: block; margin-bottom: 0.2rem; }
.cr-law__item p { font-size: 0.95rem; line-height: 1.5; }
.cr-law__item small { color: var(--muted); }
.cr-law__note { font-size: 0.8rem; color: var(--muted); line-height: 1.5; margin-top: 0.4rem; }

/* ===== Kit ===== */
.cr-kit { padding: clamp(7rem, 13vw, 11rem) 0 0; }
.cr-kit__grid { display: grid; grid-template-columns: 280px 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.cr-kit__tabs { display: grid; gap: 0.4rem; position: sticky; top: 6rem; }
.cr-tab { text-align: left; border: 1px solid var(--line); background: #fff; font: inherit; padding: 0.9rem 1rem; border-radius: 12px; cursor: pointer; transition: background 0.3s, border-color 0.3s; }
.cr-tab b { display: block; font-weight: 600; font-size: 0.98rem; }
.cr-tab small { color: var(--muted); font-size: 0.78rem; }
.cr-tab:hover { border-color: var(--ink); }
.cr-tab[aria-selected="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.cr-tab[aria-selected="true"] small { color: rgba(255,255,255,0.65); }
.cr-doc { background: #fff; border-radius: 18px; box-shadow: 0 0 0 1px var(--line), 0 30px 60px rgba(0,0,0,0.06); padding: clamp(1.6rem, 4vw, 3rem); min-height: 420px; }
.cr-doc header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 0.6rem 1rem; border-bottom: 1px solid var(--line); padding-bottom: 1.2rem; margin-bottom: 1.6rem; }
.cr-doc__use { width: 100%; font-family: var(--cr-mono); font-size: 0.75rem; color: #b5701a; text-transform: uppercase; letter-spacing: 0.06em; }
.cr-doc h3 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); font-weight: 600; letter-spacing: -0.02em; }
.cr-doc__copy { border: 1px solid var(--line); background: none; font: inherit; font-size: 0.85rem; padding: 0.5rem 0.95rem; border-radius: 999px; cursor: pointer; }
.cr-doc__copy:hover { border-color: var(--ink); }
.cr-doc__body { white-space: pre-wrap; font-size: 1rem; line-height: 1.7; color: #2a2b2f; transition: opacity 0.3s; }
.cr-doc__body.is-swap { opacity: 0; }

.toast { position: fixed; left: 50%; bottom: 2rem; z-index: 95; background: var(--ink); color: #fff; padding: 0.8rem 1.4rem; border-radius: 999px; font-size: 0.9rem; opacity: 0; transform: translate(-50%, 200%); transition: transform 0.5s var(--ease-out), opacity 0.3s; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ===== Mobile ===== */
@media (max-width: 900px) {
  .cr-room__grid, .cr-rules__grid, .cr-kit__grid { grid-template-columns: 1fr; }
  .cr-dash { position: relative; top: 0; order: -1; }
  .cr-feed { display: none; }
  .cr-out__titles { display: grid; }
  .cr-meters { grid-template-columns: 1fr 1fr; gap: 0.7rem 1rem; margin-bottom: 0; }
  .cr-dash { padding: 1rem; }
  .cr-dash__clock { font-size: 1.4rem; }
  .cr-kit__tabs { position: static; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .cr-lessons li { grid-template-columns: 1fr; gap: 0.5rem; }
  .cr-kit__tabs { grid-template-columns: 1fr; }
  .cr-opt { grid-template-columns: 1.8rem 1fr; font-size: 0.98rem; }
}

/* ===== Animazioni e atmosfera ===== */
.cr-hero .container, .cr-room .container { position: relative; z-index: 1; }
.cr-room { position: relative; overflow: hidden; }
.cr-glow { position: absolute; pointer-events: none; opacity: 0; transition: opacity 2.5s ease; filter: blur(10px); }
.cr-glow--neg { inset: -20% -10% auto auto; width: 75%; height: 90%; background: radial-gradient(circle at 70% 30%, rgba(224, 87, 76, 0.32), transparent 62%); }
.cr-glow--pos { inset: auto auto -25% -10%; width: 70%; height: 90%; background: radial-gradient(circle at 30% 70%, rgba(93, 187, 122, 0.26), transparent 62%); }
.cr-grain { position: absolute; inset: -50%; pointer-events: none; opacity: 0.07; z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite; }
@keyframes grain { 0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -3%); } 60% { transform: translate(-2%, -1%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); } }

/* apertura: secondi e notifiche */
.cr-clock em { font-style: normal; color: rgba(238, 240, 243, 0.35); margin-left: -0.6rem; }
.cr-notifs { position: absolute; right: clamp(1rem, 6vw, 6rem); top: 50%; transform: translateY(-40%); width: 310px; display: grid; gap: 0.7rem; z-index: 1; }
.cr-notif { background: rgba(28, 31, 39, 0.82); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 16px; padding: 0.85rem 1rem; display: grid; grid-template-columns: 1fr auto; gap: 0.15rem 0.6rem; box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35); animation: notifIn 0.7s cubic-bezier(0.34, 1.4, 0.64, 1) both; transition: opacity 0.5s, transform 0.5s; }
.cr-notif b { font-size: 0.85rem; font-weight: 600; color: var(--cr-text); }
.cr-notif span { grid-column: 1 / -1; font-size: 0.82rem; line-height: 1.35; color: var(--cr-soft); }
.cr-notif small { font-family: var(--cr-mono); font-size: 0.68rem; color: var(--cr-amber); grid-row: 1; grid-column: 2; }
.cr-notif.is-out { opacity: 0; transform: translateY(10px) scale(0.96); }
.cr-notif:nth-child(2) { opacity: 0.75; } .cr-notif:nth-child(3) { opacity: 0.45; }
@keyframes notifIn { from { opacity: 0; transform: translateY(-18px) scale(0.95); } }

/* salto temporale */
.cr-skip { min-height: 60vh; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; animation: skipIn 0.4s ease both; }
.cr-skip__day { font-family: var(--cr-mono); font-size: 0.95rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--cr-amber); margin-bottom: 0.4rem; }
.cr-skip__time { font-family: var(--cr-mono); font-weight: 500; font-size: clamp(4.5rem, 13vw, 10rem); line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.cr-skip small { font-family: var(--cr-mono); color: var(--cr-soft); font-size: 0.95rem; margin-top: 0.8rem; }
.cr-skip__bar { display: block; width: min(420px, 80%); height: 2px; background: rgba(255, 255, 255, 0.1); margin-top: 1.6rem; overflow: hidden; }
.cr-skip__bar em { display: block; height: 100%; background: var(--cr-amber); transform-origin: left; animation: skipBar 1.3s cubic-bezier(0.65, 0, 0.35, 1) both; }
@keyframes skipIn { from { opacity: 0; filter: blur(6px); } }
@keyframes skipBar { from { transform: scaleX(0); } }

/* comparsa a cascata del passo */
.cr-step--anim { animation: none; }
.cr-rv { opacity: 0; animation: rv 0.8s var(--ease-out) var(--d, 0s) forwards; }
@keyframes rv { from { opacity: 0; transform: translateY(18px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
#crMsgText.is-typing::after { content: ""; display: inline-block; width: 0.55em; height: 1.05em; margin-left: 2px; vertical-align: -0.15em; background: var(--cr-amber); animation: blink 0.9s steps(2) infinite; }
.cr-msg { cursor: default; }
.cr-later .cr-q, .cr-later .cr-opt { opacity: 0; transform: translateY(16px); }
.cr-step.is-ready .cr-later .cr-q { animation: rv 0.7s var(--ease-out) forwards; }
.cr-step.is-ready .cr-later .cr-opt { animation: rv 0.7s var(--ease-out) calc(0.15s + var(--i) * 0.11s) forwards; }
.cr-opt { position: relative; overflow: hidden; transition: border-color 0.3s, background 0.3s, opacity 0.4s, transform 0.4s var(--ease-out), max-height 0.6s var(--ease-out), padding 0.6s var(--ease-out), margin 0.6s var(--ease-out), border-width 0.6s; }
.cr-opt::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(242, 165, 65, 0.12) 50%, transparent 70%); transform: translateX(-100%); transition: transform 0.9s var(--ease-out); pointer-events: none; }
.cr-opt:hover:not(:disabled)::after { transform: translateX(100%); }
.cr-step.is-ready .cr-opt.is-other { animation: none; opacity: 0.3; transform: scale(0.985); }
.cr-step.is-ready .cr-opt.is-chosen { animation: none; opacity: 1; transform: none; box-shadow: 0 0 0 1px var(--cr-text), 0 20px 40px rgba(0, 0, 0, 0.3); }
.cr-opt.is-gone { max-height: 0 !important; padding-top: 0; padding-bottom: 0; margin-top: -0.7rem; border-width: 0; opacity: 0 !important; }

/* cruscotto: delta, pulsazione, titoli */
.cr-meter p { position: relative; }
.cr-delta { position: absolute; right: 0; top: -2px; font-family: var(--cr-mono); font-size: 0.72rem; font-weight: 600; pointer-events: none; animation: delta 1.7s var(--ease-out) forwards; }
.cr-delta.is-good { color: var(--t-pos); } .cr-delta.is-bad { color: var(--t-neg); }
@keyframes delta { 0% { opacity: 0; transform: translate(-2.6rem, 6px); } 15% { opacity: 1; transform: translate(-2.6rem, 0); } 100% { opacity: 0; transform: translate(-2.6rem, -18px); } }
.cr-meter.is-pulse em { animation: barPulse 1s ease; }
@keyframes barPulse { 30% { filter: brightness(1.6); box-shadow: 0 0 12px currentColor; } }
.cr-feed li { animation: feedIn2 0.8s var(--ease-out) both; }
.cr-feed li.n { animation: feedIn2 0.8s var(--ease-out) both, flashNeg 1.2s ease 0.1s; }
.cr-feed li.p { animation: feedIn2 0.8s var(--ease-out) both, flashPos 1.2s ease 0.1s; }
@keyframes feedIn2 { from { opacity: 0; transform: translateX(24px) scale(0.97); } }
@keyframes flashNeg { 20% { background: rgba(224, 87, 76, 0.28); } }
@keyframes flashPos { 20% { background: rgba(93, 187, 122, 0.24); } }
.cr-out { animation: rv 0.7s var(--ease-out) both; }
.cr-out__titles li { animation: rv 0.6s var(--ease-out) both; }
.cr-out__titles li:nth-child(2) { animation-delay: 0.65s; } .cr-out__titles li:nth-child(3) { animation-delay: 1.3s; }

/* report */
.cr-words > span { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: 0.06em; }
.cr-words > span > span { display: inline-block; transform: translateY(110%); animation: wordUp 0.9s var(--ease-out) calc(0.2s + var(--i) * 0.07s) forwards; }
@keyframes wordUp { to { transform: none; } }
.cr-chart .pt { opacity: 0; transform-box: fill-box; transform-origin: center; animation: ptIn 0.5s cubic-bezier(0.34, 1.6, 0.64, 1) forwards; }
@keyframes ptIn { from { opacity: 0; transform: scale(0); } to { opacity: 1; transform: none; } }
.cr-chart .area.is-fade { opacity: 0; animation: areaIn 1.2s ease 1.4s forwards; }
@keyframes areaIn { to { opacity: 1; } }
.cr-dots span { animation: dotIn 0.5s cubic-bezier(0.34, 1.6, 0.64, 1) both; }
@keyframes dotIn { from { opacity: 0; transform: scale(0); } }
.cr-review li { animation: rv 0.7s var(--ease-out) both; }
.cr-review li:nth-child(1) { animation-delay: 0.9s; } .cr-review li:nth-child(2) { animation-delay: 1s; } .cr-review li:nth-child(3) { animation-delay: 1.1s; }
.cr-review li:nth-child(4) { animation-delay: 1.2s; } .cr-review li:nth-child(5) { animation-delay: 1.3s; } .cr-review li:nth-child(6) { animation-delay: 1.4s; }

/* kit: cambio documento più morbido */
.cr-doc__body { transition: opacity 0.3s, transform 0.4s var(--ease-out); }
.cr-doc__body.is-swap { transform: translateY(10px); }
.cr-tab { transition: background 0.3s, border-color 0.3s, transform 0.3s var(--ease-out); }
.cr-tab:hover { transform: translateX(4px); }

@media (max-width: 1100px) { .cr-notifs { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .cr-grain { animation: none; }
  .cr-rv, .cr-later .cr-q, .cr-later .cr-opt, .cr-words > span > span, .cr-chart .pt { opacity: 1 !important; transform: none !important; animation: none !important; }
}

/* esito: sale dopo che le altre opzioni si sono chiuse, un elemento alla volta */
.cr-out { position: relative; border-top: 0; animation: none; }
.cr-out::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--cr-line); transform-origin: left; animation: lineIn 0.7s var(--ease-out) both; }
@keyframes lineIn { from { transform: scaleX(0); } }
.cr-out > * { opacity: 0; animation: outUp 0.75s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
.cr-out > *:nth-child(1) { animation-delay: 0.05s; }
.cr-out > *:nth-child(2) { animation-delay: 0.14s; }
.cr-out > *:nth-child(3) { animation-delay: 0.23s; }
.cr-out > *:nth-child(4) { animation-delay: 0.32s; }
@keyframes outUp { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
.cr-opt.is-gone { transition: max-height 0.62s cubic-bezier(0.65, 0, 0.35, 1), padding 0.62s cubic-bezier(0.65, 0, 0.35, 1), margin 0.62s cubic-bezier(0.65, 0, 0.35, 1), opacity 0.3s ease, border-width 0.62s; }
@media (prefers-reduced-motion: reduce) { .cr-out > * { opacity: 1; animation: none; } }
