/* bet-academy.fun — docs template. Change only this :root block to restyle. */
:root {
  --primary: #c2410c;
  --accent: #2563eb;
  --bg: #fffaf5;
  --surface: #f8f3ee;
  --surface-2: #f2ece7;
  --text: #1f1308;
  --muted: #746a62;
  --border: #e4ded9;
  --link: #c2410c;
  --font-head: "Baloo 2", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16.5px/1.7 var(--font-body); }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.25; margin: 0 0 .5em; }

.hdr { position: sticky; top: 0; z-index: 10; background: var(--bg); border-bottom: 1px solid var(--border); }
.hdr-in { max-width: 1240px; margin: 0 auto; padding: 0 24px; height: 62px; display: flex; align-items: center; gap: 28px; }
.hdr .logo img { height: 30px; width: auto; }
.hdr nav { display: flex; gap: 22px; margin-left: auto; font-size: 15px; font-weight: 600; }
.hdr nav a { color: var(--text); }
.hdr .badge { font-size: 12px; font-weight: 700; color: var(--primary); border: 1px solid var(--primary); border-radius: 6px; padding: 3px 8px; white-space: nowrap; }

.layout { max-width: 1240px; margin: 0 auto; padding: 0 24px; display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 48px; }
.sidebar { position: sticky; top: 62px; align-self: start; height: calc(100vh - 62px); overflow-y: auto; padding: 28px 0; border-right: 1px solid var(--border); }
.sidebar h4 { font: 700 12px/1 var(--font-head); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 0 0 12px; }
.sidebar ul { list-style: none; margin: 0 0 26px; padding: 0; }
.sidebar li a { display: block; padding: 6px 12px; margin-left: -12px; border-radius: 6px; color: var(--text); font-size: 15px; }
.sidebar li a:hover { background: var(--surface); text-decoration: none; }
.sidebar li a.on { background: var(--surface-2); color: var(--link); font-weight: 600; }

.page { padding: 36px 0 72px; min-width: 0; }
.hero-doc { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 36px 40px; margin-bottom: 34px; }
.hero-doc h1 { font-size: clamp(30px, 4.5vw, 44px); }
.hero-doc p { color: var(--muted); font-size: 19px; margin: 0; max-width: 620px; }

.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-bottom: 38px; }
.cards .c { border: 1px solid var(--border); border-radius: 12px; padding: 22px 24px; background: var(--bg); }
.cards .c h3 { font-size: 19px; margin-bottom: 6px; }
.cards .c h3::before { content: "→ "; color: var(--primary); }
.cards .c p { color: var(--muted); margin: 0; font-size: 15px; }
.section-h { font-size: 22px; border-bottom: 1px solid var(--border); padding-bottom: 10px; margin: 8px 0 14px; }
.guides { list-style: none; margin: 0 0 36px; padding: 0; }
.guides li { padding: 12px 0; border-bottom: 1px dashed var(--border); }
.guides li a { font-weight: 600; font-size: 17px; }
.guides li span { display: block; color: var(--muted); font-size: 14px; }
.empty { color: var(--muted); padding: 10px 0 30px; }

.article-grid { display: grid; grid-template-columns: minmax(0, 1fr) 200px; gap: 40px; }
.doc-title h1 { font-size: clamp(30px, 4.5vw, 42px); }
.doc-title .dek { color: var(--muted); font-size: 19px; margin: 0 0 10px; }
.meta { color: var(--muted); font-size: 14px; margin-bottom: 26px; }
.toc { position: sticky; top: 90px; align-self: start; font-size: 14px; border-left: 2px solid var(--border); padding-left: 14px; }
.toc b { display: block; margin-bottom: 8px; font-family: var(--font-head); }
.toc a { display: block; color: var(--muted); padding: 3px 0; }
.prose h2 { font-size: 26px; margin-top: 1.7em; padding-top: .3em; }
.prose h3 { font-size: 20px; margin-top: 1.4em; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.15em; }
.prose code { background: var(--surface-2); padding: 2px 6px; border-radius: 5px; font-size: .9em; }
.prose .tip, .prose .warn { border-radius: 10px; padding: 16px 20px; margin: 1.5em 0; border: 1px solid var(--border); }
.prose .tip { background: var(--surface); border-left: 4px solid var(--primary); }
.prose .warn { background: var(--surface); border-left: 4px solid var(--accent); }
.table-wrap { overflow-x: auto; margin: 0 0 1.4em; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border: 1px solid var(--border); }
.prose th { background: var(--surface); font-family: var(--font-head); }

