@font-face {
  font-family: "VTF Redzone";
  src:
    url("assets/fonts/red/VTFRedzone-Classic.woff2") format("woff2"),
    url("assets/fonts/red/VTFRedzone-Classic.woff") format("woff"),
    url("assets/fonts/red/VTFRedzone-Classic.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Inter Tight Local";
  src: url("assets/fonts/inter-tight/InterTight-VariableFont_wght.ttf") format("truetype");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Inter Tight Local";
  src: url("assets/fonts/inter-tight/InterTight-Italic-VariableFont_wght.ttf") format("truetype");
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --ink: #424242;
  --muted: rgba(66, 66, 66, .76);
  --line: rgba(0, 20, 137, .16);
  --paper: #ffffff;
  --soft: rgba(0, 20, 137, .05);
  --navy: #001489;
  --blue: #001489;
  --orange: #f8eb00;
  --green: #00a80f;
  --teal: #00a80f;
  --red: #ff0000;
  --amber: #f8eb00;
  --dark-gray: #424242;
  --light-gray: rgba(0, 20, 137, .18);
  --yellow: #f8eb00;
  --shadow: 0 24px 60px rgba(0, 20, 137, .14);
  font-family: "Inter Tight Local", "Inter Tight", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(0, 20, 137, .08) 0, rgba(0, 20, 137, .03) 520px, #fff 100%);
}

button,
input,
select {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
.brand strong {
  font-family: "VTF Redzone", "Arial Black", Impact, sans-serif;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px clamp(18px, 4vw, 52px);
  border-bottom: 1px solid rgba(255, 255, 255, .16);
  color: #fff;
  background: var(--navy);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 230px;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  color: #fff;
}

.brand small {
  color: rgba(255, 255, 255, .8);
  font-size: .78rem;
}

.brand-logo {
  width: 58px;
  height: 64px;
  object-fit: contain;
  flex: 0 0 auto;
  filter: drop-shadow(0 8px 14px rgba(0, 20, 137, .16));
}

#mainNav {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, .46);
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
  box-shadow: 0 18px 44px rgba(0, 20, 137, .18);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
}

.nav-form-links {
  display: none;
  align-items: center;
  gap: 6px;
}

.nav-form-links.visible {
  display: flex;
}

.nav-link {
  position: relative;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 17px;
  border-radius: 999px;
  color: rgba(0, 20, 137, .78);
  font-size: .9rem;
  font-weight: 850;
  white-space: nowrap;
  transition: color .18s ease, background .18s ease, transform .18s ease;
}

.nav-link:hover {
  color: var(--navy);
  background: rgba(0, 20, 137, .06);
}

.nav-link.active {
  color: var(--navy);
  background: rgba(0, 20, 137, .08);
}

.nav-link.active::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 50%;
  width: 34px;
  height: 4px;
  border-radius: 999px 999px 0 0;
  background: var(--yellow);
  box-shadow:
    0 0 12px rgba(248, 235, 0, .78),
    0 0 26px rgba(248, 235, 0, .42);
  transform: translateX(-50%);
}

.nav-link.active::after {
  content: "";
  position: absolute;
  top: -13px;
  left: 50%;
  width: 48px;
  height: 24px;
  border-radius: 50%;
  background: rgba(248, 235, 0, .22);
  filter: blur(8px);
  transform: translateX(-50%);
  pointer-events: none;
}

main {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
}

.hero {
  min-height: 560px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, .95fr);
  align-items: center;
  gap: clamp(24px, 5vw, 72px);
  margin-top: 28px;
  padding: clamp(28px, 5vw, 58px);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(0, 20, 137, .98), rgba(0, 20, 137, .86)),
    radial-gradient(circle at 88% 16%, rgba(248, 235, 0, .22), transparent 34%);
  box-shadow: 0 24px 60px rgba(0, 20, 137, .18);
}

.hero-copy h1 {
  margin: 0;
  max-width: 720px;
  font-family: "VTF Redzone", "Arial Black", Impact, sans-serif;
  font-size: clamp(2.3rem, 6vw, 5rem);
  line-height: .98;
  letter-spacing: 0;
  color: #fff;
  text-transform: uppercase;
}

.hero-copy p {
  max-width: 660px;
  color: rgba(255, 255, 255, .88);
  font-size: 1.12rem;
  line-height: 1.65;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--navy);
  font-size: .82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: var(--yellow);
}

.hero-actions,
.form-actions,
.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.primary-button,
.secondary-button,
.ghost-button,
.icon-button {
  border: 0;
  cursor: pointer;
  border-radius: 6px;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 0 22px;
  color: var(--navy);
  background: var(--yellow);
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(248, 235, 0, .28);
}

.secondary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 18px;
  color: var(--navy);
  background: #fff;
  border: 1px solid rgba(0, 20, 137, .18);
  font-weight: 700;
}

.ghost-button {
  min-height: 40px;
}

