/* Generato da src/pages/assets/cornice.css.ts */

@font-face { font-family: "Manrope Variable"; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url(/assets/fonts/manrope-latin.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Manrope Variable"; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url(/assets/fonts/manrope-latin-ext.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* Token grafici del sito: l'UNICO posto dei colori, dei raggi e delle ombre.
   I tre stili provati il 23/11/2026 (docs/prove-grafiche/genera.py): si sceglie con SITO.tema
   (src/lib/config.ts, o PUBLIC_TEMA), che finisce in <html data-tema="...">.
   Scelta di Alfonso del 23/11/2026: 1-crema (crema e rame, fedele a oggi), piede e fasce scure #2a1d14.
   Gli altri due restano definiti ma non usati. Tema scuro: data-theme="dark" su <html> (localStorage "theme", come oggi; bottone nell intestazione). */

:root,
[data-tema="1-crema"] {
  --bg: #f6f1e9;
  --bg2: #efe6d8;
  --card: #fffdf9;
  --tile: #fffdf9;
  --tiletxt: #1a140e;   /* testo sui riquadri sempre chiari (loghi dei partner) */
  --txt: #1a140e;
  --sub: #5e5145;
  --acc: #9a5e3b;        /* fondo dei pulsanti */
  --acc-hover: #7d4a2e;
  --acct: #8a5233;       /* accento come testo (link, occhielli): un passo piu' scuro del fondo pulsanti, per il contrasto */
  --onacc: #fffaf3;      /* testo sopra l'accento */
  --bordo: #e2d8c9;
  --scuro: #2a1d14;      /* piede e fasce scure */
  --scurot: #f6f1e9;
  --scuroa: #d9a46b;
  --scurosub: #cfc2b2;
  --errore: #b3261e;
  --head: rgba(246, 241, 233, .94);
  --ombra: 0 10px 30px rgba(60, 40, 20, .10);
  --r: 18px;
  --logo-chiaro: none;   /* "block" dove il logo chiaro va sull'intestazione (temi scuri) */
  --logo-scuro: block;
  color-scheme: light;
}

[data-tema="2-notte"] {
  --bg: #0f1724; --bg2: #141f31; --card: #17233a; --tile: #f5efe4;
  --txt: #f5efe4; --sub: #b9b2a6; --acc: #f2a43a; --acc-hover: #e0922a; --acct: #f2a43a; --onacc: #0f1724;
  --bordo: #263450; --scuro: #0a111c; --scurot: #f5efe4; --scuroa: #f2a43a; --scurosub: #c9c1b3;
  --head: rgba(15, 23, 36, .85); --ombra: 0 14px 40px rgba(0, 0, 0, .35); --r: 16px;
  --logo-chiaro: block; --logo-scuro: none;
  color-scheme: dark;
}

[data-tema="3-misto"] {
  --bg: #f5efe4; --bg2: #ede4d4; --card: #fffcf6; --tile: #fffcf6;
  --txt: #0f1724; --sub: #4a5468; --acc: #f2a43a; --acc-hover: #e0922a; --acct: #a86408; --onacc: #0f1724;
  --bordo: #e0d6c4; --scuro: #0f1724; --scurot: #f5efe4; --scuroa: #f2a43a; --scurosub: #c9c1b3;
  --head: rgba(245, 239, 228, .9); --ombra: 0 12px 34px rgba(15, 23, 36, .12); --r: 14px;
  --logo-chiaro: none; --logo-scuro: block;
  color-scheme: light;
}

/* Tema scuro della crema (colori del tema scuro di caffinity.it di oggi). Vale anche dove <html> non ha data-tema
   (pagine PHP: stores, Extraction Lab), altrimenti li' il bottone cambiava icona ma non colori. */
:root[data-theme="dark"]:not([data-tema="2-notte"]):not([data-tema="3-misto"]) {
  --bg: #12100e; --bg2: #1a1613; --card: #201b17; --tile: #f6f1e9;
  --txt: #f5efe7; --sub: #b9b1a9; --acc: #c98656; --acc-hover: #d89a6a; --acct: #e0a878; --onacc: #12100e;
  --bordo: rgba(255, 255, 255, .12); --scuro: #0b0908; --scurot: #f5efe7; --scuroa: #e0b480; --scurosub: #b9b1a9;
  --head: rgba(18, 16, 14, .93); --ombra: 0 12px 34px rgba(0, 0, 0, .4);
  --logo-chiaro: block; --logo-scuro: none;
  color-scheme: dark;
}

:root {
  /* Famiglie di aroma delle note sensoriali (/business/), le stesse di ops/business/genera.py. */
  --nota-dolce: #451a03; --nota-agrumi: #ea580c; --nota-fiori: #7c3aed; --nota-rossi: #e11d48;
  --nota-frutta: #ea580c; --nota-spezie: #15803d; --nota-altro: #9a5e3b;
  --font: "Manrope Variable", "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --larghezza: 1180px;
  --margine: 28px;
}
@media (max-width: 760px) { :root { --margine: 20px; } }

/* Intestazione e piede del sito ("cornice"). Tutto sotto .cf-cornice e con le proprieta' scritte per intero:
   lo stesso file va anche nelle pagine PHP (quiz, guida, stores, lab, account), che hanno CSS proprio
   con regole generiche (header, footer, nav, a, .top, .btn) da non far entrare qui. Colori solo dai token. */

.cf-cornice, .cf-cornice * { box-sizing: border-box; }
.cf-cornice { font-family: var(--font); line-height: 1.5; -webkit-font-smoothing: antialiased; text-align: left; }
.cf-cornice a { color: inherit; text-decoration: none; }
.cf-cornice img { max-width: none; border: 0; }
/* A tutta larghezza anche quando la pagina PHP ha un body stretto o a griglia (stores, account). */
html { overflow-x: clip; }
header.top.cf-cornice, footer.piede.cf-cornice { margin-left: calc(50% - 50vw) !important; margin-right: calc(50% - 50vw) !important; justify-self: stretch; align-self: stretch; grid-column: 1 / -1; }
body:has(> header.top.cf-cornice) { padding-top: 0 !important; padding-bottom: 0 !important; }
.cf-cornice .w { max-width: var(--larghezza); margin: 0 auto; padding: 0 var(--margine); width: auto; }

header.top.cf-cornice {
  position: sticky; top: 0; left: auto; right: auto; z-index: 40; display: block; margin: 0; padding: 0; width: auto; height: auto;
  background: var(--head); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border: 0; border-bottom: 1px solid var(--bordo); box-shadow: none; color: var(--txt); font-size: 15px;
}
header.top.cf-cornice .w { display: flex; align-items: center; gap: 28px; height: 72px; }
.cf-cornice .logo { display: flex; align-items: center; flex: none; }
.cf-cornice .logo img { height: 42px; width: auto; display: block; }
header.top.cf-cornice .logo .chiaro { display: var(--logo-chiaro); }
header.top.cf-cornice .logo .scuro { display: var(--logo-scuro); }
.cf-cornice nav.menu { display: flex; gap: 22px; font-size: 15px; font-weight: 600; color: var(--sub); margin: 0; padding: 0; background: none; position: static; }
.cf-cornice nav.menu a { color: var(--sub); padding: 0; }
.cf-cornice nav.menu a:hover, .cf-cornice nav.menu a[aria-current] { color: var(--txt); }
.cf-cornice .dx { margin-left: auto; display: flex; gap: 10px; align-items: center; font-size: 14px; font-weight: 700; }
.cf-cornice .lang { color: var(--sub); padding: 6px 8px; background: none; border: 0; font: inherit; font-weight: 700; cursor: pointer; }
.cf-cornice .lang:hover { color: var(--txt); }
.cf-cornice .icona { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: var(--sub); background: none; border: 0; padding: 0; margin: 0; cursor: pointer; box-shadow: none; }
.cf-cornice .icona:hover { color: var(--txt); background: var(--bg2); }
.cf-cornice .icona svg { width: 20px; height: 20px; }
/* Pulsante del tema: due icone sovrapposte che ruotano una nell'altra. */
.cf-cornice [data-cambia-tema] { position: relative; overflow: hidden; }
.cf-cornice [data-cambia-tema] svg { position: absolute; inset: 0; margin: auto; transition: transform .5s cubic-bezier(.2,.8,.2,1), opacity .3s; }
.cf-cornice [data-cambia-tema] .tema-sole { opacity: 0; transform: rotate(-90deg) scale(.4); }
[data-theme="dark"] .cf-cornice [data-cambia-tema] .tema-luna { opacity: 0; transform: rotate(90deg) scale(.4); }
[data-theme="dark"] .cf-cornice [data-cambia-tema] .tema-sole { opacity: 1; transform: none; }
.cf-cornice [data-cambia-tema]:hover .tema-luna { transform: rotate(-18deg); }
[data-theme="dark"] .cf-cornice [data-cambia-tema]:hover .tema-sole { transform: rotate(45deg); }
/* Cambio tema a cerchio: niente dissolvenza standard sopra al cerchio. */
.cambio-tema::view-transition-old(root), .cambio-tema::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
.cf-cornice .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer; text-decoration: none;
  background: var(--acc); color: var(--onacc); font-weight: 800; border-radius: 999px; padding: 12px 22px; font-size: 15px; line-height: 1.2;
  box-shadow: none; transition: background .2s; width: auto; margin: 0;
}
.cf-cornice .btn:hover { background: var(--acc-hover); color: var(--onacc); }
.cf-cornice .burger { display: none; position: static; margin: 0; }
.cf-cornice .burger summary { list-style: none; cursor: pointer; position: relative; }
.cf-cornice .burger summary::-webkit-details-marker { display: none; }
.cf-cornice .burger summary svg { position: absolute; inset: 0; margin: auto; transition: transform .35s cubic-bezier(.2,.8,.2,1), opacity .2s; }
.cf-cornice .burger summary .chiudi { opacity: 0; transform: rotate(-90deg) scale(.5); }
.cf-cornice .burger[open] summary .apri { opacity: 0; transform: rotate(90deg) scale(.5); }
.cf-cornice .burger[open] summary .chiudi { opacity: 1; transform: none; }
.cf-cornice .burger[open] summary { background: var(--bg2); color: var(--txt); }
/* Il foglio del menu: sotto l'intestazione (che e' il suo riferimento: ha backdrop-filter), sopra un velo. */
.cf-cornice .burger .foglio { position: absolute; top: 100%; left: 0; right: 0; z-index: 2; max-height: calc(100dvh - 72px); overflow: auto; overscroll-behavior: contain;
  background: var(--bg); border-bottom: 1px solid var(--bordo); border-radius: 0 0 24px 24px; padding: 10px var(--margine) 18px;
  box-shadow: 0 30px 60px rgba(10, 6, 2, .25); animation: foglio-giu .4s cubic-bezier(.16,1,.3,1) both; }
.cf-cornice .burger-fondo { position: absolute; top: 100%; left: 0; right: 0; height: 100dvh; z-index: 1;
  background: color-mix(in srgb, var(--scuro) 45%, transparent); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); animation: fondo-dentro .3s ease-out both; }
