:root {
  --navy: #0F1E27;
  --blue: #006FFE;
  --blue-hover: #0059CC;
  --white: #FFFFFF;
  --grey-100: #F4F6F8;
  --grey-400: #8A97A3;
  --font: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 3px;
  --container: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.7;
  color: var(--navy);
  background: var(--grey-100);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
p { margin: 0 0 1.1em; }
h1, h2 { margin: 0 0 24px; line-height: 1.1; letter-spacing: -0.02em; font-weight: 800; }
h1 { font-size: clamp(1.8rem, 5vw, 2.5rem); }
h2 { font-size: clamp(1.3rem, 3vw, 1.6rem); }
a { color: var(--blue); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.page { padding-top: 56px; padding-bottom: 80px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid rgba(15, 30, 39, 0.12);
}
.site-header .container { display: flex; align-items: center; height: 60px; }
.site-header__logo { height: 32px; width: auto; }

.card {
  max-width: 440px;
  margin: 0 auto;
  padding: 36px 32px;
  background: var(--white);
  border: 1px solid rgba(15, 30, 39, 0.12);
  border-radius: var(--radius);
}
.card__foot { margin: 24px 0 0; font-size: 0.95rem; }

.field { display: block; margin-bottom: 20px; font-weight: 600; font-size: 0.95rem; }
.field input {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 14px 16px;
  font: inherit;
  font-weight: 400;
  color: var(--navy);
  background: var(--white);
  border: 1px solid rgba(15, 30, 39, 0.35);
  border-radius: var(--radius);
}

.btn {
  display: inline-block;
  padding: 16px 28px;
  font: inherit;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  border-radius: var(--radius);
  border: 2px solid var(--blue);
  transition: background-color 0.2s, color 0.2s;
}
.btn--primary { background: var(--blue); color: var(--white); }
.btn--primary:hover { background: var(--blue-hover); border-color: var(--blue-hover); }
.btn--outline { background: transparent; color: var(--blue); }
.btn--outline:hover { background: rgba(0, 111, 254, 0.08); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.message { min-height: 1.7em; margin: 20px 0 0; }

@media (prefers-reduced-motion: reduce) { .btn { transition: none; } }

/* L'attributo hidden deve vincere anche su .btn (display: inline-block),
   che altrimenti lo scavalca per specificita'. */
[hidden] { display: none !important; }

.hero { padding: 24px 0 0; }
.hero__title { font-size: clamp(2.2rem, 8vw, 4.5rem); letter-spacing: -0.035em; line-height: 1.02; }
.hero__sub { font-size: clamp(1.1rem, 2.4vw, 1.4rem); line-height: 1.5; max-width: 44ch; }
.actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 32px; }

.area__head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 32px; }
.area__head h1 { margin: 0; }
.player { margin-top: 32px; }
.player iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; }

.steps { margin: 0; padding-left: 1.4em; }
.steps li { margin-bottom: 28px; }
.steps p { margin: 4px 0 12px; }
.area__actions { display: flex; gap: 12px; flex-wrap: wrap; }

.lead { max-width: 70ch; }
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.box {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  color: var(--navy);
  text-decoration: none;
  background: var(--white);
  border: 1px solid rgba(15, 30, 39, 0.12);
  border-radius: var(--radius);
  transition: border-color 0.2s;
}
.box:hover { border-color: var(--blue); }
.box__title { margin: 0; font-size: 1.2rem; }
.box__text { margin: 0; color: rgba(15, 30, 39, 0.75); }
.box__meta { margin: auto 0 0; font-size: 0.9rem; color: var(--grey-400); }

.progress { height: 6px; background: var(--grey-100); border-radius: 3px; overflow: hidden; }
.progress__fill { height: 100%; background: var(--blue); }
.badge {
  display: inline-block;
  padding: 2px 10px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--white);
  background: var(--blue);
  border-radius: var(--radius);
}

