/* billing page — the original site dashboard look (see DESIGN_PARITY.md). Only this page's styles; tokens come from styles.css.
   Plan cards follow the original pricing page (brand-mirror dist/ch _next/static/css/84fb9eeb…: plan name, price with a
   raised $, credits line under a rule), flat like the dashboard's cards: Pro is marked by an accent border and a light
   peach fill, no gradients or glows. The shell provides .page-head, .stat-strip, .btn, .card and the confirm dialog;
   dark mode comes from the shell's tokens. */
.bil{
  --bil-rule:color-mix(in oklab,var(--text) 12%,transparent);
  --bil-hair:color-mix(in oklab,var(--text) 10%,transparent);
  max-width:1180px;color:var(--text)}
.bil-ic{flex:none}
.bil .card{display:block;padding:0;gap:0}

/* plan figures (the shell's .stat-strip) and the status line under them */
.bil-strip .stat-note{display:flex;flex-wrap:wrap;align-items:center;gap:6px 8px}
.bil-dot{width:7px;height:7px;border-radius:50%;background:var(--text-faint)}
.bil-dot[data-tone=ok]{background:var(--positive)}.bil-dot[data-tone=trial]{background:var(--accent)}.bil-dot[data-tone=warn]{background:var(--warning)}
/* .com trial-pill */
.bil-trial{display:inline-flex;align-items:center;padding:4px 8px;border-radius:6px;border:1px solid color-mix(in srgb,var(--accent) 22%,transparent);
  background:var(--accent-soft);color:var(--accent-text,var(--accent));font-size:12px;font-weight:500;line-height:1;white-space:nowrap}
.bil-status{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px 16px;margin:12px 0 0}
.bil-status p{display:flex;align-items:flex-start;gap:8px;flex:1 1 360px;min-width:0;margin:0;max-width:78ch;color:var(--text-muted);font-size:14px;line-height:1.55}
.bil-status.is-warn p{color:color-mix(in oklab,var(--warning) 80%,var(--text))}
.bil-status .bil-ic{margin-top:2px}
#blCancel:hover{color:var(--negative);border-color:color-mix(in oklab,var(--negative) 45%,var(--border))}
/* no plan yet: one quiet line, then the plan cards */
.bil-quiet{margin:0;color:var(--text-muted);font-size:14px;line-height:1.55}

/* notice (.com ui-notice) and alert (.com ui-alert) */
.bil-notice{display:flex;flex-wrap:wrap;align-items:center;gap:10px 14px;margin:0 0 20px;padding:14px 16px;border:1px solid var(--border);border-radius:12px;
  background:var(--surface-2);color:var(--text-muted);font-size:13.5px;line-height:1.55}
.bil-notice p{flex:1 1 320px;min-width:0;margin:0}
.bil-notice>.bil-ic{align-self:flex-start;margin-top:2px}
.bil-spin{flex:none;width:14px;height:14px;border:2px solid var(--accent);border-right-color:transparent;border-radius:50%;animation:bil-spin .65s linear infinite}
@keyframes bil-spin{to{transform:rotate(360deg)}}
.bil-alert{margin:14px 0 0;padding:11px 14px;border-radius:12px;font-size:13.5px;line-height:1.55;color:color-mix(in oklab,var(--negative) 85%,var(--text));
  background:color-mix(in oklab,var(--negative) 7%,var(--surface));border:1px solid color-mix(in oklab,var(--negative) 24%,var(--border))}

/* sections */
.bil-sec{margin-top:36px}
.bil-sec-first{margin-top:20px}
.bil-sechead{margin:0 0 16px}
.bil-h2,.bil-h3{margin:0;font-family:var(--font-heading);font-size:20px;font-weight:700;line-height:1.25;letter-spacing:-.02em;color:var(--text)}
.bil-sechead p{max-width:72ch;margin:6px 0 0;color:var(--text-muted);font-size:15px;line-height:1.55;text-wrap:pretty}

