@charset "utf-8";
/* Jewish Pokemon Exchange Group.
   The page is his poster: one acid sheet inside a black frame, cut into ruled modules, each module
   wearing a black tab in its corner and a 3 : 1 seam inside it, with a grain over everything.
   Every module's right rail is a dark plate, so the long reading sits on black and the acid is a
   ground, never a page of glare. The objects on it come out of his banner: flat pixel sprites, drawn
   on the same dark plate, scaled by whole numbers only.
   Three voices: Archivo for the display and the heads, JetBrains Mono for every label and value,
   Pixeloid for the ticker and the figures only.
   ONE type scale (16 / 20 / 24 / 32 / 48 / 72 / 96 / 144) and ONE spacing scale (4 ... 64).
   Nothing in this file may use a size that is not in them. */

@font-face { font-family: "Archivo"; src: url("/fonts/Archivo-Variable.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: "JBMono"; src: url("/fonts/JetBrainsMono-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Pixeloid"; src: url("/fonts/PixeloidSans-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  /* colour: the base pair, one surface, one accent. Nothing else. (DESIGN-NOTES.md section 2) */
  --acid: #aed011;          /* his poster's green, 12% out of saturation so a whole page of it does not glare */
  --ink: #080c0e;           /* type and every rule on the acid */
  --surface: #0d1317;       /* the dark plate: every rail, every picture's ground */
  --on-dark: #eef2e2;       /* type on the plate, 16.4 : 1 */
  --on-dark-2: #aeb8a4;     /* second rank on the plate, 9.1 : 1 */
  --accent: #ecb244;        /* the one accent: a chosen thing, a focus ring, a live key */

  --frame: 8px;
  --rule: 6px;
  --hair: 3px;
  --edge: 16px;

  /* spacing scale */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px;
  --pad: 32px;

  /* type scale */
  --t1: 16px;   /* every caps label, every small line */
  --t2: 20px;   /* every running line, every value in a row */
  --t3: 24px;   /* a card title */
  --t4: 32px;   /* a figure in the rail, a statement */
  --t5: 48px;   /* a section statement */
  --t6: 72px;   /* the season figure */
  --display: 96px;

  --sprite: 320px;          /* the plate every sprite stands on: one box, one crop, one scale */

  color-scheme: light;
}

* { box-sizing: border-box; }
html { background: var(--acid); }
body {
  margin: 0;
  padding: var(--edge);
  background: var(--acid);
  color: var(--ink);
  font-family: "Archivo", system-ui, sans-serif;
  font-size: var(--t2);
  line-height: 1.6;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, canvas { display: block; max-width: 100%; }
::selection { background: var(--ink); color: var(--acid); }

/* the risograph grain of his poster: one tile with real alpha, multiplied over the whole sheet */
.grain {
  position: fixed;
  inset: 0;
  z-index: 9;
  pointer-events: none;
  background-image: url("/img/grain.webp");
  background-size: 192px 192px;
  opacity: 0.42;
  mix-blend-mode: multiply;
}

/* ---- the sheet --------------------------------------------------------- */
.poster {
  max-width: 1760px;
  margin: 0 auto;
  border: var(--frame) solid var(--ink);
  background: var(--acid);
}
.mod + .mod { border-top: var(--rule) solid var(--ink); }

/* ---- the tab row: one badge, one size, one colour, everywhere ---------- */
.mod-head { display: flex; align-items: stretch; flex-wrap: wrap; }
.tab, .badge {
  margin: 0;
  background: var(--ink);
  color: var(--acid);
  font-family: "JBMono", monospace;
  font-size: var(--t1);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: var(--s3) var(--s5);
  display: flex;
  align-items: center;
  min-height: 48px;
}
.tab::after { content: "_"; }
.badge { margin-left: auto; }
.badge::before { content: "//\00a0"; }
.strip-name {
  margin: 0;
  padding: var(--s3) var(--s5);
  font-family: "JBMono", monospace;
  font-size: var(--t1);
  line-height: 1.2;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
}

/* ---- the body of a module: the 3 : 1 seam ------------------------------ */
.mod-body { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); align-items: stretch; }
.mod-main { padding: var(--pad); min-width: 0; }
.mod-rail {
  padding: var(--pad);
  background: var(--surface);
  color: var(--on-dark);
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s5);
}
.mod-rail .mono, .mod-rail .note { color: var(--on-dark-2); }
.rail-h {
  margin: 0;
  position: relative;
  font-family: "JBMono", monospace;
  font-size: var(--t1);
  line-height: 1.2;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding-bottom: var(--s3);
}
.rail-h::after { content: "_"; }
/* every rule between rows is drawn as a bar, not as a border: a bordered row becomes its own box
   and its own text is then pressed against its own edge */