.cf-cornice .burger .foglio nav { display: grid; gap: 2px; }
.cf-cornice .burger .foglio nav a { display: flex; align-items: center; gap: 14px; padding: 10px 8px; border-radius: 16px; color: var(--txt); text-decoration: none;
  animation: voce-dentro .45s cubic-bezier(.16,1,.3,1) both; animation-delay: calc(var(--n, 0) * 35ms + 60ms); }
.cf-cornice .burger .foglio nav a:active, .cf-cornice .burger .foglio nav a[aria-current] { background: var(--bg2); }
.cf-cornice .burger .foglio nav b { display: block; font-size: 16px; font-weight: 800; }
.cf-cornice .burger .foglio nav small { display: block; font-size: 13px; color: var(--sub); font-weight: 500; margin-top: 1px; }
.cf-cornice .burger .foglio .tondo { width: 42px; height: 42px; border-radius: 12px; }
.cf-cornice .burger .foglio .tondo .ico { width: 22px; height: 22px; }
.cf-cornice .foglio-piede { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; padding-top: 14px; border-top: 1px solid var(--bordo); }
.cf-cornice .foglio-piede .riga { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 12px; border: 1px solid var(--bordo); border-radius: 14px;
  background: var(--card); color: var(--txt); font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; text-decoration: none; }
