/*
 * VXOST for macOS, presentation site
 *
 * The tokens below are the same ones the dashboard uses
 * (dashboard/stylesheets/all.css). They are copied rather than imported so the
 * site can be deployed on its own domain without depending on a local VXOST
 * install, but they must be kept in sync: if a colour changes there, it
 * changes here.
 *
 * No framework, no external request. Dark is the default; light is a token
 * override, remembered in localStorage.
 */

:root {
  /* Surfaces */
  --bg:            #070B16;
  --bg-elev:       #0B1220;
  --surface:       rgba(148, 163, 184, 0.05);
  --surface-2:     rgba(148, 163, 184, 0.08);
  --surface-solid: #0F172A;

  /* Text */
  --text:          #E9EFFA;
  --text-soft:     #B7C3D6;
  /* ⚠️ Misurato sul fondo composto, non su --bg.
     Il vecchio #8493AB faceva 6,31:1 sul fondo pagina e scendeva a 5,58:1
     dentro una scheda annidata: sotto la soglia che questo progetto si e'
     dato, e sotto AAA ovunque comparisse. Le superfici sono velature, non
     tinte piene, quindi il contrasto va ricalcolato componendole. */
  --text-muted:    #9AA6BA;   /* 7,68 su bg · 7,26 su surface · 7,07 annidato */

  /* Borders */
  --border:        rgba(148, 163, 184, 0.16);
  --border-strong: rgba(148, 163, 184, 0.30);

  /* Accents, taken from the official VXOST gradient sampled off the brand file:
     blue #0E05D0 -> violet #6619E3 -> magenta #FD3BFC -> coral #FC6D5F ->
     orange #FA8406.
     The brand magenta reaches 6.75:1 against --bg, just under the AAA bar the
     rest of the system holds: the accent is lightened a hair to 7.02:1. Same
     colour to the eye, readable text. */
  --accent:        #FD67FD;   /* VXOST magenta   8,19 su bg · 7,74 su surface */
  --accent-ink:    #0A0510;   /* text on the accent: BLACK, not white     7.19:1 */
  --cyan:          #C79BFF;   /* lilac                                    8.95:1 */
  --violet:        #FC8A7E;   /* coral                                    8.49:1 */
  --amber:         #FA8406;   /* VXOST orange                             7.83:1 */
  --danger:        #FF5C5C;   /* red                                      6.49:1 */
  --running:       #3FD68C;

  /* Brand gradient, decorative only: backgrounds, borders, glows. Never behind
     text, no single stop holds contrast across the whole run. */
  --brand-blue:    #0E05D0;
  --brand-violet:  #6619E3;
  --brand-magenta: #FD3BFC;
  --brand-coral:   #FC6D5F;
  --brand-orange:  #FA8406;
  --brand-gradient: linear-gradient(45deg,
                      var(--brand-blue)    0%,
                      var(--brand-violet) 26%,
                      var(--brand-magenta) 55%,
                      var(--brand-coral)  78%,
                      var(--brand-orange) 100%);

  --glow-accent:   0 0 0 1px rgba(253, 71, 253, .35), 0 8px 30px -8px rgba(253, 71, 253, .45);

  /* Radii */
  --r-xs: 6px;  --r-sm: 10px; --r-md: 14px;
  --r-lg: 20px; --r-xl: 28px; --r-pill: 999px;

  /* Spacing, 4px scale */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px;

  /* Shadows */
  --sh-1: 0 1px 2px rgba(0, 0, 0, .35);
  --sh-2: 0 6px 20px -6px rgba(0, 0, 0, .55);
  --sh-3: 0 24px 60px -20px rgba(0, 0, 0, .70);

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
               "Liberation Mono", monospace;

  --wrap: 1140px;
}

:root[data-theme="light"] {
  --bg:            #F4F7FC;
  --bg-elev:       #FFFFFF;
  --surface:       rgba(15, 23, 42, 0.03);
  --surface-2:     rgba(15, 23, 42, 0.06);
  --surface-solid: #FFFFFF;
  --text:          #0B1220;
  --text-soft:     #33415A;
  --text-muted:    #404D5F;   /* 7,66 su bg · 7,24 su surface · 7,07 annidato */
  --border:        rgba(15, 23, 42, 0.12);
  --border-strong: rgba(15, 23, 42, 0.24);
  /* Same hues, darkened to stay legible on a light background (all ≥ 5.6:1).
     Magenta holds at no useful depth on white, so the accent slides down the
     gradient to violet, its nearest neighbour. */
  --accent:        #5A15C9;   /* VXOST violet                             8.20:1 */
  --accent-ink:    #FFFFFF;
  --cyan:          #6B21B8;   /* violet-lilac                             7.72:1 */
  --violet:        #B03A1E;   /* dark coral                               5.64:1 */
  --amber:         #7E4207;   /* dark orange                              7.33:1 */
  --danger:        #A3200D;   /* red                                      7.06:1 */
  --running:       #0F7A47;
  --sh-2: 0 6px 20px -6px rgba(15, 23, 42, .12);
  --sh-3: 0 24px 60px -20px rgba(15, 23, 42, .18);
}

/* ---------------------------------------------------------------- base --- */

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

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}


/* The block that declares the brand gradients.
 *
 * It is an <svg> with width="0" height="0" at the top of the body: it holds
 * only <defs>, draws nothing, and is there so that the gradient of the icons
 * is declared once per page.
 *
 * It has to leave the flow, or it brings along the height of the line it sits
 * on: on iPad that was an empty band between the Safari bar and the header.
 *
 * NOT with display: none. That was the first fix (21/08/2026) and it killed
 * the icons: in Chrome and Safari a gradient inside an element that is not
 * rendered cannot be used as a paint, so every stroke that pointed to it drew
 * nothing and the cards showed an empty square. Taken out of the flow and
 * clipped to nothing instead, the definitions stay usable. */
.brand-gradient-defs {
  position: absolute;
  width: 0; height: 0;
  overflow: hidden;
  pointer-events: none;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.2; margin: 0 0 var(--s-3); letter-spacing: -.02em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 600; }
p  { margin: 0 0 var(--s-4); color: var(--text-soft); }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

img, svg { max-width: 100%; height: auto; }
code, kbd { font-family: var(--font-mono); font-size: .9em; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--s-5); }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: var(--accent-ink);
  padding: var(--s-3) var(--s-4); border-radius: 0 0 var(--r-sm) 0; z-index: 100;
}
.skip:focus { left: 0; }

.eyebrow {
  display: inline-block;
  font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); margin-bottom: var(--s-3);
}

.muted { color: var(--text-muted); }
.mono  { font-family: var(--font-mono); }

/* -------------------------------------------------------------- header --- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}

/* The bar spans the window rather than the content column: eleven entries do
   not fit in 1140px, and squeezing them made the last ones collide. */
.header-inner {
  display: flex; align-items: center; gap: var(--s-5);
  height: 62px;
  padding: 0 var(--s-5);
  width: 100%;
}

