/* Footstral · dugout
   Visual direction "pitch telemetry / broadcast":
   neutral charcoal surfaces to keep the domain states perfectly readable
   (grass, operational green, watch amber, critical red). */

:root {
  --bg: #0b0d10;
  --bg-2: #0f1217;
  --panel: #13171d;
  --panel-2: #191e26;
  --line: #232a35;
  --line-2: #303948;
  --text: #eef1f4;
  --muted: #8a95a5;
  --green: #2ec27e;
  --green-btn: #249661;
  --green-deep: #153e2a;
  --amber: #e5a93c;
  --red: #e5484d;
  --red-soft: #ff7a7d;
  --opp: #6c788a;
  --teal: #38bdf8;

  --f-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --f-body: "Barlow Semi Condensed", "Arial Narrow", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --r: 6px;
  --gap: 12px;
  --top-h: 58px;
  --replay-h: 62px;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  height: 100vh;
  display: grid;
  grid-template-rows: var(--top-h) minmax(0, 1fr) var(--replay-h);
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.4 var(--f-body);
  font-variant-numeric: tabular-nums;
}

a {
  color: var(--text);
  text-underline-offset: 3px;
}

h1,
h2,
h3 {
  margin: 0;
}


.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 20;
  background: var(--text);
  color: var(--bg);
  padding: 8px 12px;
  border-radius: 4px;
  font-weight: 600;
}

.skip:focus {
  top: 10px;
}

.muted {
  color: var(--muted);
}

.empty {
  color: var(--muted);
  padding: 24px 4px;
}

/* ------------------------------------------------------------ top bar */
.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
}

.top-left {
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  font: 700 24px/1 var(--f-display);
  letter-spacing: .04em;
  text-decoration: none;
  color: var(--text);
}

.brand-sub {
  color: #b7c0cc;
  font-weight: 600;
}

.brand-tag {
  margin-left: 2px;
  padding: 2px 5px;
  font: 600 10px/1 var(--f-mono);
  letter-spacing: .08em;
  color: var(--amber);
  border: 1px solid rgba(229, 169, 60, .4);
  border-radius: 3px;
}

.nav {
  display: flex;
  gap: 4px;
  height: 100%;
  align-items: center;
}

.pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  font: 600 14px/1 var(--f-display);
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 4px;
}

.pill:hover {
  color: var(--text);
  background: rgba(255, 255, 255, .03);
}

.pill[aria-current="page"] {
  color: var(--text);
  font-weight: 700;
  background: var(--panel-2);
  border-color: var(--line-2);
}

.scorebox {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 5px 8px 5px 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
  font-family: var(--f-display);
}

.scorebox .team-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.club-crest {
  width: 17px;
  height: 22px;
  object-fit: contain;
  display: block;
  flex: none;
}

.club-crest.away {
  width: 14px;
  filter: brightness(0) invert(.92);
}

.kit-pip {
  width: 8px;
  height: 14px;
  border-radius: 2px;
  flex: none;
}

.kit-pip.home {
  background: var(--green);
}

.kit-pip.away {
  background: var(--opp);
}

.scorebox .team {
  font: 700 17px/1 var(--f-display);
  letter-spacing: .08em;
  color: var(--text);
}

.scorebox .team-away {
  color: var(--muted);
}

.scorebox .goals {
  font: 700 26px/1 var(--f-mono);
  letter-spacing: -.02em;
  padding: 0 2px;
}

.scorebox .goals i {
  font-style: normal;
  color: var(--line-2);
  margin: 0 5px;
}

.score-vs {
  font: 700 12px/1 var(--f-mono);
  color: var(--muted);
  letter-spacing: .08em;
  padding: 0 4px;
}

.scorebox .minute {
  margin-left: 4px;
  font: 600 14px/1 var(--f-mono);
  color: var(--green);
  background: rgba(46, 194, 126, .1);
  border: 1px solid rgba(46, 194, 126, .3);
  border-radius: 4px;
  padding: 5px 8px;
}

.scorebox .minute.prematch-tag {
  color: var(--muted);
  background: var(--panel-2);
  border-color: var(--line-2);
  font-size: 11.5px;
  letter-spacing: .04em;
}

.top-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.icon-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: var(--muted);
  background: none;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
}

.icon-btn:hover,
.icon-btn[aria-expanded="true"] {
  color: var(--text);
  background: var(--panel);
  border-color: var(--line);
}

.sys {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 9px;
  font: 500 11.5px/1 var(--f-mono);
  color: var(--muted);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  white-space: nowrap;
}

.sys i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
}

.sys.ok {
  color: var(--green);
  border-color: rgba(46, 194, 126, .28);
}

.sys.ok i {
  background: var(--green);
}

.sys.demo {
  color: var(--amber);
  border-color: rgba(229, 169, 60, .28);
}

.sys.demo i {
  background: var(--amber);
}

.sys.down {
  color: var(--red-soft);
  border-color: rgba(229, 72, 77, .35);
}

.sys.down i {
  background: var(--red);
}

.gear-wrap {
  position: relative;
}

.dot-ok {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
}

.dot-ok.ok {
  background: var(--green);
}

.dot-ok.demo {
  background: var(--amber);
}

.dot-ok.down {
  background: var(--red);
}

.menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 10;
  width: 300px;
  padding: 14px 16px;
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  box-shadow: 0 16px 36px rgba(0, 0, 0, .55);
}

.menu h3 {
  font: 600 13px/1 var(--f-display);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.menu li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-top: 1px solid var(--line);
}

.menu li:first-child {
  border-top: 0;
}

.menu li i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.menu li.up i {
  background: var(--green);
}

.menu li.down i {
  background: var(--red);
}

