/* Vetrina di ILENE: i token del marchio e il CSS della pagina, solo dentro i visual (taste-skill, system.md).
   I colori sono quelli del logo (app/CLAUDE.md, «Marchio»): blu #1C305B, avorio #F2ECE4. */

@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/source-serif-4-var.woff2") format("woff2");
  font-weight: 200 900;
  font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("../fonts/geist-var.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --p-bg: #f8f4ee; --p-surface: #efe8dd; --p-ink: #141f3d; --p-muted: #525c74;
  --p-accent: #1c305b; --p-accent-ink: #f2ece4; --p-action: #1c305b; --p-action-ink: #f2ece4;
  --p-inv-bg: #1c305b; --p-inv-surface: #24396b; --p-inv-ink: #f2ece4; --p-inv-muted: #b7bfd2;
  --p-inv-accent: #f2ece4; --p-inv-accent-ink: #1c305b; --p-inv-action: #f2ece4; --p-inv-action-ink: #1c305b;
  /* il serif del marchio: Iowan Old Style dove c'è (Apple), come nel sito; altrove Source Serif 4, ospitato qui */
  --font-display: "Iowan Old Style", "Source Serif 4", "Palatino Linotype", Palatino, Georgia, serif;
  --font-text: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --display-weight: 400;
  --display-tracking: -0.02em;
  --display-tracking-xl: -0.026em;
  --blu: #1c305b;
  --avorio: #f2ece4;
  --carta: #fffdf9;
}

/* ---------------------------------------------------------------- il marchio */
.nav__logo { gap: var(--s-3); }
.nav__logo .marchio { width: 32px; height: 32px; border-radius: 8px; }
.nav__logo .scritta { width: auto; height: 19px; }
.nav__logo--grande img { width: auto; height: 64px; }
@media (max-width: 639px) { .nav__logo--grande img { height: 48px; } }

/* il riquadro del menu: un avviso dell'app */
.avviso-mini { --ax: 24px; --ay: 28px; display: flex; gap: 12px; align-items: center; width: 260px; padding: 14px 16px;
  background: var(--carta); border-radius: 14px; box-shadow: 0 1px 2px rgb(20 31 61 / .08), 0 12px 28px -14px rgb(20 31 61 / .35);
  font: 400 13px/1.35 var(--font-text); color: var(--p-ink); }
.avviso-mini b { display: block; font-weight: 500; }
.avviso-mini img { display: block; border-radius: 7px; }

/* ---------------------------------------------------------------- le illustrazioni (sprite img/illustrazioni.svg) */
.ill { display: block; width: 100%; height: 100%; color: var(--blu); }
.ic { display: inline-block; width: 1em; height: 1em; flex: none; vertical-align: -0.15em; }

/* ---------------------------------------------------------------- hero: il collage */
.ly-collage { container-type: inline-size; }
.ly-collage .pz { box-shadow: 0 1px 2px rgb(20 31 61 / .08), 0 22px 48px -24px rgb(20 31 61 / .38); background: var(--carta); color: var(--p-ink); }
.pz-profilo { padding: 5cqw 5cqw 4.6cqw; display: grid; gap: 2.6cqw; font: 400 max(13px, 2.5cqw)/1.3 var(--font-text); }
.pz__label { font-size: max(13px, 2.1cqw); font-weight: 500; color: var(--p-muted); }
.pz__righe { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 1.4cqw; }
.pz__righe li { padding: 1cqw 2.2cqw; border-radius: 99px; background: var(--p-surface); white-space: nowrap; }
.ly-collage .pz-figura { background: var(--carta); display: grid; place-items: center; padding: 2cqw; }
.pz-figura .ill { width: 100%; height: 100%; }
.pz-scheda { padding: 4.6cqw 5.2cqw; display: grid; gap: 1.8cqw; align-content: start; font: 400 max(13px, 2.5cqw)/1.32 var(--font-text); }
.pz__esito { justify-self: start; display: inline-flex; align-items: center; gap: 1.2cqw; padding: .6cqw 1.8cqw; border-radius: 1.2cqw;
  font-size: max(13px, 2.1cqw); font-weight: 500; color: var(--blu); background: color-mix(in oklab, var(--blu) 9%, var(--carta)); }
