/* fight night: the shared skin. tokens, type, masthead, nav, panels, buttons, toast, tooltip.
   pages load this instead of ../shell.css; page css from the navy set still applies on top. */
@font-face {
  font-family: "Saira";
  src: url(../fonts/saira.woff2) format("woff2");
  font-weight: 100 900;
  font-stretch: 50% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Saira";
  src: url(../fonts/saira-italic.woff2) format("woff2");
  font-weight: 100 900;
  font-stretch: 50% 125%;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Teko";
  src: url(../fonts/teko.woff2) format("woff2");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --field: #07090E;
  --deck: #0E121B;
  --deck-2: #151B27;
  --rail: #252E40;
  --chalk: #F1F3F7;
  --fog: #8B95A7;
  --dim: #556075;
  --ares: #5AC8FA;
  --inferno: #FF8F3F;
  --gold: #F5C542;
  --win: #4CC38A;
  --out: #FF3B4E;
  --ko: #FF3B4E;
  --teko: "Teko", "Arial Narrow", sans-serif;
  --cut: 14px;

  --gutter: 16px;
  --col: 720px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--field);
  color: var(--chalk);
  font: 400 15px/1.45 "Saira", system-ui, sans-serif;
  font-stretch: 95%;
  padding-bottom: 48px;
}
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--chalk); outline-offset: 2px; }
.col { width: min(100% - 2 * var(--gutter), var(--col)); margin: 0 auto; }

