/*
 * Classico: the look of today's tplus.it (css/style.css and images/head.gif of the old site),
 * responsive and accessible. Same layout, colours and images; larger type, cared spacing, sharp
 * logos and clear hover and focus states.
 *
 * Layout: on large screens one screen (header, red band with the scrolling sheet, menu, footer);
 * below 56.25em x 40em the page scrolls normally. The home is one screen only when everything fits
 * with its full-size slider, otherwise it scrolls. The breakpoints are in em, which media queries
 * take from the browser's default font size: 900 x 640 px at the usual 16 px, and proportionally
 * more for a reader who chose larger text, whose rem-sized header, band and footer would not fit.
 * A narrow layout is always the exact complement of its wide one ("not all and (min-width: …)").
 * The DOM order is never changed here. No inline styles anywhere: the Content-Security-Policy
 * blocks them.
 */

:root {
  --c-red: #93231B;
  --c-bg: #ffffff;
  --c-text: #000000;
  --c-title: #333333;
  --c-link: #606060;
  --c-link-hover: #000000;
  --c-footer: #666666;
  --c-on-red: #ffffff;
  --c-promo: #6b6b6b;
  --c-rule: #000000;
  --c-error: #93231B; /* the messages of the contact form: the brand red, 8.4:1 on white */
  --c-focus-inner: #ffffff;
  --c-focus-outer: #1D4ED8;
  --fs-text: 1rem;
  --fs-menu: 1.125rem;
  --fs-title: 1.5rem;
  --fs-footer: 0.8125rem;
  --lh-text: 1.5;
  --w-page: 61.25rem; /* 980 px: the text (700) and side (240 + 40) columns of today */
}

/* ---------------------------------------------------------------- base */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: Helvetica, Arial, sans-serif;
  font-size: var(--fs-text);
  line-height: var(--lh-text);
  text-align: left;
}

img {
  max-width: 100%;
  height: auto;
  border: 0;
}

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

/* Keyboard focus: a white ring inside a blue one, visible on white and on the red. */
:focus-visible {
  outline: 2px solid var(--c-focus-inner);
  outline-offset: 0;
  box-shadow: 0 0 0 4px var(--c-focus-outer);
}

/* The target of "Salta al contenuto" is not a control: the sheet inside it shows the focus. */
main:focus {
  outline: none;
  box-shadow: none;
}

.skip {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 100;
  padding: 0.5rem 1rem;
  background: var(--c-bg);
  color: var(--c-text);
  text-decoration: underline;
  transform: translateY(-300%);
}

.skip:focus {
  transform: none;
}

/* ---------------------------------------------------------------- the panel's notice */

/* For whoever is logged in to the panel only (plan 2, Task 14: a draft, the preview of changes not saved): a band at
   the top of the page, before the header, in the colours of the red band (white on the brand red, 8.4:1). Visitors
   never get it: the page is the same without it. */
.cl-panel-notice {
  margin: 0;
  padding: 0.5rem 1rem;
  font-weight: 700;
  text-align: center;
  color: var(--c-on-red);
  background: var(--c-red);
}

/* ---------------------------------------------------------------- header (images/head.gif, 940 x 100) */

.cl-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: 1rem;
  width: 100%; /* in the one-screen grid, auto margins alone would shrink it to its content */
  max-width: calc(var(--w-page) + 2rem);
  min-height: 6.25rem;
  margin: 0 auto;
  padding: 0.25rem 1rem;
}

.cl-header a {
  display: block;
  color: inherit;
  text-decoration: none;
}

.cl-header img {
  display: block;
}

.cl-logo {
  justify-self: start;
}

/* "Turismo: ripartiamo da qui" above the Futuro graphic, darker than today's for contrast */
.cl-promo {
  justify-self: center;
}

.cl-promo-text {
  display: block;
  max-width: 8em;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.75rem;
  line-height: 1.2;
  color: var(--c-promo);
}

/* "Spinoff sostenuto da" right-aligned above the logotype of the Università di Sassari */
.cl-partner {
  justify-self: end;
}