.pz__esito::before { content: ""; width: 1.3cqw; height: 1.3cqw; border-radius: 50%; background: currentColor; }
.pz__titolo { font: 500 max(15px, 4.2cqw)/1.12 var(--font-display); letter-spacing: -0.01em; }
.pz__fatto { color: var(--p-ink); }
.pz__fonte { font-size: max(13px, 2.1cqw); color: var(--p-muted); }
.pz-scheda--piccola .pz__titolo { font-size: max(14px, 3.4cqw); }
/* le posizioni dei pezzi, in % del collage (tre serie: studio, famiglia, pensione) */
.p-a  { left: 4%;  top: 4%;  width: 54%; }
.p-b  { left: 62%; top: 4%;  width: 34%; aspect-ratio: 1; }
.p-c  { left: 4%;  top: 42%; width: 70%; }
.p-d  { left: 44%; bottom: 4%; width: 52%; }
.p-a2 { left: 42%; top: 4%;  width: 54%; }
.p-b2 { left: 4%;  top: 4%;  width: 34%; aspect-ratio: 1; }
.p-c2 { left: 4%;  top: 42%; width: 70%; }
/* sotto i 1024 il collage è largo quanto il contenitore: i pezzi larghi stanno sulle sue linee */
@media (max-width: 1023px) {
  .p-a, .p-c, .p-c2 { left: 0; }
  .p-a2 { left: auto; right: 0; }
  .p-b { left: auto; right: 0; }
  .p-b2 { left: 0; }
  .p-c, .p-c2 { width: 56%; }
  .p-d { left: auto; right: 0; width: 42%; }
}
@media (max-width: 639px) {
  /* il telefono tiene lo stesso disegno, più piccolo: due righe del profilo, niente fonte */
  .pz-scheda .pz__fonte, .pz__righe li:nth-child(n+3) { display: none; }
  .pz-profilo { padding: 14px; gap: 8px; }
  .pz-scheda { padding: 12px 14px; gap: 6px; }
  .p-a, .p-a2 { width: 60%; }
  .p-b, .p-b2 { width: 36%; }
  .p-c, .p-c2 { top: 38%; width: 82%; }
  .p-d { width: 72%; }
}

/* ---------------------------------------------------------------- #cosa: tre tipi di avvisi */
#cosa .panel { --p-h: 232px; height: var(--p-h); margin-top: var(--s-5); background: var(--carta); display: grid; place-items: center; padding: var(--s-4); overflow: hidden; }
#cosa .panel .ill { width: auto; height: 100%; max-width: 100%; aspect-ratio: 1; }
.presto { display: inline-block; margin-left: var(--s-1); padding: 2px 8px; border-radius: 6px; vertical-align: 3px;
  font: 500 13px/18px var(--font-text); letter-spacing: 0; color: var(--blu); background: color-mix(in oklab, var(--blu) 9%, var(--p-bg)); }
.catalogo-riga { margin-top: var(--s-7); display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-3); }
.catalogo-riga .t-label { margin: 0; }
.catalogo-riga > [data-moment] { min-width: 0; }
/* la fascia corre da un bordo all'altro dello schermo (il corpo della pagina taglia già lo scorrimento laterale);
   il tasto di pausa resta sulla linea destra del contenuto */
.catalogo-riga > .marquee { margin-inline: calc(50% - 50vw); }
.catalogo-riga > .marquee .mo-mq__pause { right: max(var(--gut), (100vw - 1280px) / 2); }
.catalogo-riga .mo-mq__track li { font: 400 var(--t-lead)/1.3 var(--font-display); color: var(--p-ink); }
@media (max-width: 639px) {
  #cosa .panel { --p-h: 168px; margin-top: var(--s-4); }
  .catalogo-riga { margin-top: var(--s-6); }
}

