:root {
  --usra-blue: #0059b3;
  --usra-blue-dark: #003183;
  --usra-blue-soft: #eaf2fb;
  --usra-green: #1f7a4c;
  --usra-green-soft: #edf7f2;
  --usra-teal: #003183;
  --usra-amber: #9c5a00;
  --usra-red: #b21b2c;
  --usra-ink: #1d2733;
  --usra-muted: #5d7083;
  --usra-line: #d8e0e8;
  --usra-bg: #f5f7fa;
  --usra-white: #ffffff;
  --focus-ring: 0 0 0 0.24rem rgba(0, 102, 204, 0.28);
}

html {
  scroll-behavior: smooth;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body.usra-site {
  color: var(--usra-ink);
  background: var(--usra-white);
  overflow-x: hidden;
}

img,
svg {
  max-width: 100%;
}

a {
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid transparent;
  box-shadow: var(--focus-ring);
}

.skiplinks {
  position: absolute;
  z-index: 10000;
  inset-inline-start: 1rem;
  top: 0.5rem;
}

.skiplinks a {
  position: absolute;
  transform: translateY(-160%);
  min-width: 11rem;
  padding: 0.6rem 0.85rem;
  color: var(--usra-white);
  background: var(--usra-blue-dark);
  border-radius: 4px;
}

.skiplinks a:focus {
  transform: translateY(0);
}

.it-header-wrapper .it-header-slim-wrapper {
  background-color: #003183;
}

.it-header-slim-wrapper-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  min-height: 2.8rem;
}

.it-header-slim-wrapper .navbar-brand,
.it-header-slim-wrapper .list-item {
  color: var(--usra-white);
}

.it-header-slim-right-zone {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-end;
}

.it-header-center-wrapper {
  background-color: #0059b3;
}

.it-header-center-content-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.05rem;
  padding-bottom: 1.05rem;
}

.it-brand-wrapper a {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
}

.it-brand-wrapper,
.it-brand-text {
  min-width: 0;
}

.brand-logo,
.footer-logo {
  display: block;
  width: 12.5rem;
  max-width: 100%;
  height: auto;
  background: transparent;
}

.it-brand-title,
.it-brand-tagline {
  color: var(--usra-white);
}

.it-brand-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0;
}

.header-social {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: nowrap;
  justify-content: flex-end;
}

.social-label {
  margin-right: 0.35rem;
  color: var(--usra-white);
  font-size: 0.88rem;
  font-weight: 700;
}

.social-link {
  width: 2.25rem;
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--usra-white);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  text-decoration: none;
  transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.social-link svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.social-link:hover,
.social-link:focus {
  color: #003183;
  background: var(--usra-white);
}

.it-header-navbar-wrapper {
    background-color: #003183;
    border-bottom: 1px solid var(--usra-white);
}

.navbar .nav-link {
  min-height: 3.25rem;
  display: flex;
  align-items: center;
  color: var(--usra-white);
  font-weight: 600;
    padding-right: 1rem !important;
    padding-left: 1rem !important;
}

.navbar button.nav-link {
  border: 0;
  background: transparent;
}

.navbar .private-nav-dropdown > .dropdown-toggle {
  gap: 0.45rem;
}

.navbar .private-nav-dropdown > .dropdown-toggle::after {
  content: "";
  width: 0.42rem;
  height: 0.42rem;
  margin-left: 0.15rem;
  border: 0;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-0.12rem) rotate(45deg);
  transition: transform 0.16s ease;
}

.navbar .private-nav-dropdown > .dropdown-toggle[aria-expanded="true"]::after {
  transform: translateY(0.08rem) rotate(225deg);
}

.navbar .nav-link:hover,
.navbar .nav-link:focus,
.navbar .nav-link.active {
  color: var(--usra-white);
  background: rgba(255, 255, 255, 0.13);
}

.navbar-nav {
  width: 100%;
}

.nav-link-external {
  gap: 0.35rem;
}

@media (min-width: 992px) {
  .nav-item-external {
    margin-left: auto;
  }
    .it-brand-title {
        font-size: 1.45rem !important;
    }
    .it-header-center-wrapper {
        height: 150px;
    }

  .navbar .private-nav-dropdown:hover > .dropdown-menu,
  .navbar .private-nav-dropdown:focus-within > .dropdown-menu {
    display: block;
    margin-top: 0;
  }
}

.navbar .dropdown-menu {
  border-radius: 6px;
}

.navbar .private-nav-menu {
  color: var(--usra-white);
  background: var(--usra-blue-dark);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 14px 30px rgba(0, 22, 59, 0.2);
}

.navbar .dropdown-item {
  min-height: 2.8rem;
  display: flex;
  align-items: center;
  font-weight: 600;
}

.navbar .private-nav-menu .dropdown-item {
  color: var(--usra-white);
}

.navbar .private-nav-menu .dropdown-item:hover,
.navbar .private-nav-menu .dropdown-item:focus,
.navbar .private-nav-menu .dropdown-item.active,
.navbar .private-nav-menu .dropdown-item:active {
  color: var(--usra-white);
  background: var(--usra-blue);
}

.navbar .private-nav-menu .dropdown-item.active {
  box-shadow: inset 4px 0 0 var(--usra-white);
}

.navbar .dropdown-item.active,
.navbar .dropdown-item:active {
  background: var(--usra-blue);
}

.navbar-toggler {
  min-height: 2.75rem;
}

.navbar-toggler-label {
  display: none;
}

.mobile-menu-extra {
  display: none;
}

.page-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(90deg, rgba(23, 50, 77, 0.92), rgba(0, 107, 118, 0.82)), url("../img/bg-data.jpg") center / cover no-repeat;
  color: var(--usra-white);
}

.page-hero.page-hero-dashboard {
  background-color: #003183;
  background-image: url("../img/hero-background.png");
  background-position: center 60%;
  background-size: cover;
  background-repeat: no-repeat;
    padding-top: 4rem;
    padding-bottom: 4rem;
}