.rail-h::before, .stat::before, .fact::before, .fact:first-child::after,
.buys li::before, .rows li::before, .cands li::before, .shelf li::before,
.buys li:first-child::after, .rows li:first-child::after, .cands li:first-child::after, .shelf li:first-child::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--hair);
  background: var(--ink);
}
.fact:first-child::after, .buys li:first-child::after, .rows li:first-child::after,
.cands li:first-child::after, .shelf li:first-child::after { bottom: auto; top: 0; }
.mod-rail .rail-h::before, .mod-rail .stat::before, .mod-rail .buys li::before,
.mod-rail .buys li:first-child::after { background: var(--on-dark); }

/* ---- type: one rule per level ------------------------------------------
   display and statements: caps, no tracking, Archivo 900.
   heads: caps, Archivo 900 at --t3.
   labels: caps, mono, 0.1em tracking, --t1.
   running text and values: sentence case, mono, --t2 at 1.6. */
.display {
  margin: 0;
  font-size: var(--display);
  font-weight: 900;
  font-stretch: 112%;
  line-height: 0.9;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.statement {
  margin: 0;
  font-size: var(--t5);
  font-weight: 900;
  font-stretch: 105%;
  line-height: 1.05;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}
.statement-sm { font-size: var(--t4); }
.mono {
  margin: 0;
  font-family: "JBMono", monospace;
  font-size: var(--t2);
  line-height: 1.6;
  max-width: 68ch;
}
.mono-note, .note {
  margin: 0;
  font-family: "JBMono", monospace;
  font-size: var(--t1);
  line-height: 1.6;
}
.label {
  font-family: "JBMono", monospace;
  font-size: var(--t1);
  line-height: 1.2;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: block;
}
.val {
  margin: 0;
  font-family: "JBMono", monospace;
  font-size: var(--t4);
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.figure {
  font-family: "Pixeloid", monospace;
  font-size: var(--t6);
  line-height: 1;
  -webkit-font-smoothing: none;
  text-rendering: geometricPrecision;
}
.figure-sm { font-size: var(--t4); }

/* ---- the hero ---------------------------------------------------------- */
.hero-main { display: grid; grid-template-columns: max-content max-content; justify-content: space-between; gap: var(--s7); align-items: center; }
.hero-type { min-width: 0; }
.wordmark { margin: 0 0 var(--s5); line-height: 0; }
/* the ticker is a pixel sprite drawn at a whole multiple of its own grid, never a font scaled to a
   fraction of one: his banner's lettering is pixel perfect and so is this */
.wordmark img { width: auto; max-width: 100%; height: auto; image-rendering: pixelated; }
.hero-foot {
  margin: var(--s5) 0 0;
  font-family: "JBMono", monospace;
  font-size: var(--t2);
  line-height: 1.6;
}

/* ---- a plate: a pixel object on the same dark ground as every rail ------ */
.plate {
  margin: 0;
  background: var(--surface);
  border: var(--hair) solid var(--ink);
  min-width: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: var(--s4);
}
/* a sprite is never scaled by a fraction: it is shown at the size it was cut to, and the plate
   around it is the same box in all four steps, so every object reads at one scale */
.plate img { image-rendering: pixelated; width: auto; height: auto; max-width: 100%; }
.step .plate { width: var(--sprite); height: var(--sprite); }
.plate-hero { padding: var(--s6); }
.plate-shelf { padding: var(--s5) var(--s4); }

/* ---- the season meter --------------------------------------------------- */
.meter-row { display: flex; align-items: center; gap: var(--s5); }
.figure-of {
  font-family: "JBMono", monospace;
  font-size: var(--t2);
  line-height: 1.2;
  white-space: nowrap;
}
.meter { flex: 1 1 auto; min-width: 0; height: 56px; }
.meter-foot { display: flex; justify-content: space-between; gap: var(--s4); margin: var(--s5) 0 0; flex-wrap: wrap; }

/* ---- how it works: four rows, the sprite left, the step beside it ------- */
.flow { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s6); }
.step {
  position: relative;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: var(--s6);
  align-items: start;
  min-width: 0;
}
.step .plate { align-self: start; }
.step-body { min-width: 0; display: flex; flex-direction: column; gap: var(--s3); }
.step-n {
  font-family: "JBMono", monospace;
  font-size: var(--t1);
  line-height: 1.2;
  letter-spacing: 0.1em;
}
.step-t {
  margin: 0;
  font-size: var(--t3);
  font-weight: 900;
  font-stretch: 108%;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  line-height: 1.15;
}
.step-b { margin: 0; font-family: "JBMono", monospace; font-size: var(--t2); line-height: 1.6; max-width: 68ch; }
/* the arrow leaves the picture it belongs to, centred on that picture's own column */
.step:not(:last-child)::after {
  content: "↓";
  position: absolute;
  top: 100%;
  left: calc(var(--sprite) / 2 + var(--s4) + var(--hair));
  transform: translate(-50%, calc(var(--s6) / 2 - 50%));
  font-family: "JBMono", monospace;
  font-size: var(--t3);
  line-height: 1;
  color: var(--ink);
}

/* ---- the stats rail ------------------------------------------------------ */
.stats { margin: 0; display: grid; grid-auto-rows: 1fr; gap: var(--s4); }
.stat {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px;
  grid-template-rows: auto auto;
  gap: var(--s1) var(--s4);
  align-items: center;
  padding-bottom: var(--s4);
}
.stat dt { grid-column: 1; grid-row: 1; color: var(--on-dark); }
.stat dd { grid-column: 1; grid-row: 2; color: var(--on-dark); }
.bar { grid-column: 2; grid-row: 1 / 3; width: 96px; height: 16px; }

/* ---- the card ------------------------------------------------------------ */
.card-main { display: grid; grid-template-columns: minmax(0, 0.72fr) minmax(0, 1fr); gap: var(--s7); align-items: start; }
.plate-scan { padding: 0; border: 0; background: transparent; display: block; }
.card-data { display: flex; flex-direction: column; gap: var(--s6); min-width: 0; }
.facts { margin: 0; display: flex; flex-direction: column; }
.fact {
  position: relative;
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: var(--s5);
  align-items: baseline;
  padding: var(--s4) 0;
}
.fact dd {
  margin: 0;
  font-family: "JBMono", monospace;
  font-size: var(--t2);
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.fact a { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }
.fact a:hover { background: var(--ink); color: var(--acid); text-decoration-color: var(--acid); }

/* ---- lists: buys, queue, candidates, seasons ----------------------------- */
.buys, .rows, .cands, .shelf { list-style: none; margin: 0; padding: 0; }
.buys li, .rows li, .cands li, .shelf li { position: relative; min-width: 0; }
/* an empty state is one sentence that fills the row, never a cell of the grid it replaces */
.buys li.empty, .rows li.empty, .cands li.empty, .shelf li.empty { display: block; }
.empty {
  font-family: "JBMono", monospace;
  font-size: var(--t1);
  line-height: 1.6;
  padding: var(--s4) 0;
}
.slot { height: 72px; display: flex; align-items: center; padding-bottom: var(--s4); }
.ghost { color: var(--ink); opacity: 1; }

.buys li { display: flex; justify-content: space-between; gap: var(--s4); padding: var(--s3) 0; font-family: "JBMono", monospace; font-size: var(--t1); flex-wrap: wrap; }
.buys a { color: inherit; text-decoration: underline; text-underline-offset: 4px; }

.rows li { display: grid; grid-template-columns: max-content minmax(0, 1fr) max-content; gap: var(--s2) var(--s5); align-items: center; padding: var(--s4) 0; }
.rows .place { font-family: "Pixeloid", monospace; font-size: var(--t4); line-height: 1; -webkit-font-smoothing: none; }
.rows .who { font-family: "JBMono", monospace; font-size: var(--t2); line-height: 1.6; overflow-wrap: anywhere; min-width: 0; }
.rows .days { font-family: "JBMono", monospace; font-size: var(--t3); white-space: nowrap; }
.rows .since { grid-column: 2 / 4; font-family: "JBMono", monospace; font-size: var(--t1); line-height: 1.6; }
.rows .ten { grid-column: 2 / 4; height: 16px; width: 100%; }
.rows .next {
  grid-column: 2 / 4;
  justify-self: start;
  background: var(--ink);
  color: var(--acid);
  font-family: "JBMono", monospace;
  font-size: var(--t1);
  line-height: 1.2;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: var(--s2) var(--s4);
}
.rows li.me { background: var(--ink); color: var(--acid); padding-left: var(--s5); padding-right: var(--s5); }
.rows li.me .next { background: var(--acid); color: var(--ink); }

.cands li { display: grid; grid-template-columns: minmax(0, 1fr) max-content; gap: var(--s3) var(--s5); align-items: center; padding: var(--s5) 0; }
.cands .cname { font-size: var(--t3); font-weight: 900; font-stretch: 106%; text-transform: uppercase; line-height: 1.15; letter-spacing: -0.01em; min-width: 0; }
.cands .cval { font-family: "JBMono", monospace; font-size: var(--t3); white-space: nowrap; }
.cands .cbar { grid-column: 1 / 3; height: 16px; width: 100%; }
.cands .cweight { grid-column: 1 / 3; font-family: "JBMono", monospace; font-size: var(--t1); line-height: 1.6; }
.cands .cvote { grid-column: 1 / 3; justify-self: start; }

.shelf li { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: var(--s5); align-items: center; padding: var(--s4) 0; }
.shelf .place { font-family: "Pixeloid", monospace; font-size: var(--t4); line-height: 1; -webkit-font-smoothing: none; }
.shelf .cname { font-size: var(--t3); font-weight: 900; text-transform: uppercase; line-height: 1.15; }
.shelf .who { font-family: "JBMono", monospace; font-size: var(--t1); line-height: 1.6; }

.splits { display: grid; gap: var(--s4); }
.splitcell { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: var(--s5); align-items: center; min-width: 0; }

/* ---- keys and fields ------------------------------------------------------ */
.key {
  font-family: "JBMono", monospace;
  font-size: var(--t1);
  line-height: 1.2;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  min-height: 56px;
  padding: var(--s4) var(--s5);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s3);
  background: var(--ink);
  color: var(--acid);
  border: var(--hair) solid var(--ink);
  text-decoration: none;
  cursor: pointer;
  text-align: center;
}
.key:hover { background: var(--acid); color: var(--ink); }
.key:active { background: var(--accent); color: var(--ink); border-color: var(--ink); }
.key img { width: 24px; height: 24px; flex: 0 0 auto; }
.key[disabled], .key[aria-disabled="true"] {
  background: transparent;
  color: var(--ink);
  border: var(--hair) solid var(--ink);
  cursor: default;
  pointer-events: none;
}
/* on the dark rail a key is the acid itself, and a dead one is an outline in the plate's own ink */
.mod-rail .key { background: var(--acid); color: var(--ink); border-color: var(--acid); }
.mod-rail .key:hover { background: var(--on-dark); border-color: var(--on-dark); }
.mod-rail .key:active { background: var(--accent); border-color: var(--accent); }
.mod-rail .key[disabled], .mod-rail .key[aria-disabled="true"] { background: transparent; color: var(--on-dark); border-color: var(--on-dark); }
.key-wide { width: 100%; }

.check { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s3); align-items: center; }
.check .label { grid-column: 1 / -1; }
.field {
  font-family: "JBMono", monospace;
  font-size: var(--t2);
  min-height: 56px;
  padding: 0 var(--s5);
  border: var(--hair) solid var(--ink);
  background: transparent;
  color: var(--ink);
  min-width: 0;
}
.field::placeholder { color: #2f3a06; }
.mod-rail .field { border-color: var(--on-dark); color: var(--on-dark); }
.mod-rail .field::placeholder { color: var(--on-dark-2); }

/* ---- the contract --------------------------------------------------------- */
.contract-main { display: flex; flex-direction: column; gap: var(--s5); }
.barcode { width: 100%; height: 96px; }
.mint {
  margin: 0;
  font-family: "JBMono", monospace;
  font-size: var(--t3);
  line-height: 1.4;
  overflow-wrap: anywhere;
  user-select: all;
}
.keys { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s3); }