.cl-header .cl-partner {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

.cl-partner-text {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1.25rem;
  line-height: 1.2;
  color: var(--c-text);
}

.cl-promo:hover .cl-promo-text,
.cl-partner:hover .cl-partner-text {
  color: var(--c-link-hover);
  text-decoration: underline;
}

.cl-header .cl-lang {
  grid-column: 3;
  justify-self: end;
  color: var(--c-link);
  font-size: var(--fs-footer);
  text-decoration: underline;
}

.cl-header .cl-lang:hover {
  color: var(--c-link-hover);
}

/* The menu button exists only with JavaScript, below 56.25em (see the end of the file). */
.cl-menu-btn {
  display: none;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  margin-left: auto;
  padding: 0.375rem 0.875rem;
  border: 1px solid var(--c-link);
  border-radius: 0;
  background: var(--c-bg);
  color: var(--c-link);
  font: inherit;
  font-size: var(--fs-menu);
  line-height: 1.2;
  cursor: pointer;
}

.cl-menu-btn:hover {
  border-color: var(--c-link-hover);
  color: var(--c-link-hover);
}

.cl-menu-btn[aria-expanded="true"] {
  background: var(--c-link);
  color: var(--c-bg);
}

/* three bars drawn with borders, which stay visible in forced colours */
.cl-menu-icon,
.cl-menu-icon::before,
.cl-menu-icon::after {
  display: block;
  width: 1.125rem;
  border-top: 2px solid currentColor;
}

.cl-menu-icon {
  position: relative;
}

.cl-menu-icon::before,
.cl-menu-icon::after {
  content: "";
  position: absolute;
  left: 0;
}

.cl-menu-icon::before {
  top: -8px;
}

.cl-menu-icon::after {
  top: 4px;
}

/* ---------------------------------------------------------------- inner pages: band, sheet, rule */

.cl-band {
  position: relative;
  z-index: 1; /* its shadow falls on the header and on the sheet, as today */
  display: flex;
  align-items: center;
  min-height: 6.25rem;
  margin-top: 1rem;
  padding: 1rem max(1rem, calc((100% - var(--w-page)) / 2));
  background: var(--c-red);
  box-shadow: 0 0 20px #000000;
  color: var(--c-on-red);
}

.cl-band h1 {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: var(--fs-title);
  font-weight: bold;
  line-height: 1.25;
  text-transform: uppercase;
  overflow-wrap: break-word;
}

/* positioned: anything absolute inside it (the hidden texts of links) stays inside the scrolling sheet,
   instead of stretching the page out of its one screen. White of its own, as the sheet of paper it is: where it
   scrolls, the text below its visible part still has the sheet behind it (contrast checkers that measure the
   background of each line, axe among them, would otherwise find only the body, which ends with the window).
   The text and the logo start 20 px under the band, as today. Its top and bottom padding are custom properties:
   the side column and the fade below reach into them, and follow them. */
.cl-sheet {
  --sheet-pad-top: 1.25rem;
  --sheet-pad-bottom: 1.5rem;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  row-gap: 1.5rem;
  padding: var(--sheet-pad-top) max(1rem, calc((100% - var(--w-page)) / 2)) var(--sheet-pad-bottom);
  background-color: var(--c-bg);
}

/* drawn inside: the sheet spans the whole width, an outer ring would be cut by the window */
.cl-sheet:focus-visible {
  outline-offset: -6px;
  box-shadow: inset 0 0 0 4px var(--c-focus-outer);
}

.cl-text > :first-child {
  margin-top: 0;
}

.cl-text a {
  color: var(--c-link);
  text-decoration: none;
}

.cl-text a:hover,
.cl-text a:focus-visible {
  color: var(--c-link-hover);
  text-decoration: underline;
}

/* the side column of today: logo, page video and page picture, one under the other, centred */
.cl-aside {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  text-align: center;
}

.cl-aside-logo,
.cl-aside-image {
  display: block;
}

/* The page video, 220 px wide as today. Its pause button shares the video's grid cell: at rest in the top right
   corner, it follows the scrolling inside the video's box (sticky, 0.375rem from the top of the window), so it stays
   in view with the video until less than about 2.1rem of it remains (34 px: the 1.75rem button and its 0.375rem
   margin), and then leaves with it. */
.cl-page-video {
  display: grid;
  max-width: 100%;
}

.cl-page-video video,
.cl-video-toggle {
  grid-area: 1 / 1;
}

.cl-page-video video {
  display: block;
  max-width: 100%;
  background: #000000;
}

.cl-video-toggle {
  position: sticky;
  top: 0.375rem;
  align-self: start;
  justify-self: end;
  margin: 0.375rem;
}

/* shown by media.js; display: grid would otherwise override the hidden attribute */
.cl-video-toggle[hidden] {
  display: none;
}

/* Decorative motion and nothing else: without scripting, which plays it, the page video is not shown at all. A
   still video would only carry the controls browsers draw on it when scripting is off, dead since it is inert. */
@media (scripting: none) {
  .cl-page-video {
    display: none;
  }
}

.cl-rule {
  width: calc(100% - 2rem);
  max-width: var(--w-page);
  height: 0;
  margin: 0 auto;
  border: 0;
  border-top: 1px solid var(--c-rule);
}

/* ---------------------------------------------------------------- inner pages: texts */

.cl-text {
  overflow-wrap: break-word; /* the long addresses of the privacy text never widen the page */
}

.cl-text p,
.cl-text ul,
.cl-text ol,
.cl-text blockquote,
.cl-text details {
  margin: 0 0 1rem;
}

/* the headings of today's texts: bold Arial in the dark grey of today's titles */
.cl-text h2,
.cl-text h3,
.cl-text h4 {
  margin: 1.75rem 0 0.75rem;
  color: var(--c-title);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.3;
}

.cl-text h2 {
  font-size: 1.25rem;
}

.cl-text h3 {
  font-size: 1.125rem;
}

.cl-text h4 {
  font-size: 1rem;
}

/* as today, the items of a list start with a dash */
.cl-text ul {
  padding-left: 1em;
  list-style-type: "- ";
}

.cl-text ol {
  padding-left: 1.5em;
}

.cl-text li + li {
  margin-top: 0.25rem;
}

/* a line of data under the title: date, or year, authors and partner */
.cl-meta {
  color: var(--c-footer);
}

/* ---------------------------------------------------------------- inner pages: blocks */

.cl-text figure {
  margin: 0 0 1.5rem;
}

.cl-figure img,
.cl-cover img {
  display: block;
}

/* a linked picture: the focus ring and the hover follow the picture */
.cl-figure a {
  display: inline-block;
  vertical-align: top;
}

.cl-figure a:hover img {
  opacity: 0.85;
}

.cl-text figcaption {
  margin-top: 0.5rem;
  color: var(--c-footer);
  font-size: 0.875rem;
}

/* gallery: square thumbnails in a grid, the whole picture in each (nothing cropped) */
.cl-text .cl-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(10rem, 100%), 1fr));
  gap: 0.5rem;
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
}

