/* doradobet502.com — tablero dorado */
:root {
  --gold: #f5b800;
  --gold-deep: #c98d00;
  --gold-soft: #ffe7a1;
  --gold-wash: #fff3cc;
  --cream: #fbf6e9;
  --paper: #fffdf7;
  --ink: #17161d;
  --ink-soft: #4a4756;
  --navy: #242637;
  --line: #e7dcc0;
  --radius: 14px;
  --shell: 1180px;
  --head: "Rubik", "Trebuchet MS", Arial, sans-serif;
  --text: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 17px/1.62 var(--text);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-decoration-color: var(--gold-deep); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--gold-deep); }
:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }

.wrap { width: 100%; max-width: var(--shell); margin: 0 auto; padding: 0 20px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skiplink { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; z-index: 99; border-radius: 8px; }
.skiplink:focus { left: 8px; }

/* ---------- masthead ---------- */
.masthead { background: var(--paper); border-bottom: 1px solid var(--line); }
.masthead__bar { display: flex; align-items: center; gap: 22px; min-height: 74px; }
.masthead__brand { flex: 0 0 auto; display: block; }
.masthead__brand img { width: 178px; height: auto; }
.masthead__links { display: flex; gap: 6px; margin-left: auto; }
.masthead__links a {
  font: 500 15px/1 var(--head); color: var(--ink); text-decoration: none;
  padding: 10px 12px; border-radius: 999px;
}
.masthead__links a:hover, .masthead__links a[aria-current="page"] { background: var(--gold-wash); color: var(--ink); }
.masthead__pill {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--gold); color: var(--ink); text-decoration: none;
  font: 700 15px/1 var(--head); letter-spacing: .01em;
  padding: 13px 20px; border-radius: 999px;
  box-shadow: inset 0 -3px 0 var(--gold-deep);
}
.masthead__pill::after { content: "→"; font-weight: 500; }
.masthead__pill:hover { background: #ffc61a; color: var(--ink); }
.masthead__toggle { display: none; }

/* ---------- tileboard (section tiles) ---------- */
.tileboard { background: var(--cream); border-bottom: 1px solid var(--line); }
.tileboard__list { list-style: none; margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; padding-top: 16px; padding-bottom: 16px; }
.tileboard__item a {
  position: relative; display: flex; align-items: center; gap: 14px;
  min-height: 72px; padding: 8px 16px 8px 10px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; color: var(--ink);
  font: 700 15px/1.15 var(--head); text-transform: uppercase; letter-spacing: .02em;
  transition: transform .15s ease, box-shadow .15s ease;
}
.tileboard__item a:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(23, 22, 29, .08); color: var(--ink); }
.tileboard__item--current a { background: var(--gold); border-color: var(--gold-deep); }
.tileboard__icon { width: 56px; height: 56px; flex: 0 0 56px; }
.tileboard__glyph { width: 56px; height: 56px; flex: 0 0 56px; display: grid; place-items: center; }
.tileboard__glyph svg { width: 46px; height: 46px; }

/* ---------- drawer (off-canvas) ---------- */
.drawer {
  position: fixed; inset: 0 auto 0 0; z-index: 60;
  width: min(84vw, 330px); background: var(--paper);
  transform: translateX(-102%); transition: transform .25s ease;
  overflow-y: auto; padding: 18px 20px 30px;
  box-shadow: 8px 0 30px rgba(0, 0, 0, .18);
  visibility: hidden;
}
.drawer--open { transform: translateX(0); visibility: visible; }
.drawer__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.drawer__top img { width: 140px; }
.drawer__close { background: var(--cream); border: 1px solid var(--line); border-radius: 10px; width: 40px; height: 40px; font-size: 22px; line-height: 1; cursor: pointer; color: var(--ink); }
.drawer__label { font: 700 12px/1 var(--head); text-transform: uppercase; letter-spacing: .12em; color: var(--gold-deep); margin: 18px 0 6px; }
.drawer__list { list-style: none; margin: 0; padding: 0; }
.drawer__list a { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); font: 500 16px/1.3 var(--head); }
.drawer__list a[aria-current="page"] { color: var(--gold-deep); }
.drawer__scrim { position: fixed; inset: 0; z-index: 55; background: rgba(23, 22, 29, .45); opacity: 0; pointer-events: none; transition: opacity .2s; }
.drawer__scrim--on { opacity: 1; pointer-events: auto; }
body.is-locked { overflow: hidden; }

