/* Page-specific layout. Everything else comes from base.css and components.css. */

/* ------------------------------------------------------------------ home */

.hero {
  padding: 9rem 0 7rem;
}

.hero__title {
  font-size: var(--fs-h1);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.hero .lede {
  margin-top: 1.75rem;
}

.hero__stats {
  margin-top: 1.25rem;
}

.hero__actions {
  margin-top: 2rem;
  font-size: 0.95rem;
}

.hero__address {
  color: var(--body);
  white-space: nowrap;
}

.copy {
  font-size: inherit;
}

/* Phones: a short hero, so the ranking starts in the first screen (the Compare link is in the menu). */
@media (max-width: 760px) {
  .hero {
    padding: 2.5rem 0 2.5rem;
  }

  .hero .lede {
    margin-top: 1rem;
    font-size: var(--fs-body);
  }

  .hero__stats {
    margin-top: 0.75rem;
  }

  .hero__actions {
    display: none;
  }

  /* The ranking follows the hero closely. */
  .section--global {
    padding-top: 2.5rem;
  }
}

/* ------------------------------------------------------------------ inner pages */

.page-head .lede {
  margin-top: 1.25rem;
}

.page-head--board {
  padding: 5.5rem 0 2.5rem;
}

@media (max-width: 760px) {
  .page-head--board {
    padding: 3rem 0 2rem;
  }
}

.section--flush {
  padding-top: 0;
  border-top: 0;
}

.section--loading {
  border-top: 0;
  padding-top: 0;
}

.page-head--lost {
  padding-bottom: var(--section-y);
}

.lost__actions {
  margin: 2.25rem 0 1.5rem;
}

.suggest {
  margin-top: 1rem;
}

/* "Press /" for keyboards, a "Search players" link for touch screens. */
.lost__hint--touch {
  display: none;
}

@media (hover: none), (pointer: coarse) {
  .lost__hint--keys {
    display: none;
  }

  .lost__hint--touch {
    display: block;
  }
}

.page-head--lost .tabs__list {
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  margin-top: 1rem;
}

/* ------------------------------------------------------------------ player */

.player-id {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.player-id__name {
  font-size: clamp(2rem, 1.4rem + 2vw, 2.75rem);
  overflow-wrap: anywhere;
}

.player-id__facts {
  margin-top: 0.35rem;
}

.player-head__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  margin-top: 1.75rem;
  font-size: 0.95rem;
}

@media (max-width: 480px) {
  .player-id {
    align-items: flex-start;
    gap: 1rem;
  }

  /* Width/height, not --size: the component sets --size inline, which a stylesheet cannot override. */
  .player-id__head {
    width: 48px;
    height: 48px;
    margin-top: 0.3rem;
  }
}

/* ------------------------------------------------------------------ compare */

/* Fixed middle column: entering names never moves or resizes the two fields. */
.pickers {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 5.5rem minmax(0, 1fr);
  align-items: end;
  gap: 1rem 1.5rem;
  max-width: 48rem;
  margin-top: 2.5rem;
}

.picker__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.25rem;
}

.picker__label {
  display: block;
  color: var(--muted);
  font-size: var(--fs-small);
}

/* The swap icon lives in the middle column on wide screens, in the second label row on phones. */
.swap--inline {
  display: none;
}

.picker__top .swap {
  width: 1.75rem;
  height: 1.5rem;
  margin: -0.25rem -0.2rem -0.25rem 0;
}

.picker__field {
  width: 100%;
}

.picker__field .field {
  font-size: var(--fs-body);
}

.picker__list {
  left: 0;
  width: 100%;
}

.picker__hint {
  min-height: 1.5em;
  margin-top: 0.4rem;
  color: var(--body);
  font-size: var(--fs-small);
}

.pickers__vs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding-bottom: 2.1rem;
  color: var(--muted);
  font-size: var(--fs-small);
  white-space: nowrap;
}

.pickers__vs .swap {
  width: 1.75rem;
  height: 1.75rem;
}

.compare-prompt {
  margin-top: 0;
}

/* The result follows the pickers closely (it is the answer to them). */
.section--duel {
  padding-top: 4rem;
}

@media (max-width: 760px) {
  .section--duel {
    padding-top: 2.5rem;
  }
}

.compare-verdict {
  margin-bottom: 1.75rem;
  color: var(--body);
  font-size: 1.125rem;
  line-height: 1.5;
}

.compare-stale {
  margin: -1rem 0 1.5rem;
}

.table--compare thead th.c-name {
  vertical-align: bottom;
}

.table--compare th.c-val,
.table--compare td.c-val {
  width: 30%;
  text-align: right;
}

.table--compare tbody th {
  padding: 0.8rem 0.75rem 0.8rem 0;
  border-bottom: 1px solid var(--rule);
  color: var(--body);
  font-size: var(--fs-body);
  font-weight: 400;
  /* Row headers are category names: they wrap ("Farming, Fishing & Trading" is 200px wide). */
  white-space: normal;
  overflow-wrap: anywhere;
}

.table--compare tbody th a {
  color: var(--body);
}

.table--compare .is-global th,
.table--compare .is-global th a {
  color: var(--ink);
  font-weight: 500;
}

.vs-name {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink);
  font-size: var(--fs-body);
  font-weight: 500;
}

.c-val__num {
  color: var(--muted);
  font-size: 1.125rem;
}

.c-val.is-lead .c-val__num {
  color: var(--ink);
  font-weight: 600;
}

@media (max-width: 640px) {
  .pickers {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.5rem;
  }

  .pickers__vs {
    display: none;
  }

  .swap--inline {
    display: inline-flex;
  }

  .compare-verdict {
    font-size: var(--fs-body);
  }

  .vs-name .head {
    display: none;
  }

  .vs-name {
    font-size: var(--fs-small);
  }

  .table--compare th.c-val,
  .table--compare td.c-val {
    width: 5.5rem;
    padding-right: 0;
    padding-left: 0.75rem;
  }

  .table--compare tbody th {
    font-size: 0.95rem;
  }
}

/* ------------------------------------------------------------------ builds */

/* A build: label, title, description, then two quiet lines (score · votes, builder · date)
   and the coordinates, which are themselves the copy control. */
.build .build__score {
  margin-top: auto;
  padding-top: 1rem;
  color: var(--muted);
  font-size: var(--fs-small);
  font-variant-numeric: tabular-nums;
}

.build__num {
  color: var(--ink);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.build__meta {
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: var(--fs-small);
}

.build__meta .plain {
  color: var(--body);
  font-weight: 500;
}

.build__coords {
  font-variant-numeric: tabular-nums;
}

.build__xyz,
.copy__done {
  color: var(--muted);
}

.builds-note {
  margin-top: 2.5rem;
}

.section--builds .toolbar {
  margin-bottom: 0;
  padding-bottom: 1.5rem;
}

/* ------------------------------------------------------------------ advancements */

.section--adv {
  border-top: 0;
  padding-top: 0;
}

.toolbar--adv {
  margin-bottom: 3rem;
}

@media (max-width: 640px) {
  .toolbar--adv > .field {
    flex: 1 1 100%;
  }
}

.adv-note {
  margin-top: 3.5rem;
}

.adv-note .formula {
  white-space: nowrap;
}

.tier + .tier {
  margin-top: 3.5rem;
}

.tier__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 1rem;
  margin-bottom: 1rem;
}

.tier__title {
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}

.tier__note {
  color: var(--muted);
  font-size: var(--fs-small);
}

.line__reveal {
  font-size: var(--fs-small);
}