.brand { display: flex; align-items: center; gap: var(--s-3); font-weight: 700; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand img { width: 28px; height: 28px; }
.brand span.tag {
  font-family: var(--font-mono); font-size: .72rem; font-weight: 400;
  color: var(--text-muted); border: 1px solid var(--border);
  padding: 1px var(--s-2); border-radius: var(--r-pill);
}

.site-header .header-inner { position: relative; }

.site-nav {
  margin-left: auto;
  display: flex; align-items: center; gap: var(--s-4);
  min-width: 0;
}
/* :not(.btn) e' necessario, non decorativo. Il pulsante Download vive dentro
   la barra, e senza l'esclusione questa regola vince per specificita' e gli
   impone --text-soft: sul tema chiaro diventa testo scuro su viola scuro, e
   l'etichetta sparisce dal pulsante principale del sito. */
.site-nav a:not(.btn) { color: var(--text-soft); font-size: .9rem; font-weight: 500; white-space: nowrap; }
.site-nav a:not(.btn):hover { color: var(--text); text-decoration: none; }

/* Between full width and the mobile breakpoint the entries tighten rather
   than wrap onto a second line. */
@media (max-width: 1500px) {
  .header-inner { gap: var(--s-4); }
  .site-nav { gap: var(--s-3); }
  .site-nav a { font-size: .86rem; }
}
@media (max-width: 1240px) {
  .site-nav a:not(.btn) { font-size: .82rem; }
  .brand span.tag { display: none; }
}

.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; padding: 0;
  background: var(--surface); color: var(--text-soft);
  border: 1px solid var(--border); border-radius: var(--r-sm);
  cursor: pointer;
}
.theme-toggle:hover { background: var(--surface-2); color: var(--text); }
.theme-toggle svg { width: 16px; height: 16px; }
:root[data-theme="light"] .theme-toggle .icon-sun,
:root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }

.nav-links { display: flex; align-items: center; gap: var(--s-4); }

/* Il pulsante del menu esiste solo sotto la soglia: sopra, le voci ci stanno. */
.nav-toggle { display: none; }

/* Sotto questa larghezza le voci non entrano a nessuna dimensione. Prima
   sparivano e basta, lasciando raggiungibile solo il footer: da qui in giu'
   passano dentro il pannello che apre il pulsante. */
@media (max-width: 1060px) {
  .brand span.tag { display: inline; }

  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; padding: 0;
    background: var(--surface); color: var(--text-soft);
    border: 1px solid var(--border); border-radius: var(--r-sm);
    cursor: pointer;
  }
  .nav-toggle:hover { background: var(--surface-2); color: var(--text); }
  .nav-toggle svg { width: 18px; height: 18px; }
  .nav-toggle .icon-close { display: none; }
  .site-nav.is-open .nav-toggle .icon-close { display: block; }
  .site-nav.is-open .nav-toggle .icon-burger { display: none; }

  .nav-links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--s-3) var(--s-5) var(--s-5);
    /* Fondo pieno, non trasparente: sotto ci scorre il contenuto della
       pagina e un pannello velato lo renderebbe illeggibile. */
    background: var(--bg-elev);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .28);
    max-height: calc(100vh - 64px);
    overflow-y: auto;
  }
  .site-nav.is-open .nav-links { display: flex; }

  .nav-links a:not(.btn) {
    font-size: 1rem;
    padding: var(--s-3) 0;
    border-bottom: 1px solid var(--border);
  }
  .nav-links a:not(.btn):last-child { border-bottom: 0; }
}

/* --------------------------------------------------------------- hero --- */

/* The hero carries its own background image, so it needs its own text colours:
   whatever the page theme is, the artwork underneath stays dark.
   The tokens are redefined here rather than fixed per element. The first
   attempt listed selectors, .hero, .lead, .hero-macro, and missed the other
   eleven: on the light theme .btn--ghost came out at 1.02:1, black on near
   black. Overriding the tokens covers every descendant, including the ones
   added later.
   Values are set against the brightest point of the left-hand column, #FF40FF
   under the veil: muted and accent are lifted because at their normal value
   they only reach 5.1:1 and 5.7:1 there, not enough, on either theme. */
.hero {
  --text:       #E9EFFA;   /* 13.71:1 */
  --text-soft:  #B7C3D6;   /*  8.88:1 */
  --text-muted: #A8B5C8;   /*  7.62:1, lifted from #8493AB (5.08:1) */
  --accent:     #FE8AFE;   /*  7.75:1, lifted from #FD47FD (5.65:1) */
  /* Must be redefined together with --accent: the light theme sets this to
     white, which over the lifted magenta lands at 2.04:1 and takes the label
     off the download button entirely. */
  --accent-ink: #0A0510;   /*  9.87:1 on the accent above */
  --border:        rgba(233, 239, 250, 0.18);
  --border-strong: rgba(233, 239, 250, 0.32);
  --surface:       rgba(233, 239, 250, 0.07);
  --surface-2:     rgba(233, 239, 250, 0.11);

  padding: var(--s-9) 0 var(--s-8);
  position: relative; overflow: hidden;
  color: var(--text);
}

/* The brand gradient sits behind the headline as an image rather than as CSS:
   it is the approved artwork, with its own grain and colour drift, and a
   linear-gradient reproduction of it never quite matches.
   WebP first at 11 KB, JPEG at 130 KB for anything that cannot read it. */
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image: url("../assets/vxost-hero.jpg");
  background-size: cover;
  background-position: center;
  pointer-events: none;
}
@supports (background-image: image-set(url("x.webp") type("image/webp"))) {
  .hero::before {
    background-image: image-set(url("../assets/vxost-hero.webp") type("image/webp") 1x,
                                url("../assets/vxost-hero.jpg")  type("image/jpeg") 1x);
  }
}

/* The veil is what makes the headline readable, and it is not uniform: dense
   over the text column on the left, thin on the right where nothing is written
   and the artwork can be seen for what it is. A flat veil at the density the
   text needs would hide the gradient altogether.
   Behind the text the artwork peaks at #FF40FF; at 84% every token declared on
   .hero clears 7:1 there. Thinning the left-hand stops is not a style choice,
   it breaks the contrast. */
.hero::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(to right,
      rgba(7, 11, 22, .90) 0%,
      rgba(7, 11, 22, .88) 46%,
      rgba(7, 11, 22, .55) 72%,
      rgba(7, 11, 22, .34) 100%),
    linear-gradient(to bottom,
      rgba(7, 11, 22, .30) 0%,
      rgba(7, 11, 22, .22) 45%,
      rgba(7, 11, 22, .72) 100%);
  pointer-events: none;
}

/* Narrow screens: the text runs the full width, so the right-hand window
   closes and the veil goes back to covering everything. */
@media (max-width: 900px) {
  .hero::after {
    background: linear-gradient(to bottom,
                  rgba(7, 11, 22, .86) 0%,
                  rgba(7, 11, 22, .84) 42%,
                  rgba(7, 11, 22, .93) 100%);
  }
}

.hero .wrap { position: relative; z-index: 1; }

/* The positioning line, between the headline and the explanation. Narrower
   than the lead on purpose: it stacks into two or three short lines instead of
   running the full width, so it reads as a claim rather than as prose. */
