/* Centro legale United — foglio di stile dei documenti pubblici.
   Impostazione sobria e pulita, vicina ai centri legali dei social: fondo bianco, caratteri
   di sistema, bordi sottili, angoli vivi, nessuna animazione decorativa.
   Solo risorse locali (CSP dei portali: font e script da 'self'). */

@font-face {
  font-family: "Poppins";
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url("../fonts/Poppins-Bold.woff") format("woff");
}

:root {
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --bg: #ffffff;
  --soft: #fafafa;
  --soft-2: #f2f3f5;
  --ink: #262626;
  --ink-2: #3b3d42;
  --muted: #737373;
  --line: #dbdbdb;
  --line-soft: #efefef;

  --brand: #5565f5;
  --brand-dark: #3f4fe0;
  --brand-ink: #2f3cb8;
  --brand-tint: #f3f4ff;
  --brand-line: #dfe2fd;
  --link: #2f3cb8;

  --ok: #1f7a3a;
  --ok-tint: #effaf2;
  --ok-line: #cdebd6;
  --warn: #8a5a00;
  --warn-tint: #fff8e6;
  --warn-line: #f3e0ad;
  --bad: #c13030;
  --bad-tint: #fff1f1;
  --bad-line: #f5cfcf;

  --r-sm: 0;
  --r: 0;
  --r-lg: 0;
  --r-xl: 0;

  --wrap: 1080px;
  --toc-w: 244px;
  --header-h: 60px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 0;
}

strong {
  font-weight: 600;
  color: var(--ink);
}

code {
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: 0.88em;
  background: var(--soft-2);
  border-radius: 0;
  padding: 1px 5px;
  overflow-wrap: anywhere;
}

button {
  font-family: var(--font);
}

.skip-link {
  position: absolute;
  left: 8px;
  top: -48px;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 8px 12px;
  border-radius: var(--r);
  font-weight: 600;
}

.skip-link:focus {
  top: 8px;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------------------------------------------------------------- testata */

.lc-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--line);
}

.lc-header__inner {
  max-width: var(--wrap);
  height: 100%;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.lc-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  flex-shrink: 0;
}

.lc-brand:hover {
  text-decoration: none;
}

.lc-brand__icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

.lc-brand__word {
  font-family: "Poppins", var(--font);
  font-weight: 700;
  font-size: 21px;
  line-height: 1;
  color: var(--brand);
  letter-spacing: -0.01em;
}

.lc-brand__label {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  padding-left: 10px;
  border-left: 1px solid var(--line);
}

.lc-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 2px;
}

.lc-nav a {
  padding: 7px 11px;
  border-radius: var(--r);
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.lc-nav a:hover {
  background: var(--soft-2);
  text-decoration: none;
}

.lc-nav a[aria-current="page"] {
  font-weight: 700;
  background: var(--soft-2);
}

.lc-menu-btn {
  display: none;
  margin-left: auto;
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.lc-menu-btn:hover {
  background: var(--soft);
}

.lc-drawer {
  display: none;
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  z-index: 49;
  max-height: calc(100vh - var(--header-h));
  overflow-y: auto;
  padding: 8px 12px 14px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.lc-drawer.is-open {
  display: block;
}

.lc-drawer a {
  display: block;
  padding: 10px 12px;
  border-radius: var(--r);
  color: var(--ink);
  font-weight: 600;
}

.lc-drawer a:hover {
  background: var(--soft);
  text-decoration: none;
}

.lc-drawer a small {
  display: block;
  font-weight: 400;
  color: var(--muted);
  font-size: 13px;
}

.lc-drawer a[aria-current="page"] {
  background: var(--soft-2);
}

/* ------------------------------------------------------- intestazione doc */

.page-head {
  background: var(--bg);
  border-bottom: 1px solid var(--line-soft);
}

.page-head__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 40px;
  align-items: center;
  padding: 20px 0 36px;
}

.crumbs {
  list-style: none;
  margin: 0;
  padding: 22px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.crumbs li {
  display: inline;
}

.crumbs a {
  color: var(--muted);
}

.crumbs li + li::before {
  content: "/";
  margin: 0 7px;
  color: var(--line);
}

.page-head h1 {
  font-weight: 700;
  font-size: 34px;
  line-height: 1.18;
  letter-spacing: -0.015em;
  margin: 0 0 12px;
  color: var(--ink);
}

.page-head__kicker {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-ink);
}

.page-head__lead {
  margin: 0 0 18px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 640px;
}

.page-head__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 14px;
  padding: 0;
  font-size: 13px;
  color: var(--muted);
}

.page-head__meta span {
  padding: 3px 10px;
  border-radius: 0;
  background: var(--soft-2);
}

.page-head__tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}

