/* Winita render base — correctness-bearing CSS emitted with every site.
   The LLM "skin" phase layers brand visuals on top of this; it must NOT remove
   these rules. They encode the accessibility / responsive / layout invariants the
   auditors check (container width, footer grid, mobile nav, focus-visible,
   reduced-motion, tap targets, table scroll, fluid grids, 16px body, hero clamp).
   The few non-negotiable a11y rules use !important so a theme can't drop them. */

:root {
  --tap-min: 44px;
  --maxw: 1100px;
  --focus-ring: #0a5ac9;
}

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

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

body {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

/* Accessible focus: visible ring for keyboard users only. !important so a brand
   theme can never silently remove the keyboard-focus indicator. */
:focus-visible {
  outline: 2px solid var(--focus-ring) !important;
  outline-offset: 2px !important;
}
:focus:not(:focus-visible) {
  outline: none;
}

/* Respect reduced-motion globally. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* No cross-document View Transitions: the root cross-fade re-ran on every
   internal navigation and read as the whole page "blinking" on each menu click. */

/* Skip-link: hidden until focused. */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 10px 16px;
  background: var(--focus-ring);
  color: #fff;
  z-index: 1000;
}
.skip-link:focus {
  left: 8px;
  top: 8px;
}

.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;
}

/* ── Shared content container ──────────────────────────────────────────────
   Header inner, main, and footer inner all align to the same max width so the
   chrome never spills wider than the content column. */
main.page,
.mh-top,
.mh-cats-inner,
.mf-inner {
  max-width: var(--maxw);
  margin-inline: auto;
  width: 100%;
}
main.page {
  padding: 24px 16px;
}

/* ── Header ───────────────────────────────────────────────────────────────── */
header.mh {
  position: sticky;
  top: 0;
  z-index: 50;
}
.mh-top {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding-inline: 16px;
}
.mh-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.mh-spacer {
  flex: 1 1 auto;
}
.mh-logo {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-min);
  text-decoration: none;
}
.mh-cats-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  padding-inline: 16px;
  min-width: 0;
}
.mh-cats-inner a {
  /* display + centering are locked: a theme that flips these to inline-block
     leaves the link text top-aligned inside the 44px tap target. Colors,
     padding and radius remain free for the skin to restyle. */
  display: inline-flex !important;
  align-items: center !important;
  min-height: var(--tap-min);
  padding: 0 4px;
  text-decoration: none;
}
.mh-menu-toggle {
  display: none; /* desktop: nav is always visible; shown on mobile (below) */
  width: var(--tap-min);
  height: var(--tap-min);
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  background: none;
  border: 0;
}

/* Tap targets ≥ 44×44 (WCAG 2.5.5) for standalone controls. */
.btn,
summary {
  min-height: var(--tap-min);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* ── Breadcrumbs & related links ─────────────────────────────────────────── */
ol.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
}
nav[aria-label] ul.related {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  list-style: none;
  padding: 0;
}
ul.related a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-min);
}

/* Tables scroll horizontally inside a wrapper instead of stretching the page. */
.tbl-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.tbl-wrap table {
  border-collapse: collapse;
  width: 100%;
}

/* Fluid card grid: minmax(0,1fr) prevents min-content blowout / overflow. */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(0, 1fr));
  gap: 16px;
  list-style: none;
  padding: 0;
}
@media (min-width: 640px) {
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1100px) {
  .card-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ── Footer ───────────────────────────────────────────────────────────────── */
.mf-inner {
  padding: 32px 16px;
}
.mf-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px;
  min-width: 0;
}
.mf-cols a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  text-decoration: none;
}
.mf-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 24px;
}

/* ── Mobile (≤ 860px): collapse nav behind the burger ─────────────────────── */
@media (max-width: 860px) {
  .mh-menu-toggle {
    display: inline-flex;
  }
  nav.mh-cats {
    display: none;
  }
  nav.mh-cats.is-open {
    display: block;
  }
  .mh-cats-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .mh-cats-inner a {
    min-height: 48px;
    padding: 8px 4px;
  }
}

