
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("/fonts/archivo-500.ttf") format("truetype"); }
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 700 900; font-display: swap; src: url("/fonts/archivo-800.ttf") format("truetype"); }

:root {
  color-scheme: light dark;
  --bg: #F1EDE4;
  --surface: #FFFFFF;
  --surface-alt: #F6F3EC;
  --hairline: #E2DDD0;
  --rule: #C9C2B2;
  --text: #0B0B10;
  --text-2: #4B4957;
  --muted: #686575;
  --ink: #0B0B10;
  --ink-2: rgba(11, 11, 16, 0.80);
  --ink-wash: rgba(11, 11, 16, 0.10);
  --paper: #F7F5EF;
  --oro: #FFC83D;
  --oro-deep: #E0A615;
  --corallo: #FF8E72;
  --corallo-deep: #E66A4A;
  --warn: #8A5A00;
  --warn-soft: rgba(138, 90, 0, 0.10);
  --warn-line: rgba(138, 90, 0, 0.35);
  --keyline: var(--ink);
  --lip-oro: var(--ink);
  --lip-corallo: var(--ink);
  --key-face: var(--surface);
  --lip-neutral: var(--ink);
  --key-text: var(--ink);
  --gutter: 16px;
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
}

/* Inchiostro (scuro): come l'app, i campi di colore restano gli stessi, la pagina si scurisce */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0B0B10;
    --surface: #15151C;
    --surface-alt: #1F1F29;
    --hairline: rgba(255, 255, 255, 0.08);
    --rule: rgba(255, 255, 255, 0.16);
    --text: #F7F5EF;
    --text-2: #BAB8C6;
    --muted: #8E8DA1;
    --warn: #E0A615;
    --warn-soft: rgba(224, 166, 21, 0.14);
    --warn-line: rgba(224, 166, 21, 0.45);
    --keyline: transparent;
    --lip-oro: var(--oro-deep);
    --lip-corallo: var(--corallo-deep);
    --key-face: #2A2A37;
    --lip-neutral: #121218;
    --key-text: var(--text);
  }
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  font-weight: 450;
  overflow-wrap: break-word;
}

.wrap { width: 100%; max-width: 712px; margin: 0 auto; padding: 0 var(--gutter); }

a { color: var(--text); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.slab a { color: var(--ink); }
a:hover { text-decoration-thickness: 2.5px; }
:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; border-radius: 6px; }

.skip {
  position: absolute; left: 8px; top: -100px; z-index: 10;
  background: var(--text); color: var(--bg); padding: 10px 14px; border-radius: 12px; font-weight: 700;
}
.skip:focus { top: 8px; }

/* ───────── Testata e piede ───────── */

.site-head { padding: 14px 0 10px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px;
  font-weight: 800; font-size: 18px; letter-spacing: -0.3px; text-decoration: none;
}
.brand-mark { width: 32px; height: 32px; flex: none; }
.brand-mark .ground { fill: var(--oro); stroke: var(--keyline); stroke-width: 1.5; }
.brand-mark .sign { stroke: var(--ink); }
.brand-mark .dot { fill: var(--ink); }

.site-foot {
  margin-top: 48px; padding: 24px 0 40px; border-top: 1px solid var(--rule);
  color: var(--text-2); font-size: 14px; line-height: 1.5;
}
.foot-links { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 20px; }
.foot-links a { display: inline-block; padding: 8px 0; font-weight: 700; color: var(--text); }
.owner { margin: 0; font-style: normal; }
.owner span { display: block; }
.owner .overline { margin-bottom: 4px; color: var(--muted); }

/* ───────── La lastra (una per pagina) ───────── */

.slab {
  position: relative; overflow: hidden;
  margin: 4px calc(8px - var(--gutter)) 0;
  padding: 24px 22px 26px;
  border: 1.5px solid var(--keyline); border-radius: 36px;
  color: var(--ink);
}
.slab-oro { background: var(--oro); }
.slab-oro .deep { fill: var(--oro-deep); }
.slab-corallo { background: var(--corallo); }
.slab-corallo .deep { fill: var(--corallo-deep); }
.slab-shapes { position: absolute; right: -28px; top: -28px; width: 190px; height: 190px; pointer-events: none; }
.slab-body { position: relative; display: grid; gap: 12px; }
.slab p { margin: 0; color: var(--ink-2); }
.slab .overline { color: var(--ink); }
.slab h1 { margin: 0; max-width: 18ch; }
.slab .lead { color: var(--ink); font-weight: 600; }

.overline {
  margin: 0; font-size: 12px; line-height: 16px; font-weight: 800; letter-spacing: 1.1px; text-transform: uppercase;
  color: var(--text-2);
}
.display { font-size: 30px; line-height: 34px; font-weight: 800; letter-spacing: -0.9px; }
.mega { font-size: 40px; line-height: 42px; font-weight: 900; letter-spacing: -1.2px; }