.page-head__tools button,
.page-head__tools a {
  display: inline-block;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
}

.page-head__tools button:hover,
.page-head__tools a:hover {
  background: var(--soft);
  text-decoration: none;
}

.page-head__tools .sep {
  display: none;
}

.page-head__art {
  background: var(--soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-xl);
  padding: 14px;
}

.page-head__art .ill {
  width: 100%;
  height: auto;
}

/* ------------------------------------------------------------ impaginato */

.layout {
  display: grid;
  grid-template-columns: var(--toc-w) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
  padding-top: 32px;
  padding-bottom: 48px;
}

.toc {
  position: sticky;
  top: calc(var(--header-h) + 20px);
  max-height: calc(100vh - var(--header-h) - 40px);
  overflow-y: auto;
  scrollbar-width: thin;
}

.toc__title {
  margin: 0 0 8px;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc ol a {
  display: flex;
  gap: 6px;
  padding: 7px 10px;
  border-radius: var(--r);
  font-size: 14px;
  line-height: 1.35;
  color: var(--ink-2);
}

.toc ol a:hover {
  background: var(--soft);
  text-decoration: none;
}

.toc ol a.is-active {
  background: var(--soft-2);
  color: var(--ink);
  font-weight: 600;
}

.toc__n {
  min-width: 22px;
  color: var(--muted);
  font-weight: 400;
}

.toc__aside {
  margin-top: 16px;
  padding: 14px;
  border-radius: var(--r-lg);
  background: var(--soft);
  border: 1px solid var(--line-soft);
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-2);
}

.toc__aside strong {
  display: block;
  margin-bottom: 2px;
}

.toc-bar {
  display: none;
  margin: 16px 0 0;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: #fff;
}

.toc-bar__btn {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: #fff;
  border: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.toc-bar__btn::after {
  content: "";
  width: 8px;
  height: 8px;
  margin-left: auto;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-2px) rotate(45deg);
}

.toc-bar[data-open="true"] .toc-bar__btn::after {
  transform: translateY(2px) rotate(-135deg);
}

.toc-bar__current {
  display: none;
}

.toc-bar__panel {
  display: none;
  padding: 4px 6px 8px;
  border-top: 1px solid var(--line-soft);
}

.toc-bar[data-open="true"] .toc-bar__panel {
  display: block;
}

.toc-bar__panel ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc-bar__panel a {
  display: flex;
  gap: 6px;
  padding: 9px 10px;
  border-radius: var(--r);
  font-size: 15px;
  color: var(--ink-2);
}

.toc-bar__panel a:hover {
  background: var(--soft);
  text-decoration: none;
}

.doc {
  min-width: 0;
  max-width: 760px;
}

/* ----------------------------------------------------------- riepilogo */

.summary {
  margin: 0 0 40px;
}

.summary__head {
  margin-bottom: 14px;
}

.summary__head h2 {
  margin: 0 0 2px;
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
}

.summary__head p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.keygrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.keygrid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.keycard {
  display: block;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: #fff;
  color: var(--ink-2);
}

