:root {
    color-scheme: dark;
    --bg: #0b1512;
    --surface: #101c17;
    --line: #1d332a;
    --ink: #e8f2ed;
    --muted: #9db8ac;
    --dim: #6d8a7c;
    --accent: #3fe08f;
    --accent-ink: #06281a;
    --accent-soft: #7fb99f;
    --danger: #ff9b90;
    --matrix-bg: #ffffff;
    --max-width: 72rem;
    --reading-width: 70ch;
    --radius-panel: 20px;
    --radius-control: 12px;
    --ease-out: cubic-bezier(.22, 1, .36, 1);
    --z-sticky: 20;
    --z-banner: 40;
    --z-skip: 60;
}

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

html {
    scroll-behavior: smooth;
}

body {
    min-width: 20rem;
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 1rem;
    line-height: 1.65;
    text-align: left;
    text-rendering: optimizeLegibility;
}

button,
input,
textarea,
select {
    font: inherit;
}

button,
summary {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: var(--ink);
    text-decoration-thickness: .08em;
    text-underline-offset: .22em;
    transition: color 160ms var(--ease-out), text-decoration-color 160ms var(--ease-out);
}

a:hover {
    color: var(--accent);
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

h1,
h2,
h3,
p,
figure {
    margin-top: 0;
}

h1,
h2,
h3 {
    line-height: 1.08;
    letter-spacing: -.025em;
    text-wrap: balance;
}

h2 {
    font-size: 1.5rem;
    font-weight: 650;
}

p,
li {
    text-wrap: pretty;
}

img,
svg {
    display: block;
    max-width: 100%;
}

[hidden] {
    display: none !important;
}

.skip-link {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: var(--z-skip);
    min-height: 44px;
    padding: .65rem 1rem;
    border: 1px solid var(--accent);
    border-radius: var(--radius-control);
    background: var(--surface);
    color: var(--ink);
    transform: translateY(-180%);
}

.skip-link:focus {
    transform: translateY(0);
}

.site-header {
    border-bottom: 1px solid var(--line);
    background: var(--bg);
}

.site-header__inner,
.site-footer__inner {
    width: min(calc(100% - 2rem), var(--max-width));
    margin-inline: auto;
}

.site-header__inner {
    min-height: 4.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.wordmark {
    color: var(--ink);
    font-size: 1.12rem;
    font-weight: 800;
    letter-spacing: -.02em;
    text-decoration: none;
}

.wordmark::after {
    content: ".it";
    color: var(--accent);
}

.wordmark:hover {
    color: var(--ink);
}

.site-header__meta {
    color: var(--dim);
    font-size: .95rem;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.noscript {
    width: min(calc(100% - 2rem), var(--max-width));
    margin: 1.5rem auto;
    padding: 1rem;
    border: 1px solid var(--danger);
    border-radius: var(--radius-control);
    background: var(--surface);
    color: var(--ink);
}

.hero {
    position: relative;
    min-height: min(54rem, calc(88svh - 4.5rem));
    display: grid;
    align-items: center;
    overflow: clip;
}

.hero__inner {
    position: relative;
    z-index: 1;
    width: min(calc(100% - 2rem), var(--max-width));
    margin-inline: auto;
    padding-block: clamp(4rem, 10vw, 7rem);
}

.hero__content {
    max-width: 48rem;
}

.kicker-line {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: .8rem;
    color: var(--accent-soft);
    font-size: .95rem;
}

.kicker-line::before {
    content: "";
    width: 42px;
    height: 1px;
    flex: 0 0 42px;
    background: var(--line);
}

.hero h1 {
    max-width: 13ch;
    margin-bottom: 1.25rem;
    font-size: clamp(2.6rem, 7vw, 5.2rem);
    font-weight: 750;
    line-height: 1.02;
    letter-spacing: -.025em;
}

.hero h1 em {
    color: var(--accent);
    font-style: normal;
}

.hero__subtitle {
    max-width: 42ch;
    margin-bottom: 2.2rem;
    color: var(--muted);
    font-size: clamp(1.03rem, 2.2vw, 1.1rem);
}

.hero__note {
    max-width: 55ch;
    margin: 1rem 0 0;
    color: var(--dim);
    font-size: .95rem;
}

.hero__meta {
    margin: 1.4rem 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: .4rem 1.4rem;
    color: var(--dim);
    font-size: .95rem;
    list-style: none;
}

.button {
    min-height: 44px;
    padding: .78rem 1.4rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink);
    font-weight: 700;
    cursor: pointer;
    transition: transform 180ms var(--ease-out), border-color 180ms var(--ease-out), color 180ms var(--ease-out), box-shadow 180ms var(--ease-out);
}

.button:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

.button:active {
    transform: translateY(0);
}

.button:disabled {
    cursor: wait;
    opacity: .65;
}

.button--primary {
    padding: 1rem 2.2rem;
    border-color: var(--accent);
    background: var(--accent);
    color: var(--accent-ink);
    font-size: 1.05rem;
    font-weight: 700;
    box-shadow: 0 0 40px rgb(63 224 143 / 35%);
}

.button--primary:hover {
    color: var(--accent-ink);
    box-shadow: 0 0 64px rgb(63 224 143 / 50%);
}

.ambient-shapes {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .5;
}

.ambient-shapes svg {
    position: absolute;
    animation: shape-drift 26s linear infinite;
}

.ambient-shapes svg:nth-child(1) {
    top: 12%;
    left: 8%;
    animation-duration: 34s;
}

.ambient-shapes svg:nth-child(2) {
    right: 8%;
    bottom: 18%;
    animation-duration: 22s;
    animation-direction: reverse;
}

.ambient-shapes svg:nth-child(3) {
    top: 18%;
    right: 9%;
    animation-duration: 40s;
}

.ambient-shapes svg:nth-child(4) {
    bottom: 10%;
    left: 12%;
    animation-duration: 28s;
    animation-direction: reverse;
}

.section {
    width: min(calc(100% - 2rem), var(--max-width));
    margin-inline: auto;
    padding-block: clamp(4rem, 9vw, 7rem);
}

.section + .section {
    border-top: 1px solid var(--line);
}

.section__heading {
    max-width: 48rem;
    margin-bottom: clamp(2.5rem, 6vw, 4rem);
}

.section__heading h2 {
    max-width: 22ch;
    margin-bottom: 1rem;
    font-size: clamp(1.8rem, 5vw, 3rem);
}

.section__heading p {
    max-width: var(--reading-width);
    margin-bottom: 0;
    color: var(--muted);
    font-size: 1.08rem;
}

.section__heading--compact {
    margin-bottom: 2rem;
}

.explain__list {
    display: flex;
    flex-direction: column;
}

.explain__list article {
    padding-block: 1.75rem;
    border-top: 1px solid var(--line);
}

.explain__list article:last-child {
    border-bottom: 1px solid var(--line);
}

.explain__list h3 {
    margin-bottom: .65rem;
    color: var(--accent-soft);
    font-size: 1.25rem;
}

.explain__list p {
    max-width: 48ch;
    margin-bottom: 0;
    color: var(--muted);
}

.faq__list {
    max-width: 54rem;
}

.faq details {
    border-top: 1px solid var(--line);
}

.faq details:last-child {
    border-bottom: 1px solid var(--line);
}

.faq summary {
    min-height: 4.4rem;
    padding-block: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    color: var(--ink);
    font-size: 1.08rem;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}

.faq summary::-webkit-details-marker {
    display: none;
}

.faq summary::after {
    content: "+";
    color: var(--accent);
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 1;
}

.faq details[open] summary::after {
    content: "−";
}

.faq details p {
    max-width: var(--reading-width);
    margin-bottom: 1.5rem;
    color: var(--muted);
}

.test-view {
    width: min(calc(100% - 2rem), 58rem);
    min-height: calc(100svh - 4.5rem);
    margin-inline: auto;
    padding-block: 1.5rem clamp(4rem, 9vw, 7rem);
}

.test-toolbar {
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    margin-bottom: 1.5rem;
    padding-block: 1rem;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: .6rem 1.5rem;
    background: var(--bg);
}

.test-toolbar__label {
    display: block;
    color: var(--dim);
    font-size: .95rem;
}

.test-toolbar strong,
.test-toolbar time {
    display: block;
    color: var(--ink);
    font-size: 1.05rem;
    font-variant-numeric: tabular-nums;
}

.test-toolbar__time {
    text-align: right;
}

.test-toolbar progress {
    width: 100%;
    height: 3px;
    grid-column: 1 / -1;
    border: 0;
    border-radius: 2px;
    overflow: hidden;
    background: var(--line);
    color: var(--accent);
}

.test-toolbar progress::-webkit-progress-bar {
    background: var(--line);
}

.test-toolbar progress::-webkit-progress-value {
    background: var(--accent);
    transition: width 180ms var(--ease-out);
}

.test-toolbar progress::-moz-progress-bar {
    background: var(--accent);
}

.question {
    padding: clamp(1rem, 4vw, 2rem);
    border: 1px solid var(--line);
    border-radius: var(--radius-panel);
    background: var(--surface);
}

.question.is-animating {
    animation: item-enter 180ms var(--ease-out);
}

.question__heading {
    max-width: 44rem;
    margin-bottom: 1.75rem;
}

.question__heading h1 {
    margin-bottom: .7rem;
    font-size: clamp(1.65rem, 6vw, 2.7rem);
}

.question__heading p {
    margin-bottom: 0;
    color: var(--muted);
}

.problem-figure,
.answers-figure {
    margin-inline: 0;
}

.problem-figure {
    margin-bottom: 1.5rem;
}

.problem-figure img {
    width: min(100%, 35rem);
    height: auto;
    margin-inline: auto;
    border-radius: var(--radius-control);
    background: var(--matrix-bg);
}

.answers-stage {
    position: relative;
    width: min(100%, 47rem);
    margin-inline: auto;
    border-radius: var(--radius-control);
    overflow: hidden;
    background: var(--matrix-bg);
}

.answers-stage > img {
    width: 100%;
    height: auto;
}

.hotspots {
    position: absolute;
    inset: 0;
}

.hotspots button {
    position: absolute;
    top: 4.3478%;
    width: 22.2222%;
    height: 43.4783%;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: var(--radius-control);
    background: transparent;
    cursor: pointer;
    transition: transform 150ms var(--ease-out), border-color 150ms var(--ease-out), background-color 150ms var(--ease-out);
}

.hotspots button:nth-child(1),
.hotspots button:nth-child(5) {
    left: 2.2222%;
}

.hotspots button:nth-child(2),
.hotspots button:nth-child(6) {
    left: 26.6667%;
}

.hotspots button:nth-child(3),
.hotspots button:nth-child(7) {
    left: 51.1111%;
}

.hotspots button:nth-child(4),
.hotspots button:nth-child(8) {
    left: 75.5556%;
}

.hotspots button:nth-child(n + 5) {
    top: 52.1739%;
}

.hotspots button:hover {
    border-color: var(--accent);
    background: rgb(63 224 143 / 12%);
    transform: translateY(-3px);
}

.hotspots button:focus-visible {
    outline-color: var(--accent);
    outline-offset: -5px;
    border-color: var(--accent);
    background: rgb(63 224 143 / 18%);
}

.hotspots button:disabled {
    cursor: wait;
}

.answers-figure figcaption {
    width: min(100%, 47rem);
    margin: .75rem auto 0;
    color: var(--dim);
    font-size: .95rem;
}

.likert-question {
    min-height: min(32rem, calc(100svh - 15rem));
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.likert-statement {
    max-width: 28ch;
    margin: 0 auto clamp(2rem, 7vw, 3.5rem);
    color: var(--ink);
    font-size: clamp(1.65rem, 6vw, 2.75rem);
    font-weight: 650;
    line-height: 1.18;
    letter-spacing: -.025em;
    text-align: center;
    text-wrap: balance;
}

.likert-options {
    display: flex;
    flex-direction: column;
    gap: .65rem;
}

.likert-options button {
    min-height: 52px;
    padding: .8rem 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
    background: var(--bg);
    color: var(--ink);
    cursor: pointer;
    transition: transform 150ms var(--ease-out), border-color 150ms var(--ease-out), color 150ms var(--ease-out), background-color 150ms var(--ease-out);
}

.likert-options button:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-3px);
}

.likert-options button:focus-visible {
    border-color: var(--accent);
}

.likert-options button:disabled {
    cursor: wait;
}

.test-actions {
    margin-top: 1rem;
    display: flex;
    justify-content: flex-start;
}

.button--back {
    min-width: 7rem;
}

.button--back:disabled {
    cursor: not-allowed;
    opacity: .4;
}

.status-view {
    width: min(calc(100% - 2rem), 42rem);
    min-height: calc(100svh - 4.5rem);
    margin-inline: auto;
    padding-block: clamp(4rem, 12vw, 8rem);
    display: flex;
    align-items: center;
}

.status-panel {
    width: 100%;
    padding: clamp(1.5rem, 5vw, 2.5rem);
    border: 1px solid var(--line);
    border-radius: var(--radius-panel);
    background: var(--surface);
}

.status-panel h1 {
    margin-bottom: 1rem;
    font-size: clamp(2rem, 8vw, 3.5rem);
}

.status-panel p {
    max-width: 55ch;
    color: var(--muted);
}

.status-panel--error {
    border-color: var(--danger);
}

.status-panel__marker {
    width: 2.75rem;
    height: 2.75rem;
    margin-bottom: 1.5rem;
    display: grid;
    place-items: center;
    border: 1px solid var(--danger);
    border-radius: 50%;
    color: var(--danger) !important;
    font-weight: 800;
}

.loader {
    width: 2rem;
    height: 2rem;
    margin-bottom: 1.5rem;
    display: block;
    border: 3px solid var(--line);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 800ms linear infinite;
}

.result-view {
    position: relative;
    min-height: calc(100svh - 4.5rem);
    display: flex;
    align-items: center;
    overflow: clip;
}

.result-layout {
    position: relative;
    z-index: 1;
    width: min(calc(100% - 2rem), 58rem);
    margin: clamp(3rem, 8vw, 6rem) auto;
    padding: clamp(1.5rem, 5vw, 2.5rem);
    border: 1px solid var(--line);
    border-radius: var(--radius-panel);
    background: var(--surface);
}

.result-summary {
    padding-bottom: 1.75rem;
    border-bottom: 1px solid var(--line);
}

.result-summary__intro {
    margin-bottom: .6rem;
    display: flex;
    align-items: center;
    gap: .8rem;
    color: var(--accent-soft);
    font-size: .95rem;
}

.result-summary__intro::before {
    content: "";
    width: 42px;
    height: 1px;
    background: var(--line);
}

.result-summary h1,
.bigfive-result h1 {
    margin-bottom: 1.75rem;
    font-size: clamp(2rem, 7vw, 3.5rem);
}

.result-score {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: .7rem 1rem;
}

.result-score strong {
    color: var(--accent);
    font-size: clamp(4.5rem, 20vw, 5.4rem);
    font-weight: 800;
    line-height: .9;
    letter-spacing: -.03em;
    font-variant-numeric: tabular-nums;
}

.result-score span {
    color: var(--muted);
    font-weight: 650;
}

.result-details {
    padding-top: 1.75rem;
}

.result-details > p:not(.result-note) {
    margin-bottom: .8rem;
    color: var(--muted);
    font-size: clamp(1.03rem, 3vw, 1.18rem);
}

.result-details strong {
    color: var(--ink);
}

.result-note {
    max-width: var(--reading-width);
    margin-top: 1.75rem;
    color: var(--muted);
}

.confidence-track {
    position: relative;
    height: 6px;
    margin: 1rem 0 .65rem;
    border-radius: 3px;
    background: var(--line);
}

.confidence-track__band {
    position: absolute;
    inset: 0 18% 0 55%;
    border-radius: 3px;
    background: rgb(63 224 143 / 33%);
}

.confidence-track__marker {
    position: absolute;
    top: -4px;
    bottom: -4px;
    left: 68%;
    width: 3px;
    border-radius: 2px;
    background: var(--accent);
}

.text-links {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem 1.35rem;
}

.result-details .text-links {
    margin-top: 1.75rem;
}

.logic-result .result-layout {
    max-width: 50rem;
}

.bigfive-result .result-layout {
    max-width: 62rem;
}

.bigfive-result__intro {
    max-width: 62ch;
    margin-bottom: 2rem;
    color: var(--muted);
}

.factor-results {
    display: flex;
    flex-direction: column;
}

.factor-result {
    padding-block: 1.35rem;
    border-top: 1px solid var(--line);
}

.factor-result:last-child {
    border-bottom: 1px solid var(--line);
}

.factor-result__heading {
    margin-bottom: .55rem;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: .3rem 1rem;
}

.factor-result__heading h2 {
    margin: 0;
    font-size: 1.2rem;
}

.factor-result__level {
    color: var(--accent-soft);
    font-size: .95rem;
    font-variant-numeric: tabular-nums;
}

.factor-bar {
    height: 7px;
    margin-bottom: .75rem;
    overflow: hidden;
    border-radius: 4px;
    background: var(--line);
}

.factor-bar__fill {
    width: var(--bar-width, 0%);
    height: 100%;
    border-radius: 4px;
    background: var(--accent);
    transform-origin: left;
    animation: bar-grow 700ms var(--ease-out) both;
}

.factor-result p {
    max-width: 65ch;
    margin-bottom: 0;
    color: var(--muted);
}

.testo {
    width: min(calc(100% - 2rem), var(--reading-width));
    margin-inline: auto;
    padding-block: clamp(3.5rem, 8vw, 6rem);
}

.testo h1 {
    max-width: 20ch;
    margin-bottom: 1rem;
    font-size: clamp(2.2rem, 6vw, 4.25rem);
    font-weight: 750;
    line-height: 1.04;
}

.testo h2 {
    margin: 3rem 0 1rem;
}

.testo h3 {
    margin: 2rem 0 .6rem;
    font-size: 1.15rem;
}

.testo p,
.testo li {
    color: var(--muted);
}

.testo strong,
.testo em {
    color: var(--ink);
}

.testo a,
.briciole a,
.firma a,
.fonti a,
.tabella-scroll a {
    color: var(--ink);
    text-decoration: underline;
}

.testo a:hover,
.briciole a:hover,
.firma a:hover,
.fonti a:hover,
.tabella-scroll a:hover {
    color: var(--accent);
}

.briciole {
    margin-bottom: 2rem;
    color: var(--dim);
    font-size: .95rem;
}

.firma {
    margin-bottom: 2rem;
    color: var(--dim) !important;
    font-size: .95rem;
}

.fonti {
    padding-left: 1.25rem;
}

.fonti li + li {
    margin-top: .8rem;
}

.tabella-scroll {
    max-width: 100%;
    margin-block: 1.5rem;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
}

.tabella-scroll table {
    width: 100%;
    min-width: 36rem;
    border-collapse: collapse;
    color: var(--muted);
}

.tabella-scroll th,
.tabella-scroll td {
    padding: .8rem 1rem;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.tabella-scroll th:last-child,
.tabella-scroll td:last-child {
    border-right: 0;
}

.tabella-scroll tr:last-child td {
    border-bottom: 0;
}

.tabella-scroll th {
    background: var(--surface);
    color: var(--ink);
    font-weight: 650;
}

body[data-view="test"] .below-app,
body[data-view="loading"] .below-app,
body[data-view="error"] .below-app,
body[data-view="test"] .site-footer,
body[data-view="loading"] .site-footer,
body[data-view="error"] .site-footer {
    display: none;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: var(--surface);
}

.site-footer__inner {
    padding-block: 2rem;
}

.site-footer p {
    max-width: 64ch;
    margin-bottom: 1rem;
    color: var(--muted);
    font-size: .95rem;
}

.legal-entity {
    margin-top: 1.25rem;
    color: var(--dim) !important;
    font-size: .95rem !important;
    text-align: left;
}

#cbx-bar {
    position: fixed;
    inset: auto 0 0;
    z-index: var(--z-banner);
    display: flex;
    flex-wrap: wrap;
    gap: .8rem 1.25rem;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink);
}