.topbar .ghost-button {
  color: var(--navy);
  background: var(--yellow);
  border-color: transparent;
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(0, 20, 137, .12);
}

.primary-button::after,
.secondary-button::after,
.ghost-button::after {
  content: "";
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 4.1 12 6'/%3E%3Cpath d='m5.1 8-2.9-.8'/%3E%3Cpath d='m6 12-1.9 2'/%3E%3Cpath d='M7.2 2.2 8 5.1'/%3E%3Cpath d='M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.074z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.particle-active {
  transform: scale(.96);
}

.click-particle {
  position: fixed;
  z-index: 999;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--navy);
  pointer-events: none;
  animation: particle-burst .62s ease-out forwards;
}

@keyframes particle-burst {
  0% {
    opacity: 0;
    transform: translate(0, 0) scale(0);
  }

  28% {
    opacity: 1;
    transform: translate(calc(var(--tx) * .42), calc(var(--ty) * .42)) scale(1);
  }

  100% {
    opacity: 0;
    transform: translate(var(--tx), var(--ty)) scale(0);
  }
}

.fee-panel {
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, .44);
  border-top: 5px solid var(--yellow);
  border-radius: 8px;
  padding: 26px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .18);
}

.fee-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.fee-heading span,
.bank-box span,
.payment-summary span,
.status-label {
  color: var(--muted);
  font-size: .86rem;
}

.fee-heading strong {
  color: var(--navy);
  font-size: 1.35rem;
  text-align: right;
}

.fee-panel ul {
  margin: 18px 0;
  padding-left: 20px;
  color: var(--dark-gray);
  line-height: 1.55;
}

.fee-panel li + li {
  margin-top: 8px;
}

.bank-box {
  display: grid;
  gap: 8px;
  padding: 18px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(248, 235, 0, .32), #fff 72%);
  border: 2px solid var(--navy);
  box-shadow: 0 14px 28px rgba(0, 20, 137, .12);
}

.bank-box code {
  color: var(--navy);
  font-weight: 900;
  white-space: normal;
}

.bank-kicker {
  width: fit-content;
  padding: 5px 8px;
  color: var(--navy);
  background: var(--yellow);
  border-radius: 6px;
  font-weight: 900;
  text-transform: uppercase;
}

.bank-box strong {
  color: var(--navy);
  font-size: 1.05rem;
}

.iban-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  margin-top: 4px;
  padding: 12px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid rgba(0, 20, 137, .18);
}

.iban-row code {
  font-size: clamp(.96rem, 1.5vw, 1.18rem);
  letter-spacing: .4px;
}

.copy-iban-button {
  min-height: 38px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  color: #fff;
  background: var(--navy);
  font-weight: 800;
  cursor: pointer;
}

.copy-iban-button:hover {
  background: var(--navy);
  box-shadow: inset 0 -3px 0 var(--green);
}

.portal-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  padding: 20px 0 70px;
}

.choice-gateway {
  padding: clamp(18px, 4vw, 34px);
  margin: 28px 0 28px;
  border-radius: 8px;
  border: 1px solid rgba(0, 20, 137, .16);
  border-top: 5px solid var(--navy);
  border-left: 0;
  background: #fff;
  box-shadow: 0 16px 42px rgba(0, 20, 137, .1);
  scroll-margin-top: 110px;
}

.choice-stage {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.choice-panel {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 16px;
  min-height: 300px;
  padding: clamp(24px, 5vw, 48px);
  border-radius: 8px;
  border: 1px solid rgba(0, 20, 137, .18);
  overflow: hidden;
}

.choice-panel h3 {
  max-width: 580px;
  margin: 0;
  font-family: "VTF Redzone", "Arial Black", Impact, sans-serif;
  font-size: clamp(2rem, 5vw, 4.2rem);
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
}

.choice-panel p {
  max-width: 520px;
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.55;
}

.choice-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 11px;
  color: var(--navy);
  background: rgba(248, 235, 0, .82);
  border-radius: 6px;
  font-weight: 900;
  text-transform: uppercase;
}

.artificial-panel {
  color: var(--navy);
  background:
    linear-gradient(135deg, #fff, rgba(0, 20, 137, .08));
  border-color: rgba(255, 0, 0, .28);
}

.artificial-panel .secondary-button {
  color: var(--navy);
  background: #fff;
  border-color: rgba(255, 0, 0, .32);
}

.artificial-panel .choice-badge {
  color: var(--red);
  background: rgba(255, 0, 0, .08);
  border: 1px solid rgba(255, 0, 0, .22);
}

.natural-panel {
  color: var(--navy);
  background:
    linear-gradient(135deg, #fff, rgba(248, 235, 0, .3));
  border-color: rgba(0, 168, 15, .26);
}

.natural-panel .choice-badge {
  color: var(--green);
  background: rgba(0, 168, 15, .08);
  border: 1px solid rgba(0, 168, 15, .22);
}

.form-hidden {
  display: none;
}

.side-rail {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 16px;
}

.status-card,
.support-box {
  padding: 18px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid rgba(0, 20, 137, .16);
}

.status-card strong {
  display: block;
  margin: 8px 0 12px;
  font-size: 2rem;
}

.progress-track {
  height: 9px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(203, 203, 203, .45);
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--navy) 0 72%, var(--green) 72% 88%, var(--yellow) 88%);
  transition: width .2s ease;
}

