/*==================================================================
    hd3d-2026.css — design system for the 2026 redesign

    Loaded ONLY by base-2026.html.twig. It is deliberately NOT loaded
    next to bootstrap.min.css / custom.css: the redesign runs on a
    parallel shell so the legacy pages (login, profile, community, VR,
    support, Bolt pages) keep their Bootstrap markup untouched.

    Source of truth: the Claude Design project "Home Design 3D - New
    website". The artboards carry every style inline; this file is the
    conversion of those inline styles into components.

    Two things the artboards do NOT provide and that are authored here:
      - the responsive behaviour. The design exposes grid hooks
        (.hd-grid-4, .hd-two-col, ...) but ships no media query for
        them, so every collapse rule below is ours.
      - real focus states. A public site needs visible keyboard focus.

    Class prefix `hd-` so this can later be merged into a single
    stylesheet without colliding with custom.css.

    Fonts come from fonts.css (Sora + Instrument Serif, both self-hosted).
==================================================================*/

/*------------------ tokens ------------------*/
:root {
    --bg:      #F5F6F3;
    --surface: #FFFFFF;
    --ink:     #202622;
    --muted:   #5E665F;
    --line:    #DEE1DB;
    --accent:  #7DE85E;
    --accent2: #79D264;
    --deep:    #286038;
    --mint:    #E0FED9;
    --blue:    #4E8DF7;
    --dark:    #202622;

    /* the green used for inline accents inside headings */
    --leaf: #4BB849;
    /* --ink dimmed, for the hover state of the dark button */
    --ink-dim: #333B35;
    /* on --dark and --deep grounds */
    --on-dark-muted: #B9C2BB;
    --on-deep-muted: #CFE8CE;

    --shell:  1240px;
    --gutter: clamp(20px, 5vw, 64px);
    --ease:   cubic-bezier(.22, 1, .36, 1);
}

/*------------------ reset / base ------------------*/
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 110px; }

body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-main);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
    /* Il footer va spinto in fondo anche quando il contenuto e' piu' corto del viewport:
       senza, su una pagina breve (recupero password, ricerca senza risultati) il footer
       finisce a meta' schermo e sotto resta il fondo pagina scoperto. Equivalente delle
       classi `d-flex flex-column h-100` del guscio legacy.
       Nav, menu e loader sono position:fixed, quindi non entrano nel flusso flex. */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
main { flex: 1 0 auto; }

img, svg { max-width: 100%; display: block; }
a { color: var(--deep); text-decoration: none; }
a:hover { color: var(--accent2); }
::selection { background: var(--accent); color: var(--ink); }

/* Visible keyboard focus. The design has none; a public site needs it. */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid var(--accent2);
    outline-offset: 3px;
    border-radius: 6px;
}

/* `.sr-only` sta qui accanto perche' e' la classe di Bootstrap 3 e base-2026 non carica
   Bootstrap: Pagerfanta emette <span class="sr-only">(current)</span> dentro la pagina
   attiva, e senza queste regole quel testo — pensato per i lettori di schermo — si
   LEGGEVA nel pallino della pagina corrente. */
.hd-visually-hidden,
.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;
}

/*------------------ typography ------------------*/
/* The italic accent voice. Sora has no italic, hence Instrument Serif. */
/* Headings whose accent word arrives inside a translation or a CMS field carry it
   as <em> (translations) or <strong> (Bolt copy) — both map to the serif voice. */
.hd-serif,
.hd-hero-title strong,
.hd-section-title em,
.hd-section-title strong,
.hd-community__title em,
.hd-cta h2 em {
    font-family: var(--font-accent);
    font-weight: 400;
    font-style: italic;
    letter-spacing: .01em;
    font-size: 1.05em;
    color: var(--deep);
}

.hd-eyebrow {
    display: block;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--accent2);
}

.hd-section-title {
    font-size: clamp(30px, 4vw, 52px);
    line-height: 1.04;
    letter-spacing: -.03em;
    font-weight: 700;
    margin: 14px 0 0;
}

.hd-lead   { color: var(--muted); font-size: 16px; margin: 0; }
.hd-body   { color: var(--muted); font-size: 17px; line-height: 1.65; margin: 0 0 22px; }

/* Bolt fields arrive as HTML blocks (<p>, <h2>, <strong>). Neutralise the
   margins they bring so CMS copy sits on our vertical rhythm. */
.hd-cms > :first-child { margin-top: 0; }
.hd-cms > :last-child  { margin-bottom: 0; }
.hd-cms h1, .hd-cms h2, .hd-cms h3 { font: inherit; margin: 0; letter-spacing: inherit; }
.hd-cms p { margin: 0; }

/* Some Bolt fields hold a heading AND the paragraphs under it — jumbotronfooter is
   an <h2> followed by two <h3>s of body copy. So in a title slot, only the first
   child is a title; everything after it is body text. */
.hd-section-title.hd-cms > *:not(:first-child) {
    font-size: 17px;
    line-height: 1.65;
    font-weight: 400;
    letter-spacing: normal;
    color: var(--muted);
    margin-top: 18px;
}
/* ...and that field also carries an <h3><br></h3> spacer meant for the old layout. */
.hd-section-title.hd-cms > *:empty,
.hd-section-title.hd-cms > *:has(> br:only-child) { display: none; }

/*------------------ layout ------------------*/
.hd-shell   { max-width: var(--shell); margin: 0 auto; }
.hd-section { padding: clamp(80px, 11vw, 150px) var(--gutter); }
.hd-section--tight  { padding: clamp(70px, 9vw, 120px) var(--gutter); }
.hd-section--panel  { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
/* Meta' della luce sopra, per una sezione che segue subito una testata di pagina: sulla
   community il bottone Download finiva sotto la piega. */
.hd-section--lift { padding-top: clamp(36px, 4.5vw, 60px); }

.hd-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(32px, 5vw, 80px);
    align-items: center;
}
.hd-two-col--stats { grid-template-columns: .9fr 1.1fr; gap: clamp(40px, 6vw, 90px); }

.hd-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(16px, 2vw, 28px); }
.hd-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

.hd-head-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: clamp(40px, 5vw, 64px);
}
.hd-head-row__title { max-width: 640px; }
.hd-head-row__aside { color: var(--muted); font-size: 16px; max-width: 320px; margin: 0; }

.hd-head-centred {
    text-align: center;
    max-width: 640px;
    margin: 0 auto clamp(40px, 5vw, 60px);
}

/* Media frames. min-width:0 keeps images from blowing out a grid column. */
.hd-frame {
    position: relative;
    min-width: 0;
    border-radius: 26px;
    overflow: hidden;
    box-shadow: 0 40px 70px -44px rgba(32, 38, 34, .4);
}
.hd-frame > img,
.hd-frame > picture > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.hd-frame--5-4  { aspect-ratio: 5 / 4; }
.hd-frame--fill { align-self: stretch; border-radius: 24px; }

/* Media column. position:relative is load-bearing, not decoration: it is the
   containing block for .hd-blob--about, which is sized in percentages. Without it
   the blob resolved against the initial containing block — so it became 60% of the
   VIEWPORT and jumped to the bottom-left of the page.
   The reason that bug only showed up after scrolling: [data-reveal] carries
   transform: translateY(30px), and a non-none transform is itself a containing
   block, so the blob was contained correctly until the reveal fired and set
   transform: none — at which point it escaped. */
.hd-media { position: relative; min-width: 0; }

/* Organic mint blobs behind the media. */
.hd-blob { position: absolute; background: var(--mint); z-index: 0; pointer-events: none; }
.hd-blob--about {
    bottom: -8%; left: -8%; width: 60%; height: 60%;
    border-radius: 50% 50% 46% 54% / 56% 44% 56% 44%;
}
.hd-blob--hero {
    top: 8%; right: -6%;
    width: min(58vw, 760px); height: min(58vw, 760px);
    border-radius: 47% 53% 44% 56% / 55% 44% 56% 45%;
    filter: blur(6px);
    animation: blobFloat 14s ease-in-out infinite;
}

/*------------------ buttons ------------------*/
.hd-btn {
    display: inline-block;
    font-weight: 600;
    font-size: 16px;
    padding: 15px 28px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-family: inherit;
    cursor: pointer;
    text-align: center;
    transition: background .3s, box-shadow .3s, color .3s;
}
/* Hover dims the fill and nothing else. The design has the button drift toward the
   cursor instead; that was dropped on request. */
.hd-btn--primary { background: var(--accent); color: var(--ink); }
.hd-btn--primary:hover { background: var(--accent2); color: var(--ink); }
.hd-btn--ink { background: var(--ink); color: var(--bg); }
.hd-btn--ink:hover { background: var(--ink-dim); color: var(--bg); }
.hd-btn--lg {
    font-size: 18px;
    padding: 19px 38px;
    box-shadow: 0 16px 34px -16px rgba(125, 232, 94, .95);
}
.hd-btn--sm { font-size: 15px; padding: 11px 22px; box-shadow: 0 10px 24px -12px rgba(125, 232, 94, .9); }

/* Download buttons: icon + bold label, the team's web standard (as on sweethome3d.com).
   inline-flex so the icon centres on the text whatever the button's size; the icon is
   sized in em for the same reason. 700 rather than .hd-btn's 600: the standard asks for
   the label in bold. */
.hd-btn--dl {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5em;
    font-weight: 700;
}
.hd-btn--dl svg { width: 1.2em; height: 1.2em; flex: none; }

/*------------------ nav ------------------*/
.hd-nav {
    position: fixed;
    top: clamp(12px, 1.6vw, 22px);
    left: clamp(12px, 2.4vw, 32px);
    right: clamp(12px, 2.4vw, 32px);
    z-index: 900;
    padding: 12px clamp(14px, 1.4vw, 20px);
    /* Grid, not flex: `1fr auto 1fr` centres the link list against the nav itself,
       so it stays centred however wide the logo and the right-hand group happen to
       be. justify-content:space-between only balanced the gaps, which left the list
       visibly off-centre because the two sides are not the same width.
       Columns are assigned explicitly below — the nav has four children and the
       burger has to share column 3 with the right-hand group, never wrap to row 2. */
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 20px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    box-shadow: 0 20px 50px -26px rgba(32, 38, 34, .42);
    transition: box-shadow .4s ease;
}
.hd-nav.is-scrolled { box-shadow: 0 26px 60px -28px rgba(32, 38, 34, .5); }

.hd-nav__logo { grid-column: 1; justify-self: start; display: flex; align-items: center; color: var(--ink); padding-left: 8px; }
/* Sized by max-width/max-height, never by a fixed height: a fixed height with width:auto
   squashed the wordmark sideways whenever the grid column got narrower than the logo
   (measured 137x34 instead of 170x34 at 861px, worse on phones). With both maxima the
   image keeps its 5:1 ratio and simply gets smaller. */
.hd-nav__logo { min-width: 0; }
.hd-nav__logo img { width: auto; height: auto; max-width: 100%; max-height: 40px; }

.hd-nav__links { grid-column: 2; justify-self: center; display: flex; align-items: center; gap: 8px; list-style: none; margin: 0; padding: 0; }
.hd-nav__link {
    position: relative;
    display: block;
    color: var(--ink);
    font-size: 15px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 999px;
    transition: color .25s ease, background .25s ease;
}
.hd-nav__link:hover { color: var(--leaf); }
.hd-nav__link.is-current { background: var(--mint); color: var(--deep); }

.hd-nav__right { grid-column: 3; justify-self: end; display: flex; align-items: center; gap: 12px; }
.hd-nav__dl { white-space: nowrap; }

/* language menu */
.hd-lang { position: relative; }
.hd-lang__toggle {
    display: flex; align-items: center; gap: 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 10px 16px;
    background: var(--surface);
    font-family: inherit; font-size: 15px; font-weight: 600;
    color: var(--ink); cursor: pointer;
    transition: border-color .3s;
}
.hd-lang__toggle:hover { border-color: var(--accent2); }
.hd-lang__globe { width: 17px; height: 17px; flex: none; color: var(--muted); }
.hd-lang__caret { width: 12px; height: 12px; flex: none; color: var(--muted); transition: transform .3s; }
.hd-lang.is-open .hd-lang__caret { transform: rotate(180deg); }
.hd-lang__menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 190px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 6px;
    box-shadow: 0 26px 50px -26px rgba(32, 38, 34, .4);
    display: grid;
    gap: 1px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .25s, transform .25s, visibility .25s;
    z-index: 20;
    list-style: none;
    margin: 0;
}
.hd-lang.is-open .hd-lang__menu { opacity: 1; visibility: visible; transform: translateY(0); }
.hd-lang__opt {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    color: var(--ink); font-size: 14px; font-weight: 600;
    padding: 9px 12px; border-radius: 11px;
    transition: background .2s;
}
.hd-lang__opt:hover { background: var(--bg); color: var(--ink); }
.hd-lang__opt.is-current { background: var(--mint); color: var(--deep); }
.hd-lang__opt span { color: var(--muted); font-weight: 500; }

