:root {
  --is-blue: #215c99;
  --is-blue-dark: #164d84;
  --is-navy: #2d577d;
  --is-text: #24384c;
  --is-heading: #314e6a;
  --is-bg: #f6f8fb;
  --is-card: #ffffff;
  --is-muted: #f5f8fa;
  --is-line: #e7ecf2;
  --is-alert: #ae4e3a;
  --is-alert-bg: #fff2ee;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0;
  background: var(--is-bg);
  color: var(--is-text);
  font-family: "DM Sans", "Segoe UI", sans-serif;
  font-weight: 400;
  line-height: 1.6;
}

.top {
  padding: 0;
  background: #fff;
  color: var(--is-heading);
  border-bottom: 1px solid var(--is-line);
}

.top-inner {
  width: 100%;
  max-width: 1120px;
  min-height: 64px;
  margin: 0 auto;
  padding: 11px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand { display: flex; align-items: center; line-height: 0; flex: 0 0 auto; }

.insegna { height: 34px; width: auto; display: block; }

.course {
  padding-left: 16px;
  border-left: 1px solid var(--is-line);
  font-family: "Manrope", "DM Sans", sans-serif;
  font-weight: 600;
  color: var(--is-navy);
}

.exit {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--is-text);
}

.exit button {
  min-height: 36px;
  margin: 0;
  padding: 5px 13px;
  border: 1px solid var(--is-blue);
  border-radius: 8px;
  background: transparent;
  color: var(--is-blue-dark);
}

main {
  width: calc(100% - 40px);
  max-width: 880px;
  flex: 1 0 auto;
  margin: 36px auto;
  padding: 48px 56px 64px;
  background: #fff;
  border: 1px solid #e2eaf0;
  border-radius: 12px;
}

