body {
  font-family: 'DM Sans', sans-serif;
  /*background: var(--anpif-light);*/
  color: var(--anpif-navy);
  font-size: 0.93rem;
  line-height: 1.75;
}

.brand {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-name {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  color: var(--anpif-primary);
  font-size: 1.05rem;
}

.back {
  margin-left: auto;
  font-size: 0.85rem;
  color: var(--anpif-gray);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
}

.back:hover {
  color: var(--anpif-primary);
}

.wrap {
  max-width: 820px;
  margin: 2.5rem auto;
  padding: 0 1.25rem 5rem;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2rem;
  align-items: start;
}

.toc {
  position: sticky;
  top: 80px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
}

.toc-title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--anpif-gray);
  margin-bottom: 0.85rem;
}

.toc a {
  display: block;
  font-size: 0.82rem;
  color: var(--anpif-gray);
  text-decoration: none;
  padding: 0.3rem 0.65rem;
  border-left: 2px solid transparent;
  transition: all 0.15s;
}

.toc a:hover, .toc a.active {
  color: var(--anpif-primary);
  border-left-color: var(--anpif-primary);
}

.doc-hero {
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2rem;
  margin-bottom: 1rem;
}

.doc-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--anpif-accent);
  margin-bottom: 0.6rem;
}

.doc-hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.doc-aggiornamento {
  font-size: 0.8rem;
  color: var(--anpif-gray);
  margin-bottom: 1.25rem;
}

.riepilogo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.riepilogo-item {
  background: var(--anpif-light);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 0.9rem 1rem;
}

.riepilogo-item .label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--anpif-gray);
  margin-bottom: 4px;
}

.riepilogo-item .value {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--anpif-navy);
}

.section {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1.1rem 1.5rem;
  cursor: pointer;
  user-select: none;
}

.section-header:hover {
  background: #fafafa;
}

.section-num {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--anpif-primary);
  background: rgba(27,117,52,0.08);
  border-radius: 5px;
  padding: 2px 7px;
  flex-shrink: 0;
}

.section-title {
  font-weight: 600;
  font-size: 0.95rem;
  flex: 1;
}

.section-chevron {
  color: var(--anpif-gray);
  transition: transform 0.2s;
  flex-shrink: 0;
}

.section.open .section-chevron {
  transform: rotate(180deg);
}

.section-body {
  display: none;
  padding: 0 1.5rem 1.5rem;
  border-top: 1px solid var(--border);
}

.section.open .section-body {
  display: block;
}

.section-body p {
  margin-top: 1rem;
  color: #374151;
}

.section-body ul {
  padding-left: 1.25rem;
  margin-top: 0.5rem;
  color: #374151;
}

.section-body li {
  margin-bottom: 0.3rem;
}

.section-body a {
  color: var(--anpif-primary);
}

/* Tabella cookie */

.cookie-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-top: 1rem;
  border-radius: 9px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.cookie-table th {
  background: var(--anpif-light);
  font-weight: 600;
  color: var(--anpif-navy);
  padding: 0.65rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.cookie-table td {
  padding: 0.65rem 1rem;
  color: #374151;
  border-bottom: 1px solid #f3f4f6;
  vertical-align: top;
}

.cookie-table tr:last-child td {
  border-bottom: none;
}

code {
  background: rgba(27,117,52,0.07);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 0.85em;
  color: var(--anpif-primary);
}

@media (max-width: 700px) {
  .wrap {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .toc {
    display: none;
  }
}

@media (max-width: 700px) {
  .riepilogo {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .cookie-table {
    font-size: 0.78rem;
  }
}

@media (max-width: 700px) {
  .cookie-table th, .cookie-table td {
    padding: 0.5rem 0.65rem;
  }
}