/* account. Not in the design — the community needs a way in. */
.hd-account { position: relative; }
.hd-account__toggle {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 44px; height: 44px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink);
    font-family: inherit; font-size: 15px; font-weight: 600;
    cursor: pointer;
    transition: border-color .3s, background .3s;
}
.hd-account__toggle:hover { border-color: var(--accent2); background: var(--mint); }
.hd-account__toggle svg { width: 19px; height: 19px; }
.hd-account__menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 200px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 6px;
    box-shadow: 0 26px 50px -26px rgba(32, 38, 34, .4);
    display: grid; gap: 1px;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .25s, transform .25s, visibility .25s;
    z-index: 20; list-style: none; margin: 0;
}
.hd-account.is-open .hd-account__menu { opacity: 1; visibility: visible; transform: translateY(0); }
.hd-account__opt {
    display: block; color: var(--ink); font-size: 14px; font-weight: 600;
    padding: 9px 12px; border-radius: 11px; transition: background .2s;
}
.hd-account__opt:hover { background: var(--bg); color: var(--ink); }
.hd-account__sep { height: 1px; background: var(--line); margin: 4px 6px; }

/* burger */
.hd-burger {
    grid-column: 3;
    justify-self: end;
    /* Nessun bordo e nessun fondo: sul pill nav bianco la cornice raddoppiava un contorno
       che c'e' gia'. Restano le tre barre. Il focus da tastiera non si perde — arriva dalla
       regola :focus-visible globale, non dal bordo. */
    border: 0;
    background: none;
    border-radius: 12px;
    width: 46px; height: 46px;
    display: flex; flex-direction: column; gap: 5px;
    align-items: center; justify-content: center;
    cursor: pointer;
}
.hd-burger span {
    width: 20px; height: 2px; background: var(--ink); display: block;
    transition: transform .35s, opacity .35s;
}
.hd-burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hd-burger.is-open span:nth-child(2) { opacity: 0; }
.hd-burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* full-screen mobile menu */
.hd-menu {
    position: fixed; inset: 0; z-index: 890;
    background: var(--bg);
    transform: translateY(-100%);
    transition: transform .55s cubic-bezier(.76, 0, .24, 1);
    display: flex; flex-direction: column; justify-content: center;
    padding: 0 8vw; gap: 2px;
    overflow-y: auto;
}
.hd-menu.is-open { transform: translateY(0); }
.hd-menu__link {
    /* Scalato di circa un quarto (era clamp(28px, 8vw, 52px), padding 8px): sul telefono il
       menu occupava tutto lo schermo con voci da 31px. */
    font-size: clamp(22px, 6vw, 36px);
    font-weight: 700; letter-spacing: -.03em;
    color: var(--ink); padding: 6px 0;
}
/* Su una riga sola: a 18px "Download Home Design 3D" non stava nei ~330px utili di un telefono
   da 390 e andava a capo. Il corpo scala con lo schermo e il padding laterale si stringe. */
.hd-menu__cta {
    margin-top: 18px;
    font-size: clamp(13px, 3.6vw, 15px);
    padding: 13px clamp(16px, 4.5vw, 22px);
    white-space: nowrap;
    width: -moz-fit-content; width: fit-content;
}
.hd-menu__sep { border: 0; border-top: 1px solid var(--line); width: 100%; margin: 18px 0 12px; }
.hd-menu__row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hd-menu__pill {
    border: 1px solid var(--line); border-radius: 999px;
    padding: 7px 14px; font-size: 14px; font-weight: 600; color: var(--ink);
}
.hd-menu__pill.is-current { background: var(--mint); color: var(--deep); }

/* Intro loader. Shown once per session: an inline script in the head sets
   .hd-intro-done on <html> before the first paint, so on later navigations the
   loader never appears. Hiding it with display:none also keeps it out of the
   view-transition snapshot — left visible in the initial HTML, every transition
   would crossfade into a full-screen loader. */
.hd-intro-done .hd-loader { display: none; }

.hd-loader {
    position: fixed; inset: 0; z-index: 1000;
    background: var(--bg);
    display: flex; align-items: center; justify-content: center;
    transition: opacity .7s ease;
}
.hd-loader__inner { display: flex; align-items: center; gap: 14px; }
.hd-loader__spinner {
    width: 20px; height: 20px;
    border: 2px solid var(--line);
    border-top-color: var(--accent2);
    border-radius: 50%;
    animation: spin .8s linear infinite;
}

/*------------------ page transitions ------------------*/
/* Cross-document view transitions, so navigating between the redesigned pages
   crossfades instead of flashing. Native: no library, and — unlike an XHR router
   such as Barba — the document really reloads, so every initialiser in
   hd3d-2026.js keeps running exactly once as written. initMarquee() in
   particular is not idempotent (it clones the track), and firebase-analytics.js
   reads its own <script> tag for the page name, so a router that never reloads
   either of them would break both.

   Both the outgoing and the incoming document have to opt in. Every redesigned
   page is on base-2026, so navigation inside that set transitions; navigating to
   a legacy page finds no opt-in on the receiving side and stays a plain
   navigation, which is correct.

   Only same-origin navigations qualify. In production the homepage is on en. and
   the community on www., so that particular jump will not animate — the
   valuable one, community → project, is entirely on www. and will. Locally the
   preview routes are host-agnostic, so Home → Community animates here and would
   not in production: do not read the local demo as proof. */
@view-transition { navigation: auto; }

/* position: fixed elements are the known trap: they appear in both snapshots and
   visibly slide. Naming .hd-nav makes the browser treat it as the same element
   across the two documents, so it stays put. The footer is not fixed, but naming
   it holds it still instead of crossfading it, which reads better. A name has to
   be unique in the document — both of these appear once. */
.hd-nav    { view-transition-name: hd-nav; }
.hd-footer { view-transition-name: hd-footer; }

/* The default is a 250ms linear crossfade; this puts it on the design's curve. */
::view-transition-old(root),
::view-transition-new(root) {
    animation-duration: .35s;
    animation-timing-function: var(--ease);
}

/*------------------ motion ------------------*/
@keyframes riseUp   { from { transform: translateY(118%); } to { transform: translateY(0); } }
@keyframes blobFloat{ 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(3%, -4%) scale(1.06); } }
@keyframes spin     { to { transform: rotate(360deg); } }
@keyframes marquee  { from { transform: translateX(0); } to { transform: translateX(-50%); } }

[data-reveal] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity .9s var(--ease), transform .9s var(--ease);
}
[data-reveal][data-shown] { opacity: 1; transform: none; }
/* Already on screen when the page loaded: show it at once, no fade. Animating in
   content that is above the fold means the page looks empty on arrival. The intro
   loader used to cover that; now that it only plays once per session, a page
   transition lands on an empty hero instead. Set by initReveals(). */
[data-reveal][data-shown="now"] { transition: none; }

[data-card] { transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
[data-card]:hover { transform: translateY(-8px); box-shadow: 0 15px 60px -34px rgba(32, 38, 34, .4); }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    /* The View Transitions API does not honour this preference on its own. */
    ::view-transition-group(*),
    ::view-transition-old(*),
    ::view-transition-new(*) { animation: none !important; }
    [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
    [data-heroline] { animation: none !important; }
    .hd-marquee__track { animation: none !important; }
    .hd-blob--hero { animation: none !important; }
    .hd-loader { display: none !important; }
}

/*------------------ hero ------------------*/
/* Centrata in verticale nello spazio SOTTO la nav fluttuante: il padding in alto e' solo la
   luce per la nav (~92px), quello in basso il suo specchio. Prima erano 190px + 100px di
   margine sulla griglia contro 80px sotto, e il blocco cadeva nella meta' bassa dello schermo. */
.hd-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px var(--gutter) 28px;
    overflow: hidden;
}
.hd-hero__grid {
    position: relative; z-index: 2;
    width: 100%; max-width: var(--shell);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: clamp(24px, 4vw, 64px);
    align-items: center;
}
/* The design's hero title is a 45-character phrase at up to 86px. Bolt's
   jumbotrontitle is a full sentence — 100 characters today — and at 86px that is
   683px of headline, which swallows the hero. Measured: 52px keeps the hero at its
   100vh floor and still reads as a headline. Raise this if the CMS copy is ever
   shortened to the length the design assumed. */
.hd-hero-title {
    font-size: clamp(30px, 3.9vw, 52px);
    line-height: 1.04;
    letter-spacing: -.03em;
    font-weight: 700;
    margin: 0 0 26px;
}
/* The design animates the title line by line. Bolt delivers it as one HTML
   block, so the whole title rises as a unit instead. */
.hd-hero-title[data-heroline] {
    display: block;
    animation: riseUp .95s var(--ease) both;
    /* Timed to clear as the intro loader fades. Which means it also holds the
       title invisible for 1.45s — fine behind the loader, but on a later
       navigation it is 1.45s of blank hero. So it plays only on the first page
       of a session, the one the loader opens; after that the page transition is
       the entrance and the title is simply there. */
    animation-delay: 1.45s;
}
.hd-intro-done .hd-hero-title[data-heroline] { animation: none; }
.hd-hero-title strong { font-weight: 400; color: var(--leaf); }

/* Occhiello col nome del prodotto: l'H1 resta corto e descrittivo. */
.hd-hero__eyebrow { margin-bottom: 16px; }
.hd-hero__sub {
    font-size: clamp(16px, 1.35vw, 19px);
    line-height: 1.6;
    color: var(--muted);
    max-width: 480px;
    margin: 0 0 34px;
}
.hd-hero__cta { display: flex; flex-wrap: wrap; gap: 14px; }
.hd-hero__media { position: relative; min-width: 0; }
/* cover, as the design has it: the hero art is a landscape render dropped into a
   square frame, so it gets a centred crop. The mint ground stays underneath — it is
   what shows through if the CMS field is pointed back at one of the circular
   poster PNGs, which are square with transparent corners. */
.hd-hero__frame {
    position: relative;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 50px 90px -50px rgba(32, 38, 34, .5);
    aspect-ratio: 1 / 1;
    background: var(--mint);
}
.hd-hero__frame img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}

/*------------------ hero on a dark ground ------------------*/
/* The home's hero (.hd-hero) on --dark, for a page whose art is a night render (the VR
   page). Same grid, centring and responsive rules; only the colours change, from the
   tokens, so a theme recolours it like everything else. */
.hd-hero--dark { background: var(--dark); color: var(--bg); }
.hd-hero--dark .hd-eyebrow { color: var(--accent); }
.hd-hero--dark .hd-hero-title { color: var(--bg); }
.hd-hero--dark .hd-hero-title strong,
.hd-hero--dark .hd-hero-title em { color: var(--accent); }
.hd-hero--dark .hd-hero__sub { color: var(--on-dark-muted); }

/*------------------ VR theme ------------------*/
/* index-VR-2026 puts hd-theme-vr on <body>: the same components in the palette of the
   legacy /vr page (custom-VR.css) — navy #030B40, electric violet rgb(82,0,209), cyan
   #17EAF0 (its Download button), magenta #E717AC — instead of the site green. Tokens
   first, so every component follows; then the few greens the stylesheet hard-codes.
   Nav and footer follow too: the whole page reads as the VR product. The HD3D logo keeps
   its own green, it is the brand. */
.hd-theme-vr {
    --bg:      #F4F5FB;
    --line:    #DDE0EE;
    --accent:  #17EAF0;                /* buttons, accent words on dark, stars */
    --accent2: #5200D1;                /* eyebrows, ticks, step tiles */
    --deep:    #2A0E8F;                /* accent words on light, the end band */
    --mint:    #ECEAFF;                /* soft fills: ticks, current nav item */
    --dark:    #030B40;                /* hero band, footer */
    --leaf:    #5200D1;
    --on-dark-muted: #B4BCE8;
    --on-deep-muted: #D3CBFF;
    background: var(--bg);
}
/* Cyan buttons keep dark text; hover darkens the cyan instead of turning violet (the site
   hover uses --accent2, which here is too dark under --ink text). */
