/* Flux: the Relations board against a 90-second clock, its summary and its Home tile. */

.flux-title strong {
  display: inline-block;
  font-size: var(--text-h2);
  line-height: 1.1;
}

.flux-title strong.pop {
  animation: flux-pop 0.32s ease;
}

.flux-clock {
  min-width: 44px;
  justify-self: end;
  font-size: var(--text-title);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.flux-clock.low {
  color: var(--danger-text);
}

/* Time left as a thin bar under the top bar. */
.flux-time {
  height: 3px;
  margin: 0 0 var(--space-2);
  border-radius: 2px;
  background: var(--wash);
  overflow: hidden;
}

.flux-time i {
  display: block;
  height: 100%;
  background: var(--ink);
  transform-origin: left center;
}

.flux-enter {
  animation: flux-enter 0.22s ease-out;
}

/* "+2" over the board when a level is solved. */
.flux-gain {
  position: absolute;
  top: 38%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--ink);
  font-size: var(--text-display);
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
}

.flux-gain.show {
  animation: flux-gain 0.6s ease-out;
}

.flux-screen .goals-row {
  cursor: default;
}

@keyframes flux-pop {
  50% { transform: scale(1.25); }
}

@keyframes flux-enter {
  from { opacity: 0; transform: translateX(16px); }
}

@keyframes flux-gain {
  0% { opacity: 0; transform: translate(-50%, -30%) scale(0.8); }
  25% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }
  100% { opacity: 0; transform: translate(-50%, -90%) scale(1); }
}

/* Summary. */
.flux-summary-screen {
  padding-bottom: calc(var(--safe-bottom) + var(--space-5));
}

.flux-hero .result-number {
  font-size: 72px;
}

.flux-facts {
  margin: 0 0 var(--space-5);
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.flux-facts li {
  padding: var(--space-3) var(--space-1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.flux-facts li + li {
  border-left: 1px solid var(--line);
}

.flux-facts b {
  font-size: var(--text-h2);
}

.flux-facts span {
  color: var(--muted);
  font-size: var(--text-caption);
}

.flux-actions {
  display: grid;
  gap: var(--space-2);
  justify-items: center;
}

.flux-actions .primary-btn {
  width: 100%;
}

/* Home: one wide tile under Cover and Relations. */
.flux-tile {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
}

.flux-tile-text {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  text-align: left;
}

.flux-tile .mode-status {
  margin-top: 0;
}

.flux-tile-badge {
  padding: 2px var(--space-2);
  border-radius: var(--radius-sm);
  background: var(--wash);
  font-size: var(--text-caption);
  font-weight: 600;
}
