/* HEFTY.GG redesign concept: tokens + shared components.
   Type: Archivo (one text family; the wdth axis carries display vs UI) + Chivo Mono (every number).
   Grid: 8px spacing, radius family 4 / 8 / 12 / 16. */

:root {
  /* elevation ladder, derived from brand navy #191A40 */
  --bg: #0B0C1F;          /* L0 page */
  --bg-band: #0E0F28;     /* L0.5 alternate band */
  --bg-sunken: #07081A;   /* footer, caption */
  --s1: #111233;          /* L1 card */
  --s2: #191A40;          /* L2 raised card, popover (brand navy) */
  --s3: #22245A;          /* L3 control, input, chip */
  --s4: #2E3170;          /* L4 hover, track fill */
  --line: rgba(236, 240, 243, .08);
  --line-2: rgba(236, 240, 243, .13);
  --line-3: rgba(236, 240, 243, .22);

  /* text */
  --hi: #FCFCFC;
  --t1: #ECF0F3;
  --t2: #B8BED8;
  --t3: #9097BD;          /* AA on every surface up to --s3 */
  --t-off: #5F6590;       /* disabled only */

  /* brand */
  --blue: #4090D9;
  --blue-deep: #3F4DB0;
  --blue-300: #8CBDF0;    /* links + focus */
  --teal: #7AE4DE;        /* Points, earned, verified */
  --purple: #9F6CE0;      /* Heft, progression (fills) */
  --purple-300: #BD9CF2;  /* Heft as text */
  --grad: linear-gradient(90deg, #4090D9 0%, #9F6CE0 100%);
  --warn: #F3C26B;
  --danger: #F47C84;
  --focus: #8CBDF0;

  --r1: 4px; --r2: 8px; --r3: 12px; --r4: 16px;

  --f-text: 'Archivo', system-ui, sans-serif;
  --f-num: 'Chivo Mono', ui-monospace, monospace;

  --e1: inset 0 1px 0 rgba(255, 255, 255, .035), 0 1px 2px rgba(3, 4, 14, .35);
  --e2: inset 0 1px 0 rgba(255, 255, 255, .045), 0 2px 6px rgba(3, 4, 14, .3), 0 16px 32px -12px rgba(3, 4, 14, .55);
  --e3: inset 0 1px 0 rgba(255, 255, 255, .06), 0 4px 12px rgba(3, 4, 14, .35), 0 28px 56px -16px rgba(3, 4, 14, .75);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--t1);
  font-family: var(--f-text);
  font-stretch: 100%;
  font-size: 16px;
  line-height: 24px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: inherit; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.wrap { width: 1200px; margin: 0 auto; }

/* ---------- type ---------- */
.display {
  font-stretch: 112%;
  font-weight: 720;
  font-size: 60px;
  line-height: 64px;
  letter-spacing: -.028em;
  color: var(--hi);
  text-wrap: balance;
}
.h2 {
  font-stretch: 110%;
  font-weight: 700;
  font-size: 40px;
  line-height: 48px;
  letter-spacing: -.022em;
  color: var(--hi);
  text-wrap: balance;
}
.h3 {
  font-stretch: 104%;
  font-weight: 650;
  font-size: 22px;
  line-height: 28px;
  letter-spacing: -.012em;
  color: var(--hi);
}
.h4 { font-weight: 620; font-size: 17px; line-height: 24px; color: var(--hi); letter-spacing: -.005em; }
.lede { font-size: 18px; line-height: 28px; color: var(--t2); text-wrap: pretty; }
.body { font-size: 16px; line-height: 24px; color: var(--t2); text-wrap: pretty; }
.small { font-size: 14px; line-height: 20px; color: var(--t2); }
.micro { font-size: 12px; line-height: 16px; color: var(--t3); }
.eyebrow {
  font-size: 12px; line-height: 16px; font-weight: 650;
  letter-spacing: .1em; text-transform: uppercase; color: var(--t3);
}
.num {
  font-family: var(--f-num);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  letter-spacing: -.03em;
}
.num .cm { margin: 0 -.2em 0 -.1em; }
.num .sp { margin-right: -.24em; }
.strong { color: var(--hi); font-weight: 600; }
.teal { color: var(--teal); }
.heft-t { color: var(--purple-300); }
.link { color: var(--blue-300); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.link .i { width: 16px; height: 16px; }

/* ---------- icons + glyphs ---------- */
.i {
  width: 20px; height: 20px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.75;
  stroke-linecap: round; stroke-linejoin: round;
}
.glyph { width: 14px; height: 14px; flex: none; fill: currentColor; display: inline-block; }
.glyph.pts { color: var(--teal); }
.glyph.heft { color: var(--purple); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px;
  border-radius: var(--r2);
  font-family: var(--f-text); font-stretch: 100%;
  font-weight: 620; font-size: 15px; line-height: 1; letter-spacing: .003em;
  border: 1px solid transparent; white-space: nowrap;
}
.btn .i { width: 18px; height: 18px; stroke-width: 2; }
.btn-l { height: 48px; padding: 0 20px; font-size: 16px; }
.btn-s { height: 32px; padding: 0 12px; font-size: 13px; gap: 6px; }
.btn-s .i { width: 16px; height: 16px; }
.btn-primary {
  background: var(--grad);
  color: #0B0C1F;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), inset 0 -1px 0 rgba(11, 12, 31, .18), 0 6px 16px -6px rgba(3, 4, 14, .7);
}
.btn-secondary {
  background: rgba(236, 240, 243, .07);
  color: var(--hi);
  border-color: rgba(236, 240, 243, .16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
}
.btn-ghost { background: transparent; color: var(--t1); }
.btn-disabled { background: #17183A; color: var(--t-off); border-color: var(--line); box-shadow: none; }
.is-focus { outline: 2px solid var(--focus); outline-offset: 3px; }

/* ---------- badges + chips ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 8px;
  border-radius: var(--r1);
  font-size: 12px; line-height: 1; font-weight: 620; letter-spacing: .02em;
  white-space: nowrap;
}
.badge .i { width: 14px; height: 14px; stroke-width: 2.25; }
.badge-cadence { background: rgba(236, 240, 243, .06); color: var(--t1); box-shadow: inset 0 0 0 1px var(--line-2); }
.badge-live { background: rgba(122, 228, 222, .1); color: var(--teal); box-shadow: inset 0 0 0 1px rgba(122, 228, 222, .28); }
.badge-soon { color: var(--t3); border: 1px dashed rgba(236, 240, 243, .24); }
.badge-verified { background: rgba(122, 228, 222, .1); color: var(--teal); }
.badge-wait { background: rgba(243, 194, 107, .1); color: var(--warn); box-shadow: inset 0 0 0 1px rgba(243, 194, 107, .26); }
.badge-check { background: rgba(140, 189, 240, .1); color: var(--blue-300); box-shadow: inset 0 0 0 1px rgba(140, 189, 240, .28); }
.badge-heft { background: rgba(159, 108, 224, .12); color: var(--purple-300); }
.badge-pts { background: rgba(122, 228, 222, .1); color: var(--teal); }

.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; line-height: 16px; font-weight: 560; color: var(--t3); }
.tag::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .8; }

.live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--teal); flex: none;
  box-shadow: 0 0 0 3px rgba(122, 228, 222, .18);
}
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  height: 32px; padding: 0 12px;
  border-radius: var(--r2);
  background: rgba(236, 240, 243, .04);
  box-shadow: inset 0 0 0 1px var(--line-2);
  font-size: 14px; font-weight: 560; color: var(--t1);
  white-space: nowrap;
}

/* monogram tiles for games (placeholders, no publisher art) */
.mono-tile {
  display: inline-grid; place-items: center; flex: none;
  width: 28px; height: 28px; border-radius: var(--r1);
  background: #1D1F4E;
  box-shadow: inset 0 0 0 1px rgba(236, 240, 243, .14);
  font-stretch: 125%; font-weight: 800; font-size: 11px; letter-spacing: -.01em;
  color: var(--hi);
}
.mono-tile.lg { width: 40px; height: 40px; border-radius: var(--r2); font-size: 14px; }
.mono-tile.xl { width: 64px; height: 64px; border-radius: var(--r3); font-size: 22px; }
.mono-tile.dim { color: var(--t3); background: #15163A; }

/* ---------- currency amount ---------- */
.amt { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.amt .num { color: var(--hi); }
.amt .cur { font-size: 13px; font-weight: 560; color: var(--t2); }
.amt.pts .cur { color: var(--teal); }
.amt.heft .cur { color: var(--purple-300); }

/* ---------- cards ---------- */
.card {
  background: var(--s1);
  border: 1px solid var(--line-2);
  border-radius: var(--r3);
  box-shadow: var(--e1);
}
.card.raised { background: var(--s2); box-shadow: var(--e2); }
.card.float { background: var(--s2); box-shadow: var(--e3); border-color: rgba(236, 240, 243, .15); }

/* ---------- snapshot rail (signature): progress measured from the moment you accepted ---------- */
.rail { position: relative; padding-top: 12px; }
.rail__track { position: relative; height: 6px; border-radius: 3px; background: rgba(236, 240, 243, .09); overflow: hidden; }
.rail__fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: var(--grad); }
.rail__snap {
  position: absolute; left: 0; top: 0;
  width: 10px; height: 8px;
  background: var(--t1);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}
.rail__legend { display: flex; justify-content: space-between; margin-top: 8px; font-size: 12px; line-height: 16px; color: var(--t3); }
.rail__legend .num { color: var(--t2); font-size: 12px; }

/* ---------- quest card ---------- */
.quest { display: flex; flex-direction: column; overflow: hidden; }
.quest__top { display: flex; align-items: center; justify-content: space-between; padding: 20px 20px 0; }
.quest__time { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--t2); }
.quest__time .i { width: 16px; height: 16px; color: var(--t3); }
.quest__req { padding: 24px 20px 24px; }
.quest__verb { font-size: 13px; line-height: 16px; color: var(--t3); font-weight: 560; }
.quest__target { font-size: 36px; line-height: 40px; color: var(--hi); margin-top: 8px; letter-spacing: -.045em; }
.quest__target .unitw { font-family: var(--f-text); font-size: 20px; letter-spacing: -.01em; font-weight: 640; color: var(--hi); margin-left: 2px; }
.quest__unit { font-size: 17px; line-height: 24px; font-weight: 620; color: var(--t1); margin-top: 4px; }
.quest__req .tag { margin-top: 12px; }
.quest__foot {
  margin-top: auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  border-top: 1px solid var(--line);
}
.quest__foot .amt .num { font-size: 20px; letter-spacing: -.04em; }
.quest__foot .glyph { width: 16px; height: 16px; }
.quest--pts .quest__foot { background: rgba(122, 228, 222, .045); }
.quest--heft .quest__foot { background: rgba(159, 108, 224, .07); }
.quest__pays { font-size: 12px; line-height: 16px; color: var(--t3); margin-bottom: 4px; }

/* ---------- game switcher (chip + desktop panel) ---------- */
.switcher {
  display: inline-flex; align-items: center; gap: 10px;
  height: 40px; padding: 0 10px 0 6px;
  border-radius: var(--r2);
  background: rgba(236, 240, 243, .04);
  box-shadow: inset 0 0 0 1px var(--line-2);
}
.switcher__name { font-size: 14px; font-weight: 600; color: var(--hi); }
.switcher .live-dot { margin-left: 2px; }
.switcher .i { width: 16px; height: 16px; color: var(--t3); }
.switcher-wrap { position: relative; }
.switcher.is-open { background: rgba(236, 240, 243, .07); box-shadow: inset 0 0 0 1px rgba(140, 189, 240, .45); }
.switcher.is-open > .i { transform: rotate(180deg); color: var(--t1); }
.games {
  position: absolute; left: 0; top: 48px; z-index: 30;
  display: none; grid-template-columns: repeat(4, 224px); gap: 6px;
  padding: 8px; border-radius: var(--r3);
  background: var(--s2); border: 1px solid rgba(236, 240, 243, .15); box-shadow: var(--e3);
}
.game { display: flex; align-items: center; gap: 12px; height: 60px; padding: 0 12px; border-radius: var(--r2); }
.game .mono-tile { width: 36px; height: 36px; border-radius: var(--r2); font-size: 12px; }
.game__name { font-size: 14px; line-height: 20px; font-weight: 620; color: var(--hi); white-space: nowrap; }
.game__meta { display: flex; align-items: center; gap: 6px; margin-top: 2px; font-size: 12px; line-height: 16px; color: var(--t2); white-space: nowrap; }
.game__meta .live-dot { width: 6px; height: 6px; box-shadow: none; }
.game__meta .badge { height: 18px; padding: 0 6px; font-size: 11px; }
.game.is-current { background: rgba(122, 228, 222, .06); box-shadow: inset 0 0 0 1px rgba(122, 228, 222, .32); }
.game.is-current .game__meta { color: var(--teal); }
.game.is-soon .game__name { color: var(--t2); }
.switcher.is-open + .games { display: grid; }

/* ---------- gift card ---------- */
.gift { padding: 8px; }
.gift__face {
  position: relative; height: 136px; border-radius: var(--r2); overflow: hidden;
  background: #16173F;
  box-shadow: inset 0 0 0 1px rgba(236, 240, 243, .1), inset 0 1px 0 rgba(255, 255, 255, .06);
  padding: 16px;
  display: flex; flex-direction: column;
}
.gift__face svg.pat { position: absolute; inset: 0; width: 100%; height: 100%; }
.gift__brand { position: relative; font-size: 14px; font-weight: 640; color: var(--hi); }
.gift__kind { position: relative; margin-top: 2px; }
.gift__value { position: relative; margin-top: auto; font-stretch: 115%; font-weight: 720; font-size: 36px; line-height: 40px; letter-spacing: -.03em; color: var(--hi); }
.gift__meta { display: flex; align-items: center; justify-content: space-between; padding: 16px 8px 8px; }
.gift__meta .amt .num { font-size: 16px; }
.gift--soon { border-style: dashed; border-color: rgba(236, 240, 243, .2); background: transparent; box-shadow: none; display: flex; flex-direction: column; padding: 20px; }
.gift--soon .h4 { margin-top: 16px; }
.gift--soon .small { margin-top: 8px; }

/* ---------- concept notice (live pages) + caption strip (rendered frames) ---------- */
.notice { background: var(--bg-sunken); border-bottom: 1px solid var(--line); }
.notice__in { width: 1200px; max-width: calc(100% - 40px); margin: 0 auto; min-height: 36px; display: flex; align-items: center; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; padding: 8px 0; font-size: 12px; line-height: 16px; color: var(--t3); letter-spacing: .01em; }
.notice__nav { display: flex; gap: 16px; }
.notice__nav a { color: var(--t2); text-decoration: underline; text-decoration-color: rgba(236, 240, 243, .25); text-underline-offset: 3px; }
.notice__nav a[aria-current="page"] { color: var(--hi); text-decoration: none; }
.caption {
  height: 40px; display: none; align-items: center; justify-content: center;
  background: var(--bg-sunken);
  border-top: 1px solid var(--line);
  font-size: 12px; letter-spacing: .04em; color: var(--t3);
}
html.mode-png .caption, .caption.always { display: flex; }
html.mode-png .notice, html.mode-embed .notice, html.mode-frame .notice { display: none; }
html.mode-embed .caption { display: none; }

/* focus is always visible */
a:focus-visible, button:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: var(--r1); }
.btn:focus-visible { border-radius: var(--r2); }

/* fit-to-width viewer for fixed-size sheets */
[data-fit] { position: relative; }
[data-fit] > * { transform-origin: 0 0; }
