/*
 * La sezione Case study: hub e template caso, IT ed EN. Dal 2026-11-14.
 *
 * Un file per quattro pagine, per la stessa ragione scritta in geo.css: sono gli stessi
 * componenti. Le schede, il pannello scuro del laboratorio, il terminale e la fascia verde
 * compaiono sia sull'hub sia sul caso, e due file avrebbero voluto dire due copie dei token.
 *
 * ── I token stanno sulla radice .rkcs
 *
 * `base.css` dichiara zero variabili, quindi un `var(--rk-green)` qui cadrebbe sempre sul
 * fallback, sembrando ereditare dal sito senza ereditare niente. Stessa scelta di geo.css,
 * articolo.css e del blocco delle recensioni.
 *
 * ── Due attributi, e il filtro e' CSS
 *
 * `.rkcs` porta `data-area` e `data-tema`; il JS cambia solo quei due valori e **tutto il resto
 * lo fa il CSS**. Lo stesso vale per il simulatore del caso, dove `.rkcs-sim` porta `data-cache`
 * e `data-fix` e le quattro combinazioni sono tutte nell'HTML.
 *
 * Non e' un vezzo: senza JavaScript l'hub mostra tutte le schede visibili e il simulatore mostra
 * la sua tabella con i numeri veri, perche' lo stato iniziale e' scritto negli attributi serviti.
 * Un filtro che costruisce le schede in JS avrebbe dato una pagina vuota, su una sezione che
 * parla di dati veri.
 *
 * ── Astra, e le tre righe che servono davvero
 *
 * Le quattro pagine hanno nelle meta `site-content-layout = page-builder`,
 * `ast-site-content-layout = full-width-container` e `site-sidebar-layout = no-sidebar`, messe
 * dallo script che le crea. Da lì il body prende `ast-page-builder-template` e nel CSS servito
 * `.ast-container` perde `max-width` e padding.
 *
 * **Non basta, ed e' gia' scritto in geo.css**: `.ast-container` e' un flex, e un figlio flex sta
 * dentro come `flex: 0 1 auto`, cioe' si stringe sul contenuto invece di prendere la riga. Il
 * primo scatto del 2026-11-14 mostrava l'hub largo 1200 px e allineato a sinistra, con una fascia
 * vuota a destra: sembrava una sidebar e non lo era, e le tre righe su `.rkcs` qui sotto sono la
 * stessa correzione gia' in `geo.css` e in `articolo.css`.
 */

.rkcs {
  /* Vedi la testata, «Astra»: senza queste tre il blocco si stringe sul contenuto. */
  width: 100%;
  flex: 1 1 100%;
  min-width: 0;

  --rkcs-crema: #F4F1EA;
  --rkcs-crema-2: #F7F4ED;
  --rkcs-testo: #17261F;
  --rkcs-testo-2: #3B4A42;
  --rkcs-testo-3: #5A6A61;
  --rkcs-testo-4: #4A5A52;
  --rkcs-verde: #0F6E56;
  --rkcs-verde-d: #0A4F3E;
  --rkcs-scuro: #1A3A2B;
  --rkcs-term: #10261C;
  --rkcs-lime: #A8E84A;
  --rkcs-ambra: #E4B45A;
  --rkcs-errore: #C2410C;
  --rkcs-bordo: #E2DDD0;
  --rkcs-bordo-2: #ECE7DA;
  --rkcs-bianco: #FFFFFF;
  --rkcs-ok-bg: #E3F1EA;
  --rkcs-ok-fg: #0B5A46;
  --rkcs-ko-bg: #FDE4D6;
  --rkcs-ko-fg: #9A3412;
  --rkcs-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  font-family: 'Plus Jakarta Sans', -apple-system, system-ui, sans-serif;
  color: var(--rkcs-testo);
  background: var(--rkcs-crema);
  font-size: 17px;
  line-height: 1.65;
}

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

.rkcs p { margin: 0; }

/*
 * `text-transform: none` su tutti i titoli, e non e' difensivo a vuoto: il tema applica
 * `capitalize` agli heading, e il primo scatto del 2026-11-14 usciva con «Problemi Veri, Numeri
 * Veri, E Come Si Risolvono». In italiano la maiuscola a ogni parola e' sbagliata — e su
 * «rankono.com» diventava «Rankono.Com» — quindi qui si dichiara il valore giusto invece di
 * sperare che nessuno lo cambi altrove.
 */
.rkcs h1,
.rkcs h2,
.rkcs h3 { text-transform: none; }
/*
 * Il colore dei link, e **i pulsanti vanno scritti con la `a` davanti**.
 *
 * `.rkcs a` vale (0,1,1) — una classe piu' un tipo — e batte una classe sola. Il primo scatto del
 * 2026-11-14 aveva il pulsante «Monitoraggio AI» verde su verde, cioe' invisibile: il testo c'era
 * nell'HTML e non si vedeva nella pagina. Da lì la regola di questo foglio: ogni ancora che e' un
 * pulsante si scrive `.rkcs a.<classe>` — `.rkcs a.rkcs-piano-a`, `.rkcs a.rkcs-bottone-scheda` e
 * compagnia — cosi' sta sopra la riga qui sotto invece di perderci contro.
 */