a.keycard:hover {
  border-color: #c7c7c7;
  background: var(--soft);
  text-decoration: none;
}

.keycard h3 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
}

.keycard p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}

.keycard__more {
  display: inline-block;
  margin-top: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--link);
}

.keycard__more::after {
  content: " \203A";
}

/* ------------------------------------------------------------- sezioni */

.doc-section {
  padding: 0 0 8px;
  margin: 0 0 40px;
}

.doc-section h2 {
  margin: 0 0 16px;
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  font-weight: 700;
  color: var(--ink);
}

.sec-n {
  color: var(--muted);
  font-weight: 600;
}

.doc-section h3 {
  margin: 26px 0 8px;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}

.doc-section h4 {
  margin: 16px 0 6px;
  font-size: 15px;
  font-weight: 700;
}

.doc-section p {
  margin: 0 0 12px;
  color: var(--ink-2);
}

.doc-section ul,
.doc-section ol {
  margin: 0 0 14px;
  padding-left: 22px;
  color: var(--ink-2);
}

.doc-section li {
  margin-bottom: 6px;
}

ol.alpha {
  list-style: lower-alpha;
}

.back-top {
  margin: 4px 0 0;
  text-align: right;
  font-size: 13px;
}

/* Riquadro "In breve". */
.tldr {
  margin: 0 0 18px;
  padding: 14px 18px;
  background: var(--brand-tint);
  border: 1px solid var(--brand-line);
  border-radius: var(--r-lg);
}

.doc-section .tldr__label {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-ink);
}

.doc-section .tldr p {
  margin: 0 0 6px;
  color: var(--ink);
}

.doc-section .tldr p:last-child {
  margin-bottom: 0;
}

.doc-section .tldr ul {
  margin: 4px 0 6px;
  color: var(--ink);
}

.tldr li {
  margin-bottom: 2px;
}

/* Note. */
.note {
  margin: 16px 0 18px;
  padding: 14px 18px;
  background: var(--soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
}

.doc-section .note p {
  margin: 0 0 6px;
}

.doc-section .note p:last-child {
  margin-bottom: 0;
}

.note--warn {
  background: var(--warn-tint);
  border-color: var(--warn-line);
}

.note--safe {
  background: var(--ok-tint);
  border-color: var(--ok-line);
}

.note--alert {
  background: var(--bad-tint);
  border-color: var(--bad-line);
}

/* Dettagli espandibili. */
details.more {
  margin: 14px 0 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}

details.more > summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
}

details.more > summary::-webkit-details-marker {
  display: none;
}

details.more > summary::after {
  content: "";
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  margin-left: auto;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-2px) rotate(45deg);
}

details.more[open] > summary::after {
  transform: translateY(2px) rotate(-135deg);
}

details.more > summary:hover {
  background: var(--soft);
}

details.more[open] > summary {
  border-bottom: 1px solid var(--line-soft);
}

.more__body {
  padding: 14px 16px 4px;
}

.more__body p,
.more__body li {
  font-size: 14.5px;
}

/* Schede. */
.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0 18px;
}

.cards--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: #fff;
}

.card__top {
  margin-bottom: 6px;
}

.card h3,
.card h4 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.card__top h3,
.card__top h4 {
  margin: 0;
}

.doc-section .card p,
.card li {
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-2);
}

.doc-section .card p {
  margin: 0 0 6px;
}

.doc-section .card p:last-child {
  margin-bottom: 0;
}

.card ul {
  margin: 0;
  padding-left: 18px;
}

/* Consentito / non consentito. */
.dodont {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0 18px;
}

