.billing-usage-meter {
  align-items: center;
  background: var(--su-surface);
  border: 1px solid var(--su-border);
  border-radius: 62.4375rem;
  color: var(--su-text-2);
  display: inline-flex;
  flex: 0 0 auto;
  gap: .45rem;
  min-height: 2rem;
  padding: .35rem .65rem;
  text-decoration: none;
  transition: border-color var(--su-dur-fast) var(--su-ease), color var(--su-dur-fast) var(--su-ease);
}

.billing-usage-meter:hover {
  border-color: var(--su-border-2);
  color: var(--su-text);
}

.billing-usage-meter__value {
  color: var(--su-text);
  font-size: .7rem;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  min-width: 2rem;
  text-align: right;
}

.billing-usage-meter__track {
  background: var(--su-inset);
  border-radius: 62.4375rem;
  height: 0.1875rem;
  overflow: hidden;
  width: 2.75rem;
}

.billing-usage-meter__fill {
  background: var(--su-text-2);
  border-radius: inherit;
  display: block;
  height: 100%;
  max-width: 100%;
  width: var(--billing-usage-percent, 0%);
}

.billing-usage-meter__label {
  color: var(--su-text-3);
  font-size: .68rem;
  white-space: nowrap;
}

.billing-usage-meter--recharge {
  background: var(--su-warning-bg);
  border-color: var(--su-border-2);
}

.billing-usage-meter--recharge .billing-usage-meter__fill { background: var(--su-warning); }

.billing-usage-nudge {
  align-items: center;
  background: var(--su-surface);
  border: 1px solid var(--su-border);
  border-radius: var(--su-radius);
  box-sizing: border-box;
  color: var(--su-text-2);
  display: flex;
  gap: .65rem;
  margin: 0 0 .625rem;
  min-height: 2.55rem;
  padding: .55rem .7rem;
  width: 100%;
}

.billing-usage-nudge__marker {
  background: var(--su-text-3);
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--su-inset);
  flex: 0 0 auto;
  height: .4rem;
  width: .4rem;
}

.billing-usage-nudge__copy {
  flex: 1 1 auto;
  font-size: .72rem;
  line-height: 1.45;
  margin: 0;
  min-width: 0;
}

.billing-usage-nudge__copy strong {
  color: var(--su-text);
  font-weight: 600;
  margin-right: .2rem;
}

.billing-usage-nudge__copy time {
  color: var(--su-text);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.billing-usage-nudge__action {
  color: var(--su-text);
  flex: 0 0 auto;
  font-size: .72rem;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}

.billing-usage-nudge__action:hover { text-decoration: underline; }

.billing-usage-nudge--warning,
.billing-usage-nudge--urgent,
.billing-usage-nudge--recharge {
  background: var(--su-warning-bg);
  border-color: var(--su-border-2);
}

.billing-usage-nudge--warning .billing-usage-nudge__marker,
.billing-usage-nudge--urgent .billing-usage-nudge__marker,
.billing-usage-nudge--recharge .billing-usage-nudge__marker {
  background: var(--su-warning);
  box-shadow: 0 0 0 4px var(--su-warning-bg);
}

.ai-home-page--chatting .billing-usage-nudge {
  grid-row: 3;
  margin: 0;
}

@media (max-width: 760px) {
  .billing-usage-meter__track,
  .billing-usage-meter__label { display: none; }
  .billing-usage-meter { padding-inline: .5rem; }
  .billing-usage-meter__value { min-width: auto; }
}

@media (max-width: 520px) {
  .billing-usage-nudge {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: .4rem .6rem;
  }
  .billing-usage-nudge__copy { flex-basis: calc(100% - 1rem); }
  .billing-usage-nudge__action { margin-left: 1rem; }
}

/* ── The meter's nudge ──────────────────────────────────────────────────────
   A share and a time. It sits quietly at half, and only asks for attention
   when something is about to happen. The bar is the whole of the number a
   person gets: no points, no "340 of 700". */
.usage-nudge {
  align-items: center;
  background: var(--su-surface);
  border: 1px solid var(--su-border);
  border-radius: var(--su-radius);
  box-sizing: border-box;
  color: var(--su-text-2);
  display: flex;
  gap: .7rem;
  margin: 0 0 .625rem;
  padding: .5rem .7rem;
  position: relative;
  width: 100%;
}

.usage-nudge__bar {
  background: var(--su-inset);
  border-radius: 6.1875rem;
  flex: 0 0 auto;
  height: .3rem;
  overflow: hidden;
  width: 3.5rem;
}

.usage-nudge__fill {
  background: var(--su-text-3);
  border-radius: inherit;
  display: block;
  height: 100%;
  transition: width .25s ease;
}

.usage-nudge__copy {
  flex: 1 1 auto;
  font-size: .72rem;
  line-height: 1.45;
  margin: 0;
  min-width: 0;
}

.usage-nudge__copy strong { color: var(--su-text); font-weight: 600; margin-right: .25rem; }

.usage-nudge__close {
  background: none;
  border: 0;
  color: var(--su-text-3);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: .15rem .3rem;
}

.usage-nudge__close:hover { color: var(--su-text); }

/* Three quarters is a note; nearly and spent are the two that matter. */
.usage-nudge--most .usage-nudge__fill { background: var(--su-text-2); }

.usage-nudge--nearly {
  background: var(--su-inset);
  border-color: var(--su-border-2);
}

.usage-nudge--nearly .usage-nudge__fill { background: var(--su-warning); }

.usage-nudge--spent {
  background: var(--su-inset);
  border-color: var(--su-border-2);
}

.usage-nudge--spent .usage-nudge__fill { background: var(--su-warning); }
.usage-nudge--spent .usage-nudge__copy strong { color: var(--su-text); }

/* ── "What still works" ──────────────────────────────────────────────────
   The answer to the only question somebody has when they run out. Opened
   from the usage line, and from any refusal.                              */

.usage-nudge__what {
  background: none;
  border: 0;
  color: var(--su-text);
  cursor: pointer;
  flex: 0 0 auto;
  font-size: .72rem;
  font-weight: 650;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}

/* The backdrop, the panel and its close button are the shared modal
   shell now — static/css/ui/modal.css. What is left here is what goes
   INSIDE this particular one. */

.still-works__title {
  color: var(--su-text);
  font-size: 1.0625rem;
  font-weight: 650;
  margin: 0 0 .35rem;
}

.still-works__lede {
  color: var(--su-text-2);
  font-size: .8125rem;
  line-height: 1.5;
  margin: 0 0 1rem;
}

.still-works__list {
  display: grid;
  gap: .9rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.still-works__item-title {
  color: var(--su-text);
  font-size: .8125rem;
  font-weight: 600;
  margin: 0 0 .15rem;
}

.still-works__item-detail {
  color: var(--su-text-2);
  font-size: .8125rem;
  line-height: 1.5;
  margin: 0;
}

.still-works__foot {
  align-items: center;
  border-top: 1px solid var(--su-border);
  display: flex;
  gap: .9rem;
  justify-content: space-between;
  margin-top: 1.1rem;
  padding-top: .9rem;
}

.still-works__paused {
  color: var(--su-text-3);
  font-size: .75rem;
  line-height: 1.5;
  margin: 0;
}
