:root {
  color-scheme: dark;
  --rp-ink: #04180c;
  --rp-bg: #062b14;
  --rp-surface: #0b3a1d;
  --rp-surface-2: #124a28;
  --rp-line: #1c5a33;
  --rp-line-soft: rgba(255, 255, 255, 0.1);
  --rp-lime: #d6fb4f;
  --rp-lime-press: #b5e02f;
  --rp-neon: #8fff3d;
  --rp-gold: #f5c542;
  --rp-danger: #ff5c5c;
  --rp-text: #fff;
  --rp-text-soft: #cbe3d3;
  --rp-muted: #9fc0ac;
  --rp-muted-2: #6e9179;
  --rp-on-lime: #05230f;
  --rp-font-display: Outfit, "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --rp-font-text: Manrope, "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --rp-shadow: 0 18px 44px rgba(2, 14, 7, 0.34);
  --rp-focus: 0 0 0 4px rgba(214, 251, 79, 0.22);
  --rp-max: 1180px;
}

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

html {
  scroll-behavior: smooth;
  background: var(--rp-ink);
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(900px 520px at 78% -80px, rgba(24, 101, 51, 0.52), transparent 68%),
    var(--rp-bg);
  color: var(--rp-text);
  font-family: var(--rp-font-text);
  font-size: 16px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
}

body.menu-open {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--rp-lime);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--rp-neon);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: none;
  box-shadow: var(--rp-focus);
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--rp-lime);
  color: var(--rp-on-lime);
  font-weight: 800;
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  z-index: 50;
  top: 0;
  border-bottom: 1px solid var(--rp-line);
  background: rgba(4, 24, 12, 0.94);
  backdrop-filter: blur(16px);
}

.header-inner {
  width: min(calc(100% - 40px), var(--rp-max));
  min-height: 72px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--rp-neon);
  font-family: var(--rp-font-display);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1;
  text-decoration: none;
  text-shadow: 0 0 22px rgba(143, 255, 61, 0.4);
}

.header-nav {
  justify-self: center;
}

.header-nav ul,
.footer-nav ul {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
}

.header-nav ul {
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--rp-line-soft);
  border-radius: 999px;
  background: var(--rp-surface);
}

.header-nav a {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  padding: 6px 17px;
  border-radius: 999px;
  color: var(--rp-muted);
  font-family: var(--rp-font-display);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.header-nav a[aria-current="page"],
.header-nav a:hover {
  background: var(--rp-surface-2);
  color: var(--rp-text);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-actions .button {
  white-space: nowrap;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--rp-line);
  border-radius: 999px;
  background: var(--rp-surface-2);
  color: var(--rp-text);
  cursor: pointer;
}

.menu-toggle svg {
  width: 20px;
  height: 20px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 23px;
  border: 0;
  border-radius: 999px;
  font-family: var(--rp-font-display);
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}

.button-primary {
  background: var(--rp-lime);
  color: var(--rp-on-lime);
}

.button-primary:hover {
  background: var(--rp-lime-press);
  color: var(--rp-on-lime);
}

.button-outline {
  border: 1.5px solid var(--rp-lime);
  background: transparent;
  color: var(--rp-lime);
}

.button-outline:hover {
  background: rgba(214, 251, 79, 0.11);
  color: var(--rp-neon);
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 78px 0 64px;
  border-bottom: 1px solid var(--rp-line-soft);
}

.hero::after {
  position: absolute;
  right: -140px;
  bottom: -280px;
  width: 620px;
  height: 620px;
  border: 1px solid rgba(143, 255, 61, 0.08);
  border-radius: 50%;
  box-shadow:
    0 0 0 70px rgba(143, 255, 61, 0.025),
    0 0 0 140px rgba(143, 255, 61, 0.018);
  content: "";
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 40px), var(--rp-max));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(390px, 0.96fr);
  align-items: center;
  gap: clamp(34px, 6vw, 78px);
}