/* plan cards: the original pricing page, flat */
.bil-plans{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;align-items:stretch}
.bil .bil-card{position:relative;display:flex;flex-direction:column;min-width:0;padding:24px;border-radius:16px}
.bil .bil-card-pro{border-color:color-mix(in oklab,var(--accent) 40%,var(--bil-rule));background:color-mix(in oklab,var(--peach) 34%,var(--surface))}
:root[data-theme=dark] .bil .bil-card-pro{border-color:color-mix(in oklab,var(--accent) 42%,transparent);background:color-mix(in oklab,var(--accent) 6%,var(--surface))}
.bil-name{margin:0;font-family:var(--font-heading);font-size:20px;font-weight:700;line-height:1.25;letter-spacing:-.02em;color:var(--text)}
.bil-who{margin:4px 0 0;color:var(--text-muted);font-size:14px;font-weight:500}
.bil-card-pro .bil-who{color:var(--accent-text,var(--accent))}
.bil-price{display:flex;flex-wrap:wrap;align-items:baseline;gap:.2rem .6rem;margin-top:18px}
.bil-price-fig{display:inline-flex;align-items:flex-start;font-family:var(--font-heading);font-size:32px;font-weight:700;line-height:1;
  letter-spacing:-.03em;font-variant-numeric:tabular-nums;color:var(--text)}
.bil-price-fig small{margin:.2rem .08rem 0 0;font-size:.5em;letter-spacing:0}
.bil-per{color:var(--text-muted);font-size:14px}
.bil-per b{color:var(--text);font-weight:600}
.bil-credits{margin:16px 0 0;padding-top:14px;border-top:1px solid var(--bil-rule);color:var(--text-muted);font-size:14px;line-height:1.5}
.bil-credits b{color:var(--text);font-weight:600;font-variant-numeric:tabular-nums}
.bil-items{display:grid;margin:10px 0 0;padding:0;list-style:none}
.bil-items li{display:grid;grid-template-columns:16px minmax(0,1fr);gap:10px;padding:8px 0;color:var(--text-muted);font-size:14px;line-height:1.5}
.bil-items li+li{border-top:1px solid var(--bil-hair)}
.bil-items .bil-ic{margin-top:2px;color:var(--positive)}
.bil-foot{display:grid;justify-items:start;gap:.7rem;margin-top:auto;padding-top:20px}
.bil-switch{margin:0;color:var(--text-muted);font-size:14px;line-height:1.5}
.bil-switch a{color:var(--text);font-weight:500;text-decoration:underline;text-decoration-color:var(--border-strong);text-underline-offset:3px}
.bil-switch a:hover{text-decoration-color:currentColor}
/* the current plan: a plain status, not a button */
.bil-mine{display:flex;align-items:center;gap:8px;margin:0;color:var(--text);font-size:14px;font-weight:500}
.bil-mine .bil-ic{color:var(--positive)}

/* top-up */
.bil .bil-topup{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:20px 48px;padding:24px;border-radius:16px}
.bil-topup-copy p{margin:8px 0 0;max-width:52ch;color:var(--text-muted);font-size:15px;line-height:1.55}
.bil-topup-copy .bil-fine{margin-top:10px;color:var(--text-muted);font-size:13px}
.bil-topup-buy{display:grid;justify-items:end;gap:12px;min-width:0}
.bil-topup-price{display:flex;align-items:baseline;gap:.6rem}
.bil-price-sm{font-size:28px}
.bil-topup-buy .bil-alert{margin:0;max-width:360px}

@media (max-width:860px){
  .bil-plans{grid-template-columns:minmax(0,1fr)}
}
@media (max-width:760px){
  .bil-strip .stat:nth-child(3){grid-column:1/-1}
  .bil .bil-topup{grid-template-columns:minmax(0,1fr);padding:20px}
  .bil-topup-buy{justify-items:start}
  .bil .bil-card{padding:20px}
}
@media (prefers-reduced-motion:reduce){.bil-spin{animation-duration:2s}}