.step-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step-list li {
  padding: 13px 14px;
  border-radius: 8px;
  color: var(--dark-gray);
  background: rgba(255, 255, 255, .9);
  border: 1px solid transparent;
  cursor: pointer;
}

.step-list li.active {
  color: #fff;
  border-color: var(--navy);
  background: var(--navy);
  font-weight: 800;
}

.support-box p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.request-form {
  display: grid;
  gap: 20px;
}

.form-section {
  padding: clamp(18px, 4vw, 34px);
  border-radius: 8px;
  border: 1px solid rgba(0, 20, 137, .14);
  border-left: 5px solid var(--navy);
  background: #fff;
  box-shadow: 0 16px 42px rgba(0, 20, 137, .08);
  scroll-margin-top: 110px;
}

.section-title {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.section-title > span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  color: var(--navy);
  background: var(--yellow);
  font-weight: 900;
}

.section-title h2 {
  margin: 0;
  font-family: "VTF Redzone", "Arial Black", Impact, sans-serif;
  font-size: clamp(1.4rem, 3vw, 2rem);
  letter-spacing: 0;
  color: var(--navy);
  text-transform: uppercase;
}

.section-title p {
  margin: 6px 0 0;
  color: var(--muted);
}

.form-grid,
.upload-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.additional-impianti {
  display: grid;
  gap: 18px;
  margin-top: 22px;
}

.additional-impianto-card {
  padding: 20px;
  border: 1px solid rgba(0, 20, 137, .16);
  border-left: 5px solid var(--navy);
  border-radius: 8px;
  background: rgba(0, 20, 137, .035);
}

.additional-impianto-card h3 {
  margin: 0 0 16px;
  color: var(--navy);
  text-transform: uppercase;
}

label,
fieldset {
  min-width: 0;
}

label span,
legend {
  display: block;
  margin-bottom: 8px;
  color: var(--dark-gray);
  font-weight: 800;
}

b {
  color: var(--navy);
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  color: var(--ink);
  border: 1px solid var(--light-gray);
  border-radius: 5px;
  background: #fff;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(0, 20, 137, .12);
}

input.invalid,
select.invalid,
textarea.invalid {
  border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(255, 0, 0, .1);
}

textarea {
  min-height: 140px;
  resize: vertical;
  line-height: 1.45;
}

small {
  display: block;
  margin-top: 8px;
  color: var(--navy);
  line-height: 1.4;
}

.autocomplete-field {
  position: relative;
}

.autocomplete-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 30;
  display: none;
  max-height: 282px;
  overflow-y: auto;
  border: 1px solid rgba(0, 20, 137, .18);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(0, 20, 137, .18);
}

.autocomplete-menu.open {
  display: block;
}

