/* ATRP — design system
   Palette: blu #1B97E3, bianco #FFFFFF, blu notte / antracite / grigi neutri come supporto. */

:root {
  --blue: #1b97e3;
  --blue-600: #1580c2;
  --blue-300: #5cc8ff;
  --blue-100: #cfeaff;
  --white: #ffffff;
  --ink: #050d1a;
  --navy: #0a1220;
  --navy-2: #0d1729;
  --anthracite: #121e32;
  --panel: #162339;
  --panel-2: #1b2b45;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #e8f1fa;
  --muted: #9fb3c8;
  --ok: #3ddc97;
  --warn: #f5b942;
  --bad: #ff7a7a;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
  --font: Inter, "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Barlow Condensed", "Roboto Condensed", "Arial Narrow", "Helvetica Neue", Inter, system-ui, sans-serif;
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0; background: var(--navy); color: var(--text); font-family: var(--font);
  font-size: 1rem; line-height: 1.65; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.08; letter-spacing: -0.01em; margin: 0 0 .5em; font-weight: 800; color: var(--white); }
h1 { font-size: clamp(2.5rem, 6vw, 4.4rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }
.container { width: min(1200px, 100% - 40px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .08em; }
:focus-visible { outline: 3px solid var(--blue-300); outline-offset: 3px; border-radius: 6px; }
.skip-link { position: absolute; left: 12px; top: -60px; background: var(--white); color: var(--ink); padding: 10px 16px; border-radius: 8px; z-index: 200; font-weight: 700; }
.skip-link:focus { top: 12px; }

/* barra sviluppo */
.devbar { background: #3b2a05; color: #ffe2a3; font-size: .85rem; padding: 6px 0; border-bottom: 1px solid #6b4d0e; }
.devbar a { color: #fff; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(10, 18, 32, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 24px; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; flex: none; }
.brand-mark, .brand-logo { width: 42px; height: 42px; border-radius: 11px; flex: none; }
.brand-mark { display: grid; place-items: center; background: linear-gradient(145deg, var(--blue), #0b5f98); color: var(--white); font-family: var(--font-display); font-weight: 800; font-size: 1.7rem; box-shadow: 0 6px 18px rgba(27, 151, 227, .35); }
.brand-logo { object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text strong { font-family: var(--font-display); font-size: 1.6rem; letter-spacing: .04em; color: var(--white); }
.brand-text small { font-size: .68rem; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }

.nav-desktop { flex: 1; display: flex; justify-content: center; }
.nav-desktop > ul { list-style: none; display: flex; align-items: center; gap: 2px; }
.nav-link { display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; border-radius: 10px; text-decoration: none; font-size: .95rem; font-weight: 600; color: #cfdceb; transition: background .2s, color .2s; }
.nav-link .icon { width: 14px; height: 14px; transition: transform .2s; }
.nav-link:hover, .has-menu:hover > .nav-link, .has-menu.open > .nav-link { background: rgba(255,255,255,.07); color: var(--white); }
.nav-link.is-active { color: var(--white); box-shadow: inset 0 -2px 0 var(--blue); border-radius: 10px 10px 0 0; }
.has-menu { position: relative; }
.has-menu:hover > .nav-link .icon, .has-menu.open > .nav-link .icon { transform: rotate(180deg); }
.menu { position: absolute; left: 50%; top: calc(100% + 6px); transform: translate(-50%, 8px); min-width: 290px; background: var(--anthracite); border: 1px solid var(--line-strong); border-radius: 14px; padding: 8px; box-shadow: var(--shadow); opacity: 0; visibility: hidden; transition: opacity .18s, transform .18s, visibility .18s; }
.has-menu::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 8px; }
.has-menu:hover > .menu, .has-menu:focus-within > .menu, .has-menu.open > .menu { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.menu a { display: flex; flex-direction: column; padding: 10px 12px; border-radius: 9px; text-decoration: none; }
.menu a strong { font-size: .95rem; color: var(--white); }
.menu a span { font-size: .8rem; color: var(--muted); }
.menu a:hover { background: rgba(27, 151, 227, .14); }
.header-cta { flex: none; }
.nav-toggle { display: none; margin-left: auto; width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--line-strong); background: transparent; color: var(--white); cursor: pointer; place-items: center; }
.nav-toggle .icon { width: 24px; height: 24px; }
.nav-mobile { border-top: 1px solid var(--line); background: var(--navy-2); max-height: calc(100vh - var(--header-h)); overflow-y: auto; padding: 12px 20px 24px; }
.nav-mobile[hidden] { display: none; }
.m-link, .m-group summary { display: flex; justify-content: space-between; align-items: center; padding: 14px 4px; font-weight: 700; font-size: 1.05rem; text-decoration: none; border-bottom: 1px solid var(--line); color: var(--white); cursor: pointer; list-style: none; }
.m-group summary::-webkit-details-marker { display: none; }
.m-group summary .icon { width: 18px; height: 18px; transition: transform .2s; }
.m-group[open] summary .icon { transform: rotate(180deg); }
.m-link.is-active { color: var(--blue-300); }
.m-group > div { display: flex; flex-direction: column; padding: 6px 0 10px 12px; }
.m-group > div a { padding: 10px 6px; text-decoration: none; color: #cfdceb; display: flex; flex-direction: column; }
.m-group > div a small { color: var(--muted); font-size: .78rem; }
.nav-mobile-cta { margin-top: 18px; }

/* ---------- Bottoni ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 22px; border-radius: 12px; font: 700 .95rem/1.2 var(--font); text-decoration: none; border: 1.5px solid transparent; cursor: pointer; transition: transform .18s, background .2s, border-color .2s, box-shadow .2s, color .2s; white-space: nowrap; }
.btn .icon { width: 18px; height: 18px; flex: none; transition: transform .2s; }
.btn:hover .icon { transform: translateX(3px); }
.btn-primary { background: var(--blue); color: var(--white); box-shadow: 0 10px 26px rgba(27, 151, 227, .35); }
.btn-primary:hover { background: #2aa6f2; transform: translateY(-2px); box-shadow: 0 14px 32px rgba(27, 151, 227, .45); }
.btn-ghost { background: rgba(255,255,255,.04); border-color: var(--line-strong); color: var(--white); }
.btn-ghost:hover { border-color: var(--blue-300); background: rgba(27,151,227,.14); transform: translateY(-2px); }
.btn-link { padding-inline: 8px; color: var(--blue-300); }
.btn-link:hover { color: var(--white); }
.btn-sm { padding: 9px 16px; font-size: .88rem; border-radius: 10px; }
.btn-lg { padding: 15px 28px; font-size: 1.02rem; border-radius: 14px; }
.btn-block { display: flex; width: 100%; }
.btn.is-disabled { cursor: not-allowed; opacity: .6; flex-direction: column; gap: 0; box-shadow: none; transform: none !important; }
.btn.is-disabled small { font-size: .68rem; font-weight: 600; opacity: .85; letter-spacing: .04em; text-transform: uppercase; }
.btn.is-disabled:hover { background: inherit; }
.btn-primary.is-disabled { background: #2a4a68; color: #d6e6f5; }
.btn-ghost.is-disabled { border-style: dashed; }
.text-link { display: inline-flex; align-items: center; gap: 6px; color: var(--blue-300); font-weight: 700; text-decoration: none; }
.text-link .icon { width: 16px; height: 16px; transition: transform .2s; }
.text-link:hover { color: var(--white); }
.text-link:hover .icon { transform: translateX(4px); }

/* ---------- Tipografia di sezione ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 14px; color: var(--blue-300); font-size: .78rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.eyebrow-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 4px rgba(27,151,227,.25); }
.lead { font-size: 1.15rem; color: #b8c9dc; max-width: 62ch; }
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section-tight { padding: clamp(32px, 5vw, 56px) 0; }
.section-alt { background: linear-gradient(180deg, var(--navy-2), var(--anthracite)); border-block: 1px solid var(--line); }
.section-head { margin-bottom: clamp(28px, 4vw, 48px); }
.section-head.is-center { text-align: center; }
.section-head.is-center .lead { margin-inline: auto; }
.section-head .lead { margin-bottom: 0; }
.center-cta { text-align: center; margin: 32px 0 0; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(48px, 7vw, 96px) 0 clamp(56px, 7vw, 88px); isolation: isolate; }
.hero-bg { position: absolute; inset: 0; z-index: -1; background: radial-gradient(900px 500px at 78% 20%, rgba(27,151,227,.30), transparent 65%), radial-gradient(700px 400px at 5% 100%, rgba(27,151,227,.14), transparent 60%), linear-gradient(180deg, #08101e, var(--navy)); }
.hero-bg::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 56px 56px; mask-image: radial-gradient(ellipse at 70% 40%, #000, transparent 70%); -webkit-mask-image: radial-gradient(ellipse at 70% 40%, #000, transparent 70%); opacity: .5; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { margin-bottom: .2em; }
.hero-headline { font-family: var(--font-display); font-size: clamp(1.4rem, 2.6vw, 2rem); font-weight: 700; color: var(--blue-300); line-height: 1.15; margin-bottom: 18px; }
.hero-text { color: #b8c9dc; font-size: 1.08rem; max-width: 56ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 28px 0 28px; }
.hero-visual { position: relative; }
.hero-frame { border-radius: 26px; overflow: hidden; border: 1px solid var(--line-strong); box-shadow: 0 30px 80px rgba(0,0,0,.5), 0 0 0 8px rgba(27,151,227,.07); aspect-ratio: 800 / 560; transform: rotate(1.2deg); }
.hero-frame svg { width: 100%; height: 100%; }
.hero-chip { position: absolute; background: rgba(10,18,32,.88); backdrop-filter: blur(10px); border: 1px solid var(--line-strong); border-radius: 14px; padding: 10px 16px; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.hero-chip span { font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.hero-chip strong { font-family: var(--font-display); font-size: 1.35rem; color: var(--white); }
.hero-chip-a { left: -18px; bottom: 36px; }
.hero-chip-b { right: -10px; top: 28px; }

/* ---------- Codice server ---------- */
.code-box { display: inline-flex; flex-direction: column; gap: 6px; padding: 14px 18px; background: rgba(27,151,227,.10); border: 1px solid rgba(27,151,227,.4); border-radius: 14px; }
.code-label { margin: 0; font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--blue-300); font-weight: 800; }
.code-row { display: flex; align-items: center; gap: 16px; }
.code-value { font-family: var(--font-display); font-size: 2.4rem; letter-spacing: .14em; color: var(--white); line-height: 1; }
.code-box.is-compact .code-value { font-size: 1.8rem; }
.copy-btn { min-width: 108px; }
.copy-btn .copy-idle, .copy-btn .copy-done { display: inline-flex; align-items: center; gap: 8px; }
.copy-btn.is-copied { border-color: var(--ok); color: var(--ok); }
.copy-btn[hidden], .copy-idle[hidden], .copy-done[hidden] { display: none; }

/* ---------- Statistiche ---------- */
.stats-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; padding: 12px 18px; margin-bottom: 18px; background: var(--anthracite); border: 1px solid var(--line); border-radius: 12px; font-size: .88rem; color: var(--muted); }
.stats-bar-status { color: var(--white); font-weight: 700; }
.stats-bar-time { margin-left: auto; }
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); flex: none; }
.stats-bar[data-state="ok"] .live-dot { background: var(--ok); box-shadow: 0 0 0 0 rgba(61,220,151,.6); animation: pulse 2s infinite; }
.stats-bar[data-state="partial"] .live-dot, .stats-bar[data-state="stale"] .live-dot { background: var(--warn); }
.stats-bar[data-state="error"] .live-dot { background: var(--bad); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(61,220,151,.55); } 70% { box-shadow: 0 0 0 10px rgba(61,220,151,0); } 100% { box-shadow: 0 0 0 0 rgba(61,220,151,0); } }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.stat-card { position: relative; background: linear-gradient(180deg, var(--panel), var(--anthracite)); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 14px; overflow: hidden; }
.stat-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--blue), var(--blue-300)); }
.stat-card header { display: flex; align-items: center; gap: 12px; }
.stat-card h3 { margin: 0; font-size: 1.15rem; font-family: var(--font); font-weight: 700; letter-spacing: 0; flex: 1; }
.stat-icon { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: rgba(27,151,227,.16); color: var(--blue-300); flex: none; }
.stat-icon .icon { width: 22px; height: 22px; }
.stat-value { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: clamp(3rem, 5vw, 4.2rem); line-height: 1; color: var(--white); font-variant-numeric: tabular-nums; }
.is-compact .stat-value { font-size: clamp(2.4rem, 4vw, 3.2rem); }
.stat-of { font-size: .45em; color: var(--muted); margin-left: .35em; font-weight: 700; }
.stat-of[hidden] { display: none; }
.stat-meta { margin: 0; display: grid; gap: 8px; }
.stat-meta div { display: flex; justify-content: space-between; gap: 12px; font-size: .9rem; padding-top: 8px; border-top: 1px solid var(--line); }
.stat-meta dt { color: var(--muted); }
.stat-meta dd { margin: 0; color: var(--white); font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.stat-note { margin: 0; font-size: .82rem; color: var(--muted); }
.stat-msg { margin: 0; padding: 10px 12px; font-size: .85rem; border-radius: 10px; background: rgba(245,185,66,.1); border: 1px solid rgba(245,185,66,.35); color: #ffe2a3; }
.stat-msg[hidden] { display: none; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: .7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; background: rgba(255,255,255,.08); color: var(--muted); white-space: nowrap; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
[data-state="ok"] > header .badge { background: rgba(61,220,151,.14); color: var(--ok); }
[data-state="stale"] > header .badge, [data-state="partial"] > header .badge { background: rgba(245,185,66,.14); color: var(--warn); }
[data-state="error"] > header .badge { background: rgba(255,122,122,.14); color: var(--bad); }
[data-state="unconfigured"] > header .badge { background: rgba(159,179,200,.14); color: var(--muted); }
[data-state="stale"] .stat-value { opacity: .55; }
[data-state="unconfigured"] .stat-value, [data-state="error"] .stat-value:has([data-empty="1"]) { color: var(--muted); }
.session-pill { display: inline-flex; padding: 2px 10px; border-radius: 999px; background: rgba(255,255,255,.08); font-size: .82rem; }
.session-pill[data-s="active"] { background: rgba(61,220,151,.16); color: var(--ok); }
.session-pill[data-s="inactive"] { background: rgba(159,179,200,.16); color: #cfdceb; }
.session-pill[data-s="unverifiable"] { background: rgba(245,185,66,.14); color: var(--warn); }
.stat-code .code-box { width: 100%; max-width: 100%; }
.stat-card .code-value { font-size: 2rem; }
.stat-card .code-row { flex-wrap: wrap; gap: 12px; }
.stats-grid .stat-card.stat-code { justify-content: flex-start; }
.is-compact .stat-card { padding: 20px; }

/* ---------- Griglie e card ---------- */
.about-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(28px, 5vw, 72px); align-items: start; }
.facts { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.facts > div { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.facts dt { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--blue-300); font-weight: 800; margin-bottom: 4px; }
.facts dd { margin: 0; font-weight: 600; color: var(--white); }
.facts-stack { grid-template-columns: 1fr; gap: 10px; margin-bottom: 18px; }
.dept-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 22px; }
.dept-grid:has(> :nth-child(5):last-child) { grid-template-columns: repeat(6, 1fr); }
.dept-grid:has(> :nth-child(5):last-child) > .dept-card { grid-column: span 2; }
.dept-grid:has(> :nth-child(5):last-child) > .dept-card:nth-child(n+4) { grid-column: span 3; }
.dept-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .25s, border-color .25s, box-shadow .25s; }
.dept-card:hover { transform: translateY(-6px); border-color: rgba(27,151,227,.55); box-shadow: 0 22px 50px rgba(0,0,0,.4); }
.dept-card-art { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; }
.dept-card-art svg { width: 100%; height: 100%; transition: transform .6s; }
.dept-card:hover .dept-card-art svg { transform: scale(1.06); }
.dept-badge { position: absolute; left: 14px; top: 14px; background: rgba(5,13,26,.82); backdrop-filter: blur(8px); border: 1px solid var(--line-strong); color: var(--white); font-family: var(--font-display); font-size: 1.15rem; font-weight: 800; letter-spacing: .08em; padding: 4px 12px; border-radius: 8px; }
.dept-card-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.dept-card-body h3 { margin: 0; font-size: 1.45rem; }
.dept-card-body h3 a { text-decoration: none; }
.dept-card-body p { margin: 0; color: var(--muted); font-size: .95rem; flex: 1; }
.dept-feature { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(24px, 4vw, 56px); align-items: center; padding: clamp(24px, 4vw, 44px) 0; border-bottom: 1px solid var(--line); }
.dept-feature:last-child { border-bottom: 0; }
.dept-feature.is-flip .dept-feature-art { order: 2; }
.dept-feature-art, .dept-detail-art { position: relative; border-radius: 22px; overflow: hidden; border: 1px solid var(--line-strong); box-shadow: var(--shadow); aspect-ratio: 16 / 10; }
.dept-detail-art { aspect-ratio: 16 / 10; width: min(480px, 100%); }
.dept-feature-art svg, .dept-detail-art svg { width: 100%; height: 100%; }
.dept-feature-body h2 { margin-bottom: .3em; }
.dept-feature-body .lead { margin-bottom: .6em; }
.chip-list { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 20px; }
.chip-list li { padding: 6px 12px; border-radius: 999px; background: rgba(27,151,227,.12); border: 1px solid rgba(27,151,227,.3); font-size: .85rem; font-weight: 600; color: var(--blue-100); }
.chip-list a { text-decoration: none; }
.chip-list li:has(a):hover { background: rgba(27,151,227,.3); }

/* ---------- Testi lunghi ---------- */
.prose-grid { display: grid; grid-template-columns: 1fr 340px; gap: clamp(28px, 5vw, 64px); align-items: start; }
.prose h2 { font-size: 1.9rem; margin-top: 1.4em; }
.prose h2:first-child { margin-top: 0; }
.prose p { color: #c4d3e3; font-size: 1.05rem; max-width: 68ch; }
.side-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.side-card h2 { font-size: 1.5rem; margin: 0; }
.side-card p { color: var(--muted); margin: 0; }
.side-card.sticky { position: sticky; top: calc(var(--header-h) + 24px); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: start; }
.col-title { font-family: var(--font); font-size: 1rem; text-transform: uppercase; letter-spacing: .12em; color: var(--blue-300); font-weight: 800; }
.check-list { list-style: none; display: grid; gap: 14px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.check-list .icon { width: 22px; height: 22px; color: var(--blue); flex: none; margin-top: 2px; }
.principles { list-style: none; display: grid; gap: 12px; }
.principles li { display: grid; gap: 2px; border-left: 3px solid var(--blue); padding: 4px 0 4px 16px; }
.principles strong { font-family: var(--font-display); font-size: 1.3rem; color: var(--white); }
.principles span { color: var(--muted); }
.competency-list { list-style: none; display: grid; gap: 12px; margin-bottom: 8px; }
.competency-list li { display: grid; gap: 2px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; }
.competency-list strong { color: var(--white); }
.competency-list span { color: var(--muted); font-size: .95rem; }
.def-list { margin: 0; display: grid; gap: 14px; }
.def-list div { border-left: 3px solid var(--blue); padding-left: 14px; }
.def-list dt { font-weight: 800; color: var(--white); }
.def-list dd { margin: 2px 0 0; color: #c4d3e3; }

/* ---------- Pagine interne ---------- */
.page-hero { position: relative; padding: clamp(36px, 5vw, 64px) 0 clamp(28px, 4vw, 48px); background: radial-gradient(700px 300px at 85% 0%, rgba(27,151,227,.22), transparent 65%), linear-gradient(180deg, #08101e, var(--navy)); border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
.page-hero-grid { display: block; }
.page-hero-grid.has-aside { display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center; }
.breadcrumb { margin-bottom: 22px; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; font-size: .85rem; color: var(--muted); }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; opacity: .5; }
.breadcrumb a { text-decoration: none; color: var(--blue-300); }
.breadcrumb a:hover { color: var(--white); }
.breadcrumb [aria-current] span { color: var(--white); font-weight: 600; }
.notice { display: flex; gap: 18px; align-items: flex-start; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.notice h2 { font-size: 1.6rem; margin-bottom: .3em; }
.notice p { color: #c4d3e3; }
.notice-icon, .callout-icon, .empty-icon { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: rgba(27,151,227,.16); color: var(--blue-300); flex: none; }
.notice-icon .icon, .callout-icon .icon, .empty-icon .icon { width: 24px; height: 24px; }
.notice-inline { padding: 16px 18px; margin: 20px 0; align-items: center; }
.notice-inline p { margin: 0; }
.callout { display: flex; gap: 20px; align-items: center; background: linear-gradient(120deg, rgba(27,151,227,.22), rgba(27,151,227,.06)); border: 1px solid rgba(27,151,227,.45); border-radius: var(--radius); padding: 24px 28px; }
.callout h2 { margin: 0; font-size: 1.8rem; }
.cta-band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.cta-band h2 { font-size: 1.8rem; margin-bottom: .2em; }
.cta-band p { margin: 0; color: var(--muted); }
.pager { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.pager-link { display: flex; flex-direction: column; padding: 14px 18px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; background: var(--panel); transition: border-color .2s, transform .2s; }
.pager-link:hover { border-color: var(--blue); transform: translateY(-2px); }
.pager-link span { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.pager-link strong { font-family: var(--font-display); font-size: 1.4rem; color: var(--white); }
.pager-link.is-center { text-align: center; }
.pager-link.is-next { text-align: right; }
.not-found { text-align: center; padding-block: 120px; }
.not-found .cta-row { justify-content: center; }
.not-found .lead { margin-inline: auto; }

/* ---------- Fondazione ---------- */
.found-strip { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.found-chip { display: flex; align-items: center; gap: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; min-width: 0; }
.found-chip strong { display: block; color: var(--white); overflow-wrap: anywhere; }
.found-chip span:not(.avatar-sm) { font-size: .82rem; color: var(--blue-300); }
.found-chip.tier-founder { border-color: rgba(27,151,227,.6); background: linear-gradient(120deg, rgba(27,151,227,.22), var(--panel)); }
.avatar-sm { width: 48px; height: 48px; flex: none; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: linear-gradient(145deg, var(--blue), #0b5f98); font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; color: var(--white); }
.avatar-sm img { width: 100%; height: 100%; object-fit: cover; }
.found-page .tier { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.tier-label { margin: 0; font-size: .75rem; letter-spacing: .22em; text-transform: uppercase; color: var(--blue-300); font-weight: 800; }
.tier-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; width: min(820px, 100%); }
.tier-connector { width: 2px; height: 44px; margin: 6px auto; background: linear-gradient(var(--blue), transparent); }
.profile { position: relative; background: linear-gradient(180deg, var(--panel), var(--anthracite)); border: 1px solid var(--line); border-radius: 22px; padding: 28px 26px; text-align: center; width: min(400px, 100%); display: flex; flex-direction: column; align-items: center; transition: transform .25s, border-color .25s; }
.profile:hover { transform: translateY(-5px); border-color: rgba(27,151,227,.6); }
.tier-grid .profile { width: 100%; }
.profile.is-big { width: min(520px, 100%); padding: 40px 34px; border-color: rgba(27,151,227,.7); background: radial-gradient(500px 220px at 50% 0%, rgba(27,151,227,.3), transparent 70%), linear-gradient(180deg, var(--panel-2), var(--anthracite)); box-shadow: 0 24px 70px rgba(27,151,227,.18); }
.profile-avatar { width: 112px; height: 112px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: linear-gradient(145deg, var(--blue), #0b5f98); border: 4px solid rgba(255,255,255,.12); margin-bottom: 18px; font-family: var(--font-display); font-weight: 800; font-size: 3.4rem; color: var(--white); }
.profile.is-big .profile-avatar { width: 144px; height: 144px; font-size: 4.4rem; border-color: var(--blue-300); }
.tier-cofounder .profile-avatar { width: 124px; height: 124px; }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-role { margin: 0 0 4px; font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--blue-300); font-weight: 800; }
.profile-name { margin: 0 0 10px; font-size: 2rem; overflow-wrap: anywhere; }
.profile.is-big .profile-name { font-size: 2.8rem; }
.profile-desc { margin: 0; color: var(--muted); }
.profile-links { list-style: none; display: flex; gap: 10px; margin-top: 14px; }
.profile-links a { display: inline-flex; gap: 6px; align-items: center; color: var(--blue-300); font-weight: 700; text-decoration: none; }
.profile-links .icon { width: 16px; height: 16px; }

/* ---------- Come entrare ---------- */
.join-layout { display: grid; grid-template-columns: 1fr 320px; gap: clamp(24px, 4vw, 56px); align-items: start; }
.join-steps { list-style: none; display: grid; gap: 16px; counter-reset: s; }
.join-step { display: grid; grid-template-columns: 56px 1fr; gap: 18px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; scroll-margin-top: 96px; }
.join-n { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: linear-gradient(145deg, var(--blue), #0b5f98); font-family: var(--font-display); font-size: 1.9rem; font-weight: 800; color: var(--white); }
.join-body h2 { font-size: 1.5rem; margin-bottom: .25em; }
.join-body p { color: #c4d3e3; margin-bottom: 12px; }
.join-action { margin-top: 4px; }

/* ---------- Canali ufficiali ---------- */
.hub { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.hub-card { display: flex; gap: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; transition: border-color .2s, transform .2s; }
.hub-card:hover { border-color: rgba(27,151,227,.55); transform: translateY(-3px); }
.hub-card.is-inactive { opacity: .85; border-style: dashed; }
.hub-icon { width: 48px; height: 48px; border-radius: 13px; display: grid; place-items: center; background: rgba(27,151,227,.16); color: var(--blue-300); flex: none; }
.hub-icon .icon { width: 26px; height: 26px; }
.hub-body { flex: 1; min-width: 0; }
.hub-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.hub-title h3 { margin: 0; font-size: 1.3rem; }
.hub-body p { margin: 6px 0 14px; color: var(--muted); font-size: .92rem; }
.status-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; background: rgba(255,255,255,.08); color: var(--muted); }
.status-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-chip.is-on { background: rgba(61,220,151,.14); color: var(--ok); }
.status-chip.is-off, .status-chip.sev-missing { background: rgba(245,185,66,.14); color: var(--warn); }
.status-chip.sev-warning { background: rgba(255,122,122,.14); color: var(--bad); }
.status-chip.sev-info { background: rgba(159,179,200,.14); color: var(--muted); }

/* ---------- Passi homepage ---------- */
.steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.step-card a { position: relative; display: flex; flex-direction: column; gap: 8px; height: 100%; text-decoration: none; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; transition: transform .25s, border-color .25s; overflow: hidden; }
.step-card a:hover { transform: translateY(-5px); border-color: var(--blue); }
.step-n { position: absolute; right: 18px; top: 8px; font-family: var(--font-display); font-size: 3.6rem; font-weight: 800; color: rgba(255,255,255,.06); line-height: 1; }
.step-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: rgba(27,151,227,.16); color: var(--blue-300); }
.step-card h3 { margin: 8px 0 0; font-size: 1.35rem; }
.step-card p { margin: 0; color: var(--muted); font-size: .93rem; }

/* ---------- Shop ---------- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.product-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .25s, border-color .25s; }
.product-card:hover { transform: translateY(-5px); border-color: rgba(27,151,227,.55); }
.product-card[hidden] { display: none; }
.product-media { position: relative; aspect-ratio: 16 / 10; background: linear-gradient(145deg, #0d3a63, #0a1d33); display: grid; place-items: center; }
.product-media img { width: 100%; height: 100%; object-fit: cover; }
.product-ph { font-family: var(--font-display); font-size: 3.6rem; font-weight: 800; color: rgba(255,255,255,.35); }
.product-media .badge { position: absolute; right: 12px; top: 12px; }
.badge-available { background: rgba(61,220,151,.18); color: var(--ok); }
.badge-soon { background: rgba(245,185,66,.18); color: var(--warn); }
.badge-unavailable { background: rgba(255,122,122,.18); color: var(--bad); }
.product-body { padding: 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-body h3 { margin: 0; font-size: 1.4rem; }
.product-body p { margin: 0; color: var(--muted); font-size: .93rem; }
.product-cat { font-size: .7rem !important; letter-spacing: .14em; text-transform: uppercase; color: var(--blue-300) !important; font-weight: 800; }
.product-terms { font-size: .85rem; color: var(--muted); }
.product-terms summary { cursor: pointer; color: var(--blue-300); font-weight: 600; }
.product-foot { margin-top: auto; padding-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.price { font-family: var(--font-display); font-size: 1.6rem; color: var(--white); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.filter { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: var(--text); font: 700 .88rem var(--font); cursor: pointer; transition: background .2s, border-color .2s; }
.filter:hover { border-color: var(--blue-300); }
.filter.is-active { background: var(--blue); border-color: var(--blue); color: var(--white); }
.empty-state { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 22px; background: var(--panel); border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 24px 28px; }
.empty-state h2, .empty-state h3 { margin: 0 0 .15em; }
.empty-state p { margin: 0; color: var(--muted); max-width: 60ch; }
.empty-state > div { flex: 1; min-width: 240px; }
.empty-state.is-large { padding: clamp(32px, 6vw, 64px); justify-content: center; text-align: left; }
.shop-note { margin-top: 28px; }

/* ---------- Admin ---------- */
.admin-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.admin-table th, .admin-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.admin-table th { color: var(--blue-300); font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; }
.admin-table code { color: var(--blue-100); font-size: .85rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); border-top: 1px solid var(--line); padding: 56px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr 1fr; gap: 36px; }
.footer-brand p { color: var(--muted); font-size: .92rem; margin-top: 14px; }
.footer-code { display: inline-flex; gap: 10px; align-items: center; padding: 8px 14px; border: 1px solid rgba(27,151,227,.4); background: rgba(27,151,227,.1); border-radius: 10px; }
.footer-code span { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--blue-300); font-weight: 800; }
.footer-code strong { font-family: var(--font-display); font-size: 1.3rem; letter-spacing: .12em; color: var(--white); }
.site-footer h2 { font-family: var(--font); font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--blue-300); margin-bottom: 14px; }
.site-footer ul { list-style: none; display: grid; gap: 8px; }
.site-footer li a { text-decoration: none; color: #c4d3e3; font-size: .93rem; }
.site-footer li a:hover { color: var(--white); text-decoration: underline; text-underline-offset: 4px; }
.site-footer li a span { color: var(--muted); font-size: .8rem; display: block; }
.footer-bottom { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line); display: grid; gap: 8px; font-size: .82rem; color: var(--muted); }
.footer-bottom p { margin: 0; }
.disclaimer { max-width: 90ch; opacity: .8; }

/* Animazioni: vedi /css/motion.css (sistema di movimento e prefers-reduced-motion). */

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .nav-desktop, .header-cta { display: none; }
  .nav-toggle { display: grid; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .found-strip { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .dept-grid:has(> :nth-child(5):last-child) { grid-template-columns: repeat(2, 1fr); }
  .dept-grid:has(> :nth-child(5):last-child) > .dept-card, .dept-grid:has(> :nth-child(5):last-child) > .dept-card:nth-child(n+4) { grid-column: auto; }
  .hero-grid, .about-grid, .prose-grid, .join-layout, .two-col, .dept-feature { grid-template-columns: 1fr; }
  .dept-feature.is-flip .dept-feature-art { order: 0; }
  .hero-visual { max-width: 560px; margin-inline: auto; width: 100%; }
  .hero-chip-a { left: 6px; } .hero-chip-b { right: 6px; }
  .stats-grid { grid-template-columns: 1fr; }
  .side-card.sticky { position: static; }
  .page-hero-grid.has-aside { grid-template-columns: 1fr; }
  .dept-detail-art { width: 100%; }
}
@media (max-width: 640px) {
  :root { --header-h: 64px; }
  .container { width: min(1200px, 100% - 32px); }
  .brand-text small { display: none; }
  .hero-actions .btn-lg { width: 100%; }
  .code-row { flex-wrap: wrap; gap: 12px; }
  .facts { grid-template-columns: 1fr; }
  .steps, .found-strip, .tier-grid, .pager { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .join-step { grid-template-columns: 44px 1fr; padding: 18px; gap: 14px; }
  .join-n { width: 44px; height: 44px; font-size: 1.5rem; border-radius: 12px; }
  .callout { flex-direction: column; align-items: flex-start; }
  .profile.is-big .profile-name { font-size: 2.2rem; }
  .stats-bar-time { margin-left: 0; width: 100%; }
  .dept-grid, .dept-grid:has(> :nth-child(5):last-child) { grid-template-columns: 1fr; }
  .dept-grid:has(> :nth-child(5):last-child) > .dept-card, .dept-grid:has(> :nth-child(5):last-child) > .dept-card:nth-child(n+4) { grid-column: auto; }
  .pager-link.is-center, .pager-link.is-next { text-align: left; }
  .admin-table { display: block; overflow-x: auto; }
}

/* ===== Integrazione dati reali: logo, SSU, vantaggi, regolamento ===== */
.brand-logo { width: 46px; height: 46px; border-radius: 0; filter: drop-shadow(0 4px 12px rgba(27,151,227,.35)); }
.hero-visual { position: relative; }
.hero-emblem { position: absolute; left: -26px; top: -30px; width: 108px; height: 108px; padding: 14px; border-radius: 26px; background: rgba(10,18,32,.92); border: 1px solid var(--line-strong); box-shadow: var(--shadow), 0 0 0 6px rgba(27,151,227,.10); object-fit: contain; z-index: 2; }

.ssu-card { background: linear-gradient(120deg, rgba(27,151,227,.18), rgba(27,151,227,.05)); border: 1px solid rgba(27,151,227,.4); border-radius: var(--radius); padding: 24px 28px; display: grid; gap: 18px; }
.ssu-head { display: flex; align-items: center; gap: 16px; }
.ssu-head .eyebrow { margin: 0 0 4px; }
.ssu-head h3 { margin: 0; font-size: 1.7rem; }
.ssu-slots { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.ssu-slot { background: rgba(10,18,32,.55); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; display: grid; gap: 4px; align-content: start; }
.ssu-label { font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--blue-300); }
.ssu-time { font-family: var(--font-display); font-size: 2.3rem; line-height: 1; color: var(--white); font-variant-numeric: tabular-nums; }
.ssu-detail { color: #c4d3e3; font-size: .95rem; font-weight: 600; }
.ssu-note { color: var(--muted); font-size: .88rem; }
.ssu-foot { margin: 0; color: var(--muted); font-size: .92rem; }
.join-body .ssu-card { margin-top: 14px; padding: 18px; }
.join-body .ssu-slots { grid-template-columns: 1fr 1fr; }

.perk-list { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 6px; }
.perk-list li { display: flex; align-items: flex-start; gap: 8px; color: #c4d3e3; font-size: .93rem; }
.perk-list .icon { width: 18px; height: 18px; color: var(--ok); flex: none; margin-top: 2px; }
.note-list { margin: 0 0 12px; padding-left: 1.1em; display: grid; gap: 6px; color: #c4d3e3; }
.shop-note { align-items: flex-start; margin-top: 28px; }
.shop-note h2 { font-size: 1.4rem; margin-bottom: .5em; }

.check-list-row { grid-template-columns: repeat(3, 1fr); margin-bottom: 36px; }
.principles-grid { grid-template-columns: repeat(4, 1fr); gap: 22px 26px; margin-top: 18px; }
.principles-grid span { font-size: .93rem; }
.rule-cards { list-style: none; margin: 0 0 40px; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.rule-card { display: flex; gap: 16px; align-items: flex-start; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.rule-card h3 { margin: 0 0 6px; font-size: 1.35rem; }
.rule-card p { margin: 0; color: #c4d3e3; font-size: .97rem; }
.rule-list { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 10px; }
.rule-list li { display: flex; gap: 12px; align-items: flex-start; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; color: #c4d3e3; }
.rule-list .icon { width: 20px; height: 20px; color: var(--blue); flex: none; margin-top: 3px; }
.source-line { font-size: .88rem !important; color: var(--muted) !important; }
.status-chip.is-job { background: rgba(27,151,227,.16); color: var(--blue-300); }
.side-sub { margin: 10px 0 0; font-size: 1.15rem; }
.side-hint { font-size: .85rem !important; }

@media (max-width: 1100px) {
  .principles-grid { grid-template-columns: repeat(2, 1fr); }
  .check-list-row { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .rule-cards { grid-template-columns: 1fr; }
  .hero-emblem { left: 6px; top: -22px; width: 84px; height: 84px; padding: 10px; border-radius: 20px; }
}
@media (max-width: 640px) {
  .principles-grid { grid-template-columns: 1fr; }
  .ssu-card { padding: 18px; }
}

/* ===== Selettore dei portali (sito ↔ CAD) ===== */
.portal-switch { position: relative; flex: none; }
.ps-button { display: flex; align-items: center; gap: 10px; padding: 6px 10px 6px 6px; border-radius: 12px; border: 1px solid var(--line-strong); background: rgba(255,255,255,.04); color: var(--white); cursor: pointer; list-style: none; user-select: none; transition: background .2s, border-color .2s, box-shadow .2s; }
.ps-button::-webkit-details-marker { display: none; }
.ps-button:hover, .portal-switch[open] .ps-button { border-color: rgba(92,200,255,.55); background: rgba(27,151,227,.12); }
.portal-switch[open] .ps-button { box-shadow: 0 0 0 4px rgba(27,151,227,.14); }
.ps-mark { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: none; background: linear-gradient(145deg, #12304f, #0b1a2e); border: 1px solid rgba(255,255,255,.1); color: var(--white); }
.ps-mark img { width: 22px; height: 22px; object-fit: contain; }
.ps-mark .icon { width: 18px; height: 18px; }
.ps-mark-cad { background: linear-gradient(145deg, var(--blue), #0b5f98); border-color: rgba(92,200,255,.45); box-shadow: 0 4px 14px rgba(27,151,227,.35); }
.ps-label { display: flex; flex-direction: column; line-height: 1.1; text-align: left; }
.ps-label small { font-size: .62rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.ps-label strong { font-size: .9rem; white-space: nowrap; }
.ps-chevron .icon { width: 16px; height: 16px; color: var(--muted); transition: transform .25s cubic-bezier(.22,1,.36,1); }
.portal-switch[open]:not(.is-closing) .ps-chevron .icon { transform: rotate(180deg); }
.ps-menu { position: absolute; right: 0; top: calc(100% + 10px); z-index: 120; width: min(320px, calc(100vw - 32px)); padding: 8px; border-radius: 16px; background: var(--anthracite); border: 1px solid var(--line-strong); box-shadow: var(--shadow), 0 0 0 1px rgba(0,0,0,.2); transform-origin: top right; }
.portal-switch[open] .ps-menu { animation: ps-in .22s cubic-bezier(.22,1,.36,1) both; }
.portal-switch.is-closing .ps-menu { animation: ps-out .16s cubic-bezier(.55,0,1,.45) both; }
@keyframes ps-in { from { opacity: 0; transform: translateY(-6px) scale(.97); } }
@keyframes ps-out { to { opacity: 0; transform: translateY(-6px) scale(.97); } }
.ps-head { margin: 4px 10px 8px; font-size: .66rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--blue-300); }
.ps-list { list-style: none; display: grid; gap: 4px; }
.ps-item { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 11px; text-decoration: none; color: var(--text); border: 1px solid transparent; transition: background .18s, border-color .18s, transform .18s; }
.ps-item:hover, .ps-item:focus-visible { background: rgba(27,151,227,.12); }
.ps-item:hover { transform: translateX(2px); }
.ps-item.is-current { background: rgba(27,151,227,.16); border-color: rgba(27,151,227,.45); }
.ps-item .ps-mark { width: 38px; height: 38px; border-radius: 11px; }
.ps-item .ps-mark img { width: 26px; height: 26px; }
.ps-text { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.25; }
.ps-text strong { color: var(--white); font-size: .95rem; }
.ps-text small { color: var(--muted); font-size: .8rem; }
.ps-check { width: 20px; flex: none; color: var(--blue-300); }
.ps-check .icon { width: 18px; height: 18px; }
.portal-switch[open] .ps-item { animation: item-in .32s cubic-bezier(.22,1,.36,1) both; }
.portal-switch[open] li:nth-child(2) .ps-item { animation-delay: 40ms; }
@keyframes item-in { from { opacity: 0; transform: translateY(-4px); } }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ps-short { display: none; }
/* header del sito: selettore compatto (solo etichetta), le voci del menu restano su una riga */
.site-header .ps-button { padding: 7px 10px 7px 12px; }
.site-header .ps-button > .ps-mark { display: none; }
.site-header .ps-full { display: none; }
.site-header .ps-short { display: inline; }
.header-inner { gap: 20px; }
.nav-link { white-space: nowrap; }
@media (max-width: 1240px) and (min-width: 1101px) {
  .header-inner { gap: 14px; }
  .nav-link { padding-inline: 10px; }
  .brand-text small { display: none; }
}
@media (max-width: 1100px) {
  .site-header .ps-button > .ps-mark { display: grid; }
  .portal-switch { margin-left: auto; }
  .nav-toggle { margin-left: 0; }
}
@media (max-width: 640px) {
  .ps-button { padding: 5px 8px 5px 5px; gap: 6px; }
  .ps-button .ps-label { display: none; }
  .ps-menu { position: fixed; left: 16px; right: 16px; top: calc(var(--header-h, 64px) + 6px); width: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .portal-switch[open] .ps-menu, .portal-switch[open] .ps-item { animation: none; }
}

.product-logo { width: 96px !important; height: 96px !important; object-fit: contain !important; opacity: .9; filter: drop-shadow(0 6px 18px rgba(27,151,227,.45)); }
.product-foot { flex-wrap: wrap; }
.price { white-space: nowrap; }
