/* Meta comps page (meta.html): a tier list written into the notebook.
   Each tier is a sticky note in the margin, each comp a paper slip next to it. */
.meta {
  --c1: #9a9ea6;
  --c2: #3f9e5c;
  --c3: #3c7fd6;
  --c4: #8f4fc4;
  --c5: #d99e0d;
  --slip: #fffdf8;
  --soft: #524b49;
}

.meta-intro {
  padding: calc(var(--sq) * 3) 0 var(--sq);
  max-width: 980px;
}
.meta-intro h1 {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 400;
  line-height: 1.1;
  margin: 0;
  -webkit-text-stroke: .7px currentColor;
}
.meta-lead {
  margin: var(--sq) 0 0;
  color: var(--soft);
}
.meta-howto.note {
  max-width: 760px;
  margin: calc(var(--sq) * 2) 0 0;
  padding: 18px 24px 26px 18px;
  transform: rotate(-.8deg);
}
.meta-howto h2 {
  font-size: 28px;
  line-height: 1.2;
  margin: 0 0 8px;
  color: var(--blue);
}
.meta-howto.note p {
  font-size: 19px;
  line-height: 1.45;
  margin: 0;
}
.meta-howto .meta-weekly {
  margin-top: 12px;
  color: var(--red);
  font-size: 21px;
}

.cost-legend {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  padding: 0;
  margin: calc(var(--sq) * 1.5) 0 0;
  font-size: 17px;
  color: var(--soft);
}
.cost-legend li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.cost-legend i {
  width: 26px;
  height: 7px;
  border-radius: 4px 2px 5px 2px;
  background: var(--cost);
  transform: rotate(-3deg);
}

.cost-1 { --cost: var(--c1); }
.cost-2 { --cost: var(--c2); }
.cost-3 { --cost: var(--c3); }
.cost-4 { --cost: var(--c4); }
.cost-5 { --cost: var(--c5); }

.tiers-status {
  padding: calc(var(--sq) * 2) 0;
  color: var(--soft);
}

/* One tier: sticky note in the margin + its comps. */
.tier {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 22px;
  padding: calc(var(--sq) * 2) 0;
  border-top: 2px solid #1a1f8030;
}
.tier:first-child {
  border-top: 0;
}
.tier-badge {
  position: sticky;
  top: 14px;
  align-self: start;
  text-align: center;
  border-style: solid;
  border-color: transparent;
  border-width: 14px 26px 26px 14px;
  border-image: url('assets/note_yellow.png') 21 42 42 21 fill / 14px 26px 26px 14px stretch;
  filter: drop-shadow(2px 5px 3px #33291b20);
  transform: rotate(-3deg);
  padding: 4px 0 2px;
}
.tier-badge.note-pink { border-image-source: url('assets/note_pink.png'); transform: rotate(-2deg); }
.tier-badge.note-orange { border-image-source: url('assets/note_orange.png'); transform: rotate(2deg); }
.tier-badge.note-green { border-image-source: url('assets/note_green.png'); transform: rotate(1deg); }
.tier-badge h2 {
  font-size: 64px;
  line-height: 1;
  -webkit-text-stroke: 1.2px currentColor;
}
.tier-badge p {
  margin: 2px 0 0;
  font-size: 18px;
  line-height: 1.15;
}
.tier-badge .tier-count {
  font-size: 15px;
  color: var(--soft);
  margin-top: 6px;
}
.tier-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 600px), 1fr));
  gap: 22px;
  align-items: start;
}

/* A comp: a slightly crooked paper slip. */
.comp {
  min-width: 0;
  background: var(--slip);
  border: 2px solid #1a121230;
  border-radius: 4px 14px 5px 18px / 16px 4px 14px 5px;
  box-shadow: 3px 4px 0 #1a1f8018, 0 1px 3px #33291b18;
  padding: 14px 16px 12px;
  transform: rotate(var(--tilt, 0deg));
  display: grid;
  gap: 10px;
}
.comp-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 4px 12px;
  flex-wrap: wrap;
}
.comp-head h3 {
  font-size: 27px;
  font-weight: 400;
  line-height: 1.15;
  margin: 0;
  -webkit-text-stroke: .4px currentColor;
}
.comp-win {
  margin: 0;
  white-space: nowrap;
  color: var(--red);
  font-size: 16px;
}
.comp-win strong {
  font-size: 30px;
  font-weight: 400;
  -webkit-text-stroke: .6px currentColor;
  font-variant-numeric: tabular-nums;
}