.check { display: flex; align-items: center; gap: 10px; margin: 24px 0; font-weight: 600; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--blue); }
.lesson-nav { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.is-disabled { opacity: 0.45; pointer-events: none; cursor: not-allowed; }

@media (prefers-reduced-motion: reduce) { .box { transition: none; } }

.alert { padding: 14px 18px; margin-bottom: 20px; border-radius: var(--radius); }
.alert--error { color: #7A1B1B; background: #FDECEC; border: 1px solid #C62828; }

.box__cover { aspect-ratio: 16 / 9; overflow: hidden; background: var(--grey-100); border-radius: var(--radius); }
.box__cover img { display: block; width: 100%; height: 100%; object-fit: cover; }

.panel {
  max-width: 720px;
  margin: 0 0 20px;
  padding: 24px 28px;
  background: var(--white);
  border: 1px solid rgba(15, 30, 39, 0.12);
  border-radius: var(--radius);
}
.panel h2 { margin-bottom: 12px; font-size: 1.2rem; }
.panel p { margin: 0 0 14px; }
.session {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 0;
  border-top: 1px solid rgba(15, 30, 39, 0.12);
}
.session__since { font-size: 0.9rem; color: var(--grey-400); }
.alert .btn { margin-top: 12px; }

/* Il footer sta sempre in fondo, anche con poco contenuto. */
body { display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1 0 auto; width: 100%; }
.site-footer {
  margin-top: auto;
  padding: 40px 0;
  color: rgba(255, 255, 255, 0.75);
  background: var(--navy);
  font-size: 0.85rem;
  line-height: 1.6;
}
.site-footer__brand { margin: 0 0 12px; color: var(--white); font-weight: 800; letter-spacing: 0.02em; }
.site-footer__disclaimer { max-width: 80ch; margin: 0 0 16px; }
.site-footer__legal { margin: 0; }
.site-footer a { color: var(--white); text-decoration: underline; text-underline-offset: 3px; }

.card--wide { max-width: 560px; }
.price { margin: 0 0 4px; font-size: clamp(2rem, 6vw, 3rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.price__note { margin: 0 0 24px; font-size: 0.95rem; color: var(--grey-400); }
.included { margin: 0 0 24px; padding: 0; list-style: none; }
.included li { position: relative; padding: 6px 0 6px 28px; }
.included li::before { content: "\2713"; position: absolute; left: 0; color: var(--blue); font-weight: 800; }
.check--consent { align-items: flex-start; font-weight: 400; font-size: 0.95rem; }
.check--consent input { flex: none; margin-top: 4px; }

/* Menu di navigazione */
.site-header .container { justify-content: space-between; gap: 16px; }
.site-nav { display: flex; align-items: center; }
.site-nav__links { display: flex; align-items: center; gap: 22px; }
.site-nav__links > a:not(.btn) {
  padding: 6px 0;
  color: var(--navy);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.site-nav__links > a:not(.btn):hover,
.site-nav__links > a[aria-current="page"] { border-bottom-color: var(--blue); }
.btn--small { padding: 8px 16px; font-size: 0.9rem; }
.nav-toggle {
  display: none;
  padding: 8px 14px;
  font: inherit;
  font-weight: 700;
  color: var(--navy);
  background: transparent;
  border: 2px solid var(--navy);
  border-radius: var(--radius);
  cursor: pointer;
}
@media (max-width: 760px) {
  .nav-toggle { display: inline-block; }
  .site-nav__links {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 20px 20px;
    background: var(--white);
    border-bottom: 1px solid rgba(15, 30, 39, 0.12);
  }
  .site-nav__links.is-open { display: flex; }
  .site-nav__links > a:not(.btn) { padding: 12px 0; border-bottom: 1px solid rgba(15, 30, 39, 0.08); }
  .site-nav__links .btn { margin-top: 12px; }
}

/* Capitolo con il lucchetto: si vede il box, non si entra. */
.box--locked { background: #F9FAFB; border-style: dashed; }
.box__lock {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  color: var(--navy);
  background: rgba(15, 30, 39, 0.08);
  border-radius: 50%;
}
.box--locked .btn { align-self: flex-start; }