/* ---------- article basics ---------- */
.article h1, .article h2, .article h3 { font-family: var(--head); color: var(--ink); line-height: 1.15; }
.article h2 { font-size: 27px; font-weight: 700; margin: 38px 0 14px; }
.article h3 { font-size: 19px; font-weight: 600; margin: 24px 0 8px; }
.article p { margin: 0 0 14px; }
.article ul, .article ol { margin: 0 0 18px; padding-left: 0; list-style: none; }
.article li { position: relative; padding-left: 30px; margin-bottom: 8px; }
.article ul > li::before {
  content: ""; position: absolute; left: 4px; top: .55em;
  width: 11px; height: 11px; background: var(--gold); border: 2px solid var(--ink); border-radius: 3px; transform: rotate(45deg);
}
.article ol { counter-reset: step; }
.article ol > li { counter-increment: step; }
.article ol > li::before {
  content: counter(step); position: absolute; left: 0; top: .1em;
  width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: var(--gold);
  font: 700 12px/22px var(--head); text-align: center;
}
.article strong { font-weight: 700; }

.datatable { margin: 8px 0 24px; overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); border: 1px solid var(--line); background: var(--paper); }
.datatable table { width: 100%; border-collapse: collapse; font-size: 15.5px; line-height: 1.45; }
.datatable th { background: var(--ink); color: var(--gold); font: 600 13.5px/1.3 var(--head); text-transform: uppercase; letter-spacing: .04em; text-align: left; padding: 12px 14px; }
.datatable td { padding: 11px 14px; border-top: 1px solid var(--line); vertical-align: top; }
.datatable tbody tr:nth-child(even) td { background: #fdf8ea; }
.datatable td:first-child { font-weight: 600; }
.datatable--numbers td:not(:first-child), .datatable--numbers th:not(:first-child) { text-align: right; white-space: nowrap; }

.picture { margin: 6px 0 22px; }
.picture img { width: 100%; border-radius: var(--radius); border: 3px solid var(--ink); }
.picture__caption { font-size: 14px; color: var(--ink-soft); margin-top: 8px; padding-left: 12px; border-left: 3px solid var(--gold); }

.callout {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  margin: 26px 0 8px; padding: 18px 22px; border-radius: var(--radius);
  background: var(--ink); color: #f6f1e2;
}
.callout__text { margin: 0 !important; font: 500 16px/1.4 var(--head); max-width: 560px; }
.button {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  font: 700 16px/1 var(--head); padding: 14px 24px; border-radius: 999px;
}
.button--gold { background: var(--gold); color: var(--ink); box-shadow: inset 0 -3px 0 var(--gold-deep); }
.button--gold::after { content: "→"; font-weight: 500; }
.button--gold:hover { background: #ffc61a; color: var(--ink); }

.questions { margin-top: 10px; }
.questions__item { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 18px 6px; margin-bottom: 12px; break-inside: avoid; }
.questions__item h3 { margin-top: 14px; }

/* ---------- home: goldband ---------- */
.goldband {
  position: relative; overflow: hidden;
  background: var(--gold) url("/assets/img/fondo-marquesina-dorada.jpg") center/cover no-repeat;
  border-bottom: 6px solid var(--ink);
}
.goldband::after {
  content: ""; position: absolute; right: -40px; top: 0; bottom: 0; width: 42%;
  background-image:
    linear-gradient(90deg, rgba(23, 22, 29, .1) 2px, transparent 2px),
    linear-gradient(rgba(23, 22, 29, .1) 2px, transparent 2px);
  background-size: 34px 34px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 60%);
          mask-image: linear-gradient(90deg, transparent, #000 60%);
  pointer-events: none;
}
.goldband__inner { position: relative; z-index: 1; padding-top: 54px; padding-bottom: 56px; }
.goldband__kicker { display: inline-block; font: 700 13px/1 var(--head); letter-spacing: .14em; text-transform: uppercase; background: var(--ink); color: var(--gold); padding: 8px 12px; border-radius: 6px; margin: 0 0 18px !important; }
.article .goldband__title { font-size: clamp(34px, 5.2vw, 62px); font-weight: 800; line-height: 1.02; letter-spacing: -.015em; margin: 0 0 16px; max-width: 900px; }
.goldband__phrase { font: 500 clamp(18px, 2vw, 22px)/1.4 var(--head); max-width: 680px; margin: 0 !important; }

/* ---------- home: frontpage ---------- */
.frontpage { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 40px; padding-top: 34px; }
.frontpage__lead > p:first-child { font-size: 19.5px; line-height: 1.55; }
.frontpage__lead > p:first-child::first-letter { float: left; font: 800 58px/.9 var(--head); color: var(--gold-deep); margin: 6px 10px 0 0; }
.frontpage__lead h2:first-of-type { margin-top: 26px; }
.sidebox { align-self: start; position: sticky; top: 18px; background: var(--paper); border: 2px solid var(--ink); border-radius: var(--radius); overflow: hidden; }
.sidebox__label { margin: 0 !important; background: var(--gold); padding: 14px 18px; font: 800 18px/1.1 var(--head); border-bottom: 2px solid var(--ink); }
.sidebox__list { list-style: none !important; margin: 0 !important; padding: 6px 0 !important; }
.sidebox__list li { padding: 0 !important; margin: 0 !important; }
.sidebox__list li::before { display: none; }
.sidebox__list a { display: block; padding: 11px 18px; text-decoration: none; color: var(--ink); border-bottom: 1px dashed var(--line); }
.sidebox__list li:last-child a { border-bottom: 0; }
.sidebox__list a:hover { background: var(--gold-wash); }
.sidebox__name { display: block; font: 700 16px/1.25 var(--head); }
.sidebox__hint { display: block; font-size: 14px; color: var(--ink-soft); }

.newsprint { columns: 2; column-gap: 46px; column-rule: 1px solid var(--line); padding: 18px 0 30px; border-top: 3px double var(--ink); margin-top: 34px; }
.newsprint h2 { break-after: avoid; margin-top: 0; padding-top: 18px; font-size: 25px; }
.newsprint p, .newsprint li { break-inside: avoid-column; }
.newsprint .datatable, .newsprint .newsprint__span { column-span: all; }
.newsprint .questions { column-span: all; columns: 2; column-gap: 24px; }

/* ---------- inner pages ---------- */
.trail { font-size: 14px; color: var(--ink-soft); padding-top: 22px; max-width: 880px; margin: 0 auto; }
.trail ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.trail li + li::before { content: "/"; margin-right: 6px; color: var(--gold-deep); }
.trail a { color: var(--ink-soft); }
.article--inner { max-width: 880px; margin: 0 auto; padding: 8px 0 40px; }
.article--inner .article__title { font-size: clamp(30px, 4.2vw, 46px); font-weight: 800; letter-spacing: -.01em; margin: 10px 0 18px; padding-bottom: 16px; border-bottom: 6px solid var(--gold); }
.article--inner h2 { border-left: 8px solid var(--gold); padding-left: 14px; }
.article--inner > p:first-of-type { font-size: 19px; }
.factsheet {
  float: right; width: 290px; margin: 6px 0 18px 30px;
  background: var(--paper); border: 2px solid var(--ink); border-radius: var(--radius);
  box-shadow: 6px 6px 0 var(--gold);
  padding: 0 0 6px;
}
.factsheet__label { margin: 0 !important; padding: 12px 16px; font: 800 15px/1 var(--head); text-transform: uppercase; letter-spacing: .14em; border-bottom: 2px solid var(--ink); display: flex; align-items: center; gap: 10px; }
.factsheet__label img { width: 34px; height: 34px; }
.factsheet__list { margin: 0; padding: 4px 16px; }
.factsheet__list dt { font: 600 12.5px/1.2 var(--head); text-transform: uppercase; letter-spacing: .06em; color: var(--gold-deep); margin-top: 10px; }
.factsheet__list dd { margin: 2px 0 8px; font-weight: 600; font-size: 15.5px; line-height: 1.35; padding-bottom: 8px; border-bottom: 1px dashed var(--line); }
.factsheet__list dd:last-child { border-bottom: 0; }

.gameshelf { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; list-style: none !important; padding: 0 !important; margin: 4px 0 24px !important; }
.gameshelf li { padding: 0 !important; margin: 0 !important; }
.gameshelf li::before { display: none; }
.gameshelf figure { margin: 0; }
.gameshelf img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 12px; border: 2px solid var(--ink); }
.gameshelf figcaption { font: 600 13.5px/1.3 var(--head); margin-top: 6px; }

.hublist { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.hublist li { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px 12px 40px !important; margin: 0 !important; }
.hublist li::before { left: 14px !important; top: 1.15em !important; }

/* ---------- colophon (footer) ---------- */
.colophon { background: var(--gold); color: var(--ink); border-top: 6px solid var(--ink); margin-top: 30px; }
.colophon__grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.2fr; gap: 30px; padding-top: 40px; padding-bottom: 26px; }
.colophon__brand img { width: 170px; margin-bottom: 14px; }
.colophon__age { display: flex; align-items: center; gap: 14px; }
.colophon__badge { flex: 0 0 64px; width: 64px; height: 64px; border-radius: 50%; background: var(--ink); color: var(--gold); display: grid; place-items: center; font: 800 21px/1 var(--head); border: 3px solid var(--paper); }
.colophon__age p { margin: 0; font-size: 15px; line-height: 1.45; }
.colophon__label { font: 800 13px/1 var(--head); text-transform: uppercase; letter-spacing: .14em; margin: 4px 0 12px; }
.colophon__list { list-style: none; margin: 0; padding: 0; }
.colophon__list li { margin-bottom: 7px; }
.colophon__list a { color: var(--ink); text-decoration: none; font-size: 15px; }
.colophon__list a:hover { text-decoration: underline; color: var(--ink); }
.colophon__base { border-top: 2px solid rgba(23, 22, 29, .25); display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding-top: 14px; padding-bottom: 20px; font-size: 14px; }
.colophon__base p { margin: 0; }

/* ---------- 404 ---------- */
.lost { text-align: center; padding: 60px 0 40px; }
.lost__code { font: 800 clamp(90px, 18vw, 170px)/1 var(--head); color: var(--gold); -webkit-text-stroke: 3px var(--ink); margin: 0; }
.lost__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; list-style: none !important; padding: 0 !important; }
.lost__links li { padding: 0 !important; }
.lost__links li::before { display: none; }
.lost__links a { display: inline-block; padding: 10px 18px; border-radius: 999px; background: var(--paper); border: 2px solid var(--ink); text-decoration: none; font: 600 15px/1 var(--head); color: var(--ink); }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .masthead__links { display: none; }
  .masthead__pill { margin-left: auto; }
  .tileboard__item a { font-size: 13px; padding-right: 10px; gap: 8px; }
  .tileboard__icon, .tileboard__glyph { width: 46px; height: 46px; flex-basis: 46px; }
  .colophon__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1080px) {
  .masthead__toggle {
    display: grid; place-items: center; width: 44px; height: 44px; flex: 0 0 44px;
    background: var(--cream); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; padding: 0;
  }
  .masthead__toggle-lines, .masthead__toggle-lines::before, .masthead__toggle-lines::after {
    display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; position: relative; content: "";
  }
  .masthead__toggle-lines::before { position: absolute; top: -6px; }
  .masthead__toggle-lines::after { position: absolute; top: 6px; }
  .masthead__bar { gap: 12px; }
}
@media (max-width: 860px) {
  .frontpage { grid-template-columns: 1fr; gap: 26px; }
  .sidebox { position: static; }
  .newsprint { columns: 1; }
  .newsprint .questions { columns: 1; }
  .gameshelf { grid-template-columns: repeat(2, 1fr); }
  .factsheet { float: none; width: auto; margin: 4px 0 22px; }
  .hublist { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16.5px; }
  .wrap { padding: 0 16px; }
  .masthead__bar { min-height: 64px; }
  .masthead__brand img { width: 132px; }
  .masthead__pill { padding: 11px 14px; font-size: 14px; }
  .tileboard__list { gap: 6px; padding-top: 10px; padding-bottom: 10px; }
  .tileboard__item a { flex-direction: column; justify-content: center; gap: 4px; min-height: 0; padding: 8px 2px 7px; font-size: 10.5px; letter-spacing: .01em; text-align: center; border-radius: 12px; }
  .tileboard__icon, .tileboard__glyph { width: 40px; height: 40px; flex-basis: auto; }
  .tileboard__glyph svg { width: 32px; height: 32px; }
  .goldband__inner { padding-top: 34px; padding-bottom: 36px; }
  .goldband::after { width: 70%; opacity: .6; }
  .article h2 { font-size: 23px; }
  .newsprint h2 { font-size: 22px; }
  .datatable table { font-size: 14px; }
  .datatable th, .datatable td { padding: 9px 10px; }
  .datatable--wide table { min-width: 520px; }
  .callout { padding: 16px; }
  .callout .button { width: 100%; justify-content: center; }
  .colophon__grid { grid-template-columns: 1fr; gap: 22px; }
  .frontpage__lead > p:first-child { font-size: 18px; }
}
@media (max-width: 380px) {
  .masthead__brand img { width: 116px; }
  .masthead__pill { padding: 10px 12px; font-size: 13px; }
  .masthead__pill::after { display: none; }
}

