/* ============================================================================
   01 · Manifesto — griglia svizzera, forme primarie, tipografia enorme.
   Zero decorazione: nessun raggio, nessuna ombra, nessuna sfumatura. Solo
   rettangoli separati da tre pixel di fondo.

   È il tema iniziale: si possiede da subito e non si compra.
   Mockup: blocco #01 e prototipo #5a del documento di design.
   ========================================================================= */

html[data-theme="manifesto"] {
  --bg: #f0efe9;
  --ink: #111;
  --ink-2: #6b6a63;
  --ink-3: #a9a69c;
  --line: #cfcdc4;
  --surface: #dcdad2;
  --surface-ink: #111;

  --accent: #e63f1c;
  --accent-ink: #fff;
  --ok: #111;
  --ok-ink: #f0efe9;
  --warn: #f2c230;
  --warn-ink: #111;
  --locked: #dcdad2;
  --locked-ink: #8d8a80;
  --hint-locked: rgba(17, 17, 17, .25);

  --lvl-bg: #e63f1c;
  --lvl-ink: #fff;
  --right-bg: #111;
  --right-ink: #f0efe9;
  --wrong-bg: #f2c230;
  --wrong-ink: #111;
  --ask-bg: #111;
  --ask-ink: #f0efe9;
  --full-bg: #1b53d6;
  --full-ink: #fff;

  --conf-1: #e63f1c;
  --conf-2: #111;
  --conf-3: #f2c230;
  --conf-4: #1b53d6;

  --font: 'Archivo Black', system-ui, sans-serif;
  --font-display: 'Archivo Black', system-ui, sans-serif;
  --font-mono: 'Space Mono', ui-monospace, monospace;
  --tt-display: uppercase;
  --tt-label: uppercase;
  --ls-display: -.03em;
  --ls-label: .1em;
  --w-display: 400;    /* Archivo Black ha un peso solo: 400 è già nero */
  --w-label: 700;

  --fs-huge: 76px;
  --fs-title: 34px;
  --fs-lead: 24px;
  --fs-body: 17px;

  --r: 0px;
  --r-lg: 0px;
  --r-pill: 0px;
  --bd: 0px;
  --shadow: none;

  --pad: 20px;
  --head-top: 26px;
  --gap: 3px;
  --gap-block: 16px;
  --block-pad: 18px;
  --btn-pad: 19px;

  --ico-fav: 27px;
}

