* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body { font-family: "Avenir Next", "Segoe UI", Arial, sans-serif; background:
radial-gradient(circle at top left, #f4ead8 0%, #efe3d0 28%, #d9d7dd 58%, #bcc9d1 100%);
color: #17212b; }
.deck { position: relative; width: 100vw; height: 100vh; }
.slide { display: none; width: 100vw; height: 100vh; padding: 40px; }
.slide.active { display: block; }
.slide:focus { outline: none; }
.slide:focus-visible { outline: 3px solid #7a9aaa; outline-offset: -3px; }
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.slide-inner {
  width: min(1180px, calc(100vw - 80px));
  height: calc(100vh - 110px);
  margin: 0 auto;
  overflow: auto;
  background: rgba(255,255,255,0.86);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(23, 33, 43, 0.12);
  border-radius: 28px;
  box-shadow: 0 24px 80px rgba(35, 40, 46, 0.16);
  padding: 38px 46px 44px;
}
.title-slide .slide-inner {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
  linear-gradient(135deg, rgba(255,255,255,0.9), rgba(250,245,238,0.86)),
  radial-gradient(circle at right top, rgba(201,127,49,0.14), transparent 35%);
}
.eyebrow { text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.82rem; color: #8b3f1d; margin: 0 0 1rem; }
.instructions { color: #5d6770; margin-top: 1.5rem; font-size: 1rem; }
h1, h2, h3, h4 { line-height: 1.08; color: #1a2834; margin: 0 0 0.8rem; }
h1 { font-size: clamp(2.4rem, 4.6vw, 4.8rem); max-width: 12ch; }
h2 { font-size: clamp(2rem, 3.4vw, 3.4rem); border-bottom: 2px solid rgba(139,63,29,0.2); padding-bottom: 0.5rem; margin-bottom: 1.4rem; }
h3 { font-size: clamp(1.4rem, 2.2vw, 2.1rem); margin-top: 1.8rem; margin-bottom: 0.6rem; }
p, ul, ol, blockquote, table, pre { margin: 0 0 1.1rem; font-size: clamp(1.08rem, 1.6vw, 1.32rem); line-height: 1.55; }
img { max-width: 100%; height: auto; display: block; margin: 1rem auto; border-radius: 18px; box-shadow: 0 14px 42px rgba(35, 40, 46, 0.18); }
ul, ol { padding-left: 1.35rem; }
li { margin: 0.38rem 0; }
blockquote { border-top: 4px solid #c97f31; border-bottom: 4px solid #c97f31; padding: 0.8rem 1.5rem; background: #fff6ea; border-radius: 14px; text-align: center; max-width: 80%; margin-left: auto; margin-right: auto; }
details { margin: 0 0 1rem; border: 1px solid rgba(23, 33, 43, 0.12); border-radius: 14px; background: rgba(255,255,255,0.72); overflow: hidden; }
summary { cursor: pointer; font-weight: 700; padding: 0.75rem 0.95rem; background: rgba(23, 33, 43, 0.06); }
details > :not(summary) { padding-left: 0.95rem; padding-right: 0.95rem; }
pre { background: #1f2430; color: #f3f4f6; padding: 1rem; border-radius: 16px; overflow-x: auto; }
.affiancati { display: flex; gap: 1rem; align-items: flex-start; }
.affiancati .colonna { flex: 1 1 0; min-width: 0; }
@media (max-width: 700px) { .affiancati { flex-direction: column; } .affiancati .colonna { width: 100%; } }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.92em; }
p code, li code, td code, th code, blockquote code { background: rgba(23, 33, 43, 0.07); padding: 0.08rem 0.35rem; border-radius: 4px; }
table { width: 100%; border-collapse: collapse; background: rgba(255,255,255,0.92); border-radius: 14px; overflow: hidden; }
th, td { border: 1px solid rgba(23, 33, 43, 0.12); padding: 0.55rem 0.7rem; vertical-align: top; text-align: left; }
tr.corretta td { background: #d4edda; font-weight: 600; }
th { background: #f2e7d7; }
hr { border: 0; border-top: 1px solid rgba(23, 33, 43, 0.12); margin: 1.2rem 0; }
a { color: #8b3f1d; }
ol.exercise-list { list-style: none; padding-left: 0; }
ol.exercise-list > li { display: flex; align-items: baseline; gap: 0.5em; flex-wrap: wrap; }
a.ex-id { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.78em; font-weight: 600; background: rgba(139,63,29,0.1); border: 1px solid rgba(139,63,29,0.25); color: #8b3f1d; padding: 0.05rem 0.4rem; border-radius: 5px; text-decoration: none; white-space: nowrap; flex-shrink: 0; }
a.ex-id:hover { background: rgba(139,63,29,0.18); }
.controls {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 24px 18px;
  color: #213242;
}
.progress {
  flex: 1;
  height: 6px;
  background: rgba(23, 33, 43, 0.12);
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar { height: 100%; width: 0; background: linear-gradient(90deg, #c97f31, #7a9aaa); }
.counter { min-width: 70px; text-align: right; font-size: 0.95rem; }
.nav button {
  border: 0;
  background: rgba(255,255,255,0.82);
  color: #213242;
  border-radius: 999px;
  padding: 0.72rem 1rem;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(35, 40, 46, 0.12);
}
.nav { display: flex; gap: 10px; }
@media (max-width: 820px) {
  .slide { padding: 18px 14px 78px; }
  .slide-inner { width: 100%; height: calc(100vh - 96px); padding: 24px 22px 30px; border-radius: 20px; }
  p, ul, ol, blockquote, table, pre { font-size: 1rem; }
}
