@font-face {
  font-family: Figtree;
  src: url("Figtree-400.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: Figtree;
  src: url("Figtree-700.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #172b4d;
  --muted: #526174;
  --accent: #006e6a;
  --surface: #f5f7fa;
  --line: #dbe3eb;
  font-family: Figtree, system-ui, sans-serif;
  color: var(--ink);
  background: var(--surface);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; line-height: 1.6; }
a { color: var(--accent); text-underline-offset: .2em; }
:focus-visible { outline: 3px solid #00837e; outline-offset: 4px; }
:target { scroll-margin-top: 5.5rem; }
h1, h2, h3, p { margin: 0; }

.skip-link {
  position: fixed;
  inset: .75rem auto auto .75rem;
  background: white;
  padding: .5rem .75rem;
  z-index: 3;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 2;
  background: white;
  border-bottom: 1px solid var(--line);
}
.site-header-inner {
  max-width: 84rem;
  min-height: 4.4rem;
  margin: auto;
  padding: .65rem clamp(1rem, 4vw, 3rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .8rem;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}
.brand img { display: block; }
.header-link { font-weight: 700; font-size: .9rem; text-align: right; }
.page {
  max-width: 84rem;
  margin: auto;
  padding: 2rem clamp(1rem, 4vw, 3rem) 0;
  display: grid;
  grid-template-columns: 13.5rem minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
}
.sidebar {
  position: sticky;
  top: 6rem;
  max-height: calc(100vh - 7rem);
  overflow-y: auto;
  padding: .5rem .25rem;
}
.nav-group + .nav-group { margin-top: 1.4rem; }
.nav-group p, .article-group, .guide-card span {
  color: var(--accent);
  font-size: .875rem;
  font-weight: 700;
}
.nav-group p { padding-inline: .65rem; }
.nav-group ul, .guide-grid { list-style: none; margin: 0; padding: 0; }
.nav-group a {
  display: block;
  padding: .35rem .65rem;
  border-radius: .45rem;
  color: var(--ink);
  text-decoration: none;
}
.nav-group a:hover, .nav-group a[aria-current] { background: #ddf4f1; }

.hero {
  isolation: isolate;
  position: relative;
  overflow: hidden;
  border-radius: 1.25rem;
  padding: clamp(1.5rem, 5vw, 3.6rem);
  color: white;
  background: linear-gradient(120deg, #172b4d 42%, #154650 100%);
}
.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: repeating-radial-gradient(ellipse at 98% 25%, transparent 0 22px, #78fcdd33 23px 24px, transparent 25px 39px);
  mask-image: linear-gradient(90deg, transparent 52%, black);
}
.hero-content { max-width: 41rem; }
.hero h1 {
  font-size: clamp(2.1rem, 4.7vw, 4rem);
  letter-spacing: -.05em;
  line-height: 1.06;
}
.hero p { margin-top: .95rem; color: #dce9ef; font-size: clamp(1rem, 2vw, 1.2rem); max-width: 33rem; }
.search { margin-top: 1.65rem; max-width: 29rem; }
.search label { display: block; font-size: .9rem; font-weight: 700; margin-bottom: .35rem; }
.search-field { position: relative; }
.search input {
  width: 100%;
  min-height: 3rem;
  border: 1px solid transparent;
  border-radius: .6rem;
  background: white;
  color: var(--ink);
  padding: .65rem .85rem .65rem 2.65rem;
  font: inherit;
}
.search input:focus-visible { outline-color: #77e4db; }
.hero-link {
  display: inline-block;
  margin-top: 1rem;
  color: #a6f6ed;
  font-weight: 700;
}
.hero-link:focus-visible { outline-color: #77e4db; }
.search-icon {
  position: absolute;
  inset: .9rem auto auto 1rem;
  width: .9rem;
  height: .9rem;
  border: 2px solid var(--accent);
  border-radius: 50%;
  pointer-events: none;
}
.search-icon::after {
  content: "";
  position: absolute;
  width: .42rem;
  height: .12rem;
  background: var(--accent);
  transform: rotate(45deg);
  inset: .65rem auto auto .58rem;
}

.index { margin-top: 2rem; }
.index h2, .article h2 { font-size: clamp(1.55rem, 3vw, 2.15rem); letter-spacing: -.035em; line-height: 1.15; }
#stato-ricerca { margin-top: .5rem; color: var(--muted); }
.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: .9rem;
  margin-top: 1rem;
}
.guide-card a {
  height: 100%;
  display: block;
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: .8rem;
  background: white;
  color: var(--ink);
  text-decoration: none;
}
.guide-card a:hover { border-color: #00837e; background: #f8fffe; }
.guide-card h3 { font-size: 1.18rem; margin-top: .2rem; line-height: 1.25; }
.guide-card p { color: var(--muted); margin-top: .45rem; }

.articles { display: grid; gap: 1rem; margin-top: 2.5rem; }
.article {
  border: 1px solid var(--line);
  border-radius: .85rem;
  background: white;
  padding: clamp(1.2rem, 5vw, 2.6rem);
}
.article:target { border-color: #00837e; }
.article > :where(p, ul, ol) { max-width: 67ch; }
.article h2 { margin-top: .2rem; }
.article h2 + p { color: var(--muted); font-size: 1.1rem; }
.article h3 { margin-top: 1.4rem; font-size: 1.2rem; line-height: 1.3; }
.article h3 + p, .article p + p, .article h2 + p { margin-top: .55rem; }
.article ul, .article ol { padding-left: 1.45rem; margin: .6rem 0; }
.article li + li { margin-top: .35rem; }
.index-link { display: inline-block; margin-top: 1.3rem; font-size: .9rem; font-weight: 700; }
.footer {
  margin-top: 1.5rem;
  padding: 1.2rem 0 1.5rem;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: .9rem;
  font-weight: 700;
}

@media (max-width: 53rem) {
  .page { display: block; padding-top: 1.15rem; }
  .sidebar { display: none; }
  .hero::after { mask-image: linear-gradient(90deg, transparent 72%, black); }
}

@media (max-width: 24rem) {
  .brand { gap: .45rem; font-size: 1.15rem; }
  .brand img { width: 30px; }
}