.cf-cornice .foglio-piede .riga .ico { width: 20px; height: 20px; color: var(--acct); }
.cf-cornice .foglio-piede .tema-ico { position: relative; width: 20px; height: 20px; color: var(--acct); }
.cf-cornice .foglio-piede .tema-ico svg { width: 20px; height: 20px; }
.cf-cornice .solo-scuro { display: none; }
[data-theme="dark"] .cf-cornice .solo-scuro { display: inline; }
[data-theme="dark"] .cf-cornice .solo-chiaro { display: none; }
html.menu-aperto { overflow: hidden; }
@keyframes foglio-giu { from { opacity: 0; transform: translateY(-12px); } }
@keyframes fondo-dentro { from { opacity: 0; } }
@keyframes voce-dentro { from { opacity: 0; transform: translateY(8px); } }

footer.piede.cf-cornice {
  display: block; background: var(--scuro); color: var(--scurosub); padding: 64px 0 36px; font-size: 15px; margin: 72px 0 0;
  border: 0; text-align: left; width: auto; max-width: none;
}
footer.piede.cf-cornice .w { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; }
footer.piede.cf-cornice p { margin: 14px 0 0; color: var(--scurosub); font-size: 15px; max-width: 320px; }
footer.piede.cf-cornice h4 { color: var(--scurot); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 14px; font-weight: 800; }
footer.piede.cf-cornice a { color: var(--scurosub); text-decoration: none; transition: color .2s; }
footer.piede.cf-cornice .col a { display: block; padding: 5px 0; }
footer.piede.cf-cornice a:hover { color: var(--scurot); }
footer.piede.cf-cornice .logo img { height: 48px; }
footer.piede.cf-cornice .social { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
footer.piede.cf-cornice .social a { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px 0 12px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .14); font-size: 14px; font-weight: 700; }
footer.piede.cf-cornice .social a:hover { border-color: var(--scuroa); color: var(--scuroa); }
footer.piede.cf-cornice .social .ico { width: 18px; height: 18px; }
footer.piede.cf-cornice .fine { grid-column: 1 / -1; border-top: 1px solid rgba(255, 255, 255, .12); padding-top: 22px; margin-top: 12px;
  display: grid; grid-template-columns: 1fr auto; gap: 14px 24px; align-items: center; font-size: 14px; }