#cbx-bar p {
    max-width: 62ch;
    margin: 0;
    color: var(--muted);
    font-size: .95rem;
    text-align: left;
}

#cbx-bar a {
    color: var(--ink);
    text-decoration: underline;
}

#cbx-bar a:hover {
    color: var(--accent);
}

.cbx-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

#cbx-bar button {
    min-height: 44px;
    padding: .55rem 1.1rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--bg);
    color: var(--ink);
    cursor: pointer;
}

#cbx-bar button:hover {
    border-color: var(--accent);
}

#cbx-bar #cbx-ok {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--accent-ink);
}

@keyframes shape-drift {
    to { transform: rotate(360deg); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes item-enter {
    from { opacity: .35; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes bar-grow {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

@media (min-width: 45rem) {
    .site-header__inner,
    .site-footer__inner,
    .hero__inner,
    .section,
    .result-layout {
        width: min(calc(100% - 4rem), var(--max-width));
    }

    .explain__list {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }

    .explain__list article:last-child {
        border-bottom: 0;
    }

    .likert-options {
        flex-direction: row;
    }

    .likert-options button {
        flex: 1 1 0;
        min-height: 7rem;
        padding: 1rem .7rem;
    }

    .result-view:not(.bigfive-result) .result-layout {
        display: grid;
        grid-template-columns: minmax(15rem, .8fr) minmax(20rem, 1.2fr);
        gap: clamp(2rem, 6vw, 4rem);
        align-items: center;
    }

    .result-summary {
        padding: 0;
        border-bottom: 0;
    }

    .result-details {
        padding: 0;
    }

    .site-footer__inner {
        display: grid;
        grid-template-columns: minmax(18rem, 1fr) auto;
        gap: 1.25rem 2rem;
        align-items: start;
    }

    .site-footer__inner > p:first-child,
    .site-footer__inner > nav {
        margin-bottom: 0;
    }

    .site-footer .legal-entity {
        grid-column: 1 / -1;
        margin: 0;
    }
}

@media (max-width: 34rem) {
    .site-header__meta {
        max-width: 12rem;
        white-space: normal;
        text-align: right;
    }

    .ambient-shapes svg:nth-child(1),
    .ambient-shapes svg:nth-child(4) {
        opacity: .55;
    }

    .ambient-shapes svg:nth-child(2),
    .ambient-shapes svg:nth-child(3) {
        opacity: .25;
    }

    .question {
        margin-inline: -.25rem;
    }

    .hotspots button {
        border-radius: 8px;
    }

    #cbx-bar,
    .cbx-actions {
        align-items: stretch;
    }

    .cbx-actions,
    #cbx-bar button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}

/* --- Storico locale sul landing --- */
.history-block {
    max-width: 640px;
    margin: 0 auto;
    padding: 1.5rem;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--surface);
}
.history-block h2 { font-size: 1rem; font-weight: 650; margin: 0 0 0.8rem; }
.history-block ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.history-block li { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.95rem; }
.history-block li span { color: var(--muted); }
.history-block__note { margin: 0.9rem 0 0; font-size: 0.82rem; color: var(--dim); }
.history-block__note button {
    font: inherit; color: inherit; background: none; border: none;
    text-decoration: underline; cursor: pointer; padding: 0;
}
.history-block__note button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* --- Condivisione risultato --- */
.share-row { display: flex; justify-content: center; padding: 1.5rem 0 2.5rem; }
.button--ghost {
    font: inherit; font-weight: 600; padding: 0.8rem 1.8rem; border-radius: 999px;
    background: transparent; color: var(--ink); border: 1px solid var(--line); cursor: pointer;
    transition: border-color 0.18s cubic-bezier(0.22, 1, 0.36, 1), transform 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}
.button--ghost:hover { border-color: var(--accent); transform: translateY(-2px); }
.button--ghost:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .button--ghost { transition: none; } }
