:root {
  --blue: #0059b3;
  --blue-dark: #003b78;
  --ink: #17324d;
  --muted: #536779;
  --line: #d7e1ea;
  --pale: #f3f7fa;
  --gold: #d8a62a;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: #fff; font: 16px/1.5 Arial, Helvetica, sans-serif; }
button, input, select, textarea { font: inherit; }
a { color: var(--blue); }
.skip-link { position: absolute; left: -9999px; top: 8px; background: #fff; padding: 10px; z-index: 10; }
.skip-link:focus { left: 8px; }
.header-inner, .hero-inner, .content-shell, .footer-inner { width: min(1180px, calc(100% - 40px)); margin: auto; }
.municipal-header { border-bottom: 1px solid #d8e0e7; background: #fff; }
.header-inner { min-height: 90px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.institution { display: flex; align-items: center; gap: 14px; }
.institution img {
  width: 72px;
  height: 72px;
  padding: 7px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(23, 50, 77, .12);
}
.institution div { display: flex; flex-direction: column; }
.institution strong { font-size: 21px; }
.institution span { color: var(--muted); font-size: 14px; }
.header-inner > a { font-weight: 700; text-underline-offset: 4px; }
.hero { background: linear-gradient(125deg, #eef6fb, #f8fbfd 65%, #edf4f8); border-bottom: 1px solid var(--line); }
.hero-inner { padding: 36px 0 42px; }
.hero nav { color: #506779; font-size: 14px; margin-bottom: 26px; }
.hero nav span { margin: 0 9px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, .65fr); gap: 54px; align-items: end; }
.status { display: inline-block; padding: 5px 12px; color: #176634; background: #d8f3df; border-radius: 20px; font-size: 13px; font-weight: 700; }
h1 { max-width: 800px; margin: 16px 0 12px; color: #153758; font-size: clamp(34px, 5vw, 54px); line-height: 1.08; letter-spacing: -.035em; }
.hero-grid > div > p { max-width: 760px; margin: 0; color: #415d73; font-size: 19px; line-height: 1.65; }
.notice { padding: 18px 20px; color: #5d4918; background: #fff7dc; border-left: 5px solid var(--gold); border-radius: 8px; }
.notice p { margin: 5px 0 0; }
.content-shell { display: grid; grid-template-columns: 285px minmax(0, 1fr); gap: 58px; align-items: start; padding: 50px 0 70px; }
.service-summary { position: sticky; top: 24px; padding: 24px; background: var(--pale); border-top: 5px solid var(--blue); border-radius: 4px; }
.service-summary h2 { margin: 0 0 14px; font-size: 22px; }
.service-summary ul { margin: 0; padding-left: 20px; color: #3c566a; }
.service-summary li + li { margin-top: 10px; }
.contact-box { display: flex; flex-direction: column; gap: 4px; margin-top: 22px; padding-top: 19px; border-top: 1px solid var(--line); font-size: 14px; overflow-wrap: anywhere; }
form { display: flex; min-width: 0; flex-direction: column; gap: 24px; }
.honeypot { position: absolute; left: -9999px; }
.form-section { padding: 30px; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 6px 22px rgba(26, 63, 92, .055); }
.section-heading { display: flex; align-items: flex-start; gap: 15px; margin-bottom: 26px; }
.section-heading > span { display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; color: #fff; background: var(--blue); border-radius: 50%; font-weight: 700; }
.section-heading h2 { margin: 1px 0 3px; font-size: 25px; line-height: 1.2; }
.section-heading p { margin: 0; color: var(--muted); }
.field-grid { display: grid; gap: 19px 20px; }
.two-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.three-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.wide { grid-column: 1 / -1; }
label { display: flex; flex-direction: column; gap: 7px; color: #253f56; font-weight: 700; }
label small { color: #6b7e8e; font-weight: 400; }
input, select, textarea { width: 100%; min-height: 48px; padding: 10px 12px; color: #172f45; background: #fff; border: 1px solid #8da1b2; border-radius: 5px; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(0, 89, 179, .22); border-color: var(--blue); }
.uppercase { text-transform: uppercase; }
.conditional { margin-top: 22px; padding: 22px; background: #f6f9fb; border-left: 4px solid var(--blue); }
.choice-list { display: grid; gap: 12px; }
.choice-list label { flex-direction: row; align-items: center; gap: 14px; padding: 17px; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; }
.choice-list label.selected { padding: 16px; background: #f2f8fd; border: 2px solid var(--blue); }
.choice-list input { width: 20px; min-height: 20px; accent-color: var(--blue); }
.choice-list span { display: flex; flex-direction: column; }
.choice-list small { color: var(--muted); font-weight: 400; }
.inline-alert { padding: 13px 15px; color: #244d70; background: #eef7ff; border-left: 4px solid var(--blue); }
.file-field { padding: 18px; background: #f8fafc; border: 1px dashed #7c94a8; border-radius: 6px; }
.file-field + .file-field { margin-top: 16px; }
.file-field input { padding: 8px; background: #fff; }
.field-error { padding: 12px; color: #8d2018; background: #fff0ef; border-left: 4px solid #c73d32; }
.declarations { display: grid; gap: 14px; }
.declarations label { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; font-weight: 400; }
.declarations input { width: 20px; min-height: 20px; margin-top: 2px; accent-color: var(--blue); }
.price-card { margin: 25px 0; padding: 20px; background: #f1f7fb; border-top: 4px solid var(--blue-dark); }
.price-card span { display: block; font-weight: 700; }
.price-card strong { display: block; margin-top: 2px; color: var(--blue-dark); font-size: 25px; }
.price-card p { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
button { padding: 15px 24px; color: #fff; background: var(--blue); border: 0; border-radius: 5px; font-size: 18px; font-weight: 700; cursor: pointer; }
button:hover { background: var(--blue-dark); }
button:focus-visible { outline: 3px solid #f2c14c; outline-offset: 3px; }
button:disabled { color: #667785; background: #d7e0e7; cursor: not-allowed; }
.secondary-button { color: var(--blue-dark); background: #e7f1f9; border: 2px solid var(--blue); }
.secondary-button:hover { color: #fff; }
.email-verification { margin: 25px 0 18px; padding: 20px; background: #fff9e7; border-left: 5px solid var(--gold); border-radius: 5px; }
.email-verification h3 { margin: 0 0 6px; font-size: 21px; }
.email-verification p { margin: 0 0 15px; }
.email-verification #codice-wrap { max-width: 320px; margin-top: 18px; }
.email-verification #email-code { letter-spacing: .28em; font-size: 22px; font-weight: 700; }
.email-verification .submit-help { text-align: left; }
.submit-help { margin: 10px 0 0; color: var(--muted); text-align: center; font-size: 14px; }
footer { color: #fff; background: #173a5a; }
.footer-inner { display: flex; min-height: 150px; align-items: center; justify-content: space-between; gap: 30px; }
.footer-inner p { max-width: 540px; margin: 5px 0 0; color: #d7e4ef; }
.simple-page { max-width: 850px; margin: 40px auto 80px; padding: 0 20px; }
.simple-page h1 { font-size: clamp(32px, 5vw, 46px); }
.success-box { margin-top: 30px; padding: 25px; background: #eaf7ed; border-left: 5px solid #278045; }
.submission-success { margin-top: 0; align-self: start; }
.submission-success h2 { margin: 8px 0 12px; color: #173a5a; font-size: 30px; line-height: 1.2; }

@media (max-width: 850px) {
  .hero-grid, .content-shell { grid-template-columns: 1fr; }
  .hero-grid { gap: 28px; }
  .content-shell { gap: 30px; }
  .service-summary { position: static; }
  .three-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .header-inner, .hero-inner, .content-shell, .footer-inner { width: min(100% - 28px, 1180px); }
  .header-inner { min-height: 0; align-items: flex-start; flex-direction: column; gap: 10px; padding: 14px 0; }
  .institution img { width: 60px; height: 60px; padding: 6px; }
  .header-inner > a { font-size: 14px; }
  .hero-inner { padding: 24px 0 30px; }
  .hero nav { margin-bottom: 18px; }
  .hero-grid > div > p { font-size: 17px; }
  .form-section { padding: 21px 16px; }
  .two-cols, .three-cols { grid-template-columns: 1fr; }
  .footer-inner { display: block; padding: 34px 0; }
  .footer-inner > p { margin-top: 22px; }
}