/* ---- focus ---------------------------------------------------------------- */
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: var(--hair) solid var(--accent);
  outline-offset: var(--s1);
}

/* ---- widths --------------------------------------------------------------- */
@media (max-width: 1500px) {
  :root { --display: 72px; --t5: 32px; }
  .keys { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  :root { --display: 72px; --t5: 32px; }
  .mod-body { grid-template-columns: minmax(0, 1fr); }
  .card-main { grid-template-columns: minmax(0, 1fr); gap: var(--s6); }
  .hero-main { gap: var(--s6); }
}
@media (max-width: 820px) {
  :root { --display: 48px; --t5: 32px; --t4: 24px; --sprite: 300px; --t6: 48px; }
  .mod-head { display: grid; grid-template-columns: minmax(0, 1fr); }
  .badge { margin-left: 0; }
  .hero-main { grid-template-columns: minmax(0, 1fr); align-items: start; }

  .step { grid-template-columns: minmax(0, 1fr); gap: var(--s4); }
  .step .plate { justify-self: start; width: 320px; height: 320px; }
  .step:not(:last-child)::after { left: calc(var(--sprite) / 2 + var(--s4)); }
  .key { width: 100%; }
  .keys { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
  :root { --edge: 8px; --frame: 5px; --rule: 4px; --display: 48px; --sprite: 100%; }
  .meter-row { flex-wrap: wrap; gap: var(--s4); }
  .meter { flex: 1 0 100%; height: 48px; }
  .rows li { grid-template-columns: max-content minmax(0, 1fr); }
  .rows .days { grid-column: 2; justify-self: start; }
  .fact { grid-template-columns: minmax(0, 1fr); gap: var(--s1); }

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