.menu li span {
  margin-left: auto;
  color: var(--muted);
  font: 500 12px/1 var(--f-mono);
}

.menu-note {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--muted);
}

/* ------------------------------------------------------------ main area */
main {
  overflow: auto;
  padding: 14px 18px;
  outline: none;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 12px 14px;
}

.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.panel-head h2 {
  font: 700 16px/1.1 var(--f-display);
  letter-spacing: .07em;
  text-transform: uppercase;
  color: #dce2ea;
}

.meta {
  color: var(--muted);
  font-size: 13px;
}

.panel-foot {
  margin: 8px 0 0;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12.5px;
}

/* ------------------------------------------------------------ buttons, chips, bars */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font: 600 14px/1 var(--f-body);
  padding: 10px 14px;
  border-radius: 4px;
  border: 1px solid transparent;
  cursor: pointer;
  color: var(--text);
  background: none;
}

.btn.go {
  background: var(--green-btn);
  color: #fff;
}

.btn.go:hover {
  background: #2aa76d;
}

.btn.ghost {
  border-color: var(--line-2);
  background: var(--panel-2);
}

.btn.ghost:hover {
  border-color: #465366;
}

.btn.link {
  color: var(--muted);
  padding-left: 6px;
  padding-right: 6px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.btn.link:hover {
  color: var(--text);
}

.btn.box {
  padding: 6px 9px;
  font: 600 12px/1 var(--f-mono);
  border-color: var(--line-2);
  color: var(--muted);
  border-radius: 4px;
}

.btn.box[aria-pressed="true"] {
  color: var(--bg);
  background: var(--amber);
  border-color: var(--amber);
  font-weight: 700;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  font: 600 11.5px/1.2 var(--f-body);
  letter-spacing: .02em;
  border-radius: 3px;
  white-space: nowrap;
  color: var(--muted);
  background: var(--panel-2);
  border: 1px solid var(--line-2);
}

.chip.ok {
  color: var(--green);
  background: rgba(46, 194, 126, .09);
  border-color: rgba(46, 194, 126, .28);
}

.chip.watch {
  color: var(--amber);
  background: rgba(229, 169, 60, .1);
  border-color: rgba(229, 169, 60, .32);
}

.chip.out {
  color: var(--red-soft);
  background: rgba(229, 72, 77, .12);
  border-color: rgba(229, 72, 77, .38);
}

.bar {
  position: relative;
  display: inline-block;
  width: 100%;
  height: 5px;
  border-radius: 2px;
  background: #232a35;
  overflow: hidden;
  vertical-align: middle;
}

.bar i {
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(var(--v) * 1%);
  border-radius: inherit;
  background: var(--green);
}

.bar.out i {
  background: var(--red);
}

.bar.watch i {
  background: var(--amber);
}

.avatar {
  flex: none;
  display: block;
  border-radius: 50%;
  background: #1d232c;
  object-fit: cover;
  object-position: 50% 16%;
  border: 1.5px solid var(--line-2);
}

.avatar.out {
  border-color: rgba(229, 72, 77, .7);
}

.avatar.in {
  border-color: rgba(46, 194, 126, .7);
}

/* ------------------------------------------------------------ match view */
.match-grid {
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.68fr) minmax(380px, 1fr);
  gap: var(--gap);
}

.pitch-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.timestral-model { white-space: nowrap; }
.timestral-model select { margin-left: 4px; padding: 4px; color: var(--text); background: var(--panel-2); border: 1px solid var(--line); color-scheme: dark; }

.pitch-box {
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  border-radius: 4px;
  background: #0e2618;
  border: 1px solid #1d3c2a;
  overflow: hidden;
}

.pitch-box.hovering {
  cursor: pointer;
}

.pitch {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 100%;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 12.5px;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.sw {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.sw.ok {
  background: var(--green-deep);
  box-shadow: inset 0 0 0 2px var(--green);
}

.sw.watch {
  background: var(--green-deep);
  box-shadow: inset 0 0 0 2px var(--amber);
}

.sw.out {
  background: #5a1f1b;
  box-shadow: inset 0 0 0 2px var(--red);
}

.sw.opp {
  background: #2c3542;
  box-shadow: inset 0 0 0 1.5px #9aa6b8;
}

.legend .source {
  margin-left: auto;
  font-size: 12px;
  opacity: .75;
}

/* pitch */
.pitch .lines rect,
.pitch .lines line,
.pitch .lines circle,
.pitch .lines path {
  fill: none;
  stroke: rgba(238, 241, 244, .42);
  stroke-width: .26;
}

.pitch .lines .spot {
  fill: rgba(238, 241, 244, .55);
  stroke: none;
}

.pitch .goal-net {
  fill: rgba(238, 241, 244, .06);
  stroke: rgba(238, 241, 244, .32);
  stroke-width: .22;
}

.pitch .opp {
  fill: #2b3442;
  stroke: #9ca7b8;
  stroke-width: .28;
}

.pitch .pl .dot {
  fill: #123624;
  stroke: rgba(255, 255, 255, .18);
  stroke-width: .15;
}

.pitch .pl .track {
  fill: none;
  stroke: rgba(255, 255, 255, .14);
  stroke-width: .1;
}

.pitch .pl .arc {
  fill: none;
  stroke: var(--green);
  stroke-width: .3;
  stroke-linecap: round;
}

.pitch .pl.fresh .arc {
  stroke: #5ce0a0;
}

.pitch .pl.watch .arc {
  stroke: var(--amber);
}

.pitch .pl.out .dot {
  fill: #581b1e;
}

.pitch .pl.out .arc {
  stroke: var(--red);
}

.pitch .pl .num {
  fill: #fff;
  font: 700 1.9px/1 var(--f-mono);
  text-anchor: middle;
  pointer-events: none;
}

.pitch .pl .ring2 {
  fill: none;
  stroke: #fff;
  stroke-width: .3;
  opacity: .9;
}

.pitch .callout rect {
  fill: rgba(11, 13, 16, .95);
  stroke: var(--line-2);
  stroke-width: .22;
}

.pitch .callout .callout-accent {
  stroke: none;
}

.pitch .callout .callout-accent.ok {
  fill: var(--green);
}

.pitch .callout .callout-accent.watch {
  fill: var(--amber);
}

.pitch .callout .callout-accent.out {
  fill: var(--red);
}

.pitch .callout path {
  fill: rgba(11, 13, 16, .95);
  stroke: var(--line-2);
  stroke-width: .2;
}

.pitch .callout text {
  fill: var(--text);
  font: 600 2.3px/1 var(--f-mono);
  text-anchor: middle;
}

.pitch .ball {
  fill: #fff;
  stroke: #0b0d10;
  stroke-width: .28;
}

/* right column */
.side {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  min-height: 0;
}

/* substitution card */
.board.alert {
  border-color: rgba(229, 72, 77, .45);
}

.board-min {
  color: var(--red-soft);
  margin-left: 6px;
  font-family: var(--f-mono);
  font-size: 14px;
}

.board-count {
  color: var(--amber);
  font: 600 13px/1 var(--f-mono);
}

.sub-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
}

.sub-card {
  display: grid;
  gap: 7px;
  padding: 8px 10px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  text-decoration: none;
  min-width: 0;
}

.sub-card:hover {
  border-color: var(--line-2);
}

.sub-card-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
}

