/* ============================================================
   BUREAU OF LOST TIMELINES — HONORS SHEET
   Version: 2.0 (Dossier system)

   A Bureau badge is not a sticker: it is a strike of ink on a personnel
   file. So each medal is drawn as a rubber stamp — the badge's own
   three-letter file code, set in the condensed display face inside a
   doubled square, canted two degrees like a hand-pressed seal. Earned
   stamps are red. Unearned ones are the grey outline of a stamp that
   was never inked. That single device replaces seventeen pictograms.
   ============================================================ */

.badges-main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: var(--s-5) var(--gutter) var(--s-7);
}

/* ---------- the collection meter ---------- */
.badges-progress {
  background: var(--ink-1);
  background-image: var(--fibre);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-2);
  box-shadow: var(--shadow-1), var(--shadow-inset);
  padding: var(--s-3) var(--s-4);
  margin-bottom: var(--s-5);
}

.badges-progress h3 {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: var(--tr-label);
  text-transform: uppercase;
  color: var(--muted-strong);
  margin-bottom: var(--s-2);
}

.bpb {
  height: 8px;
  background: var(--ink-0);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  overflow: hidden;
  margin-bottom: 6px;
}

/* The meter is a counter, so it is allowed to be the machine's colour. */
.bpf {
  height: 100%;
  background: linear-gradient(90deg, var(--phosphor-dim), var(--phosphor));
  transition: width var(--dur-4) var(--ease-out);
}

.bp-text {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: var(--tr-mono);
  text-transform: uppercase;
  color: var(--muted-strong);
}

/* ---------- the case of medals ---------- */
.badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(176px, 1fr));
  gap: var(--s-2);
}

.badge-card {
  position: relative;
  background: var(--ink-1);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  padding: var(--s-4) var(--s-3) var(--s-3);
  text-align: center;
  transition: border-color var(--dur-2) var(--ease),
              background var(--dur-2) var(--ease),
              transform var(--dur-2) var(--ease-out);
}

.badge-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
}

/* ---------- the stamp itself ---------- */
.badge-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin: 0 auto var(--s-3);
  border: 2px solid var(--ink-4);
  /* the doubled frame of a seal: an inset rule one step inside the border */
  box-shadow: inset 0 0 0 1px var(--ink-3);
  border-radius: var(--r-1);
  transform: rotate(-2deg);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--fs-h3);
  letter-spacing: 0.04em;
  color: var(--muted);
  transition: color var(--dur-2) var(--ease),
              border-color var(--dur-2) var(--ease),
              background var(--dur-2) var(--ease);
}

/* Earned: inked, pressed, unmistakably red. */
.badge-card.earned .badge-icon {
  border-color: var(--alert);
  box-shadow: inset 0 0 0 1px var(--alert-deep);
  background: var(--alert-wash);
  color: var(--alert-bright);
}

.badge-card.earned {
  border-color: var(--alert-deep);
  background-image: var(--fibre);
}

.badge-card.earned:hover {
  border-color: var(--alert);
}

.badge-card .badge-title {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--fs-label);
  line-height: var(--lh-snug);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted-strong);
  margin-bottom: 3px;
}

.badge-card.earned .badge-title {
  color: var(--paper-bright);
}

.badge-card .badge-my {
  font-family: var(--font-my);
  font-size: var(--fs-label);
  line-height: 1.7;
  color: var(--muted);
  margin-bottom: var(--s-2);
}

.badge-card.earned .badge-my {
  color: var(--paper-dim);
}

.badge-card .badge-desc {
  font-size: var(--fs-micro);
  line-height: 1.6;
  color: var(--muted);
  min-height: 44px;
}

.badge-card .badge-desc-my {
  font-family: var(--font-my);
  font-size: var(--fs-micro);
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: var(--s-1);
}

.badge-card.earned .badge-desc {
  color: var(--muted-strong);
}

/* ---------- the status line ---------- */
.badge-status {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: var(--tr-label);
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: var(--r-1);
  margin-top: var(--s-1);
  border: 1px solid var(--line);
  color: var(--muted);
}

.badge-card.earned .badge-status {
  background: var(--alert);
  border-color: var(--alert);
  color: var(--ink-0);
}

/* ---------- a badge that is not on the register ---------- */
.badge-secret {
  position: absolute;
  top: var(--s-1);
  right: var(--s-1);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: var(--tr-label);
  text-transform: uppercase;
  color: var(--folklore);
  border: 1px solid var(--folklore-line);
  background: var(--folklore-wash);
  padding: 2px 6px;
  border-radius: var(--r-1);
  transform: rotate(3deg);
}

/* The unknown medal is not a question mark glyph — it is a stamp with
   nothing struck into it. */
.badge-card.locked .badge-icon {
  color: var(--muted);
}

/* ---------- narrow screens ---------- */
@media (max-width: 560px) {
  .badges-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }

  .badge-icon {
    width: 54px;
    height: 54px;
    font-size: var(--fs-h4);
  }

  .badge-card .badge-desc {
    min-height: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .badge-card,
  .badge-icon,
  .bpf {
    transition: none;
  }

  .badge-card:hover {
    transform: none;
  }
}
