:root {
  --ink: #17211b;
  --muted: #647069;
  --surface: #fffef9;
  --paper: #f6f4ec;
  --soft: #eef1ea;
  --line: #dcded5;
  --primary: #0d6b45;
  --primary-dark: #084c32;
  --accent: #ef7d3c;
  --accent-soft: #fff0e5;
  --danger: #a63d33;
  --warning-bg: #fff7d8;
  --warning-line: #e6cc69;
  --radius: 16px;
  --shadow: 0 24px 70px rgba(32, 43, 35, .09);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Avenir Next", Avenir, "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, var(--primary) 0 72%, var(--accent) 72%);
  z-index: 20;
}
a { color: var(--primary-dark); text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.site-header { padding: 28px 20px 8px; }
.header-inner, .container { width: min(1060px, calc(100% - 36px)); margin: 0 auto; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); font-weight: 750; letter-spacing: -.01em; text-decoration: none; }
.brand-mark { width: 39px; height: 39px; border: 1px solid var(--ink); display: grid; place-items: center; color: var(--surface); background: var(--ink); font-size: .76rem; letter-spacing: .04em; }

.hero { padding: 62px 0 40px; display: grid; grid-template-columns: minmax(0, 1.38fr) minmax(260px, .62fr); gap: 68px; align-items: end; }
.hero-copy { position: relative; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--primary-dark); font-size: .76rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--accent); }
h1 { max-width: 780px; margin: 20px 0 22px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.8rem, 6.7vw, 5.9rem); font-weight: 500; line-height: .94; letter-spacing: -.055em; }
h1 em { color: var(--primary); font-weight: 500; }
.hero-lead, .hero > div > p { max-width: 720px; margin: 0; color: var(--muted); font-size: 1.14rem; line-height: 1.7; }
.hero-card { border-top: 5px solid var(--accent); background: var(--ink); color: #fff; padding: 27px; box-shadow: 18px 18px 0 #dfe3d9; }
.hero-card-kicker { color: #b9c6bc; font-size: .72rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.hero-stat { display: flex; align-items: baseline; gap: 12px; margin: 13px 0 20px; }
.hero-stat strong { font-family: Georgia, serif; color: #fff; font-size: 4rem; font-weight: 500; line-height: 1; }
.hero-stat span { max-width: 80px; color: #d5ddd7; font-size: .84rem; line-height: 1.2; }
.hero-facts { display: grid; grid-template-columns: 1fr 1fr; border-block: 1px solid #445049; }
.hero-facts div { padding: 14px 8px 14px 0; }
.hero-facts div + div { padding-left: 18px; border-left: 1px solid #445049; }
.hero-facts strong, .hero-facts span { display: block; }
.hero-facts strong { font-size: 1.25rem; }
.hero-facts span { color: #b9c6bc; font-size: .78rem; }
.hero-card p { margin: 20px 0 0; color: #d5ddd7; font-size: .9rem; }

.notice { margin: 22px 0 0; padding: 15px 17px; border-left: 4px solid var(--warning-line); background: var(--warning-bg); color: #625820; font-size: .91rem; }
.notice strong { display: block; color: #433b15; }
.survey-shell { margin: 32px auto 70px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.progress-wrap { padding: 22px 30px 17px; border-bottom: 1px solid var(--line); background: #faf9f4; }
.progress-meta { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 11px; color: var(--muted); font-size: .82rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.progress-track { height: 5px; overflow: hidden; background: #e0e3db; }
.progress-bar { width: 16.66%; height: 100%; background: var(--primary); transition: width .25s ease; }
form { padding: 8px 30px 30px; }
.step { display: none; animation: enter .22s ease; }
.step.active { display: block; }
@keyframes enter { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.step-header { padding: 30px 0 14px; }
.step-header h2 { margin: 0 0 5px; font-family: Georgia, serif; font-size: clamp(1.75rem, 3vw, 2.4rem); font-weight: 500; letter-spacing: -.025em; }
.step-header p { margin: 0; color: var(--muted); }
.question { padding: 23px 0; border-top: 1px solid var(--line); }
.question:first-of-type { border-top: 0; }
.question-label { display: block; margin-bottom: 9px; font-weight: 750; }
.question-help { margin: -3px 0 13px; color: var(--muted); font-size: .9rem; }
.required::after { content: " *"; color: var(--danger); }
select, textarea, input[type="text"], input[type="email"], input[type="password"], input[type="number"] { width: 100%; min-height: 48px; border: 1px solid #b8beb6; border-radius: 9px; padding: 12px 14px; background: #fff; color: var(--ink); }
select:focus, textarea:focus, input:focus { outline: 3px solid rgba(13, 107, 69, .14); border-color: var(--primary); }
textarea { min-height: 130px; resize: vertical; }
.option-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.option-card { display: flex; align-items: flex-start; gap: 11px; min-height: 52px; border: 1px solid var(--line); border-radius: 9px; padding: 13px; background: #fff; transition: border-color .15s ease, background .15s ease; }
.option-card:hover { border-color: #8a978e; }
.option-card:has(input:checked) { border-color: var(--primary); background: #edf6f0; box-shadow: inset 4px 0 var(--primary); }
.option-card input { margin-top: 3px; accent-color: var(--primary); }
.rating-row { display: grid; grid-template-columns: repeat(5, 1fr); max-width: 550px; gap: 7px; }
.rating-row label { position: relative; }
.rating-row input { position: absolute; opacity: 0; pointer-events: none; }
.rating-row span { display: grid; place-items: center; min-height: 49px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-weight: 800; }
.rating-row input:checked + span { border-color: var(--primary); background: var(--primary); color: #fff; }
.rating-legend { display: flex; justify-content: space-between; max-width: 550px; margin-top: 7px; color: var(--muted); font-size: .78rem; }
.form-actions { display: flex; justify-content: space-between; gap: 12px; padding-top: 26px; border-top: 1px solid var(--line); }
.btn { min-height: 46px; border: 0; border-radius: 8px; padding: 12px 19px; font-weight: 780; transition: background .15s ease, color .15s ease, transform .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: #e9ece5; color: var(--ink); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-quiet { border: 1px solid var(--line); background: transparent; color: var(--muted); }
.btn-export { display: inline-flex; align-items: center; gap: 9px; background: var(--ink); color: #fff; }
.btn-export span { font-size: 1.15rem; }
.btn:disabled { cursor: not-allowed; opacity: .55; transform: none; }
.error-box, .success-box { display: none; margin: 16px 0; border-radius: 8px; padding: 14px 16px; }
.error-box.show { display: block; border: 1px solid #e5aaa4; background: #fff0ef; color: #79251e; }
.success-box.show { display: block; border: 1px solid #9bc9ad; background: #edf8f1; color: #075b37; }
.privacy-check { border: 0; border-radius: 9px; background: var(--soft); padding: 17px; }
.privacy-check label { display: flex; align-items: flex-start; gap: 10px; }
.privacy-check input { margin-top: 4px; accent-color: var(--primary); }
.contact-card { border: 2px solid var(--ink); border-radius: 17px; padding: 20px; background: linear-gradient(135deg, #f0edff, #fff); box-shadow: 5px 5px 0 var(--ink); }
.contact-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.contact-grid label { display: block; margin-bottom: 6px; font-size: .78rem; font-weight: 800; }
.contact-consent { display: flex; gap: 10px; align-items: flex-start; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: .84rem; line-height: 1.5; }
.contact-consent input { flex: 0 0 auto; margin-top: 4px; accent-color: var(--primary); }

.page-card { margin: 36px auto 65px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: clamp(24px, 5vw, 48px); box-shadow: var(--shadow); }
.page-card h1 { margin: 14px 0 20px; font-size: clamp(2.45rem, 5vw, 4.6rem); }
.page-card h2 { margin-top: 30px; }
.small { color: var(--muted); font-size: .88rem; }

/* Pagine informative e legali: stessa identità fresca del questionario, con lettura più comoda. */
.legal-body {
  --ink: #171326;
  --muted: #625d70;
  --surface: #ffffff;
  --paper: #f7f5ff;
  --soft: #f0edff;
  --line: #ded9eb;
  --primary: #6647f5;
  --primary-dark: #4b2fd0;
  --accent: #ff5d73;
  background:
    radial-gradient(circle at 7% 8%, rgba(193,255,79,.48) 0 82px, transparent 83px),
    radial-gradient(circle at 94% 22%, rgba(255,93,115,.16) 0 150px, transparent 151px),
    var(--paper);
}
.legal-body::before { height: 6px; background: linear-gradient(90deg, #6647f5 0 38%, #ff5d73 38% 70%, #c1ff4f 70%); }
.legal-header { padding-top: 30px; }
.legal-header .header-inner { display: flex; align-items: center; justify-content: space-between; gap: 22px; }
.legal-body .brand { font-weight: 850; }
.legal-body .brand-mark { width: 43px; height: 43px; border: 0; border-radius: 13px; background: var(--primary); box-shadow: 4px 4px 0 var(--ink); transform: rotate(-3deg); }
.legal-nav { display: flex; align-items: center; gap: 6px; border: 2px solid var(--ink); border-radius: 999px; padding: 5px; background: #fff; box-shadow: 4px 4px 0 var(--ink); }
.legal-nav a { border-radius: 999px; padding: 7px 12px; color: var(--ink); font-size: .78rem; font-weight: 850; text-decoration: none; }
.legal-nav a:hover, .legal-nav a.active { background: var(--primary); color: #fff; }
.legal-body .page-card { position: relative; width: min(900px, 100%); margin: 48px auto 72px; overflow: hidden; border: 2px solid var(--ink); border-radius: 26px; padding: clamp(25px, 5vw, 58px); background: rgba(255,255,255,.97); box-shadow: 10px 10px 0 var(--ink); }
.legal-body .page-card::after { content: "✦"; position: absolute; top: 25px; right: 35px; color: var(--accent); font-size: 2.5rem; transform: rotate(12deg); }
.legal-body .eyebrow { border: 2px solid var(--ink); border-radius: 999px; padding: 7px 12px; background: #c1ff4f; color: var(--ink); box-shadow: 3px 3px 0 var(--ink); letter-spacing: .07em; transform: rotate(-1deg); }
.legal-body .eyebrow::before { display: none; }
.legal-body h1 { max-width: 760px; margin: 25px 0 22px; font-family: inherit; font-size: clamp(2.8rem, 7vw, 5.2rem); font-weight: 900; line-height: .94; letter-spacing: -.065em; }
.legal-lead, .legal-body .page-card > h1 + p { max-width: 720px; color: var(--muted); font-size: 1.06rem; line-height: 1.72; }
.legal-body .page-card h2 { display: flex; align-items: center; gap: 11px; margin: 36px 0 9px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--ink); font-family: inherit; font-size: 1.24rem; font-weight: 900; letter-spacing: -.02em; }
.legal-body .page-card h2::before { content: ""; flex: 0 0 10px; width: 10px; height: 10px; border-radius: 3px; background: var(--accent); box-shadow: 2px 2px 0 var(--ink); transform: rotate(-6deg); }
.legal-body .page-card p { color: #504a5b; line-height: 1.72; }
.legal-body .page-card a { color: var(--primary-dark); font-weight: 750; }
.legal-body .notice, .legal-highlight { margin: 26px 0 10px; border: 2px solid var(--ink); border-radius: 15px; padding: 17px 19px; background: #fff7c7; box-shadow: 4px 4px 0 var(--ink); color: #4c421a; transform: rotate(-.2deg); }
.legal-highlight { display: grid; grid-template-columns: minmax(120px,.32fr) 1fr; gap: 18px; align-items: center; background: var(--soft); color: var(--ink); }
.legal-highlight strong { color: var(--primary); font-size: .75rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.legal-body code { border-radius: 6px; padding: 2px 6px; background: var(--soft); color: var(--primary-dark); font-size: .9em; }
.legal-body footer .footer-inner { align-items: center; border-top: 1px solid var(--line); padding-top: 22px; }
.legal-body footer .footer-inner span { margin-left: auto; }

.admin-container { width: min(1260px, calc(100% - 36px)); }
.admin-page { padding: clamp(22px, 3.5vw, 44px); }
.admin-intro { display: grid; grid-template-columns: 1fr minmax(280px, .75fr); gap: 48px; align-items: end; padding-bottom: 30px; border-bottom: 1px solid var(--line); }
.admin-intro h1 { margin-bottom: 0; }
.admin-intro p { margin: 0; color: var(--muted); line-height: 1.7; }
.dashboard-toolbar { display: grid; grid-template-columns: minmax(190px, .48fr) 1fr; gap: 24px; align-items: end; margin-top: 27px; padding: 19px; border: 1px solid var(--line); background: #f7f6f0; }
.toolbar-label { display: block; margin-bottom: 3px; color: var(--muted); font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.toolbar-heading strong { font-family: Georgia, serif; font-size: 1.25rem; font-weight: 500; }
.admin-controls { display: grid; grid-template-columns: 1.15fr .75fr .8fr auto; gap: 10px; align-items: end; }
.admin-controls.range-active { grid-template-columns: 1.15fr .75fr .8fr .9fr .9fr auto; }
.admin-controls .question-label { margin-bottom: 5px; font-size: .78rem; }
.admin-controls input[type="date"] { min-width: 0; width: 100%; }
.admin-actions { display: flex; justify-content: space-between; gap: 16px; margin: 16px 0 24px; }
.admin-secondary-actions { display: flex; gap: 8px; }
.retention-reminder { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 15px; align-items: center; margin: 0 0 18px; border: 2px solid var(--ink); border-radius: 16px; padding: 17px 19px; background: linear-gradient(120deg, #f0edff 0%, #fff 72%); box-shadow: 5px 5px 0 var(--ink); }
.retention-icon { display: grid; place-items: center; width: 48px; height: 48px; border: 2px solid var(--ink); border-radius: 14px; background: #c1ff4f; font-size: 1.35rem; transform: rotate(-3deg); }
.retention-kicker { display: block; margin-bottom: 3px; color: var(--primary); font-size: .68rem; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; }
.retention-reminder strong { display: block; color: var(--ink); font-size: 1.03rem; font-weight: 900; line-height: 1.3; }
.retention-reminder p { margin: 5px 0 0; color: var(--muted); font-size: .82rem; line-height: 1.55; }
.anomaly-alert { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 15px; align-items: center; margin: 0 0 18px; border: 2px solid var(--ink); border-radius: 16px; padding: 17px 19px; background: linear-gradient(120deg, #fff0d8 0%, #fff 72%); box-shadow: 5px 5px 0 var(--ink); }
.anomaly-alert.hidden { display: none; }
.anomaly-icon { display: grid; place-items: center; width: 48px; height: 48px; border: 2px solid var(--ink); border-radius: 14px; background: #ffb34f; color: var(--ink); font-size: 1.45rem; font-weight: 900; transform: rotate(-3deg); }
.anomaly-kicker { display: block; margin-bottom: 3px; color: #9a4c00; font-size: .68rem; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; }
.anomaly-alert strong { display: block; color: var(--ink); font-size: 1.03rem; font-weight: 900; line-height: 1.3; }
.anomaly-alert p { margin: 5px 0 0; color: var(--muted); font-size: .82rem; line-height: 1.55; }
.turnstile-guard { width: 100%; min-height: 0; margin-top: 4px; }
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0 0 10px; }
.metric { position: relative; min-height: 125px; overflow: hidden; border: 1px solid var(--line); padding: 19px; background: #fff; }
.metric::after { content: attr(data-index); position: absolute; right: 12px; bottom: -25px; color: #eff1ec; font-family: Georgia, serif; font-size: 5.5rem; line-height: 1; }
.metric strong { position: relative; z-index: 1; display: block; color: var(--primary-dark); font-family: Georgia, serif; font-size: 2.25rem; font-weight: 500; line-height: 1.05; }
.metric span { position: relative; z-index: 1; display: block; margin-top: 9px; color: var(--muted); font-size: .82rem; }
.insight-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 38px; }
.insight-card { min-height: 126px; border-top: 4px solid var(--accent); background: var(--ink); color: #fff; padding: 18px; }
.insight-label { display: block; color: #aebbb2; font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.insight-card strong { display: block; margin: 10px 0 7px; font-family: Georgia, serif; font-size: 1.13rem; font-weight: 500; line-height: 1.28; }
.insight-card small { color: #cbd4cd; }
.data-section { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 20px; }
.data-section-featured { margin-top: 0; }
.section-heading { display: flex; justify-content: space-between; gap: 20px; align-items: baseline; margin-bottom: 11px; }
.section-heading > div { display: flex; align-items: baseline; gap: 10px; }
.section-heading h2 { margin: 0; font-family: Georgia, serif; font-size: 1.3rem; font-weight: 500; }
.section-heading p { margin: 0; color: var(--muted); font-size: .82rem; }
.section-index { color: var(--accent); font-size: .7rem; font-weight: 900; letter-spacing: .08em; }
.admin-data-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 28px; margin-top: 18px; }
.table-wrap { overflow: auto; max-height: 430px; border: 1px solid var(--line); background: #fff; }
table { width: 100%; min-width: 540px; border-collapse: collapse; }
th, td { padding: 11px 12px; border-bottom: 1px solid #e7e8e2; text-align: left; vertical-align: middle; }
th { position: sticky; top: 0; z-index: 1; background: #f0f1eb; color: #4e5a53; font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; }
td { font-size: .86rem; }
td:nth-child(2), th:nth-child(2) { width: 80px; text-align: right; font-variant-numeric: tabular-nums; }
td:nth-child(3), th:nth-child(3) { width: 42%; }
tr:last-child td { border-bottom: 0; }
.bar-cell { display: grid; grid-template-columns: minmax(80px, 1fr) 42px; gap: 9px; align-items: center; color: var(--muted); font-size: .76rem; font-variant-numeric: tabular-nums; }
.bar-track { height: 7px; overflow: hidden; background: #e5e8e1; }
.bar { display: block; height: 100%; min-width: 3px; background: var(--primary); }
.empty-state { color: var(--muted); text-align: center; padding: 28px; }
.hidden { display: none !important; }
footer { padding: 0 20px 38px; color: var(--muted); font-size: .86rem; }
.footer-inner { display: flex; width: min(1060px, calc(100% - 36px)); margin: 0 auto; gap: 18px; flex-wrap: wrap; }
.footer-discovery { display: flex; width: min(1060px, calc(100% - 36px)); margin: 24px auto 0; align-items: center; justify-content: space-between; gap: 28px; border: 2px solid var(--ink); border-radius: 18px; padding: 19px 21px; background: linear-gradient(120deg, #c1ff4f 0%, #efffcf 48%, #fff 100%); box-shadow: 5px 5px 0 var(--ink); color: var(--ink); }
.footer-discovery-kicker { display: block; margin-bottom: 3px; color: var(--primary-dark); font-size: .67rem; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; }
.footer-discovery strong { display: block; font-size: 1.02rem; font-weight: 900; line-height: 1.25; }
.footer-discovery p { margin: 3px 0 0; color: #465044; font-size: .82rem; line-height: 1.4; }
.footer-discovery > a { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 10px; border: 2px solid var(--ink); border-radius: 11px; padding: 11px 14px; background: var(--ink); color: #fff; font-size: .78rem; font-weight: 850; text-decoration: none; box-shadow: 3px 3px 0 var(--primary); transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.footer-discovery > a:hover { background: var(--primary); transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.footer-discovery > a span { font-size: 1.15rem; line-height: 1; transition: transform .15s ease; }
.footer-discovery > a:hover span { transform: translateX(3px); }

@media (max-width: 900px) {
  .hero { gap: 35px; }
  .admin-intro, .dashboard-toolbar { grid-template-columns: 1fr; }
  .admin-data-grid { grid-template-columns: 1fr; }
  .admin-controls, .admin-controls.range-active { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; padding-top: 35px; }
  .hero-card { max-width: 420px; box-shadow: 11px 11px 0 #dfe3d9; }
  .option-grid { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .insight-grid { grid-template-columns: 1fr; }
  .admin-controls, .admin-controls.range-active { grid-template-columns: 1fr; }
  .admin-actions { align-items: stretch; flex-direction: column; }
  .admin-secondary-actions { justify-content: space-between; }
  form, .progress-wrap { padding-inline: 19px; }
  .contact-grid { grid-template-columns: 1fr; }
  .legal-header .header-inner { align-items: flex-start; flex-direction: column; }
  .legal-nav { width: 100%; justify-content: space-between; }
  .legal-nav a { flex: 1; text-align: center; }
  .legal-body .page-card { margin-top: 30px; border-radius: 20px; box-shadow: 6px 6px 0 var(--ink); }
  .legal-body .page-card::after { top: 18px; right: 20px; font-size: 1.8rem; }
  .legal-highlight { grid-template-columns: 1fr; gap: 5px; }
  .legal-body footer .footer-inner span { width: 100%; margin-left: 0; }
  .footer-discovery { align-items: stretch; flex-direction: column; gap: 14px; padding: 17px; }
  .footer-discovery > a { justify-content: space-between; width: 100%; }
}
@media (max-width: 460px) {
  .header-inner, .container, .admin-container { width: min(100% - 24px, 1260px); }
  .site-header { padding-inline: 12px; }
  h1 { font-size: 3rem; }
  .hero { padding-top: 25px; }
  .hero-lead { font-size: 1rem; }
  .survey-shell { border-radius: 10px; }
  .rating-row { gap: 5px; }
  .rating-row span { min-height: 44px; }
  .form-actions { flex-direction: column-reverse; }
  .btn { width: 100%; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .metric { min-height: 112px; padding: 15px; }
  .metric strong { font-size: 1.65rem; }
  .admin-secondary-actions { flex-direction: column; }
  .retention-reminder, .anomaly-alert { grid-template-columns: 1fr; padding: 15px; }
  .retention-icon { width: 42px; height: 42px; }
  .page-card { padding: 19px; }
}

/* Identità pubblica: energica, semplice, pensata per un pubblico giovane. */
.survey-page {
  --ink: #171326;
  --muted: #625d70;
  --surface: #ffffff;
  --paper: #f7f5ff;
  --soft: #f0edff;
  --line: #ded9eb;
  --primary: #6647f5;
  --primary-dark: #4b2fd0;
  --accent: #ff5d73;
  --warning-bg: #fff7c7;
  --warning-line: #f1cb35;
  background:
    radial-gradient(circle at 8% 9%, rgba(193, 255, 79, .52) 0 88px, transparent 89px),
    radial-gradient(circle at 93% 20%, rgba(255, 93, 115, .20) 0 145px, transparent 146px),
    var(--paper);
}
.survey-page::before { height: 6px; background: linear-gradient(90deg, #6647f5 0 38%, #ff5d73 38% 70%, #c1ff4f 70%); }
.survey-page .site-header { padding-top: 30px; }
.survey-page .brand { font-size: .95rem; font-weight: 850; }
.survey-page .brand-mark { width: 43px; height: 43px; border: 0; border-radius: 13px; background: var(--primary); box-shadow: 4px 4px 0 var(--ink); transform: rotate(-3deg); }
.survey-page .hero { min-height: 620px; padding: 56px 0 44px; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); gap: 56px; align-items: center; }
.survey-page .hero-copy::after { content: "✦"; position: absolute; top: -25px; right: 8%; color: var(--accent); font-size: 2.6rem; transform: rotate(12deg); }
.survey-page .eyebrow { border: 2px solid var(--ink); border-radius: 999px; padding: 8px 13px; background: #c1ff4f; color: var(--ink); box-shadow: 3px 3px 0 var(--ink); font-size: .72rem; letter-spacing: .08em; transform: rotate(-1deg); }
.survey-page .eyebrow::before { display: none; }
.survey-page h1 { max-width: 760px; margin: 25px 0 22px; font-family: "Avenir Next", Avenir, "Segoe UI", system-ui, sans-serif; font-size: clamp(3.1rem, 7.3vw, 6.4rem); font-weight: 900; line-height: .91; letter-spacing: -.07em; }
.survey-page h1 em { display: inline; color: var(--primary); font-style: normal; font-weight: 900; }
.survey-page .hero-lead { max-width: 680px; color: #575161; font-size: 1.14rem; line-height: 1.68; }
.survey-page .notice { border: 2px solid var(--ink); border-radius: 14px; padding: 15px 17px; box-shadow: 4px 4px 0 var(--ink); color: #514515; transform: rotate(-.25deg); }
.survey-page .notice strong { color: var(--ink); }
.survey-page .hero-card { position: relative; overflow: visible; border: 2px solid var(--ink); border-radius: 24px; padding: 27px; background: var(--primary); box-shadow: 10px 10px 0 var(--ink); transform: rotate(2deg); }
.survey-page .hero-card::before { content: "CONTATTI FACOLTATIVI"; position: absolute; top: -18px; right: -14px; border: 2px solid var(--ink); border-radius: 999px; padding: 7px 12px; background: var(--accent); color: #fff; font-size: .68rem; font-weight: 900; letter-spacing: .08em; transform: rotate(8deg); }
.survey-page .hero-card-kicker, .survey-page .hero-stat span, .survey-page .hero-facts span, .survey-page .hero-card p { color: #e4ddff; }
.survey-page .hero-stat strong { font-family: inherit; font-size: 4.4rem; font-weight: 900; }
.survey-page .hero-facts { border-color: rgba(255,255,255,.3); }
.survey-page .hero-facts div + div { border-color: rgba(255,255,255,.3); }
.survey-page .qr-inline { display: flex; align-items: center; gap: 13px; margin-top: 19px; border-top: 1px solid rgba(255,255,255,.3); padding-top: 18px; }
.survey-page .qr-inline img { width: 78px; height: 78px; border: 5px solid #fff; border-radius: 8px; background: #fff; image-rendering: pixelated; }
.survey-page .qr-inline strong, .survey-page .qr-inline span { display: block; }
.survey-page .qr-inline strong { color: #fff; font-size: .82rem; }
.survey-page .qr-inline span { margin-top: 3px; color: #e4ddff; font-size: .75rem; }
.survey-page .qr-inline a { color: #c1ff4f; font-weight: 800; }
.survey-page .survey-shell { border: 2px solid var(--ink); border-radius: 25px; box-shadow: 9px 9px 0 var(--ink); }
.survey-page .progress-wrap { background: #f8f6ff; }
.survey-page .progress-meta { color: var(--primary-dark); }
.survey-page .progress-track { height: 8px; border-radius: 999px; background: #ded8fa; }
.survey-page .progress-bar { border-radius: 999px; background: var(--primary); }
.survey-page .step-header h2 { font-family: inherit; font-weight: 900; letter-spacing: -.035em; }
.survey-page .question-label { font-weight: 800; }
.survey-page select, .survey-page textarea, .survey-page input[type="text"], .survey-page input[type="email"], .survey-page input[type="number"] { border: 2px solid #c9c2d9; border-radius: 13px; }
.survey-page select:focus, .survey-page textarea:focus, .survey-page input:focus { outline-color: rgba(102, 71, 245, .18); border-color: var(--primary); }
.survey-page .option-card { border: 2px solid var(--line); border-radius: 13px; }
.survey-page .option-card:hover { border-color: var(--primary); transform: translateY(-2px); }
.survey-page .option-card:has(input:checked) { border-color: var(--primary); background: #efecff; box-shadow: 4px 4px 0 var(--primary); }
.survey-page .rating-row span { border: 2px solid var(--line); border-radius: 12px; }
.survey-page .rating-row input:checked + span { border-color: var(--ink); background: var(--primary); box-shadow: 3px 3px 0 var(--ink); }
.survey-page .btn { border: 2px solid var(--ink); border-radius: 12px; }
.survey-page .btn-primary { background: var(--primary); box-shadow: 4px 4px 0 var(--ink); }
.survey-page .btn-primary:hover { background: var(--primary-dark); transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.survey-page .btn-secondary { background: #efedf5; }
.survey-page footer { padding-top: 6px; }
.survey-page .footer-inner { align-items: center; border-top: 1px solid var(--line); padding-top: 22px; }
.survey-page .footer-inner > span:last-child { margin-left: auto; }
.survey-page .footer-inner > span:last-child a { font-weight: 800; }

@media (max-width: 760px) {
  .survey-page { background: radial-gradient(circle at 100% 8%, rgba(193, 255, 79, .55) 0 95px, transparent 96px), var(--paper); }
  .survey-page .hero { min-height: 0; grid-template-columns: 1fr; gap: 40px; padding: 32px 0 45px; }
  .survey-page .hero-copy::after { top: -3px; right: 1%; font-size: 1.9rem; }
  .survey-page h1 { font-size: clamp(3.1rem, 14vw, 5rem); }
  .survey-page .hero-card { max-width: calc(100% - 12px); box-shadow: 8px 8px 0 var(--ink); transform: rotate(1deg); }
  .survey-page .footer-inner > span:last-child { width: 100%; margin-left: 0; }
}

@media (max-width: 460px) {
  .survey-page .brand { align-items: flex-start; font-size: .85rem; line-height: 1.25; }
  .survey-page .brand span:last-child { max-width: 250px; }
  .survey-page h1 { font-size: 3.35rem; line-height: .92; }
  .survey-page .hero-lead { font-size: 1.02rem; }
  .survey-page .notice { font-size: .85rem; }
  .survey-page .survey-shell { border-radius: 18px; box-shadow: 6px 6px 0 var(--ink); }
}

/* Area riservata: stessa identità visiva, densità adatta alla lettura dei dati. */
.admin-body {
  --ink: #171326;
  --muted: #625d70;
  --surface: #ffffff;
  --paper: #f7f5ff;
  --soft: #f0edff;
  --line: #ded9eb;
  --primary: #6647f5;
  --primary-dark: #4b2fd0;
  --accent: #ff5d73;
  background:
    radial-gradient(circle at 96% 7%, rgba(193, 255, 79, .48) 0 105px, transparent 106px),
    var(--paper);
}
.admin-body::before { height: 6px; background: linear-gradient(90deg, #6647f5 0 38%, #ff5d73 38% 70%, #c1ff4f 70%); }
.admin-body .site-header { padding-top: 28px; }
.admin-body .brand { font-weight: 850; }
.admin-body .brand-mark { width: 43px; height: 43px; border: 0; border-radius: 13px; background: var(--primary); box-shadow: 4px 4px 0 var(--ink); transform: rotate(-3deg); }
.admin-body .admin-page { border: 2px solid var(--ink); border-radius: 24px; box-shadow: 9px 9px 0 var(--ink); }
.admin-body .eyebrow { border: 2px solid var(--ink); border-radius: 999px; padding: 7px 12px; background: #c1ff4f; color: var(--ink); box-shadow: 3px 3px 0 var(--ink); letter-spacing: .08em; transform: rotate(-1deg); }
.admin-body .eyebrow::before { display: none; }
.admin-body .admin-intro h1 { max-width: none; font-family: "Avenir Next", Avenir, "Segoe UI", system-ui, sans-serif; font-weight: 900; letter-spacing: -.065em; }
.admin-body .dashboard-toolbar { border: 2px solid var(--ink); border-radius: 16px; background: #f0edff; box-shadow: 5px 5px 0 var(--ink); }
.admin-body .toolbar-label, .admin-body .section-index { color: var(--primary); }
.admin-body .toolbar-heading strong { font-family: inherit; font-weight: 850; }
.admin-body select, .admin-body input[type="password"], .admin-body input[type="date"] { border: 2px solid #c9c2d9; border-radius: 11px; }
.admin-body select:focus, .admin-body input:focus { outline-color: rgba(102, 71, 245, .18); border-color: var(--primary); }
.admin-body .btn { border: 2px solid var(--ink); border-radius: 11px; }
.admin-body .btn-primary { background: var(--primary); box-shadow: 4px 4px 0 var(--ink); }
.admin-body .btn-primary:hover { background: var(--primary-dark); transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.admin-body .btn-export { background: var(--ink); box-shadow: 4px 4px 0 var(--primary); }
.admin-body .btn-export:hover { background: var(--primary); box-shadow: 2px 2px 0 var(--ink); }
.admin-body .btn-secondary { background: #efedf5; }
.admin-body .btn-danger { background: var(--accent); box-shadow: 3px 3px 0 var(--ink); }
.admin-body .btn-danger:hover { background: #df4058; transform: translate(1px, 1px); box-shadow: 2px 2px 0 var(--ink); }
.admin-body .metric { border: 2px solid var(--ink); border-radius: 15px; }
.admin-body .metric::after { color: #efecff; }
.admin-body .metric strong { color: var(--primary); font-family: inherit; font-weight: 900; }
.admin-body .insight-card { border: 2px solid var(--ink); border-top: 7px solid var(--accent); border-radius: 16px; background: var(--primary); box-shadow: 5px 5px 0 var(--ink); }
.admin-body .insight-label, .admin-body .insight-card small { color: #e5dfff; }
.admin-body .insight-card strong { font-family: inherit; font-weight: 800; }
.admin-body .section-heading h2 { font-family: inherit; font-weight: 900; letter-spacing: -.025em; }
.admin-body .admin-data-grid, .admin-body .data-section { min-width: 0; }
.admin-body .table-wrap { border: 2px solid var(--ink); border-radius: 14px; }
.admin-body th { background: var(--ink); color: #fff; }
.admin-body tr:nth-child(even) td { background: #faf9ff; }
.admin-body .bar-track { border-radius: 999px; background: #e2ddf5; }
.admin-body .bar { border-radius: 999px; background: var(--primary); }
.admin-body footer .footer-inner { border-top: 1px solid var(--line); padding-top: 22px; }
.admin-body footer .footer-inner span { margin-left: auto; }

@media (max-width: 760px) {
  .admin-body .admin-page { box-shadow: 6px 6px 0 var(--ink); }
  .admin-body .admin-intro h1 { font-size: clamp(2.7rem, 12vw, 4rem); }
  .admin-body footer .footer-inner span { width: 100%; margin-left: 0; }
}