/* --- la tab bar è una riga di rettangoli sotto un filo spesso --- */
html[data-theme="manifesto"] .app.has-tabs .tabbar { border-top: 3px solid #111; }

/* --- home: il numerone e la griglia --- */
html[data-theme="manifesto"] .coll[data-state="locked"] { color: #8d8a80; }
html[data-theme="manifesto"] .tally__label { letter-spacing: .1em; }

/* il segno dei preferiti nella lista: 10px sparivano nell'angolo */
html[data-theme="manifesto"] .cell__fav::before { font-size: 20px; }

/* A destra del numerone lo spazio restava vuoto: un tondo d'accento e un
   quadrato d'inchiostro che si accavallano. Forme primarie e niente altro, che
   è tutta la grammatica di questa direzione. Sono pseudo-elementi: nessun nodo
   in più in app.js, dove lo scheletro deve restare uno solo. */
html[data-theme="manifesto"] .tally { position: relative; padding-right: 104px; }

html[data-theme="manifesto"] .tally::before,
html[data-theme="manifesto"] .tally::after { content: ''; position: absolute; }

html[data-theme="manifesto"] .tally::before {
  right: 30px;
  top: 12px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent);
}

html[data-theme="manifesto"] .tally::after {
  right: 0;
  top: 52px;
  width: 46px;
  height: 46px;
  background: var(--ink);
}

/* le monete si dicono con un pallino giallo, non con la parola «monete» */
html[data-theme="manifesto"] .coins {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

html[data-theme="manifesto"] .coins::before {
  content: '';
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--warn);
}

/* --- raccolta --- */

/* «RACCOLTA 2» invece di «RACC. DUE»: l'abbreviazione risparmiava spazio che in
   un titolo di questo corpo non manca. Stesso meccanismo di Carta e Premi — il
   numero viaggia sull'elemento come `data-n`, le due parole scritte da app.js
   si nascondono e il CSS ricompone. */
html[data-theme="manifesto"] .scr__title[data-n] .scr__title-a,
html[data-theme="manifesto"] .scr__title[data-n] .scr__title-b { display: none; }
html[data-theme="manifesto"] .scr__title[data-n]::after { content: 'Raccolta ' attr(data-n); }

/* --- enigma: tutto a filo, la risposta è un blocco unico in fondo --- */
html[data-theme="manifesto"] .answer { border-top: 3px solid #111; }
html[data-theme="manifesto"] .answer__input { background: #f0efe9; color: #111; }
html[data-theme="manifesto"] .answer__send { background: #111; color: #fff; }
html[data-theme="manifesto"] .skip { background: #111; color: #fff; }

html[data-theme="manifesto"] .hint[data-state="open"] { background: #111; color: #fff; }
html[data-theme="manifesto"] .hint__text { font-weight: 400; }

/* --- esiti --- */
html[data-theme="manifesto"] .app[data-scr="giusto"] .why { background: #1c1c1c; color: #f0efe9; }
html[data-theme="manifesto"] .app[data-scr="giusto"] .btn--ghost,
html[data-theme="manifesto"] .app[data-scr="giusto"] .more,
html[data-theme="manifesto"] .app[data-scr="salto"] .btn--ghost {
  border-color: #3a3a3a;
  color: #8d8a80;
}
html[data-theme="manifesto"] .app[data-scr="salto"] .reward { background: #1c1c1c; color: #f0efe9; }
html[data-theme="manifesto"] .app[data-scr="salto"] .head { color: #6b6a63; }

html[data-theme="manifesto"] .app[data-scr="sbagliato"] .reward { background: #111; color: #f2c230; }
html[data-theme="manifesto"] .app[data-scr="sbagliato"] .btn--primary { background: #111; color: #f2c230; }
html[data-theme="manifesto"] .app[data-scr="sbagliato"] .btn--ghost { border-color: #111; color: #111; }
html[data-theme="manifesto"] .app[data-scr="sbagliato"] .verdict__word { color: #111; }

html[data-theme="manifesto"] .app[data-scr="completa"] .coins { background: #fff; color: #1b53d6; }
html[data-theme="manifesto"] .app[data-scr="completa"] .unlocked { background: #111; color: #fff; }
html[data-theme="manifesto"] .app[data-scr="completa"] .btn--primary { background: #fff; color: #1b53d6; }
html[data-theme="manifesto"] .app[data-scr="completa"] .btn--ghost { border-color: #fff; color: #fff; }

/* --- livello già risolto: gli indizi si rileggono su fondo chiaro --- */
html[data-theme="manifesto"] .app[data-scr="fatto"] .hint { background: #dcdad2; color: #111; }
html[data-theme="manifesto"] .app[data-scr="fatto"] .hint__label { color: #6b6a63; }
html[data-theme="manifesto"] .app[data-scr="fatto"] .why { background: #111; color: #f0efe9; }
html[data-theme="manifesto"] .app[data-scr="fatto"] .btn--ghost { border-color: #111; color: #111; }

/* --- profilo --- */
html[data-theme="manifesto"] .stat { background: #dcdad2; color: #111; }
html[data-theme="manifesto"] .stat[data-tone="ink"] { background: #111; color: #f0efe9; }
html[data-theme="manifesto"] .stat[data-tone="accent"] { background: #1b53d6; color: #fff; }
html[data-theme="manifesto"] .account__name { font-family: 'Archivo Black', sans-serif; }
html[data-theme="manifesto"] .app[data-scr="profilo"] .btn--ghost { border-color: #111; color: #111; }

/* --- schede tema: comprare è nero, attivare è dell'accento --- */
html[data-theme="manifesto"] .app[data-scr="tema"] .btn--primary { background: #111; color: #f0efe9; }
html[data-theme="manifesto"] .app[data-scr="tema"] .btn--go { background: #e63f1c; color: #fff; }
html[data-theme="manifesto"] .app[data-scr="tema"] .btn--inert { border-color: #111; color: #111; }
html[data-theme="manifesto"] .app[data-scr="tema"] .btn--off { border-color: #cfcdc4; color: #a9a69c; }

/* ============================================================================
   Anteprima del tema nel negozio. Fuori dallo scope `data-theme`: questa parte
   si vede anche mentre se ne sta usando un altro — è la vetrina.
   ========================================================================= */

.tpv--manifesto {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: stretch;
  gap: 0;
  padding: 0;
  background: #111;
  border-radius: 0;
  font-family: 'Archivo Black', sans-serif;
}

.tpv--manifesto .tpv__num {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e63f1c;
  color: #fff;
  font-size: 19px;
  letter-spacing: -.03em;
}

.tpv--manifesto .tpv__name {
  display: flex;
  align-items: center;
  padding-left: 14px;
  color: #f0efe9;
  font-size: 19px;
  letter-spacing: -.03em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tpv--manifesto .tpv__tag {
  align-self: center;
  margin: 0 14px;
  background: #f0efe9;
  color: #111;
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 6px 9px;
  white-space: nowrap;
}

.tpv--manifesto.tpv--card {
  grid-template-columns: 96px 1fr;
  background: #f0efe9;
}

.tpv--manifesto.tpv--card .tpv__num { grid-row: 1 / span 2; font-size: 44px; letter-spacing: -.04em; }

.tpv--manifesto.tpv--card .tpv__name {
  grid-column: 2;
  align-self: start;
  padding: 18px 18px 0;
  color: #111;
  font-size: 30px;
  line-height: .94;
  letter-spacing: -.04em;
  white-space: normal;
}

.tpv--manifesto.tpv--card .tpv__tag {
  grid-column: 2;
  align-self: end;
  justify-self: start;
  margin: 0 18px 18px;
  background: #111;
  color: #f0efe9;
  font-size: 12px;
  letter-spacing: .12em;
  padding: 10px 14px;
}