.cl-text .cl-gallery li {
  margin: 0;
}

.cl-gallery a {
  display: block;
}

.cl-gallery img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  background: #f2f2f2;
  object-fit: contain;
}

.cl-gallery a:hover img {
  opacity: 0.85;
}

/* the dialog of gallery.js: the picture as large as the window allows, on a dark backdrop */
.cl-dialog {
  max-width: calc(100vw - 2rem);
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
  padding: 0.75rem;
  border: 0;
  background: var(--c-bg);
  color: var(--c-text);
}

.cl-dialog::backdrop {
  background: rgb(0 0 0 / 0.8);
}

.cl-dialog-close {
  display: block;
  min-height: 2.75rem;
  margin: 0 0 0.75rem auto;
  padding: 0.5rem 1rem;
  border: 1px solid var(--c-link);
  border-radius: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font: inherit;
  cursor: pointer;
}

.cl-dialog-close:hover {
  border-color: var(--c-link-hover);
  text-decoration: underline;
}

.cl-dialog-img {
  display: block;
  width: auto;
  max-height: calc(100vh - 6.5rem);
  max-height: calc(100dvh - 6.5rem);
  margin: 0 auto;
}

/* a video of the library: never taller than most of the window */
.cl-video {
  margin: 0 0 1.5rem;
}

.cl-video video {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 75vh;
  background: #000000;
}

.cl-transcript summary {
  color: var(--c-link);
  cursor: pointer;
}

.cl-transcript summary:hover {
  color: var(--c-link-hover);
  text-decoration: underline;
}

/* YouTube: the preview in a 16:9 frame, at most 640 px wide so the 480 px previews stay sharp; the play button
   covers it, the link to YouTube under it */
.video-embed {
  max-width: 40rem;
  margin: 0 0 1.5rem;
}

.video-screen {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000000;
}

/* the 4:3 previews carry black bands above and below the 16:9 picture: cover crops them */
.video-screen img,
.video-screen iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}

.video-play {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--c-on-red);
  font: inherit;
  cursor: pointer;
}

.video-embed.is-ready .video-play {
  display: grid;
}

.video-play-label {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem 1.125rem;
  border: 1px solid var(--c-on-red);
  background: var(--c-red);
  font-weight: bold;
}

/* the play triangle, drawn with borders that follow the text colour */
.video-play-label::before {
  content: "";
  border-style: solid;
  border-width: 0.5em 0 0.5em 0.8em;
  border-color: transparent currentColor;
}

/* only under a pointer that hovers: after a tap a touch screen keeps :hover, and the colours would stick */
@media (hover: hover) {
  .video-play:hover .video-play-label {
    background: var(--c-on-red);
    color: var(--c-red);
  }
}

.cl-text .video-link {
  margin: 0.5rem 0 0;
}

/* a file to download: a sheet of paper before the link, as today's PDF icon */
.cl-file a {
  font-weight: bold;
}

.cl-file a::before {
  content: "";
  display: inline-block;
  width: 0.75em;
  height: 1em;
  margin-right: 0.5em;
  border: 2px solid currentColor;
  border-radius: 1px 0.3em 1px 1px;
  vertical-align: -0.15em;
}

.cl-file-info {
  font-weight: normal;
}

.cl-text .cl-quote {
  padding-left: 1rem;
  border-left: 4px solid var(--c-red);
}

.cl-quote blockquote {
  margin: 0;
  font-style: italic;
}

.cl-quote figcaption {
  margin-top: 0;
  font-size: var(--fs-text);
}

/* buttons: red, or red on white */
.cl-button {
  margin: 0 0 1.5rem;
}

.cl-text a.btn {
  display: inline-block;
  min-height: 2.75rem;
  padding: 0.5rem 1.25rem;
  border: 2px solid var(--c-red);
  font-weight: bold;
  text-decoration: none;
}

.cl-text a.btn-primary,
.cl-text a.btn-primary:hover,
.cl-text a.btn-primary:focus-visible {
  background: var(--c-red);
  color: var(--c-on-red);
}

.cl-text a.btn-secondary,
.cl-text a.btn-secondary:hover,
.cl-text a.btn-secondary:focus-visible {
  background: var(--c-bg);
  color: var(--c-red);
}

