/* Junzhuoys — styles.css. Utility u-* + componenti cv-* */

:root {
  --bg: #FFFBF0;
  --alt: #F7EED6;
  --dark: #2A2110;
  --gold: #B7791F;
  --ink-gold: #8F5C12;
  --green: #3F6B5C;
  --red: #9C3D2E;
  --text: #241D0E;
  --muted: #64563C;
  --line: #EFE3C4;
  --line-2: #D9C79F;
  --field: #8A7A5B;
  --glass: rgba(255, 251, 240, .66);
  --glass-line: rgba(42, 33, 16, .14);
  --shc: #EBD7AE;
  --shc: color-mix(in srgb, var(--gold) 32%, var(--bg));
  --cta-bg: #3F6B5C;
  --cta-fg: #FFFFFF;
  --foot-bg: #2A2110;
  --foot-fg: #EFE3C4;
  --foot-a: #E0A84A;
  --halo: rgba(183, 121, 31, .2);
  --sh-long: 1px 1px 0 var(--shc), 2px 2px 0 var(--shc), 3px 3px 0 var(--shc), 4px 4px 0 var(--shc),
    5px 5px 0 var(--shc), 6px 6px 0 var(--shc), 7px 7px 0 var(--shc), 8px 8px 0 var(--shc),
    9px 9px 0 var(--shc), 10px 10px 0 var(--shc);
  --f-head: "Chivo", "Arial Narrow", system-ui, sans-serif;
  --f-body: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --wrap: 1240px;
  --pill: 999px;
  --sq: 2px;
  color-scheme: light;
}

:root[data-tema="scuro"] {
  --bg: #1A1509;
  --alt: #241D0E;
  --dark: #0F0C05;
  --gold: #E0A84A;
  --ink-gold: #E0A84A;
  --green: #8DBFA9;
  --red: #E58A74;
  --text: #F5ECD8;
  --muted: #BFAF8E;
  --line: #3A301C;
  --line-2: #574A2E;
  --field: #9E8D6A;
  --glass: rgba(36, 29, 14, .62);
  --glass-line: rgba(245, 236, 216, .14);
  --shc: #3B2E14;
  --shc: color-mix(in srgb, var(--gold) 22%, var(--bg));
  --cta-bg: #8DBFA9;
  --cta-fg: #12100A;
  --foot-bg: #0F0C05;
  --halo: rgba(224, 168, 74, .12);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-tema]) {
    --bg: #1A1509; --alt: #241D0E; --dark: #0F0C05; --gold: #E0A84A; --ink-gold: #E0A84A;
    --green: #8DBFA9; --red: #E58A74; --text: #F5ECD8; --muted: #BFAF8E; --line: #3A301C;
    --line-2: #574A2E; --field: #9E8D6A; --glass: rgba(36, 29, 14, .62); --glass-line: rgba(245, 236, 216, .14);
    --shc: #3B2E14; --cta-bg: #8DBFA9; --cta-fg: #12100A; --foot-bg: #0F0C05; --halo: rgba(224, 168, 74, .12);
    color-scheme: dark;
  }
}