.eyebrow,
.section-label {
  color: var(--rp-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  line-height: 1.3;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 760px;
  margin: 13px 0 22px;
  font-family: var(--rp-font-display);
  font-size: clamp(42px, 5.5vw, 72px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.98;
  text-wrap: balance;
}

.hero-intro {
  max-width: 720px;
  padding-left: 20px;
  border-left: 3px solid var(--rp-lime);
}

.hero-intro p {
  margin: 0;
  color: var(--rp-text-soft);
  font-size: clamp(16px, 1.7vw, 18px);
  line-height: 1.62;
}

.hero-intro p + p {
  margin-top: 12px;
  color: var(--rp-muted);
  font-size: 15px;
}

.hero-actions-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
}

.hero-media {
  position: relative;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--rp-line);
  border-radius: 24px;
  background: var(--rp-surface);
  box-shadow: var(--rp-shadow);
}

.hero-media::before {
  position: absolute;
  z-index: 2;
  top: 22px;
  left: 22px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  background: rgba(4, 24, 12, 0.78);
  color: var(--rp-text-soft);
  content: "Anteprima dell’interfaccia";
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}

.hero-media img {
  width: 100%;
  border-radius: 16px;
  object-fit: contain;
}

.hero-media figcaption,
.editorial-image figcaption {
  padding: 10px 5px 3px;
  color: var(--rp-muted-2);
  font-size: 12px;
  line-height: 1.5;
}

.content-shell {
  scroll-margin-top: 92px;
  width: min(calc(100% - 40px), var(--rp-max));
  margin: 0 auto;
  padding: 66px 0 96px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  align-items: start;
  gap: 58px;
}

.article {
  min-width: 0;
}

.article > p,
.article > ul,
.article > .table-wrap,
.article > .editorial-image,
.article > .interactive-panel {
  max-width: 790px;
}

.article p {
  margin: 0 0 20px;
  color: var(--rp-text-soft);
}

.article h2,
.article h3,
.article h4,
.article h5,
.article h6 {
  scroll-margin-top: 110px;
  color: var(--rp-text);
  font-family: var(--rp-font-display);
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.article h2 {
  margin: 72px 0 22px;
  padding-top: 10px;
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.12;
}

.article h2::before {
  display: block;
  width: 44px;
  height: 4px;
  margin-bottom: 16px;
  border-radius: 999px;
  background: var(--rp-lime);
  content: "";
}

.article h3 {
  margin: 42px 0 16px;
  font-size: 24px;
  line-height: 1.24;
}

.article h4,
.article h5,
.article h6 {
  margin: 32px 0 14px;
  font-size: 19px;
}

.article ul {
  margin: 4px 0 28px;
  padding: 0;
  list-style: none;
}

.article li {
  position: relative;
  margin: 9px 0;
  padding: 11px 14px 11px 42px;
  border: 1px solid var(--rp-line-soft);
  border-radius: 14px;
  background: rgba(11, 58, 29, 0.55);
  color: var(--rp-text-soft);
}

.article li::before {
  position: absolute;
  top: 17px;
  left: 17px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--rp-lime);
  box-shadow: 0 0 0 4px rgba(214, 251, 79, 0.09);
  content: "";
}

.article p a {
  font-weight: 700;
}

.table-wrap {
  margin: 30px 0 40px;
  overflow-x: auto;
  border: 1px solid var(--rp-line);
  border-radius: 18px;
  background: var(--rp-surface);
}

table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}

th,
td {
  padding: 15px 18px;
  border-bottom: 1px solid var(--rp-line);
  text-align: left;
  vertical-align: middle;
}