/* stacked tables on phones (numeric tables keep their grid) */
@media (max-width: 640px) {
  .datatable:not(.datatable--numbers) { overflow: visible; background: transparent; border: 0; }
  .datatable:not(.datatable--numbers) table,
  .datatable:not(.datatable--numbers) tbody,
  .datatable:not(.datatable--numbers) tr,
  .datatable:not(.datatable--numbers) td { display: block; width: 100%; min-width: 0; }
  .datatable:not(.datatable--numbers) thead { display: none; }
  .datatable:not(.datatable--numbers) tr { background: var(--paper); border: 1px solid var(--line); border-left: 6px solid var(--gold); border-radius: 12px; padding: 6px 0; margin-bottom: 10px; }
  .datatable:not(.datatable--numbers) tbody tr:nth-child(even) td { background: transparent; }
  .datatable:not(.datatable--numbers) td { border: 0; padding: 4px 14px; }
  .datatable:not(.datatable--numbers) td:first-child { font: 700 16px/1.3 var(--head); padding-top: 8px; }
  .datatable:not(.datatable--numbers) td:not(:first-child)::before { content: attr(data-label); display: block; font: 600 11.5px/1.3 var(--head); text-transform: uppercase; letter-spacing: .06em; color: var(--gold-deep); }
}