/* ---------- reset & base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 1.0625rem/1.7 var(--f-body);
  overflow-x: hidden;
}
@media (min-width: 1024px) { body { font-size: 1.125rem; } }
img, svg { max-width: 100%; height: auto; }
h1, h2, h3, h4 { font-family: var(--f-head); line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.01em; text-wrap: balance; }
h1 { font-weight: 900; font-size: clamp(2.3rem, 5.2vw, 4.4rem); }
h2 { font-weight: 900; font-size: clamp(1.7rem, 3.4vw, 2.6rem); }
h3 { font-weight: 700; font-size: clamp(1.2rem, 2vw, 1.45rem); }
p, ul, ol, table, figure, blockquote { margin: 0 0 1.1em; }
p, li { text-wrap: pretty; }
a { color: var(--ink-gold); text-decoration-thickness: 1.5px; text-underline-offset: .18em; }
a:hover { color: var(--red); }
strong { font-weight: 600; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 2px; }
main:focus { outline: none; }
abbr { text-decoration: none; }
hr { border: 0; }

/* ---------- utility */
.u-wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 16px; }
@media (min-width: 768px) { .u-wrap { padding-inline: 32px; } }
.u-measure { max-width: 68ch; }
.u-flow > * + * { margin-top: 0; }
.u-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.u-mono { font-family: var(--f-mono); font-size: .9em; }
.u-muted { color: var(--muted); }
.u-center { text-align: center; }
.u-mt { margin-top: 2rem; }
.u-grid { display: grid; gap: 20px; }
@media (min-width: 768px) { .u-grid--2 { grid-template-columns: repeat(2, 1fr); } .u-grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .u-grid--3 { grid-template-columns: repeat(3, 1fr); } }
.u-mesh { height: 28px; color: var(--line-2); }
@supports ((mask-image: none) or (-webkit-mask-image: none)) {
  .u-mesh {
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='42'%3E%3Cpath d='M12 0V7L0 14V28L12 35V42M12 7L24 14V28L12 35' fill='none' stroke='%23000' stroke-width='1.6'/%3E%3C/svg%3E") repeat 0 0 / 16px 28px;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='42'%3E%3Cpath d='M12 0V7L0 14V28L12 35V42M12 7L24 14V28L12 35' fill='none' stroke='%23000' stroke-width='1.6'/%3E%3C/svg%3E") repeat 0 0 / 16px 28px;
  }
}
.u-mesh--foot { color: #574A2E; }

/* ---------- skip, header, nav */
.cv-skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: var(--pill); }
.cv-skip:focus { top: 12px; color: var(--bg); }

.cv-head { position: sticky; top: 0; z-index: 30; background: var(--bg); background: color-mix(in srgb, var(--bg) 92%, transparent); border-bottom: 1px solid var(--line); }
@supports (backdrop-filter: blur(4px)) { .cv-head { backdrop-filter: blur(8px); } }
.cv-head__in { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px 16px; min-height: 72px; }
.cv-logo { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-family: var(--f-head); font-weight: 900; font-size: 1.45rem; letter-spacing: .02em; min-height: 44px; }
.cv-logo:hover { color: var(--text); }
.cv-logo__mark { flex: none; color: var(--text); }
.cv-head__r { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.cv-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 6px; }
.cv-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; color: var(--text); text-decoration: none; font-weight: 600; font-size: .95rem; border-radius: var(--pill); }
.cv-nav a:hover { background: var(--alt); color: var(--text); }
.cv-nav a[aria-current="page"] { box-shadow: inset 0 0 0 2px var(--gold); }

/* mobile senza JS: i link restano visibili sotto il logo */
.cv-nav--l { grid-column: 1 / -1; order: 3; }
.cv-logo { order: 1; }
.cv-head__r { order: 2; }
html.cv-ready .cv-nav { display: none; }
.cv-theme, .cv-burger {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 44px; min-height: 44px;
  padding: 0 12px; background: transparent; color: var(--text); border: 2px solid var(--line-2); border-radius: var(--pill);
  font: 600 .9rem var(--f-body); cursor: pointer;
}
.cv-theme[hidden], .cv-burger[hidden] { display: none; }
.cv-theme:hover, .cv-burger:hover { border-color: var(--gold); }
.cv-theme .cv-ico:last-child { display: none; }
:root[data-tema="scuro"] .cv-theme .cv-ico:first-child { display: none; }
:root[data-tema="scuro"] .cv-theme .cv-ico:last-child { display: inline; }

@media (min-width: 1024px) {
  .cv-head__in { grid-template-columns: 1fr auto 1fr; min-height: 84px; }
  .cv-nav--l { grid-column: auto; order: 0; }
  .cv-logo { order: 0; justify-self: center; }
  .cv-head__r { order: 0; }
  html.cv-ready .cv-nav { display: block; }
  html.cv-ready .cv-burger { display: none; }
}

.cv-scrim { position: fixed; inset: 0; z-index: 39; background: rgba(15, 12, 5, .55); }
.cv-scrim[hidden] { display: none; }
.cv-panel {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 40; width: min(86vw, 360px); padding: 20px;
  background: var(--bg); border-left: 3px solid var(--gold); box-shadow: -10px 0 0 var(--shc);
  transform: translateX(105%); transition: transform .3s ease; overflow-y: auto; visibility: hidden;
}
.cv-panel[hidden] { display: block; }
.cv-panel.is-open { transform: none; visibility: visible; }
.cv-panel__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.cv-panel__t { font-family: var(--f-head); font-weight: 900; font-size: 1.3rem; }
.cv-panel__x { min-width: 44px; min-height: 44px; border: 2px solid var(--line-2); border-radius: var(--pill); background: none; color: var(--text); cursor: pointer; }
.cv-panel__list { list-style: none; padding: 0; margin: 0 0 20px; }
.cv-panel__list a { display: flex; align-items: center; min-height: 48px; padding: 0 8px; color: var(--text); text-decoration: none; font-weight: 600; border-bottom: 1px dashed var(--line-2); }
.cv-panel__list a[aria-current="page"] { color: var(--ink-gold); }
.cv-panel__note { font-size: .92rem; color: var(--muted); }
.cv-panel__note .cv-ico { vertical-align: -6px; }