.dodont__col {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.doc-section .dodont__title {
  margin: 0 0 10px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 700;
}

.doc-section .dodont__col--dont .dodont__title {
  background: var(--bad-tint);
  color: var(--bad);
  border-bottom: 1px solid var(--bad-line);
}

.doc-section .dodont__col--do .dodont__title {
  background: var(--ok-tint);
  color: var(--ok);
  border-bottom: 1px solid var(--ok-line);
}

.doc-section .dodont ul {
  margin: 0 0 6px;
  padding: 0 16px 0 36px;
}

.dodont li {
  font-size: 14px;
  margin-bottom: 8px;
}

.dodont__col--dont li::marker {
  content: "\2715  ";
  color: var(--bad);
  font-size: 12px;
}

.dodont__col--do li::marker {
  content: "\2713  ";
  color: var(--ok);
  font-size: 13px;
}

/* Scala dei provvedimenti e procedure numerate. */
.doc-section .ladder,
.doc-section .steps {
  list-style: none;
  margin: 14px 0 18px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.ladder {
  counter-reset: step;
}

.steps {
  counter-reset: s;
}

.doc-section .ladder li,
.doc-section .steps li {
  position: relative;
  margin: 0;
  padding: 13px 16px 13px 58px;
  border-bottom: 1px solid var(--line-soft);
}

.ladder li:last-child,
.steps li:last-child {
  border-bottom: 0;
}

.ladder li {
  counter-increment: step;
}

.steps li {
  counter-increment: s;
}

.ladder li::before,
.steps li::before {
  position: absolute;
  left: 16px;
  top: 13px;
  width: 28px;
  height: 28px;
  border-radius: 0;
  line-height: 28px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: var(--brand);
}

.ladder li::before {
  content: counter(step);
}

.steps li::before {
  content: counter(s);
}

.ladder li:nth-child(n + 4)::before {
  background: #d98e0b;
}

.ladder li:nth-child(n + 5)::before {
  background: var(--bad);
}

.ladder strong,
.steps strong {
  display: block;
  color: var(--ink);
}

.doc-section .ladder p {
  margin: 0;
  font-size: 14px;
}

/* Tabelle. */
.table-wrap {
  margin: 14px 0 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  overflow-x: auto;
}

.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.5;
}

.table-wrap th,
.table-wrap td {
  text-align: left;
  vertical-align: top;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line-soft);
}

.table-wrap tr:last-child th,
.table-wrap tr:last-child td {
  border-bottom: 0;
}

.table-wrap thead th {
  background: var(--soft);
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.table-wrap tbody th {
  font-weight: 600;
  color: var(--ink);
  width: 30%;
}

.table-wrap td {
  color: var(--ink-2);
}

.table-wrap td ul {
  margin: 0;
  padding-left: 18px;
}

.table-wrap--flush {
  margin: 0;
  border: 0;
  border-radius: 0;
}

.pill {
  display: inline-block;
  padding: 1px 8px;
  border-radius: var(--r-sm);
  background: var(--soft-2);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-2);
}

.pill--mint {
  background: var(--ok-tint);
  color: var(--ok);
}

.pill--sun {
  background: var(--warn-tint);
  color: var(--warn);
}

.pill--rose {
  background: var(--bad-tint);
  color: var(--bad);
}

/* Glossario. */
.defs {
  margin: 14px 0 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.defs div {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 16px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line-soft);
}

.defs div:last-child {
  border-bottom: 0;
}

.defs dt {
  font-weight: 600;
  font-size: 14px;
}

.defs dd {
  margin: 0;
  font-size: 14px;
  color: var(--ink-2);
}

/* Riquadro contatti in fondo. */
.contact-band {
  margin: 16px 0 0;
  padding: 20px 22px;
  background: var(--soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-xl);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
}

.contact-band h2 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 700;
}

.contact-band p {
  margin: 0;
  font-size: 14px;
  color: var(--ink-2);
}

.contact-band__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  white-space: nowrap;
}

.btn:hover {
  background: var(--soft-2);
  text-decoration: none;
}

/* Pulsante secondario: stesso aspetto del pulsante base, nominato per chiarezza nei sorgenti. */
.btn--outline {
  background: #fff;
}

.btn--light,
.btn--primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.btn--light:hover,
.btn--primary:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
}

