.credit {
  position: relative;
  z-index: 2;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid rgb(var(--crt-tint) / 0.35);
  text-align: left;
  font-size: var(--text-lg);
  letter-spacing: 0.04em;
  opacity: 0.8;
}

.page {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 54rem;
  margin-inline: auto;
  padding: var(--space-7) var(--space-4) var(--space-8);
  text-align: center;
}

.title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 10.5vw, 5.5rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.01em;
}

.slogan {
  margin-top: calc(var(--space-6) * 2 / 3);
  font-size: clamp(0.8rem, 2.8vw, 1.05rem);
  line-height: 1.45;
  letter-spacing: 0.015em;
  opacity: 0.85;
}

.picker-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: var(--space-5);
  margin-top: var(--space-7);
}

/* Masked so it takes the CRT amber, not the SVG's own fill. Mask on ::before, filter on the
   button: together on one element the mask would clip the halo away. */
.upa {
  --upa-color: var(--crt-text);
  --upa-core: var(--crt-core);
  --upa-glow-color: var(--nixie-glow);
  --upa-glow-size: 10px;
  --upa-glow-strength: 0.7;

  position: relative;
  justify-self: end;
  translate: -1rem 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  height: 4.16rem;
  opacity: 0.9;
  aspect-ratio: 520 / 769;
  filter:
    drop-shadow(0 0 calc(var(--upa-glow-size) * 0.1) color-mix(in srgb, var(--upa-core) calc(var(--upa-glow-strength) * 60%), transparent)) drop-shadow(0 0 var(--upa-glow-size) color-mix(in srgb, var(--upa-glow-color) calc(var(--upa-glow-strength) * 100%), transparent)) drop-shadow(0 0 calc(var(--upa-glow-size) * 2.5) color-mix(in srgb, var(--upa-glow-color) calc(var(--upa-glow-strength) * 50%), transparent));
}

.upa::before {
  content: '';
  position: absolute;
  inset: 0;
  background-color: var(--upa-color);
  -webkit-mask: url('../../assets/upa.svg') center / contain no-repeat;
  mask: url('../../assets/upa.svg') center / contain no-repeat;
}

/* Registered so the keyframes can interpolate them. Strength must stay <= 1 (color-mix cap). */
@property --upa-glow-size {
  syntax: '<length>';
  inherits: true;
  initial-value: 10px
}

@property --upa-glow-strength {
  syntax: '<number>';
  inherits: true;
  initial-value: 0.7
}

@property --upa-color {
  syntax: '<color>';
  inherits: true;
  initial-value: transparent
}

.upa.flash {
  --upa-flash-size: 28px;
  --upa-flash-strength: 0.7;
  animation: upa-flash var(--duration) ease-out;
}

@keyframes upa-flash {
  from {
    --upa-glow-size: var(--upa-flash-size);
    --upa-glow-strength: var(--upa-flash-strength);
    --upa-color: var(--upa-core);
    opacity: 1;
  }
}

/* Custom cell size, so --nixie-grid-level goes with it — see tokens.css. */
.readout {
  display: flex;
  justify-content: center;
  margin-top: var(--space-6);
  --nixie-h: clamp(2.6rem, 13vw, var(--nixie-h-lg));
  --nixie-grid-level: 1;
}

/* The wheels need 298px beside a 45px button: under 24rem the row runs out and the button drops below. */
@media (max-width: 24rem) {
  .picker-row {
    grid-template-columns: 1fr;
    row-gap: var(--space-3);
  }

  /* The button is first in the markup, so it needs reordering to land under the wheels. */
  .upa {
    order: 1;
    justify-self: center;
    translate: 0 0;
  }
}
