/* ===== 48 ore · NordiaOS: il computer del responsabile comunicazione ===== */
:root {
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ink: #1b1b1b; --muted: #6a6a72; --line: #c9c6b8;
  --cr-bg: #f6f4ec; --cr-panel: #ffffff; --cr-line: #c9c6b8; --cr-text: #1b1b1b; --cr-soft: #5d5d68;
  --cr-amber: #0b5ad8; --t-neg: #d4312b; --t-pos: #2e9c3d; --t-neu: #9a9aa4;
  --cr-mono: "Lucida Console", "Courier New", monospace;
  --os-font: Tahoma, Verdana, "Segoe UI", sans-serif;
  --os-face: #ece9d8; --os-sel: #316ac5; --os-frame: #0a3fb3;
  --task: 40px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body.page-crisi-os { font-family: var(--os-font); color: var(--ink); background: #0b2a6e; overflow: hidden; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; }
a { color: inherit; }
ol, ul { list-style: none; }

/* ===== Icone (disegnate qui, nessuna presa da sistemi esistenti) ===== */
.os-ic { display: inline-block; width: 44px; height: 44px; flex: none; background: center / contain no-repeat; filter: drop-shadow(1px 2px 1px rgba(0, 0, 0, 0.35)); }
.os-ic--s { width: 18px; height: 18px; filter: none; }
.os-ic--phone { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cdefs%3E%3ClinearGradient id='a' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23ff8a6b'/%3E%3Cstop offset='1' stop-color='%23d4312b'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect x='4' y='4' width='40' height='40' rx='9' fill='url(%23a)' stroke='%23fff' stroke-width='2'/%3E%3Cpath d='M17 13c2 0 3 4 3 5s-2 2-2 3c1 3 4 6 7 7 1 0 2-2 3-2s5 1 5 3-2 5-5 5C19 34 14 24 14 17c0-2 1-4 3-4z' fill='%23fff'/%3E%3C/svg%3E"); }
.os-ic--dash { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Crect x='3' y='6' width='42' height='34' rx='4' fill='%23e8f1ff' stroke='%232461c8' stroke-width='2'/%3E%3Crect x='3' y='6' width='42' height='8' rx='3' fill='%232f74e0'/%3E%3Crect x='10' y='26' width='6' height='10' fill='%23d4312b'/%3E%3Crect x='19' y='21' width='6' height='15' fill='%23f0a929'/%3E%3Crect x='28' y='17' width='6' height='19' fill='%232e9c3d'/%3E%3Cpath d='M18 44h12' stroke='%232461c8' stroke-width='3'/%3E%3C/svg%3E"); }
.os-ic--news { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath d='M8 8h30v32H12a4 4 0 0 1-4-4z' fill='%23fff' stroke='%23555' stroke-width='2'/%3E%3Cpath d='M38 16h4v20a4 4 0 0 1-4 4' fill='%23ddd' stroke='%23555' stroke-width='2'/%3E%3Crect x='12' y='12' width='22' height='6' fill='%23222'/%3E%3Crect x='12' y='21' width='10' height='9' fill='%237aa7e8'/%3E%3Cpath d='M25 22h9M25 26h9M25 30h9M12 34h22' stroke='%23888' stroke-width='2'/%3E%3C/svg%3E"); }
.os-ic--folder { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cdefs%3E%3ClinearGradient id='a' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23ffe596'/%3E%3Cstop offset='1' stop-color='%23f0b429'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M4 12a3 3 0 0 1 3-3h11l4 4h19a3 3 0 0 1 3 3v22a3 3 0 0 1-3 3H7a3 3 0 0 1-3-3z' fill='%23d99a1c'/%3E%3Crect x='10' y='14' width='26' height='16' fill='%23fff' transform='rotate(-4 23 22)'/%3E%3Cpath d='M4 19h40v19a3 3 0 0 1-3 3H7a3 3 0 0 1-3-3z' fill='url(%23a)'/%3E%3C/svg%3E"); }
.os-ic--txt { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath d='M10 4h20l8 8v32H10z' fill='%23fff' stroke='%235a6e8c' stroke-width='2'/%3E%3Cpath d='M30 4v8h8' fill='%23dfe8f5' stroke='%235a6e8c' stroke-width='2'/%3E%3Cpath d='M15 18h18M15 23h18M15 28h18M15 33h12' stroke='%237aa7e8' stroke-width='2'/%3E%3C/svg%3E"); }
.os-ic--bin { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cdefs%3E%3ClinearGradient id='a' x1='0' x2='1'%3E%3Cstop offset='0' stop-color='%23c9d8ea'/%3E%3Cstop offset='.5' stop-color='%23fff'/%3E%3Cstop offset='1' stop-color='%23a9bdd6'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M11 14h26l-3 28H14z' fill='url(%23a)' stroke='%235a6e8c' stroke-width='2'/%3E%3Cellipse cx='24' cy='14' rx='14' ry='4' fill='%23e6eef8' stroke='%235a6e8c' stroke-width='2'/%3E%3Cpath d='M18 9l6-4 6 5' fill='%23fff' stroke='%23999' stroke-width='1.5'/%3E%3Cpath d='M19 20l1 18M24 20v18M29 20l-1 18' stroke='%238aa0bd' stroke-width='1.5'/%3E%3C/svg%3E"); }
.os-ic--globe { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cdefs%3E%3CradialGradient id='a' cx='.35' cy='.3'%3E%3Cstop offset='0' stop-color='%23bfe6ff'/%3E%3Cstop offset='1' stop-color='%231a6fd6'/%3E%3C/radialGradient%3E%3C/defs%3E%3Ccircle cx='24' cy='24' r='19' fill='url(%23a)' stroke='%23fff' stroke-width='2'/%3E%3Cpath d='M14 14c4 2 6 0 9 3s-1 6 2 8 5 0 6 4-3 6-4 9M30 9c-2 3 1 5 4 5s4 3 6 4' fill='none' stroke='%232e9c3d' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E"); }
.os-ic--doc { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath d='M10 4h20l8 8v32H10z' fill='%23fff' stroke='%232461c8' stroke-width='2'/%3E%3Crect x='14' y='16' width='20' height='6' fill='%232f74e0'/%3E%3Cpath d='M14 27h20M14 32h20M14 37h14' stroke='%23999' stroke-width='2'/%3E%3C/svg%3E"); }

/* ===== Accesso ===== */
.os-login { position: fixed; inset: 0; z-index: 100; display: grid; grid-template-rows: 78px 1fr 92px; background: #5a7edc; color: #fff; transition: opacity 0.8s ease; }
.os-login.is-gone { opacity: 0; pointer-events: none; }
.os-login__top { background: #0b2a8a; border-bottom: 2px solid transparent; border-image: linear-gradient(90deg, transparent, #9bb8f5, transparent) 1; }
.os-login__mid { display: grid; grid-template-columns: 1fr 2px 1fr; align-items: center; background: radial-gradient(60% 80% at 22% 30%, #8aa8ec 0%, #5a7edc 55%, #4a6dcd 100%); }
.os-login__brand { justify-self: end; text-align: right; padding-right: clamp(1.5rem, 4vw, 3.5rem); }
.os-mark { width: 74px; height: 74px; filter: drop-shadow(2px 3px 2px rgba(0, 0, 40, 0.4)); }
.os-login__name { font-size: clamp(2.6rem, 5vw, 3.6rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1; text-shadow: 2px 2px 3px rgba(0, 0, 60, 0.4); }
.os-login__name b { font-size: 0.42em; vertical-align: top; color: #ff9a3c; margin-left: 0.15em; font-style: italic; }
.os-login__sub { font-size: 0.85rem; font-style: italic; color: #e3ebff; margin-top: 0.3rem; }
.os-login__hint { margin-top: 2.2rem; font-size: 1.05rem; color: #f2f6ff; transition: opacity 0.4s; }
.os-login__sep { height: 70%; background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.75), transparent); }
.os-login__users { padding-left: clamp(1.5rem, 4vw, 3.5rem); display: grid; gap: 0.6rem; justify-items: start; }
.os-user { display: flex; align-items: center; gap: 1rem; background: none; border: 0; padding: 0.6rem 1.4rem 0.6rem 0.6rem; border-radius: 10px; cursor: pointer; text-align: left; color: #fff; transition: background 0.25s; }
.os-user:hover, .os-user:focus-visible { background: linear-gradient(90deg, rgba(10, 40, 140, 0.55), transparent); outline: none; }
.os-user__pic { width: 58px; height: 58px; border-radius: 7px; border: 3px solid #fff; overflow: hidden; flex: none; box-shadow: 1px 2px 4px rgba(0, 0, 50, 0.4); transition: border-color 0.25s; }
.os-user__pic svg { display: block; width: 100%; height: 100%; }
.os-user:hover .os-user__pic { border-color: #ffc23c; }
.os-user__txt b { display: block; font-size: 1.3rem; font-weight: 400; }
.os-user__txt small { color: #ffe08a; font-size: 0.8rem; }
.os-user.is-off { opacity: 0.55; cursor: default; }
.os-user.is-off .os-user__txt small { color: #dfe6ff; }
.os-login__bot { background: #0b2a8a; border-top: 2px solid; border-image: linear-gradient(90deg, transparent, #ff9a3c 30%, #ff9a3c 70%, transparent) 1; display: flex; justify-content: space-between; align-items: center; padding: 0 clamp(1.2rem, 4vw, 3rem); gap: 1rem; font-size: 0.82rem; }
.os-login__bot p { text-align: right; color: #c9d6ff; line-height: 1.5; }
.os-off { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.os-off span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 6px; background: linear-gradient(180deg, #ff8a5c, #d4312b); border: 2px solid #fff; font-size: 0.9rem; }
.os-off:hover { text-decoration: underline; }
/* benvenuto */
.os-login.is-welcome .os-login__users, .os-login.is-welcome .os-login__sep { opacity: 0; transition: opacity 0.4s; }
.os-login.is-welcome .os-login__hint { font-size: 2.2rem; font-style: italic; font-weight: 700; text-shadow: 2px 2px 3px rgba(0, 0, 60, 0.4); }

/* ===== Desktop ===== */
.os-desk { position: fixed; inset: 0 0 var(--task) 0; overflow: hidden; }
.os-wall { position: absolute; inset: 0; background: url("../img/crisi/os/sfondo.webp") center / cover no-repeat, linear-gradient(180deg, #123a9c 0%, #3d78d8 55%, #f29a52 100%); transform: scale(1.04); transition: transform 2.4s var(--ease-out); }
.is-on .os-wall { transform: none; }
.os-icons { position: absolute; left: 10px; top: 12px; display: grid; gap: 6px; z-index: 1; }
.os-icons button, .os-icons a { width: 88px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 2px; background: none; border: 1px solid transparent; border-radius: 3px; cursor: pointer; text-decoration: none; color: #fff; }
.os-icons span:last-child { font-size: 12px; line-height: 1.25; text-align: center; text-shadow: 1px 1px 2px #000, 0 0 3px #000; padding: 0 3px; border-radius: 2px; }
.os-icons button:hover, .os-icons a:hover { background: rgba(120, 170, 255, 0.18); border-color: rgba(170, 205, 255, 0.4); }
.os-icons .is-sel span:last-child { background: var(--os-sel); text-shadow: none; }
.os-icons .is-sel .os-ic { filter: drop-shadow(1px 2px 1px rgba(0, 0, 0, 0.35)) brightness(0.8) sepia(0.4) hue-rotate(180deg); }

/* ===== Finestre ===== */
.os-win { position: absolute; display: flex; flex-direction: column; min-width: 280px; min-height: 140px; background: var(--os-face); border: 3px solid var(--os-frame); border-top: 0; border-radius: 9px 9px 3px 3px; box-shadow: 0 14px 34px rgba(0, 10, 50, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.35); z-index: 2; animation: winOpen 0.38s var(--ease-out); transition: transform 0.35s var(--ease-out), opacity 0.3s; }
@keyframes winOpen { from { opacity: 0; transform: scale(0.9) translateY(14px); } }
.os-win.is-closed { display: none; }
.os-win.is-min { opacity: 0; transform: translateY(60vh) scale(0.25); pointer-events: none; }
.os-win.is-max { left: 0 !important; top: 0 !important; width: 100% !important; height: 100% !important; border-radius: 0; }
.os-win__bar { flex: none; height: 30px; display: flex; align-items: center; gap: 6px; padding: 0 4px 0 7px; border-radius: 7px 7px 0 0; color: #fff; cursor: default; user-select: none; touch-action: none;
  background: linear-gradient(180deg, #4a95ff 0%, #2a6cf0 7%, #0f55dc 30%, #0b4bd2 70%, #0a44c2 92%, #0a3db0 100%); margin: 0 -3px; border: 1px solid #0a3db0; border-bottom: 0; }
.os-win__title { flex: 1; font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 1px 1px 0 #0b2a7a; }
.os-win__btns { display: flex; gap: 2px; }
.os-win__btns button { position: relative; width: 22px; height: 22px; border: 1px solid #fff; border-radius: 3px; cursor: pointer; background: linear-gradient(180deg, #5c9bff, #1f5fe0 60%, #2a6df0); box-shadow: inset 0 0 0 1px rgba(0, 40, 140, 0.4); }
.os-win__btns button:hover { filter: brightness(1.18); }
.os-win__btns button:active { filter: brightness(0.9); }
.os-win__btns [data-act="min"]::after { content: ""; position: absolute; left: 5px; bottom: 5px; width: 8px; height: 3px; background: #fff; }
.os-win__btns [data-act="max"]::after { content: ""; position: absolute; inset: 4px; border: 2px solid #fff; border-top-width: 3px; }
.os-win__btns [data-act="close"] { background: linear-gradient(180deg, #f39a7c, #e0502c 55%, #d6431f); }
.os-win__btns [data-act="close"]::before, .os-win__btns [data-act="close"]::after { content: ""; position: absolute; left: 9px; top: 3px; width: 2px; height: 14px; background: #fff; transform: rotate(45deg); }
.os-win__btns [data-act="close"]::after { transform: rotate(-45deg); }
.os-win:not(.is-active) { border-color: #7a96df; }
.os-win:not(.is-active) .os-win__bar { background: linear-gradient(180deg, #a5bff3 0%, #7d9be2 10%, #7392dc 90%, #6c8ad2 100%); border-color: #7a96df; }
.os-win:not(.is-active) .os-win__title { color: #e3eaff; text-shadow: none; }
.os-win:not(.is-active) .os-win__btns button { opacity: 0.75; }
.os-win.is-ping .os-win__bar { animation: ping 0.5s ease 3; }
@keyframes ping { 50% { filter: brightness(1.45) saturate(1.3); } }
.os-win__menu { flex: none; display: flex; gap: 0.2rem; padding: 2px 4px; font-size: 12px; border-bottom: 1px solid #d0cdbd; background: var(--os-face); }
.os-win__menu span { padding: 2px 6px; border-radius: 2px; cursor: default; }
.os-win__menu span:hover { background: var(--os-sel); color: #fff; }
.os-win__body { flex: 1; overflow: auto; background: #fbfaf5; border: 1px solid #a6a395; margin: 2px; overscroll-behavior: contain; }
.os-win__status { flex: none; display: flex; gap: 2px; font-size: 11px; color: #333; padding: 2px; }
.os-win__status span { flex: 1; padding: 2px 6px; border: 1px solid #c9c6b8; border-top-color: #a6a395; border-left-color: #a6a395; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.os-win__status span:first-child { flex: 2; }
.os-group { font-size: 11px; font-weight: 700; color: #215dc6; margin: 0.9rem 0 0.4rem; padding-bottom: 3px; border-bottom: 1px solid #c4d3ee; }

/* ===== Il gioco dentro la finestra ===== */
.os-win .cr-main { min-height: 0; padding: clamp(1rem, 2.4vw, 1.8rem) clamp(1rem, 2.6vw, 2.2rem) 2rem; font-size: 15px; }
.page-crisi-os .cr-step { animation: none; }
.page-crisi-os .cr-start { padding: 0.4rem 0; }
.page-crisi-os .cr-start__ring { font-family: var(--os-font); font-size: 12px; color: #c72a20; font-weight: 700; letter-spacing: 0.04em; }
.page-crisi-os .cr-start h2, .page-crisi-os .cr-q, .page-crisi-os .cr-end h2 { font-family: var(--os-font); font-weight: 700; letter-spacing: -0.01em; color: #0b3a9c; }
.page-crisi-os .cr-start h2 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); }
.page-crisi-os .cr-q { font-size: clamp(1.25rem, 2.2vw, 1.7rem); margin-bottom: 0.9rem; }
.page-crisi-os .cr-start p { color: #3a3a44; font-size: 15px; }
.page-crisi-os .cr-step__time { font-family: var(--os-font); font-size: 12px; font-weight: 700; color: #0b5ad8; letter-spacing: 0; }
.page-crisi-os .cr-step__time span { color: #777; font-weight: 400; }
/* il messaggio come una mail aperta */
.page-crisi-os .cr-msg { background: #fff; border: 1px solid #7f9db9; border-radius: 3px; padding: 0; margin-bottom: 1.4rem; box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.06); overflow: hidden; }
.page-crisi-os .cr-msg small { margin: 0; padding: 0.45rem 0.9rem; font-family: var(--os-font); font-size: 12px; letter-spacing: 0; text-transform: none; color: #fff; font-weight: 700; background: linear-gradient(180deg, #7fb0f5, #3c7ee6); border-bottom: 1px solid #2d66c4; }
.page-crisi-os .cr-msg small::before { content: "Da: "; font-weight: 400; opacity: 0.85; }
.page-crisi-os .cr-msg p { padding: 1rem 1.1rem 1.1rem; font-size: clamp(1rem, 1.4vw, 1.12rem); line-height: 1.55; color: #1b1b1b; }
.page-crisi-os #crMsgText.is-typing::after { background: #1b1b1b; width: 2px; }
/* opzioni: righe che si selezionano */
.page-crisi-os .cr-opts { gap: 6px; }
.page-crisi-os .cr-opt { grid-template-columns: 2rem 1fr; align-items: center; background: #fff; border: 1px solid #a9b8d0; border-radius: 3px; padding: 0.75rem 0.9rem; font-size: 14.5px; color: #1b1b1b; }
.page-crisi-os .cr-opt b { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-family: var(--os-font); font-weight: 700; font-size: 12px; color: #fff; background: radial-gradient(circle at 35% 30%, #9be38d, #2e9c3d 70%); border: 1px solid #1e6e2a; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6); }
.page-crisi-os .cr-opt::after { display: none; }
.page-crisi-os .cr-opt:hover:not(:disabled) { background: var(--os-sel); border-color: #1d4fa8; color: #fff; transform: none; }
.page-crisi-os .cr-step.is-ready .cr-opt.is-chosen { background: #dfe9fb; border-color: var(--os-sel); box-shadow: inset 0 0 0 1px var(--os-sel); color: #1b1b1b; }
.page-crisi-os .cr-step.is-ready .cr-opt.is-other { opacity: 0.4; }
/* pulsanti in rilievo */
.page-crisi-os .cr-btn { font-family: var(--os-font); font-size: 13px; font-weight: 400; color: #1b1b1b; padding: 0.5rem 1.2rem; border-radius: 3px; border: 1px solid #003c74; background: linear-gradient(180deg, #ffffff 0%, #f3f2ec 60%, #dcdacb 100%); box-shadow: inset -1px -1px 0 rgba(0, 0, 0, 0.08); text-decoration: none; }
.page-crisi-os .cr-btn:hover { transform: none; background: linear-gradient(180deg, #ffffff 0%, #f3f2ec 60%, #dcdacb 100%); box-shadow: inset 0 0 0 2px #f8b330, inset 0 -2px 0 2px #e59700; }
.page-crisi-os .cr-btn:not(.cr-btn--ghost) { font-weight: 700; box-shadow: inset 0 0 0 1px #5d8ee8; }
.page-crisi-os .cr-btn:not(.cr-btn--ghost):hover { box-shadow: inset 0 0 0 2px #f8b330, inset 0 -2px 0 2px #e59700; }
.page-crisi-os .cr-btn--ghost { background: linear-gradient(180deg, #ffffff 0%, #f3f2ec 60%, #dcdacb 100%); color: #1b1b1b; }
.page-crisi-os .cr-ico { width: 16px; height: 16px; }
.page-crisi-os .cr-start__hint { color: #666 !important; font-size: 12px !important; }
/* esito come una finestra di dialogo */
.page-crisi-os .cr-out { margin-top: 1rem; padding: 1rem 1.1rem; background: #fff; border: 1px solid #7f9db9; border-radius: 3px; }
.page-crisi-os .cr-out::before { display: none; }
.page-crisi-os .cr-out p { color: #2a2a30; font-size: 14.5px; margin-bottom: 1rem; }
.page-crisi-os .cr-out__note { font-family: var(--os-font); color: #666; font-size: 12px; }
.page-crisi-os .cr-badge { font-family: var(--os-font); font-size: 12px; font-weight: 700; letter-spacing: 0; text-transform: none; border-radius: 3px; padding: 0.3rem 0.6rem 0.3rem 0.4rem; }
.page-crisi-os .cr-badge::before { content: ""; width: 16px; height: 16px; border-radius: 50%; display: inline-block; color: #fff; }
.page-crisi-os .cr-badge.q2 { background: #e6f6e8; color: #1f7a2c; } .page-crisi-os .cr-badge.q2::before { background: radial-gradient(circle at 35% 30%, #9be38d, #2e9c3d 70%); }
.page-crisi-os .cr-badge.q1 { background: #fff4d6; color: #8a5a00; } .page-crisi-os .cr-badge.q1::before { background: radial-gradient(circle at 35% 30%, #ffe08a, #e0a100 70%); }
.page-crisi-os .cr-badge.q0 { background: #fde6e4; color: #a8221b; } .page-crisi-os .cr-badge.q0::before { background: radial-gradient(circle at 35% 30%, #ff9a8a, #d4312b 70%); }
.page-crisi-os .cr-out__titles li { background: #f4f6fb; color: #1b1b1b; border-radius: 2px; }
.page-crisi-os .cr-out__titles small { font-family: var(--os-font); color: #777; }

/* salto temporale: la finestra di copia */
.page-crisi-os .cr-skip { min-height: 46vh; align-items: center; text-align: center; position: relative; padding-top: 96px; }
.page-crisi-os .cr-skip::before { content: ""; position: absolute; top: 14px; left: 50%; width: 280px; height: 64px; transform: translateX(-50%);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath d='M4 12a3 3 0 0 1 3-3h11l4 4h19a3 3 0 0 1 3 3v22a3 3 0 0 1-3 3H7a3 3 0 0 1-3-3z' fill='%23d99a1c'/%3E%3Cpath d='M4 19h40v19a3 3 0 0 1-3 3H7a3 3 0 0 1-3-3z' fill='%23f6c94a'/%3E%3C/svg%3E") left center / 60px no-repeat,
              url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath d='M4 12a3 3 0 0 1 3-3h11l4 4h19a3 3 0 0 1 3 3v22a3 3 0 0 1-3 3H7a3 3 0 0 1-3-3z' fill='%23d99a1c'/%3E%3Cpath d='M4 19h40v19a3 3 0 0 1-3 3H7a3 3 0 0 1-3-3z' fill='%23f6c94a'/%3E%3C/svg%3E") right center / 60px no-repeat; }
.page-crisi-os .cr-skip::after { content: ""; position: absolute; top: 26px; left: calc(50% - 110px); width: 30px; height: 34px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath d='M10 4h20l8 8v32H10z' fill='%23fff' stroke='%232461c8' stroke-width='2'/%3E%3Cpath d='M14 18h20M14 24h20M14 30h20' stroke='%237aa7e8' stroke-width='2'/%3E%3C/svg%3E") center / contain no-repeat;
  animation: fly 0.9s ease-in-out infinite; }
@keyframes fly { 0% { transform: translate(0, 10px) rotate(-10deg); opacity: 0; } 15% { opacity: 1; } 50% { transform: translate(95px, -14px) rotate(0); } 85% { opacity: 1; } 100% { transform: translate(190px, 10px) rotate(10deg); opacity: 0; } }
.page-crisi-os .cr-skip__day { font-family: var(--os-font); font-size: 13px; letter-spacing: 0; text-transform: none; color: #333; }
.page-crisi-os .cr-skip__day::before { content: "Trascorrono le ore · "; color: #777; }
.page-crisi-os .cr-skip__time { font-family: var(--os-font); font-weight: 700; color: #0b3a9c; font-size: clamp(3.6rem, 9vw, 6.4rem); letter-spacing: -0.02em; }
.page-crisi-os .cr-skip small { font-family: var(--os-font); color: #666; font-size: 12px; }
.page-crisi-os .cr-skip__bar { width: min(320px, 80%); height: 18px; margin: 1.2rem auto 0; padding: 2px; background: #fff; border: 1px solid #7f9db9; border-radius: 3px; }
.page-crisi-os .cr-skip__bar em { border-radius: 1px; background: linear-gradient(180deg, #b9f0ae, #3cbf3c 50%, #2e9c3d); -webkit-mask-image: repeating-linear-gradient(90deg, #000 0 8px, transparent 8px 10px); mask-image: repeating-linear-gradient(90deg, #000 0 8px, transparent 8px 10px); }

/* cruscotto */
.os-win .cr-dash { position: static; background: none; border: 0; border-radius: 0; padding: 0.9rem 1rem 1.1rem; color: #1b1b1b; }
.page-crisi-os .cr-dash__clock { font-family: var(--os-font); font-size: 1.7rem; font-weight: 700; color: #0b3a9c; letter-spacing: 0; }
.page-crisi-os .cr-dash__clock small { font-family: var(--os-font); color: #666; font-size: 11px; }
.page-crisi-os .cr-audio { font-family: var(--os-font); border: 1px solid #003c74; border-radius: 3px; color: #1b1b1b; background: linear-gradient(180deg, #fff, #dcdacb); font-size: 11px; }
.page-crisi-os .cr-audio[aria-pressed="true"] { color: #0b5ad8; border-color: #003c74; box-shadow: inset 0 0 0 1px #5d8ee8; }
.page-crisi-os .cr-steps { margin: 0; gap: 3px; }
.page-crisi-os .cr-steps li { height: 16px; border-radius: 2px; background: #fff; border: 1px solid #a9b8d0; }
.page-crisi-os .cr-steps li.is-now { background: #fff3c4; border-color: #e0a100; animation: nowBlink 1.2s steps(2) infinite; }
@keyframes nowBlink { 50% { background: #fff; } }
.page-crisi-os .cr-steps li.q2 { background: linear-gradient(180deg, #b9f0ae, #2e9c3d); border-color: #1e6e2a; animation: none; }
.page-crisi-os .cr-steps li.q1 { background: linear-gradient(180deg, #ffe7a6, #e0a100); border-color: #8a5a00; animation: none; }
.page-crisi-os .cr-steps li.q0 { background: linear-gradient(180deg, #ffb0a6, #d4312b); border-color: #8a1a14; animation: none; }
.page-crisi-os .cr-meters { gap: 0.7rem; margin: 0; }
.page-crisi-os .cr-meter p { font-size: 12px; color: #333; margin-bottom: 3px; }
.page-crisi-os .cr-meter b { font-family: var(--os-font); font-weight: 700; color: #1b1b1b; }
.page-crisi-os .cr-meter i { height: 16px; padding: 2px; border-radius: 3px; background: #fff; border: 1px solid #7f9db9; }
.page-crisi-os .cr-meter em { border-radius: 1px; background: linear-gradient(180deg, #b9f0ae, #3cbf3c 50%, #2e9c3d); -webkit-mask-image: repeating-linear-gradient(90deg, #000 0 8px, transparent 8px 10px); mask-image: repeating-linear-gradient(90deg, #000 0 8px, transparent 8px 10px); }
.page-crisi-os .cr-meter[data-m="tono"] em { background: linear-gradient(180deg, #ffb0a6, #e8483d 50%, #c72a20); }
.page-crisi-os .cr-meter[data-m="rischio"] em { background: linear-gradient(180deg, #ffe7a6, #f0b429 50%, #d99a1c); }
.page-crisi-os .cr-delta { font-family: var(--os-font); }

/* rassegna stampa */
.os-win .cr-feed { border: 0; padding: 0; }
.os-win .cr-feed ul { max-height: none; gap: 0; }
.page-crisi-os .cr-feed li { border-radius: 0; background: #fff; border-left: 4px solid var(--t-neu); border-bottom: 1px solid #e3e1d6; padding: 0.55rem 0.8rem; font-size: 13px; color: #1b1b1b; }
.page-crisi-os .cr-feed li:nth-child(even) { background: #f4f6fb; }
.page-crisi-os .cr-feed li small { font-family: var(--os-font); color: #777; font-size: 11px; }
.page-crisi-os .cr-feed .cr-feed__empty { color: #777; padding: 0.9rem; font-size: 12px; }

/* report */
.page-crisi-os .cr-end__score { font-family: var(--os-font); color: #0b5ad8; font-weight: 700; letter-spacing: 0; font-size: 13px; }
.page-crisi-os .cr-end__lead { color: #2a2a30; }
.page-crisi-os .cr-chart, .page-crisi-os .cr-review li { background: #fff; border: 1px solid #a9b8d0; border-radius: 3px; color: #1b1b1b; }
.page-crisi-os .cr-chart .ax { stroke: #ddd; }
.page-crisi-os .cr-chart .ax-t { font-family: var(--os-font); fill: #777; }
.page-crisi-os .cr-chart .pt { fill: #fff; }
.page-crisi-os .cr-review li header { font-family: var(--os-font); color: #777; }
.page-crisi-os .cr-review li p { color: #2a2a30; }

/* kit */
.os-split { display: grid; grid-template-columns: 220px 1fr; min-height: 0; }
.os-split .cr-kit__tabs { position: static; gap: 0; align-content: start; background: linear-gradient(180deg, #7ba2e7, #6489d8); padding: 10px; border-right: 1px solid #a6a395; }
.page-crisi-os .cr-tab { display: grid; grid-template-columns: 18px 1fr; column-gap: 8px; background: none; border: 1px solid transparent; border-radius: 2px; color: #fff; padding: 6px; transform: none !important; }
.page-crisi-os .cr-tab::before { content: ""; grid-row: span 2; width: 18px; height: 20px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath d='M10 4h20l8 8v32H10z' fill='%23fff' stroke='%232461c8' stroke-width='2'/%3E%3Crect x='14' y='16' width='20' height='6' fill='%232f74e0'/%3E%3Cpath d='M14 27h20M14 32h20' stroke='%23999' stroke-width='2'/%3E%3C/svg%3E") center / contain no-repeat; }
.page-crisi-os .cr-tab b { font-size: 12px; font-weight: 700; }
.page-crisi-os .cr-tab small { color: #dfe8ff; font-size: 11px; }
.page-crisi-os .cr-tab:hover { border-color: rgba(255, 255, 255, 0.6); text-decoration: underline; }
.page-crisi-os .cr-tab[aria-selected="true"] { background: var(--os-sel); border-color: #fff; color: #fff; }
.page-crisi-os .cr-tab[aria-selected="true"] small { color: #fff; }
.os-split .cr-doc { border-radius: 0; box-shadow: none; padding: 1.4rem 1.6rem; min-height: 0; background: #fff; }
.page-crisi-os .cr-doc__use { font-family: var(--os-font); color: #0b5ad8; font-size: 11px; }
.page-crisi-os .cr-doc h3 { font-size: 1.3rem; color: #0b3a9c; }
.page-crisi-os .cr-doc__copy { border: 1px solid #003c74; border-radius: 3px; background: linear-gradient(180deg, #fff, #dcdacb); font-size: 12px; padding: 0.35rem 0.8rem; }
.page-crisi-os .cr-doc__body { font-size: 14px; color: #222; }

/* blocco note */
.os-note { background: #fff; padding: 1rem 1.2rem 1.6rem; font-family: var(--cr-mono); font-size: 13px; line-height: 1.6; color: #111; }
.os-note h2, .os-note h3 { font-size: 13px; font-weight: 700; margin: 1.2rem 0 0.5rem; }
.os-note h2 { margin-top: 0; }
.os-note h2::before, .os-note h3::before { content: "== "; } .os-note h2::after, .os-note h3::after { content: " =="; }
.os-note p { margin-bottom: 0.6rem; }
.os-note a { color: #0b5ad8; }
.os-note .cr-lessons li { grid-template-columns: 5.5rem 1fr; gap: 0.8rem; padding: 0.6rem 0; border-color: #ddd; }
.os-note .cr-lessons b { font-size: 1.3rem; color: #0b5ad8; font-family: var(--cr-mono); }
.os-note h4 { font-size: 13px; }
.os-note .cr-lessons p { color: #333; line-height: 1.5; margin: 0; }
.os-note .cr-law__line::before { background: #ccc; }
.os-note .cr-law__item::before { background: #fff; box-shadow: inset 0 0 0 3px #0b5ad8; }
.os-note .cr-law__item b { color: #0b5ad8; font-family: var(--cr-mono); }
.os-small { font-size: 12px; color: #666; }

/* cestino */
.os-bin { padding: 0.9rem; background: #fff; }
.os-bin ul { margin-top: 0.6rem; }
.os-bin li { display: flex; gap: 0.7rem; padding: 0.55rem 0.4rem; border-bottom: 1px solid #eee; }
.os-bin li .os-ic { width: 26px; height: 26px; }
.os-bin b { font-size: 13px; display: block; }
.os-bin small { font-size: 12px; color: #555; line-height: 1.4; }

/* notifica in basso a destra */
.os-balloon { position: absolute; right: 12px; bottom: 14px; z-index: 90; width: min(320px, calc(100vw - 24px)); background: #ffffe1; color: #111; border: 1px solid #555; border-radius: 9px; padding: 0.7rem 2rem 0.75rem 0.85rem; font-size: 12px; line-height: 1.4; box-shadow: 3px 4px 10px rgba(0, 0, 0, 0.35); opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity 0.3s, transform 0.4s var(--ease-out); }
.os-balloon::after { content: ""; position: absolute; right: 54px; bottom: -11px; width: 18px; height: 11px; background: #ffffe1; clip-path: polygon(0 0, 100% 0, 100% 100%); border-right: 1px solid #555; }
.os-balloon.is-on { opacity: 1; transform: none; pointer-events: auto; }
.os-balloon b { display: flex; align-items: center; gap: 6px; margin-bottom: 3px; }
.os-balloon b::before { content: ""; width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #9fd0ff, #1a6fd6 70%); }
.os-balloon.is-neg b::before { background: radial-gradient(circle at 35% 30%, #ff9a8a, #d4312b 70%); }
.os-balloon.is-pos b::before { background: radial-gradient(circle at 35% 30%, #9be38d, #2e9c3d 70%); }
.os-balloon button { position: absolute; right: 6px; top: 5px; width: 18px; height: 18px; border: 1px solid #999; border-radius: 3px; background: #fff; font-size: 12px; line-height: 1; cursor: pointer; }

/* ===== Barra delle applicazioni ===== */
.os-task { position: fixed; left: 0; right: 0; bottom: 0; height: var(--task); z-index: 80; display: flex; align-items: stretch; background: linear-gradient(180deg, #3f8cf3 0%, #2a6ee6 6%, #225fd9 18%, #1f57d0 82%, #1a49b5 100%); border-top: 1px solid #0d36a0; }
.os-start { display: flex; align-items: center; gap: 6px; padding: 0 22px 0 12px; border: 0; cursor: pointer; color: #fff; font-size: 18px; font-weight: 700; font-style: italic; text-shadow: 1px 1px 1px #1a4a10; border-radius: 0 12px 12px 0;
  background: linear-gradient(180deg, #6fd06a 0%, #3cae3c 12%, #2e9c2e 50%, #2a8f2a 88%, #3aa83a 100%); box-shadow: inset -2px 0 3px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.5); }
.os-start svg { width: 22px; height: 22px; filter: drop-shadow(1px 1px 0 rgba(0, 0, 0, 0.3)); }
.os-start:hover, .os-start[aria-expanded="true"] { filter: brightness(1.12); }
.os-task__apps { flex: 1; display: flex; gap: 3px; padding: 4px 8px; overflow-x: auto; scrollbar-width: none; }
.os-app { display: flex; align-items: center; gap: 6px; width: 170px; flex: none; padding: 0 9px; border: 1px solid #1b4bb8; border-radius: 3px; background: linear-gradient(180deg, #5aa0f8, #3c80ee 45%, #3577e6); color: #fff; font-size: 12px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35); }
.os-app .os-ic { width: 16px; height: 16px; filter: none; }
.os-app span:last-child { overflow: hidden; text-overflow: ellipsis; }
.os-app:hover { filter: brightness(1.1); }
.os-app.is-active { background: linear-gradient(180deg, #1c4fb8, #1e55c4); box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.45); }
.os-app.is-ping { animation: appPing 0.7s ease 4; }
@keyframes appPing { 50% { background: linear-gradient(180deg, #ffb35a, #f08a1c); } }
.os-tray { display: flex; align-items: center; gap: 10px; padding: 0 14px; background: linear-gradient(180deg, #1ea0f0, #1290e2 10%, #0f85d8 90%, #0e78c6); border-left: 1px solid #0b5ea6; box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.3); color: #fff; font-size: 12px; }
.os-tray__audio { width: 22px; height: 22px; border: 0; background: none; cursor: pointer; color: #fff; display: grid; place-items: center; }
.os-tray__audio svg { width: 16px; height: 16px; }
.os-tray__clock { white-space: nowrap; font-variant-numeric: tabular-nums; }

/* menu Start */
.os-menu { position: fixed; left: 0; bottom: var(--task); z-index: 85; width: min(440px, 100vw); border: 1px solid #0d36a0; border-radius: 8px 8px 0 0; overflow: hidden; box-shadow: 4px -2px 14px rgba(0, 0, 0, 0.45); animation: menuIn 0.22s var(--ease-out); }
@keyframes menuIn { from { opacity: 0; transform: translateY(12px); } }
.os-menu header { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: linear-gradient(180deg, #1868e0, #2a74e8 40%, #1a5bd0); color: #fff; font-size: 15px; text-shadow: 1px 1px 1px #0b2a7a; }
.os-menu header .os-user__pic { width: 44px; height: 44px; border-width: 2px; }
.os-menu__cols { display: grid; grid-template-columns: 1.15fr 1fr; border-top: 2px solid #f39a3c; }
.os-menu__left { background: #fff; padding: 6px; }
.os-menu__left button { width: 100%; display: flex; align-items: center; gap: 8px; text-align: left; background: none; border: 0; padding: 5px 6px; border-radius: 2px; cursor: pointer; }
.os-menu__left .os-ic { width: 30px; height: 30px; }
.os-menu__left b { display: block; font-size: 12px; }
.os-menu__left small { font-size: 11px; color: #777; }
.os-menu__left button:hover { background: var(--os-sel); color: #fff; }
.os-menu__left button:hover small { color: #dfe8ff; }
.os-menu__right { background: #d3e5fa; border-left: 1px solid #95bdee; padding: 8px 6px; }
.os-menu__right a { display: block; font-size: 12px; font-weight: 700; color: #0a246a; text-decoration: none; padding: 6px 8px; border-radius: 2px; }
.os-menu__right a:hover { background: var(--os-sel); color: #fff; }
.os-menu__right .sep { height: 1px; margin: 5px 6px; background: linear-gradient(90deg, transparent, #95bdee, transparent); }
.os-menu footer { display: flex; justify-content: flex-end; gap: 10px; padding: 7px 10px; background: linear-gradient(180deg, #1868e0, #1a5bd0); }
.os-menu footer button { background: none; border: 0; color: #fff; font-size: 12px; cursor: pointer; padding: 4px 8px; border-radius: 3px; }
.os-menu footer button:hover { background: rgba(255, 255, 255, 0.18); }

.page-crisi-os .toast { position: fixed; left: 50%; bottom: 3.4rem; z-index: 95; background: #ffffe1; color: #111; border: 1px solid #555; border-radius: 4px; padding: 0.6rem 1rem; font-size: 12px; opacity: 0; transform: translate(-50%, 200%); transition: transform 0.5s var(--ease-out), opacity 0.3s; }
.page-crisi-os .toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ===== Telefono: le finestre diventano schede una sotto l'altra ===== */
@media (max-width: 900px) {
  body.page-crisi-os { overflow: auto; background: #123a9c; }
  .os-login { grid-template-rows: 60px 1fr auto; }
  .os-login__mid { grid-template-columns: 1fr; grid-template-rows: auto auto auto; align-content: center; gap: 1.6rem; }
  .os-login__brand { justify-self: center; text-align: center; padding: 0 1rem; }
  .os-login__sep { height: 2px; width: 70%; justify-self: center; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.75), transparent); }
  .os-login__users { justify-items: center; padding: 0 1rem; }
  .os-login__hint { margin-top: 1.2rem; }
  .os-login__bot { flex-direction: column; padding: 1rem; text-align: center; }
  .os-login__bot p { text-align: center; }
  .os-desk { position: relative; inset: auto; overflow: visible; padding: 0.6rem 0.6rem calc(var(--task) + 1.2rem); display: flex; flex-direction: column; gap: 0.8rem; min-height: 100vh; }
  .os-wall { position: fixed; }
  .os-icons { position: relative; left: auto; top: auto; grid-template-columns: repeat(4, 1fr); gap: 2px; }
  .os-icons button, .os-icons a { width: auto; }
  .os-icons .os-ic { width: 36px; height: 36px; }
  .os-icons span:last-child { font-size: 11px; }
  .os-win { position: relative; left: auto !important; top: auto !important; width: auto !important; height: auto !important; min-width: 0; }
  .os-win.is-min { display: none; }
  .os-win.is-max { position: relative; }
  .os-win__btns [data-act="min"], .os-win__btns [data-act="max"] { display: none; }
  .os-win__menu { display: none; }
  #winMain .os-win__body { min-height: 60vh; }
  #winFeed .os-win__body { max-height: 320px; }
  .os-win .cr-feed { display: block; }
  .os-split { grid-template-columns: 1fr; }
  .os-split .cr-kit__tabs { border-right: 0; border-bottom: 1px solid #a6a395; }
  .os-balloon { position: fixed; bottom: calc(var(--task) + 12px); }
  .os-task { position: fixed; }
  .os-app { width: auto; max-width: 140px; }
  .os-app span:last-child { display: none; }
  .os-tray__clock { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .os-win { animation: none; transition: none; }
  .page-crisi-os .cr-skip::after { animation: none; }
}

/* trascinamento: l'icona e la finestra si "sollevano" */
.os-icons li { position: relative; touch-action: none; }
.os-icons li.is-drag { z-index: 6; }
.os-icons li.is-drag .os-ic { transform: scale(1.12) translateY(-3px); filter: drop-shadow(3px 8px 4px rgba(0, 0, 0, 0.45)); }
.os-icons .os-ic { transition: transform 0.2s var(--ease-out), filter 0.2s; }
.os-icons li:not(.is-drag) { transition: transform 0.18s var(--ease-out); }
.os-win.is-drag { box-shadow: 0 26px 60px rgba(0, 10, 50, 0.55), inset 0 0 0 1px rgba(255, 255, 255, 0.35); }

/* avviso su telefono: meglio da computer */
.os-mobile-tip { display: none; }
@media (max-width: 900px), (hover: none) and (pointer: coarse) {
  .os-mobile-tip { display: flex; gap: 0.7rem; align-items: flex-start; text-align: left; margin: 1.4rem auto 0; max-width: 340px; padding: 0.8rem 0.9rem; background: #ffffe1; color: #1b1b1b; border: 1px solid #555; border-radius: 8px; font-size: 0.82rem; line-height: 1.45; box-shadow: 2px 3px 8px rgba(0, 0, 40, 0.35); }
  .os-mobile-tip > span:first-child { font-size: 1.4rem; line-height: 1; }
  .os-mobile-tip b { display: block; font-size: 0.9rem; margin-bottom: 0.15rem; }
  .os-login.is-welcome .os-mobile-tip { display: none; }
}

/* ===== Schermi bassi e zoom: la schermata d'accesso si può scorrere ===== */
.os-login { overflow-y: auto; overscroll-behavior: contain; grid-template-rows: 78px minmax(max-content, 1fr) 92px; }
@media (max-width: 900px) { .os-login { grid-template-rows: 60px minmax(max-content, 1fr) auto; } }
/* pulsantini: area toccabile di almeno 24×24 px, aspetto invariato */
.os-win__btns button::after, .os-tray__audio::after { content: ""; position: absolute; inset: -1px; }
.os-balloon button::after { content: ""; position: absolute; inset: -3px; }
.os-tray__audio { position: relative; }