/* Cronologia versioni. */
.doc-section .versions {
  list-style: none;
  margin: 14px 0 18px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.doc-section .versions li {
  margin: 0;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-soft);
}

.versions li:last-child {
  border-bottom: 0;
}

.versions li:first-child {
  background: var(--brand-tint);
}

.versions strong {
  display: block;
}

.versions span {
  color: var(--ink-2);
  font-size: 14px;
}

/* ----------------------------------------------------------- pagina indice */

.hub-intro {
  border-bottom: 1px solid var(--line-soft);
}

.hub-intro__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 40px;
  align-items: center;
  padding: 20px 0 40px;
}

.hub-intro h1 {
  font-weight: 700;
  font-size: 38px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}

.hub-intro p {
  margin: 0 0 14px;
  font-size: 16px;
  color: var(--ink-2);
  max-width: 600px;
}

.hub-main {
  padding-bottom: 48px;
}

.hub-block {
  margin: 36px 0 0;
}

.hub-block__head {
  margin-bottom: 14px;
}

.hub-block__head h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.hub-block__head p {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--muted);
}

.doc-tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.doc-tile {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  overflow: hidden;
  background: #fff;
  color: var(--ink-2);
}

.doc-tile:hover {
  border-color: #c7c7c7;
  text-decoration: none;
}

.doc-tile__art {
  padding: 12px 28px;
  background: var(--soft);
  border-bottom: 1px solid var(--line-soft);
}

.doc-tile:hover .doc-tile__art {
  background: var(--soft-2);
}

.doc-tile__art .ill {
  width: 100%;
  max-width: 220px;
  height: auto;
  margin: 0 auto;
}

.doc-tile__body {
  padding: 14px 16px 16px;
}

.doc-tile h3 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.doc-tile p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}

.link-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.link-list li {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  font-size: 14px;
}

.link-list strong {
  display: block;
  font-size: 15px;
}

.link-list span {
  color: var(--muted);
}

.hub-text {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}

.hub-text ul {
  margin: 0;
  padding-left: 20px;
}

.hub-text li {
  margin-bottom: 6px;
}

.hub-text li:last-child {
  margin-bottom: 0;
}

.hub-block > .table-wrap {
  margin: 0;
}

/* ----------------------------------------------------------------- piede */

.lc-footer {
  border-top: 1px solid var(--line);
  background: var(--soft);
}

.lc-footer__inner {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr));
  gap: 28px;
  padding: 32px 20px 24px;
  max-width: var(--wrap);
  margin: 0 auto;
}

.lc-footer__brand p {
  margin: 0 0 6px;
  font-size: 13px;
  color: var(--muted);
}

.lc-footer__brand strong {
  font-size: 14px;
}