.sub-metric {
  font: 600 12.5px/1 var(--f-mono);
  white-space: nowrap;
}

.sub-card.out .sub-dir,
.sub-card.out .sub-metric {
  color: var(--red-soft);
}

.sub-card.in .sub-dir,
.sub-card.in .sub-metric {
  color: var(--green);
}

.sub-card-who {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.sub-mid {
  display: grid;
  justify-items: center;
  gap: 3px;
  text-align: center;
}

.sub-arrow {
  color: var(--muted);
  font-size: 14px;
  line-height: 1;
}

.sub-delta {
  font: 600 11px/1 var(--f-mono);
  color: var(--green);
}

.board-picks {
  display: flex;
  gap: 4px;
}

.pick-btn {
  padding: 3px 7px;
  font: 600 11.5px/1 var(--f-mono);
  color: var(--muted);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 3px;
  cursor: pointer;
}

.pick-btn:hover {
  color: var(--text);
  border-color: var(--line-2);
}

.pick-btn[aria-pressed="true"] {
  color: var(--text);
  background: var(--line);
  border-color: var(--line-2);
}

.board-sep {
  color: var(--line-2);
  margin: 0 3px;
}

.sub-row {
  display: grid;
  grid-template-columns: 44px 36px minmax(0, 1fr) 114px;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  text-decoration: none;
}

.sub-row:hover {
  border-color: var(--line-2);
}

.sub-dir {
  font: 700 13px/1 var(--f-mono);
  letter-spacing: .04em;
  text-transform: uppercase;
}

.sub-row.out .sub-dir {
  color: var(--red-soft);
}

.sub-row.in .sub-dir {
  color: var(--green);
}

.sub-who {
  display: grid;
  min-width: 0;
}

.sub-who b {
  font-weight: 600;
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sub-who small {
  color: var(--muted);
  font-size: 12.5px;
}

.sub-val {
  display: grid;
  gap: 5px;
  justify-items: end;
}

.sub-val b {
  font: 600 12.5px/1 var(--f-mono);
  white-space: nowrap;
}

.sub-row.out .sub-val b {
  color: var(--red-soft);
}

.sub-row.in .sub-val b {
  color: var(--green);
}

.sub-bridge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 4px;
  color: var(--muted);
  font: 600 11.5px/1 var(--f-mono);
}

.sub-bridge::before,
.sub-bridge::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.sub-bridge strong {
  color: var(--green);
  font-weight: 600;
}

.board-eta {
  margin: 10px 0 11px;
  font-size: 13.5px;
  color: var(--muted);
}

.board-eta strong,
.board-eta b {
  color: var(--red-soft);
  font-weight: 700;
}

.board-eta .range {
  color: var(--muted);
  font-weight: 400;
  font-family: var(--f-mono);
  font-size: 13px;
}

.board-reason {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13.5px;
}

.board-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.board-actions .btn.go {
  flex: 1 1 auto;
}

.board.calm.compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
}

.board.calm.compact h2 {
  font: 700 15px/1.1 var(--f-display);
  letter-spacing: .07em;
  text-transform: uppercase;
  color: #dce2ea;
}

.board.calm .board-note {
  margin: 0;
  color: var(--muted);
}

.board.calm .board-note a {
  color: var(--text);
}

/* reserve list */
.reserve-panel {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.res-list {
  list-style: none;
  margin: 0 -4px;
  padding: 0 4px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
}

.res-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) minmax(68px, 104px) 52px 88px;
  align-items: center;
  gap: 10px;
  padding: 6px 6px;
  border-top: 1px solid var(--line);
  text-decoration: none;
}

.res-list li:first-child .res-row {
  border-top: 0;
}

.res-row:hover,
.res-row.is-hovered {
  background: var(--panel-2);
  border-radius: 4px;
}

.res-list.match-list .res-row {
  grid-template-columns: 20px 30px minmax(0, 1fr) minmax(68px, 102px) 44px;
  gap: 8px;
  padding: 5px 6px;
}

.res-list.match-list .res-row .avatar {
  width: 30px;
  height: 30px;
}

