/* WIDGET: quota-allocation — bars move by transform: scaleX / scaleY only */
.qa-body { display: flex; flex-direction: column; gap: 16px; container-type: inline-size; }

.qa-block-title {
  margin-bottom: 8px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--text-4);
  text-transform: uppercase;
}

/* Legend */
.qa-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-family: var(--font-mono); font-size: 0.68rem; color: var(--text-3); }
.qa-legend-item { position: relative; padding-left: 16px; }
.qa-legend-item::before { content: ''; position: absolute; left: 0; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 2px; }
.qa-legend-held::before { background: var(--prod-mf); }
.qa-legend-deposit::before { background: var(--prod-ca); }

/* Agency rows */
.qa-rows { display: flex; flex-direction: column; gap: 14px; }
.qa-row { min-width: 0; }

.qa-row-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 0.82rem;
}

.qa-row-name { min-width: 0; color: var(--text-1); font-weight: 500; overflow-wrap: anywhere; }

.qa-row-rate {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.qa-unlock-tag {
  flex-shrink: 0;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity var(--dur-3) ease, transform var(--dur-3) var(--ease-out);
}

.qa-unlock-tag.is-visible { opacity: 1; transform: scale(1); }

.qa-bar-track {
  position: relative;
  height: 8px;
  border-radius: 4px;
  background: var(--surface-3);
  border: 1px solid var(--line-1);
  overflow: hidden;
}

.qa-bar-fill {
  position: absolute;
  inset: 0;
  transform-origin: 0 50%;
  transform: scaleX(var(--v, 0));
  transition: transform var(--dur-4) var(--ease-out);
  border-radius: inherit;
}

.qa-bar-held { z-index: 1; background: linear-gradient(180deg, rgba(79, 169, 245, 0.6), rgba(79, 169, 245, 0.32)); }
.qa-bar-deposit { z-index: 2; background: linear-gradient(180deg, rgba(255, 51, 102, 0.85), rgba(255, 51, 102, 0.5)); }

.qa-row-caption {
  margin-top: 5px;
  font-size: 0.7rem;
  line-height: 1.4;
  color: var(--text-4);
  overflow-wrap: anywhere;
}

/* Hourly absorption sparkline — vertical scaleY bars, bottom-anchored */
.qa-spark-block { padding-top: 12px; border-top: 1px solid var(--line-1); }

.qa-spark-row {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 44px;
}

.qa-spark-col {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 100%;
  display: flex;
  align-items: flex-end;
  border-radius: 3px;
  background: var(--surface-3);
  overflow: hidden;
}

.qa-spark-fill {
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: 50% 100%;
  transform: scaleY(var(--v, 0));
  transition: transform var(--dur-4) var(--ease-out);
  background: linear-gradient(180deg, var(--accent), rgba(255, 51, 102, 0.35));
}

/* Recent allocation events */
.qa-feed { display: flex; flex-direction: column; gap: 2px; margin-top: 12px; border-top: 1px solid var(--line-1); }

.qa-feed li {
  display: flex;
  gap: 10px;
  padding: 7px 0 5px;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--text-2);
  transition: opacity var(--dur-3) ease, transform var(--dur-3) var(--ease-out);
}

.qa-feed li:nth-child(n + 3) { opacity: 0.55; }
.qa-feed li.is-new { opacity: 0; transform: translate3d(0, -6px, 0); }
.qa-feed li.is-unlock span { color: var(--accent); }
.qa-feed time { flex-shrink: 0; font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-4); font-variant-numeric: tabular-nums; padding-top: 1px; }

/* 320px phones: tighten row and sparkline spacing */
@container (max-width: 340px) {
  .qa-row-top { flex-wrap: wrap; row-gap: 4px; }
  .qa-row-rate { margin-left: 0; }
  .qa-spark-row { gap: 3px; height: 38px; }
}