.panel {
  padding: 0;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

h1, h2 {
  font-family: "Manrope", "DM Sans", sans-serif;
  color: var(--is-heading);
}

.panel h1 {
  max-width: 22em;
  margin: 0 0 14px;
  font-size: clamp(2rem, 4vw, 2.65rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.025em;
}

.lead, .fine {
  max-width: 64ch;
  margin-bottom: 28px;
  color: #555;
  line-height: 1.65;
}

.eyebrow, .kicker, .slide-counter {
  margin: 0 0 10px;
  color: var(--is-blue-dark);
  font-family: "Manrope", "DM Sans", sans-serif;
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.eyebrow a { color: inherit; }

.login-page {
  display: flex;
  min-height: 100vh;
  background: #fff;
}

.login-story {
  width: 52%;
  min-height: 100vh;
  padding: 50px 65px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  background: #eef4fa;
}

.login-story::after {
  content: "";
  width: 600px;
  height: 600px;
  border: 90px solid #d9e7f4;
  border-radius: 50%;
  position: absolute;
  right: -220px;
  bottom: -360px;
  opacity: 0.45;
  pointer-events: none;
}

.login-story > img { width: 184px; height: auto; position: relative; z-index: 1; }

.login-story > div { position: relative; z-index: 1; padding: 50px 0; }

.login-story .eyebrow { color: #7797b7; }

.login-story h1 {
  max-width: none;
  margin: 20px 0;
  color: #2d577d;
  font-size: 42px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -1.5px;
}

.login-story > div > p {
  max-width: 380px;
  margin: 0;
  color: #8499ad;
  font-size: 14px;
  line-height: 1.85;
}

.login-points {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 38px;
  color: #6b87a3;
  font-size: 12px;
}

.login-points span { display: flex; align-items: center; gap: 11px; }

.login-points svg { width: 18px; height: 18px; flex: 0 0 auto; }

.login-foot { position: relative; z-index: 1; margin: 0; color: #9baec0; font-size: 10px; }

.login-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 50px;
}

.login-panel form { width: 340px; }

.login-panel h2 {
  margin: 12px 0 10px;
  color: #314e6a;
  font-size: 25px;
  letter-spacing: -0.8px;
}

.login-lead { margin: 0 0 28px; color: #93a1b0; font-size: 12px; }

.login-panel label {
  margin: 0 0 8px;
  color: #51677f;
  font-size: 12px;
  font-weight: 550;
}

.login-panel input {
  min-height: 0;
  margin-bottom: 18px;
  border: 1px solid #dbe3ee;
  border-radius: 7px;
  padding: 11px 12px;
  color: #3b526b;
}

.login-panel input:focus {
  outline: none;
  border-color: #4287bf;
  box-shadow: 0 0 0 3px #4287bf17;
}

.login-panel button {
  width: 100%;
  margin-top: 5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 8px;
  background: var(--is-blue);
  box-shadow: 0 2px 3px #10334f0b;
}

.login-help {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 24px 0 0;
  color: #9dabbd;
  font-size: 10px;
}

.login-help::before {
  content: "";
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  border: 1.4px solid currentColor;
  border-radius: 50%;
}

.gate-form { margin-top: 0; }

.narrow { max-width: 34rem; }

label {
  display: block;
  margin: 18px 0 7px;
  font-weight: 500;
  color: var(--is-heading);
}

input[type="text"],
input[type="password"],
input:not([type]) {
  width: 100%;
  min-height: 48px;
  border: 1px solid #cbd8e1;
  border-radius: 8px;
  padding: 11px 13px;
  font: inherit;
}

input:focus-visible,
button:focus-visible,
.button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(32, 146, 202, 0.24);
  outline-offset: 2px;
}

button, .button {
  display: inline-block;
  min-height: 44px;
  margin: 0;
  padding: 11px 20px;
  border: 0;
  border-radius: 8px;
  background: var(--is-blue);
  color: white;
  font-family: "Manrope", "DM Sans", sans-serif;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease;
}

button:hover, .button:hover { background: var(--is-blue-dark); }

.button.ghost {
  background: #fff;
  color: var(--is-blue-dark);
  border: 1px solid var(--is-blue);
}

.button.ghost:hover,
.exit button:hover {
  background: #f2f7fa;
  color: var(--is-blue-dark);
}

.gate-form button { margin-top: 8px; }

.alert {
  background: var(--is-alert-bg);
  color: var(--is-alert);
  padding: 10px 12px;
  border-radius: 8px;
}

.note {
  padding: 13px 16px;
  border-left: 3px solid var(--is-blue);
  border-radius: 0 8px 8px 0;
  background: #f2f7fa;
}

.chapters {
  list-style: none;
  padding: 0;
  margin: 32px 0 0;
  border-top: 1px solid var(--is-line);
}

.chapters li { margin: 0; }

.chapters a,
.chapters .locked {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  margin: 0;
  padding: 18px 8px;
  border: 0;
  border-bottom: 1px solid var(--is-line);
  border-radius: 0;
  color: inherit;
  text-decoration: none;
  background: transparent;
}

.chapters a:hover {
  border-color: var(--is-line);
  background: #f7fbfd;
  box-shadow: none;
}

.chapters .num {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 2px solid var(--is-navy);
  border-radius: 50%;
  background: var(--is-navy);
  color: #fff;
  font-family: "Manrope", "DM Sans", sans-serif;
  font-weight: 600;
}

.chapters small { display: block; margin-top: 3px; color: #666; }

.chapter-copy strong {
  display: block;
  font-family: "Manrope", "DM Sans", sans-serif;
  font-size: 1.04rem;
  font-weight: 600;
}

.chapters .locked { color: #7b858c; background: transparent; }

.chapters .locked .num {
  border-color: #cbd6de;
  background: #fff;
  color: #697985;
}

.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  list-style: none;
  padding: 0;
  margin: 0 0 40px;
}

.steps::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 16px;
  left: 16.66%;
  right: 16.66%;
  height: 1px;
  background: var(--is-line);
}

.steps li {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 0;
  background: transparent;
  color: #72808a;
  font-family: "Manrope", "DM Sans", sans-serif;
  font-size: 0.84rem;
  letter-spacing: 0;
  text-transform: none;
}

.step-number {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--is-line);
  border-radius: 50%;
  background: #fff;
  font-family: "Manrope", "DM Sans", sans-serif;
  font-weight: 600;
}

.steps li.done { background: transparent; color: var(--is-navy); }

.steps li.done .step-number {
  border-color: #b9ddeb;
  background: #e7f5fb;
}

.steps li.now { background: transparent; color: var(--is-navy); }

.steps li.now .step-number {
  border-color: var(--is-navy);
  background: var(--is-navy);
  color: #fff;
}

.media-frame {
  margin: 24px 0 16px;
  overflow: hidden;
  border: 1px solid #173847;
  border-radius: 12px;
  background: #0e2a38;
}

.player {
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 0;
  display: block;
  border-radius: 0;
  background: #0e2a38;
  cursor: pointer;
}

.player-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px 12px;
  background: #0e2a38;
  color: #f4f7f8;
}

.player-toggle {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 0;
  border-radius: 50%;
  background: #2092ca;
  cursor: pointer;
}

.player-toggle:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.player-icon {
  width: 0;
  height: 0;
  margin-left: 3px;
  border-style: solid;
  border-width: 7px 0 7px 12px;
  border-color: transparent transparent transparent #fff;
}

.player-toggle.is-playing .player-icon {
  width: 11px;
  height: 14px;
  margin-left: 0;
  border: 0;
  background:
    linear-gradient(#fff, #fff) left center / 3px 14px no-repeat,
    linear-gradient(#fff, #fff) right center / 3px 14px no-repeat;
}

.player-track {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  pointer-events: none;
}

.player-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #7ec8e8;
}

.player-clock {
  min-width: 3.2em;
  font-variant-numeric: tabular-nums;
  font-size: 0.85rem;
  text-align: right;
}

.lesson-copy { margin-top: 28px; }

.prose {
  max-width: 68ch;
  font-size: 1.04rem;
  line-height: 1.72;
}

.prose p { margin: 0 0 1.1em; }

.prose h2 { font-size: 1.15rem; }

.actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.lesson-actions {
  justify-content: flex-end;
  margin: 30px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--is-line);
}

.lesson-actions .ghost { margin-right: auto; }

.slide-counter { margin: 24px 0 10px; }

.slide {
  aspect-ratio: 16 / 9;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin: 0 0 24px;
  border: 1px solid var(--is-line);
  border-radius: 10px;
  background: #f7fbfd;
}

.slide h2 {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 12px;
}

.slide.deck {
  position: relative;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--is-line);
  border-top-width: 1px;
  background: #f4f8fb;
}

.slide.deck img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #f4f8fb;
}