.res-num {
  font: 600 12px/1 var(--f-mono);
  color: var(--muted);
  text-align: right;
}

.res-row .avatar {
  width: 34px;
  height: 34px;
}

.res-row .who {
  display: grid;
  min-width: 0;
}

.res-row .who b {
  font-weight: 600;
  font-size: 14.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.res-row .who small {
  color: var(--muted);
  font-size: 12px;
}

.res-row .meter {
  display: grid;
  gap: 4px;
}

.res-row .meter small {
  color: var(--muted);
  font-size: 11.5px;
  white-space: nowrap;
}

.res-row .val {
  font: 600 14px/1 var(--f-mono);
  text-align: right;
}

.res-row.out .val {
  color: var(--red-soft);
}

.res-row.watch .val {
  color: var(--amber);
}

.res-row .chip {
  justify-self: end;
}

/* ------------------------------------------------------------ player profile */
.player {
  display: grid;
  gap: var(--gap);
}

.player-head {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.back {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}

.back:hover {
  color: var(--text);
}

.player-head .avatar {
  box-shadow: 0 0 0 2px var(--line-2);
}

.id h1 {
  font: 700 30px/1 var(--f-display);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.id h1 .shirt {
  color: var(--amber);
  margin-left: 6px;
  font-family: var(--f-mono);
  font-size: 22px;
}

.id p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13.5px;
}

.head-status {
  margin-left: auto;
  display: flex;
  gap: 10px;
  align-items: center;
}

.head-val {
  font: 600 16px/1 var(--f-mono);
  letter-spacing: .01em;
}

.star[aria-pressed="true"] {
  color: var(--amber);
  border-color: rgba(229, 169, 60, .5);
}

.player-grid {
  display: grid;
  gap: var(--gap);
  grid-template-columns: minmax(0, 1.7fr) minmax(340px, 1fr);
  grid-template-areas: "live side" "morning side";
  align-items: start;
}

.player-grid .live {
  grid-area: live;
}

.player-grid .side {
  grid-area: side;
}

.player-grid .morning {
  grid-area: morning;
}

.tabs[hidden] {
  display: none;
}

.tabs {
  display: flex;
  gap: 3px;
  padding: 3px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.tabs [role="tab"] {
  font: 600 13px/1 var(--f-display);
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
  background: none;
  border: 0;
  border-radius: 3px;
  padding: 5px 11px;
  cursor: pointer;
}

.tabs [aria-selected="true"] {
  color: var(--text);
  background: var(--line-2);
}

.cardio-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.cardio-controls input { color: var(--text); background: var(--panel-2); border: 1px solid var(--line); padding: 4px; color-scheme: dark; }
.cardio-sync { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); cursor: pointer; }

.chart-box {
  width: 100%;
  position: relative;
}

.chart {
  display: block;
  width: 100%;
  height: auto;
}

.chart .grid {
  stroke: var(--line);
  stroke-width: 1;
  stroke-dasharray: 2 3;
}

.chart .tick {
  fill: var(--muted);
  font: 11px var(--f-mono);
}

.chart .zone-crit {
  fill: rgba(229, 72, 77, .07);
}

.chart .thr {
  stroke: var(--red);
  stroke-width: 1.2;
  stroke-dasharray: 5 4;
}

.chart .thr-label {
  fill: var(--red-soft);
  font: 600 11px var(--f-mono);
}

.chart .cone {
  fill: rgba(229, 169, 60, .14);
}

.chart .median {
  fill: none;
  stroke: var(--amber);
  stroke-width: 1.8;
  stroke-dasharray: 4 3;
}

.chart .hist {
  fill: none;
  stroke: var(--green);
  stroke-width: 2.2;
  stroke-linejoin: round;
}

.chart .now {
  stroke: var(--muted);
  stroke-width: 1;
  stroke-dasharray: 3 3;
}

.chart .now-label {
  fill: var(--muted);
  font: 600 11px var(--f-mono);
}

.chart .cross {
  fill: var(--red);
  stroke: var(--panel);
  stroke-width: 2;
}

.chart .cross-label {
  fill: var(--red-soft);
  font: 700 12px var(--f-mono);
}

.chart .hover-line {
  stroke: rgba(238, 241, 244, .45);
  stroke-width: 1;
}

.chart .hover-dot {
  fill: var(--text);
  stroke: var(--bg);
  stroke-width: 2;
}

.chart-tip {
  position: absolute;
  top: 4px;
  left: 10px;
  pointer-events: none;
  padding: 4px 8px;
  background: rgba(11, 13, 16, .92);
  border: 1px solid var(--line-2);
  border-radius: 4px;
  font: 500 11.5px/1.3 var(--f-mono);
  color: var(--text);
}

.chart-tip[hidden] {
  display: none;
}

.caption {
  margin: 8px 0 0;
  color: #b9c4d0;
  font-size: 14px;
}

.caption b,
.caption strong {
  color: var(--text);
}

.caption .range {
  color: var(--muted);
  font-family: var(--f-mono);
  font-size: 13px;
}

.morning-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: auto minmax(180px, 1fr) minmax(0, 1.6fr);
  align-items: start;
}

.forme-score .big {
  font: 700 56px/.9 var(--f-mono);
  color: var(--green);
  letter-spacing: -.03em;
}

.forme-score small {
  color: var(--muted);
  font: 500 14px/1 var(--f-mono);
}

.factors {
  list-style: none;
  margin: 0;
  padding: 0;
}

.factors li {
  display: flex;
  gap: 8px;
  align-items: baseline;
  padding: 5px 0;
  border-top: 1px solid var(--line);
}

.factors li:first-child {
  border-top: 0;
}

.factors li span {
  color: var(--muted);
  flex: 1;
}

.factors li b {
  font-family: var(--f-mono);
  font-size: 13px;
}

.factors li em {
  font-style: normal;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--amber);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.factors li.flag b {
  color: var(--amber);
}

/* ------------------------------------------------------------ squad */
.squad-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 350px);
  gap: var(--gap);
  align-items: start;
}

