/* Paper 115/119/127: existing shell, paper/coal tokens, fixed fact lanes. */
.billing-view { display: flex; flex-direction: column; gap: 24px; }
.billing-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.billing-heading h1 { font-size: 36px; line-height: 42px; letter-spacing: -.02em; font-weight: 400; }
.billing-heading > span, .billing-label { font: 11px/16px var(--mono); color: var(--ink-muted); }
.billing-balance { display: flex; gap: 40px; padding: 24px 28px; border: 1px solid var(--paper-border); background: var(--paper-card); border-radius: 8px; }
.billing-balance-facts { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.billing-amount { font-size: 44px; line-height: 48px; letter-spacing: -.02em; }
.billing-view p { margin: 0; font-size: 13px; line-height: 18px; color: var(--ink-secondary); }
.billing-topup { display: flex; flex-direction: column; gap: 10px; width: 360px; flex-shrink: 0; padding-left: 28px; border-left: 1px solid var(--paper-border); }
.billing-view button { background: none; border: 1px solid var(--paper-border-strong); border-radius: 4px; padding: 7px 14px; color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; }
.billing-view button:disabled { opacity: .6; cursor: wait; }
.billing-view button:focus-visible, .billing-view a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.billing-view .billing-primary { background: var(--accent-deep); color: var(--on-accent); font-weight: 700; }
.billing-view input { width: 100%; min-width: 0; padding: 8px 10px; border: 1px solid var(--paper-border-strong); border-radius: 4px; background: var(--paper-card); color: var(--ink); font: inherit; }
.billing-topup > button { align-self: flex-start; }
.billing-topup small, .billing-muted { color: var(--ink-muted); font-size: 12px; }
.billing-presets { display: flex; }
.billing-presets button { border-radius: 0; }
.billing-presets button:first-child { border-radius: 4px 0 0 4px; }
.billing-presets button:last-child { border-radius: 0 4px 4px 0; }
.billing-presets button + button { border-left: 0; }
.billing-view h2 { margin: 0 0 10px; font-size: 15px; line-height: 20px; font-weight: 700; }
.billing-account, .billing-table { background: var(--paper-card); border: 1px solid var(--paper-border); border-radius: 8px; overflow: hidden; }
.billing-account-row { display: flex; align-items: center; gap: 16px; padding: 13px 20px; font-size: 13px; border-bottom: 1px solid var(--paper-border); }
#billing-invoices > .billing-account-row { padding-inline: 0; }
.billing-account-row:last-child { border-bottom: none; }
.billing-account-row strong { width: 200px; flex-shrink: 0; }
.billing-account-row > span { flex: 1; min-width: 0; color: var(--ink-secondary); }
.billing-account-row a { color: var(--accent-text); }
.billing-policy-row, .billing-policy-head { display: grid; grid-template-columns: minmax(140px, 1fr) 120px 100px 80px 100px; align-items: center; gap: 16px; padding: 13px 20px; }
.billing-policy-head { font: 11px/14px var(--mono); color: var(--ink-muted); }
.billing-policy-row { border-top: 1px solid var(--paper-border); font-size: 13px; }
.billing-policy-row > span { font: 12px/16px var(--mono); }
.billing-policy-row button, .billing-account-row button, .billing-section-heading button { border: none; color: var(--accent-text); padding: 0; justify-self: end; }
.billing-section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.billing-empty { padding-top: 28px; border-top: 1px solid var(--paper-border); }
.billing-transactions { border-top: 1px solid var(--paper-border); }
.billing-transaction { display: grid; grid-template-columns: 140px minmax(0,1fr) 120px; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--paper-border); font-size: 13px; }
.billing-transaction > :last-child { text-align: right; font-family: var(--mono); }
.billing-transaction time { color: var(--ink-muted); }
.billing-editor { margin-top: 16px; padding: 20px; max-width: 540px; background: var(--paper-card); border: 1px solid var(--paper-border); border-radius: 8px; display: flex; flex-direction: column; gap: 12px; }
.billing-editor label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.billing-editor footer { display: flex; justify-content: flex-end; gap: 12px; }
.billing-view [role="alert"] { color: var(--danger); }
.billing-view [role="alert"]:empty { display: none; }
@media (max-width: 1000px) {
  .billing-balance { flex-direction: column; gap: 24px; padding: 20px; }
  .billing-topup { width: 100%; padding: 20px 0 0; border-left: none; border-top: 1px solid var(--paper-border); }
  .billing-policy-head { display: none; }
  .billing-policy-row { grid-template-columns: minmax(0,1fr) auto; gap: 10px; }
  .billing-policy-row > strong { grid-column: 1 / -1; }
  .billing-policy-row > span:nth-child(2)::after { content: " / month"; }
  .billing-policy-row > span:nth-child(3)::after { content: " / run"; }
  .billing-policy-row > span:nth-child(4)::after { content: " at once"; }
  .billing-account-row { flex-wrap: wrap; }
  .billing-account-row strong { width: 110px; }
  .billing-heading { align-items: start; flex-direction: column; gap: 8px; }
  .billing-transaction { grid-template-columns: 92px minmax(0,1fr) 82px; gap: 10px; }
}