/* Long words (Italian/German) must wrap, not overflow, on small screens. */
@media (max-width: 480px) {
  h1 {
    font-size: 24px;
    line-height: 1.18;
    overflow-wrap: anywhere;
  }
}


/* --- brand theme --- */
:root {
  --brand-bg: #F7F8F5;
  --brand-surface: #FFFFFF;
  --brand-text: #17211B;
  --brand-muted: #66736B;
  --brand-primary: #1F6B45;
  --brand-primary-fg: #FFFFFF;
  --brand-accent: #C7A44A;
  --brand-border: #DDE4DC;

  --font-display: "Source Serif 4", "Georgia", serif;
  --font-body: "Inter", "Arial", sans-serif;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.375rem;
  --text-2xl: 1.75rem;
  --text-3xl: 2.25rem;
  --text-4xl: 3rem;

  --weight-regular: 400;
  --weight-medium: 500;
  --weight-bold: 700;

  --leading-tight: 1.2;
  --leading-normal: 1.5;
  --leading-relaxed: 1.7;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;

  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-full: 999px;

  --shadow-sm: 0 1px 2px rgba(23, 33, 27, 0.06);
  --shadow-md: 0 8px 20px rgba(23, 33, 27, 0.08);
  --shadow-lg: 0 18px 44px rgba(23, 33, 27, 0.12);
}

body {
  margin: 0;
  background: var(--brand-bg);
  color: var(--brand-text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: var(--leading-normal);
}

h1,
h2,
h3 {
  color: var(--brand-text);
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
}

h1 {
  font-size: clamp(var(--text-3xl), 5vw, var(--text-4xl));
}

h2 {
  font-size: clamp(var(--text-2xl), 3vw, var(--text-3xl));
}

h3 {
  font-size: var(--text-xl);
}

p {
  color: var(--brand-text);
  line-height: var(--leading-relaxed);
}

a {
  color: var(--brand-primary);
  font-weight: var(--weight-medium);
  text-decoration-color: rgba(31, 107, 69, 0.35);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--brand-text);
  text-decoration-color: var(--brand-accent);
}

.mh {
  background: var(--brand-surface);
  border-bottom: 1px solid var(--brand-border);
  box-shadow: var(--shadow-sm);
}

.mh-top {
  min-height: 4.5rem;
  padding: 0 var(--space-8);
  background: var(--brand-surface);
}

.mh-logo {
  color: var(--brand-primary);
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  text-decoration: none;
}

.mh-logo::first-letter {
  color: var(--brand-accent);
}

.mh-cats {
  border-top: 1px solid var(--brand-border);
  background: var(--brand-bg);
}

.mh-cats a {
  color: var(--brand-muted);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  text-decoration: none;
}

.mh-cats a:hover {
  color: var(--brand-primary);
}

.btn,
.btn-cta,
.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.75rem 1rem;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  line-height: var(--leading-tight);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}

.btn,
.btn-secondary {
  background: var(--brand-surface);
  border-color: var(--brand-border);
  color: var(--brand-primary);
}

.btn:hover,
.btn-secondary:hover {
  background: var(--brand-bg);
  border-color: var(--brand-primary);
  color: var(--brand-text);
}

.btn-primary,
.btn-cta {
  background: var(--brand-primary);
  color: var(--brand-primary-fg);
}

.btn-primary:hover,
.btn-cta:hover {
  background: var(--brand-text);
  color: var(--brand-primary-fg);
}

.card-grid {
  gap: var(--space-6);
}

.card {
  background: var(--brand-surface);
  border: 1px solid var(--brand-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-md);
}

.card h2,
.card h3 {
  margin-top: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  border: 1px solid rgba(199, 164, 74, 0.45);
  border-radius: var(--radius-full);
  background: rgba(199, 164, 74, 0.12);
  color: var(--brand-text);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
}

.crumbs {
  color: var(--brand-muted);
  font-size: var(--text-sm);
}

.crumbs a {
  color: var(--brand-muted);
  text-decoration: none;
}

