/* matbetguatemala.com — Tablero */
:root {
  --navy: #0c2d64;
  --navy-mid: #092350;
  --navy-deep: #031533;
  --green: #389d52;
  --green-ink: #26753c;
  --green-soft: #7fd394;
  --paper: #f3f5f9;
  --line: #d8deea;
  --ink: #17223e;
  --muted: #4d5874;
  --frame: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: "Lexend", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; }
a { color: var(--green-ink); }
strong { font-weight: 600; }

.Frame { max-width: var(--frame); margin: 0 auto; padding: 0 24px; }
.SkipLink { position: absolute; left: -9999px; top: 0; }
.SkipLink:focus { left: 16px; top: 8px; z-index: 50; background: #fff; color: var(--navy); padding: 8px 12px; }

/* ---------- header ---------- */
.SiteHeader {
  position: sticky; top: 0; z-index: 30;
  background: var(--navy);
  border-bottom: 3px solid var(--green);
}
.SiteHeader .Frame { display: flex; align-items: center; justify-content: space-between; height: 74px; gap: 24px; }
.BrandMark { display: block; flex: none; line-height: 0; }
.BrandMark img { width: 168px; height: 35px; display: block; }
.SiteNav { display: flex; align-items: center; gap: 22px; }
.SiteNav ul { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.SiteNav li a {
  position: relative; display: block;
  padding: 12px 12px 14px;
  color: #fff; text-decoration: none;
  font-size: 15px; font-weight: 400; letter-spacing: .01em;
}
.SiteNav li a::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 4px; height: 6px;
  background: conic-gradient(var(--green) 25%, #fff 0 50%, var(--green) 0 75%, #fff 0) 0 0 / 6px 6px;
  transform: scaleX(0); transform-origin: left; transition: transform .22s ease;
}
.SiteNav li a:hover::after,
.SiteNav li a:focus-visible::after,
.SiteNav li a[aria-current]::after { transform: scaleX(1); }
.MenuToggle {
  display: none; width: 46px; height: 46px; padding: 0;
  background: transparent; border: 2px solid rgba(255,255,255,.35); border-radius: 2px;
  cursor: pointer; align-items: center; justify-content: center; flex-direction: column; gap: 5px;
}
.MenuToggle span { display: block; width: 20px; height: 2px; background: #fff; transition: transform .2s, opacity .2s; }
.MenuToggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.MenuToggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.MenuToggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.VisuallyHidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- buttons ---------- */
.PlayButton {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--green); color: #fff; text-decoration: none;
  font-weight: 600; font-size: 16px; line-height: 1;
  padding: 15px 24px; border-radius: 2px;
  transition: background .2s, transform .2s;
}
.PlayButton:hover { background: var(--green-ink); transform: translateY(-1px); }
.PlayButton svg { width: 18px; height: 18px; flex: none; }
.PlayButton.IsCompact { padding: 11px 18px; font-size: 15px; }

/* ---------- home opening ---------- */
.OpeningBlock { position: relative; overflow: hidden; background: var(--paper); padding: 64px 0 56px; }
.OpeningBlock::before {
  content: ""; position: absolute; inset: 0;
  background: conic-gradient(var(--navy) 25%, transparent 0 50%, var(--navy) 0 75%, transparent 0) 0 0 / 64px 64px;
  opacity: .06;
  -webkit-mask-image: linear-gradient(100deg, transparent 35%, #000 85%);
          mask-image: linear-gradient(100deg, transparent 35%, #000 85%);
}
.OpeningBlock .Frame { position: relative; }
.KingPiece { position: absolute; right: 40px; top: -24px; width: 190px; height: 304px; opacity: .14; pointer-events: none; }
.Kicker {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 0 0 14px; font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--green-ink);
}
.Kicker::before {
  content: ""; width: 16px; height: 16px; flex: none;
  background: conic-gradient(var(--green) 25%, var(--navy) 0 50%, var(--green) 0 75%, var(--navy) 0) 0 0 / 8px 8px;
}
.OpeningBlock h1 {
  margin: 0; max-width: 880px;
  font-size: clamp(32px, 4.6vw, 54px); line-height: 1.12; font-weight: 700; letter-spacing: -.02em;
  color: var(--navy);
}
.BrandWord { color: var(--green-ink); }
.OpeningLead { max-width: 760px; margin-top: 20px; font-size: 19px; color: var(--muted); }
.OpeningLead p { margin: 0; }
.OpeningActions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-top: 28px; }
.OpeningActions small { color: var(--muted); font-size: 14px; }

/* ---------- board ---------- */
.BoardFrame { position: relative; margin-top: 48px; padding: 12px; background: var(--navy-deep); box-shadow: 0 24px 48px -28px rgba(3,21,51,.55); }
.BoardGrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.BoardCell {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 18px;
  min-height: 178px; padding: 20px 22px 18px;
  background: #fff; color: var(--navy); text-decoration: none;
  transition: box-shadow .2s, background .2s;
}
.BoardGrid > .BoardCell:nth-child(1),
.BoardGrid > .BoardCell:nth-child(3),
.BoardGrid > .BoardCell:nth-child(6),
.BoardGrid > .BoardCell:nth-child(8) { background: var(--navy); color: #fff; }
.BoardCell:hover, .BoardCell:focus-visible { box-shadow: inset 0 0 0 4px var(--green); outline: none; }
.CellSquare { font-size: 12px; font-weight: 600; letter-spacing: .08em; color: var(--green-ink); }
.BoardGrid > .BoardCell:nth-child(1) .CellSquare,
.BoardGrid > .BoardCell:nth-child(3) .CellSquare,
.BoardGrid > .BoardCell:nth-child(6) .CellSquare,
.BoardGrid > .BoardCell:nth-child(8) .CellSquare { color: var(--green-soft); }
.CellName { display: block; font-size: 22px; font-weight: 600; line-height: 1.2; }
.CellFact { display: block; margin-top: 6px; font-size: 14.5px; line-height: 1.45; opacity: .82; }
.CellMove { align-self: flex-end; font-size: 20px; line-height: 1; transition: transform .2s; }
.BoardCell:hover .CellMove { transform: translateX(4px); }
.CellAge { font-size: 46px; font-weight: 700; line-height: 1; color: var(--green); }
.BoardFiles { display: grid; grid-template-columns: repeat(4, 1fr); padding: 8px 0 0; color: #8fa1c6; font-size: 12px; text-align: center; letter-spacing: .2em; }

/* ---------- article ---------- */
.ArticleBody { display: block; }
.ArticleHead { position: relative; background: var(--navy); color: #fff; padding: 40px 0 52px; overflow: hidden; }
.ArticleHead::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 12px;
  background: conic-gradient(var(--green) 25%, var(--navy-deep) 0 50%, var(--green) 0 75%, var(--navy-deep) 0) 0 0 / 12px 12px;
}
.ArticleHead .KingPiece { right: 24px; top: 18px; width: 150px; height: 240px; opacity: .16; filter: brightness(3.2); }
.ArticleHead .Kicker { color: var(--green-soft); }
.ArticleHead h1 { margin: 0; max-width: 860px; font-size: clamp(30px, 4vw, 46px); line-height: 1.15; font-weight: 700; letter-spacing: -.015em; }
.ArticleHead .OpeningLead { color: #d3dcef; font-size: 18px; }
.TrailPath { margin: 0 0 26px; font-size: 13.5px; color: #a9b8d6; }
.TrailPath ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.TrailPath li + li::before { content: "/"; margin-right: 6px; color: #6f83ad; }
.TrailPath a { color: #dfe7f6; text-decoration: none; }
.TrailPath a:hover { text-decoration: underline; }

.ArticleFlow { position: relative; padding: 24px 0 8px; }
.ArticleFlow.HasMargin { padding-right: 330px; counter-reset: jugada; }
.ArticleFlow::after { content: ""; display: block; clear: both; }
.ArticleFlow > p, .ArticleFlow > ul, .ArticleFlow > ol { max-width: 760px; }
.ArticleFlow h2 {
  margin: 52px 0 14px; max-width: 760px;
  font-size: clamp(24px, 2.6vw, 30px); line-height: 1.25; font-weight: 700; color: var(--navy); letter-spacing: -.01em;
}
.ArticleFlow h2::before {
  content: ""; display: inline-block; width: 14px; height: 14px; margin-right: 14px; vertical-align: 3px;
  background: conic-gradient(var(--green) 25%, var(--navy) 0 50%, var(--green) 0 75%, var(--navy) 0) 0 0 / 7px 7px;
}
.ArticleFlow h3 { margin: 28px 0 6px; font-size: 19px; line-height: 1.35; font-weight: 600; color: var(--navy); }
.ArticleFlow p { margin: 0 0 16px; }
.ArticleFlow ul, .ArticleFlow ol { margin: 0 0 18px; padding-left: 0; list-style: none; }
.ArticleFlow li { position: relative; padding-left: 30px; margin-bottom: 8px; }
.ArticleFlow ul > li::before { content: ""; position: absolute; left: 4px; top: .66em; width: 9px; height: 9px; background: var(--green); }
.ArticleFlow ol { counter-reset: paso; }
.ArticleFlow ol > li { counter-increment: paso; }
.ArticleFlow ol > li::before {
  content: counter(paso); position: absolute; left: 0; top: .2em;
  width: 22px; height: 22px; display: grid; place-items: center;
  background: var(--navy); color: #fff; font-size: 12px; font-weight: 600;
}

.TableScroll { max-width: 760px; margin: 22px 0 24px; overflow-x: auto; border: 1px solid var(--line); -webkit-overflow-scrolling: touch; }
.TableScroll table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.TableScroll th { background: var(--navy); color: #fff; text-align: left; font-weight: 600; padding: 12px 14px; }
.TableScroll td { padding: 11px 14px; border-top: 1px solid var(--line); vertical-align: top; }
.TableScroll tbody tr:nth-child(even) td { background: var(--paper); }
.TableScroll td:first-child { font-weight: 500; color: var(--navy); }

/* margin notes: jugadas */
.MoveNote {
  float: right; clear: right; width: 290px; margin: 8px -330px 18px 0;
  padding: 16px 18px 14px; background: var(--paper); border-left: 4px solid var(--green);
  font-size: 14.5px; line-height: 1.55; color: var(--ink);
  counter-increment: jugada;
}
.MoveNote::before {
  content: "Jugada " counter(jugada); display: block; margin-bottom: 6px;
  font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--green-ink);
}
.MoveNote p { margin: 0; }

/* logo strips */
.LogoStrip { max-width: 100%; margin: 26px 0 30px; padding: 22px 22px 16px; background: var(--navy-deep); position: relative; }
.LogoStrip ul { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; list-style: none; margin: 0; padding: 0; }
.LogoStrip li { display: flex; align-items: center; justify-content: center; height: 76px; padding: 10px; background: var(--navy-mid); margin: 0; }
.ArticleFlow .LogoStrip li::before { display: none; }
.LogoStrip img { max-height: 46px; width: auto; }
.LogoStrip li.OnLight { background: #fff; }
.LogoStrip figcaption { margin-top: 12px; font-size: 13px; color: #a9b8d6; }
.ArticleFlow .LogoStrip li { padding: 10px; margin: 0; }
.ArticleFlow .LogoStrip ul { max-width: none; margin: 0; }
.LogoStrip.IsPayments ul { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.LogoStrip.IsPayments img { max-height: 40px; }

/* academia index */
.GuideIndex { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; max-width: 760px; margin: 18px 0 8px; border: 2px solid var(--navy); }
.GuideIndex a { display: block; padding: 16px 18px; text-decoration: none; color: var(--navy); background: #fff; transition: box-shadow .2s; }
.GuideIndex a:nth-child(4n+2), .GuideIndex a:nth-child(4n+3) { background: var(--navy); color: #fff; }
.GuideIndex a:hover { box-shadow: inset 0 0 0 3px var(--green); }
.GuideIndex strong { display: block; font-size: 16.5px; font-weight: 600; }
.GuideIndex span { display: block; font-size: 13.5px; opacity: .8; line-height: 1.45; margin-top: 2px; }

/* closing move */
.ClosingMove { clear: both; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 18px; max-width: 760px; margin: 48px 0 64px; padding: 24px 26px; background: var(--navy); color: #fff; position: relative; }
.ClosingMove::before { content: ""; position: absolute; top: 0; right: 0; width: 48px; height: 48px; background: conic-gradient(var(--green) 25%, transparent 0 50%, var(--green) 0 75%, transparent 0) 0 0 / 24px 24px; opacity: .5; }
.ClosingMove p { margin: 0; max-width: 430px; font-size: 16px; color: #dbe3f3; }
.HomeFlow .ClosingMove { margin-bottom: 72px; }

/* ---------- footer ---------- */
.SiteFooter { background: var(--navy-deep); color: #aebbd6; font-size: 14.5px; line-height: 1.6; }
.SiteFooter::before { content: ""; display: block; height: 10px; background: conic-gradient(var(--green) 25%, var(--navy) 0 50%, var(--green) 0 75%, var(--navy) 0) 0 0 / 10px 10px; }
.FooterGrid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding: 48px 0 32px; }
.FooterGrid img { width: 144px; height: 30px; display: block; margin-bottom: 18px; }
.FooterGrid p { margin: 0 0 12px; }
.FooterLabel { display: block; margin-bottom: 10px; color: #fff; font-weight: 600; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; }
.FooterLinks { list-style: none; margin: 0; padding: 0; }
.FooterLinks li { margin-bottom: 6px; }
.FooterLinks a { color: #d7e0f2; text-decoration: none; }
.FooterLinks a:hover { color: #fff; text-decoration: underline; }
.AgeSeal { display: inline-grid; place-items: center; width: 44px; height: 44px; margin-right: 12px; float: left; border: 2px solid var(--green); color: #fff; font-weight: 700; font-size: 15px; }
.AgeNote { overflow: hidden; }
.FooterBase { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 18px 0 26px; border-top: 1px solid rgba(255,255,255,.1); font-size: 13.5px; }

/* ---------- 404 ---------- */
.LostBoard { padding: 72px 0 80px; background: var(--paper); position: relative; overflow: hidden; }
.LostBoard h1 { margin: 0 0 14px; font-size: clamp(30px, 4vw, 44px); color: var(--navy); line-height: 1.15; }
.LostBoard p { max-width: 620px; color: var(--muted); }
.LostLinks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 760px; margin-top: 28px; border: 2px solid var(--navy); }
.LostLinks a { padding: 18px; text-decoration: none; color: var(--navy); font-weight: 600; background: #fff; }
.LostLinks a:nth-child(even) { background: var(--navy); color: #fff; }
.LostLinks a:hover { box-shadow: inset 0 0 0 3px var(--green); }

/* ---------- responsive ---------- */
@media (max-width: 1120px) {
  .ArticleFlow.HasMargin { padding-right: 0; }
  .MoveNote { float: none; width: auto; max-width: 760px; margin: 18px 0 22px; }
}
@media (max-width: 960px) {
  .MenuToggle { display: inline-flex; }
  .SiteNav {
    position: absolute; top: 77px; left: 0; right: 0;
    display: none; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--navy-deep); padding: 8px 24px 22px; border-bottom: 3px solid var(--green);
  }
  .SiteNav.IsOpen { display: flex; }
  .SiteNav ul { flex-direction: column; align-items: stretch; }
  .SiteNav li a { padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.08); font-size: 17px; }
  .SiteNav li a::after { left: 0; right: auto; width: 60px; bottom: 6px; }
  .SiteNav .PlayButton { margin-top: 18px; justify-content: center; }
  .BoardGrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .BoardGrid > .BoardCell:nth-child(n) { background: #fff; color: var(--navy); }
  .BoardGrid > .BoardCell:nth-child(n) .CellSquare { color: var(--green-ink); }
  .BoardGrid > .BoardCell:nth-child(1), .BoardGrid > .BoardCell:nth-child(4),
  .BoardGrid > .BoardCell:nth-child(5), .BoardGrid > .BoardCell:nth-child(8) { background: var(--navy); color: #fff; }
  .BoardGrid > .BoardCell:nth-child(1) .CellSquare, .BoardGrid > .BoardCell:nth-child(4) .CellSquare,
  .BoardGrid > .BoardCell:nth-child(5) .CellSquare, .BoardGrid > .BoardCell:nth-child(8) .CellSquare { color: var(--green-soft); }
  .BoardFiles { display: none; }
  .LogoStrip ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .FooterGrid { grid-template-columns: 1fr 1fr; }
  .FooterGrid > div:first-child { grid-column: 1 / -1; }
  .KingPiece { display: none; }
}
@media (max-width: 600px) {
  body { font-size: 16.5px; }
  .Frame { padding: 0 16px; }
  .SiteHeader .Frame { height: 66px; }
  .SiteNav { top: 69px; padding: 6px 16px 20px; }
  .BrandMark img { width: 144px; height: 30px; }
  .OpeningBlock { padding: 40px 0 40px; }
  .OpeningLead { font-size: 17px; }
  .BoardFrame { margin: 36px -4px 0; padding: 6px; }
  .BoardCell { min-height: 150px; padding: 14px 14px 12px; gap: 10px; }
  .CellName { font-size: 18px; }
  .CellFact { font-size: 13px; }
  .CellAge { font-size: 36px; }
  .ArticleHead { padding: 28px 0 42px; }
  .TableScroll table { min-width: 520px; font-size: 14px; }
  .LogoStrip { padding: 14px 12px 12px; }
  .LogoStrip li { height: 64px; }
  .LogoStrip img { max-height: 36px; }
  .LogoStrip.IsPayments ul { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .LogoStrip.IsPayments img { max-height: 26px; }
  .GuideIndex { grid-template-columns: 1fr; }
  .GuideIndex a:nth-child(n) { background: #fff; color: var(--navy); }
  .GuideIndex a:nth-child(even) { background: var(--navy); color: #fff; }
  .ClosingMove { padding: 20px; }
  .FooterGrid { grid-template-columns: 1fr; gap: 28px; }
  .LostLinks { grid-template-columns: 1fr 1fr; }
}

/* home: índice de jugadas */
.HomeFlow { padding-right: 330px; }
.PlayIndex { position: absolute; top: 52px; right: 0; bottom: 0; width: 280px; }
.PlayIndexInner { position: sticky; top: 108px; padding: 20px 22px; border: 2px solid var(--navy); background: #fff; }
.PlayIndexLabel { display: block; margin-bottom: 10px; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--green-ink); }
.ArticleFlow .PlayIndex ol { margin: 0; counter-reset: idx; }
.ArticleFlow .PlayIndex li { counter-increment: idx; padding-left: 30px; margin: 0; border-top: 1px solid var(--line); }
.ArticleFlow .PlayIndex li:first-child { border-top: 0; }
.ArticleFlow .PlayIndex li::before { content: counter(idx); top: 9px; width: 20px; height: 20px; font-size: 11px; }
.ArticleFlow .PlayIndex li:nth-child(odd)::before { background: var(--green); }
.PlayIndex a { display: block; padding: 7px 0; font-size: 14px; line-height: 1.4; color: var(--navy); text-decoration: none; }
.PlayIndex a:hover { color: var(--green-ink); text-decoration: underline; }
.ArticleFlow h2[id] { scroll-margin-top: 96px; }
@media (max-width: 1120px) {
  .HomeFlow { padding-right: 0; }
  .PlayIndex { display: none; }
}
@media (min-width: 961px) {
  .OpeningBlock h1 { font-size: clamp(36px, 3.9vw, 50px); }
}
.GuideAge { padding: 16px 18px; background: #fff; color: var(--navy); }
.GuideAge strong { display: block; font-size: 22px; line-height: 1.1; font-weight: 700; color: var(--green); }
.GuideAge span { display: block; font-size: 13.5px; opacity: .8; line-height: 1.45; margin-top: 2px; }
@media (max-width: 600px) { .GuideAge { background: var(--navy); color: #fff; } }