.hd-theme-vr .hd-btn--primary:hover { background: #13DAE0; color: var(--ink); }
.hd-theme-vr .hd-btn--lg { box-shadow: 0 16px 34px -16px rgba(23, 234, 240, .8); }
.hd-theme-vr .hd-btn--sm { box-shadow: 0 10px 24px -12px rgba(23, 234, 240, .75); }
.hd-theme-vr .hd-cta__blob { background: rgba(231, 23, 172, .22); }
/* The legacy hero glow: violet and magenta light on navy. */
.hd-theme-vr .hd-hero--dark {
    background:
        radial-gradient(60% 60% at 10% 15%, rgba(82, 0, 209, .55), transparent 70%),
        radial-gradient(45% 50% at 92% 30%, rgba(231, 23, 172, .30), transparent 70%),
        var(--dark);
}
.hd-theme-vr .hd-hero--dark .hd-hero__frame { background: #020629; box-shadow: 0 50px 90px -40px rgba(82, 0, 209, .7); }


/* The VR logo is nearly square (the wordmark is 5:1): a little taller, still inside the pill.
   The nav itself stays the site's white one — the colour logo is made for a light ground. */
.hd-theme-vr .hd-nav__logo img { max-height: 44px; }

/* A video in a media frame: 16:9, the iframe filling it. */
.hd-frame--video { aspect-ratio: 16 / 9; background: var(--dark); }
/* Video click-to-load: copertina + pulsante finche' non si clicca (hd3d-2026.js). */
.hd-yt { position: absolute; inset: 0; display: block; cursor: pointer; }
.hd-yt img { width: 100%; height: 100%; object-fit: cover; }
.hd-yt__play {
    position: absolute; left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    opacity: .9;
    transition: opacity .2s var(--ease), transform .2s var(--ease);
}
.hd-yt:hover .hd-yt__play, .hd-yt:focus-visible .hd-yt__play { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }
.hd-frame--video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/*------------------ about ------------------*/
.hd-checklist { list-style: none; padding: 0; margin: 0 0 30px; display: grid; gap: 14px; }
.hd-checklist li { display: flex; gap: 12px; align-items: flex-start; font-size: 16px; color: var(--ink); }
.hd-checklist__tick {
    flex: none;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: var(--mint);
    color: var(--deep);
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700;
    margin-top: 1px;
}

/*------------------ how it works ------------------*/
.hd-step {
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 30px 26px;
    background: var(--bg);
}
.hd-step__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 26px; }
.hd-step__num {
    font-family: var(--font-accent);
    font-style: italic; font-weight: 400;
    font-size: 44px;
    color: var(--accent2);
    line-height: 1;
}
/* The design puts an emoji on a mint tile. We use the brand's own pictograms
   instead — but only the white cut is on-palette: the `-vert` files are the old
   teal #49C699, which clashes with the new greens. So: white picto, green tile. */
.hd-step__icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    background: var(--accent2);
    display: flex; align-items: center; justify-content: center;
    padding: 9px;
}
.hd-step__icon img { width: 100%; height: 100%; object-fit: contain; }
.hd-step h3 { font-size: 20px; font-weight: 700; letter-spacing: -.02em; margin: 0 0 10px; }
.hd-step p  { font-size: 15px; line-height: 1.6; color: var(--muted); margin: 0; }

/*------------------ stats ------------------*/
.hd-stats { display: grid; gap: 26px; }
.hd-stat { border-bottom: 1px solid var(--line); padding-bottom: 22px; }
.hd-stat:last-child { border-bottom: 0; padding-bottom: 0; }
.hd-stat__row { display: flex; align-items: baseline; gap: 4px; }
.hd-stat__num {
    font-size: clamp(48px, 7vw, 84px);
    font-weight: 800;
    letter-spacing: -.04em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.hd-stat__label { color: var(--muted); font-size: 16px; margin-top: 6px; }

/*------------------ community (dark) ------------------*/
.hd-community {
    padding: clamp(80px, 11vw, 150px) 0;
    background: var(--dark);
    color: var(--bg);
    overflow: hidden;
}
.hd-community__inner {
    max-width: var(--shell);
    margin: 0 auto;
    padding: 0 var(--gutter);
    text-align: center;
}
.hd-community .hd-eyebrow { color: var(--accent); }
.hd-community__title {
    font-size: clamp(32px, 5vw, 64px);
    line-height: 1.03;
    letter-spacing: -.035em;
    font-weight: 700;
    margin: 16px auto 22px;
    max-width: 900px;
    color: var(--bg);
}
.hd-community__title .hd-serif,
.hd-community__title em { color: var(--accent); font-size: 1.04em; }
.hd-community__lead {
    color: var(--on-dark-muted);
    font-size: 17px; line-height: 1.6;
    max-width: 560px;
    margin: 0 auto 34px;
}
.hd-community__cta {
    display: flex; flex-wrap: wrap; gap: 14px; justify-content: center;
    margin-bottom: clamp(48px, 6vw, 72px);
}

/* Marquee. Full-bleed out of the centred shell. The track holds the same
   set of tiles twice, so the -50% translate loops seamlessly. */
.hd-marquee { position: relative; overflow: hidden; width: 100vw; margin-left: calc(50% - 50vw); }
.hd-marquee__track { display: flex; width: max-content; gap: 20px; animation: marquee 40s linear infinite; }
.hd-marquee:hover .hd-marquee__track { animation-play-state: paused; }
.hd-marquee__item {
    flex: none;
    width: 300px;
    aspect-ratio: 4 / 3;
    border-radius: 18px;
    overflow: hidden;
    background: #2c332e;
}
.hd-marquee__item img { width: 100%; height: 100%; object-fit: cover; }
/* <picture> attorno all'img (WebP con ripiego JPEG): senza box suo, l'img resta figlia
   diretta del riquadro e i suoi 100% si calcolano su quello. */
.hd-marquee__item picture { display: contents; }

/*------------------ reviews ------------------*/
.hd-review {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 32px;
}
.hd-review__rating { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.hd-review__stars { color: var(--accent); font-size: 19px; letter-spacing: 3px; }
.hd-review__stars .is-empty { color: var(--line); }
.hd-review__score { font-weight: 700; font-size: 15px; color: var(--deep); }
.hd-review h3 { font-size: 19px; font-weight: 700; letter-spacing: -.01em; margin: 0 0 10px; }
.hd-review__body { color: var(--muted); font-size: 15px; line-height: 1.65; margin: 0 0 22px; }
.hd-review__author { display: flex; align-items: center; gap: 12px; }
.hd-review__avatar {
    width: 42px; height: 42px;
    border-radius: 50%;
    background: var(--mint);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; color: var(--deep);
    text-transform: uppercase;
}
.hd-review__name { font-weight: 600; font-size: 15px; }

/*------------------ final CTA ------------------*/
.hd-cta-section { padding: clamp(70px, 9vw, 120px); background: var(--surface); }
.hd-cta {
    position: relative;
    border-radius: 36px;
    overflow: hidden;
    background: var(--deep);
    color: var(--bg);
    padding: clamp(44px, 6vw, 80px);
    display: grid;
    grid-template-columns: .78fr 1.22fr;
    gap: 56px;
    align-items: center;
}
.hd-cta__blob {
    position: absolute;
    top: -30%; right: -10%;
    width: 60%; height: 150%;
    background: rgba(125, 232, 94, .16);
    border-radius: 50%;
    filter: blur(20px);
    pointer-events: none;
}
.hd-cta__copy { position: relative; z-index: 1; }
.hd-cta h2 {
    font-size: clamp(32px, 4.6vw, 58px);
    line-height: 1.02;
    letter-spacing: -.035em;
    font-weight: 700;
    margin: 0 0 20px;
    color: var(--bg);
}
.hd-cta h2 .hd-serif,
.hd-cta h2 em { color: var(--accent); }
.hd-cta p { color: var(--on-deep-muted); font-size: 17px; line-height: 1.6; max-width: 440px; margin: 0 0 30px; }
.hd-cta__media { position: relative; z-index: 1; min-width: 0; }
.hd-cta__media > div { position: relative; aspect-ratio: 16 / 11; }
.hd-cta__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }

/* The same CTA as a band, for the end of every landing page (_partials/download-cta-2026):
   copy on the left, button on the right, no image. Lighter than the home's final CTA
   because it sits under a page's own content rather than closing a long scroll. Stacks
   with the ≤1080px .hd-cta rule further down, which already drops it to one column. */
.hd-cta-section--band { padding-block: clamp(40px, 6vw, 80px); }
.hd-cta--band { grid-template-columns: 1fr auto; align-items: center; }
.hd-cta--band h2 { font-size: clamp(26px, 3.2vw, 42px); margin-bottom: 12px; }
.hd-cta--band p { margin-bottom: 0; }
.hd-cta--band > .hd-btn { position: relative; z-index: 1; justify-self: start; }

/* Telefoni: il Download della card su una riga. Con 44px di padding per lato a "Download Home
   Design 3D" restavano ~260px e andava a capo; la card stringe il padding e il bottone il
   corpo. Sotto i 360px il testo (in FR e' piu' lungo) non ci sta comunque: li' resta libero di
   andare a capo invece di uscire dalla card. */
@media (max-width: 620px) {
    .hd-cta { padding: 36px 22px; }
    .hd-cta .hd-btn--dl { font-size: clamp(14px, 3.9vw, 16px); padding: 15px clamp(14px, 4.5vw, 24px); }
}
@media (min-width: 360px) and (max-width: 620px) {
    .hd-cta .hd-btn--dl { white-space: nowrap; }
}

/*------------------ app banner (phones) ------------------*/
/* _partials/mobile-app-banner-2026: a card anchored to the bottom of the screen, not a
   modal — no backdrop, the page behind stays scrollable and clickable. Above the nav
   (900) and the menu (890), below the intro loader (1000). Slides in from below.
   Inside, the Sweet Home 3D layout: one centred column, icon / title / message / the
   visitor's store badge, with the X as the only exit. */
.hd-appbanner {
    position: fixed;
    left: 12px; right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    z-index: 950;
    padding: 26px 22px 22px;
    background: var(--surface);
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: 0 24px 60px -18px rgba(32, 38, 34, .45);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transform: translateY(calc(100% + 40px));
    transition: transform .5s var(--ease);
}
.hd-appbanner.is-open { transform: none; }
.hd-appbanner[hidden] { display: none; }
.hd-appbanner__close {
    position: absolute; top: 8px; right: 8px;
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    border: 0; background: none; color: var(--muted); cursor: pointer;
}
.hd-appbanner__close svg { width: 20px; height: 20px; }
.hd-appbanner__icon { width: 64px; height: 64px; border-radius: 14px; margin-bottom: 14px; }
.hd-appbanner__title { font-size: 20px; font-weight: 700; line-height: 1.25; letter-spacing: -.01em; margin: 0 24px 6px; }
.hd-appbanner__lead { font-size: 15px; line-height: 1.5; color: var(--muted); margin: 0 0 18px; max-width: 34ch; }
/* Both official badges at the same height. Apple ships an SVG, Google a 3x-trimmed PNG,
   so either stays sharp on a 3x phone screen. */
.hd-appbanner__store { display: block; line-height: 0; }
.hd-appbanner__store[hidden] { display: none; }
.hd-appbanner__store img { height: 50px; width: auto; display: block; }
@media (prefers-reduced-motion: reduce) {
    .hd-appbanner { transition: none; }
}

/*------------------ footer ------------------*/
.hd-footer {
    background: var(--dark);
    color: var(--bg);
    padding: clamp(60px, 8vw, 90px) var(--gutter) 34px;
}
.hd-footer__grid {
    max-width: var(--shell);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    gap: 40px;
}
.hd-footer__logo { display: inline-flex; align-items: center; margin-bottom: 18px; }
.hd-footer__logo img { height: 30px; width: auto; }
.hd-footer__blurb { color: var(--on-dark-muted); font-size: 15px; line-height: 1.6; max-width: 280px; margin: 0 0 20px; }
.hd-footer__social { display: flex; gap: 12px; list-style: none; padding: 0; margin: 0; }
.hd-footer__social a {
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .2);
    display: flex; align-items: center; justify-content: center;
    transition: background .3s, border-color .3s;
}
.hd-footer__social a:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .45); }
.hd-footer__social img { width: 18px; height: 18px; }
.hd-footer__title {
    font-size: 14px; font-weight: 700; letter-spacing: .04em;
    margin: 0 0 16px; color: var(--bg);
}
.hd-footer__links { list-style: none; padding: 0; margin: 0; display: grid; gap: 11px; }
.hd-footer__links a { color: var(--on-dark-muted); font-size: 14px; transition: color .25s; }
.hd-footer__links a:hover { color: var(--bg); }
.hd-footer__bottom {
    max-width: var(--shell);
    margin: 38px auto 0;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, .12);
    display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
    color: #8A968C; font-size: 13px;
}
.hd-footer__bottom a { color: #8A968C; }
.hd-footer__bottom a:hover { color: var(--bg); }
.hd-footer__legal { display: flex; gap: 22px; flex-wrap: wrap; }

/*------------------ page header ------------------*/
/* The Community, Offers and Support artboards all open with the same block:
   eyebrow, big title, lead. One component for all three. */
.hd-page-head { padding: clamp(150px, 18vh, 210px) var(--gutter) clamp(40px, 5vw, 60px); }
.hd-page-title {
    font-size: clamp(34px, 5.4vw, 72px);
    line-height: 1.0;
    letter-spacing: -.035em;
    font-weight: 700;
    margin: 14px 0 20px;
    max-width: 20ch;
}
.hd-page-title strong, .hd-page-title em {
    font-family: var(--font-accent);
    font-weight: 400; font-style: italic;
    font-size: 1.05em;
    letter-spacing: .01em;
    color: var(--deep);
}
.hd-page-lead {
    font-size: clamp(16px, 1.35vw, 19px);
    line-height: 1.6;
    color: var(--muted);
    max-width: 560px;
    margin: 0;
}

/*------------------ project card ------------------*/
/* Shared by the community grid, the search results and (later) the user space.
   The legacy markup for this card is duplicated six times across those pages;
   this is one partial. */
.hd-card {
    display: block;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 22px;
    overflow: hidden;
    color: var(--ink);
}
.hd-card:hover { color: var(--ink); }
.hd-card__media { aspect-ratio: 4 / 3; overflow: hidden; position: relative; }
.hd-card__media img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .8s var(--ease);
}
.hd-card:hover .hd-card__media img { transform: scale(1.08); }
.hd-card__body { padding: 18px 20px; }
.hd-card__body h3 {
    font-size: 17px; font-weight: 700; letter-spacing: -.01em;
    margin: 0 0 12px;
    overflow-wrap: anywhere;
}
.hd-card__stats { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.hd-stat-pair { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.hd-stat-pair svg { width: 17px; height: 17px; color: var(--ink); flex: none; }
.hd-stat-pair b { font-size: 15px; font-weight: 700; color: var(--deep); font-variant-numeric: tabular-nums; }

/* Official-tag badge. tagsOfficial is administered in HD3DM, so a project can
   carry BestOfTheWeek or Ambassador and the grid has to show it. */
.hd-card__badge {
    position: absolute; top: 12px; left: 12px; z-index: 1;
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--surface);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 12px; font-weight: 700;
    color: var(--deep);
    box-shadow: 0 10px 24px -14px rgba(32, 38, 34, .5);
}

/*------------------ search + sort controls ------------------*/
.hd-controls {
    display: flex; flex-wrap: wrap; gap: 14px;
    align-items: center; justify-content: space-between;
    max-width: 820px;
    margin: 0 auto 34px;
}
.hd-controls__search { position: relative; flex: 1 1 320px; }
.hd-controls__search svg {
    position: absolute; left: 18px; top: 50%;
    transform: translateY(-50%);
    width: 18px; height: 18px;
    color: var(--muted);
    pointer-events: none;
}
.hd-field {
    width: 100%; box-sizing: border-box;
    border: 1px solid var(--line);
    background: var(--bg);
    border-radius: 999px;
    padding: 14px 20px 14px 46px;
    font-family: inherit; font-size: 15px; color: var(--ink);
    outline: none;
    transition: border-color .25s;
}
.hd-field:focus { border-color: var(--accent2); }
.hd-controls__sort { position: relative; flex: 0 0 auto; }
.hd-select {
    appearance: none; -webkit-appearance: none;
    border: 1px solid var(--line);
    background: var(--bg);
    border-radius: 999px;
    padding: 14px 42px 14px 20px;
    font-family: inherit; font-size: 15px; font-weight: 600;
    color: var(--ink); cursor: pointer; outline: none;
    transition: border-color .25s;
}
.hd-select:focus { border-color: var(--accent2); }
.hd-controls__caret {
    position: absolute; right: 16px; top: 50%;
    transform: translateY(-50%);
    width: 12px; height: 12px;
    color: var(--muted);
    pointer-events: none;
}

/* Tag chips. Not in the design, kept because BestOfTheWeek and Ambassador are
   the only route to the curated projects and HD3DM administers them. */
.hd-chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 0 auto 34px; }
.hd-chip {
    display: inline-flex; align-items: center; gap: 8px;
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: 999px;
    padding: 10px 18px;
    font-size: 14px; font-weight: 600;
    color: var(--ink);
    transition: background .25s, border-color .25s, color .25s;
}
.hd-chip:hover { background: var(--mint); border-color: var(--accent2); color: var(--deep); }
.hd-chip.is-current { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.hd-chip svg { width: 16px; height: 16px; flex: none; }

/*------------------ featured strip ------------------*/
/* The MEA campaign — a curated set administered in HD3DM. The artboard has no
   place for it, so rather than invent a component it reuses the card in the
   design's own drag-scroll row. */
/* The bottom margin is trimmed against the row's own padding below, so the
   rhythm stays what it was before the padding was added. */
.hd-featured { margin-bottom: clamp(34px, 4.6vw, 58px); }
.hd-featured__head {
    display: flex; align-items: baseline; gap: 12px;
    margin-bottom: 18px;
}
.hd-featured__row {
    display: flex; gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    /* Room for the hover state. overflow-x: auto makes the vertical axis clip
       too — per spec an axis cannot stay `visible` while the other one is not —
       so without this the card's 8px lift is cut off at the top and its shadow
       at the bottom.

       The numbers come from [data-card]:hover, 0 15px 60px -34px: the shadow's
       bottom edge sits Oy + blur/2 + spread = 11px below the box, and its top
       edge Oy - spread - blur/2 = 19px *below* the box top, so nothing overflows
       upward. 8px of that 11 is absorbed by the lift. Horizontally the extent is
       negative (blur/2 = 30 against a -34 spread), and side padding would push
       the first card out of line with the grid underneath — so vertical only.
       Retune these if that shadow changes. */
    padding: 10px 0 12px;
    cursor: grab;
    scrollbar-width: none;
}
.hd-featured__row::-webkit-scrollbar { display: none; }
.hd-featured__row.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.hd-featured__row > * { flex: 0 0 300px; scroll-snap-align: start; }

/*------------------ pagination ------------------*/
/* Pagerfanta emits Bootstrap 3 markup (TwitterBootstrap3View), so these rules
   dress .pagination/.disabled/.active rather than classes of our own. */
.hd-pager { display: flex; justify-content: center; margin-top: clamp(40px, 5vw, 60px); }
.hd-pager .pagination {
    display: flex; flex-wrap: wrap; gap: 6px;
    list-style: none; padding: 0; margin: 0;
    align-items: center;
}
.hd-pager .pagination li > * {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 42px; height: 42px; padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink);
    font-size: 15px; font-weight: 600;
    transition: background .25s, border-color .25s, color .25s;
}
.hd-pager .pagination li > a:hover { background: var(--mint); border-color: var(--accent2); color: var(--deep); }
.hd-pager .pagination li.active > * { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.hd-pager .pagination li.disabled > * { opacity: .4; pointer-events: none; }

/* Le frecce prev/next arrivano dal controller come <i class="fa-solid fa-chevron-left">,
   cioe' Font Awesome — che base-2026 non carica, quindi erano due pallini VUOTI.
   Si disegnano qui con due bordi invece di toccare il controller: la pagina attuale ha
   Font Awesome e la' quelle icone funzionano, e non va rotta per aggiustare questa. */
.hd-pager .pagination i[class*="fa-chevron"] {
    display: block;
    width: 8px; height: 8px;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
}
.hd-pager .pagination i[class*="fa-chevron-right"] { transform: rotate(45deg);  margin-left: -2px; }
.hd-pager .pagination i[class*="fa-chevron-left"]  { transform: rotate(-135deg); margin-right: -2px; }

/*------------------ project detail ------------------*/
.hd-pd { padding: clamp(140px, 16vh, 190px) var(--gutter) clamp(30px, 4vw, 50px); }

.hd-pd-back {
    display: inline-flex; align-items: center; gap: 8px;
    color: var(--muted); font-size: 15px; font-weight: 600;
    margin-bottom: 24px;
}
.hd-pd-back:hover { color: var(--deep); }
.hd-pd-back svg { width: 18px; height: 18px; }

.hd-pd-layout {
    display: grid;
    grid-template-columns: 1.55fr .85fr;
    gap: clamp(30px, 4vw, 56px);
    align-items: start;
}

/* Gallery. The main frame is a fixed ratio so switching thumbnails never moves
   the page; the old page recomputed positions in pixels instead. */
.hd-pd-main {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 40px 70px -44px rgba(32, 38, 34, .4);
    aspect-ratio: 16 / 10;
    background: var(--mint);
}
.hd-pd-main img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}
/* Sketchfab ships its own chrome, so the embed fills the frame as-is. */
.hd-pd-main--embed { background: var(--dark); }
.hd-pd-main--embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.hd-pd-thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 16px;
}
.hd-pd-thumb {
    border: 2px solid transparent;
    border-radius: 12px;
    overflow: hidden;
    padding: 0;
    background: none;
    cursor: pointer;
    aspect-ratio: 4 / 3;
    position: relative;
    transition: border-color .25s;
}
.hd-pd-thumb.is-active { border-color: var(--accent2); }
.hd-pd-thumb:hover { border-color: var(--line); }
.hd-pd-thumb.is-active:hover { border-color: var(--accent2); }
.hd-pd-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }

.hd-pd-description { margin-top: clamp(28px, 4vw, 44px); }
.hd-pd-description p { color: var(--muted); font-size: 16px; line-height: 1.7; margin: 0; white-space: pre-line; }

/* Aside. Sticky so the actions stay reachable while the gallery is read. */
.hd-pd-aside { position: sticky; top: 110px; }
.hd-pd-title {
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.03;
    letter-spacing: -.03em;
    font-weight: 700;
    margin: 12px 0 20px;
    overflow-wrap: anywhere;
}

.hd-pd-actions { display: flex; gap: 12px; margin-bottom: 22px; flex-wrap: wrap; }
.hd-pd-pill {
    display: inline-flex; align-items: center; gap: 9px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink);
    font-family: inherit; font-weight: 700; font-size: 15px;
    padding: 12px 20px;
    border-radius: 999px;
    cursor: pointer;
    transition: background .25s, border-color .25s, color .25s;
}
.hd-pd-pill svg { width: 18px; height: 18px; flex: none; }
.hd-pd-pill:hover { border-color: var(--accent2); }
.hd-pd-pill.is-on { background: var(--mint); border-color: var(--accent2); color: var(--deep); }
.hd-pd-pill[disabled] { opacity: .6; cursor: default; }

.hd-pd-download { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; margin-bottom: 22px; }
.hd-pd-download span { opacity: .7; font-weight: 600; }

.hd-pd-meta {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 22px;
    display: grid;
    gap: 14px;
}
.hd-pd-meta__row { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); }
.hd-pd-meta__row svg { width: 18px; height: 18px; flex: none; color: var(--accent2); }
.hd-pd-meta__row strong { color: var(--ink); font-weight: 700; }
.hd-pd-meta__row a { color: var(--accent2); font-weight: 600; }

.hd-pd-label {
    font-size: 13px; font-weight: 700; letter-spacing: .12em;
    text-transform: uppercase; color: var(--muted);
    margin: 0 0 12px;
}
.hd-pd-block { margin-bottom: 22px; }
.hd-pd-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.hd-pd-tags .hd-chip { font-size: 13px; padding: 8px 15px; }

