
:root { --side-w: 264px; }
.qc-side { position: fixed; top: 0; bottom: 0; left: 0; width: var(--side-w); z-index: 40; background: var(--surface); border-right: 1.5px solid var(--rule); display: flex; flex-direction: column; gap: 6px; padding: 18px 12px calc(16px + env(safe-area-inset-bottom, 0px)); overflow-y: auto; overscroll-behavior: contain; }
.qs-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 8px 12px; margin-bottom: 4px; border-bottom: 1.5px solid var(--rule); }
.qs-logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 1.2rem; letter-spacing: -0.01em; color: var(--ink); text-decoration: none; }
.qs-logo svg { width: 30px; height: 30px; }
.qs-close { display: none; border: 1.5px solid var(--rule); background: var(--surface); color: var(--ink); width: 36px; height: 36px; border-radius: 10px; cursor: pointer; font-size: 20px; line-height: 1; }
.qs-group { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; }
.qs-group h2 { margin: 12px 12px 4px; font: 500 10.5px/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.qs-link { display: flex; align-items: center; gap: 11px; padding: 8px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14.5px; line-height: 1.3; transition: background-color .15s ease, transform .15s ease; }
.qs-link svg { width: 19px; height: 19px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
.qs-link:hover { background: var(--soft); transform: translateX(2px); }
.qs-link[aria-current="page"] { background: var(--brand); color: var(--brand-ink); }
.qs-link[aria-current="page"] svg { opacity: 1; }
.qs-foot { margin-top: auto; padding: 14px 12px 0; border-top: 1.5px solid var(--rule); display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; }
.qs-foot a { color: var(--muted); text-decoration: none; }
.qs-foot a:hover { color: var(--ink); text-decoration: underline; }
.qs-scrim { display: none; }
.qs-areas { display: flex; gap: 4px; padding: 4px; margin: 4px 4px 6px; border-radius: 999px; background: var(--soft); }
.qs-area { flex: 1; text-align: center; padding: 8px 4px; border-radius: 999px; font-size: 12.5px; font-weight: 700; color: var(--muted); text-decoration: none; white-space: nowrap; }
.qs-area:hover { color: var(--ink); background: var(--surface); }
.qs-area-privati[aria-current] { background: #1F5C47; color: #FFFFFF; }
.qs-area-investitori[aria-current] { background: #2B5A8C; color: #FFFFFF; }
.qs-area-professionisti[aria-current] { background: #A63D2B; color: #FFFFFF; }
.menu-btn { display: none; align-items: center; gap: 8px; padding: 9px 14px; border: 1.5px solid var(--rule); border-radius: 11px; background: var(--surface); color: var(--ink); font: 700 14px var(--body); cursor: pointer; }
.menu-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
@media (min-width: 1100px) {
  body { padding-left: var(--side-w); }
  .nav { display: none !important; }
}
@media (max-width: 1099px) {
  .qc-side { transform: translateX(-102%); transition: transform .25s cubic-bezier(.2,.7,.3,1); }
  body.qs-open .qc-side { transform: none; box-shadow: 16px 0 40px -18px rgba(16, 23, 20, .45); }
  .qs-close { display: inline-flex; align-items: center; justify-content: center; }
  .qs-scrim { display: block; position: fixed; inset: 0; z-index: 39; background: rgba(16, 23, 20, .45); opacity: 0; pointer-events: none; transition: opacity .2s ease; }
  body.qs-open .qs-scrim { opacity: 1; pointer-events: auto; }
  body.qs-open { overflow: hidden; }
  .menu-btn { display: inline-flex; }
  .nav .navlink, .nav .btn.ghost { display: none; }
  .nav .logo { margin-right: auto; flex-basis: auto !important; }
}
.qs-fab { display: none; position: fixed; top: 16px; left: 16px; z-index: 41; box-shadow: 3px 3px 0 var(--rule); }
@media (min-width: 1100px) {
  .qc-side, body { transition: transform .25s cubic-bezier(.2,.7,.3,1), padding-left .25s cubic-bezier(.2,.7,.3,1); }
  .qs-close { display: inline-flex; align-items: center; justify-content: center; }
  body.qs-mini { padding-left: 0; }
  body.qs-mini .qc-side { transform: translateX(-102%); }
  body.qs-mini .qs-fab { display: inline-flex; }
  body.qs-noanim, body.qs-noanim .qc-side { transition: none !important; }
}
@media (prefers-reduced-motion: reduce) { .qc-side, .qs-scrim, .qs-link { transition: none; } }
@media print { .qc-side, .qs-scrim, .menu-btn { display: none !important; } body { padding-left: 0 !important; } }

/* Menu più curato: colore dell'area, icone in tasselli, effetti al passaggio e all'apertura */
.qc-side { --area: #1F5C47; --area-soft: var(--green-soft, #E3EFE8); gap: 4px; }
.qc-side.qs-in-investitori { --area: #2B5A8C; --area-soft: var(--blue-soft, #EAF1F7); }
.qc-side.qs-in-professionisti { --area: #A63D2B; --area-soft: var(--brick-soft, #F8ECE5); }
.qs-g-investitori { --area: #2B5A8C; --area-soft: var(--blue-soft, #EAF1F7); }
.qs-g-professionisti { --area: #A63D2B; --area-soft: var(--brick-soft, #F8ECE5); }
.qs-logo svg { transition: transform .35s cubic-bezier(.3, 1.4, .5, 1); }
.qs-logo:hover svg { transform: rotate(-8deg) scale(1.06); }
.qs-close { transition: transform .25s ease, background-color .2s ease; }
.qs-close:hover { transform: rotate(90deg); background: var(--soft); }
.qs-areas { position: relative; }
.qs-area { transition: background-color .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease; }
.qs-area:hover { transform: translateY(-1px); }
.qs-area[aria-current] { box-shadow: 0 6px 14px -8px rgba(0, 0, 0, .45); }
.qs-group { gap: 3px; }
.qs-group h2 { display: flex; align-items: center; gap: 8px; margin: 14px 10px 6px !important; font: 700 12px/1.3 var(--body) !important; letter-spacing: .02em !important; text-transform: none !important; color: var(--muted); }
.qs-group h2::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--area); }
.qs-link { position: relative; gap: 12px !important; padding: 6px 10px !important; font-weight: 600 !important; transition: background-color .18s ease, color .18s ease, transform .18s ease !important; }
.qs-link svg { width: 32px !important; height: 32px !important; padding: 7px; box-sizing: border-box; border-radius: 10px; background: var(--soft); color: var(--area); opacity: 1 !important; transition: background-color .18s ease, color .18s ease, transform .25s cubic-bezier(.3, 1.4, .5, 1); }
.qs-link:hover { background: var(--area-soft) !important; transform: translateX(3px) !important; }
.qs-link:hover svg { background: var(--surface); transform: scale(1.08) rotate(-4deg); }
.qs-link[aria-current="page"] { background: var(--area) !important; color: #FFFFFF !important; box-shadow: 0 10px 22px -14px var(--area); }
.qs-link[aria-current="page"] svg { background: rgba(255, 255, 255, .18); color: #FFFFFF; }
.qs-link[aria-current="page"]::after { content: ""; position: absolute; right: 12px; width: 6px; height: 6px; border-radius: 50%; background: #F6D9A0; }
.qs-help { display: flex; align-items: center; gap: 12px; margin: 14px 4px 0; padding: 12px; border: 0; border-radius: 16px; background: var(--sand, #F4EEE4); color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: transform .2s ease, box-shadow .2s ease; }
.qs-help:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -16px rgba(60, 40, 10, .5); }
.qs-help-ic { flex: none; display: inline-flex; width: 38px; height: 38px; border-radius: 12px; align-items: center; justify-content: center; background: var(--cta, #E8B04A); color: #2A1E05; }
.qs-help-ic svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.qs-help-t b { display: block; font-size: 14px; }
.qs-help-t small { display: block; font-size: 12.5px; color: var(--muted); }
.qs-foot { margin-top: 12px !important; }
@keyframes qs-in { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }
@media (max-width: 1099px) {
  .qc-side { width: min(320px, 88vw); border-radius: 0 24px 24px 0; }
  .qs-scrim { -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
  body.qs-open .qs-areas, body.qs-open .qs-group, body.qs-open .qs-help { animation: qs-in .38s cubic-bezier(.2, .8, .3, 1) both; }
  body.qs-open .qs-group:nth-of-type(2) { animation-delay: .05s; } body.qs-open .qs-group:nth-of-type(3) { animation-delay: .1s; }
  body.qs-open .qs-group:nth-of-type(4) { animation-delay: .15s; } body.qs-open .qs-group:nth-of-type(5) { animation-delay: .2s; }
  body.qs-open .qs-help { animation-delay: .24s; }
}
@media (prefers-reduced-motion: reduce) {
  .qs-link, .qs-link svg, .qs-area, .qs-close, .qs-help, .qs-logo svg { transition: none !important; }
  .qs-link:hover, .qs-link:hover svg, .qs-close:hover, .qs-help:hover { transform: none !important; }
  body.qs-open .qs-areas, body.qs-open .qs-group, body.qs-open .qs-help { animation: none !important; }
}
@media print { .qs-help { display: none !important; } }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .qs-link:not([aria-current]) svg { color: color-mix(in srgb, var(--area) 45%, white); } :root:not([data-theme="light"]) .qs-group h2::before { background: color-mix(in srgb, var(--area) 55%, white); } }
:root[data-theme="dark"] .qs-link:not([aria-current]) svg { color: color-mix(in srgb, var(--area) 45%, white); }

/* Ricerca, gruppi apribili, recenti, bollini, pulsante animato */
.qs-search { position: relative; margin: 6px 4px 4px; }
.qs-search svg { position: absolute; left: 12px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.qs-search input { width: 100%; box-sizing: border-box; min-height: 42px; padding: 0 12px 0 38px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--ink); font: 500 14.5px var(--body); transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease; }
.qs-search input:focus { outline: none; border-color: var(--area); background: var(--surface); box-shadow: 0 0 0 3px var(--area-soft); }
.qs-results, .qs-recent .qs-gl { display: flex; flex-direction: column; gap: 3px; }
.qs-results { margin-top: 6px; animation: qs-fade .25s ease both; }
.qs-recent h2 { display: flex; align-items: center; gap: 8px; margin: 12px 10px 6px; font: 700 12px/1.3 var(--body); color: var(--muted); }
.qs-recent h2::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--cta, #E8B04A); }
.qs-none { margin: 10px 10px; font-size: 14px; color: var(--muted); }
.qs-none button { border: 0; background: none; padding: 0; color: var(--area); font: 700 14px var(--body); text-decoration: underline; cursor: pointer; }
.qs-lt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.qs-lt small { font-size: 11.5px; font-weight: 500; color: var(--muted); }
.qs-link[aria-current="page"] .qs-lt small { color: rgba(255, 255, 255, .8); }
.qs-new { flex: none; padding: 2px 8px; border-radius: 999px; background: var(--cta, #E8B04A); color: #2A1E05; font-size: 10.5px; font-weight: 800; letter-spacing: .02em; animation: qs-pop .5s .3s cubic-bezier(.3, 1.6, .5, 1) both; }
.qs-link[aria-current="page"]::after { display: none; }
details.qs-group { display: block; }
details.qs-group > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; cursor: pointer; border-radius: 10px; }
details.qs-group > summary::-webkit-details-marker { display: none; }
details.qs-group > summary:hover h2 { color: var(--ink); }
.qs-chev { width: 18px; height: 18px; margin-right: 8px; margin-top: 8px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s ease; }
details.qs-group:not([open]) .qs-chev { transform: rotate(-90deg); }
details.qs-group[open] > .qs-gl { animation: qs-drop .28s cubic-bezier(.2, .8, .3, 1) both; }
.qs-gl { display: flex; flex-direction: column; gap: 3px; }
.qs-homelink { margin-bottom: 4px; }
.qs-hub { display: inline-flex; align-items: center; gap: 6px; margin: 8px 10px 0; font-size: 13px; font-weight: 700; color: var(--area); text-decoration: none; }
.qs-hub span { transition: transform .2s ease; } .qs-hub:hover span { transform: translateX(4px); }
.qs-panel.qs-swap { animation: qs-slide .32s cubic-bezier(.2, .8, .3, 1) both; }
.menu-btn svg path { transition: transform .28s cubic-bezier(.5, 0, .3, 1), opacity .2s ease; transform-box: view-box; transform-origin: 12px 12px; }
body.qs-open .menu-btn .mb1 { transform: translateY(5px) rotate(45deg); }
body.qs-open .menu-btn .mb2 { opacity: 0; transform: scaleX(.2); }
body.qs-open .menu-btn .mb3 { transform: translateY(-5px) rotate(-45deg); }
@media (max-width: 1099px) { body.qs-open .nav .menu-btn { position: relative; z-index: 42; background: var(--surface); } .qc-side { touch-action: pan-y; width: min(320px, calc(100vw - 124px)) !important; } }
@media (max-width: 640px) { .qs-close { display: none !important; } }
@keyframes qs-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes qs-drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes qs-slide { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
@keyframes qs-pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .qs-results, .qs-new, details.qs-group[open] > .qs-gl, .qs-panel.qs-swap { animation: none !important; } .menu-btn svg path, .qs-chev { transition: none !important; } }


.qa-fab { position: fixed; right: 16px; bottom: calc(16px + var(--qa-lift, 0px)); z-index: 45; display: inline-flex; align-items: center; gap: 8px; padding: 11px 16px; border: 0; border-radius: 999px; background: var(--cta, #E8B04A); color: #1F1A10; font: 700 15px var(--body); box-shadow: 0 12px 26px -12px rgba(60, 40, 10, .55); cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, bottom .2s ease; }
.qa-fab:hover { transform: translateY(-2px); }
.qa-fab svg, .qa-send svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
body.qa-open .qa-fab, body.qs-open .qa-fab, body.printing .qa-fab, body.printing-guide .qa-fab { display: none; }
.qa-box { position: fixed; right: 16px; bottom: calc(16px + var(--qa-lift, 0px)); z-index: 46; width: min(390px, calc(100vw - 32px)); height: min(600px, calc(100vh - 32px - var(--qa-lift, 0px))); display: flex; flex-direction: column; background: var(--surface); color: var(--ink); border: 1px solid var(--rule); border-radius: 24px; box-shadow: 0 24px 60px -24px rgba(40, 30, 10, .45); overflow: hidden; }
.qa-box[hidden] { display: none; }
.qa-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 10px 12px 16px; background: var(--hero-bg, #1F3B33); color: var(--hero-fg, #F6F4EE); }
.qa-head b { display: block; font: 700 16px var(--display, var(--body)); }
.qa-head small { display: block; font: 500 12.5px var(--body); opacity: .82; }
.qa-x { flex: none; border: 0; background: transparent; color: inherit; font-size: 26px; line-height: 1; width: 40px; height: 40px; border-radius: 10px; cursor: pointer; }
.qa-x:hover { background: rgba(255, 255, 255, .12); }
.qa-log { position: relative; flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); }
.qa-msg { max-width: 90%; padding: 10px 13px; border-radius: 14px; font: 400 14.5px/1.5 var(--body); }
.qa-msg p { margin: 0 0 6px; } .qa-msg p:last-child { margin: 0; }
.qa-bot { align-self: flex-start; background: var(--surface); border: 1.5px solid var(--rule); border-bottom-left-radius: 4px; }
.qa-me { align-self: flex-end; background: var(--brand); color: var(--brand-ink); border-bottom-right-radius: 4px; font-weight: 600; }
.qa-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px !important; }
.qa-links a { display: inline-flex; align-items: center; padding: 6px 11px; border-radius: 999px; background: var(--brand); color: var(--brand-ink); font: 700 13px var(--body); text-decoration: none; }
.qa-links a::after { content: "→"; margin-left: 6px; }
.qa-links a:hover { filter: brightness(1.08); }
.qa-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.qa-lab { width: 100%; margin: 2px 0 0; font: 500 11px var(--mono, monospace); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.qa-chip { border: 1.5px solid var(--rule); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 7px 12px; font: 600 13.5px/1.3 var(--body); cursor: pointer; text-align: left; transition: border-color .15s ease, background-color .15s ease; }
.qa-chip:hover { border-color: var(--brand); background: var(--soft); }
.qa-chip.tp { border-color: var(--brand); }
.qa-form { display: flex; gap: 8px; padding: 10px; border-top: 1.5px solid var(--rule); background: var(--surface); }
.qa-form input { flex: 1; min-width: 0; font: 16px var(--body); padding: 10px 12px; border: 1.5px solid var(--rule); border-radius: 11px; background: var(--field, #fff); color: var(--ink); }
.qa-form input:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.qa-send { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 46px; border: 0; border-radius: 11px; background: var(--brand); color: var(--brand-ink); cursor: pointer; }
.qa-note { margin: 0; padding: 0 12px 10px; font-size: 11.5px; line-height: 1.4; color: var(--muted); background: var(--surface); }
@media (max-width: 600px) {
  .qa-fab { right: 12px; bottom: calc(12px + var(--qa-lift, 0px)); padding: 10px 14px; font-size: 14px; }
  .qa-box { left: 8px; right: 8px; width: auto; bottom: calc(8px + var(--qa-lift, 0px)); height: calc(100% - 16px - var(--qa-lift, 0px)); max-height: 640px; }
}
@media (prefers-reduced-motion: reduce) { .qa-fab, .qa-chip { transition: none; } }
@media print { .qa-fab, .qa-box { display: none !important; } }

.qa-fab.qa-loading { opacity: .7; cursor: progress; }
