@font-face { font-family: "Bricolage"; src: url("/fonts/BricolageGrotesque-500.ttf") format("truetype"); font-weight: 400 500; font-display: swap; }
@font-face { font-family: "Bricolage"; src: url("/fonts/BricolageGrotesque-700.ttf") format("truetype"); font-weight: 600 700; font-display: swap; }
@font-face { font-family: "Bricolage"; src: url("/fonts/BricolageGrotesque-800.ttf") format("truetype"); font-weight: 800 900; font-display: swap; }

:root {
  --bg: #f4f6fb; --card: #ffffff; --ink: #121726; --muted: #556079; --line: #dfe5f0;
  --soft: #eef2fa; --link: #1255e0; --focus: #1255e0;
  --lotto: #1255e0; --lotto-dark: #0a2e86;
  --dieci: #d7192a; --dieci-dark: #8a0a15;
  --super: #078a3e; --super-dark: #045c28;
  --euro: #6a1fd1; --euro-dark: #3e0e8a;
  --million: #0b7a75; --million-dark: #064e4b;
  --gold: #ffb400; --jolly: #c74300; --star: #5b21b6;
  --radius: 20px;
  --shadow: 0 1px 2px rgba(18,23,38,.06), 0 8px 24px rgba(18,23,38,.06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #070b14; --card: #101726; --ink: #eef2fb; --muted: #a3adc2; --line: #222d45;
    --soft: #172036; --link: #7db0ff; --focus: #7db0ff;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 500 16px/1.55 "Bricolage", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--link); text-underline-offset: 2px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 8px; }
img { max-width: 100%; height: auto; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.01em; margin: 0; }
h1 { font-size: clamp(1.7rem, 4.6vw, 2.6rem); font-weight: 800; }
h2 { font-size: clamp(1.25rem, 3vw, 1.55rem); font-weight: 800; }
h3 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; background: var(--card); padding: 8px 12px; z-index: 10; }

/* Header */
.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 16px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1.15rem; flex: none; }
.brand img { width: 34px; height: 34px; border-radius: 10px; }
.nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin-left: auto; padding: 8px 0; }
.nav::-webkit-scrollbar { display: none; }
.nav a { flex: none; color: var(--muted); text-decoration: none; font-weight: 700; font-size: .92rem; padding: 7px 12px; border-radius: 999px; }
.nav a:hover { color: var(--ink); background: var(--soft); }
.nav a[aria-current="page"] { color: var(--bg); background: var(--ink); }
@media (max-width: 720px) {
  .top .wrap { flex-wrap: wrap; gap: 0; }
  .nav { margin: 0 -16px; padding: 0 16px 10px; width: calc(100% + 32px); }
}

main { padding: 28px 0 56px; }
.crumbs { font-size: .88rem; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }
.crumbs span[aria-hidden] { margin: 0 6px; }

