
/* ============================================================
   SCHEDA SETTIMANALE — Manuela Palazzi, dietista
   Token e componenti base ripresi dalla landing (stesso linguaggio
   visivo): Pine/Sage/Mint/Linen/Poppy, Bodoni Moda + Figtree.
   ============================================================ */

:root {
  --pine: #1f3d2e;
  --pine-2: #17302a;
  --pine-3: #26493a;
  --pine-4: #2f5644;
  --sage: #7a9f80;
  --sage-deep: #5f8567;
  --mint: #dfebe0;
  --mint-2: #cfe0d2;
  --linen: #f4f6f1;
  --white: #ffffff;
  --poppy: #c7432f;
  --muted: rgba(244, 246, 241, 0.66);
  --muted-ink: rgba(31, 61, 46, 0.68);
  --line-w: rgba(244, 246, 241, 0.14);
  --line-i: rgba(31, 61, 46, 0.14);

  --font: "Figtree", "Helvetica Neue", Arial, sans-serif;
  --display: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;

  --nav-h: 64px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --container: 1240px;
  --r-sm: 10px;
  --r: 18px;
  --r-lg: 28px;

  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  --dur: 0.8s;

  /* tacche del metro (pattern riutilizzato: marquee, progress, stats) */
  --ticks: repeating-linear-gradient(90deg, currentColor 0 1.5px, transparent 1.5px 8px);
  --ticks-major: repeating-linear-gradient(90deg, currentColor 0 2px, transparent 2px 40px);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--pine);
  background: var(--linen);
  -webkit-font-smoothing: antialiased;
}
html, body { overflow-x: clip; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
input, textarea, select { font: inherit; color: inherit; }
::selection { background: var(--sage); color: var(--white); }
:focus-visible { outline: 3px solid var(--poppy); outline-offset: 3px; }
[hidden] { display: none !important; }

/* ---------- typography ---------- */
.mark { display: inline-flex; align-items: center; gap: .7rem; font-size: .84rem; font-weight: 600; color: var(--sage-deep); margin-bottom: 1.1rem; }
.mark__n { position: relative; display: inline-grid; place-items: center; min-width: 2.6rem; height: 1.7rem; padding: 0 .55rem .05rem; font-family: var(--display); font-weight: 700; font-size: .95rem; letter-spacing: .04em; color: var(--pine); background: var(--white); border: 1px solid var(--line-i); border-radius: 4px; }
.mark__n::before { content: ""; position: absolute; left: 4px; right: 4px; top: 0; height: 4px; color: var(--pine); background: var(--ticks); opacity: .8; }

/* ---------- buttons (pill), identici alla landing ---------- */
.btn {
  --bg: var(--pine); --fg: var(--linen); --fill: var(--sage);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .7rem;
  padding: .95rem 1.55rem; min-height: 50px;
  font-size: .88rem; font-weight: 600; letter-spacing: .01em; line-height: 1;
  color: var(--fg); background: var(--bg); border-radius: 999px; overflow: hidden;
  transition: transform .35s var(--ease-out), background .3s, color .3s, box-shadow .3s;
  will-change: transform; white-space: nowrap;
}
.btn > span { position: relative; z-index: 2; }
.btn::before { content: ""; position: absolute; inset: 0; z-index: 1; background: var(--fill); border-radius: inherit; transform: translateX(-102%) skewX(-12deg); transition: transform .45s var(--ease-io); }
.btn:hover::before { transform: translateX(0) skewX(0); }
.btn--pine { --bg: var(--pine); --fg: var(--linen); --fill: var(--sage-deep); }
.btn--pine:hover { color: var(--white); }
.btn--ghost { --bg: transparent; --fg: var(--pine); --fill: var(--pine); box-shadow: inset 0 0 0 1.5px rgba(31,61,46,.35); }
.btn--ghost:hover { color: var(--linen); box-shadow: inset 0 0 0 1.5px var(--pine); }
.btn--sm { padding: .7rem 1.15rem; min-height: 42px; font-size: .8rem; }
.btn--block { width: 100%; }
.btn__arrow { position: relative; z-index: 2; width: 1.1em; height: 1em; overflow: hidden; flex: none; }
.btn__arrow::before, .btn__arrow::after {
  content: ""; position: absolute; inset: 0;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M3 10h13M10 3l7 7-7 7' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M3 10h13M10 3l7 7-7 7' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform .4s var(--ease-io);
}
.btn__arrow::after { transform: translateX(-140%); }
.btn:hover .btn__arrow::before { transform: translateX(140%); }
.btn:hover .btn__arrow::after { transform: translateX(0); }

/* stato "invio in corso": spinner al posto della freccia */
.btn.is-busy { opacity: .7; pointer-events: none; }
.btn.is-busy .btn__arrow { animation: mp-spin .8s linear infinite; }
.btn.is-busy .btn__arrow::before,
.btn.is-busy .btn__arrow::after {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M17 10a7 7 0 1 1-2.1-5' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M17 10a7 7 0 1 1-2.1-5' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
  transform: none;
}
.btn.is-busy .btn__arrow::after { opacity: 0; }
@keyframes mp-spin { to { transform: rotate(360deg); } }

/* ============================================================
   STRUTTURA APP
   ============================================================ */
.app {
  min-height: 100svh;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  padding: 1.1rem 1rem 2.5rem;
  background:
    radial-gradient(rgba(31, 61, 46, .14) 1px, transparent 1.2px) 0 0 / 24px 24px,
    var(--linen);
}

.app__head {
  width: 100%;
  max-width: 560px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .2rem .1rem;
}
.app__brand { display: inline-flex; align-items: center; gap: .6rem; flex: none; }
.app__mark { width: 30px; height: 30px; color: var(--pine); flex: none; }
.app__name { display: grid; line-height: 1.15; }
.app__name b { font-family: var(--display); font-weight: 600; font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; }
.app__name small { font-size: .66rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--sage-deep); }