.hero-macro {
  font-size: clamp(1.22rem, 2.5vw, 1.6rem);
  font-weight: 600; line-height: 1.42;
  color: var(--text); max-width: 34ch;
  margin: var(--s-4) 0 var(--s-5);
}
.hero-macro strong { color: var(--accent); font-weight: 700; }

.hero p.lead { font-size: 1.18rem; max-width: 92ch; }

.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-6); }

.btn {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: var(--s-3) var(--s-5);
  border-radius: var(--r-sm); border: 1px solid transparent;
  font-weight: 600; font-size: .95rem; cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn svg { width: 17px; height: 17px; }

.btn--primary { background: var(--accent); color: var(--accent-ink); box-shadow: var(--glow-accent); }
.btn--ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn--ghost:hover { background: var(--surface-2); border-color: var(--border-strong); }

.hero-meta {
  display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5);
  margin-top: var(--s-5); font-size: .86rem; color: var(--text-muted);
}
.hero-meta span { display: inline-flex; align-items: center; gap: var(--s-2); }
.hero-meta svg { width: 15px; height: 15px; color: var(--running); }

/* ------------------------------------------------------------ sections --- */

.section { padding: var(--s-9) 0; }
.section--alt { background: var(--bg-elev); border-block: 1px solid var(--border); }

.section-head { max-width: 68ch; margin-bottom: var(--s-7); }

/* Alternating rows: text on one side, illustration on the other. */
.split {
  display: grid; gap: var(--s-7);
  grid-template-columns: 1fr;
  align-items: center;
  padding: var(--s-7) 0;
}
.split + .split { border-top: 1px solid var(--border); }

@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; gap: var(--s-8); }
  /* Every other row swaps sides, which is what makes the page read as a
     checkerboard rather than a list. */
  .split--flip .split__media { order: -1; }
}

.split__body h2 { margin-bottom: var(--s-4); }
.split__list { list-style: none; margin: var(--s-5) 0 0; padding: 0; display: grid; gap: var(--s-3); }
.split__list li { display: flex; gap: var(--s-3); align-items: flex-start; color: var(--text-soft); font-size: .96rem; }
.split__list svg { width: 18px; height: 18px; flex: none; margin-top: 3px; color: var(--accent); }

.split__media { position: relative; }

/* ---------------------------------------------------------- app frames --- */

/* Window chrome around each illustration, so a mockup reads as a real window */
.frame {
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface-solid);
  box-shadow: var(--sh-3);
  overflow: hidden;
}
.frame__bar {
  display: flex; align-items: center; gap: var(--s-2);
  padding: var(--s-3);
  background: var(--bg-elev);
  border-bottom: 1px solid var(--border);
}
.frame__dots { display: flex; gap: 6px; }
.frame__dots i { width: 10px; height: 10px; border-radius: 50%; display: block; }
.frame__dots i:nth-child(1) { background: #FF5F57; }
.frame__dots i:nth-child(2) { background: #FFBD2E; }
.frame__dots i:nth-child(3) { background: #28C840; }
.frame__title {
  flex: 1; text-align: center; font-size: .74rem; color: var(--text-muted);
  font-family: var(--font-mono);
}
.frame__body { padding: var(--s-4); }

/* --------------------------------------------------------------- grid --- */

.cards { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

.card {
  padding: var(--s-5);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md);
  transition: border-color .15s ease, transform .15s ease;
}
.card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.card h3 { margin-bottom: var(--s-2); }
.card p { margin: 0; font-size: .93rem; }

.card__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; margin-bottom: var(--s-4);
  border-radius: var(--r-sm);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
}
.card__icon svg { width: 19px; height: 19px; }
.card__icon--cyan   { background: color-mix(in srgb, var(--cyan) 14%, transparent);   color: var(--cyan); }
.card__icon--violet { background: color-mix(in srgb, var(--violet) 14%, transparent); color: var(--violet); }
.card__icon--amber  { background: color-mix(in srgb, var(--amber) 14%, transparent);  color: var(--amber); }

/* ------------------------------------------------------------ language --- */

.lang-grid {
  display: grid; gap: var(--s-2);
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  margin-top: var(--s-5);
}
.lang-chip {
  display: flex; align-items: center; gap: var(--s-2);
  padding: var(--s-2) var(--s-3);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-sm); font-size: .86rem; color: var(--text-soft);
}
.lang-chip b {
  font-family: var(--font-mono); font-size: .72rem; font-weight: 600;
  color: var(--accent); letter-spacing: .04em;
}

/* ------------------------------------------------------------ download --- */

.download {
  display: grid; gap: var(--s-5);
  grid-template-columns: 1fr;
  padding: var(--s-7);
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
}
@media (min-width: 800px) { .download { grid-template-columns: 1.2fr 1fr; align-items: center; } }

.download dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: var(--s-2) var(--s-4); font-size: .9rem; }
.download dt { color: var(--text-muted); }
.download dd { margin: 0; color: var(--text); font-family: var(--font-mono); font-size: .84rem; }

.notice {
  display: flex; gap: var(--s-3); align-items: flex-start;
  margin-top: var(--s-5); padding: var(--s-4);
  background: color-mix(in srgb, var(--amber) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--amber) 35%, transparent);
  border-radius: var(--r-sm);
  font-size: .89rem; color: var(--text-soft);
}
.notice svg { width: 18px; height: 18px; flex: none; color: var(--amber); margin-top: 2px; }
.notice strong { color: var(--text); }

/* --------------------------------------------------------------- steps --- */

.steps { counter-reset: step; display: grid; gap: var(--s-4); margin-top: var(--s-5); }
.steps li { counter-increment: step; display: flex; gap: var(--s-4); align-items: flex-start; }
.steps li::before {
  content: counter(step);
  flex: none; width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border);
  font-size: .8rem; font-weight: 700; color: var(--accent);
}

/* -------------------------------------------------------------- footer --- */

/* The footer closes the page with the same artwork the hero opens it with,
   flipped so the bright corner lands on the opposite side.
   Like the hero it carries its own tokens: the picture stays dark on both
   themes, so the light theme's dark text would vanish into it. Same failure
   that took eight elements off the hero, fixed the same way, by overriding
   the tokens, not by listing selectors. */
.site-footer {
  --text:       #E9EFFA;
  --text-soft:  #B7C3D6;
  --text-muted: #A8B5C8;
  --accent:     #FE8AFE;
  --accent-ink: #0A0510;
  --border:        rgba(233, 239, 250, 0.16);
  --border-strong: rgba(233, 239, 250, 0.28);

  position: relative;
  border-top: 1px solid var(--border);
  padding: var(--s-8) 0 var(--s-6);
  background: var(--bg-elev);
  color: var(--text);
  overflow: hidden;
}
.site-footer::before {
  content: ""; position: absolute; inset: 0;
  background-image: url("../assets/vxost-hero.jpg");
  background-size: cover;
  background-position: center;
  transform: scaleX(-1);
  pointer-events: none;
}
@supports (background-image: image-set(url("x.webp") type("image/webp"))) {
  .site-footer::before {
    background-image: image-set(url("../assets/vxost-hero.webp") type("image/webp") 1x,
                                url("../assets/vxost-hero.jpg")  type("image/jpeg") 1x);
  }
}
/* Denser than the hero's veil: the footer is four columns of small links, not
   one column of large type, and small text needs more distance from the
   picture. */