.cl-text a.btn:hover {
  text-decoration: underline;
}

/* ---------------------------------------------------------------- inner pages: team and lists */

.cl-member {
  margin: 0 0 2rem;
}

.cl-text .cl-member h2 {
  margin-top: 0;
}

.cl-member-photo {
  display: block;
  /* 11.25rem at every width, the width team.php's sizes declares: a large photo never spreads
     across a phone and the browser's pick stays sharp; 100% keeps it inside a narrow column */
  max-width: min(100%, 11.25rem);
  margin: 0 0 1rem;
}

.cl-teaser h2 {
  margin-top: 1.5rem;
}

/* ---------------------------------------------------------------- contact page: details and form */

/* today's contact details, in the style of the text */
.cl-address {
  font-style: normal;
}

/* As today, black labels and plain white boxes, now above each other: larger, with room to type, the boxes at
   most 32rem wide. The consent keeps the width of the text. */
.cl-form {
  display: grid;
  row-gap: 1.25rem;
  margin: 0 0 1.5rem;
}

.cl-field label {
  display: block;
  margin-bottom: 0.25rem;
}

.cl-form input:not([type="checkbox"]),
.cl-form textarea {
  display: block;
  width: 100%;
  max-width: 32rem;
  min-height: 2.75rem;
  padding: 0.5rem 0.625rem;
  border: 1px solid var(--c-link);
  border-radius: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font: inherit;
}

.cl-form textarea {
  resize: vertical;
}

/* reached from a link of the summary, a field keeps its label and its message in view above it */
.cl-form input,
.cl-form textarea {
  scroll-margin-top: 6rem;
}

/* a wrong field: a thicker red border, and above it the message that says what is wrong. The selectors are those
   of the boxes above plus the attribute, so they always outweigh them, whatever the order. */
.cl-form input:not([type="checkbox"])[aria-invalid="true"],
.cl-form textarea[aria-invalid="true"] {
  border: 2px solid var(--c-error);
}

.cl-form .cl-field-error {
  margin: 0 0 0.25rem;
  color: var(--c-error);
  font-weight: bold;
}

/* the consent: the checkbox (24 x 24 px) before its text, as today; its message above both */
.cl-field-check {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  column-gap: 0.75rem;
}

.cl-field-check .cl-field-error {
  grid-column: 1 / -1;
}

.cl-field-check input {
  width: 1.5rem;
  height: 1.5rem;
  margin: 0;
  accent-color: var(--c-red);
}

.cl-field-check label {
  margin: 0;
}

/* "Invia", red like the buttons of the texts, and always enabled */
.cl-text .cl-form-actions {
  margin: 0;
}

.cl-form-submit {
  min-height: 2.75rem;
  padding: 0.5rem 1.75rem;
  border: 2px solid var(--c-red);
  border-radius: 0;
  background: var(--c-red);
  color: var(--c-on-red);
  font: inherit;
  font-weight: bold;
  cursor: pointer;
}

.cl-form-submit:hover {
  text-decoration: underline;
}

/* the summary of the errors, a red frame above the form; it takes the focus when the page loads, and shows it */
.cl-form-errors {
  margin: 0 0 1.5rem;
  padding: 1rem 1.25rem;
  border: 3px solid var(--c-error);
}

.cl-form-errors:focus {
  outline: 2px solid var(--c-focus-inner);
  outline-offset: 0;
  box-shadow: 0 0 0 4px var(--c-focus-outer);
}

.cl-text .cl-form-errors p,
.cl-text .cl-form-errors ul {
  margin: 0;
}

.cl-text .cl-form-errors ul {
  margin-top: 0.5rem;
}

.cl-form-errors-title {
  font-weight: bold;
}

.cl-text .cl-form-errors a {
  color: var(--c-error);
  text-decoration: underline;
}

.cl-text .cl-form-errors a:hover {
  color: var(--c-link-hover);
}

/* the message after sending */
.cl-form-sent {
  padding: 0.75rem 1rem;
  border-left: 4px solid var(--c-text);
  font-weight: bold;
}

/* ---------------------------------------------------------------- home: today's slider and Sole in Vista */

/* the red band of the home holds the slider and, at its foot, the Sole in Vista strip */
.cl-band-home {
  flex-direction: column;
  align-items: stretch;
}

/* 940 px at most, as today: the open panel then shows its picture at its own 675 px */
.cl-slider {
  display: grid;
  grid-template-columns: minmax(0, 58.75rem);
  justify-content: center;
}

/* the buttons sit on the slider, in its top right corner, over the dark red of the third picture */
.cl-slider-controls,
.cl-slides {
  grid-area: 1 / 1;
}

/* Today's accordion: 675 x 450 pictures side by side, the current one whole and the others as strips that
   show their left edge, divided by 3 px of black: 675 + 2 x 129.5 + 2 x 3 = 940 x 450 px for three panels.
   A picture covers its panel from the left, so a panel that opens only shows more of its picture. */
.cl-slides {
  display: flex;
  gap: 3px;
  aspect-ratio: 940 / 450;
  background: #000000;
}