.cv-ico { width: 24px; height: 24px; flex: none; }
@media (max-width: 479px) {
  .cv-logo { font-size: 1.2rem; gap: 8px; }
  .cv-logo__mark { width: 38px; height: 38px; }
  .cv-burger span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .cv-burger { padding: 0; }
}

/* ---------- breadcrumbs, meta */
.cv-crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 18px 0 0; margin: 0; font-size: .92rem; color: var(--muted); }
.cv-crumbs li + li::before { content: "›"; margin-right: 6px; }
.cv-crumbs a { color: var(--muted); }
.cv-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; font-size: .93rem; color: var(--muted); border-block: 1px dashed var(--line-2); padding: 10px 0; }
.cv-meta .cv-ico { color: var(--ink-gold); }

/* ---------- buttons */
.cv-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 10px 22px;
  border: 2px solid currentColor; border-radius: var(--pill); background: transparent; color: var(--text);
  font: 600 1rem var(--f-body); text-decoration: none; cursor: pointer; transition: background-color .2s, color .2s;
}
.cv-btn:hover { color: var(--text); background: var(--alt); background: color-mix(in srgb, var(--gold) 16%, transparent); }
.cv-btn--gold { color: var(--ink-gold); border-width: 3px; }
.cv-btn--gold:hover { color: var(--ink-gold); }
.cv-btn .cv-ico { transition: transform .2s; }
.cv-btn:hover .cv-ico { transform: translateX(3px); }
.cv-btns { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- hero */
.cv-hero { position: relative; padding: 32px 0 24px; overflow: hidden; }
.cv-hero__in { display: grid; gap: 28px; align-items: center; }
.cv-hero__kick { display: inline-flex; align-items: center; gap: 8px; font-family: var(--f-mono); font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-gold); border: 1.5px dashed var(--gold); padding: 6px 14px; border-radius: var(--pill); margin-bottom: 18px; }
.cv-hero h1 { font-size: clamp(2.4rem, 6.4vw, 5rem); margin-bottom: .35em; }
.cv-hero h1 em { font-style: normal; color: var(--ink-gold); }
.cv-hero__lead { font-size: 1.15em; max-width: 34em; }
.cv-hero__facts { display: flex; flex-wrap: wrap; gap: 10px 22px; list-style: none; padding: 0; margin: 22px 0 0; font-size: .95rem; color: var(--muted); }
.cv-hero__facts li { display: flex; align-items: center; gap: 8px; }
.cv-hero__facts .cv-ico { color: var(--ink-gold); }
.cv-hero__art { position: relative; justify-self: center; width: min(100%, 560px); }
.cv-hero__art::before { content: ""; position: absolute; inset: 8% -20% -10% 10%; background: radial-gradient(closest-side, var(--halo), transparent); z-index: -1; }
.cv-ill { display: block; width: 100%; height: auto; }
:root[data-tema="scuro"] .cv-ill { filter: brightness(.93); }
@media (min-width: 1024px) {
  .cv-hero { padding: 56px 0 40px; }
  .cv-hero__in { grid-template-columns: 1.15fr .85fr; gap: 24px; }
  .cv-hero__art { width: 118%; margin-right: -18%; transform: rotate(-4deg); }
}