.app__card {
  width: 100%;
  max-width: 560px;
  background: var(--white);
  border-radius: var(--r-lg);
  box-shadow: 0 24px 50px -28px rgba(23, 48, 42, .35), 0 2px 10px rgba(23, 48, 42, .06);
  padding: 1.25rem;
  min-height: 320px;
  position: relative;
  overflow: hidden;
}
@media (min-width: 600px) {
  .app__card { padding: 2.25rem 2.5rem 2.5rem; }
}

.app__foot {
  width: 100%;
  max-width: 560px;
  text-align: center;
  font-size: .72rem;
  font-weight: 500;
  color: var(--muted-ink);
  padding: 0 .5rem;
}

/* ---------- accessibilità ---------- */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.hp {
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
  width: 1px; height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* ============================================================
   METRO — progresso
   ============================================================ */
.metro {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .3rem;
  min-width: 92px;
}
.metro[hidden] { display: none; }
.metro__bar {
  position: relative;
  width: 84px;
  height: 8px;
  border-radius: 999px;
  background: var(--mint-2);
  overflow: hidden;
}
.metro__bar::before {
  content: "";
  position: absolute; inset: 0;
  color: var(--pine);
  background: var(--ticks);
  background-size: 8px 100%;
  opacity: .35;
}
.metro__fill {
  position: relative;
  z-index: 1;
  display: block;
  height: 100%;
  width: 0%;
  background: var(--sage);
  border-radius: inherit;
  transition: width .6s var(--ease-io);
}
.metro__label {
  font-size: .68rem;
  font-weight: 600;
  color: var(--sage-deep);
  white-space: nowrap;
}

/* ============================================================
   STEP — corpo del passo + transizioni
   ============================================================ */
.step {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.step__eyebrow { margin-bottom: .9rem; }
.step__title {
  font-family: var(--display);
  font-optical-sizing: auto;
  font-size: 1.9rem;
  font-weight: 500;
  letter-spacing: -.01em;
  line-height: 1.12;
  outline: none;
}
.step__lead {
  margin-top: .6rem;
  color: var(--muted-ink);
  font-size: .98rem;
  line-height: 1.55;
}
.step__body { margin-top: 1.5rem; display: grid; gap: 1.4rem; }
.step__actions {
  margin-top: 1.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
}
.step__actions .btn:only-child,
.step__actions > span + .btn { margin-left: auto; }
.step__alert { margin-top: 1rem; }

.step.is-enter { animation: mp-step-in-fwd .35s var(--ease-out); }
.step.is-enter-back { animation: mp-step-in-back .35s var(--ease-out); }
.step.is-leave { animation: mp-step-out-fwd .18s var(--ease-io) forwards; }
.step.is-leave-back { animation: mp-step-out-back .18s var(--ease-io) forwards; }

@keyframes mp-step-in-fwd { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
@keyframes mp-step-in-back { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: none; } }
@keyframes mp-step-out-fwd { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateX(-16px); } }
@keyframes mp-step-out-back { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateX(16px); } }

@media (prefers-reduced-motion: reduce) {
  .step.is-enter, .step.is-enter-back, .step.is-leave, .step.is-leave-back { animation: none; }
  .metro__fill { transition: none; }
}