/* ---------------------------------------------------------------- #schede: la finestra (ricetta app-frame) */
.app.ui { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); margin-top: var(--s-7); background: var(--u-bg); border: 1px solid var(--u-border); border-radius: var(--u-r); box-shadow: var(--u-shadow); }
.app > .app__pane { position: relative; min-width: 0; min-height: 0; overflow: hidden; }
.app > .app__pane + .app__pane { border-left: 1px solid var(--u-line); }
.app > .app__pane > .ui-panel { width: 100%; border: 0; border-radius: 0; box-shadow: none; }
.app > .app__pane::after { content: ""; position: absolute; inset: auto 0 0 0; height: 64px; background: linear-gradient(transparent, var(--u-bg)); pointer-events: none; }
@media (min-width: 1024px) and (max-width: 1279px) { .app.ui { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); } }
@media (max-width: 1023px) {
  .app.ui { height: 560px; flex: none; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .app > .app__pane--list { max-height: 252px; }
  .app > .app__pane--list::after { display: none; }
  .app .ui-win__side { display: none; }
  .app .ui-win__body { grid-template-columns: minmax(0, 1fr); }
  .app > .app__pane + .app__pane { border-left: 0; border-top: 1px solid var(--u-line); }
}
@media (max-width: 639px) {
  .app.ui { height: 340px; grid-template-rows: minmax(0, 1fr); }
  .app > .app__pane--list { display: none; }
  .app > .app__pane + .app__pane { border-top: 0; }
}
.ui-win__crumb img { width: 16px; height: 16px; border-radius: 4px; }
.ui-win__profilo { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--u-muted); }
.elenco { list-style: none; margin: 0; padding: 0; }
.elenco li + li { box-shadow: inset 0 1px 0 var(--u-line); }
.elenco .ui-win__row { all: unset; box-sizing: border-box; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto;
  align-content: center; row-gap: 2px; column-gap: 12px; width: 100%; min-height: 58px; padding: 10px 16px; cursor: pointer; font-size: 13px; line-height: 16px;
  transition: background-color 200ms var(--u-ease); }
.elenco .ui-win__row:hover { background: color-mix(in oklab, var(--u-ink) 3%, var(--u-bg)); }
.elenco .ui-win__row[aria-pressed="true"] { background: color-mix(in oklab, var(--blu) 7%, var(--u-bg)); box-shadow: inset 3px 0 0 var(--blu); }
.elenco .ui-win__row:focus-visible { outline: 2px solid var(--action); outline-offset: -2px; }
.elenco .ui-win__who { grid-column: 1; grid-row: 1; line-height: 18px; font-size: 14px; color: var(--u-ink); white-space: normal; overflow: visible; text-overflow: clip; }
.elenco .ui-win__sub { grid-column: 1; grid-row: 2; white-space: normal; overflow: visible; text-overflow: clip; color: var(--p-muted); }
.elenco .ui-win__st { grid-column: 2; grid-row: 1 / 3; align-self: center; color: var(--blu); }
.app .ui-win__body { min-height: 0; grid-template-columns: 164px minmax(0, 1fr); }
.app .ui-win__nav { white-space: nowrap; }

