/* ============================================================
   Paolo Monaco Studio — Checklist marchi (pagina interattiva)
   ------------------------------------------------------------
   Porting dell'handoff "Checklist Marchio.html" come componente del
   sito. TUTTO è scoped sotto .pm-checklist-root: i nomi di classe del
   documento (.eyebrow/.lead/.section/.callout/.note/.closing/.disclaimer)
   coincidono con classi già usate altrove nel tema — lo scope evita che
   le regole sconfinino in un verso o nell'altro.

   I token (colori/font/spazi/raggi/ombre/motion) arrivano da tokens.css,
   caricato globalmente: qui NON si reimportano font né si hardcodano hex.

   "Stampa / Salva PDF" è nativo: il blocco @media print nasconde il
   chrome del sito + la toolbar, mostra la cover come pagina dedicata e
   conserva le spunte dell'utente.
   ============================================================ */

.pm-checklist-root,
.pm-checklist-root *,
.pm-checklist-root *::before,
.pm-checklist-root *::after { box-sizing: border-box; }

/* Document viewer: backdrop carta + foglio A4 centrato (era body + .viewer) */
.pm-checklist-root {
  background: #E4E5E8;
  color: var(--fg-on-paper);
  font-family: var(--font-sans);
  line-height: 1.55;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  padding: 56px 24px 96px;
}

/* @component .sheet — una pagina A4 (210 × 297 mm) ----------- */
.pm-checklist-root .sheet {
  position: relative;
  width: 210mm;
  min-height: 297mm;
  background: var(--color-white);
  box-shadow: 0 24px 56px rgba(21, 32, 58, 0.16);
  overflow: hidden;
}
.pm-checklist-root .sheet--body { padding: 22mm 20mm 24mm; }

/* ============================================================
   @component .doc-cover — copertina navy full-bleed
   ============================================================ */
.pm-checklist-root .doc-cover {
  display: flex;
  flex-direction: column;
  color: var(--fg-on-navy);
  background: var(--color-navy-deep);
}
.pm-checklist-root .doc-cover__top {
  position: relative;
  z-index: 2;
  padding: 20mm 20mm 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

/* brand lockup (logomark + nome) ---------------------------- */
.pm-checklist-root .cover-lockup { display: flex; align-items: center; gap: 14px; }
.pm-checklist-root .pm-logo { display: inline-flex; flex-direction: column; align-items: center; font-family: var(--font-display); font-weight: 700; line-height: 0.74; flex: none; }
.pm-checklist-root .pm-logo__letters { display: inline-flex; letter-spacing: -0.05em; }
.pm-checklist-root .pm-logo__bar { width: 0.92em; height: 0.085em; min-height: 2px; border-radius: 999px; margin-top: 0.13em; }
.pm-checklist-root .pm-logo--lg { font-size: 42px; }
.pm-checklist-root .pm-logo--sm { font-size: 28px; }
.pm-checklist-root .pm-logo--brand .pm-logo__p { color: var(--color-navy); }
.pm-checklist-root .pm-logo--brand .pm-logo__m { color: var(--color-orange); }
.pm-checklist-root .pm-logo--brand .pm-logo__bar { background: var(--color-orange); }
.pm-checklist-root .pm-logo--cover .pm-logo__p { color: #fff; }
.pm-checklist-root .pm-logo--cover .pm-logo__m { color: var(--color-orange); }
.pm-checklist-root .pm-logo--cover .pm-logo__bar { background: var(--color-orange); }
.pm-checklist-root .cover-lockup .name { font-family: var(--font-display); line-height: 1.05; }
.pm-checklist-root .cover-lockup .name b { font-weight: 700; font-size: 18px; letter-spacing: -0.01em; display: block; }
.pm-checklist-root .cover-lockup .name i { font-weight: 300; font-style: italic; font-size: 14px; color: var(--color-orange); display: block; }

/* eyebrow pill ---------------------------------------------- */
.pm-checklist-root .eyebrow {
  align-self: flex-start;
  margin-top: 30mm;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 16px;
  border: 1px solid rgba(159, 173, 189, 0.4);
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--color-orange-soft);
}
.pm-checklist-root .eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--color-orange); flex: none; }

