:root {
  --bg: #ffffff;
  --alt: #f5f7fa;
  --ink: #182230;
  --muted: #687587;
  --line: #dfe5ec;
  --brand: #174f7a;
  --brand-soft: #eaf1f6;
  --accent: #d99122;
  --max: 960px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
}
a { color: var(--brand); }
.container { width: min(calc(100% - 32px), var(--max)); margin-inline: auto; }

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.header-inner {
  min-height: 94px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 28px;
}
.course-title { display: flex; align-items: center; gap: 14px; }
.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: white;
  background: var(--brand);
  font-weight: 800;
}
h1 { margin: 0; font-size: 1.65rem; line-height: 1.15; letter-spacing: -.025em; }
.course-title p { margin: 4px 0 0; color: var(--muted); font-size: .88rem; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a {
  padding: 6px 9px;
  border-radius: 6px;
  color: var(--muted);
  text-decoration: none;
  font-size: .88rem;
  font-weight: 650;
}
.nav a:hover { color: var(--brand); background: var(--brand-soft); }

.section { padding: 32px 0; scroll-margin-top: 100px; }
.first-section { padding-top: 28px; }
.alternate { background: var(--alt); }
.section-title { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; }
.section-symbol {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: var(--brand);
  background: var(--brand-soft);
  font-size: .82rem;
  font-weight: 800;
}
h2 { margin: 0; font-size: 1.25rem; line-height: 1.2; }
.section p { max-width: 850px; margin: 0 0 9px; }

.content-list, .compact-list { margin: 0; }
.content-list { list-style: none; padding: 0; border-top: 1px solid var(--line); }
.content-list li { border-bottom: 1px solid var(--line); }

.announcement-list li {
  display: grid;
  grid-template-columns: 135px 1fr;
  gap: 18px;
  padding: 10px 8px;
}
.announcement-list li.important { border-left: 3px solid var(--accent); padding-left: 10px; }
.announcement-list time { color: var(--muted); font-size: .82rem; font-weight: 700; }

.compact-list {
  padding-left: 20px;
  columns: 2;
  column-gap: 42px;
  margin-top: 12px;
}
.compact-list li { margin: 3px 0; }

.file-list li {
  display: grid;
  grid-template-columns: 46px 1fr;
  align-items: center;
  gap: 10px;
  padding: 8px 6px;
}
.file-type {
  width: 36px;
  padding: 2px 0;
  border-radius: 4px;
  color: var(--brand);
  background: var(--brand-soft);
  text-align: center;
  font-size: .68rem;
  font-weight: 850;
}
.file-list a { display: block; text-decoration: none; }
.file-list a:hover strong { text-decoration: underline; }
.file-list strong, .file-list small { display: block; }
.file-list strong { color: var(--ink); font-size: .94rem; }
.file-list small { margin-top: 1px; color: var(--muted); font-size: .79rem; }

.exam-list li {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 9px 6px;
}
.exam-list li > span:first-child { color: var(--muted); font-size: .82rem; font-weight: 700; }
.exam-list a { color: var(--ink); text-decoration: none; font-weight: 650; }
.exam-list a:hover { color: var(--brand); text-decoration: underline; }
.pdf-link { color: var(--brand); font-size: .76rem; font-weight: 800; }

.footer {
  padding: 18px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: #f0f3f6;
  font-size: .8rem;
}

@media (max-width: 720px) {
  .header-inner { min-height: 0; padding: 16px 0; align-items: flex-start; flex-direction: column; gap: 12px; }
  .nav { width: 100%; }
  .nav a:first-child { padding-left: 0; }
  .section { padding: 26px 0; }
  .announcement-list li { grid-template-columns: 1fr; gap: 2px; }
  .compact-list { columns: 1; }
  .exam-list li { grid-template-columns: 76px 1fr auto; gap: 8px; }
}

@media (max-width: 480px) {
  .container { width: min(calc(100% - 22px), var(--max)); }
  .course-title { align-items: flex-start; }
  .brand-mark { width: 36px; height: 36px; }
  h1 { font-size: 1.4rem; }
  .course-title p { font-size: .8rem; }
  .exam-list li { grid-template-columns: 1fr auto; }
  .exam-list li > span:first-child { grid-column: 1 / -1; }
}

.course-icon {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
}

.course-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* Lista di file contenenti codice */
.code-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.code-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 4px;
    border-bottom: 1px solid var(--border);
}

.code-list li:last-child {
    border-bottom: none;
}

.code-list .code-type {
    min-width: 52px;
    padding: 3px 7px;
    border-radius: 4px;
    background: #eef2ff;
    color: #3f51b5;
    font-family: monospace;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
}

.code-list .code-info {
    flex: 1;
}

.code-list .code-info a {
    font-weight: 500;
    text-decoration: none;
}

.code-list .code-info a:hover {
    text-decoration: underline;
}

.code-list .code-description {
    margin-left: 8px;
    color: var(--muted);
    font-size: 0.85rem;
}