.hd-pd-share { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.hd-pd-share .hd-pd-label { margin: 0; }
.hd-pd-share__links { display: flex; gap: 10px; }
.hd-pd-share__links a {
    width: 38px; height: 38px;
    border-radius: 50%;
    border: 1px solid var(--line);
    display: flex; align-items: center; justify-content: center;
    transition: background .25s, border-color .25s;
}
.hd-pd-share__links a:hover { background: var(--mint); border-color: var(--accent2); }
/* The social files are a single colour baked in as fill:white, which is right on
   the dark footer and invisible here. Masking paints currentColor through the
   glyph's shape instead, so one file serves both grounds and there is no dark
   duplicate of every brand mark to keep in sync. */
.hd-pd-share__icon {
    width: 15px; height: 15px;
    background: currentColor;
    -webkit-mask: var(--icon) center / contain no-repeat;
    mask: var(--icon) center / contain no-repeat;
}

.hd-pd-owner { display: flex; gap: 8px; margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line); }
.hd-chip--danger { cursor: pointer; font-family: inherit; }
.hd-chip--danger:hover { background: #fdecec; border-color: #e0a2a2; color: #a33; }

/*==================================================================
    Responsive. Authored here — the artboards carry no media query
    for any of the grids, only the 860px desktop/mobile nav switch.
==================================================================*/

/* The pill nav runs out of room well before 860px: 4 links, the language
   menu, the account button and the Download CTA. Tighten, then drop the
   language label to just the globe, before the burger takes over. */
@media (max-width: 1120px) {
    .hd-nav__link { padding: 8px 11px; font-size: 14px; }
    .hd-nav__right { gap: 8px; }
    .hd-nav__logo img { max-height: 34px; }
}
@media (max-width: 980px) {
    /* Drop the globe, keep the locale label. Hiding every span in here also hid the
       "EN"/"FR" text and left a button with nothing but a caret in it. */
    .hd-lang__globe { display: none; }
    .hd-lang__toggle { padding: 10px 14px; }
    .hd-btn--sm { padding: 11px 16px; }
}

@media (max-width: 1080px) {
    .hd-grid-4 { grid-template-columns: repeat(2, 1fr); }
    .hd-two-col, .hd-two-col--stats { grid-template-columns: 1fr; gap: clamp(32px, 5vw, 56px); }
    /* Media first in source order would put the picture above the copy on
       the stats block; keep the numbers first on narrow screens. */
    .hd-two-col--stats .hd-frame--fill { min-height: 320px; order: 2; }
    /* Stessa ragione nella sezione "What you can do": in DOM l'immagine viene prima, e su
       una colonna sola apriva la sezione con un render a piena larghezza prima di dire di
       cosa si trattasse. Il testo passa davanti, l'immagine la segue. Ambito su #about,
       cosi' i blocchi di Partners — che hanno il loro --flip a 900px — non si muovono. */
    #about .hd-media { order: 2; }
    .hd-cta { grid-template-columns: 1fr; gap: 36px; }
    .hd-cta p { max-width: none; }
}

@media (max-width: 900px) {
    .hd-grid-3 { grid-template-columns: 1fr; }
    /* One column, and the aside stops being sticky: stuck to the top of a
       single-column flow it would sit above the gallery it describes. */
    .hd-pd-layout { grid-template-columns: 1fr; }
    .hd-pd-aside { position: static; }
    .hd-pd-thumbs { grid-template-columns: repeat(3, 1fr); }
    .hd-footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
    .hd-footer__blurb { max-width: none; }
}

@media (max-width: 860px) {
    .desktop-only { display: none !important; }
    /* The centre track is empty here (the link list is hidden), and an empty track
       still pays for a gap on each side. Three columns: logo, Download, burger — the
       Download button stays in the bar on phones (team web standard). */
    .hd-nav { grid-template-columns: 1fr auto auto; gap: 10px; }
    .hd-nav__right { grid-column: 2; }
    .hd-burger { grid-column: 3; }
    html { scroll-padding-top: 90px; }
    .hd-hero { min-height: 0; padding: 130px var(--gutter) 60px; }
    /* Copy first, image under it. Without this the hero keeps its two columns all
       the way down and the render collapses to a ~130px thumbnail. */
    .hd-hero__grid { grid-template-columns: 1fr; margin-top: 0; }
    .hd-hero__media { max-width: 460px; }
    .hd-hero__sub { max-width: none; }
    .hd-blob--hero { width: min(90vw, 520px); height: min(90vw, 520px); top: 2%; }
    .hd-cta-section { padding: clamp(48px, 9vw, 90px) var(--gutter); }
}
/* 860.02 and not 861: a viewport can be a fractional number of CSS pixels (browser
   zoom, or fractional OS scaling), and with `max-width: 860` / `min-width: 861` a
   width of 860.45 matches NEITHER — so .desktop-only and .mobile-only were both
   visible, the nav got four children instead of three and wrapped to two rows.
   Measured at innerWidth 861 with devicePixelRatio 2.2. The design's own CSS has
   the same pair; this closes the gap without moving the breakpoint. */
@media (min-width: 860.02px) {
    .mobile-only { display: none !important; }
}

/* Header Download on phones. */
@media (max-width: 767.98px) {
    /* Logo, Download and burger share ~320px on a 375px phone: give the pill a little
       more of the screen and the logo every spare pixel. */
    .hd-nav { left: 8px; right: 8px; padding-left: 10px; padding-right: 10px; }
    .hd-nav__logo { padding-left: 2px; }
    .hd-nav__logo img { max-height: 28px; }
    .hd-nav__dl { font-size: 14px; padding: 10px 14px; }
    .hd-burger { width: 40px; }
}
/* Under 360px (iPhone SE 1st gen, small Androids) "Download" no longer fits beside a
   legible logo: icon only. The label stays in the accessibility tree — visually hidden,
   not display:none — so the link keeps its name. */
@media (max-width: 359.98px) {
    .hd-nav__dl { padding: 10px 12px; gap: 0; }
    .hd-nav__dl-label {
        position: absolute; width: 1px; height: 1px; overflow: hidden;
        clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
    }
}

@media (max-width: 620px) {
    .hd-grid-4 { grid-template-columns: 1fr; }
    .hd-footer__grid { grid-template-columns: 1fr; }
    .hd-head-row { align-items: flex-start; }
    .hd-head-row__aside { max-width: none; }
    .hd-marquee__item { width: 220px; }
    .hd-btn--lg { font-size: 16px; padding: 16px 28px; width: 100%; }
    .hd-hero__cta { display: grid; }
    .hd-footer__bottom { justify-content: flex-start; }
}

/*==================================================================
    support portal

    Le sue media query stanno qui dentro e non nei blocchi condivisi
    in fondo al file: il portale e' un sotto-sito su un host a se, e
    tenerlo autoconsistente lo rende rivedibile in un pezzo solo.
==================================================================*/

/*------------------ testata + tab del portale ------------------*/
/* Il padding-top e' solo la luce sotto la pill nav fissa. L'altezza in piu' che serve
   alla home la porta il suo hero, non questa regola: sulle pagine interne l'hero e'
   vuoto e un valore tarato sulla home lasciava ~120px di vuoto morto. */
.hd-support-head { padding: clamp(104px, 12vh, 126px) var(--gutter) 0; }

/* La nav interna del portale (Home / Knowledge base / Ticket). Freshdesk le teneva
   sempre visibili e senza quelle dentro il supporto non si capisce come muoversi.
   Deliberatamente piu' leggera della pill nav del sito: sono due navigazioni sulla
   stessa pagina e devono leggersi come header e sezione, non come due header. */
.hd-support-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0 clamp(10px, 3vw, 34px);
    margin-top: clamp(34px, 5vw, 54px);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}
.hd-support-tab {
    padding: 17px 4px;
    margin-bottom: -1px;
    font-size: 15px;
    font-weight: 600;
    color: var(--muted);
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: color .25s, border-color .25s;
}
.hd-support-tab:hover { color: var(--ink); }
.hd-support-tab.is-current { color: var(--ink); border-bottom-color: var(--accent2); }

/* Il blocco support_hero non emette alcun elemento sulle pagine interne, quindi la' le
   tab sono il primo figlio e il margine di stacco dall'hero non ha nulla da staccare. */
.hd-support-head .hd-support-tabs:first-child { margin-top: 0; }

/*------------------ hero della home del portale ------------------*/
.hd-support-hero { text-align: center; padding-top: clamp(20px, 4vw, 44px); }
.hd-support-hero h1 {
    font-size: clamp(32px, 5vw, 62px);
    line-height: 1.04;
    letter-spacing: -.035em;
    font-weight: 700;
    margin: 14px auto 0;
    max-width: 22ch;
}
.hd-support-hero p {
    margin: 18px auto 0;
    max-width: 56ch;
    font-size: 17px;
    line-height: 1.6;
    color: var(--muted);
}

.hd-support-search {
    display: flex;
    gap: 10px;
    max-width: 620px;
    margin: clamp(26px, 3.5vw, 38px) auto 0;
}
/* min-width:0 perche' un flex item con un <input> dentro non si restringe sotto la
   sua larghezza intrinseca senza questo, e il bottone verrebbe spinto fuori. */
.hd-support-search__field { position: relative; flex: 1 1 auto; min-width: 0; }
.hd-support-search__field svg {
    position: absolute; left: 18px; top: 50%;
    transform: translateY(-50%);
    width: 18px; height: 18px;
    color: var(--muted);
    pointer-events: none;
}
.hd-support-search .hd-field { background: var(--surface); }
.hd-support-search .hd-btn { flex: 0 0 auto; }

/*------------------ breadcrumb ------------------*/
.hd-breadcrumb { margin: 0 0 clamp(22px, 3vw, 32px); }
.hd-breadcrumb ol {
    display: flex; flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 8px;
    list-style: none; margin: 0; padding: 0;
    font-size: 14px; color: var(--muted);
}
.hd-breadcrumb a { color: var(--muted); font-weight: 600; }
.hd-breadcrumb a:hover { color: var(--deep); }
.hd-breadcrumb li:not(:first-child)::before {
    content: "\203A";
    margin-right: 8px;
    color: var(--muted);
    opacity: .55;
}
.hd-breadcrumb li[aria-current] { color: var(--ink); font-weight: 600; }

/*------------------ corpo: contenuto + sidebar ------------------*/
.hd-support-body { padding: clamp(34px, 4.5vw, 58px) var(--gutter) clamp(80px, 10vw, 130px); }

.hd-support-layout {
    display: grid;
    /* minmax(0, …) e non semplicemente 1.55fr: un fr ha per default min-width auto,
       e un articolo usa un URL grezzo come testo di link — senza questo la colonna
       si allarga fino a contenerlo e sfonda la griglia. */
    grid-template-columns: minmax(0, 1.55fr) minmax(0, .72fr);
    gap: clamp(36px, 5vw, 72px);
    align-items: start;
}
.hd-support-layout--wide { grid-template-columns: minmax(0, 1fr); }
.hd-support-main { min-width: 0; }

/* Misura di lettura, e sulla COLONNA e non su .hd-prose: cosi' occhiello, titolo, corpo e
   "vedi anche" condividono lo stesso limite, e il filo di separazione non sporge oltre il
   testo. Solo nel layout a due colonne — in quello a piena larghezza il contenuto e' una
   griglia di card, non prosa.
   ⚠️ 700px e non `68ch`: `ch` e' la larghezza dello ZERO, e in Sora e' molto piu' larga del
   carattere medio, quindi 68ch misurava 798px ≈ 85 caratteri per riga. 700px ne da' ~74. */
.hd-support-layout:not(.hd-support-layout--wide) .hd-support-main { max-width: 700px; }

.hd-support-aside { position: sticky; top: 110px; display: grid; gap: 18px; }

.hd-support-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 24px 24px 26px;
}
.hd-support-panel__title {
    font-size: 13px; font-weight: 700;
    letter-spacing: .14em; text-transform: uppercase;
    color: var(--muted);
    margin: 0 0 14px;
}
/* Stesso fondo bianco e stesso bordo della card delle categorie: le due colonne della
   sidebar si leggono come una serie, e il verde resta solo sul bottone. */
.hd-support-panel--cta p {
    margin: 0 0 18px;
    font-size: 15px; line-height: 1.6;
    color: var(--muted);
}
.hd-btn--block { display: block; width: 100%; }
/* A full-width Download button keeps icon and label on one line: --block comes after
   --dl in this file, so without this its display:block wins and the icon wraps above. */
.hd-btn--dl.hd-btn--block { display: flex; }

.hd-support-folders { list-style: none; margin: 0; padding: 0; }
.hd-support-folders a {
    display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
    padding: 11px 0;
    border-top: 1px solid var(--line);
    font-size: 15px; font-weight: 600; color: var(--ink);
    transition: color .2s;
}
.hd-support-folders li:first-child a { border-top: 0; padding-top: 0; }
.hd-support-folders a:hover { color: var(--deep); }
.hd-support-folders em { font-style: normal; font-size: 13px; color: var(--muted); flex: none; }

/*------------------ intestazione dell'articolo ------------------*/
.hd-support-kicker { display: inline-block; margin-bottom: 12px; }
a.hd-support-kicker:hover { color: var(--deep); }
.hd-support-title {
    font-size: clamp(28px, 3.6vw, 44px);
    line-height: 1.08;
    letter-spacing: -.025em;
    font-weight: 700;
    margin: 0 0 12px;
    max-width: 30ch;
    overflow-wrap: anywhere;
}
.hd-support-meta {
    margin: 0 0 clamp(26px, 3.5vw, 38px);
    font-size: 14px;
    color: var(--muted);
}

/*------------------ liste di articoli ------------------*/
.hd-support-list { list-style: none; margin: 0; padding: 0; }
.hd-support-list a {
    display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
    font-size: 16px; font-weight: 600; color: var(--ink);
    transition: color .2s, padding-left .25s var(--ease);
}
.hd-support-list a:hover { color: var(--deep); padding-left: 8px; }
.hd-support-list em { font-style: normal; font-size: 13px; font-weight: 500; color: var(--muted); flex: none; }

.hd-support-related {
    margin-top: clamp(46px, 6vw, 70px);
    padding-top: clamp(28px, 4vw, 42px);
    border-top: 1px solid var(--line);
}
.hd-support-related__title {
    font-size: 13px; font-weight: 700;
    letter-spacing: .14em; text-transform: uppercase;
    color: var(--muted);
    margin: 0 0 6px;
}

/*------------------ messaggi flash ------------------*/
.hd-flash {
    border: 1px solid;
    border-radius: 16px;
    padding: 15px 20px;
    margin-bottom: 24px;
    font-size: 15px; font-weight: 600;
}
.hd-flash--ok { background: var(--mint); border-color: var(--accent2); color: var(--deep); }
/* Il design system non ha colori di errore: gli artboard non disegnano stati di errore.
   Questi tre valori sono nostri, scelti per stare su --bg con contrasto AA sul testo. */