th {
  background: var(--rp-ink);
  color: var(--rp-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1.4;
  text-transform: uppercase;
}

td {
  color: var(--rp-text-soft);
  font-size: 14px;
  line-height: 1.55;
}

tr:last-child td {
  border-bottom: 0;
}

.editorial-image {
  margin: 48px 0;
  padding: 15px;
  border: 1px solid var(--rp-line);
  border-radius: 20px;
  background: linear-gradient(135deg, var(--rp-surface), rgba(18, 74, 40, 0.72));
}

.editorial-image img {
  width: min(100%, 420px);
  margin: 0 auto;
  border-radius: 12px;
  object-fit: contain;
}

.interactive-panel {
  margin: 46px 0;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid var(--rp-line);
  border-radius: 24px;
  background:
    radial-gradient(420px 180px at 100% 0, rgba(143, 255, 61, 0.1), transparent 72%),
    var(--rp-surface);
  box-shadow: 0 16px 36px rgba(2, 14, 7, 0.2);
}

.module-title {
  margin: 9px 0 8px;
  font-family: var(--rp-font-display);
  font-size: clamp(23px, 3vw, 30px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.16;
}

.module-intro {
  max-width: 650px;
  margin: 0 0 22px !important;
  color: var(--rp-muted) !important;
  font-size: 14px;
}

.chip-row,
.diagnostic-options,
.check-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.chip,
.issue-button,
.check-button,
.reset-button {
  min-height: 44px;
  padding: 10px 17px;
  border: 1px solid var(--rp-line);
  border-radius: 999px;
  background: var(--rp-surface-2);
  color: var(--rp-text);
  font: 700 13px/1 var(--rp-font-display);
  cursor: pointer;
}

.chip[aria-pressed="true"],
.issue-button[aria-pressed="true"],
.check-button[aria-pressed="true"] {
  border-color: var(--rp-lime);
  background: var(--rp-lime);
  color: var(--rp-on-lime);
}

.module-result {
  min-height: 72px;
  margin-top: 20px;
  padding: 17px 18px;
  border: 1px solid var(--rp-line-soft);
  border-radius: 14px;
  background: var(--rp-ink);
  color: var(--rp-text-soft);
  font-size: 14px;
}

.module-result strong {
  display: block;
  margin-bottom: 4px;
  color: var(--rp-lime);
  font-family: var(--rp-font-display);
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.catalog-card {
  min-height: 102px;
  padding: 16px;
  border: 1px solid var(--rp-line-soft);
  border-radius: 14px;
  background: var(--rp-ink);
  transition: opacity 150ms ease, transform 150ms ease;
}

.catalog-card.is-muted {
  opacity: 0.3;
  transform: scale(0.98);
}

.catalog-card strong {
  display: block;
  color: var(--rp-text);
  font-family: var(--rp-font-display);
  font-size: 15px;
}

.catalog-card span {
  color: var(--rp-muted-2);
  font-size: 12px;
}

.progress-track {
  height: 10px;
  margin: 20px 0 11px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--rp-ink);
}

.progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--rp-lime), var(--rp-neon));
  transition: width 180ms ease;
}

.progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--rp-muted);
  font-size: 13px;
}

.reset-button {
  min-height: 38px;
  padding: 8px 14px;
  background: transparent;
  color: var(--rp-lime);
}

.toc {
  position: sticky;
  top: 102px;
  padding: 22px;
  border: 1px solid var(--rp-line);
  border-radius: 20px;
  background: rgba(11, 58, 29, 0.8);
}

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

.toc li + li {
  margin-top: 5px;
}

.toc a {
  display: block;
  padding: 9px 11px;
  border-radius: 10px;
  color: var(--rp-muted);
  font-size: 13px;
  line-height: 1.35;
  text-decoration: none;
}

.toc a:hover,
.toc a.is-active {
  background: var(--rp-surface-2);
  color: var(--rp-text);
}

.cta-band {
  width: min(calc(100% - 40px), var(--rp-max));
  margin: 0 auto 76px;
  padding: clamp(28px, 5vw, 46px);
  border-radius: 26px;
  background: linear-gradient(120deg, var(--rp-lime), var(--rp-neon));
  color: var(--rp-on-lime);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 34px;
}

.cta-title {
  margin-bottom: 5px;
  font-family: var(--rp-font-display);
  font-size: clamp(27px, 4vw, 38px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.cta-copy {
  max-width: 670px;
  color: rgba(5, 35, 15, 0.76);
  font-size: 14px;
}

.cta-band .button {
  flex: 0 0 auto;
  background: var(--rp-on-lime);
  color: var(--rp-lime);
}

.site-footer {
  border-top: 1px solid var(--rp-line);
  background: var(--rp-ink);
}

.footer-inner {
  width: min(calc(100% - 40px), var(--rp-max));
  margin: 0 auto;
  padding: 46px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  align-items: start;
  gap: 52px;
}

.footer-description {
  max-width: 560px;
  margin: 13px 0 0;
  color: var(--rp-muted-2);
  font-size: 13px;
}

.footer-nav ul {
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-nav a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 7px 14px;
  border-radius: 999px;
  color: var(--rp-muted);
  font-size: 13px;
  text-decoration: none;
}

.footer-nav a:hover {
  background: var(--rp-surface);
  color: var(--rp-text);
}

.responsible {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--rp-line);
  color: var(--rp-muted-2);
  font-size: 12px;
  line-height: 1.55;
}

.age-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border: 2px solid var(--rp-danger);
  border-radius: 50%;
  color: var(--rp-danger);
  display: grid;
  place-items: center;
  font-family: var(--rp-font-display);
  font-size: 13px;
  font-weight: 800;
}

