/* =====================================================================
   Guru-frat · "Locker Room" design system
   Tokens, base, typography, components and the two shells (marketing
   and app). Page-specific styles live in /assets/css/pages/<page>.css.
   ===================================================================== */

/* ---------- tokens ---------- */
:root {
  /* surfaces */
  --bg-0: #070b12;
  --bg-sidebar: #09101a;
  --bg-footer: #060a10;
  --bg-1: #0e1622;
  --bg-2: #132033;
  --bg-inset: #0b121c;
  --bg-tile: #0f1824;
  --bg-active: #18263a;
  --bg-btn: #142033;
  --card: linear-gradient(180deg, #132033 0%, #0e1622 100%);

  /* lines */
  --line-1: #1a2636;
  --line-2: #1c2a3d;
  --line-2b: #1f2d40;
  --line-3: #22324a;
  --line-4: #2f4562;

  /* ink */
  --ink: #eef2f7;
  --ink-2: #a9b6c6;
  --ink-3: #75859a;
  --ink-4: #5a6a80;
  --ink-soft: #c9d3df;

  /* brand */
  --gold: #f5b301;
  --gold-soft: #ffd25a;
  --gold-border: #ffe08a;
  --gold-ink: #241700;
  --gold-shadow: #7a5200;
  --steel: #4c8dff;
  --steel-light: #6fa8ff;
  --steel-soft: #9cc0ff;
  --steel-deep: #2a5fc4;
  --steel-shadow: #0f2a5c;
  --orange: #ff7a1a;
  --orange-soft: #ffb27a;
  --teal: #2bc4ad;
  --teal-soft: #7fe3d2;
  --green: #39d98a;
  --red: #ff4d4d;
  --red-soft: #ff9a9a;
  --banner: #163a70;
  --banner-border: #2a5fc4;

  /* books */
  --dk: #53d337; --dk-ink: #06210a;
  --fd: #1e90ff; --fd-ink: #03142a;
  --mgm: #c9a96e; --mgm-ink: #241a08; --mgm-line: #e8cf8f;
  --pin: #ff8a3d; --pin-ink: #2a1200;

  /* shadows */
  --sh-card: 0 6px 0 #03060b;
  --sh-card-in: 0 6px 0 #03060b, inset 0 1px 0 rgba(255, 255, 255, .05);
  --sh-panel: 0 5px 0 #03060b;
  --sh-active: 0 4px 0 #0f2a5c, 0 0 22px rgba(76, 141, 255, .35);

  /* type */
  --f-display: 'Dela Gothic One', 'Arial Black', sans-serif;
  --f-varsity: 'Graduate', Georgia, serif;
  --f-body: 'Bricolage Grotesque', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-mono: 'Fragment Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  /* layout */
  --container: 1240px;
  --gutter: 24px;
  --section-top: clamp(72px, 5.8vw, 112px); /* design screenshots were rendered with 1vw ≈ 9.24px; vw factors are scaled to match them at 1440 */
  --sidebar-w: 252px;

  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { scrollbar-color: var(--line-4) var(--bg-0); }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { margin: 0; background: var(--bg-0); color: var(--ink); -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
  background-color: var(--bg-0);
  background-image: radial-gradient(rgba(76, 141, 255, .13) 1px, transparent 1px);
  background-size: 26px 26px;
}
body.is-app { background-image: radial-gradient(rgba(76, 141, 255, .1) 1px, transparent 1px); }
a { color: var(--steel-light); text-decoration: none; }
a:hover { color: var(--gold-soft); }
::selection { background: var(--orange); color: var(--bg-0); }
img, svg { display: block; max-width: 100%; }
svg { flex: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, h4, p { margin: 0; }
summary { list-style: none; cursor: pointer; }
summary::-webkit-details-marker { display: none; }
[x-cloak] { display: none !important; }
:focus-visible { outline: 2px solid var(--steel-light); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

@keyframes gf-pulse { 0% { box-shadow: 0 0 0 0 rgba(57, 217, 138, .6); } 100% { box-shadow: 0 0 0 9px rgba(57, 217, 138, 0); } }
@keyframes gf-drop { 0% { opacity: 0; transform: translateY(-16px) scale(.98); } 100% { opacity: 1; transform: none; } }
@keyframes gf-shimmer { 0% { background-position: -400px 0; } 100% { background-position: 400px 0; } }
@keyframes gf-toast { 0% { opacity: 0; transform: translateY(14px); } 100% { opacity: 1; transform: none; } }
.anim-drop { animation: gf-drop 550ms cubic-bezier(.2, .9, .3, 1.25) both; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
}

/* ---------- typography ---------- */
.f-display { font-family: var(--f-display); font-weight: 400; }
.f-varsity { font-family: var(--f-varsity); font-weight: 400; }
.f-mono { font-family: var(--f-mono); font-weight: 400; }

.h-hero { font: 400 clamp(48px, 5.13vw, 104px)/.98 var(--f-display); letter-spacing: -.01em; }
.h2 { font: 400 clamp(32px, 2.95vw, 58px)/1.02 var(--f-display); letter-spacing: -.01em; text-wrap: balance; }
.h-app { font: 400 clamp(28px, 1.93vw, 38px)/1.05 var(--f-display); }
.h-card { font: 400 18px/1 var(--f-display); }
.lead { font-size: 18px; line-height: 1.55; color: var(--ink-2); text-wrap: pretty; }
.gold-text {
  background: linear-gradient(90deg, #ffe08a 0%, #f5b301 50%, #ff8a1f 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 6px 0 #2e2000);
}

.eyebrow { display: inline-flex; align-items: center; gap: 10px; font: 400 12px/1 var(--f-mono); letter-spacing: .16em; color: var(--steel-light); text-transform: uppercase; }
.eyebrow::before { content: ''; width: 8px; height: 8px; background: currentColor; box-shadow: 0 0 12px currentColor; flex: none; }
.eyebrow--gold { color: var(--gold); }

.label { font: 400 11px/1.2 var(--f-mono); letter-spacing: .12em; color: var(--ink-3); text-transform: uppercase; }
.label--sm { font-size: 10.5px; line-height: 1; letter-spacing: .14em; }
.mono-sm { font: 400 12px/1.5 var(--f-mono); letter-spacing: .04em; color: var(--ink-3); }

/* color helpers */
.c-ink { color: var(--ink); } .c-ink2 { color: var(--ink-2); } .c-ink3 { color: var(--ink-3); }
.c-gold { color: var(--gold); } .c-gold-soft { color: var(--gold-soft); }
.c-steel { color: var(--steel); } .c-steel-light { color: var(--steel-light); } .c-steel-soft { color: var(--steel-soft); }
.c-green { color: var(--green); } .c-red { color: var(--red); } .c-red-soft { color: var(--red-soft); }
.c-teal-soft { color: var(--teal-soft); } .c-orange { color: var(--orange); } .c-orange-soft { color: var(--orange-soft); }
.tone-ink { color: var(--ink); } .tone-green { color: var(--green); } .tone-steel { color: var(--steel-soft); } .tone-gold { color: var(--gold-soft); } .tone-red { color: var(--red-soft); }

/* ---------- layout ---------- */
.container { max-width: var(--container); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.section { padding-top: var(--section-top); }
.grid-fit { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--min, 300px)), 1fr)); gap: var(--gap, 18px); }
.stack { display: flex; flex-direction: column; gap: var(--gap, 12px); }
.row { display: flex; align-items: center; gap: var(--gap, 10px); }
.wrap { flex-wrap: wrap; }
.spread { justify-content: space-between; }
.grow { flex: 1 1 auto; min-width: 0; }
.ml-auto { margin-left: auto; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nowrap { white-space: nowrap; }
.tnum { font-variant-numeric: tabular-nums; }

/* ---------- kinds: grade + event palettes as variables ---------- */
/* Put .k-S (etc.) on any element; children read --k-* */
.k-S { --k-bg: linear-gradient(160deg, #ffe8a3 0%, #f5b301 55%, #c98a00 100%); --k-fg: #241700; --k-sh: 0 3px 0 #7a5200, 0 0 18px rgba(245, 179, 1, .45); --k-tc: #ffd25a; --k-bd: rgba(245, 179, 1, .6); --k-glow: 0 0 26px rgba(245, 179, 1, .2); --k-bar: linear-gradient(180deg, #ffe8a3, #f5b301); --k-solid: #f5b301; --k-row: rgba(245, 179, 1, .05); }
.k-A { --k-bg: linear-gradient(160deg, #ffc296 0%, #ff7a1a 55%, #c75400 100%); --k-fg: #2a1000; --k-sh: 0 3px 0 #7a3300; --k-tc: #ffb27a; --k-bd: rgba(255, 122, 26, .5); --k-glow: 0 0 22px rgba(255, 122, 26, .14); --k-bar: #ff7a1a; --k-solid: #ff7a1a; --k-row: transparent; }
.k-B { --k-bg: linear-gradient(160deg, #b9d3ff 0%, #4c8dff 55%, #2a5fc4 100%); --k-fg: #04142e; --k-sh: 0 3px 0 #0f2a5c; --k-tc: #9cc0ff; --k-bd: rgba(111, 168, 255, .5); --k-glow: 0 0 0 transparent; --k-bar: #6fa8ff; --k-solid: #4c8dff; --k-row: transparent; }
.k-C { --k-bg: linear-gradient(160deg, #a8f0e4 0%, #2bc4ad 55%, #168a79 100%); --k-fg: #04142e; --k-sh: 0 3px 0 #0d5c50; --k-tc: #7fe3d2; --k-bd: rgba(43, 196, 173, .4); --k-glow: 0 0 0 transparent; --k-bar: #2bc4ad; --k-solid: #2bc4ad; --k-row: transparent; }
.k-D { --k-bg: #22324a; --k-fg: #cfd8e4; --k-sh: 0 3px 0 #03060b; --k-tc: #a9b6c6; --k-bd: #22324a; --k-glow: 0 0 0 transparent; --k-bar: #3a4d66; --k-solid: #3a4d66; --k-row: transparent; }
.k-F { --k-bg: linear-gradient(160deg, #ffb8b8 0%, #ff4d4d 55%, #c42b2b 100%); --k-fg: #2e0606; --k-sh: 0 3px 0 #6e1414; --k-tc: #ff9a9a; --k-bd: rgba(255, 77, 77, .45); --k-glow: 0 0 0 transparent; --k-bar: #ff4d4d; --k-solid: #ff4d4d; --k-row: transparent; }
.k-ARB { --k-bg: #6fa8ff; --k-fg: #04142e; --k-sh: inset 0 -3px 0 rgba(0, 0, 0, .22); --k-tc: #9cc0ff; --k-bd: rgba(111, 168, 255, .5); --k-glow: 0 0 22px rgba(111, 168, 255, .12); --k-solid: #6fa8ff; }
.k-MID { --k-bg: #2bc4ad; --k-fg: #022a24; --k-sh: inset 0 -3px 0 rgba(0, 0, 0, .22); --k-tc: #7fe3d2; --k-bd: rgba(43, 196, 173, .45); --k-glow: 0 0 0 transparent; --k-solid: #2bc4ad; }
.k-STM { --k-bg: #ff4d4d; --k-fg: #2e0606; --k-sh: inset 0 -3px 0 rgba(0, 0, 0, .22); --k-tc: #ff9a9a; --k-bd: rgba(255, 77, 77, .5); --k-glow: 0 0 22px rgba(255, 77, 77, .12); --k-solid: #ff4d4d; }
.k-MOV { --k-bg: #22324a; --k-fg: #cfd8e4; --k-sh: inset 0 -3px 0 rgba(0, 0, 0, .22); --k-tc: #a9b6c6; --k-bd: #22324a; --k-glow: 0 0 0 transparent; --k-solid: #3a4d66; }
.k-LCK { --k-bg: #2e2614; --k-fg: #ffd25a; --k-sh: inset 0 -3px 0 rgba(0, 0, 0, .22); --k-tc: #ffd25a; --k-bd: #2f4562; --k-glow: 0 0 0 transparent; --k-solid: #ffd25a; }
.k-tc { color: var(--k-tc); }

/* ---------- grade tile ---------- */
.grade {
  display: inline-grid; place-items: center; flex: none;
  width: 42px; height: 42px; border-radius: 11px;
  background: var(--k-bg); color: var(--k-fg); box-shadow: var(--k-sh);
  font: 400 21px/1 var(--f-varsity);
}
.grade--xs { width: 30px; height: 30px; border-radius: 9px; font-size: 16px; }
.grade--sm { width: 38px; height: 38px; border-radius: 10px; font-size: 19px; }
.grade--lg { width: 44px; height: 44px; border-radius: 12px; font-size: 22px; }
.grade--xl { width: 52px; height: 52px; border-radius: 14px; font-size: 27px; }
.grade--lg.k-S, .grade--xl.k-S { box-shadow: 0 4px 0 #7a5200, 0 0 22px rgba(245, 179, 1, .45); }
.grade--lg.k-A, .grade--xl.k-A { box-shadow: 0 4px 0 #7a3300; }
.grade--lg.k-B, .grade--xl.k-B { box-shadow: 0 4px 0 #0f2a5c; }
.grade--lg.k-C, .grade--xl.k-C { box-shadow: 0 4px 0 #0d5c50; }
.grade--lg.k-D, .grade--xl.k-D { box-shadow: 0 4px 0 #03060b; }
.grade--lg.k-F, .grade--xl.k-F { box-shadow: 0 4px 0 #6e1414; }
.grade--word { font-size: 11px; letter-spacing: .02em; } /* ARB / MID / STM icons */

/* ---------- book chips ---------- */
.book {
  display: inline-grid; place-items: center; flex: none;
  width: 30px; height: 30px; border-radius: 8px;
  font: 400 10px/1 var(--f-display);
}
.book--sm { width: 26px; height: 26px; border-radius: 7px; font-size: 9px; }
.book--pill { width: auto; min-width: 34px; height: 22px; padding: 0 7px; border-radius: 6px; font-size: 9.5px; }
.b-DK { background: var(--dk); color: var(--dk-ink); }
.b-FD { background: var(--fd); color: var(--fd-ink); }
.b-MGM { background: var(--mgm); color: var(--mgm-ink); font-size: 9px; }
.b-PIN { background: var(--pin); color: var(--pin-ink); font-size: 9px; }
.book--sm.b-MGM, .book--sm.b-PIN { font-size: 8px; }

.book-tag { display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border-radius: 12px; background: var(--bg-tile); border: 2px solid var(--line-3); box-shadow: 0 4px 0 #03060b; font-weight: 700; font-size: 15px; color: var(--ink); }

/* ---------- team ring ---------- */
.ring {
  --team: var(--steel-soft);
  display: inline-grid; place-items: center; flex: none;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--bg-0); border: 3px solid var(--team); color: var(--team);
  font: 400 11px/1 var(--f-varsity);
}
.ring--sm { width: 32px; height: 32px; border-width: 2px; font-size: 9px; }
.ring--lg { width: 72px; height: 72px; border-width: 4px; font-size: 18px; }
.ring--xl { width: 96px; height: 96px; border-width: 5px; font-size: 24px; }

/* ---------- hexagon (avatars, levels, trophies) ---------- */
.hex { display: grid; place-items: center; flex: none; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.hex-drop { filter: drop-shadow(0 4px 0 #0f2a5c); display: inline-block; }
.hex--level { width: 60px; height: 66px; background: linear-gradient(160deg, #6fa8ff, #2a5fc4); color: #fff; font: 400 22px/1 var(--f-varsity); }
.hex--avatar { width: 38px; height: 42px; background: linear-gradient(160deg, #9cc0ff, #2a5fc4); color: var(--bg-0); font: 400 13px/1 var(--f-varsity); }

/* ---------- logo ---------- */
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); }
.logo:hover { color: var(--ink); }
.logo__mark {
  width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 11px;
  background: linear-gradient(150deg, #ffe08a 0%, #f5b301 55%, #c27c00 100%);
  border: 2px solid #ffe8a3; box-shadow: 0 4px 0 #7a5200, 0 0 18px rgba(245, 179, 1, .3);
  font: 700 16px/1 Georgia, 'Times New Roman', serif; color: #1a1000;
}
.logo__word { font: 400 18px/1 var(--f-display); letter-spacing: .02em; }
.logo--sm .logo__mark { width: 34px; height: 34px; border-radius: 10px; font-size: 14px; box-shadow: none; }
.logo--sm .logo__word { font-size: 16px; }

/* ---------- buttons ---------- */
.btn {
  --lift: 6px;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 17px 26px; border-radius: 14px; border: 2px solid transparent;
  font: 700 17px/1 var(--f-body); white-space: nowrap; cursor: pointer; text-decoration: none;
  transition: transform .08s ease, filter .15s ease, box-shadow .08s ease;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(calc(var(--lift) - 2px)); --lift-now: 2px; }
.btn--md { --lift: 5px; padding: 14px; border-radius: 13px; font-size: 15px; }
.btn--sm { --lift: 4px; padding: 11px 18px; border-radius: 12px; font-size: 15px; }
.btn--xs { --lift: 4px; padding: 10px 14px; border-radius: 11px; font-size: 14px; }
.btn--block { display: flex; width: 100%; }
.btn--primary, .btn--primary:hover {
  background: linear-gradient(180deg, #ffd25a 0%, #f0a500 100%); border-color: var(--gold-border); color: var(--gold-ink);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .45), 0 var(--lift-now, var(--lift)) 0 var(--gold-shadow), 0 14px 30px rgba(240, 165, 0, .3);
}
.btn--primary.btn--md, .btn--primary.btn--sm, .btn--primary.btn--xs { box-shadow: inset 0 2px 0 rgba(255, 255, 255, .45), 0 var(--lift-now, var(--lift)) 0 var(--gold-shadow); }
.btn--gold, .btn--gold:hover {
  background: linear-gradient(180deg, #ffe08a, #f5b301); border-color: var(--gold-border); color: var(--gold-ink);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .45), 0 var(--lift-now, var(--lift)) 0 var(--gold-shadow);
}
.btn--secondary, .btn--secondary:hover {
  background: var(--bg-btn); border-color: var(--line-4); color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 var(--lift-now, var(--lift)) 0 #03060b;
}
.btn--steel, .btn--steel:hover {
  background: linear-gradient(180deg, #6fa8ff, #2a5fc4); border-color: #9cc0ff; color: #fff;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .3), 0 var(--lift-now, var(--lift)) 0 var(--steel-shadow);
}
.btn--ghost { background: transparent; border-color: var(--line-3); color: var(--ink-2); --lift: 0px; }
.btn[disabled], .btn.is-disabled { opacity: .55; pointer-events: none; }

/* small "+ Draft" button used in tables and feed */
.draft-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 11px; border-radius: 10px;
  background: var(--bg-btn); border: 2px solid var(--line-4); box-shadow: 0 3px 0 #03060b;
  font: 700 13px/1 var(--f-body); color: var(--ink); white-space: nowrap; transition: transform .08s, filter .15s;
}
.draft-btn:hover { filter: brightness(1.12); color: var(--ink); }
.draft-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #03060b; }
.draft-btn.is-drafted { background: rgba(57, 217, 138, .12); border-color: rgba(57, 217, 138, .45); color: var(--green); }

/* ---------- surfaces ---------- */
.card { background: var(--card); border: 2px solid var(--line-3); border-radius: 20px; box-shadow: var(--sh-card); }
.card--pad { padding: 22px; }
.card--gold { border-color: rgba(245, 179, 1, .55); box-shadow: 0 6px 0 #03060b, 0 0 44px rgba(245, 179, 1, .14); }
.card--steel { border-color: var(--steel); box-shadow: 0 6px 0 #0f2a5c, 0 0 0 4px rgba(76, 141, 255, .16), 0 24px 60px rgba(76, 141, 255, .28); }
.card--strong { border-color: var(--line-4); box-shadow: var(--sh-card-in); }
.panel { background: var(--bg-1); border: 2px solid var(--line-3); border-radius: 16px; box-shadow: var(--sh-panel); }
.inset { background: var(--bg-inset); border: 2px solid var(--line-2); border-radius: 14px; }
.well { background: var(--bg-0); border: 2px solid var(--line-2); border-radius: 14px; }
.tile { background: var(--bg-tile); border: 2px solid var(--line-3); border-radius: 14px; }
.divider { height: 2px; background: var(--line-2); border: 0; margin: 0; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }

/* ---------- tags, chips, pills ---------- */
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 7px; border-radius: 6px; font: 400 10.5px/1 var(--f-mono); letter-spacing: .08em; white-space: nowrap; background: var(--bg-active); color: var(--ink-2); }
.tag--live { background: rgba(57, 217, 138, .14); color: var(--green); }
.tag--gold { background: var(--bg-active); color: var(--gold-soft); }
.tag--steel { background: var(--bg-active); color: var(--steel-soft); }
.tag--league { padding: 5px 8px; border-radius: 7px; font-size: 11px; color: var(--steel-soft); }
.tag--xp { padding: 5px 7px; border-radius: 7px; font-size: 11px; background: rgba(57, 217, 138, .12); color: var(--green); letter-spacing: 0; }
.tag--red { background: rgba(255, 77, 77, .14); color: var(--red-soft); }
.tag--varsity { font-family: var(--f-varsity); letter-spacing: .02em; font-size: 11px; }
.tag--outline { background: transparent; border: 1px solid rgba(111, 168, 255, .45); color: var(--steel-light); font-size: 9.5px; letter-spacing: .1em; padding: 4px 6px; }

.chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 11px; border-radius: 10px; background: var(--bg-1); border: 2px solid var(--line-2b); font: 400 12px/1 var(--f-mono); color: var(--ink); white-space: nowrap; }
.chip--steel { color: var(--steel-soft); }
.chip--gold { background: rgba(245, 179, 1, .1); border-color: rgba(245, 179, 1, .45); color: var(--gold-soft); }

/* toggle chips / segmented filters */
.seg { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 10px; background: var(--bg-1); border: 2px solid var(--line-3); box-shadow: 0 4px 0 #03060b; font: 400 12px/1 var(--f-mono); color: var(--ink-2); cursor: pointer; white-space: nowrap; transition: transform .08s; }
.seg:hover { color: var(--ink); }
.seg:active { transform: translateY(2px); }
.seg.is-on, .seg[aria-pressed='true'] { background: var(--bg-active); border-color: var(--steel); box-shadow: 0 4px 0 #0f2a5c; color: #fff; }
.seg--sm { padding: 7px 10px; border-radius: 9px; font-size: 11px; box-shadow: 0 3px 0 #03060b; }
.seg--sm.is-on, .seg--sm[aria-pressed='true'] { box-shadow: 0 3px 0 #0f2a5c; }

/* live pulse dot */
.pulse { width: 8px; height: 8px; border-radius: 99px; background: var(--green); display: inline-block; flex: none; animation: gf-pulse 1.6s ease-out infinite; }

/* ---------- bars ---------- */
.bar { display: block; height: var(--h, 6px); border-radius: 99px; background: var(--bg-0); overflow: hidden; }
.bar > i, .bar > span { display: block; height: 100%; width: var(--w, 0%); background: linear-gradient(90deg, #2a5fc4, #6fa8ff); border-radius: inherit; }
.bar--framed { border: 2px solid var(--line-2); }
.bar--glow > i { box-shadow: 0 0 16px rgba(76, 141, 255, .45); }
.bar--gold > i { background: linear-gradient(90deg, #f5b301, #ff7a1a); }
.bar--green > i { background: var(--green); }
.bar--track { background: var(--line-1); }

/* two-sided bar: left team steel, right team gold */
.duo { display: flex; gap: 2px; height: 12px; border-radius: 5px; overflow: hidden; }
.duo > i { display: block; height: 100%; }
.duo > i:first-child { width: var(--w, 50%); background: var(--a, #4c8dff); }
.duo > i:last-child { flex: 1; background: var(--b, #f5b301); }
.duo-head { display: flex; justify-content: space-between; font: 400 10.5px/1 var(--f-mono); letter-spacing: .08em; color: var(--ink-3); }
.duo-head .a { color: var(--steel-soft); }
.duo-head .b { color: var(--gold-soft); }

/* ---------- form bits ---------- */
.switch { position: relative; display: inline-block; width: 36px; height: 20px; border-radius: 99px; background: var(--line-3); flex: none; cursor: pointer; transition: background .15s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--ink-3); transition: transform .15s, background .15s; }
.switch.is-on, .switch[aria-checked='true'] { background: var(--steel); }
.switch.is-on::after, .switch[aria-checked='true']::after { transform: translateX(16px); background: #fff; }

.check { flex: none; width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; border: 2px solid var(--line-4); background: transparent; color: var(--bg-0); font: 800 13px/1 var(--f-body); }
.check.is-done { background: var(--green); border-color: var(--green); }

.input { width: 100%; padding: 10px 12px; border-radius: 10px; background: var(--bg-inset); border: 2px solid var(--line-2b); color: var(--ink); font: 400 13px/1.2 var(--f-mono); }
.input:focus { outline: none; border-color: var(--steel); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; }
.table th { padding: 12px 10px; text-align: left; font: 400 11px/1 var(--f-mono); letter-spacing: .12em; color: var(--ink-3); text-transform: uppercase; white-space: nowrap; }
.table td { padding: 12px 10px; border-top: 2px solid var(--line-1); vertical-align: middle; }
.table th:first-child, .table td:first-child { padding-left: 20px; }
.table th:last-child, .table td:last-child { padding-right: 20px; }

/* ---------- locked (upsell) ---------- */
.locked { position: relative; }
.locked__content { filter: blur(5px); pointer-events: none; user-select: none; }
.locked__overlay { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.lock-badge { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--bg-tile); border: 2px solid var(--line-4); color: var(--gold-soft); }

/* league gating: a locked play keeps its grade tile visible, the rest is blurred */
.lock-blur { filter: blur(5px); user-select: none; pointer-events: none; }
.lock-host { position: relative; }
.lock-pill {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border-radius: 10px;
  background: rgba(9, 16, 26, .94); border: 2px solid rgba(245, 179, 1, .5); box-shadow: 0 3px 0 #03060b;
  font: 400 10.5px/1 var(--f-mono); letter-spacing: .08em; color: var(--gold-soft); white-space: nowrap; text-transform: uppercase;
}
.lock-pill:hover { color: #fff; border-color: var(--gold); }
.lock-pill--sm { padding: 5px 8px; border-radius: 8px; gap: 6px; }
.lock-host > .lock-pill--center { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 2; }

/* ---------- skeleton ---------- */
.skeleton { border-radius: 14px; background: linear-gradient(90deg, #0e1622 0, #16233a 40px, #0e1622 80px) 0 0 / 800px 100% var(--bg-1); animation: gf-shimmer 1.4s linear infinite; }

/* ---------- toasts ---------- */
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 90; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 12px; min-width: 240px; max-width: 360px; padding: 12px 14px; border-radius: 14px; background: var(--card); border: 2px solid var(--line-4); box-shadow: 0 6px 0 #03060b, 0 20px 50px rgba(0, 0, 0, .45); animation: gf-toast .35s cubic-bezier(.2, .9, .3, 1.25) both; pointer-events: auto; }
.toast__title { font-weight: 700; font-size: 14px; }
.toast__sub { font: 400 11px/1.3 var(--f-mono); color: var(--ink-3); margin-top: 3px; }

/* =====================================================================
   Marketing shell
   ===================================================================== */
.site { min-height: 100vh; overflow-x: clip; }

.season-banner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 16px;
  padding: 10px 20px; background: var(--banner); border-bottom: 2px solid var(--banner-border);
  font: 400 12px/1.3 var(--f-mono); letter-spacing: .04em; color: #fff; text-align: center;
}
.season-banner__tag { padding: 4px 8px; border-radius: 6px; background: var(--bg-0); color: var(--gold); letter-spacing: .14em; }
.season-banner__ends { color: var(--green); }
.season-banner a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.season-banner a:hover { color: var(--gold-soft); }

.site-nav { position: sticky; top: 0; z-index: 40; background: rgba(7, 11, 18, .86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 2px solid var(--line-1); }
.site-nav__inner { max-width: var(--container); margin: 0 auto; padding: 14px var(--gutter); display: flex; align-items: center; gap: 28px; }
.site-nav__links { display: flex; gap: 24px; font-size: 15px; font-weight: 600; }
.site-nav__links a, .site-nav__login { color: var(--ink-2); }
.site-nav__links a:hover, .site-nav__login:hover, .site-nav__links a[aria-current='page'] { color: #fff; }
.site-nav__right { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.site-nav__login { font-weight: 600; font-size: 15px; }
.site-nav__burger { display: none; width: 42px; height: 42px; border-radius: 11px; background: var(--bg-1); border: 2px solid var(--line-3); color: var(--ink-2); place-items: center; }
.site-nav__mobile { display: none; }

@media (max-width: 880px) {
  .site-nav__inner { gap: 14px; }
  .site-nav__links, .site-nav__login { display: none; }
  .site-nav__burger { display: grid; }
  .site-nav__mobile { display: flex; flex-direction: column; gap: 4px; padding: 6px var(--gutter) 18px; border-top: 2px solid var(--line-1); }
  .site-nav__mobile a { padding: 12px 6px; color: var(--ink-2); font-weight: 600; font-size: 16px; border-bottom: 1px solid var(--line-1); }
  .site-nav__mobile a:last-child { border-bottom: 0; }
}
@media (max-width: 420px) {
  .site-nav .logo__word { display: none; }
}

.site-footer { border-top: 2px solid var(--line-1); background: var(--bg-footer); }
.site-footer__top { line-height: normal; max-width: var(--container); margin: 0 auto; padding: 56px var(--gutter) 32px; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 32px; }
.site-footer__brand { grid-column: span 2; min-width: 0; max-width: 360px; }
.site-footer__brand p { margin-top: 16px; font-size: 15px; line-height: 1.55; color: var(--ink-2); }
.site-footer__social { margin-top: 16px; display: flex; gap: 16px; font-size: 14px; font-weight: 600; }
.site-footer__social a { color: var(--ink-2); }
.site-footer__col { display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.site-footer__col .label { margin-bottom: 4px; }
.site-footer__col a { color: var(--ink-soft); }
.site-footer__col a:hover { color: var(--gold-soft); }
.site-footer__legal { max-width: var(--container); margin: 0 auto; padding: 24px var(--gutter) 40px; border-top: 2px solid var(--line-1); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.site-footer__legal p { max-width: 780px; font-size: 13px; line-height: 1.6; color: var(--ink-3); }
.site-footer__legal span { font: 400 12px/1.6 var(--f-mono); color: var(--ink-3); }
.site-footer--compact .site-footer__legal { border-top: 0; padding: 28px var(--gutter) 36px; }
@media (max-width: 560px) {
  .site-footer__top { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 20px; }
  .site-footer__brand { grid-column: 1 / -1; }
}

/* =====================================================================
   App shell: sidebar + topbar (+ bottom tab bar on mobile)
   ===================================================================== */
.app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.app__col { min-width: 0; display: flex; flex-direction: column; }
.app-main { padding: 28px; display: flex; flex-direction: column; gap: 22px; min-width: 0; }

.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; scrollbar-width: thin;
  display: flex; flex-direction: column; gap: 20px; padding: 20px 14px 18px;
  background: var(--bg-sidebar); border-right: 2px solid var(--line-1);
}
.sidebar .logo { padding: 4px 6px; }
.sidebar .logo__word { font-size: 17px; }
.season-card { padding: 12px; border-radius: 14px; background: var(--bg-tile); border: 2px solid var(--line-3); }
.season-card__head { display: flex; justify-content: space-between; font: 400 10.5px/1 var(--f-mono); letter-spacing: .12em; color: var(--ink-3); }
.season-card__head span:first-child { color: var(--gold); }
.season-card .bar { margin-top: 10px; }
.season-card p { margin-top: 8px; font-size: 12px; line-height: normal; color: var(--ink-2); }

.side-nav { display: flex; flex-direction: column; gap: 4px; }
.side-nav__label { padding: 0 8px 6px; font: 400 10.5px/1 var(--f-mono); letter-spacing: .14em; color: var(--ink-3); }
.side-nav a {
  display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 12px;
  border: 2px solid transparent; color: var(--ink-2); font: 600 15px/1 var(--f-body);
  transition: background .12s, color .12s;
}
.side-nav a:hover { color: #fff; background: rgba(24, 38, 58, .5); }
.side-nav__icon { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 9px; background: #101a28; color: #9aabbf; }
.side-nav a > span:nth-child(2) { flex: 1; min-width: 0; }
.side-nav a[aria-current='page'] { background: var(--bg-active); border-color: var(--steel); box-shadow: var(--sh-active); color: #fff; }
.side-nav a[aria-current='page'] .side-nav__icon { background: linear-gradient(160deg, #6fa8ff, #2a5fc4); color: #fff; }
.side-nav .tag { font-size: 10px; }

.sidebar__bottom { margin-top: auto; display: flex; flex-direction: column; gap: 14px; }
.upsell { padding: 14px; border-radius: 16px; background: linear-gradient(160deg, #17305a, #111c2c); border: 2px solid #3a5a85; box-shadow: 0 5px 0 #03060b; }
.upsell__name { margin-top: 8px; font: 400 17px/1 var(--f-varsity); color: var(--orange-soft); }
.upsell p { margin-top: 8px; font-size: 13px; line-height: 1.4; color: var(--ink-2); }
.upsell .btn { margin-top: 12px; }
.me-card { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; background: var(--bg-tile); border: 2px solid var(--line-3); color: var(--ink); }
.me-card:hover { color: var(--ink); border-color: var(--line-4); }
.me-card__handle { display: block; font-weight: 700; font-size: 14px; }
.me-card__lvl { display: flex; align-items: center; gap: 7px; margin-top: 6px; font: 400 10.5px/1 var(--f-mono); color: var(--steel-soft); }
.me-card__lvl .bar { flex: 1; }
.logout-form { margin: -4px 0 0; padding: 0 6px; }
.logout-btn { font: 400 11px/1 var(--f-mono); letter-spacing: .1em; color: var(--ink-3); text-transform: uppercase; }
.logout-btn:hover { color: var(--gold-soft); }
.rg-note a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 2px; }
.rg-note a:hover { color: var(--gold-soft); }
.rg-note { padding: 0 6px; font: 400 10.5px/1.5 var(--f-mono); color: var(--ink-3); }

.topbar {
  position: sticky; top: 0; z-index: 30; line-height: normal;
  display: flex; align-items: center; gap: 14px; flex-wrap: nowrap; padding: 14px 28px;
  background: rgba(7, 11, 18, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--line-1);
}
.topbar__crumb { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; font: 400 12px/1.2 var(--f-mono); letter-spacing: .08em; color: var(--ink-3); white-space: nowrap; }
.topbar__search {
  flex: 1 1 200px; max-width: 420px; display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-radius: 12px; background: var(--bg-1); border: 2px solid var(--line-2b); color: var(--ink-3); font-size: 14px; text-align: left;
}
.topbar__search:hover { border-color: var(--line-4); }
.topbar__search { min-width: 0; }
.topbar__search > span:nth-child(2) { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kbd { padding: 3px 6px; border-radius: 6px; background: var(--line-1); font: 400 11px/1 var(--f-mono); color: var(--ink-2); }
.topbar__right { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: none; }
.streak-chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px 6px 8px; border-radius: 10px; background: #16202e; border: 2px solid var(--line-4); }
.streak-chip b { font: 400 15px/1 var(--f-display); color: var(--gold-soft); }
.streak-chip small { font: 400 10.5px/1.1 var(--f-mono); color: var(--ink-2); }
.icon-btn { position: relative; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: var(--bg-1); border: 2px solid var(--line-2b); color: var(--ink-2); }
.icon-btn:hover { color: #fff; border-color: var(--line-4); }
.icon-btn__dot { position: absolute; top: 6px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 8px var(--orange); }

.popover { position: absolute; top: calc(100% + 10px); right: 0; z-index: 60; width: min(340px, calc(100vw - 32px)); padding: 10px; border-radius: 16px; background: var(--bg-1); border: 2px solid var(--line-4); box-shadow: 0 6px 0 #03060b, 0 30px 60px rgba(0, 0, 0, .5); }

/* command palette */
.palette-backdrop { position: fixed; inset: 0; z-index: 80; background: rgba(4, 7, 12, .72); backdrop-filter: blur(4px); display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; }
.palette { width: min(620px, 100%); border-radius: 20px; background: var(--card); border: 2px solid var(--line-4); box-shadow: 0 8px 0 #03060b, 0 40px 100px rgba(0, 0, 0, .6); overflow: hidden; }
.palette__input { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 2px solid var(--line-2); }
.palette__input input { flex: 1; background: none; border: 0; outline: none; font-size: 17px; color: var(--ink); }
.palette__list { max-height: 52vh; overflow-y: auto; padding: 8px; }
.palette__item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--ink); }
.palette__item.is-active, .palette__item:hover { background: var(--bg-active); color: #fff; }
.palette__empty { padding: 26px; text-align: center; color: var(--ink-3); font: 400 12px/1.4 var(--f-mono); }

/* bottom tab bar (mobile) */
.tabbar { display: none; }

/* keep the topbar on one row on laptops: the live counters go first */
@media (max-width: 1360px) {
  .topbar__right .chip { display: none; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { display: none; }
  .app-main { padding: 20px 16px 104px; gap: 18px; }
  .topbar { padding: 12px 16px; gap: 10px; flex-wrap: nowrap; }
  .topbar__right { flex-wrap: nowrap; }
  .topbar__crumb { display: none; }
  .topbar__search { flex: 1 1 auto; max-width: none; }
  .topbar__search .kbd, .streak-chip small { display: none; }
  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    background: rgba(9, 16, 26, .96); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-top: 2px solid var(--line-1);
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 7px 2px; border-radius: 12px; border: 2px solid transparent; color: var(--ink-3); font: 600 11px/1 var(--f-body); }
  .tabbar a[aria-current='page'] { background: var(--bg-active); border-color: var(--steel); color: #fff; box-shadow: 0 3px 0 #0f2a5c; }
  .toasts { bottom: 92px; right: 12px; left: 12px; align-items: stretch; }
  .toast { max-width: none; }
}
@media (max-width: 520px) {
  .topbar .btn--xs { padding: 9px 11px; font-size: 13px; }
  .topbar__right { gap: 6px; }
}
