:root {
  color-scheme: light;
  --ink: #17202a;
  --muted: #5e6975;
  --line: #e7ebef;
  --surface: #ffffff;
  --surface-soft: #f6f8fa;
  --orange: #f05a24;
  --orange-dark: #c94314;
  --green: #138a58;
  --shadow: 0 18px 46px rgba(31, 46, 61, 0.1);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--surface-soft);
  line-height: 1.55;
}

a { color: var(--orange-dark); }
a:hover { color: var(--orange); }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: .65rem .9rem;
  color: #fff;
  background: var(--ink);
  border-radius: .45rem;
}
.skip-link:focus { top: 1rem; }

.site-header {
  position: sticky;
  z-index: 50;
  top: 0;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 12px max(24px, calc((100vw - 1180px) / 2));
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid rgba(219, 226, 238, .9);
  color: var(--ink);
  backdrop-filter: blur(16px);
}

.brand { display: inline-flex; align-items: center; }
.brand img { display: block; width: 174px; height: 40px; object-fit: contain; }
.site-nav { display: flex; align-items: center; gap: .95rem 1.4rem; }
.site-nav a { color: #334155; text-decoration: none; font-size: .92rem; font-weight: 700; }
.site-nav a:hover { color: var(--orange); }
.site-nav .nav-download {
  padding: .65rem 1rem;
  color: #fff;
  background: var(--orange);
  border-radius: .55rem;
}
.site-nav .nav-download:hover { color: #fff; background: var(--orange-dark); }
.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: .5rem;
}
.menu-button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

main {
  width: min(1160px, calc(100% - 2rem));
  margin: 0 auto;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  padding: 1.2rem 0 0;
  color: var(--muted);
  font-size: .9rem;
}
.breadcrumbs a { text-decoration: none; }

.contest-hero {
  margin: 1.4rem 0 1.2rem;
  padding: clamp(1.4rem, 4vw, 2.6rem);
  border-radius: 1.2rem;
  color: #fff;
  background: linear-gradient(126deg, #152433 0%, #263b4b 58%, #e25220 150%);
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 .35rem;
  color: var(--orange);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.contest-hero .eyebrow { color: #ffc4a9; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 850px; margin-bottom: .7rem; font-size: clamp(2rem, 5vw, 3.45rem); line-height: 1.08; letter-spacing: -.035em; }
h2 { margin-bottom: .5rem; font-size: clamp(1.35rem, 3vw, 2rem); line-height: 1.2; }
.lead { max-width: 760px; margin-bottom: 1.1rem; color: #e9f0f5; font-size: 1.07rem; }

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  margin: 0;
  padding: .35rem .75rem;
  border: 1px solid rgba(255, 255, 255, .32);
  border-radius: 999px;
  background: rgba(255, 255, 255, .11);
  font-size: .86rem;
  font-weight: 700;
}
.status-live { border-color: #82dfb2; color: #c8f9dd; }
.status-final { border-color: #ffd1b4; color: #fff0e6; }
.live-controls { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem; margin-top: .75rem; }
.live-controls .status-pill { margin: 0; }
.goal-sound-toggle {
  min-height: 2rem;
  padding: .35rem .7rem;
  border: 1px solid rgba(255, 255, 255, .42);
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, .08);
  font: inherit;
  font-size: .78rem;
  font-weight: 750;
  cursor: pointer;
}
.goal-sound-toggle:hover,
.goal-sound-toggle:focus-visible { background: rgba(255, 255, 255, .18); }
.goal-sound-toggle[aria-pressed="true"] { border-color: #82dfb2; color: #c8f9dd; background: rgba(19, 138, 88, .4); }
.goal-sound-hint { margin: .5rem 0 0; color: #ffd9c7; font-size: .78rem; }
#goal-audio { display: none; }

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .9rem;
  margin: 0 0 1.5rem;
}
.summary-card {
  padding: 1.05rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: .9rem;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(31, 46, 61, .05);
}
.summary-card span { display: block; color: var(--muted); font-size: .82rem; }
.summary-card strong { display: block; margin-top: .18rem; font-size: 1.18rem; }

.contest-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
  margin: 0 0 1.5rem;
}
.contest-meta > div { padding: .8rem 1rem; border: 1px solid var(--line); border-radius: .75rem; background: #fff; }
.contest-meta dt { color: var(--muted); font-size: .78rem; }
.contest-meta dd { margin: .12rem 0 0; font-weight: 700; }

.content-section,
.result-section,
.hub-list {
  margin: 0 0 1.5rem;
  padding: clamp(1rem, 3vw, 1.6rem);
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--surface);
}
.section-heading p:last-child { color: var(--muted); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: .8rem; }
table { width: 100%; min-width: 720px; border-collapse: collapse; font-size: .93rem; }
caption { padding: .85rem 1rem; color: var(--muted); text-align: left; font-size: .82rem; }
th, td { padding: .75rem .65rem; border-top: 1px solid var(--line); vertical-align: middle; text-align: left; }
thead th { border-top: 0; color: var(--muted); background: var(--surface-soft); font-size: .76rem; letter-spacing: .04em; text-transform: uppercase; }
tbody tr:nth-child(even) { background: #fbfcfd; }
tbody tr:target { outline: 2px solid #ffb08c; outline-offset: -2px; }
tbody th { color: var(--orange-dark); font-variant-numeric: tabular-nums; }
.team { display: inline-flex; align-items: center; gap: .5rem; min-width: 9.5rem; font-weight: 650; }
.team img { width: 28px; height: 28px; object-fit: contain; }
.score { min-width: 4.5rem; font-weight: 800; text-align: center; white-space: nowrap; }
.score-live { animation: score-updating 1.25s ease-in-out infinite; }
@keyframes score-updating {
  0%, 100% { opacity: 1; }
  50% { opacity: .42; }
}
time { white-space: nowrap; color: var(--muted); font-size: .82rem; }
.match-time-live { color: var(--green); font-weight: 800; }
tbody tr.match-live td:last-child { color: var(--green); }
tbody tr.goal-highlight { background: #fff3bf !important; outline: 2px solid #f2c44d; outline-offset: -2px; }

.live-events ul { display: grid; gap: .55rem; margin: 0; padding: 0; list-style: none; }
.live-events li { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem .8rem; border-radius: .6rem; background: #f1fbf6; }
.live-events li span { color: var(--muted); text-align: right; }

.pending-result { border-color: #ffd8bf; background: #fff9f4; }
.pending-result h2 { color: var(--orange-dark); }
.result-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.result-grid article { padding: 1rem; border-radius: .7rem; background: var(--surface-soft); }
.result-grid span, .result-grid small { display: block; color: var(--muted); }
.result-grid strong { display: block; margin: .1rem 0; font-size: 1.55rem; }
.result-links { margin: 1rem 0 0; }

.app-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin: 0 0 1.5rem;
  padding: clamp(1.2rem, 4vw, 2rem);
  border-radius: 1rem;
  color: #fff;
  background: #172735;
}
.app-cta .eyebrow { color: #ffc4a9; }
.app-cta h2 { margin-bottom: .35rem; }
.app-cta p:last-child { margin: 0; color: #d8e3ea; }
.cta-button {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-height: 2.8rem;
  padding: .7rem 1rem;
  border-radius: .55rem;
  color: #fff;
  background: var(--orange);
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}
.cta-button:hover { color: #fff; background: var(--orange-dark); }

.source-note { padding: 0 0 2rem; color: var(--muted); font-size: .83rem; }
.source-note p { margin-bottom: .55rem; }
.page-links { font-weight: 650; }
footer { padding: 1.8rem 1rem 2.5rem; color: var(--muted); text-align: center; font-size: .86rem; }

.hub-list { display: grid; gap: .85rem; }
.hub-card { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem; border: 1px solid var(--line); border-radius: .75rem; }
.hub-card h2 { margin-bottom: .25rem; font-size: 1.25rem; }
.hub-card h2 a { color: var(--ink); text-decoration: none; }
.hub-card h2 a:hover { color: var(--orange-dark); }
.hub-card p:last-child { margin: 0; color: var(--muted); font-size: .9rem; }
.empty-state { margin: 0; color: var(--muted); }

@media (max-width: 720px) {
  .site-header {
    min-height: 64px;
    padding: 10px 18px;
  }
  .brand img { width: 148px; height: 36px; }
  .menu-button { display: flex; }
  .site-nav {
    position: absolute;
    top: calc(100% + 8px);
    right: 16px;
    left: 16px;
    padding: 12px;
    display: none;
    align-items: stretch;
    gap: 4px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: .5rem;
    box-shadow: var(--shadow);
  }
  .site-nav.is-open { display: grid; }
  .site-nav a { padding: 12px; }
  .summary-grid, .contest-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
  .result-grid { grid-template-columns: 1fr; }
  .summary-card { padding: .85rem .75rem; }
  .summary-card span, .contest-meta dt { font-size: .74rem; }
  .summary-card strong, .contest-meta dd { overflow-wrap: anywhere; }
  .summary-card strong { font-size: 1.04rem; }
  .contest-meta > div { padding: .7rem .75rem; }
  .contest-meta dd { font-size: .92rem; }
  .app-cta, .hub-card { align-items: flex-start; flex-direction: column; }
  .cta-button { width: 100%; }
  .table-wrap { overflow: visible; border: 0; }
  table { display: block; min-width: 0; font-size: .92rem; }
  caption { padding: .2rem 0 .8rem; }
  thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  tbody { display: grid; gap: .7rem; }
  tbody tr {
    display: grid;
    grid-template-columns: 2rem minmax(0, 1fr) auto;
    grid-template-areas:
      "number home score"
      "number away score"
      "number status status";
    align-items: center;
    gap: .1rem .65rem;
    padding: .8rem .7rem;
    border: 1px solid var(--line);
    border-radius: .8rem;
    background: var(--surface);
  }
  tbody tr:nth-child(even) { background: var(--surface); }
  tbody th,
  tbody td { min-width: 0; padding: .15rem 0; border: 0; }
  tbody th {
    grid-area: number;
    align-self: center;
    font-size: 1.08rem;
  }
  tbody td:nth-of-type(1) { grid-area: home; }
  tbody td:nth-of-type(2) { grid-area: score; }
  tbody td:nth-of-type(3) { grid-area: away; }
  tbody td:nth-of-type(4) {
    grid-area: status;
    padding-top: .5rem;
    border-top: 1px solid var(--line);
  }
  tbody td:nth-of-type(4)::before {
    content: 'Data e hora · ';
    color: var(--muted);
    font-size: .74rem;
    font-weight: 700;
  }
  .team { width: 100%; min-width: 0; gap: .4rem; }
  .team img { flex: 0 0 28px; }
  .score { min-width: 0; padding: 0 .25rem; }
  time { font-size: .78rem; }
  .live-events li { align-items: flex-start; flex-direction: column; gap: .2rem; }
  .live-events li span { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .score-live { animation: none; }
}