.pills { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  display: inline-block; padding: 6px 12px; border-radius: 999px;
  background: var(--ink); color: var(--paper); font-size: 13px; line-height: 18px; font-weight: 700;
}

/* ───────── Gruppi, testi, note ───────── */

.group { margin-top: 32px; }
.group > h2, .list-head h2 {
  margin: 0 0 8px; font-size: 20px; line-height: 26px; font-weight: 800; letter-spacing: -0.3px;
}
.list-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.list-head h2 { margin: 0; }
.list-head .right { color: var(--muted); font-size: 14px; font-weight: 600; text-align: right; }
h3 { margin: 0; font-size: 17px; line-height: 24px; font-weight: 800; letter-spacing: -0.2px; }
p { margin: 0 0 12px; }
.prose p:last-child { margin-bottom: 0; }
.secondary { color: var(--text-2); }
.footnote { margin: 12px 0 0; color: var(--muted); font-size: 14px; line-height: 20px; }
.note { margin: 8px 0 0; color: var(--text-2); font-size: 14px; line-height: 20px; }

/* ───────── Riquadro neutro ───────── */

.tile {
  margin-top: 32px; padding: 20px; background: var(--surface);
  border: 1px solid var(--hairline); border-radius: 28px;
}
.tile > h2 { margin: 0 0 6px; font-size: 20px; line-height: 26px; font-weight: 800; letter-spacing: -0.3px; }
.tile > .secondary { margin: 0 0 4px; font-size: 14px; line-height: 20px; }

/* ───────── Elenco nudo: righe divise da filetti ───────── */

.rows { list-style: none; margin: 0; padding: 0; }
.rows > li { padding: 14px 0; border-top: 1px solid var(--hairline); }
.rows > li:first-child { border-top: 0; }
.row { display: flex; gap: 14px; align-items: flex-start; }
.row-body { flex: 1; min-width: 0; display: grid; gap: 2px; }
.row-body p { margin: 0; }
.row-title { font-weight: 750; }
.row-text { color: var(--text-2); font-size: 14px; line-height: 20px; }

/* il segno quadrato a sinistra di una regola o di un pacchetto: inchiostro su pozzetto, mai colore di campo */
.badge {
  flex: none; width: 36px; height: 36px; border-radius: 14px; background: var(--surface-alt);
  border: 1px solid var(--hairline);
  display: grid; place-items: center; font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums;
}
.tile .badge { background: var(--surface-alt); }
.order { flex: none; width: 28px; font-size: 26px; line-height: 30px; font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; }