.slide.deck h2,
.slide.deck .prose {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.slide.deck.text-only {
  min-height: 380px;
  padding: 32px 38px;
  border-top: 4px solid var(--is-blue);
  background: #f7fbfd;
}

.slide.deck.text-only h2,
.slide.deck.text-only .prose {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
}

.sheet {
  margin: 32px 0;
  padding: 24px 28px;
  border: 1px solid #d4e7f2;
  border-left: 4px solid var(--is-navy);
  border-radius: 0 10px 10px 0;
  background: #eef6fb;
}

.sheet h2 { margin: 0 0 8px; }

.sheet-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 22px;
}

.sheet-block h3 {
  margin: 0 0 8px;
  font-family: "Manrope", "DM Sans", sans-serif;
  color: var(--is-heading);
  font-size: 1rem;
}

.sheet-block ul { margin-bottom: 0; }

.sheet-contact { margin: 22px 0 0; font-weight: 500; }

.quiz fieldset {
  margin: 0;
  padding: 26px 0;
  border: 0;
  border-top: 1px solid var(--is-line);
  border-radius: 0;
}

.quiz fieldset:first-child { border-top: 0; }

.quiz legend {
  width: 100%;
  padding: 0 0 13px;
  color: var(--is-heading);
  font-family: "Manrope", "DM Sans", sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.4;
}

.choice {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 48px;
  margin: 8px 0;
  padding: 12px 14px;
  border: 1px solid var(--is-line);
  border-radius: 8px;
  background: #fff;
  font-weight: 400;
}

.choice:hover {
  border-color: #8fc9e3;
  background: #f7fbfd;
}

.choice:has(input:checked) {
  border-color: var(--is-blue);
  background: #eaf6fb;
}

.choice input {
  margin: 0;
  accent-color: var(--is-navy);
}

.quiz-submit {
  display: block;
  margin: 28px 0 0 auto;
}

.score, .verdict {
  display: inline-block;
  margin: 0 0 8px;
  padding: 2px 10px;
  border-radius: 6px;
  font-weight: 600;
}

