.credit-plan-hero .plan-hero-copy { min-width: min(100%, 330px); }
.portal .credit-plan-hero p { margin-bottom: 12px; }
.portal .plan-credit-balance { display: flex; flex-wrap: wrap; align-items: baseline; gap: 7px; }
.plan-credit-balance strong { color: #fff; font-size: 24px; font-variant-numeric: tabular-nums; }
.portal .credit-plan-hero .plan-link { margin-top: 5px; }
.portal .subscription-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: -10px 0 25px; }
.portal .subscription-actions[hidden] { display: none; }
.portal .subscription-actions button { min-height: 44px; }

.rate-guide { margin-block: 28px 20px; container-type: inline-size; scroll-margin-top: 110px; }
.rate-guide #rate-guide-title { margin: 0 0 14px; }
.site-page .rate-guide #rate-guide-title { font-size: clamp(24px, 3vw, 33px); line-height: 1.15; }
.credit-guide-control {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 10px 16px; padding: 10px 14px; margin-block-end: 14px;
  background: var(--vt-primary-soft); border: 1px solid var(--vt-line, #e4dff4); border-radius: 12px;
}
.credit-guide-input { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.credit-guide-input label { font-weight: 650; color: var(--vt-ink); font-size: 14.5px; }
.credit-minutes-box {
  position: relative; display: inline-flex; align-items: center; width: 126px;
}
.rate-guide .credit-guide-minutes {
  min-inline-size: 0; inline-size: 100%; min-block-size: 40px; padding: 6px 44px 6px 11px;
  border: 1px solid var(--ui-border, #d5cee8); border-radius: 8px; background: var(--vt-white, white);
  color: var(--vt-ink); font: inherit; font-size: 15.5px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.credit-minutes-unit {
  position: absolute; inset-inline-end: 10px; pointer-events: none;
  color: var(--vt-muted); font-size: 12.5px; font-weight: 600;
}
.rate-guide .credit-guide-minutes:focus-visible { outline: 2px solid var(--vt-primary); outline-offset: 2px; }
.credit-guide-presets { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.credit-preset {
  min-block-size: 36px; padding: 5px 11px; border: 1px solid var(--vt-line, #dcd6ef); border-radius: 999px;
  background: var(--vt-white, white); color: var(--vt-muted); font: 600 13px/1.2 var(--vt-font);
  cursor: pointer; transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}
.credit-preset:hover { border-color: var(--vt-primary); color: var(--vt-primary-strong); }
.credit-preset[aria-pressed="true"] {
  border-color: var(--vt-primary); background: var(--vt-primary); color: var(--vt-on-primary, #ffffff);
}
.credit-guide-error { flex-basis: 100%; color: var(--ui-danger, #a02c37); font-size: 13px; }
.credit-rate-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: stretch; }
.credit-rate-card {
  --rate-accent: #5c3ca5;
  --rate-surface: #f0eafb;
  display: grid; grid-template-rows: auto 1fr auto; gap: 10px; min-inline-size: 0; height: 100%; padding: 12px;
  border: 1px solid var(--vt-line); background: var(--vt-white, white); border-radius: 14px;
}
.credit-rate-card[data-mode="captions"] { --rate-accent: #176e63; --rate-surface: #e7f5f1; }
.credit-rate-card[data-mode="s2s"] { --rate-accent: #874c36; --rate-surface: #faeee5; }
[data-theme="dark"] .credit-rate-card { --rate-accent: #c4b5fd; --rate-surface: #251d42; }
[data-theme="dark"] .credit-rate-card[data-mode="captions"] { --rate-accent: #5eead4; --rate-surface: #122d2f; }
[data-theme="dark"] .credit-rate-card[data-mode="s2s"] { --rate-accent: #fdba74; --rate-surface: #332116; }
.rate-art {
  display: block; width: 100%; height: auto; aspect-ratio: 3.4 / 1; max-block-size: 92px;
  object-fit: cover; object-position: center; border-radius: 10px; background: var(--rate-surface);
}
.rate-guide .credit-rate-card h3 { margin: 0; font-size: 15.5px; line-height: 1.3; font-weight: 700; letter-spacing: -.015em; }
.rate-guide .credit-rate { margin: 2px 0 0; color: var(--rate-accent); font-size: 12.5px; font-weight: 600; }
.credit-rate-estimate {
  display: grid; align-content: center; justify-items: start; gap: 6px; min-inline-size: 0;
  padding: 10px 12px; border-radius: 10px; color: var(--rate-accent); background: var(--rate-surface, var(--vt-white));
  font-size: 13px; font-weight: 600;
}
.credit-rate-usd { font-size: clamp(20px, 2.3vw, 25px); line-height: 1.1; letter-spacing: -.03em; overflow-wrap: anywhere; }
.credit-rate-credits {
  padding: 3px 9px; border-radius: 999px; background: var(--vt-white); color: var(--rate-accent);
  font-size: 12px; font-weight: 650; white-space: nowrap;
}
.credit-guide-summary {
  margin: 12px 0 0; padding: 9px 12px; border: 1px solid var(--vt-line, #e4dff4); border-radius: 10px;
  background: var(--vt-paper, #faf9fe); color: var(--vt-ink); font-size: 13.5px; line-height: 1.45;
}
.rate-guide .credit-rate-note { margin: 10px 0 0; color: var(--vt-muted); font-size: 13px; }
.veyra-glass.design-workspace .credit-estimate-dialog {
  inline-size: min(740px, calc(100% - 24px));
  max-inline-size: none;
  max-block-size: calc(100dvh - 24px);
}
.credit-estimate-dialog :is(h2, p) { margin: 0; }
.credit-estimate-dialog > p { margin-block: 4px 16px; color: var(--vt-muted); }
.credit-estimate-dialog .rate-guide { margin: 0; }
.credit-estimate-dialog .rate-guide .credit-guide-control { inline-size: 100%; }
.credit-estimate-dialog .dialog-actions { display: flex; justify-content: flex-end; }
.credit-estimate-dialog .dialog-actions a { text-decoration: none; min-height: 44px; }
.billing-renewal-card {
  display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center;
  gap: 10px 14px; margin-block: 18px 28px; padding: 14px;
  border: 1px solid var(--vt-line); border-radius: 14px; background: var(--vt-white, white);
  scroll-margin-top: 110px;
}
.billing-renewal-card > img { box-sizing: content-box; padding: 9px; border-radius: 10px; background: var(--vt-primary-soft); }
.billing-renewal-card #billing-help-title { margin: 0; font-size: 16px; line-height: 1.3; }
.billing-renewal-card p { margin: 3px 0 0; color: var(--vt-muted); font-size: 14px; line-height: 1.45; }
.billing-renewal-card > a.button { width: fit-content; min-block-size: 44px; max-inline-size: 100%; white-space: normal; }

.portal .metric-rate-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-self: start;
  align-self: flex-start;
  width: fit-content;
  min-height: 32px !important;
  margin-top: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--vt-primary-tint);
  background: var(--vt-primary-soft);
  color: var(--vt-primary-strong);
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
}
.portal .metric-rate-link:hover {
  border-color: var(--vt-primary);
  background: var(--vt-white);
}

/* Compact Luxury Plan Status Card on /account */
.portal.workspace-shell.design-workspace .plan-hero.account-plan-strip {
  background: var(--vt-gradient-heading);
  border: 1px solid var(--vt-primary-tint);
  border-radius: 16px;
  color: var(--vt-ink);
  box-shadow: var(--vt-shadow-card);
  margin-bottom: 14px;
}
.portal.workspace-shell.design-workspace .plan-hero.account-plan-strip::before {
  display: none !important;
}
.portal.workspace-shell.design-workspace .plan-hero.account-plan-strip .plan-hero-copy {
  width: 100%;
  max-width: none;
  padding: 16px 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 20px;
}
.portal.workspace-shell.design-workspace .plan-hero.account-plan-strip .hero-label {
  grid-column: 1;
  color: var(--vt-primary-strong);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.portal.workspace-shell.design-workspace .plan-hero.account-plan-strip .plan-identity {
  grid-column: 1;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.portal.workspace-shell.design-workspace .plan-hero.account-plan-strip .plan-identity h2 {
  color: var(--vt-ink);
  font-size: clamp(20px, 2.1vw, 24px);
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin: 2px 0;
}
.portal.workspace-shell.design-workspace .plan-hero.account-plan-strip .plan-art {
  width: 32px;
  height: 32px;
  border-radius: 9px;
}
.portal.workspace-shell.design-workspace .plan-hero.account-plan-strip .plan-credit-balance {
  grid-column: 1;
  margin: 2px 0 0;
  color: var(--vt-muted);
  font-size: 14px;
}
.portal.workspace-shell.design-workspace .plan-hero.account-plan-strip .plan-credit-balance strong {
  color: var(--vt-primary-strong);
  font-size: 18px;
}
.portal.workspace-shell.design-workspace .plan-hero.account-plan-strip #plan-summary {
  grid-column: 1;
  margin: 2px 0 0;
  color: var(--vt-muted);
  font-size: 13.5px;
  max-width: 64ch;
}
.portal.workspace-shell.design-workspace .plan-hero.account-plan-strip #plan-summary:empty {
  display: none;
}
.portal.workspace-shell.design-workspace .plan-hero.account-plan-strip .plan-link {
  grid-column: 2;
  grid-row: 1 / span 4;
  align-self: center;
  min-height: 40px;
  padding: 8px 16px;
  border-radius: 10px;
  border: 1px solid var(--vt-primary-strong);
  background: var(--vt-gradient-cta);
  color: var(--vt-on-primary, #ffffff);
  box-shadow: var(--vt-shadow-cta);
  white-space: nowrap;
}
@media (max-width: 640px) {
  .portal.workspace-shell.design-workspace .plan-hero.account-plan-strip .plan-hero-copy {
    grid-template-columns: minmax(0, 1fr);
    padding: 16px;
  }
  .portal.workspace-shell.design-workspace .plan-hero.account-plan-strip .plan-link {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
    margin-top: 8px;
  }
}
.account-profile {
  --profile-line: var(--vt-line, #dfdeea);
  border: 1px solid var(--profile-line); border-radius: 18px; background: var(--vt-white);
  margin-bottom: 22px; overflow: hidden;
}
.account-profile-head {
  display: flex; align-items: center; gap: 16px; padding: 22px clamp(18px,3vw,34px);
  background: var(--vt-gradient-heading, var(--vt-gradient-soft));
  border-bottom: 1px solid var(--profile-line);
}
.profile-avatar {
  display: grid; place-items: center; width: 58px; height: 58px; flex: none;
  border-radius: 18px; background: #51338b; color: white;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--vt-white) 72%, transparent); font-size: 23px; font-weight: 720;
}
.profile-identity { min-width: 0; overflow-wrap: anywhere; }
.portal .profile-identity h2 { margin: 0 0 3px; font-size: 1.3rem; }
.profile-identity strong { display:inline-flex; align-items:center; gap:7px; font-size:.95rem; font-weight:600; color:var(--vt-ink, #4b5267); line-height:1.3; margin-bottom:2px; }
.portal .profile-identity:has(strong:not([hidden])) h2 { color:var(--vt-muted, #59506e); font-size:.83rem; font-weight:600; }
.profile-settings label > span[data-action-icon] { display:flex; align-items:center; gap:7px; }
.profile-settings label > span[data-action-icon]::before { color:var(--vt-primary-strong, #75658d); }
.profile-identity strong[hidden] { display: none; }
.portal .profile-identity p { margin: 0; font-size: .93rem; color: var(--vt-muted, #525970); }
.profile-grid {
  display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr);
  gap: clamp(18px,2.2vw,28px); padding: clamp(18px,3vw,32px);
}
.profile-settings { display: grid; gap: 15px; align-content: start; min-width: 0; }
.portal .profile-grid h3 { margin: 0 0 3px; font-size: 1.06rem; }
.profile-settings label { min-width: 0; }
.profile-settings label > span, .profile-dialog label > span { display: block; margin-bottom: 6px; font-weight: 600; }
.profile-dialog label > span.password-label-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.profile-settings :is(input,select), .profile-dialog input { width: 100%; min-height: 44px; }
.profile-settings button { justify-self: start; min-height: 44px; margin-top: 3px; }
.portal #verify-signin-email:not([hidden]) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin: 0 0 18px;
  padding: 14px 18px;
  border: 1px solid var(--vt-line, #dfd7f3);
  border-radius: 14px;
  background: var(--vt-gradient-soft, linear-gradient(135deg, #faf8ff 0%, var(--vt-primary-soft, #f4f0fb) 100%));
  box-shadow: var(--vt-shadow-card);
  font-size: 14px;
}
.portal #verify-signin-email .verify-banner-copy {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--vt-ink);
  font-weight: 500;
  min-width: 0;
  flex: 1 1 240px;
}
.portal #verify-signin-email .verify-banner-copy::before {
  content: "";
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  background: var(--vt-primary-strong);
  mask: var(--icon-shield) center / contain no-repeat;
}
.portal #verify-signin-email > a {
  flex: none;
  min-height: 40px;
  padding: 7px 14px;
  border: 1px solid var(--vt-line, #d5c7f2);
  border-radius: 10px;
  background: var(--vt-white);
  color: var(--vt-primary-strong);
  font-weight: 650;
  text-decoration: none;
}
.portal #verify-signin-email > a:hover {
  border-color: var(--vt-primary);
  background: var(--vt-primary-soft);
}
.profile-access { border-inline-start: 1px solid var(--profile-line); padding-inline-start: clamp(18px,2.2vw,24px); min-width: 0; }
.access-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px 12px; padding-block: 16px; }
.access-row + .access-row { border-top: 1px solid var(--profile-line); }
.access-detail { display: flex; align-items: center; gap: 12px; min-width: 0; }
.access-detail > div { min-width: 0; }
.access-row > :is(a, button) { justify-self: end; white-space: nowrap; }
.veyra-glass .access-detail::before { color:var(--vt-primary-strong, #6941af); width:21px; height:21px; flex-basis:21px; }
.portal .access-detail p { width:fit-content; margin:4px 0 0; color:var(--vt-muted, #51586b); font-size:.85rem; }
.access-detail p[data-enabled] { background:var(--vt-paper, #f2f1f6); border:1px solid var(--vt-line); border-radius:99px; padding:2px 9px; color:var(--vt-muted); }
.access-detail p[data-enabled="true"] { background:var(--vt-success-soft, #e2f5ef); border-color:transparent; color:var(--vt-success, #116650); }
.portal .profile-message { margin:0; color:var(--vt-success, #176e63); }
.portal .profile-message.error { color:var(--ui-danger, #a02c37); }
.portal .profile-dialog { width:min(460px,calc(100vw - 28px)); max-height:calc(100dvh - 32px); padding:clamp(18px,3vw,28px); overflow-y:auto; }
.profile-dialog-head,.profile-dialog-actions { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.profile-dialog-head { margin-bottom:20px; }
.portal .profile-dialog-head h2 { margin:0; display:flex; align-items:center; gap:10px; }
.portal .profile-dialog :is(.ui-dialog-close, .icon-close) { width:40px; height:40px; min-width:40px; min-height:40px; padding:0; border-radius:var(--vt-radius, 10px); flex:none; }
.password-input-wrap { position:relative; display:flex; align-items:center; width:100%; }
.profile-dialog .password-input-wrap input { padding-inline-end:44px; }
.portal .profile-dialog button.password-eye-btn {
  position:absolute; inset-inline-end:4px; top:50%; transform:translateY(-50%);
  display:inline-grid; place-items:center;
  width:36px; height:36px; min-width:36px; min-height:36px; padding:0; margin:0;
  border:0; border-radius:8px; background:transparent; box-shadow:none;
  color:var(--vt-muted); cursor:pointer;
}
.portal .profile-dialog button.password-eye-btn:hover { background:var(--vt-primary-soft); color:var(--vt-primary-strong); }
.password-eye-btn .eye-off { display:none; }
.password-eye-btn[aria-pressed="true"] .eye-open { display:none; }
.password-eye-btn[aria-pressed="true"] .eye-off { display:block; }
.password-char-badge {
  display:inline-flex; align-items:center; padding:2px 8px; border-radius:999px;
  border:1px solid var(--vt-line); background:var(--vt-paper); color:var(--vt-muted);
  font-size:11.5px; font-weight:700; font-variant-numeric:tabular-nums;
}
.password-char-badge[data-valid="true"] {
  background:var(--vt-success-soft, #e2f5ef); border-color:color-mix(in srgb, var(--vt-success, #15803d) 36%, transparent); color:var(--vt-success, #116650);
}
.profile-dialog-actions { justify-content:flex-end; flex-wrap:wrap; }
.profile-dialog form { gap:14px; }
.profile-dialog form small { color:var(--vt-muted, var(--console-muted)); }
#password-length { margin-top:-10px; }

@media (max-width: 1120px) {
  .profile-grid { grid-template-columns: 1fr; }
  .profile-access { border: 0; border-top: 1px solid var(--profile-line); padding: 18px 0 0; }
}
@media (max-width: 740px) {
  .billing-renewal-card { grid-template-columns: 42px minmax(0, 1fr); align-items: start; }
  .billing-renewal-card > a { grid-column: 2; }
}
@media (max-width: 480px) {
  .access-row { grid-template-columns: minmax(0, 1fr); justify-items: start; }
  .access-row > :is(a, button) { justify-self: start; }
}
@container (max-width: 600px) {
  .credit-rate-grid { grid-template-columns: 1fr; }
  .credit-rate-card { grid-template-columns: clamp(70px, 23cqw, 125px) minmax(0, 1fr); grid-template-rows: auto auto; }
  .credit-rate-copy { align-self: end; }
  .rate-art { grid-row: span 2; height: 100%; min-height: 78px; max-block-size: none; aspect-ratio: auto; }
  .credit-rate-estimate { justify-self: stretch; }
}

.portal .order-row { padding: clamp(18px,2.5vw,28px); display:grid; gap:16px; background:var(--vt-white); border-color:var(--vt-line); }
.portal .order-row header { align-items:center; flex-flow:row wrap; gap:10px 16px; }
.portal .order-row h3 { margin:0; font-size:1.12rem; }
.order-checkout { display:flex; flex-wrap:wrap; align-items:center; gap:10px; }
.portal .order-row details { margin:0; background:var(--vt-paper); border:1px solid var(--vt-line, var(--console-line)); border-radius:12px; padding:0 15px; }
.order-row details summary { cursor:pointer; min-height:44px; align-content:center; padding-block:10px; font-weight:650; }
.order-row details[open] { padding-bottom:14px; }
.order-row details > p { margin:4px 0 12px; overflow-wrap:anywhere; }
.order-deadline { display:flex; align-items:center; gap:8px; }
.portal .order-row button.order-cancel { color:var(--ui-danger, #923443); }
.portal .order-row .pill[data-state="pending"] { background:var(--vt-warning-soft, #fbefd9); color:var(--vt-warning, #7c5014); }

/* Card-First Activity Rows (#usage-rows & #ledger-rows) & Service Rate Mini-Cards (/account) */
.veyra-glass.design-workspace.portal :is(#usage-history, #credit-history) .account-activity-surface {
  max-block-size: none;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.portal :is(#usage-history, #credit-history) table.account-activity-table,
.portal :is(#usage-history, #credit-history) table.account-activity-table > tbody {
  display: grid;
  width: 100%;
  min-width: 0;
  gap: 10px;
}
.portal :is(#usage-history, #credit-history) table.account-activity-table > thead {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.portal :is(#usage-history, #credit-history) tbody tr.account-activity-row {
  display: grid;
  align-items: center;
  gap: 10px 16px;
  padding: 14px 16px;
  border: 1px solid var(--vt-line);
  border-radius: 13px;
  background: var(--vt-paper);
  transition: border-color var(--ui-transition), background-color var(--ui-transition), box-shadow var(--ui-transition);
}
.portal :is(#usage-history, #credit-history) tbody tr.account-activity-row:hover {
  border-color: var(--vt-border-hover, var(--vt-primary-tint));
  background: var(--vt-white);
  box-shadow: var(--vt-shadow-card);
}
.portal #usage-history tbody tr.usage-activity-row {
  grid-template-columns: minmax(220px, 1.5fr) auto auto auto auto;
}
.portal #usage-history tbody tr.usage-activity-row:has(td[data-bundled="true"]) {
  grid-template-columns: minmax(220px, 1.6fr) auto auto;
}
.portal #usage-history tbody tr.usage-activity-row td[data-bundled="true"] {
  display: none;
}
.portal #credit-history tbody tr.ledger-activity-row {
  grid-template-columns: minmax(220px, 1.6fr) auto auto;
}
.portal :is(#usage-history, #credit-history) tbody tr td {
  padding: 0;
  border: 0;
  min-width: 0;
  background: transparent;
}
.portal :is(#usage-history, #credit-history) tbody tr.activity-empty-row td.empty {
  display: block;
  padding: 26px 18px;
  border: 1px dashed var(--vt-line);
  border-radius: 13px;
  background: var(--vt-paper);
  color: var(--vt-muted);
  text-align: center;
}
.activity-cell-main {
  display: flex;
  align-items: center;
  gap: 12px;
}
.activity-service-icon {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 11px;
  border: 1px solid var(--vt-line);
  background: var(--vt-primary-soft);
  color: var(--vt-primary-strong);
}
.activity-service-icon[data-action-icon]::before { width: 18px; height: 18px; flex: 0 0 18px; }
.activity-service-icon[data-service="livestream"],
.activity-service-icon[data-service="tts"],
.activity-service-icon[data-service="refund"] {
  background: var(--vt-teal-soft);
  color: var(--vt-teal-strong);
}
.activity-service-icon[data-service="topup"],
.activity-service-icon[data-service="trial"] {
  background: var(--vt-success-soft);
  color: var(--vt-success);
}
.activity-service-icon[data-service="voice-clone"] {
  background: linear-gradient(135deg, var(--vt-primary-tint), var(--vt-teal-soft));
  color: var(--vt-primary-strong);
}
.activity-copy { min-width: 0; display: grid; gap: 4px; }
.activity-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.activity-title { font-size: 14.5px; font-weight: 650; color: var(--vt-ink); }
.activity-type-pill,
.activity-unit-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--vt-line);
  background: var(--vt-white);
  color: var(--vt-muted);
  font-size: 11.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.activity-type-pill {
  border-color: var(--vt-primary-tint);
  background: var(--vt-primary-soft);
  color: var(--vt-primary-strong);
}
.activity-unit-pill[data-action-icon]::before { width: 12px; height: 12px; flex: 0 0 12px; opacity: 0.78; }
.activity-meta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.activity-time { font-size: 12.5px; color: var(--vt-muted); font-variant-numeric: tabular-nums; }
.activity-cell-sub { font-size: 13px; color: var(--vt-muted); font-variant-numeric: tabular-nums; }
.activity-credit-delta {
  display: inline-flex;
  align-items: center;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid var(--vt-line);
  background: var(--vt-white);
  color: var(--vt-ink);
  font-size: 13.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.activity-credit-delta[data-delta="plus"] {
  border-color: color-mix(in srgb, var(--vt-success, #16a34a) 32%, transparent);
  background: var(--vt-success-soft, #dcfce7);
  color: var(--vt-success, #15803d);
}
.activity-credit-delta[data-delta="zero"] { color: var(--vt-muted); font-weight: 600; }
.ledger-balance-pill {
  display: grid;
  justify-items: end;
  gap: 1px;
  font-variant-numeric: tabular-nums;
}
.ledger-balance-pill small { font-size: 11px; color: var(--vt-muted); margin: 0; }
.ledger-balance-pill strong { font-size: 13px; font-weight: 650; color: var(--vt-ink); }

/* 3-Card Service Rate Mini-Card Grid (.billing-detail .rate-list) */
.service-rate-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.service-rate-mini-card {
  --mini-accent: var(--vt-primary-strong);
  --mini-surface: var(--vt-primary-soft);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 15px;
  border: 1px solid var(--vt-line);
  border-radius: 13px;
  background: var(--vt-paper);
  min-width: 0;
}
.service-rate-mini-card[data-mode="captions"] {
  --mini-accent: var(--vt-teal-strong, #0f766e);
  --mini-surface: var(--vt-teal-soft, #e6f7f5);
}
.service-rate-mini-card[data-mode="s2s"] {
  --mini-accent: #9a4a24;
  --mini-surface: #faeee5;
}
[data-theme="dark"] .service-rate-mini-card[data-mode="s2s"] {
  --mini-accent: #fdba74;
  --mini-surface: #332116;
}
.service-rate-mini-icon {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 10px;
  background: var(--mini-surface);
  color: var(--mini-accent);
}
.service-rate-mini-icon[data-action-icon]::before { width: 18px; height: 18px; flex: 0 0 18px; }
.service-rate-mini-copy { min-width: 0; display: grid; gap: 3px; }
.service-rate-mini-copy h3 { margin: 0; font-size: 14px; font-weight: 650; color: var(--vt-ink); }
.service-rate-mini-copy strong {
  font-size: 16px;
  font-weight: 750;
  color: var(--mini-accent);
  font-variant-numeric: tabular-nums;
}
.service-rate-mini-copy small { font-size: 12.5px; line-height: 1.4; color: var(--vt-muted); }
.portal .billing-detail .rate-list-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding-top: 4px;
}
.portal .billing-detail .rate-list-footer p {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  margin: 0;
}

@media (max-width: 1100px) {
  .service-rate-mini-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 1080px) {
  .portal #usage-history tbody tr.usage-activity-row,
  .portal #usage-history tbody tr.usage-activity-row:has(td[data-bundled="true"]),
  .portal #credit-history tbody tr.ledger-activity-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .portal #usage-history .activity-cell-main,
  .portal #credit-history .activity-cell-main {
    grid-column: 1 / -1;
  }
  .portal #usage-history .activity-cell-total,
  .portal #credit-history .activity-cell-after {
    justify-self: end;
  }
}

/* The plan heading has a title and a refresh action. Give the title the flexible column. */
@media (min-width: 461px) and (max-width: 670px) {
  .portal.workspace-shell.design-workspace .credit-heading {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 12px;
  }
  .portal.workspace-shell.design-workspace .credit-heading #refresh { grid-column: auto; }
}