/* la scheda aperta */
.scheda-ui { padding: 24px 28px 72px; font: 400 14px/1.5 var(--font-text); color: var(--u-ink); }
.scheda-ui[hidden] { display: none; }
.scheda-ui__testa { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.scheda-ui__esito { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 6px; font-size: 13px; font-weight: 500;
  color: var(--blu); background: color-mix(in oklab, var(--blu) 9%, var(--u-bg)); }
.scheda-ui__esito::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.scheda-ui__ctrl { font-size: 13px; color: var(--p-muted); }
.scheda-ui__titolo { margin: 14px 0 8px; font: 500 24px/1.15 var(--font-display); letter-spacing: -0.01em; }
.scheda-ui__sintesi { margin: 0 0 16px; color: var(--u-text-2, var(--u-ink)); max-width: 62ch; }
.scheda-ui__fatti { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 8px 16px; margin: 0 0 18px; padding: 14px 0; border-block: 1px solid var(--u-line); }
.scheda-ui__fatti dt { color: var(--u-muted); font-size: 13px; }
.scheda-ui__fatti dd { margin: 0; }
.scheda-ui h4 { margin: 18px 0 8px; font: 500 13px/1.3 var(--font-text); color: var(--p-muted); }
.scheda-ui__cond { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.scheda-ui__cond li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; }
.segno { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font: 600 12px/1 var(--font-text); }
.segno--si { color: var(--avorio); background: var(--blu); }
.segno--forse { color: var(--blu); box-shadow: inset 0 0 0 1.5px var(--blu); }
.scheda-ui__fonti { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.scheda-ui__fonti a { color: var(--blu); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.scheda-ui__fonti span { color: var(--p-muted); }
.etichetta-ai { margin: 18px 0 0; padding: 10px 12px; border-radius: 8px; font-size: 13px; background: var(--p-surface); color: var(--p-ink); }
@media (max-width: 639px) {
  .scheda-ui { padding: 18px 18px 64px; }
  .scheda-ui__fatti { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .scheda-ui__fatti dd + dt { margin-top: 8px; }
}

/* ---------------------------------------------------------------- #privacy: la fascia blu */
.fatti { list-style: none; margin: var(--s-5) 0 0; padding: 0; display: grid; gap: var(--s-3); }
.fatti li { display: flex; gap: var(--s-3); align-items: baseline; }
.fatti li::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: currentColor; transform: translateY(-2px); }
#privacy .dg { z-index: 1; }
@media (max-width: 639px) { #privacy .frame { --ratio: 80%; } }

/* ---------------------------------------------------------------- #come: tre passi */
#come .panel { --p-h: 288px; }
@media (max-width: 639px) { #come .panel { --p-h: 216px; } }
.passo-ui { --fit-max: 320px; --ax: max(24px, 50% - 160px); --ay: 40px; --ay-sm: 20px; }
.passo-ui .ui-panel { padding: 18px 20px 24px; font: 400 14px/1.4 var(--font-text); color: var(--u-ink); }
.domanda__q, .manca__t { margin: 0 0 12px; font: 500 16px/1.25 var(--font-display); }
.domanda__opz { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.domanda__opz li { padding: 8px 12px; border-radius: 8px; box-shadow: inset 0 0 0 1px var(--u-line-2); }
.domanda__opz li.is-on { color: var(--avorio); background: var(--blu); box-shadow: none; }
.esiti__riga { display: flex; justify-content: space-between; align-items: center; margin: 0; padding: 12px 0; border-bottom: 1px solid var(--u-line); }
.esiti__riga b { font: 500 22px/1 var(--font-display); color: var(--blu); }
.esiti__riga--chiusa b { color: var(--u-muted); }
.esiti__nota { margin: 12px 0 0; font-size: 13px; color: var(--u-muted); }
.manca__d { margin: 0 0 8px; padding: 10px 12px; border-radius: 8px; color: var(--blu); text-decoration: underline; text-underline-offset: 3px;
  background: color-mix(in oklab, var(--blu) 6%, var(--u-bg)); }

/* ---------------------------------------------------------------- #fonti */
#fonti .frame { --ratio: 80%; }
.fonti-ui { --w: 520px; --ay: 48px; width: min(var(--w), 100% - 48px); }
.fonti-ui > .ui-panel { width: 100%; }
@media (min-width: 640px) and (max-width: 1023px) { #fonti .frame { --ratio: 50%; } }
@media (max-width: 639px) { #fonti .frame { --ratio: 70%; } }
.fonti-scheda { padding: 22px 24px 72px; font: 400 14px/1.5 var(--font-text); color: var(--u-ink); }
.fonti-scheda__titolo { margin: 0 0 4px; font: 500 20px/1.2 var(--font-display); }
.numeri { margin-top: var(--s-8); }
.numeri .t-stat { color: var(--blu); margin: 0 0 var(--s-1); font-family: var(--font-text); font-weight: 400; letter-spacing: -0.02em; font-variant-numeric: lining-nums tabular-nums; }
@media (max-width: 639px) { .numeri { margin-top: var(--s-6); grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--s-3); } .numeri > * { grid-column: auto; } }

/* ---------------------------------------------------------------- #app: il disegno e gli avvisi nella cornice */
.app-avvisi { --ratio: 0px; height: 440px; margin-top: var(--s-7); }
.app-avvisi > .app-avvisi__ill { position: absolute; left: 9%; top: 50%; translate: 0 -50%; height: 320px; width: auto; color: var(--blu); }
.app-avvisi__dove { --ax: 8%; top: 50%; translate: 0 -50%; width: min(440px, 44%); }
.app-avvisi .ui-note { height: auto; min-height: 64px; padding: 12px 14px; align-items: flex-start; }
.app-avvisi .ui-note + .ui-note { margin-top: var(--s-3); }
.app-avvisi .ui-note__title, .app-avvisi .ui-note__body { white-space: normal; overflow: visible; text-overflow: clip; text-wrap: pretty; }
.app-avvisi .ui-note__body { color: var(--p-muted); }
.app-avvisi time { color: var(--p-muted); }
@media (min-width: 640px) and (max-width: 1023px) {
  .app-avvisi { height: 420px; }
  .app-avvisi > .app-avvisi__ill { left: 5%; height: 260px; }
  .app-avvisi__dove { --ax: 5%; width: 52%; }
}
@media (max-width: 639px) { .app-avvisi > .app-avvisi__ill { display: none; } }
@media (max-width: 639px) { .app-avvisi { height: 260px; } .app-avvisi .stage > .app-avvisi__dove { left: 16px; right: 16px; top: 50%; translate: 0 -50%; width: auto; max-width: none; } }
.avviso-ico img { display: block; width: 36px; height: 36px; border-radius: 9px; }

/* ---------------------------------------------------------------- la chiusura */
.footer__lede { max-width: 46ch; }

/* le illustrazioni piccole accanto al testo */
.ill--spot { width: auto; height: 200px; margin-top: var(--s-4); }
#privacy .ill { color: var(--avorio); }
@media (max-width: 1023px) { .ill--spot { display: none; } }

@media (max-width: 1023px) { .solo-largo { display: none; } }

/* dal tablet in su le tre carte restano in fila (illustrazioni e frammenti piccoli reggono 210 px): ogni sezione sta in una
   schermata; sul telefono vanno una sotto l'altra e le due sezioni di carte tengono due schermate */
@media (min-width: 640px) and (max-width: 1279px) {
  .tipi > .card, .passi > .card { grid-column: span 4; }
  #cosa .panel { --p-h: 176px; }
  #come .panel { --p-h: 216px; }
}
@media (min-width: 640px) and (max-width: 1023px) {
  #come .panel { --p-h: 300px; }
  #domande .ill--spot { display: block; height: 120px; margin-top: var(--s-4); }
  .catalogo-riga { margin-top: var(--s-6); }
}
@media (max-width: 639px) { #cosa, #come { --hm: 2; } }
/* il telefono: le due colonne di link del piè di pagina affiancate, il pulsante grande che non esce dallo schermo */
@media (max-width: 639px) {
  .closing__links > .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .closing__links > .grid > :first-child { grid-column: 1 / -1; }
  .closing__links > .grid > .footer__col { grid-column: auto; }
  .btn--xl { padding-inline: var(--s-4); white-space: normal; text-align: left; }
}

/* una sola misura per i titoli h3 della pagina: le domande come i titoli delle carte */
.faq > .faq__item > h3 { font-size: 18px; font-weight: 560; }