.hd-flash--err { background: #FDECEA; border-color: #E3A9A2; color: #8A2B22; }

/*==================================================================
    .hd-prose — tipografia long-form dei corpi articolo

    Scritta sul vocabolario HTML REALE dei 58 file in support/articles/,
    misurato: p 239 · br 152 · a 59 · li 28 · img 12 · u 7 · ol 6 ·
    strong 5. Nessun h2/h3, nessun ul, nessuna tabella, nessuna classe,
    nessuno stile inline. Il blocco #page-content del portale attuale
    copre anche h1-h3 e tabelle perche' e' condiviso con le pagine
    legali di Bolt; quel file NON e' stato toccato.
==================================================================*/
.hd-prose {
    font-size: 17px;
    line-height: 1.72;
    color: var(--ink);
}
.hd-prose > *:first-child { margin-top: 0; }
.hd-prose > *:last-child  { margin-bottom: 0; }

/* 1.15em e non 1.6: nel contenuto Freshdesk lo stacco fra paragrafi e' affidato ai
   <br><br> (50 coppie), che valgono gia' una riga vuota. Margini generosi si
   sommerebbero a quelli e aprirebbero buchi. */
.hd-prose p { margin: 0 0 1.15em; }

.hd-prose a {
    color: var(--deep);
    text-decoration: underline;
    text-decoration-color: rgba(40, 96, 56, .38);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    /* Un articolo (23000001830) usa un URL grezzo come testo del link: senza questo
       sfonda una colonna da 68ch. */
    overflow-wrap: anywhere;
    transition: color .2s, text-decoration-color .2s;
}
.hd-prose a:hover { color: var(--accent2); text-decoration-color: currentColor; }
/* Lo stesso articolo contiene due <a href="…"></a> SENZA testo, lasciati dall'export.
   Non devono diventare artefatti cliccabili invisibili. */
.hd-prose a:empty { display: none; }

/* <u> nell'export e' enfasi, non un link — a volte avvolge proprio un <a>. Va reso
   distinguibile: tratto spesso in accento invece del filo sottile dei link. */
.hd-prose u {
    text-decoration: underline;
    text-decoration-color: var(--accent);
    text-decoration-thickness: 3px;
    text-underline-offset: 2px;
}
.hd-prose u a { text-decoration: none; }

.hd-prose strong, .hd-prose b { font-weight: 700; }

.hd-prose ul, .hd-prose ol { margin: 0 0 1.15em; padding-left: 1.45em; }
.hd-prose li { margin-bottom: .4em; }
.hd-prose li::marker { color: var(--accent2); font-weight: 700; }

.hd-prose img {
    height: auto;
    border: 1px solid var(--line);
    border-radius: 16px;
    margin: 8px 0;
}
/* Un articolo (23000009478) mette due <img> fratelli dentro lo stesso <p>. Il reset
   globale le rende block, quindi si impilerebbero: affiancale quando c'e' spazio. */
.hd-prose p:has(> img + img) {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 14px;
}
.hd-prose p:has(> img + img) img { margin: 0; }

/* Nessuno di questi compare nei 58 corpi attuali, ma un articolo nuovo potrebbe
   portarli: meglio uno stile minimo che nessuno stile. */
.hd-prose h2 { font-size: 1.4em; line-height: 1.2; font-weight: 700; letter-spacing: -.02em; margin: 1.9em 0 .5em; }
.hd-prose h3 { font-size: 1.15em; line-height: 1.3; font-weight: 700; margin: 1.6em 0 .4em; }
.hd-prose blockquote {
    margin: 0 0 1.15em;
    padding: 2px 0 2px 18px;
    border-left: 3px solid var(--accent2);
    color: var(--muted);
}
.hd-prose code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: .9em;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 1px 6px;
}
.hd-prose pre { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.hd-prose pre code { border: 0; background: none; padding: 0; }
/* display:block per poter scrollare: senza, una tabella larga sfonda la pagina. */
.hd-prose table { display: block; overflow-x: auto; max-width: 100%; border-collapse: collapse; margin: 0 0 1.15em; }
.hd-prose th, .hd-prose td { border: 1px solid var(--line); padding: 8px 12px; font-size: 15px; text-align: left; vertical-align: top; }
.hd-prose th { background: var(--surface); font-weight: 700; }

/*------------------ responsive del portale ------------------*/
@media (max-width: 980px) {
    .hd-support-layout { grid-template-columns: minmax(0, 1fr); }
    /* La sidebar scende in fondo e perde lo sticky: in colonna singola resterebbe
       incollata coprendo il contenuto che segue. */
    .hd-support-aside { position: static; margin-top: clamp(40px, 6vw, 60px); }
}

@media (max-width: 620px) {
    /* Le tab sottolineate sono un idioma da desktop: a tre voci lunghe ("FAQ Home
       Design 3D" + "Nous contacter") andrebbero a capo e la sottolineatura della
       seconda riga galleggerebbe in mezzo al contenitore. Diventano pillole. */
    .hd-support-tabs { border: 0; gap: 8px; }
    .hd-support-tab {
        margin-bottom: 0;
        padding: 9px 16px;
        font-size: 14px;
        white-space: normal;
        border: 1px solid var(--line);
        border-radius: 999px;
        background: var(--surface);
    }
    .hd-support-tab.is-current { background: var(--ink); border-color: var(--ink); color: var(--bg); }

    .hd-support-search { flex-wrap: wrap; }
    .hd-support-search__field { flex: 1 1 100%; }
    .hd-support-search .hd-btn { width: 100%; }

    .hd-prose { font-size: 16px; }

    /* La data va sotto al titolo invece che accanto: affiancate su una colonna stretta si
       rubano larghezza a vicenda e un titolo lungo finiva su tre righe strette. */
    .hd-support-list a { font-size: 15px; flex-direction: column; align-items: flex-start; gap: 3px; }

    /* La striscia in evidenza esce dal gutter e scorre da bordo a bordo: su 390px il gutter
       da 20px per lato riduceva il binario a 350, e a destra restava una fascia vuota che
       spezzava lo scorrimento.
       ⚠️ Il margine negativo va SEMPRE accompagnato dal padding uguale: e' quello che tiene
       la prima card allineata all'occhiello e alla griglia sotto — la ragione per cui il
       commento qui sopra sulla striscia dice "vertical only". La' non c'era margine negativo
       a compensare; qui c'e'. Il padding verticale resta quello per l'ombra dell'hover.
       Nessuna barra orizzontale sulla pagina: body ha overflow-x: hidden. */
    .hd-featured__row {
        margin-left: calc(var(--gutter) * -1);
        margin-right: calc(var(--gutter) * -1);
        padding: 10px var(--gutter) 12px;
        /* ⚠️ Indispensabile con `scroll-snap-align: start` sulle card: senza, lo snap
           allinea la prima card al bordo del contenitore ignorando il padding, e il
           browser scorre di 20px da solo (misurato: scrollLeft = 20). Risultato, la card
           partiva a filo bordo e non allineata all'occhiello. scroll-padding dice allo
           snap dove sta davvero l'inizio. */
        scroll-padding-left: var(--gutter);
    }
}

/*------------------ blocchi centrati della home e della pagina ticket ------------------*/
/* 820px e 760px sono le due misure dell'artboard per la sezione FAQ e per quella contatto. */
.hd-support-mid { max-width: 820px; margin: 0 auto; padding: clamp(24px, 4vw, 46px) 0 0; }
.hd-support-mid--narrow { max-width: 760px; }
.hd-support-mid + .hd-support-mid { padding-top: clamp(56px, 8vw, 104px); }
.hd-support-mid__head { text-align: center; margin-bottom: clamp(30px, 4.5vw, 48px); }
.hd-support-mid__head p {
    margin: 16px auto 0;
    max-width: 52ch;
    font-size: 16px; line-height: 1.6;
    color: var(--muted);
}
.hd-support-mid__all { margin: clamp(26px, 4vw, 40px) 0 0; text-align: center; }

/*------------------ FAQ ad accordion (home) ------------------*/
.hd-faq { display: grid; gap: 12px; }
.hd-faq__item {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 18px 24px;
    transition: border-color .25s;
}
.hd-faq__item[open] { border-color: var(--accent2); }
.hd-faq__item > summary {
    display: flex; align-items: baseline; gap: 14px;
    font-size: 17px; font-weight: 600;
    cursor: pointer;
    /* Le due righe insieme: Firefox e Safari usano `list-style`, Chrome il marker WebKit. */
    list-style: none;
}
.hd-faq__item > summary::-webkit-details-marker { display: none; }
.hd-faq__item > summary > span { flex: 1 1 auto; }
.hd-faq__item > summary > em {
    font-style: normal; font-size: 12px; font-weight: 700;
    letter-spacing: .08em; text-transform: uppercase;
    color: var(--muted);
    flex: none;
}
/* Il chevron: l'artboard non ne ha, ma senza indicatore un accordion chiuso non si
   distingue da una riga di testo. Ruota all'apertura. */
.hd-faq__item > summary::after {
    content: "";
    flex: none;
    width: 9px; height: 9px;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    transform: rotate(45deg);
    transition: transform .3s var(--ease);
    margin-top: 4px;
}
.hd-faq__item[open] > summary::after { transform: rotate(-135deg); }
.hd-faq__body { padding-top: 14px; }
/* Dentro un accordion la prosa e' un tono piu' piccola: e' una risposta, non una pagina. */
.hd-faq__body .hd-prose { font-size: 15.5px; line-height: 1.68; color: var(--muted); }
.hd-faq__body .hd-prose strong { color: var(--ink); }
/* Gli screenshot d'app sono alti: a piena colonna un solo articolo con immagine
   dominava l'accordion. Nella pagina articolo restano a piena misura. */
.hd-faq__body .hd-prose img { max-width: 400px; }
.hd-faq__more {
    display: inline-block;
    margin-top: 16px;
    font-size: 14px; font-weight: 600;
    color: var(--deep);
}
.hd-faq__more::after { content: " \2192"; }
.hd-faq__more:hover { color: var(--accent2); }

/*------------------ indice della knowledge base ------------------*/
.hd-support-group { margin-top: clamp(34px, 4.5vw, 54px); }
.hd-support-group:first-of-type { margin-top: clamp(20px, 3vw, 32px); }
.hd-support-group__title {
    display: flex; align-items: baseline; gap: 12px;
    font-size: 13px; font-weight: 700;
    letter-spacing: .14em; text-transform: uppercase;
    margin: 0 0 4px;
}
.hd-support-group__title a { color: var(--ink); }
.hd-support-group__title a:hover { color: var(--deep); }
.hd-support-group__title em {
    font-style: normal; letter-spacing: 0;
    font-size: 12px; color: var(--muted);
}

/*------------------ pagina di ricerca ed esito vuoto ------------------*/
/* Misura stretta per ricerca e ticket, applicata al guscio (vedi support/base-2026):
   cosi' la breadcrumb non resta a filo shell mentre il contenuto e' centrato. */
.hd-shell--narrow { max-width: 760px; }
.hd-shell--narrow .hd-support-search { margin-left: 0; margin-right: 0; max-width: none; }
.hd-support-empty {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: clamp(26px, 4vw, 38px);
    text-align: center;
}
.hd-support-empty p { margin: 0 0 20px; font-size: 16px; line-height: 1.6; color: var(--muted); }

/*==================================================================
    form del ticket

    Valori dall'artboard: card --surface radius 24, campi radius 12 su
    fondo --bg con padding 13x16, label 14/600, riga a due colonne.

    ⚠️ Prefisso `hd-form-` e non `hd-field`: .hd-field esiste già ed è
    l'input di ricerca a pillola con lo spazio per l'icona.
==================================================================*/
.hd-form {
    display: grid;
    gap: 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: clamp(24px, 4vw, 40px);
}
.hd-form-field { display: grid; gap: 8px; }
.hd-form-split { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.hd-form-label { font-size: 14px; font-weight: 600; color: var(--ink); }
/* Quattro campi su otto sono opzionali (prodotto, piattaforma, versione OS, allegati) e
   senza un segno non si distinguono. `required` la mette form_div_layout da sé sulle label
   dei campi obbligatori: non serve toccare il template. */
.hd-form-label.required::after {
    content: "*";
    margin-left: 3px;
    color: var(--accent2);
    font-weight: 700;
}

.hd-form-input, .hd-form-select, .hd-form-textarea, .hd-form-file {
    width: 100%;
    border: 1px solid var(--line);
    background: var(--bg);
    border-radius: 12px;
    padding: 13px 16px;
    font-family: inherit; font-size: 15px; color: var(--ink);
    outline: none;
    transition: border-color .25s;
}
.hd-form-input:focus, .hd-form-select:focus,
.hd-form-textarea:focus, .hd-form-file:focus { border-color: var(--accent2); }
.hd-form-textarea { resize: vertical; line-height: 1.6; }
.hd-form-select { appearance: none; -webkit-appearance: none; padding-right: 44px; cursor: pointer; }
.hd-form-selectwrap { position: relative; }
.hd-form-selectwrap svg {
    position: absolute; right: 16px; top: 50%;
    transform: translateY(-50%);
    width: 14px; height: 14px;
    color: var(--muted);
    pointer-events: none;
}
/* Il bottone nativo del file input non si stila: si stila il contenitore e si rende
   il bottone coerente col resto tramite ::file-selector-button. */
.hd-form-file { padding: 9px 12px; cursor: pointer; }
.hd-form-file::file-selector-button {
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: 999px;
    padding: 8px 16px;
    margin-right: 12px;
    font-family: inherit; font-size: 14px; font-weight: 600;
    color: var(--ink);
    cursor: pointer;
    transition: background .25s, border-color .25s;
}
.hd-form-file::file-selector-button:hover { background: var(--mint); border-color: var(--accent2); }

.hd-form-hint { font-size: 13px; line-height: 1.5; color: var(--muted); }

/* Errori di campo: form_div_layout li emette come <ul><li> senza classe. */
.hd-form-field > ul {
    list-style: none; margin: 0; padding: 0;
    font-size: 13px; font-weight: 600; color: #8A2B22;
}
/* Errori a livello di form (es. token CSRF scaduto): stanno fuori da ogni campo. */
.hd-form-alert {
    border: 1px solid #E3A9A2;
    background: #FDECEA;
    border-radius: 14px;
    padding: 13px 18px;
    font-size: 14px; font-weight: 600; color: #8A2B22;
}
.hd-form-alert ul { list-style: none; margin: 0; padding: 0; }

/* Il widget reCAPTCHA è un iframe di dimensioni fisse deciso da Google: non si stila,
   gli si dà solo aria attorno. */
.hd-form-captcha { margin: 6px 0; }
.hd-form-actions { margin-top: 6px; }

@media (max-width: 620px) {
    .hd-form-split { grid-template-columns: 1fr; }
    .hd-form { padding: 22px 18px; border-radius: 20px; }
    .hd-faq__item { padding: 16px 18px; }
    .hd-faq__item > summary { font-size: 16px; flex-wrap: wrap; }
    /* La categoria va sotto al titolo: accanto, su una riga stretta, spinge il chevron fuori. */
    .hd-faq__item > summary > span { flex: 1 1 100%; order: 1; }
    .hd-faq__item > summary::after { order: 2; }
    .hd-faq__item > summary > em { order: 3; flex: 1 1 100%; }
    .hd-form-actions .hd-btn { width: 100%; }
}

/*==================================================================
    autenticazione

    L'artboard non disegna queste pagine. Il grosso arriva dal kit
    form di M4 (.hd-form-*, .hd-flash, .hd-btn*): qui stanno solo i
    componenti specifici — lo split, i bottoni social e il divisore.
==================================================================*/
.hd-auth-section { padding: clamp(120px, 15vh, 150px) var(--gutter) clamp(80px, 10vw, 130px); }

.hd-auth {
    display: grid;
    /* minmax(0, …) per la stessa ragione del portale supporto: un fr ha min-width auto e
       un'email lunga nel campo allargherebbe la traccia. */
    grid-template-columns: minmax(0, 1fr) minmax(0, .82fr);
    gap: clamp(40px, 6vw, 90px);
    align-items: start;
}
.hd-auth--narrow { grid-template-columns: minmax(0, 1fr); max-width: 480px; margin: 0 auto; }

.hd-auth__aside { padding-top: clamp(4px, 2vw, 24px); }
.hd-auth__lead {
    margin: 20px 0 0;
    max-width: 46ch;
    font-size: 17px; line-height: 1.6;
    color: var(--muted);
}
.hd-auth__list {
    list-style: none;
    margin: clamp(28px, 4vw, 40px) 0 0;
    padding: 0;
    display: grid;
    gap: 14px;
}
.hd-auth__list li {
    display: flex; align-items: flex-start; gap: 12px;
    font-size: 16px; line-height: 1.5;
    color: var(--ink);
}
.hd-auth__list svg {
    flex: none;
    width: 18px; height: 18px;
    margin-top: 3px;
    color: var(--accent2);
}

/*------------------ la card del form ------------------*/
.hd-auth__panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: clamp(24px, 3.5vw, 38px);
}
.hd-auth__title {
    margin: 0 0 22px;
    font-size: clamp(24px, 2.6vw, 32px);
    line-height: 1.1;
    letter-spacing: -.025em;
    font-weight: 700;
}
/* Il form sta gia' dentro .hd-auth__panel, quindi non porta card propria: --bare toglie
   fondo, bordo e imbottitura a .hd-form lasciando griglia e spaziatura dei campi. */
.hd-form--bare { background: none; border: 0; border-radius: 0; padding: 0; }

/*------------------ accessi social ------------------*/
.hd-auth__social { display: grid; gap: 12px; }

/* ⚠️ Il bottone Apple e' generato da appleid.auth.js, che inietta un div[role=button] con
   stili inline propri: senza !important resta della sua misura e non della nostra. Regole
   riprese dal <style> inline della pagina attuale, dove pero' erano dentro il template.

   La FORMA invece non si fa da qui: Apple disegna il bottone come SVG e il nero e' un
   <rect width="100%" height="100%"> senza rx, quindi un border-radius sul div non si
   vedrebbe. La pillola arriva da data-border-radius="50" nel markup — vedi il commento in
   security/login-2026.html.twig. */
#appleid-signin { width: 100% !important; }
#appleid-signin div[role="button"] {
    height: 52px !important;
    max-width: none !important;
    padding: 0 !important;
}