.page-hero .container {
  min-height: 24rem;
  display: flex;
  align-items: center;
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.page-hero h1 {
  max-width: 55rem;
  margin: 0;
  color: var(--usra-white);
  font-weight: 700;
  letter-spacing: 0;
}

.page-hero p {
  max-width: 46rem;
  color: rgba(255, 255, 255, 0.92);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.hero-actions .btn-private-hero {
  color: var(--usra-white);
  background: var(--usra-green);
  border: 2px solid var(--usra-white);
  /*box-shadow: inset 0 0 0 1px var(--usra-white);*/
}

.hero-actions .btn-private-hero:hover,
.hero-actions .btn-private-hero:focus {
  color: var(--usra-green);
  background: var(--usra-white);
  border-color: var(--usra-white);
}

.hero-actions .btn-outline-light {
  color: var(--usra-white);
  background: var(--usra-blue);
  border-color: var(--usra-white);
}

.hero-actions .btn-outline-light:hover,
.hero-actions .btn-outline-light:focus {
  color: var(--usra-blue);
  background: var(--usra-white);
  border-color: var(--usra-white);
}

.page-hero-dashboard .container {
  min-height: 20rem;
}

.hero-dashboard {
  width: 100%;
}

.hero-copy {
  max-width: 48rem;
}

.section,
.section-muted,
.section-dark {
  padding: 3.5rem 0;
}

.section-muted {
  background: var(--usra-bg);
}

.section-dark {
  color: var(--usra-white);
  background: var(--usra-blue-dark);
}

.section-heading {
  max-width: 52rem;
  margin-bottom: 2rem;
}

.section-heading-info {
  max-width: none;
}

.section-heading.text-center {
  margin-inline: auto;
}

.section-title-with-info {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: start;
}

.section-title-with-info h1 {
  margin: 0;
}

.portal-info-button {
  width: 2.5rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--usra-blue-dark);
  background: var(--usra-white);
  border: 1px solid rgba(0, 49, 131, 0.32);
  border-radius: 50%;
  box-shadow: 0 0.35rem 0.8rem rgba(23, 50, 77, 0.08);
}

.portal-info-button svg {
  width: 1.45rem;
  height: 1.45rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.portal-info-button:hover,
.portal-info-button:focus {
  color: var(--usra-white);
  background: var(--usra-blue-dark);
  border-color: var(--usra-blue-dark);
}

.section-ricostruzione-privata .portal-info-button,
.section-pareri .portal-info-button,
.section-territorio .portal-info-button {
  color: var(--usra-green);
  border-color: rgba(31, 122, 76, 0.36);
}

.section-ricostruzione-privata .portal-info-button:hover,
.section-ricostruzione-privata .portal-info-button:focus,
.section-pareri .portal-info-button:hover,
.section-pareri .portal-info-button:focus,
.section-territorio .portal-info-button:hover,
.section-territorio .portal-info-button:focus {
  color: var(--usra-white);
  background: var(--usra-green);
  border-color: var(--usra-green);
}

.eyebrow {
  margin-bottom: 0.35rem;
  color: var(--usra-muted);
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.section-dark .eyebrow,
.section-dark .section-lead {
  color: rgba(255, 255, 255, 0.82);
}

.section-heading h2,
.content-card h2,
.content-card h3 {
  letter-spacing: 0;
}

.content-card h3 {
  font-size: 1.5rem;
  line-height: 1.25;
}

.section-heading h2 {
  font-size: clamp(1.55rem, 2.3vw, 2.05rem);
}

.section-lead {
  color: var(--usra-muted);
  font-size: 1rem;
  line-height: 1.55;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.home-kpi-section {
  padding-top: 2.75rem;
  padding-bottom: 3rem;
}

.home-kpi-section .section-heading {
  margin-bottom: 1.45rem;
}

.home-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.35rem;
  align-items: start;
}

.dashboard-panel {
  min-width: 0;
  padding: 1.2rem;
  background: var(--usra-white);
  border: 1px solid var(--usra-line);
  border-left: 5px solid var(--scope-color, var(--usra-blue));
  border-radius: 8px;
  box-shadow: 0 0.75rem 1.5rem rgba(23, 50, 77, 0.08);
}

.dashboard-panel-private {
  --scope-color: var(--usra-green);
  --scope-soft: var(--usra-green-soft);
}

.dashboard-panel-public {
  --scope-color: var(--usra-blue);
  --scope-soft: var(--usra-blue-soft);
}

.panel-heading {
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--usra-line);
}

.panel-heading h3 {
  margin: 0;
  color: var(--scope-color, var(--usra-blue));
  font-size: 1.5rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
}

.panel-heading p {
  margin: 0.25rem 0 0;
  color: var(--usra-muted);
  font-size: 0.94rem;
  line-height: 1.45;
}

.compact-metric-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  margin-bottom: 1rem;
  gap: 0.8rem;
}

.public-home-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.metric-card,
.content-card,
.territory-card {
  height: 100%;
  background: var(--usra-white);
  border: 1px solid var(--usra-line);
  border-radius: 8px;
  box-shadow: 0 0.75rem 1.5rem rgba(23, 50, 77, 0.08);
}

.metric-card {
  padding: 0.95rem;
  border-top: 4px solid var(--usra-blue);
}

.compact-metric-grid .metric-card {
  display: flex;
  min-height: 8.4rem;
  flex-direction: column;
}

.dashboard-panel .metric-card {
  border-top-color: var(--scope-color, var(--usra-blue));
}

.metric-card.tone-green {
  border-top-color: var(--usra-green);
}

.metric-card.tone-teal {
  border-top-color: var(--usra-teal);
}

.metric-card.tone-amber {
  border-top-color: var(--usra-amber);
}

.dashboard-panel-private .metric-card {
  border-top-color: var(--usra-green);
}

.dashboard-panel-public .metric-card {
  border-top-color: var(--usra-blue);
}

.metric-label {
  min-height: 2.35rem;
  margin: 0 0 0.75rem;
  color: var(--usra-muted);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.73rem;
  line-height: 1.25;
}

.dashboard-panel .metric-label {
  color: var(--usra-muted);
}

.metric-value {
  margin: 0;
  color: var(--usra-blue-dark);
  font-size: clamp(1.12rem, 1.45vw, 1.42rem);
  font-weight: 700;
  line-height: 1.08;
  white-space: nowrap;
  overflow-wrap: normal;
  font-variant-numeric: tabular-nums;
}

.dashboard-panel .metric-value,
.dashboard-panel .card-link {
  color: var(--scope-color, var(--usra-blue));
}

.metric-note {
  margin: 0.65rem 0 0;
  color: var(--usra-muted);
}

.compact-metric-grid .metric-note {
  margin-top: auto;
}

.costs-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.35rem;
}

.home-costs-section {
  padding-bottom: 4.25rem;
}

.home-costs-section .table-responsive {
  overflow-x: visible;
}

.home-costs-section .cost-table {
  table-layout: fixed;
  font-size: 0.82rem;
}

.home-costs-section .cost-table caption {
  padding: 0.65rem 0.75rem;
  font-size: 0.9rem;
}

.home-costs-section .cost-table th,
.home-costs-section .cost-table td {
  min-width: 0;
  padding: 0.48rem 0.52rem;
  white-space: normal;
}

.home-costs-section .cost-table thead th {
  color: var(--usra-ink);
  background: #f1f3f5;
  font-size: 0.72rem;
  line-height: 1.16;
}

.home-costs-section .cost-table th:first-child {
  width: 30%;
}

.costs-card {
  min-width: 0;
}

.costs-card-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 0.55rem;
}

.costs-group-title {
  margin: 0;
  color: var(--usra-blue-dark);
  font-size: 1rem;
  font-weight: 700;
}

