@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/api/assets/inter-cyrillic-ext') format('woff2');
  unicode-range: u+0460-052f,u+1c80-1c8a,u+20b4,u+2de0-2dff,u+a640-a69f,u+fe2e-fe2f;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/api/assets/inter-cyrillic') format('woff2');
  unicode-range: u+0301,u+0400-045f,u+0490-0491,u+04b0-04b1,u+2116;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/api/assets/inter-latin-ext') format('woff2');
  unicode-range: u+0100-02ba,u+02bd-02c5,u+02c7-02cc,u+02ce-02d7,u+02dd-02ff,u+0304,u+0308,u+0329,u+1d00-1dbf,u+1e00-1e9f,u+1ef2-1eff,u+2020,u+20a0-20ab,u+20ad-20c4,u+2113,u+2c60-2c7f,u+a720-a7ff;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/api/assets/inter-latin') format('woff2');
  unicode-range: u+00??,u+0131,u+0152-0153,u+02bb-02bc,u+02c6,u+02da,u+02dc,u+0304,u+0308,u+0329,u+2000-206f,u+20ac,u+2122,u+2191,u+2193,u+2212,u+2215,u+feff,u+fffd;
}
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/api/assets/geist-cyrillic-ext') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/api/assets/geist-cyrillic') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/api/assets/geist-latin-ext') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/api/assets/geist-latin') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
  color-scheme: dark;
  --font-heading: Geist, Inter, Arial, sans-serif;
  --font-body: Inter, Geist, Arial, sans-serif;
  font-family: var(--font-body);
  background: #050505;
  color: #fff;
  --base: #050505;
  --surface: #101010;
  --raised: #171717;
  --border: #232323;
  --muted: #a3a3a9;
  --acid: #f3f3f3;
  --warn: #ffaf8d;
  font-synthesis: none;
  font-variant-numeric: tabular-nums;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 300px; }
