:root {
  color-scheme: light;

  --unibo-red: #bb2e29;
  --text: #555;
  --label: #616161;
  --border: #e5e5e5;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #fff;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
}

a {
  color: var(--unibo-red);
  text-underline-offset: 0.15em;
}

a:hover {
  text-decoration-thickness: 2px;
}

a:focus-visible {
  outline: 2px solid var(--unibo-red);
  outline-offset: 4px;
}

.page {
  width: min(1200px, calc(100% - 80px));
  margin: 0 auto;
}

.masthead {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) auto;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0;
}

.heading-group p {
  margin-bottom: 0;
}

.institution {
  display: block;
  flex-shrink: 0;
  width: 280px;

  /* Manual pp. 15, 20: width 37x; clear space >= 6x (34.1px at 210px). */
  padding: 35px;
  background: #fff;
}

.institution img {
  display: block;
  width: 210px;
  height: auto;
}

.language-switch {
  display: flex;
  gap: 16px;
  font-size: 0.875rem;
}

.language-switch a[aria-current="page"] {
  font-weight: 700;
  text-decoration-thickness: 2px;
}

h1 {
  margin: 0 0 8px;
  color: #333;
  font-size: 2rem;
  font-weight: 400;
  line-height: 1.3;
}

.intro {
  margin: 0 0 16px;
}

.language-notice {
  margin: 0 0 24px;
  padding: 12px 16px;
  border-left: 3px solid var(--unibo-red);
  background: #f8f8f8;
  font-size: 0.875rem;
}

.service-table {
  width: 100%;
  border-collapse: collapse;
}

.service-table tr {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.service-table tr:nth-child(odd) {
  background: #f8f8f8;
}

.service-table tr:hover {
  background: #eee;
}

.service-table th,
.service-table td {
  padding: 16px 12px;
  text-align: left;
  overflow-wrap: anywhere;
}

.service-table th {
  width: 22%;
  color: var(--label);
  font-size: 0.875rem;
  font-weight: 400;
  vertical-align: middle;
  text-transform: uppercase;
}

.service-table td {
  vertical-align: top;
}

p {
  margin: 0 0 12px;
}

td p:last-child {
  margin-bottom: 0;
}

ul {
  margin: 12px 0;
  padding-left: 24px;
}

code {
  font-size: 0.9em;
}

.cell-note {
  margin-top: 8px;
  font-size: 0.875rem;
}

.pending {
  color: #754818;
  font-weight: 600;
}

.institutional-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px 32px;
  margin-top: 24px;
  padding: 24px 0;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
}

.institutional-footer h2 {
  margin: 0 0 8px;
  color: #333;
  font-size: 1.125rem;
  font-weight: 400;
}

.institutional-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.institutional-footer li + li {
  margin-top: 10px;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  padding: 12px;
  background: #fff;
}

.skip-link:focus {
  top: 12px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

[hidden] {
  display: none !important;
}

@media (max-width: 800px) {
  .masthead {
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 0;
  }

  .heading-group {
    grid-column: 1 / -1;
    grid-row: 2;
    padding-bottom: 16px;
  }

  .language-switch {
    justify-self: end;
    flex-wrap: wrap;
  }
}

@media (max-width: 620px) {
  .page {
    width: calc(100% - 32px);
  }

  .masthead {
    grid-template-columns: 1fr;
  }

  .language-switch {
    grid-row: 3;
    justify-self: start;
    margin-bottom: 24px;
  }

  h1 {
    font-size: 1.625rem;
  }

  .service-table th,
  .service-table td {
    padding: 14px 8px;
  }

  .service-table th {
    width: 35%;
    font-size: 0.8125rem;
  }

  .institutional-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }
}

@media print {
  body {
    font-size: 10pt;
  }

  .page {
    width: 100%;
  }

  .language-switch,
  .skip-link {
    display: none;
  }

  .service-table tr {
    break-inside: avoid;
  }
}