.crumbs a:hover {
  color: var(--brand-primary);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.tbl-wrap {
  overflow: auto;
  background: var(--brand-surface);
  border: 1px solid var(--brand-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
  color: var(--brand-text);
  font-size: var(--text-sm);
}

th,
td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--brand-border);
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--brand-bg);
  color: var(--brand-text);
  font-weight: var(--weight-bold);
}

tr:last-child td {
  border-bottom: 0;
}

.related {
  padding: var(--space-6);
  background: var(--brand-surface);
  border: 1px solid var(--brand-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.related a {
  color: var(--brand-primary);
  text-decoration: none;
}

.related a:hover {
  color: var(--brand-text);
  text-decoration: underline;
  text-decoration-color: var(--brand-accent);
}

.mf {
  margin-top: var(--space-16);
  background: var(--brand-text);
  color: var(--brand-primary-fg);
  border-top: 4px solid var(--brand-accent);
}

.mf a {
  color: var(--brand-primary-fg);
  text-decoration-color: rgba(255, 255, 255, 0.35);
}

.mf a:hover {
  color: var(--brand-accent);
  text-decoration-color: var(--brand-accent);
}

.mf-cols {
  gap: var(--space-8);
}

.mf-trust {
  color: rgba(255, 255, 255, 0.78);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
}

.age-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: var(--space-2);
  border: 2px solid var(--brand-accent);
  border-radius: var(--radius-full);
  color: var(--brand-primary-fg);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  line-height: 1;
}

/* SPORTITALIA-MULTI-VISUAL-POLISH START */
html {
  background: var(--brand-bg);
}

main.page {
  max-width: 1180px;
  padding: clamp(20px, 4vw, 44px) 16px clamp(48px, 7vw, 84px);
}

.crumbs {
  align-items: center;
  background: transparent;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
}

.crumbs li {
  align-items: center;
  color: var(--brand-muted);
  display: inline-flex;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  gap: 8px;
}

.crumbs li + li::before {
  color: rgba(31, 107, 69, 0.45);
  content: "/";
  font-weight: var(--weight-bold);
}

.crumbs a,
.crumbs span {
  align-items: center;
  border: 1px solid var(--brand-border);
  border-radius: var(--radius-full);
  display: inline-flex;
  min-height: 34px;
  padding: 6px 12px;
  text-decoration: none;
}

.crumbs a {
  background: var(--brand-surface);
  color: var(--brand-primary);
}

.crumbs span {
  background: rgba(31, 107, 69, 0.08);
  color: var(--brand-text);
}

.mh {
  backdrop-filter: blur(14px);
}

.mh-logo {
  align-items: center;
  display: inline-flex;
  min-width: 0;
}

.sportitalia-brand-logo {
  display: block;
  height: clamp(34px, 5vw, 46px);
  object-fit: contain;
  width: auto;
}

.mh-cats-inner {
  gap: 8px;
  padding-block: 10px;
}

.mh-cats-inner a {
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  padding: 0 14px;
}

.mh-cats-inner a.is-active,
.mh-cats-inner a:hover {
  background: var(--brand-surface);
  border-color: var(--brand-border);
  color: var(--brand-primary);
}

.sportitalia-visual-hero {
  align-items: stretch;
  background: linear-gradient(135deg, rgba(31, 107, 69, 0.1), rgba(199, 164, 74, 0.1)), var(--brand-surface);
  border: 1px solid var(--brand-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  display: grid;
  gap: clamp(16px, 3vw, 28px);
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  margin: 18px 0 clamp(30px, 5vw, 56px);
  overflow: hidden;
}

.sportitalia-visual-copy {
  align-content: center;
  display: grid;
  gap: 8px;
  padding: clamp(20px, 4vw, 34px);
}

.sportitalia-visual-copy p {
  color: var(--brand-primary);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: 0.04em;
  margin: 0;
  text-transform: uppercase;
}

.sportitalia-visual-copy strong {
  color: var(--brand-text);
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  line-height: 1.08;
}

.sportitalia-visual-intro {
  color: var(--brand-muted);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  max-width: 34rem;
}

.sportitalia-visual-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.sportitalia-visual-actions a {
  align-items: center;
  border: 1px solid var(--brand-border);
  border-radius: var(--radius-full);
  display: inline-flex;
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  min-height: 42px;
  padding: 10px 16px;
  text-decoration: none;
}

.sportitalia-visual-actions a:first-child {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: var(--brand-primary-fg);
}

.sportitalia-visual-actions a:last-child {
  background: var(--brand-surface);
  color: var(--brand-primary);
}

.sportitalia-visual-hero img {
  aspect-ratio: 16 / 9;
  height: 100%;
  max-height: 360px;
  object-fit: cover;
  width: 100%;
}

main.page > section {
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid var(--brand-border);
  border-radius: var(--radius-lg);
  margin-block: 18px;
  padding: clamp(18px, 3vw, 30px);
}

main.page > section:nth-of-type(even) {
  background: rgba(31, 107, 69, 0.045);
}

main.page > section h2 {
  margin-top: 0;
}

main.page > section p:last-child,
main.page > section ul:last-child,
main.page > section table:last-child {
  margin-bottom: 0;
}

main.page ul:not(.related) {
  display: grid;
  gap: 10px;
  padding-left: 1.2rem;
}

.tbl-wrap {
  margin-top: 16px;
}

details {
  background: var(--brand-surface);
  border: 1px solid var(--brand-border);
  border-radius: var(--radius-md);
  margin-top: 10px;
  padding: 0 16px;
}

summary {
  cursor: pointer;
  font-weight: var(--weight-bold);
}

details p {
  margin-top: 0;
}

nav[aria-label="Pagine correlate"] {
  margin-top: 28px;
}

ul.related {
  background: var(--brand-surface);
  border: 1px solid var(--brand-border);
  border-radius: var(--radius-lg);
  padding: 14px !important;
}

ul.related a {
  border: 1px solid var(--brand-border);
  border-radius: var(--radius-full);
  padding: 8px 14px;
  text-decoration: none;
}

.mf {
  background: linear-gradient(180deg, rgba(31, 107, 69, 0.07), rgba(255, 255, 255, 0.92));
  border-top: 3px solid var(--brand-accent);
  color: var(--brand-text);
  margin-top: 0;
  padding: clamp(22px, 3vw, 32px) 16px;
}

.mf-inner {
  display: grid;
  gap: 16px;
  margin-inline: auto;
  max-width: 1180px;
  padding: 0 16px;
}

.mf-cols {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.mf-cols a {
  background: var(--brand-surface);
  border: 1px solid var(--brand-border);
  border-radius: var(--radius-full);
  color: var(--brand-primary);
  min-height: 36px;
  padding: 7px 13px;
  text-decoration: none;
}

.mf-cols a:hover {
  background: rgba(31, 107, 69, 0.1);
  color: var(--brand-primary);
}

.mf-trust {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--brand-muted);
}

.mf-trust a {
  color: var(--brand-primary);
  text-decoration-color: rgba(31, 107, 69, 0.35);
}

.mf .age-tag {
  color: var(--brand-primary);
}

.mf-copy {
  border-top: 1px solid var(--brand-border);
  color: var(--brand-muted);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  margin: 0;
  max-width: 760px;
  padding-top: 14px;
}

@media (max-width: 820px) {
  .sportitalia-visual-hero {
    grid-template-columns: 1fr;
  }

  .sportitalia-visual-hero img {
    max-height: none;
    order: -1;
  }
}

@media (max-width: 520px) {
  .mh-top {
    padding-inline: 16px;
  }

  .sportitalia-brand-logo {
    height: 34px;
    max-width: 180px;
  }

  .crumbs a,
  .crumbs span {
    min-height: 30px;
    padding: 5px 10px;
  }

  .sportitalia-visual-copy strong {
    font-size: 1.45rem;
  }

  main.page > section {
    padding: 16px;
  }

  .mf-cols {
    align-items: stretch;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .mf-cols a {
    justify-content: center;
    text-align: center;
  }
}
/* SPORTITALIA-MULTI-VISUAL-POLISH END */