.autocomplete-option {
  width: 100%;
  display: grid;
  gap: 3px;
  padding: 11px 13px;
  border: 0;
  border-bottom: 1px solid rgba(0, 20, 137, .08);
  color: var(--ink);
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.autocomplete-option:last-child {
  border-bottom: 0;
}

.autocomplete-option:hover,
.autocomplete-option.active {
  background: rgba(0, 20, 137, .07);
}

.autocomplete-option strong {
  color: var(--navy);
  font-size: .96rem;
}

.autocomplete-option span {
  color: var(--muted);
  font-size: .84rem;
  line-height: 1.3;
}

.autocomplete-empty {
  padding: 13px;
  color: var(--muted);
  background: #fff;
}

.wide,
.name-pair,
.confirm-pair {
  grid-column: 1 / -1;
}

fieldset {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0;
  border: 0;
}

.upload-card {
  position: relative;
  display: grid;
  min-height: 146px;
  align-content: center;
  padding: 22px;
  border: 1px dashed var(--light-gray);
  border-radius: 8px;
  background: #fff;
}

.upload-card input {
  margin-top: 12px;
  border-style: dashed;
}

.payment-summary {
  display: grid;
  grid-template-columns: minmax(180px, .4fr) 1fr;
  gap: 14px;
  margin-top: 18px;
}

.payment-summary > div {
  padding: 16px;
  border-radius: 8px;
  background: rgba(0, 20, 137, .06);
  border: 1px solid rgba(0, 20, 137, .18);
}

.payment-summary strong {
  display: block;
  margin-top: 5px;
}

.form-actions {
  justify-content: flex-end;
  padding: 12px 0 0;
}

.hidden {
  display: none;
}

dialog {
  width: min(860px, calc(100% - 28px));
  padding: 0;
  border: 0;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

dialog::backdrop {
  background: rgba(13, 26, 46, .48);
}

.dialog-head,
.dialog-actions {
  padding: 20px 24px;
  background: #fff;
}

.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
}

.dialog-head h2 {
  margin: 0;
}

.icon-button {
  width: 38px;
  height: 38px;
  color: var(--navy);
  background: rgba(0, 20, 137, .08);
  font-weight: 900;
}

.review-content {
  max-height: min(64vh, 680px);
  overflow: auto;
  padding: 24px;
  background: var(--soft);
}

.review-group {
  margin-bottom: 16px;
  padding: 16px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
}

.review-group h3 {
  margin: 0 0 10px;
  font-family: "VTF Redzone", "Arial Black", Impact, sans-serif;
  color: var(--navy);
  text-transform: uppercase;
}

.review-row {
  display: grid;
  grid-template-columns: minmax(170px, .45fr) 1fr;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid rgba(203, 203, 203, .45);
}

.review-row:first-of-type {
  border-top: 0;
}

.review-row span {
  color: var(--muted);
}

.dialog-actions {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  max-width: 360px;
  padding: 14px 16px;
  color: #fff;
  border-radius: 8px;
  background: var(--navy);
  border-left: 5px solid var(--green);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.help-widget {
  position: fixed;
  right: clamp(14px, 3vw, 28px);
  bottom: clamp(14px, 3vw, 28px);
  z-index: 18;
}

.help-launcher {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 20px;
  width: 178px;
  padding: 0;
  border: 0;
  color: var(--navy);
  background: transparent;
  cursor: pointer;
}

.help-message {
  position: relative;
  display: grid;
  gap: 2px;
  width: 100%;
  padding: 13px 14px;
  border: 1px solid rgba(0, 20, 137, .16);
  border-radius: 8px;
  color: var(--navy);
  background: #fff;
  box-shadow: 0 16px 34px rgba(0, 20, 137, .16);
  font-size: .88rem;
  line-height: 1.2;
  z-index: 2;
}

.help-message::after {
  content: "";
  position: absolute;
  right: 46px;
  bottom: -8px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-right: 1px solid rgba(0, 20, 137, .16);
  border-bottom: 1px solid rgba(0, 20, 137, .16);
  transform: rotate(45deg);
}

.help-message strong {
  color: var(--navy);
  font-size: .94rem;
}

.robot-mascot {
  position: relative;
  --eye-x: 0px;
  --eye-y: 0px;
  --head-x: 0px;
  --head-y: 0px;
  width: 112px;
  height: 126px;
  display: grid;
  place-items: center;
  border-radius: 34px 34px 28px 28px;
  background:
    radial-gradient(circle at 34% 20%, rgba(255, 255, 255, .96), transparent 27%),
    linear-gradient(145deg, #fff 0%, #eef1ff 42%, rgba(248, 235, 0, .78) 100%);
  border: 4px solid var(--navy);
  box-shadow:
    inset -10px -12px 24px rgba(0, 20, 137, .12),
    inset 8px 10px 20px rgba(255, 255, 255, .85),
    0 18px 36px rgba(0, 20, 137, .2);
  animation: robot-float 3.4s ease-in-out infinite;
  transition: box-shadow .18s ease;
  z-index: 1;
}

.robot-mascot::before {
  content: "";
  position: absolute;
  top: -18px;
  width: 4px;
  height: 18px;
  border-radius: 99px;
  background: var(--navy);
}

.robot-mascot::after {
  content: "";
  position: absolute;
  top: -28px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--yellow);
  border: 3px solid var(--navy);
}

.robot-screen {
  position: absolute;
  top: 24px;
  left: 14px;
  right: 14px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border-radius: 15px;
  background:
    radial-gradient(circle at 50% 10%, rgba(255, 255, 255, .18), transparent 40%),
    linear-gradient(180deg, #001dbb, var(--navy));
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, .18),
    0 8px 16px rgba(0, 20, 137, .18);
  transform: translate(var(--head-x), var(--head-y));
  transition: transform .08s linear;
}

.robot-eye {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow:
    0 0 10px rgba(248, 235, 0, .9),
    inset 2px 2px 3px rgba(255, 255, 255, .75);
  transform: translate(var(--eye-x), var(--eye-y));
  transition: transform .08s linear;
  animation: robot-blink 4s infinite;
}

.robot-body {
  position: absolute;
  bottom: 15px;
  width: 54px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .14), transparent 36%),
    var(--navy);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .16);
}

.robot-light {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 0 5px rgba(248, 235, 0, .18);
}