/* cover title — regola 95/5 --------------------------------- */
.pm-checklist-root .cover-title {
  margin: 22px 0 0;
  font-size: 58px;
  line-height: 1.0;
  letter-spacing: -0.03em;
  font-weight: var(--fw-bold);
  max-width: 16ch;
}
.pm-checklist-root .cover-title .light {
  display: block;
  font-weight: var(--fw-extralight);
  color: var(--color-orange-soft);
  margin-top: 4px;
  letter-spacing: -0.02em;
}
.pm-checklist-root .cover-lead {
  margin: 22px 0 0;
  max-width: 46ch;
  font-size: 16.5px;
  font-weight: var(--fw-regular);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.78);
}

/* cover meta + portrait band -------------------------------- */
.pm-checklist-root .cover-meta {
  margin-top: auto;
  padding-top: 28px;
  display: flex;
  gap: 28px;
  font-size: 12.5px;
  color: rgba(255,255,255,0.62);
}
.pm-checklist-root .cover-meta b { color: var(--color-white); font-weight: var(--fw-semibold); display: block; font-size: 13px; }
.pm-checklist-root .doc-cover__portrait {
  position: relative;
  z-index: 1;
  height: 78mm;
  margin-top: 14mm;
  background-image:
    linear-gradient(to bottom, var(--color-navy-deep) 0%, rgba(22,44,100,0) 26%),
    url("../images/texture-navy.png");
  background-size: 100% 100%, cover;
  background-position: top, center 28%;
  background-repeat: no-repeat;
}

/* ============================================================
   BODY SHEET — running header
   ============================================================ */
.pm-checklist-root .run-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  margin-bottom: 30px;
  border-bottom: 1px solid rgba(159,173,189,0.35);
}
.pm-checklist-root .run-head .left { display: flex; align-items: center; gap: 11px; }
.pm-checklist-root .run-head .pm-logo { margin-bottom: 2px; }
.pm-checklist-root .run-head .wm { font-family: var(--font-display); font-weight: 700; font-size: 15px; color: var(--color-navy); }
.pm-checklist-root .run-head .wm i { font-weight: 300; font-style: italic; color: var(--color-orange); }
.pm-checklist-root .run-head .kicker {
  font-size: 11px; font-weight: var(--fw-semibold); letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--color-ink-3);
}

/* lead paragraph in cima al body ---------------------------- */
.pm-checklist-root .lead {
  font-size: 17px;
  line-height: 1.6;
  color: var(--color-ink-2);
  margin: 0 0 22px;
}
.pm-checklist-root .lead strong { color: var(--color-ink); font-weight: var(--fw-semibold); }

/* ============================================================
   @component .callout
   ============================================================ */
.pm-checklist-root .callout {
  position: relative;
  margin: 24px 0;
  padding: 22px 24px 22px 26px;
  border-radius: var(--radius-md);
  break-inside: avoid;
}
.pm-checklist-root .callout::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
}
.pm-checklist-root .callout__label {
  display: flex; align-items: center; gap: 8px;
  font-size: 11.5px; font-weight: var(--fw-bold);
  letter-spacing: 0.1em; text-transform: uppercase;
  margin-bottom: 9px;
}
.pm-checklist-root .callout p { margin: 0; font-size: 15px; line-height: 1.6; }
.pm-checklist-root .callout p + p { margin-top: 10px; }
.pm-checklist-root .callout strong { font-weight: var(--fw-bold); }