footer.piede.cf-cornice .legali { display: flex; flex-wrap: wrap; gap: 4px 0; }
footer.piede.cf-cornice .legali a { padding: 6px 0; }
footer.piede.cf-cornice .legali a + a::before { content: "·"; margin: 0 10px; color: rgba(255, 255, 255, .3); }
footer.piede.cf-cornice .lingua { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .14); font-weight: 700; }
footer.piede.cf-cornice .lingua .ico { width: 18px; height: 18px; }
footer.piede.cf-cornice .titolare { grid-column: 1 / -1; color: var(--scurosub); font-size: 12.5px; line-height: 1.5; }
[data-theme="dark"] footer.piede.cf-cornice { border-top: 1px solid var(--bordo); }

@media (max-width: 980px) {
  .cf-cornice nav.menu { display: none; }
  .cf-cornice .burger { display: block; }
}
@media (max-width: 760px) {
  header.top.cf-cornice .w { gap: 12px; height: 64px; }
  .cf-cornice .burger .foglio { max-height: calc(100dvh - 64px); }
  /* Telefono: nella barra restano ricerca, Iscriviti e menu; tema e lingua stanno nel menu. */
  .cf-cornice .dx > .icona[data-cambia-tema], .cf-cornice .dx > a.lang { display: none; }
  .cf-cornice .logo img { height: 36px; }
  .cf-cornice .dx { gap: 6px; }
  .cf-cornice .dx .lang { padding: 6px 4px; }
  .cf-cornice .dx .btn { padding: 9px 14px; font-size: 14px; }
  footer.piede.cf-cornice .w { grid-template-columns: 1fr 1fr; gap: 28px 20px; }
  footer.piede.cf-cornice .marchio { grid-column: 1 / -1; }
  footer.piede.cf-cornice .comunita { grid-row: span 2; }
  footer.piede.cf-cornice .fine { grid-template-columns: 1fr; }
  footer.piede.cf-cornice .lingua { justify-self: start; }
}


/* Utente collegato: pillola con iniziale e nome al posto di "Iscriviti" */
.cf-cornice .account { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 4px 14px 4px 4px; border-radius: 999px; border: 1px solid var(--bordo); background: var(--card); color: var(--txt); font-weight: 800; font-size: 14px; text-decoration: none; }
.cf-cornice .account:hover { border-color: var(--acc); }
.cf-cornice .account .iniziale { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--acc) 15%, transparent); color: var(--acct); font-size: 14px; }
.cf-cornice .account.premium .iniziale { background: var(--acc); color: var(--onacc); }
@media (max-width: 760px) { .cf-cornice .account .nome { display: none; } .cf-cornice .account { padding: 4px; } }

/* Icone del sito (src/lib/icone.ts): prendono colore e misura dal testo. */
.ico { display: inline-block; width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }
/* Icona in un riquadro tondo, per titoli di schede e voci di elenco. */
.tondo { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 15px; flex: none;
  background: color-mix(in srgb, var(--acc) 13%, transparent); color: var(--acct); }
.tondo .ico { width: 28px; height: 28px; vertical-align: 0; }
.riquadro > .tondo { margin-bottom: 16px; transition: transform .35s var(--morbido, ease), background .3s; }
.riquadro:hover > .tondo { transform: translateY(-2px) rotate(-4deg); background: color-mix(in srgb, var(--acc) 20%, transparent); }
/* Etichette e pulsanti con icona davanti. */
.con-ico { display: inline-flex; align-items: center; gap: .45em; }
.occhiello .ico { width: 1.25em; height: 1.25em; }
.btn .ico { width: 1.2em; height: 1.2em; }


:root, :root[data-theme="dark"], :root[data-theme="light"] {
  --ink: var(--txt); --muted: var(--sub); --cream: var(--bg); --cream-dark: var(--bg2); --surface: var(--card); --surface-elev: var(--card);
  --border: var(--bordo); --coffee: var(--acc); --coffee-dark: var(--acc-hover); --coffee-800: var(--acc-hover); --gold: var(--scuroa);
  --sfondo: var(--bg); --carta: var(--card); --testo: var(--txt); --tenue: var(--sub); --oro: var(--acc);
}
body { font-family: var(--font); }
