@layer componenti {
/* Detail pass of the public site (SVIL-489, detail audit of December 2026). Loaded by the vetrina's App.razor after
   vetrina.css and hero.css, so it is the last word for the items below; the app does not load it.
   Each block names the audit items it closes (V-* page items, SYS-* systemic rules). */

/* ============================== SYS-01: one header height, every sticky element below it ==============================
   --header-h is the only source for the header height (64 phone/tablet, 72 from 1024). The older names used by the
   page sheets (--alto-testa, --hf-top) now read it, so nothing can drift. Every sticky element stops at
   --header-h + a step of the spacing scale, and the header is opaque once the page scrolls (no text shows through). */
/* opaque once scrolled (hf-solid) and on pages without a photo hero; over the hero it stays transparent (hero.css) */
html body header.top{height:var(--header-h)}
/* sul telefono il materiale della barra (trasparente, poi vetro dopo ~48 px) lo decide css/ios.css */
@media (min-width:1024px){html body header.top.hf-solid,html body:not(:has(.hf)) header.top{background:var(--sup)!important;-webkit-backdrop-filter:none;backdrop-filter:none}
html body header.top.hf-solid{border-bottom-color:var(--linea)}}
@media (min-width:1024px){
  /* V-HOME-03: the demo chat stops below the header */
  .c4-demo-w{top:max(calc(var(--header-h) + var(--s5,24px)),calc(50vh - 300px))}
  /* V-CF-01 / V-PRO-01: story text and scene stop below the header */
  .st{--st-top:max(calc(var(--header-h) + var(--s7,48px)),calc(50vh - 200px))}
  /* V-LEG-01 */
  .lg-lato{top:calc(var(--header-h) + var(--s5,24px));max-height:calc(100vh - var(--header-h) - var(--s7,48px))}
  .pg-ed .pg-sez>h2{top:calc(var(--header-h) + var(--s5,24px))}
  .pp-chiedi{top:calc(var(--header-h) + var(--s5,24px))}
}
@media (min-width:1100px){
  /* V-GUIDE-02 */
  .gp-st-sc{top:calc(var(--header-h) + var(--s6,32px))}
}
@media (max-width:1099.98px){
  .gp-st-js .gp-st-sc{top:calc(var(--header-h) + var(--s2,8px))}
}
/* V-CF-01: no blank frame between two chapters. The outgoing chapter no longer fades out while it is still on screen
   (that left a viewport of empty white); it scrolls away under the opaque header like any content. */
@supports (animation-timeline:view()){
  @media (prefers-reduced-motion:no-preference) and (min-width:1024px){
    html:not(.ridotto) .st-tx>*,html:not(.ridotto) .st-scena{animation:none}
    html:not(.ridotto) .st-tx{animation-range:cover 0% cover 18%}
  }
}

/* V-GUIDE-01 (P0): the progress segments and the price band belong to the sticky estimate card. They are drawn only
   inside the card, never over the page text that scrolls under it, and they take no pointer hits (decoration). The
   row of the factor being read keeps one line of height, so the card does not grow an empty band. */
.gp-st-bin,.gp-st-pr{pointer-events:none}
.gp-st-ui{position:relative;isolation:isolate;overflow:hidden;background:var(--sup)}
html[data-tema="scuro"] .gp-st-ui{background:var(--sup)}
/* V-GUIDE-03: the factors on the left sit closer together (each step at most ~40% of the viewport) */
@media (min-width:1100px){
  .gp-st-js [data-cap]{min-height:0;padding-bottom:var(--s6,var(--sp-8))}
  .gp-st-js p[data-cap]{padding-bottom:var(--s6,var(--sp-8))}
  .gp-st-js .gp-st-tx li[data-cap]{min-height:min(40vh,160px)}
}

/* ============================== hero captions (V-TRADE-01) ==============================
   The caption sits after the scrim in the markup (hero.css places it). On phones it moves to the left under the header
   so the face on the right stays clear, with a stronger ground under breadcrumb, title and count. */
@media (max-width:1023.98px){
  html body .hf.hf-inner > :is(.hx-dida,figcaption){top:calc(var(--hf-top) + 12px);right:auto;left:var(--m,20px);bottom:auto}
  html body .hf.hf-inner .hf-scrim{background:
    linear-gradient(180deg,rgba(var(--hf-navy),.62) 0,rgba(var(--hf-navy),0) 150px),
    linear-gradient(0deg,rgba(var(--hf-navy),.94) 0,rgba(var(--hf-navy),.86) 34%,rgba(var(--hf-navy),.45) 52%,rgba(var(--hf-navy),0) 66%)!important}
}

/* ============================== home ============================== */
/* V-HOME-04: the next section never paints over the call demo; the transcript rows outside the window are hidden
   by home.js, and the section starts on its own ground */
.hx-prezzi{position:relative;z-index:1}
/* V-HOME-05 (SYS-04): answer chips in an even grid, never one orphan on a second line */
.hx-tel-tasti{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--sp-2)}
.hx-tel-tasti span{text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hx-tel-tasti:has(>span:nth-child(3):last-child){grid-template-columns:repeat(3,minmax(0,1fr))}
@media (max-width:519.98px){.hx-tel-tasti:has(>span:nth-child(3):last-child){grid-template-columns:repeat(2,minmax(0,1fr))}
  .hx-tel-tasti:has(>span:nth-child(3):last-child)>span:last-child{grid-column:1 / -1}}
/* V-HOME-02: the caption of the trust photo goes under the photo on phones, and the faces sit below the top edge */
@media (max-width:767.98px){
  .hx-fiducia .hx-banda{display:flex;flex-direction:column}
  .hx-fiducia .hx-banda-foto img{object-position:50% 22%}
  .hx-fiducia .hx-banda>.hx-dida{position:static;align-self:flex-start;margin:var(--s3,var(--sp-3)) var(--m,var(--sp-5)) 0;transform:none}
  .hx-fiducia-in{margin-top:0}
}
/* V-HOME-01: on phones the demo shows composed (home4.js), and «Rivedi l'esempio» stays in the flow under it */
@media (max-width:1023.98px){
  .c4-rivedi{position:static;transform:none;margin:var(--s4,var(--sp-4)) auto 0;display:flex}
  .c4-rivedi[hidden]{display:none}
}

/* ============================== SYS-02: search field + «Parla», one unit (V-SERV-01, V-ERR-02) ==============================
   Same height (56), concentric radii: field pill 28 = submit circle 20 + 8 padding; the voice action is secondary
   (outlined), 12 px apart, and both stay inside the column at every width. */
.pg-azioni{display:flex;flex-direction:column;gap:var(--sp-3);width:100%;max-width:100%;min-width:0}
.pg-azioni .barra-w{flex:1 1 auto;min-width:0;width:100%}
.pg-azioni .barra,html[data-tema="scuro"] .pg-azioni .barra{height:56px;border-radius:var(--r-pill);padding:0 var(--sp-2) 0 var(--s4,var(--sp-4));box-sizing:border-box}
.pg-azioni .barra .invia,html[data-tema="scuro"] .pg-azioni .barra .invia{width:44px;height:44px;aspect-ratio:auto;border-radius:var(--r-pill);flex:none}
.pg-azioni .parla,html[data-tema="scuro"] .pg-azioni .parla{height:56px;border-radius:var(--r-pill);padding:0 var(--s5,var(--sp-6)) 0 var(--sp-2);gap:var(--sp-3);
  background:transparent;color:var(--ink);border:1px solid var(--linea-f);box-shadow:none;box-sizing:border-box;min-width:0;max-width:100%}
.pg-azioni .parla .mic,html[data-tema="scuro"] .pg-azioni .parla .mic{width:40px;height:40px;border-radius:var(--r-pill);background:var(--ink);color:var(--sup)}
.pg-azioni .parla b,html[data-tema="scuro"] .pg-azioni .parla b{color:var(--ink);font-size:var(--t-body);font-weight:600}
.pg-azioni .parla small,html[data-tema="scuro"] .pg-azioni .parla small{display:none}
.pg-azioni .parla:hover{background:color-mix(in srgb,var(--ink) 5%,transparent);border-color:var(--ink);opacity:1}
.pg-azioni .parla:focus-visible{outline:2px solid var(--ink);outline-offset:3px}
@media (min-width:768px){
  .pg-azioni{flex-direction:row;align-items:center}
  .pg-azioni .parla{flex:none;width:auto}
}

/* ============================== SYS-04: chip rows (V-AIUTO-01) ============================== */
nav.pg-indice:not(.pz-ind){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--s2,var(--sp-2))}
nav.pg-indice:not(.pz-ind) .pillola{justify-content:center;text-align:center;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media (min-width:1024px){nav.pg-indice:not(.pz-ind){grid-template-columns:repeat(2,minmax(0,1fr));max-width:520px}}

/* ============================== SYS-05: no widows (V-HOME-06, V-TRADE-04, V-TRADE-06, V-LEG-03) ============================== */
:is(h1,h2,h3,.hx-h2s,.pg-h2s,.pg-sotto,figcaption,.hx-sotto){text-wrap:balance}
:is(p,li,dd,blockquote):not(.hx-h2s):not(.pg-h2s):not(.pg-sotto):not(.hx-sotto){text-wrap:pretty}
.ms-pannello p.pg-sotto,.pg-punti li,.lg-corpo :is(p,li),.ct-reg li{text-wrap:pretty}
.hx-h2s{max-width:min(100%,60ch)}

/* ============================== SYS-07: service tile link stays inside the card (V-TRADE-03) ============================== */
.mc-foto{overflow:hidden;border-radius:inherit}
.mc-n{min-width:0}
.mc-n b,.mc-n small{min-width:0;max-width:100%}
.mc-n small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* ============================== 404 / 500 (V-ERR-01) ============================== */
@media (min-width:1024px){
  .nt-in{align-items:start}
  .nt-num{margin-top:calc(var(--s2,var(--sp-2)) * -1);line-height:.74}
  .nt-vie{gap:var(--s2,var(--sp-2)) var(--s6,var(--sp-8))}
  .nt-vie a .ico{margin-left:var(--sp-1)}
}

/* ============================== SYS-08: icon sizes and stroke ==============================
   Three sizes (16 inline/chevrons, 20 default, 24 feature tiles), one stroke (1.75, Lucide set). */
svg.ico{width:var(--icon-md);height:var(--icon-md);stroke-width:var(--icon-stroke)}
:is(.mc-l a,.jc-body,.hx-lnk,.pg-lnk,.hx-forbice-v,.hx-fatti,.hx-occhiello,.c4-tasti,.c4-et,.c4-dopo,.c4-rivedi,.cf-fatto,.e4-pausa,.hx-freccia,.pg-punti,.hx-punti,.hx-piano,.ct-ind,.lg-bozza,.pg-avv,.c4-ok) svg.ico{width:var(--icon-sm);height:var(--icon-sm)}
:is(.hx-ic,.pg-ic) svg.ico{width:var(--icon-lg);height:var(--icon-lg)}
:is(.menu-t,.menu-m a,.sc-ic,.hx-dock-p,.top .tema) svg.ico{width:var(--icon-md);height:var(--icon-md)}

/* ============================== SYS-09: button heights and radius ==============================
   One scale: sm 44 (header, chips; still a full touch target), md 48 (calls to action), lg 56 (search + voice).
   One radius on the public site: the pill. The sticky purchase bar keeps its concentric 12 inside the 20 bar. */
.tasto-s,.pillola,html[data-tema="scuro"] .pillola{height:var(--btn-sm);min-height:var(--btn-sm);border-radius:var(--btn-r)}
.tg,a.tg{height:var(--btn-md);border-radius:var(--btn-r)}
.pg-azioni .barra,.pg-azioni .parla{height:var(--btn-lg)}

}