.squad-main {
  min-width: 0;
}

.squad-side {
  display: grid;
  gap: var(--gap);
}

.table-wrap {
  overflow-x: auto;
}

.squad-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 740px;
}

.squad-table th,
.squad-table td {
  text-align: left;
  padding: 7px 8px;
  border-top: 1px solid var(--line);
  white-space: nowrap;
  vertical-align: middle;
}

.squad-table thead th {
  border-top: 0;
  color: var(--muted);
  font: 600 13px/1 var(--f-display);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.squad-table th button {
  all: unset;
  cursor: pointer;
}

.squad-table th button:hover {
  color: var(--text);
}



.squad-table th[aria-sort="ascending"] button::after {
  content: " ▲";
  color: var(--amber);
}

.squad-table th[aria-sort="descending"] button::after {
  content: " ▼";
  color: var(--amber);
}

.squad-table tbody tr:hover {
  background: var(--panel-2);
}

.squad-table .num {
  font: 700 16px/1 var(--f-mono);
  color: var(--muted);
}

.squad-table .bar {
  width: 72px;
}

.squad-table .val {
  margin-left: 6px;
  font: 600 13.5px/1 var(--f-mono);
}

.squad-table .mono {
  font: 500 13px/1 var(--f-mono);
}

.squad-table .hot {
  color: var(--amber);
  font-weight: 600;
}

.who-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.who-cell span {
  display: grid;
}

.who-cell b {
  font-weight: 600;
}

.who-cell small {
  color: var(--muted);
  font-size: 12px;
}

.who-cell:hover b {
  text-decoration: underline;
}

.spark {
  width: 96px;
  height: 26px;
  display: block;
}

.spark .thr {
  stroke: rgba(229, 72, 77, .55);
  stroke-dasharray: 3 2;
}

.spark .cone {
  fill: rgba(229, 169, 60, .2);
}

.spark .median {
  fill: none;
  stroke: var(--amber);
  stroke-width: 1.3;
}

.spark .hist {
  fill: none;
  stroke: var(--green);
  stroke-width: 1.5;
}

.kpi-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.kpi {
  padding: 9px 10px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  display: grid;
  gap: 3px;
}

.kpi-label {
  color: var(--muted);
  font: 600 11.5px/1 var(--f-display);
  letter-spacing: .07em;
  text-transform: uppercase;
}

.kpi-val {
  font: 700 24px/1.05 var(--f-mono);
  color: var(--text);
}

.kpi-val.ok {
  color: var(--green);
}

.kpi-val.watch {
  color: var(--amber);
}

.kpi-val.out {
  color: var(--red-soft);
}

.kpi-val span {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

.kpi-sub {
  color: var(--muted);
  font: 500 11.5px/1.2 var(--f-mono);
}

.kpi-sub.hot,
.stat-alerts .hot {
  color: var(--amber);
}

.dist-bar {
  display: flex;
  gap: 2px;
  height: 6px;
  border-radius: 2px;
  overflow: hidden;
  background: var(--line);
}

.dist-ok {
  background: var(--green);
}

.dist-watch {
  background: var(--amber);
}

.dist-out {
  background: var(--red);
}

.dist-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.dist-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.stat-alerts {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--muted);
}

.stat-alerts b {
  font-family: var(--f-mono);
  color: var(--text);
}

.line-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
}

.line-list li {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 74px;
  align-items: center;
  gap: 10px;
}

.line-name {
  font-size: 13px;
  color: var(--muted);
}

.line-vals {
  text-align: right;
  font: 600 12.5px/1 var(--f-mono);
  white-space: nowrap;
}

.line-vals small {
  color: var(--muted);
  font-weight: 500;
}

.mini-title {
  margin: 8px 0 5px;
  color: var(--muted);
  font: 600 11.5px/1 var(--f-display);
  letter-spacing: .07em;
  text-transform: uppercase;
}

.mini-title:first-of-type {
  margin-top: 0;
}

.mini-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mini-list li {
  border-top: 1px solid var(--line);
}

.mini-list li:first-child {
  border-top: 0;
}

.mini-list a {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 6px 4px;
  text-decoration: none;
  border-radius: 4px;
}

.mini-list a:hover {
  background: var(--panel-2);
}

.mini-num {
  font: 600 12px/1 var(--f-mono);
  color: var(--muted);
}

.mini-who {
  display: grid;
  min-width: 0;
}