.costs-note {
  margin: 0;
  color: var(--usra-muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.cost-table {
  font-size: 1rem;
}

.cost-table caption {
  padding: 0.85rem 1rem;
  color: var(--usra-blue-dark);
  background: #eef4fa;
  caption-side: top;
  font-weight: 700;
  font-size: 0.98rem;
  text-align: left;
}

.cost-table thead th {
  font-size: 0.84rem;
  line-height: 1.25;
  text-transform: uppercase;
}

.cost-table tbody th {
  color: var(--usra-ink);
  font-weight: 700;
}

.cost-table tbody td {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.area-summary-card {
  height: 100%;
  padding: 1.5rem;
  background: var(--usra-white);
  border: 1px solid var(--usra-line);
  border-left: 5px solid var(--usra-blue);
  border-radius: 8px;
  box-shadow: 0 0.75rem 1.5rem rgba(23, 50, 77, 0.08);
}

.area-summary-card.accent-green {
  border-left-color: var(--usra-green);
}

.area-label {
  margin: 0 0 0.5rem;
  color: var(--usra-blue-dark);
  font-size: 1.5rem;
  font-weight: 700;
}

.area-value {
  margin: 0;
  color: var(--usra-blue-dark);
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
}

.area-note {
  margin: 0.6rem 0 0;
  color: var(--usra-muted);
  font-weight: 700;
  text-transform: uppercase;
}

.private-area-link {
  display: inline-flex;
  margin-top: 1.25rem;
  color: var(--usra-green);
  font-weight: 700;
}

.private-area-link:hover,
.private-area-link:focus {
  color: #145a38;
}

.private-section .eyebrow,
.section-ricostruzione-privata .eyebrow,
.section-pareri .eyebrow,
.section-territorio .eyebrow {
  color: var(--usra-muted);
}

.public-section .eyebrow,
.section-ricostruzione-pubblica .eyebrow {
  color: var(--usra-muted);
}

.private-section .area-summary-card,
.section-territorio .territory-card,
.section-ricostruzione-privata .content-card,
.section-pareri .content-card,
.section-territorio .content-card {
  border-left-color: var(--usra-green);
}

.section-territorio .territory-card {
  border-left: 5px solid var(--usra-green);
}

.public-section .content-card,
.section-ricostruzione-pubblica .content-card {
  border-left-color: var(--usra-blue);
}

.private-section .area-label,
.private-section .area-value,
.private-section .section-heading h2,
.private-section .costs-group-title,
.private-section .cost-table caption,
.section-ricostruzione-privata .section-heading h1,
.section-ricostruzione-privata .section-heading h2,
.section-pareri .section-heading h1,
.section-pareri .section-heading h2,
.section-territorio .section-heading h1,
.section-territorio .section-heading h2,
.section-ricostruzione-privata .metric-value,
.section-pareri .metric-value,
.section-territorio .metric-value,
.section-ricostruzione-privata .procedure-item strong,
.section-pareri .procedure-item strong,
.section-territorio .territory-card h3,
.section-territorio .map-dot-label {
  color: var(--usra-green);
}

.public-section .section-heading h2,
.section-ricostruzione-pubblica .section-heading h1,
.section-ricostruzione-pubblica .section-heading h2,
.section-ricostruzione-pubblica .metric-value,
.section-ricostruzione-pubblica .badge-state {
  color: var(--usra-blue);
}

.private-section .cost-table caption,
.section-ricostruzione-privata .cost-table caption,
.section-ricostruzione-privata .table thead th,
.section-pareri .table thead th,
.section-territorio .table thead th {
  color: var(--usra-green);
  background: var(--usra-green-soft);
}

.home-costs-section.private-section .cost-table thead th {
  color: var(--usra-ink);
  background: #f1f3f5;
}

.public-section .table thead th,
.section-ricostruzione-pubblica .table thead th,
.section-ricostruzione-pubblica .badge-state {
  color: var(--usra-blue);
  background: var(--usra-blue-soft);
}

.section-ricostruzione-privata .metric-card,
.section-pareri .metric-card,
.section-territorio .metric-card {
  border-top-color: var(--usra-green);
}

.section-ricostruzione-pubblica .metric-card {
  border-top-color: var(--usra-blue);
}

.section-territorio .map-dot,
.section-territorio .map-dot.is-large {
  background: var(--usra-green);
}

.content-card {
  padding: 1.4rem;
}

.content-card.accent-blue {
  border-left: 5px solid var(--usra-blue);
}

.content-card.accent-green {
  border-left: 5px solid var(--usra-green);
}

.content-card.accent-teal {
  border-left: 5px solid var(--usra-teal);
}

.content-card.accent-amber {
  border-left: 5px solid var(--usra-amber);
}

.content-card .card-link {
  font-weight: 700;
}

.section-ricostruzione-privata .content-card,
.section-pareri .content-card,
.section-territorio .content-card {
  border-left-color: var(--usra-green);
}

.section-ricostruzione-pubblica .content-card {
  border-left-color: var(--usra-blue);
}

.chart-box {
  min-height: 20rem;
  padding: 1rem;
  background: var(--usra-white);
  border: 1px solid var(--usra-line);
  border-radius: 8px;
}

.public-state-chart-box {
  display: grid;
  gap: 0.75rem;
}

.public-state-chart-canvas {
  min-height: 18rem;
}

.chart-total {
  display: inline-flex;
  width: fit-content;
  align-items: baseline;
  gap: 0.6rem;
  padding: 0.55rem 0.75rem;
  color: var(--usra-blue);
  background: var(--usra-blue-soft);
  border-radius: 6px;
}

.chart-total span {
  color: var(--usra-muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
}

.chart-total strong {
  font-size: 1.45rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.safety-compact-card {
  padding: 1rem;
}

.safety-compact-card .definition-list {
  gap: 0.45rem;
  margin-top: 0.65rem;
}

.safety-compact-card .definition-list div {
  padding-bottom: 0.45rem;
}

.safety-compact-card .definition-list dt,
.safety-compact-card .definition-list dd {
  font-size: 0.94rem;
}

.public-status-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.75rem;
  align-items: stretch;
}

.status-tile {
  position: relative;
  min-width: 0;
  padding: 0.95rem;
  background: var(--usra-white);
  border: 1px solid var(--usra-line);
  border-top: 4px solid var(--usra-blue);
  border-radius: 8px;
  box-shadow: 0 0.55rem 1.15rem rgba(23, 50, 77, 0.06);
}

.public-status-strip .status-tile:not(:last-of-type)::after {
  content: "";
  position: absolute;
  z-index: 2;
  top: 50%;
  right: -0.62rem;
  width: 0.72rem;
  height: 0.72rem;
  border-top: 2px solid var(--usra-blue);
  border-right: 2px solid var(--usra-blue);
  transform: translateY(-50%) rotate(45deg);
  background: var(--usra-white);
}

.status-tile p {
  margin: 0 0 0.45rem;
  color: var(--usra-muted);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
}

.status-tile strong {
  display: block;
  color: var(--usra-blue);
  font-size: 1.7rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.status-total {
  border-top-color: var(--usra-blue-dark);
}

.status-programmazione {
  border-top-color: #5b8def;
}

.status-progettazione {
  border-top-color: #2f7fc8;
}

.status-attuazione {
  border-top-color: var(--usra-blue);
}

.status-collaudo {
  border-top-color: #68a7e4;
}

.status-conclusi {
  border-top-color: var(--usra-blue-dark);
}

.status-strip-note {
  grid-column: 1 / -1;
  margin: 0.1rem 0 0;
  color: var(--usra-muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.public-percent-placeholder {
  min-height: 16rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.45rem;
  padding: 1.5rem;
  color: var(--usra-muted);
  background:
    linear-gradient(90deg, rgba(0, 89, 179, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(0, 89, 179, 0.08) 1px, transparent 1px),
    var(--usra-white);
  background-size: 2rem 2rem;
  border: 1px dashed rgba(0, 89, 179, 0.45);
  border-left: 5px solid var(--usra-blue);
  border-radius: 8px;
}

.public-percent-placeholder strong {
  color: var(--usra-blue);
  font-size: 1.5rem;
  line-height: 1.2;
}

.public-percent-placeholder p {
  max-width: 40rem;
  margin: 0;
}

.chart-placeholder {
  min-height: 20rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.45rem;
  padding: 2rem;
  color: var(--usra-muted);
  background:
    linear-gradient(90deg, rgba(31, 122, 76, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(31, 122, 76, 0.08) 1px, transparent 1px),
    var(--usra-white);
  background-size: 2.2rem 2.2rem;
  border: 1px dashed rgba(31, 122, 76, 0.45);
  border-radius: 8px;
}

.territory-map-placeholder {
  min-height: 14rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.45rem;
  padding: 2rem;
  color: var(--usra-muted);
  background: var(--usra-white);
  border: 1px dashed rgba(31, 122, 76, 0.45);
  border-left: 5px solid var(--usra-green);
  border-radius: 8px;
}

.territory-map-placeholder strong {
  color: var(--usra-green);
  font-size: clamp(1.3rem, 2vw, 1.75rem);
  line-height: 1.15;
}

.territory-map-placeholder p {
  max-width: 36rem;
  margin: 0;
}

.chart-placeholder strong {
  color: var(--usra-green);
  font-size: clamp(1.35rem, 2.2vw, 1.9rem);
  line-height: 1.15;
}

.chart-placeholder p {
  max-width: 38rem;
  margin: 0;
}

.placeholder-kicker {
  color: var(--usra-muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.private-focus-grid {
  display: grid;
  /*grid-template-columns: minmax(0, 2fr) minmax(18rem, 0.9fr);*/
  gap: 1.25rem;
  align-items: stretch;
}

.private-insight-card {
  display: flex;
  flex-direction: column;
}

.private-insight-card .card-link {
  margin-top: auto;
}

.comparison-panel {
  display: grid;
  grid-template-columns: minmax(20rem, 0.85fr) minmax(0, 1.15fr);
  gap: 1.25rem;
  align-items: stretch;
}

.ratio-list {
  display: grid;
  gap: 0.85rem;
  min-width: 0;
  padding: 1.1rem;
  background: var(--usra-white);
  border: 1px solid rgba(31, 122, 76, 0.32);
  border-left: 5px solid var(--usra-green);
  border-radius: 8px;
  box-shadow: 0 0.75rem 1.5rem rgba(23, 50, 77, 0.07);
}

.ratio-row {
  display: grid;
  gap: 0.55rem;
}

.ratio-heading {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.55rem;
  align-items: baseline;
}

.ratio-row strong {
  display: block;
}

.ratio-row strong {
  color: var(--usra-green);
  line-height: 1.2;
}

.ratio-values {
  color: var(--usra-muted);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.25;
}

.ratio-progress {
  display: grid;
  grid-template-columns: minmax(9rem, 1fr) auto;
  gap: 0.85rem;
  align-items: center;
}

.ratio-percent {
  color: var(--usra-green);
  font-size: 1.12rem;
  font-variant-numeric: tabular-nums;
}

.ratio-bar {
  height: 0.8rem;
  overflow: hidden;
  background: #e9edf2;
  border-radius: 999px;
}

.ratio-bar span {
  display: block;
  height: 100%;
  background: var(--usra-green);
  border-radius: inherit;
}

.territory-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: start;
}

.territory-title-row h1 {
  margin: 0;
}

.section-ricostruzione-pubblica .public-detail-heading {
  max-width: none;
}

.section-territorio .territory-detail-heading {
  max-width: none;
}

.territory-back-link {
  justify-self: end;
  margin-top: 0.45rem;
  white-space: nowrap;
  font-weight: 700;
}

.section-territorio .territory-back-link {
  justify-self: end;
  text-align: right;
  color: var(--usra-green);
}

.section-territorio .territory-back-link:hover,
.section-territorio .territory-back-link:focus {
  color: var(--usra-green);
  text-decoration-thickness: 0.12em;
}

.section-ricostruzione-pubblica .public-back-link {
  justify-self: end;
  text-align: right;
  color: var(--usra-blue);
}

.section-ricostruzione-pubblica .public-back-link:hover,
.section-ricostruzione-pubblica .public-back-link:focus {
  color: var(--usra-blue);
  text-decoration-thickness: 0.12em;
}

.detail-description-row td {
  color: var(--usra-muted);
  background: #f8fafc;
  font-weight: 700;
}

.chart-box svg {
  display: block;
  width: 100%;
  min-height: 18rem;
}

.pie-chart-box {
  min-height: 25rem;
}

.pie-chart-box svg {
  min-height: 24rem;
}

.pie-label {
  fill: var(--usra-ink);
  font-size: 0.82rem;
  font-weight: 700;
}

.pie-value {
  fill: var(--usra-muted);
  font-size: 0.78rem;
}

.bar-label {
  fill: var(--usra-ink);
  font-size: 0.9rem;
  font-weight: 600;
}

.bar-value {
  fill: var(--usra-muted);
  font-size: 0.82rem;
}

.bar-track {
  fill: #e9edf2;
}

.bar-fill-blue {
  fill: var(--usra-blue);
}

.bar-fill-green {
  fill: var(--usra-green);
}

.bar-fill-teal {
  fill: var(--usra-teal);
}

.bar-fill-amber {
  fill: var(--usra-amber);
}

.private-section .chart-box,
.section-ricostruzione-privata .chart-box,
.section-pareri .chart-box,
.section-territorio .chart-box {
  border-color: rgba(31, 122, 76, 0.35);
}

.section-pareri .private-practices-section .chart-box {
  min-height: 32rem;
}

.public-section .chart-box,
.section-ricostruzione-pubblica .chart-box {
  border-color: rgba(0, 89, 179, 0.35);
}

.private-section .bar-label,
.section-ricostruzione-privata .bar-label,
.section-pareri .bar-label,
.section-territorio .bar-label {
  fill: var(--usra-green);
}

.public-section .bar-label,
.public-section .pie-label,
.section-ricostruzione-pubblica .bar-label,
.section-ricostruzione-pubblica .pie-label {
  fill: var(--usra-blue);
}

.data-table {
  vertical-align: middle;
  font-size: 1rem;
  line-height: 1.35;
}

.table-responsive {
  overflow-x: auto;
  border: 1px solid var(--usra-line);
  border-radius: 8px;
  background: var(--usra-white);
  box-shadow: 0 0.45rem 1.15rem rgba(23, 50, 77, 0.06);
}

.table-responsive-full {
  width: 100%;
}

.table-responsive .table {
  margin-bottom: 0;
}

.data-table th,
.data-table td {
  padding: 0.72rem 0.85rem;
  vertical-align: middle;
}

.data-table tbody th,
.data-table tfoot th {
  color: var(--usra-ink);
  font-weight: 700;
}

.data-table td,
.data-table tfoot td {
  font-variant-numeric: tabular-nums;
}

.data-table tfoot th,
.data-table tfoot td {
  font-weight: 700;
}

.table thead th {
  color: var(--usra-blue-dark);
  background: #eef4fa;
  font-size: 0.84rem;
  line-height: 1.25;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.table a {
  font-weight: 700;
}

.section-ricostruzione-privata .private-territory-section .table a,
.section-ricostruzione-privata .map-popup-link,
.section-territorio .territory-card a,
.section-territorio .data-table a,
.section-territorio .map-popup-link {
  color: var(--usra-green);
}

.section-ricostruzione-privata .private-territory-section .table a:hover,
.section-ricostruzione-privata .private-territory-section .table a:focus,
.section-ricostruzione-privata .map-popup-link:hover,
.section-ricostruzione-privata .map-popup-link:focus,
.section-territorio .territory-card a:hover,
.section-territorio .territory-card a:focus,
.section-territorio .data-table a:hover,
.section-territorio .data-table a:focus,
.section-territorio .map-popup-link:hover,
.section-territorio .map-popup-link:focus {
  color: #145a38;
}

.public-top-works-table {
  width: 100%;
  table-layout: fixed;
  font-size: 0.88rem;
  line-height: 1.22;
}

.public-top-works-table .top-work-col-title {
  width: 38%;
}

.public-top-works-table .top-work-col-cup {
  width: 13%;
}

.public-top-works-table .top-work-col-actor {
  width: 19%;
}

.public-top-works-table .top-work-col-state {
  width: 16%;
}

.public-top-works-table .top-work-col-cost {
  width: 14%;
}

.public-top-works-table th,
.public-top-works-table td {
  padding: 0.5rem 0.55rem;
}

.public-top-works-table thead th {
  font-size: 0.72rem;
  line-height: 1.12;
  white-space: normal;
}

.public-top-works-table .top-work-title,
.public-top-works-table .top-work-actor,
.public-top-works-table .top-work-cup {
  overflow-wrap: anywhere;
  word-break: normal;
}

.public-top-works-table .top-work-cost {
  text-align: right;
  white-space: nowrap;
}

.public-top-works-table .badge-state {
  min-height: 1.55rem;
  padding: 0.24rem 0.42rem;
  font-size: 0.7rem;
  line-height: 1.1;
}

.public-actor-works-table {
  width: 100%;
  table-layout: fixed;
  font-size: 0.84rem;
  line-height: 1.2;
}

.public-actor-works-table .actor-work-col-cup {
  width: 14%;
}

.public-actor-works-table .actor-work-col-cost,
.public-actor-works-table .actor-work-col-funded,
.public-actor-works-table .actor-work-col-paid {
  width: 13%;
}

.public-actor-works-table .actor-work-col-state {
  width: 17%;
}

.public-actor-works-table .actor-work-col-date {
  width: 12%;
}

.public-actor-works-table .actor-work-col-type {
  width: 18%;
}

.public-actor-works-table th,
.public-actor-works-table td {
  padding: 0.48rem 0.5rem;
}

.public-actor-works-table thead th {
  font-size: 0.68rem;
  line-height: 1.08;
  white-space: normal;
  overflow-wrap: anywhere;
}

.public-actor-works-table .actor-work-cup,
.public-actor-works-table .actor-work-state,
.public-actor-works-table .actor-work-type,
.public-actor-works-table .detail-description-row td {
  overflow-wrap: anywhere;
  word-break: normal;
}

.public-actor-works-table .actor-work-amount {
  text-align: right;
  white-space: nowrap;
}

.public-actor-works-table .actor-work-date {
  text-align: center;
  white-space: normal;
}

.public-actor-works-table .badge-state {
  min-height: 1.55rem;
  padding: 0.24rem 0.42rem;
  font-size: 0.68rem;
  line-height: 1.1;
}

.public-actor-works-table .detail-description-row td {
  padding: 0.42rem 0.5rem 0.55rem;
  font-size: 0.78rem;
  line-height: 1.22;
}

@media (max-width: 767.98px) {
  .public-actor-works-table {
    min-width: 58rem;
  }

  .public-actor-works-table th,
  .public-actor-works-table td {
    padding: 0.45rem 0.5rem;
  }

  .public-actor-works-table .badge-state {
    max-width: 100%;
    white-space: normal;
  }
}

.badge-state {
  display: inline-flex;
  align-items: center;
  min-height: 1.9rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  color: var(--usra-blue-dark);
  background: var(--usra-blue-soft);
  border: 1px solid transparent;
  font-weight: 700;
}

.badge-state.badge-state-programmazione {
  color: #6b3d00;
  background: #fff0bf;
  border-color: #c98200;
}

.badge-state.badge-state-progettazione {
  color: #005257;
  background: #d7f4ee;
  border-color: #009681;
}

.badge-state.badge-state-attuazione {
  color: #003f8f;
  background: #dbeaff;
  border-color: #2d78da;
}

.badge-state.badge-state-collaudo {
  color: #5b2a86;
  background: #f1dcff;
  border-color: #9d58c7;
}

.badge-state.badge-state-concluso {
  color: #155f35;
  background: #d8f3df;
  border-color: #2f9b5b;
}

.badge-state.badge-state-intervento-chiuso {
  color: #26313d;
  background: #dde3eb;
  border-color: #77879a;
}

.badge-state.badge-state-undefined {
  color: #6a1f2b;
  background: #fde2e7;
  border-color: #c65a68;
}

.usra-year-tabs {
  gap: 0.35rem;
  margin-bottom: 0;
  border-bottom: 1px solid var(--usra-line);
}

.usra-year-tabs .nav-link {
  min-height: 2.75rem;
  color: var(--usra-muted);
  border-radius: 6px 6px 0 0;
  font-weight: 700;
}

.usra-year-tabs .nav-link:hover,
.usra-year-tabs .nav-link:focus {
  color: var(--usra-green);
  border-color: var(--usra-line);
}

.usra-year-tabs .nav-link.active {
  color: var(--usra-green);
  border-color: var(--usra-line) var(--usra-line) var(--usra-white);
}

.pareri-history-section .usra-year-tabs {
  flex-wrap: nowrap;
  gap: 0.2rem;
  overflow-x: auto;
  padding-bottom: 0.2rem;
}

.pareri-history-section .usra-year-tabs .nav-item {
  flex: 0 0 auto;
}

.pareri-history-section .usra-year-tabs .nav-link {
  min-width: 3.15rem;
  min-height: 2.15rem;
  justify-content: center;
  padding: 0.32rem 0.5rem;
  font-size: 0.86rem;
  line-height: 1;
  border-radius: 4px 4px 0 0;
}

.usra-data-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 0;
}

.usra-data-tabs .nav-item {
  display: flex;
}

.usra-data-tabs .nav-link {
  width: 100%;
  justify-content: center;
  white-space: normal;
}

.section-ricostruzione-pubblica .usra-year-tabs .nav-link:hover,
.section-ricostruzione-pubblica .usra-year-tabs .nav-link:focus,
.section-ricostruzione-pubblica .usra-year-tabs .nav-link.active {
  color: var(--usra-blue);
}

.usra-year-tab-content {
  padding: 1.25rem;
  background: var(--usra-white);
  border: 1px solid var(--usra-line);
  border-top: 0;
  border-radius: 0 0 8px 8px;
}

.pareri-history-section .usra-year-tab-content {
  padding: 0.75rem;
}

.history-table-block + .history-table-block {
  margin-top: 2rem;
}

.history-table-block h3 {
  margin: 0 0 0.85rem;
  color: var(--usra-green);
  font-size: 1.38rem;
  font-weight: 700;
}

.table.pareri-history-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  font-size: 0.78rem;
  line-height: 1.18;
}

.table.pareri-history-table th,
.table.pareri-history-table td {
  padding: 0.42rem 0.35rem;
  white-space: normal;
  vertical-align: middle;
}

.table.pareri-history-table thead th {
  font-size: 0.66rem;
  line-height: 1.08;
  text-align: center;
  overflow-wrap: anywhere;
}

.table.pareri-history-table th:first-child {
  width: 5.7rem;
}

.table.pareri-history-table td {
  text-align: right;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.table.pareri-history-table tbody th,
.table.pareri-history-table tfoot th {
  overflow-wrap: anywhere;
}

.pareri-history-table tfoot th,
.pareri-history-table tfoot td {
  color: var(--usra-green);
  background: var(--usra-green-soft);
  font-weight: 700;
}

.section-ricostruzione-pubblica .data-table tfoot th,
.section-ricostruzione-pubblica .data-table tfoot td {
  color: var(--usra-blue);
  background: var(--usra-blue-soft);
}

.section-ricostruzione-privata .data-table tfoot th,
.section-ricostruzione-privata .data-table tfoot td,
.section-territorio .data-table tfoot th,
.section-territorio .data-table tfoot td {
  color: var(--usra-green);
  background: var(--usra-green-soft);
}

.definition-list {
  display: grid;
  gap: 0.85rem;
  margin: 1rem 0 0;
}

.definition-list div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--usra-line);
}

.definition-list div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.definition-list dt {
  color: var(--usra-muted);
  font-weight: 700;
}

.definition-list dd {
  margin: 0;
  color: var(--usra-blue);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.map-panel {
  position: relative;
  min-height: 30rem;
  overflow: hidden;
  background: linear-gradient(160deg, #e9f4f7, #f7fbf7);
  border: 1px solid var(--usra-line);
  border-radius: 8px;
}

.map-panel::before {
  content: "";
  position: absolute;
  inset: 1.5rem;
  border: 1px dashed rgba(23, 50, 77, 0.25);
  border-radius: 48% 52% 46% 54%;
}

.map-dot {
  position: absolute;
  width: 0.9rem;
  height: 0.9rem;
  transform: translate(-50%, -50%);
  border: 2px solid var(--usra-white);
  border-radius: 50%;
  background: var(--usra-blue);
  box-shadow: 0 0.25rem 0.7rem rgba(23, 50, 77, 0.25);
}

.map-dot.is-large {
  width: 1.35rem;
  height: 1.35rem;
  background: var(--usra-red);
}

.map-dot-label {
  position: absolute;
  transform: translate(0.55rem, -50%);
  min-width: 8rem;
  color: var(--usra-blue-dark);
  font-weight: 700;
  font-size: 0.78rem;
}

.territory-card {
  padding: 1rem;
}

.territory-card h3 {
  min-height: 2.4rem;
  font-size: 1.3rem;
}

.filter-row {
  display: grid;
  grid-template-columns: minmax(12rem, 24rem) auto;
  gap: 1rem;
  align-items: end;
  margin-bottom: 1rem;
}

.form-control {
  min-height: 3rem;
}

.procedure-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
}

.procedure-item {
  padding: 1rem;
  border: 1px solid var(--usra-line);
  border-radius: 8px;
  background: var(--usra-white);
}

.procedure-item strong {
  display: block;
  color: var(--usra-blue-dark);
}

.cost-table th,
.cost-table td {
  min-width: 8.5rem;
  padding: 0.72rem 0.85rem;
  vertical-align: middle;
}

.footer-brand {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 2rem;
}

.footer-title {
  margin: 0;
  color: var(--usra-white);
  font-size: 1.25rem;
  font-weight: 700;
}

.footer-subtitle {
  margin: 0.2rem 0 0;
  color: rgba(255, 255, 255, 0.78);
}

.footer-list {
  padding-left: 1.1rem;
}

.it-footer a,
.it-footer-main,
.content-info {
  color: var(--usra-white);
  background-color: #003183;
}

.it-footer-main {
  padding-top: 4rem;
  padding-bottom: 4rem;
}

.it-footer-bottom {
  padding: 0.85rem 0 1rem;
  color: rgba(255, 255, 255, 0.78);
  background-color: #003183;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
}

.it-footer-bottom p {
  margin: 0;
  font-size: 0.88rem;
}

.portal-info-modal .modal-content {
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--usra-line);
  border-radius: 8px;
  box-shadow: 0 1.25rem 2.8rem rgba(23, 50, 77, 0.22);
}

.portal-info-modal .modal-dialog {
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
}

.portal-info-modal .modal-header {
  flex: 0 0 auto;
  color: var(--usra-white);
  background: var(--usra-blue-dark);
  border-bottom: 0;
}

.portal-info-modal .modal-title {
  font-weight: 700;
}

.portal-info-modal .btn-close {
  filter: invert(1) grayscale(1) brightness(2);
  opacity: 0.9;
}

.portal-info-modal .modal-body {
  min-height: 0;
  overflow-y: auto;
  padding: 1.25rem;
  color: var(--usra-ink);
  background: #f6f8fb;
  font-size: 0.95rem;
  line-height: 1.5;
}

.portal-info-intro {
  margin-bottom: 1rem;
  padding: 0.95rem 1rem;
  color: var(--usra-blue-dark);
  background: var(--usra-white);
  border: 1px solid var(--usra-line);
  border-left: 5px solid var(--usra-blue-dark);
  border-radius: 8px;
}

.portal-info-intro strong {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 1.05rem;
}

.portal-info-intro p,
.portal-info-block p,
.portal-info-block ul,
.portal-info-definitions,
.portal-legend-list {
  margin-bottom: 0;
}

.portal-info-block p + p,
.portal-info-block p + .portal-info-list,
.portal-info-block p + .portal-info-definitions,
.portal-info-list + p {
  margin-top: 0.65rem;
}

.portal-info-section {
  overflow: hidden;
  margin-top: 1rem;
  background: var(--usra-white);
  border: 1px solid var(--usra-line);
  border-radius: 8px;
}

.portal-info-section > h3 {
  margin: 0;
  padding: 0.85rem 1rem;
  color: var(--usra-white);
  background: var(--usra-blue-dark);
  font-size: 1.32rem;
  font-weight: 700;
}

.portal-info-private > h3 {
  background: var(--usra-green);
}

.portal-info-public > h3 {
  background: var(--usra-blue);
}

.portal-info-block {
  padding: 1rem;
  border-top: 1px solid var(--usra-line);
}

.portal-info-block h4 {
  margin: 0 0 0.55rem;
  color: var(--usra-ink);
  font-size: 1.08rem;
  font-weight: 700;
}

.portal-info-definitions {
  display: grid;
  gap: 0.6rem;
}

.portal-info-definitions dt,
.portal-legend-item dt {
  color: var(--usra-ink);
  font-weight: 700;
}

.portal-info-definitions dd,
.portal-legend-item dd {
  margin: 0.16rem 0 0;
}

.portal-legend-list {
  display: grid;
  gap: 0.6rem;
}

.portal-legend-item {
  padding: 0.7rem 0.8rem;
  background: #fbfcfe;
  border: 1px solid var(--usra-line);
  border-left: 6px solid var(--usra-blue);
  border-radius: 6px;
}

.portal-legend-item dd {
  font-style: italic;
}

.portal-legend-item.legend-vp {
  border-left-color: #8b5cf6;
}

.portal-legend-item.legend-np {
  border-left-color: #d4a000;
}

.portal-legend-item.legend-ae {
  border-left-color: var(--usra-green);
}

.portal-legend-item.legend-r {
  border-left-color: #36aac2;
}

.portal-info-list {
  padding-left: 1.15rem;
}

.portal-info-record {
  background: #f8fafc;
}

.note {
  color: var(--usra-muted);
  font-size: 0.94rem;
}

 .chart-controls {
   margin-bottom: 16px;
 }

.controls-label,
.filter-label {
  display: block;
  font-size: 0.85rem;
  text-transform: uppercase;
  margin-bottom: 8px;
  color: #666;
}

.controls-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.controls-list li a {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 20px;
  background: #f1f3f5;
  text-decoration: none;
  color: #333;
  font-size: 0.9rem;
}

.section-pareri .private-practices-filters .btn-default,
.section-pareri .private-practices-filters .btn-default:visited {
  color: var(--usra-green);
  background: var(--usra-white);
  border-color: rgba(31, 122, 76, 0.42);
  font-weight: 700;
}

.section-pareri .private-practices-filters .btn-default:hover,
.section-pareri .private-practices-filters .btn-default:focus {
  color: var(--usra-green);
  background: var(--usra-green-soft);
  border-color: var(--usra-green);
}

.section-pareri .private-practices-filters .btn-default.active {
  color: var(--usra-white);
  background: var(--usra-green);
  border-color: var(--usra-green);
}

.section-ricostruzione-privata .controls-list li a,
.section-territorio .controls-list li a {
  color: var(--usra-green);
  background: var(--usra-white);
  border: 1px solid rgba(31, 122, 76, 0.35);
  font-weight: 700;
}

.section-ricostruzione-privata .controls-list li a:hover,
.section-ricostruzione-privata .controls-list li a:focus,
.section-territorio .controls-list li a:hover,
.section-territorio .controls-list li a:focus {
  color: var(--usra-green);
  background: var(--usra-green-soft);
  border-color: var(--usra-green);
}

.controls-list li.current a {
  background: #0059b3;
  color: #fff;
}

.private-practices-filters {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.filter-group {
  min-width: 0;
}

.filter-group .btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.filter-group .btn-group .btn {
  margin: 0;
  white-space: normal;
}

.date-range-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(8.5rem, 1fr));
  gap: 0.55rem;
}

.date-range-field {
  min-width: 0;
}

.date-range-field label {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--usra-muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.date-range-field .form-control {
  min-height: 2.6rem;
  font-size: 0.95rem;
}

.section-ricostruzione-privata .controls-list li.current a,
.section-territorio .controls-list li.current a {
  color: var(--usra-white);
  background: var(--usra-green);
  border-color: var(--usra-green);
}

.section-ricostruzione-privata .private-pareri-section .controls-list li a {
  --procedure-color: var(--usra-green);
  color: var(--procedure-color);
  background: var(--usra-white);
  border-color: currentColor;
}

.section-ricostruzione-privata .private-pareri-section .controls-list li a.vp {
  --procedure-color: #8b5cf6;
}

.section-ricostruzione-privata .private-pareri-section .controls-list li a.np,
.section-ricostruzione-privata .private-pareri-section .controls-list li a.np2 {
  --procedure-color: #d4a000;
}

.section-ricostruzione-privata .private-pareri-section .controls-list li a.ae {
  --procedure-color: var(--usra-green);
}

.section-ricostruzione-privata .private-pareri-section .controls-list li a.rf {
  --procedure-color: #36aac2;
}

.section-ricostruzione-privata .private-pareri-section .controls-list li a:hover,
.section-ricostruzione-privata .private-pareri-section .controls-list li a:focus {
  color: var(--procedure-color);
  background: #f8fafc;
  border-color: var(--procedure-color);
}

.section-ricostruzione-privata .private-pareri-section .controls-list li.current a {
  color: var(--usra-white);
  background: var(--procedure-color);
  border-color: var(--procedure-color);
}

.territory-map {
  width: 100%;
  min-height: 420px;
  border-radius: 24px;
  overflow: hidden;
  background: #eef2f5;
}

.custom-map-marker {
  display: block;
}

.map-popup {
  min-width: 220px;
  color: #17324d;
  font-size: 0.9rem;
}

.map-popup strong {
  display: block;
  margin-bottom: 8px;
  color: #0059b3;
  font-size: 1rem;
}

.map-popup p {
  margin: 0 0 6px;
}

.map-popup-link {
  display: inline-flex;
  margin-top: 8px;
  color: #0059b3;
  font-weight: 700;
  text-decoration: underline;
}

@media (max-width: 1199.98px) {
  .page-hero.page-hero-dashboard {
    padding-top: 1rem;
    padding-bottom: 1rem;
  }

  .page-hero.page-hero-dashboard h1 {
    font-size: 2.45rem;
    line-height: 1.12;
  }

  .page-hero.page-hero-dashboard .lead {
    font-size: 1.08rem;
    line-height: 1.48;
  }
}

@media (max-width: 991.98px) {
  .it-nav-wrapper {
    display: flex;
    flex-direction: column;
  }

  .it-header-center-wrapper {
    order: 1;
  }

  .it-header-navbar-wrapper {
    order: 2;
    position: relative;
    z-index: 2;
  }

  .it-header-slim-wrapper-content {
    align-items: flex-start;
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
  }

  .it-header-slim-wrapper .list-item {
    font-size: 0.82rem;
    line-height: 1.25;
  }

  .metric-grid,
  .procedure-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-dashboard-grid,
  .costs-grid,
  .private-focus-grid,
  .comparison-panel {
    grid-template-columns: 1fr;
  }

  .public-status-strip {
    grid-template-columns: 1fr;
  }

  .public-status-strip .status-tile:not(:last-of-type)::after {
    top: auto;
    right: 50%;
    bottom: -0.62rem;
    transform: translateX(50%) rotate(135deg);
  }

  .compact-metric-grid,
  .public-home-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .it-header-slim-right-zone {
    width: 100%;
    gap: 0.35rem 0.65rem;
    justify-content: flex-start;
  }

  .it-header-center-wrapper .it-header-center-content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0.85rem;
  }

  .it-header-center-wrapper .it-brand-wrapper {
    width: 100%;
  }

  .header-social {
    width: 100%;
    justify-content: flex-start;
    padding-top: 0;
  }

  .social-link {
    width: 2.05rem;
    height: 2.05rem;
  }

  .it-header-navbar-wrapper .navbar {
    min-height: auto;
    display: flex;
    justify-content: flex-end;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
  }

  .navbar-toggler {
    position: static !important;
    inset: auto !important;
    transform: none !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.75rem !important;
    color: var(--usra-white);
    background: transparent;
    border-color: rgba(255, 255, 255, 0.55);
    border-radius: 4px;
  }

  .navbar-toggler-icon {
    width: 1.35rem;
    height: 1.35rem;
    filter: brightness(0) invert(1);
  }

  .navbar-toggler-label {
    display: inline;
    color: var(--usra-white);
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1;
  }

  .navbar-collapse {
    width: 100%;
    margin-top: 0.35rem;
  }

  .navbar-nav {
    width: 100%;
  }

  .navbar .nav-link {
    min-height: 2.75rem;
    justify-content: space-between;
    padding: 0.7rem 0.85rem !important;
    white-space: normal;
  }

  .navbar .dropdown-menu {
    position: static;
    width: 100%;
    margin: 0 0 0.55rem;
    border: 0;
    border-radius: 6px;
    box-shadow: none;
  }

  .page-hero .container {
    min-height: 20rem;
  }

  .page-hero-dashboard .container {
    min-height: 16rem;
  }
}

@media (max-width: 575.98px) {
  .it-header-wrapper .it-header-slim-wrapper {
    display: none;
  }

  .it-nav-wrapper {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 3.2rem;
    align-items: stretch;
    background: var(--usra-blue);
    border-bottom: 1px solid var(--usra-white);
  }

  .it-header-wrapper .it-header-center-wrapper .it-header-center-content-wrapper {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.55rem;
    /*min-height: 4.45rem;*/
    padding: 0.35rem 0 !important;
  }

  .it-header-center-wrapper {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    padding-left: 9px !important;
    background: transparent;
  }

  .it-header-wrapper .it-header-center-wrapper .container {
    width: 100%;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .it-header-wrapper .it-header-center-wrapper .it-brand-wrapper {
    width: 100%;
    min-width: 0;
    display: block;
    margin: 0 !important;
    padding: 0 !important;
  }

  .it-header-navbar-wrapper,
  .it-header-navbar-wrapper > .container,
  .it-header-navbar-wrapper .navbar {
    display: contents;
  }

  .it-header-wrapper .it-brand-wrapper a {
    min-width: 0;
    align-items: center;
    justify-content: flex-start;
    gap: 0.55rem !important;
    width: 100%;
  }

  .metric-grid,
  .procedure-list,
  .compact-metric-grid,
  .public-home-grid,
  .costs-grid,
  .filter-row {
    grid-template-columns: 1fr;
  }

  .it-header-wrapper .it-brand-wrapper a .brand-logo {
    width: 7.2rem !important;
    flex: 0 0 auto;
  }

  .it-header-wrapper .it-brand-wrapper a .it-brand-text {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
  }

  .it-header-wrapper .it-brand-wrapper a .it-brand-text .it-brand-title {
    display: block;
    max-width: calc(100vw - 12.1rem);
    overflow: visible;
    font-size: 1rem !important;
    line-height: 1.12 !important;
    font-weight: 700 !important;
    white-space: normal;
  }

  .it-brand-tagline {
    display: none !important;
  }

  .social-label {
    display: none;
  }

  .header-social {
    display: none;
  }

  .navbar-toggler {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    justify-self: end;
    width: 2.55rem !important;
    min-height: 2.55rem;
    margin: 0 0.5rem 0 0.15rem;
    padding: 0.48rem !important;
    border-color: rgba(255, 255, 255, 0.65);
  }

  .navbar-toggler-label {
    display: none;
  }

  .navbar-collapse {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    margin-top: 0;
    padding: 0.45rem 1rem 1rem;
    background: var(--usra-blue-dark);
    border-top: 1px solid rgba(255, 255, 255, 0.24);
  }

  .navbar .dropdown-menu:not(.private-nav-menu) {
    background: rgba(255, 255, 255, 0.96);
  }

  .navbar .private-nav-menu {
    background: var(--usra-blue-dark);
  }

  .mobile-menu-extra {
    display: grid;
    gap: 0.85rem;
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.22);
  }

  .mobile-utility-links {
    display: grid;
    gap: 0.45rem;
  }

  .mobile-utility-links a {
    color: var(--usra-white);
    font-weight: 700;
  }

  .mobile-menu-social {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
  }

  .social-link {
    width: 1.75rem;
    height: 1.75rem;
  }

  .social-link svg {
    width: 0.95rem;
    height: 0.95rem;
  }

  .metric-value {
    font-size: 1.28rem;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .metric-label {
    min-height: 0;
  }

  .dashboard-panel,
  .metric-card,
  .content-card,
  .area-summary-card {
    padding: 1rem;
  }

  .compact-metric-grid .metric-card {
    min-height: auto;
  }

  .area-label {
    font-size: 1.32rem;
  }

  .area-value {
    font-size: 2.35rem;
  }

  .page-hero.page-hero-dashboard {
    background-image:
      linear-gradient(90deg, rgba(0, 49, 131, 0.92) 0%, rgba(0, 49, 131, 0.78) 100%),
      url("../img/hero-background.png");
    background-position: center, 60% center;
    background-size: cover, cover;
    padding-top: 1rem;
    padding-bottom: 1rem;
  }

  .page-hero .container {
    min-height: auto;
    padding-top: 2rem;
    padding-bottom: 2rem;
  }

  .page-hero-dashboard .container {
    min-height: 14rem;
  }

  .page-hero h1 {
    font-size: 2rem;
    line-height: 1.12;
  }

  .page-hero .lead {
    font-size: 1rem;
  }

  .hero-actions {
    align-items: stretch;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
    white-space: normal;
  }

  .data-table,
  .cost-table {
    font-size: 0.88rem;
  }

  .data-table th,
  .data-table td,
  .cost-table th,
  .cost-table td {
    padding: 0.55rem 0.62rem;
  }

  .table-responsive {
    -webkit-overflow-scrolling: touch;
  }

  .home-costs-section .table-responsive {
    overflow-x: auto;
  }

  .home-costs-section .cost-table {
    min-width: 34rem;
  }

  .pareri-history-section .usra-year-tab-content {
    padding: 0.45rem;
  }

  .table.pareri-history-table {
    min-width: 42rem;
  }

  .private-practices-filters .btn-group .btn,
  .controls-list li a {
    min-height: 2.35rem;
    padding: 0.5rem 0.75rem;
    line-height: 1.2;
  }

  .definition-list div {
    display: grid;
    gap: 0.2rem;
  }

  .definition-list dd {
    text-align: left;
  }

  .ratio-row {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }

  .public-status-strip {
    grid-template-columns: 1fr;
  }

  .territory-title-row {
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }

  .section-title-with-info {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.65rem;
  }

  .portal-info-button {
    width: 2.25rem;
    height: 2.25rem;
  }

  .portal-info-modal .modal-dialog,
  .portal-info-modal .modal-content {
    max-height: calc(100vh - 1rem);
    max-height: calc(100dvh - 1rem);
  }

  .portal-info-modal .modal-body {
    padding: 0.85rem;
  }

  .territory-back-link {
    justify-self: start;
    margin-top: 0;
    white-space: normal;
    text-align: left;
  }

  .section-territorio .territory-back-link,
  .section-ricostruzione-pubblica .public-back-link {
    justify-self: start;
    text-align: left;
  }

  .territory-title-row + .section-lead {
    margin-top: 1rem;
  }

  .chart-placeholder {
    min-height: 15rem;
    padding: 1.25rem;
  }

  .territory-map-placeholder {
    min-height: 12rem;
    padding: 1.25rem;
  }

  .section,
  .section-muted,
  .section-dark {
    padding: 2.5rem 0;
  }

  .map-dot-label {
    display: none;
  }
    .footer-brand {
        display: inline-block;
        margin-top: -2rem;
    }
    .footer-logo {
        margin-bottom: 1rem;
    }
}

@media (max-width: 379.98px) {
  .it-header-wrapper .it-brand-wrapper a .brand-logo {
    width: 6.7rem !important;
  }

  .it-header-wrapper .it-brand-wrapper a .it-brand-text .it-brand-title {
    max-width: calc(100vw - 11.5rem);
    font-size: 0.9rem !important;
  }

  .header-social {
    gap: 0.22rem;
  }

  .social-link {
    width: 1.58rem;
    height: 1.58rem;
  }

  .social-link svg {
    width: 0.82rem;
    height: 0.82rem;
  }

  .it-header-slim-right-zone {
    gap: 0.3rem 0.5rem;
  }

  .it-header-slim-wrapper .list-item {
    font-size: 0.76rem;
  }
}