.site-footer::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom,
                rgba(7, 11, 22, .93) 0%,
                rgba(7, 11, 22, .90) 55%,
                rgba(7, 11, 22, .95) 100%);
  pointer-events: none;
}
.site-footer > * { position: relative; z-index: 1; }

.footer-grid { display: grid; gap: var(--s-6); grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.footer-grid h3 { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text-muted); margin: 0 0 var(--s-3); }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.footer-grid a { color: var(--text-soft); font-size: .9rem; }
.footer-grid a:hover { color: var(--accent); }
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: var(--s-3); justify-content: space-between;
  margin-top: var(--s-7); padding-top: var(--s-5); border-top: 1px solid var(--border);
  font-size: .84rem; color: var(--text-muted);
}

/* --------------------------------------------------------------- reveal --- */

/* Content is visible by default and only animated once revealed, so it stays
   readable if the script never runs. */
[data-reveal] { opacity: 1; }
.js [data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.js [data-reveal].is-visible { opacity: 1; transform: none; }

/* --------------------------------------------------------- inner pages --- */

.site-nav a.is-active { color: var(--accent); }

/* Every page opens on the same artwork as the home page, shorter: enough to
   carry the breadcrumb, the title and one line of lead, not a second hero.

   Like the hero and the footer it declares its own tokens. The picture stays
   dark whatever the theme, so the light theme's dark text would vanish into
   it, and fixing that per element is what left eleven of fourteen elements
   unreadable the first time round. */
.page-header {
  --text:       #E9EFFA;
  --text-soft:  #B7C3D6;
  --text-muted: #A8B5C8;
  --accent:     #FE8AFE;
  --accent-ink: #0A0510;
  --border:        rgba(233, 239, 250, 0.18);
  --border-strong: rgba(233, 239, 250, 0.32);

  position: relative;
  padding: var(--s-8) 0 var(--s-6);
  border-bottom: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text);
  overflow: hidden;
}
.page-header::before {
  content: ""; position: absolute; inset: 0;
  background-image: url("../assets/vxost-hero.jpg");
  background-size: cover;
  background-position: center;
  pointer-events: none;
}
@supports (background-image: image-set(url("x.webp") type("image/webp"))) {
  .page-header::before {
    background-image: image-set(url("../assets/vxost-hero.webp") type("image/webp") 1x,
                                url("../assets/vxost-hero.jpg")  type("image/jpeg") 1x);
  }
}
/* Denser than the home page's veil: this band is short, so the bright part of
   the artwork sits right behind the text instead of above it. */
.page-header::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(to right,
      rgba(7, 11, 22, .92) 0%,
      rgba(7, 11, 22, .90) 52%,
      rgba(7, 11, 22, .62) 78%,
      rgba(7, 11, 22, .42) 100%),
    linear-gradient(to bottom,
      rgba(7, 11, 22, .34) 0%,
      rgba(7, 11, 22, .26) 50%,
      rgba(7, 11, 22, .46) 100%);
  pointer-events: none;
}
@media (max-width: 900px) {
  .page-header::after {
    background: linear-gradient(to bottom,
                  rgba(7, 11, 22, .90) 0%,
                  rgba(7, 11, 22, .88) 50%,
                  rgba(7, 11, 22, .94) 100%);
  }
}
.page-header > * { position: relative; z-index: 1; }

.page-header h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
.page-header p.lead { font-size: 1.08rem; max-width: none; margin-bottom: 0; }

/* Breadcrumbs: the visible half of the BreadcrumbList in the structured data */
.crumbs { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center;
          font-size: .84rem; margin-bottom: var(--s-4); padding: 0; list-style: none; }
.crumbs li { display: flex; align-items: center; gap: var(--s-2); color: var(--text-muted); }
.crumbs li + li::before { content: "/"; color: var(--border-strong); }
.crumbs a { color: var(--text-muted); }
.crumbs a:hover { color: var(--accent); }
.crumbs [aria-current] { color: var(--text-soft); }

/* I testi descrittivi occupano tutto il contenitore, non una colonna stretta.
   Scelta di Davide del 14/08/2026.

   Gli elenchi restano piu' corti: una riga di prosa lunga si legge male ma si
   legge, un elenco puntato largo quanto lo schermo fa perdere il segno fra un
   punto e l'altro, perche' l'occhio deve tornare indietro senza un riferimento
   verticale vicino. */
.prose { max-width: none; }
.prose ul, .prose ol { max-width: 82ch; }
.prose h2 { margin-top: var(--s-7); }
.prose h3 { margin-top: var(--s-5); color: var(--text); }
.prose ul { padding-left: var(--s-5); color: var(--text-soft); }
.prose li { margin-bottom: var(--s-2); }

/* Comparison table, used on the app and changelog pages */
.table-wrap { overflow-x: auto; margin: var(--s-5) 0; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 460px; }
th, td { text-align: left; padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--border); }
th { color: var(--text-muted); font-weight: 600; font-size: .8rem;
     text-transform: uppercase; letter-spacing: .06em; }
td { color: var(--text-soft); }
td strong { color: var(--text); }

/* Call to action closing an inner page */
.cta {
  margin-top: var(--s-8); padding: var(--s-7);
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--r-lg); text-align: center;
}
.cta h2 { margin-bottom: var(--s-3); }
.cta .hero-actions { justify-content: center; }

/* Next/previous navigation between pages */
.pager { display: grid; gap: var(--s-4); grid-template-columns: 1fr; margin-top: var(--s-7); }
@media (min-width: 700px) { .pager { grid-template-columns: 1fr 1fr; } }
.pager a {
  display: block; padding: var(--s-4) var(--s-5);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); color: var(--text);
}
.pager a:hover { border-color: var(--border-strong); text-decoration: none; }
.pager span { display: block; font-size: .76rem; color: var(--text-muted);
              text-transform: uppercase; letter-spacing: .08em; margin-bottom: 2px; }
.pager .pager__next { text-align: right; }

/* Definition-style rows for specifications */
.specs { display: grid; gap: 0; margin: var(--s-5) 0 0; }
.specs > div {
  display: flex; flex-wrap: wrap; gap: var(--s-3); justify-content: space-between;
  padding: var(--s-3) 0; border-bottom: 1px solid var(--border);
}
.specs dt { color: var(--text-muted); font-size: .9rem; margin: 0; }
.specs dd { margin: 0; color: var(--text); font-family: var(--font-mono); font-size: .86rem; }

/* ------------------------------------------------------------------ FAQ --- */

/* Full container width, matching the CTA blocks */
.faq { width: 100%; }

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  margin-bottom: var(--s-3);
  overflow: hidden;
}
.faq-item[open] { border-color: var(--border-strong); }

.faq-item summary {
  padding: var(--s-4) var(--s-5);
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
  list-style: none;
  display: flex; align-items: center; gap: var(--s-3);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before {
  content: "+";
  flex: none;
  width: 22px; height: 22px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--surface-2); color: var(--accent);
  font-size: 1rem; line-height: 1;
}
.faq-item[open] summary::before { content: "−"; }
.faq-item summary:hover { background: var(--surface-2); }