.cl-slide {
  position: relative;
  flex: 129.5 1 0;
  min-width: 0;
  overflow: hidden;
  transition: flex-grow 0.4s ease; /* today: 20 steps of 20 ms */
}

.cl-slide.is-current {
  flex-grow: 675;
}

.cl-slide a {
  display: block;
  height: 100%;
}

.cl-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 0 50%;
}

/* a strip is narrow and its neighbours cover anything outside it: the focus ring is drawn inside */
.cl-slide a:focus-visible {
  outline: none;
  box-shadow: none;
}

.cl-slide a:focus-visible::after {
  content: "";
  position: absolute;
  inset: 0;
  outline: 2px solid var(--c-focus-inner);
  outline-offset: -6px;
  box-shadow: inset 0 0 0 4px var(--c-focus-outer);
}

/* the panel title, on the picture only when the panel asks for it (show_title) */
.cl-slide-title {
  position: absolute;
  bottom: 0.75rem;
  left: 0.75rem;
  padding: 0.25rem 0.625rem;
  background: var(--c-red);
  color: var(--c-on-red);
  font-weight: bold;
  white-space: nowrap;
}

/* Rotation, previous and next: white icons on the red, shown by slider.js (without it they do nothing).
   One above the other, so they stay inside the third strip, however narrow. */
.cl-slider-controls {
  z-index: 1;
  display: none;
  flex-direction: column;
  gap: 2px;
  align-self: start;
  justify-self: end;
  margin: 6px;
}

.cl-slider.is-ready .cl-slider-controls {
  display: flex;
}

/* also the pause button of the page video of the inner pages: 28 x 28 px, over 24 x 24 (WCAG 2.5.8) */
.cl-slider-controls button,
.cl-video-toggle {
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: 1px solid var(--c-on-red);
  border-radius: 0;
  background: var(--c-red);
  color: var(--c-on-red);
  cursor: pointer;
}

/* only under a pointer that hovers: after a tap a touch screen keeps :hover, and the button would look pressed */
@media (hover: hover) {
  .cl-slider-controls button:hover,
  .cl-video-toggle:hover {
    background: var(--c-on-red);
    color: var(--c-red);
  }
}

/* icons drawn with borders, which follow the text colour: pause (two bars), play, previous, next */
.cl-slider-controls button::before,
.cl-video-toggle::before {
  content: "";
  display: block;
}

.cl-rot::before,
.cl-video-toggle::before {
  width: 0.625rem;
  height: 0.75rem;
  border-inline: 0.1875rem solid currentColor;
}

.cl-slider.is-stopped .cl-rot::before,
.cl-page-video.is-paused .cl-video-toggle::before {
  width: 0;
  height: 0;
  margin-left: 0.1875rem;
  border-style: solid;
  border-width: 0.4375rem 0 0.4375rem 0.75rem;
  border-color: transparent currentColor;
}

.cl-prev::before,
.cl-next::before {
  width: 0.5625rem;
  height: 0.5625rem;
  border-top: 0.1875rem solid currentColor;
  border-left: 0.1875rem solid currentColor;
}

.cl-prev::before {
  margin-left: 0.25rem;
  transform: rotate(-45deg);
}

.cl-next::before {
  margin-right: 0.25rem;
  transform: rotate(135deg);
}

/* Sole in Vista: label, link and text in white on the red */
.cl-highlight {
  margin: 0.75rem 0 0;
  font-size: 0.9375rem;
  line-height: 1.4;
  text-align: center;
}

.cl-highlight-label {
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cl-highlight a {
  color: inherit;
  font-weight: bold;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

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

.cl-highlight-logo {
  display: inline-block;
  width: auto;
  height: 1.75em;
  vertical-align: middle;
}

/* ---------------------------------------------------------------- main menu, under the band */

.cl-nav {
  padding: 0.875rem 1rem 0.375rem;
}

.cl-menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.125rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--fs-menu);
  line-height: 1.5;
}

.cl-menu a {
  display: inline-block;
  padding: 0.125rem 0;
  color: var(--c-link);
  text-decoration: none;
}

.cl-menu a:hover,
.cl-menu a:focus-visible {
  color: var(--c-link-hover);
  text-decoration: underline;
}

.cl-menu a[aria-current="page"] {
  color: var(--c-link-hover);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}

/* ---------------------------------------------------------------- footer: company data */

/* Compact: on wide screens the lines of the company data stand side by side (rules from 56.25em, below), and the
   footer menu shares the last line of the text's first paragraph: "Privacy Policy · Iniziative" (footer.php). */
.cl-footer {
  width: 100%;
  max-width: calc(var(--w-page) + 2rem);
  margin: 0 auto;
  padding: 0.25rem 1rem 0.5rem;
  color: var(--c-footer);
  font-size: var(--fs-footer);
  line-height: var(--lh-text);
  text-align: center;
  overflow-wrap: anywhere; /* the long RNA address never widens the page */
}

.cl-footer > p:first-child,
.cl-footer-links,
.cl-footer-links li {
  display: inline;
}