.mini-who b {
  font-size: 13.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-who small {
  font-size: 11.5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ------------------------------------------------------------ replay and timeline */
.replay {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 20px;
  background: var(--bg-2);
  border-top: 1px solid var(--line);
}

.replay #play {
  min-width: 86px;
}

.clock {
  font: 700 19px/1 var(--f-mono);
  letter-spacing: -.01em;
  min-width: 68px;
}

.seek {
  position: relative;
  flex: 1;
  min-width: 160px;
  height: 40px;
  display: grid;
  align-items: center;
}

.seek label {
  display: block;
  width: 100%;
}

.marks {
  position: absolute;
  left: 0;
  right: 0;
  top: 3px;
  height: 10px;
  pointer-events: none;
}

.mark {
  position: absolute;
  top: 0;
  left: calc(7px + (100% - 14px) * var(--x));
  width: 3px;
  height: 8px;
  margin-left: -1.5px;
  border-radius: 1px;
  pointer-events: auto;
}

.mark.goal {
  background: var(--teal);
  height: 10px;
}

.mark.goal-away {
  background: var(--opp);
  height: 10px;
}

.mark.alert {
  background: var(--amber);
  height: 7px;
  top: 2px;
}

.mark.sub {
  background: var(--red);
  height: 10px;
}

.mark.snooze {
  background: #5a6472;
  width: 2px;
  height: 5px;
  margin-left: -1px;
  top: 3px;
}

.ruler {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  font: 500 10px/1 var(--f-mono);
  color: var(--muted);
  opacity: .7;
  pointer-events: none;
}

input[type="range"]#seek {
  --slider-track-size: 5px;
  --slider-thumb-size: 14px;
  --slider-track-radius: 2px;
  --slider-thumb-radius: 50%;
  --slider-track-color: #242b36;
  --slider-fill-color: var(--amber);
  --slider-thumb-color: #eef1f4;
  --slider-progress: var(--p, 0%);

  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 24px;
  margin: 2px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

input[type="range"]#seek::-webkit-slider-runnable-track {
  height: var(--slider-track-size);
  border-radius: var(--slider-track-radius);
  background: linear-gradient(to right, var(--slider-fill-color) var(--slider-progress), var(--slider-track-color) var(--slider-progress));
}

input[type="range"]#seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: var(--slider-thumb-size);
  height: var(--slider-thumb-size);
  margin-top: calc((var(--slider-track-size) - var(--slider-thumb-size)) / 2);
  border-radius: var(--slider-thumb-radius);
  background: var(--slider-thumb-color);
  border: 2.5px solid var(--slider-fill-color);
}

input[type="range"]#seek::-moz-range-track {
  height: var(--slider-track-size);
  border: 0;
  border-radius: var(--slider-track-radius);
  background: var(--slider-track-color);
}

input[type="range"]#seek::-moz-range-progress {
  height: var(--slider-track-size);
  border-radius: var(--slider-track-radius);
  background: var(--slider-fill-color);
}

input[type="range"]#seek::-moz-range-thumb {
  width: var(--slider-thumb-size);
  height: var(--slider-thumb-size);
  border-radius: var(--slider-thumb-radius);
  background: var(--slider-thumb-color);
  border: 2.5px solid var(--slider-fill-color);
}

input[type="range"]#seek:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

.speeds {
  display: flex;
  gap: 0;
}

.speeds .btn.box {
  border-radius: 0;
  margin-left: -1px;
}

.speeds .btn.box:first-child {
  margin-left: 0;
  border-top-left-radius: 4px;
  border-bottom-left-radius: 4px;
}

.speeds .btn.box:last-child {
  border-top-right-radius: 4px;
  border-bottom-right-radius: 4px;
}

.speeds .btn.box[aria-pressed="true"] {
  position: relative;
  z-index: 1;
}

/* ------------------------------------------------------------ "Details" dialog */
dialog {
  width: min(640px, calc(100vw - 32px));
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  padding: 18px 20px;
}

dialog:modal {
  overscroll-behavior: contain;
}

dialog::backdrop {
  background: rgba(6, 8, 11, .76);
  backdrop-filter: blur(3px);
  overflow: hidden;
  overscroll-behavior: contain;
}

.why-head h2 {
  font: 700 24px/1.1 var(--f-display);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.why-summary {
  margin: 12px 0;
  padding: 12px 14px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--amber);
  border-radius: 4px;
}

.why-summary p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.45;
}

.why-summary p+p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13.5px;
}

.why-tech {
  margin: 12px 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg-2);
}

.why-tech summary {
  cursor: pointer;
  padding: 9px 12px;
  font: 600 13px/1 var(--f-body);
  color: var(--muted);
  user-select: none;
}

.why-tech summary:hover {
  color: var(--text);
}

.why-tech[open] summary {
  border-bottom: 1px solid var(--line);
  color: var(--text);
}

.why-tech-body {
  padding: 12px;
}

.steps {
  margin: 0 0 10px;
  padding-left: 20px;
}

.steps li {
  margin-bottom: 10px;
}

.steps li::marker {
  font: 700 12px var(--f-mono);
  color: var(--amber);
}

.step-head {
  display: flex;
  gap: 10px;
  align-items: baseline;
}

.step-head .model {
  font: 500 11.5px var(--f-mono);
  color: var(--muted);
  border: 1px solid var(--line-2);
  border-radius: 3px;
  padding: 1px 6px;
}

.steps p {
  margin: 4px 0 0;
  color: #b7c0cc;
  font-size: 13.5px;
}

.steps pre {
  margin: 6px 0 0;
  padding: 9px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow-x: auto;
  font: 12px/1.4 var(--f-mono);
  color: #b7c0cc;
}

.why-foot {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
}

dialog form {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

/* ------------------------------------------------------------ notifications */
.toasts {
  position: fixed;
  right: 18px;
  bottom: calc(var(--replay-h) + 14px);
  display: grid;
  gap: 8px;
  z-index: 6;
}

.toast {
  margin: 0;
  padding: 10px 13px;
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--line-2);
  border-left: 3px solid var(--green);
  border-radius: 4px;
  font-weight: 500;
  max-width: 380px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .5);
}

/* ------------------------------------------------------------ small screens */
@media (max-width: 1180px) {
  .squad-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .squad-side {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }
}

@media (max-width: 1100px) {
  .sys span {
    display: none;
  }
}

