@font-face {
  font-family: Inter;
  src: url("assets/inter-latin-wght-normal.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --ink: #15251b;
  --muted: #45564a;
  --green: #0f5733;
  --green-deep: #103e29;
  --green-soft: #e8f5e8;
  --lime: #c6edbd;
  --line: #d3ded3;
  --background: #f7f9f7;
  --surface: #fff;
  --focus: #006b42;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; background: var(--background); }
body { min-width: 280px; min-height: 100vh; margin: 0; background: var(--background); color: var(--ink); font-family: Inter, "Segoe UI", Arial, sans-serif; line-height: 1.5; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; }
button:focus-visible, a:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.shell { width: min(100% - 3rem, 75rem); margin-inline: auto; }
.skip-link { position: fixed; z-index: 10; top: -5rem; left: 1rem; padding: .65rem 1rem; background: #fff; color: var(--ink); }
.skip-link:focus { top: 1rem; }

.site-header { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 6.4rem; }
.brand { display: inline-flex; align-items: center; min-width: 0; }
.brand img { display: block; height: auto; }
.brand img { width: clamp(10rem, 21vw, 13rem); }
.demo-tag { flex-shrink: 0; padding: .38rem .8rem; border-radius: 999px; background: #e0ebdf; color: #22442e; font-size: .8rem; font-weight: 700; }
.game-layout { display: grid; grid-template-columns: minmax(17rem, .83fr) minmax(0, 1.17fr); align-items: stretch; gap: clamp(1.5rem, 4vw, 4.25rem); padding-block: 1rem 3rem; }
.game-layout--playing { width: min(100% - 3rem, 47rem); grid-template-columns: 1fr; }
.mission { display: flex; flex-direction: column; min-height: 36rem; padding: clamp(1.7rem, 4vw, 3.6rem); border-radius: 1rem; background: var(--green-deep); color: #fff; }
.mission__top { display: flex; align-items: center; gap: .85rem; margin-top: auto; margin-bottom: .85rem; }
.mission__mark { display: grid; flex: 0 0 3.25rem; place-items: center; width: 3.25rem; height: 3.25rem; border: 1px solid #97d4a8; border-radius: 50%; color: var(--lime); font-size: 1.7rem; }
.mission__label { margin: 0; color: var(--lime); font-size: .88rem; font-weight: 700; }
.mission h1 { max-width: 11ch; margin: 0 0 1.2rem; font-size: clamp(2.7rem, 4.5vw, 4.4rem); line-height: 1.04; letter-spacing: -.035em; text-wrap: balance; }
.mission > p:not(.mission__label) { max-width: 29ch; margin-block: 0 1.6rem; font-size: 1.08rem; }
.mission__line { display: flex; gap: .4rem; width: min(14rem, 100%); margin-bottom: 1.1rem; }
.mission__line span { flex: 1; height: .3rem; border-radius: 1rem; background: #89d7a2; }
.mission__line span:nth-child(2) { background: #c7edbd; }
.mission__line span:nth-child(3) { background: #4d9d70; }
.mission .mission__small { max-width: 36ch !important; margin: 0 !important; color: #d7f0dc; font-size: .83rem !important; }

.console { display: flex; flex-direction: column; min-width: 0; min-height: 36rem; border: 1px solid var(--line); border-radius: 1rem; background: var(--surface); }
.console--playing { height: min(85vh, 48rem); min-height: 42rem; }
.console--intro .game-actions { margin-top: 0; }
.console__top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 5.75rem; padding: 1rem clamp(1.25rem, 3vw, 2rem); border-bottom: 1px solid var(--line); }
.speaker { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.speaker__avatar { display: grid; flex: 0 0 2.65rem; place-items: center; width: 2.65rem; height: 2.65rem; overflow: hidden; border-radius: .75rem; background: var(--green-deep); }
.speaker__avatar img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; transform: scale(1.3); }
.speaker strong, .speaker small { display: block; }
.speaker strong { line-height: 1.15; }
.speaker small { color: var(--muted); font-size: .73rem; }
.chapter { color: var(--muted); font-size: .78rem; text-align: right; }
.progress-wrap { padding: 1rem clamp(1.25rem, 3vw, 2rem) 1.15rem; }
.progress-copy { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: .55rem; color: var(--muted); font-size: .78rem; }
.progress-track { height: .42rem; overflow: hidden; border-radius: 1rem; background: #e6ece6; }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--green); transition: width .3s cubic-bezier(.2,.8,.2,1); }
.screen { display: flex; flex: 1; flex-direction: column; padding: clamp(1.25rem, 3vw, 2rem); }
.screen--chat { min-height: 0; gap: 1.2rem; overflow-y: auto; overscroll-behavior: contain; scrollbar-color: #aabdae transparent; }
.chat-turn { display: flex; flex: 0 0 auto; flex-direction: column; gap: .7rem; }
.chat-turn--enter { animation: chat-turn-enter .3s cubic-bezier(.2,.8,.2,1) both; }
@keyframes chat-turn-enter { from { opacity: .45; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
.chat-message { display: flex; align-items: flex-end; gap: .65rem; max-width: 92%; }
.chat-message__avatar { display: block; flex: 0 0 2.25rem; width: 2.25rem; height: 2.25rem; overflow: hidden; border-radius: .65rem; background: var(--green-deep); }
.chat-message__avatar img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; transform: scale(1.3); }
.chat-message__bubble { min-width: 0; padding: .85rem 1rem; border-radius: 1rem 1rem 1rem .25rem; background: var(--green-soft); }
.chat-message__bubble p { margin-block: 0; }
.chat-message--user { align-self: flex-end; justify-content: flex-end; max-width: 78%; }
.chat-message--user .chat-message__bubble { border-radius: 1rem 1rem .25rem 1rem; background: var(--green); color: #fff; }
.chat-message--reaction .chat-message__bubble { padding: .55rem .8rem; background: #edf1ec; color: #284535; font-size: .86rem; }
.chat-message--reaction .chat-message__avatar { width: 1.9rem; height: 1.9rem; flex-basis: 1.9rem; }
.chat-turn:not(:last-child) .question { font-size: 1rem; font-weight: 600; }
.chat-options { width: min(calc(100% - 2.9rem), 34rem); margin: 0 0 0 2.9rem; }
.chat-controls { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 5rem; padding: .75rem clamp(1.25rem, 3vw, 2rem); border-top: 1px solid var(--line); }
.chat-controls .micro-note { margin: 0; text-align: right; }
.bubble { max-width: 36rem; margin-bottom: 1.3rem; padding: 1.1rem 1.3rem; border-radius: .25rem 1rem 1rem 1rem; background: var(--green-soft); }
.bubble__byline { margin: 0 0 .55rem; color: #24513a; font-size: .78rem; font-weight: 800; }
.bubble p:last-child { margin-bottom: 0; }
.bubble--intro { padding: clamp(1.25rem, 3vw, 2rem); }
.bubble--intro p { font-size: 1.1rem; }
.bubble--intro strong { font-size: 1.35rem; line-height: 1.3; }
.question-number { margin: 0 0 .6rem; color: var(--green); font-size: .84rem; font-weight: 800; }
.question { margin: 0; font-size: clamp(1.15rem, 2vw, 1.45rem); line-height: 1.35; letter-spacing: -.015em; text-wrap: pretty; }
.choice-list { display: grid; gap: .58rem; margin: 0 0 1.4rem; padding: 0; list-style: none; }
.choice-button { display: flex; align-items: center; gap: .85rem; width: 100%; min-height: 3.9rem; padding: .75rem 1rem; border: 1px solid var(--line); border-radius: .7rem; background: #fff; color: var(--ink); text-align: left; transition: border-color .18s ease, background-color .18s ease, transform .18s ease; }
.choice-button:hover { border-color: var(--green); background: #f5fbf5; transform: translateY(-1px); }
.choice-button[aria-pressed="true"] { border-color: var(--green); background: var(--green-soft); }
.choice-button:disabled { cursor: default; transform: none; }
.choice-button__dot { display: inline-block; flex: 0 0 1.22rem; width: 1.22rem; height: 1.22rem; border: 2px solid #68796b; border-radius: 50%; }
.choice-button[aria-pressed="true"] .choice-button__dot { border: .36rem solid var(--green); background: #fff; }
.choice-button__text { flex: 1; }
.reaction-overlay { position: fixed; z-index: 20; inset: 0; display: grid; place-items: center; padding: 1rem; background: #0c291c66; pointer-events: none; }
.reaction-popover { display: flex; align-items: center; gap: 1rem; width: min(100%, 27rem); padding: 1.25rem; border-radius: 1rem; background: #fff; box-shadow: 0 8px 16px #0b251b33; transform-origin: var(--origin-x, 50%) var(--origin-y, 0%); }
.reaction-overlay--enter .reaction-popover { animation: reaction-zoom .17s cubic-bezier(.19,1,.22,1) both; }
.reaction-popover img { display: block; flex: 0 0 5.8rem; width: 5.8rem; height: 5.8rem; object-fit: cover; object-position: 50% 35%; border-radius: .85rem; background: var(--green-deep); }
.reaction-popover strong { font-size: .85rem; color: var(--green); }
.reaction-popover p { margin: .2rem 0 0; font-size: 1.08rem; font-weight: 700; line-height: 1.4; text-wrap: pretty; }
@keyframes reaction-zoom { from { opacity: 0; transform: scale(.2); } to { opacity: 1; transform: scale(1); } }
.game-actions { display: flex; align-items: center; justify-content: space-between; gap: .7rem; flex-wrap: wrap; margin-top: auto; padding-top: 1rem; }
.screen--finish .game-actions { margin-top: 0; }
.action { display: inline-flex; align-items: center; justify-content: center; gap: .65rem; min-height: 3.1rem; padding: .6rem 1.2rem; border: 1px solid transparent; border-radius: 999px; background: var(--green); color: #fff; font-weight: 750; text-decoration: none; transition: background-color .18s ease, transform .18s ease; }
.action:hover { background: #0a4328; transform: translateY(-1px); }
.action--quiet { border-color: var(--green); background: transparent; color: var(--green); }
.action--quiet:hover { background: var(--green-soft); color: var(--ink); }
.action--back { border-color: var(--green); background: transparent; color: var(--green); }
.action--back:hover { background: var(--green-soft); color: var(--ink); }
.action--back svg { width: 1.15rem; height: 1.15rem; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.9; }
.action svg { width: 1.2rem; height: 1.2rem; flex: 0 0 1.2rem; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.9; }
.micro-note { max-width: 49ch; margin: 0 0 1.2rem; color: var(--muted); font-size: .86rem; }
.status { min-height: 1.5rem; margin: .2rem 0 0; color: #23543a; font-size: .85rem; font-weight: 700; }

.result-topline { margin: .1rem 0 1rem; color: var(--green); font-size: .84rem; font-weight: 800; }
.result-card { margin: 0 0 1.5rem; padding: clamp(1.2rem, 3vw, 2rem); border-radius: .85rem; background: var(--green-deep); color: #fff; }
.result-card__head { display: flex; align-items: center; gap: .9rem; margin-bottom: .85rem; }
.result-card__icon { display: grid; flex: 0 0 3.5rem; place-items: center; width: 3.5rem; height: 3.5rem; border-radius: .7rem; background: var(--role-color); font-size: 1.8rem; }
.result-card h1 { margin: 0; font-size: 1.6rem; }
.result-card h2 { margin: 0; font-size: 1.6rem; }
.result-card__line { margin: 0 0 1rem; color: var(--lime); font-size: 1.04rem; font-weight: 700; }
.result-card p { line-height: 1.55; }
.result-card__detail { padding-top: .9rem; border-top: 1px solid #76a78a; }
.result-card__detail strong { display: block; margin-bottom: .25rem; color: var(--lime); font-size: .85rem; }
.result-card__detail p { margin: 0 0 .85rem; }
.result-card__detail p:last-child { margin-bottom: 0; }
.result-note { margin: 0 0 1.3rem; color: var(--muted); font-size: .86rem; }
.data-title { margin: 0; font-size: clamp(1.15rem, 2.4vw, 1.45rem); line-height: 1.35; }
.screen--finish > .chat-message { margin-bottom: 1.4rem; }
.data-form { display: grid; gap: 1rem; }
.data-field { display: grid; gap: .35rem; font-size: .9rem; font-weight: 700; }
.data-field input { width: 100%; min-height: 3rem; padding: .6rem .8rem; border: 1px solid #aab9ad; border-radius: .55rem; background: #fff; color: var(--ink); font: inherit; font-weight: 400; }
.data-field input:focus-visible, .data-consent input:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.data-field small { color: var(--muted); font-size: .8rem; font-weight: 400; }
.required-mark { color: #a31f28; font-weight: 800; }
.data-combobox { position: relative; display: flex; }
.data-combobox > input { padding-right: 3.25rem; }
.data-combobox__toggle { position: absolute; top: .3rem; right: .3rem; display: grid; place-items: center; width: 2.4rem; height: 2.4rem; padding: 0; border: 0; border-radius: .4rem; background: transparent; color: var(--green); }
.data-combobox__toggle:hover { background: var(--green-soft); }
.data-combobox__toggle svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
.data-combobox__list { position: absolute; z-index: 5; top: calc(100% + .3rem); right: 0; left: 0; max-height: 15rem; overflow-y: auto; padding: .3rem; border: 1px solid #aab9ad; border-radius: .55rem; background: #fff; box-shadow: 0 6px 8px #16372424; }
.data-combobox__option { display: block; width: 100%; min-height: 2.8rem; padding: .55rem .75rem; border: 0; border-radius: .35rem; background: #fff; color: var(--ink); text-align: left; }
.data-combobox__option:hover, .data-combobox__option[aria-selected="true"] { background: var(--green-soft); color: var(--green-deep); }
.data-combobox__empty { margin: 0; padding: .65rem .75rem; color: var(--muted); font-size: .85rem; }
.data-consent { display: flex; align-items: flex-start; gap: .7rem; font-size: .89rem; }
.data-consent input { flex: 0 0 1.25rem; width: 1.25rem; height: 1.25rem; margin: .15rem 0 0; accent-color: var(--green); }
.data-consent a { color: var(--green); }
.data-reassurance { margin: .15rem 0 0; line-height: 1.55; }
.data-form .micro-note { margin: 0; }
.screen--finish .micro-note { margin-bottom: 1.2rem; }
.screen--finish .game-actions + .game-actions { margin-top: .6rem; }
.result-actions { display: grid; gap: .9rem; margin-top: .25rem; }
.result-actions__main, .result-actions__social, .result-actions__footer { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; }
.result-actions__main { justify-content: space-between; padding-bottom: .9rem; border-bottom: 1px solid var(--line); }
.result-actions__social .action { flex: 1 1 13rem; }
.result-actions__footer .action { min-height: 2.6rem; padding: .4rem .85rem; border-color: transparent; font-size: .87rem; }
.result-actions__footer .action:hover { border-color: var(--green); }

.site-footer { padding-block: 3rem 2.25rem; border-top: 1px solid var(--line); }
.funding-logos { display: flex; flex-direction: column; align-items: center; gap: 2rem; padding: 1rem; background: #fff; }
.funding-logos img { display: block; width: min(100%, 64rem); height: auto; }
.funding-logos img:nth-child(2) { width: min(100%, 57rem); }
.footer-legal { margin-top: 4rem; color: #68756c; font-size: .87rem; text-align: center; }
.footer-legal p { margin: 0 auto .2rem; max-width: 70ch; }
.footer-legal nav { display: flex; justify-content: center; flex-wrap: wrap; gap: .6rem; }
.footer-legal a { color: inherit; text-decoration: none; }
.footer-legal a:hover { color: var(--green); text-decoration: underline; }
.powered-by { margin: .9rem 0 0; color: var(--muted); font-size: .75rem; text-align: center; }
.footer-legal .powered-by { margin-top: 1.75rem; }
.powered-by a { display: inline-flex; align-items: center; gap: .38rem; margin-left: .35rem; color: inherit; font-weight: 650; text-underline-offset: .15em; vertical-align: middle; }
.leark-mark { display: block; width: .95rem; height: 1.1rem; object-fit: cover; object-position: left center; }
.cm-footer { padding-block: 1rem 2rem; border-top: 1px solid var(--line); }

.cm-page { padding-block: 1rem 4rem; }
.cm-page > h1 { margin: 1.5rem 0 .5rem; font-size: clamp(1.9rem, 4vw, 2.7rem); }
.cm-page > p { max-width: 70ch; color: var(--muted); }
.cm-back { color: var(--green); font-weight: 700; }
.cm-filters { display: flex; flex-wrap: wrap; gap: .8rem; margin: 2rem 0 1rem; }
.cm-filters label { display: grid; gap: .35rem; min-width: 10rem; font-size: .83rem; font-weight: 700; }
.cm-filters select, .cm-table select, .cm-note textarea { min-height: 2.7rem; padding: .55rem .7rem; border: 1px solid #aab9ad; border-radius: .45rem; background: #fff; color: var(--ink); font: inherit; }
.cm-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: .65rem; background: #fff; }
.cm-table { width: 100%; border-collapse: collapse; font-size: .87rem; }
.cm-table th { padding: .8rem; background: var(--green-deep); color: #fff; text-align: left; white-space: nowrap; }
.cm-table td { padding: .75rem .8rem; border-top: 1px solid var(--line); vertical-align: middle; }
.cm-table tbody tr:hover { background: #f1f8f1; }
.cm-row-button { padding: 0; border: 0; background: none; color: var(--green); font-weight: 700; text-align: left; text-decoration: underline; }
.cm-priority { font-weight: 700; }
.cm-priority--rosso { color: #a11b24; }
.cm-priority--giallo { color: #795000; }
.cm-priority--verde { color: #126139; }
.cm-detail { margin-top: 2rem; padding: 1.5rem; border: 1px solid var(--line); border-radius: .8rem; background: #fff; }
.cm-detail h2 { margin-top: 0; }
.cm-detail h3 { margin-bottom: .35rem; }
.cm-axes { display: grid; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); gap: .5rem; }
.cm-axes dt { font-size: .78rem; color: var(--muted); }
.cm-axes dd { margin: 0; font-size: 1.2rem; font-weight: 800; }
.cm-answers { padding-left: 1.4rem; line-height: 1.8; }
.cm-note { display: grid; gap: .5rem; max-width: 35rem; font-weight: 700; }
.cm-warning { margin-top: 1.5rem; }

@media (max-width: 55rem) {
  .game-layout { grid-template-columns: 1fr; gap: 1rem; }
  .mission { min-height: auto; padding: 1.5rem; }
  .mission__line { display: none; }
  .mission__top { margin-top: 0; margin-bottom: .5rem; }
  .mission__mark { flex-basis: 2.5rem; width: 2.5rem; height: 2.5rem; font-size: 1.35rem; }
  .mission h1 { max-width: none; margin-bottom: .4rem; font-size: 2rem; }
  .mission > p:not(.mission__label) { max-width: 55ch; margin-bottom: .6rem; font-size: .94rem; }
  .console { min-height: 40rem; }
  .console--intro { min-height: 0; }
}
@media (max-width: 34rem) {
  .shell { width: min(100% - 1.5rem, 75rem); }
  .game-layout--playing { width: min(100% - 1.5rem, 47rem); }
  .site-header { flex-wrap: wrap; min-height: 5rem; gap: .5rem 1rem; padding-block: .7rem; }
  .brand img { width: 9.5rem; }
  .demo-tag { max-width: 10rem; padding: .35rem .6rem; font-size: .67rem; line-height: 1.2; text-align: center; }
  .game-layout { padding-top: .25rem; }
  .mission { padding: 1.25rem; }
  .mission h1 { font-size: 1.68rem; }
  .console { min-height: 39rem; }
  .console__top { min-height: 4.6rem; padding-inline: 1rem; }
  .chapter { font-size: .7rem; }
  .speaker small { display: none; }
  .progress-wrap { padding-inline: 1rem; }
  .screen { padding: 1rem; }
  .screen--chat { gap: 1rem; }
  .chat-message { max-width: 100%; }
  .chat-message--user { max-width: 82%; }
  .chat-options { width: 100%; margin-left: 0; }
  .chat-controls { padding-inline: 1rem; }
  .chat-controls .micro-note { font-size: .75rem; }
  .bubble { padding: 1rem; }
  .bubble--intro p { font-size: 1rem; }
  .question { font-size: 1.13rem; }
  .choice-button { min-height: 3.5rem; padding: .65rem .8rem; }
  .result-card { padding: 1.2rem; }
  .funding-logos { gap: 1rem; padding: .5rem 0; }
  .footer-legal { margin-top: 2.5rem; font-size: .78rem; }
  .reaction-popover { padding: 1rem; }
  .reaction-popover img { flex-basis: 4.75rem; width: 4.75rem; height: 4.75rem; }
  .result-actions__main .action { width: 100%; }
  .result-actions__main .action--back { order: 2; }
  .result-actions__footer { justify-content: center; }
  .cm-filters label { flex: 1 1 9rem; min-width: 0; }
  .cm-filters select { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