.cl-footer-links {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* 27.5 px tall, over 24 x 24 (WCAG 2.5.8); the negative margins keep the line as tall as the others */
.cl-footer-links a {
  display: inline-block;
  margin: -0.25rem 0;
  padding: 0.25rem 0;
}

.cl-footer-text p {
  margin: 0;
}

.cl-footer-text p + p {
  margin-top: 0.25rem;
}

/* the dots of the line breaks, shown in their place on wide screens only */
.cl-footer-sep {
  display: none;
}

/* inside the company text the grey links are underlined: their colour is too close to the text */
.cl-footer a {
  color: var(--c-link);
  text-decoration: underline;
}

.cl-footer a:hover {
  color: var(--c-link-hover);
}

/* ---------------------------------------------------------------- wide screens from 56.25em (900 px) */

/* as today: a 700 px text column and a side column of 240 px plus 20 px on each side */
@media (min-width: 56.25em) {
  .cl-sheet {
    grid-template-columns: minmax(0, 1fr) 17.5rem;
  }

  .cl-aside {
    --aside-pad-inline: 1.25rem;
    padding-inline: var(--aside-pad-inline);
  }

  /* The page picture in the bottom right corner of the sheet, on the black rule, as today; like today's background
     it may use the column's padding (Call 2 Action's is 280 px wide). Its box takes the rest of the column below the
     logo and the video, down to the rule, and holds it there even where it follows the scrolling (one screen,
     below). */
  .cl-aside-picture {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    align-items: flex-end;
    justify-content: flex-end;
    align-self: stretch;
    margin: 0 calc(-1 * var(--aside-pad-inline)) calc(-1 * var(--sheet-pad-bottom));
  }

  /* never squeezed by its box, whatever room the column leaves */
  .cl-aside-image {
    flex-shrink: 0;
  }

  /* the lines of the company data side by side, each kept whole (it wraps inside only when wider than the
     footer): each line break between them gives way to its dot. A break the text keeps inside a line (in a link or
     a bold run) stays a break */
  .cl-footer-line {
    display: inline-block;
  }

  .cl-footer-sep + br {
    display: none;
  }

  .cl-footer-sep {
    display: inline;
  }
}

/* ---------------------------------------------------------------- pictures beside the text from 37.5em (600 px) */

@media (min-width: 37.5em) {
  /* A run of two or more small pictures (no wider than the side column) stands as a column at the left of the
     text that follows, as the logos of today's publication; a small picture alone keeps its line. Whatever is
     not text starts below the column. The text column holds its floats (a grid item is its own context). */
  .cl-figure-small:has(+ .cl-figure-small),
  .cl-figure-small + .cl-figure-small {
    float: left;
    clear: left;
    margin-right: 1.25rem;
    margin-bottom: 1rem;
  }

  .cl-text > :is(h2, h3, h4, .cl-figure:not(.cl-figure-small), .cl-gallery, .cl-video, .video-embed, .cl-file, .cl-quote, .cl-button, .cl-external, article) {
    clear: both;
  }

  /* lists beside the column stay clear of it, markers included */
  .cl-text ul,
  .cl-text ol {
    display: flow-root;
  }

  /* a member's photo stands at the left of the name, role, bio and link, as today */
  .cl-member:has(> .cl-member-photo) {
    display: grid;
    grid-template-columns: 11.25rem minmax(0, 1fr);
    grid-template-rows: auto auto auto 1fr;
    grid-template-areas:
      "photo name"
      "photo role"
      "photo bio"
      "photo link";
    column-gap: 1.25rem;
  }

  .cl-member > h2 {
    grid-area: name;
  }

  .cl-member-role {
    grid-area: role;
  }

  .cl-member-photo {
    grid-area: photo;
  }

  .cl-member-bio {
    grid-area: bio;
  }

  .cl-member-link {
    grid-area: link;
  }
}

/* ---------------------------------------------------------------- one screen on large viewports */

/* 900 x 640 px at the default 16 px; a larger default font size gets the normal scrolling page */
@media (min-width: 56.25em) and (min-height: 40em) {
  body.cl {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto auto;
    height: 100vh;
    height: 100dvh;
  }

  /* the panel's notice takes a row of its own above the header; the sheet still takes what is left */
  body.cl:has(> .cl-panel-notice) {
    grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  }

  .cl > main {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    min-height: 0;
  }

  .cl-sheet {
    overflow-y: auto;
    overscroll-behavior: contain;
    scroll-padding-bottom: 3rem; /* a link reached with Tab stops above the fade */
  }

  /* text, side column and fade share the one row of the sheet, which is at least as tall as the sheet */
  .cl-text {
    grid-area: 1 / 1;
  }

  .cl-aside {
    grid-area: 1 / 2;
  }

  /* The page picture stays in the bottom right corner of the sheet's window, on the black rule, while the text
     scrolls: on the first screen too, as today's shorter pages show it. Its box (.cl-aside-picture, its containing
     block) holds it below the logo and the page video: where the window is too short for all three, it waits under
     them and comes into view with the scrolling, never over them. A sticky grid item would not do: Chrome confines
     it to the whole grid, not to its area. */
  .cl-aside-image {
    position: sticky;
    bottom: calc(-1 * var(--sheet-pad-bottom)); /* the sticky edge is inside the sheet's bottom padding: down to the rule */
  }

  /* inside the sheet the sticky edge is under its top padding: the page video's button stays 0.375rem under the band,
     as it sits 0.375rem under the video's top at rest */
  .cl-video-toggle {
    top: calc(0.375rem - var(--sheet-pad-top));
  }

  /* "There is more": a fade over the bottom of the text column while the text goes on below it (spec 5.7), never
     over the page picture beside it. Purely decorative: drawn by the stylesheet, so assistive technology gets
     nothing from it, and it catches no click. Invisible by itself: the scroll-driven animation below shows it
     while there is more to scroll and fades it out over the last 3rem; with nothing to scroll the timeline is
     inactive and it stays hidden. */
  .cl-sheet::after {
    content: "";
    position: sticky;
    bottom: calc(-1 * var(--sheet-pad-bottom)); /* the sticky edge is inside the sheet's bottom padding: down to the window's edge */
    grid-area: 1 / 1;
    align-self: end;
    height: 3rem;
    background: linear-gradient(rgb(255 255 255 / 0), var(--c-bg));
    opacity: 0;
    pointer-events: none;
  }

  @supports (animation-timeline: scroll()) {
    .cl-sheet::after {
      animation: cl-sheet-more linear both;
      animation-timeline: scroll();
      animation-range: calc(100% - 3rem) 100%;
    }
  }

  /* Without scroll-driven animations, a soft shade under the bottom of the sheet instead: it stays with the
     window (scroll), while a white cover at the end of the text (local) hides it once the end is in view, or
     when nothing overflows. The sheet keeps its white under both. */
  @supports not (animation-timeline: scroll()) {
    .cl-sheet {
      background:
        linear-gradient(var(--c-bg), var(--c-bg)) 50% 100% / min(100%, var(--w-page)) 3rem no-repeat local,
        linear-gradient(rgb(0 0 0 / 0), rgb(0 0 0 / 0.1)) 50% 100% / min(100%, var(--w-page)) 1.5rem no-repeat scroll var(--c-bg);
    }
  }

  /* The home is one screen only when everything fits with the slider at its full size, which follows the
     width alone (today's 940 x 450 at most): the page is at least as tall as the window instead of fixed
     to it. The band takes any spare height and centres the slider and the strip in it; a shorter window
     scrolls the page, as today's site does. */
  body.cl-home {
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
  }

  .cl-home > main {
    grid-template-rows: minmax(0, 1fr);
  }

  .cl-band-home {
    justify-content: center;
  }
}

/* ---------------------------------------------------------------- phones and narrow tablets */

/* Everything below (min-width: 56.25em), written as its exact complement: a max-width a hair under it
   would overlap it, since Chrome rounds 56.2499em up to 900 px. nav.js opens the menu below the same query. */
@media not all and (min-width: 56.25em) {
  .cl-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    min-height: 0;
    padding: 0.5rem 1rem;
  }

  /* Logos in CSS px, never larger than their files. Phones count 1.125 file pixels per CSS pixel
     (DPR 1.75 taken as 1.5, with a 0.75 allowance), and the T+ logo exists only at 129 px: 112 px. */
  .cl-logo img {
    width: 112px;
  }

  .cl-header .cl-partner {
    align-items: flex-start;
  }

  .cl-partner-text {
    font-size: 1rem;
  }

  .cl-partner img {
    width: 176px;
  }
}

