@font-face {
  font-family: "Barlow Condensed";
  src: url("/assets/fonts/barlow-800.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}

@font-face {
  font-family: "Barlow Condensed";
  src: url("/assets/fonts/barlow-800-italic.woff2") format("woff2");
  font-weight: 800;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "DM Sans";
  src: url("/assets/fonts/dm-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --paper: #f8f7f3;
  --sheet: #f0eee8;
  --white: #fffefa;
  --ink: #171b27;
  --muted: #4a5060;
  --blue: #2044ed;
  --blue-strong: #1532c5;
  --orange: #ff613b;
  --rule: #cecfcf;
  --head: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "DM Sans", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { color: var(--ink); background: var(--paper); }
body { margin: 0; font: 1rem/1.55 var(--body); }
a { color: inherit; text-decoration-thickness: .075em; text-underline-offset: .21em; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--head); font-weight: 800; line-height: .96; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
section[id] { scroll-margin-block-start: 1.5rem; }
.wrap { width: min(78rem, 100% - 6rem); margin-inline: auto; }
.icon { display: block; width: 1.25rem; height: 1.25rem; flex: 0 0 auto; }
.sr-only, .skip:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip:focus {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 4;
  padding: .65rem 1rem;
  background: var(--white);
}
.kicker {
  display: flex;
  align-items: center;
  gap: .55rem;
  color: var(--blue-strong);
  font-size: .875rem;
  font-weight: 700;
  letter-spacing: .12em;
  line-height: 1.2;
  text-transform: uppercase;
}
.kicker::before { content: ""; width: .56rem; height: .56rem; background: currentColor; flex: 0 0 auto; }

.site-header { border-top: 4px solid var(--blue); border-bottom: 1px solid var(--rule); }
.header-inner { min-height: 4.65rem; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1.35rem; }
.brand { display: inline-block; justify-self: start; }
.brand img { width: 10rem; height: auto; }
.site-nav { display: flex; align-items: stretch; gap: 2.15rem; align-self: stretch; }
.site-nav a { position: relative; display: flex; align-items: center; text-decoration: none; font-size: .96rem; font-weight: 700; }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--blue-strong); }
.site-nav a[aria-current]::after { content: ""; position: absolute; inset: auto 0 -1px; border-bottom: 3px solid var(--blue); }
.header-actions { display: flex; justify-content: flex-end; gap: .5rem; }
.search-toggle, .menu-toggle, .plain-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 2.75rem;
  min-width: 2.75rem;
  padding: .5rem .85rem;
  border: 1px solid var(--rule);
  border-radius: .3rem;
  background: var(--white);
  font-size: .91rem;
  font-weight: 700;
}
.search-toggle:hover, .menu-toggle:hover, .plain-icon:hover { background: #e9edff; border-color: var(--blue); }
.menu-toggle, .menu-close { display: none; }
.menu-toggle[aria-expanded="true"] .menu-close { display: block; }
.menu-toggle[aria-expanded="true"] .icon:not(.menu-close) { display: none; }

.studio { padding-block: 3.2rem 2.65rem; }
.studio-grid { display: grid; grid-template-columns: minmax(0, .58fr) minmax(0, 1fr); align-items: center; gap: clamp(1.75rem, 4vw, 4.5rem); }
.studio-lead { container-type: inline-size; padding-block: .4rem; }
.studio-lead h1 {
  margin: .62rem 0 1.25rem;
  font-size: clamp(3.55rem, 21cqi, 7.25rem);
  line-height: .79;
  letter-spacing: -.026em;
  text-transform: uppercase;
}
.studio-lead h1 em { display: block; margin-top: .035em; color: var(--blue); font-weight: inherit; }
.studio-lead h1 em span { color: var(--orange); font-style: normal; }
.studio-lead > p:not(.kicker) { max-width: 26rem; margin-bottom: 1.6rem; color: var(--muted); font-size: clamp(1.075rem, 1.5vw, 1.25rem); }
.studio-actions { display: flex; flex-direction: column; align-items: flex-start; gap: .55rem; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  width: fit-content;
  min-height: 2.95rem;
  padding: .68rem 1rem;
  border-radius: .3rem;
  font-weight: 700;
  text-decoration: none;
}
.button-blue { color: white; background: var(--blue); }
.button-blue:hover { background: var(--blue-strong); }
.monitor {
  min-width: 0;
  border: 1px solid #252b3b;
  border-radius: .47rem;
  overflow: hidden;
  background: #111825;
  color: white;
  box-shadow: 0 11px 26px rgb(22 27 47 / .11);
}
.monitor-bar { min-height: 3.1rem; padding: .62rem 1.1rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.monitor-bar h2 { display: flex; align-items: center; gap: .6rem; white-space: nowrap; font: 700 .9rem/1.2 var(--body); text-transform: uppercase; letter-spacing: .1em; }
.monitor-bar h2 .icon { color: #aab8ff; }
.monitor-mode { display: flex; align-items: center; gap: .45rem; color: #e0e4ef; font-size: .875rem; white-space: nowrap; }
.mode-dot { width: .45rem; height: .45rem; background: var(--orange); border-radius: 2px; }
.monitor-nav { border-block: 1px solid #303b54; background: #172137; }
.section-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.section-tabs a { display: flex; justify-content: center; align-items: center; gap: .48rem; min-height: 3rem; padding: .5rem .3rem; border-inline-start: 1px solid #303b54; color: #e7ebfa; text-decoration: none; font-size: .94rem; font-weight: 700; }
.section-tabs a:first-child { border-inline-start: 0; }
.section-tabs a:hover { background: #283956; color: white; }
.section-tabs a:focus-visible { outline: 2px solid #b6c3ff; outline-offset: -3px; }
.section-tabs a[aria-selected="true"],
.monitor:not(.tabs-ready):not(:has(.directory-panel:target)) a[data-tab="incontri"],
.monitor:not(.tabs-ready):has(#incontri:target) a[data-tab="incontri"],
.monitor:not(.tabs-ready):has(#canali-tv:target) a[data-tab="canali-tv"],
.monitor:not(.tabs-ready):has(#risultati:target) a[data-tab="risultati"] { background: var(--blue); color: white; }
.monitor-body { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); min-height: 20rem; }
.monitor-screen {
  isolation: isolate;
  position: relative;
  display: grid;
  place-items: center;
  text-align: center;
}
.stadium, .monitor-screen::before, .viewfinder { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.stadium { object-fit: cover; z-index: -3; }
.monitor-screen::before {
  content: "";
  z-index: -2;
  background: radial-gradient(ellipse at 50% 49%, #10172de6 4%, #111a34b8 36%, #101a3850 76%), linear-gradient(0deg, #0d1426a8, transparent 70%);
}
.viewfinder { inset: 1rem; width: auto; height: auto; z-index: -1; }
.viewfinder i { position: absolute; width: .9rem; height: .9rem; border: solid #d5deffa8; border-width: 1px 0 0 1px; }
.viewfinder i:first-child { top: 0; left: 0; }
.viewfinder i:nth-child(2) { top: 0; right: 0; transform: rotate(90deg); }
.viewfinder i:nth-child(3) { right: 0; bottom: 0; transform: rotate(180deg); }
.viewfinder i:nth-child(4) { bottom: 0; left: 0; transform: rotate(270deg); }
.screen-panel { width: 100%; padding: 1.8rem 1.45rem; }
.screen-kind { margin-bottom: .7rem; color: #fbb8a4; font-size: .79rem; font-weight: 700; line-height: 1.15; letter-spacing: .11em; text-transform: uppercase; }
.screen-panel h3 { font-size: clamp(2.35rem, 4vw, 3.7rem); overflow-wrap: anywhere; }
.screen-description { max-width: 22rem; margin: .72rem auto .95rem; min-height: 2.8em; color: #e7ebfe; font-size: 1rem; line-height: 1.4; }
.screen-link { min-width: 9.5rem; text-decoration: none; }
.screen-link:focus-visible, .monitor-directory :focus-visible, .footer a:focus-visible { outline-color: #b6c3ff; }
.screen-provider { margin-top: .5rem; color: #dee4f7; font-size: .88rem; font-weight: 700; }
.monitor-directory { min-width: 0; padding: .9rem .8rem; border-inline-start: 1px solid #303b54; background: #151e2f; }
.monitor:not(.tabs-ready) .directory-panel:not(:first-child):not(:target),
.monitor:not(.tabs-ready):has(.directory-panel:target) .directory-panel:first-child:not(:target) { display: none; }
.directory-panel > h3 { margin: .08rem 0 .6rem; color: #e2e8fa; font: 700 .88rem/1.3 var(--body); }
.directory-list { display: grid; gap: .28rem; list-style: none; padding: 0; margin: 0; }
.source-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .48rem;
  min-height: 2.95rem;
  padding: .32rem .46rem;
  border: 1px solid #303b54;
  border-radius: .25rem;
  color: #fcfcff;
  background: #192438;
  text-decoration: none;
}
.source-row:hover, .source-row[aria-current="true"] { border-color: #7084ff; background: #26395f; }
.source-row[aria-current="true"] { box-shadow: inset 3px 0 #8092ff; }
.source-icon { display: grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: .26rem; color: #bacaee; background: #2a3652; }
.source-icon .icon { width: 1rem; height: 1rem; }
.source-name { display: grid; line-height: 1.15; gap: .18rem; }
.source-name strong { font-size: .93rem; overflow-wrap: anywhere; }
.source-name > span { color: #cad3eb; font-size: .81rem; overflow-wrap: anywhere; }
.source-tag { color: #d7ddfe; font-size: .75rem; }
.monitor-footer { padding: .58rem .85rem; border-top: 1px solid #303b54; color: #e0e4ef; font-size: .86rem; }

.discover { padding: clamp(2.25rem, 4.25vw, 3.65rem) 0 3.15rem; background: var(--sheet); border-block: 1px solid var(--rule); }
.discover-heading { display: flex; justify-content: space-between; align-items: end; gap: 1rem 2rem; margin-bottom: 1.65rem; }
.discover-heading h2 { margin-top: .25rem; font-size: clamp(2.78rem, 6vw, 4.75rem); letter-spacing: -.018em; }
.discover-heading > p { max-width: 20.5rem; padding-bottom: .28rem; color: var(--muted); }
.guide-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.35rem; }
.guide-card {
  display: grid;
  align-content: start;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: .38rem;
  background: var(--white);
  text-decoration: none;
}
.guide-card:hover { border-color: var(--blue); }
.card-image { height: clamp(6.7rem, 15vw, 13rem); overflow: hidden; }
.blue { background: var(--blue); }
.orange { background: #fd7856; }
.card-image img, .guide-art img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 1.3rem 1.35rem 1.45rem; }
.card-body .kicker { font-size: .8rem; }
.card-body h3 { margin-top: .38rem; font-size: clamp(2rem, 3.1vw, 3.15rem); }
.card-body p:not(.kicker) { max-width: 34rem; margin-top: .65rem; color: var(--muted); }
.card-action { display: inline-block; margin-top: .95rem; color: var(--blue-strong); font-weight: 700; text-decoration: underline; text-underline-offset: .24em; }
.breadcrumbs { padding-top: 1.5rem; font-size: .92rem; color: var(--muted); }
.breadcrumbs ol { padding: 0; margin: 0; list-style: none; display: flex; gap: .6rem; }
.breadcrumbs li + li::before { content: "/"; margin-right: .6rem; color: var(--muted); }
.breadcrumbs a { color: var(--blue-strong); font-weight: 700; }
.guide-header { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); align-items: center; gap: clamp(1.5rem, 4vw, 4rem); padding-block: 2rem 3.5rem; border-bottom: 1px solid var(--rule); }
.guide-header h1 { margin: .5rem 0 .85rem; max-width: 48rem; font-size: clamp(3.55rem, 7.3vw, 6.8rem); letter-spacing: -.018em; }
.guide-header p:not(.kicker) { max-width: 34rem; color: var(--muted); font-size: 1.15rem; }
.guide-art { aspect-ratio: 2.15; border-radius: .35rem; overflow: hidden; }
.article-wrap { padding-block: 3.75rem 4rem; }
.article-grid { display: grid; grid-template-columns: minmax(0, 50rem) minmax(14rem, 1fr); column-gap: clamp(1.5rem, 5vw, 4.75rem); }
.article-intro { grid-column: 1; }
.article-intro h2, .related h2 { font-size: clamp(2.35rem, 5vw, 4.05rem); }
.article-intro > p { margin-top: .9rem; color: var(--muted); font-size: 1.15rem; max-width: 45rem; }
.article-index { grid-column: 2; grid-row: 1 / span 2; align-self: start; padding: 1rem 1.2rem; border-top: 3px solid var(--blue); background: var(--sheet); }
.article-index > p { font-weight: 700; }
.article-index ul { padding-inline-start: 1.15rem; margin: .45rem 0 .15rem; }
.article-index li + li { margin-top: .45rem; }
.article-index a { color: var(--blue-strong); }
.article-body { grid-column: 1; max-width: 45rem; }
.article-body section { margin-top: 2rem; }
.article-body h3 { margin-bottom: .78rem; font-size: clamp(1.85rem, 3.6vw, 2.65rem); line-height: 1; }
.article-body section p + p { margin-top: .8rem; }
.source-links { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem 1rem; padding: 0; margin: .9rem 0 0; }
.source-links a { color: var(--blue-strong); font-size: .91rem; font-weight: 700; }
.faq details { border-block-start: 1px solid var(--rule); }
.faq details:last-child { border-block-end: 1px solid var(--rule); }
.faq summary { cursor: pointer; padding: .8rem .35rem; color: var(--blue-strong); font-weight: 700; }
.faq details p { padding: 0 .35rem .85rem; }
.editorial-note { margin-top: 1.25rem; color: var(--muted); font-size: .9rem; }
.related { padding-bottom: 3.7rem; }
.related h2 { margin-bottom: 1rem; }
.footer { background: #151b29; color: #f6f7fb; border-top: 4px solid var(--blue); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 1.75rem; justify-content: space-between; align-items: center; padding-block: 2.4rem; }
.footer p { max-width: 32rem; margin-top: .85rem; color: #d3d9eb; font-size: .92rem; }
.footer nav { display: flex; flex-wrap: wrap; gap: .45rem 1.5rem; }
.footer nav a { padding-block: .4rem; color: inherit; font-weight: 700; }
.missing { padding-block: 2rem 4rem; }
.missing h1 { margin: .6rem 0; font-size: clamp(3rem, 9.5vw, 7rem); }
.missing .button { margin: .95rem 0 2rem; }

.search-dialog {
  width: min(37rem, 100% - 2rem);
  max-height: min(86vh, 42rem);
  margin-top: 10vh;
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: .5rem;
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 20px 60px #171b276b;
}
.search-dialog::backdrop { background: #141a2ccc; }
.search-inner { padding: clamp(.85rem, 4vw, 1.5rem); }
.search-heading { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.search-heading h2 { font-size: 2.25rem; }
.plain-icon { padding: 0; }
.search-field { display: flex; align-items: center; gap: .5rem; padding: .15rem .65rem; margin-top: 1rem; border: 1px solid var(--rule); }
.search-field:focus-within { outline: 2px solid var(--blue); }
.search-field input { border: 0; margin: 0; outline: 0; background: transparent; padding: .58rem .2rem; min-width: 0; width: 100%; }
.search-status { margin-top: .65rem; font-size: .92rem; color: var(--muted); }
.search-results { list-style: none; padding: 0; margin: .45rem 0 0; }
.search-results a { display: grid; gap: .11rem; padding: .68rem .35rem; border-top: 1px solid var(--rule); text-decoration: none; }
.search-results a:hover, .search-results a:focus-visible { color: var(--blue-strong); background: #eef0ff; }
.search-results span { font-size: .9rem; color: var(--muted); }

@media (max-width: 1100px) {
  .studio-grid { grid-template-columns: minmax(0, 1fr); gap: 1.65rem; }
  .studio-lead h1 { font-size: clamp(3.75rem, 9.5vw, 6.45rem); }
  .studio-lead h1 em { display: inline-block; }
}

@media (max-width: 1060px) {
  .wrap { width: min(78rem, 100% - 3.5rem); }
}

@media (max-width: 760px) {
  .wrap { width: calc(100% - 2rem); }
  .header-inner { min-height: 3.95rem; grid-template-columns: 1fr auto; gap: 0 .65rem; }
  .header-actions { grid-row: 1; grid-column: 2; }
  .header-actions > button { padding-inline: .5rem; }
  .search-toggle { background: transparent; }
  .menu-toggle { display: inline-flex; background: transparent; }
  .site-nav { grid-column: 1 / -1; justify-content: space-between; flex-wrap: wrap; gap: .25rem .75rem; border-top: 1px solid var(--rule); }
  .site-nav a { min-height: 2.75rem; padding: .32rem .25rem; }
  .menu-ready .site-nav:not(.menu-open) { display: none; }
  .studio { padding-block: 2rem 1.65rem; }
  .studio-lead { padding: 0; }
  .studio-lead h1 { margin-block: .6rem 1rem; font-size: clamp(3.45rem, 12.6vw, 6rem); }
  .studio-lead h1 em { display: inline-block; }
  .studio-lead > p:not(.kicker) { margin-bottom: 1rem; }
  .monitor-bar { min-height: 2.6rem; padding-inline: .69rem; }
  .viewfinder { inset: .68rem; }
  .section-tabs a { gap: .32rem; font-size: .875rem; }
  .section-tabs .icon { width: 1.12rem; height: 1.12rem; }
  .discover-heading { flex-direction: column; align-items: start; gap: .65rem; }
  .discover-heading > p { padding: 0; }
  .guide-grid { grid-template-columns: minmax(0, 1fr); gap: .95rem; }
  .card-image { height: clamp(8.15rem, 28vw, 13.5rem); }
  .guide-header { grid-template-columns: minmax(0, 1fr); padding-block: 1.5rem 1.8rem; }
  .guide-art { max-height: 16rem; }
  .article-wrap { padding-block: 2.4rem 2.7rem; }
  .article-grid { display: flex; flex-direction: column; }
  .article-index { align-self: stretch; margin-block-start: 1.3rem; }
  .article-body section { margin-top: 1.55rem; }
  .related { padding-bottom: 2.7rem; }
}

@media (max-width: 640px) {
  .monitor-body { grid-template-columns: minmax(0, 1fr); }
  .monitor-screen { min-height: 14.5rem; }
  .screen-panel { padding: 1.42rem 1.32rem; }
  .monitor-directory { border-inline-start: 0; border-top: 1px solid #303b54; }
}

@media (max-width: 360px) {
  .section-tabs .icon { width: .9rem; height: .9rem; }
  .studio-lead h1 { font-size: 3.25rem; }
  .search-toggle span { display: none; }
}

@media (prefers-reduced-motion: no-preference) {
  .guide-card, .button, .search-toggle, .section-tabs a, .source-row { transition: background-color .15s, border-color .15s, color .15s; }
}