.faq-answer { padding: 0 var(--s-5) var(--s-4) calc(var(--s-5) + 34px); }
.faq-answer p { margin: 0; font-size: .96rem; max-width: 90ch; }

/* --------------------------------------------------------------- guides --- */

.guides { display: grid; gap: var(--s-5); }

.guide {
  padding: var(--s-6);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}
.guide h2 { font-size: 1.35rem; margin-bottom: var(--s-2); }
.guide > p { max-width: 68ch; }
.guide .steps { margin-top: var(--s-5); }
.guide .steps li div { color: var(--text-soft); font-size: .95rem; }
.guide .steps strong { color: var(--text); }

/* Comandi da copiare, dentro un passaggio.
   Scorre in orizzontale invece di andare a capo: una riga di terminale mandata
   a capo dal browser si copia spezzata, e incollata fa un'altra cosa. */
.cmd {
  margin-top: var(--s-2);
  padding: var(--s-3);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-family: var(--font-mono);
  font-size: .82rem;
  line-height: 1.7;
  color: var(--text);
  overflow-x: auto;
  white-space: pre;
}

/* ------------------------------------------------------- upcoming work --- */

/* Announcement for something not built yet: deliberately distinct from the
   feature cards, so nobody mistakes a plan for a shipped feature. */
.upcoming {
  display: grid; gap: var(--s-5);
  grid-template-columns: 1fr;
  margin-bottom: var(--s-7);
  padding: var(--s-6);
  /* Bordo in gradiente di marchio. Si ottiene con due sfondi sovrapposti e
     border-box/padding-box: una border-image non segue il raggio degli angoli
     e il riquadro perderebbe la sua forma. */
  background:
    linear-gradient(var(--bg-elev), var(--bg-elev)) padding-box,
    var(--brand-gradient) border-box;
  border: 1px solid transparent;
  border-radius: var(--r-lg);
  position: relative;
}
/* Velo di colore dentro il bordo, al posto del riempimento ambra. */
.upcoming::before {
  content: ""; position: absolute; inset: 0;
  border-radius: inherit;
  background: var(--brand-gradient);
  opacity: .07;
  pointer-events: none;
}
.upcoming > * { position: relative; z-index: 1; }
@media (min-width: 900px) { .upcoming { grid-template-columns: 1.15fr 1fr; align-items: center; } }

.upcoming__tag {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: var(--s-1) var(--s-3);
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  /* Testo a tinta unita, non ritagliato sul gradiente. Con background-clip la
     scritta prende il gradiente dall'inizio della scala, dove c'e' il blu: a
     1.74:1 su fondo scuro non si legge. Il gradiente resta dove regge, cioe'
     sul bordo del riquadro e sul pallino. */
  color: var(--accent);
  font-size: .74rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  margin-bottom: var(--s-3);
}
.upcoming__tag::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--brand-gradient);
  animation: upcoming-pulse 2.4s ease-in-out infinite;
}
@keyframes upcoming-pulse { 0%,100% { opacity: 1 } 50% { opacity: .35 } }
@media (prefers-reduced-motion: reduce) { .upcoming__tag::before { animation: none } }

.upcoming h2 { font-size: 1.5rem; margin-bottom: var(--s-3); }
.upcoming h2:has(+ .upcoming__subtitle) { margin-bottom: var(--s-1); }
.upcoming__subtitle { font-size: 1.05rem; color: var(--text-soft); margin-bottom: var(--s-3); }
.upcoming p:last-child { margin-bottom: 0; }
.upcoming__note {
  font-size: .86rem; color: var(--text-muted);
  padding-top: var(--s-3); border-top: 1px solid color-mix(in srgb, var(--brand-magenta) 22%, transparent);
}

/* ------------------------------------------------------------- counter --- */

/* Real download figure, read from the GitHub API at build time. It is absent
   entirely when there is nothing to count, rather than showing a zero or a
   number nobody could verify. */
.counter {
  display: inline-flex; align-items: baseline; gap: var(--s-3);
  margin-top: var(--s-6);
  padding: var(--s-3) var(--s-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
}
.counter strong {
  font-size: 1.5rem; font-weight: 800; color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.counter span { font-size: .9rem; color: var(--text-muted); }

/* -------------------------------------------------------- release meta --- */

/* Version, update date and, when real, the download count. Repeated in the
   hero, on the download page and inside every call to action. */
.release-meta {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: var(--s-2) var(--s-4);
  margin-top: var(--s-5);
  font-size: .85rem; color: var(--text-muted);
}
.release-meta__item { display: inline-flex; align-items: center; gap: var(--s-2); }
.release-meta__item + .release-meta__item::before {
  content: "·"; color: var(--border-strong);
}
.release-meta b { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }
.release-meta__item--count b { color: var(--accent); }

/* In the hero it sits under the buttons and aligns with the text above it */
.hero .release-meta, .download .release-meta { justify-content: flex-start; }

/* ------------------------------------------------- launch, stats, compare --- */

/* The launch note: the version set large beside a line of text, rather than
   the alert-looking box this replaced. */
.launch {
  display: flex; align-items: center; gap: var(--s-5);
  margin-top: var(--s-6); padding: var(--s-4) var(--s-5) var(--s-4) var(--s-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--r-md);
  max-width: 64ch;
}
.launch__version {
  flex: none; display: flex; flex-direction: column; align-items: center;
  padding-right: var(--s-5); border-right: 1px solid var(--border);
}
.launch__number {
  font-family: var(--font-mono); font-size: 1.45rem; font-weight: 700;
  color: var(--accent); line-height: 1; font-variant-numeric: tabular-nums;
}
.launch__label {
  margin-top: 4px; font-size: .68rem; letter-spacing: .07em;
  text-transform: uppercase; color: var(--text-muted); white-space: nowrap;
}
.launch__text { font-size: .94rem; color: var(--text-soft); }
.launch__text strong { color: var(--text); }

@media (max-width: 620px) {
  .launch { flex-direction: column; align-items: flex-start; gap: var(--s-3); }
  .launch__version { flex-direction: row; gap: var(--s-3); align-items: baseline;
                     padding-right: 0; border-right: 0; }
}

/* Repository figures, or an invitation while there is nothing to count */
.repo-stats { display: grid; gap: var(--s-3); grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-bottom: var(--s-6); }

.repo-stat {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
  padding: var(--s-4) var(--s-5);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); color: var(--text);
}
.repo-stat:hover { border-color: var(--border-strong); text-decoration: none; }
.repo-stat__name { font-weight: 600; font-size: .95rem; }
.repo-stat__figures { display: flex; gap: var(--s-4); color: var(--text-muted); font-size: .9rem; }
.repo-stat__figures span { display: inline-flex; align-items: center; gap: var(--s-2); }
.repo-stat__figures svg { width: 15px; height: 15px; }
.repo-stat__figures b { color: var(--text); font-variant-numeric: tabular-nums; }

.repo-stats--empty {
  grid-template-columns: 1fr;
  display: flex; align-items: flex-start; gap: var(--s-3);
  padding: var(--s-4) var(--s-5);
  background: color-mix(in srgb, var(--amber) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--amber) 28%, transparent);
  border-radius: var(--r-md);
  font-size: .93rem; color: var(--text-soft);
}
.repo-stats--empty strong { color: var(--text); }
.repo-stats__icon { flex: none; color: var(--amber); }
.repo-stats__icon svg { width: 18px; height: 18px; }