.verdict.ok, .score.ok { background: #e7f6ee; color: #146c43; }

.verdict.bad, .score.bad { background: #fdecea; color: #9b1c1c; }

.score { font-size: 1.05rem; }

.results {
  list-style: none;
  padding: 0;
  margin-top: 28px;
  border-top: 1px solid var(--is-line);
}

.results li,
.results li.ok,
.results li.bad {
  margin: 0;
  padding: 24px 0;
  border: 0;
  border-bottom: 1px solid var(--is-line);
  border-radius: 0;
  background: transparent;
}

.result-question {
  margin: 12px 0 16px;
  color: var(--is-heading);
}

.result-line { margin: 10px 0; }

.result-line span {
  display: block;
  margin-bottom: 2px;
  color: #697680;
  font-size: 0.84rem;
  font-weight: 500;
}

.result-comment {
  margin: 16px 0 0;
  color: #555;
}

.register h2 { margin-top: 40px; }

.register form { max-width: 34rem; }

.table-wrap {
  margin: 0 0 30px;
  overflow-x: auto;
  border: 1px solid var(--is-line);
  border-radius: 10px;
  background: #fff;
}

.table-wrap table {
  min-width: 720px;
  margin: 0;
}

table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }

th, td {
  border-bottom: 1px solid var(--is-line);
  text-align: left;
  vertical-align: top;
  padding: 11px 12px;
}

th {
  background: #f2f7fa;
  color: var(--is-heading);
  font-family: "Manrope", "DM Sans", sans-serif;
  font-weight: 600;
}

.foot {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 20px 28px;
}

.foot img { height: 34px; width: auto; }

body.attestato main {
  max-width: 1040px;
  padding: 12px 0 28px;
  background: transparent;
  border: 0;
}

.diploma-cta {
  margin: 0 0 28px;
  padding: 22px 24px;
  border: 1px solid #d5e3ee;
  border-left: 4px solid var(--is-navy);
  background: #f7fafc;
}

.diploma-cta h2 {
  margin: 0 0 6px;
  font-size: 1.35rem;
}

.diploma-cta p:last-of-type { margin: 0 0 16px; color: #555; }

.diploma {
  padding: 14px;
  background: #f7f4ee;
  border: 2px solid var(--is-navy);
  box-shadow: 0 0 0 7px #f7f4ee, 0 0 0 8px #1ba2dd;
}

.diploma-inner {
  position: relative;
  padding: 42px 56px 28px;
  border: 1px solid #d5deea;
  text-align: center;
}

.diploma-mark { height: 42px; width: auto; }

.diploma-brand {
  margin: 10px 0 0;
  color: var(--is-navy);
  font-family: "Manrope", "DM Sans", sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.32em;
}

.diploma-kicker {
  margin: 26px 0 8px;
  color: var(--is-blue-dark);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.diploma h1 {
  max-width: none;
  margin: 0;
  color: var(--is-navy);
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  letter-spacing: -0.02em;
}

.diploma-lead {
  margin: 22px 0 0;
  color: #6a7784;
  font-style: italic;
}

.diploma-name {
  margin: 6px 0 0;
  color: #1c2c44;
  font-family: "Manrope", "DM Sans", sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  line-height: 1.1;
}

.diploma-statement {
  max-width: 38em;
  margin: 14px auto 0;
  color: var(--is-text);
}

.diploma-company {
  margin: 10px 0 0;
  color: var(--is-navy);
  font-family: "Manrope", "DM Sans", sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
}

.diploma-place {
  margin: 16px 0 0;
  color: #6a7784;
  font-style: italic;
}

.diploma-seal {
  width: 74px;
  height: 74px;
  margin: 22px auto 0;
  display: grid;
  place-items: center;
  border: 2px solid var(--is-navy);
  border-radius: 50%;
  box-shadow: inset 0 0 0 4px #f7f4ee, inset 0 0 0 5px #1ba2dd;
}

.diploma-seal img { height: 28px; width: auto; }

.diploma-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 22px 0 0;
  color: var(--is-navy);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}

.diploma-actions { border-top: 0; }

@media (max-width: 640px) {
  body { background: #fff; }

  .top-inner {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 6px 12px;
    padding: 10px 16px;
  }

  .brand { grid-column: 1; grid-row: 1; }
  .insegna { height: 28px; }

  .exit {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    margin-left: 0;
  }

  .exit span { display: none; }

  .course {
    grid-column: 1 / -1;
    grid-row: 2;
    padding: 7px 0 0;
    border-top: 1px solid var(--is-line);
    border-left: 0;
    font-size: 0.95rem;
  }

  main {
    width: 100%;
    margin: 0;
    padding: 30px 20px 48px;
    border: 0;
    border-radius: 0;
  }

  .panel h1 { font-size: 2rem; }
  .steps { margin-bottom: 32px; }

  .sheet { padding: 22px 20px; }
  .sheet-grid { grid-template-columns: 1fr; }

  .slide.deck {
    min-height: 320px;
    aspect-ratio: auto;
    padding: 28px 24px;
    border-top: 4px solid var(--is-blue);
  }

  .slide.deck img { display: none; }

  .slide.deck h2,
  .slide.deck .prose {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
  }

  .slide.deck h2 {
    margin: 0 0 14px;
    font-size: 1.8rem;
  }

  .login-page { flex-direction: column; }

  .login-story {
    width: 100%;
    min-height: 0;
    padding: 24px;
  }

  .login-story > div { padding: 28px 0 8px; }

  .login-story h1 { font-size: 28px; }

  .login-story > div > p,
  .login-points,
  .login-foot { display: none; }

  .login-story > img { width: 150px; }

  .login-panel { padding: 34px 24px 48px; }

  .login-panel form { width: 100%; max-width: 390px; }

  .diploma { padding: 22px 16px 18px; }
  .diploma-inner { padding: 28px 18px 22px; }
  .diploma-meta { flex-direction: column; gap: 6px; }
  body.attestato main { padding: 16px 12px 32px; }
}