h1,h2,p { margin: 0; }
h1,h2 { font-family: var(--font-heading); font-weight: 500; letter-spacing: -.035em; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1.03; }
h2 { font-size: 1.45rem; }
a { color: inherit; text-decoration: none; }
button,input,select,textarea { font: inherit; }
button,.button-link {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 2.5rem; padding: .5rem .8rem; border: 1px solid var(--border);
  color: inherit; background: var(--raised); border-radius: 999px; cursor: pointer;
}
button:hover,.button-link:hover { border-color: var(--acid); }
button:disabled { opacity: .5; cursor: default; }
.primary { color: #050505; background: var(--acid); border-color: var(--acid); font-weight: 600; }
.primary:hover { background: #dcdce0; }
:focus-visible { outline: 2px solid var(--acid); outline-offset: 3px; }
label { display: grid; gap: .45rem; font-weight: 600; font-size: .93rem; }
input,select,textarea {
  width: 100%; min-width: 0; min-height: 2.6rem; padding: .6rem .7rem;
  color: inherit; background: var(--base); border: 1px solid var(--border); border-radius: .45rem;
}
textarea { min-height: 5rem; resize: vertical; }
input[type=checkbox] { width: 1.15rem; min-height: 1.15rem; accent-color: var(--acid); }
.check { display: flex; align-items: center; }
form { display: grid; gap: .95rem; }
form .primary { justify-self: start; }
form .form-error { color: var(--warn); font-size: .9rem; }
.form-error:empty { display: none; }
.muted { color: var(--muted); line-height: 1.5; }
.eyebrow { color: var(--acid); font-size: .72rem; font-weight: 750; letter-spacing: .15em; text-transform: uppercase; }
.brand {
  display: inline-flex; align-items: center; gap: .5em; white-space: nowrap;
  font-family: var(--font-heading); font-size: 1.35rem; font-weight: 500; letter-spacing: -.03em;
}
.mark { position: relative; display: block; width: 1.65em; height: .85em; overflow: hidden; }
.mark img {
  position: absolute; width: 170%; max-width: none; height: auto;
  top: 50%; left: 50%; transform: translate(-50%,-50%);
}
.loading { padding: 2rem; color: var(--muted); }
.gate {
  min-height: 100vh; min-height: 100dvh; padding: 1.5rem clamp(1rem,5vw,4rem);
  background: radial-gradient(ellipse at 80% 5%, #171717, transparent 52%), var(--base);
}
.gate header,.top-inner,.tv-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.gate-card {
  width: min(100%, 28rem); margin: clamp(2rem, 13vh, 8rem) auto 2rem; padding: clamp(1.4rem,5vw,2.5rem);
  border: 1px solid var(--border); border-radius: .9rem; background: var(--surface);
}
.gate-card h1 { margin: .7rem 0; font-size: clamp(2rem, 5vw, 2.75rem); }
.gate-card form { margin-top: 1.65rem; }
.gate-card .primary { width: 100%; }
.top { border-bottom: 1px solid var(--border); }
.top-inner,.cabinet { max-width: 82rem; margin: auto; padding-inline: clamp(1rem,4vw,3rem); }
.top-inner { padding-block: .9rem; }
.actions,.tv-controls { display: flex; gap: .55rem; flex-wrap: wrap; align-items: center; }
.tv-link { color: var(--acid); }
.cabinet { padding-block: 2.5rem; }
.cabinet-title h1 { margin: .65rem 0 .45rem; }
.tabs { display: flex; flex-wrap: wrap; gap: .45rem; padding: 1.65rem 0 1rem; border-bottom: 1px solid var(--border); }
.tabs button { background: transparent; border-color: transparent; }
.tabs button[aria-pressed=true] { color: var(--acid); border-color: var(--border); background: var(--raised); }
#content { padding-block: 1.4rem; }
.section-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .8rem; margin-bottom: 1rem; }
.inline { display: flex; align-items: center; gap: .55rem; }
.filter { margin-bottom: 1rem; width: fit-content; }
.subheading { margin: 1.6rem 0 .75rem; }
.metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .85rem; }
.metrics article {
  display: grid; align-content: center; gap: .38rem; min-width: 0; padding: 1rem 1.15rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: .72rem;
}
.metrics article > span,.standing.head { color: var(--muted); font-size: .73rem; font-weight: 750; letter-spacing: .1em; }
.metrics strong { font-family: var(--font-heading); font-weight: 600; font-size: clamp(1.45rem, 3vw, 2.65rem); letter-spacing: -.06em; line-height: 1.08; overflow-wrap: anywhere; }
.metrics small,.settings-row small { color: var(--muted); }
.metrics .accent-card { background: linear-gradient(160deg,#202020,#101010); border-color: #333; }
.accent-card strong { color: var(--acid); }
.standings { background: var(--surface); border: 1px solid var(--border); border-radius: .72rem; overflow: hidden; min-width: 39rem; }
.standing {
  display: grid; grid-template-columns: 4.15rem minmax(0,1.65fr) minmax(0,1fr) minmax(0,1fr) minmax(0,1.15fr);
  gap: .9rem; align-items: center; min-height: 3.5rem; padding: .6rem 1.05rem;
}
.standing + .standing { border-top: 1px solid var(--border); }
.standing.head { min-height: 2.35rem; background: #141414; }
.rank { color: var(--muted); font-weight: 750; }
.rank.first { color: var(--acid); }
.manager-name { font-weight: 700; overflow-wrap: anywhere; }
.fact { font-weight: 750; }
.plan { color: var(--muted); }
.progress-cell { display: grid; gap: .3rem; color: var(--acid); font-weight: 750; }
progress,.track { display: block; width: 100%; height: .36rem; appearance: none; border: 0; border-radius: 1rem; overflow: hidden; background: #303030; }
progress::-webkit-progress-bar { background: #303030; }
progress::-webkit-progress-value { background: var(--acid); border-radius: 1rem; }
progress::-moz-progress-bar { background: var(--acid); border-radius: 1rem; }
.empty { display: grid; justify-items: center; gap: .45rem; padding: 2rem 1rem; background: var(--surface); text-align: center; color: var(--muted); border-radius: .7rem; }
.empty strong { color: #fff; font-size: 1.15em; }
.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; background: var(--surface); min-width: 38rem; }
td,th { padding: .8rem; border-bottom: 1px solid var(--border); }
th { font-size: .8rem; color: var(--muted); }
.settings-list { display: grid; gap: .6rem; margin-top: 1rem; }
.settings-row {
  display: grid; grid-template-columns: minmax(0,1fr) minmax(8rem,14rem) auto; gap: .65rem;
  align-items: center; padding: .9rem; border: 1px solid var(--border); background: var(--surface); border-radius: .6rem;
}
.settings-row strong { overflow-wrap: anywhere; }
.settings-row small { display: block; margin-top: .2rem; }
.settings-row .form-error { grid-column: 1/-1; }
.pill { justify-self: start; color: var(--muted); font-size: .85rem; }
.pill.active { color: var(--acid); }
.pagination { display: flex; align-items: center; justify-content: end; gap: .75rem; margin-top: 1rem; }
dialog { width: min(31rem, calc(100% - 2rem)); max-height: calc(100% - 2rem); padding: 1.3rem; color: inherit; background: var(--surface); border: 1px solid var(--border); border-radius: .8rem; }
dialog::backdrop { background: #000a; }
dialog header { display: flex; align-items: center; justify-content: space-between; gap: .7rem; margin-bottom: 1rem; }
#close { font-size: 1.3rem; }
.history { display: grid; gap: .7rem; }
.history article { display: grid; gap: .4rem; border: 1px solid var(--border); padding: .7rem; border-radius: .55rem; overflow-wrap: anywhere; }
.revision-title { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .4rem; }
.revision-title time { color: var(--muted); font-size: .85rem; }

.tv {
  height: 100vh; height: 100dvh; min-height: 23rem; display: grid;
  grid-template-rows: auto auto auto minmax(0,1fr) auto; gap: clamp(.5rem, 1.6vh, 1.25rem);
  padding: clamp(.65rem, 2vh, 1.5rem) clamp(.75rem, 3.2vw, 4rem);
  background: linear-gradient(180deg,#050505,#101010);
}
.tv-top { padding-bottom: .45rem; border-bottom: 1px solid var(--border); }
.tv-controls button,.tv-controls a { min-height: 1.95rem; padding: .25rem .55rem; font-size: .82rem; }
.tv-title { display: flex; align-items: end; justify-content: space-between; gap: .65rem; }
.tv-title h1 { margin-top: .22rem; font-size: clamp(1.6rem, min(4.1vw, 7.2vh), 5.4rem); }
.month-tag { color: var(--acid); font-size: clamp(.78rem,1.3vw,1.35rem); text-transform: capitalize; white-space: nowrap; padding: .35rem .65rem; border: 1px solid #333; border-radius: .45rem; background: #171717; }
.tv .metrics { gap: clamp(.4rem, 1vw, 1rem); }
.tv .metrics article { gap: .25rem; padding: clamp(.5rem,1.7vh,1.25rem) clamp(.55rem,1.5vw,1.6rem); }
.tv .metrics strong { font-size: clamp(1.35rem, min(4vw, 7vh), 5rem); }
.tv .metrics small { font-size: clamp(.64rem,1vw,1rem); }
.tv-ranking { display: grid; grid-template-rows: auto minmax(0,1fr); gap: .48rem; min-height: 0; }
.tv-ranking h2 { font-size: clamp(1rem, 1.8vw, 2rem); }
#tv-leaderboard { --row-h: 4.25rem; --head-h: 2.3rem; min-height: 0; overflow: auto; }
.tv .standings { min-width: 0; }
.tv .standing {
  grid-template-columns: minmax(2.8rem,.42fr) minmax(0,2.3fr) minmax(0,1.4fr) minmax(0,1.4fr) minmax(0,1.65fr);
  min-height: 0; height: var(--row-h); gap: clamp(.3rem,1.1vw,1rem); padding: 0 clamp(.45rem,1.1vw,1.35rem);
  font-size: clamp(.8rem,1.72vw,2.1rem);
}
.tv .standing.head { height: var(--head-h); font-size: clamp(.61rem,.88vw,1rem); }
.tv .manager-name { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; line-height: 1.12; }
.tv .fact,.tv .plan,.tv .progress-cell span { overflow-wrap: anywhere; line-height: 1.1; }
.tv-footer { display: flex; justify-content: space-between; gap: .5rem; color: var(--muted); font-size: .82rem; }
.tv-footer #tv-status::before { content: ''; display: inline-block; width: .5rem; height: .5rem; border-radius: 50%; background: #23ffbd; margin-right: .45rem; }
.tv-footer #tv-status.stale::before { background: var(--warn); }
@media (min-width: 1550px) and (min-height: 850px) {
  #tv-leaderboard { --row-h: 5.05rem; --head-h: 2.55rem; }
}
@media (max-height: 620px) {
  #tv-leaderboard { --row-h: 3rem; --head-h: 1.8rem; }
  .tv .standing { font-size: clamp(.73rem, min(1.7vw,4vh), 1.55rem); }
}
@media (max-width: 660px) {
  .cabinet { padding-block: 1.6rem; }
  .top-inner { flex-wrap: wrap; }
  .metrics { grid-template-columns: 1fr; }
  .tv .metrics { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .tv .metrics article > span { font-size: .61rem; letter-spacing: .04em; }
  .tv .standing { grid-template-columns: 1.4rem minmax(0,1.5fr) repeat(3,minmax(0,1fr)); }
  .tv .standing.head { font-size: .53rem; letter-spacing: 0; }
  .settings-row { grid-template-columns: 1fr auto; }
  .settings-row > div { grid-column: 1/-1; }
}
.sign-in { display: flex; margin-top: 1.4rem; }
[hidden] { display: none !important; }
.team-metrics {
  display: grid; grid-template-columns: repeat(2,minmax(0,1fr));
  gap: clamp(.4rem, 1vw, 1rem); margin-top: .65rem;
}
.team-card {
  --team: #67caf2;
  display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: baseline;
  gap: .35rem .7rem; padding: .55rem .85rem;
  background: var(--surface); border: 1px solid var(--border);
  border-inline-start: 3px solid var(--team); border-radius: .55rem;
}
.team-card.team-2 { --team: #b7b1ef; }
.team-card > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: .15rem .75rem; }
.team-card .team-label { color: var(--team); font-weight: 750; }
.team-card strong { font-family: var(--font-heading); font-weight: 600; font-size: clamp(1rem, 1.9vw, 1.9rem); line-height: 1.05; overflow-wrap: anywhere; }
.team-percent { font-size: clamp(.65rem, 1vw, .95rem); color: var(--muted); }
.team-card progress { grid-column: 1 / -1; height: .23rem; }
.team-card progress::-webkit-progress-value { background: var(--team); }
.team-card progress::-moz-progress-bar { background: var(--team); }
.manager-cell { min-width: 0; display: grid; gap: .14em; align-content: center; }
.manager-cell .team-label { color: var(--muted); font-size: .66em; }
.standing.podium-1 {
  background: linear-gradient(100deg,#38310b,#211e13 74%);
  box-shadow: inset .35rem 0 #ffdb58, inset 0 1px #89702a, inset 0 -1px #89702a;
}
.standing.podium-1 .rank,.standing.podium-1 .fact { color: #ffdf6c; }
.standing.podium-1 .fact { font-size: 1.21em; }
.standing.podium-2 { background: #232b38; box-shadow: inset .22rem 0 #a5b8d6; }
.standing.podium-2 .rank { color: #d0def7; }
.standing.podium-3 { background: #29211e; box-shadow: inset .14rem 0 #ac795e; }
.standing.podium-3 .rank { color: #ddb498; }
.standing .rank { display: grid; justify-content: start; line-height: 1; gap: .08em; }
.standing .rank small { font-size: .53em; letter-spacing: .07em; }
.standing.podium-1 .rank { font-size: 1.25em; }
.client-link { color: var(--acid); text-decoration: underline; text-underline-offset: .2em; }
@media (max-width: 720px) {
  .team-card { grid-template-columns: 1fr; gap: .2rem; padding: .45rem .5rem; }
  .standing.podium-1 .fact { font-size: 1.05em; }
}
@media (max-height: 620px) {
  .tv .team-metrics { margin-top: .4rem; }
  .tv .team-card { padding-block: .36rem; }
  .tv .manager-name { -webkit-line-clamp: 1; }
}

.tv-split {
  gap: clamp(.45rem, 1.2vh, 1.1rem);
  padding-inline: clamp(.85rem, 2.4vw, 3rem);
}
.tv-split .tv-title .eyebrow { display: none; }
.tv-split .tv-title h1 { font-size: clamp(1.55rem, min(3.2vw, 5.5vh), 4.3rem); }
.tv-split #tv-metrics {
  display: grid; grid-template-columns: minmax(0,3fr) minmax(0,2.4fr);
  gap: clamp(.4rem, .85vw, 1rem);
}
.tv-split .metrics,.tv-split .team-metrics { gap: clamp(.4rem,.7vw,.8rem); }
.tv-split .metrics article { padding: clamp(.45rem,1.2vh,1rem) clamp(.55rem,.9vw,1.15rem); }
.tv-split .metrics strong { font-size: clamp(1.1rem,2.35vw,3.25rem); }
.tv-split .metrics small { display: none; }
.tv-split .metrics article > span,.tv-split .team-card .team-label { font-size: clamp(.65rem,.85vw,1rem); }
.tv-split .team-metrics { margin: 0; }
.tv-split .team-card {
  grid-template-columns: minmax(0,1fr); align-content: center;
  padding: clamp(.35rem,1vh,.9rem) clamp(.5rem,.8vw,1rem);
}
.tv-split .team-card > div { display: grid; gap: .2rem; }
.tv-split .team-card strong { font-size: clamp(1.05rem,1.9vw,2.6rem); }
.tv-split .team-percent { font-size: clamp(.59rem,.77vw,.95rem); }
.tv-split .tv-ranking h2 { font-size: clamp(.95rem,1.38vw,1.75rem); }
.tv-split #tv-leaderboard {
  --head-h: 1.85rem;
  display: grid; grid-template-columns: repeat(2,minmax(0,1fr));
  grid-template-rows: minmax(0,1fr); gap: clamp(.55rem,1.25vw,1.4rem);
}
.tv-split .standings { height: 100%; }
.tv-split .standing {
  grid-template-columns: minmax(1.45rem,.36fr) minmax(0,2.2fr) minmax(0,1.3fr) minmax(0,1.3fr) minmax(0,.98fr);
  gap: clamp(.24rem,.55vw,.75rem); padding-inline: clamp(.35rem,.65vw,.9rem);
  height: calc((100% - var(--head-h)) / 8);
  font-size: clamp(.75rem,1.24vw,1.7rem);
}
.tv-split .standing.head { height: var(--head-h); font-size: clamp(.51rem,.61vw,.9rem); letter-spacing: .035em; }
.tv-split .standing.podium-1 .fact { font-size: 1.12em; }
.tv-split .progress-cell { gap: .2rem; }
.tv-split .progress-cell progress,.tv-split .progress-cell .track { height: .25rem; }
@media (max-height: 620px) {
  .tv-split #tv-leaderboard { --head-h: 1.55rem; }
  .tv-split .standing { font-size: clamp(.72rem,min(1.22vw,2.75vh),1.35rem); }
}
