/* CKSL App — visual-only companion to www.cksl.com.br (same palette) */
:root {
  --bg: #0b0b0d;
  --surface: #141418;
  --surface-2: #1c1c22;
  --line: rgba(255, 255, 255, .09);
  --text: #f4f4f6;
  --muted: #9a9aa6;
  --accent: #e3161d;
  --accent-dark: #a70f14;
  --yt: #ff0033;
  --gold: #ffcc33;
  --silver: #c9d1dc;
  --bronze: #d58a52;
  --radius: 14px;
  --head: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --top: 56px;
  --bar: 62px;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 400 15px/1.5 var(--body); -webkit-font-smoothing: antialiased; overscroll-behavior-y: contain; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--head); text-transform: uppercase; letter-spacing: .01em; line-height: 1.05; margin: 0 0 .4em; font-weight: 800; }
h1 { font-size: 2rem; } h2 { font-size: 1.35rem; } h3 { font-size: 1.15rem; }
p { margin: 0 0 .9em; }
.muted { color: var(--muted); }

/* ---------- barras ---------- */
.topbar { position: fixed; top: 0; left: 0; right: 0; z-index: 20; height: calc(var(--top) + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 16px 0; display: flex; align-items: center; justify-content: space-between; background: rgba(11, 11, 13, .88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: baseline; gap: 10px; }
.brand b { font: 800 1.7rem/1 var(--head); letter-spacing: .04em; color: var(--text); border-bottom: 3px solid var(--accent); padding-bottom: 1px; }
.brand span { font-size: .78rem; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.status-pill { font: 600 .68rem/1 var(--body); letter-spacing: .06em; text-transform: uppercase; padding: 6px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.status-pill.warn { background: rgba(255, 204, 51, .14); color: var(--gold); }

.tabbar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; display: grid; grid-template-columns: repeat(6, 1fr); height: calc(var(--bar) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: rgba(11, 11, 13, .94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: .62rem; font-weight: 600; letter-spacing: .01em; min-width: 0; }
.tabbar svg { width: 22px; height: 22px; fill: currentColor; }
.tabbar a[aria-current="page"] { color: var(--text); }
.tabbar a[aria-current="page"] svg { fill: var(--accent); }

main { padding: calc(var(--top) + env(safe-area-inset-top) + 16px) 16px calc(var(--bar) + env(safe-area-inset-bottom) + 24px); max-width: 720px; margin: 0 auto; outline: none; }
.loading { color: var(--muted); text-align: center; padding: 60px 0; }
.section { margin-top: 26px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.section-head h2 { margin: 0; }
.section-head small { color: var(--muted); font-size: .8rem; }

/* ---------- cartões / botões ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 18px; border-radius: 10px; font-weight: 700; font-size: .95rem; border: 1px solid transparent; }
.btn svg { width: 18px; height: 18px; fill: currentColor; }
.btn-yt { background: var(--yt); color: #fff; }
.btn-ghost { border-color: var(--line); background: transparent; }
.btn-block { display: flex; width: 100%; }
.eyebrow { display: inline-block; font: 700 .7rem/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.kart { display: inline-grid; place-items: center; min-width: 30px; height: 22px; padding: 0 6px; border-radius: 5px; background: #fff; color: #111; font: 800 .9rem/1 var(--head); }

/* ---------- início ---------- */
.hero { padding: 6px 0 4px; }
.hero h1 span { color: var(--accent); }
.hero p { color: #cfcfd6; margin: 0; }
.next-card { background: linear-gradient(160deg, rgba(227, 22, 29, .24), rgba(20, 20, 24, .94) 60%); border-color: rgba(227, 22, 29, .38); }
.next-card h2 { font-size: 1.8rem; margin-bottom: 4px; }
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 16px 0; }
.countdown div { background: rgba(0, 0, 0, .35); border-radius: 10px; padding: 10px 2px; text-align: center; }
.countdown b { display: block; font: 800 1.9rem/1 var(--head); font-variant-numeric: tabular-nums; }
.countdown span { font-size: .66rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { text-align: center; padding: 14px 6px; }
.stat b { display: block; font: 800 2rem/1 var(--head); }
.stat span { font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.leaders { display: grid; gap: 10px; }
.leader { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 12px; }
.leader .cat { grid-column: 1 / -1; font: 700 .7rem/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.leader .name { font: 800 1.5rem/1.05 var(--head); text-transform: uppercase; }
.leader .pts { font: 800 2rem/1 var(--head); text-align: right; }
.leader .pts small { font-size: .8rem; color: var(--muted); margin-left: 3px; }
.leader .gap { grid-column: 1 / -1; font-size: .82rem; color: var(--muted); }
.champs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.champ { display: inline-flex; align-items: center; gap: 8px; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: .82rem; }
.champ i { font: 700 .62rem/1 var(--body); text-transform: uppercase; letter-spacing: .08em; padding: 3px 7px; border-radius: 999px; background: var(--accent); }
.champ.soon i { background: var(--surface-2); color: var(--muted); }

/* ---------- abas (chips) ---------- */
.chips { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 10px; margin: 0 -16px 8px; padding-inline: 16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 9px 15px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font: 600 .88rem/1 var(--body); }
.chip[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip:disabled { opacity: .4; }
.chips.small .chip { padding: 7px 12px; font-size: .8rem; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg button { padding: 8px 12px; background: transparent; border: 0; color: var(--muted); font: 600 .8rem/1 var(--body); }
.seg button[aria-pressed="true"] { background: var(--surface-2); color: var(--text); }
/* seletor de campeonato na tela Ranking (F4 Super / Norte Maranhense) */
.seg-camp { display: flex; width: 100%; margin: 0 0 12px; }
.seg-camp button { flex: 1; display: grid; gap: 4px; padding: 10px 8px; font-size: .9rem; text-align: center; }
.seg-camp button small { font: 500 .66rem/1 var(--body); letter-spacing: .04em; color: var(--muted); }
.seg-camp button[aria-pressed="true"] { box-shadow: inset 0 -2px 0 var(--accent); }
.camp-info { font-size: .8rem; margin: -4px 0 10px; }
a.champ { color: inherit; text-decoration: none; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 4px 0 12px; }
.note { font-size: .84rem; color: var(--muted); border-left: 3px solid var(--accent); padding: 2px 0 2px 12px; margin: 0 0 14px; }

/* ---------- classificação: lista ---------- */
.rank { display: grid; gap: 8px; }
.row { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.row summary { list-style: none; display: grid; grid-template-columns: 38px 1fr auto auto; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; }
.row summary::-webkit-details-marker { display: none; }
.row .pos { font: 800 1.3rem/1 var(--head); text-align: center; }
.row.p1 .pos { color: var(--gold); } .row.p2 .pos { color: var(--silver); } .row.p3 .pos { color: var(--bronze); }
.row .pilot { font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .total { font: 800 1.5rem/1 var(--head); text-align: right; min-width: 38px; }
.row .total small { font-size: .65rem; color: var(--muted); display: block; font-family: var(--body); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; text-align: right; }
.row[open] { border-color: rgba(227, 22, 29, .4); }
.detail { padding: 4px 14px 14px; border-top: 1px solid var(--line); }
.detail h4 { font: 700 .68rem/1 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 12px 0 8px; }
.bats { display: flex; flex-wrap: wrap; gap: 6px; }
.bat { min-width: 44px; padding: 6px 8px; border-radius: 8px; background: var(--surface-2); text-align: center; font: 700 .95rem/1.1 var(--head); }
.bat small { display: block; font: 600 .58rem/1 var(--body); color: var(--muted); letter-spacing: .06em; text-transform: uppercase; margin-bottom: 3px; }
.bat.win { color: var(--gold); }
.bat.desc { color: #6b6b78; text-decoration: line-through; text-decoration-color: var(--accent); }
.bat.nc { color: #5f5f6b; } .bat.dc { color: #ff6b6b; }
.bat.inf { color: #ff5a5a; }
.bonus { display: inline-block; font: 700 .6rem/1 var(--body); color: #111; background: var(--gold); border-radius: 4px; padding: 1px 4px; margin-left: 3px; vertical-align: 2px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .76rem; color: var(--muted); margin-top: 14px; }

/* ---------- classificação: tabela completa ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); -webkit-overflow-scrolling: touch; }
table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: .85rem; }
th, td { padding: 10px 9px; text-align: center; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface); }
th { font: 600 .64rem/1 var(--body); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); background: var(--surface-2); }
th.etapa-head { color: var(--text); border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }
td.left, th.left { text-align: left; }
td.pos, th.pos { position: sticky; left: 0; z-index: 2; width: 38px; min-width: 38px; padding-inline: 6px; }
td.pos { font: 800 1.05rem/1 var(--head); }
td.pilot, th.pilot { position: sticky; left: 38px; z-index: 2; max-width: 96px; overflow: hidden; text-overflow: ellipsis; font-weight: 700; box-shadow: 6px 0 8px -6px rgba(0, 0, 0, .7); }
.p1 td.pos { color: var(--gold); } .p2 td.pos { color: var(--silver); } .p3 td.pos { color: var(--bronze); }
td.total { font: 800 1.15rem/1 var(--head); color: #fff; }
.cell-win { color: var(--gold); font-weight: 700; }
.cell-inf { color: #ff5a5a; font-weight: 700; }
.cell-desc { color: #6b6b78; text-decoration: line-through; text-decoration-color: var(--accent); }
.cell-nc, .cell-dc { color: #5f5f6b; font-size: .72rem; font-weight: 600; } .cell-dc { color: #ff6b6b; }

/* ---------- calendário ---------- */
.cal-list { display: grid; gap: 10px; }
.cal-item { display: grid; grid-template-columns: 64px 1fr; gap: 14px; align-items: center; }
.cal-item.is-next { border-color: rgba(227, 22, 29, .55); }
.cal-date { text-align: center; background: var(--surface-2); border-radius: 10px; padding: 8px 4px; }
.cal-date b { display: block; font: 800 1.8rem/1 var(--head); }
.cal-date span { font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.cal-item h3 { margin: 0 0 2px; }
.cal-item .meta { font-size: .84rem; color: var(--muted); }
.status { display: inline-block; margin-top: 8px; font: 700 .64rem/1 var(--body); text-transform: uppercase; letter-spacing: .08em; padding: 5px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.status.proxima { background: var(--accent); color: #fff; }
.status.realizada { background: rgba(48, 209, 88, .15); color: #4ade80; }

/* ---------- ao vivo ---------- */
.video { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; border: 1px solid var(--line); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.cal-video { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-weight: 700; font-size: .86rem; color: var(--yt); }
.cal-video svg { width: 18px; height: 18px; fill: currentColor; flex: none; }
.gravadas { list-style: none; margin: 0; padding: 4px 0; }
.gravadas li + li { border-top: 1px solid var(--line); }
.gravadas a { display: flex; align-items: center; gap: 12px; padding: 12px 16px; min-height: 48px; }
.gravadas svg { width: 26px; height: 26px; fill: var(--yt); flex: none; }
.gravadas span { display: grid; min-width: 0; }
.gravadas small { color: var(--muted); }
.badge { display: inline-flex; align-items: center; gap: 8px; background: var(--yt); color: #fff; font: 700 .7rem/1 var(--body); letter-spacing: .12em; text-transform: uppercase; padding: 7px 10px; border-radius: 6px; margin-bottom: 12px; }
.agenda { margin: 0; padding-left: 18px; color: #d6d6dc; }
.agenda li { margin-bottom: 4px; }
.stack { display: grid; gap: 10px; margin-top: 12px; }

/* ---------- parceiros ---------- */
.tier { margin-bottom: 22px; }
.tier h3 { font-size: .95rem; color: var(--muted); letter-spacing: .12em; }
.partners { display: grid; gap: 10px; grid-template-columns: repeat(2, 1fr); }
.partners.master { grid-template-columns: 1fr; }
.partner { display: grid; place-items: center; background: #fff; border-radius: 12px; padding: 14px; min-height: 96px; }
.partners.master .partner { min-height: 130px; }
.partner img { max-height: 76px; width: auto; max-width: 100%; object-fit: contain; }
.partners.master .partner img { max-height: 100px; }
.partner.empty { background: transparent; border: 2px dashed rgba(255, 255, 255, .16); color: var(--muted); text-align: center; font-size: .82rem; }
.partner.empty b { display: block; color: var(--text); font: 700 1.05rem/1.1 var(--head); text-transform: uppercase; }
.cotas { display: grid; gap: 10px; }
.cotas ul { margin: 8px 0 0; padding-left: 18px; color: #d6d6dc; font-size: .9rem; }
.cotas .master { border-color: rgba(255, 204, 51, .45); }
.cotas .master .eyebrow { color: var(--gold); }
.contact { display: grid; gap: 8px; margin-top: 10px; }
.contact a { display: flex; justify-content: space-between; padding: 13px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-weight: 600; }
.contact a span { color: var(--muted); font-weight: 400; font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-left: 12px; }
.addr { font-size: .8rem; color: var(--muted); margin-top: 22px; }

@media (min-width: 720px) {
  .partners { grid-template-columns: repeat(3, 1fr); }
}
@media (prefers-reduced-motion: reduce) { .dot { animation: none; } }

/* ---------- instalar ---------- */
.btn-primary { background: var(--accent); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.install-hero { display: grid; grid-template-columns: 96px 1fr; gap: 16px; align-items: center; margin-bottom: 18px; }
.install-hero img { border-radius: 22px; border: 1px solid var(--line); }
.install-hero h1 { font-size: 1.8rem; margin-bottom: 6px; }
.install-hero h1 span { color: var(--accent); }
.install-hero p { margin: 0; font-size: .9rem; }
.install-steps { display: grid; gap: 12px; margin: 18px 0; }
.install-os h2 { font-size: 1.3rem; margin-bottom: 8px; }
.install-os ol { margin: 0; padding-left: 20px; color: #d6d6dc; }
.install-os li { margin-bottom: 6px; }
.install-os.is-mine { border-color: rgba(227, 22, 29, .5); }

/* telemetria: a página do site ocupa todo o espaço entre a barra de cima e a de baixo */
body.tela-cheia main { max-width: none; padding: calc(var(--top) + env(safe-area-inset-top)) 0 calc(var(--bar) + env(safe-area-inset-bottom)); }
.tele-frame { display: block; width: 100%; height: calc(100vh - var(--top) - var(--bar) - env(safe-area-inset-top) - env(safe-area-inset-bottom)); height: calc(100dvh - var(--top) - var(--bar) - env(safe-area-inset-top) - env(safe-area-inset-bottom)); border: 0; background: var(--bg); }
.cotas .price { margin: 6px 0 0; color: var(--muted); font-size: .85rem; }
.cotas .price b { font: 800 1.6rem/1 var(--head); color: var(--text); }
.cotas .price span { display: block; margin-top: 2px; }
.termos-link { display: inline-block; margin-top: 12px; color: var(--text); text-decoration: underline; text-underline-offset: 3px; font-size: .9rem; }

/* telemetria e parceiros: chamada para wendellfreitas.com */
.card.mudou { border-color: rgba(227, 241, 42, .45); background: linear-gradient(150deg, rgba(227, 241, 42, .12), var(--surface) 60%); }
.card.mudou .eyebrow { color: #e3f12a; }
.card.mudou p { margin: 8px 0 16px; color: #d6d6dc; }
.btn-mudou { background: #e3f12a; color: #14160a; }
