/* Interliga v9: presentación deportiva. Reglas, datos y cálculo en los módulos existentes. */
:root {
  --canvas: #edf1f6;
  --ink: #17263d;
  --muted: #5d6c80;
  --line: #dfe6ef;
  --blue: #0854c6;
  --navy: #0b2855;
  --ghetto: #075acb;
  --birria: #b45210;
  --pending: #526985;
  --gutter: 14px;
  --card-pad: 14px;
}
html, body { background: var(--canvas); }
.app-shell { max-width: 767px; background: var(--canvas); box-shadow: none; padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
.topbar {
  height: 98px; margin: 0; padding: 16px var(--gutter); gap: 8px;
  color: #fff; background: #074bbd; border-radius: 0; box-shadow: none;
  border-top: 4px solid #3d8dff;
}
.brand-lockup { min-width: 0; display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 38px; height: 44px; flex: 0 0 auto; color: #fff; }
.brand-kicker { display: block; margin-bottom: 5px; color: #d5e6ff; font-size: 9px; font-weight: 650; letter-spacing: .09em; }
.brand-block h1 { font-size: 29px; letter-spacing: -.025em; font-style: italic; }
.brand-block p { color: #d5e6ff; font-size: 10px; letter-spacing: .05em; margin-top: 7px; }
.top-status, .top-status.is-pending {
  min-width: 0; height: auto; min-height: 28px; padding: 7px 9px;
  color: #fff; background: #ffffff14; border: 1px solid #ffffff50;
  border-radius: 4px; font-size: 9px; letter-spacing: .06em;
}
.league-ribbon { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 42px; padding: 9px var(--gutter); background: #fff; border-bottom: 1px solid var(--line); font-size: 11px; font-weight: 800; letter-spacing: .025em; }
.ribbon-ghetto { color: var(--ghetto); }
.ribbon-birria { color: var(--birria); }
.ribbon-ghetto::before, .ribbon-birria::before { content: ''; display: inline-block; width: 5px; height: 11px; margin-right: 6px; background: currentColor; transform: skew(-12deg); vertical-align: -1px; }
.ribbon-vs { color: #768398; font-size: 9px; font-style: italic; }
.ribbon-format { display: none; }
.source-state { margin: 0; min-height: 38px; padding: 10px var(--gutter); color: var(--muted); font-size: 10px; letter-spacing: .015em; line-height: 1.45; text-align: center; }
.content { gap: 14px; }
.card { height: auto; border: 1px solid #d9e2ed; border-radius: 6px; background: #fff; box-shadow: 0 2px 4px #16305205; overflow: hidden; }
.card h2 { color: var(--navy); font-size: 14px; font-weight: 850; letter-spacing: .035em; }
.pulse-heading, .selected-heading, .matches-heading, .podium-heading, .module-heading { height: auto; min-height: 42px; padding: 13px var(--card-pad); align-items: center; border-bottom: 1px solid var(--line); }
.pulse-heading { border-top: 3px solid var(--blue); }
.pulse-body { height: 90px; padding: 12px var(--card-pad); gap: 8px; grid-template-columns: minmax(0,1fr) 1px minmax(80px,.8fr) 1px minmax(0,1fr); }
.league-summary h3 { font-size: 11px; line-height: 1.2; }
.league-summary-left h3 { color: var(--ghetto); }
.league-summary-right h3 { color: var(--birria); }
.league-summary strong, [data-left-pf], [data-right-pf] { color: var(--ink); }
.league-summary p { margin-top: 10px; gap: 5px; }
.league-summary strong { font-size: 35px; }
.league-summary span { font-size: 9px; letter-spacing: 0; }
.vertical-rule { height: 38px; }
.points-tiebreak { padding: 0; }
.points-tiebreak > p { font-size: 8px; }
.points-tiebreak > div { gap: 8px; margin-top: 12px; }
.points-tiebreak strong { font-size: 14px; }
.pulse-footer { height: auto; min-height: 34px; padding: 8px; background: #f7f9fc; font-size: 10px; line-height: 1.4; white-space: normal; }
.selected-card { background: var(--navy); border-color: var(--navy); color: #fff; scroll-margin-top: 14px; }
.selected-heading { background: #ffffff06; border-color: #ffffff21; }
.selected-card h2 { color: #d1e2ff; font-size: 12px; }
.selected-body { height: auto; min-height: 126px; padding: 20px 12px; gap: 8px; grid-template-columns: minmax(0,1fr) 1px 72px 1px minmax(0,1fr); background: linear-gradient(115deg,#1658ab55,transparent 55%); }
.selected-team > p { min-height: 28px; font-size: 12px; line-height: 1.2; white-space: normal; overflow-wrap: anywhere; }
.selected-scoreline { margin-top: 12px; }
.selected-scoreline > strong { font-size: 42px; line-height: 1; }
.selected-scoreline > strong { color: #fff; }
.score-kind { display: block; margin-top: 8px; font-size: 9px; letter-spacing: .04em; font-weight: 650; }
.selected-team .score-kind { color: #d6e7ff; }
.selected-rule { height: 42px; background: #ffffff26; }
.selected-status, .selected-status.is-pending { color: #dae6fa; font-size: 9px; gap: 4px; letter-spacing: .025em; }
.selected-status .status-dot { width: 5px; height: 5px; }
.selected-body .outer-chevron { display: none; }
.breakdown-link { width: 100%; min-height: 44px; height: auto; padding: 12px 8px; margin: 0; border-color: #ffffff26; background: #143b73; color: #fff; font-size: 11px; letter-spacing: .035em; }
.breakdown-link:hover { background: #195094; }
.selected-card .projection-comparison { margin: 0; padding: 10px 14px; border: 0; border-top: 1px solid #ffffff21; background: #ffffff08; color: #d6e7ff; font-size: 12px; text-align: center; }
.matches-heading { background: #f7f9fc; }
.matches-list { height: auto; grid-template-rows: repeat(12,minmax(52px,auto)); padding: 0; }
.match-row { position: relative; min-height: 52px; padding: 8px 10px; grid-template-columns: 15px minmax(0,1fr) 38px 7px 38px minmax(0,1fr) 8px; gap: 4px; }
.match-row:nth-child(even) { background: #f8fafc; }
.match-row:hover { background: #eef5ff; }
.match-row[aria-pressed='true'] { background: #eaf2ff; box-shadow: inset 3px 0 var(--blue); }
.match-index { color: #68798e; font-size: 10px; }
.match-team { font-size: 12px; font-weight: 600; line-height: 1.25; white-space: normal; overflow-wrap: anywhere; }
.match-team:nth-child(2) { color: var(--ghetto); }
.match-team:nth-child(6) { color: var(--birria); text-align: right; }
.match-score { font-size: 17px; font-weight: 850; }
.match-dash { font-size: 12px; color: #8c99aa; }
.match-status { grid-column: 2 / 7; grid-row: 2; justify-content: center; font-size: 8px; letter-spacing: .06em; }
.match-status .status-dot { width: 4px; height: 4px; }
.match-chevron { grid-column: 7; grid-row: 1; width: 5px; height: 5px; }
.podium-card { min-height: 0; }
.podium-heading > span, .module-heading > span { font-size: 9px; }
.podium-list { padding: 0 12px; grid-template-rows: repeat(var(--podium-rows,3),minmax(50px,auto)); }
.podium-list li { gap: 7px; padding: 8px 0; grid-template-columns: 24px minmax(0,1fr) 67px 32px 45px 0; font-size: 11px; }
.podium-rank { display: grid; place-items: center; width: 23px; height: 26px; color: #fff; background: var(--navy); border-radius: 3px; font-weight: 850; }
.podium-list li:first-child .podium-rank { background: #a16b12; }
.podium-list strong { white-space: normal; line-height: 1.2; font-size: 12px; }
.podium-list b { color: var(--blue); }
.bottom-nav { width: min(100%,767px); height: calc(67px + env(safe-area-inset-bottom)); box-shadow: 0 -4px 20px #0b28550b; border-color: #d8e2ef; }
.nav-item { position: relative; border: 0; font-size: 10px; font-weight: 800; gap: 6px; }
.nav-item.is-active { background: #eef5ff; color: var(--blue); box-shadow: inset 0 3px var(--blue); }
.nav-item svg { width: 22px; height: 22px; }
.sync-state { height: auto; min-height: 44px; padding: 12px var(--gutter); font-size: 10px; line-height: 1.5; }
.league-filters { padding-top: 14px; gap: 7px; }
.league-filters button { min-height: 40px; font-size: 11px; border-radius: 4px; }
.league-filters button[aria-pressed='true'] { background: var(--blue); color: #fff; border-color: var(--blue); }
.standings-table { width: 100%; margin: 0; font-size: 12px; }
.standings-table .rank-col { width: 24px; }
.standings-table .league-col { width: 63px; }
.standings-table .stat-col { width: 23px; }
.standings-table .pf-col { width: 37px; }
.standings-table th { height: 35px; font-size: 10px; background: #f0f4f9; color: #3e5573; font-weight: 750; }
.standings-table td { height: 42px; }
.standings-table tr:nth-child(even) td { background: #f8fafc; }
.team-link { min-height: 42px; color: #154c91; font-weight: 650; white-space: normal; line-height: 1.25; overflow-wrap: anywhere; }
.league-cell { font-size: 10px; }
.wins-cell, .points-cell { color: var(--navy); }
.card .table-note, .card .table-legend, .module-note, .card .module-note { font-size: 11px; line-height: 1.5; }
.season-facts { padding: 22px 14px; }
.season-facts strong { font-size: 34px; color: var(--blue); }
.season-facts span { font-size: 10px; }
.week-controls { padding: 6px; }
.week-select-label select { font-size: 16px; }
.week-grid { padding-bottom: 16px; gap: 7px; }
.week-grid button { min-height: 40px; font-size: 14px; background: #f7f9fc; }
.week-grid button[aria-pressed='true'] { background: var(--blue); box-shadow: 0 2px 5px #0854c630; }
.calendar-footer p { font-size: 11px; line-height: 1.6; }
.text-link { font-size: 13px; }
.lineup-slots { padding-top: 16px; gap: 6px; }
.lineup-slots > span { background: #eff5ff; border-color: #d8e7fc; padding: 12px 0; font-size: 11px; }
.lineup-slots b { color: var(--blue); font-size: 22px; }
.rule-copy, .card .rule-copy { padding-top: 10px; font-size: 13px; line-height: 1.65; }
.rules-definitions > div { font-size: 13px; }
.scoring-section summary { min-height: 48px; font-size: 13px; }
.scoring-section[open] summary { background: #eff5ff; }
.rules-table { font-size: 13px; }
.rules-table th { font-size: 10px; }
.rules-table th, .rules-table td { padding-block: 10px; }
.card .scoring-note { font-size: 12px; line-height: 1.55; padding-top: 10px; }
.detail-dialog { max-width: 760px; border: 0; border-radius: 7px; box-shadow: 0 16px 60px #071d4340; }
.detail-dialog::backdrop { background: #071d4399; backdrop-filter: blur(3px); }
.dialog-heading { background: #074bbd; padding: 14px; color: #fff; border: 0; }
.dialog-heading p { color: #d5e6ff; letter-spacing: .06em; }
.dialog-heading h2 { font-size: 20px; }
.dialog-close { color: #fff; background: #ffffff12; border-radius: 4px; width: 36px; height: 36px; }
.detail-scoreboard { background: #eef4fc; padding: 22px 12px; }
.detail-scoreboard > div { gap: 10px; }
.detail-scoreboard > div:first-child .detail-team-name { color: var(--ghetto); }
.detail-scoreboard > div:last-child .detail-team-name { color: var(--birria); }
.detail-scoreboard strong { color: var(--ink); }
.detail-scoreboard strong { font-size: 40px; }
.detail-scoreboard span { font-size: 10px; letter-spacing: .04em; }
.detail-team-name { min-height: 30px; font-size: 14px; }
.detail-section-title { background: #f3f6fb; color: var(--navy); font-size: 13px; padding-block: 14px; }
.dialog-note { font-size: 12px; line-height: 1.55; padding: 12px 14px; }
.lineup-table { font-size: 13px; }
.lineup-table th, .lineup-table td { padding-block: 13px; }
.lineup-table th:first-child { width: 42px; color: var(--navy); font-size: 11px; }
.lineup-table thead { color: var(--navy); background: #f3f6fb; }
.lineup-table tbody tr:nth-child(even) { background: #f8fafc; }
.player-name { font-weight: 600; }
.player-points { font-size: 17px; }
.player-detail summary::after { font-size: 9px; }
.player-calculation { font-size: 11px; }
.player-projection { color: #1b7156; font-size: 13px; }
.lineup-pro-team { color: var(--muted); }
.projection-comparison { margin: 12px 14px; background: #ecf6f0; border-color: #258164; font-size: 13px; }
.dialog-action { background: #eef5ff; min-height: 48px; }
.detail-stats { padding: 24px 14px; background: #f3f6fb; }
.detail-stats strong { color: var(--blue); font-size: 28px; }
.team-fixture { min-height: 48px; }
.fixture-opponent { font-size: 13px; }
.fixture-state { font-size: 10px; }
button:focus-visible, a:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid #2584ed; outline-offset: -3px; }
.selected-card button:focus-visible { outline-color: #fff; }
@media (min-width: 768px) {
  :root { --gutter: 28px; --card-pad: 20px; }
  .app-shell { width: 100%; max-width: 1440px; padding-bottom: 24px; }
  .topbar { height: 112px; padding: 20px var(--gutter); }
  .brand-mark { width: 49px; height: 55px; }
  .brand-lockup { gap: 16px; }
  .brand-kicker { font-size: 11px; }
  .brand-block h1 { font-size: 38px; }
  .brand-block p { font-size: 11px; }
  .top-status, .top-status.is-pending { padding: 9px 14px; font-size: 11px; }
  .bottom-nav { width: 100%; height: 51px; background: var(--navy); border: 0; box-shadow: 0 3px 10px #071d4310; padding-inline: var(--gutter); grid-template-columns: repeat(4, minmax(100px,160px)); }
  .nav-item { font-size: 12px; color: #d3e0f3; gap: 9px; }
  .nav-item svg { width: 18px; height: 18px; }
  .nav-item.is-active { color: #fff; background: #ffffff0c; box-shadow: inset 0 -3px #61acff; }
  .nav-item:hover { background: #ffffff14; }
  .league-ribbon { justify-content: flex-start; padding-inline: var(--gutter); min-height: 45px; font-size: 12px; gap: 16px; }
  .ribbon-format { display: block; margin-left: auto; font-weight: 500; font-size: 11px; color: var(--muted); letter-spacing: .06em; }
  .source-state { min-height: 44px; height: auto; padding-block: 12px; font-size: 10px; justify-content: flex-start; }
  .content { gap: 20px; }
  .card h2 { font-size: 15px; }
  .pulse-heading, .selected-heading, .matches-heading, .podium-heading, .module-heading { min-height: 48px; padding-block: 15px; }
  .pulse-body { height: 108px; gap: 10px; }
  .league-summary h3 { font-size: 12px; }
  .league-summary strong { font-size: 40px; }
  .league-summary span { font-size: 9px; }
  .points-tiebreak strong { font-size: 16px; }
  .points-tiebreak > p { font-size: 9px; }
  .pulse-footer { min-height: 36px; font-size: 11px; }
  .selected-card { scroll-margin-top: 70px; }
  .selected-card h2 { font-size: 13px; }
  .selected-body { min-height: 141px; padding-inline: 16px; }
  .selected-team > p { font-size: 14px; min-height: 34px; }
  .selected-scoreline > strong { font-size: 49px; }
  .breakdown-link { font-size: 12px; min-height: 45px; }
  .selected-card .projection-comparison { font-size: 13px; padding: 13px 18px; }
  .matches-list { grid-template-rows: repeat(12,minmax(51px,auto)); }
  .match-row { min-height: 51px; padding: 9px 14px; grid-template-columns: 20px minmax(0,1fr) 44px 10px 44px minmax(0,1fr) 73px 7px; column-gap: 7px; }
  .match-team { font-size: 14px; padding: 0; }
  .match-team:nth-child(6) { text-align: left; }
  .match-score { font-size: 19px; }
  .match-status { grid-column: auto; grid-row: auto; font-size: 8px; justify-content: center; }
  .match-chevron { grid-column: auto; grid-row: auto; }
  .podium-list { min-height: 0; padding: 0 16px; grid-template-rows: repeat(var(--podium-rows,3),minmax(52px,auto)); }
  .podium-list li { font-size: 12px; grid-template-columns: 24px minmax(0,1fr) 72px 32px 47px 0; }
  .podium-list strong { font-size: 14px; }
  .standings-table { font-size: 14px; }
  .standings-table .rank-col { width: 36px; }
  .standings-table .league-col { width: 83px; }
  .standings-table .stat-col { width: 34px; }
  .standings-table .pf-col { width: 59px; }
  .standings-table th { height: 40px; font-size: 11px; }
  .standings-table td, .team-link { height: 44px; }
  .league-cell { font-size: 12px; }
  .league-filters { grid-template-columns: repeat(3,1fr); }
  .league-filters button { font-size: 13px; }
  .season-facts strong { font-size: 40px; }
  .season-facts span { font-size: 11px; }
  .rule-copy, .card .rule-copy, .rules-definitions > div, .rules-table { font-size: 14px; }
  .dialog-heading { padding: 17px 22px; }
  .dialog-heading h2 { font-size: 23px; }
  .detail-scoreboard strong { font-size: 48px; }
  .detail-team-name { font-size: 18px; }
  .detail-scoreboard span { font-size: 12px; }
  .dialog-note, .detail-section-title { font-size: 14px; padding-inline: 22px; }
  .lineup-table { width: calc(100% - 44px); margin: 0 22px; font-size: 14px; }
  .lineup-table th:first-child { width: 50px; font-size: 12px; }
  .player-projection { font-size: 15px; }
  .projection-comparison { margin-inline: 22px; font-size: 14px; }
}
@media (min-width: 1100px) {
  .content[data-page='jornada'], .content[data-page='tabla'] { grid-template-columns: minmax(370px,.95fr) minmax(0,1.65fr); grid-template-rows: auto auto 1fr; }
  .content[data-page='jornada'] { grid-template-rows: auto auto auto 1fr; }
  [data-page='jornada'] .jornada-week-card { grid-column: 1 / -1; grid-row: 1; }
  [data-page='jornada'] .jornada-week-card .week-controls { max-width: 480px; margin-inline: auto; }
  [data-page='jornada'] .pulse-card { grid-row: 2; }
  [data-page='jornada'] .selected-card { grid-row: 3; }
  [data-page='jornada'] .podium-card { grid-row: 4; }
  [data-page='jornada'] .matches-card { grid-row: 2 / 5; }
  .content[data-page='calendario'] { grid-template-columns: minmax(350px,.85fr) minmax(0,1.65fr); }
  .rules-intro, .rules-notes { gap: 20px; }
}
@media (max-width: 359px) {
  :root { --gutter: 10px; --card-pad: 10px; }
  .brand-mark { width: 29px; }
  .brand-lockup { gap: 7px; }
  .brand-block h1 { font-size: 25px; }
  .brand-kicker { font-size: 8px; }
  .top-status, .top-status.is-pending { font-size: 8px; padding-inline: 6px; }
  .pulse-body { gap: 5px; grid-template-columns: minmax(0,1fr) 1px 75px 1px minmax(0,1fr); }
  .league-summary h3 { font-size: 9px; }
  .league-summary p { gap: 3px; }
  .league-summary span { font-size: 8px; }
  .selected-body { gap: 5px; grid-template-columns: minmax(0,1fr) 1px 65px 1px minmax(0,1fr); padding-inline: 9px; }
  .selected-scoreline > strong { font-size: 36px; }
  .selected-team > p { font-size: 11px; }
  .podium-list li { gap: 5px; grid-template-columns: 22px minmax(0,1fr) 56px 25px 40px 0; font-size: 10px; }
  .podium-list strong { font-size: 11px; }
  .standings-table .league-col { width: 52px; }
  .standings-table .stat-col { width: 20px; }
  .standings-table { font-size: 11px; }
  .league-cell { font-size: 9px; }
}