/* With scripting on, the menu is a panel under the header, opened by the button, and both are in place from the
   first paint: the menu folded, the button holding its room, invisible until nav.js shows it (html.cl-js). Nothing
   moves when nav.js runs, however late it arrives. Without scripting the button stays hidden and the menu stays
   open after the content. Should nav.js never run, "Vai al menu" (#menu) still opens the panel. */
@media not all and (min-width: 56.25em) {
  @media (scripting: enabled) {
    .cl-menu-btn {
      display: inline-flex;
      visibility: hidden;
    }

    .cl-js .cl-menu-btn {
      visibility: visible;
    }

    .cl-nav {
      position: absolute;
      top: 0;
      right: 0;
      left: 0;
      z-index: 50;
      padding: 0 1rem;
    }

    .cl-menu {
      display: none;
    }

    .cl-nav.is-open .cl-menu,
    html:not(.cl-js) .cl-nav:target .cl-menu {
      display: block;
      padding: 0.25rem 0;
      border: 1px solid var(--c-link);
      background: var(--c-bg);
      box-shadow: 0 0.5rem 1.5rem rgb(0 0 0 / 0.3);
    }

    .cl-nav.is-open .cl-menu a,
    html:not(.cl-js) .cl-nav:target .cl-menu a {
      display: block;
      padding: 0.5rem 1rem;
    }
  }
}

/* ---------------------------------------------------------------- home on phones: the panels stacked */

/* Below 37.5em (600 px) strips would be slivers and slogans unreadable: each panel shows its whole
   picture, one under the other, and nothing rotates. Written as the exact complement of
   (min-width: 37.5em), the query slider.js watches. */
