/* ---------- Les heures d'antenne (tickets/T59-les-heures-d-antenne.md) ------
   The card at the head of the account, and of the door for a guest: the face
   at 72, the name in Signifier, the rank in Body/Label, and the progress drawn
   on THE VOLUME'S RAIL — 3 px ticks every 7 px, whole ticks only — filled in
   primary. No new component: the rail the page already has, counting minutes
   instead of decibels.
   ------------------------------------------------------------------------- */
@property --p { syntax: "<number>"; inherits: true; initial-value: 0; }

.lvl {
  display: grid;
  grid-template-columns: 72px 1fr;
  align-items: center;
  column-gap: 16px;
  row-gap: 20px;
  padding-bottom: 8px;
}
.lvl[hidden] { display: none; }
/* At 72 the pixel is what shows, and that is the point: no smoothing on the
   Pixelarticons path, every square of it lands on a device pixel. */
.lvl__face { width: 72px; height: 72px; }
.lvl__face svg { width: 48px; height: 48px; shape-rendering: crispEdges; }   /* the 24 grid at exactly 2 px a pixel: 42 (avatar.js's 58 %) smeared every edge */
.lvl__who { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.lvl__name {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 40px;   /* headline-phone, 40/40: the system's own smaller Signifier */
  line-height: 40px;
  letter-spacing: -0.03em;
  text-box: trim-both cap alphabetic;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  padding-block: 8px;   /* the trim takes the descenders; the ellipsis cut would take them too */
  margin-block: -8px;
}
.lvl__rank, .lvl__foot { font-size: 10px; line-height: 16px; text-transform: uppercase; text-box: trim-both cap alphabetic; }
.lvl__rank { color: var(--primary); }

/* The rail, and over it the same ticks in primary up to the progress: the
   width snaps to whole ticks, so as --p eases up the fill grows ONE TICK AT A
   TIME — the step is the pixel art, not an effect laid on top. */
.lvl__rail { grid-column: 1 / -1; position: relative; height: 16px; }
.lvl__rail::before, .lvl__rail::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  background: repeating-linear-gradient(to right, var(--control) 0 3px, transparent 3px 7px);
}
.lvl__rail::before { width: calc(round(down, 100% + 4px, 7px) - 4px); }
.lvl__rail::after {
  width: max(0px, calc(round(down, (100% + 4px) * var(--p), 7px) - 4px));
  background: repeating-linear-gradient(to right, var(--primary) 0 3px, transparent 3px 7px);
  transition: --p 1.6s var(--ease-soft) 0.2s;
}
.lvl__rail { transition: --p 1.6s var(--ease-soft) 0.2s; }
.lvl__foot { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 16px; margin-top: -8px; }

@media (prefers-reduced-motion: reduce) {
  .lvl__rail, .lvl__rail::after { transition: none; }
}