/* Il blu resta quello di Facebook: e' riconoscibilita', non decorazione. Forma e altezza
   invece sono quelle di .hd-btn, cosi' i due bottoni stanno in fila. */
.hd-auth__fb {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    height: 52px;
    border-radius: 999px;
    background: #1877F2;
    color: #FFF;
    font-size: 16px; font-weight: 600;
    transition: background .25s;
}
.hd-auth__fb:hover { background: #145FCB; color: #FFF; }
.hd-auth__fb svg { width: 20px; height: 20px; flex: none; }

/* Google chiede il bottone chiaro: fondo bianco, bordo grigio e la "G" a colori, che non va
   ricolorata. Stessa forma di .hd-auth__fb, cosi' i tre bottoni stanno in fila. */
.hd-auth__google {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    height: 52px;
    border-radius: 999px;
    background: #FFF;
    border: 1px solid #DADCE0;
    color: #1F1F1F;
    font-size: 16px; font-weight: 600;
    transition: background .25s;
}
.hd-auth__google:hover { background: #F8F9FA; color: #1F1F1F; }
.hd-auth__google svg { width: 20px; height: 20px; flex: none; }

/*------------------ divisore "o" ------------------*/
.hd-auth__or {
    display: flex; align-items: center; gap: 16px;
    margin: 22px 0;
    color: var(--muted);
    font-size: 13px; font-weight: 700;
    letter-spacing: .14em; text-transform: uppercase;
}
.hd-auth__or::before, .hd-auth__or::after {
    content: "";
    flex: 1 1 auto;
    height: 1px;
    background: var(--line);
}

/*------------------ piede della card ------------------*/
.hd-auth__forgot { margin: 14px 0 0; text-align: center; font-size: 14px; }
.hd-auth__forgot a { color: var(--muted); font-weight: 600; }
.hd-auth__forgot a:hover { color: var(--deep); }
.hd-auth__foot {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

/* Torna al login, su recupero e reset. */
.hd-auth__back { display: inline-block; margin-bottom: 18px; font-size: 14px; font-weight: 600; color: var(--muted); }
.hd-auth__back:hover { color: var(--deep); }

@media (max-width: 900px) {
    /* Il form PRIMA della proposta di valore: chi arriva qui vuole entrare, non essere
       convinto. In DOM la colonna di sinistra viene prima, quindi si riordina. */
    .hd-auth { grid-template-columns: minmax(0, 1fr); }
    /* Limitato e centrato: in colonna singola il pannello prendeva tutta la larghezza dello
       shell e i bottoni social diventavano righe da 730px. */
    .hd-auth__panel { order: 1; max-width: 480px; width: 100%; margin: 0 auto; }
    .hd-auth__aside { order: 2; padding-top: 0; }
}

@media (max-width: 620px) {
    .hd-auth__panel { padding: 22px 18px; border-radius: 20px; }
    .hd-auth__list li { font-size: 15px; }
}

/*------------------ recupero / reset / registrazione ------------------*/
.hd-auth__note {
    margin: -8px 0 22px;
    font-size: 15px; line-height: 1.6;
    color: var(--muted);
}

/* Checkbox con etichetta a fianco: newsletter e CGU. */
.hd-form-check {
    display: flex; align-items: flex-start; gap: 11px;
    font-size: 14px; line-height: 1.5;
    color: var(--muted);
    cursor: pointer;
}
.hd-form-check input[type="checkbox"] {
    flex: none;
    width: 18px; height: 18px;
    margin: 1px 0 0;
    accent-color: var(--accent2);
    cursor: pointer;
}
/* Le CGU contengono un link ai termini: deve restare distinguibile dal testo. */
.hd-form-check a { color: var(--deep); text-decoration: underline; text-underline-offset: 2px; }

/* Campo segnalato dal validatore lato client (initAuthForm). */
.hd-form-input.is-invalid, .hd-form-select.is-invalid { border-color: #C0554A; }

/* Il contenitore d'errore nasce `hidden`: senza questa riga `display:flex` o simili
   vincerebbero sull'attributo. */
[data-auth-error][hidden] { display: none; }

/*==================================================================
    pagine CMS (About, note legali, privacy)

    Il contenuto arriva da Bolt e porta il proprio HTML. Due gruppi
    di regole: la prosa lunga (estensione di .hd-prose scritta per
    gli articoli di supporto) e lo strato di compatibilità Bootstrap.
==================================================================*/
.hd-page-section { padding: clamp(118px, 14vh, 146px) var(--gutter) clamp(80px, 10vw, 130px); }
/* --flush perché la testata sta già dentro la sezione, che ha il suo padding-top: quello di
   .hd-page-head si sommerebbe lasciando ~300px di vuoto sotto la nav. */
.hd-page-head--flush { padding: 0 0 clamp(30px, 4vw, 46px); }

/* Più larga della misura di lettura di un articolo: una riga a due colonne dentro 700px
   darebbe colonne da 330px. La misura di lettura torna sui soli blocchi a colonna singola,
   sotto. */
.hd-prose--wide { max-width: 1000px; }
/* Paragrafi, liste e titoli che NON stanno dentro una riga a due colonne restano su una
   misura leggibile; dentro le colonne è la colonna a limitarli. */
.hd-prose--wide > p,
.hd-prose--wide > ul,
.hd-prose--wide > ol,
.hd-prose--wide > h2,
.hd-prose--wide > h3,
.hd-prose--wide > h4,
.hd-prose--wide > blockquote { max-width: 68ch; }

/* Bolt/Redactor emette <figure> attorno alle immagini (13 in About). */
.hd-prose figure { margin: 0; }
.hd-prose figure img { width: 100%; height: auto; }
.hd-prose figcaption {
    margin-top: 10px;
    font-size: 14px; line-height: 1.5;
    color: var(--muted);
}
/* <hr> come stacco di sezione: About ne ha 1, le privacy 2. */
.hd-prose hr {
    border: 0;
    border-top: 1px solid var(--line);
    margin: clamp(34px, 5vw, 56px) 0;
}
.hd-prose h4 { font-size: 1.05em; line-height: 1.35; font-weight: 700; margin: 1.5em 0 .4em; }

/*------------------ compatibilità Bootstrap dentro il CMS ------------------*/
/* 🔴 Il layout di About è fatto con classi Bootstrap dentro il campo Bolt: row ×3,
   `col-6 my-5` ×16, `img-fluid img-responsive align-center` ×13. base-2026 non carica
   Bootstrap, quindi senza queste regole la pagina collassa a una colonna con immagini a
   piena larghezza.

   ⚠️ TUTTE annidate sotto .hd-prose, deliberatamente: `.row` e `.col-*` sono nomi
   generici e in un foglio globale colliderebbero col resto del design. Qui non possono
   uscire dal contenitore della prosa.

   Alternativa scartata: riscrivere il corpo in Bolt. Bolt è un'app separata senza repo né
   rollback, e marketing può rimetterci Bootstrap alla prossima modifica. */
.hd-prose .row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(20px, 3vw, 44px);
    align-items: center;
    margin: clamp(28px, 4vw, 48px) 0;
}
/* min-width:0 perché una traccia grid ha min-width auto: un'immagine larga o un URL lungo
   allargherebbe la colonna oltre la griglia. */
.hd-prose [class*="col-"] { min-width: 0; }
.hd-prose .img-fluid,
.hd-prose .img-responsive { width: 100%; height: auto; }
/* `my-5` di Bootstrap è un margine verticale: dentro una grid il gap se ne occupa già. */
.hd-prose .row > [class*="col-"] { margin-top: 0; margin-bottom: 0; }
/* Classi di allineamento testo che il CMS usa qua e là. */
.hd-prose .text-center { text-align: center; }
.hd-prose .align-center { margin-left: auto; margin-right: auto; }

/* Una riga con un figlio solo prende tutta la larghezza invece di metà.
   ⚠️ Questo SI DISCOSTA dal legacy: là un `col-6` solitario resta nella metà sinistra,
   perché è quello che fa Bootstrap. Fedele, ma nel design nuovo lascia mezza pagina vuota
   accanto a un titolo di sezione e sembra un errore. Togliere questa regola per tornare
   al comportamento originale. */
.hd-prose .row:has(> :only-child) { grid-template-columns: minmax(0, 1fr); }

/* 🔴 `!important` deliberato — l'unico del foglio che sovrascrive uno stile INLINE
   (gli altri 15 stanno in blocchi reduced-motion, in .desktop-only/.mobile-only e sul
   bottone Apple, dove combattono stili di terzi). Il corpo CMS porta
   `style="text-align: justify"` INLINE in 5 punti, e senza !important un attributo style
   non si sovrascrive. Giustificato con colonne da 478px apre fiumi visibili fra le parole,
   e l'allineamento del testo è una cosa che il design system deve governare.
   Confinato a .hd-prose: non può toccare nulla fuori dal contenuto CMS.
   NON si sovrascrivono invece i `color:#1c2735` inline (8 occorrenze): sono a un capello
   da --ink (#202622) e rivendicarli tutti sarebbe una pretesa più grande. */
.hd-prose [style*="justify"] { text-align: left !important; }

@media (max-width: 760px) {
    .hd-prose .row { grid-template-columns: 1fr; gap: 18px; }
}

/*------------------ Partners / BtoB ------------------*/
.hd-partners-hero .hd-page-title { max-width: 26ch; }

.hd-partners-cards { align-items: stretch; }
.hd-partners-card {
    display: flex; flex-direction: column;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: clamp(22px, 3vw, 32px);
}
.hd-partners-card__icon {
    display: inline-flex;
    width: 46px; height: 46px;
    margin-bottom: 18px;
    color: var(--accent2);
}
.hd-partners-card__icon svg { width: 100%; height: 100%; }
.hd-partners-card h2 {
    margin: 0 0 12px;
    font-size: 19px; line-height: 1.25; font-weight: 700;
    letter-spacing: -.01em;
}
.hd-partners-card p { margin: 0; font-size: 15px; line-height: 1.65; color: var(--muted); }

.hd-partners-blocks { display: grid; gap: clamp(56px, 8vw, 110px); }
/* .hd-media porta position:relative e min-width:0 — serve entrambe: la seconda perché una
   traccia grid ha min-width auto e un'immagine larga sfonderebbe la colonna. */
.hd-partners-block .hd-media img { width: 100%; height: auto; border-radius: 20px; }
/* --flip inverte l'ordine visivo senza toccare il DOM: la copy resta prima in lettura. */
.hd-partners-block--flip .hd-partners-block__copy { order: 2; }
.hd-partners-block__copy p { margin: 18px 0 0; font-size: 17px; line-height: 1.65; color: var(--muted); }

/* I due formati pubblicitari, uno sopra l'altro: sono un banner 768×90 e un interstitial,
   proporzioni troppo diverse per affiancarli. */
.hd-partners-formats { display: grid; gap: 22px; }
.hd-partners-formats figure { margin: 0; }
.hd-partners-formats img {
    width: 100%; height: auto;
    border: 1px solid var(--line);
    border-radius: 14px;
}
.hd-partners-formats figcaption {
    margin-top: 8px;
    font-size: 13px; color: var(--muted); text-align: center;
}

.hd-partners-bullets { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 16px; }
.hd-partners-bullets li { display: grid; gap: 3px; }
.hd-partners-bullets strong { font-size: 15px; font-weight: 700; color: var(--ink); }
.hd-partners-bullets span { font-size: 15px; line-height: 1.6; color: var(--muted); }

.hd-partners-contact { max-width: 760px; }

@media (max-width: 900px) {
    .hd-grid-3.hd-partners-cards { grid-template-columns: 1fr; }
    .hd-partners-block { grid-template-columns: minmax(0, 1fr); }
    /* Su una colonna l'inversione non serve più: l'ordine del DOM è già quello giusto. */
    .hd-partners-block--flip .hd-partners-block__copy { order: 0; }
}

/*==================================================================
    Spazio utente ("My page") e impostazioni account

    L'artboard non disegna queste pagine: la forma e' derivata dal design
    system. Testata dello spazio utente nella voce di .hd-page-head, tab
    come quelle del portale supporto, griglie sulla card progetto condivisa;
    le impostazioni stanno sul kit form di M4 con una lista di sezioni a
    sinistra come la sidebar del portale.
==================================================================*/

/*------------------ spazio utente: testata ------------------*/
.hd-up { padding: clamp(140px, 16vh, 190px) var(--gutter) 0; }

.hd-up-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: clamp(24px, 4vw, 48px);
    align-items: center;
}

.hd-up-avatar {
    width: clamp(112px, 13vw, 168px);
    aspect-ratio: 1;
    border-radius: 50%;
    background: var(--mint);
    border: 1px solid var(--line);
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 30px 60px -40px rgba(32, 38, 34, .45);
}
.hd-up-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; background: var(--surface); }
.hd-up-avatar span {
    font-family: var(--font-accent);
    font-style: italic;
    font-size: clamp(54px, 6vw, 80px);
    line-height: 1;
    color: var(--deep);
}

.hd-up-name {
    font-size: clamp(34px, 5vw, 64px);
    line-height: 1.0;
    letter-spacing: -.035em;
    font-weight: 700;
    margin: 10px 0 18px;
    overflow-wrap: anywhere;
}

/* Barra XP. Il verde e' --accent come i bottoni primari: e' la cosa che l'utente
   "riempie", e deve leggersi come progresso, non come stato. */
.hd-up-xp { display: flex; align-items: center; gap: 14px; max-width: 420px; }
.hd-up-xp__track {
    flex: 1;
    height: 10px;
    border-radius: 999px;
    background: var(--line);
    overflow: hidden;
}
.hd-up-xp__track span { display: block; height: 100%; border-radius: inherit; background: var(--accent); min-width: 10px; }
.hd-up-xp__label { font-size: 14px; font-weight: 700; color: var(--deep); white-space: nowrap; font-variant-numeric: tabular-nums; }

.hd-up-meta { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 20px; }
.hd-up-meta span { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.hd-up-meta svg { width: 18px; height: 18px; flex: none; color: var(--accent2); }
.hd-up-meta strong { color: var(--ink); font-weight: 700; }

.hd-up-side { display: grid; justify-items: end; gap: 18px; align-self: start; }

/*------------------ spazio utente: tab ------------------*/
/* Stesso disegno delle tab del portale supporto (.hd-support-tabs): una nav di sezione,
   piu' leggera della pill nav. Qui sono <button> con ruoli ARIA, non link. */
.hd-up-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0 clamp(14px, 3vw, 38px);
    margin-top: clamp(40px, 5vw, 60px);
    border-top: 1px solid var(--line);
}
.hd-up-tab {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 17px 4px;
    margin-bottom: -1px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: none;
    font-family: inherit; font-size: 15px; font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    white-space: nowrap;
    transition: color .25s, border-color .25s;
}
.hd-up-tab:hover { color: var(--ink); }
.hd-up-tab.is-current { color: var(--ink); border-bottom-color: var(--accent2); }
.hd-up-tab em {
    font-style: normal;
    font-size: 12px; font-weight: 700;
    padding: 2px 9px;
    border-radius: 999px;
    background: var(--bg);
    border: 1px solid var(--line);
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}
.hd-up-tab.is-current em { background: var(--mint); border-color: var(--accent2); color: var(--deep); }

.hd-up-panels { padding-top: clamp(40px, 5vw, 64px); }
.hd-up-empty { text-align: center; color: var(--muted); font-size: 17px; margin: clamp(20px, 4vw, 50px) 0; }

/*------------------ spazio utente: trofei ------------------*/
.hd-trophies {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 18px;
}
.hd-trophy {
    display: grid;
    justify-items: center;
    align-content: start;
    gap: 8px;
    text-align: center;
    padding: 24px 18px 20px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 20px;
}
.hd-trophy img { width: 96px; height: 96px; object-fit: contain; margin-bottom: 6px; }
.hd-trophy strong { font-size: 15px; font-weight: 700; color: var(--ink); }
.hd-trophy p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
.hd-trophy__xp {
    margin-top: 6px;
    font-size: 12px; font-weight: 700;
    padding: 4px 11px;
    border-radius: 999px;
    background: var(--mint);
    color: var(--deep);
}
/* Bloccato: immagine in grigio come sulla pagina attuale, testo attenuato. */
.hd-trophy.is-locked { background: var(--bg); }
.hd-trophy.is-locked img { filter: grayscale(100%); opacity: .55; }
.hd-trophy.is-locked strong { color: var(--muted); }
.hd-trophy.is-locked .hd-trophy__xp { background: var(--surface); border: 1px solid var(--line); color: var(--muted); }

/*------------------ impostazioni: testata + layout ------------------*/
.hd-acct-head { padding: clamp(140px, 16vh, 190px) var(--gutter) 0; }
.hd-acct-head__row { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 20px; }
.hd-acct-head .hd-page-title { margin-bottom: 0; max-width: none; overflow-wrap: anywhere; }

.hd-acct { padding: clamp(34px, 4.5vw, 58px) var(--gutter) clamp(80px, 10vw, 130px); }
.hd-acct-layout {
    display: grid;
    grid-template-columns: minmax(0, 280px) minmax(0, 1fr);
    gap: clamp(28px, 4vw, 56px);
    align-items: start;
}
.hd-acct-main { min-width: 0; max-width: 760px; }

/* Lista delle sezioni: la card della sidebar del portale, con la voce corrente su --mint. */
.hd-acct-nav {
    position: sticky; top: 110px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 10px;
}
.hd-acct-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.hd-acct-nav a {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 15px; font-weight: 600;
    color: var(--ink);
    transition: background .2s, color .2s;
}
.hd-acct-nav a:hover { background: var(--bg); color: var(--deep); }
.hd-acct-nav a.is-current { background: var(--mint); color: var(--deep); }
.hd-acct-nav svg { width: 18px; height: 18px; flex: none; color: var(--accent2); }
.hd-acct-nav a.is-danger { color: #8A2B22; }
.hd-acct-nav a.is-danger svg { color: currentColor; }
.hd-acct-nav a.is-danger:hover, .hd-acct-nav a.is-danger.is-current { background: #FDECEA; color: #8A2B22; }

.hd-acct-title {
    margin: 0 0 4px;
    font-size: clamp(22px, 2.4vw, 28px);
    line-height: 1.15;
    letter-spacing: -.02em;
    font-weight: 700;
}
.hd-acct-actions { display: flex; justify-content: flex-end; }

/* Il design system non ha colori di pericolo: sono gli stessi tre valori di .hd-flash--err,
   scelti per il contrasto AA. Usati solo per la cancellazione dell'account. */
.hd-btn--danger { background: #B3261E; color: #FFF; }
.hd-btn--danger:hover { background: #8A2B22; color: #FFF; }
.hd-btn--ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.hd-btn--ghost:hover { background: var(--bg); color: var(--ink); }
.hd-acct-danger { border-color: #E3A9A2; }
.hd-acct-warning { margin: 0 0 22px; font-size: 16px; line-height: 1.6; color: var(--ink); }
.hd-acct-confirm { display: flex; flex-wrap: wrap; gap: 12px; }

/*------------------ impostazioni: newsletter ------------------*/
.hd-check {
    display: flex; align-items: flex-start; gap: 14px;
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--bg);
    cursor: pointer;
}
.hd-check__box {
    flex: none;
    width: 22px; height: 22px;
    margin: 1px 0 0;
    accent-color: var(--accent2);
    cursor: pointer;
}
.hd-check span { display: grid; gap: 4px; }
.hd-check strong { font-size: 15px; font-weight: 700; color: var(--ink); }
.hd-check small { font-size: 13px; line-height: 1.5; color: var(--muted); }

/*------------------ impostazioni: avatar ------------------*/
.hd-avatars {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
    gap: 14px;
    margin-top: 6px;
}
.hd-avatar-opt {
    position: relative;
    display: grid; justify-items: center; gap: 8px;
    padding: 12px 8px 10px;
    border: 2px solid transparent;
    border-radius: 18px;
    cursor: pointer;
    transition: background .2s, border-color .2s;
}
.hd-avatar-opt:hover { background: var(--bg); }
/* Il radio resta nel DOM per la tastiera e per l'invio del form; si vede solo il suo esito. */
.hd-avatar-opt input { position: absolute; opacity: 0; pointer-events: none; }
.hd-avatar-opt:has(input:checked) { border-color: var(--accent2); background: var(--mint); }
.hd-avatar-opt:has(input:focus-visible) { outline: 2px solid var(--accent2); outline-offset: 2px; }
.hd-avatar-opt__img {
    width: 80px; height: 80px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--line);
    display: flex; align-items: center; justify-content: center;
}
.hd-avatar-opt__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hd-avatar-opt__img--none {
    background: var(--mint);
    font-family: var(--font-accent);
    font-style: italic;
    font-size: 38px;
    color: var(--deep);
}
.hd-avatar-opt__name {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 12px; font-weight: 600;
    color: var(--muted);
    text-align: center;
}
.hd-avatar-opt__name svg { width: 12px; height: 12px; flex: none; }
.hd-avatar-opt.is-locked { cursor: not-allowed; }
.hd-avatar-opt.is-locked:hover { background: none; }
.hd-avatar-opt.is-locked .hd-avatar-opt__img img { filter: grayscale(100%); opacity: .45; }

/*------------------ responsive ------------------*/
@media (max-width: 900px) {
    .hd-up-head { grid-template-columns: auto minmax(0, 1fr); }
    .hd-up-side { grid-column: 1 / -1; justify-items: start; grid-auto-flow: column; align-items: center; gap: 22px; }
    .hd-acct-layout { grid-template-columns: minmax(0, 1fr); }
    /* Su una colonna la lista delle sezioni diventa pillole che vanno a capo: tutte visibili,
       senza uno scorrimento laterale che su telefono nessuno scopre. */
    .hd-acct-nav { position: static; padding: 0; background: none; border: 0; border-radius: 0; }
    .hd-acct-nav ul { display: flex; flex-wrap: wrap; gap: 8px; }
    .hd-acct-nav a { padding: 9px 14px; font-size: 14px; white-space: nowrap; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; }
    .hd-acct-nav a.is-current { border-color: var(--accent2); }
    .hd-acct-nav a.is-danger.is-current, .hd-acct-nav a.is-danger:hover { border-color: #E3A9A2; }
    .hd-acct-nav svg { width: 16px; height: 16px; }
}
@media (max-width: 620px) {
    .hd-up-head { grid-template-columns: minmax(0, 1fr); justify-items: start; }
    .hd-up-side { grid-auto-flow: row; }
    /* Tre tab devono stare in 350px: si stringono invece di scorrere. */
    .hd-up-tabs { flex-wrap: nowrap; justify-content: space-between; gap: 0 6px; }
    .hd-up-tab { font-size: 14px; gap: 6px; padding: 15px 2px; }
    .hd-up-tab em { font-size: 11px; padding: 1px 7px; }
    .hd-avatars { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
    .hd-avatar-opt { padding: 10px 4px 8px; }
    .hd-avatar-opt__img { width: 64px; height: 64px; }
    .hd-trophies { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .hd-acct-actions .hd-btn, .hd-acct-confirm .hd-btn { width: 100%; }
}