@media (max-width: 980px) {
  body {
    height: auto;
    min-height: 100vh;
    grid-template-rows: auto auto auto;
  }

  .topbar {
    grid-template-columns: 1fr auto;
    padding: 10px 16px;
    row-gap: 10px;
  }

  .scorebox {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: center;
  }

  .top-right {
    grid-column: 2;
    grid-row: 1;
  }

  main {
    overflow: visible;
    padding-bottom: 90px;
  }

  .match-grid {
    height: auto;
    grid-template-columns: minmax(0, 1fr);
  }

  .pitch-box {
    aspect-ratio: 113 / 76;
  }

  .res-list {
    max-height: 420px;
  }

  .player-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "side" "live" "morning";
  }

  .morning-grid {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .morning-grid .chart-box {
    grid-column: 1 / -1;
  }

  .replay {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5;
    flex-wrap: wrap;
    gap: 8px 12px;
    padding: 8px 16px;
  }
}

@media (max-width: 640px) {
  main {
    padding: 12px 12px 130px;
  }

  .top-left {
    gap: 12px;
  }

  .brand {
    font-size: 20px;
  }

  .brand-tag {
    display: none;
  }

  .pill {
    padding: 6px 9px;
  }

  .sub-pair {
    grid-template-columns: minmax(0, 1fr);
  }

  .sub-mid {
    grid-auto-flow: column;
    justify-content: center;
    gap: 6px;
  }

  .sub-row {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .sub-row .sub-dir {
    grid-column: 1 / -1;
  }

  .sub-row .avatar {
    grid-row: 2;
  }

  .sub-val {
    grid-column: 1 / -1;
    justify-items: start;
  }

  .res-list.match-list .res-row,
  .res-list.match-list.roster-list .res-row,
  .res-list.match-list.roster-list.no-badges .res-row {
    grid-template-columns: 20px 30px minmax(0, 1fr) 44px;
  }

  .res-list.match-list .res-row .meter {
    grid-column: 3;
  }

  .res-list.match-list.roster-list .res-row .chip {
    grid-column: 4;
    justify-self: end;
  }

  .res-row {
    grid-template-columns: 34px minmax(0, 1fr) 52px;
  }

  .res-row .meter {
    grid-column: 2;
  }

  .res-row .chip {
    grid-column: 3;
    justify-self: end;
  }

  .head-status {
    margin-left: 0;
  }

  .seek {
    flex-basis: 100%;
    order: 5;
  }

  .toasts {
    left: 12px;
    right: 12px;
    bottom: 140px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

.star-mark {
  font-style: normal;
  color: var(--amber);
}

/* ------------------------------------------------------------ pre-match */
.sw.changed {
  background: transparent;
  box-shadow: none;
  border: 1.5px solid rgba(255, 255, 255, .9);
}

.pitch.lineup .pl {
  cursor: pointer;
}

.pitch.lineup .pl:focus-visible {
  outline: none;
}

body[data-view="prematch"] {
  grid-template-rows: var(--top-h) minmax(0, 1fr);
}

body[data-view="prematch"] .replay {
  display: none;
}

body[data-view="prematch"] .toasts {
  bottom: 18px;
}

@media (max-width: 980px) {
  body[data-view="prematch"] {
    grid-template-rows: auto auto;
  }

  body[data-view="prematch"] main {
    padding-bottom: 18px;
  }
}

.pitch.lineup .pl .focus-ring {
  fill: none;
  stroke: transparent;
  stroke-width: .3;
  opacity: .9;
}

.pitch.lineup .pl:hover .focus-ring,
.pitch.lineup .pl.is-hovered .focus-ring,
.pitch.lineup .pl:focus-visible .focus-ring {
  stroke: #fff;
}

.pitch .pl .pl-label {
  fill: #dce2ea;
  font: 600 1.75px/1 var(--f-mono);
  text-anchor: middle;
  paint-order: stroke;
  stroke: rgba(8, 20, 13, .85);
  stroke-width: .5px;
  pointer-events: none;
}

.res-group {
  padding: 10px 6px 4px;
  color: var(--muted);
  font: 700 12px/1 var(--f-display);
  letter-spacing: .1em;
  text-transform: uppercase;
}

.res-list .res-group:first-child {
  padding-top: 2px;
}

.res-group+li .res-row {
  border-top: 0;
}

.res-row .meter .risk.high {
  color: var(--red-soft);
}

.res-row .meter .risk.medium {
  color: var(--amber);
}

.res-list.match-list.roster-list .res-row {
  grid-template-columns: 20px 30px minmax(0, 1fr) minmax(64px, 92px) 38px 50px;
}

.res-list.match-list.roster-list.no-badges .res-row {
  grid-template-columns: 20px 30px minmax(0, 1fr) minmax(64px, 102px) 38px;
}

.res-list.match-list.roster-list .res-row.is-bench {
  opacity: .72;
}

.res-list.match-list.roster-list .res-row.is-bench:hover,
.res-list.match-list.roster-list .res-row.is-bench.is-hovered {
  opacity: 1;
}

/* ------------------------------------------------------------ Load Guard agent (pre-match) */
.prematch .side {
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.prematch .side>.panel {
  flex: none;
}

.board.lg {
  border-color: var(--line);
}

.lg-form label {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12.5px;
}

.lg-ask {
  display: flex;
  gap: 8px;
}

.lg-force {
  padding: 0 11px;
  font: 600 15px/1 var(--f-mono);
}

.lg-force[hidden] {
  display: none;
}

.lg-ask input {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  font: 500 14px/1.2 var(--f-body);
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--line-2);
  border-radius: 4px;
}

.lg-ask input:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 1px;
}

.btn:disabled,
input:disabled {
  opacity: .55;
  cursor: progress;
}

#lg-status:not(:empty) {
  margin-top: 12px;
}

.lg-running {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--text);
}

.lg-running b {
  font: 600 13.5px/1 var(--f-mono);
  color: var(--amber);
}

.lg-spin {
  flex: none;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(229, 169, 60, .25);
  border-top-color: var(--amber);
  border-radius: 50%;
  animation: lg-spin .9s linear infinite;
}