/* ---------- nastro dei mesi */
.cv-year { padding-block: 12px 8px; }
.cv-year__t { font-family: var(--f-mono); font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 10px; }
.cv-year ol { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.cv-year li { position: relative; padding: 10px 12px 12px; border: 1.5px solid var(--line-2); border-radius: var(--sq); background: var(--bg); font-size: .86rem; line-height: 1.4; }
.cv-year b { display: block; font-family: var(--f-head); font-weight: 900; font-size: 1rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-gold); }
.cv-year li.is-now { border: 2.5px solid var(--gold); background: var(--alt); box-shadow: var(--sh-long); }
.cv-year li.is-now::after { content: "adesso"; position: absolute; top: -10px; right: 8px; background: var(--red); color: #FFFBF0; font: 700 .7rem var(--f-mono); text-transform: uppercase; padding: 2px 8px; border-radius: var(--pill); }
:root[data-tema="scuro"] .cv-year li.is-now::after { color: #12100A; }
@media (min-width: 480px) { .cv-year ol { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 768px) { .cv-year ol { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1280px) { .cv-year ol { grid-template-columns: repeat(6, 1fr); } }

/* ---------- timeline */
.cv-line { position: relative; padding-block: 24px 8px; }
.cv-line::before { content: ""; position: absolute; top: 0; bottom: 0; left: 39px; border-left: 3px dashed var(--gold); opacity: .7; }
.cv-stop { position: relative; display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 16px; padding: 36px 0; }
.cv-stop__when { position: relative; z-index: 1; }
.cv-stamp { width: 64px; height: 64px; display: block; transform: rotate(-8deg); }
.cv-stop__label { font-family: var(--f-mono); font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; color: var(--red); margin: 0 0 6px; }
.cv-stop__body { min-width: 0; }
.cv-stop__body > h2 { max-width: 22ch; }
.cv-stop__intro { max-width: 66ch; font-size: 1.05em; }
@media (min-width: 768px) {
  .cv-line::before { left: 79px; }
  .cv-stop { grid-template-columns: 140px minmax(0, 1fr); gap: 28px; padding: 56px 0; }
  .cv-stamp { width: 96px; height: 96px; margin-left: 32px; position: sticky; top: 110px; }
  .cv-stop__when { height: 100%; }
}

/* ---------- card in vetro */
.cv-card {
  position: relative; padding: 22px; border-radius: var(--sq);
  background: var(--alt); border: 1px solid var(--glass-line);
  box-shadow: var(--sh-long);
}
@supports ((backdrop-filter: blur(4px)) or (-webkit-backdrop-filter: blur(4px))) {
  .cv-card { background: var(--glass); -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%); }
}
.cv-card h3 { display: flex; align-items: center; gap: 10px; }
.cv-card h3 .cv-ico { color: var(--ink-gold); width: 28px; height: 28px; }
.cv-card > :last-child { margin-bottom: 0; }
.cv-card--link { display: flex; flex-direction: column; color: var(--text); text-decoration: none; transition: transform .2s; }
.cv-card--link:hover { color: var(--text); transform: translate(-3px, -3px); }
.cv-card__more { margin-top: auto; padding-top: 12px; display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink-gold); }
.u-halo { position: relative; isolation: isolate; }
.u-halo::before, .u-halo::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; pointer-events: none; }
.u-halo::before { width: 340px; height: 340px; right: 6%; top: 10%; border: 26px solid var(--halo); }
.u-halo::after { width: 220px; height: 220px; left: 18%; bottom: 0; background: var(--halo); }

/* ---------- tabelle */
.cv-tablewrap { overflow-x: auto; margin: 0 0 1.4em; border: 1.5px solid var(--line-2); border-radius: var(--sq); background: var(--bg); }
.cv-table { width: 100%; border-collapse: collapse; font-size: .95rem; margin: 0; min-width: 520px; }
.cv-table caption { text-align: left; padding: 12px 14px; font-family: var(--f-head); font-weight: 700; font-size: 1.05rem; border-bottom: 1.5px solid var(--line-2); background: var(--alt); }
.cv-table th, .cv-table td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.cv-table thead th { font-family: var(--f-head); font-size: .88rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--bg); }
.cv-table tbody tr:hover { background: var(--alt); }
.cv-table td.n, .cv-table th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cv-table tfoot td, .cv-table tfoot th { font-weight: 600; border-top: 2px solid var(--line-2); }
.cv-sort { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0; background: none; border: 0; color: inherit; font: inherit; text-transform: inherit; letter-spacing: inherit; cursor: pointer; }
.cv-sort::after { content: "⇅"; font-size: .9em; opacity: .55; }
th[aria-sort="ascending"] .cv-sort::after { content: "↑"; opacity: 1; color: var(--ink-gold); }
th[aria-sort="descending"] .cv-sort::after { content: "↓"; opacity: 1; color: var(--ink-gold); }
.cv-dots { letter-spacing: 2px; color: var(--ink-gold); }