/* ---- masthead: the split mark, the wordmark, both records as p1 / p2 ---- */
.mast { background: var(--field); }
.mast-in { width: min(100% - 2 * var(--gutter), var(--col)); margin: 0 auto; display: flex; align-items: center; gap: 10px; height: 52px; }
.mark { position: relative; width: 26px; height: 22px; flex: none; }
.mark i { position: absolute; inset: 0; }
.mark .a { background: var(--ares); clip-path: polygon(0 100%, 52% 0, 70% 0, 34% 100%); }
.mark .c { background: var(--inferno); clip-path: polygon(40% 100%, 76% 0, 100% 0, 100% 100%); }
.wordmark { font-weight: 800; font-style: italic; font-stretch: 112%; font-size: 19px; letter-spacing: -.01em; white-space: nowrap; color: var(--chalk); text-decoration: none; }
.mast-week { font: 500 19px/1 var(--teko); color: var(--fog); padding: 3px 0 0 10px; border-left: 1px solid var(--rail); white-space: nowrap; letter-spacing: .04em; }
.mast-recs { margin-left: auto; display: flex; gap: 6px; white-space: nowrap; }
.mast .rec {
  display: inline-flex; align-items: baseline; gap: 6px; padding: 4px 12px 2px 10px;
  font: 500 19px/1 var(--teko); font-variant-numeric: tabular-nums; letter-spacing: .02em;
  background: color-mix(in srgb, var(--pc) 14%, var(--deck));
  box-shadow: inset 0 -2px 0 var(--pc);
  clip-path: polygon(0 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
}
.mast .rec + .rec { clip-path: polygon(8px 0, 100% 0, 100% 100%, 0 100%); padding: 4px 10px 2px 12px; }
.mast .rec b { font-weight: 600; color: var(--pc); }
.mast .rec.ares { --pc: var(--ares); }
.mast .rec.inferno { --pc: var(--inferno); }

/* ---- nav: same tabs, same order, every screen ---- */
.nav-tabs { border-bottom: 1px solid var(--rail); background: var(--field); }
.nav-in {
  position: relative;
  display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none;
  padding: 0 max(var(--gutter), (100% - var(--col)) / 2);
}
.nav-in::-webkit-scrollbar { display: none; }
.nav-in a {
  flex: none; position: relative; display: inline-flex; align-items: center; min-height: 44px;
  padding: 4px 11px 0; font: 500 20px/1 var(--teko); letter-spacing: .03em;
  color: var(--fog); text-decoration: none; white-space: nowrap;
}
.nav-in a:first-child { padding-left: 0; }
.nav-in a:hover { color: var(--chalk); }
.nav-in a[aria-current="page"] { color: var(--chalk); }
.nav-in a[aria-current="page"]::after {
  content: ""; position: absolute; left: 9px; right: 9px; bottom: 0; height: 4px;
  transform: skewX(-24deg); background: var(--ares); box-shadow: 0 0 10px color-mix(in srgb, var(--ares) 60%, transparent);
}
.nav-in a:first-child[aria-current="page"]::after { left: 0; }
.nav-in a .due {
  display: inline-block; min-width: 18px; padding: 2px 6px 0; margin-left: 6px;
  background: var(--gold); color: var(--field); font: 600 15px/16px var(--teko); text-align: center;
  clip-path: polygon(3px 0, 100% 0, calc(100% - 3px) 100%, 0 100%);
}
.nav-in a .live {
  display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; padding: 2px 6px 0;
  background: var(--ko); color: #fff; font: 600 14px/16px var(--teko); letter-spacing: .05em;
  clip-path: polygon(3px 0, 100% 0, calc(100% - 3px) 100%, 0 100%);
}

/* ---- page heading: the name slams in over a split flood ---- */
.page-head { position: relative; margin: 18px 0 8px; padding: 6px 0 4px; isolation: isolate; }
.page-head::before {
  content: ""; position: absolute; z-index: -1; left: -14px; right: 30%; top: 0; bottom: 0;
  background:
    repeating-linear-gradient(115deg, rgba(255,255,255,.03) 0 2px, transparent 2px 22px),
    linear-gradient(100deg, color-mix(in srgb, var(--ph, var(--ares)) 22%, transparent), transparent 85%);
  clip-path: polygon(0 0, 100% 0, calc(100% - 30px) 100%, 0 100%);
}
.page-head h1 { margin: 0; font: 600 clamp(44px, 12vw, 64px)/.86 var(--teko); letter-spacing: .005em; padding-top: 6px; }
.page-head p { margin: 4px 0 0; color: var(--fog); font-size: 14px; }

/* every heading speaks teko; sizes come from each page */
main h2, main h3 { font-family: var(--teko); font-style: normal; font-weight: 600; letter-spacing: .01em; }

/* ---- panels: corner-cut slabs ---- */
.panel {
  position: relative; display: block; margin-top: 14px; padding: 14px 16px 16px;
  background: var(--deck); border: 0; border-radius: 0;
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
}
/* a panel whose dropdowns hang past its edge: the corner cut is painted, not clipped */
.panel.spill {
  clip-path: none; z-index: 2;
  background: linear-gradient(225deg, transparent calc(var(--cut) * .7071), var(--deck) 0);
}
.panel h2 { margin: 0 0 10px; font: 600 30px/1 var(--teko); font-style: normal; letter-spacing: .01em; }
.panel h2 small { font: 400 13px/1 "Saira", sans-serif; color: var(--fog); margin-left: 10px; letter-spacing: 0; }
.panel.slim { background: transparent; border: 1px dashed var(--rail); clip-path: none; padding: 10px 16px 12px; }
.panel.slim h2 { font-size: 22px; color: var(--fog); margin-bottom: 6px; }

/* ---- buttons: parallelograms ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 7px 18px 4px; border: 0; border-radius: 0;
  background: var(--deck-2); color: var(--chalk); font: 500 20px/1 var(--teko); letter-spacing: .03em;
  cursor: pointer; text-decoration: none;
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
  box-shadow: inset 0 -2px 0 var(--rail);
}
.btn:hover { background: color-mix(in srgb, var(--chalk) 10%, var(--deck-2)); }
.btn.primary { background: var(--ares); color: var(--field); box-shadow: none; }
.btn.primary:hover { background: color-mix(in srgb, var(--ares) 85%, white); }

.who-ares { color: var(--ares); font-weight: 700; }
.who-inferno { color: var(--inferno); font-weight: 700; }

/* ---- toast + tooltip ---- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 15;
  transform: translate(-50%, 10px); opacity: 0;
  background: var(--chalk); color: var(--field);
  padding: 9px 18px 7px; font: 500 19px/1.1 var(--teko); letter-spacing: .02em;
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
  transition: opacity .16s, transform .16s; pointer-events: none; max-width: calc(100% - 32px);
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.tip {
  position: fixed; z-index: 20; pointer-events: none; max-width: 260px;
  background: var(--deck-2); border-left: 3px solid var(--ares);
  padding: 7px 10px; font-size: 13px; box-shadow: 0 6px 20px rgba(0,0,0,.55);
}
.mock-note { margin: 28px 0 0; font-size: 12px; color: var(--dim); }

/* ---- the one intro per screen: heading slams in, the first panels rise after it ---- */
.fight-intro .page-head h1 { animation: bk-slam .42s cubic-bezier(.2,1.4,.4,1) both; }
.fight-intro .page-head::before { animation: bk-flood .4s cubic-bezier(.2,.8,.2,1) both; }
.fight-intro main > :nth-child(2) { animation: bk-rise .34s .18s ease-out both; }
.fight-intro main > :nth-child(3) { animation: bk-rise .34s .26s ease-out both; }
.fight-intro main > :nth-child(4) { animation: bk-rise .34s .34s ease-out both; }
@keyframes bk-slam { from { transform: translateX(-60px) skewX(-12deg); opacity: 0; } }
@keyframes bk-flood { from { clip-path: polygon(0 0, 0 0, 0 100%, 0 100%); } }
@keyframes bk-rise { from { transform: translateY(14px); opacity: 0; } }

[data-tip] { -webkit-touch-callout: none; }

@media (prefers-reduced-motion: reduce) {
  .toast { transition: none; }
  .fight-intro *, .fight-intro *::before { animation: none !important; }
}

@media (pointer: coarse), (max-width: 520px) {
  .wordmark { display: inline-flex; align-items: center; min-height: 44px; }
  .btn { min-height: 44px; }
}

@media (max-width: 520px) {
  .wordmark { font-size: 17px; }
  .mast-week { display: none; }
  .rec { font-size: 17px; padding: 4px 9px 2px 8px; }
  .mast .rec + .rec { padding: 4px 8px 2px 10px; }
}
@media (max-width: 400px) {
  .mark { display: none; }
}