.robot-arm {
  position: absolute;
  top: 66px;
  width: 18px;
  height: 44px;
  border-radius: 999px;
  background: linear-gradient(180deg, #2235ba, var(--navy));
  box-shadow: inset 4px 0 8px rgba(255, 255, 255, .18);
}

.robot-arm.left {
  left: -13px;
  transform: rotate(16deg);
}

.robot-arm.right {
  right: -13px;
  transform: rotate(-16deg);
}

.help-launcher:hover .robot-mascot {
  box-shadow:
    inset -10px -12px 24px rgba(0, 20, 137, .12),
    inset 8px 10px 20px rgba(255, 255, 255, .85),
    0 22px 42px rgba(0, 20, 137, .28);
}

.help-form-body {
  display: grid;
  gap: 16px;
  padding: 24px;
  background: #fff;
}

.help-dialog {
  width: min(620px, calc(100% - 28px));
}

@keyframes robot-float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-7px);
  }
}

@keyframes robot-blink {
  0%,
  92%,
  100% {
    opacity: 1;
  }

  95% {
    opacity: .18;
  }
}

@media (max-width: 980px) {
  .topbar {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  #mainNav {
    top: auto;
    bottom: 14px;
    width: min(calc(100% - 24px), 620px);
    justify-content: center;
    overflow-x: auto;
    background: rgba(255, 255, 255, .88);
  }

  .nav-form-links {
    flex: 0 0 auto;
  }

  .nav-link {
    min-width: 58px;
    padding: 0 12px;
    font-size: 0;
  }

  .nav-link::first-letter {
    font-size: 0;
  }

  .nav-link::before {
    font-size: .78rem;
  }

  .nav-link:not(.active)::before {
    content: attr(data-short);
    position: static;
    width: auto;
    height: auto;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    transform: none;
  }

  .nav-link.active {
    font-size: 0;
  }

  .nav-link.active::before {
    content: attr(data-short);
    top: auto;
    left: auto;
    width: auto;
    height: auto;
    color: var(--navy);
    background: transparent;
    box-shadow: none;
    transform: none;
    font-size: .78rem;
  }

  .nav-link.active::after {
    top: -7px;
    width: 32px;
    height: 4px;
    border-radius: 999px;
    background: var(--yellow);
    filter: none;
  }

  .help-widget {
    bottom: 86px;
  }

  .hero,
  .portal-layout {
    grid-template-columns: 1fr;
  }

  .choice-stage {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .side-rail {
    position: static;
  }
}

@media (max-width: 680px) {
  main {
    width: min(100% - 24px, 1180px);
  }

  .hero-copy h1 {
    font-size: 2.45rem;
  }

  .form-grid,
  .upload-grid,
  fieldset,
  .payment-summary {
    grid-template-columns: 1fr;
  }

  .fee-heading,
  .dialog-head {
    display: grid;
  }

  .fee-heading strong {
    text-align: left;
  }

  .form-actions,
  .dialog-actions {
    align-items: stretch;
  }

  .form-actions button,
  .form-actions .primary-button,
  .dialog-actions button {
    width: 100%;
  }

  .help-launcher {
    width: 132px;
  }

  .help-message {
    font-size: .78rem;
    padding: 10px;
  }

  .robot-mascot {
    width: 82px;
    height: 94px;
    border-width: 3px;
  }
}

@media print {
  .topbar,
  .side-rail,
  .hero-actions,
  .form-actions,
  .dialog-actions,
  .icon-button {
    display: none !important;
  }

  .help-widget,
  .help-dialog {
    display: none !important;
  }

  body {
    background: #fff;
  }

  main,
  .portal-layout,
  .request-form {
    display: block;
    width: 100%;
  }

  .hero {
    min-height: auto;
    display: block;
    padding: 0 0 20px;
  }

  .fee-panel,
  .form-section {
    box-shadow: none;
    break-inside: avoid;
    margin-bottom: 14px;
  }
}


/* Accesso area riservata dalla pagina pubblica */
.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.staff-access-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 17px;
  border: 1px solid rgba(255, 255, 255, .34);
  border-radius: 12px;
  background: #001489;
  color: #fff;
  font-size: 14px;
  font-weight: 750;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 7px 18px rgba(0, 20, 137, .18);
  transition:
    transform .18s ease,
    box-shadow .18s ease,
    background-color .18s ease;
}

.staff-access-button:hover {
  color: #fff;
  background: #1229a7;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 20, 137, .26);
}

.staff-access-button:focus-visible {
  outline: 3px solid rgba(244, 124, 32, .38);
  outline-offset: 3px;
}

.staff-access-icon {
  display: inline-grid;
  place-items: center;
  font-size: 14px;
}

@media (max-width: 1050px) {
  .topbar-actions {
    gap: 7px;
  }

  .staff-access-button {
    padding: 10px 12px;
  }
}

@media (max-width: 760px) {
  .topbar {
    flex-wrap: wrap;
  }

  .topbar-actions {
    width: 100%;
    justify-content: stretch;
  }

  .topbar-actions > * {
    flex: 1 1 0;
  }

  .staff-access-button {
    min-width: 0;
  }
}

@media (max-width: 480px) {
  .topbar-actions {
    flex-direction: column;
  }

  .topbar-actions > * {
    width: 100%;
  }
}