.comp-units {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px 6px;
}
.unit {
  margin: 0;
  min-width: 0;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 3px;
}
.unit-art {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1;
  /* Marker stroke in the unit's cost color under the drawing. */
  background: linear-gradient(transparent 82%, var(--cost) 82%, var(--cost) 94%, transparent 94%) no-repeat;
  border-radius: 0 0 6px 3px;
}
.unit-art picture,
.unit-art picture img {
  display: block;
  width: 100%;
  height: 100%;
}
.unit-art picture img {
  object-fit: contain;
  padding: 2px 2px 12%;
}
.unit-cost {
  position: absolute;
  top: -2px;
  left: -2px;
  min-width: 20px;
  height: 20px;
  padding: 0 4px;
  border-radius: 50% 45% 55% 48%;
  background: var(--cost);
  color: #fff;
  font-size: 15px;
  line-height: 20px;
  text-align: center;
  text-shadow: 0 0 2px #0006;
  z-index: 1;
}
.cost-1 .unit-cost,
.cost-5 .unit-cost {
  color: #1a1212;
  text-shadow: none;
}
.carry-star {
  position: absolute;
  top: -4px;
  right: 0;
  width: 24px;
  height: 24px;
  transform: rotate(12deg);
}
/* Carry: a highlighter smudge behind the drawing. */
.carry .unit-art {
  background:
    linear-gradient(transparent 82%, var(--cost) 82%, var(--cost) 94%, transparent 94%) no-repeat,
    radial-gradient(ellipse 48% 42% at 50% 50%, #ffe06bb0 70%, transparent 72%) no-repeat;
}
.unit figcaption {
  font-size: 14px;
  line-height: 1.1;
  text-align: center;
  color: var(--soft);
  overflow-wrap: break-word;
  max-width: 100%;
}
.carry figcaption {
  color: var(--ink);
}

.comp-traits {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0;
  margin: 0;
}
.trait {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 17px;
  line-height: 1.2;
  padding: 1px 10px 1px 3px;
  background: #ffe06b55;
  border: 1.5px solid #1a121240;
  border-radius: 14px 10px 13px 9px;
}
.trait img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}
.trait b {
  font-weight: 400;
  color: var(--blue);
  -webkit-text-stroke: .4px currentColor;
}
.comp-meta {
  margin: 0;
  font-size: 16px;
  color: var(--soft);
  border-top: 1px dashed #1a121240;
  padding-top: 6px;
}
.carry-label {
  color: var(--blue);
}

/* Units the top comps keep picking. */
.picks {
  padding: calc(var(--sq) * 3) 0;
  border-top: 2px solid #1a1f8030;
}
.picks ul {
  list-style: none;
  padding: 0;
  margin: calc(var(--sq) * 2) 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
  gap: 14px;
}
.pick {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  background: var(--slip);
  border: 2px solid #1a121230;
  border-radius: 4px 12px 5px 14px / 12px 4px 12px 5px;
  padding: 4px 12px 4px 4px;
  font-size: 19px;
  line-height: 1.15;
}
.pick:nth-child(odd) { transform: rotate(-.7deg); }
.pick:nth-child(even) { transform: rotate(.6deg); }
.pick b {
  font-weight: 400;
  min-width: 0;
  overflow-wrap: anywhere;
}
.pick-count {
  font-size: 28px;
  color: var(--red);
  -webkit-text-stroke: .5px currentColor;
  font-variant-numeric: tabular-nums;
}
.pick .unit-art {
  width: 58px;
}

@media (max-width: 700px) {
  .meta-intro {
    padding-top: calc(var(--sq) * 2);
  }
  .meta-howto.note {
    padding: 14px 18px 22px 12px;
  }
  .meta-howto.note p {
    font-size: 18px;
    line-height: 1.35;
  }
  .tier {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }
  .tier-badge {
    position: static;
    justify-self: start;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    padding: 0 10px 0 4px;
  }
  .tier-badge h2 {
    font-size: 46px;
  }
  .tier-badge .tier-count {
    margin: 2px 0 0;
  }
  .comp {
    padding: 12px 10px 10px;
  }
  .comp-units {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .comp-head h3 {
    font-size: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .comp,
  .pick {
    transform: none;
  }
}