.lc-footer h2 {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.lc-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.lc-footer li {
  margin: 0 0 6px;
  font-size: 13px;
}

.lc-footer li a {
  color: var(--muted);
}

.lc-footer li a:hover {
  color: var(--ink);
}

.lc-footer__legal {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 14px 20px 24px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}

.lc-footer__legal a {
  color: var(--muted);
}

.to-top {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 30;
  display: none;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  cursor: pointer;
}

.to-top.is-visible {
  display: block;
}

/* Colori piatti delle illustrazioni. */
.ill .c-bg { fill: #e3e7f6; }
.ill .c-ground { fill: #c9cfe3; }
.ill .c-brand { fill: #4a5bd8; }
.ill .c-brand-d { fill: #2f3c9e; }
.ill .c-brand-l { fill: #9aa5ee; }
.ill .c-navy { fill: #23283a; }
.ill .c-white { fill: #ffffff; }
.ill .c-paper { fill: #ffffff; stroke: #b9bfd0; stroke-width: 2; }
.ill .c-gray { fill: #c3c8d4; }
.ill .c-gray-l { fill: #e6e8ee; }
.ill .c-orange { fill: #f0a020; }
.ill .c-green { fill: #3f9e48; }
.ill .c-red { fill: #d9534f; }
.ill .s-white { fill: none; stroke: #ffffff; stroke-width: 7; stroke-linecap: square; stroke-linejoin: miter; }
.ill .s-navy { fill: none; stroke: #23283a; stroke-width: 6; stroke-linecap: square; stroke-linejoin: miter; }
.ill .s-brand { fill: none; stroke: #4a5bd8; stroke-width: 4; stroke-linecap: square; stroke-linejoin: miter; }
.ill .s-gray { fill: none; stroke: #c3c8d4; stroke-width: 2; }
.ill .s-w3 { fill: none; stroke: #ffffff; stroke-width: 3; stroke-linecap: square; stroke-linejoin: miter; }
.ill .s-orange { fill: none; stroke: #c97f0e; stroke-width: 3; }
.ill .c-orange-d { fill: #c97f0e; }
.ill .c-cut { fill: #fafafa; }
.ill .t-white { fill: #ffffff; font: bold 24px Arial, Helvetica, sans-serif; }

/* ------------------------------------------------------------ responsive */

@media (max-width: 960px) {
  .lc-nav {
    display: none;
  }
  .lc-menu-btn {
    display: block;
  }
  .layout {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 20px;
  }
  .layout > .toc {
    display: none;
  }
  .toc-bar {
    display: block;
  }
  .doc {
    max-width: none;
  }
  .keygrid--4,
  .doc-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .lc-footer__inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  body {
    font-size: 16px;
  }
  .wrap,
  .lc-header__inner {
    padding: 0 16px;
  }
  .lc-brand__label {
    display: none;
  }
  .page-head__grid,
  .hub-intro__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    padding-bottom: 28px;
  }
  .page-head__art {
    display: none;
  }
  .page-head h1,
  .hub-intro h1 {
    font-size: 28px;
  }
  .keygrid,
  .keygrid--4,
  .cards,
  .cards--3,
  .dodont,
  .doc-tiles,
  .link-list {
    grid-template-columns: minmax(0, 1fr);
  }
  .defs div {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }
  .contact-band {
    grid-template-columns: minmax(0, 1fr);
  }
  .doc-section h2 {
    font-size: 21px;
  }
  .lc-footer__inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 20px;
  }
  .lc-footer__brand {
    grid-column: 1 / -1;
  }

  /* Tabelle impilate: ogni riga diventa un blocco con etichette. */
  .table-wrap.stack {
    border: 0;
    border-radius: 0;
    overflow: visible;
  }
  .table-wrap.stack thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
  .table-wrap.stack table,
  .table-wrap.stack tbody,
  .table-wrap.stack tr,
  .table-wrap.stack th,
  .table-wrap.stack td {
    display: block;
    width: 100%;
  }
  .table-wrap.stack tr {
    margin-bottom: 10px;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    overflow: hidden;
  }
  .table-wrap.stack tbody th {
    background: var(--soft);
    border-bottom: 1px solid var(--line-soft);
  }
  .table-wrap.stack td {
    border-bottom: 1px solid var(--line-soft);
  }
  .table-wrap.stack tr td:last-child {
    border-bottom: 0;
  }
  .table-wrap.stack td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
  }
}

@media (max-width: 380px) {
  .lc-footer__inner {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ----------------------------------------------------------------- stampa */

@media print {
  body {
    font-size: 10.5pt;
  }
  .lc-header,
  .lc-drawer,
  .toc,
  .toc-bar,
  .to-top,
  .page-head__tools,
  .page-head__art,
  .lc-footer__inner,
  .contact-band__actions,
  .back-top {
    display: none !important;
  }
  .layout {
    display: block;
  }
  .doc {
    max-width: none;
  }
  .doc a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
    word-break: break-all;
  }
  .doc-section h2,
  .doc-section h3 {
    break-after: avoid;
  }
}