/* ==========================================================
   MOBILE FIRST HOME SOCIETA
   Ottimizzazione pagina pubblica e modulo richiesta
   ========================================================== */

@media (max-width: 760px) {
  html {
    scroll-padding-top: 12px;
  }

  body {
    padding-bottom: 92px;
    background:
      linear-gradient(
        180deg,
        rgba(0, 20, 137, .08) 0,
        rgba(0, 20, 137, .025) 360px,
        #ffffff 100%
      );
  }

  main {
    width: calc(100% - 22px);
  }

  .topbar {
    position: relative;
    gap: 12px;
    padding: 12px 12px 16px;
  }

  .brand {
    width: 100%;
    min-width: 0;
    gap: 10px;
  }

  .brand-logo {
    width: 46px;
    height: 52px;
  }

  .brand strong {
    font-size: 1rem;
    line-height: 1;
  }

  .brand small {
    font-size: .72rem;
  }

  .topbar-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
  }

  .topbar-actions .ghost-button {
    grid-column: 1 / -1;
  }

  .staff-access-button,
  .ghost-button {
    min-height: 44px;
    padding: 10px 9px;
    border-radius: 12px;
    font-size: .82rem;
  }

  #mainNav {
    left: 12px;
    right: 12px;
    bottom: 10px;
    width: auto;
    max-width: none;
    transform: none;
    justify-content: flex-start;
    padding: 6px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  #mainNav::-webkit-scrollbar {
    display: none;
  }

  .nav-link {
    flex: 0 0 auto;
    min-width: 66px;
    min-height: 40px;
    padding: 0 12px;
  }

  .hero {
    display: block;
    margin-top: 14px;
    padding: 22px 18px;
    border-radius: 18px;
  }

  .hero-copy h1 {
    max-width: none;
    font-size: clamp(2rem, 11vw, 3rem);
    line-height: .96;
  }

  .hero-copy p {
    margin-top: 14px;
    font-size: .98rem;
    line-height: 1.45;
  }

  .hero-actions {
    margin-top: 18px;
  }

  .hero-actions .primary-button,
  .choice-panel .primary-button,
  .choice-panel .secondary-button {
    width: 100%;
    min-height: 50px;
    justify-content: center;
    text-align: center;
  }

  .fee-panel {
    margin-top: 18px;
    padding: 16px;
    border-radius: 16px;
  }

  .fee-panel ul {
    padding-left: 18px;
    margin: 12px 0;
  }

  .fee-panel li {
    margin-bottom: 8px;
    font-size: .92rem;
    line-height: 1.35;
  }

  .bank-box {
    padding: 14px;
    border-radius: 14px;
  }

  .iban-row {
    display: grid;
    gap: 8px;
  }

  .iban-row code {
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    font-size: .78rem;
  }

  .copy-iban-button {
    width: 100%;
    min-height: 42px;
  }

  .choice-gateway {
    margin-top: 22px;
  }

  .section-title {
    gap: 10px;
  }

  .section-title > span {
    width: 42px;
    height: 42px;
    min-width: 42px;
    font-size: .9rem;
  }

  .section-title h2 {
    font-size: 1.45rem;
    line-height: 1.05;
  }

  .section-title p {
    font-size: .95rem;
    line-height: 1.42;
  }

  .choice-stage {
    gap: 14px;
  }

  .choice-panel {
    padding: 18px;
    border-radius: 18px;
  }

  .choice-panel h3 {
    font-size: 1.35rem;
  }

  .portal-layout {
    display: block;
    margin-top: 20px;
  }

  .side-rail {
    margin-bottom: 14px;
  }

  .status-card,
  .support-box {
    border-radius: 16px;
    padding: 14px;
  }

  .step-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 12px 0;
    padding: 0;
  }

  .step-list li {
    min-height: 42px;
    padding: 10px;
    border-radius: 12px;
    font-size: .82rem;
    line-height: 1.1;
    text-align: center;
  }

  .request-form {
    gap: 16px;
  }

  .form-section {
    padding: 18px 14px;
    border-radius: 18px;
  }

  .form-grid,
  .upload-grid,
  .payment-summary {
    gap: 12px;
  }

  label,
  fieldset {
    border-radius: 14px;
  }

  fieldset {
    padding: 13px;
  }

  fieldset legend,
  label > span,
  .upload-card > span {
    font-size: .84rem;
    line-height: 1.2;
  }

  input,
  select,
  textarea {
    min-height: 48px;
    font-size: 16px;
  }

  textarea {
    min-height: 130px;
  }

  label small,
  .upload-card small {
    font-size: .78rem;
    line-height: 1.3;
  }

  .name-pair,
  .confirm-pair {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .upload-card {
    min-height: 118px;
    padding: 16px;
  }

  .upload-card input[type="file"] {
    width: 100%;
    min-height: 44px;
  }

  .payment-summary {
    padding: 14px;
    border-radius: 16px;
  }

  .payment-summary strong {
    overflow-wrap: anywhere;
    line-height: 1.25;
  }

  .form-actions {
    position: sticky;
    bottom: 72px;
    z-index: 9;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px;
    border: 1px solid rgba(0, 20, 137, .12);
    border-radius: 18px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 12px 34px rgba(0, 20, 137, .18);
    backdrop-filter: blur(14px);
  }

  .form-actions button {
    min-height: 48px;
  }

  dialog {
    width: calc(100% - 22px);
    max-width: none;
    max-height: calc(100dvh - 28px);
    border-radius: 18px;
  }

  .dialog-head {
    padding: 16px;
    gap: 10px;
  }

  .dialog-head h2 {
    font-size: 1.35rem;
  }

  .review-content {
    max-height: 58dvh;
    overflow: auto;
    padding: 14px;
  }

  .dialog-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 14px;
  }

  .dialog-actions button {
    min-height: 48px;
  }

  .help-widget {
    right: 10px;
    bottom: 92px;
  }

  .help-launcher {
    width: 118px;
    border-radius: 18px;
  }

  .help-message {
    padding: 9px;
    font-size: .72rem;
  }

  .robot-mascot {
    width: 68px;
    height: 78px;
  }

  .help-dialog {
    width: calc(100% - 22px);
  }

  .help-form-body {
    padding: 16px;
  }

  .toast {
    left: 12px;
    right: 12px;
    bottom: 14px;
    width: auto;
    max-width: none;
    text-align: center;
  }
}