.pm-checklist-root .callout--warn { background: var(--color-orange-soft); color: #6b3d1c; }
.pm-checklist-root .callout--warn::before { background: var(--color-orange); }
.pm-checklist-root .callout--warn .callout__label { color: #b4631f; }
.pm-checklist-root .callout--warn strong { color: #5a3214; }

.pm-checklist-root .callout--info { background: #EEF1F6; color: var(--color-ink-2); }
.pm-checklist-root .callout--info::before { background: var(--color-navy-mute); }
.pm-checklist-root .callout--info .callout__label { color: var(--color-navy); }

/* ============================================================
   @component .section — blocco numerato
   ============================================================ */
.pm-checklist-root .section { margin: 38px 0 0; break-inside: avoid-page; }
.pm-checklist-root .section__head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 6px;
}
.pm-checklist-root .section__num {
  flex: none;
  width: 42px; height: 42px;
  border-radius: var(--radius-md);
  background: var(--color-navy);
  color: var(--color-white);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
}
.pm-checklist-root .section__title {
  margin: 0;
  font-size: 25px;
  font-weight: var(--fw-bold);
  letter-spacing: -0.02em;
  color: var(--color-ink);
  line-height: 1.15;
  padding-top: 5px;
}
.pm-checklist-root .section__intro {
  margin: 4px 0 18px 58px;
  font-size: 15.5px;
  color: var(--color-ink-2);
  line-height: 1.6;
}
.pm-checklist-root .section__intro strong { color: var(--color-ink); font-weight: var(--fw-semibold); }
.pm-checklist-root .section__body { margin-left: 58px; }

/* group sub-heading ----------------------------------------- */
.pm-checklist-root .group-label {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 22px 0 12px;
  font-size: 13px;
  font-weight: var(--fw-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-navy);
}
.pm-checklist-root .group-label::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: rgba(159,173,189,0.4);
}
.pm-checklist-root .group-label .desc {
  text-transform: none;
  letter-spacing: 0;
  font-weight: var(--fw-regular);
  font-size: 13.5px;
  color: var(--color-ink-3);
  flex: none;
}

/* ============================================================
   @component .check — voce di checklist interattiva
   ============================================================ */
.pm-checklist-root .check {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 13px 16px;
  margin: 8px 0;
  border: 1px solid rgba(159,173,189,0.4);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-standard),
              background var(--dur-fast) var(--ease-standard);
  break-inside: avoid;
}
.pm-checklist-root .check:hover { border-color: var(--color-navy-mute); background: #FAFBFC; }
.pm-checklist-root .check input { position: absolute; opacity: 0; width: 0; height: 0; }

.pm-checklist-root .check .box {
  flex: none;
  width: 22px; height: 22px;
  margin-top: 1px;
  border: 2px solid var(--color-navy-mute);
  border-radius: var(--radius-sm);
  background: var(--color-white);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--dur-fast) var(--ease-standard);
}
.pm-checklist-root .check .box svg { width: 14px; height: 14px; opacity: 0; transform: scale(0.6); transition: all var(--dur-fast) var(--ease-out); }
.pm-checklist-root .check .label { font-size: 15px; line-height: 1.5; color: var(--color-ink); padding-top: 1px; }
.pm-checklist-root .check .label b { font-weight: var(--fw-semibold); }

/* stato checked */
.pm-checklist-root .check input:checked ~ .box { background: var(--color-navy); border-color: var(--color-navy); }
.pm-checklist-root .check input:checked ~ .box svg { opacity: 1; transform: scale(1); stroke: #fff; }
.pm-checklist-root .check:has(input:checked) { background: #F4F7FB; border-color: rgba(33,62,138,0.35); }
.pm-checklist-root .check:has(input:checked) .label { color: var(--color-ink-2); }

/* checkbox accessibile da tastiera: focus visibile sul box */
.pm-checklist-root .check input:focus-visible ~ .box { outline: 2px solid var(--color-navy); outline-offset: 2px; }

/* paragrafo esplicativo sotto le voci ----------------------- */
.pm-checklist-root .note {
  margin: 12px 2px 4px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-ink-2);
}
.pm-checklist-root .note strong { color: var(--color-ink); font-weight: var(--fw-semibold); }
.pm-checklist-root .note em { font-style: italic; }

/* ============================================================
   @component .cost-box
   ============================================================ */
.pm-checklist-root .cost-box {
  margin: 18px 0 0;
  border: 1px solid rgba(159,173,189,0.45);
  border-radius: var(--radius-lg);
  overflow: hidden;
  break-inside: avoid;
}
.pm-checklist-root .cost-row {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 18px;
  padding: 16px 22px;
  align-items: start;
}
.pm-checklist-root .cost-row + .cost-row { border-top: 1px solid rgba(159,173,189,0.3); }
.pm-checklist-root .cost-row .who {
  font-weight: var(--fw-bold);
  font-size: 14px;
  color: var(--color-navy);
  line-height: 1.3;
}
.pm-checklist-root .cost-row .who span { display: block; font-weight: var(--fw-regular); font-size: 12px; color: var(--color-ink-3); margin-top: 2px; }
.pm-checklist-root .cost-row .what { font-size: 14px; line-height: 1.55; color: var(--color-ink-2); }
.pm-checklist-root .cost-row .what strong { color: var(--color-ink); font-weight: var(--fw-semibold); }
.pm-checklist-root .cost-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 7px; }
.pm-checklist-root .cost-list li { position: relative; padding-left: 16px; }
.pm-checklist-root .cost-list li::before { content: ""; position: absolute; left: 2px; top: 8px; width: 5px; height: 5px; border-radius: 50%; background: var(--color-orange); }

/* ============================================================
   @component .flow — le tappe post-deposito (sezione 5)
   ============================================================ */
.pm-checklist-root .flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 6px;
  margin: 4px 0 16px;
  font-size: 12.5px;
}
.pm-checklist-root .flow .step {
  padding: 7px 13px;
  border-radius: var(--radius-pill);
  background: #EEF1F6;
  color: var(--color-navy);
  font-weight: var(--fw-medium);
  white-space: nowrap;
}
.pm-checklist-root .flow .step.is-key { background: var(--color-orange-soft); color: #8a4d1c; font-weight: var(--fw-bold); }
.pm-checklist-root .flow .arrow { color: var(--color-navy-mute); font-weight: 700; }

/* ============================================================
   CLOSING + @component .cta-box
   ============================================================ */
.pm-checklist-root .closing { margin-top: 40px; }
.pm-checklist-root .closing h2 {
  font-size: 25px; font-weight: var(--fw-bold); letter-spacing: -0.02em;
  color: var(--color-ink); margin: 0 0 12px;
}
.pm-checklist-root .closing p { font-size: 15.5px; line-height: 1.65; color: var(--color-ink-2); margin: 0 0 12px; }
.pm-checklist-root .closing p strong { color: var(--color-ink); font-weight: var(--fw-semibold); }

.pm-checklist-root .cta-box {
  margin: 26px 0 0;
  padding: 32px 34px;
  border-radius: var(--radius-lg);
  background: linear-gradient(105deg, var(--color-navy-deep) 0%, var(--color-navy) 70%);
  color: var(--fg-on-navy);
  break-inside: avoid;
  box-shadow: var(--shadow-navy);
}
.pm-checklist-root .cta-box .pull {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
  max-width: 30ch;
}
.pm-checklist-root .cta-box .pull em { font-style: italic; font-weight: 300; color: var(--color-orange); }
.pm-checklist-root .cta-box p { margin: 0 0 20px; font-size: 14.5px; color: rgba(255,255,255,0.8); max-width: 48ch; }
.pm-checklist-root .cta-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px;
  background: var(--color-orange);
  color: var(--color-navy);
  border-radius: var(--radius-pill);
  font-weight: var(--fw-bold);
  font-size: 15px;
  text-decoration: none;
  transition: filter var(--dur-fast) var(--ease-standard), transform 90ms var(--ease-standard);
}
.pm-checklist-root .cta-btn:hover { filter: brightness(0.96); }
.pm-checklist-root .cta-btn:active { transform: scale(0.98); filter: brightness(0.92); }
.pm-checklist-root .cta-note { margin-top: 14px; font-size: 12px; color: rgba(255,255,255,0.55); }