/* The comparison against the manager it replaces: four verifiable facts */
.compare {
  display: grid; gap: var(--s-3);
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  margin: var(--s-6) 0;
}
.compare__item {
  padding: var(--s-4) var(--s-5);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.compare__item b { display: block; color: var(--accent); font-size: 1.05rem; font-weight: 700; }
.compare__item span { display: block; margin-top: 2px; color: var(--text-muted); font-size: .86rem; }

/* ----------------------------------------------------------- components --- */

.components { display: grid; gap: var(--s-4); }

.component {
  display: grid; gap: var(--s-4);
  grid-template-columns: 1fr;
  padding: var(--s-6);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}
@media (min-width: 860px) { .component { grid-template-columns: 300px 1fr; gap: var(--s-7); } }

.component__badge {
  display: inline-block; margin-bottom: var(--s-3);
  padding: 2px var(--s-3); border-radius: var(--r-pill);
  font-size: .72rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  background: color-mix(in srgb, var(--accent) 15%, transparent); color: var(--accent);
}
.component__badge--cyan   { background: color-mix(in srgb, var(--cyan) 15%, transparent);   color: var(--cyan); }
.component__badge--violet { background: color-mix(in srgb, var(--violet) 15%, transparent); color: var(--violet); }
.component__badge--amber  { background: color-mix(in srgb, var(--amber) 15%, transparent);  color: var(--amber); }

.component__head h2 { font-size: 1.3rem; margin-bottom: var(--s-1); }
.component__version { font-family: var(--font-mono); font-size: .85rem; color: var(--text-muted); font-weight: 400; }
.component__by { font-size: .86rem; color: var(--text-muted); margin: 0; }

.component__body p { font-size: .95rem; }
.component__body p:last-of-type { margin-bottom: var(--s-4); }

.component__links { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); font-size: .88rem; }
.component__links a { display: inline-flex; align-items: center; gap: var(--s-2); }
.component__links a::after {
  content: "↗"; font-size: .8em; color: var(--text-muted);
}

/* --------------------------------------------------------- section link --- */

/* Link that carries on to another page: a full-width button, so it reads as
   the next step rather than as an aside. */
.btn--block {
  width: 100%;
  justify-content: center;
  margin-top: var(--s-5);
}

/* Nearer plans get the cyan of the data colour rather than the amber of a
   distant one, so two announcements on the same page stay distinguishable. */
.upcoming__tag--near {
  background: color-mix(in srgb, var(--cyan) 18%, transparent);
  color: var(--cyan);
}
.upcoming__tag--near::before { background: var(--cyan); }
.upcoming + .upcoming { margin-top: var(--s-5); }

/* ------------------------------------------------- brand gradient icons --- */
/*
 * Decorative icons carry the official gradient instead of a flat tint. The
 * gradient is declared once per page, in the .brand-gradient-defs <svg> right
 * after <body>, and only referenced here: the inline SVGs keep
 * stroke="currentColor" and were left untouched.
 *
 * Two variants, not one: on the dark background the brand blue sits at 1.74:1
 * and disappears; on the light one magenta and orange do (2.5:1). Each theme
 * uses the half of the scale that holds against its own background.
 *
 * Service icons, navigation, buttons, breadcrumbs, are deliberately left
 * out: there the icon has to follow the colour of the label beside it.
 */