/* collegamenti a tutta riga (la pagina principale) */
.nav-rows > li { padding: 0; }
.nav-row { display: flex; align-items: center; gap: 14px; padding: 16px 0; text-decoration: none; }
.nav-row:hover .row-title { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.chevron { flex: none; width: 10px; height: 10px; border-right: 2.5px solid var(--text); border-top: 2.5px solid var(--text); transform: rotate(45deg); margin-right: 6px; }

/* ───────── Elenchi con spunta ───────── */

.checks { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 10px; }
.checks li { position: relative; padding-left: 28px; }
.checks li::before {
  content: ""; position: absolute; left: 3px; top: 6px; width: 12px; height: 6px;
  border-left: 3px solid var(--text); border-bottom: 3px solid var(--text); transform: rotate(-45deg);
}
.checks li.plus { color: var(--text-2); }
.checks li.plus::before {
  left: 2px; top: 11px; width: 14px; height: 3px; border: 0; background: var(--text); transform: none;
}
.checks li.plus::after {
  content: ""; position: absolute; left: 7.5px; top: 5.5px; width: 3px; height: 14px; background: var(--text);
}

/* ───────── Libro mastro ───────── */

.ledger { margin: 4px 0 0; padding: 0; }
.ledger-row { padding: 12px 0; border-bottom: 1px solid var(--rule); display: grid; gap: 2px; }
.ledger-row dt { color: var(--text-2); font-size: 14px; line-height: 20px; font-weight: 600; }
.ledger-row dd { margin: 0; font-weight: 600; }

/* ───────── Tasti con lo spessore ───────── */

.key {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
  min-height: 54px; margin: 0 0 4px; padding: 12px 20px;
  border: 1.5px solid var(--keyline); border-radius: 20px; box-shadow: 0 4px 0 0 var(--lip-neutral);
  font-weight: 800; font-size: 17px; line-height: 22px; text-align: center; text-decoration: none; color: var(--ink);
  transition: transform 80ms ease-out, box-shadow 80ms ease-out;
}
.key:hover { text-decoration: none; }
.key:active { transform: translateY(4px); box-shadow: 0 0 0 0 transparent; }
.key-primary { background: var(--oro); box-shadow: 0 4px 0 0 var(--lip-oro); }
.key-corallo { background: var(--corallo); box-shadow: 0 4px 0 0 var(--lip-corallo); }
.key-secondary { background: var(--key-face); color: var(--key-text); }
.key-note { margin: 10px 0 0; color: var(--text-2); font-size: 14px; line-height: 20px; }
.contact { display: grid; gap: 20px; margin-top: 8px; }
.contact-line { margin: 6px 0 0; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ───────── Informativa ───────── */

.toc { margin-top: 24px; }
.toc ol { margin: 6px 0 0; padding-left: 24px; font-size: 15px; line-height: 21px; }
.toc li { padding: 5px 0 5px 2px; }
.toc li::marker { color: var(--muted); font-variant-numeric: tabular-nums; }
.legal section { margin-top: 32px; scroll-margin-top: 16px; }
.legal h2 { margin: 0 0 10px; font-size: 20px; line-height: 26px; font-weight: 800; letter-spacing: -0.3px; }
.legal h3 { margin: 18px 0 6px; font-size: 16px; line-height: 22px; }
.legal p { margin: 0 0 12px; }
.legal section > p:last-child { margin-bottom: 0; }
.version { font-weight: 700; color: var(--text); }
.tbc {
  padding: 1px 6px; border-radius: 6px; background: var(--warn-soft); color: var(--warn);
  border: 1px solid var(--warn-line); font-weight: 800; font-size: 0.92em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.empty {
  margin-top: 28px; padding: 20px; border-radius: 28px; background: var(--surface); border: 1px solid var(--hairline);
  font-weight: 700;
}

/* ───────── Licenze ───────── */

.rows > li.pkg { padding: 12px 0 2px; }

.pkg-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.pkg-name { font-weight: 800; }
.pkg-meta { color: var(--text-2); font-size: 14px; font-variant-numeric: tabular-nums; }
.pkg-copy { margin: 4px 0 0; color: var(--text-2); font-size: 14px; line-height: 20px; }
.pkg-copy span { display: block; }
details { margin-top: 2px; }
summary {
  cursor: pointer; display: inline-flex; align-items: center; gap: 8px; min-height: 40px;
  font-weight: 700; font-size: 14px; list-style: none; color: var(--text-2);
}
summary::-webkit-details-marker { display: none; }
summary::before {
  content: ""; flex: none; width: 8px; height: 8px; margin: 0 4px 0 2px; border-right: 2.5px solid var(--text); border-bottom: 2.5px solid var(--text);
  transform: rotate(-45deg); transition: transform 120ms ease-out;
}
details[open] > summary::before { transform: rotate(45deg); }
.license-text {
  margin: 6px 0 0; padding: 14px; background: var(--surface); border: 1px solid var(--hairline); border-radius: 20px;
  font-family: var(--mono); font-size: 12.5px; line-height: 18px; white-space: pre-wrap; overflow-wrap: anywhere;
}
.license-label { margin: 12px 0 0; font-size: 13px; font-weight: 800; letter-spacing: 0.4px; color: var(--text-2); }

/* ───────── Errore ───────── */

.error-page { padding: 48px 0; }

/* ───────── Schermi stretti e larghi ───────── */

@media (max-width: 374px) {
  .display { font-size: 27px; line-height: 31px; letter-spacing: -0.7px; }
  .mega { font-size: 34px; line-height: 38px; }
  .slab { padding: 22px 18px 24px; }
}

@media (min-width: 600px) {
  .ledger-row { grid-template-columns: 38% 1fr; gap: 16px; }
  .key { display: inline-flex; width: auto; min-width: 300px; }
}

@media (min-width: 720px) {
  :root { --gutter: 24px; }
  body { font-size: 17px; line-height: 1.55; }
  .site-head { padding-top: 28px; }
  .slab { margin-left: calc(8px - var(--gutter)); margin-right: calc(8px - var(--gutter)); padding: 36px 36px 38px; }
  .slab-shapes { width: 260px; height: 260px; right: -36px; top: -36px; }
  .display { font-size: 38px; line-height: 42px; }
  .mega { font-size: 52px; line-height: 54px; letter-spacing: -1.8px; }
  .tile { padding: 24px 28px; }
}

@media (prefers-reduced-motion: reduce) {
  .key, summary::before { transition: none; }
}

@media print {
  :root { color-scheme: light; --bg: #FFFFFF; --text: #0B0B10; --text-2: #4B4957; --muted: #686575; --surface: #FFFFFF; --rule: #C9C2B2; --hairline: #E2DDD0; }
  body { background: #FFFFFF; }
  .skip, .site-head, .toc { display: none; }
  .slab { border-radius: 0; margin: 0; }
  .slab-shapes { display: none; }
  details > :not(summary) { display: block; }
}