/* ============================================================
   @component .disclaimer — obbligatorio
   ============================================================ */
.pm-checklist-root .disclaimer {
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid rgba(159,173,189,0.4);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  font-size: 12px;
  color: var(--color-ink-3);
}
.pm-checklist-root .disclaimer .site { color: var(--color-navy); font-weight: var(--fw-semibold); }
.pm-checklist-root .disclaimer em { font-style: italic; }

/* progress meter ring sul body sheet ------------------------ */
.pm-checklist-root .progress-card {
  display: flex; align-items: center; gap: 16px;
  margin: 0 0 26px;
  padding: 16px 20px;
  background: #F4F7FB;
  border: 1px solid rgba(33,62,138,0.16);
  border-radius: var(--radius-lg);
}
.pm-checklist-root .progress-card .meter { flex: none; width: 48px; height: 48px; }
.pm-checklist-root .progress-card .txt b { display: block; font-size: 15px; color: var(--color-ink); font-weight: var(--fw-bold); }
.pm-checklist-root .progress-card .txt span { font-size: 13px; color: var(--color-ink-3); }

/* ============================================================
   FLOATING TOOLBAR — solo schermo
   ============================================================ */
.pm-checklist-root .toolbar {
  position: fixed;
  z-index: 50;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 8px 8px 18px;
  background: rgba(22, 44, 100, 0.96);
  color: #fff;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(4px);
}
.pm-checklist-root .toolbar .prog { font-size: 13px; font-weight: var(--fw-medium); white-space: nowrap; }
.pm-checklist-root .toolbar .prog b { color: var(--color-orange); font-weight: var(--fw-bold); }
.pm-checklist-root .toolbar .sep { width: 1px; height: 22px; background: rgba(255,255,255,0.2); margin: 0 4px; }
.pm-checklist-root .toolbar button {
  font-family: var(--font-sans);
  font-size: 13px; font-weight: var(--fw-semibold);
  border: none; cursor: pointer;
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  transition: filter var(--dur-fast) var(--ease-standard);
}
.pm-checklist-root .toolbar .btn-print { background: var(--color-orange); color: var(--color-navy); }
.pm-checklist-root .toolbar .btn-reset { background: rgba(255,255,255,0.12); color: #fff; }
.pm-checklist-root .toolbar button:hover { filter: brightness(0.93); }

/* A schermo la cover navy è sostituita dall'hero del sito: si vede solo in stampa. */
.pm-checklist-root .sheet--cover { display: none; }

/* ============================================================
   STAMPA — la cover torna come pagina dedicata, via il chrome
   ============================================================ */
@media print {
  @page { size: A4; margin: 15mm 14mm 16mm; }
  @page cover { margin: 0; }

  /* nasconde il chrome del sito (regole attive solo su questo template) */
  .site-header, .site-footer, .mobile-menu, .skip-link,
  .page-banner, .checklist-banner { display: none !important; }

  .pm-checklist-root { background: #fff; padding: 0; display: block; gap: 0; }
  .pm-checklist-root .toolbar { display: none !important; }

  .pm-checklist-root .sheet { width: auto; min-height: 0; box-shadow: none; overflow: visible; }
  .pm-checklist-root .sheet--cover { display: flex; page: cover; height: 297mm; break-after: page; }
  .pm-checklist-root .sheet--body { padding: 0; }

  .pm-checklist-root .section,
  .pm-checklist-root .callout,
  .pm-checklist-root .cost-box,
  .pm-checklist-root .cta-box,
  .pm-checklist-root .check,
  .pm-checklist-root .group-label,
  .pm-checklist-root .closing { break-inside: avoid; }
  .pm-checklist-root .run-head { position: running(head); }
  .pm-checklist-root a { color: inherit; text-decoration: none; }

  /* checkbox nitide su carta */
  .pm-checklist-root .check { background: #fff !important; }
  .pm-checklist-root .check:has(input:checked) { background: #fff !important; }
}

/* schermi stretti: il foglio scala e diventa leggibile ------ */
@media (max-width: 880px) {
  .pm-checklist-root { padding: 24px 0 96px; }
  .pm-checklist-root .sheet { width: 100%; min-height: 0; box-shadow: none; }
  .pm-checklist-root .sheet--body { padding: 28px 20px 40px; }
  .pm-checklist-root .section__body,
  .pm-checklist-root .section__intro { margin-left: 0; }
  .pm-checklist-root .cost-row { grid-template-columns: 1fr; gap: 4px; }
}