@media (max-width: 420px) {
  .topbar-actions {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 20px 15px;
  }

  .hero-copy h1 {
    font-size: 2.08rem;
  }

  .section-title {
    align-items: flex-start;
  }

  .step-list {
    grid-template-columns: 1fr;
  }

  .form-section {
    padding: 16px 12px;
  }

  .help-widget {
    right: 8px;
  }

  .help-launcher {
    width: 104px;
  }

  .help-message strong {
    display: none;
  }
}



/*
   FIX DEFINITIVO HEADER PUBBLICO
   Il menu non deve più essere fixed sopra al contenuto.
   Resta dentro la barra blu e non copre la hero.
*/
.topbar {
  position: relative !important;
  top: auto !important;
  z-index: 100 !important;
  min-height: 86px;
}

#mainNav {
  position: static !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  transform: none !important;
  z-index: auto !important;
  flex: 0 1 auto;
  max-width: 100%;
  margin: 0 auto;
}

main {
  margin-top: 0 !important;
}

.hero {
  margin-top: 28px !important;
}

@media (min-width: 981px) {
  .topbar {
    flex-wrap: nowrap !important;
  }

  .brand {
    flex: 0 0 auto;
  }

  .topbar-actions {
    flex: 0 0 auto;
  }

  #mainNav {
    justify-content: center;
  }
}

@media (max-width: 980px) {
  .topbar {
    align-items: stretch !important;
    flex-wrap: wrap !important;
    padding-bottom: 14px !important;
  }

  .brand {
    order: 1;
  }

  .topbar-actions {
    order: 2;
  }

  #mainNav {
    order: 3;
    width: 100% !important;
    max-width: none !important;
    margin-top: 10px !important;
    justify-content: flex-start !important;
    overflow-x: auto !important;
  }

  .hero {
    margin-top: 16px !important;
  }
}


/* ==========================================================
   MOBILE HOME RICHIESTE V2
   Ottimizzazione semplice pagina pubblica su smartphone.
   Non modifica Segreteria, Tecnici, Area Società o backend.
   ========================================================== */