.card__icon svg,
.split__list svg,
.notice svg,
.repo-stats__icon svg { stroke: url(#vxost-icon-grad) currentColor; }

:root[data-theme="light"] .card__icon svg,
:root[data-theme="light"] .split__list svg,
:root[data-theme="light"] .notice svg,
:root[data-theme="light"] .repo-stats__icon svg { stroke: url(#vxost-icon-grad-light) currentColor; }

/* Icons drawn as fills rather than strokes need the same treatment. */
/* The colour after each url() is the fallback: if the gradient cannot be
   used, the icon is drawn flat instead of not at all. */
.card__icon svg [fill]:not([fill="none"]) { fill: url(#vxost-icon-grad) currentColor; }
:root[data-theme="light"] .card__icon svg [fill]:not([fill="none"]) { fill: url(#vxost-icon-grad-light) currentColor; }

/* ------------------------------------------------------------- consent --- */
/*
 * The consent banner. It sits over the page bottom rather than across the
 * middle: it has to be noticed without holding the page hostage.
 * Like the hero and the footer it declares its own tokens, so it reads the
 * same whichever theme the visitor is on.
 */
.consent {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 2000;
  padding: var(--s-4);
  transform: translateY(120%);
  transition: transform .26s var(--ease, ease);
}
.consent.is-in { transform: none; }

.consent__box {
  --text:       #E9EFFA;
  --text-soft:  #B7C3D6;
  --text-muted: #A8B5C8;
  --accent:     #FE8AFE;
  --accent-ink: #0A0510;

  max-width: 640px; margin: 0 auto;
  background: #0B1220;
  color: var(--text);
  border: 1px solid rgba(233, 239, 250, .18);
  border-radius: var(--r-lg);
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .7);
  padding: var(--s-5);
}
.consent__title { font-size: 1.05rem; margin: 0 0 var(--s-2); color: var(--text); }
.consent__text  { font-size: .92rem; color: var(--text-soft); margin: 0 0 var(--s-4); }
.consent__text a { color: var(--accent); }

.consent__details { margin: 0 0 var(--s-4); }
.consent__table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.consent__table th {
  text-align: left; font-weight: 600; color: var(--text-muted);
  border-bottom: 1px solid rgba(233, 239, 250, .18);
  padding: var(--s-2) var(--s-2) var(--s-2) 0;
}
.consent__table td {
  color: var(--text-soft);
  border-bottom: 1px solid rgba(233, 239, 250, .09);
  padding: var(--s-2) var(--s-2) var(--s-2) 0;
}
.consent__opt {
  font-size: .74rem; color: var(--accent);
  border: 1px solid rgba(254, 138, 254, .4);
  border-radius: var(--r-pill); padding: 0 var(--s-2); margin-left: var(--s-2);
}
.consent__note { font-size: .82rem; color: var(--text-muted); margin: var(--s-3) 0 0; }

/* Accept and Reject are the same size on purpose: a reject button that is
   quieter than accept is not a free choice, and has been ruled invalid. */
.consent__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.consent__actions .btn { flex: 1 1 auto; justify-content: center; min-width: 120px; }
.btn--plain {
  background: none; border: 1px solid transparent; color: var(--text-soft);
}
.btn--plain:hover { color: var(--text); border-color: rgba(233, 239, 250, .2); }

@media (max-width: 520px) {
  .consent__actions .btn { flex: 1 1 100%; }
}

/* Legal links in the footer bottom row. The button that reopens the banner is
   styled as a link, not as a button: it belongs to the same list. */
.footer-legal { display: flex; flex-wrap: wrap; gap: var(--s-4); align-items: center; }
.footer-legal a,
.footer-legal__btn {
  color: var(--text-muted); font-size: .84rem;
  background: none; border: 0; padding: 0; cursor: pointer;
  font-family: inherit; text-decoration: none;
}
.footer-legal a:hover,
.footer-legal__btn:hover { color: var(--accent); text-decoration: underline; }

/* ------------------------------------------------------ comparison tables --- */
/* Wide tables scroll inside their own box: the page itself must never scroll
   sideways, which on a phone is how a layout feels broken. */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: var(--s-5) 0; }
.compare-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.compare-table--wide { min-width: 780px; }
.compare-table caption { text-align: left; color: var(--text-muted); font-size: .85rem; padding-bottom: var(--s-3); }
.compare-table th, .compare-table td {
  text-align: left; padding: var(--s-3);
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.compare-table thead th {
  color: var(--text); font-weight: 700; font-size: .86rem;
  border-bottom: 2px solid var(--border-strong);
}
.compare-table tbody th { color: var(--text-soft); font-weight: 600; }
.compare-table td { color: var(--text-soft); }
/* The VXOST column carries the brand gradient down its left edge, so the eye
   finds it without the row needing a different text colour. */
.compare-table tbody td:first-of-type { color: var(--text); font-weight: 600; }
.compare-table thead th:nth-child(2),
.compare-table tbody td:first-of-type { border-left: 2px solid transparent; border-image: var(--brand-gradient) 1; }
.is-yes { color: var(--text); }
.is-no  { color: var(--text-muted); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ---------------------------------------------------------------- brand --- */
.section-title { margin-top: var(--s-8); }
.brandgrid {
  display: grid; gap: var(--s-4);
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  margin: var(--s-5) 0;
}
.brandtile { margin: 0; border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.brandtile__art { display: grid; place-items: center; padding: var(--s-7) var(--s-5); }
.brandtile__art--dark  { background: #070B16; }
.brandtile__art--light { background: #F4F7FC; }
.brandtile__art--grad  { background: var(--brand-gradient); }
.brandtile figcaption {
  display: grid; gap: 2px;
  padding: var(--s-4); border-top: 1px solid var(--border);
  background: var(--surface); font-size: .88rem;
}
.brandtile figcaption b { color: var(--text); }
.brandtile figcaption span { color: var(--text-muted); font-size: .84rem; }
.brandtile figcaption a { color: var(--accent); font-size: .84rem; margin-top: var(--s-2); }

.swatches { display: grid; gap: var(--s-3); grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin: var(--s-5) 0 var(--s-4); }
.swatch { display: grid; gap: 2px; }
.swatch__chip { display: block; height: 60px; border-radius: var(--r-sm); border: 1px solid var(--border); }
.swatch b { color: var(--text); font-size: .9rem; margin-top: var(--s-2); }
.swatch code { color: var(--text-muted); font-size: .82rem; }
.gradient-bar { height: 14px; border-radius: var(--r-pill); background: var(--brand-gradient); margin-bottom: var(--s-3); }

/* ------------------------------------------------------------- sign in --- */

/* I pulsanti di accesso ci sono ma non funzionano, ed e' voluto: la funzione
   non esiste ancora e un modulo che chiede credenziali senza un servizio
   dietro non si pubblica. Devono vedersi come pulsanti veri e leggersi come
   spenti, quindi lo smorzamento va al riquadro e non ai singoli elementi. */
.signin {
  margin: var(--s-6) 0;
  padding: var(--s-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.signin__lead {
  margin: 0 0 var(--s-4);
  font-weight: 600;
  color: var(--text);
}
.signin__buttons { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.signin__note {
  margin: var(--s-4) 0 0;
  font-size: .86rem;
  color: var(--text-muted);
}

/* ⚠️ Lo smorzamento va al fondo e al bordo, mai alla scritta: applicato a
   tutto, il testo scende sotto il contrasto minimo e il pulsante diventa una
   forma vuota. Stessa regola gia' imparata su "Avvia tutto" nell'app. */
.btn[disabled] {
  cursor: not-allowed;
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--text-soft);
}
.btn[disabled]:hover { background: var(--surface-2); color: var(--text-soft); }
.btn[disabled] svg { opacity: .55; }

/* Sotto una certa larghezza restano il download e i due pulsanti tondi: la
   scritta Account se ne va e il pulsante scende dentro il pannello del menu,
   dove c'e' spazio per leggerla. */
/* Il pulsante Account resta sempre nella barra: e' l'unico modo per
   raggiungere quella pagina, la voce di testo nel menu e' stata tolta perche'
   ne comparivano due. Sotto una certa larghezza perde la scritta e tiene
   l'icona, invece di sparire. */
@media (max-width: 1240px) {
  .btn--account { font-size: .82rem; }
}
@media (max-width: 640px) {
  /* ⚠️ Nascosto all'occhio, non a chi ascolta.
     Con display:none l'etichetta usciva anche dall'albero di accessibilita',
     e l'icona accanto e' aria-hidden: sotto i 640px il pulsante restava un
     collegamento senza nome, annunciato come "link" e basta. Chi naviga con
     VoiceOver da telefono non aveva modo di sapere dove portasse. Stessa
     tecnica di .visually-hidden, applicata solo a questa larghezza. */
  .btn--account .btn__label {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
  }
  .btn--account { padding-left: var(--s-3); padding-right: var(--s-3); }
}

/* ------------------------------------------------- card che sono link --- */

/* Una .card dentro un <a>: prende l'aspetto della scheda ma non deve prendere
   il colore e la sottolineatura di un collegamento, altrimenti il titolo
   diventa accento e il testo si sottolinea al passaggio. Il bersaglio e' tutta
   la scheda, non solo la scritta in fondo. */
.card--link {
  display: flex;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
}
.card--link:hover { color: inherit; text-decoration: none; }
.card--link h3 { color: var(--text); }
.card--link p { color: var(--text-soft); flex: 1; }

/* Dove porta, in fondo alla scheda. E' la sola parte che cambia colore al
   passaggio: dice che si puo' cliccare senza fare rumore mentre si legge. */
/* Qui c'era un'eccezione: l'accento veniva sostituito da una tinta piu'
   chiara perche' sulla scheda scendeva a 6,63:1. Non serve piu', ed e' il
   modo giusto di risolverlo: invece di correggere il punto in cui il
   problema si vedeva, e' stato tarato --accent sul fondo peggiore, cioe' una
   superficie dentro un'altra superficie. Un colore giusto solo sul fondo
   pagina e' un colore sbagliato ovunque il fondo sia velato, e le velature
   in questo tema sono dappertutto. */
.card__more {
  margin-top: var(--s-4);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--accent);
}

/* Convenzione del progetto: senza scelta esplicita il tema e' scuro, quindi
   "scuro" si scrive :not([data-theme="light"]) e copre sia il default sia la
   scelta esplicita. Una sola regola, non tre che si sovrascrivono. */
.card__more::after { content: " \2192"; }

/* ------------------------------------------------------------- chips --- */

/* Un elenco lungo di nomi corti, tipo le estensioni PHP. In colonna sarebbe
   una lista da cinquanta righe che nessuno legge; cosi' si scorre con l'occhio
   e si cerca la propria. */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  margin: var(--s-4) 0 0;
}
.chips code {
  font-size: .8rem;
  padding: 3px var(--s-2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text-soft);
}

/* Blocchi di comando da copiare. Scorrono da soli invece di allargare la
   pagina: una riga di curl e' piu' lunga di qualsiasi schermo. */
.prose pre {
  margin: var(--s-3) 0 var(--s-4);
  padding: var(--s-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  overflow-x: auto;
  font-size: .84rem;
  line-height: 1.6;
}
.prose pre code { color: var(--text-soft); }

/* Il pulsante che copia un comando.
   Il blocco diventa il riferimento per posizionarlo, e si fa spazio a destra
   perche' non copra la fine di una riga lunga. */
.cmd--copyable { position: relative; padding-right: 4.5rem; }
.cmd-copy {
  position: absolute; top: var(--s-2); right: var(--s-2);
  padding: .25rem .55rem;
  font: inherit; font-size: .72rem; line-height: 1.4;
  color: var(--text-muted);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-sm); cursor: pointer;
}
.cmd-copy:hover { color: var(--text); border-color: var(--border-strong); }
.cmd-copy.is-done { color: var(--accent); border-color: var(--accent); }

/* Un comando per riga, con il suo pulsante: i blocchi che contengono una
   domanda interattiva non si copiano tutti insieme. */
.cmd--stack { padding-right: var(--s-3); white-space: normal; }
.cmd-line {
  position: relative;
  display: flex; align-items: flex-start; gap: var(--s-3);
  padding: .35rem 0;
}
.cmd-line + .cmd-line { border-top: 1px solid var(--border); }
/* La riga scorre per conto suo: il pulsante resta fermo dov'e'. */
.cmd-line > span { flex: 1; min-width: 0; overflow-x: auto; white-space: pre; }
.cmd-line .cmd-copy { position: static; flex: none; align-self: center; }

/* "Check:" davanti alla riga di verifica di ogni passaggio della guida.
   Deve saltare all'occhio piu' del testo intorno: e' il punto in cui ci si
   ferma se qualcosa non torna, e una guida che non fa verificare manda avanti
   chi ha gia' sbagliato. */
.steps .check { color: var(--accent); font-weight: 700; }

/* ---------------------------------------------------------- Speed test --- */

/* The test panel on /speed/. Colours come from the tokens only: text on the
   panel uses --text, --text-soft and --text-muted, which are measured above
   7:1 on a surface nested in another. Measured on the deepest case here
   (--surface-2 or --surface inside the panel's --surface, on --bg):
   --text-soft 9.34 dark / 8.00 light, --accent and --text-muted only on two
   levels (7.08 / 7.11 at worst); the done mark uses --text-soft, because
   --running on the light theme gives 4.2. */

.speedtest-section { padding-top: var(--s-6); }

.speedtest {
  padding: var(--s-5);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-2);
}
@media (min-width: 700px) { .speedtest { padding: var(--s-7); } }

/* .btn sets display, which would beat the hidden attribute */
.speedtest [hidden] { display: none !important; }

.speedtest__head {
  display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-5);
  align-items: center; justify-content: space-between;
}
.speedtest__head h2 { margin: 0; font-size: 1.25rem; }

.speedtest__phases {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: var(--s-2);
}
.speedtest__phases li {
  padding: var(--s-1) var(--s-3);
  border: 1px solid var(--border); border-radius: var(--r-pill);
  font-size: .8rem; color: var(--text-muted);
}
.speedtest__phases li.is-current {
  color: var(--accent); border-color: var(--accent); font-weight: 700;
}
.speedtest__phases li.is-done { color: var(--text-soft); background: var(--surface-2); }
.speedtest__check { display: none; }
.speedtest__phases li.is-done .speedtest__check { display: inline; }

.speedtest__readout {
  display: flex; flex-direction: column; align-items: center;
  margin: var(--s-6) 0 var(--s-4); text-align: center;
}
.speedtest__label {
  font-size: .8rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-muted);
}
.speedtest__number {
  font-family: var(--font-mono); font-weight: 700; line-height: 1.1;
  font-size: clamp(2.6rem, 11vw, 4.6rem); color: var(--text);
  font-variant-numeric: tabular-nums;
}
.speedtest--running .speedtest__number { color: var(--accent); }
.speedtest__unit { font-size: .38em; font-weight: 600; color: var(--text-muted); }

/* The band: fills over the time of the phase, and while the test runs a
   stripe moves inside it, so it is plain that work is going on. */
.speedtest__bar {
  position: relative; height: 12px; overflow: hidden;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--r-pill);
}
.speedtest__bar-fill {
  position: absolute; inset: 0;
  transform: scaleX(0); transform-origin: left center;
  background: var(--accent);
  border-radius: inherit;
  transition: transform .15s linear;
}
.speedtest--running .speedtest__bar-fill {
  background-image: repeating-linear-gradient(
    -45deg,
    color-mix(in srgb, var(--accent-ink) 22%, transparent) 0 8px,
    transparent 8px 16px);
  background-size: 23px 23px;
  animation: speedtest-stripes .8s linear infinite;
}
@keyframes speedtest-stripes { to { background-position: 23px 0; } }
@media (prefers-reduced-motion: reduce) {
  .speedtest__bar-fill { transition: none; }
  .speedtest--running .speedtest__bar-fill { animation: none; }
}

.speedtest__ip { grid-column: 1 / -1; }
.speedtest__results {
  display: grid; gap: var(--s-3);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: var(--s-5) 0 0;
}
@media (min-width: 700px) {
  .speedtest__results { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .speedtest__ip { grid-column: span 3; }
}
.speedtest__results > div {
  min-width: 0; padding: var(--s-3) var(--s-4);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-sm);
}
.speedtest__results dt { font-size: .78rem; color: var(--text-muted); }
.speedtest__results dd {
  margin: var(--s-1) 0 0; min-height: 1.4em;
  font-family: var(--font-mono); font-size: 1rem; color: var(--text);
  overflow-wrap: anywhere;
}
.speedtest__tag {
  display: inline-block; margin-left: var(--s-2);
  font-family: var(--font-sans); font-size: .72rem; font-weight: 700;
  color: var(--accent);
}

.speedtest__status { min-height: 1.5em; margin: var(--s-5) 0 0; color: var(--text); font-weight: 600; }
.speedtest--failed .speedtest__status {
  padding: var(--s-3) var(--s-4); border-radius: var(--r-sm);
  border: 1px solid var(--danger);
  background: color-mix(in srgb, var(--danger) 8%, transparent);
}
.speedtest__data,
.speedtest__note,
.speedtest__nojs { font-size: .89rem; color: var(--text-soft); margin: var(--s-3) 0 0; }
.speedtest__nojs { color: var(--text); font-weight: 600; }

.speedtest__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-4); }
.speedtest__actions .btn { min-width: 9rem; justify-content: center; }