/* ---------- articoli */
.cv-art { padding-block: 8px 48px; }
.cv-art__head { padding: 24px 0 8px; max-width: 900px; }
.cv-art__lead { font-size: 1.15em; color: var(--muted); max-width: 60ch; }
.cv-art__grid { display: grid; gap: 40px; }
.cv-art__main { min-width: 0; max-width: 72ch; }
.cv-art__main h2 { margin-top: 1.6em; padding-top: .6em; border-top: 3px solid var(--line); }
.cv-art__main h3 { margin-top: 1.4em; }
.cv-art__main ul, .cv-art__main ol { padding-left: 1.3em; }
.cv-art__main li { margin-bottom: .4em; }
.cv-art__fig { margin: 24px 0 32px; }
.cv-art__fig figcaption, .cv-gal figcaption { font-size: .9rem; color: var(--muted); margin-top: 8px; }
.cv-toc { align-self: start; }
.cv-toc h2 { font-size: 1.1rem; margin: 0 0 10px; }
.cv-toc ol { padding-left: 1.2em; margin: 0; font-size: .95rem; }
.cv-toc li { margin-bottom: 6px; }
@media (min-width: 1024px) {
  .cv-art__grid { grid-template-columns: minmax(0, 1fr) 290px; }
  .cv-toc { position: sticky; top: 108px; }
}
.cv-note { border-left: 5px solid var(--green); background: var(--alt); padding: 14px 18px; border-radius: 0 var(--sq) var(--sq) 0; }
.cv-note--warn { border-left-color: var(--red); }
.cv-note > :last-child { margin-bottom: 0; }
.cv-note strong:first-child { color: var(--green); }
.cv-note--warn strong:first-child { color: var(--red); }
.cv-quote { font-family: var(--f-head); font-weight: 700; font-size: 1.35em; line-height: 1.35; border-left: 6px solid var(--gold); padding: 6px 0 6px 18px; margin: 28px 0; }
.cv-quote cite { display: block; margin-top: 8px; font: 400 .7em var(--f-body); color: var(--muted); }
.cv-steps { counter-reset: st; list-style: none; padding: 0 !important; }
.cv-steps > li { counter-increment: st; position: relative; padding: 0 0 18px 60px; margin: 0 !important; }
.cv-steps > li::before { content: counter(st); position: absolute; left: 0; top: -2px; width: 42px; height: 42px; display: grid; place-items: center; border: 2.5px solid var(--gold); border-radius: 50%; font: 900 1.1rem var(--f-head); color: var(--ink-gold); background: var(--bg); }
.cv-steps > li::after { content: ""; position: absolute; left: 20px; top: 42px; bottom: 2px; border-left: 2px dotted var(--line-2); }
.cv-steps > li:last-child::after { display: none; }
.cv-steps h3 { margin: 0 0 .3em; font-size: 1.15rem; }
.cv-steps .cv-when { font-family: var(--f-mono); font-size: .8rem; color: var(--red); text-transform: uppercase; letter-spacing: .06em; }

