:root {
  --ink: #172a35;
  --muted: #667884;
  --blue: #21759b;
  --blue-dark: #155873;
  --blue-pale: #eaf5f9;
  --coral: #ec765e;
  --cream: #f7f5ef;
  --white: #fff;
  --line: #dce5e8;
  --shadow: 0 20px 60px rgba(23, 42, 53, .09);
  --radius: 22px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--cream); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; line-height: 1.55; }
button, input, textarea, select { font: inherit; }
a { color: var(--blue-dark); }
.site-header { max-width: 1180px; margin: 0 auto; padding: 28px 24px 10px; }
.brand { display: inline-flex; }
.brand img { width: min(276px, 70vw); height: auto; object-fit: contain; }
main { max-width: 1180px; margin: 0 auto; padding: 30px 24px 90px; }
.hero { position: relative; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(250px, .6fr); gap: 60px; align-items: center; min-height: 420px; padding: 56px 60px; overflow: hidden; color: white; background: var(--ink); border-radius: 32px; box-shadow: var(--shadow); }
.hero::after { content: ""; position: absolute; width: 430px; height: 430px; right: -190px; bottom: -260px; border: 70px solid rgba(255,255,255,.07); border-radius: 50%; }
.eyebrow { margin: 0 0 12px; color: var(--coral); font-size: .78rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.hero h1, .thank-you h1, .empty-state h1 { max-width: 780px; margin: 0; font-size: clamp(2.4rem, 6vw, 5.25rem); line-height: .98; letter-spacing: -.055em; }
.hero-copy { max-width: 640px; margin: 28px 0; color: #dce8ec; font-size: clamp(1.05rem, 2vw, 1.3rem); }
.meta-row { display: flex; flex-wrap: wrap; gap: 14px; }
.meta-row span { padding: 8px 13px; color: #dce8ec; border: 1px solid rgba(255,255,255,.18); border-radius: 99px; font-size: .88rem; }
.hero-orbit { position: relative; aspect-ratio: 1; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.22); border-radius: 50%; }
.hero-orbit::before, .hero-orbit::after { content: ""; position: absolute; border: 1px solid rgba(255,255,255,.13); border-radius: 50%; }
.hero-orbit::before { inset: 19%; } .hero-orbit::after { inset: 38%; background: var(--coral); border: 0; }
.hero-orbit span { position: absolute; z-index: 1; padding: 5px 10px; color: white; background: var(--ink); font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.hero-orbit span:nth-child(1) { top: 14%; right: -4%; } .hero-orbit span:nth-child(2) { bottom: 20%; left: -12%; } .hero-orbit span:nth-child(3) { top: 46%; right: 10%; }
.notice { display: grid; grid-template-columns: 1fr auto; gap: 4px 24px; align-items: center; margin: 26px 0; padding: 20px 24px; background: #fff5d8; border-left: 4px solid #d49b19; border-radius: 12px; }
.notice span { color: #6c5d35; }
.notice .text-button { grid-column: 2; grid-row: 1 / 3; }
.text-button { padding: 10px 14px; color: var(--blue-dark); background: transparent; border: 1px solid currentColor; border-radius: 9px; cursor: pointer; font-weight: 700; }
.survey-form { max-width: 960px; margin: 42px auto 0; transition: opacity .2s; }
.survey-form.is-paused { display: none; }
.question-card { min-width: 0; margin: 0 0 22px; padding: 34px; background: var(--white); border: 1px solid transparent; border-radius: var(--radius); box-shadow: 0 8px 35px rgba(23,42,53,.055); }
.question-card.has-error { border-color: var(--coral); }
.question-card legend { width: 100%; float: left; margin: 0 0 5px; padding: 0; font-size: clamp(1.3rem, 3vw, 1.75rem); font-weight: 780; line-height: 1.25; letter-spacing: -.02em; }
.question-card legend + * { clear: both; }
.question-number { display: block; margin-bottom: 10px; color: var(--blue); font-size: .72rem; font-weight: 800; letter-spacing: .12em; }
.question-help { margin: 6px 0 24px; color: var(--muted); }
.field-error, .form-error { padding: 10px 13px; color: #8c3023; background: #fff0ed; border-radius: 8px; font-weight: 700; }
.form-error { margin-bottom: 20px; }
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; margin-top: 22px; }
.choice-card, .scale-choice { position: relative; cursor: pointer; }
.choice-card input, .scale-choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice-card span { display: flex; align-items: center; min-height: 58px; padding: 13px 16px 13px 48px; color: #42545e; background: #f7f9f9; border: 1px solid var(--line); border-radius: 12px; transition: .15s ease; }
.choice-card span::before { content: ""; position: absolute; left: 17px; width: 19px; height: 19px; border: 2px solid #a9b7bd; border-radius: 5px; }
.choice-card input[type="radio"] + span::before { border-radius: 50%; }
.choice-card input:checked + span { color: var(--blue-dark); background: var(--blue-pale); border-color: var(--blue); font-weight: 700; }
.choice-card input:checked + span::before { background: var(--blue); border-color: var(--blue); box-shadow: inset 0 0 0 4px var(--blue-pale); }
.choice-card input:focus-visible + span, .scale-choice input:focus-visible + span { outline: 3px solid rgba(33,117,155,.25); outline-offset: 2px; }
.matrix { margin-top: 24px; }
.matrix-row { display: grid; grid-template-columns: minmax(180px, 1fr) 2fr; gap: 22px; align-items: center; padding: 18px 0; border-top: 1px solid var(--line); }
.matrix-label { font-weight: 700; }
.scale { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.scale-choice span { display: grid; place-items: center; min-height: 46px; padding: 8px 4px; color: var(--muted); background: #f7f9f9; border: 1px solid var(--line); border-radius: 9px; font-size: .78rem; text-align: center; transition: .15s; }
.scale-choice input:checked + span { color: white; background: var(--blue); border-color: var(--blue); font-weight: 700; }
textarea, input[type="password"], select { width: 100%; padding: 14px 16px; color: var(--ink); background: white; border: 1px solid #bac8cd; border-radius: 10px; }
textarea { margin-top: 22px; resize: vertical; }
textarea:focus, input:focus, select:focus { outline: 3px solid rgba(33,117,155,.18); border-color: var(--blue); }
.personal-data-warning { margin: 8px 0 0; color: var(--muted); font-size: .84rem; }
.privacy-box { margin: 30px 0; padding: 28px 32px; color: #40545e; background: var(--blue-pale); border-radius: 16px; }
.privacy-box h2 { margin: 0 0 8px; color: var(--ink); font-size: 1.1rem; }
.privacy-box p { margin: 7px 0; }
.submit-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.submit-row > span { color: var(--muted); font-size: .87rem; }
.primary-button { display: inline-flex; justify-content: center; align-items: center; gap: 22px; min-height: 52px; padding: 13px 23px; color: white; background: var(--blue); border: 0; border-radius: 10px; cursor: pointer; font-weight: 800; text-decoration: none; transition: .16s; }
.primary-button:hover { background: var(--blue-dark); transform: translateY(-1px); }
.primary-button:disabled { opacity: .6; cursor: wait; }
.thank-you, .empty-state { max-width: 820px; margin: 70px auto; padding: 60px; text-align: center; background: white; border-radius: 30px; box-shadow: var(--shadow); }
.thank-you h1, .empty-state h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); margin-inline: auto; }
.thank-you > p:not(.eyebrow), .empty-state > p:not(.eyebrow) { max-width: 600px; margin: 24px auto; color: var(--muted); font-size: 1.1rem; }
.success-mark { display: grid; place-items: center; width: 72px; height: 72px; margin: 0 auto 24px; color: white; background: var(--blue); border-radius: 50%; font-size: 2rem; }
.privacy-note { padding-top: 22px; border-top: 1px solid var(--line); font-size: .9rem !important; }
.honeypot { position: absolute; left: -10000px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
footer { padding: 25px; color: var(--muted); background: #edf0ef; text-align: center; font-size: .83rem; }

/* Area riservata */
.admin-body { background: #eef2f3; }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(470px, 100%); padding: 42px; background: white; border-radius: 24px; box-shadow: var(--shadow); }
.login-card img { width: 230px; height: auto; margin-bottom: 38px; }
.login-card h1 { margin: 0 0 30px; font-size: 2.1rem; line-height: 1.05; letter-spacing: -.04em; }
.login-card label { display: block; margin-bottom: 7px; font-weight: 700; }
.login-card .primary-button { width: 100%; margin-top: 16px; }
.admin-header { display: flex; justify-content: space-between; align-items: center; padding: 18px 4vw; background: white; border-bottom: 1px solid var(--line); }
.admin-header img { width: 210px; height: auto; }
.admin-header nav { display: flex; gap: 22px; }
.admin-header a { font-weight: 700; text-decoration: none; }
.dashboard { max-width: 1380px; padding-top: 48px; }
.dashboard-title { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 34px; }
.dashboard-title h1 { margin: 0; font-size: clamp(2rem, 4vw, 3.6rem); letter-spacing: -.05em; }
.dashboard-title form { min-width: 280px; }
.dashboard-title label { display: block; margin-bottom: 6px; color: var(--muted); font-size: .78rem; font-weight: 700; text-transform: uppercase; }
.kpi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 24px; }
.kpi-card { display: flex; flex-direction: column; min-height: 180px; padding: 26px; background: white; border-radius: 18px; box-shadow: 0 8px 30px rgba(23,42,53,.04); }
.kpi-card > span { color: var(--muted); font-size: .8rem; font-weight: 750; text-transform: uppercase; letter-spacing: .08em; }
.kpi-card strong { margin: auto 0 0; color: var(--blue); font-size: 3.8rem; line-height: 1; }
.kpi-card .status-word { color: #2b8063; font-size: 2.3rem; }
.kpi-card small { margin-top: 10px; color: var(--muted); }
.action-card .primary-button { margin: auto 0 0; align-self: flex-start; }
.button-pair { display: flex; flex-wrap: wrap; gap: 9px; margin-top: auto; }
.secondary-button { padding: 12px 16px; color: var(--blue-dark); background: white; border: 1px solid var(--blue); border-radius: 10px; cursor: pointer; font-weight: 750; }
.stats-stack { display: grid; gap: 24px; }
.stat-card { padding: 30px; background: white; border-radius: 18px; box-shadow: 0 8px 30px rgba(23,42,53,.04); }
.stat-card h2 { margin: 0 0 24px; font-size: 1.6rem; }
.stat-card h3 { margin: 30px 0 12px; padding-top: 20px; border-top: 1px solid var(--line); }
.bars { display: grid; gap: 15px; }
.bar-label { display: flex; justify-content: space-between; gap: 15px; margin-bottom: 5px; }
.bar-label strong { white-space: nowrap; }
.bar-label small { color: var(--muted); font-weight: 500; }
.bar-track { display: block; width: 100%; height: 9px; overflow: hidden; appearance: none; background: #edf1f2; border: 0; border-radius: 99px; }
.bar-track::-webkit-progress-bar { background: #edf1f2; border-radius: 99px; }
.bar-track::-webkit-progress-value { background: linear-gradient(90deg, var(--blue), #45a1bc); border-radius: 99px; }
.bar-track::-moz-progress-bar { background: linear-gradient(90deg, var(--blue), #45a1bc); border-radius: 99px; }
.stat-heading { display: flex; justify-content: space-between; align-items: start; gap: 20px; }
.stat-heading > span { color: var(--muted); font-size: .85rem; }
.comments-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.comments-list article { padding: 20px; background: #f6f8f8; border-radius: 12px; }
.comments-list p { margin: 0 0 14px; }
.comments-list small { color: var(--muted); }

@media (max-width: 760px) {
  .site-header { padding-top: 20px; }
  main { padding: 18px 14px 65px; }
  .hero { grid-template-columns: 1fr; min-height: 0; padding: 42px 25px; border-radius: 22px; }
  .hero-orbit { display: none; }
  .hero h1 { font-size: clamp(2.45rem, 12vw, 4rem); }
  .notice { grid-template-columns: 1fr; }
  .notice .text-button { grid-column: auto; grid-row: auto; margin-top: 10px; }
  .question-card { padding: 25px 18px; border-radius: 16px; }
  .choice-grid { grid-template-columns: 1fr; }
  .matrix-row { grid-template-columns: 1fr; gap: 10px; padding: 22px 0; }
  .scale { gap: 4px; }
  .scale-choice span { min-height: 52px; padding: 6px 2px; font-size: .68rem; }
  .privacy-box { padding: 22px; }
  .submit-row { flex-direction: column; align-items: stretch; }
  .submit-row > span { text-align: center; }
  .thank-you, .empty-state { margin: 25px auto; padding: 42px 22px; }
  .admin-header { align-items: flex-start; }
  .admin-header img { width: 150px; }
  .dashboard-title { align-items: stretch; flex-direction: column; }
  .dashboard-title form { min-width: 0; width: 100%; }
  .kpi-grid { grid-template-columns: 1fr; }
  .stat-card { padding: 23px 18px; }
  .comments-list { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
@media print {
  .admin-header, .dashboard-title form, .action-card { display: none !important; }
  body, .admin-body { background: white; }
  .dashboard { max-width: none; padding: 0; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-card, .kpi-card { break-inside: avoid; box-shadow: none; border: 1px solid #ccd6da; }
  .bar-track { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}