@media (max-width: 920px) {
  .header-inner {
    grid-template-columns: auto 1fr auto;
    gap: 12px;
  }

  .menu-toggle {
    display: grid;
    grid-column: 1;
    grid-row: 1;
  }

  .wordmark {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
    font-size: 24px;
  }

  #menu-principale {
    display: contents;
  }

  .header-actions {
    grid-column: 3;
    grid-row: 1;
  }

  .header-actions .button {
    min-height: 42px;
    padding: 9px 16px;
    font-size: 12px;
  }

  .header-nav {
    position: fixed;
    z-index: 49;
    inset: 73px 0 auto;
    width: 100%;
    justify-self: stretch;
    padding: 16px 20px 22px;
    border-bottom: 1px solid var(--rp-line);
    background: var(--rp-ink);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity 160ms ease, transform 160ms ease;
  }

  .header-nav.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .header-nav ul {
    width: min(100%, 540px);
    margin: 0 auto;
    display: grid;
    border-radius: 20px;
  }

  .header-nav a {
    justify-content: center;
    min-height: 44px;
  }

  html.no-js .menu-toggle {
    display: none;
  }

  html.no-js .header-inner {
    grid-template-columns: 1fr auto;
    padding: 8px 0;
  }

  html.no-js .wordmark {
    grid-column: 1;
    justify-self: start;
  }

  html.no-js .header-actions {
    grid-column: 2;
  }

  html.no-js .header-nav {
    position: static;
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    padding: 4px 0 0;
    border: 0;
    background: transparent;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  html.no-js .header-nav ul {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-radius: 999px;
  }

  .hero {
    padding-top: 52px;
  }

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

  .hero-media {
    max-width: 720px;
  }

  .content-shell {
    grid-template-columns: 1fr;
  }

  .toc {
    position: relative;
    top: auto;
    grid-row: 1;
  }

  .toc ol {
    columns: 2;
    column-gap: 18px;
  }
}

@media (max-width: 620px) {
  body {
    font-size: 15px;
  }

  .header-inner,
  .hero-grid,
  .content-shell,
  .cta-band,
  .footer-inner {
    width: min(calc(100% - 28px), var(--rp-max));
  }

  .header-inner {
    min-height: 64px;
  }

  .header-nav {
    inset-block-start: 65px;
  }

  html.no-js .header-nav {
    inset-block-start: auto;
  }

  .header-actions .button {
    max-width: 104px;
    padding-inline: 13px;
  }

  .hero {
    padding: 38px 0 44px;
  }

  .hero h1 {
    font-size: clamp(36px, 12vw, 52px);
  }

  .hero-intro {
    padding-left: 14px;
  }

  .hero-actions-row {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-actions-row .button {
    width: 100%;
  }

  .hero-media {
    padding: 7px;
    border-radius: 18px;
  }

  .hero-media::before {
    top: 15px;
    left: 15px;
  }

  .hero-media img {
    border-radius: 12px;
  }

  .content-shell {
    padding: 38px 0 72px;
    gap: 36px;
  }

  .toc {
    padding: 18px;
  }

  .toc ol {
    columns: 1;
  }

  .article h2 {
    margin-top: 56px;
    font-size: 29px;
  }

  .article h3 {
    margin-top: 34px;
    font-size: 21px;
  }

  .article li {
    padding-right: 12px;
  }

  .interactive-panel {
    padding: 20px;
    border-radius: 19px;
  }

  .chip-row,
  .diagnostic-options,
  .check-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chip,
  .issue-button,
  .check-button {
    width: 100%;
    padding-inline: 10px;
  }

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

  .progress-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .cta-band {
    margin-bottom: 56px;
    align-items: stretch;
    flex-direction: column;
  }

  .cta-band .button {
    width: 100%;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-nav ul {
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