.rkcs a { color: var(--rkcs-verde); }
.rkcs a:hover { color: var(--rkcs-verde-d); }

.rkcs-wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.rkcs-sez { padding: 48px 0; }
.rkcs-sez--ultima { padding-bottom: 96px; }

.rkcs-kicker {
  margin: 0 0 18px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--rkcs-verde);
}

.rkcs-mono-kicker {
  margin: 0 0 16px;
  font-family: var(--rkcs-mono);
  font-size: 12px;
  letter-spacing: .13em;
  color: var(--rkcs-lime);
}

.rkcs-h1 {
  margin: 0;
  font-family: Poppins, system-ui, sans-serif;
  font-size: clamp(40px, 5.2vw, 68px);
  line-height: 1.04;
  font-weight: 700;
  letter-spacing: -.02em;
}
.rkcs-h1 span { color: var(--rkcs-verde); }
.rkcs-h1--caso { font-size: clamp(34px, 4.4vw, 56px); line-height: 1.08; }
.rkcs-h1--caso span.rkcs-rosso { color: var(--rkcs-errore); }

.rkcs-h2 {
  margin: 0;
  font-family: Poppins, system-ui, sans-serif;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.15;
  font-weight: 700;
}

.rkcs-h2-scuro {
  margin: 0;
  font-family: Poppins, system-ui, sans-serif;
  font-size: clamp(26px, 3.2vw, 42px);
  line-height: 1.12;
  font-weight: 700;
  color: var(--rkcs-bianco);
}

.rkcs-sommario {
  margin: 24px 0 0;
  max-width: 620px;
  font-size: 19px;
  line-height: 1.6;
  color: var(--rkcs-testo-2);
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */

.rkcs-hero { padding: 88px 0 56px; }
.rkcs-hero--caso { padding: 72px 0 40px; }

.rkcs-hero-griglia {
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  align-items: flex-end;
}
.rkcs-hero-griglia > :first-child { flex: 999 1 560px; min-width: 0; }
.rkcs-hero-griglia > :last-child { flex: 1 1 340px; min-width: 0; }
.rkcs-hero-griglia--caso { margin-top: 20px; align-items: center; }
.rkcs-hero-griglia--caso > :first-child { flex: 999 1 540px; }
.rkcs-hero-griglia--caso > :last-child { flex: 1 1 400px; }

.rkcs a.rkcs-torna {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.rkcs a.rkcs-torna:hover { text-decoration: underline; }

.rkcs-stato {
  background: var(--rkcs-scuro);
  color: var(--rkcs-bianco);
  border-radius: 18px;
  padding: 28px;
  position: relative;
  overflow: hidden;
  animation-delay: .15s;
}
.rkcs-scan { position: absolute; left: 0; right: 0; top: 0; height: 2px; overflow: hidden; }
.rkcs-scan span { display: block; width: 40%; height: 2px; background: var(--rkcs-lime); animation: rkcsScan 3.2s linear infinite; }

/*
 * Due colonne vere e non un flex che va a capo. Con le etichette corte di prima — «caso
 * pubblicato», «in arrivo» — il flex teneva i due numeri affiancati; con «recensioni dei
 * clienti» e «la media delle recensioni» andava a capo e il riquadro diventava una colonna alta
 * il doppio. La griglia tiene i due numeri accanto e lascia andare a capo le etichette, che e'
 * il verso giusto.
 */
.rkcs-stato-numeri { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 22px; }
.rkcs-stato-n { font-family: Poppins, system-ui, sans-serif; font-size: 44px; font-weight: 700; line-height: 1; }
.rkcs-stato-l { margin-top: 8px; font-size: 14px; color: #C9D6CF; }
.rkcs-stato-piede {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, .14);
  display: flex;
  align-items: center;
  gap: 12px;
}
.rkcs-stato-piede p { font-size: 14px; line-height: 1.5; color: #E4ECE7; }
.rkcs-pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--rkcs-lime); flex: none; animation: rkcsPulse 2s ease-in-out infinite; }

/* ── Filtri ───────────────────────────────────────────────────────────────── */

.rkcs-filtri {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(244, 241, 234, .92);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--rkcs-bordo);
  border-bottom: 1px solid var(--rkcs-bordo);
}
.rkcs-filtri-riga {
  padding: 14px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}