.ftr { border-top: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: 14px; }
.ftr-in { max-width: 1240px; margin: 0 auto; padding: 28px 24px 40px; }
.ftr nav { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 12px; }
.ftr a { color: var(--muted); }

@media (max-width: 1000px) {
  .article-grid { grid-template-columns: minmax(0, 1fr); }
  .toc { display: none; }
}
@media (max-width: 820px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 0 16px; }
  .sidebar { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--border); padding: 16px 0 4px; }
  .sidebar ul { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 12px; }
  .sidebar li a { white-space: nowrap; margin-left: 0; background: var(--surface); }
  .hdr-in { padding: 0 16px; gap: 14px; }
  .hdr .badge { display: none; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .hero-doc { padding: 26px 22px; }
}

/* Spanish nav labels are longer: keep them on one line, drop "Artículos" on small phones */
.hdr nav a { white-space: nowrap; }
@media (max-width: 480px) { .hdr nav a:first-child { display: none; } }

/* Long words and URLs wrap instead of widening the page on phones */
h1, h2, h3, p, li, td, th, dd, blockquote { overflow-wrap: break-word; }

/* ===== SITE IDENTITY: Bet Academy — playful academy ===== */
:root { --blue-50: #eff4ff; --orange-50: #fff1e6; --r: 22px; }
h1, h2, h3 { font-weight: 800; letter-spacing: -.01em; }
.hdr { border-bottom: 0; box-shadow: 0 3px 0 var(--orange-50); }
.hdr .badge { background: var(--accent); color: #fff; border: 0; border-radius: 999px; padding: 5px 12px; }
.sidebar h4 { color: var(--accent); }
.sidebar ul:first-of-type { counter-reset: mod; }
.sidebar ul:first-of-type li a { counter-increment: mod; display: flex; gap: 10px; align-items: center; }
.sidebar ul:first-of-type li a::before { content: counter(mod); flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--orange-50); color: var(--primary); font: 800 13px/24px var(--font-head); text-align: center; }
@media (max-width: 820px) {
  .sidebar ul { flex-wrap: wrap; overflow: visible; margin-bottom: 8px; }
  .sidebar li a { padding: 5px 10px; font-size: 14px; }
  .sidebar ul:first-of-type li a { gap: 8px; }
  .sidebar ul:first-of-type li a::before { width: 20px; height: 20px; font-size: 12px; line-height: 20px; }
  /* about + contact are already in the header and footer */
  .sidebar ul ~ h4, .sidebar ul ~ ul li:not(:first-child) { display: none; }
}
.ba-hero { border: 0; border-radius: var(--r); position: relative;
  background: radial-gradient(circle at 92% 18%, rgba(37, 99, 235, .16), transparent 32%), radial-gradient(circle at 8% 115%, rgba(194, 65, 12, .16), transparent 40%), #fff;
  box-shadow: 0 20px 40px -30px rgba(31, 19, 8, .45); }
.ba-level { display: inline-block; background: var(--orange-50); color: var(--primary); font: 800 13px/1 var(--font-body); padding: 8px 12px; border-radius: 999px; margin-bottom: 14px; }
.ba-hero h1 { font-size: clamp(34px, 5vw, 54px); }
.ba-steps { display: flex; gap: 12px; margin-top: 24px; }
.ba-steps span { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font: 800 18px/1 var(--font-head); color: #fff; background: var(--primary); box-shadow: 0 6px 0 #9a3412; }
.ba-steps span:nth-child(2) { background: var(--accent); box-shadow: 0 6px 0 #1e40af; }
.ba-steps span:nth-child(3) { background: #16a34a; box-shadow: 0 6px 0 #166534; }
.ba-steps span:nth-child(4) { background: #9333ea; box-shadow: 0 6px 0 #6b21a8; }
.ba-cards .c { border: 0; border-radius: var(--r); padding: 22px 24px 24px; background: #fff; box-shadow: 0 1px 0 var(--border), 0 14px 30px -24px rgba(31, 19, 8, .45); transition: transform .15s; }
.ba-cards .c:hover { transform: translateY(-3px); text-decoration: none; }
.ba-cards .c h3::before { content: none; }
.ba-tag { display: inline-block; font: 800 12px/1 var(--font-body); color: var(--accent); background: var(--blue-50); padding: 6px 10px; border-radius: 999px; margin-bottom: 10px; }
.ba-cards .c:nth-child(even) .ba-tag { color: var(--primary); background: var(--orange-50); }
.section-h { border-bottom: 3px dotted var(--border); }
.guides li { border-bottom: 0; background: #fff; border-radius: 14px; padding: 14px 18px; margin-bottom: 10px; box-shadow: 0 1px 0 var(--border); }
.guides li a { color: var(--text); }
.guides li a:hover { color: var(--primary); }
.ba-rg { color: var(--muted); font-size: 14.5px; }

.doc-title .ba-tag { margin-bottom: 12px; }
.prose h2 { color: var(--primary); }
.prose .tip { border: 0; border-radius: 16px; background: var(--blue-50); border-left: 6px solid var(--accent); }
.prose .warn { border: 0; border-radius: 16px; background: var(--orange-50); border-left: 6px solid var(--primary); }
.prose .tip p:last-child, .prose .warn p:last-child { margin-bottom: 0; }
.prose th { background: var(--orange-50); }
.prose td { font-variant-numeric: tabular-nums; }
.toc { border-left-color: var(--orange-50); }
.sources { font-size: 15px; }

/* ===== TOOLS + READ NEXT (shared, uses the site's colours) ===== */
.tool { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px 22px; margin: 1.2em 0 1.6em; }
.tool-h { font-size: 17px; margin: 4px 0 12px; }
.tool-h ~ .tool-h { margin-top: 20px; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.tool-grid.two { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.tool label, .tool legend { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; color: var(--muted); font-family: var(--font-body); }
.tool input, .tool textarea { font: 400 16px/1.4 var(--font-body); color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; width: 100%; min-width: 0; }
.tool textarea { resize: vertical; }
.tool select { font: 400 16px/1.4 var(--font-body); color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; width: 100%; }
.tool input:focus, .tool textarea:focus { outline: 2px solid var(--link); outline-offset: 1px; }
.tool input.bad, .tool textarea.bad { border-color: #dc2626; background: #fef2f2; color: #7f1d1d; }
.tool fieldset { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px 14px; margin: 0; min-width: 0; }
.tool legend { padding: 0 6px; color: var(--text); }
.tool-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.tool button { font: 600 15px/1 var(--font-body); border: 0; border-radius: 8px; padding: 11px 16px; background: var(--primary); color: #fff; cursor: pointer; }
.tool button.secondary { background: transparent; color: var(--link); box-shadow: inset 0 0 0 1.5px var(--link); }
.tool-result { margin-top: 16px; }
.tool-result .table-wrap { margin-bottom: 0; }
.tool-big { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 0 0 14px; }
.tool-big > div { background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; }
.tool-big b { display: block; font: 700 26px/1.15 var(--font-head); color: var(--text); font-variant-numeric: tabular-nums; }
.tool-big span { display: block; font-size: 13px; line-height: 1.4; color: var(--muted); }
.tool-big .up { color: #b91c1c; } .tool-big .down { color: #047857; }
.tool-note { font-size: 14px; color: var(--muted); margin: 10px 0 0; }
.tool-verdict { font-weight: 600; margin: 0 0 12px; }
.tool .bar { display: block; height: 6px; margin-top: 4px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.tool .bar i { display: block; height: 100%; background: var(--primary); }
.tool td b { color: var(--text); }
.sg-matches { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 8px 16px; }
.sg-match { display: grid; grid-template-columns: 1fr 52px 14px 52px 1fr; align-items: center; gap: 6px; font-size: 14px; }
.sg-match span:first-child { text-align: right; }
.sg-match input { text-align: center; padding: 8px 4px; }
.sg-match em { text-align: center; color: var(--muted); font-style: normal; }
.sg-table td:last-child { font-weight: 600; white-space: nowrap; }
.cp-teams { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.cp-teams fieldset .tool-grid { grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 10px; }

.tool-teaser { display: flex; align-items: center; gap: 16px; margin: 20px 0 6px; padding: 16px 20px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none; }
.tool-teaser:hover { border-color: var(--link); text-decoration: none; }
.tool-teaser .ico { flex: none; width: 46px; height: 46px; border-radius: 10px; background: var(--primary); color: #fff; display: grid; place-items: center; font: 700 17px/1 var(--font-head); }
.tool-teaser b { display: block; font-family: var(--font-head); font-size: 19px; line-height: 1.25; }
.tool-teaser .t { display: block; color: var(--muted); font-size: 15px; line-height: 1.45; }
.tool-teaser::after { content: "→"; margin-left: auto; padding-left: 8px; color: var(--link); font-size: 22px; }
@media (max-width: 480px) {
  .tool-teaser { gap: 12px; padding: 14px 16px; align-items: flex-start; }
  .tool-teaser::after { display: none; }
  .tool-teaser .ico { width: 40px; height: 40px; font-size: 15px; }
  .tool-teaser b { font-size: 17px; }
}

.related { margin: 40px 0 8px; padding-top: 22px; border-top: 2px solid var(--border); }
.prose .related-h { font-size: 20px; margin: 0 0 8px; padding: 0; border: 0; text-transform: none; }
.prose .related-h::before, .prose .related-h::after { content: none; }
.related-list { list-style: none; padding: 0; margin: 0 0 18px; }
.related-list li { padding: 9px 0; border-bottom: 1px dashed var(--border); line-height: 1.4; }
.related-list a { font-weight: 600; }
.related-list span { color: var(--muted); font-size: 14px; }
.tool-cta { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--accent); color: var(--text); text-decoration: none; }
.tool-cta:hover { text-decoration: none; border-color: var(--link); }
.tool-cta b { font-family: var(--font-head); font-size: 18px; }
.tool-cta b::after { content: " →"; color: var(--link); }
.tool-cta span { color: var(--muted); font-size: 15px; }

/* breadcrumbs + section pages */
.trail { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 26px 0 -4px; font-size: 14px; color: var(--muted); font-family: var(--font-body); }
.trail a { color: var(--muted); text-decoration: none; }
.trail a:hover { color: var(--link); text-decoration: underline; }
.trail .sep { opacity: .55; }
.trail + .article-head, .trail + .page-head, .trail + .post-head, .trail + .entry-head { padding-top: 22px; }
.trail + .doc-title { margin-top: 18px; }
.prose:has(+ .hub-body) { padding-bottom: 0; }
.hub-body { margin: 6px 0 56px; }
.hub-h { font-size: 22px; margin: 30px 0 14px; }
.hub-empty { color: var(--muted); font-style: italic; padding: 10px 0; }
.hub-body .tool-cta { margin-top: 26px; }
.prose figure.chart { margin: 1.7em 0; }
.prose figure.chart img { display: block; width: 100%; max-width: 560px; height: auto; margin: 0 auto; border-radius: 10px; border: 1px solid var(--border); }
.prose figure.chart figcaption { max-width: 560px; margin: 8px auto 0; font-size: 14px; line-height: 1.45; color: var(--muted); }