/* ============================================================
   CAMPI
   ============================================================ */
.field { display: grid; gap: .45rem; }
.field__label { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .45rem; font-size: .86rem; font-weight: 600; color: var(--pine); }
.field__label .ico { width: 1.15em; height: 1.15em; flex: none; color: var(--sage-deep); }
.field.is-invalid .field__label .ico { color: var(--poppy); }
.field__hint { font-size: .8rem; color: var(--muted-ink); line-height: 1.4; }
.field__error {
  font-size: .8rem;
  font-weight: 600;
  color: var(--poppy);
  display: block;
  min-height: 0;
}
.field.is-invalid .input,
.field.is-invalid .textarea {
  border-color: var(--poppy);
}
.field.is-invalid .field__label { color: var(--poppy); }

.field__optional { font-size: .78rem; font-weight: 500; color: var(--muted-ink); }

/* due colonne che diventano una sola su schermi stretti (anagrafica nuovo paziente) */
.fields-2col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.4rem;
}
@media (min-width: 480px) {
  .fields-2col { grid-template-columns: 1fr 1fr; gap: 1rem 1.4rem; }
}

.input, .textarea {
  width: 100%;
  min-height: 52px;
  padding: .8rem 1rem;
  font-size: 16px;
  font-family: var(--font);
  color: var(--pine);
  background: var(--white);
  border: 1.5px solid var(--line-i);
  border-radius: var(--r-sm);
  transition: border-color .25s, box-shadow .25s;
}
.input::placeholder, .textarea::placeholder { color: rgba(31, 61, 46, .38); }
.input:focus, .textarea:focus {
  outline: none;
  border-color: var(--sage);
  box-shadow: 0 0 0 4px rgba(122, 159, 128, .25);
}
.textarea { min-height: 110px; resize: vertical; line-height: 1.5; }

/* ============================================================
   STEPPER numerico (peso, vita, sessioni, minuti)
   ============================================================ */
.stepper {
  --stepper-unit-w: 5.5rem;
  display: grid;
  grid-template-columns: 52px 1fr var(--stepper-unit-w) 52px;
  align-items: center;
  gap: .6rem;
}
@media (min-width: 400px) {
  .stepper { --stepper-unit-w: 7.5rem; }
}
/* il secondo bottone va sempre nell'ultima colonna, anche quando il markup
   racchiude valore+unità in .stepper__field (2 figli invece di 4): così il
   numero resta allineato fra i due bottoni in modo identico per ogni stepper */
.stepper__btn:last-of-type { grid-column: 4; }
.stepper__btn {
  display: grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  background: var(--mint);
  color: var(--pine);
  font-size: 1.4rem;
  font-weight: 600;
  transition: background .2s, transform .2s;
}
.stepper__btn:hover { background: var(--mint-2); }
.stepper__btn:active { transform: scale(.94); }
.stepper__btn:disabled { opacity: .4; pointer-events: none; }
.stepper__field {
  grid-column: 2 / span 2;
  display: grid;
  grid-template-columns: 1fr var(--stepper-unit-w);
  align-items: baseline;
  border: 1.5px solid var(--line-i);
  border-radius: var(--r-sm);
  background: var(--white);
  padding: .4rem .5rem;
}
.stepper__field:focus-within {
  border-color: var(--sage);
  box-shadow: 0 0 0 4px rgba(122, 159, 128, .25);
}
.stepper__value {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: center;
  font-family: var(--display);
  font-size: 1.9rem;
  font-weight: 500;
  color: var(--pine);
  -moz-appearance: textfield;
}
.stepper__value:focus { outline: none; }
.stepper__value::-webkit-outer-spin-button,
.stepper__value::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper__unit {
  min-width: var(--stepper-unit-w);
  font-size: .84rem;
  font-weight: 600;
  color: var(--sage-deep);
  text-align: left;
  line-height: 1.25;
}

/* badge differenza */
.delta {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .8rem;
  font-weight: 700;
  padding: .3rem .65rem;
  border-radius: 999px;
  background: var(--mint);
  color: var(--pine);
}
.delta--down { background: rgba(31, 122, 58, .12); color: #1f7a3a; }
.delta--up { background: rgba(199, 67, 47, .12); color: var(--poppy); }
.delta--flat { background: var(--mint); color: var(--muted-ink); }
.delta .ico { width: .9em; height: .9em; }

/* ============================================================
   SCELTE — card singole (radio) e chip (multi)
   ============================================================ */
.choices {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .7rem;
}
.choices--2 { grid-template-columns: repeat(2, 1fr); }
.choices--3 { grid-template-columns: repeat(3, 1fr); }
.choices--4 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 420px) {
  .choices--4 { grid-template-columns: repeat(4, 1fr); }
}

.choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  text-align: center;
  padding: 1rem .6rem .9rem;
  min-height: 44px;
  background: var(--linen);
  border: 1.5px solid var(--line-i);
  border-radius: var(--r);
  color: var(--pine);
  cursor: pointer;
  position: relative;
  transition: border-color .2s, background .2s, transform .15s;
}
.choice:hover { border-color: var(--sage); }
.choice:active { transform: scale(.98); }
.choice .ico--lg {
  width: 2.2rem;
  height: 2.2rem;
  flex: none;
  color: var(--sage-deep);
  transition: color .2s;
}
.choice__label { font-size: .88rem; font-weight: 700; line-height: 1.2; }
.choice__small { font-size: .74rem; color: var(--muted-ink); line-height: 1.3; }
.choice.is-on {
  border-color: var(--pine);
  background: var(--mint);
}
.choice.is-on .ico--lg { color: var(--pine); }
.choice.is-on::after {
  content: "";
  position: absolute;
  top: .5rem;
  right: .5rem;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--pine) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M4 10.5l4 4 8-9' fill='none' stroke='%23f4f6f1' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 62% no-repeat;
}

/* card compatta: solo etichetta, per scelte brevi (es. sesso) */
.choice--compact {
  flex-direction: row;
  justify-content: center;
  min-height: 0;
  padding: .8rem;
  gap: .4rem;
}
.choice--compact .ico--lg,
.choice--compact .choice__small { display: none; }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-height: 44px;
  padding: .55rem 1rem;
  border-radius: 999px;
  background: var(--linen);
  border: 1.5px solid var(--line-i);
  color: var(--pine);
  font-size: .86rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .2s, background .2s, color .2s;
}
.chip:hover { border-color: var(--sage); }
.chip .ico { color: var(--sage-deep); }
.chip.is-on {
  border-color: var(--pine);
  background: var(--pine);
  color: var(--linen);
}
.chip.is-on .ico { color: var(--sage); }

/* ============================================================
   RANGE — aderenza 1-10
   ============================================================ */
.range { display: grid; gap: .7rem; justify-items: center; }
.range__value {
  font-family: var(--display);
  font-size: 2.6rem;
  font-weight: 500;
  line-height: 1;
  color: var(--pine);
}
.range__track { position: relative; width: 100%; padding: .5rem 0; }
.range input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  margin: 0;
  border-radius: 999px;
  background: var(--mint-2);
  position: relative;
  z-index: 1;
}
.range__track::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 8px;
  transform: translateY(-50%);
  border-radius: 999px;
  color: var(--pine);
  background: var(--ticks);
  background-size: 10% 100%;
  opacity: .45;
  pointer-events: none;
}
.range input[type="range"]::-webkit-slider-runnable-track { height: 8px; border-radius: 999px; background: transparent; }
.range input[type="range"]::-moz-range-track { height: 8px; border-radius: 999px; background: transparent; }
.range input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--pine);
  border: 3px solid var(--white);
  box-shadow: 0 4px 12px rgba(23, 48, 42, .35);
  margin-top: -10px;
  cursor: pointer;
  transition: transform .15s;
}
.range input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.06); }
.range input[type="range"]::-moz-range-thumb {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--pine);
  border: 3px solid var(--white);
  box-shadow: 0 4px 12px rgba(23, 48, 42, .35);
  cursor: pointer;
}
.range input[type="range"]:focus-visible { outline: 3px solid var(--poppy); outline-offset: 4px; }
.range__ends {
  width: 100%;
  display: flex;
  justify-content: space-between;
  font-size: .72rem;
  font-weight: 600;
  color: var(--muted-ink);
  gap: 1rem;
}
.range__ends span:last-child { text-align: right; }

/* ============================================================
   SCALA A 5 — energia / sonno
   ============================================================ */
.scale5 { display: flex; justify-content: space-between; gap: .4rem; }
.scale5__item {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 50%;
  color: rgba(31, 61, 46, .32);
  background: var(--linen);
  cursor: pointer;
  transition: color .2s, background .2s, transform .15s;
}
.scale5__item .ico { width: 2rem; height: 2rem; }
.scale5__item:hover { background: var(--mint); }
.scale5__item:active { transform: scale(.94); }
.scale5__item.is-on { color: var(--pine); background: var(--mint); }