@keyframes lg-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .lg-spin {
    animation: none;
    border-color: var(--amber);
  }
}

.lg-error {
  margin: 10px 0 0;
  color: var(--red-soft);
  font-size: 13.5px;
}

.lg-warn {
  margin: 8px 0 0;
  color: var(--amber);
  font-size: 13px;
}

#lg-result:not(:empty) {
  margin-top: 12px;
}

.lg-summary-box {
  display: grid;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.lg-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.lg-kpi {
  display: grid;
  gap: 2px;
  padding: 7px 9px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.lg-kpi b {
  font: 700 20px/1 var(--f-mono);
  color: var(--text);
}

.lg-kpi span {
  font: 600 11.5px/1.1 var(--f-display);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}

.lg-kpi small {
  font: 500 11px/1.2 var(--f-mono);
  color: var(--muted);
}

.lg-notes {
  display: grid;
  gap: 4px;
  font-size: 12.5px;
  color: var(--text);
}

.lg-notes p {
  margin: 0;
}

.lg-notes span {
  color: var(--muted);
}

.lg-cap-badge {
  font: 600 12px/1.2 var(--f-mono);
}

.lg-cap-badge.ok {
  color: var(--green);
}

.lg-cap-badge.warn {
  color: var(--amber);
}

.lg-message {
  padding: 10px 12px;
  line-height: 1.45;
  font-size: 13px;
  color: #b7c0cc;
}

.lg-msg-list {
  margin: 0;
  padding-left: 16px;
  display: grid;
  gap: 6px;
}

.lg-msg-p {
  margin: 0;
}

.lg-summary {
  margin-top: 12px;
}

.lg-group {
  margin-top: 14px;
}

.lg-group h3,
.lg-group summary,
.lg-critic h3 {
  margin: 0 0 6px;
  color: var(--muted);
  font: 700 12px/1.2 var(--f-display);
  letter-spacing: .1em;
  text-transform: uppercase;
}

.lg-group summary {
  cursor: pointer;
}

.lg-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.lg-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  grid-template-areas: "pic who meta" "pic fc fc";
  align-items: center;
  gap: 4px 10px;
  padding: 7px 2px;
  border-top: 1px solid var(--line);
}

.lg-row.rest {
  opacity: .7;
}

.lg-row .avatar {
  grid-area: pic;
  align-self: start;
  margin-top: 2px;
}

.lg-row .who {
  grid-area: who;
  display: grid;
  min-width: 0;
}

.lg-meta {
  grid-area: meta;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.lg-row .who b {
  font-weight: 600;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lg-row .who a {
  color: inherit;
  text-decoration: none;
}

.lg-row .who a:hover b {
  text-decoration: underline;
}

.lg-row .who small {
  color: var(--muted);
  font: 500 11.5px/1.3 var(--f-mono);
}

.lg-row .who .lg-why {
  font-family: var(--f-body);
  font-size: 12px;
  color: var(--amber);
}

.lg-initials {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font: 700 11px/1 var(--f-mono);
}

.lg-risk.green {
  color: var(--green);
  background: rgba(46, 194, 126, .09);
  border-color: rgba(46, 194, 126, .28);
}

.lg-risk.orange {
  color: var(--amber);
  background: rgba(229, 169, 60, .1);
  border-color: rgba(229, 169, 60, .32);
}

.lg-risk.red {
  color: var(--red-soft);
  background: rgba(229, 72, 77, .12);
  border-color: rgba(229, 72, 77, .38);
}

.lg-min {
  font: 600 13px/1 var(--f-mono);
  text-align: right;
  min-width: 44px;
}

.lg-min small {
  color: var(--muted);
  font-weight: 500;
}

.lg-fc {
  grid-area: fc;
  display: flex;
  align-items: center;
  gap: 8px;
}

.lg-fc.none {
  color: var(--muted);
  font-size: 12px;
}

.lg-fc-num {
  font: 600 12px/1 var(--f-mono);
  white-space: nowrap;
}

.lg-fc-num small {
  color: var(--muted);
  font-weight: 500;
}

.lg-band {
  position: relative;
  flex: 1;
  max-width: 110px;
  height: 5px;
  background: #1d232c;
  border-radius: 3px;
}

.lg-band i {
  position: absolute;
  top: 0;
  height: 5px;
  background: rgba(46, 194, 126, .35);
  border-radius: 3px;
}

.lg-band b {
  position: absolute;
  top: -2px;
  width: 3px;
  height: 9px;
  margin-left: -1.5px;
  background: var(--green);
  border-radius: 1px;
}

.lg-critic {
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  font-size: 13.5px;
}

.lg-critic.caution {
  border-color: rgba(229, 169, 60, .4);
}

.lg-critic p {
  margin: 0;
}

.lg-critic ul {
  margin: 6px 0 0;
  padding-left: 18px;
  color: var(--amber);
}

.lg-tech {
  margin-top: 12px;
}

.lg-proof {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
}

.lg-proof p {
  margin: 0 0 6px;
}

.lg-proof p:last-child {
  margin-bottom: 0;
}

.lg-proof b {
  color: var(--text);
  font-weight: 600;
}

.lg-trace {
  color: var(--text);
}

.board.lg .board-note {
  margin: 12px 0 0;
}

.lg-decided.approved {
  color: var(--green);
}

.lg-decided.rejected {
  color: var(--red-soft);
}

.lg-decide {
  margin-top: 12px;
}

.lg-decide[hidden] {
  display: none;
}

.lg-elapsed {
  margin: 6px 0 0;
  color: var(--amber);
  font: 600 12.5px/1 var(--f-mono);
}

.lg-elapsed[hidden] {
  display: none;
}

.board.lg {
  container-type: inline-size;
}