@media not all and (min-width: 37.5em) {
  .cl-slides {
    flex-direction: column;
    gap: 0.5rem;
    aspect-ratio: auto;
    background: none;
  }

  .cl-slide,
  .cl-slide.is-current {
    flex: none;
  }

  .cl-slide a,
  .cl-slide img {
    height: auto;
  }

  .cl-slider.is-ready .cl-slider-controls {
    display: none;
  }

  .cl-highlight {
    text-align: left;
  }
}

/* the fade at the bottom of the sheet: shown, then gone over the last 3rem of scrolling */
@keyframes cl-sheet-more {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

/* ---------------------------------------------------------------- high-density screens */

/* The pictures of the texts are files of a fixed size (today's are small). On screens of 1.5 device pixels per
   CSS pixel or more they are shown at 7/8 of their width attribute. That does not make them sharp: a CSS pixel then
   gets about 1.14 file pixels where the screen has 1.5 or more device pixels, so they stay enlarged, only 12.5% less.
   It meets Lighthouse's resolution tolerance (image-size-responsive asks 0.75 x 1.5 = 1.125 file pixels per CSS
   pixel at the 1.75 device pixel ratio of its phone emulation), which today's small files at full size do not. A
   picture wider than the column still fills it (max-width). A browser without typed attr() drops the rule and shows
   them at their size. */
@media (min-resolution: 1.5dppx), (-webkit-min-device-pixel-ratio: 1.5) {
  .cl-figure img[width],
  .cl-cover img[width],
  .cl-member-photo[width] {
    width: calc(attr(width px) * 0.875);
  }
}

/* ---------------------------------------------------------------- reduced motion */

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

  /* the fade of the sheet stays still: it goes at once at the end instead of fading out */
  .cl-sheet::after {
    animation-timing-function: step-end;
  }
}

/* ---------------------------------------------------------------- forced colours */

@media (forced-colors: active) {
  :focus-visible {
    outline-color: Highlight;
  }

  .cl-band {
    border-block: 1px solid;
  }

  .cl-slide a:focus-visible::after {
    outline-color: Highlight;
  }

  /* the play triangle needs its transparent borders: the icons keep their own colours, in ButtonText */
  .cl-slider-controls button::before,
  .cl-video-toggle::before,
  .video-play-label::before {
    forced-color-adjust: none;
    color: ButtonText;
  }

  /* a white fade has no place on a system background */
  .cl-sheet::after {
    display: none;
  }

  /* the panel's notice keeps a border where its background is the system's */
  .cl-panel-notice {
    border-block-end: 1px solid;
  }
}

/* ---------------------------------------------------------------- print */

/* The whole page on paper, black on white, in one column with nothing scrolling inside: the one-screen layout is
   undone, since a landscape page is wide and tall enough for its query. Without backgrounds, which browsers leave
   out anyway, the band's white title would vanish: every text is black. No skip links, menu button or menu,
   slider buttons, play buttons or fade, and no side column: it holds only the page video and two decorative
   pictures, the logo the header already prints and the page picture. An external link prints its address after
   it; mailto links and the site's own do not, whether a root path or an address written in full. Last in the
   file, so it wins over the rules it undoes. */
@media print {
  *,
  *::before,
  *::after {
    color: #000000 !important;
    background: transparent !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  .skip,
  .cl-menu-btn,
  .cl-nav,
  .cl-slider-controls,
  .video-play,
  .cl-aside,
  .cl-sheet::after {
    display: none !important;
  }

  body.cl {
    display: block;
    height: auto;
    min-height: 0;
  }

  .cl > main,
  .cl-sheet {
    display: block;
    overflow: visible;
  }

  /* the title and the text under it start where the header does */
  .cl-band {
    min-height: 0;
    margin-top: 0.5rem;
    padding: 0.5rem 0;
  }

  .cl-sheet {
    padding: 1rem 0;
  }

  /* the home's panels whole, side by side */
  .cl-slides {
    aspect-ratio: auto;
    gap: 0.5rem;
  }

  .cl-slide,
  .cl-slide.is-current {
    flex: 1 1 0;
  }

  .cl-slide a,
  .cl-slide img {
    height: auto;
  }

  /* on paper a link is told by its underline */
  .cl-text a,
  .cl-highlight a,
  .cl-footer a {
    text-decoration: underline;
  }

  a[href^="http://"]::after,
  a[href^="https://"]::after {
    content: " (" attr(href) ")";
    overflow-wrap: anywhere;
  }

  a[href^="http://www.tplus.it"]::after,
  a[href^="https://www.tplus.it"]::after,
  a[href^="http://tplus.it"]::after,
  a[href^="https://tplus.it"]::after,
  .cl-lang::after {
    content: none;
  }

  /* a transcript prints whole, even when it is closed */
  details::details-content {
    content-visibility: visible;
  }

  h1,
  h2,
  h3,
  h4 {
    break-after: avoid;
  }

  img,
  figure,
  blockquote {
    break-inside: avoid;
  }

  p {
    orphans: 3;
    widows: 3;
  }
}
