/* The pages of the Loptashi instance (docs/LOPTASHI-LIGA.md section 3), over site.css: the same palette and type, the leaf green of the Loptashi viewer
   as the page accent (masterplan section 10.3: --mode is --leaf on html[data-game=loptashi]). Nothing here reaches a Shtemeri page. */
html[data-game='loptashi'] { --mode: var(--leaf); --mode-hi: #b9f0a0; --mode-hi2: #aeea92; --mode-glow: var(--leaf-glow); --mode-wash: var(--leaf-wash); --mode-bg: rgba(158, 227, 125, 0.075);
  --mode-hover: rgba(158, 227, 125, 0.045); --mode-hover2: rgba(158, 227, 125, 0.05); --mode-faint: rgba(158, 227, 125, 0.015); --mode-cur: rgba(158, 227, 125, 0.06); --mode-flash: rgba(158, 227, 125, 0.22); }

/* the brand: the stripe and the glow of the viewer's wordmark in leaf green */
html[data-game='loptashi'] .brand { text-shadow: 0 0 22px rgba(158, 227, 125, 0.22); }
html[data-game='loptashi'] .brand::after { background: repeating-linear-gradient(-45deg, var(--leaf) 0 5px, transparent 5px 10px); }

/* ------------------------------------------------------------------ blocks */
.lp-sec { margin: 0 0 clamp(28px, 4vw, 44px); }
.lp-h { font: 800 22px/1 var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--paper); margin: 0 0 14px; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.lp-h .more { margin-left: auto; font: 400 11.5px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.lp-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 36px); align-items: start; }
.lp-grid > * { min-width: 0; }
@media (max-width: 900px) { .lp-grid { grid-template-columns: minmax(0, 1fr); } }
.lp-box { border: 1px solid var(--line); background: linear-gradient(180deg, rgba(255,255,255,.018), transparent); padding: 16px 18px; }
.lp-sub { font: 400 11.5px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.lp-meta { color: var(--muted); font-size: 15px; }
.lp-quote { margin: 0; padding: 12px 16px; border-left: 3px solid var(--mode); background: var(--mode-wash); color: var(--paper); font-size: 16px; }
.lp-quote .by { display: block; margin-top: 8px; font: 400 11.5px/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

/* ------------------------------------------------------------------ a club: colour bar and name */
.lp-team { display: inline-flex; align-items: center; gap: 9px; min-width: 0; color: inherit; text-decoration: none; }
.lp-team .chip { height: 18px; }
.lp-team .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.lp-team:hover .nm { color: var(--mode); }
.lp-team.big .chip { width: 8px; height: 30px; }
.lp-team.big .nm { font: 800 clamp(26px, 4vw, 36px)/1 var(--display); letter-spacing: .06em; text-transform: uppercase; padding-top: .12em; }

/* ------------------------------------------------------------------ the stage: the viewer in a frame */
.lp-stage { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #05070a; border: 1px solid var(--line-strong); box-shadow: 0 18px 60px rgba(0,0,0,.45); }
.lp-stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
@media (max-width: 600px) { .lp-stage { aspect-ratio: 4 / 3; } }
.lp-stage-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 12px; }
.lp-stage-bar .vs { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1 1 280px; flex-wrap: wrap; }
.lp-stage-bar .sc { font: 900 26px/1 var(--display); letter-spacing: .06em; color: var(--paper); font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ a match line: home, score, away */
.lp-fx { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.lp-fx:last-child { border-bottom: 0; }
.lp-fx .home { justify-self: end; text-align: right; }
.lp-fx .home .lp-team { flex-direction: row-reverse; }
.lp-fx .sc { min-width: 4.4em; text-align: center; font: 700 15px/1 var(--mono); font-variant-numeric: tabular-nums; color: var(--paper); padding: 6px 8px; border: 1px solid var(--line); }
a.lp-fx:hover { background: var(--mode-hover); }
a.lp-fx:hover .sc { border-color: var(--mode); color: var(--mode); }
.lp-fx.live .sc { border-color: var(--mode); color: var(--mode); }
.lp-fx.sched .sc { color: var(--muted); }
.lp-fx .when { grid-column: 1 / -1; justify-self: center; font: 400 11px/1 var(--mono); letter-spacing: .1em; color: var(--muted); margin-top: -2px; }
.lp-fx .lp-team .chip { height: 14px; width: 5px; }

/* the rounds of the league */
.lp-rounds { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: 16px; }
.lp-round { border: 1px solid var(--line); }
.lp-rounds { align-items: start; }
.lp-round > summary { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 10px 12px; cursor: pointer; list-style: none; }
.lp-round > summary::-webkit-details-marker { display: none; }
.lp-round > summary::after { content: '+'; font: 700 14px/1 var(--mono); color: var(--muted); margin-left: 8px; }
.lp-round[open] > summary::after { content: '−'; }
.lp-round[open] > summary { border-bottom: 1px solid var(--line-strong); }
.lp-round > summary:hover b { color: var(--mode); }
.lp-round > summary b { font: 800 18px/1 var(--display); letter-spacing: .12em; text-transform: uppercase; margin-right: auto; }
.lp-round.current { border-color: var(--mode); box-shadow: 0 0 0 1px var(--mode-wash), 0 0 30px var(--mode-faint); }
.lp-round.current > summary b { color: var(--mode); }

/* ------------------------------------------------------------------ the table */
.lp-table td.team { max-width: 260px; }
.lp-table .mgr { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; padding-left: 15px; }
.lp-table .pts { font-weight: 700; color: var(--paper); }
.lp-table tr.top td:first-child { box-shadow: inset 3px 0 0 var(--mode); }
@media (max-width: 640px) {
  .lp-table { font-size: 14.5px; }
  .lp-table td, .lp-table th { padding: 10px 7px; }
  .lp-table .opt { display: none; }      /* the columns a phone does without: W-D-L and the goals stay in the club page */
  .lp-table td.team { max-width: 150px; }
  .lp-foot.opt { display: none; }       /* the note on the rating column, hidden with it */
}
.lp-foot { margin: 8px 2px 0; font-size: 13px; }

/* form: a pill per match */
.lp-form { display: inline-flex; gap: 3px; }
.lp-form i { display: inline-grid; place-items: center; width: 20px; height: 20px; font: 700 11px/1 var(--mono); font-style: normal; color: var(--ink); }
.lp-form .fW { background: var(--leaf); }
.lp-form .fD { background: #8d95a2; }
.lp-form .fL { background: #ff6b7a; }

/* ------------------------------------------------------------------ the five */
.lp-five { list-style: none; margin: 0; padding: 0; }
.lp-five li { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.lp-five li:last-child { border-bottom: 0; }
.lp-five .slot { display: inline-grid; place-items: center; width: 26px; height: 26px; border: 1px solid var(--line-strong); font: 700 13px/1 var(--mono); color: var(--paper-2); flex: none; }
.lp-five li.keeper .slot { border-color: var(--mode); color: var(--mode); }
.lp-five a { color: var(--paper); text-decoration: none; }
.lp-five a:hover { color: var(--mode); }
.badge.keeper { border-color: var(--mode); color: var(--mode); }

/* ------------------------------------------------------------------ cards (managers, players) */
.lp-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 16px; }
.lp-card { border: 1px solid var(--line); padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; background: linear-gradient(180deg, rgba(255,255,255,.02), transparent); }
.lp-card h3 { margin: 0; font: 800 24px/1 var(--display); letter-spacing: .08em; text-transform: uppercase; }
.lp-card h3 a { color: var(--paper); text-decoration: none; }
.lp-card h3 a:hover { color: var(--mode); }
.lp-card p { margin: 0; color: var(--paper-2); }
.lp-card .clubs, .lp-box .clubs { display: flex; flex-wrap: wrap; gap: 8px 16px; }

/* stat tiles */
.lp-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.lp-stats > div { background: var(--bg); padding: 12px 14px; }
.lp-stats b { display: block; font: 900 30px/1 var(--display); letter-spacing: .04em; color: var(--paper); font-variant-numeric: tabular-nums; }
.lp-stats span { font: 400 11px/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* the decisions of a manager */
.lp-decisions { list-style: none; margin: 0; padding: 0; }
.lp-decisions > li { border-left: 2px solid var(--line-strong); padding: 0 0 22px 18px; position: relative; }
.lp-decisions > li::before { content: ''; position: absolute; left: -6px; top: 4px; width: 10px; height: 10px; background: var(--mode); }
.lp-decisions .head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-bottom: 8px; }
.lp-decisions .names { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.lp-decisions .names a, .lp-decisions .names span { font: 400 13px/1 var(--mono); padding: 6px 8px 5px; border: 1px solid var(--line); color: var(--paper-2); text-decoration: none; }
.lp-decisions .names .k { border-color: var(--mode); color: var(--mode); }

/* a player's lines: the description and the boost */
.lp-desc { color: var(--paper-2); }
.lp-boost { font: 400 13.5px/1.45 var(--mono); color: var(--mode); }
.lp-boost::before { content: '// boost: '; color: var(--muted); }
.lp-players td.desc { min-width: 220px; max-width: 420px; color: var(--paper-2); font-size: 14.5px; }
.lp-players td.desc .lp-boost { display: block; margin-top: 4px; font-size: 12.5px; }
@media (max-width: 640px) {
  .lp-players .opt { display: none; }
  .lp-players td.desc { min-width: 0; }
  .lp-players th.num { white-space: normal; letter-spacing: .06em; }
  .lp-players td, .lp-players th { padding-left: 7px; padding-right: 7px; }
}

/* the match page: the two sides of the stats */
.lp-vs-stats { width: 100%; border-collapse: collapse; font-size: 15px; }
.lp-vs-stats td { padding: 9px 10px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.lp-vs-stats td:first-child { text-align: right; width: 30%; font-family: var(--mono); }
.lp-vs-stats td:last-child { text-align: left; width: 30%; font-family: var(--mono); }
.lp-vs-stats td.k { text-align: center; color: var(--muted); font: 400 11px/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.lp-score-big { display: flex; align-items: center; justify-content: center; gap: clamp(12px, 3vw, 28px); flex-wrap: wrap; margin: 6px 0 18px; }
.lp-score-big .sc { font: 900 clamp(44px, 8vw, 72px)/1 var(--display); color: var(--paper); font-variant-numeric: tabular-nums; }
/* ------------------------------------------------------------------ the training ground (/trening, /trening/{id}, the card on /igrac/{id}) */
.lp-tr-top { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
@media (max-width: 900px) { .lp-tr-top { grid-template-columns: minmax(0, 1fr); } }
.lp-card.lp-drill h3 { font: 600 17px/1.35 var(--text); letter-spacing: 0; text-transform: none; color: var(--paper); }
.lp-card.lp-drill p { font-size: 14.5px; }
.lp-drill .lp-sub { margin-top: auto; padding-top: 6px; }
.lp-top { list-style: none; margin: 0; padding: 0; counter-reset: top; }
.lp-top li { display: flex; align-items: baseline; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); counter-increment: top; min-width: 0; }
.lp-top li:last-child { border-bottom: 0; }
.lp-top li::before { content: counter(top); font: 400 12px/1 var(--mono); color: var(--muted); min-width: 1em; }
.lp-top li.dim::before { content: none; }
.lp-top a { color: var(--paper); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-top a:hover { color: var(--mode); }
.lp-top .res, .lp-kart .res { margin-left: auto; font: 600 13.5px/1.2 var(--mono); color: var(--mode); white-space: nowrap; font-variant-numeric: tabular-nums; }
.lp-tr-runs td.drill { min-width: 180px; max-width: 320px; font-size: 14.5px; }
.lp-tr-runs td.drill a { color: var(--paper); text-decoration: none; }
.lp-tr-runs td.drill a:hover { color: var(--mode); }
.lp-tr-runs .pts { font-weight: 700; color: var(--paper); white-space: nowrap; }
@media (max-width: 640px) {
  .lp-tr-runs .opt { display: none; }
  .lp-tr-runs td, .lp-tr-runs th { padding-left: 7px; padding-right: 7px; }
  .lp-tr-runs td.drill { min-width: 130px; }
}
.lp-runs { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); }
.lp-runs li { display: grid; grid-template-columns: 1.6em auto 3.2em minmax(0, 1fr) auto; gap: 8px 12px; align-items: center; padding: 11px 12px; border-bottom: 1px solid var(--line); }
.lp-runs li:last-child { border-bottom: 0; }
.lp-runs .k { font: 400 13px/1 var(--mono); color: var(--muted); text-align: right; }
.lp-runs .at { font: 600 14px/1 var(--mono); color: var(--paper); font-variant-numeric: tabular-nums; }
.lp-runs .txt { font-size: 14.5px; color: var(--paper-2); min-width: 0; overflow-wrap: anywhere; }
.lp-runs .txt small { display: block; margin-top: 4px; font-size: 12.5px; color: var(--muted); }
@media (max-width: 600px) {
  .lp-runs li { grid-template-columns: 1.6em auto minmax(0, 1fr) auto; }
  .lp-runs .txt { grid-column: 2 / -1; grid-row: 2; }
}
.lp-stats .st .badge { font-size: 12px; }
.lp-kart ul { list-style: none; margin: 10px 0 0; padding: 0; }
.lp-kart li { display: flex; align-items: baseline; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.lp-kart li:last-child { border-bottom: 0; }
.lp-kart li a, .lp-kart li > span:first-child { color: var(--paper-2); text-decoration: none; min-width: 0; }
.lp-kart li a:hover { color: var(--mode); }
.lp-kart .res.dim { color: var(--dim); }
