@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/montserrat-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/montserrat-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
  --ink: #090a0c;
  --panel: #12141a;
  --panel-2: #1c2029;
  --line: #2c313c;
  --paper: #f6f3ec;
  --ash: #c9c3b6;
  --red: #d90f1a;
  --red-dark: #a30b13;
  --red-text: #ff5a5f;
  --red-ink: #ffffff;
  --heat: #ff5a5f;
  --font: "Montserrat", sans-serif;
  --serif: "Montserrat", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.45;
}
a { color: var(--red-text); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-weight: 700; letter-spacing: 0.01em; line-height: 1.05; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); margin: 0.2em 0; }
.skip {
  position: absolute; left: -999px; top: 0; background: var(--red); color: var(--red-ink); padding: 0.4rem 0.8rem;
}
.skip:focus { left: 0.5rem; z-index: 9; }
.ribbon, .ok, .err, .empty {
  margin: 0; padding: 0.7rem 1rem;
}
.ribbon { background: var(--red); color: #fff; }
.ok { background: var(--panel-2); color: var(--paper); border-left: 4px solid var(--red); }
.err { background: #3a1014; color: #ffd6d8; border-left: 4px solid var(--red); }
.empty { color: var(--ash); }
.site-header, .site-footer, main { max-width: 1120px; margin: 0 auto; padding: 0 1rem; }
.topline, .brandrow, .nav { display: flex; gap: 1rem; align-items: center; justify-content: space-between; }
.topline { color: var(--ash); font-size: 0.85rem; padding: 0.6rem 0; border-bottom: 1px solid var(--line); }
.brandrow { padding: 0.9rem 0; }
.logo { display: flex; gap: 0.7rem; align-items: center; text-decoration: none; color: var(--paper); }
.logo img { display: block; width: 220px; height: 49px; }
.logo-foot { width: 180px; height: 40px; margin-bottom: 0.6rem; }
.login-logo { width: 260px; height: 58px; margin: 0 0 1rem; }
.logo strong, .logo-text { letter-spacing: 0.14em; font-size: 1.4rem; }
.logo small { display: block; color: var(--ash); letter-spacing: 0.12em; font-size: 0.72rem; }
.search input, input, textarea, select {
  width: 100%; background: var(--panel); color: var(--paper); border: 1px solid var(--line); padding: 0.55rem 0.7rem; font: inherit;
}
textarea { min-height: 8rem; }
.nav { border-top: 1px solid var(--line); border-bottom: 3px solid var(--red); flex-wrap: wrap; }
.nav a { color: var(--paper); text-decoration: none; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.92rem; padding: 0.7rem 0; }
.nav a:hover, .nav a:focus { color: var(--red-text); }
.nav-mobile { display: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
main { padding-bottom: 3rem; }
.home-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.2rem; margin-top: 1rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.stack-cards { display: grid; gap: 0.8rem; }
.card { border-top: 1px solid var(--line); padding-top: 0.6rem; }
.card h3 { font-size: 1.25rem; margin: 0.2rem 0; }
.card h3 a, .band h2 a { color: var(--paper); text-decoration: none; }
.card h3 a:hover { color: var(--red-text); }
.cover { display: block; background: var(--panel); min-height: 120px; }
.ph { display: block; min-height: 140px; background: linear-gradient(160deg, var(--panel-2), var(--panel)); }
.card-lg h3 { font-size: 2rem; }
.kicker { color: var(--heat); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.78rem; margin: 0.4rem 0; }
.kicker a { color: var(--heat); text-decoration: none; }
.by, .muted, .lead, .dek { color: var(--ash); }
.dek { font-family: var(--serif); font-size: 1.2rem; }
.badge { background: var(--panel-2); color: var(--ash); padding: 0.1rem 0.35rem; }
.band { margin-top: 2rem; }
.band h2 { border-bottom: 1px solid var(--line); padding-bottom: 0.3rem; }
.story { max-width: 46rem; }
.prose { font-family: var(--serif); font-size: 1.12rem; }
.prose h2, .prose h3 { font-family: var(--font); }
.prose blockquote { border-left: 3px solid var(--red); margin-left: 0; padding-left: 1rem; color: var(--ash); }
.tags a { margin-right: 0.6rem; }
.gallery { display: grid; gap: 0.8rem; }
.site-footer { display: grid; grid-template-columns: 1.3fr 1fr 1.2fr; gap: 1.5rem; border-top: 1px solid var(--line); padding: 2rem 1rem 3rem; max-width: 1120px; }
.site-footer h2 { font-size: 0.9rem; letter-spacing: 0.1em; text-transform: uppercase; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.consent {
  position: sticky; bottom: 0; background: var(--panel); border-top: 3px solid var(--red); padding: 0.8rem 1rem;
  display: flex; gap: 0.8rem; align-items: center; flex-wrap: wrap;
}
.consent[hidden] { display: none; }
button, .button {
  background: var(--red); color: var(--red-ink); border: 0; padding: 0.55rem 0.9rem; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; display: inline-block;
}
button:hover, .button:hover { background: var(--red-dark); }
button.ghost:hover { background: transparent; border-color: var(--red); }
button.ghost { background: transparent; color: var(--paper); border: 1px solid var(--line); }
.login { max-width: 28rem; margin: 4rem auto; padding: 0 1rem; }
.login.wide { max-width: 40rem; }
.stack { display: grid; gap: 0.7rem; }
label { display: grid; gap: 0.25rem; font-size: 0.92rem; }
.check { display: flex; gap: 0.5rem; align-items: flex-start; }
.check input { width: auto; margin-top: 0.3rem; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; border-bottom: 1px solid var(--line); padding: 0.45rem; vertical-align: top; }
.admin { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.admin aside { background: var(--panel); padding: 1rem; border-right: 1px solid var(--line); }
.admin aside .logo { display: block; }
.admin aside .logo img { width: 180px; height: 40px; }
.admin aside .logo small { display: block; margin-top: 0.3rem; }
.admin aside nav { display: grid; gap: 0.35rem; margin: 1rem 0; }
.admin aside a { color: var(--paper); text-decoration: none; }
.admin aside a:hover { color: var(--red-text); }
.admin-main { padding: 1.2rem; }
.metrics { display: flex; gap: 0.8rem; flex-wrap: wrap; padding: 0; list-style: none; }
.metrics li { background: var(--panel); padding: 0.7rem 0.9rem; min-width: 7rem; }
.metrics span { display: block; font-size: 1.6rem; color: var(--red-text); }
.bars { display: grid; gap: 0.4rem; }
.bar { background: var(--panel-2); height: 1.4rem; }
.bar { display: grid; grid-template-columns: 4.5rem 1fr 3rem; gap: 0.6rem; align-items: center; background: none; height: auto; font-size: 0.85rem; }
.bar i { display: block; background: var(--red); height: 1.1rem; }
.bar b { text-align: right; }
@media (max-width: 800px) {
  .hide-sm { display: none; }
  .nav-mobile { display: block; border-bottom: 3px solid var(--red); padding-bottom: 0.6rem; }
  .nav-mobile a { display: block; color: var(--paper); text-decoration: none; padding: 0.35rem 0; }
  .home-grid, .site-footer, .admin { grid-template-columns: 1fr; }
  .admin aside { border-right: 0; border-bottom: 1px solid var(--line); }
}

.login .forgot { margin-top: 1rem; font-size: 0.9rem; }
.login .button { display: inline-block; padding: 0.6rem 1.1rem; text-decoration: none; }

/* Vídeos */
.videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.2rem; margin-top: 1rem; }
.video { border-top: 1px solid var(--line); padding-top: 0.6rem; }
.video h2 { font-size: 1.05rem; line-height: 1.3; margin: 0.6rem 0 0.3rem; }
.video p { margin: 0; font-size: 0.9rem; }
.video-frame { position: relative; aspect-ratio: 16 / 9; background: #000; overflow: hidden; }
.video-frame iframe, .video-frame .yt, .video-frame .yt img { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.video-frame .yt img { object-fit: cover; }
.yt-play { position: absolute; left: 50%; top: 50%; width: 64px; height: 44px; margin: -22px 0 0 -32px; background: var(--red); border-radius: 10px; transition: background 0.15s; }
.yt-play::after { content: ""; position: absolute; left: 26px; top: 12px; border-style: solid; border-width: 10px 0 10px 17px; border-color: transparent transparent transparent #fff; }
.yt:hover .yt-play, .yt:focus .yt-play { background: var(--red-dark); }
.pager { display: flex; align-items: center; justify-content: center; gap: 1rem; flex-wrap: wrap; margin: 2rem 0 0; }

.share { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 1.4rem 0; padding: 1rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.share-label { font-weight: 800; font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; margin-right: 0.4rem; color: var(--ash); }
.share-btn { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--panel-2); color: #fff; cursor: pointer; padding: 0; margin: 0; box-shadow: 0 2px 8px rgba(0,0,0,0.35); transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease; text-decoration: none; }
.share-btn svg { width: 22px; height: 22px; }
.share-btn:hover, .share-btn:focus-visible { transform: translateY(-3px) scale(1.06); filter: brightness(1.12); box-shadow: 0 6px 14px rgba(0,0,0,0.5); color: #fff; }
.share-btn:focus-visible { outline: 2px solid var(--red-text); outline-offset: 2px; }
.share-x { background: #14171c; box-shadow: inset 0 0 0 1px #ffffff40, 0 2px 8px rgba(0,0,0,0.35); }
.share-facebook { background: #1877f2; }
.share-whatsapp { background: #25d366; }
.share-telegram { background: #229ed9; }
.share-linkedin { background: #0a66c2; }
.share-mail { background: var(--red); }
.share-copy { background: #3a404d; }
.share-copy:hover { background: var(--red-dark); }
.share-copy.copied { background: #1f9d55; }

/* Publicidade */
.with-side { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1.5rem; align-items: start; }
.main-col { min-width: 0; }
.side-col { display: grid; gap: 1rem; margin-top: 1rem; justify-items: center; }
.ad { margin: 1rem 0; text-align: center; max-width: 100%; }
.side-col .ad { margin: 0; width: 100%; }
.ad-label { display: block; text-align: left; font-size: 0.62rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ash); opacity: 0.8; margin: 0 0 0.25rem; }
.ad-items { display: block; }
.ad-item { display: block; line-height: 0; }
.ad-item[hidden] { display: none; }
.ad-item img { display: block; margin: 0 auto; max-width: 100%; height: auto; background: var(--panel); }
.ad-item:focus-visible { outline: 2px solid var(--red-text); outline-offset: 2px; }
@media (max-width: 960px) {
  .with-side { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .side-col { margin-top: 1.5rem; padding-top: 0.5rem; border-top: 1px solid var(--line); }
}

/* Admin: publicidade */
.admin-main { min-width: 0; }
.table-wrap { overflow-x: auto; }
.ads-form label, .two-cols > * { min-width: 0; }
.ads-form input { max-width: 100%; }
.num { text-align: right; white-space: nowrap; }
.pill { display: inline-block; padding: 0.1rem 0.5rem; border-radius: 999px; font-size: 0.78rem; font-weight: 700; background: var(--panel-2); color: var(--ash); }
.pill-on { background: #12361f; color: #7fe3a2; }
.pill-scheduled { background: #332a0e; color: #ffd778; }
.pill-ended, .pill-paused { background: var(--panel-2); color: var(--ash); }
.ads-table td { vertical-align: middle; }
.ad-thumb { display: block; max-width: 140px; max-height: 56px; margin-bottom: 0.3rem; background: var(--panel-2); }
.ad-actions form.inline { display: inline; margin: 0 0 0 0.3rem; }
.ad-actions button { padding: 0.2rem 0.55rem; font-size: 0.82rem; }
.ads-form { max-width: 42rem; }
.ads-form .help, .help { display: block; font-size: 0.8rem; color: var(--ash); font-weight: 400; }
.two-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.ad-current { background: var(--panel); padding: 0.6rem; }
.ads-guide td, .ads-guide th { font-size: 0.88rem; }
.ads-bars .bar { grid-template-columns: 3.2rem 1fr 7.5rem; }
.ads-bars .bar i { min-width: 1px; }
@media (max-width: 800px) {
  .two-cols { grid-template-columns: 1fr; }
}

/* Admin: anunciantes */
.subnav { display: flex; flex-wrap: wrap; gap: 0.3rem; margin: 0.4rem 0 1rem; border-bottom: 1px solid var(--line); }
.subnav a { padding: 0.45rem 0.9rem; color: var(--ash); text-decoration: none; font-weight: 700; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.subnav a:hover { color: var(--paper); }
.subnav a.current { color: var(--paper); border-bottom-color: var(--red); }
.pill-advoff { background: #3a1014; color: #ffb3b6; }
.toolbar { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin: 0.8rem 0; }
.toolbar form.inline { display: inline; margin: 0; }
.toolbar button[disabled] { opacity: 0.45; cursor: not-allowed; }
.filter-form { display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: flex-end; margin: 0.6rem 0 1rem; }
.filter-form label { min-width: 14rem; }
.adv-warn { color: #ffb3b6; }
.adv-warn[hidden] { display: none; }
.adv-data { display: grid; grid-template-columns: minmax(9rem, 14rem) 1fr; gap: 0.35rem 1rem; margin: 0.5rem 0 1.2rem; max-width: 46rem; }
.adv-data dt { color: var(--ash); font-size: 0.88rem; }
.adv-data dd { margin: 0; overflow-wrap: anywhere; }
.ads-table th small { font-weight: 400; color: var(--ash); }
@media (max-width: 800px) {
  .adv-data { grid-template-columns: 1fr; gap: 0; }
  .adv-data dd { margin-bottom: 0.5rem; }
}
.small { font-size: 0.82rem; }
.adv-list { font-size: 0.9rem; }
.adv-list th.grp { text-align: center; border-bottom: 1px solid var(--line); }
.adv-list td, .adv-list th { padding: 0.45rem 0.4rem; }
.ad-actions form.inline.first { margin-left: 0; }
.ad-actions { line-height: 1.9; }

/* Admin: visitas e visitantes únicos */
.uv-cards { align-items: stretch; }
.uv-card { flex: 1 1 14rem; min-width: 12rem; }
.uv-card h3 { margin: 0 0 0.4rem; font-size: 0.95rem; color: var(--ash); font-weight: 700; }
.uv-pair { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.uv-pair p { margin: 0; font-size: 0.85rem; color: var(--ash); }
.uv-pair span { display: block; font-size: 1.6rem; color: var(--red-text); line-height: 1.2; }
.uv-card small { display: block; margin-top: 0.4rem; color: var(--ash); }
.uv-legend { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; font-size: 0.85rem; }
.uv-legend span { display: inline-block; width: 0.8rem; height: 0.8rem; margin-left: 0.6rem; }
.uv-legend span:first-child { margin-left: 0; }
.k-v, .uv-bars i.v { background: var(--red); }
.k-u, .uv-bars i.u { background: #f2f2f2; }
.uv-days { display: grid; gap: 0.45rem; }
.uv-row { display: grid; grid-template-columns: 3.2rem 1fr 7.5rem; gap: 0.6rem; align-items: center; font-size: 0.85rem; }
.uv-bars { display: grid; gap: 2px; }
.uv-bars i { display: block; height: 0.55rem; min-width: 1px; }
.uv-num { text-align: right; white-space: nowrap; }
.uv-table td:first-child { overflow-wrap: anywhere; }
@media (max-width: 800px) {
  .uv-row { grid-template-columns: 2.8rem 1fr 6rem; }
}

/* Calendário */
.cal-champ { margin-top: 2rem; }
.cal-champ h2 { border-bottom: 1px solid var(--line); padding-bottom: 0.3rem; }
.cal-list { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: 0.5rem; }
.cal-event { display: flex; gap: 0.9rem; align-items: stretch; background: var(--panel); border-left: 3px solid var(--red); }
.cal-event.is-past { opacity: 0.6; }
.cal-round { flex: 0 0 2.8rem; display: flex; align-items: center; justify-content: center; background: var(--panel-2); color: var(--red-text); font-weight: 800; font-size: 1.15rem; }
.cal-main { padding: 0.6rem 0.8rem 0.6rem 0; display: grid; gap: 0.1rem; min-width: 0; }
.cal-event > .cal-main:first-child { padding-left: 0.9rem; }
.cal-main strong { font-size: 1.02rem; }
.cal-date { color: var(--paper); font-size: 0.9rem; }
.cal-where, .cal-notes { color: var(--ash); font-size: 0.85rem; }

/* Calendário: vistas Calendário e Lista (prefixo cx-) */
.cx { --cx-r: 14px; }
.cx [hidden] { display: none !important; }
.cx a:focus-visible, .cx button:focus-visible, .cx-modal a:focus-visible, .cx-modal button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.cx-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem 1rem; flex-wrap: wrap; }
.cx-head h1 { margin: 0.2em 0; }
.cx-sub { margin: 0; color: var(--ash); font-size: 0.9rem; }
.cx-ic { flex: none; width: 1.05em; height: 1.05em; vertical-align: -0.15em; }
.cx-dot { flex: none; display: inline-block; width: 0.62rem; height: 0.62rem; border-radius: 50%; background: var(--c, var(--red)); box-shadow: 0 0 0 3px rgba(var(--cr, 217,15,26), 0.22); }
.cx-flag { flex: none; display: inline-block; width: 22px; height: 15px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18); vertical-align: -0.2em; }

/* Próxima prova */
.cx-hero { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.2rem 1.6rem; align-items: center; margin: 0.8rem 0 1.2rem; padding: 1.4rem 1.6rem 1.4rem 1.9rem; border-radius: 18px; border: 1px solid rgba(var(--cr), 0.4); background: radial-gradient(120% 150% at 100% 0%, rgba(var(--cr), 0.3), transparent 58%), linear-gradient(135deg, #1d0c10, var(--panel) 62%); animation: cx-rise 0.5s ease both; }
.cx-hero::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--c); }
.cx-kicker { display: flex; align-items: center; gap: 0.5rem; margin: 0; color: var(--c); font-size: 0.78rem; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; }
.cx-hero-name { margin: 0.25em 0 0.4em; font-size: clamp(1.5rem, 3.6vw, 2.3rem); }
.cx-hero-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 0.6rem; }
.cx-hero-meta, .cx-meta { display: flex; flex-wrap: wrap; gap: 0.35rem 1.1rem; margin: 0.3rem 0; color: var(--paper); font-size: 0.92rem; }
.cx-when, .cx-place, .cx-country { display: inline-flex; align-items: center; gap: 0.4rem; }
.cx-place, .cx-country { color: var(--ash); }
.cx-hero-cd { text-align: center; min-width: 9rem; padding: 1rem 1.4rem; border-radius: 16px; background: rgba(0, 0, 0, 0.38); border: 1px solid rgba(255, 255, 255, 0.1); }
.cx-cd-num { display: block; font-size: clamp(2.8rem, 7vw, 4.4rem); font-weight: 800; line-height: 1; color: var(--paper); text-shadow: 0 0 28px rgba(var(--cr), 0.7); }
.cx-cd-word { font-size: clamp(1.8rem, 5vw, 2.6rem); }
.cx-cd-unit { display: block; margin-top: 0.35rem; color: var(--ash); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.cx-live { display: inline-block; width: 0.6rem; height: 0.6rem; border-radius: 50%; background: #3ddc84; animation: cx-pulse 1.6s ease-out infinite; }
.cx .cx-btn, .cx-modal .cx-btn { display: inline-flex; align-items: center; justify-content: center; margin-top: 0.7rem; padding: 0.55rem 1.1rem; border-radius: 999px; background: var(--red); color: #fff; font-size: 0.9rem; font-weight: 700; text-decoration: none; border: 1px solid var(--red); transition: background 0.15s, transform 0.15s; }
.cx .cx-btn:hover, .cx-modal .cx-btn:hover { background: var(--red-dark); transform: translateY(-1px); }
.cx-modal .cx-btn-ghost { background: transparent; color: var(--paper); border-color: var(--line); }
.cx-modal .cx-btn-ghost:hover { background: var(--panel-2); border-color: var(--ash); }

/* Controlos */
.cx-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.8rem 1.2rem; margin: 1rem 0 1.1rem; }
.cx-toggle { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); }
.cx .cx-tg { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.45rem 1rem; border-radius: 999px; background: transparent; color: var(--ash); font-size: 0.9rem; font-weight: 700; transition: background 0.15s, color 0.15s; }
.cx .cx-tg:hover { background: var(--panel-2); color: var(--paper); }
.cx .cx-tg[aria-pressed="true"], #cal[data-vista=""] .cx-tg-calendario { background: var(--red); color: #fff; }
#cal[data-vista=""] .cx-tg-lista:not([aria-pressed="true"]) { background: transparent; color: var(--ash); }
.cx-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.cx .cx-chip { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.4rem 0.5rem 0.4rem 0.85rem; border-radius: 999px; background: var(--panel); color: var(--paper); border: 1px solid var(--line); font-size: 0.86rem; font-weight: 600; transition: border-color 0.15s, background 0.15s, transform 0.15s; }
.cx .cx-chip b { min-width: 1.5rem; padding: 0 0.45rem; border-radius: 999px; background: rgba(255, 255, 255, 0.1); font-size: 0.74rem; text-align: center; }
.cx .cx-chip:hover { background: var(--panel-2); border-color: rgba(var(--cr, 217,15,26), 0.7); transform: translateY(-1px); }
.cx .cx-chip[aria-pressed="true"] { background: rgba(var(--cr, 217,15,26), 0.2); border-color: var(--c, var(--red)); }
.cx .cx-chip[data-comp=""][aria-pressed="true"] { background: var(--red); border-color: var(--red); }
#cal[data-vista="lista"] .cx-view-cal, #cal[data-vista="calendario"] .cx-view-list, #cal[data-vista=""] .cx-view-list { display: none; }

/* Vista Calendário */
.cx-nav { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin: 0.2rem 0 0.8rem; }
.cx-nav-m { display: flex; align-items: center; gap: 0.6rem; min-width: 0; }
.cx-title { margin: 0; font-size: clamp(1.25rem, 3vw, 1.8rem); }
.cx-title::first-letter, .cx-lm-h > span::first-letter { text-transform: uppercase; }
.cx-nav-b { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; border-radius: 50%; background: var(--panel); border: 1px solid var(--line); color: var(--paper); text-decoration: none; transition: background 0.15s, border-color 0.15s; }
.cx-nav-b:hover { background: var(--panel-2); border-color: var(--red); }
.cx-nav-b[aria-disabled="true"] { opacity: 0.3; pointer-events: none; }
.cx-today { padding: 0.45rem 1rem; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); color: var(--paper); font-size: 0.85rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.cx-today:hover { background: var(--panel-2); border-color: var(--red); }
.cx-month.cx-in { animation: cx-fade 0.28s ease both; }
.cx-grid { overflow: hidden; border: 1px solid var(--line); border-radius: var(--cx-r); background: var(--panel); }
.cx-wd { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); padding: 0.55rem 0; background: var(--panel-2); color: var(--ash); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-align: center; text-transform: uppercase; }
.cx-week { position: relative; min-height: 6rem; border-top: 1px solid var(--line); }
.cx-bg { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cx-d { padding: 0.35rem 0.45rem; border-left: 1px solid var(--line); }
.cx-d:first-child { border-left: 0; }
.cx-d.is-we { background: rgba(255, 255, 255, 0.018); }
.cx-d.is-out { background: rgba(0, 0, 0, 0.3); }
.cx-d.has-ev { background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015)); }
.cx-n { display: inline-flex; align-items: center; justify-content: center; min-width: 1.6rem; height: 1.6rem; border-radius: 50%; color: var(--ash); font-size: 0.82rem; font-weight: 700; }
.cx-d.is-out .cx-n { opacity: 0.4; }
.cx-d.has-ev .cx-n { color: var(--paper); }
.cx-d.is-today .cx-n { background: var(--red); color: #fff; box-shadow: 0 0 0 3px rgba(217, 15, 26, 0.3); }
.cx-evs { position: relative; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); padding: 2.15rem 0.3rem 0.3rem; pointer-events: none; }
.cx-bar { display: flex; align-items: center; gap: 0.4rem; min-width: 0; margin: 0 0.1rem 0.25rem; padding: 0.28rem 0.5rem 0.28rem 0.35rem; overflow: hidden; border-radius: 8px; border: 1px solid rgba(var(--cr), 0.55); border-left: 4px solid var(--c); background: rgba(var(--cr), 0.2); color: #fff; font-size: 0.76rem; font-weight: 600; line-height: 1.2; text-decoration: none; white-space: nowrap; pointer-events: auto; transition: background 0.15s, transform 0.15s, box-shadow 0.15s; }
.cx-bar:hover, .cx-bar:focus-visible { background: rgba(var(--cr), 0.4); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4); }
.cx-bar.is-done { opacity: 0.55; }
.cx-bar.cont-l { margin-left: 0; border-left-width: 1px; border-top-left-radius: 0; border-bottom-left-radius: 0; }
.cx-bar.cont-r { margin-right: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.cx-rn { flex: none; min-width: 1.3rem; padding: 0 0.3rem; border-radius: 5px; background: var(--c); color: #11131a; font-size: 0.7rem; font-weight: 800; text-align: center; }
.cx-nm { overflow: hidden; text-overflow: ellipsis; }
.cx-empty { margin: 1rem 0; padding: 1rem 1.2rem; border: 1px dashed var(--line); border-radius: var(--cx-r); color: var(--ash); text-align: center; }
.cx-agenda { display: none; }
.cx-agenda h3 { margin: 1.4rem 0 0.7rem; color: var(--ash); font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase; }
.cx-agenda ul { display: grid; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.cx-ag { display: flex; align-items: center; gap: 0.8rem; padding: 0.6rem 0.8rem; border: 1px solid var(--line); border-left: 4px solid var(--c); border-radius: 12px; background: var(--panel); color: var(--paper); text-decoration: none; }
.cx-ag.is-done { opacity: 0.6; }
.cx-ag-d { flex: none; min-width: 3.6rem; text-align: center; }
.cx-ag-d b { display: block; font-size: 1.05rem; line-height: 1.1; }
.cx-ag-d small { color: var(--c); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.cx-ag-t { display: grid; min-width: 0; gap: 0.1rem; }
.cx-ag-t strong { font-size: 0.95rem; line-height: 1.25; }
.cx-ag-t em { color: var(--c); font-style: normal; font-weight: 800; }
.cx-ag-m { color: var(--ash); font-size: 0.8rem; }

/* Vista Lista */
.cx-lm-h { position: sticky; top: 0; z-index: 4; display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin: 1.5rem 0 0.8rem; padding: 0.75rem 0.2rem 0.6rem; background: var(--ink); border-bottom: 2px solid var(--red); font-size: 1.25rem; }
.cx-lm-n { color: var(--ash); font-size: 0.8rem; font-weight: 600; text-transform: none; }
.cx-evlist { display: grid; gap: 0.75rem; margin: 0; padding: 0; list-style: none; }
.cx-ev { position: relative; display: grid; grid-template-columns: 5.3rem minmax(0, 1fr) auto; gap: 0.4rem 1.1rem; align-items: center; padding: 0.95rem 1.1rem; border: 1px solid var(--line); border-left: 4px solid var(--c); border-radius: var(--cx-r); background: var(--panel); animation: cx-rise 0.4s ease both; transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s, opacity 0.18s; }
.cx-ev:hover { transform: translateY(-2px); border-color: rgba(var(--cr), 0.75); box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4); }
.cx-ev.is-done { opacity: 0.58; }
.cx-ev.is-done:hover { opacity: 0.9; }
.cx-ev.is-next { border-color: var(--c); background: linear-gradient(100deg, rgba(var(--cr), 0.14), var(--panel) 55%); box-shadow: 0 0 0 1px rgba(var(--cr), 0.5), 0 14px 32px rgba(var(--cr), 0.16); }
.cx-ev.is-flash { animation: cx-flash 1.9s ease; }
.cx-date { padding: 0.6rem 0.25rem; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); text-align: center; }
.cx-dd { display: block; font-size: 1.45rem; font-weight: 800; line-height: 1.05; white-space: nowrap; }
.cx-dm { display: block; margin-top: 0.15rem; color: var(--c); font-size: 0.74rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.cx-body { min-width: 0; }
.cx-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin: 0 0 0.35rem; }
.cx-name { margin: 0; font-size: 1.2rem; line-height: 1.2; }
.cx-pill { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.15rem 0.65rem; border: 1px solid var(--line); border-radius: 999px; background: var(--panel-2); color: var(--ash); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }
.cx-pill-c { border-color: rgba(var(--cr), 0.55); background: rgba(var(--cr), 0.14); color: var(--paper); }
.cx-st { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.15rem 0.65rem; border-radius: 999px; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; }
.cx-st-live { background: #12361f; border: 1px solid #2e8f56; color: #7dffb0; }
.cx-st-next { background: var(--red); color: #fff; }
.cx-st-done { border: 1px solid var(--line); color: var(--ash); }
.cx-st-tbd { background: #3a2a08; border: 1px solid #7a5a14; color: #ffd27a; }
.cx-classes { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.5rem 0 0; padding: 0; list-style: none; }
.cx-classes li { padding: 0.1rem 0.6rem; border: 1px solid var(--line); border-radius: 999px; background: var(--panel-2); color: var(--paper); font-size: 0.74rem; font-weight: 600; }
.cx-note { margin: 0.45rem 0 0; color: var(--ash); font-size: 0.85rem; }
.cx-side { display: grid; justify-items: end; gap: 0.45rem; text-align: right; }
.cx-cd { color: var(--paper); font-size: 0.82rem; font-weight: 800; }
.cx-ev.is-next .cx-cd { color: #fff; }
.cx-link { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.3rem 0.8rem; border: 1px solid var(--line); border-radius: 999px; color: var(--paper); font-size: 0.78rem; font-weight: 600; text-decoration: none; white-space: nowrap; transition: background 0.15s, border-color 0.15s; }
.cx-link:hover { background: var(--panel-2); border-color: var(--red); }
.cx-past { margin-top: 1.2rem; }
.cx-past > summary { display: inline-flex; align-items: center; gap: 0.6rem; padding: 0.5rem 1rem; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); color: var(--ash); font-size: 0.85rem; font-weight: 700; cursor: pointer; }
.cx-past > summary:hover { border-color: var(--red); color: var(--paper); }
.cx-past > summary b { padding: 0 0.5rem; border-radius: 999px; background: rgba(255, 255, 255, 0.1); }

/* Janela da prova */
.cx-lock { overflow: hidden; }
.cx-modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.cx-modal[hidden] { display: none; }
.cx-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.74); animation: cx-fade 0.2s ease both; }
.cx-dialog { position: relative; width: min(34rem, 100%); max-height: calc(100vh - 2rem); overflow: auto; padding: 1.6rem 1.6rem 1.4rem; border: 1px solid rgba(var(--cr), 0.5); border-top: 5px solid var(--c); border-radius: 20px; background: radial-gradient(120% 90% at 100% 0%, rgba(var(--cr), 0.2), transparent 60%), var(--panel); color: var(--paper); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); }
.cx-dialog.cx-pop { animation: cx-rise 0.25s ease both; }
.cx-dialog:focus { outline: none; }
.cx-modal .cx-close { position: absolute; top: 0.8rem; right: 0.8rem; display: inline-flex; align-items: center; justify-content: center; width: 2.4rem; height: 2.4rem; padding: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.08); color: var(--paper); border: 1px solid var(--line); }
.cx-modal .cx-close:hover { background: var(--red); }
.cx-dlg-body .cx-tags { padding-right: 2.8rem; }
.cx-m-title { margin: 0.4rem 2.6rem 0.8rem 0; font-size: 1.6rem; line-height: 1.15; }
.cx-m-meta { display: grid; gap: 0.6rem; margin: 0; padding: 0; list-style: none; }
.cx-m-meta li, .cx-m-cl { display: grid; gap: 0.15rem; }
.cx-m-cl { margin-top: 0.8rem; }
.cx-m-k { color: var(--ash); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.cx-m-v { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 1.02rem; font-weight: 600; }
.cx-m-flag { display: inline-flex; }
.cx-m-act { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.1rem; }
.cx-m-act .cx-btn { margin-top: 0; }

@keyframes cx-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes cx-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes cx-pulse { 0% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0.6); } 80%, 100% { box-shadow: 0 0 0 8px rgba(61, 220, 132, 0); } }
@keyframes cx-flash { 0%, 55% { box-shadow: 0 0 0 3px var(--c), 0 0 30px rgba(var(--cr), 0.5); } 100% { box-shadow: none; } }
@media (prefers-reduced-motion: reduce) {
  .cx *, .cx-modal * { animation: none !important; transition: none !important; }
  .cx-ev:hover, .cx-bar:hover, .cx .cx-chip:hover { transform: none; }
}
@media (max-width: 720px) {
  #cal[data-vista=""] .cx-view-cal { display: none; }
  #cal[data-vista=""] .cx-view-list { display: block; }
  #cal[data-vista=""] .cx-tg-calendario:not([aria-pressed="true"]) { background: transparent; color: var(--ash); }
  #cal[data-vista=""] .cx-tg-lista { background: var(--red); color: #fff; }
  .cx-hero { grid-template-columns: minmax(0, 1fr); padding: 1.2rem 1.1rem 1.2rem 1.4rem; }
  .cx-hero .cx-classes { display: none; }
  .cx .cx-hero .cx-btn { margin-top: 0.3rem; }
  .cx-hero-cd { display: flex; align-items: baseline; justify-content: flex-start; gap: 0.7rem; min-width: 0; padding: 0.7rem 1rem; text-align: left; }
  .cx-cd-num { font-size: 2.4rem; }
  .cx-cd-unit { margin: 0; }
  .cx-controls { align-items: stretch; }
  .cx-toggle { align-self: flex-start; }
  .cx-title { font-size: 1.15rem; white-space: nowrap; }
  .cx-nav-b { width: 2.2rem; height: 2.2rem; }
  .cx-nav-m { gap: 0.4rem; }
  .cx-today { padding: 0.4rem 0.8rem; font-size: 0.8rem; }
  .cx-week { min-height: 4.4rem; }
  .cx-d { padding: 0.25rem 0.1rem; text-align: center; }
  .cx-n { min-width: 1.45rem; height: 1.45rem; font-size: 0.74rem; }
  .cx-evs { padding: 1.85rem 0.12rem 0.2rem; }
  .cx-bar { justify-content: center; margin: 0 0.06rem 0.2rem; padding: 0.2rem 0.1rem; border-left-width: 1px; }
  .cx-bar .cx-nm { display: none; }
  
  .cx-agenda { display: block; }
  .cx-ev { grid-template-columns: 4.4rem minmax(0, 1fr); padding: 0.85rem 0.9rem; }
  .cx-dd { font-size: 1.2rem; }
  .cx-side { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 0.5rem; text-align: left; }
  .cx-name { font-size: 1.08rem; }
  .cx-dialog { padding: 1.3rem 1.1rem 1.1rem; }
  .cx-m-title { font-size: 1.35rem; }
}

/* Cores das competições (palette em app/calendar_front.php) */
.cc0 { --c: #ff4d57; --cr: 255,77,87; }
.cc1 { --c: #ffb020; --cr: 255,176,32; }
.cc2 { --c: #38bdf8; --cr: 56,189,248; }
.cc3 { --c: #34d399; --cr: 52,211,153; }
.cc4 { --c: #a78bfa; --cr: 167,139,250; }
.cc5 { --c: #f472b6; --cr: 244,114,182; }
.cc6 { --c: #a3e635; --cr: 163,230,53; }
.cc7 { --c: #fb923c; --cr: 251,146,60; }
.cx-past > summary { list-style: none; }
.cx-past > summary::-webkit-details-marker { display: none; }
.cx-past > summary::after { content: ""; width: 0.5rem; height: 0.5rem; margin-left: 0.2rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform 0.2s; }
.cx-past[open] > summary::after { transform: translateY(1px) rotate(225deg); }