@media (max-width: 820px) {
  html {
    scroll-padding-top: 12px !important;
  }

  body {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    overflow-x: hidden !important;
    background: #f2f5f9 !important;
  }

  main {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 12px 28px !important;
  }

  .topbar {
    position: relative !important;
    top: auto !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    width: 100% !important;
    min-height: 0 !important;
    padding: 12px !important;
    background: #001489 !important;
  }

  .brand {
    width: 100% !important;
    min-width: 0 !important;
    display: grid !important;
    grid-template-columns: 44px minmax(0, 1fr) !important;
    gap: 10px !important;
    align-items: center !important;
  }

  .brand-logo {
    width: 44px !important;
    height: 50px !important;
  }

  .brand strong {
    font-size: .98rem !important;
    line-height: 1.05 !important;
  }

  .brand small {
    font-size: .72rem !important;
    line-height: 1.2 !important;
  }

  #mainNav {
    position: static !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 6px !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    transform: none !important;
    display: flex !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    overflow-x: auto !important;
    border-radius: 14px !important;
    background: rgba(255,255,255,.94) !important;
    box-shadow: none !important;
    scrollbar-width: none !important;
  }

  #mainNav::-webkit-scrollbar {
    display: none !important;
  }

  .nav-link {
    flex: 0 0 auto !important;
    min-height: 36px !important;
    min-width: auto !important;
    padding: 0 12px !important;
    font-size: .78rem !important;
    border-radius: 10px !important;
  }

  .nav-link.active::before {
    display: none !important;
  }

  .topbar-actions {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }

  .topbar-actions .ghost-button {
    grid-column: 1 / -1 !important;
  }

  .staff-access-button,
  .topbar .ghost-button {
    min-height: 40px !important;
    padding: 9px 10px !important;
    border-radius: 10px !important;
    font-size: .78rem !important;
    line-height: 1.1 !important;
  }

  .staff-access-icon {
    font-size: .85rem !important;
  }

  .hero {
    display: grid !important;
    grid-template-columns: 1fr !important;
    min-height: 0 !important;
    gap: 18px !important;
    margin: 12px 0 18px !important;
    padding: 22px 18px !important;
    border-radius: 14px !important;
  }

  .hero-copy h1 {
    max-width: none !important;
    font-size: clamp(2.1rem, 12vw, 3.15rem) !important;
    line-height: .95 !important;
  }

  .hero-copy p {
    max-width: none !important;
    margin-top: 12px !important;
    font-size: .98rem !important;
    line-height: 1.5 !important;
  }

  .eyebrow {
    margin-bottom: 8px !important;
    font-size: .76rem !important;
  }

  .hero-actions {
    margin-top: 16px !important;
  }

  .hero-actions .primary-button {
    width: 100% !important;
    justify-content: center !important;
  }

  .fee-panel {
    width: 100% !important;
    padding: 16px !important;
    border-radius: 14px !important;
  }

  .fee-heading {
    display: block !important;
  }

  .fee-heading strong {
    display: block !important;
    margin-top: 6px !important;
    font-size: 1.1rem !important;
  }

  .fee-panel ul {
    padding-left: 18px !important;
  }

  .fee-panel li {
    font-size: .92rem !important;
    line-height: 1.4 !important;
  }

  .bank-box {
    padding: 14px !important;
    border-radius: 12px !important;
  }

  .iban-row {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  .iban-row code {
    width: 100% !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    font-size: .86rem !important;
  }

  .copy-iban-button {
    width: 100% !important;
    min-height: 40px !important;
  }

  .choice-gateway,
  .portal-layout {
    margin-top: 16px !important;
  }

  .choice-gateway {
    padding: 18px !important;
    border-radius: 14px !important;
  }

  .section-title {
    align-items: flex-start !important;
    gap: 12px !important;
  }

  .section-title span {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    font-size: .85rem !important;
  }

  .section-title h2 {
    font-size: 1.45rem !important;
    line-height: 1.05 !important;
  }

  .section-title p {
    font-size: .92rem !important;
    line-height: 1.35 !important;
  }

  .choice-grid,
  .choice-panel-grid,
  .form-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .choice-panel,
  .form-section,
  .request-form,
  .side-rail {
    border-radius: 14px !important;
  }

  .choice-panel {
    min-height: 0 !important;
    padding: 18px !important;
  }

  .choice-panel h3 {
    font-size: 2.2rem !important;
    line-height: .95 !important;
  }

  .portal-layout {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  .side-rail {
    position: static !important;
    width: 100% !important;
    padding: 14px !important;
  }

  .status-card {
    padding: 14px !important;
  }

  .step-list {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  .step-list li {
    margin: 0 !important;
    padding: 10px !important;
    border-radius: 10px !important;
    font-size: .82rem !important;
    line-height: 1.15 !important;
  }

  .request-form {
    padding: 0 !important;
  }

  .form-section {
    padding: 18px !important;
    margin-bottom: 16px !important;
  }

  label,
  fieldset {
    min-width: 0 !important;
  }

  input,
  select,
  textarea {
    width: 100% !important;
    min-height: 44px !important;
    font-size: 16px !important;
  }

  textarea {
    min-height: 96px !important;
  }

  .wide,
  .name-pair,
  .confirm-pair {
    grid-column: auto !important;
  }

  .confirm-pair,
  .name-pair {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .upload-card {
    min-height: 120px !important;
    padding: 16px !important;
  }

  .payment-summary {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .form-actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .form-actions button,
  .form-actions a,
  .primary-button,
  .secondary-button,
  .ghost-button {
    width: 100% !important;
    justify-content: center !important;
  }

  #bobAssistant,
  .bob-assistant,
  .bob-widget {
    max-width: 120px !important;
    right: 10px !important;
    bottom: 10px !important;
  }
}

@media (max-width: 480px) {
  main {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  .topbar {
    padding: 10px !important;
  }

  .topbar-actions {
    grid-template-columns: 1fr !important;
  }

  .hero {
    padding: 20px 15px !important;
  }

  .hero-copy h1 {
    font-size: clamp(1.95rem, 13vw, 2.65rem) !important;
  }

  .choice-panel h3 {
    font-size: 1.95rem !important;
  }

  .step-list {
    grid-template-columns: 1fr !important;
  }

  .section-title h2 {
    font-size: 1.28rem !important;
  }
}