/* ---------- galleria timbri */
.cv-gal { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 22px; }
.cv-gal__item { margin: 0; text-align: center; }
.cv-gal__item svg { max-width: 220px; margin-inline: auto; }
.cv-gal figcaption strong { display: block; color: var(--text); font-family: var(--f-head); }
@media (min-width: 768px) { .cv-gal { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- storie */
.cv-story { margin: 0; }
.cv-story blockquote { margin: 0 0 12px; font-style: italic; }
.cv-story figcaption { font-size: .9rem; color: var(--muted); }
.cv-story figcaption b { color: var(--text); font-style: normal; }
.cv-story__tag { display: inline-block; font: 600 .78rem var(--f-mono); text-transform: uppercase; letter-spacing: .05em; color: var(--green); border: 1.5px solid currentColor; border-radius: var(--pill); padding: 2px 10px; margin-bottom: 10px; }

/* ---------- checklist (:has + controlli custom) */
.cv-check { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.cv-check label { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; padding: 10px 12px; border: 1.5px solid var(--line-2); border-radius: var(--sq); background: var(--bg); cursor: pointer; }
.cv-check input { appearance: none; -webkit-appearance: none; flex: none; width: 26px; height: 26px; margin: 1px 0 0; border: 2.5px solid var(--field); border-radius: 50%; display: grid; place-items: center; cursor: pointer; background: var(--bg); }
.cv-check input::after { content: ""; width: 12px; height: 7px; border: solid var(--bg); border-width: 0 0 3px 3px; transform: rotate(-45deg) translate(1px, -1px); opacity: 0; }
.cv-check input:checked { background: var(--green); border-color: var(--green); }
.cv-check input:checked::after { opacity: 1; }
.cv-check li:has(input:checked) label { border-color: var(--green); background: var(--alt); }
.cv-check li:has(input:checked) span { text-decoration: line-through; text-decoration-color: var(--green); color: var(--muted); }
.cv-check li.is-done span { color: var(--muted); }
.cv-progress { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; font-weight: 600; }
.cv-progress__bar { flex: 1; height: 12px; border: 2px solid var(--text); border-radius: var(--pill); overflow: hidden; background: var(--bg); }
.cv-progress__bar i { display: block; height: 100%; width: 0; background: var(--green); transition: width .3s; }

/* ---------- moduli */
.cv-form { display: grid; gap: 16px; }
.cv-form__row { display: grid; gap: 16px; }
@media (min-width: 768px) { .cv-form__row { grid-template-columns: 1fr 1fr; } }
.cv-field { display: grid; gap: 6px; align-content: start; }
.cv-field label, .cv-field legend { font-weight: 600; font-size: .95rem; }
.cv-field .u-muted { font-weight: 400; }
.cv-field input, .cv-field select, .cv-field textarea {
  width: 100%; min-height: 48px; padding: 10px 14px; font: inherit; color: var(--text); background: var(--bg);
  border: 2px solid var(--field); border-radius: var(--sq); accent-color: var(--gold);
}
.cv-field textarea { min-height: 140px; resize: vertical; }
.cv-field input:focus, .cv-field select:focus, .cv-field textarea:focus { border-color: var(--gold); outline: 3px solid var(--halo); outline-offset: 0; }
.cv-field:has([aria-invalid="true"]) input, .cv-field:has([aria-invalid="true"]) select, .cv-field:has([aria-invalid="true"]) textarea, .cv-field.is-err input, .cv-field.is-err textarea, .cv-field.is-err select { border-color: var(--red); }
.cv-err { color: var(--red); font-size: .9rem; font-weight: 600; min-height: 0; margin: 0; }
.cv-err:empty { display: none; }
.cv-form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.cv-form__priv { font-size: .9rem; color: var(--muted); max-width: 46ch; margin: 0; }
.cv-status { font-weight: 600; margin: 0; }
.cv-status.is-ok { color: var(--green); }
.cv-status.is-ko { color: var(--red); }

/* ---------- calcolatore */
.cv-calc { padding: 24px; }
.cv-calc fieldset { border: 0; padding: 0; margin: 0; }
.cv-calc__grid { display: grid; gap: 18px; }
@media (min-width: 768px) { .cv-calc__grid { grid-template-columns: 1fr 1fr; } }
.cv-range { display: flex; align-items: center; gap: 14px; }
.cv-range input[type="range"] { flex: 1; min-height: 44px; padding: 0; border: 0; background: none; accent-color: var(--gold); }
.cv-range output { font: 900 1.5rem var(--f-head); min-width: 2ch; text-align: center; }
.cv-radios { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; }
.cv-radios label { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 2px solid var(--line-2); border-radius: var(--pill); cursor: pointer; font-weight: 600; font-size: .95rem; }
.cv-radios input { accent-color: var(--gold); width: 18px; height: 18px; margin: 0; }
.cv-radios label:has(input:checked) { border-color: var(--gold); background: var(--alt); background: color-mix(in srgb, var(--gold) 14%, var(--bg)); }
.cv-out { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 22px 0 0; }
@media (min-width: 768px) { .cv-out { grid-template-columns: repeat(3, 1fr); } }
.cv-out div { border: 2px solid var(--text); border-radius: var(--sq); padding: 12px; background: var(--bg); }
.cv-out dt { font-size: .82rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.cv-out dd { margin: 4px 0 0; font: 900 1.45rem/1.2 var(--f-head); }
.cv-calc__warn { display: none; margin-top: 16px; }
.cv-calc:has(input[value="scirocco"]:checked) .cv-calc__warn { display: block; }
.cv-calc.is-hot .cv-calc__warn { display: block; }

/* ---------- FAQ */
.cv-faqs { display: grid; gap: 10px; }
.cv-faq { border: 1.5px solid var(--line-2); border-radius: var(--sq); background: var(--bg); }
.cv-faq summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 52px; padding: 12px 16px; cursor: pointer; font-weight: 600; list-style: none; }
.cv-faq summary::-webkit-details-marker { display: none; }
.cv-faq summary::after { content: "+"; font: 900 1.4rem var(--f-head); color: var(--ink-gold); flex: none; }
.cv-faq[open] summary::after { content: "−"; }
.cv-faq[open] { border-color: var(--gold); }
.cv-faq__a { padding: 0 16px 14px; }
.cv-faq__a > :last-child { margin-bottom: 0; }

/* ---------- uffici */
.cv-offices { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
@media (min-width: 768px) { .cv-offices { grid-template-columns: repeat(2, 1fr); } }

/* ---------- autore */
.cv-author { display: grid; gap: 24px; align-items: center; }
.cv-author svg { max-width: 360px; margin-inline: auto; }
@media (min-width: 768px) { .cv-author { grid-template-columns: 300px 1fr; } }

/* ---------- CTA */
.cv-cta { background: var(--cta-bg); color: var(--cta-fg); padding: 48px 0; margin-top: 24px; }
.cv-cta__in { display: grid; gap: 20px; align-items: center; }
.cv-cta h2 { margin-bottom: .3em; }
.cv-cta p { margin: 0; max-width: 60ch; }
.cv-cta a { color: var(--cta-fg); }
.cv-cta .cv-btn { color: var(--cta-fg); }
.cv-cta .cv-btn:hover { background: rgba(255, 255, 255, .14); color: var(--cta-fg); }
.cv-cta__links { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 12px; font-weight: 600; }
.cv-cta__links a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }
@media (min-width: 1024px) { .cv-cta__in { grid-template-columns: 1fr auto; } }

/* ---------- footer */
.cv-foot { background: var(--foot-bg); color: var(--foot-fg); margin-top: 0; }
.cv-foot a { color: var(--foot-a); }
.cv-foot a:hover { color: #FFFBF0; }
.cv-foot__in { display: grid; gap: 28px; padding-block: 36px 24px; }
.cv-foot__h { font-size: 1rem; text-transform: uppercase; letter-spacing: .08em; color: #E0A84A; margin-bottom: 12px; }
.cv-foot ul { list-style: none; padding: 0; margin: 0; }
.cv-foot li a { display: inline-flex; min-height: 40px; align-items: center; }
.cv-foot address { font-style: normal; margin-bottom: 1em; }
.cv-foot address a, .cv-foot p a { display: inline-block; padding-block: 6px; }
.cv-foot p { font-size: .95rem; }
.cv-foot__small { font-size: .85rem !important; color: #CDBE9C; }
.cv-logo--foot { color: #FFFBF0; margin-bottom: 10px; }
.cv-logo--foot:hover { color: #FFFBF0; }
.cv-logo--foot .cv-logo__mark { color: #FFFBF0; }
.cv-foot__base { border-top: 1px solid #4A3E25; padding-block: 16px 24px; margin-block: 0; font-size: .85rem; color: #CDBE9C; }
@media (min-width: 768px) { .cv-foot__in { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .cv-foot__in { grid-template-columns: 1.4fr 1fr 1.1fr 1.2fr; } }

/* ---------- privacy */
.cv-legal { max-width: 76ch; padding-bottom: 48px; }
.cv-legal h2 { font-size: 1.45rem; margin-top: 1.6em; }

/* ---------- motion: rivelazione clip-path */
html.cv-motion .cv-reveal { clip-path: inset(0 0 100% 0); transition: clip-path .9s cubic-bezier(.2, .7, .2, 1); }
html.cv-motion .cv-reveal.is-in { clip-path: inset(0 0 0 0); }
@media (prefers-reduced-motion: reduce) {
  html.cv-motion .cv-reveal { clip-path: none; transition: none; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
}

@media print {
  .cv-head, .cv-panel, .cv-scrim, .cv-foot, .cv-cta, .cv-toc, .u-mesh { display: none !important; }
  body { background: #FFF; color: #000; }
}
