/* Parasite Pair. One sheet of paper, two families of type, one ink. */

@font-face {
  font-family: "Pixeloid";
  src: url("/fonts/PixeloidSans-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Intel One Mono";
  src: url("/fonts/IntelOneMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Intel One Mono";
  src: url("/fonts/IntelOneMono-Medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Intel One Mono";
  src: url("/fonts/IntelOneMono-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --paper: #edeceb;
  --ink: #000000;
  --rule: #c7c5c1;
  --soft: #4a4a48;

  --mono: "Intel One Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --px: "Pixeloid", "Intel One Mono", monospace;

  /* bitmap type: integer multiples of 9 only, or the pixels blur */
  --display: 45px;
  --title: 27px;
  --numeral: 36px;
  --pxlabel: 18px;

  --body: 18px;
  --label: 16px;

  --gut: 24px;
  --air: 56px;
  --rowpad: 22px;
}

@media (min-width: 560px) {
  :root { --display: 63px; --title: 36px; --numeral: 45px; --gut: 32px; --air: 72px; }
}
@media (min-width: 900px) {
  :root { --display: 81px; --title: 45px; --numeral: 54px; --gut: 40px; --air: 88px; --rowpad: 26px; }
}
@media (min-width: 1200px) {
  :root { --display: 99px; --title: 45px; --numeral: 63px; --body: 20px; --label: 18px; --pxlabel: 27px; --gut: 48px; --air: 104px; --rowpad: 30px; }
}
@media (min-width: 1600px) {
  :root { --display: 126px; --title: 54px; --numeral: 72px; --gut: 64px; --air: 120px; --rowpad: 32px; }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  font-size: var(--body);
  line-height: 1.5;
  font-synthesis: none;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body { min-height: 100vh; }

a { color: inherit; }

img { display: block; max-width: 100%; }

::selection { background: #000; color: var(--paper); }

.sheet {
  width: 100%;
  max-width: 2100px;
  margin: 0 auto;
  padding: 0 var(--gut) calc(var(--air) * 1.1);
}

/* ------------------------------------------------------------------ top row */

.top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 30px 0 0;
}

.mark {
  display: block;
  width: 62px;
  height: 62px;
  flex: none;
  text-decoration: none;
}
.mark img { width: 100%; height: auto; image-rendering: pixelated; }
.mark:focus-visible { outline: 3px solid #000; outline-offset: 4px; }

.nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.2vw, 40px);
  flex-wrap: wrap;
  justify-content: flex-end;
  font-size: var(--label);
}

.nav a {
  text-decoration: none;
  padding: 6px 2px;
  white-space: nowrap;
}
.nav a.key { padding: 0 26px; }
.nav a:hover { text-decoration: underline; text-underline-offset: 5px; }
.nav a.key:hover { text-decoration: none; }
.nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 2px; }

.burger {
  display: none;
  font: inherit;
  font-size: var(--label);
  background: none;
  border: 2px solid var(--ink);
  color: var(--ink);
  padding: 10px 18px;
  min-height: 48px;
  cursor: pointer;
}

/* ------------------------------------------------------------------ buttons */

.key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 26px;
  font-family: var(--mono);
  font-size: var(--label);
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  border: 2px solid var(--ink);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
  transition: transform .08s ease;
}
.key:hover { background: var(--ink); color: var(--paper); }
.key:active { transform: translateY(2px); }
.key:focus-visible { outline: 3px solid #000; outline-offset: 3px; }

.key--solid { background: var(--ink); color: var(--paper); }
.key--solid:hover { background: #222; color: var(--paper); }

.key--on-ink { border-color: var(--paper); color: var(--paper); }
.key--on-ink:hover { background: var(--paper); color: var(--ink); }

.key[aria-disabled="true"],
.key:disabled {
  opacity: 1;
  border-style: dashed;
  color: var(--soft);
  background: transparent;
  cursor: not-allowed;
  pointer-events: none;
}
.key--on-ink[aria-disabled="true"] { color: #9c9c99; border-color: #6b6b68; }

.key .brand { width: 20px; height: 20px; flex: none; }

.textlink {
  display: inline-flex;
  align-items: center;
  font-size: var(--label);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 7px;
  min-height: 48px;
}
.textlink:hover { text-decoration-thickness: 4px; }

/* ------------------------------------------------------------------ first screen */

.first {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--air);
  padding-top: clamp(40px, 4.2vw, 82px);
}

@media (min-width: 1100px) {
  .first {
    grid-template-columns: minmax(0, 42fr) minmax(0, 52fr);
    gap: 6%;
    align-items: start;
  }
}

.display {
  font-family: var(--px);
  font-weight: 700;
  font-size: var(--display);
  line-height: 1;
  letter-spacing: 0.02em;
  margin: 0;
  text-transform: uppercase;
}

.display--name { font-size: var(--numeral); line-height: 1.06; }

.premise {
  margin: clamp(40px, 9vw, 168px) 0 0;
  max-width: 34ch;
  font-size: var(--body);
  line-height: 1.55;
}

.first-actions {
  margin-top: 46px;
  display: flex;
  align-items: center;
  gap: 26px;
  flex-wrap: wrap;
}

/* ------------------------------------------------------------------ the match plate */

.plate { display: block; }

/* the one picture bleeds off the right edge of the sheet, as the reference's does */
@media (min-width: 1100px) {
  .plate--bleed { margin-right: calc(var(--gut) * -1); }
}

.plate canvas {
  display: block;
  width: 100%;
  height: auto;
}

.plate-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  font-size: var(--label);
  padding-bottom: 14px;
}

.plate-caption {
  font-size: var(--label);
  line-height: 1.5;
  padding-top: 16px;
  max-width: 52ch;
}

.plate-scores {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding-top: 10px;
}
.plate-scores .side { min-width: 0; }
.plate-scores .side--b { text-align: right; }
.plate-scores .num {
  font-family: var(--px);
  font-size: var(--numeral);
  line-height: 1;
  display: block;
  overflow-wrap: anywhere;
}
.plate-scores .who {
  font-size: var(--label);
  display: block;
  padding-top: 10px;
  overflow-wrap: anywhere;
}
.plate-scores .vs {
  font-family: var(--px);
  font-size: var(--pxlabel);
  opacity: .55;
  text-transform: uppercase;
}

/* ------------------------------------------------------------------ the ink block */

.inkblock {
  background: var(--ink);
  color: var(--paper);
  padding: 32px;
  margin-top: 34px;
}

.inkblock .cap {
  font-size: var(--label);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #a7a7a4;
  display: block;
  padding-bottom: 14px;
}

.inkblock .mint {
  font-size: clamp(16px, 1.35vw, 22px);
  line-height: 1.45;
  overflow-wrap: anywhere;
  min-width: 0;
  -webkit-user-select: all;
  user-select: all;
  padding-bottom: 24px;
}

.inkblock .keys {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ------------------------------------------------------------------ sections */

.section { padding-top: var(--air); }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding-bottom: 34px;
}

.section h2 {
  font-family: var(--px);
  font-weight: 700;
  font-size: var(--title);
  line-height: 1.05;
  letter-spacing: .02em;
  margin: 0;
  text-transform: uppercase;
}

.section-note { font-size: var(--label); max-width: 44ch; }

.rule { height: 2px; background: var(--ink); border: 0; margin: 0; }
.hair { height: 1px; background: var(--rule); border: 0; margin: 0; }

/* ------------------------------------------------------------------ board rows */

.pairrow {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  padding: var(--rowpad) 0;
  align-items: center;
  text-decoration: none;
}

@media (min-width: 900px) {
  .pairrow {
    grid-template-columns: 240px minmax(0, 1fr) auto;
    gap: 34px;
  }
}

.pairrow:hover .pairname { text-decoration: underline; text-underline-offset: 6px; }

.pairstrip { width: 100%; }
.pairstrip canvas { display: block; width: 100%; height: auto; }

.pairname {
  font-family: var(--px);
  font-size: var(--title);
  line-height: 1.1;
  letter-spacing: .02em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.pairmeta {
  font-size: var(--label);
  padding-top: 12px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.pairscore {
  font-family: var(--px);
  font-size: var(--numeral);
  line-height: 1.05;
  white-space: nowrap;
}
.pairscore .small { font-size: var(--pxlabel); opacity: .55; }

/* ------------------------------------------------------------------ buy feed */

.feedlist { list-style: none; margin: 0; padding: 0; }
.feedlist li {
  padding: 18px 0;
  font-size: var(--label);
  line-height: 1.55;
  border-bottom: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.feedlist .when { color: var(--soft); white-space: nowrap; }

/* ------------------------------------------------------------------ steps */

.steps {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--air) 40px;
}
@media (min-width: 760px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1300px) { .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.step .n {
  font-family: var(--px);
  font-size: var(--numeral);
  line-height: 1;
  display: block;
  padding-bottom: 20px;
}
.step canvas { display: block; width: 100%; height: auto; }
.step h3 {
  font-family: var(--px);
  font-size: var(--pxlabel);
  letter-spacing: .04em;
  text-transform: uppercase;
  margin: 26px 0 12px;
  line-height: 1.3;
}
.step p { margin: 0; font-size: var(--label); line-height: 1.6; }

/* ------------------------------------------------------------------ forms */

.form { max-width: 1120px; }
.form--wide { max-width: none; }

.field { padding-bottom: 12px; }
.field label {
  display: block;
  font-size: var(--label);
  letter-spacing: .14em;
  text-transform: uppercase;
  padding-bottom: 14px;
}
.field input {
  width: 100%;
  font-family: var(--mono);
  font-size: var(--body);
  color: var(--ink);
  background: transparent;
  border: 2px solid var(--ink);
  padding: 16px 20px;
  min-height: 60px;
  min-width: 0;
}
.field input::placeholder { color: #8b8b88; }
.field input:focus-visible { outline: 3px solid #000; outline-offset: 2px; }

.checks { list-style: none; margin: 18px 0 0; padding: 0; }
.checks li {
  display: flex;
  gap: 16px;
  padding: 9px 0;
  font-size: var(--label);
  line-height: 1.5;
  align-items: baseline;
  flex-wrap: wrap;
}
.checks .box { font-weight: 700; flex: none; width: 3ch; }
.checks .val { margin-left: auto; white-space: nowrap; }
.checks li.miss { color: var(--soft); }

.attach-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--air);
}
@media (min-width: 1000px) { .attach-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 60px; } }

.outcome {
  margin-top: var(--air);
  border-top: 2px solid var(--ink);
  padding-top: 34px;
}

/* the sheet is wide: the two hosts and the result stand side by side rather
   than leaving the right half of the paper blank */
@media (min-width: 1440px) {
  .attach-grid--three { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.12fr); gap: 64px; }
  .attach-grid--three .outcome {
    margin-top: 0;
    border-top: 0;
    border-left: 2px solid var(--ink);
    padding-top: 0;
    padding-left: 44px;
  }
}

/* long label / value lists run in two printed columns on a wide sheet */
@media (min-width: 1440px) {
  .rows--two { column-count: 2; column-gap: 90px; }
  .rows--two .datarow { break-inside: avoid; }
}

/* ------------------------------------------------------------------ data rows */

.rows { width: 100%; }
.datarow {
  display: flex;
  gap: 24px;
  justify-content: space-between;
  align-items: baseline;
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
  font-size: var(--label);
  line-height: 1.5;
  flex-wrap: wrap;
}
.datarow dt { margin: 0; color: var(--soft); }
.datarow dd { margin: 0; text-align: right; overflow-wrap: anywhere; min-width: 0; }

.note {
  font-size: var(--label);
  line-height: 1.6;
  max-width: 64ch;
}
.note--quiet { color: var(--soft); }

.empty {
  padding: 38px 0 6px;
  font-size: var(--body);
  line-height: 1.6;
  max-width: 62ch;
}

.tag {
  display: inline-block;
  font-size: var(--label);
  letter-spacing: .14em;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--paper);
  padding: 7px 16px;
}

.toast {
  position: fixed;
  left: 50%;
  top: 112px;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--paper);
  padding: 16px 28px;
  font-size: var(--label);
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}
.toast.on { opacity: 1; }

/* ------------------------------------------------------------------ phone */

@media (max-width: 860px) {
  .nav {
    display: none;
    position: absolute;
    top: 84px;
    left: var(--gut);
    right: var(--gut);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    border: 2px solid var(--ink);
    padding: 12px 24px 24px;
    z-index: 40;
  }
  .nav.open { display: flex; }
  .nav a { padding: 16px 0; min-height: 52px; display: flex; align-items: center; }
  .nav .key { margin-top: 14px; }
  .burger { display: inline-flex; align-items: center; }
  .top { position: relative; }
}

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