/* ============================================================
   MESSAGGI
   ============================================================ */
.greeting { display: grid; gap: .3rem; }
.greeting__name {
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 500;
  letter-spacing: -.01em;
  color: var(--pine);
}
.greeting__last {
  font-size: .88rem;
  color: var(--muted-ink);
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 1rem;
}

.notice {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  padding: .85rem 1rem;
  border-radius: var(--r-sm);
  font-size: .88rem;
  line-height: 1.45;
  background: var(--mint);
  color: var(--pine);
}
.notice .ico { flex: none; margin-top: .1em; }
.notice--warn { background: rgba(199, 67, 47, .1); color: var(--pine); }
.notice--warn .ico { color: var(--poppy); }
.notice--ok { background: var(--mint); color: var(--pine); }
.notice--ok .ico { color: var(--sage-deep); }

/* ============================================================
   RIEPILOGO
   ============================================================ */
.summary { display: grid; gap: 0; border-top: 1px solid var(--line-i); }
.summary__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: .65rem 0;
  border-bottom: 1px solid var(--line-i);
  font-size: .9rem;
}
.summary__row dt { color: var(--muted-ink); font-weight: 500; }
.summary__row dd { margin: 0; font-weight: 700; color: var(--pine); text-align: right; }

/* ============================================================
   ESITO
   ============================================================ */
.result { display: grid; justify-items: center; text-align: center; gap: .9rem; padding: 1rem 0; }
.result__icon {
  width: 64px;
  height: 64px;
  color: var(--poppy);
  animation: mp-pulse 1.8s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .result__icon { animation: none; }
}
@keyframes mp-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}
.result__title { font-family: var(--display); font-size: 1.7rem; font-weight: 500; color: var(--pine); }
.result__lead { color: var(--muted-ink); font-size: .95rem; max-width: 40ch; }
.result__delta { margin-top: .2rem; }
.result__actions { margin-top: .8rem; width: 100%; display: grid; gap: .6rem; }

/* ============================================================
   ICONE
   ============================================================ */
.ico { width: 1.25em; height: 1.25em; flex: none; color: currentColor; }
.ico--lg { width: 2.2rem; height: 2.2rem; }
.ico--sagoma { display: block; height: 160px; width: auto; margin: 0 auto; color: var(--pine); }

/* ============================================================
   NOTA DI SERVIZIO (passo iniziale)
   ============================================================ */
.inizio__nota {
  margin-top: 1.1rem;
  padding: .75rem .9rem;
  background: var(--linen);
  border-left: 3px solid var(--sage);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-size: .78rem;
}

/* ============================================================
   SAGOMA CORPO (illustrazione + testo, es. spiegazione misure)
   ============================================================ */
.misura-sagoma {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--mint);
  border-radius: var(--r);
}
@media (min-width: 480px) {
  .misura-sagoma { flex-direction: row; text-align: left; }
}

/* ============================================================
   CODICE PAZIENTE (esito nuovo paziente)
   ============================================================ */
.codice-box {
  display: grid;
  justify-items: center;
  gap: .6rem;
  padding: 1.1rem 1rem;
  background: var(--mint);
  border-radius: var(--r);
  text-align: center;
}
.codice-box__codice {
  font-family: var(--display);
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--pine);
}
.codice-box__link {
  width: 100%;
  font-size: .78rem;
  color: var(--muted-ink);
  overflow-wrap: anywhere;
}
.copy-ok {
  font-size: .78rem;
  font-weight: 600;
  color: #1f7a3a;
}

/* ============================================================
   STAMPA
   ============================================================ */
@media print {
  .app { background: var(--white); padding: 0; }
  .app__head, .metro, .step__actions, .app__foot { display: none !important; }
  .app__card { box-shadow: none; max-width: 100%; }
}

/* Riepilogo: testata di sezione con link "Modifica" */
.summary__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin: 1.1rem 0 .3rem; }
.summary__title { font-family: var(--display); font-size: 1.25rem; font-weight: 600; letter-spacing: -.01em; margin: 0; }
.summary__edit { background: none; border: 0; padding: 0; margin: 0; font: inherit; font-size: .84rem; font-weight: 600; color: var(--sage-deep); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; min-height: 32px; }
.summary__edit:hover { color: var(--pine); }
.summary__edit:focus-visible { outline: 2px solid var(--sage); outline-offset: 2px; border-radius: 4px; }

/* Valore degli stepper: peso maggiore perché l'"1" di Bodoni Moda resta leggibile */
.stepper__value { font-weight: 600; }