.rkcs-tab { display: flex; gap: 6px; background: #E9E4D8; padding: 5px; border-radius: 12px; flex-wrap: wrap; }
.rkcs-tab button {
  border: 0;
  cursor: pointer;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 9px;
  font: 600 15px 'Plus Jakarta Sans', sans-serif;
  background: transparent;
  color: var(--rkcs-testo-2);
  transition: background .2s ease, color .2s ease;
}
.rkcs-tab button[aria-selected="true"] { background: var(--rkcs-testo); color: var(--rkcs-bianco); }
.rkcs-conta { opacity: .6; font-weight: 500; }

.rkcs-chip { display: flex; gap: 8px; flex-wrap: wrap; }
.rkcs-chip button {
  cursor: pointer;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  font: 600 14px 'Plus Jakarta Sans', sans-serif;
  border: 1.5px solid #D8D1C0;
  background: var(--rkcs-bianco);
  color: var(--rkcs-testo);
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.rkcs-chip button[aria-pressed="true"] { background: var(--rkcs-verde); color: var(--rkcs-bianco); border-color: var(--rkcs-verde); }

/*
 * Il filtro vero e proprio. `data-temi` e' una lista separata da spazi, quindi `~=` e' l'operatore
 * giusto: `[data-temi~="geo"]` prende «geo tecnico» e non prende «geografia».
 */
.rkcs[data-area="lab"] .rkcs-scheda[data-area="clienti"],
.rkcs[data-area="clienti"] .rkcs-scheda[data-area="lab"] { display: none; }

.rkcs[data-tema="geo"] .rkcs-scheda:not([data-temi~="geo"]),
.rkcs[data-tema="tecnico"] .rkcs-scheda:not([data-temi~="tecnico"]),
.rkcs[data-tema="audit"] .rkcs-scheda:not([data-temi~="audit"]),
.rkcs[data-tema="migrazioni"] .rkcs-scheda:not([data-temi~="migrazioni"]) { display: none; }

.rkcs[data-area="clienti"] [data-rkcs-sezione="lab"],
.rkcs[data-area="lab"] [data-rkcs-sezione="clienti"] { display: none; }

/* ── Laboratorio ──────────────────────────────────────────────────────────── */

.rkcs-lab {
  background: var(--rkcs-scuro);
  color: var(--rkcs-bianco);
  border-radius: 22px;
  padding: 44px clamp(24px, 4vw, 48px);
  position: relative;
  overflow: hidden;
}
.rkcs-lab::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 32px 32px;
}
.rkcs-lab-griglia { position: relative; display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; }
.rkcs-lab-testo { flex: 999 1 460px; min-width: 0; }
.rkcs-lab-p { margin-top: 18px; max-width: 560px; font-size: 17px; line-height: 1.65; color: #D5E1DA; }
.rkcs-lab-percorso { flex: 1 1 320px; min-width: 0; }
.rkcs-lab-percorso-t { margin-bottom: 16px; font-size: 13px; font-weight: 600; color: #C9D6CF; }

.rkcs-tappe { list-style: none; margin: 0; padding: 0 0 0 22px; position: relative; }
.rkcs-tappe::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 2px; background: rgba(255, 255, 255, .18); }
.rkcs-tappe li { position: relative; padding: 0 0 18px; }
.rkcs-tappe li > span { position: absolute; left: -22px; top: 4px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--rkcs-scuro); }
.rkcs-tappa-q { font-family: var(--rkcs-mono); font-size: 12px; color: #A9BDB2; }
.rkcs-tappa-c { margin-top: 3px; font-size: 15px; font-weight: 600; color: var(--rkcs-bianco); }

/* ── Schede ───────────────────────────────────────────────────────────────── */

/*
 * Griglia e non flex: con `flex: 1 1 340px` quattro schede andavano 3 + 1 e **l'ultima si
 * allargava per tutta la riga**, con il numero grande perso in mezzo a un rettangolo vuoto.
 * `auto-fill` tiene a tutte la stessa larghezza e lascia il buco dov'e', che e' il
 * comportamento giusto per una griglia di schede che cresce.
 */
.rkcs-griglia {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  align-items: stretch;
}

.rkcs-scheda {
  min-width: 0;
  background: var(--rkcs-bianco);
  border: 1px solid var(--rkcs-bordo);
  border-radius: 18px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform .25s ease, box-shadow .25s ease;
}
.rkcs-scheda:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -18px rgba(23, 38, 31, .35); }
.rkcs-scheda--cliente { padding: 24px; gap: 14px; }

.rkcs-scheda-testa { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.rkcs-kicker-scheda { font-size: 12px; font-weight: 700; letter-spacing: .1em; color: var(--rkcs-testo-3); }
.rkcs-badge { font-size: 12px; font-weight: 700; padding: 6px 10px; border-radius: 999px; }

.rkcs-metrica-riga { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.rkcs-metrica { font-family: Poppins, system-ui, sans-serif; font-size: 52px; font-weight: 700; line-height: 1; }
.rkcs-scheda--cliente .rkcs-metrica { font-size: 40px; }
.rkcs-unita { font-size: 15px; font-weight: 600; color: var(--rkcs-testo-2); }
.rkcs-etichetta { margin-top: -6px; font-size: 14px; color: var(--rkcs-testo-3); }

.rkcs-scheda-titolo { margin: 0; font-family: Poppins, system-ui, sans-serif; font-size: 21px; line-height: 1.3; font-weight: 600; }
.rkcs-scheda--cliente .rkcs-scheda-titolo { font-size: 19px; }

.rkcs-citazione { padding: 12px 14px; border-radius: 10px; background: var(--rkcs-crema); font-size: 14px; font-style: italic; color: var(--rkcs-testo-2); }

.rkcs-tag { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.rkcs-tag span { font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 6px; background: #EEF3EF; color: var(--rkcs-verde); }

.rkcs a.rkcs-bottone-scheda {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  border-radius: 10px;
  background: var(--rkcs-lime);
  color: #0A2620;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
}
.rkcs a.rkcs-bottone-scheda:hover { background: #92CF38; color: #0A2620; text-decoration: none; }

.rkcs-nota {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1.5px dashed #CFC8B6;
  color: var(--rkcs-testo-3);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  padding: 6px 12px;
}

/* ── Clienti e vuoto ──────────────────────────────────────────────────────── */

.rkcs-cli-testa { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 20px; }
.rkcs-cli-testa > div { flex: 999 1 460px; min-width: 0; }
.rkcs-cli-p { flex: 1 1 320px; font-size: 15px; line-height: 1.6; color: var(--rkcs-testo-2); }
.rkcs-vuoto { font-size: 17px; color: var(--rkcs-testo-2); }

/* ── Fascia CTA dell'hub ──────────────────────────────────────────────────── */

.rkcs-ctaband { padding: 72px 0 96px; }
.rkcs-ctaband-in {
  border-radius: 22px;
  background: var(--rkcs-verde);
  color: var(--rkcs-bianco);
  padding: clamp(32px, 5vw, 56px);
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  align-items: center;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  max-width: 1200px;
}
.rkcs-draw { position: absolute; left: 0; bottom: 0; height: 4px; width: 100%; background: var(--rkcs-lime); transform-origin: left; animation: rkcsDraw 1.4s cubic-bezier(.2, .7, .2, 1) .3s both; }
.rkcs-ctaband-testo { flex: 999 1 480px; min-width: 0; }
.rkcs-ctaband-testo p { margin-top: 14px; font-size: 17px; line-height: 1.6; color: #DCEBE4; }
.rkcs a.rkcs-cta-bottone {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 12px;
  background: var(--rkcs-lime);
  color: #0A2620;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
}
.rkcs a.rkcs-cta-bottone:hover { background: #92CF38; color: #0A2620; text-decoration: none; }

/* ── Terminale ────────────────────────────────────────────────────────────── */

.rkcs-term {
  background: var(--rkcs-term);
  border-radius: 16px;
  padding: 22px 22px 18px;
  box-shadow: 0 30px 60px -30px rgba(16, 38, 28, .6);
  animation-delay: .15s;
}
.rkcs-term-punti { display: flex; gap: 7px; margin-bottom: 16px; }
.rkcs-term-punti span { width: 11px; height: 11px; border-radius: 50%; background: #3A5547; }
.rkcs-term-corpo { font-family: var(--rkcs-mono); font-size: 13px; line-height: 1.9; }
.rkcs-term-riga { display: flex; justify-content: space-between; gap: 16px; }
.rkcs-term-cmd { color: #B9CCC1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rkcs-term-cmd span { color: var(--rkcs-bianco); }
.rkcs-term-codice { font-weight: 600; }
.rkcs-term-codice.rkcs-ok { color: var(--rkcs-lime); }
.rkcs-term-codice.rkcs-ko { color: #FB923C; }
.rkcs-caret { display: inline-block; width: 8px; height: 15px; background: var(--rkcs-lime); vertical-align: -2px; animation: rkcsBlink 1s step-end infinite; }

/* ── Riga di numeri ───────────────────────────────────────────────────────── */

.rkcs-numeri { margin-top: 48px; display: flex; flex-wrap: wrap; gap: 16px; }
.rkcs-numero {
  flex: 1 1 220px;
  min-width: 0;
  background: var(--rkcs-bianco);
  border: 1px solid var(--rkcs-bordo);
  border-radius: 16px;
  padding: 22px 24px;
}
.rkcs-numero-v { font-family: Poppins, system-ui, sans-serif; font-size: 44px; font-weight: 700; line-height: 1; }
.rkcs-numero-l { margin-top: 10px; font-size: 15px; line-height: 1.45; color: var(--rkcs-testo-2); }

/* ── Simulatore ───────────────────────────────────────────────────────────── */

.rkcs-sim {
  background: var(--rkcs-bianco);
  border: 1px solid var(--rkcs-bordo);
  border-radius: 22px;
  padding: clamp(24px, 4vw, 44px);
  max-width: 1200px;
}
.rkcs-sim-testa { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: flex-end; }
.rkcs-sim-testa > div:first-child { flex: 999 1 460px; min-width: 0; }
.rkcs-sim-p { margin-top: 12px; max-width: 620px; font-size: 16px; line-height: 1.6; color: var(--rkcs-testo-2); }
.rkcs-sim-comandi { flex: 1 1 340px; display: flex; flex-direction: column; gap: 12px; }

.rkcs-seg { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rkcs-seg-l { width: 84px; font-size: 13px; font-weight: 700; color: var(--rkcs-testo-4); }
.rkcs-seg > div { display: flex; gap: 4px; background: #F0ECE2; padding: 4px; border-radius: 10px; }
.rkcs-seg button {
  border: 0;
  cursor: pointer;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 8px;
  font: 600 14px 'Plus Jakarta Sans', sans-serif;
  background: transparent;
  color: var(--rkcs-testo-2);
  transition: background .2s ease, color .2s ease;
}
.rkcs-seg button[aria-pressed="true"] { background: var(--rkcs-testo); color: var(--rkcs-bianco); }

.rkcs-sim-corpo { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 24px; align-items: stretch; }
.rkcs-tabella-box { flex: 999 1 620px; min-width: 0; overflow-x: auto; border: 1px solid var(--rkcs-bordo-2); border-radius: 14px; }
.rkcs-tabella { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 14px; }
.rkcs-tabella thead tr { background: var(--rkcs-crema-2); }
.rkcs-tabella th[scope="col"] { padding: 12px 16px; font-size: 12px; letter-spacing: .08em; color: var(--rkcs-testo-4); text-align: left; }
.rkcs-tabella th[scope="col"] + th { text-align: center; padding: 12px 10px; }
.rkcs-tabella tbody tr { border-top: 1px solid #F0ECE2; }
.rkcs-tabella th[scope="row"] { text-align: left; padding: 9px 16px; font-weight: 600; }
.rkcs-tabella td { text-align: center; padding: 7px 10px; }
.rkcs-mono { font-family: var(--rkcs-mono); font-size: 13px; }
.rkcs-chi { display: block; font-size: 12px; font-weight: 500; color: var(--rkcs-testo-3); }

.rkcs-cella {
  display: none;
  min-width: 58px;
  padding: 6px 0;
  border-radius: 7px;
  font-family: var(--rkcs-mono);
  font-weight: 600;
  font-size: 14px;
}
.rkcs-cella.rkcs-ok { background: var(--rkcs-ok-bg); color: var(--rkcs-ok-fg); }
.rkcs-cella.rkcs-ko { background: var(--rkcs-ko-bg); color: var(--rkcs-ko-fg); }

.rkcs-sim[data-fix="b"][data-cache="c"] .rkcs-cella[data-stato="bc"],
.rkcs-sim[data-fix="b"][data-cache="n"] .rkcs-cella[data-stato="bn"],
.rkcs-sim[data-fix="f"][data-cache="c"] .rkcs-cella[data-stato="fc"],
.rkcs-sim[data-fix="f"][data-cache="n"] .rkcs-cella[data-stato="fn"] { display: inline-block; }

.rkcs-verdetto {
  flex: 1 1 280px;
  min-width: 0;
  border-radius: 14px;
  background: #7C2D12;
  color: var(--rkcs-bianco);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: background .25s ease;
}
.rkcs-sim[data-fix="f"] .rkcs-verdetto { background: var(--rkcs-verde); }
.rkcs-verdetto .rkcs-mono-kicker { margin: 0; color: #FDBA74; }
.rkcs-sim[data-fix="f"] .rkcs-verdetto .rkcs-mono-kicker { color: var(--rkcs-lime); }
.rkcs-verdetto-n { font-family: Poppins, system-ui, sans-serif; font-size: 64px; font-weight: 700; line-height: 1; }
.rkcs-verdetto-n small { font-size: 26px; opacity: .7; }
.rkcs-verdetto-c { font-size: 16px; line-height: 1.6; color: #E8EFEB; }

.rkcs-verdetto-n > span,
.rkcs-verdetto-c > span { display: none; }
.rkcs-sim[data-fix="b"][data-cache="c"] [data-stato="bc"],
.rkcs-sim[data-fix="b"][data-cache="n"] [data-stato="bn"],
.rkcs-sim[data-fix="f"][data-cache="c"] [data-stato="fc"],
.rkcs-sim[data-fix="f"][data-cache="n"] [data-stato="fn"] { display: inline; }

.rkcs-sim-piede { margin-top: 16px; font-size: 13px; color: var(--rkcs-testo-3); }

/* ── Cronologia e barre ───────────────────────────────────────────────────── */

.rkcs-crono-griglia { display: flex; flex-wrap: wrap; gap: 40px; }
.rkcs-crono-col { flex: 1 1 420px; min-width: 0; }
.rkcs-crono-col .rkcs-h2 { margin-bottom: 28px; }

.rkcs-crono { list-style: none; margin: 0; padding: 0 0 0 26px; position: relative; }
.rkcs-crono::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: #DCD5C4; }
.rkcs-crono li { position: relative; padding: 0 0 24px; }
.rkcs-crono li > span { position: absolute; left: -26px; top: 3px; width: 16px; height: 16px; border-radius: 50%; border: 3px solid var(--rkcs-crema); }
.rkcs-crono-q { font-family: var(--rkcs-mono); font-size: 13px; font-weight: 600; }
.rkcs-crono-c { margin-top: 4px; font-size: 16px; line-height: 1.55; color: var(--rkcs-testo); }
.rkcs-alarm { animation: rkcsAlarm 1.8s ease-in-out infinite; }

.rkcs-barre-box {
  flex: 1 1 420px;
  min-width: 0;
  background: var(--rkcs-bianco);
  border: 1px solid var(--rkcs-bordo);
  border-radius: 20px;
  padding: 28px;
  align-self: flex-start;
}
.rkcs-barre-t { font-size: 15px; font-weight: 700; }
.rkcs-barre-s { margin-top: 6px; font-size: 13px; color: var(--rkcs-testo-3); }
.rkcs-barre { margin-top: 26px; height: 260px; display: flex; align-items: flex-end; gap: 18px; border-bottom: 2px solid var(--rkcs-testo); padding: 0 6px; }
.rkcs-barra-col { flex: 1 1 0; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 8px; }
.rkcs-barra-p { font-family: Poppins, system-ui, sans-serif; font-size: 22px; font-weight: 700; }
.rkcs-barra { width: 100%; max-width: 76px; min-height: 4px; border-radius: 8px 8px 0 0; }
.rkcs-bar { transform-origin: bottom; animation: rkcsGrow 1.1s cubic-bezier(.2, .7, .2, 1) both; }
.rkcs-barre-piede { display: flex; gap: 18px; padding: 10px 6px 0; }
.rkcs-barre-piede > div { flex: 1 1 0; min-width: 0; text-align: center; }
.rkcs-barra-g { font-size: 13px; font-weight: 700; }
.rkcs-barra-r { margin-top: 2px; font-size: 12px; color: var(--rkcs-testo-3); }

/* ── Perche' non si vedeva ────────────────────────────────────────────────── */

.rkcs-perche {
  background: var(--rkcs-scuro);
  color: var(--rkcs-bianco);
  border-radius: 22px;
  padding: clamp(28px, 4vw, 48px);
  max-width: 1200px;
}
.rkcs-perche .rkcs-h2-scuro { max-width: 760px; }
.rkcs-perche-griglia { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 18px; }
.rkcs-perche-scheda {
  flex: 1 1 280px;
  min-width: 0;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 16px;
  padding: 24px;
}
.rkcs-perche-n { font-family: Poppins, system-ui, sans-serif; font-size: 40px; font-weight: 700; color: var(--rkcs-lime); line-height: 1; }
.rkcs-perche-scheda h3 { margin: 14px 0 0; font-family: Poppins, system-ui, sans-serif; font-size: 20px; font-weight: 600; color: var(--rkcs-bianco); }
.rkcs-perche-scheda p { margin-top: 10px; font-size: 15px; line-height: 1.6; color: #D5E1DA; }
.rkcs-perche-nota {
  margin-top: 28px;
  padding: 22px 24px;
  border-radius: 14px;
  background: rgba(168, 232, 74, .1);
  border: 1px solid rgba(168, 232, 74, .35);
}
.rkcs-perche-nota p { font-size: 16px; line-height: 1.6; color: #F0F6F2; }
.rkcs-perche-nota strong { color: var(--rkcs-lime); }

/* ── Strumento ────────────────────────────────────────────────────────────── */

.rkcs-strumento-griglia { display: flex; flex-wrap: wrap; gap: 24px; }
.rkcs-strumento {
  flex: 999 1 560px;
  min-width: 0;
  background: var(--rkcs-bianco);
  border: 2px solid var(--rkcs-testo);
  border-radius: 22px;
  padding: clamp(24px, 4vw, 40px);
}
.rkcs-strumento-p { margin-top: 12px; font-size: 16px; line-height: 1.6; color: var(--rkcs-testo-2); }
.rkcs-strumento-form { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.rkcs-campo { flex: 999 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.rkcs-campo label { font-size: 13px; font-weight: 700; }
.rkcs-campo input {
  min-height: 52px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1.5px solid #CFC8B6;
  font: 500 16px 'Plus Jakarta Sans', sans-serif;
  color: var(--rkcs-testo);
  background: var(--rkcs-bianco);
  width: 100%;
}
.rkcs-campo input:focus-visible { outline: 2px solid var(--rkcs-verde); outline-offset: 1px; }

.rkcs-bottone-lime {
  flex: 1 1 150px;
  min-height: 52px;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  background: var(--rkcs-lime);
  color: #0A2620;
  font: 700 16px 'Plus Jakarta Sans', sans-serif;
}
.rkcs-bottone-lime:hover { background: #92CF38; }
.rkcs-bottone-lime[disabled] { opacity: .65; cursor: progress; }

.rkcs-bottone-scuro {
  min-height: 46px;
  border-radius: 10px;
  border: 1.5px solid var(--rkcs-testo);
  background: var(--rkcs-bianco);
  color: var(--rkcs-testo);
  cursor: pointer;
  font: 700 14px 'Plus Jakarta Sans', sans-serif;
  padding: 0 18px;
}
.rkcs-bottone-scuro:hover { background: var(--rkcs-crema); }

.rkcs-strumento-errore { margin-top: 14px; font-size: 15px; font-weight: 600; color: var(--rkcs-ko-fg); }

.rkcs-risultato { margin-top: 22px; border-radius: 14px; background: var(--rkcs-term); padding: 18px 20px; }
.rkcs-risultato-righe { font-family: var(--rkcs-mono); font-size: 13px; }
.rkcs-risultato-riga { display: flex; justify-content: space-between; gap: 14px; padding: 5px 0; border-top: 1px solid rgba(255, 255, 255, .08); }
.rkcs-risultato-riga span:first-child { color: #D6E2DB; }
.rkcs-risultato-riga span:last-child { font-weight: 600; }
.rkcs-risultato-riga .rkcs-ok { color: var(--rkcs-lime); }
.rkcs-risultato-riga .rkcs-ko { color: #FB923C; }
.rkcs-risultato-spiega { margin-top: 14px; color: var(--rkcs-bianco); font-size: 15px; line-height: 1.55; }

.rkcs-lead { margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .12); display: flex; flex-direction: column; gap: 12px; }
.rkcs-lead-t { color: #D6E2DB; font-size: 15px; line-height: 1.55; }
.rkcs-lead .rkcs-campo label { color: #D6E2DB; }
.rkcs-consenso { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.5; color: #C9D6CF; }
.rkcs-consenso input { margin-top: 3px; flex: none; width: 18px; height: 18px; }
.rkcs-consenso a { color: var(--rkcs-lime); }
.rkcs-lead-esito { font-size: 14px; color: var(--rkcs-lime); }
.rkcs-lead .rkcs-bottone-scuro { align-self: flex-start; background: transparent; color: var(--rkcs-bianco); border-color: rgba(255, 255, 255, .5); }
.rkcs-lead .rkcs-bottone-scuro:hover { background: rgba(255, 255, 255, .1); }

.rkcs-faidate {
  flex: 1 1 380px;
  min-width: 0;
  background: var(--rkcs-bianco);
  border: 1px solid var(--rkcs-bordo);
  border-radius: 22px;
  padding: clamp(24px, 4vw, 32px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.rkcs-faidate-p { font-size: 15px; line-height: 1.6; color: var(--rkcs-testo-2); }
.rkcs-faidate pre {
  margin: 0;
  padding: 16px;
  border-radius: 12px;
  background: var(--rkcs-term);
  color: #D6E2DB;
  font-family: var(--rkcs-mono);
  font-size: 12px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-all;
}
.rkcs-faidate .rkcs-bottone-scuro { align-self: flex-start; }

/* ── Il blocco finale del caso ────────────────────────────────────────────── */

/*
 * Pannello scuro, testo a sinistra e scheda del piano a destra. A 390 px la scheda va **sotto**
 * il testo: e' un `flex-wrap`, e l'ordine nel markup e' già quello giusto, quindi non serve
 * nessun `order` e la lettura da tastiera resta la stessa a tutte le larghezze.
 */
.rkcs-finale {
  border-radius: 22px;
  background: var(--rkcs-scuro);
  color: var(--rkcs-bianco);
  padding: clamp(28px, 4vw, 48px);
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  align-items: center;
}

.rkcs-finale-testo { flex: 999 1 420px; min-width: 0; }
.rkcs-finale-testo p { margin-top: 14px; font-size: 16px; line-height: 1.65; color: #D5E1DA; }

/*
 * Il link all'audit e' **secondario di proposito**: un link con la freccia, non un pulsante.
 * Vedi la testata di `rk_cs_cta()` in inc/case-study.php: due offerte con lo stesso peso sono
 * due offerte fra cui chi legge deve scegliere senza avere gli elementi.
 */
.rkcs a.rkcs-finale-audit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  min-height: 44px;
  color: var(--rkcs-lime);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  border-bottom: 1px solid rgba(168, 232, 74, .45);
}
.rkcs a.rkcs-finale-audit:hover { color: var(--rkcs-lime); border-bottom-color: var(--rkcs-lime); }

.rkcs-piano {
  flex: 1 1 320px;
  min-width: 0;
  background: var(--rkcs-bianco);
  color: var(--rkcs-testo);
  border-radius: 16px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rkcs-piano-k {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--rkcs-verde);
}

/*
 * `nowrap` sul prezzo: la cifra e il periodo devono stare sulla stessa riga. In una scheda da
 * 320 px «250 €» e «al mese» andrebbero a capo fra loro, e per un attimo si legge un prezzo che
 * non e' quello scritto.
 */
.rkcs-piano-n {
  display: flex;
  align-items: baseline;
  gap: 8px;
  white-space: nowrap;
}
.rkcs-piano-n strong {
  font-family: Poppins, system-ui, sans-serif;
  font-size: 40px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.02em;
}
.rkcs-piano-n span { font-size: 15px; font-weight: 600; color: var(--rkcs-testo-3); }

.rkcs-piano-per { font-size: 15px; line-height: 1.55; color: var(--rkcs-testo-2); }

.rkcs-piano-punti { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.rkcs-piano-punti li {
  position: relative;
  padding-left: 26px;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--rkcs-testo-2);
}
/* La spunta la mette il CSS: nel markup la riga e' il testo del punto, e basta. */
.rkcs-piano-punti li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #E3F1EA url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230B5A46' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center / 10px 10px no-repeat;
}

.rkcs a.rkcs-piano-a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  margin-top: 4px;
  border-radius: 11px;
  background: var(--rkcs-lime);
  color: #0A2620;
  font-weight: 700;
  font-size: 15.5px;
  text-decoration: none;
}
.rkcs a.rkcs-piano-a:hover { background: #92CF38; color: #0A2620; text-decoration: none; }

.rkcs-piano-nota { font-size: 13px; color: var(--rkcs-testo-3); text-align: center; }

.rkcs-misurato { margin-top: 20px; font-size: 13px; line-height: 1.6; color: var(--rkcs-testo-3); }
.rkcs-misurato a { color: var(--rkcs-testo-3); text-decoration: underline; }
.rkcs-misurato a:hover { color: var(--rkcs-verde); }

/* ── Il box «Caso reale» nelle pagine GEO ─────────────────────────────────── */

.rkcs-rimando {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  margin: 28px 0;
  padding: 22px 24px;
  border: 1px solid var(--rkcs-bordo);
  border-left: 4px solid var(--rkcs-lime);
  border-radius: 14px;
  background: var(--rkcs-bianco);
  font-family: 'Plus Jakarta Sans', -apple-system, system-ui, sans-serif;
}
.rkcs-rimando-t { flex: 999 1 380px; min-width: 0; }
.rkcs-rimando-k { margin: 0 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .12em; color: var(--rkcs-verde); }
.rkcs-rimando-h { margin: 0; font-family: Poppins, system-ui, sans-serif; font-size: 19px; line-height: 1.3; font-weight: 600; color: var(--rkcs-testo); }
.rkcs-rimando-p { margin: 8px 0 0; font-size: 14px; line-height: 1.55; color: var(--rkcs-testo-2); }
.rkcs a.rkcs-rimando-a {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 10px;
  background: var(--rkcs-testo);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
}
.rkcs a.rkcs-rimando-a:hover { background: #0A2620; color: #FFFFFF; text-decoration: none; }

/* ── Animazioni ───────────────────────────────────────────────────────────── */

@keyframes rkcsUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes rkcsType { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }
@keyframes rkcsGrow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes rkcsFlip { 0% { transform: rotateX(90deg); opacity: .2; } 100% { transform: none; opacity: 1; } }
@keyframes rkcsBlink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes rkcsScan { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
@keyframes rkcsPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(168, 232, 74, .55); } 50% { box-shadow: 0 0 0 8px rgba(168, 232, 74, 0); } }
@keyframes rkcsAlarm { 0%, 100% { box-shadow: 0 0 0 0 rgba(194, 65, 12, .45); } 50% { box-shadow: 0 0 0 7px rgba(194, 65, 12, 0); } }
@keyframes rkcsDraw { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.rkcs-up { animation: rkcsUp .7s cubic-bezier(.2, .7, .2, 1) both; }
.rkcs-type { animation: rkcsType .45s ease-out both; }
.rkcs-flip { animation: rkcsFlip .45s ease-out both; }

/*
 * Tutto spento con `prefers-reduced-motion`, e **`animation: none` non basta**: le classi che
 * animano partono da `opacity: 0`, quindi senza animazione resterebbero invisibili. Si rimette
 * anche lo stato finale.
 */
@media (prefers-reduced-motion: reduce) {
  .rkcs-up,
  .rkcs-type,
  .rkcs-flip,
  .rkcs-bar,
  .rkcs-draw,
  .rkcs-caret,
  .rkcs-pulse,
  .rkcs-alarm,
  .rkcs-scan span {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .rkcs-scheda:hover { transform: none; }
}

/* ── 390 px ───────────────────────────────────────────────────────────────── */

@media (max-width: 600px) {
  .rkcs { font-size: 16px; }
  .rkcs-hero { padding: 56px 0 40px; }
  .rkcs-hero--caso { padding: 48px 0 32px; }
  .rkcs-sommario { font-size: 17px; }
  .rkcs-filtri-riga { padding: 12px 20px; gap: 12px; }
  .rkcs-tab, .rkcs-chip { width: 100%; }
  .rkcs-tab button, .rkcs-chip button { flex: 1 1 auto; padding: 0 12px; font-size: 14px; }
  .rkcs-numeri { margin-top: 32px; }
  .rkcs-seg-l { width: auto; }
  .rkcs-verdetto-n { font-size: 48px; }
  .rkcs-barre { height: 200px; gap: 10px; }
  .rkcs-barre-piede { gap: 10px; }
  .rkcs-metrica { font-size: 42px; }
  .rkcs-ctaband { padding: 48px 0 64px; }

  /* La scheda del piano va sotto il testo: e' il wrap, e il markup e' già nell'ordine giusto. */
  .rkcs-finale { gap: 24px; }
  .rkcs-finale-testo,
  .rkcs-piano { flex-basis: 100%; }
  .rkcs-piano-n strong { font-size: 34px; }
}