/* Hero */
.hero { display: grid; grid-template-columns: 1.25fr .75fr; gap: 32px; align-items: center; padding: 12px 0 8px; }
.hero p.lead { font-size: 1.12rem; color: var(--muted); margin-top: 14px; max-width: 34em; }
.hero .shots { display: flex; justify-content: center; }
.hero .shots img { width: min(270px, 70vw); border-radius: 28px; box-shadow: 0 24px 60px rgba(10,46,134,.28); border: 6px solid #0d1220; }
@media (max-width: 820px) { .hero { grid-template-columns: 1fr; } .hero .shots { display: none; } }

.cta { display: inline-flex; align-items: center; gap: 10px; margin-top: 22px; background: var(--ink); color: var(--bg); text-decoration: none; font-weight: 800; padding: 13px 20px; border-radius: 14px; }
.cta svg { width: 22px; height: 22px; }
.cta:hover { opacity: .9; }
.note18 { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; font-size: .85rem; color: var(--muted); }
.badge18 { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 2px solid currentColor; font-weight: 800; font-size: .72rem; }

/* Sections and cards */
section { margin-top: 40px; }
section > h2 { margin-bottom: 14px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.grid .card + .card { margin-top: 0; }

/* Game card (coloured) */
.game { position: relative; overflow: hidden; color: #fff; border: 0; padding: 22px; text-decoration: none; display: block; }
.game::after { content: ""; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: rgba(255,255,255,.08); pointer-events: none; }
.game h3 { font-size: 1.25rem; font-weight: 800; }
.game .meta { color: rgba(255,255,255,.82); font-size: .9rem; margin-top: 2px; }
.game .more { display: inline-block; margin-top: 14px; font-weight: 800; color: #fff; }
.g-lotto { background: linear-gradient(135deg, var(--lotto), var(--lotto-dark)); }
.g-dieci { background: linear-gradient(135deg, var(--dieci), var(--dieci-dark)); }
.g-super { background: linear-gradient(135deg, var(--super), var(--super-dark)); }
.g-euro { background: linear-gradient(135deg, var(--euro), var(--euro-dark)); }
.g-million { background: linear-gradient(135deg, var(--million), var(--million-dark)); }
a.game:hover { filter: brightness(1.06); }

.headcard { margin-bottom: 18px; }
.headcard h1 { color: #fff; }
.headcard .meta { font-size: 1rem; margin-top: 8px; }
.pill { display: inline-block; background: rgba(255,255,255,.18); color: #fff; font-weight: 800; font-size: .8rem; letter-spacing: .04em; padding: 4px 10px; border-radius: 999px; text-transform: uppercase; }
.jackpot { margin-top: 14px; font-weight: 800; font-size: 1.05rem; }
.jackpot strong { color: #ffe11b; font-size: 1.35rem; }

/* Balls */
.balls { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; align-items: center; list-style: none; padding: 0; }
.ball {
  --c: var(--lotto); --t: #fff;
  display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  font-weight: 800; font-size: 1.02rem; color: var(--t); font-variant-numeric: tabular-nums;
  background: radial-gradient(circle at 32% 28%, color-mix(in srgb, var(--c) 45%, #fff) 0, var(--c) 52%, color-mix(in srgb, var(--c) 70%, #000) 100%);
  box-shadow: inset 0 -3px 6px rgba(0,0,0,.18), 0 2px 6px rgba(0,0,0,.15);
}
.ball.sm { width: 34px; height: 34px; font-size: .9rem; }
.ball.w { --c: #ffffff; --t: var(--ink-on-white, #0a2e86); background: radial-gradient(circle at 32% 28%, #fff 0, #f2f5fb 55%, #cfd8ea 100%); }
.ball.gold { --c: var(--gold); --t: #3d2a00; }
.ball.jolly { --c: var(--jolly); }
.ball.star { --c: var(--star); }
.ball.glass { background: rgba(255,255,255,.2); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.55); color: #fff; }
.b-lotto .ball { --c: var(--lotto); }
.b-dieci .ball { --c: var(--dieci); }
.b-super .ball { --c: var(--super); }
.b-euro .ball { --c: var(--euro); }
.b-million .ball { --c: var(--million); }
.b-dieci .ball.gold, .b-euro .ball.gold { --c: var(--gold); }
.b-super .ball.jolly { --c: var(--jolly); }
.b-super .ball.star { --c: var(--star); }
.balllabel { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; margin: 0 2px 0 8px; opacity: .85; }
.game .ball { --c: #fff; --t: #0a2e86; background: radial-gradient(circle at 32% 28%, #fff 0, #f2f5fb 55%, #cfd8ea 100%); }
.g-dieci .ball { --t: var(--dieci-dark); }
.g-super .ball { --t: var(--super-dark); }
.g-euro .ball { --t: var(--euro-dark); }
.g-million .ball { --t: var(--million-dark); }
.game .ball.gold { --t: #3d2a00; background: radial-gradient(circle at 32% 28%, #ffe9a6 0, #ffc21a 55%, #c98a00 100%); }
.game .ball.glass { background: rgba(255,255,255,.18); color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.55); }

/* Lotto wheels */
.wheels { display: grid; gap: 10px; }
.wheel { display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.wheel h3 { display: flex; align-items: center; gap: 10px; font-size: 1rem; }
.wheel .code { display: inline-grid; place-items: center; width: 34px; height: 28px; border-radius: 9px; background: var(--soft); color: var(--muted); font-size: .76rem; font-weight: 800; }
.wheel .balls { margin: 0; }
@media (max-width: 480px) {
  .wheel { grid-template-columns: 1fr; gap: 6px; }
  .wheel .ball { width: 38px; height: 38px; font-size: .95rem; }
}

/* Tables */
.table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.table th, .table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
.table th { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.table td.num, .table th.num { text-align: right; }
.scroll { overflow-x: auto; }

/* Facts of one draw */
.facts ul { margin: 12px 0 0; padding-left: 20px; display: grid; gap: 6px; }
.facts td { vertical-align: middle; }
.facts .table { max-width: 520px; }

/* Archive list */
.archive h3 { text-transform: capitalize; margin: 18px 0 8px; color: var(--muted); font-size: .9rem; letter-spacing: .04em; }
.archive ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.archive a { display: flex; justify-content: space-between; gap: 8px; padding: 10px 14px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 700; }
.archive a span { color: var(--muted); font-weight: 500; }
.archive a:hover { border-color: var(--link); }

.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.pager a { font-weight: 800; text-decoration: none; padding: 10px 14px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }

/* Ritardatari */
.late { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.late .card h3 { margin-bottom: 10px; }
.late ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.late li { display: flex; align-items: center; gap: 12px; }
.late li .bar { flex: 1; height: 6px; border-radius: 4px; background: var(--soft); overflow: hidden; }
.late li .bar i { display: block; height: 100%; background: var(--lotto); border-radius: 4px; }
.late li b { min-width: 70px; text-align: right; font-variant-numeric: tabular-nums; }

/* App promo */
.promo { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; background: linear-gradient(135deg, #0a2e86, #1255e0 60%, #3b7bff); color: #fff; border: 0; }
.promo h2 { color: #fff; }
.promo p { color: rgba(255,255,255,.86); margin-top: 8px; }
.promo ul { margin: 14px 0 0; padding-left: 20px; color: rgba(255,255,255,.92); }
.promo .cta { background: #fff; color: #0a2e86; }
.promo .phones { display: flex; gap: 12px; }
.promo .phones img { width: 150px; border-radius: 20px; border: 4px solid #0d1220; box-shadow: 0 16px 40px rgba(0,0,0,.3); }
@media (max-width: 820px) { .promo { grid-template-columns: 1fr; } .promo .phones img { width: 42%; } }

/* FAQ */
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 0 16px; }
.faq details + details { margin-top: 8px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 14px 0; }
.faq details p { padding: 0 0 14px; color: var(--muted); }

.prose { max-width: 760px; }
.prose h2 { margin: 28px 0 8px; font-size: 1.2rem; }
.prose p, .prose li { color: var(--ink); }
.prose p + p { margin-top: 10px; }
.prose table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.prose th, .prose td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }

.notice { margin-top: 18px; padding: 14px 16px; border-radius: 14px; background: var(--soft); color: var(--muted); font-size: .92rem; }

/* Footer */
footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: .9rem; }
footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 24px; }
footer h2 { font-size: .95rem; color: var(--ink); margin-bottom: 8px; }
footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
footer a { color: var(--muted); }
footer .legal { margin-top: 22px; display: flex; gap: 12px; align-items: flex-start; }
@media (max-width: 720px) { footer .cols { grid-template-columns: 1fr 1fr; } footer .cols > div:first-child { grid-column: 1 / -1; } }

@media (prefers-reduced-motion: no-preference) {
  a.game { transition: filter .15s ease; }
}
